mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-27 15:00:48 +01:00
A scenery or device whose shield is all damage can break (Rat Race's energy shields, the tripmines of Altis94's Bigass) was no static target of the netcode, which took only those with a body to destroy (network_damage.c's static_target). So a client's hits on it were never reported to the host and the host never sent its damage: clients could not break the shields, and when the host broke one, clients still saw it and stood on it while the host saw them floating. static_target now takes those with a shield too. The host sends its damage to them, as to destructible scenery, and takes clients' hits on them. Clients, which otherwise run no object's shields but take the host's state of them, run these objects' shield stun and recharge themselves (damage.c's objects_update_shields), since the host sends no state of the map's scenery: each machine deals the same damage and recharges the same way, so the shield's regions go and come back on every machine. Network version 34: a host and a client must agree on which objects' damage is shared. NETCODE.md says so and network_format.txt is recorded for 34. Checked: the Windows build; the new harness test test_static_target (a body, a shield only on scenery and on a device, neither, a unit, no object, and three negative controls, one the old rule); the whole harness on Windows fails the same 245 environment-bound tests as testing does, no others; network_format.py. Not yet checked in a game: a client breaking Rat Race's shields and Bigass's tripmines, and seeing the host's broken and recharged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>