Skip to content

v0.8.4 - The Client Physics Rewrite

Choose a tag to compare

@paralax034 paralax034 released this 20 Mar 16:05
· 7 commits to main since this release
5db5889

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 with Rigidbody2D and CircleCollider2D — 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_SNAPSHOT message 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.

  • ClientMirrorShrapnel Deleted: The entire 600-line mirror system with
    manual gravity simulation, snapshot interpolation, velocity correction, landing
    blend, and camera LOD is gone. The same ShrapnelProjectile component 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_STATE sends the authoritative final position and rotation. The client shard
    snaps smoothly via ForceToState — 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 = false gates every
    damage path — no double damage, no phantom injuries.

🛠️ Installation

  1. Requires BepInEx 5.4.21+
    installed in your game directory.
  2. Place ScavShrapnelMod.dll into:
    CasualtiesUnknownDemo/BepInEx/plugins/
  3. Launch the game — config updates automatically on first run.

Full technical breakdown in CHANGELOG.md.