Blood: route all state actions through the VM interface and renamed all states and functions with disassembly names

This commit is contained in:
Christoph Oelckers 2023-10-07 10:31:56 +02:00
parent 495e236764
commit f61dc0467f
26 changed files with 356 additions and 350 deletions

View file

@ -95,7 +95,7 @@ void aiNewState(DBloodActor* actor, AISTATE* pAIState)
}
if (pAIState->enterFunc)
pAIState->enterFunc(actor);
callActorFunction(*pAIState->enterFunc, actor);
}
//---------------------------------------------------------------------------
@ -623,7 +623,7 @@ void aiActivateDude(DBloodActor* actor)
{
actor->dudeExtra.thinkTime = 1;
if (actor->xspr.aiState == &zombieSIdle) aiNewState(actor, &zombie13AC2C);
if (actor->xspr.aiState == &zombieSIdle) aiNewState(actor, &zombieEStand);
break;
}
case kDudeZombieButcher:
@ -1606,10 +1606,10 @@ void aiProcessDudes(void)
if (actor->xspr.aiState)
{
if (actor->xspr.aiState->moveFunc)
actor->xspr.aiState->moveFunc(actor);
callActorFunction(*actor->xspr.aiState->moveFunc, actor);
if (actor->xspr.aiState->thinkFunc && (gFrameCount & 3) == (actor->GetIndex() & 3))
actor->xspr.aiState->thinkFunc(actor);
callActorFunction(*actor->xspr.aiState->thinkFunc, actor);
}
#ifdef NOONE_EXTENSIONS

View file

@ -34,9 +34,15 @@ struct AISTATE {
int seqId;
VMNativeFunction** funcId;
int stateTicks;
#if 0
void(*enterFunc)(DBloodActor *);
void(*moveFunc)(DBloodActor *);
void(*thinkFunc)(DBloodActor *);
#else
VMNativeFunction** enterFunc;
VMNativeFunction** moveFunc;
VMNativeFunction** thinkFunc;
#endif
AISTATE *nextState;
};
extern AISTATE aiState[];

View file

@ -42,24 +42,24 @@ static void batMoveFly(DBloodActor*);
static void batMoveToCeil(DBloodActor*);
AISTATE batIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, batThinkTarget, NULL };
AISTATE batFlyIdle = { kAiStateIdle, 6, nullptr, 0, NULL, NULL, batThinkTarget, NULL };
AISTATE batChase = { kAiStateChase, 6, nullptr, 0, NULL, batMoveForward, batThinkChase, &batFlyIdle };
AISTATE batPonder = { kAiStateOther, 6, nullptr, 0, NULL, NULL, batThinkPonder, NULL };
AISTATE batGoto = { kAiStateMove, 6, nullptr, 600, NULL, batMoveForward, batThinkGoto, &batFlyIdle };
AISTATE batIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(batThinkTarget), NULL };
AISTATE batFlyIdle = { kAiStateIdle, 6, nullptr, 0, NULL, NULL, &AF(batThinkTarget), NULL };
AISTATE batChase = { kAiStateChase, 6, nullptr, 0, NULL, &AF(batMoveForward), &AF(batThinkChase), &batFlyIdle };
AISTATE batPonder = { kAiStateOther, 6, nullptr, 0, NULL, NULL, &AF(batThinkPonder), NULL };
AISTATE batGoto = { kAiStateMove, 6, nullptr, 600, NULL, &AF(batMoveForward), &AF(batThinkGoto), &batFlyIdle };
AISTATE batBite = { kAiStateChase, 7, &AF(batBiteSeqCallback), 60, NULL, NULL, NULL, &batPonder };
AISTATE batRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &batChase };
AISTATE batSearch = { kAiStateSearch, 6, nullptr, 120, NULL, batMoveForward, batThinkSearch, &batFlyIdle };
AISTATE batSwoop = { kAiStateOther, 6, nullptr, 60, NULL, batMoveSwoop, batThinkChase, &batChase };
AISTATE batFly = { kAiStateMove, 6, nullptr, 0, NULL, batMoveFly, batThinkChase, &batChase };
AISTATE batTurn = { kAiStateMove, 6, nullptr, 60, NULL, aiMoveTurn, NULL, &batChase };
AISTATE batHide = { kAiStateOther, 6, nullptr, 0, NULL, batMoveToCeil, batMoveForward, NULL };
AISTATE batDodgeUp = { kAiStateMove, 6, nullptr, 120, NULL, batMoveDodgeUp, 0, &batChase };
AISTATE batDodgeUpRight = { kAiStateMove, 6, nullptr, 90, NULL, batMoveDodgeUp, 0, &batChase };
AISTATE batDodgeUpLeft = { kAiStateMove, 6, nullptr, 90, NULL, batMoveDodgeUp, 0, &batChase };
AISTATE batDodgeDown = { kAiStateMove, 6, nullptr, 120, NULL, batMoveDodgeDown, 0, &batChase };
AISTATE batDodgeDownRight = { kAiStateMove, 6, nullptr, 90, NULL, batMoveDodgeDown, 0, &batChase };
AISTATE batDodgeDownLeft = { kAiStateMove, 6, nullptr, 90, NULL, batMoveDodgeDown, 0, &batChase };
AISTATE batSearch = { kAiStateSearch, 6, nullptr, 120, NULL, &AF(batMoveForward), &AF(batThinkSearch), &batFlyIdle };
AISTATE batSwoop = { kAiStateOther, 6, nullptr, 60, NULL, &AF(batMoveSwoop), &AF(batThinkChase), &batChase };
AISTATE batFly = { kAiStateMove, 6, nullptr, 0, NULL, &AF(batMoveFly), &AF(batThinkChase), &batChase };
AISTATE batTurn = { kAiStateMove, 6, nullptr, 60, NULL, &AF(aiMoveTurn), NULL, &batChase };
AISTATE batHide = { kAiStateOther, 6, nullptr, 0, NULL, &AF(batMoveToCeil), &AF(batMoveForward), NULL };
AISTATE batDodgeUp = { kAiStateMove, 6, nullptr, 120, NULL, &AF(batMoveDodgeUp), 0, &batChase };
AISTATE batDodgeUpRight = { kAiStateMove, 6, nullptr, 90, NULL, &AF(batMoveDodgeUp), 0, &batChase };
AISTATE batDodgeUpLeft = { kAiStateMove, 6, nullptr, 90, NULL, &AF(batMoveDodgeUp), 0, &batChase };
AISTATE batDodgeDown = { kAiStateMove, 6, nullptr, 120, NULL, &AF(batMoveDodgeDown), 0, &batChase };
AISTATE batDodgeDownRight = { kAiStateMove, 6, nullptr, 90, NULL, &AF(batMoveDodgeDown), 0, &batChase };
AISTATE batDodgeDownLeft = { kAiStateMove, 6, nullptr, 90, NULL, &AF(batMoveDodgeDown), 0, &batChase };
void batBiteSeqCallback(DBloodActor* actor)
{

View file

@ -36,31 +36,31 @@ static void beastThinkChase(DBloodActor*);
static void beastThinkSwimGoto(DBloodActor*);
static void beastThinkSwimChase(DBloodActor*);
static void beastMoveForward(DBloodActor*);
static void sub_628A0(DBloodActor*);
static void sub_62AE0(DBloodActor*);
static void sub_62D7C(DBloodActor*);
static void beastMoveSwim(DBloodActor*);
static void beastMoveSwimAlt(DBloodActor*);
static void beastMoveIn(DBloodActor*);
AISTATE beastIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE beastChase = { kAiStateChase, 8, nullptr, 0, NULL, beastMoveForward, beastThinkChase, NULL };
AISTATE beastDodge = { kAiStateMove, 8, nullptr, 60, NULL, aiMoveDodge, NULL, &beastChase };
AISTATE beastGoto = { kAiStateMove, 8, nullptr, 600, NULL, beastMoveForward, beastThinkGoto, &beastIdle };
AISTATE beastIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE beastChase = { kAiStateChase, 8, nullptr, 0, NULL, &AF(beastMoveForward), &AF(beastThinkChase), NULL };
AISTATE beastDodge = { kAiStateMove, 8, nullptr, 60, NULL, &AF(aiMoveDodge), NULL, &beastChase };
AISTATE beastGoto = { kAiStateMove, 8, nullptr, 600, NULL, &AF(beastMoveForward), &AF(beastThinkGoto), &beastIdle };
AISTATE beastSlash = { kAiStateChase, 6, &AF(SlashSeqCallback), 120, NULL, NULL, NULL, &beastChase };
AISTATE beastStomp = { kAiStateChase, 7, &AF(StompSeqCallback), 120, NULL, NULL, NULL, &beastChase };
AISTATE beastSearch = { kAiStateSearch, 8, nullptr, 120, NULL, beastMoveForward, beastThinkSearch, &beastIdle };
AISTATE beastSearch = { kAiStateSearch, 8, nullptr, 120, NULL, &AF(beastMoveForward), &AF(beastThinkSearch), &beastIdle };
AISTATE beastRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &beastDodge };
AISTATE beastTeslaRecoil = { kAiStateRecoil, 4, nullptr, 0, NULL, NULL, NULL, &beastDodge };
AISTATE beastSwimIdle = { kAiStateIdle, 9, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE beastSwimChase = { kAiStateChase, 9, nullptr, 0, NULL, sub_628A0, beastThinkSwimChase, NULL };
AISTATE beastSwimDodge = { kAiStateMove, 9, nullptr, 90, NULL, aiMoveDodge, NULL, &beastSwimChase };
AISTATE beastSwimGoto = { kAiStateMove, 9, nullptr, 600, NULL, beastMoveForward, beastThinkSwimGoto, &beastSwimIdle };
AISTATE beastSwimSearch = { kAiStateSearch, 9, nullptr, 120, NULL, beastMoveForward, beastThinkSearch, &beastSwimIdle };
AISTATE beastSwimSlash = { kAiStateChase, 9, &AF(SlashSeqCallback), 0, NULL, NULL, beastThinkSwimChase, &beastSwimChase };
AISTATE beastSwimIdle = { kAiStateIdle, 9, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE beastSwimChase = { kAiStateChase, 9, nullptr, 0, NULL, &AF(beastMoveSwim), &AF(beastThinkSwimChase), NULL };
AISTATE beastSwimDodge = { kAiStateMove, 9, nullptr, 90, NULL, &AF(aiMoveDodge), NULL, &beastSwimChase };
AISTATE beastSwimGoto = { kAiStateMove, 9, nullptr, 600, NULL, &AF(beastMoveForward), &AF(beastThinkSwimGoto), &beastSwimIdle };
AISTATE beastSwimSearch = { kAiStateSearch, 9, nullptr, 120, NULL, &AF(beastMoveForward), &AF(beastThinkSearch), &beastSwimIdle };
AISTATE beastSwimSlash = { kAiStateChase, 9, &AF(SlashSeqCallback), 0, NULL, NULL, &AF(beastThinkSwimChase), &beastSwimChase };
AISTATE beastSwimRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &beastSwimDodge };
AISTATE beastMorphToBeast = { kAiStateOther, -1, nullptr, 0, MorphToBeast, NULL, NULL, &beastIdle };
AISTATE beastMorphToBeast = { kAiStateOther, -1, nullptr, 0, &AF(MorphToBeast), NULL, NULL, &beastIdle };
AISTATE beastMorphFromCultist = { kAiStateOther, 2576, nullptr, 0, NULL, NULL, NULL, &beastMorphToBeast };
AISTATE beast138FB4 = { kAiStateOther, 9, nullptr, 120, NULL, sub_62AE0, beastThinkSwimChase, &beastSwimChase };
AISTATE beast138FD0 = { kAiStateOther, 9, nullptr, 0, NULL, sub_62D7C, beastThinkSwimChase, &beastSwimChase };
AISTATE beast138FEC = { kAiStateOther, 9, nullptr, 120, NULL, aiMoveTurn, NULL, &beastSwimChase };
AISTATE beastMoveSwimChaseAlt = { kAiStateOther, 9, nullptr, 120, NULL, &AF(beastMoveSwimAlt), &AF(beastThinkSwimChase), &beastSwimChase };
AISTATE beastSwimAttack = { kAiStateOther, 9, nullptr, 0, NULL, &AF(beastMoveIn), &AF(beastThinkSwimChase), &beastSwimChase };
AISTATE beastSwimTurn = { kAiStateOther, 9, nullptr, 120, NULL, &AF(aiMoveTurn), NULL, &beastSwimChase };
void SlashSeqCallback(DBloodActor* actor)
{
@ -375,12 +375,12 @@ static void beastThinkSwimChase(DBloodActor* actor)
else
{
aiPlay3DSound(actor, 9009 + Random(2), AI_SFX_PRIORITY_1, -1);
aiNewState(actor, &beast138FD0);
aiNewState(actor, &beastSwimAttack);
}
}
}
else
aiNewState(actor, &beast138FD0);
aiNewState(actor, &beastSwimAttack);
return;
}
aiNewState(actor, &beastSwimGoto);
@ -403,7 +403,7 @@ static void beastMoveForward(DBloodActor* actor)
actor->vel.XY() += actor->spr.Angles.Yaw.ToVector() * pDudeInfo->FrontSpeed();
}
static void sub_628A0(DBloodActor* actor)
static void beastMoveSwim(DBloodActor* actor)
{
assert(actor->IsDudeActor());
DUDEINFO* pDudeInfo = getDudeInfo(actor);
@ -427,7 +427,7 @@ static void sub_628A0(DBloodActor* actor)
});
}
static void sub_62AE0(DBloodActor* actor)
static void beastMoveSwimAlt(DBloodActor* actor)
{
assert(actor->IsDudeActor());
DUDEINFO* pDudeInfo = getDudeInfo(actor);
@ -457,7 +457,7 @@ static void sub_62AE0(DBloodActor* actor)
actor->vel.Z = -dz / 256;
}
static void sub_62D7C(DBloodActor* actor)
static void beastMoveIn(DBloodActor* actor)
{
assert(actor->IsDudeActor());
DUDEINFO* pDudeInfo = getDudeInfo(actor);

View file

@ -42,24 +42,24 @@ static void eelMoveAscend(DBloodActor* actor);
static void eelMoveToCeil(DBloodActor*);
AISTATE eelIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, eelThinkTarget, NULL };
AISTATE eelFlyIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, eelThinkTarget, NULL };
AISTATE eelChase = { kAiStateChase, 0, nullptr, 0, NULL, eelMoveForward, eelThinkChase, &eelIdle };
AISTATE eelPonder = { kAiStateOther, 0, nullptr, 0, NULL, NULL, eelThinkPonder, NULL };
AISTATE eelGoto = { kAiStateMove, 0, nullptr, 600, NULL, NULL, eelThinkGoto, &eelIdle };
AISTATE eelIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(eelThinkTarget), NULL };
AISTATE eelFlyIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(eelThinkTarget), NULL };
AISTATE eelChase = { kAiStateChase, 0, nullptr, 0, NULL, &AF(eelMoveForward), &AF(eelThinkChase), &eelIdle };
AISTATE eelPonder = { kAiStateOther, 0, nullptr, 0, NULL, NULL, &AF(eelThinkPonder), NULL };
AISTATE eelGoto = { kAiStateMove, 0, nullptr, 600, NULL, NULL, &AF(eelThinkGoto), &eelIdle };
AISTATE eelBite = { kAiStateChase, 7, &AF(eelBiteSeqCallback), 60, NULL, NULL, NULL, &eelChase };
AISTATE eelRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &eelChase };
AISTATE eelSearch = { kAiStateSearch, 0, nullptr, 120, NULL, eelMoveForward, eelThinkSearch, &eelIdle };
AISTATE eelSwoop = { kAiStateOther, 0, nullptr, 60, NULL, eelMoveSwoop, eelThinkChase, &eelChase };
AISTATE eelFly = { kAiStateMove, 0, nullptr, 0, NULL, eelMoveAscend, eelThinkChase, &eelChase };
AISTATE eelTurn = { kAiStateMove, 0, nullptr, 60, NULL, aiMoveTurn, NULL, &eelChase };
AISTATE eelHide = { kAiStateOther, 0, nullptr, 0, NULL, eelMoveToCeil, eelMoveForward, NULL };
AISTATE eelDodgeUp = { kAiStateMove, 0, nullptr, 120, NULL, eelMoveDodgeUp, NULL, &eelChase };
AISTATE eelDodgeUpRight = { kAiStateMove, 0, nullptr, 90, NULL, eelMoveDodgeUp, NULL, &eelChase };
AISTATE eelDodgeUpLeft = { kAiStateMove, 0, nullptr, 90, NULL, eelMoveDodgeUp, NULL, &eelChase };
AISTATE eelDodgeDown = { kAiStateMove, 0, nullptr, 120, NULL, eelMoveDodgeDown, NULL, &eelChase };
AISTATE eelDodgeDownRight = { kAiStateMove, 0, nullptr, 90, NULL, eelMoveDodgeDown, NULL, &eelChase };
AISTATE eelDodgeDownLeft = { kAiStateMove, 0, nullptr, 90, NULL, eelMoveDodgeDown, NULL, &eelChase };
AISTATE eelSearch = { kAiStateSearch, 0, nullptr, 120, NULL, &AF(eelMoveForward), &AF(eelThinkSearch), &eelIdle };
AISTATE eelSwoop = { kAiStateOther, 0, nullptr, 60, NULL, &AF(eelMoveSwoop), &AF(eelThinkChase), &eelChase };
AISTATE eelFly = { kAiStateMove, 0, nullptr, 0, NULL, &AF(eelMoveAscend), &AF(eelThinkChase), &eelChase };
AISTATE eelTurn = { kAiStateMove, 0, nullptr, 60, NULL, &AF(aiMoveTurn), NULL, &eelChase };
AISTATE eelHide = { kAiStateOther, 0, nullptr, 0, NULL, &AF(eelMoveToCeil), &AF(eelMoveForward), NULL };
AISTATE eelDodgeUp = { kAiStateMove, 0, nullptr, 120, NULL, &AF(eelMoveDodgeUp), NULL, &eelChase };
AISTATE eelDodgeUpRight = { kAiStateMove, 0, nullptr, 90, NULL, &AF(eelMoveDodgeUp), NULL, &eelChase };
AISTATE eelDodgeUpLeft = { kAiStateMove, 0, nullptr, 90, NULL, &AF(eelMoveDodgeUp), NULL, &eelChase };
AISTATE eelDodgeDown = { kAiStateMove, 0, nullptr, 120, NULL, &AF(eelMoveDodgeDown), NULL, &eelChase };
AISTATE eelDodgeDownRight = { kAiStateMove, 0, nullptr, 90, NULL, &AF(eelMoveDodgeDown), NULL, &eelChase };
AISTATE eelDodgeDownLeft = { kAiStateMove, 0, nullptr, 90, NULL, &AF(eelMoveDodgeDown), NULL, &eelChase };
void eelBiteSeqCallback(DBloodActor* actor)
{

View file

@ -33,41 +33,41 @@ static void burnThinkSearch(DBloodActor*);
static void burnThinkGoto(DBloodActor*);
static void burnThinkChase(DBloodActor*);
AISTATE cultistBurnIdle = { kAiStateIdle, 3, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE cultistBurnChase = { kAiStateChase, 3, nullptr, 0, NULL, aiMoveForward, burnThinkChase, NULL };
AISTATE cultistBurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkGoto, &cultistBurnSearch };
AISTATE cultistBurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkSearch, &cultistBurnSearch };
AISTATE cultistBurnIdle = { kAiStateIdle, 3, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE cultistBurnChase = { kAiStateChase, 3, nullptr, 0, NULL, &AF(aiMoveForward), &AF(burnThinkChase), NULL };
AISTATE cultistBurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkGoto), &cultistBurnSearch };
AISTATE cultistBurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkSearch), &cultistBurnSearch };
AISTATE cultistBurnAttack = { kAiStateChase, 3, &AF(BurnSeqCallback), 120, NULL, NULL, NULL, &cultistBurnChase };
AISTATE zombieABurnChase = { kAiStateChase, 3, nullptr, 0, NULL, aiMoveForward, burnThinkChase, NULL };
AISTATE zombieABurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkGoto, &zombieABurnSearch };
AISTATE zombieABurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkSearch, NULL };
AISTATE zombieABurnChase = { kAiStateChase, 3, nullptr, 0, NULL, &AF(aiMoveForward), &AF(burnThinkChase), NULL };
AISTATE zombieABurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkGoto), &zombieABurnSearch };
AISTATE zombieABurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkSearch), NULL };
AISTATE zombieABurnAttack = { kAiStateChase, 3, &AF(BurnSeqCallback), 120, NULL, NULL, NULL, &zombieABurnChase };
AISTATE zombieFBurnChase = { kAiStateChase, 3, nullptr, 0, NULL, aiMoveForward, burnThinkChase, NULL };
AISTATE zombieFBurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkGoto, &zombieFBurnSearch };
AISTATE zombieFBurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkSearch, NULL };
AISTATE zombieFBurnChase = { kAiStateChase, 3, nullptr, 0, NULL, &AF(aiMoveForward), &AF(burnThinkChase), NULL };
AISTATE zombieFBurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkGoto), &zombieFBurnSearch };
AISTATE zombieFBurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkSearch), NULL };
AISTATE zombieFBurnAttack = { kAiStateChase, 3, &AF(BurnSeqCallback), 120, NULL, NULL, NULL, &zombieFBurnChase };
AISTATE innocentBurnChase = { kAiStateChase, 3, nullptr, 0, NULL, aiMoveForward, burnThinkChase, NULL };
AISTATE innocentBurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkGoto, &zombieFBurnSearch };
AISTATE innocentBurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkSearch, NULL };
AISTATE innocentBurnChase = { kAiStateChase, 3, nullptr, 0, NULL, &AF(aiMoveForward), &AF(burnThinkChase), NULL };
AISTATE innocentBurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkGoto), &zombieFBurnSearch };
AISTATE innocentBurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkSearch), NULL };
AISTATE innocentBurnAttack = { kAiStateChase, 3, &AF(BurnSeqCallback), 120, NULL, NULL, NULL, &zombieFBurnChase };
AISTATE beastBurnChase = { kAiStateChase, 3, nullptr, 0, NULL, aiMoveForward, burnThinkChase, NULL };
AISTATE beastBurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkGoto, &beastBurnSearch };
AISTATE beastBurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkSearch, &beastBurnSearch };
AISTATE beastBurnChase = { kAiStateChase, 3, nullptr, 0, NULL, &AF(aiMoveForward), &AF(burnThinkChase), NULL };
AISTATE beastBurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkGoto), &beastBurnSearch };
AISTATE beastBurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkSearch), &beastBurnSearch };
AISTATE beastBurnAttack = { kAiStateChase, 3, &AF(BurnSeqCallback), 120, NULL, NULL, NULL, &beastBurnChase };
AISTATE tinycalebBurnChase = { kAiStateChase, 3, nullptr, 0, NULL, aiMoveForward, burnThinkChase, NULL };
AISTATE tinycalebBurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkGoto, &tinycalebBurnSearch };
AISTATE tinycalebBurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkSearch, &tinycalebBurnSearch };
AISTATE tinycalebBurnChase = { kAiStateChase, 3, nullptr, 0, NULL, &AF(aiMoveForward), &AF(burnThinkChase), NULL };
AISTATE tinycalebBurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkGoto), &tinycalebBurnSearch };
AISTATE tinycalebBurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkSearch), &tinycalebBurnSearch };
AISTATE tinycalebBurnAttack = { kAiStateChase, 3, &AF(BurnSeqCallback), 120, NULL, NULL, NULL, &tinycalebBurnChase };
AISTATE genDudeBurnIdle = { kAiStateIdle, 3, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE genDudeBurnChase = { kAiStateChase, 3, nullptr, 0, NULL, aiMoveForward, burnThinkChase, NULL };
AISTATE genDudeBurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkGoto, &genDudeBurnSearch };
AISTATE genDudeBurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, aiMoveForward, burnThinkSearch, &genDudeBurnSearch };
AISTATE genDudeBurnIdle = { kAiStateIdle, 3, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE genDudeBurnChase = { kAiStateChase, 3, nullptr, 0, NULL, &AF(aiMoveForward), &AF(burnThinkChase), NULL };
AISTATE genDudeBurnGoto = { kAiStateMove, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkGoto), &genDudeBurnSearch };
AISTATE genDudeBurnSearch = { kAiStateSearch, 3, nullptr, 3600, NULL, &AF(aiMoveForward), &AF(burnThinkSearch), &genDudeBurnSearch };
AISTATE genDudeBurnAttack = { kAiStateChase, 3, &AF(BurnSeqCallback), 120, NULL, NULL, NULL, &genDudeBurnChase };
void BurnSeqCallback(DBloodActor*)

View file

@ -34,28 +34,28 @@ static void calebThinkGoto(DBloodActor*);
static void calebThinkChase(DBloodActor*);
static void calebThinkSwimGoto(DBloodActor*);
static void calebThinkSwimChase(DBloodActor*);
static void sub_65D04(DBloodActor*);
static void sub_65F44(DBloodActor*);
static void sub_661E0(DBloodActor*);
static void calebMoveSwimChase(DBloodActor*);
static void calebSwimUnused(DBloodActor*);
static void calebSwimMoveIn(DBloodActor*);
AISTATE tinycalebIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE tinycalebChase = { kAiStateChase, 6, nullptr, 0, NULL, aiMoveForward, calebThinkChase, NULL };
AISTATE tinycalebDodge = { kAiStateMove, 6, nullptr, 90, NULL, aiMoveDodge, NULL, &tinycalebChase };
AISTATE tinycalebGoto = { kAiStateMove, 6, nullptr, 600, NULL, aiMoveForward, calebThinkGoto, &tinycalebIdle };
AISTATE tinycalebIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE tinycalebChase = { kAiStateChase, 6, nullptr, 0, NULL, &AF(aiMoveForward), &AF(calebThinkChase), NULL };
AISTATE tinycalebDodge = { kAiStateMove, 6, nullptr, 90, NULL, &AF(aiMoveDodge), NULL, &tinycalebChase };
AISTATE tinycalebGoto = { kAiStateMove, 6, nullptr, 600, NULL, &AF(aiMoveForward), &AF(calebThinkGoto), &tinycalebIdle };
AISTATE tinycalebAttack = { kAiStateChase, 0, &AF(SeqAttackCallback), 120, NULL, NULL, NULL, &tinycalebChase };
AISTATE tinycalebSearch = { kAiStateSearch, 6, nullptr, 120, NULL, aiMoveForward, calebThinkSearch, &tinycalebIdle };
AISTATE tinycalebSearch = { kAiStateSearch, 6, nullptr, 120, NULL, &AF(aiMoveForward), &AF(calebThinkSearch), &tinycalebIdle };
AISTATE tinycalebRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &tinycalebDodge };
AISTATE tinycalebTeslaRecoil = { kAiStateRecoil, 4, nullptr, 0, NULL, NULL, NULL, &tinycalebDodge };
AISTATE tinycalebSwimIdle = { kAiStateIdle, 10, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE tinycalebSwimChase = { kAiStateChase, 8, nullptr, 0, NULL, sub_65D04, calebThinkSwimChase, NULL };
AISTATE tinycalebSwimDodge = { kAiStateMove, 8, nullptr, 90, NULL, aiMoveDodge, NULL, &tinycalebSwimChase };
AISTATE tinycalebSwimGoto = { kAiStateMove, 8, nullptr, 600, NULL, aiMoveForward, calebThinkSwimGoto, &tinycalebSwimIdle };
AISTATE tinycalebSwimSearch = { kAiStateSearch, 8, nullptr, 120, NULL, aiMoveForward, calebThinkSearch, &tinycalebSwimIdle };
AISTATE tinycalebSwimIdle = { kAiStateIdle, 10, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE tinycalebSwimChase = { kAiStateChase, 8, nullptr, 0, NULL, &AF(calebMoveSwimChase), &AF(calebThinkSwimChase), NULL };
AISTATE tinycalebSwimDodge = { kAiStateMove, 8, nullptr, 90, NULL, &AF(aiMoveDodge), NULL, &tinycalebSwimChase };
AISTATE tinycalebSwimGoto = { kAiStateMove, 8, nullptr, 600, NULL, &AF(aiMoveForward), &AF(calebThinkSwimGoto), &tinycalebSwimIdle };
AISTATE tinycalebSwimSearch = { kAiStateSearch, 8, nullptr, 120, NULL, &AF(aiMoveForward), &AF(calebThinkSearch), &tinycalebSwimIdle };
AISTATE tinycalebSwimAttack = { kAiStateChase, 10, &AF(SeqAttackCallback), 0, NULL, NULL, NULL, &tinycalebSwimChase };
AISTATE tinycalebSwimRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &tinycalebSwimDodge };
AISTATE tinycaleb139660 = { kAiStateOther, 8, nullptr, 120, NULL, sub_65F44, calebThinkSwimChase, &tinycalebSwimChase };
AISTATE tinycaleb13967C = { kAiStateOther, 8, nullptr, 0, NULL, sub_661E0, calebThinkSwimChase, &tinycalebSwimChase };
AISTATE tinycaleb139698 = { kAiStateOther, 8, nullptr, 120, NULL, aiMoveTurn, NULL, &tinycalebSwimChase };
AISTATE tinycalebSwimUnused = { kAiStateOther, 8, nullptr, 120, NULL, &AF(calebSwimUnused), &AF(calebThinkSwimChase), &tinycalebSwimChase };
AISTATE tinycalebSwimMoveIn = { kAiStateOther, 8, nullptr, 0, NULL, &AF(calebSwimMoveIn), &AF(calebThinkSwimChase), &tinycalebSwimChase };
AISTATE tinycalebSwimTurn = { kAiStateOther, 8, nullptr, 120, NULL, &AF(aiMoveTurn), NULL, &tinycalebSwimChase };
void SeqAttackCallback(DBloodActor* actor)
{
@ -261,18 +261,18 @@ static void calebThinkSwimChase(DBloodActor* actor)
if (nDist < 0x40 && abs(nDeltaAngle) < DAngle15)
aiNewState(actor, &tinycalebSwimAttack);
else
aiNewState(actor, &tinycaleb13967C);
aiNewState(actor, &tinycalebSwimMoveIn);
}
}
else
aiNewState(actor, &tinycaleb13967C);
aiNewState(actor, &tinycalebSwimMoveIn);
return;
}
aiNewState(actor, &tinycalebSwimGoto);
actor->SetTarget(nullptr);
}
static void sub_65D04(DBloodActor* actor)
static void calebMoveSwimChase(DBloodActor* actor)
{
assert(actor->IsDudeActor());
DUDEINFO* pDudeInfo = getDudeInfo(actor);
@ -297,7 +297,7 @@ static void sub_65D04(DBloodActor* actor)
}
static void sub_65F44(DBloodActor* actor)
static void calebSwimUnused(DBloodActor* actor)
{
assert(actor->IsDudeActor());
DUDEINFO* pDudeInfo = getDudeInfo(actor);
@ -325,7 +325,7 @@ static void sub_65F44(DBloodActor* actor)
actor->vel.Z = -dz / 256;
}
static void sub_661E0(DBloodActor* actor)
static void calebSwimMoveIn(DBloodActor* actor)
{
assert(actor->IsDudeActor());
DUDEINFO* pDudeInfo = getDudeInfo(actor);

View file

@ -35,25 +35,25 @@ static void cerberusThinkGoto(DBloodActor* actor);
static void cerberusThinkChase(DBloodActor* actor);
AISTATE cerberusIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, cerberusThinkTarget, NULL };
AISTATE cerberusSearch = { kAiStateSearch, 7, nullptr, 1800, NULL, aiMoveForward, cerberusThinkSearch, &cerberusIdle };
AISTATE cerberusChase = { kAiStateChase, 7, nullptr, 0, NULL, aiMoveForward, cerberusThinkChase, NULL };
AISTATE cerberusIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(cerberusThinkTarget), NULL };
AISTATE cerberusSearch = { kAiStateSearch, 7, nullptr, 1800, NULL, &AF(aiMoveForward), &AF(cerberusThinkSearch), &cerberusIdle };
AISTATE cerberusChase = { kAiStateChase, 7, nullptr, 0, NULL, &AF(aiMoveForward), &AF(cerberusThinkChase), NULL };
AISTATE cerberusRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &cerberusSearch };
AISTATE cerberusTeslaRecoil = { kAiStateRecoil, 4, nullptr, 0, NULL, NULL, NULL, &cerberusSearch };
AISTATE cerberusGoto = { kAiStateMove, 7, nullptr, 600, NULL, aiMoveForward, cerberusThinkGoto, &cerberusIdle };
AISTATE cerberusGoto = { kAiStateMove, 7, nullptr, 600, NULL, &AF(aiMoveForward), &AF(cerberusThinkGoto), &cerberusIdle };
AISTATE cerberusBite = { kAiStateChase, 6, &AF(cerberusBiteSeqCallback), 60, NULL, NULL, NULL, &cerberusChase };
AISTATE cerberusBurn = { kAiStateChase, 6, &AF(cerberusBurnSeqCallback), 60, NULL, NULL, NULL, &cerberusChase };
AISTATE cerberus3Burn = { kAiStateChase, 6, &AF(cerberusBurnSeqCallback2), 60, NULL, NULL, NULL, &cerberusChase };
AISTATE cerberus2Idle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, cerberusThinkTarget, NULL };
AISTATE cerberus2Search = { kAiStateSearch, 7, nullptr, 1800, NULL, aiMoveForward, cerberusThinkSearch, &cerberus2Idle };
AISTATE cerberus2Chase = { kAiStateChase, 7, nullptr, 0, NULL, aiMoveForward, cerberusThinkChase, NULL };
AISTATE cerberus2Idle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(cerberusThinkTarget), NULL };
AISTATE cerberus2Search = { kAiStateSearch, 7, nullptr, 1800, NULL, &AF(aiMoveForward), &AF(cerberusThinkSearch), &cerberus2Idle };
AISTATE cerberus2Chase = { kAiStateChase, 7, nullptr, 0, NULL, &AF(aiMoveForward), &AF(cerberusThinkChase), NULL };
AISTATE cerberus2Recoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &cerberus2Search };
AISTATE cerberus2Goto = { kAiStateMove, 7, nullptr, 600, NULL, aiMoveForward, cerberusThinkGoto, &cerberus2Idle };
AISTATE cerberus2Goto = { kAiStateMove, 7, nullptr, 600, NULL, &AF(aiMoveForward), &AF(cerberusThinkGoto), &cerberus2Idle };
AISTATE cerberus2Bite = { kAiStateChase, 6, &AF(cerberusBiteSeqCallback), 60, NULL, NULL, NULL, &cerberus2Chase };
AISTATE cerberus2Burn = { kAiStateChase, 6, &AF(cerberusBurnSeqCallback), 60, NULL, NULL, NULL, &cerberus2Chase };
AISTATE cerberus4Burn = { kAiStateChase, 6, &AF(cerberusBurnSeqCallback2), 60, NULL, NULL, NULL, &cerberus2Chase };
AISTATE cerberus139890 = { kAiStateOther, 7, nullptr, 120, NULL, aiMoveTurn, NULL, &cerberusChase };
AISTATE cerberus1398AC = { kAiStateOther, 7, nullptr, 120, NULL, aiMoveTurn, NULL, &cerberusChase };
AISTATE cerberusTurn1 = { kAiStateOther, 7, nullptr, 120, NULL, &AF(aiMoveTurn), NULL, &cerberusChase };
AISTATE cerberusTurn2 = { kAiStateOther, 7, nullptr, 120, NULL, &AF(aiMoveTurn), NULL, &cerberusChase };
static constexpr double Cerberus_XYOff = 350. / 16;
static constexpr double Cerberus_ZOff = 100. / 256;
@ -228,9 +228,9 @@ static void cerberusThinkTarget(DBloodActor* actor)
actor->xspr.goalAng += DAngle45;
aiSetTarget(actor, actor->basePoint);
if (actor->GetType() == kDudeCerberusTwoHead)
aiNewState(actor, &cerberus139890);
aiNewState(actor, &cerberusTurn1);
else
aiNewState(actor, &cerberus1398AC);
aiNewState(actor, &cerberusTurn2);
return;
}
if (Chance(pDudeInfo->alertChance))

View file

@ -33,44 +33,44 @@ static void cultThinkSearch(DBloodActor*);
static void cultThinkGoto(DBloodActor*);
static void cultThinkChase(DBloodActor*);
AISTATE cultistIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE cultistProneIdle = { kAiStateIdle, 17, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE fanaticProneIdle = { kAiStateIdle, 17, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE cultistProneIdle3 = { kAiStateIdle, 17, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE cultistChase = { kAiStateChase, 9, nullptr, 0, NULL, aiMoveForward, cultThinkChase, NULL };
AISTATE fanaticChase = { kAiStateChase, 0, nullptr, 0, NULL, aiMoveTurn, cultThinkChase, NULL };
AISTATE cultistDodge = { kAiStateMove, 9, nullptr, 90, NULL, aiMoveDodge, NULL, &cultistChase };
AISTATE cultistGoto = { kAiStateMove, 9, nullptr, 600, NULL, aiMoveForward, cultThinkGoto, &cultistIdle };
AISTATE cultistProneChase = { kAiStateChase, 14, nullptr, 0, NULL, aiMoveForward, cultThinkChase, NULL };
AISTATE cultistProneDodge = { kAiStateMove, 14, nullptr, 90, NULL, aiMoveDodge, NULL, &cultistProneChase };
AISTATE cultistIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE cultistProneIdle = { kAiStateIdle, 17, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE fanaticProneIdle = { kAiStateIdle, 17, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE cultistProneIdle3 = { kAiStateIdle, 17, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE cultistChase = { kAiStateChase, 9, nullptr, 0, NULL, &AF(aiMoveForward), &AF(cultThinkChase), NULL };
AISTATE fanaticChase = { kAiStateChase, 0, nullptr, 0, NULL, &AF(aiMoveTurn), &AF(cultThinkChase), NULL };
AISTATE cultistDodge = { kAiStateMove, 9, nullptr, 90, NULL, &AF(aiMoveDodge), NULL, &cultistChase };
AISTATE cultistGoto = { kAiStateMove, 9, nullptr, 600, NULL, &AF(aiMoveForward), &AF(cultThinkGoto), &cultistIdle };
AISTATE cultistProneChase = { kAiStateChase, 14, nullptr, 0, NULL, &AF(aiMoveForward), &AF(cultThinkChase), NULL };
AISTATE cultistProneDodge = { kAiStateMove, 14, nullptr, 90, NULL, &AF(aiMoveDodge), NULL, &cultistProneChase };
AISTATE cultistTThrow = { kAiStateChase, 7, &AF(cultThrowSeqCallback), 120, NULL, NULL, NULL, &cultistTFire };
AISTATE cultistSThrow = { kAiStateChase, 7, &AF(cultThrowSeqCallback), 120, NULL, NULL, NULL, &cultistSFire };
AISTATE cultistTsThrow = { kAiStateChase, 7, &AF(cultThrowSeqCallback), 120, NULL, NULL, NULL, &cultistTsFire };
AISTATE cultistDThrow = { kAiStateChase, 7, &AF(cultThrowSeqCallback), 120, NULL, NULL, NULL, &cultistChase };
AISTATE cultist139A78 = { kAiStateChase, 7, &AF(cultThrowSeqCallback2), 120, NULL, NULL, NULL, &cultistChase };
AISTATE cultist139A94 = { kAiStateChase, 7, &AF(cultThrowSeqCallback3), 120, NULL, NULL, NULL, &cultistIdle };
AISTATE cultist139AB0 = { kAiStateChase, 7, &AF(cultThrowSeqCallback3), 120, NULL, NULL, cultThinkSearch, &cultist139A94 };
AISTATE cultist139ACC = { kAiStateChase, 7, &AF(cultThrowSeqCallback3), 120, NULL, NULL, cultThinkSearch, &cultist139AB0 };
AISTATE cultist139AE8 = { kAiStateChase, 7, &AF(cultThrowSeqCallback3), 120, NULL, NULL, cultThinkSearch, &cultist139AE8 };
AISTATE cultistSearch = { kAiStateSearch, 9, nullptr, 1800, NULL, aiMoveForward, cultThinkSearch, &cultistIdle };
AISTATE cultistDThrow2 = { kAiStateChase, 7, &AF(cultThrowSeqCallback2), 120, NULL, NULL, NULL, &cultistChase };
AISTATE cultistDThrow3C = { kAiStateChase, 7, &AF(cultThrowSeqCallback3), 120, NULL, NULL, NULL, &cultistIdle };
AISTATE cultistDThrow3B = { kAiStateChase, 7, &AF(cultThrowSeqCallback3), 120, NULL, NULL, &AF(cultThinkSearch), &cultistDThrow3C };
AISTATE cultistDThrow3A = { kAiStateChase, 7, &AF(cultThrowSeqCallback3), 120, NULL, NULL, &AF(cultThinkSearch), &cultistDThrow3B };
AISTATE cultistDThrow4 = { kAiStateChase, 7, &AF(cultThrowSeqCallback3), 120, NULL, NULL, &AF(cultThinkSearch), &cultistDThrow4 };
AISTATE cultistSearch = { kAiStateSearch, 9, nullptr, 1800, NULL, &AF(aiMoveForward), &AF(cultThinkSearch), &cultistIdle };
AISTATE cultistSFire = { kAiStateChase, 6, &AF(ShotSeqCallback), 60, NULL, NULL, NULL, &cultistChase };
AISTATE cultistTFire = { kAiStateChase, 6, &AF(TommySeqCallback), 0, NULL, aiMoveTurn, cultThinkChase, &cultistTFire };
AISTATE cultistTsFire = { kAiStateChase, 6, &AF(TeslaSeqCallback), 0, NULL, aiMoveTurn, cultThinkChase, &cultistChase };
AISTATE cultistTFire = { kAiStateChase, 6, &AF(TommySeqCallback), 0, NULL, &AF(aiMoveTurn), &AF(cultThinkChase), &cultistTFire };
AISTATE cultistTsFire = { kAiStateChase, 6, &AF(TeslaSeqCallback), 0, NULL, &AF(aiMoveTurn), &AF(cultThinkChase), &cultistChase };
AISTATE cultistSProneFire = { kAiStateChase, 8, &AF(ShotSeqCallback), 60, NULL, NULL, NULL, &cultistProneChase };
AISTATE cultistTProneFire = { kAiStateChase, 8, &AF(TommySeqCallback), 0, NULL, aiMoveTurn, cultThinkChase, &cultistTProneFire };
AISTATE cultistTsProneFire = { kAiStateChase, 8, &AF(TeslaSeqCallback), 0, NULL, aiMoveTurn, NULL, &cultistTsProneFire }; // vanilla, broken
AISTATE cultistTsProneFireFixed = { kAiStateChase, 8, &AF(TeslaSeqCallback), 0, NULL, aiMoveTurn, cultThinkChase, &cultistTsProneFireFixed };
AISTATE cultistTProneFire = { kAiStateChase, 8, &AF(TommySeqCallback), 0, NULL, &AF(aiMoveTurn), &AF(cultThinkChase), &cultistTProneFire };
AISTATE cultistTsProneFire = { kAiStateChase, 8, &AF(TeslaSeqCallback), 0, NULL, &AF(aiMoveTurn), NULL, &cultistTsProneFire }; // vanilla, broken
AISTATE cultistTsProneFireFixed = { kAiStateChase, 8, &AF(TeslaSeqCallback), 0, NULL, &AF(aiMoveTurn), &AF(cultThinkChase), &cultistTsProneFireFixed };
AISTATE cultistRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &cultistDodge };
AISTATE cultistProneRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &cultistProneDodge };
AISTATE cultistTeslaRecoil = { kAiStateRecoil, 4, nullptr, 0, NULL, NULL, NULL, &cultistDodge };
AISTATE cultistSwimIdle = { kAiStateIdle, 13, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE cultistSwimChase = { kAiStateChase, 13, nullptr, 0, NULL, aiMoveForward, cultThinkChase, NULL };
AISTATE cultistSwimDodge = { kAiStateMove, 13, nullptr, 90, NULL, aiMoveDodge, NULL, &cultistSwimChase };
AISTATE cultistSwimGoto = { kAiStateMove, 13, nullptr, 600, NULL, aiMoveForward, cultThinkGoto, &cultistSwimIdle };
AISTATE cultistSwimSearch = { kAiStateSearch, 13, nullptr, 1800, NULL, aiMoveForward, cultThinkSearch, &cultistSwimIdle };
AISTATE cultistSwimIdle = { kAiStateIdle, 13, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE cultistSwimChase = { kAiStateChase, 13, nullptr, 0, NULL, &AF(aiMoveForward), &AF(cultThinkChase), NULL };
AISTATE cultistSwimDodge = { kAiStateMove, 13, nullptr, 90, NULL, &AF(aiMoveDodge), NULL, &cultistSwimChase };
AISTATE cultistSwimGoto = { kAiStateMove, 13, nullptr, 600, NULL, &AF(aiMoveForward), &AF(cultThinkGoto), &cultistSwimIdle };
AISTATE cultistSwimSearch = { kAiStateSearch, 13, nullptr, 1800, NULL, &AF(aiMoveForward), &AF(cultThinkSearch), &cultistSwimIdle };
AISTATE cultistSSwimFire = { kAiStateChase, 8, &AF(ShotSeqCallback), 60, NULL, NULL, NULL, &cultistSwimChase };
AISTATE cultistTSwimFire = { kAiStateChase, 8, &AF(TommySeqCallback), 0, NULL, aiMoveTurn, cultThinkChase, &cultistTSwimFire };
AISTATE cultistTsSwimFire = { kAiStateChase, 8, &AF(TeslaSeqCallback), 0, NULL, aiMoveTurn, cultThinkChase, &cultistTsSwimFire };
AISTATE cultistTSwimFire = { kAiStateChase, 8, &AF(TommySeqCallback), 0, NULL, &AF(aiMoveTurn), &AF(cultThinkChase), &cultistTSwimFire };
AISTATE cultistTsSwimFire = { kAiStateChase, 8, &AF(TeslaSeqCallback), 0, NULL, &AF(aiMoveTurn), &AF(cultThinkChase), &cultistTsSwimFire };
AISTATE cultistSwimRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &cultistSwimDodge };
void TommySeqCallback(DBloodActor* actor)
@ -506,16 +506,16 @@ static void cultThinkChase(DBloodActor* actor)
{
case -1:
if (actor->xspr.medium != 1 && actor->xspr.medium != kMediumGoo)
aiNewState(actor, &cultist139A78);
aiNewState(actor, &cultistDThrow2);
break;
case 4:
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType() && gHitInfo.actor()->GetType() != kDudeCultistShotgun && actor->xspr.medium != kMediumWater && actor->xspr.medium != kMediumGoo)
aiNewState(actor, &cultist139A78);
aiNewState(actor, &cultistDThrow2);
break;
default:
aiNewState(actor, &cultist139A78);
aiNewState(actor, &cultistDThrow2);
break;
}
}

View file

@ -43,32 +43,32 @@ static void gargMoveSwoop(DBloodActor*);
static void gargMoveFly(DBloodActor*);
static void playStatueBreakSnd(DBloodActor*);
AISTATE gargoyleFIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, gargThinkTarget, NULL };
AISTATE gargoyleFIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(gargThinkTarget), NULL };
AISTATE gargoyleStatueIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, NULL, NULL };
AISTATE gargoyleFChase = { kAiStateChase, 0, nullptr, 0, NULL, gargMoveForward, gargThinkChase, &gargoyleFIdle };
AISTATE gargoyleFGoto = { kAiStateMove, 0, nullptr, 600, NULL, gargMoveForward, gargThinkGoto, &gargoyleFIdle };
AISTATE gargoyleFChase = { kAiStateChase, 0, nullptr, 0, NULL, &AF(gargMoveForward), &AF(gargThinkChase), &gargoyleFIdle };
AISTATE gargoyleFGoto = { kAiStateMove, 0, nullptr, 600, NULL, &AF(gargMoveForward), &AF(gargThinkGoto), &gargoyleFIdle };
AISTATE gargoyleFSlash = { kAiStateChase, 6, &AF(SlashFSeqCallback), 120, NULL, NULL, NULL, &gargoyleFChase };
AISTATE gargoyleFThrow = { kAiStateChase, 6, &AF(ThrowFSeqCallback), 120, NULL, NULL, NULL, &gargoyleFChase };
AISTATE gargoyleSThrow = { kAiStateChase, 6, &AF(ThrowSSeqCallback), 120, NULL, gargMoveForward, NULL, &gargoyleFChase };
AISTATE gargoyleSBlast = { kAiStateChase, 7, &AF(BlastSSeqCallback), 60, NULL, gargMoveSlow, NULL, &gargoyleFChase };
AISTATE gargoyleSThrow = { kAiStateChase, 6, &AF(ThrowSSeqCallback), 120, NULL, &AF(gargMoveForward), NULL, &gargoyleFChase };
AISTATE gargoyleSBlast = { kAiStateChase, 7, &AF(BlastSSeqCallback), 60, NULL, &AF(gargMoveSlow), NULL, &gargoyleFChase };
AISTATE gargoyleFRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &gargoyleFChase };
AISTATE gargoyleFSearch = { kAiStateSearch, 0, nullptr, 120, NULL, gargMoveForward, gargThinkSearch, &gargoyleFIdle };
AISTATE gargoyleFMorph2 = { kAiStateOther, -1, nullptr, 0, entryFStatue, NULL, NULL, &gargoyleFIdle };
AISTATE gargoyleFSearch = { kAiStateSearch, 0, nullptr, 120, NULL, &AF(gargMoveForward), &AF(gargThinkSearch), &gargoyleFIdle };
AISTATE gargoyleFMorph2 = { kAiStateOther, -1, nullptr, 0, &AF(entryFStatue), NULL, NULL, &gargoyleFIdle };
AISTATE gargoyleFMorph = { kAiStateOther, 6, nullptr, 0, NULL, NULL, NULL, &gargoyleFMorph2 };
AISTATE gargoyleSMorph2 = { kAiStateOther, -1, nullptr, 0, entrySStatue, NULL, NULL, &gargoyleFIdle };
AISTATE gargoyleSMorph2 = { kAiStateOther, -1, nullptr, 0, &AF(entrySStatue), NULL, NULL, &gargoyleFIdle };
AISTATE gargoyleSMorph = { kAiStateOther, 6, nullptr, 0, NULL, NULL, NULL, &gargoyleSMorph2 };
AISTATE gargoyleSwoop = { kAiStateOther, 0, nullptr, 120, NULL, gargMoveSwoop, gargThinkChase, &gargoyleFChase };
AISTATE gargoyleFly = { kAiStateMove, 0, nullptr, 120, NULL, gargMoveFly, gargThinkChase, &gargoyleFChase };
AISTATE gargoyleTurn = { kAiStateMove, 0, nullptr, 120, NULL, aiMoveTurn, NULL, &gargoyleFChase };
AISTATE gargoyleDodgeUp = { kAiStateMove, 0, nullptr, 60, NULL, gargMoveDodgeUp, NULL, &gargoyleFChase };
AISTATE gargoyleFDodgeUpRight = { kAiStateMove, 0, nullptr, 90, NULL, gargMoveDodgeUp, NULL, &gargoyleFChase };
AISTATE gargoyleFDodgeUpLeft = { kAiStateMove, 0, nullptr, 90, NULL, gargMoveDodgeUp, NULL, &gargoyleFChase };
AISTATE gargoyleDodgeDown = { kAiStateMove, 0, nullptr, 120, NULL, gargMoveDodgeDown, NULL, &gargoyleFChase };
AISTATE gargoyleFDodgeDownRight = { kAiStateMove, 0, nullptr, 90, NULL, gargMoveDodgeDown, NULL, &gargoyleFChase };
AISTATE gargoyleFDodgeDownLeft = { kAiStateMove, 0, nullptr, 90, NULL, gargMoveDodgeDown, NULL, &gargoyleFChase };
AISTATE gargoyleSwoop = { kAiStateOther, 0, nullptr, 120, NULL, &AF(gargMoveSwoop), &AF(gargThinkChase), &gargoyleFChase };
AISTATE gargoyleFly = { kAiStateMove, 0, nullptr, 120, NULL, &AF(gargMoveFly), &AF(gargThinkChase), &gargoyleFChase };
AISTATE gargoyleTurn = { kAiStateMove, 0, nullptr, 120, NULL, &AF(aiMoveTurn), NULL, &gargoyleFChase };
AISTATE gargoyleDodgeUp = { kAiStateMove, 0, nullptr, 60, NULL, &AF(gargMoveDodgeUp), NULL, &gargoyleFChase };
AISTATE gargoyleFDodgeUpRight = { kAiStateMove, 0, nullptr, 90, NULL, &AF(gargMoveDodgeUp), NULL, &gargoyleFChase };
AISTATE gargoyleFDodgeUpLeft = { kAiStateMove, 0, nullptr, 90, NULL, &AF(gargMoveDodgeUp), NULL, &gargoyleFChase };
AISTATE gargoyleDodgeDown = { kAiStateMove, 0, nullptr, 120, NULL, &AF(gargMoveDodgeDown), NULL, &gargoyleFChase };
AISTATE gargoyleFDodgeDownRight = { kAiStateMove, 0, nullptr, 90, NULL, &AF(gargMoveDodgeDown), NULL, &gargoyleFChase };
AISTATE gargoyleFDodgeDownLeft = { kAiStateMove, 0, nullptr, 90, NULL, &AF(gargMoveDodgeDown), NULL, &gargoyleFChase };
AISTATE statueFBreakSEQ = { kAiStateOther, 5, nullptr, 0, entryFStatue, NULL, playStatueBreakSnd, &gargoyleFMorph2 };
AISTATE statueSBreakSEQ = { kAiStateOther, 5, nullptr, 0, entrySStatue, NULL, playStatueBreakSnd, &gargoyleSMorph2 };
AISTATE statueFBreakSEQ = { kAiStateOther, 5, nullptr, 0, &AF(entryFStatue), NULL, &AF(playStatueBreakSnd), &gargoyleFMorph2 };
AISTATE statueSBreakSEQ = { kAiStateOther, 5, nullptr, 0, &AF(entrySStatue), NULL, &AF(playStatueBreakSnd), &gargoyleSMorph2 };
static void playStatueBreakSnd(DBloodActor* actor) {

View file

@ -41,24 +41,24 @@ static void ghostMoveSwoop(DBloodActor*);
static void ghostMoveFly(DBloodActor*);
AISTATE ghostIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, ghostThinkTarget, NULL };
AISTATE ghostChase = { kAiStateChase, 0, nullptr, 0, NULL, ghostMoveForward, ghostThinkChase, &ghostIdle };
AISTATE ghostGoto = { kAiStateMove, 0, nullptr, 600, NULL, ghostMoveForward, ghostThinkGoto, &ghostIdle };
AISTATE ghostIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(ghostThinkTarget), NULL };
AISTATE ghostChase = { kAiStateChase, 0, nullptr, 0, NULL, &AF(ghostMoveForward), &AF(ghostThinkChase), &ghostIdle };
AISTATE ghostGoto = { kAiStateMove, 0, nullptr, 600, NULL, &AF(ghostMoveForward), &AF(ghostThinkGoto), &ghostIdle };
AISTATE ghostSlash = { kAiStateChase, 6, &AF(ghostSlashSeqCallback), 120, NULL, NULL, NULL, &ghostChase };
AISTATE ghostThrow = { kAiStateChase, 6, &AF(ghostThrowSeqCallback), 120, NULL, NULL, NULL, &ghostChase };
AISTATE ghostBlast = { kAiStateChase, 6, &AF(ghostBlastSeqCallback), 120, NULL, ghostMoveSlow, NULL, &ghostChase };
AISTATE ghostBlast = { kAiStateChase, 6, &AF(ghostBlastSeqCallback), 120, NULL, &AF(ghostMoveSlow), NULL, &ghostChase };
AISTATE ghostRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &ghostChase };
AISTATE ghostTeslaRecoil = { kAiStateRecoil, 4, nullptr, 0, NULL, NULL, NULL, &ghostChase };
AISTATE ghostSearch = { kAiStateSearch, 0, nullptr, 120, NULL, ghostMoveForward, ghostThinkSearch, &ghostIdle };
AISTATE ghostSwoop = { kAiStateOther, 0, nullptr, 120, NULL, ghostMoveSwoop, ghostThinkChase, &ghostChase };
AISTATE ghostFly = { kAiStateMove, 0, nullptr, 0, NULL, ghostMoveFly, ghostThinkChase, &ghostChase };
AISTATE ghostTurn = { kAiStateMove, 0, nullptr, 120, NULL, aiMoveTurn, NULL, &ghostChase };
AISTATE ghostDodgeUp = { kAiStateMove, 0, nullptr, 60, NULL, ghostMoveDodgeUp, NULL, &ghostChase };
AISTATE ghostDodgeUpRight = { kAiStateMove, 0, nullptr, 90, NULL, ghostMoveDodgeUp, NULL, &ghostChase };
AISTATE ghostDodgeUpLeft = { kAiStateMove, 0, nullptr, 90, NULL, ghostMoveDodgeUp, NULL, &ghostChase };
AISTATE ghostDodgeDown = { kAiStateMove, 0, nullptr, 120, NULL, ghostMoveDodgeDown, NULL, &ghostChase };
AISTATE ghostDodgeDownRight = { kAiStateMove, 0, nullptr, 90, NULL, ghostMoveDodgeDown, NULL, &ghostChase };
AISTATE ghostDodgeDownLeft = { kAiStateMove, 0, nullptr, 90, NULL, ghostMoveDodgeDown, NULL, &ghostChase };
AISTATE ghostSearch = { kAiStateSearch, 0, nullptr, 120, NULL, &AF(ghostMoveForward), &AF(ghostThinkSearch), &ghostIdle };
AISTATE ghostSwoop = { kAiStateOther, 0, nullptr, 120, NULL, &AF(ghostMoveSwoop), &AF(ghostThinkChase), &ghostChase };
AISTATE ghostFly = { kAiStateMove, 0, nullptr, 0, NULL, &AF(ghostMoveFly), &AF(ghostThinkChase), &ghostChase };
AISTATE ghostTurn = { kAiStateMove, 0, nullptr, 120, NULL, &AF(aiMoveTurn), NULL, &ghostChase };
AISTATE ghostDodgeUp = { kAiStateMove, 0, nullptr, 60, NULL, &AF(ghostMoveDodgeUp), NULL, &ghostChase };
AISTATE ghostDodgeUpRight = { kAiStateMove, 0, nullptr, 90, NULL, &AF(ghostMoveDodgeUp), NULL, &ghostChase };
AISTATE ghostDodgeUpLeft = { kAiStateMove, 0, nullptr, 90, NULL, &AF(ghostMoveDodgeUp), NULL, &ghostChase };
AISTATE ghostDodgeDown = { kAiStateMove, 0, nullptr, 120, NULL, &AF(ghostMoveDodgeDown), NULL, &ghostChase };
AISTATE ghostDodgeDownRight = { kAiStateMove, 0, nullptr, 90, NULL, &AF(ghostMoveDodgeDown), NULL, &ghostChase };
AISTATE ghostDodgeDownLeft = { kAiStateMove, 0, nullptr, 90, NULL, &AF(ghostMoveDodgeDown), NULL, &ghostChase };
void ghostSlashSeqCallback(DBloodActor* actor)
{

View file

@ -34,28 +34,28 @@ static void gillThinkGoto(DBloodActor*);
static void gillThinkChase(DBloodActor*);
static void gillThinkSwimGoto(DBloodActor*);
static void gillThinkSwimChase(DBloodActor*);
static void sub_6CB00(DBloodActor*);
static void sub_6CD74(DBloodActor*);
static void sub_6D03C(DBloodActor*);
static void gillMoveSwimChase(DBloodActor*);
static void gillMoveSwimUnused(DBloodActor*);
static void gillSwimMoveIn(DBloodActor*);
AISTATE gillBeastIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE gillBeastChase = { kAiStateChase, 9, nullptr, 0, NULL, aiMoveForward, gillThinkChase, NULL };
AISTATE gillBeastDodge = { kAiStateMove, 9, nullptr, 90, NULL, aiMoveDodge, NULL, &gillBeastChase };
AISTATE gillBeastGoto = { kAiStateMove, 9, nullptr, 600, NULL, aiMoveForward, gillThinkGoto, &gillBeastIdle };
AISTATE gillBeastIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE gillBeastChase = { kAiStateChase, 9, nullptr, 0, NULL, &AF(aiMoveForward), &AF(gillThinkChase), NULL };
AISTATE gillBeastDodge = { kAiStateMove, 9, nullptr, 90, NULL, &AF(aiMoveDodge), NULL, &gillBeastChase };
AISTATE gillBeastGoto = { kAiStateMove, 9, nullptr, 600, NULL, &AF(aiMoveForward), &AF(gillThinkGoto), &gillBeastIdle };
AISTATE gillBeastBite = { kAiStateChase, 6, &AF(GillBiteSeqCallback), 120, NULL, NULL, NULL, &gillBeastChase };
AISTATE gillBeastSearch = { kAiStateMove, 9, nullptr, 120, NULL, aiMoveForward, gillThinkSearch, &gillBeastIdle };
AISTATE gillBeastSearch = { kAiStateMove, 9, nullptr, 120, NULL, &AF(aiMoveForward), &AF(gillThinkSearch), &gillBeastIdle };
AISTATE gillBeastRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &gillBeastDodge };
AISTATE gillBeastSwimIdle = { kAiStateIdle, 10, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE gillBeastSwimChase = { kAiStateChase, 10, nullptr, 0, NULL, sub_6CB00, gillThinkSwimChase, NULL };
AISTATE gillBeastSwimDodge = { kAiStateMove, 10, nullptr, 90, NULL, aiMoveDodge, NULL, &gillBeastSwimChase };
AISTATE gillBeastSwimGoto = { kAiStateMove, 10, nullptr, 600, NULL, aiMoveForward, gillThinkSwimGoto, &gillBeastSwimIdle };
AISTATE gillBeastSwimSearch = { kAiStateSearch, 10, nullptr, 120, NULL, aiMoveForward, gillThinkSearch, &gillBeastSwimIdle };
AISTATE gillBeastSwimBite = { kAiStateChase, 7, &AF(GillBiteSeqCallback), 0, NULL, NULL, gillThinkSwimChase, &gillBeastSwimChase };
AISTATE gillBeastSwimIdle = { kAiStateIdle, 10, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE gillBeastSwimChase = { kAiStateChase, 10, nullptr, 0, NULL, &AF(gillMoveSwimChase), &AF(gillThinkSwimChase), NULL };
AISTATE gillBeastSwimDodge = { kAiStateMove, 10, nullptr, 90, NULL, &AF(aiMoveDodge), NULL, &gillBeastSwimChase };
AISTATE gillBeastSwimGoto = { kAiStateMove, 10, nullptr, 600, NULL, &AF(aiMoveForward), &AF(gillThinkSwimGoto), &gillBeastSwimIdle };
AISTATE gillBeastSwimSearch = { kAiStateSearch, 10, nullptr, 120, NULL, &AF(aiMoveForward), &AF(gillThinkSearch), &gillBeastSwimIdle };
AISTATE gillBeastSwimBite = { kAiStateChase, 7, &AF(GillBiteSeqCallback), 0, NULL, NULL, &AF(gillThinkSwimChase), &gillBeastSwimChase };
AISTATE gillBeastSwimRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &gillBeastSwimDodge };
AISTATE gillBeast13A138 = { kAiStateOther, 10, nullptr, 120, NULL, sub_6CD74, gillThinkSwimChase, &gillBeastSwimChase };
AISTATE gillBeast13A154 = { kAiStateOther, 10, nullptr, 0, NULL, sub_6D03C, gillThinkSwimChase, &gillBeastSwimChase };
AISTATE gillBeast13A170 = { kAiStateOther, 10, nullptr, 120, NULL, NULL, aiMoveTurn, &gillBeastSwimChase };
AISTATE gillBeastSwimUnused = { kAiStateOther, 10, nullptr, 120, NULL, &AF(gillMoveSwimUnused), &AF(gillThinkSwimChase), &gillBeastSwimChase };
AISTATE gillBeastSwimMoveIn = { kAiStateOther, 10, nullptr, 0, NULL, &AF(gillSwimMoveIn), &AF(gillThinkSwimChase), &gillBeastSwimChase };
AISTATE gillBeastSwimTurn = { kAiStateOther, 10, nullptr, 120, NULL, NULL, &AF(aiMoveTurn), &gillBeastSwimChase };
void GillBiteSeqCallback(DBloodActor* actor)
{
@ -248,19 +248,19 @@ static void gillThinkSwimChase(DBloodActor* actor)
else
{
aiPlay3DSound(actor, 1700, AI_SFX_PRIORITY_1, -1);
aiNewState(actor, &gillBeast13A154);
aiNewState(actor, &gillBeastSwimMoveIn);
}
}
}
else
aiNewState(actor, &gillBeast13A154);
aiNewState(actor, &gillBeastSwimMoveIn);
return;
}
aiNewState(actor, &gillBeastSwimGoto);
actor->SetTarget(nullptr);
}
static void sub_6CB00(DBloodActor* actor)
static void gillMoveSwimChase(DBloodActor* actor)
{
assert(actor->IsDudeActor());
DUDEINFO* pDudeInfo = getDudeInfo(actor);
@ -285,7 +285,7 @@ static void sub_6CB00(DBloodActor* actor)
}
static void sub_6CD74(DBloodActor* actor)
static void gillMoveSwimUnused(DBloodActor* actor)
{
assert(actor->IsDudeActor());
DUDEINFO* pDudeInfo = getDudeInfo(actor);
@ -312,7 +312,7 @@ static void sub_6CD74(DBloodActor* actor)
actor->vel.Z = -(target->spr.pos.Z - actor->spr.pos.Z) / 256.;
}
static void sub_6D03C(DBloodActor* actor)
static void gillSwimMoveIn(DBloodActor* actor)
{
assert(actor->IsDudeActor());
DUDEINFO* pDudeInfo = getDudeInfo(actor);

View file

@ -33,12 +33,12 @@ static void handThinkSearch(DBloodActor*);
static void handThinkGoto(DBloodActor*);
static void handThinkChase(DBloodActor*);
AISTATE handIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE handIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE hand13A3B4 = { kAiStateOther, 0, nullptr, 0, NULL, NULL, NULL, NULL };
AISTATE handSearch = { kAiStateMove, 6, nullptr, 600, NULL, aiMoveForward, handThinkSearch, &handIdle };
AISTATE handChase = { kAiStateChase, 6, nullptr, 0, NULL, aiMoveForward, handThinkChase, NULL };
AISTATE handSearch = { kAiStateMove, 6, nullptr, 600, NULL, &AF(aiMoveForward), &AF(handThinkSearch), &handIdle };
AISTATE handChase = { kAiStateChase, 6, nullptr, 0, NULL, &AF(aiMoveForward), &AF(handThinkChase), NULL };
AISTATE handRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &handSearch };
AISTATE handGoto = { kAiStateMove, 6, nullptr, 1800, NULL, aiMoveForward, handThinkGoto, &handIdle };
AISTATE handGoto = { kAiStateMove, 6, nullptr, 1800, NULL, &AF(aiMoveForward), &AF(handThinkGoto), &handIdle };
AISTATE handJump = { kAiStateChase, 7, &AF(HandJumpSeqCallback), 120, NULL, NULL, NULL, &handChase };
void HandJumpSeqCallback(DBloodActor* actor)

View file

@ -33,12 +33,12 @@ static void houndThinkSearch(DBloodActor*);
static void houndThinkGoto(DBloodActor*);
static void houndThinkChase(DBloodActor*);
AISTATE houndIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE houndSearch = { kAiStateMove, 8, nullptr, 1800, NULL, aiMoveForward, houndThinkSearch, &houndIdle };
AISTATE houndChase = { kAiStateChase, 8, nullptr, 0, NULL, aiMoveForward, houndThinkChase, NULL };
AISTATE houndIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE houndSearch = { kAiStateMove, 8, nullptr, 1800, NULL, &AF(aiMoveForward), &AF(houndThinkSearch), &houndIdle };
AISTATE houndChase = { kAiStateChase, 8, nullptr, 0, NULL, &AF(aiMoveForward), &AF(houndThinkChase), NULL };
AISTATE houndRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &houndSearch };
AISTATE houndTeslaRecoil = { kAiStateRecoil, 4, nullptr, 0, NULL, NULL, NULL, &houndSearch };
AISTATE houndGoto = { kAiStateMove, 8, nullptr, 600, NULL, aiMoveForward, houndThinkGoto, &houndIdle };
AISTATE houndGoto = { kAiStateMove, 8, nullptr, 600, NULL, &AF(aiMoveForward), &AF(houndThinkGoto), &houndIdle };
AISTATE houndBite = { kAiStateChase, 6, &AF(houndBiteSeqCallback), 60, NULL, NULL, NULL, &houndChase };
AISTATE houndBurn = { kAiStateChase, 7, &AF(houndBurnSeqCallback), 60, NULL, NULL, NULL, &houndChase };

View file

@ -33,12 +33,12 @@ static void innocThinkSearch(DBloodActor*);
static void innocThinkGoto(DBloodActor*);
static void innocThinkChase(DBloodActor*);
AISTATE innocentIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE innocentSearch = { kAiStateSearch, 6, nullptr, 1800, NULL, aiMoveForward, innocThinkSearch, &innocentIdle };
AISTATE innocentChase = { kAiStateChase, 6, nullptr, 0, NULL, aiMoveForward, innocThinkChase, NULL };
AISTATE innocentIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE innocentSearch = { kAiStateSearch, 6, nullptr, 1800, NULL, &AF(aiMoveForward), &AF(innocThinkSearch), &innocentIdle };
AISTATE innocentChase = { kAiStateChase, 6, nullptr, 0, NULL, &AF(aiMoveForward), &AF(innocThinkChase), NULL };
AISTATE innocentRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &innocentChase };
AISTATE innocentTeslaRecoil = { kAiStateRecoil, 4, nullptr, 0, NULL, NULL, NULL, &innocentChase };
AISTATE innocentGoto = { kAiStateMove, 6, nullptr, 600, NULL, aiMoveForward, innocThinkGoto, &innocentIdle };
AISTATE innocentGoto = { kAiStateMove, 6, nullptr, 600, NULL, &AF(aiMoveForward), &AF(innocThinkGoto), &innocentIdle };
static void innocThinkSearch(DBloodActor* actor)
{

View file

@ -33,22 +33,22 @@ static void aiPodSearch(DBloodActor* actor);
static void aiPodMove(DBloodActor* actor);
static void aiPodChase(DBloodActor* actor);
AISTATE podIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE podMove = { kAiStateMove, 7, nullptr, 3600, NULL, aiMoveTurn, aiPodMove, &podSearch };
AISTATE podSearch = { kAiStateSearch, 0, nullptr, 3600, NULL, aiMoveTurn, aiPodSearch, &podSearch };
AISTATE podIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE podMove = { kAiStateMove, 7, nullptr, 3600, NULL, &AF(aiMoveTurn), &AF(aiPodMove), &podSearch };
AISTATE podSearch = { kAiStateSearch, 0, nullptr, 3600, NULL, &AF(aiMoveTurn), &AF(aiPodSearch), &podSearch };
AISTATE podStartChase = { kAiStateChase, 8, &AF(podAttack), 600, NULL, NULL, NULL, &podChase };
AISTATE podRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &podChase };
AISTATE podChase = { kAiStateChase, 6, nullptr, 0, NULL, aiMoveTurn, aiPodChase, NULL };
AISTATE tentacleIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE podChase = { kAiStateChase, 6, nullptr, 0, NULL, &AF(aiMoveTurn), &AF(aiPodChase), NULL };
AISTATE tentacleIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE tentacle13A6A8 = { kAiStateOther, 7, &AF(podPlaySound1), 0, NULL, NULL, NULL, &tentacle13A6C4 };
AISTATE tentacle13A6C4 = { kAiStateOther, -1, nullptr, 0, NULL, NULL, NULL, &tentacleChase };
AISTATE tentacle13A6E0 = { kAiStateOther, 8, &AF(podPlaySound2), 0, NULL, NULL, NULL, &tentacle13A6FC };
AISTATE tentacle13A6FC = { kAiStateOther, -1, nullptr, 0, NULL, NULL, NULL, &tentacleIdle };
AISTATE tentacleMove = { kAiStateOther, 8, nullptr, 3600, NULL, aiMoveTurn, aiPodMove, &tentacleSearch };
AISTATE tentacleSearch = { kAiStateOther, 0, nullptr, 3600, NULL, aiMoveTurn, aiPodSearch, NULL };
AISTATE tentacleMove = { kAiStateOther, 8, nullptr, 3600, NULL, &AF(aiMoveTurn), &AF(aiPodMove), &tentacleSearch };
AISTATE tentacleSearch = { kAiStateOther, 0, nullptr, 3600, NULL, &AF(aiMoveTurn), &AF(aiPodSearch), NULL };
AISTATE tentacleStartChase = { kAiStateOther, 6, &AF(podExplode), 120, NULL, NULL, NULL, &tentacleChase };
AISTATE tentacleRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &tentacleChase };
AISTATE tentacleChase = { kAiStateChase, 6, nullptr, 0, NULL, aiMoveTurn, aiPodChase, NULL };
AISTATE tentacleChase = { kAiStateChase, 6, nullptr, 0, NULL, &AF(aiMoveTurn), &AF(aiPodChase), NULL };
void podPlaySound1(DBloodActor* actor)
{

View file

@ -33,12 +33,12 @@ static void ratThinkSearch(DBloodActor*);
static void ratThinkGoto(DBloodActor*);
static void ratThinkChase(DBloodActor*);
AISTATE ratIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE ratSearch = { kAiStateSearch, 7, nullptr, 1800, NULL, aiMoveForward, ratThinkSearch, &ratIdle };
AISTATE ratChase = { kAiStateChase, 7, nullptr, 0, NULL, aiMoveForward, ratThinkChase, NULL };
AISTATE ratIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE ratSearch = { kAiStateSearch, 7, nullptr, 1800, NULL, &AF(aiMoveForward), &AF(ratThinkSearch), &ratIdle };
AISTATE ratChase = { kAiStateChase, 7, nullptr, 0, NULL, &AF(aiMoveForward), &AF(ratThinkChase), NULL };
AISTATE ratDodge = { kAiStateMove, 7, nullptr, 0, NULL, NULL, NULL, &ratChase };
AISTATE ratRecoil = { kAiStateRecoil, 7, nullptr, 0, NULL, NULL, NULL, &ratDodge };
AISTATE ratGoto = { kAiStateMove, 7, nullptr, 600, NULL, aiMoveForward, ratThinkGoto, &ratIdle };
AISTATE ratGoto = { kAiStateMove, 7, nullptr, 600, NULL, &AF(aiMoveForward), &AF(ratThinkGoto), &ratIdle };
AISTATE ratBite = { kAiStateChase, 6, &AF(ratBiteSeqCallback), 120, NULL, NULL, NULL, &ratChase };
void ratBiteSeqCallback(DBloodActor* actor)

View file

@ -34,13 +34,13 @@ static void spidThinkGoto(DBloodActor*);
static void spidThinkChase(DBloodActor*);
AISTATE spidIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE spidChase = { kAiStateChase, 7, nullptr, 0, NULL, aiMoveForward, spidThinkChase, NULL };
AISTATE spidDodge = { kAiStateMove, 7, nullptr, 90, NULL, aiMoveDodge, NULL, &spidChase };
AISTATE spidGoto = { kAiStateMove, 7, nullptr, 600, NULL, aiMoveForward, spidThinkGoto, &spidIdle };
AISTATE spidSearch = { kAiStateSearch, 7, nullptr, 1800, NULL, aiMoveForward, spidThinkSearch, &spidIdle };
AISTATE spidIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE spidChase = { kAiStateChase, 7, nullptr, 0, NULL, &AF(aiMoveForward), &AF(spidThinkChase), NULL };
AISTATE spidDodge = { kAiStateMove, 7, nullptr, 90, NULL, &AF(aiMoveDodge), NULL, &spidChase };
AISTATE spidGoto = { kAiStateMove, 7, nullptr, 600, NULL, &AF(aiMoveForward), &AF(spidThinkGoto), &spidIdle };
AISTATE spidSearch = { kAiStateSearch, 7, nullptr, 1800, NULL, &AF(aiMoveForward), &AF(spidThinkSearch), &spidIdle };
AISTATE spidBite = { kAiStateChase, 6, &AF(SpidBiteSeqCallback), 60, NULL, NULL, NULL, &spidChase };
AISTATE spidJump = { kAiStateChase, 8, &AF(SpidJumpSeqCallback), 60, NULL, aiMoveForward, NULL, &spidChase };
AISTATE spidJump = { kAiStateChase, 8, &AF(SpidJumpSeqCallback), 60, NULL, &AF(aiMoveForward), NULL, &spidChase };
AISTATE spidBirth = { kAiStateOther, 0, &AF(SpidBirthSeqCallback), 60, NULL, NULL, NULL, &spidIdle };
static void spidBlindEffect(DBloodActor* actor, int nBlind, int max)

View file

@ -62,9 +62,9 @@ extern AISTATE beastSwimSlash;
extern AISTATE beastSwimRecoil;
extern AISTATE beastMorphToBeast;
extern AISTATE beastMorphFromCultist;
extern AISTATE beast138FB4;
extern AISTATE beast138FD0;
extern AISTATE beast138FEC;
extern AISTATE beastMoveSwimChaseAlt;
extern AISTATE beastSwimAttack;
extern AISTATE beastSwimTurn;
extern AISTATE eelIdle;
extern AISTATE eelFlyIdle;
@ -131,9 +131,9 @@ extern AISTATE tinycalebSwimGoto;
extern AISTATE tinycalebSwimSearch;
extern AISTATE tinycalebSwimAttack;
extern AISTATE tinycalebSwimRecoil;
extern AISTATE tinycaleb139660;
extern AISTATE tinycaleb13967C;
extern AISTATE tinycaleb139698;
extern AISTATE tinycalebSwimUnused;
extern AISTATE tinycalebSwimMoveIn;
extern AISTATE tinycalebSwimTurn;
extern AISTATE cerberusIdle;
extern AISTATE cerberusSearch;
@ -152,8 +152,8 @@ extern AISTATE cerberus2Goto;
extern AISTATE cerberus2Bite;
extern AISTATE cerberus2Burn;
extern AISTATE cerberus4Burn;
extern AISTATE cerberus139890;
extern AISTATE cerberus1398AC;
extern AISTATE cerberusTurn1;
extern AISTATE cerberusTurn2;
extern AISTATE cultistIdle;
extern AISTATE cultistProneIdle;
@ -169,11 +169,11 @@ extern AISTATE cultistTThrow;
extern AISTATE cultistSThrow;
extern AISTATE cultistTsThrow;
extern AISTATE cultistDThrow;
extern AISTATE cultist139A78;
extern AISTATE cultist139A94;
extern AISTATE cultist139AB0;
extern AISTATE cultist139ACC;
extern AISTATE cultist139AE8;
extern AISTATE cultistDThrow2;
extern AISTATE cultistDThrow3C;
extern AISTATE cultistDThrow3B;
extern AISTATE cultistDThrow3A;
extern AISTATE cultistDThrow4;
extern AISTATE cultistSearch;
extern AISTATE cultistSFire;
extern AISTATE cultistTFire;
@ -253,9 +253,9 @@ extern AISTATE gillBeastSwimGoto;
extern AISTATE gillBeastSwimSearch;
extern AISTATE gillBeastSwimBite;
extern AISTATE gillBeastSwimRecoil;
extern AISTATE gillBeast13A138;
extern AISTATE gillBeast13A154;
extern AISTATE gillBeast13A170;
extern AISTATE gillBeastSwimUnused;
extern AISTATE gillBeastSwimMoveIn;
extern AISTATE gillBeastSwimTurn;
extern AISTATE handIdle;
extern AISTATE hand13A3B4;
@ -319,11 +319,11 @@ extern AISTATE tchernobogIdle;
extern AISTATE tchernobogSearch;
extern AISTATE tchernobogChase;
extern AISTATE tchernobogRecoil;
extern AISTATE tcherno13A9B8;
extern AISTATE tcherno13A9D4;
extern AISTATE tcherno13A9F0;
extern AISTATE tcherno13AA0C;
extern AISTATE tcherno13AA28;
extern AISTATE tchernobogGoto;
extern AISTATE tchernobogBurn1;
extern AISTATE tchernobogBurn2;
extern AISTATE tchernobogFireAtk;
extern AISTATE tchernobogTurn;
extern AISTATE zombieAIdle;
extern AISTATE zombieAChase;
@ -341,7 +341,7 @@ extern AISTATE zombieEUp;
extern AISTATE zombie2Idle;
extern AISTATE zombie2Search;
extern AISTATE zombieSIdle;
extern AISTATE zombie13AC2C;
extern AISTATE zombieEStand;
extern AISTATE zombieFIdle;
extern AISTATE zombieFChase;

View file

@ -29,21 +29,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
BEGIN_BLD_NS
static void sub_72580(DBloodActor*);
static void sub_725A4(DBloodActor*);
static void sub_72850(DBloodActor*);
static void tchernobogThinkSearch(DBloodActor*);
static void tchernobogThinkTarget(DBloodActor*);
static void tchernobogThinkGoto(DBloodActor*);
static void tchernobogThinkChase(DBloodActor*);
AISTATE tchernobogIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, sub_725A4, NULL };
AISTATE tchernobogSearch = { kAiStateSearch, 8, nullptr, 1800, NULL, aiMoveForward, sub_72580, &tchernobogIdle };
AISTATE tchernobogChase = { kAiStateChase, 8, nullptr, 0, NULL, aiMoveForward, tchernobogThinkChase, NULL };
AISTATE tchernobogIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(tchernobogThinkTarget), NULL };
AISTATE tchernobogSearch = { kAiStateSearch, 8, nullptr, 1800, NULL, &AF(aiMoveForward), &AF(tchernobogThinkSearch), &tchernobogIdle };
AISTATE tchernobogChase = { kAiStateChase, 8, nullptr, 0, NULL, &AF(aiMoveForward), &AF(tchernobogThinkChase), NULL };
AISTATE tchernobogRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &tchernobogSearch };
AISTATE tcherno13A9B8 = { kAiStateMove, 8, nullptr, 600, NULL, aiMoveForward, sub_72850, &tchernobogIdle };
AISTATE tcherno13A9D4 = { kAiStateMove, 6, &AF(tchernobogBurnSeqCallback), 60, NULL, NULL, NULL, &tchernobogChase };
AISTATE tcherno13A9F0 = { kAiStateChase, 6, &AF(tchernobogBurnSeqCallback2), 60, NULL, NULL, NULL, &tchernobogChase };
AISTATE tcherno13AA0C = { kAiStateChase, 7, &AF(tchernobogFire), 60, NULL, NULL, NULL, &tchernobogChase };
AISTATE tcherno13AA28 = { kAiStateChase, 8, nullptr, 60, NULL, aiMoveTurn, NULL, &tchernobogChase };
AISTATE tchernobogGoto = { kAiStateMove, 8, nullptr, 600, NULL, &AF(aiMoveForward), &AF(tchernobogThinkGoto), &tchernobogIdle };
AISTATE tchernobogBurn1 = { kAiStateMove, 6, &AF(tchernobogBurnSeqCallback), 60, NULL, NULL, NULL, &tchernobogChase };
AISTATE tchernobogBurn2 = { kAiStateChase, 6, &AF(tchernobogBurnSeqCallback2), 60, NULL, NULL, NULL, &tchernobogChase };
AISTATE tchernobogFireAtk = { kAiStateChase, 7, &AF(tchernobogFire), 60, NULL, NULL, NULL, &tchernobogChase };
AISTATE tchernobogTurn = { kAiStateChase, 8, nullptr, 60, NULL, &AF(aiMoveTurn), NULL, &tchernobogChase };
static constexpr double Tchernnobog_XYOff = 350. / 16;
@ -55,7 +55,7 @@ void tchernobogFire(DBloodActor* actor)
evPostActor(target, 0, AF(fxFlameLick));
actBurnSprite(actor->GetOwner(), target, 40);
if (Chance(0x6000))
aiNewState(actor, &tcherno13A9D4);
aiNewState(actor, &tchernobogBurn1);
}
void tchernobogBurnSeqCallback(DBloodActor* actor)
@ -171,13 +171,13 @@ void tchernobogBurnSeqCallback2(DBloodActor* actor)
actFireMissile(actor, -Tchernnobog_XYOff, 0, Aim2, kMissileFireballTchernobog);
}
static void sub_72580(DBloodActor* actor)
static void tchernobogThinkSearch(DBloodActor* actor)
{
aiChooseDirection(actor, actor->xspr.goalAng);
aiThinkTarget(actor);
}
static void sub_725A4(DBloodActor* actor)
static void tchernobogThinkTarget(DBloodActor* actor)
{
if (!(actor->IsDudeActor())) {
Printf(PRINT_HIGH, "actor->IsDudeActor()");
@ -191,7 +191,7 @@ static void sub_725A4(DBloodActor* actor)
{
actor->xspr.goalAng += DAngle45;
aiSetTarget(actor, actor->basePoint);
aiNewState(actor, &tcherno13AA28);
aiNewState(actor, &tchernobogTurn);
return;
}
if (Chance(pDudeInfo->alertChance))
@ -232,7 +232,7 @@ static void sub_725A4(DBloodActor* actor)
}
}
static void sub_72850(DBloodActor* actor)
static void tchernobogThinkGoto(DBloodActor* actor)
{
if (!(actor->IsDudeActor())) {
Printf(PRINT_HIGH, "actor->IsDudeActor()");
@ -252,7 +252,7 @@ static void tchernobogThinkChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &tcherno13A9B8);
aiNewState(actor, &tchernobogGoto);
return;
}
if (!(actor->IsDudeActor())) {
@ -288,17 +288,17 @@ static void tchernobogThinkChase(DBloodActor* actor)
{
aiSetTarget(actor, actor->GetTarget());
if (nDist < 0x1f0 && nDist > 0xd0 && nDeltaAngle < DAngle15)
aiNewState(actor, &tcherno13AA0C);
aiNewState(actor, &tchernobogFireAtk);
else if (nDist < 0xd0 && nDist > 0xb0 && nDeltaAngle < DAngle15)
aiNewState(actor, &tcherno13A9D4);
aiNewState(actor, &tchernobogBurn1);
else if (nDist < 0xb0 && nDist > 0x50 && nDeltaAngle < DAngle15)
aiNewState(actor, &tcherno13A9F0);
aiNewState(actor, &tchernobogBurn2);
return;
}
}
}
aiNewState(actor, &tcherno13A9B8);
aiNewState(actor, &tchernobogGoto);
actor->SetTarget(nullptr);
}

View file

@ -39,8 +39,8 @@ static void unicultThinkGoto(DBloodActor*);
static void unicultThinkChase(DBloodActor*);
static void forcePunch(DBloodActor*);
AISTATE genDudeIdleL = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE genDudeIdleW = { kAiStateIdle, 13, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE genDudeIdleL = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE genDudeIdleW = { kAiStateIdle, 13, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
// ---------------------
AISTATE genDudeSearchL = { kAiStateSearch, 9, nullptr, 600, NULL, aiGenDudeMoveForward, unicultThinkSearch, &genDudeIdleL };
AISTATE genDudeSearchW = { kAiStateSearch, 13, nullptr, 600, NULL, aiGenDudeMoveForward, unicultThinkSearch, &genDudeIdleW };
@ -48,23 +48,23 @@ AISTATE genDudeSearchW = { kAiStateSearch, 13, nullptr, 600, NULL, aiGenDudeMove
AISTATE genDudeSearchShortL = { kAiStateSearch, 9, nullptr, 200, NULL, aiGenDudeMoveForward, unicultThinkSearch, &genDudeIdleL };
AISTATE genDudeSearchShortW = { kAiStateSearch, 13, nullptr, 200, NULL, aiGenDudeMoveForward, unicultThinkSearch, &genDudeIdleW };
// ---------------------
AISTATE genDudeSearchNoWalkL = { kAiStateSearch, 0, nullptr, 600, NULL, aiMoveTurn, unicultThinkSearch, &genDudeIdleL };
AISTATE genDudeSearchNoWalkW = { kAiStateSearch, 13, nullptr, 600, NULL, aiMoveTurn, unicultThinkSearch, &genDudeIdleW };
AISTATE genDudeSearchNoWalkL = { kAiStateSearch, 0, nullptr, 600, NULL, &AF(aiMoveTurn), unicultThinkSearch, &genDudeIdleL };
AISTATE genDudeSearchNoWalkW = { kAiStateSearch, 13, nullptr, 600, NULL, &AF(aiMoveTurn), unicultThinkSearch, &genDudeIdleW };
// ---------------------
AISTATE genDudeGotoL = { kAiStateMove, 9, nullptr, 600, NULL, aiGenDudeMoveForward, unicultThinkGoto, &genDudeIdleL };
AISTATE genDudeGotoW = { kAiStateMove, 13, nullptr, 600, NULL, aiGenDudeMoveForward, unicultThinkGoto, &genDudeIdleW };
// ---------------------
AISTATE genDudeDodgeL = { kAiStateMove, 9, nullptr, 90, NULL, aiMoveDodge, NULL, &genDudeChaseL };
AISTATE genDudeDodgeD = { kAiStateMove, 14, nullptr, 90, NULL, aiMoveDodge, NULL, &genDudeChaseD };
AISTATE genDudeDodgeW = { kAiStateMove, 13, nullptr, 90, NULL, aiMoveDodge, NULL, &genDudeChaseW };
AISTATE genDudeDodgeD = { kAiStateMove, 14, nullptr, 90, NULL, &AF(aiMoveDodge), NULL, &genDudeChaseD };
AISTATE genDudeDodgeW = { kAiStateMove, 13, nullptr, 90, NULL, &AF(aiMoveDodge), NULL, &genDudeChaseW };
// ---------------------
AISTATE genDudeDodgeShortL = { kAiStateMove, 9, nullptr, 60, NULL, aiMoveDodge, NULL, &genDudeChaseL };
AISTATE genDudeDodgeShortD = { kAiStateMove, 14, nullptr, 60, NULL, aiMoveDodge, NULL, &genDudeChaseD };
AISTATE genDudeDodgeShortW = { kAiStateMove, 13, nullptr, 60, NULL, aiMoveDodge, NULL, &genDudeChaseW };
AISTATE genDudeDodgeShortD = { kAiStateMove, 14, nullptr, 60, NULL, &AF(aiMoveDodge), NULL, &genDudeChaseD };
AISTATE genDudeDodgeShortW = { kAiStateMove, 13, nullptr, 60, NULL, &AF(aiMoveDodge), NULL, &genDudeChaseW };
// ---------------------
AISTATE genDudeDodgeShorterL = { kAiStateMove, 9, nullptr, 20, NULL, aiMoveDodge, NULL, &genDudeChaseL };
AISTATE genDudeDodgeShorterD = { kAiStateMove, 14, nullptr, 20, NULL, aiMoveDodge, NULL, &genDudeChaseD };
AISTATE genDudeDodgeShorterW = { kAiStateMove, 13, nullptr, 20, NULL, aiMoveDodge, NULL, &genDudeChaseW };
AISTATE genDudeDodgeShorterD = { kAiStateMove, 14, nullptr, 20, NULL, &AF(aiMoveDodge), NULL, &genDudeChaseD };
AISTATE genDudeDodgeShorterW = { kAiStateMove, 13, nullptr, 20, NULL, &AF(aiMoveDodge), NULL, &genDudeChaseW };
// ---------------------
AISTATE genDudeChaseL = { kAiStateChase, 9, nullptr, 0, NULL, aiGenDudeMoveForward, unicultThinkChase, NULL };
AISTATE genDudeChaseD = { kAiStateChase, 14, nullptr, 0, NULL, aiGenDudeMoveForward, unicultThinkChase, NULL };
@ -74,9 +74,9 @@ AISTATE genDudeChaseNoWalkL = { kAiStateChase, 0, nullptr, 0, NULL, aiMoveTurn,
AISTATE genDudeChaseNoWalkD = { kAiStateChase, 14, nullptr, 0, NULL, aiMoveTurn, unicultThinkChase, NULL };
AISTATE genDudeChaseNoWalkW = { kAiStateChase, 13, nullptr, 0, NULL, aiMoveTurn, unicultThinkChase, NULL };
// ---------------------
AISTATE genDudeFireL = { kAiStateChase, 6, &AF(genDudeAttack1), 0, NULL, aiMoveTurn, unicultThinkChase, &genDudeFireL };
AISTATE genDudeFireD = { kAiStateChase, 8, &AF(genDudeAttack1), 0, NULL, aiMoveTurn, unicultThinkChase, &genDudeFireD };
AISTATE genDudeFireW = { kAiStateChase, 8, &AF(genDudeAttack1), 0, NULL, aiMoveTurn, unicultThinkChase, &genDudeFireW };
AISTATE genDudeFireL = { kAiStateChase, 6, &AF(genDudeAttack1), 0, NULL, &AF(aiMoveTurn), unicultThinkChase, &genDudeFireL };
AISTATE genDudeFireD = { kAiStateChase, 8, &AF(genDudeAttack1), 0, NULL, &AF(aiMoveTurn), unicultThinkChase, &genDudeFireD };
AISTATE genDudeFireW = { kAiStateChase, 8, &AF(genDudeAttack1), 0, NULL, &AF(aiMoveTurn), unicultThinkChase, &genDudeFireW };
// ---------------------z
AISTATE genDudeRecoilL = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &genDudeChaseL };
AISTATE genDudeRecoilD = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &genDudeChaseD };

View file

@ -40,23 +40,23 @@ static void entryAIdle(DBloodActor*);
static void entryEStand(DBloodActor*);
AISTATE zombieAIdle = { kAiStateIdle, 0, nullptr, 0, entryAIdle, NULL, aiThinkTarget, NULL };
AISTATE zombieAChase = { kAiStateChase, 8, nullptr, 0, NULL, aiMoveForward, zombaThinkChase, NULL };
AISTATE zombieAPonder = { kAiStateOther, 0, nullptr, 0, NULL, aiMoveTurn, zombaThinkPonder, NULL };
AISTATE zombieAGoto = { kAiStateMove, 8, nullptr, 1800, NULL, aiMoveForward, zombaThinkGoto, &zombieAIdle };
AISTATE zombieAIdle = { kAiStateIdle, 0, nullptr, 0, &AF(entryAIdle), NULL, &AF(aiThinkTarget), NULL };
AISTATE zombieAChase = { kAiStateChase, 8, nullptr, 0, NULL, &AF(aiMoveForward), &AF(zombaThinkChase), NULL };
AISTATE zombieAPonder = { kAiStateOther, 0, nullptr, 0, NULL, &AF(aiMoveTurn), &AF(zombaThinkPonder), NULL };
AISTATE zombieAGoto = { kAiStateMove, 8, nullptr, 1800, NULL, &AF(aiMoveForward), &AF(zombaThinkGoto), &zombieAIdle };
AISTATE zombieAHack = { kAiStateChase, 6, &AF(HackSeqCallback), 80, NULL, NULL, NULL, &zombieAPonder };
AISTATE zombieASearch = { kAiStateSearch, 8, nullptr, 1800, NULL, aiMoveForward, zombaThinkSearch, &zombieAIdle };
AISTATE zombieASearch = { kAiStateSearch, 8, nullptr, 1800, NULL, &AF(aiMoveForward), &AF(zombaThinkSearch), &zombieAIdle };
AISTATE zombieARecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &zombieAPonder };
AISTATE zombieATeslaRecoil = { kAiStateRecoil, 4, nullptr, 0, NULL, NULL, NULL, &zombieAPonder };
AISTATE zombieARecoil2 = { kAiStateRecoil, 1, nullptr, 360, NULL, NULL, NULL, &zombieAStand };
AISTATE zombieAStand = { kAiStateMove, 11, &AF(StandSeqCallback), 0, NULL, NULL, NULL, &zombieAPonder };
AISTATE zombieEIdle = { kAiStateIdle, 12, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE zombieEUp2 = { kAiStateMove, 0, nullptr, 1, entryEZombie, NULL, NULL, &zombieASearch };
AISTATE zombieEUp = { kAiStateMove, 9, nullptr, 180, entryEStand, NULL, NULL, &zombieEUp2 };
AISTATE zombie2Idle = { kAiStateIdle, 0, nullptr, 0, entryAIdle, NULL, myThinkTarget, NULL };
AISTATE zombie2Search = { kAiStateSearch, 8, nullptr, 1800, NULL, NULL, myThinkSearch, &zombie2Idle };
AISTATE zombieSIdle = { kAiStateIdle, 10, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE zombie13AC2C = { kAiStateOther, 11, &AF(StandSeqCallback), 0, entryEZombie, NULL, NULL, &zombieAPonder };
AISTATE zombieEIdle = { kAiStateIdle, 12, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE zombieEUp2 = { kAiStateMove, 0, nullptr, 1, &AF(entryEZombie), NULL, NULL, &zombieASearch };
AISTATE zombieEUp = { kAiStateMove, 9, nullptr, 180, &AF(entryEStand), NULL, NULL, &zombieEUp2 };
AISTATE zombie2Idle = { kAiStateIdle, 0, nullptr, 0, &AF(entryAIdle), NULL, &AF(myThinkTarget), NULL };
AISTATE zombie2Search = { kAiStateSearch, 8, nullptr, 1800, NULL, NULL, &AF(myThinkSearch), &zombie2Idle };
AISTATE zombieSIdle = { kAiStateIdle, 10, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE zombieEStand = { kAiStateOther, 11, &AF(StandSeqCallback), 0, &AF(entryEZombie), NULL, NULL, &zombieAPonder };
void HackSeqCallback(DBloodActor* actor)
{

View file

@ -34,14 +34,14 @@ static void zombfThinkGoto(DBloodActor* actor);
static void zombfThinkChase(DBloodActor* actor);
AISTATE zombieFIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE zombieFChase = { kAiStateChase, 8, nullptr, 0, NULL, aiMoveForward, zombfThinkChase, NULL };
AISTATE zombieFGoto = { kAiStateMove, 8, nullptr, 600, NULL, aiMoveForward, zombfThinkGoto, &zombieFIdle };
AISTATE zombieFDodge = { kAiStateMove, 8, nullptr, 0, NULL, aiMoveDodge, zombfThinkChase, &zombieFChase };
AISTATE zombieFIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE zombieFChase = { kAiStateChase, 8, nullptr, 0, NULL, &AF(aiMoveForward), &AF(zombfThinkChase), NULL };
AISTATE zombieFGoto = { kAiStateMove, 8, nullptr, 600, NULL, &AF(aiMoveForward), &AF(zombfThinkGoto), &zombieFIdle };
AISTATE zombieFDodge = { kAiStateMove, 8, nullptr, 0, NULL, &AF(aiMoveDodge), &AF(zombfThinkChase), &zombieFChase };
AISTATE zombieFHack = { kAiStateChase, 6, &AF(zombfHackSeqCallback), 120, NULL, NULL, NULL, &zombieFChase };
AISTATE zombieFPuke = { kAiStateChase, 9, &AF(PukeSeqCallback), 120, NULL, NULL, NULL, &zombieFChase };
AISTATE zombieFThrow = { kAiStateChase, 6, &AF(ThrowSeqCallback), 120, NULL, NULL, NULL, &zombieFChase };
AISTATE zombieFSearch = { kAiStateSearch, 8, nullptr, 1800, NULL, aiMoveForward, zombfThinkSearch, &zombieFIdle };
AISTATE zombieFSearch = { kAiStateSearch, 8, nullptr, 1800, NULL, &AF(aiMoveForward), &AF(zombfThinkSearch), &zombieFIdle };
AISTATE zombieFRecoil = { kAiStateRecoil, 5, nullptr, 0, NULL, NULL, NULL, &zombieFChase };
AISTATE zombieFTeslaRecoil = { kAiStateRecoil, 4, nullptr, 0, NULL, NULL, NULL, &zombieFChase };

View file

@ -160,18 +160,18 @@ DEF_ANIMATOR(ratThinkSearch)
DEF_ANIMATOR(spidThinkChase)
DEF_ANIMATOR(spidThinkGoto)
DEF_ANIMATOR(spidThinkSearch)
DEF_ANIMATOR(sub_628A0)
DEF_ANIMATOR(sub_62AE0)
DEF_ANIMATOR(sub_62D7C)
DEF_ANIMATOR(sub_65D04)
DEF_ANIMATOR(sub_65F44)
DEF_ANIMATOR(sub_661E0)
DEF_ANIMATOR(sub_6CB00)
DEF_ANIMATOR(sub_6CD74)
DEF_ANIMATOR(sub_6D03C)
DEF_ANIMATOR(sub_72580)
DEF_ANIMATOR(sub_725A4)
DEF_ANIMATOR(sub_72850)
DEF_ANIMATOR(beastMoveSwim)
DEF_ANIMATOR(beastMoveSwimAlt)
DEF_ANIMATOR(beastMoveIn)
DEF_ANIMATOR(calebMoveSwimChase)
DEF_ANIMATOR(calebSwimUnused)
DEF_ANIMATOR(calebSwimMoveIn)
DEF_ANIMATOR(gillMoveSwimChase)
DEF_ANIMATOR(gillMoveSwimUnused)
DEF_ANIMATOR(gillSwimMoveIn)
DEF_ANIMATOR(tchernobogThinkSearch)
DEF_ANIMATOR(tchernobogThinkTarget)
DEF_ANIMATOR(tchernobogThinkGoto)
DEF_ANIMATOR(tchernobogThinkChase)
DEF_ANIMATOR(zombaThinkChase)
DEF_ANIMATOR(zombaThinkGoto)

View file

@ -77,9 +77,9 @@ static AISTATE* const allAIStates[] =
&beastSwimRecoil,
&beastMorphToBeast,
&beastMorphFromCultist,
&beast138FB4,
&beast138FD0,
&beast138FEC,
&beastMoveSwimChaseAlt,
&beastSwimAttack,
&beastSwimTurn,
&eelIdle,
&eelFlyIdle,
&eelChase,
@ -143,9 +143,9 @@ static AISTATE* const allAIStates[] =
&tinycalebSwimSearch,
&tinycalebSwimAttack,
&tinycalebSwimRecoil,
&tinycaleb139660,
&tinycaleb13967C,
&tinycaleb139698,
&tinycalebSwimUnused,
&tinycalebSwimMoveIn,
&tinycalebSwimTurn,
&cerberusIdle,
&cerberusSearch,
&cerberusChase,
@ -163,8 +163,8 @@ static AISTATE* const allAIStates[] =
&cerberus2Bite,
&cerberus2Burn,
&cerberus4Burn,
&cerberus139890,
&cerberus1398AC,
&cerberusTurn1,
&cerberusTurn2,
&cultistIdle,
&cultistProneIdle,
&fanaticProneIdle,
@ -179,11 +179,11 @@ static AISTATE* const allAIStates[] =
&cultistSThrow,
&cultistTsThrow,
&cultistDThrow,
&cultist139A78,
&cultist139A94,
&cultist139AB0,
&cultist139ACC,
&cultist139AE8,
&cultistDThrow2,
&cultistDThrow3C,
&cultistDThrow3B,
&cultistDThrow3A,
&cultistDThrow4,
&cultistSearch,
&cultistSFire,
&cultistTFire,
@ -260,9 +260,9 @@ static AISTATE* const allAIStates[] =
&gillBeastSwimSearch,
&gillBeastSwimBite,
&gillBeastSwimRecoil,
&gillBeast13A138,
&gillBeast13A154,
&gillBeast13A170,
&gillBeastSwimUnused,
&gillBeastSwimMoveIn,
&gillBeastSwimTurn,
&handIdle,
&hand13A3B4,
&handSearch,
@ -319,11 +319,11 @@ static AISTATE* const allAIStates[] =
&tchernobogSearch,
&tchernobogChase,
&tchernobogRecoil,
&tcherno13A9B8,
&tcherno13A9D4,
&tcherno13A9F0,
&tcherno13AA0C,
&tcherno13AA28,
&tchernobogGoto,
&tchernobogBurn1,
&tchernobogBurn2,
&tchernobogFireAtk,
&tchernobogTurn,
&zombieAIdle,
&zombieAChase,
&zombieAPonder,
@ -340,7 +340,7 @@ static AISTATE* const allAIStates[] =
&zombie2Idle,
&zombie2Search,
&zombieSIdle,
&zombie13AC2C,
&zombieEStand,
&zombieFIdle,
&zombieFChase,
&zombieFGoto,

View file

@ -149,6 +149,9 @@ native void beastThinkGoto();
native void beastThinkSearch();
native void beastThinkSwimChase();
native void beastThinkSwimGoto();
native void beastMoveSwim();
native void beastMoveSwimAlt();
native void beastMoveIn();
native void burnThinkChase();
native void burnThinkGoto();
native void burnThinkSearch();
@ -224,18 +227,15 @@ native void ratThinkSearch();
native void spidThinkChase();
native void spidThinkGoto();
native void spidThinkSearch();
native void sub_628A0();
native void sub_62AE0();
native void sub_62D7C();
native void sub_65D04();
native void sub_65F44();
native void sub_661E0();
native void sub_6CB00();
native void sub_6CD74();
native void sub_6D03C();
native void sub_72580();
native void sub_725A4();
native void sub_72850();
native void calebMoveSwimChase();
native void calebSwimUnused();
native void calebSwimMoveIn();
native void gillMoveSwimChase();
native void gillMoveSwimUnused();
native void gillSwimMoveIn();
native void tchernobogThinkSearch();
native void tchernobogThinkTarget();
native void tchernobogThinkGoto();
native void tchernobogThinkChase();
native void zombaThinkChase();
native void zombaThinkGoto();