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