diff --git a/source/games/exhumed/src/lion.cpp b/source/games/exhumed/src/lion.cpp index c5b472ec0..864b0311c 100644 --- a/source/games/exhumed/src/lion.cpp +++ b/source/games/exhumed/src/lion.cpp @@ -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; } } - - 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); diff --git a/source/games/exhumed/src/mummy.cpp b/source/games/exhumed/src/mummy.cpp index 37281cf72..491381588 100644 --- a/source/games/exhumed/src/mummy.cpp +++ b/source/games/exhumed/src/mummy.cpp @@ -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; diff --git a/source/games/exhumed/src/queen.cpp b/source/games/exhumed/src/queen.cpp index 9ae9e3800..74ff48fbf 100644 --- a/source/games/exhumed/src/queen.cpp +++ b/source/games/exhumed/src/queen.cpp @@ -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 diff --git a/source/games/exhumed/src/ra.cpp b/source/games/exhumed/src/ra.cpp index 48c71f2e0..eac9cd10f 100644 --- a/source/games/exhumed/src/ra.cpp +++ b/source/games/exhumed/src/ra.cpp @@ -264,6 +264,7 @@ void AIRa::Tick(RunListEvent* ev) { if (bVal) { Ra[nPlayer].nAction = 2; + Ra[nPlayer].nFrame = 0; } MoveRaToEnemy(nPlayer); diff --git a/source/games/exhumed/src/rex.cpp b/source/games/exhumed/src/rex.cpp index b6030cd46..6fc92568b 100644 --- a/source/games/exhumed/src/rex.cpp +++ b/source/games/exhumed/src/rex.cpp @@ -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; diff --git a/source/games/exhumed/src/scorp.cpp b/source/games/exhumed/src/scorp.cpp index b8dd60d84..018854c13 100644 --- a/source/games/exhumed/src/scorp.cpp +++ b/source/games/exhumed/src/scorp.cpp @@ -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; } diff --git a/source/games/exhumed/src/set.cpp b/source/games/exhumed/src/set.cpp index 11d95781f..65e366eed 100644 --- a/source/games/exhumed/src/set.cpp +++ b/source/games/exhumed/src/set.cpp @@ -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; diff --git a/source/games/exhumed/src/spider.cpp b/source/games/exhumed/src/spider.cpp index 0975d1011..016142e5b 100644 --- a/source/games/exhumed/src/spider.cpp +++ b/source/games/exhumed/src/spider.cpp @@ -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; } } diff --git a/source/games/exhumed/src/wasp.cpp b/source/games/exhumed/src/wasp.cpp index 8fefa51e1..dff86826c 100644 --- a/source/games/exhumed/src/wasp.cpp +++ b/source/games/exhumed/src/wasp.cpp @@ -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;