Set correct next action if npc has no AP

With aiData.bAction = AI_ACTION_NONE and aiData.bNextAction = AI_ACTION_END_TURN, the npc turn is correctly ended in the next call to TurnBasedHandleNPCAI()
This commit is contained in:
Asdow
2024-02-04 16:14:01 +02:00
parent 01327265a3
commit f646bc2bfa
+2
View File
@@ -2493,6 +2493,7 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
if ( pSoldier->bActionPoints <= 0 ) //Action points can be negative
{
pSoldier->aiData.usActionData = NOWHERE;
pSoldier->aiData.bNextAction = AI_ACTION_END_TURN;
return(AI_ACTION_NONE);
}
@@ -5118,6 +5119,7 @@ INT8 DecideActionBlack(SOLDIERTYPE *pSoldier)
if (pSoldier->bActionPoints <= 0)
{
pSoldier->aiData.usActionData = NOWHERE;
pSoldier->aiData.bNextAction = AI_ACTION_END_TURN;
return(AI_ACTION_NONE);
}