mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Prevent AI deadlocks
Canceling current AI actions at the start of soldier's turn prevents a lot of ai deadlocks. The status RED & BLACK actions are supposed re-evaluate the situation every turn anyways
This commit is contained in:
@@ -1817,6 +1817,7 @@ void RefreshAI(SOLDIERTYPE *pSoldier)
|
|||||||
if ((pSoldier->aiData.bAlertStatus == STATUS_BLACK) || (pSoldier->aiData.bAlertStatus == STATUS_RED))
|
if ((pSoldier->aiData.bAlertStatus == STATUS_BLACK) || (pSoldier->aiData.bAlertStatus == STATUS_RED))
|
||||||
{
|
{
|
||||||
// always freshly rethink things at start of his turn
|
// always freshly rethink things at start of his turn
|
||||||
|
CancelAIAction(pSoldier, FALSE);
|
||||||
pSoldier->aiData.bNewSituation = IS_NEW_SITUATION;
|
pSoldier->aiData.bNewSituation = IS_NEW_SITUATION;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user