mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user