mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- removed the dudeIsPlayingSeq variant taking a sprite parameter.
This commit is contained in:
parent
890cc4947b
commit
fe92188b0c
5 changed files with 36 additions and 42 deletions
|
@ -7414,11 +7414,6 @@ void actPostSprite(int nSprite, int nStatus)
|
|||
actPostSprite(&bloodActors[nSprite], nStatus);
|
||||
}
|
||||
|
||||
bool dudeIsPlayingSeq(spritetype* pSprite, int nSeq)
|
||||
{
|
||||
return dudeIsPlayingSeq(&bloodActors[pSprite->index], nSeq);
|
||||
}
|
||||
|
||||
void aiSetTarget_(XSPRITE* pXSprite, int nTarget)
|
||||
{
|
||||
aiSetTarget(&bloodActors[pXSprite->reference], &bloodActors[nTarget]);
|
||||
|
|
|
@ -1103,7 +1103,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
|
|||
{
|
||||
if (!spriteIsUnderwater(pSprite))
|
||||
{
|
||||
if (!canDuck(pSprite) || !dudeIsPlayingSeq(pSprite, 14)) aiGenDudeNewState(pSprite, &genDudeDodgeShortL);
|
||||
if (!canDuck(pSprite) || !dudeIsPlayingSeq(actor, 14)) aiGenDudeNewState(pSprite, &genDudeDodgeShortL);
|
||||
else aiGenDudeNewState(pSprite, &genDudeDodgeShortD);
|
||||
|
||||
if (Chance(0x0200))
|
||||
|
|
|
@ -96,7 +96,6 @@ void aiInit(void);
|
|||
void aiInitSprite(spritetype *pSprite);
|
||||
bool CanMove(DBloodActor* pSprite, int a2, int nAngle, int nRange);
|
||||
|
||||
bool dudeIsPlayingSeq(spritetype* pSprite, int nSeq); // deprecated
|
||||
void aiSetTarget_(XSPRITE* pXSprite, int x, int y, int z);
|
||||
void aiSetTarget_(XSPRITE* pXSprite, int nTarget);
|
||||
|
||||
|
|
|
@ -331,37 +331,37 @@ static void cultThinkChase(DBloodActor* actor)
|
|||
switch (hit)
|
||||
{
|
||||
case -1:
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistTFire);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistTProneFire);
|
||||
else if (dudeIsPlayingSeq(pSprite, 13) && (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo))
|
||||
else if (dudeIsPlayingSeq(actor, 13) && (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo))
|
||||
aiNewState(actor, &cultistTSwimFire);
|
||||
break;
|
||||
case 3:
|
||||
if (pSprite->type != sprite[gHitInfo.hitsprite].type && sprite[gHitInfo.hitsprite].type != kDudeCultistShotgun)
|
||||
{
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistTFire);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistTProneFire);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistTSwimFire);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistDodge);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistProneDodge);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistSwimDodge);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistTFire);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistTProneFire);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistTSwimFire);
|
||||
|
@ -399,9 +399,9 @@ static void cultThinkChase(DBloodActor* actor)
|
|||
switch (hit)
|
||||
{
|
||||
case -1:
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistSFire);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistSProneFire);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistSSwimFire);
|
||||
|
@ -409,27 +409,27 @@ static void cultThinkChase(DBloodActor* actor)
|
|||
case 3:
|
||||
if (pSprite->type != sprite[gHitInfo.hitsprite].type && sprite[gHitInfo.hitsprite].type != kDudeCultistTommy)
|
||||
{
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistSFire);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistSProneFire);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistSSwimFire);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistDodge);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistProneDodge);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistSwimDodge);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistSFire);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistSProneFire);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistSSwimFire);
|
||||
|
@ -467,9 +467,9 @@ static void cultThinkChase(DBloodActor* actor)
|
|||
switch (hit)
|
||||
{
|
||||
case -1:
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistTsFire);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistTsProneFire);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistTsSwimFire);
|
||||
|
@ -477,27 +477,27 @@ static void cultThinkChase(DBloodActor* actor)
|
|||
case 3:
|
||||
if (pSprite->type != sprite[gHitInfo.hitsprite].type && sprite[gHitInfo.hitsprite].type != kDudeCultistTommy)
|
||||
{
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistTsFire);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistTsProneFire);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistTsSwimFire);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistDodge);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistProneDodge);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistSwimDodge);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistTsFire);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistTsProneFire);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistTsSwimFire);
|
||||
|
@ -579,9 +579,9 @@ static void cultThinkChase(DBloodActor* actor)
|
|||
switch (hit)
|
||||
{
|
||||
case -1:
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistSFire);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistSProneFire);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistSSwimFire);
|
||||
|
@ -589,27 +589,27 @@ static void cultThinkChase(DBloodActor* actor)
|
|||
case 3:
|
||||
if (pSprite->type != sprite[gHitInfo.hitsprite].type && sprite[gHitInfo.hitsprite].type != kDudeCultistTommy)
|
||||
{
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistSFire);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistSProneFire);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistSSwimFire);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistDodge);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistProneDodge);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistSwimDodge);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (!dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
if (!dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistSFire);
|
||||
else if (dudeIsPlayingSeq(pSprite, 14) && pXSprite->medium == kMediumNormal)
|
||||
else if (dudeIsPlayingSeq(actor, 14) && pXSprite->medium == kMediumNormal)
|
||||
aiNewState(actor, &cultistSProneFire);
|
||||
else if (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo)
|
||||
aiNewState(actor, &cultistSSwimFire);
|
||||
|
|
|
@ -928,9 +928,9 @@ int checkAttackState(DBloodActor* actor)
|
|||
{
|
||||
auto pXSprite = &actor->x();
|
||||
auto pSprite = &actor->s();
|
||||
if (dudeIsPlayingSeq(pSprite, 14) || spriteIsUnderwater(pSprite,false))
|
||||
if (dudeIsPlayingSeq(actor, 14) || spriteIsUnderwater(pSprite,false))
|
||||
{
|
||||
if ( !dudeIsPlayingSeq(pSprite, 14) || spriteIsUnderwater(pSprite,false))
|
||||
if ( !dudeIsPlayingSeq(actor, 14) || spriteIsUnderwater(pSprite,false))
|
||||
{
|
||||
if (spriteIsUnderwater(pSprite,false))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue