mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-17 20:00:25 +02:00
Breakable surfaces (glass) are broken by each machine's own projectiles with its own random damage, so a pane could shatter on the host and stay whole, still blocking, on a client. In co-op the host now sends each break (and a few again every refresh, for late joiners), and a client breaks the same surface with its shards. Destructible scenery and devices (lights, panels) are the map's, at the same index on every machine, but only damage to units was synced: a client's shots never damaged them, and what the host broke didn't break or play its effects on the clients. A client now reports its hits on them like any other, the host checks and deals them, and every client deals the host's damage to its own copy, which breaks, plays its effects and is destroyed as the host's was. Both are new message kinds that a client without them ignores, so the network version is unchanged.