- RR: fixed wakeup check logic in movefta.

Essentially the feature must be on for all RR actors and off for all Duke actors.
RR's original logic here to exclude animals was broken and non-functional.
This commit is contained in:
Christoph Oelckers 2022-01-04 09:39:55 +01:00
parent 783dd98641
commit 226807db34
2 changed files with 7 additions and 2 deletions

View file

@ -5313,6 +5313,7 @@ void movefta(void)
act->spr.shade = act->sector()->ceilingshade;
else act->spr.shade = act->sector()->floorshade;
// wakeup is an RR feature, this flag will later allow it to use in Duke, too.
if (actorflag(act, SFLAG2_MOVEFTA_WAKEUPCHECK))
{
if (wakeup(act, p))

View file

@ -227,10 +227,14 @@ void initactorflags_r()
NUKEBARRELLEAKED
});
setflag(SFLAG2_MOVEFTA_WAKEUPCHECK, { HEN, COW, PIG, DOGRUN });
// Animals were not supposed to have this, but due to a coding bug the logic was unconditional for everything in the game.
for (auto& ainf : gs.actorinfo)
{
ainf.flags2 |= SFLAG2_MOVEFTA_WAKEUPCHECK;
}
if (isRRRA())
{
setflag(SFLAG2_MOVEFTA_WAKEUPCHECK, { RABBIT });
setflag(SFLAG2_MOVEFTA_CHECKSEEWITHPAL8, { MINION });
}