SERVER: Prevent Zombie sounds from triggering during spawn

This commit is contained in:
MotoLegacy 2024-11-26 11:37:14 -08:00
parent 368e8e7409
commit b3c25885ef

View file

@ -1962,6 +1962,12 @@ void(entity where) spawn_a_zombieB =
// set up timer for next spawn
zombie_spawn_timer = zombie_spawn_delay + time;
// Depending on how fast AI processes, sometimes Zombie_AI() will execute
// while we are still at the world origin temporarily. This can cause us
// to play a sound at the origin, so add a small delay to prevent this.
// (and randomize it a bit).
szombie.sound_time = time + (random() * 2) + 3;
};
void() zombie_dummy =