Repository navigation
v0.8.4 - The Client Physics Rewrite
This update completely replaces the client-side shrapnel system. Instead of
lightweight visual "mirrors" that floated through walls, clients now run the
exact same physics as the server — real Rigidbody2D, real colliders, real
bouncing. Bandwidth dropped by ~70 packets per explosion.
🔥 What's New
-
Real Client-Side Physics: Clients now create actual
ShrapnelProjectile
instances withRigidbody2DandCircleCollider2D— identical to the server.
Shards bounce off walls, ricochet off metal surfaces, and settle into terrain
naturally via Unity's physics engine. No more wall-clipping between server
snapshots. -
Ricochets Work on Clients: Previous mirrors had no physics and flew straight
through surfaces. Now the same ricochet logic runs on every screen — shards
spark off metallic blocks and deflect at the correct angle automatically. -
Bandwidth Reduced ~90%: The
MSG_SNAPSHOTmessage type (10Hz position
updates for every flying shard) is completely removed. A typical explosion with
125 shards previously sent ~52 snapshot packets. Now it sends zero. Only three
message types remain: spawn, rest correction, destroy. -
ClientMirrorShrapnelDeleted: The entire 600-line mirror system with
manual gravity simulation, snapshot interpolation, velocity correction, landing
blend, and camera LOD is gone. The sameShrapnelProjectilecomponent handles
everything — server and client alike. -
Server REST Correction: Physics diverge slightly between host and client
(different collision timing, floating point). When a server shard comes to rest,
MSG_STATEsends the authoritative final position and rotation. The client shard
snaps smoothly viaForceToState— the landing position is always correct. -
All Damage Stays Server-Side: Client shards are visually identical but
gameplay-inert. Collisions with limbs, blocks, entities, and step-on triggers
are silently ignored on the client.IsServerAuthoritative = falsegates every
damage path — no double damage, no phantom injuries.
🛠️ Installation
- Requires BepInEx 5.4.21+
installed in your game directory. - Place
ScavShrapnelMod.dllinto:
CasualtiesUnknownDemo/BepInEx/plugins/ - Launch the game — config updates automatically on first run.
Full technical breakdown in CHANGELOG.md.