- Duke: fixed monster sight sounds not being played.

This commit is contained in:
Christoph Oelckers 2022-01-09 21:24:38 +01:00
parent 91d51d518b
commit 0f925d4cc0
2 changed files with 8 additions and 3 deletions

View file

@ -5236,6 +5236,12 @@ void movefta(void)
int canseeme, p;
sectortype* psect, * ssect;
auto check_fta_sounds = [](DDukeActor* act)
{
if (isRR()) check_fta_sounds_r(act);
else check_fta_sounds_d(act);
};
DukeStatIterator it(STAT_ZOMBIEACTOR);
while (auto act = it.Next())
{
@ -5300,7 +5306,7 @@ void movefta(void)
else
{
act->timetosleep = 0;
check_fta_sounds_r(act);
check_fta_sounds(act);
ChangeActorStat(act, STAT_ACTOR);
}
}
@ -5319,7 +5325,7 @@ void movefta(void)
if (wakeup(act, p))
{
act->timetosleep = 0;
check_fta_sounds_r(act);
check_fta_sounds(act);
ChangeActorStat(act, STAT_ACTOR);
}
}

View file

@ -96,7 +96,6 @@ void handle_se128(DDukeActor* i);
void handle_se130(DDukeActor* i, int countmax, int EXPLOSION2);
void respawn_rrra(DDukeActor* oldact, DDukeActor* newact);
// This is only called from game specific code so it does not need an indirection.
void check_fta_sounds_d(DDukeActor* i);
void check_fta_sounds_r(DDukeActor* i);