fix: if merc dies off screen and is not between sectors, create his corpse and items at the last position he was, when the sector was loaded instead of random GridNo

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9041 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2021-05-24 01:14:34 +00:00
parent c890640e1d
commit 0fbf72cc74
+6 -1
View File
@@ -86,7 +86,12 @@ BOOLEAN HandleStrategicDeath( SOLDIERTYPE *pSoldier )
HandleSoldierDeadComments( pSoldier );
// put the dead guys down
AddDeadSoldierToUnLoadedSector( ( UINT8 ) ( pSoldier->sSectorX ), ( UINT8 )( pSoldier->sSectorY ), pSoldier->bSectorZ, pSoldier, RandomGridNo(), ADD_DEAD_SOLDIER_TO_SWEETSPOT );
INT32 sGridNo = pSoldier->sInsertionGridNo;
if (pSoldier->flags.fBetweenSectors || TileIsOutOfBounds(sGridNo))
{
sGridNo = RandomGridNo();
}
AddDeadSoldierToUnLoadedSector( ( UINT8 ) ( pSoldier->sSectorX ), ( UINT8 )( pSoldier->sSectorY ), pSoldier->bSectorZ, pSoldier, sGridNo, ADD_DEAD_SOLDIER_TO_SWEETSPOT );
fTeamPanelDirty = TRUE;
fMapPanelDirty = TRUE;