From bef9d82933c0420be895cea71cb335e357c92432 Mon Sep 17 00:00:00 2001 From: Overhaul Date: Thu, 2 Aug 2007 09:04:59 +0000 Subject: [PATCH] Fix for freeze when AI killed by mines or other self-inflicted wounds git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1150 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TacticalAI/AIMain.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TacticalAI/AIMain.cpp b/TacticalAI/AIMain.cpp index 1490558a..b92fd553 100644 --- a/TacticalAI/AIMain.cpp +++ b/TacticalAI/AIMain.cpp @@ -1213,6 +1213,12 @@ void ActionDone(SOLDIERTYPE *pSoldier) // although NewDest isn't called. A newSit. could cancel it before then! pSoldier->bPathStored = FALSE; } + + if (pSoldier->uiStatusFlags & SOLDIER_DEAD) + { + // The last action killed the soldier (stepped on a mine, detonated a LAW too close, etc) + EndAIGuysTurn( pSoldier); + } }