Bugfix: This should finally fix the deadlock that could happen when someone was running through a letal gas cloud and died in it.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7405 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2014-08-24 11:23:15 +00:00
parent 27c9a9ce6b
commit 75e9ab3883
+8
View File
@@ -9693,6 +9693,14 @@ void HandleTakeDamageDeath( SOLDIERTYPE *pSoldier, UINT8 bOldLife, UINT8 ubReaso
pSoldier->flags.fInNonintAnim = FALSE;
}
// silversurfer: fix for the deadlock that could happen when the victim was running through a gas cloud that lead to his death.
// If he is near death the next check will make him collapse. If he is really dead then he won't move anywhere anyway
// so it should be safe to stop him here.
if ( pSoldier->stats.bLife < OKLIFE && !pSoldier->bCollapsed )
{
pSoldier->EVENT_StopMerc( pSoldier->sGridNo, pSoldier->ubDirection );
}
// Check for < OKLIFE
if ( pSoldier->stats.bLife < OKLIFE && pSoldier->stats.bLife != 0 && !pSoldier->bCollapsed )
{