diff --git a/source/games/blood/src/ai.cpp b/source/games/blood/src/ai.cpp index 060c4b718..1d23125c5 100644 --- a/source/games/blood/src/ai.cpp +++ b/source/games/blood/src/ai.cpp @@ -1655,11 +1655,14 @@ void aiProcessDudes(void) pXSprite->stateTimer = ClipLow(pXSprite->stateTimer - 4, 0); - if (pXSprite->aiState && pXSprite->aiState->moveFunc) - pXSprite->aiState->moveFunc(actor); + if (pXSprite->aiState) + { + if (pXSprite->aiState->moveFunc) + pXSprite->aiState->moveFunc(actor); - if (pXSprite->aiState->thinkFunc && (gFrameCount & 3) == (pSprite->index & 3)) // ouch, ouch! :( - pXSprite->aiState->thinkFunc(actor); + if (pXSprite->aiState->thinkFunc && (gFrameCount & 3) == (actor->GetIndex() & 3)) // ouch, ouch! :( + pXSprite->aiState->thinkFunc(actor); + } switch (pSprite->type) { #ifdef NOONE_EXTENSIONS