mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Exhumed: Manually review all nAction
changes and ensure nFrame
is reset also.
This commit is contained in:
parent
ba8bdf347e
commit
408c71513b
9 changed files with 30 additions and 13 deletions
|
@ -297,6 +297,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
if (pActor->spr.cstat & CSTAT_SPRITE_INVISIBLE)
|
||||
{
|
||||
pActor->nAction = 9;
|
||||
pActor->nFrame = 0;
|
||||
pActor->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
pActor->vel.X = 0;
|
||||
pActor->vel.Y = 0;
|
||||
|
@ -307,10 +308,9 @@ void AILion::Tick(RunListEvent* ev)
|
|||
if (nAngDiff < DAngle22_5 / 2)
|
||||
{
|
||||
pActor->nAction = 3;
|
||||
}
|
||||
}
|
||||
|
||||
pActor->nFrame = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
@ -330,6 +330,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
if (pTarget == nullptr)
|
||||
{
|
||||
pActor->nAction = 1;
|
||||
pActor->nFrame = 0;
|
||||
pActor->nCount = 50;
|
||||
}
|
||||
else
|
||||
|
@ -337,6 +338,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
if (PlotCourseToSprite(pActor, pTarget) >= 48)
|
||||
{
|
||||
pActor->nAction = 2;
|
||||
pActor->nFrame = 0;
|
||||
}
|
||||
else if (seqFrame.flags & 0x80)
|
||||
{
|
||||
|
@ -399,7 +401,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
}
|
||||
|
||||
pActor->spr.Angles.Yaw = nAngle;
|
||||
|
||||
pActor->nFrame = 0;
|
||||
pActor->nAction = 6;
|
||||
pActor->vel.XY() = pActor->spr.Angles.Yaw.ToVector() * (1024 - 128);
|
||||
D3PlayFX(StaticSound[kSound24], pActor);
|
||||
|
@ -420,6 +422,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
if (nMov.type == kHitWall)
|
||||
{
|
||||
pActor->nAction = 7;
|
||||
pActor->nFrame = 0;
|
||||
pActor->spr.Angles.Yaw = (nMov.hitWall->normalAngle() + DAngle180).Normalized360();
|
||||
pActor->nCount = RandomSize(4);
|
||||
return;
|
||||
|
@ -464,7 +467,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
}
|
||||
|
||||
pActor->vel.Z = -1000 / 256.;
|
||||
|
||||
pActor->nFrame = 0;
|
||||
pActor->nAction = 6;
|
||||
pActor->vel.XY() = pActor->spr.Angles.Yaw.ToVector() * (1024 - 128);
|
||||
D3PlayFX(StaticSound[kSound24], pActor);
|
||||
|
|
|
@ -375,6 +375,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
||||
pActor->nAction = 0;
|
||||
pActor->nFrame = 0;
|
||||
pActor->nHealth = 300;
|
||||
pActor->pTarget = nullptr;
|
||||
|
||||
|
|
|
@ -572,6 +572,7 @@ void AIQueenEgg::Tick(RunListEvent* ev)
|
|||
{
|
||||
pEgg->pTarget = nullptr;
|
||||
pEgg->nAction = 0;
|
||||
pEgg->nFrame = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -626,6 +627,7 @@ void AIQueenEgg::Tick(RunListEvent* ev)
|
|||
if (bVal)
|
||||
{
|
||||
pEgg->nAction = 3;
|
||||
pEgg->nFrame = 0;
|
||||
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
}
|
||||
break;
|
||||
|
@ -1262,6 +1264,7 @@ void AIQueen::Tick(RunListEvent* ev)
|
|||
pTarget = nullptr;
|
||||
QueenList[nQueen].pTarget = nullptr;
|
||||
QueenList[nQueen].nAction = 0;
|
||||
QueenList[nQueen].nFrame = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1292,6 +1295,7 @@ void AIQueen::Tick(RunListEvent* ev)
|
|||
{
|
||||
BuildQueenEgg(nQueen, 1);
|
||||
QueenList[nQueen].nAction = 3;
|
||||
QueenList[nQueen].nFrame = 0;
|
||||
QueenList[nQueen].nIndex = RandomSize(6) + 60;
|
||||
}
|
||||
|
||||
|
@ -1393,6 +1397,7 @@ void AIQueen::Tick(RunListEvent* ev)
|
|||
if (bVal && QueenList[nQueen].nIndex2 <= 0)
|
||||
{
|
||||
QueenList[nQueen].nAction = 0;
|
||||
QueenList[nQueen].nFrame = 0;
|
||||
QueenList[nQueen].nIndex = 15;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -264,6 +264,7 @@ void AIRa::Tick(RunListEvent* ev)
|
|||
{
|
||||
if (bVal) {
|
||||
Ra[nPlayer].nAction = 2;
|
||||
Ra[nPlayer].nFrame = 0;
|
||||
}
|
||||
|
||||
MoveRaToEnemy(nPlayer);
|
||||
|
|
|
@ -394,6 +394,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
if (bVal)
|
||||
{
|
||||
pActor->nAction = 2;
|
||||
pActor->nFrame = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -414,6 +415,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
}
|
||||
|
||||
pActor->nAction = 1;
|
||||
pActor->nFrame = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -422,6 +424,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
if (bVal)
|
||||
{
|
||||
pActor->nAction = 1;
|
||||
pActor->nFrame = 0;
|
||||
pActor->nCount = 15;
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -305,6 +305,7 @@ void AIScorp::Tick(RunListEvent* ev)
|
|||
if (pTarget == nullptr)
|
||||
{
|
||||
pActor->nAction = 0;
|
||||
pActor->nFrame = 0;
|
||||
pActor->nCount = 5;
|
||||
}
|
||||
else
|
||||
|
@ -312,6 +313,7 @@ void AIScorp::Tick(RunListEvent* ev)
|
|||
if (PlotCourseToSprite(pActor, pTarget) >= 48)
|
||||
{
|
||||
pActor->nAction = 1;
|
||||
pActor->nFrame = 0;
|
||||
}
|
||||
else if (seqFrame.flags & 0x80)
|
||||
{
|
||||
|
@ -377,6 +379,7 @@ void AIScorp::Tick(RunListEvent* ev)
|
|||
{
|
||||
pActor->nAction = RandomBit() + 6;
|
||||
}
|
||||
pActor->nFrame = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -500,6 +500,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
if (pTarget == nullptr)
|
||||
{
|
||||
pActor->nAction = 0;
|
||||
pActor->nFrame = 0;
|
||||
pActor->nCount = 50;
|
||||
}
|
||||
else
|
||||
|
@ -507,6 +508,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
if (PlotCourseToSprite(pActor, pTarget) >= 48)
|
||||
{
|
||||
pActor->nAction = 3;
|
||||
pActor->nFrame = 0;
|
||||
}
|
||||
else if (seqFrame.flags & 0x80)
|
||||
{
|
||||
|
@ -522,6 +524,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
if (bVal)
|
||||
{
|
||||
pActor->nAction = 0;
|
||||
pActor->nFrame = 0;
|
||||
pActor->nCount = 15;
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -263,15 +263,15 @@ void AISpider::Tick(RunListEvent* ev)
|
|||
}
|
||||
|
||||
spp->nAction = 1;
|
||||
spp->nFrame = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
spp->nAction = 0;
|
||||
spp->nFrame = 0;
|
||||
spp->vel.X = 0;
|
||||
spp->vel.Y = 0;
|
||||
}
|
||||
|
||||
spp->nFrame = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -166,13 +166,7 @@ void AIWasp::Damage(RunListEvent* ev)
|
|||
|
||||
if (pActor->nHealth > 0)
|
||||
{
|
||||
if (!RandomSize(4))
|
||||
{
|
||||
pActor->nAction = 3;
|
||||
pActor->nFrame = 0;
|
||||
}
|
||||
|
||||
pActor->nAction = 1;
|
||||
pActor->nAction = !RandomSize(4) ? 3 : 1;
|
||||
pActor->spr.Angles.Yaw += DAngle45 + DAngle90 + RandomAngle9();
|
||||
pActor->norm_ang();
|
||||
|
||||
|
@ -195,6 +189,7 @@ void AIWasp::Damage(RunListEvent* ev)
|
|||
|
||||
nCreaturesKilled++;
|
||||
}
|
||||
pActor->nFrame = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -238,6 +233,7 @@ void AIWasp::Tick(RunListEvent* ev)
|
|||
// goto pink
|
||||
pActor->pTarget = nullptr;
|
||||
pActor->nAction = 0;
|
||||
pActor->nFrame = 0;
|
||||
pActor->nCount = RandomSize(6);
|
||||
return;
|
||||
}
|
||||
|
@ -291,6 +287,7 @@ void AIWasp::Tick(RunListEvent* ev)
|
|||
if (pActor->nCount <= 0)
|
||||
{
|
||||
pActor->nAction = 0;
|
||||
pActor->nFrame = 0;
|
||||
pActor->nCount = RandomSize(6);
|
||||
return;
|
||||
}
|
||||
|
@ -333,6 +330,7 @@ void AIWasp::Tick(RunListEvent* ev)
|
|||
pActor->vel.Z = ((-20) - RandomSize(6)) / 256.;
|
||||
|
||||
pActor->nAction = 1;
|
||||
pActor->nFrame = 0;
|
||||
pActor->nVel = 3000;
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue