mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-25 22:04:46 +01:00
Server Setup's Co-op Options has ALLY FRIENDLY FIRE (network.coop_ally_friendly_fire), ON by default as in the campaign. OFF, the players' weapons, grenades, melee and vehicles do their AI allies no damage, so that no player can kill Captain Keyes on Truth and Reconciliation, the Marines, or the other allies a level needs. The AI's own hits of its allies, the enemies' damage, and FRIENDLY FIRE between players are unchanged. A hit is the players' when its owner is a player and the victim is a friendly unit that is no player's, so friendly-team vehicles are immune to the players too, splatter included. An ally that cannot die cannot raise an allegiance incident, so the players cannot turn the Marines hostile either. The rule is in game_engine_friendly_damage (game_engine.c), which only the host's damage reaches: a client's hits are the host's to deal. The host sends the choice with the game's settings, as bit 1 of network_game's cooperative_flags beside PLAYER COLLISIONS', so network version 33: a client of version 32 would play the game's settings without it. NETCODE.md says so, and network_format.txt is recorded for 33. The menu row is tools/port_settings.py's (COOP_SETUP_SCREENS); only the server settings screen was written again. Its 8 rows fit above the help area. Checked: the Windows build; the harness tests, the new test_coop_ally_friendly_fire (a player's hit of an ally ON and OFF, the AI's own hit, players' friendly fire in every mode, no unit, the campaign without co-op, and four negative controls) and test_coop_scaling_menu with the eighth row; network_format.py; the Co-op Options screen drawn with the row; and in play as the host on a10 and a50 (Keyes and the Marines unharmed with OFF) and b30 (no splatter). Not yet: a client's hits online, d20's ending, c20's Sentinels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>