Leave the host's falling bipeds to the host on a client

A client ran biped_falling_damage's outside-the-world erase on the host's
AI bipeds too: object_delete refuses them there (network_objects_may_delete),
so nothing was erased, but each was logged as erased. On a co-op client of a
crowded game that was hundreds of false warnings. The host erases them, and
its delete reaches the clients.
This commit is contained in:
xshxdex98 committed 2026-10-07 14:59:38 -05:00
1 parent 4e8ed2f196
commit 4935052857
1 file changed
+8 -1
+8 -1
View File
@@ -277,6 +277,10 @@ symbols in this file:
#include "structures/structure_bsp_definitions.h"
#include "network_coop.h" /* port: port/linux/game/network_coop.c */
/* port: port/linux/game/network_objects.c's (a client deletes the host's
objects on the host's word alone) */
boolean network_objects_may_delete(long object_index);
/* port: an unarmed player's melee's length, in ticks (a weapon's is about
this: its first person melee animation, sped up a quarter) */
#define UNARMED_MELEE_TICKS 16
@@ -830,9 +834,12 @@ static void biped_falling_damage(
object_cause_damage(&damage, biped_index, NONE, NONE, NONE, NULL);
}
/* (port: not the host's biped on a client, which the host erases:
the delete was refused, and logged as done) */
if (!game_engine_running() &&
TEST_FLAG(biped->object.flags, _object_outside_of_map_bit) &&
player_index_from_unit_index(biped_index) == NONE)
player_index_from_unit_index(biped_index) == NONE &&
network_objects_may_delete(biped_index))
{
long actor_index = biped->unit.swarm_actor_index;