Fix: merc dying in different sector than we are in currently will now properly spawn items into sector inventory and game will show the red colored message about him dying.

todo: if merc dies off screen, his body/corpse disappears

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9038 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2021-05-23 19:03:23 +00:00
parent 5a2202f5b4
commit 281a005fef
2 changed files with 7 additions and 6 deletions
+6 -5
View File
@@ -80,6 +80,12 @@ void StrategicHandlePlayerTeamMercDeath( SOLDIERTYPE *pSoldier )
//if the soldier HAS a profile
if( pSoldier->ubProfile != NO_PROFILE )
{
//shadooow: moved here so the "merc is dead" message appears before "history log changed" which is what happens in tactical
if (guiCurrentScreen != GAME_SCREEN || !pSoldier->bInSector)
{
ScreenMsg(FONT_RED, MSG_INTERFACE, pMercDeadString[0], pSoldier->name);
}
//add to the history log the fact that the merc died and the circumstances
if( pSoldier->ubAttackerID != NOBODY )
{
@@ -109,11 +115,6 @@ void StrategicHandlePlayerTeamMercDeath( SOLDIERTYPE *pSoldier )
}
}
if ( guiCurrentScreen != GAME_SCREEN )
{
ScreenMsg( FONT_RED, MSG_INTERFACE, pMercDeadString[ 0 ], pSoldier->name );
}
// robot and EPCs don't count against death rate - the mercs back home don't particularly give a damn about locals & machines!
if ( !AM_AN_EPC( pSoldier ) && !AM_A_ROBOT( pSoldier ) )
{
+1 -1
View File
@@ -46,7 +46,7 @@ BOOLEAN HandleStrategicDeath( SOLDIERTYPE *pSoldier )
}
// if not in mapscreen
if ( !(guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN ) )
if ( !(guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN ) && pSoldier->bInSector)
{
// ATE; At least make them dead!
if( ( pSoldier->bAssignment != ASSIGNMENT_DEAD ) )