- fixed bad null check in aiProcessDudes.

This commit is contained in:
Christoph Oelckers 2021-09-10 23:36:18 +02:00
parent c6dc564788
commit f370c0f22f

View file

@ -1655,11 +1655,14 @@ void aiProcessDudes(void)
pXSprite->stateTimer = ClipLow(pXSprite->stateTimer - 4, 0); pXSprite->stateTimer = ClipLow(pXSprite->stateTimer - 4, 0);
if (pXSprite->aiState && pXSprite->aiState->moveFunc) if (pXSprite->aiState)
pXSprite->aiState->moveFunc(actor); {
if (pXSprite->aiState->moveFunc)
pXSprite->aiState->moveFunc(actor);
if (pXSprite->aiState->thinkFunc && (gFrameCount & 3) == (pSprite->index & 3)) // ouch, ouch! :( if (pXSprite->aiState->thinkFunc && (gFrameCount & 3) == (actor->GetIndex() & 3)) // ouch, ouch! :(
pXSprite->aiState->thinkFunc(actor); pXSprite->aiState->thinkFunc(actor);
}
switch (pSprite->type) { switch (pSprite->type) {
#ifdef NOONE_EXTENSIONS #ifdef NOONE_EXTENSIONS