use the script defined states.

Not fully working yet.
This commit is contained in:
Christoph Oelckers 2023-10-07 21:03:25 +02:00
parent 0ba188b7f2
commit a7317e700d
32 changed files with 935 additions and 988 deletions

View file

@ -100,4 +100,319 @@ xx(ExtraSound5)
xx(ExtraSound6)
xx(CloseAttackPercent)
xx(AttackPercent)
xx(BloodMissileBase)
xx(BloodMissileBase)
// Blood state names. Most of these can be removed after the state system refactor is complete.
xx(genIdle)
xx(genRecoil)
xx(batIdle)
xx(batFlyIdle)
xx(batChase)
xx(batPonder)
xx(batGoto)
xx(batBite)
xx(batRecoil)
xx(batSearch)
xx(batSwoop)
xx(batFly)
xx(batTurn)
xx(batHide)
xx(batDodgeUp)
xx(batDodgeUpRight)
xx(batDodgeUpLeft)
xx(batDodgeDown)
xx(batDodgeDownRight)
xx(batDodgeDownLeft)
xx(beastIdle)
xx(beastChase)
xx(beastDodge)
xx(beastGoto)
xx(beastSlash)
xx(beastStomp)
xx(beastSearch)
xx(beastRecoil)
xx(beastTeslaRecoil)
xx(beastSwimIdle)
xx(beastSwimChase)
xx(beastSwimDodge)
xx(beastSwimGoto)
xx(beastSwimSearch)
xx(beastSwimSlash)
xx(beastSwimRecoil)
xx(beastMorphToBeast)
xx(beastMorphFromCultist)
xx(beastMoveSwimChaseAlt)
xx(beastSwimAttack)
xx(beastSwimTurn)
xx(eelIdle)
xx(eelFlyIdle)
xx(eelChase)
xx(eelPonder)
xx(eelGoto)
xx(eelBite)
xx(eelRecoil)
xx(eelSearch)
xx(eelSwoop)
xx(eelFly)
xx(eelTurn)
xx(eelHide)
xx(eelDodgeUp)
xx(eelDodgeUpRight)
xx(eelDodgeUpLeft)
xx(eelDodgeDown)
xx(eelDodgeDownRight)
xx(eelDodgeDownLeft)
xx(cultistBurnIdle)
xx(cultistBurnChase)
xx(cultistBurnGoto)
xx(cultistBurnSearch)
xx(cultistBurnAttack)
xx(zombieABurnChase)
xx(zombieABurnGoto)
xx(zombieABurnSearch)
xx(zombieABurnAttack)
xx(zombieFBurnChase)
xx(zombieFBurnGoto)
xx(zombieFBurnSearch)
xx(zombieFBurnAttack)
xx(innocentBurnChase)
xx(innocentBurnGoto)
xx(innocentBurnSearch)
xx(innocentBurnAttack)
xx(beastBurnChase)
xx(beastBurnGoto)
xx(beastBurnSearch)
xx(beastBurnAttack)
xx(tinycalebBurnChase)
xx(tinycalebBurnGoto)
xx(tinycalebBurnSearch)
xx(tinycalebBurnAttack)
xx(genDudeBurnIdle)
xx(genDudeBurnChase)
xx(genDudeBurnGoto)
xx(genDudeBurnSearch)
xx(genDudeBurnAttack)
xx(tinycalebIdle)
xx(tinycalebChase)
xx(tinycalebDodge)
xx(tinycalebGoto)
xx(tinycalebAttack)
xx(tinycalebSearch)
xx(tinycalebRecoil)
xx(tinycalebTeslaRecoil)
xx(tinycalebSwimIdle)
xx(tinycalebSwimChase)
xx(tinycalebSwimDodge)
xx(tinycalebSwimGoto)
xx(tinycalebSwimSearch)
xx(tinycalebSwimAttack)
xx(tinycalebSwimRecoil)
xx(tinycalebSwimUnused)
xx(tinycalebSwimMoveIn)
xx(tinycalebSwimTurn)
xx(cerberusIdle)
xx(cerberusSearch)
xx(cerberusChase)
xx(cerberusRecoil)
xx(cerberusTeslaRecoil)
xx(cerberusGoto)
xx(cerberusBite)
xx(cerberusBurn)
xx(cerberus3Burn)
xx(cerberus2Idle)
xx(cerberus2Search)
xx(cerberus2Chase)
xx(cerberus2Recoil)
xx(cerberus2Goto)
xx(cerberus2Bite)
xx(cerberus2Burn)
xx(cerberus4Burn)
xx(cerberusTurn1)
xx(cerberusTurn2)
xx(cultistIdle)
xx(cultistProneIdle)
xx(fanaticProneIdle)
xx(cultistProneIdle3)
xx(cultistChase)
xx(fanaticChase)
xx(cultistDodge)
xx(cultistGoto)
xx(cultistProneChase)
xx(cultistProneDodge)
xx(cultistTThrow)
xx(cultistSThrow)
xx(cultistTsThrow)
xx(cultistDThrow)
xx(cultistDThrow2)
xx(cultistDThrow3C)
xx(cultistDThrow3B)
xx(cultistDThrow3A)
xx(cultistDThrow4)
xx(cultistSearch)
xx(cultistSFire)
xx(cultistTFire)
xx(cultistTsFire)
xx(cultistSProneFire)
xx(cultistTProneFire)
xx(cultistTsProneFire)
xx(cultistTsProneFireFixed)
xx(cultistRecoil)
xx(cultistProneRecoil)
xx(cultistTeslaRecoil)
xx(cultistSwimIdle)
xx(cultistSwimChase)
xx(cultistSwimDodge)
xx(cultistSwimGoto)
xx(cultistSwimSearch)
xx(cultistSSwimFire)
xx(cultistTSwimFire)
xx(cultistTsSwimFire)
xx(cultistSwimRecoil)
xx(gargoyleFIdle)
xx(gargoyleStatueIdle)
xx(gargoyleFChase)
xx(gargoyleFGoto)
xx(gargoyleFSlash)
xx(gargoyleFThrow)
xx(gargoyleSThrow)
xx(gargoyleSBlast)
xx(gargoyleFRecoil)
xx(gargoyleFSearch)
xx(gargoyleFMorph2)
xx(gargoyleFMorph)
xx(gargoyleSMorph2)
xx(gargoyleSMorph)
xx(gargoyleSwoop)
xx(gargoyleFly)
xx(gargoyleTurn)
xx(gargoyleDodgeUp)
xx(gargoyleFDodgeUpRight)
xx(gargoyleFDodgeUpLeft)
xx(gargoyleDodgeDown)
xx(gargoyleFDodgeDownRight)
xx(gargoyleFDodgeDownLeft)
xx(statueFBreakSEQ)
xx(statueSBreakSEQ)
xx(ghostIdle)
xx(ghostChase)
xx(ghostGoto)
xx(ghostSlash)
xx(ghostThrow)
xx(ghostBlast)
xx(ghostRecoil)
xx(ghostTeslaRecoil)
xx(ghostSearch)
xx(ghostSwoop)
xx(ghostFly)
xx(ghostTurn)
xx(ghostDodgeUp)
xx(ghostDodgeUpRight)
xx(ghostDodgeUpLeft)
xx(ghostDodgeDown)
xx(ghostDodgeDownRight)
xx(ghostDodgeDownLeft)
xx(gillBeastIdle)
xx(gillBeastChase)
xx(gillBeastDodge)
xx(gillBeastGoto)
xx(gillBeastBite)
xx(gillBeastSearch)
xx(gillBeastRecoil)
xx(gillBeastSwimIdle)
xx(gillBeastSwimChase)
xx(gillBeastSwimDodge)
xx(gillBeastSwimGoto)
xx(gillBeastSwimSearch)
xx(gillBeastSwimBite)
xx(gillBeastSwimRecoil)
xx(gillBeastSwimUnused)
xx(gillBeastSwimMoveIn)
xx(gillBeastSwimTurn)
xx(handIdle)
xx(handChoke)
xx(handSearch)
xx(handChase)
xx(handRecoil)
xx(handGoto)
xx(handJump)
xx(houndIdle)
xx(houndSearch)
xx(houndChase)
xx(houndRecoil)
xx(houndTeslaRecoil)
xx(houndGoto)
xx(houndBite)
xx(houndBurn)
xx(innocentIdle)
xx(innocentSearch)
xx(innocentChase)
xx(innocentRecoil)
xx(innocentTeslaRecoil)
xx(innocentGoto)
xx(podIdle)
xx(podMove)
xx(podSearch)
xx(podStartChase)
xx(podRecoil)
xx(podChase)
xx(tentacleIdle)
xx(tentacle13A6A8)
xx(tentacle13A6C4)
xx(tentacle13A6E0)
xx(tentacle13A6FC)
xx(tentacleMove)
xx(tentacleSearch)
xx(tentacleStartChase)
xx(tentacleRecoil)
xx(tentacleChase)
xx(ratIdle)
xx(ratSearch)
xx(ratChase)
xx(ratDodge)
xx(ratRecoil)
xx(ratGoto)
xx(ratBite)
xx(spidIdle)
xx(spidChase)
xx(spidDodge)
xx(spidGoto)
xx(spidSearch)
xx(spidBite)
xx(spidJump)
xx(spidBirth)
xx(tchernobogIdle)
xx(tchernobogSearch)
xx(tchernobogChase)
xx(tchernobogRecoil)
xx(tchernobogGoto)
xx(tchernobogBurn1)
xx(tchernobogBurn2)
xx(tchernobogFireAtk)
xx(tchernobogTurn)
xx(zombieAIdle)
xx(zombieAChase)
xx(zombieAPonder)
xx(zombieAGoto)
xx(zombieAHack)
xx(zombieASearch)
xx(zombieARecoil)
xx(zombieATeslaRecoil)
xx(zombieARecoil2)
xx(zombieAStand)
xx(zombieEIdle)
xx(zombieEUp2)
xx(zombieEUp)
xx(zombie2Idle)
xx(zombie2Search)
xx(zombieSIdle)
xx(zombieEStand)
xx(zombieFIdle)
xx(zombieFChase)
xx(zombieFGoto)
xx(zombieFDodge)
xx(zombieFHack)
xx(zombieFPuke)
xx(zombieFThrow)
xx(zombieFSearch)
xx(zombieFRecoil)
xx(zombieFTeslaRecoil)

View file

@ -156,11 +156,15 @@ struct FDefiningState
int Type;
int Tics;
FName Label;
FName NextState;
FName NextStaten;
VMFunction* ActionFunc; // called when an attached animation triggers an event. (i.e. Blood's SEQs. Should be made game independent.)
VMFunction* EnterFunc; // called when entering the state.
VMFunction* TickFunc; // called when ticking the state.
VMFunction* MoveFunc; // called when moving the actor
// these are only here so we can use this struct directly in the first stage of transitioning the states in Blood.
FDefiningState* NextState;
int seqId;
};
struct FStateLabels;

View file

@ -1781,7 +1781,7 @@ static bool actKillDudeStage1(DBloodActor* actor, DAMAGE_TYPE damageType)
if (damageType == kDamageBurn && actor->xspr.medium == kMediumNormal)
{
actor->ChangeType(kDudeBurningCultist);
aiNewState(actor, &cultistBurnGoto);
aiNewState(actor, NAME_cultistBurnGoto);
actHealDude(actor, dudeInfo[40].startHealth, dudeInfo[40].startHealth);
return true;
}
@ -1791,7 +1791,7 @@ static bool actKillDudeStage1(DBloodActor* actor, DAMAGE_TYPE damageType)
if (damageType == kDamageBurn && actor->xspr.medium == kMediumNormal)
{
actor->ChangeType(kDudeBurningBeast);
aiNewState(actor, &beastBurnGoto);
aiNewState(actor, NAME_beastBurnGoto);
actHealDude(actor, dudeInfo[53].startHealth, dudeInfo[53].startHealth);
return true;
}
@ -1801,7 +1801,7 @@ static bool actKillDudeStage1(DBloodActor* actor, DAMAGE_TYPE damageType)
if (damageType == kDamageBurn && actor->xspr.medium == kMediumNormal)
{
actor->ChangeType(kDudeBurningInnocent);
aiNewState(actor, &innocentBurnGoto);
aiNewState(actor, NAME_innocentBurnGoto);
actHealDude(actor, dudeInfo[39].startHealth, dudeInfo[39].startHealth);
return true;
}
@ -1813,7 +1813,7 @@ static bool actKillDudeStage1(DBloodActor* actor, DAMAGE_TYPE damageType)
if (damageType == kDamageBurn && actor->xspr.medium == kMediumNormal)
{
actor->ChangeType(kDudeBurningTinyCaleb);
aiNewState(actor, &tinycalebBurnGoto);
aiNewState(actor, NAME_tinycalebBurnGoto);
actHealDude(actor, dudeInfo[39].startHealth, dudeInfo[39].startHealth);
return true;
}
@ -2527,7 +2527,6 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
DUDEINFO* pDudeInfo = nullptr;
bool pIsThing = false;
int nThingDamage = actorHit->dmgControl[kDamageBurn];
if (hitCode == 3 && actorHit)
{
@ -2549,6 +2548,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
DAMAGE_TYPE rand1 = (DAMAGE_TYPE)Random(7);
int rand2 = (7 + Random(7)) << 4;
int nDamage = actDamageSprite(missileOwner, actorHit, rand1, rand2);
int nThingDamage = actorHit->dmgControl[kDamageBurn];
if (nThingDamage != 0)
actBurnSprite(missileActor->GetOwner(), actorHit, 360);
@ -2650,6 +2650,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
sfxKill3DSound(missileActor, -1, -1);
if ((hitCode == 3 && actorHit) && (pIsThing || pDudeInfo))
{
int nThingDamage = actorHit->dmgControl[kDamageBurn];
if (nThingDamage != 0)
{
if (pIsThing && actorHit->GetType() == kThingTNTBarrel && actorHit->xspr.burnTime == 0)
@ -3431,7 +3432,7 @@ void MoveDude(DBloodActor* actor)
double tz = (actor->spr.pos.Z - top) / 4;
double wdf = actor->clipdist;
auto pSector = actor->sector();
int nAiStateType = (actor->xspr.aiState) ? actor->xspr.aiState->stateType : -1;
int nAiStateType = (actor->xspr.aiState) ? actor->xspr.aiState->Type : -1;
assert(pSector);
@ -3636,10 +3637,10 @@ void MoveDude(DBloodActor* actor)
{
case kDudeCultistTommy:
case kDudeCultistShotgun:
aiNewState(actor, &cultistGoto);
aiNewState(actor, NAME_cultistGoto);
break;
case kDudeGillBeast:
aiNewState(actor, &gillBeastGoto);
aiNewState(actor, NAME_gillBeastGoto);
actor->spr.flags |= 6;
break;
case kDudeBoneEel:
@ -3691,7 +3692,7 @@ void MoveDude(DBloodActor* actor)
actor->xspr.burnTime = 0;
evPostActor(actor, 0, AF(EnemyBubble));
sfxPlay3DSound(actor, 720, -1, 0);
aiNewState(actor, &cultistSwimGoto);
aiNewState(actor, NAME_cultistSwimGoto);
break;
case kDudeBurningCultist:
{
@ -3705,26 +3706,26 @@ void MoveDude(DBloodActor* actor)
actor->xspr.burnTime = 0;
evPostActor(actor, 0, AF(EnemyBubble));
sfxPlay3DSound(actor, 720, -1, 0);
aiNewState(actor, &cultistSwimGoto);
aiNewState(actor, NAME_cultistSwimGoto);
break;
}
case kDudeZombieAxeNormal:
actor->xspr.burnTime = 0;
evPostActor(actor, 0, AF(EnemyBubble));
sfxPlay3DSound(actor, 720, -1, 0);
aiNewState(actor, &zombieAGoto);
aiNewState(actor, NAME_zombieAGoto);
break;
case kDudeZombieButcher:
actor->xspr.burnTime = 0;
evPostActor(actor, 0, AF(EnemyBubble));
sfxPlay3DSound(actor, 720, -1, 0);
aiNewState(actor, &zombieFGoto);
aiNewState(actor, NAME_zombieFGoto);
break;
case kDudeGillBeast:
actor->xspr.burnTime = 0;
evPostActor(actor, 0, AF(EnemyBubble));
sfxPlay3DSound(actor, 720, -1, 0);
aiNewState(actor, &gillBeastSwimGoto);
aiNewState(actor, NAME_gillBeastSwimGoto);
actor->spr.flags &= ~6;
break;

File diff suppressed because it is too large Load diff

View file

@ -68,7 +68,8 @@ extern const int gCultTeslaFireChance[5];
bool dudeIsPlayingSeq(DBloodActor* pSprite, int nSeq);
void aiPlay3DSound(DBloodActor* pSprite, int a2, AI_SFX_PRIORITY a3, int a4);
void aiNewState(DBloodActor* actor, AISTATE *pAIState);
void aiNewState(DBloodActor* actor, FName pAIState);
void aiNewState(DBloodActor* actor, FDefiningState* pAIState);
void aiChooseDirection(DBloodActor* actor, DAngle a3);
void aiMoveForward(DBloodActor*pXSprite);
void aiMoveTurn(DBloodActor*pXSprite);

View file

@ -87,7 +87,7 @@ static void batThinkTarget(DBloodActor* actor)
actor->dudeExtra.thinkTime = 0;
actor->xspr.goalAng += DAngle45;
aiSetTarget(actor, actor->basePoint);
aiNewState(actor, &batTurn);
aiNewState(actor, NAME_batTurn);
return;
}
if (Chance(pDudeInfo->alertChance))
@ -140,7 +140,7 @@ static void batThinkGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &batSearch);
aiNewState(actor, NAME_batSearch);
batThinkTarget(actor);
}
@ -148,7 +148,7 @@ static void batThinkPonder(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &batSearch);
aiNewState(actor, NAME_batSearch);
return;
}
assert(actor->IsDudeActor());
@ -159,7 +159,7 @@ static void batThinkPonder(DBloodActor* actor)
aiChooseDirection(actor, dvec.Angle());
if (pTarget->xspr.health == 0)
{
aiNewState(actor, &batSearch);
aiNewState(actor, NAME_batSearch);
return;
}
double nDist = dvec.Length();
@ -174,25 +174,25 @@ static void batThinkPonder(DBloodActor* actor)
{
aiSetTarget(actor, actor->GetTarget());
if (height2 - height < 48 && nDist < 0x180 && nDist > 0xc0 && nDeltaAngle < DAngle15)
aiNewState(actor, &batDodgeUp);
aiNewState(actor, NAME_batDodgeUp);
else if (height2 - height > 0x50 && nDist < 0x180 && nDist > 0xc0 && nDeltaAngle < DAngle15)
aiNewState(actor, &batDodgeDown);
aiNewState(actor, NAME_batDodgeDown);
else if (height2 - height < 0x20 && nDist < 0x20 && nDeltaAngle < DAngle15)
aiNewState(actor, &batDodgeUp);
aiNewState(actor, NAME_batDodgeUp);
else if (height2 - height > 0x60 && nDist < 0x140 && nDist > 0x80 && nDeltaAngle < DAngle15)
aiNewState(actor, &batDodgeDown);
aiNewState(actor, NAME_batDodgeDown);
else if (height2 - height < 0x20 && nDist < 0x140 && nDist > 0x80 && nDeltaAngle < DAngle15)
aiNewState(actor, &batDodgeUp);
aiNewState(actor, NAME_batDodgeUp);
else if (height2 - height < 0x20 && nDeltaAngle < DAngle15 && nDist > 0x140)
aiNewState(actor, &batDodgeUp);
aiNewState(actor, NAME_batDodgeUp);
else if (height2 - height > 0x40)
aiNewState(actor, &batDodgeDown);
aiNewState(actor, NAME_batDodgeDown);
else
aiNewState(actor, &batDodgeUp);
aiNewState(actor, NAME_batDodgeUp);
return;
}
}
aiNewState(actor, &batGoto);
aiNewState(actor, NAME_batGoto);
actor->SetTarget(nullptr);
}
@ -236,7 +236,7 @@ static void batThinkChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &batGoto);
aiNewState(actor, NAME_batGoto);
return;
}
assert(actor->IsDudeActor());
@ -248,12 +248,12 @@ static void batThinkChase(DBloodActor* actor)
aiChooseDirection(actor, dvec.Angle());
if (pTarget->xspr.health == 0)
{
aiNewState(actor, &batSearch);
aiNewState(actor, NAME_batSearch);
return;
}
if (pTarget->IsPlayerActor() && powerupCheck(getPlayer(pTarget), kPwUpShadowCloak) > 0)
{
aiNewState(actor, &batSearch);
aiNewState(actor, NAME_batSearch);
return;
}
double nDist = dvec.Length();
@ -275,23 +275,23 @@ static void batThinkChase(DBloodActor* actor)
double heightDelta = height2 - height;
bool angWithinRange = nDeltaAngle < DAngle15;
if (heightDelta < 32 && nDist < 0x20 && angWithinRange)
aiNewState(actor, &batBite);
aiNewState(actor, NAME_batBite);
else if ((heightDelta > 80 || floorDelta > 80) && nDist < 0x140 && nDist > 0x80 && angWithinRange)
aiNewState(actor, &batSwoop);
aiNewState(actor, NAME_batSwoop);
else if ((heightDelta < 48 || floorDelta < 48) && angWithinRange)
aiNewState(actor, &batFly);
aiNewState(actor, NAME_batFly);
return;
}
}
else
{
aiNewState(actor, &batFly);
aiNewState(actor, NAME_batFly);
return;
}
}
actor->SetTarget(nullptr);
aiNewState(actor, &batHide);
aiNewState(actor, NAME_batHide);
}
static void batMoveForward(DBloodActor* actor)
@ -373,7 +373,7 @@ void batMoveToCeil(DBloodActor* actor)
actor->dudeExtra.thinkTime = 0;
actor->spr.flags = 0;
aiNewState(actor, &batIdle);
aiNewState(actor, NAME_batIdle);
}
else
aiSetTarget(actor, DVector3(actor->spr.pos.XY(), actor->sector()->ceilingz));

View file

@ -182,9 +182,9 @@ static void beastThinkGoto(DBloodActor* actor)
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &beastSwimSearch);
aiNewState(actor, NAME_beastSwimSearch);
else
aiNewState(actor, &beastSearch);
aiNewState(actor, NAME_beastSearch);
}
aiThinkTarget(actor);
}
@ -197,9 +197,9 @@ static void beastThinkChase(DBloodActor* actor)
auto pXSector = pSector->hasX() ? &pSector->xs() : nullptr;
if (pXSector && pXSector->Underwater)
aiNewState(actor, &beastSwimSearch);
aiNewState(actor, NAME_beastSwimSearch);
else
aiNewState(actor, &beastSearch);
aiNewState(actor, NAME_beastSearch);
return;
}
assert(actor->IsDudeActor());
@ -216,17 +216,17 @@ static void beastThinkChase(DBloodActor* actor)
if (target->xspr.health == 0)
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &beastSwimSearch);
aiNewState(actor, NAME_beastSwimSearch);
else
aiNewState(actor, &beastSearch);
aiNewState(actor, NAME_beastSearch);
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &beastSwimSearch);
aiNewState(actor, NAME_beastSwimSearch);
else
aiNewState(actor, &beastSearch);
aiNewState(actor, NAME_beastSearch);
return;
}
double nDist = dv.Length();
@ -250,25 +250,25 @@ static void beastThinkChase(DBloodActor* actor)
{
case -1:
if (!pXSector || !pXSector->Underwater)
aiNewState(actor, &beastStomp);
aiNewState(actor, NAME_beastStomp);
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType())
{
if (!pXSector || !pXSector->Underwater)
aiNewState(actor, &beastStomp);
aiNewState(actor, NAME_beastStomp);
}
else
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &beastSwimDodge);
aiNewState(actor, NAME_beastSwimDodge);
else
aiNewState(actor, &beastDodge);
aiNewState(actor, NAME_beastDodge);
}
break;
default:
if (!pXSector || !pXSector->Underwater)
aiNewState(actor, &beastStomp);
aiNewState(actor, NAME_beastStomp);
break;
}
}
@ -280,31 +280,31 @@ static void beastThinkChase(DBloodActor* actor)
{
case -1:
if (pXSector && pXSector->Underwater)
aiNewState(actor, &beastSwimSlash);
aiNewState(actor, NAME_beastSwimSlash);
else
aiNewState(actor, &beastSlash);
aiNewState(actor, NAME_beastSlash);
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType())
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &beastSwimSlash);
aiNewState(actor, NAME_beastSwimSlash);
else
aiNewState(actor, &beastSlash);
aiNewState(actor, NAME_beastSlash);
}
else
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &beastSwimDodge);
aiNewState(actor, NAME_beastSwimDodge);
else
aiNewState(actor, &beastDodge);
aiNewState(actor, NAME_beastDodge);
}
break;
default:
if (pXSector && pXSector->Underwater)
aiNewState(actor, &beastSwimSlash);
aiNewState(actor, NAME_beastSwimSlash);
else
aiNewState(actor, &beastSlash);
aiNewState(actor, NAME_beastSlash);
break;
}
}
@ -314,9 +314,9 @@ static void beastThinkChase(DBloodActor* actor)
}
if (pXSector && pXSector->Underwater)
aiNewState(actor, &beastSwimGoto);
aiNewState(actor, NAME_beastSwimGoto);
else
aiNewState(actor, &beastGoto);
aiNewState(actor, NAME_beastGoto);
actor->SetTarget(nullptr);
}
@ -329,7 +329,7 @@ static void beastThinkSwimGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &beastSwimSearch);
aiNewState(actor, NAME_beastSwimSearch);
aiThinkTarget(actor);
}
@ -337,7 +337,7 @@ static void beastThinkSwimChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &beastSwimGoto);
aiNewState(actor, NAME_beastSwimGoto);
return;
}
assert(actor->IsDudeActor());
@ -352,12 +352,12 @@ static void beastThinkSwimChase(DBloodActor* actor)
aiChooseDirection(actor, nAngle);
if (target->xspr.health == 0)
{
aiNewState(actor, &beastSwimSearch);
aiNewState(actor, NAME_beastSwimSearch);
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
aiNewState(actor, &beastSwimSearch);
aiNewState(actor, NAME_beastSwimSearch);
return;
}
@ -371,19 +371,19 @@ static void beastThinkSwimChase(DBloodActor* actor)
{
aiSetTarget(actor, actor->GetTarget());
if (nDist < 64 && nDeltaAngle < DAngle15)
aiNewState(actor, &beastSwimSlash);
aiNewState(actor, NAME_beastSwimSlash);
else
{
aiPlay3DSound(actor, 9009 + Random(2), AI_SFX_PRIORITY_1, -1);
aiNewState(actor, &beastSwimAttack);
aiNewState(actor, NAME_beastSwimAttack);
}
}
}
else
aiNewState(actor, &beastSwimAttack);
aiNewState(actor, NAME_beastSwimAttack);
return;
}
aiNewState(actor, &beastSwimGoto);
aiNewState(actor, NAME_beastSwimGoto);
actor->SetTarget(nullptr);
}

View file

@ -72,7 +72,7 @@ void eelBiteSeqCallback(DBloodActor* actor)
*/
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &eelSearch);
aiNewState(actor, NAME_eelSearch);
return;
}
@ -99,7 +99,7 @@ static void eelThinkTarget(DBloodActor* actor)
actor->dudeExtra.thinkTime = 0;
actor->xspr.goalAng += DAngle45;
aiSetTarget(actor, actor->basePoint);
aiNewState(actor, &eelTurn);
aiNewState(actor, NAME_eelTurn);
return;
}
if (Chance(pDudeInfo->alertChance))
@ -153,7 +153,7 @@ static void eelThinkGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &eelSearch);
aiNewState(actor, NAME_eelSearch);
eelThinkTarget(actor);
}
@ -161,7 +161,7 @@ static void eelThinkPonder(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &eelSearch);
aiNewState(actor, NAME_eelSearch);
return;
}
assert(actor->IsDudeActor());
@ -174,7 +174,7 @@ static void eelThinkPonder(DBloodActor* actor)
aiChooseDirection(actor, nAngle);
if (target->xspr.health == 0)
{
aiNewState(actor, &eelSearch);
aiNewState(actor, NAME_eelSearch);
return;
}
@ -189,25 +189,25 @@ static void eelThinkPonder(DBloodActor* actor)
{
aiSetTarget(actor, actor->GetTarget());
if (height2 - height < -0x20 && nDist < 0x180 && nDist > 0xc0 && nDeltaAngle < DAngle15)
aiNewState(actor, &eelDodgeUp);
aiNewState(actor, NAME_eelDodgeUp);
else if (height2 - height > 12.8 && nDist < 0x180 && nDist > 0xc0 && nDeltaAngle < DAngle15)
aiNewState(actor, &eelDodgeDown);
aiNewState(actor, NAME_eelDodgeDown);
else if (height2 - height < 12.8 && nDist < 57.5625 && nDeltaAngle < DAngle15)
aiNewState(actor, &eelDodgeUp);
aiNewState(actor, NAME_eelDodgeUp);
else if (height2 - height > 12.8 && nDist < 0x140 && nDist > 0x80 && nDeltaAngle < DAngle15)
aiNewState(actor, &eelDodgeDown);
aiNewState(actor, NAME_eelDodgeDown);
else if (height2 - height < -0x20 && nDist < 0x140 && nDist > 0x80 && nDeltaAngle < DAngle15)
aiNewState(actor, &eelDodgeUp);
aiNewState(actor, NAME_eelDodgeUp);
else if (height2 - height < -0x20 && nDeltaAngle < DAngle15 && nDist > 0x140)
aiNewState(actor, &eelDodgeUp);
aiNewState(actor, NAME_eelDodgeUp);
else if (height2 - height > 12.8)
aiNewState(actor, &eelDodgeDown);
aiNewState(actor, NAME_eelDodgeDown);
else
aiNewState(actor, &eelDodgeUp);
aiNewState(actor, NAME_eelDodgeUp);
return;
}
}
aiNewState(actor, &eelGoto);
aiNewState(actor, NAME_eelGoto);
actor->SetTarget(nullptr);
}
@ -251,7 +251,7 @@ static void eelThinkChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &eelGoto);
aiNewState(actor, NAME_eelGoto);
return;
}
assert(actor->IsDudeActor());
@ -264,12 +264,12 @@ static void eelThinkChase(DBloodActor* actor)
aiChooseDirection(actor, nAngle);
if (target->xspr.health == 0)
{
aiNewState(actor, &eelSearch);
aiNewState(actor, NAME_eelSearch);
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
aiNewState(actor, &eelSearch);
aiNewState(actor, NAME_eelSearch);
return;
}
@ -288,20 +288,20 @@ static void eelThinkChase(DBloodActor* actor)
{
aiSetTarget(actor, actor->GetTarget());
if (nDist < 57.5625 && top2 > top && nDeltaAngle < DAngle15)
aiNewState(actor, &eelSwoop);
aiNewState(actor, NAME_eelSwoop);
else if (nDist <= 57.5625 && nDeltaAngle < DAngle15)
aiNewState(actor, &eelBite);
aiNewState(actor, NAME_eelBite);
else if (bottom2 > top && nDeltaAngle < DAngle15)
aiNewState(actor, &eelSwoop);
aiNewState(actor, NAME_eelSwoop);
else if (top2 < top && nDeltaAngle < DAngle15)
aiNewState(actor, &eelFly);
aiNewState(actor, NAME_eelFly);
}
}
return;
}
actor->SetTarget(nullptr);
aiNewState(actor, &eelSearch);
aiNewState(actor, NAME_eelSearch);
}
static void eelMoveForward(DBloodActor* actor)
@ -378,7 +378,7 @@ void eelMoveToCeil(DBloodActor* actor)
actor->dudeExtra.active = 0;
actor->spr.flags = 0;
aiNewState(actor, &eelIdle);
aiNewState(actor, NAME_eelIdle);
}
else
aiSetTarget(actor, DVector3(actor->spr.pos.XY(), actor->sector()->ceilingz));

View file

@ -93,26 +93,26 @@ static void burnThinkGoto(DBloodActor* actor)
switch (actor->GetType())
{
case kDudeBurningCultist:
aiNewState(actor, &cultistBurnSearch);
aiNewState(actor, NAME_cultistBurnSearch);
break;
case kDudeBurningZombieAxe:
aiNewState(actor, &zombieABurnSearch);
aiNewState(actor, NAME_zombieABurnSearch);
break;
case kDudeBurningZombieButcher:
aiNewState(actor, &zombieFBurnSearch);
aiNewState(actor, NAME_zombieFBurnSearch);
break;
case kDudeBurningInnocent:
aiNewState(actor, &innocentBurnSearch);
aiNewState(actor, NAME_innocentBurnSearch);
break;
case kDudeBurningBeast:
aiNewState(actor, &beastBurnSearch);
aiNewState(actor, NAME_beastBurnSearch);
break;
case kDudeBurningTinyCaleb:
aiNewState(actor, &tinycalebBurnSearch);
aiNewState(actor, NAME_tinycalebBurnSearch);
break;
#ifdef NOONE_EXTENSIONS
case kDudeModernCustomBurning:
aiNewState(actor, &genDudeBurnSearch);
aiNewState(actor, NAME_genDudeBurnSearch);
break;
#endif
}
@ -127,26 +127,26 @@ static void burnThinkChase(DBloodActor* actor)
switch (actor->GetType())
{
case kDudeBurningCultist:
aiNewState(actor, &cultistBurnGoto);
aiNewState(actor, NAME_cultistBurnGoto);
break;
case kDudeBurningZombieAxe:
aiNewState(actor, &zombieABurnGoto);
aiNewState(actor, NAME_zombieABurnGoto);
break;
case kDudeBurningZombieButcher:
aiNewState(actor, &zombieFBurnGoto);
aiNewState(actor, NAME_zombieFBurnGoto);
break;
case kDudeBurningInnocent:
aiNewState(actor, &innocentBurnGoto);
aiNewState(actor, NAME_innocentBurnGoto);
break;
case kDudeBurningBeast:
aiNewState(actor, &beastBurnGoto);
aiNewState(actor, NAME_beastBurnGoto);
break;
case kDudeBurningTinyCaleb:
aiNewState(actor, &tinycalebBurnGoto);
aiNewState(actor, NAME_tinycalebBurnGoto);
break;
#ifdef NOONE_EXTENSIONS
case kDudeModernCustomBurning:
aiNewState(actor, &genDudeBurnGoto);
aiNewState(actor, NAME_genDudeBurnGoto);
break;
#endif
}
@ -166,26 +166,26 @@ static void burnThinkChase(DBloodActor* actor)
switch (actor->GetType())
{
case kDudeBurningCultist:
aiNewState(actor, &cultistBurnSearch);
aiNewState(actor, NAME_cultistBurnSearch);
break;
case kDudeBurningZombieAxe:
aiNewState(actor, &zombieABurnSearch);
aiNewState(actor, NAME_zombieABurnSearch);
break;
case kDudeBurningZombieButcher:
aiNewState(actor, &zombieFBurnSearch);
aiNewState(actor, NAME_zombieFBurnSearch);
break;
case kDudeBurningInnocent:
aiNewState(actor, &innocentBurnSearch);
aiNewState(actor, NAME_innocentBurnSearch);
break;
case kDudeBurningBeast:
aiNewState(actor, &beastBurnSearch);
aiNewState(actor, NAME_beastBurnSearch);
break;
case kDudeBurningTinyCaleb:
aiNewState(actor, &tinycalebBurnSearch);
aiNewState(actor, NAME_tinycalebBurnSearch);
break;
#ifdef NOONE_EXTENSIONS
case kDudeModernCustomBurning:
aiNewState(actor, &genDudeBurnSearch);
aiNewState(actor, NAME_genDudeBurnSearch);
break;
#endif
}
@ -206,26 +206,26 @@ static void burnThinkChase(DBloodActor* actor)
switch (actor->GetType())
{
case kDudeBurningCultist:
aiNewState(actor, &cultistBurnAttack);
aiNewState(actor, NAME_cultistBurnAttack);
break;
case kDudeBurningZombieAxe:
aiNewState(actor, &zombieABurnAttack);
aiNewState(actor, NAME_zombieABurnAttack);
break;
case kDudeBurningZombieButcher:
aiNewState(actor, &zombieFBurnAttack);
aiNewState(actor, NAME_zombieFBurnAttack);
break;
case kDudeBurningInnocent:
aiNewState(actor, &innocentBurnAttack);
aiNewState(actor, NAME_innocentBurnAttack);
break;
case kDudeBurningBeast:
aiNewState(actor, &beastBurnAttack);
aiNewState(actor, NAME_beastBurnAttack);
break;
case kDudeBurningTinyCaleb:
aiNewState(actor, &tinycalebBurnAttack);
aiNewState(actor, NAME_tinycalebBurnAttack);
break;
#ifdef NOONE_EXTENSIONS
case kDudeModernCustomBurning:
aiNewState(actor, &genDudeBurnSearch);
aiNewState(actor, NAME_genDudeBurnSearch);
break;
#endif
}
@ -238,26 +238,26 @@ static void burnThinkChase(DBloodActor* actor)
switch (actor->GetType())
{
case kDudeBurningCultist:
aiNewState(actor, &cultistBurnGoto);
aiNewState(actor, NAME_cultistBurnGoto);
break;
case kDudeBurningZombieAxe:
aiNewState(actor, &zombieABurnGoto);
aiNewState(actor, NAME_zombieABurnGoto);
break;
case 242:
aiNewState(actor, &zombieFBurnGoto);
aiNewState(actor, NAME_zombieFBurnGoto);
break;
case kDudeBurningInnocent:
aiNewState(actor, &innocentBurnGoto);
aiNewState(actor, NAME_innocentBurnGoto);
break;
case kDudeBurningBeast:
aiNewState(actor, &beastBurnGoto);
aiNewState(actor, NAME_beastBurnGoto);
break;
case kDudeBurningTinyCaleb:
aiNewState(actor, &tinycalebBurnGoto);
aiNewState(actor, NAME_tinycalebBurnGoto);
break;
#ifdef NOONE_EXTENSIONS
case kDudeModernCustomBurning:
aiNewState(actor, &genDudeBurnSearch);
aiNewState(actor, NAME_genDudeBurnSearch);
break;
#endif
}

View file

@ -100,9 +100,9 @@ static void calebThinkGoto(DBloodActor* actor)
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &tinycalebSwimSearch);
aiNewState(actor, NAME_tinycalebSwimSearch);
else
aiNewState(actor, &tinycalebSearch);
aiNewState(actor, NAME_tinycalebSearch);
}
aiThinkTarget(actor);
}
@ -115,9 +115,9 @@ static void calebThinkChase(DBloodActor* actor)
if (actor->GetTarget() == nullptr)
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &tinycalebSwimSearch);
aiNewState(actor, NAME_tinycalebSwimSearch);
else
aiNewState(actor, &tinycalebSearch);
aiNewState(actor, NAME_tinycalebSearch);
return;
}
assert(actor->IsDudeActor());
@ -132,20 +132,20 @@ static void calebThinkChase(DBloodActor* actor)
if (target->xspr.health == 0)
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &tinycalebSwimSearch);
aiNewState(actor, NAME_tinycalebSwimSearch);
else
{
aiPlay3DSound(actor, 11000 + Random(4), AI_SFX_PRIORITY_1, -1);
aiNewState(actor, &tinycalebSearch);
aiNewState(actor, NAME_tinycalebSearch);
}
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &tinycalebSwimSearch);
aiNewState(actor, NAME_tinycalebSwimSearch);
else
aiNewState(actor, &tinycalebSearch);
aiNewState(actor, NAME_tinycalebSearch);
return;
}
@ -166,31 +166,31 @@ static void calebThinkChase(DBloodActor* actor)
{
case -1:
if (pXSector && pXSector->Underwater)
aiNewState(actor, &tinycalebSwimAttack);
aiNewState(actor, NAME_tinycalebSwimAttack);
else
aiNewState(actor, &tinycalebAttack);
aiNewState(actor, NAME_tinycalebAttack);
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType())
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &tinycalebSwimAttack);
aiNewState(actor, NAME_tinycalebSwimAttack);
else
aiNewState(actor, &tinycalebAttack);
aiNewState(actor, NAME_tinycalebAttack);
}
else
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &tinycalebSwimDodge);
aiNewState(actor, NAME_tinycalebSwimDodge);
else
aiNewState(actor, &tinycalebDodge);
aiNewState(actor, NAME_tinycalebDodge);
}
break;
default:
if (pXSector && pXSector->Underwater)
aiNewState(actor, &tinycalebSwimAttack);
aiNewState(actor, NAME_tinycalebSwimAttack);
else
aiNewState(actor, &tinycalebAttack);
aiNewState(actor, NAME_tinycalebAttack);
break;
}
}
@ -200,9 +200,9 @@ static void calebThinkChase(DBloodActor* actor)
}
if (pXSector && pXSector->Underwater)
aiNewState(actor, &tinycalebSwimGoto);
aiNewState(actor, NAME_tinycalebSwimGoto);
else
aiNewState(actor, &tinycalebGoto);
aiNewState(actor, NAME_tinycalebGoto);
if (Chance(0x2000))
sfxPlay3DSound(actor, 10000 + Random(5), -1, 0);
actor->SetTarget(nullptr);
@ -217,7 +217,7 @@ static void calebThinkSwimGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &tinycalebSwimSearch);
aiNewState(actor, NAME_tinycalebSwimSearch);
aiThinkTarget(actor);
}
@ -225,7 +225,7 @@ static void calebThinkSwimChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &tinycalebSwimGoto);
aiNewState(actor, NAME_tinycalebSwimGoto);
return;
}
assert(actor->IsDudeActor());
@ -239,12 +239,12 @@ static void calebThinkSwimChase(DBloodActor* actor)
if (target->xspr.health == 0)
{
aiNewState(actor, &tinycalebSwimSearch);
aiNewState(actor, NAME_tinycalebSwimSearch);
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
aiNewState(actor, &tinycalebSwimSearch);
aiNewState(actor, NAME_tinycalebSwimSearch);
return;
}
@ -259,16 +259,16 @@ static void calebThinkSwimChase(DBloodActor* actor)
{
aiSetTarget(actor, actor->GetTarget());
if (nDist < 0x40 && abs(nDeltaAngle) < DAngle15)
aiNewState(actor, &tinycalebSwimAttack);
aiNewState(actor, NAME_tinycalebSwimAttack);
else
aiNewState(actor, &tinycalebSwimMoveIn);
aiNewState(actor, NAME_tinycalebSwimMoveIn);
}
}
else
aiNewState(actor, &tinycalebSwimMoveIn);
aiNewState(actor, NAME_tinycalebSwimMoveIn);
return;
}
aiNewState(actor, &tinycalebSwimGoto);
aiNewState(actor, NAME_tinycalebSwimGoto);
actor->SetTarget(nullptr);
}

View file

@ -228,9 +228,9 @@ static void cerberusThinkTarget(DBloodActor* actor)
actor->xspr.goalAng += DAngle45;
aiSetTarget(actor, actor->basePoint);
if (actor->GetType() == kDudeCerberusTwoHead)
aiNewState(actor, &cerberusTurn1);
aiNewState(actor, NAME_cerberusTurn1);
else
aiNewState(actor, &cerberusTurn2);
aiNewState(actor, NAME_cerberusTurn2);
return;
}
if (Chance(pDudeInfo->alertChance))
@ -284,10 +284,10 @@ static void cerberusThinkGoto(DBloodActor* actor)
{
switch (actor->GetType()) {
case kDudeCerberusTwoHead:
aiNewState(actor, &cerberusSearch);
aiNewState(actor, NAME_cerberusSearch);
break;
case kDudeCerberusOneHead:
aiNewState(actor, &cerberus2Search);
aiNewState(actor, NAME_cerberus2Search);
break;
}
}
@ -299,10 +299,10 @@ static void cerberusThinkChase(DBloodActor* actor)
if (actor->GetTarget() == nullptr) {
switch (actor->GetType()) {
case kDudeCerberusTwoHead:
aiNewState(actor, &cerberusGoto);
aiNewState(actor, NAME_cerberusGoto);
break;
case kDudeCerberusOneHead:
aiNewState(actor, &cerberus2Goto);
aiNewState(actor, NAME_cerberus2Goto);
break;
}
return;
@ -327,10 +327,10 @@ static void cerberusThinkChase(DBloodActor* actor)
if (target->xspr.health == 0) {
switch (actor->GetType()) {
case kDudeCerberusTwoHead:
aiNewState(actor, &cerberusSearch);
aiNewState(actor, NAME_cerberusSearch);
break;
case kDudeCerberusOneHead:
aiNewState(actor, &cerberus2Search);
aiNewState(actor, NAME_cerberus2Search);
break;
}
return;
@ -339,10 +339,10 @@ static void cerberusThinkChase(DBloodActor* actor)
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0) {
switch (actor->GetType()) {
case kDudeCerberusTwoHead:
aiNewState(actor, &cerberusSearch);
aiNewState(actor, NAME_cerberusSearch);
break;
case kDudeCerberusOneHead:
aiNewState(actor, &cerberus2Search);
aiNewState(actor, NAME_cerberus2Search);
break;
}
return;
@ -363,10 +363,10 @@ static void cerberusThinkChase(DBloodActor* actor)
{
switch (actor->GetType()) {
case kDudeCerberusTwoHead:
aiNewState(actor, &cerberusBurn);
aiNewState(actor, NAME_cerberusBurn);
break;
case kDudeCerberusOneHead:
aiNewState(actor, &cerberus2Burn);
aiNewState(actor, NAME_cerberus2Burn);
break;
}
}
@ -375,10 +375,10 @@ static void cerberusThinkChase(DBloodActor* actor)
{
switch (actor->GetType()) {
case kDudeCerberusTwoHead:
aiNewState(actor, &cerberus3Burn);
aiNewState(actor, NAME_cerberus3Burn);
break;
case kDudeCerberusOneHead:
aiNewState(actor, &cerberus4Burn);
aiNewState(actor, NAME_cerberus4Burn);
break;
}
}
@ -389,34 +389,34 @@ static void cerberusThinkChase(DBloodActor* actor)
case kDudeCerberusTwoHead:
switch (hit) {
case -1:
aiNewState(actor, &cerberusBite);
aiNewState(actor, NAME_cerberusBite);
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType() && gHitInfo.actor()->GetType() != kDudeHellHound)
aiNewState(actor, &cerberusBite);
aiNewState(actor, NAME_cerberusBite);
break;
case 0:
case 4:
break;
default:
aiNewState(actor, &cerberusBite);
aiNewState(actor, NAME_cerberusBite);
break;
}
break;
case kDudeCerberusOneHead:
switch (hit) {
case -1:
aiNewState(actor, &cerberus2Bite);
aiNewState(actor, NAME_cerberus2Bite);
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType() && gHitInfo.actor()->GetType() != kDudeHellHound)
aiNewState(actor, &cerberus2Bite);
aiNewState(actor, NAME_cerberus2Bite);
break;
case 0:
case 4:
break;
default:
aiNewState(actor, &cerberus2Bite);
aiNewState(actor, NAME_cerberus2Bite);
break;
}
break;
@ -429,10 +429,10 @@ static void cerberusThinkChase(DBloodActor* actor)
switch (actor->GetType()) {
case kDudeCerberusTwoHead:
aiNewState(actor, &cerberusGoto);
aiNewState(actor, NAME_cerberusGoto);
break;
case kDudeCerberusOneHead:
aiNewState(actor, &cerberus2Goto);
aiNewState(actor, NAME_cerberus2Goto);
break;
}
actor->SetTarget(nullptr);

View file

@ -193,11 +193,11 @@ static void cultThinkGoto(DBloodActor* actor)
switch (actor->xspr.medium)
{
case kMediumNormal:
aiNewState(actor, &cultistSearch);
aiNewState(actor, NAME_cultistSearch);
break;
case kMediumWater:
case kMediumGoo:
aiNewState(actor, &cultistSwimSearch);
aiNewState(actor, NAME_cultistSwimSearch);
break;
}
}
@ -211,11 +211,11 @@ static void cultThinkChase(DBloodActor* actor)
switch (actor->xspr.medium)
{
case kMediumNormal:
aiNewState(actor, &cultistGoto);
aiNewState(actor, NAME_cultistGoto);
break;
case kMediumWater:
case kMediumGoo:
aiNewState(actor, &cultistSwimGoto);
aiNewState(actor, NAME_cultistSwimGoto);
break;
}
return;
@ -234,7 +234,7 @@ static void cultThinkChase(DBloodActor* actor)
switch (actor->xspr.medium)
{
case kMediumNormal:
aiNewState(actor, &cultistSearch);
aiNewState(actor, NAME_cultistSearch);
if (actor->GetType() == kDudeCultistTommy)
aiPlay3DSound(actor, 4021 + Random(4), AI_SFX_PRIORITY_1, -1);
else
@ -242,7 +242,7 @@ static void cultThinkChase(DBloodActor* actor)
break;
case kMediumWater:
case kMediumGoo:
aiNewState(actor, &cultistSwimSearch);
aiNewState(actor, NAME_cultistSwimSearch);
break;
}
return;
@ -252,11 +252,11 @@ static void cultThinkChase(DBloodActor* actor)
switch (actor->xspr.medium)
{
case kMediumNormal:
aiNewState(actor, &cultistSearch);
aiNewState(actor, NAME_cultistSearch);
break;
case kMediumWater:
case kMediumGoo:
aiNewState(actor, &cultistSwimSearch);
aiNewState(actor, NAME_cultistSwimSearch);
break;
}
return;
@ -283,17 +283,17 @@ static void cultThinkChase(DBloodActor* actor)
{
case -1:
if (actor->xspr.medium != kMediumWater && actor->xspr.medium != kMediumGoo)
aiNewState(actor, &cultistTThrow);
aiNewState(actor, NAME_cultistTThrow);
break;
case 0:
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, &cultistTThrow);
aiNewState(actor, NAME_cultistTThrow);
break;
default:
aiNewState(actor, &cultistTThrow);
aiNewState(actor, NAME_cultistTThrow);
break;
}
}
@ -304,39 +304,39 @@ static void cultThinkChase(DBloodActor* actor)
{
case -1:
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistTFire);
aiNewState(actor, NAME_cultistTFire);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistTProneFire);
aiNewState(actor, NAME_cultistTProneFire);
else if (dudeIsPlayingSeq(actor, 13) && (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo))
aiNewState(actor, &cultistTSwimFire);
aiNewState(actor, NAME_cultistTSwimFire);
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType() && gHitInfo.actor()->GetType() != kDudeCultistShotgun)
{
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistTFire);
aiNewState(actor, NAME_cultistTFire);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistTProneFire);
aiNewState(actor, NAME_cultistTProneFire);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistTSwimFire);
aiNewState(actor, NAME_cultistTSwimFire);
}
else
{
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistDodge);
aiNewState(actor, NAME_cultistDodge);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistProneDodge);
aiNewState(actor, NAME_cultistProneDodge);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistSwimDodge);
aiNewState(actor, NAME_cultistSwimDodge);
}
break;
default:
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistTFire);
aiNewState(actor, NAME_cultistTFire);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistTProneFire);
aiNewState(actor, NAME_cultistTProneFire);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistTSwimFire);
aiNewState(actor, NAME_cultistTSwimFire);
break;
}
}
@ -351,17 +351,17 @@ static void cultThinkChase(DBloodActor* actor)
{
case -1:
if (actor->xspr.medium != kMediumWater && actor->xspr.medium != kMediumGoo)
aiNewState(actor, &cultistSThrow);
aiNewState(actor, NAME_cultistSThrow);
break;
case 0:
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, &cultistSThrow);
aiNewState(actor, NAME_cultistSThrow);
break;
default:
aiNewState(actor, &cultistSThrow);
aiNewState(actor, NAME_cultistSThrow);
break;
}
}
@ -372,39 +372,39 @@ static void cultThinkChase(DBloodActor* actor)
{
case -1:
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistSFire);
aiNewState(actor, NAME_cultistSFire);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistSProneFire);
aiNewState(actor, NAME_cultistSProneFire);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistSSwimFire);
aiNewState(actor, NAME_cultistSSwimFire);
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType() && gHitInfo.actor()->GetType() != kDudeCultistTommy)
{
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistSFire);
aiNewState(actor, NAME_cultistSFire);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistSProneFire);
aiNewState(actor, NAME_cultistSProneFire);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistSSwimFire);
aiNewState(actor, NAME_cultistSSwimFire);
}
else
{
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistDodge);
aiNewState(actor, NAME_cultistDodge);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistProneDodge);
aiNewState(actor, NAME_cultistProneDodge);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistSwimDodge);
aiNewState(actor, NAME_cultistSwimDodge);
}
break;
default:
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistSFire);
aiNewState(actor, NAME_cultistSFire);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistSProneFire);
aiNewState(actor, NAME_cultistSProneFire);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistSSwimFire);
aiNewState(actor, NAME_cultistSSwimFire);
break;
}
}
@ -419,61 +419,61 @@ static void cultThinkChase(DBloodActor* actor)
{
case -1:
if (actor->xspr.medium != kMediumWater && actor->xspr.medium != kMediumGoo)
aiNewState(actor, &cultistTsThrow);
aiNewState(actor, NAME_cultistTsThrow);
break;
case 0:
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, &cultistTsThrow);
aiNewState(actor, NAME_cultistTsThrow);
break;
default:
aiNewState(actor, &cultistTsThrow);
aiNewState(actor, NAME_cultistTsThrow);
break;
}
}
else if (nDist < 0x320 && nDeltaAngle < DAngle1 * 5)
{
AISTATE *pCultistTsProneFire = !cl_bloodvanillaenemies && !VanillaMode() ? &cultistTsProneFireFixed : &cultistTsProneFire;
FName pCultistTsProneFire = !cl_bloodvanillaenemies && !VanillaMode() ? NAME_cultistTsProneFireFixed : NAME_cultistTsProneFire;
int hit = HitScan(actor, actor->spr.pos.Z, DVector3(dvec.XY(), 0), CLIPMASK1, 0);
switch (hit)
{
case -1:
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistTsFire);
aiNewState(actor, NAME_cultistTsFire);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, pCultistTsProneFire);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistTsSwimFire);
aiNewState(actor, NAME_cultistTsSwimFire);
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType() && gHitInfo.actor()->GetType() != kDudeCultistTommy)
{
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistTsFire);
aiNewState(actor, NAME_cultistTsFire);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, pCultistTsProneFire);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistTsSwimFire);
aiNewState(actor, NAME_cultistTsSwimFire);
}
else
{
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistDodge);
aiNewState(actor, NAME_cultistDodge);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistProneDodge);
aiNewState(actor, NAME_cultistProneDodge);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistSwimDodge);
aiNewState(actor, NAME_cultistSwimDodge);
}
break;
default:
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistTsFire);
aiNewState(actor, NAME_cultistTsFire);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, pCultistTsProneFire);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistTsSwimFire);
aiNewState(actor, NAME_cultistTsSwimFire);
break;
}
}
@ -486,16 +486,16 @@ static void cultThinkChase(DBloodActor* actor)
{
case -1:
if (actor->xspr.medium != kMediumWater && actor->xspr.medium != kMediumGoo)
aiNewState(actor, &cultistDThrow);
aiNewState(actor, NAME_cultistDThrow);
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, &cultistDThrow);
aiNewState(actor, NAME_cultistDThrow);
break;
default:
aiNewState(actor, &cultistDThrow);
aiNewState(actor, NAME_cultistDThrow);
break;
}
}
@ -506,16 +506,16 @@ static void cultThinkChase(DBloodActor* actor)
{
case -1:
if (actor->xspr.medium != 1 && actor->xspr.medium != kMediumGoo)
aiNewState(actor, &cultistDThrow2);
aiNewState(actor, NAME_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, &cultistDThrow2);
aiNewState(actor, NAME_cultistDThrow2);
break;
default:
aiNewState(actor, &cultistDThrow2);
aiNewState(actor, NAME_cultistDThrow2);
break;
}
}
@ -530,17 +530,17 @@ static void cultThinkChase(DBloodActor* actor)
{
case -1:
if (actor->xspr.medium != kMediumWater && actor->xspr.medium != kMediumGoo)
aiNewState(actor, &cultistSThrow);
aiNewState(actor, NAME_cultistSThrow);
break;
case 0:
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, &cultistSThrow);
aiNewState(actor, NAME_cultistSThrow);
break;
default:
aiNewState(actor, &cultistSThrow);
aiNewState(actor, NAME_cultistSThrow);
break;
}
}
@ -551,39 +551,39 @@ static void cultThinkChase(DBloodActor* actor)
{
case -1:
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistSFire);
aiNewState(actor, NAME_cultistSFire);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistSProneFire);
aiNewState(actor, NAME_cultistSProneFire);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistSSwimFire);
aiNewState(actor, NAME_cultistSSwimFire);
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType() && gHitInfo.actor()->GetType() != kDudeCultistTommy)
{
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistSFire);
aiNewState(actor, NAME_cultistSFire);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistSProneFire);
aiNewState(actor, NAME_cultistSProneFire);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistSSwimFire);
aiNewState(actor, NAME_cultistSSwimFire);
}
else
{
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistDodge);
aiNewState(actor, NAME_cultistDodge);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistProneDodge);
aiNewState(actor, NAME_cultistProneDodge);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistSwimDodge);
aiNewState(actor, NAME_cultistSwimDodge);
}
break;
default:
if (!dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistSFire);
aiNewState(actor, NAME_cultistSFire);
else if (dudeIsPlayingSeq(actor, 14) && actor->xspr.medium == kMediumNormal)
aiNewState(actor, &cultistSProneFire);
aiNewState(actor, NAME_cultistSProneFire);
else if (actor->xspr.medium == kMediumWater || actor->xspr.medium == kMediumGoo)
aiNewState(actor, &cultistSSwimFire);
aiNewState(actor, NAME_cultistSSwimFire);
break;
}
}
@ -596,11 +596,11 @@ static void cultThinkChase(DBloodActor* actor)
switch (actor->xspr.medium)
{
case kMediumNormal:
aiNewState(actor, &cultistGoto);
aiNewState(actor, NAME_cultistGoto);
break;
case kMediumWater:
case kMediumGoo:
aiNewState(actor, &cultistSwimGoto);
aiNewState(actor, NAME_cultistSwimGoto);
break;
}
actor->SetTarget(nullptr);

View file

@ -187,7 +187,7 @@ static void gargThinkTarget(DBloodActor* actor)
{
actor->xspr.goalAng += DAngle45;
aiSetTarget(actor, actor->basePoint);
aiNewState(actor, &gargoyleTurn);
aiNewState(actor, NAME_gargoyleTurn);
return;
}
if (Chance(pDudeInfo->alertChance))
@ -244,7 +244,7 @@ static void gargThinkGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &gargoyleFSearch);
aiNewState(actor, NAME_gargoyleFSearch);
aiThinkTarget(actor);
}
@ -294,7 +294,7 @@ static void gargThinkChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &gargoyleFGoto);
aiNewState(actor, NAME_gargoyleFGoto);
return;
}
///assert(actor->IsDudeActor());
@ -310,12 +310,12 @@ static void gargThinkChase(DBloodActor* actor)
aiChooseDirection(actor, dxyAngle);
if (target->xspr.health == 0)
{
aiNewState(actor, &gargoyleFSearch);
aiNewState(actor, NAME_gargoyleFSearch);
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
aiNewState(actor, &gargoyleFSearch);
aiNewState(actor, NAME_gargoyleFSearch);
return;
}
double nDist = dxy.Length();
@ -346,7 +346,7 @@ static void gargThinkChase(DBloodActor* actor)
{
case -1:
sfxPlay3DSound(actor, 1408, 0, 0);
aiNewState(actor, &gargoyleFThrow);
aiNewState(actor, NAME_gargoyleFThrow);
break;
case 0:
case 4:
@ -355,12 +355,12 @@ static void gargThinkChase(DBloodActor* actor)
if (actor->GetType() != gHitInfo.actor()->GetType() && gHitInfo.actor()->GetType() != kDudeGargoyleStone)
{
sfxPlay3DSound(actor, 1408, 0, 0);
aiNewState(actor, &gargoyleFThrow);
aiNewState(actor, NAME_gargoyleFThrow);
}
break;
default:
sfxPlay3DSound(actor, 1408, 0, 0);
aiNewState(actor, &gargoyleFThrow);
aiNewState(actor, NAME_gargoyleFThrow);
break;
}
}
@ -371,7 +371,7 @@ static void gargThinkChase(DBloodActor* actor)
{
case -1:
sfxPlay3DSound(actor, 1406, 0, 0);
aiNewState(actor, &gargoyleFSlash);
aiNewState(actor, NAME_gargoyleFSlash);
break;
case 0:
case 4:
@ -380,19 +380,19 @@ static void gargThinkChase(DBloodActor* actor)
if (actor->GetType() != gHitInfo.actor()->GetType() && gHitInfo.actor()->GetType() != kDudeGargoyleStone)
{
sfxPlay3DSound(actor, 1406, 0, 0);
aiNewState(actor, &gargoyleFSlash);
aiNewState(actor, NAME_gargoyleFSlash);
}
break;
default:
sfxPlay3DSound(actor, 1406, 0, 0);
aiNewState(actor, &gargoyleFSlash);
aiNewState(actor, NAME_gargoyleFSlash);
break;
}
}
else if ((heightDelta > 32 || floorDelta > 32) && nDist < 0x140 && nDist > 0xa0)
{
aiPlay3DSound(actor, 1400, AI_SFX_PRIORITY_1, -1);
aiNewState(actor, &gargoyleSwoop);
aiNewState(actor, NAME_gargoyleSwoop);
}
else if ((heightDelta < 32 || floorDelta < 32) && angWithinRange)
aiPlay3DSound(actor, 1400, AI_SFX_PRIORITY_1, -1);
@ -405,7 +405,7 @@ static void gargThinkChase(DBloodActor* actor)
{
case -1:
sfxPlay3DSound(actor, 1457, 0, 0);
aiNewState(actor, &gargoyleSBlast);
aiNewState(actor, NAME_gargoyleSBlast);
break;
case 0:
case 4:
@ -414,12 +414,12 @@ static void gargThinkChase(DBloodActor* actor)
if (actor->GetType() != gHitInfo.actor()->GetType() && gHitInfo.actor()->GetType() != kDudeGargoyleFlesh)
{
sfxPlay3DSound(actor, 1457, 0, 0);
aiNewState(actor, &gargoyleSBlast);
aiNewState(actor, NAME_gargoyleSBlast);
}
break;
default:
sfxPlay3DSound(actor, 1457, 0, 0);
aiNewState(actor, &gargoyleSBlast);
aiNewState(actor, NAME_gargoyleSBlast);
break;
}
}
@ -429,17 +429,17 @@ static void gargThinkChase(DBloodActor* actor)
switch (hit)
{
case -1:
aiNewState(actor, &gargoyleFSlash);
aiNewState(actor, NAME_gargoyleFSlash);
break;
case 0:
case 4:
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType() && gHitInfo.actor()->GetType() != kDudeGargoyleFlesh)
aiNewState(actor, &gargoyleFSlash);
aiNewState(actor, NAME_gargoyleFSlash);
break;
default:
aiNewState(actor, &gargoyleFSlash);
aiNewState(actor, NAME_gargoyleFSlash);
break;
}
}
@ -449,7 +449,7 @@ static void gargThinkChase(DBloodActor* actor)
aiPlay3DSound(actor, 1400, AI_SFX_PRIORITY_1, -1);
else
aiPlay3DSound(actor, 1450, AI_SFX_PRIORITY_1, -1);
aiNewState(actor, &gargoyleSwoop);
aiNewState(actor, NAME_gargoyleSwoop);
}
else if ((heightDelta < 32 || floorDelta < 32) && angWithinRange)
aiPlay3DSound(actor, 1450, AI_SFX_PRIORITY_1, -1);
@ -460,12 +460,12 @@ static void gargThinkChase(DBloodActor* actor)
}
else
{
aiNewState(actor, &gargoyleFly);
aiNewState(actor, NAME_gargoyleFly);
return;
}
}
aiNewState(actor, &gargoyleFGoto);
aiNewState(actor, NAME_gargoyleFGoto);
actor->SetTarget(nullptr);
}

View file

@ -168,7 +168,7 @@ static void ghostThinkTarget(DBloodActor* actor)
{
actor->xspr.goalAng += DAngle45;
aiSetTarget(actor, actor->basePoint);
aiNewState(actor, &ghostTurn);
aiNewState(actor, NAME_ghostTurn);
return;
}
if (Chance(pDudeInfo->alertChance))
@ -224,7 +224,7 @@ static void ghostThinkGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &ghostSearch);
aiNewState(actor, NAME_ghostSearch);
aiThinkTarget(actor);
}
@ -273,7 +273,7 @@ static void ghostThinkChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &ghostGoto);
aiNewState(actor, NAME_ghostGoto);
return;
}
///assert(actor->IsDudeActor());
@ -289,12 +289,12 @@ static void ghostThinkChase(DBloodActor* actor)
aiChooseDirection(actor, dxyAngle);
if (target->xspr.health == 0)
{
aiNewState(actor, &ghostSearch);
aiNewState(actor, NAME_ghostSearch);
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
aiNewState(actor, &ghostSearch);
aiNewState(actor, NAME_ghostSearch);
return;
}
double nDist = dxy.Length();
@ -322,17 +322,17 @@ static void ghostThinkChase(DBloodActor* actor)
switch (hit)
{
case -1:
aiNewState(actor, &ghostBlast);
aiNewState(actor, NAME_ghostBlast);
break;
case 0:
case 4:
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType() && gHitInfo.actor()->GetType() != kDudePhantasm)
aiNewState(actor, &ghostBlast);
aiNewState(actor, NAME_ghostBlast);
break;
default:
aiNewState(actor, &ghostBlast);
aiNewState(actor, NAME_ghostBlast);
break;
}
}
@ -342,24 +342,24 @@ static void ghostThinkChase(DBloodActor* actor)
switch (hit)
{
case -1:
aiNewState(actor, &ghostSlash);
aiNewState(actor, NAME_ghostSlash);
break;
case 0:
case 4:
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType() && gHitInfo.actor()->GetType() != kDudePhantasm)
aiNewState(actor, &ghostSlash);
aiNewState(actor, NAME_ghostSlash);
break;
default:
aiNewState(actor, &ghostSlash);
aiNewState(actor, NAME_ghostSlash);
break;
}
}
else if ((heightDelta > 32 || floorDelta > 32) && nDist < 0x140 && nDist > 0x80)
{
aiPlay3DSound(actor, 1600, AI_SFX_PRIORITY_1, -1);
aiNewState(actor, &ghostSwoop);
aiNewState(actor, NAME_ghostSwoop);
}
else if ((heightDelta < 32 || floorDelta < 32) &&angWithinRange)
aiPlay3DSound(actor, 1600, AI_SFX_PRIORITY_1, -1);
@ -370,12 +370,12 @@ static void ghostThinkChase(DBloodActor* actor)
}
else
{
aiNewState(actor, &ghostFly);
aiNewState(actor, NAME_ghostFly);
return;
}
}
aiNewState(actor, &ghostGoto);
aiNewState(actor, NAME_ghostGoto);
actor->SetTarget(nullptr);
}

View file

@ -90,9 +90,9 @@ static void gillThinkGoto(DBloodActor* actor)
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &gillBeastSwimSearch);
aiNewState(actor, NAME_gillBeastSwimSearch);
else
aiNewState(actor, &gillBeastSearch);
aiNewState(actor, NAME_gillBeastSearch);
}
aiThinkTarget(actor);
}
@ -105,9 +105,9 @@ static void gillThinkChase(DBloodActor* actor)
if (actor->GetTarget() == nullptr)
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &gillBeastSwimSearch);
aiNewState(actor, NAME_gillBeastSwimSearch);
else
aiNewState(actor, &gillBeastSearch);
aiNewState(actor, NAME_gillBeastSearch);
return;
}
assert(actor->IsDudeActor());
@ -120,17 +120,17 @@ static void gillThinkChase(DBloodActor* actor)
if (actor->xspr.health == 0)
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &gillBeastSwimSearch);
aiNewState(actor, NAME_gillBeastSwimSearch);
else
aiNewState(actor, &gillBeastSearch);
aiNewState(actor, NAME_gillBeastSearch);
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &gillBeastSwimSearch);
aiNewState(actor, NAME_gillBeastSwimSearch);
else
aiNewState(actor, &gillBeastSearch);
aiNewState(actor, NAME_gillBeastSearch);
return;
}
double nDist = dv.Length();
@ -151,31 +151,31 @@ static void gillThinkChase(DBloodActor* actor)
{
case -1:
if (pXSector && pXSector->Underwater)
aiNewState(actor, &gillBeastSwimBite);
aiNewState(actor, NAME_gillBeastSwimBite);
else
aiNewState(actor, &gillBeastBite);
aiNewState(actor, NAME_gillBeastBite);
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType())
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &gillBeastSwimBite);
aiNewState(actor, NAME_gillBeastSwimBite);
else
aiNewState(actor, &gillBeastBite);
aiNewState(actor, NAME_gillBeastBite);
}
else
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &gillBeastSwimDodge);
aiNewState(actor, NAME_gillBeastSwimDodge);
else
aiNewState(actor, &gillBeastDodge);
aiNewState(actor, NAME_gillBeastDodge);
}
break;
default:
if (pXSector && pXSector->Underwater)
aiNewState(actor, &gillBeastSwimBite);
aiNewState(actor, NAME_gillBeastSwimBite);
else
aiNewState(actor, &gillBeastBite);
aiNewState(actor, NAME_gillBeastBite);
break;
}
}
@ -185,9 +185,9 @@ static void gillThinkChase(DBloodActor* actor)
}
if (pXSector && pXSector->Underwater)
aiNewState(actor, &gillBeastSwimGoto);
aiNewState(actor, NAME_gillBeastSwimGoto);
else
aiNewState(actor, &gillBeastGoto);
aiNewState(actor, NAME_gillBeastGoto);
sfxPlay3DSound(actor, 1701, -1, 0);
actor->SetTarget(nullptr);
}
@ -201,7 +201,7 @@ static void gillThinkSwimGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &gillBeastSwimSearch);
aiNewState(actor, NAME_gillBeastSwimSearch);
aiThinkTarget(actor);
}
@ -209,7 +209,7 @@ static void gillThinkSwimChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &gillBeastSwimSearch);
aiNewState(actor, NAME_gillBeastSwimSearch);
return;
}
assert(actor->IsDudeActor());
@ -223,12 +223,12 @@ static void gillThinkSwimChase(DBloodActor* actor)
if (actor->xspr.health == 0)
{
aiNewState(actor, &gillBeastSwimSearch);
aiNewState(actor, NAME_gillBeastSwimSearch);
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
aiNewState(actor, &gillBeastSwimSearch);
aiNewState(actor, NAME_gillBeastSwimSearch);
return;
}
@ -244,19 +244,19 @@ static void gillThinkSwimChase(DBloodActor* actor)
{
aiSetTarget(actor, actor->GetTarget());
if (nDist < 0x40 && nDeltaAngle < DAngle15)
aiNewState(actor, &gillBeastSwimBite);
aiNewState(actor, NAME_gillBeastSwimBite);
else
{
aiPlay3DSound(actor, 1700, AI_SFX_PRIORITY_1, -1);
aiNewState(actor, &gillBeastSwimMoveIn);
aiNewState(actor, NAME_gillBeastSwimMoveIn);
}
}
}
else
aiNewState(actor, &gillBeastSwimMoveIn);
aiNewState(actor, NAME_gillBeastSwimMoveIn);
return;
}
aiNewState(actor, &gillBeastSwimGoto);
aiNewState(actor, NAME_gillBeastSwimGoto);
actor->SetTarget(nullptr);
}

View file

@ -34,7 +34,7 @@ static void handThinkGoto(DBloodActor*);
static void handThinkChase(DBloodActor*);
AISTATE handIdle = { kAiStateIdle, 0, nullptr, 0, NULL, NULL, &AF(aiThinkTarget), NULL };
AISTATE hand13A3B4 = { kAiStateOther, 0, nullptr, 0, NULL, NULL, NULL, NULL };
AISTATE handChoke = { kAiStateOther, 0, nullptr, 0, NULL, NULL, NULL, 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 };
@ -71,7 +71,7 @@ static void handThinkGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &handSearch);
aiNewState(actor, NAME_handSearch);
aiThinkTarget(actor);
}
@ -79,7 +79,7 @@ static void handThinkChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &handGoto);
aiNewState(actor, NAME_handGoto);
return;
}
assert(actor->IsDudeActor());
@ -93,12 +93,12 @@ static void handThinkChase(DBloodActor* actor)
aiChooseDirection(actor, nAngle);
if (target->xspr.health == 0)
{
aiNewState(actor, &handSearch);
aiNewState(actor, NAME_handSearch);
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
aiNewState(actor, &handSearch);
aiNewState(actor, NAME_handSearch);
return;
}
if (nDist <= pDudeInfo->SeeDist())
@ -111,13 +111,13 @@ static void handThinkChase(DBloodActor* actor)
{
aiSetTarget(actor, actor->GetTarget());
if (nDist < 35.1875 && nDeltaAngle < DAngle15 && gGameOptions.nGameType == 0)
aiNewState(actor, &handJump);
aiNewState(actor, NAME_handJump);
return;
}
}
}
aiNewState(actor, &handGoto);
aiNewState(actor, NAME_handGoto);
actor->SetTarget(nullptr);
}

View file

@ -80,7 +80,7 @@ static void houndThinkGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &houndSearch);
aiNewState(actor, NAME_houndSearch);
aiThinkTarget(actor);
}
@ -88,7 +88,7 @@ static void houndThinkChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &houndGoto);
aiNewState(actor, NAME_houndGoto);
return;
}
if (!(actor->IsDudeActor())) {
@ -104,12 +104,12 @@ static void houndThinkChase(DBloodActor* actor)
aiChooseDirection(actor, nAngle);
if (target->xspr.health == 0)
{
aiNewState(actor, &houndSearch);
aiNewState(actor, NAME_houndSearch);
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
aiNewState(actor, &houndSearch);
aiNewState(actor, NAME_houndSearch);
return;
}
@ -123,15 +123,15 @@ static void houndThinkChase(DBloodActor* actor)
{
aiSetTarget(actor, actor->GetTarget());
if (nDist < 0xb0 && nDist > 0x50 && nDeltaAngle < DAngle15)
aiNewState(actor, &houndBurn);
aiNewState(actor, NAME_houndBurn);
else if (nDist < 38.375 && nDeltaAngle < DAngle15)
aiNewState(actor, &houndBite);
aiNewState(actor, NAME_houndBite);
return;
}
}
}
aiNewState(actor, &houndGoto);
aiNewState(actor, NAME_houndGoto);
actor->SetTarget(nullptr);
}

View file

@ -55,7 +55,7 @@ static void innocThinkGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &innocentSearch);
aiNewState(actor, NAME_innocentSearch);
aiThinkTarget(actor);
}
@ -63,7 +63,7 @@ static void innocThinkChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &innocentGoto);
aiNewState(actor, NAME_innocentGoto);
return;
}
assert(actor->IsDudeActor());
@ -77,12 +77,12 @@ static void innocThinkChase(DBloodActor* actor)
aiChooseDirection(actor, nAngle);
if (target->xspr.health == 0)
{
aiNewState(actor, &innocentSearch);
aiNewState(actor, NAME_innocentSearch);
return;
}
if (target->IsPlayerActor())
{
aiNewState(actor, &innocentSearch);
aiNewState(actor, NAME_innocentSearch);
return;
}
@ -96,14 +96,14 @@ static void innocThinkChase(DBloodActor* actor)
{
aiSetTarget(actor, actor->GetTarget());
if (nDist < 102.375 && nDeltaAngle < DAngle15)
aiNewState(actor, &innocentIdle);
aiNewState(actor, NAME_innocentIdle);
return;
}
}
}
aiPlay3DSound(actor, 7000 + Random(6), AI_SFX_PRIORITY_1, -1);
aiNewState(actor, &innocentGoto);
aiNewState(actor, NAME_innocentGoto);
actor->SetTarget(nullptr);
}

View file

@ -145,11 +145,11 @@ static void aiPodMove(DBloodActor* actor)
switch (actor->GetType()) {
case kDudePodGreen:
case kDudePodFire:
aiNewState(actor, &podSearch);
aiNewState(actor, NAME_podSearch);
break;
case kDudeTentacleGreen:
case kDudeTentacleFire:
aiNewState(actor, &tentacleSearch);
aiNewState(actor, NAME_tentacleSearch);
break;
}
}
@ -162,11 +162,11 @@ static void aiPodChase(DBloodActor* actor)
switch (actor->GetType()) {
case kDudePodGreen:
case kDudePodFire:
aiNewState(actor, &podMove);
aiNewState(actor, NAME_podMove);
break;
case kDudeTentacleGreen:
case kDudeTentacleFire:
aiNewState(actor, &tentacleMove);
aiNewState(actor, NAME_tentacleMove);
break;
}
return;
@ -187,11 +187,11 @@ static void aiPodChase(DBloodActor* actor)
switch (actor->GetType()) {
case kDudePodGreen:
case kDudePodFire:
aiNewState(actor, &podSearch);
aiNewState(actor, NAME_podSearch);
break;
case kDudeTentacleGreen:
case kDudeTentacleFire:
aiNewState(actor, &tentacleSearch);
aiNewState(actor, NAME_tentacleSearch);
break;
}
return;
@ -209,11 +209,11 @@ static void aiPodChase(DBloodActor* actor)
switch (actor->GetType()) {
case kDudePodGreen:
case kDudePodFire:
aiNewState(actor, &podStartChase);
aiNewState(actor, NAME_podStartChase);
break;
case kDudeTentacleGreen:
case kDudeTentacleFire:
aiNewState(actor, &tentacleStartChase);
aiNewState(actor, NAME_tentacleStartChase);
break;
}
}
@ -225,11 +225,11 @@ static void aiPodChase(DBloodActor* actor)
switch (actor->GetType()) {
case kDudePodGreen:
case kDudePodFire:
aiNewState(actor, &podMove);
aiNewState(actor, NAME_podMove);
break;
case kDudeTentacleGreen:
case kDudeTentacleFire:
aiNewState(actor, &tentacleMove);
aiNewState(actor, NAME_tentacleMove);
break;
}
actor->SetTarget(nullptr);

View file

@ -68,7 +68,7 @@ static void ratThinkGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &ratSearch);
aiNewState(actor, NAME_ratSearch);
aiThinkTarget(actor);
}
@ -76,7 +76,7 @@ static void ratThinkChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &ratGoto);
aiNewState(actor, NAME_ratGoto);
return;
}
assert(actor->IsDudeActor());
@ -89,12 +89,12 @@ static void ratThinkChase(DBloodActor* actor)
aiChooseDirection(actor, nAngle);
if (target->xspr.health == 0)
{
aiNewState(actor, &ratSearch);
aiNewState(actor, NAME_ratSearch);
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
aiNewState(actor, &ratSearch);
aiNewState(actor, NAME_ratSearch);
return;
}
@ -108,13 +108,13 @@ static void ratThinkChase(DBloodActor* actor)
{
aiSetTarget(actor, actor->GetTarget());
if (nDist < 57.5625 && nDeltaAngle < DAngle15)
aiNewState(actor, &ratBite);
aiNewState(actor, NAME_ratBite);
return;
}
}
}
aiNewState(actor, &ratGoto);
aiNewState(actor, NAME_ratGoto);
actor->SetTarget(nullptr);
}

View file

@ -176,7 +176,7 @@ static void spidThinkGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &spidSearch);
aiNewState(actor, NAME_spidSearch);
aiThinkTarget(actor);
}
@ -184,7 +184,7 @@ static void spidThinkChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &spidGoto);
aiNewState(actor, NAME_spidGoto);
return;
}
assert(actor->IsDudeActor());
@ -197,12 +197,12 @@ static void spidThinkChase(DBloodActor* actor)
aiChooseDirection(actor, nAngle);
if (target->xspr.health == 0)
{
aiNewState(actor, &spidSearch);
aiNewState(actor, NAME_spidSearch);
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
aiNewState(actor, &spidSearch);
aiNewState(actor, NAME_spidSearch);
return;
}
@ -219,20 +219,20 @@ static void spidThinkChase(DBloodActor* actor)
switch (actor->GetType()) {
case kDudeSpiderRed:
if (nDist < 57.5625 && nDeltaAngle < DAngle15)
aiNewState(actor, &spidBite);
aiNewState(actor, NAME_spidBite);
break;
case kDudeSpiderBrown:
case kDudeSpiderBlack:
if (nDist < 115.1875 && nDist > 57.5625 && nDeltaAngle < DAngle15)
aiNewState(actor, &spidJump);
aiNewState(actor, NAME_spidJump);
else if (nDist < 57.5625 && nDeltaAngle < DAngle15)
aiNewState(actor, &spidBite);
aiNewState(actor, NAME_spidBite);
break;
case kDudeSpiderMother:
if (nDist < 115.1875 && nDist > 57.5625 && nDeltaAngle < DAngle15)
aiNewState(actor, &spidJump);
aiNewState(actor, NAME_spidJump);
else if (Chance(0x8000))
aiNewState(actor, &spidBirth);
aiNewState(actor, NAME_spidBirth);
break;
}
@ -241,7 +241,7 @@ static void spidThinkChase(DBloodActor* actor)
}
}
aiNewState(actor, &spidGoto);
aiNewState(actor, NAME_spidGoto);
actor->SetTarget(nullptr);
}

View file

@ -258,7 +258,7 @@ extern AISTATE gillBeastSwimMoveIn;
extern AISTATE gillBeastSwimTurn;
extern AISTATE handIdle;
extern AISTATE hand13A3B4;
extern AISTATE handChoke;
extern AISTATE handSearch;
extern AISTATE handChase;
extern AISTATE handRecoil;

View file

@ -55,7 +55,7 @@ void tchernobogFire(DBloodActor* actor)
evPostActor(target, 0, AF(fxFlameLick));
actBurnSprite(actor->GetOwner(), target, 40);
if (Chance(0x6000))
aiNewState(actor, &tchernobogBurn1);
aiNewState(actor, NAME_tchernobogBurn1);
}
void tchernobogBurnSeqCallback(DBloodActor* actor)
@ -191,7 +191,7 @@ static void tchernobogThinkTarget(DBloodActor* actor)
{
actor->xspr.goalAng += DAngle45;
aiSetTarget(actor, actor->basePoint);
aiNewState(actor, &tchernobogTurn);
aiNewState(actor, NAME_tchernobogTurn);
return;
}
if (Chance(pDudeInfo->alertChance))
@ -244,7 +244,7 @@ static void tchernobogThinkGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &tchernobogSearch);
aiNewState(actor, NAME_tchernobogSearch);
aiThinkTarget(actor);
}
@ -252,7 +252,7 @@ static void tchernobogThinkChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &tchernobogGoto);
aiNewState(actor, NAME_tchernobogGoto);
return;
}
if (!(actor->IsDudeActor())) {
@ -269,12 +269,12 @@ static void tchernobogThinkChase(DBloodActor* actor)
aiChooseDirection(actor, nAngle);
if (target->xspr.health == 0)
{
aiNewState(actor, &tchernobogSearch);
aiNewState(actor, NAME_tchernobogSearch);
return;
}
if (target->IsPlayerActor() && powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0)
{
aiNewState(actor, &tchernobogSearch);
aiNewState(actor, NAME_tchernobogSearch);
return;
}
@ -288,17 +288,17 @@ static void tchernobogThinkChase(DBloodActor* actor)
{
aiSetTarget(actor, actor->GetTarget());
if (nDist < 0x1f0 && nDist > 0xd0 && nDeltaAngle < DAngle15)
aiNewState(actor, &tchernobogFireAtk);
aiNewState(actor, NAME_tchernobogFireAtk);
else if (nDist < 0xd0 && nDist > 0xb0 && nDeltaAngle < DAngle15)
aiNewState(actor, &tchernobogBurn1);
aiNewState(actor, NAME_tchernobogBurn1);
else if (nDist < 0xb0 && nDist > 0x50 && nDeltaAngle < DAngle15)
aiNewState(actor, &tchernobogBurn2);
aiNewState(actor, NAME_tchernobogBurn2);
return;
}
}
}
aiNewState(actor, &tchernobogGoto);
aiNewState(actor, NAME_tchernobogGoto);
actor->SetTarget(nullptr);
}

View file

@ -95,7 +95,7 @@ static void zombaThinkGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 51.3125 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &zombieASearch);
aiNewState(actor, NAME_zombieASearch);
aiThinkTarget(actor);
}
@ -103,7 +103,7 @@ static void zombaThinkChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &zombieASearch);
aiNewState(actor, NAME_zombieASearch);
return;
}
assert(actor->IsDudeActor());
@ -118,12 +118,12 @@ static void zombaThinkChase(DBloodActor* actor)
if (target->xspr.health == 0)
{
aiNewState(actor, &zombieASearch);
aiNewState(actor, NAME_zombieASearch);
return;
}
if (target->IsPlayerActor() && (powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0 || powerupCheck(getPlayer(target), kPwUpDeathMaskUseless) > 0))
{
aiNewState(actor, &zombieAGoto);
aiNewState(actor, NAME_zombieAGoto);
return;
}
// If the zombie gets whacked while rising from the grave it never executes this change and if it isn't done here at the very latest, will just aimlessly run around.
@ -141,13 +141,13 @@ static void zombaThinkChase(DBloodActor* actor)
{
aiSetTarget(actor, actor->GetTarget());
if (nDist < 0x40 && nDeltaAngle < DAngle15)
aiNewState(actor, &zombieAHack);
aiNewState(actor, NAME_zombieAHack);
return;
}
}
}
aiNewState(actor, &zombieAGoto);
aiNewState(actor, NAME_zombieAGoto);
actor->SetTarget(nullptr);
}
@ -155,7 +155,7 @@ static void zombaThinkPonder(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &zombieASearch);
aiNewState(actor, NAME_zombieASearch);
return;
}
assert(actor->IsDudeActor());
@ -169,12 +169,12 @@ static void zombaThinkPonder(DBloodActor* actor)
aiChooseDirection(actor, nAngle);
if (target->xspr.health == 0)
{
aiNewState(actor, &zombieASearch);
aiNewState(actor, NAME_zombieASearch);
return;
}
if (target->IsPlayerActor() && (powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0 || powerupCheck(getPlayer(target), kPwUpDeathMaskUseless) > 0))
{
aiNewState(actor, &zombieAGoto);
aiNewState(actor, NAME_zombieAGoto);
return;
}
@ -192,7 +192,7 @@ static void zombaThinkPonder(DBloodActor* actor)
if (nDeltaAngle < DAngle15)
{
sfxPlay3DSound(actor, 1101, 1, 0);
aiNewState(actor, &zombieAHack);
aiNewState(actor, NAME_zombieAHack);
}
return;
}
@ -200,7 +200,7 @@ static void zombaThinkPonder(DBloodActor* actor)
}
}
aiNewState(actor, &zombieAChase);
aiNewState(actor, NAME_zombieAChase);
}
static void myThinkTarget(DBloodActor* actor)

View file

@ -95,7 +95,7 @@ static void zombfThinkGoto(DBloodActor* actor)
double nDist = dvec.Length();
aiChooseDirection(actor, nAngle);
if (nDist < 32 && absangle(actor->spr.Angles.Yaw, nAngle) < pDudeInfo->Periphery())
aiNewState(actor, &zombieFSearch);
aiNewState(actor, NAME_zombieFSearch);
aiThinkTarget(actor);
}
@ -103,7 +103,7 @@ static void zombfThinkChase(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr)
{
aiNewState(actor, &zombieFGoto);
aiNewState(actor, NAME_zombieFGoto);
return;
}
assert(actor->IsDudeActor());
@ -116,12 +116,12 @@ static void zombfThinkChase(DBloodActor* actor)
aiChooseDirection(actor, nAngle);
if (target->xspr.health == 0)
{
aiNewState(actor, &zombieFSearch);
aiNewState(actor, NAME_zombieFSearch);
return;
}
if (target->IsPlayerActor() && (powerupCheck(getPlayer(target), kPwUpShadowCloak) > 0 || powerupCheck(getPlayer(target), kPwUpDeathMaskUseless) > 0))
{
aiNewState(actor, &zombieFSearch);
aiNewState(actor, NAME_zombieFSearch);
return;
}
double nDist = dv.Length();
@ -140,16 +140,16 @@ static void zombfThinkChase(DBloodActor* actor)
switch (hit)
{
case -1:
aiNewState(actor, &zombieFThrow);
aiNewState(actor, NAME_zombieFThrow);
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType())
aiNewState(actor, &zombieFThrow);
aiNewState(actor, NAME_zombieFThrow);
else
aiNewState(actor, &zombieFDodge);
aiNewState(actor, NAME_zombieFDodge);
break;
default:
aiNewState(actor, &zombieFThrow);
aiNewState(actor, NAME_zombieFThrow);
break;
}
}
@ -159,16 +159,16 @@ static void zombfThinkChase(DBloodActor* actor)
switch (hit)
{
case -1:
aiNewState(actor, &zombieFPuke);
aiNewState(actor, NAME_zombieFPuke);
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType())
aiNewState(actor, &zombieFPuke);
aiNewState(actor, NAME_zombieFPuke);
else
aiNewState(actor, &zombieFDodge);
aiNewState(actor, NAME_zombieFDodge);
break;
default:
aiNewState(actor, &zombieFPuke);
aiNewState(actor, NAME_zombieFPuke);
break;
}
}
@ -178,16 +178,16 @@ static void zombfThinkChase(DBloodActor* actor)
switch (hit)
{
case -1:
aiNewState(actor, &zombieFHack);
aiNewState(actor, NAME_zombieFHack);
break;
case 3:
if (actor->GetType() != gHitInfo.actor()->GetType())
aiNewState(actor, &zombieFHack);
aiNewState(actor, NAME_zombieFHack);
else
aiNewState(actor, &zombieFDodge);
aiNewState(actor, NAME_zombieFDodge);
break;
default:
aiNewState(actor, &zombieFHack);
aiNewState(actor, NAME_zombieFHack);
break;
}
}
@ -196,7 +196,7 @@ static void zombfThinkChase(DBloodActor* actor)
}
}
aiNewState(actor, &zombieFSearch);
aiNewState(actor, NAME_zombieFSearch);
actor->SetTarget(nullptr);
}

View file

@ -805,7 +805,8 @@ void viewProcessSprites(tspriteArray& tsprites, const DVector3& cPos, DAngle cA,
}
case kStatDude:
{
if (owneractor->GetType() == kDudeHand && owneractor->hasX() && owneractor->xspr.aiState == &hand13A3B4)
/* the state being checked here is never used, this looks like old development garbage.
if (owneractor->GetType() == kDudeHand && owneractor->hasX() && owneractor->xspr.aiState == &handChoke)
{
auto target = owneractor->GetTarget();
if (target && target->IsPlayerActor())
@ -814,6 +815,7 @@ void viewProcessSprites(tspriteArray& tsprites, const DVector3& cPos, DAngle cA,
break;
}
}
*/
if (pXSector && pXSector->color) copyfloorpal(pTSprite, pSector);
if (powerupCheck(pPlayer, kPwUpBeastVision) > 0) pTSprite->shade = -128;

View file

@ -718,6 +718,19 @@ void GameInterface::FinalizeSetup()
actorinfo->TypeNum = pair->Key;
}
}
// Make the StatesToDefine array temporarily operable to allow transitioning the state calls without first altering the state table implementation.
#pragma message("remove after state transitioning")
auto cls = PClass::FindActor("BloodDudeBase");
for (auto& state : cls->ActorInfo()->AIStates)
{
state.seqId = state.sprite == 0 ? -1 : state.sprite & 0xffff;
state.NextState = nullptr;
for (auto& state2 : cls->ActorInfo()->AIStates)
{
if (state.NextStaten == state2.Label) state.NextState = &state2;
}
}
}
//---------------------------------------------------------------------------
@ -790,8 +803,8 @@ DEFINE_PROPERTY(aistate, SSIIGGGGs, CoreActor)
PROP_INT_PARM(duration, 3);
PROP_FUNC_PARM(action, 4);
PROP_FUNC_PARM(enter, 5);
PROP_FUNC_PARM(tick, 6);
PROP_FUNC_PARM(move, 7);
PROP_FUNC_PARM(move, 6);
PROP_FUNC_PARM(tick, 7);
const char* next = nullptr;
if (PROP_PARM_COUNT > 8)
{
@ -813,7 +826,7 @@ DEFINE_PROPERTY(aistate, SSIIGGGGs, CoreActor)
state.EnterFunc = enter;
state.MoveFunc = move;
state.TickFunc = tick;
state.NextState = next ? FName(next) : FName(NAME_None);
state.NextStaten = next ? FName(next) : FName(NAME_None);
}
END_BLD_NS

View file

@ -135,7 +135,7 @@ public:
if (!hasX())
return false;
switch (xspr.aiState->stateType)
switch (xspr.aiState->Type)
{
case kAiStateIdle:
case kAiStateGenIdle:

View file

@ -35,413 +35,6 @@ BEGIN_BLD_NS
void validateLinks();
// All AI states for assigning an index.
static AISTATE* const allAIStates[] =
{
nullptr,
&genIdle,
&genRecoil,
&batIdle,
&batFlyIdle,
&batChase,
&batPonder,
&batGoto,
&batBite,
&batRecoil,
&batSearch,
&batSwoop,
&batFly,
&batTurn,
&batHide,
&batDodgeUp,
&batDodgeUpRight,
&batDodgeUpLeft,
&batDodgeDown,
&batDodgeDownRight,
&batDodgeDownLeft,
&beastIdle,
&beastChase,
&beastDodge,
&beastGoto,
&beastSlash,
&beastStomp,
&beastSearch,
&beastRecoil,
&beastTeslaRecoil,
&beastSwimIdle,
&beastSwimChase,
&beastSwimDodge,
&beastSwimGoto,
&beastSwimSearch,
&beastSwimSlash,
&beastSwimRecoil,
&beastMorphToBeast,
&beastMorphFromCultist,
&beastMoveSwimChaseAlt,
&beastSwimAttack,
&beastSwimTurn,
&eelIdle,
&eelFlyIdle,
&eelChase,
&eelPonder,
&eelGoto,
&eelBite,
&eelRecoil,
&eelSearch,
&eelSwoop,
&eelFly,
&eelTurn,
&eelHide,
&eelDodgeUp,
&eelDodgeUpRight,
&eelDodgeUpLeft,
&eelDodgeDown,
&eelDodgeDownRight,
&eelDodgeDownLeft,
&cultistBurnIdle,
&cultistBurnChase,
&cultistBurnGoto,
&cultistBurnSearch,
&cultistBurnAttack,
&zombieABurnChase,
&zombieABurnGoto,
&zombieABurnSearch,
&zombieABurnAttack,
&zombieFBurnChase,
&zombieFBurnGoto,
&zombieFBurnSearch,
&zombieFBurnAttack,
&innocentBurnChase,
&innocentBurnGoto,
&innocentBurnSearch,
&innocentBurnAttack,
&beastBurnChase,
&beastBurnGoto,
&beastBurnSearch,
&beastBurnAttack,
&tinycalebBurnChase,
&tinycalebBurnGoto,
&tinycalebBurnSearch,
&tinycalebBurnAttack,
&genDudeBurnIdle,
&genDudeBurnChase,
&genDudeBurnGoto,
&genDudeBurnSearch,
&genDudeBurnAttack,
&tinycalebIdle,
&tinycalebChase,
&tinycalebDodge,
&tinycalebGoto,
&tinycalebAttack,
&tinycalebSearch,
&tinycalebRecoil,
&tinycalebTeslaRecoil,
&tinycalebSwimIdle,
&tinycalebSwimChase,
&tinycalebSwimDodge,
&tinycalebSwimGoto,
&tinycalebSwimSearch,
&tinycalebSwimAttack,
&tinycalebSwimRecoil,
&tinycalebSwimUnused,
&tinycalebSwimMoveIn,
&tinycalebSwimTurn,
&cerberusIdle,
&cerberusSearch,
&cerberusChase,
&cerberusRecoil,
&cerberusTeslaRecoil,
&cerberusGoto,
&cerberusBite,
&cerberusBurn,
&cerberus3Burn,
&cerberus2Idle,
&cerberus2Search,
&cerberus2Chase,
&cerberus2Recoil,
&cerberus2Goto,
&cerberus2Bite,
&cerberus2Burn,
&cerberus4Burn,
&cerberusTurn1,
&cerberusTurn2,
&cultistIdle,
&cultistProneIdle,
&fanaticProneIdle,
&cultistProneIdle3,
&cultistChase,
&fanaticChase,
&cultistDodge,
&cultistGoto,
&cultistProneChase,
&cultistProneDodge,
&cultistTThrow,
&cultistSThrow,
&cultistTsThrow,
&cultistDThrow,
&cultistDThrow2,
&cultistDThrow3C,
&cultistDThrow3B,
&cultistDThrow3A,
&cultistDThrow4,
&cultistSearch,
&cultistSFire,
&cultistTFire,
&cultistTsFire,
&cultistSProneFire,
&cultistTProneFire,
&cultistTsProneFire,
&cultistRecoil,
&cultistProneRecoil,
&cultistTeslaRecoil,
&cultistSwimIdle,
&cultistSwimChase,
&cultistSwimDodge,
&cultistSwimGoto,
&cultistSwimSearch,
&cultistSSwimFire,
&cultistTSwimFire,
&cultistTsSwimFire,
&cultistSwimRecoil,
&gargoyleFIdle,
&gargoyleStatueIdle,
&gargoyleFChase,
&gargoyleFGoto,
&gargoyleFSlash,
&gargoyleFThrow,
&gargoyleSThrow,
&gargoyleSBlast,
&gargoyleFRecoil,
&gargoyleFSearch,
&gargoyleFMorph2,
&gargoyleFMorph,
&gargoyleSMorph2,
&gargoyleSMorph,
&gargoyleSwoop,
&gargoyleFly,
&gargoyleTurn,
&gargoyleDodgeUp,
&gargoyleFDodgeUpRight,
&gargoyleFDodgeUpLeft,
&gargoyleDodgeDown,
&gargoyleFDodgeDownRight,
&gargoyleFDodgeDownLeft,
&statueFBreakSEQ,
&statueSBreakSEQ,
&ghostIdle,
&ghostChase,
&ghostGoto,
&ghostSlash,
&ghostThrow,
&ghostBlast,
&ghostRecoil,
&ghostTeslaRecoil,
&ghostSearch,
&ghostSwoop,
&ghostFly,
&ghostTurn,
&ghostDodgeUp,
&ghostDodgeUpRight,
&ghostDodgeUpLeft,
&ghostDodgeDown,
&ghostDodgeDownRight,
&ghostDodgeDownLeft,
&gillBeastIdle,
&gillBeastChase,
&gillBeastDodge,
&gillBeastGoto,
&gillBeastBite,
&gillBeastSearch,
&gillBeastRecoil,
&gillBeastSwimIdle,
&gillBeastSwimChase,
&gillBeastSwimDodge,
&gillBeastSwimGoto,
&gillBeastSwimSearch,
&gillBeastSwimBite,
&gillBeastSwimRecoil,
&gillBeastSwimUnused,
&gillBeastSwimMoveIn,
&gillBeastSwimTurn,
&handIdle,
&hand13A3B4,
&handSearch,
&handChase,
&handRecoil,
&handGoto,
&handJump,
&houndIdle,
&houndSearch,
&houndChase,
&houndRecoil,
&houndTeslaRecoil,
&houndGoto,
&houndBite,
&houndBurn,
&innocentIdle,
&innocentSearch,
&innocentChase,
&innocentRecoil,
&innocentTeslaRecoil,
&innocentGoto,
&podIdle,
&podMove,
&podSearch,
&podStartChase,
&podRecoil,
&podChase,
&tentacleIdle,
&tentacle13A6A8,
&tentacle13A6C4,
&tentacle13A6E0,
&tentacle13A6FC,
&tentacleMove,
&tentacleSearch,
&tentacleStartChase,
&tentacleRecoil,
&tentacleChase,
&ratIdle,
&ratSearch,
&ratChase,
&ratDodge,
&ratRecoil,
&ratGoto,
&ratBite,
&spidIdle,
&spidChase,
&spidDodge,
&spidGoto,
&spidSearch,
&spidBite,
&spidJump,
&spidBirth,
&tchernobogIdle,
&tchernobogSearch,
&tchernobogChase,
&tchernobogRecoil,
&tchernobogGoto,
&tchernobogBurn1,
&tchernobogBurn2,
&tchernobogFireAtk,
&tchernobogTurn,
&zombieAIdle,
&zombieAChase,
&zombieAPonder,
&zombieAGoto,
&zombieAHack,
&zombieASearch,
&zombieARecoil,
&zombieATeslaRecoil,
&zombieARecoil2,
&zombieAStand,
&zombieEIdle,
&zombieEUp2,
&zombieEUp,
&zombie2Idle,
&zombie2Search,
&zombieSIdle,
&zombieEStand,
&zombieFIdle,
&zombieFChase,
&zombieFGoto,
&zombieFDodge,
&zombieFHack,
&zombieFPuke,
&zombieFThrow,
&zombieFSearch,
&zombieFRecoil,
&zombieFTeslaRecoil,
#ifdef NOONE_EXTENSIONS
&genDudeIdleL,
&genDudeIdleW,
&genDudeSearchL,
&genDudeSearchW,
&genDudeSearchShortL,
&genDudeSearchShortW,
&genDudeSearchNoWalkL,
&genDudeSearchNoWalkW,
&genDudeGotoL,
&genDudeGotoW,
&genDudeDodgeL,
&genDudeDodgeD,
&genDudeDodgeW,
&genDudeDodgeShortL,
&genDudeDodgeShortD,
&genDudeDodgeShortW,
&genDudeDodgeShorterL,
&genDudeDodgeShorterD,
&genDudeDodgeShorterW,
&genDudeChaseL,
&genDudeChaseD,
&genDudeChaseW,
&genDudeChaseNoWalkL,
&genDudeChaseNoWalkD,
&genDudeChaseNoWalkW,
&genDudeFireL,
&genDudeFireD,
&genDudeFireW,
&genDudeRecoilL,
&genDudeRecoilD,
&genDudeRecoilW,
&genDudeRecoilTesla,
&genDudeThrow,
&genDudeThrow2,
&genDudePunch,
#endif
};
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
FSerializer& Serialize(FSerializer& arc, const char* keyname, AISTATE*& w, AISTATE** def)
{
unsigned i = 0;
if (arc.isWriting())
{
if (def && w == *def) return arc;
for (auto cstate : allAIStates)
{
if (w == cstate)
{
arc(keyname, i);
return arc;
}
i++;
}
#ifdef NOONE_EXTENSIONS
if (w >= genPatrolStates && w < genPatrolStates + kPatrolStateSize)
{
i = int(w - genPatrolStates) + 1000;
arc(keyname, i);
}
#endif
}
else
{
arc(keyname, i);
if (i < countof(allAIStates))
{
w = allAIStates[i];
}
#ifdef NOONE_EXTENSIONS
else if (i >= 1000 && i < 1000 + kPatrolStateSize)
{
w = genPatrolStates + (i - 1000);
}
#endif
else
{
w = nullptr;
}
}
return arc;
}
//---------------------------------------------------------------------------
//
//
@ -620,7 +213,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, XSPRITE& w, XSPRIT
if (arc.BeginObject(keyname))
{
arc("flags", w.flags, def->flags)
("aistate", w.aiState, def->aiState)
//("aistate", w.aiState, def->aiState) disabled until we can transition to engine states.
("busy", w.busy, def->busy)
("txid", w.txID, def->txID)
("rxid", w.rxID, def->rxID)

View file

@ -61,7 +61,7 @@ struct AISTATE;
struct XSPRITE {
AISTATE* aiState; // ai
FDefiningState* aiState; // ai
union
{
uint32_t flags;

View file

@ -1888,7 +1888,7 @@ void aiSetGenIdleState(DBloodActor* actor)
aiGenDudeNewState(actor, &genIdle);
break;
default:
aiNewState(actor, &genIdle);
aiNewState(actor, NAME_genIdle);
break;
}
}

View file

@ -153,6 +153,7 @@ class BloodDudeBase : Bloodactor
AISTATE "cultistSProneFire", "+8", 4, 60, ShotSeqCallback, null, null, null, "cultistProneChase";
AISTATE "cultistTProneFire", "+8", 4, 0, TommySeqCallback, null, aiMoveTurn, cultThinkChase, "cultistTProneFire";
AISTATE "cultistTsProneFire", "+8", 4, 0, TeslaSeqCallback, null, aiMoveTurn, null, "cultistTsProneFire";
AISTATE "cultistTsProneFireFixed", "+0", 8, 0, TeslaSeqCallback, null, aiMoveTurn, null, "cultistTsProneFireFixed";
AISTATE "cultistRecoil", "+5", 5, 0, null, null, null, null, "cultistDodge";
AISTATE "cultistProneRecoil", "+5", 5, 0, null, null, null, null, "cultistProneDodge";
AISTATE "cultistTeslaRecoil", "+4", 5, 0, null, null, null, null, "cultistDodge";
@ -224,7 +225,7 @@ class BloodDudeBase : Bloodactor
AISTATE "gillBeastSwimMoveIn", "+10", -1, 0, null, null, gillSwimMoveIn, gillThinkSwimChase, "gillBeastSwimChase";
AISTATE "gillBeastSwimTurn", "+10", -1, 120, null, null, null, aiMoveTurn, "gillBeastSwimChase";
AISTATE "handIdle", "+0", 0, 0, null, null, null, aiThinkTarget, "none";
AISTATE "hand13A3B4", "+0", -1, 0, null, null, null, null, "none";
AISTATE "handChoke", "+0", -1, 0, null, null, null, null, "none";
AISTATE "handSearch", "+6", 2, 600, null, null, aiMoveForward, handThinkSearch, "handIdle";
AISTATE "handChase", "+6", 4, 0, null, null, aiMoveForward, handThinkChase, "none";
AISTATE "handRecoil", "+5", 5, 0, null, null, null, null, "handSearch";