- bugfix: CTD when tooltip should be displayed on militia and no merc is in that sector

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@673 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2007-01-21 19:31:48 +00:00
parent 6760b2d177
commit fd849275b2
2 changed files with 8 additions and 1 deletions
BIN
View File
Binary file not shown.
+7
View File
@@ -50,7 +50,14 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
// get the distance to enemy's tile from the selected merc // get the distance to enemy's tile from the selected merc
if ( gusSelectedSoldier != NOBODY ) if ( gusSelectedSoldier != NOBODY )
{
iRangeToTarget = GetRangeInCellCoordsFromGridNoDiff( MercPtrs[ gusSelectedSoldier ]->sGridNo, sSoldierGridNo ) / 10; iRangeToTarget = GetRangeInCellCoordsFromGridNoDiff( MercPtrs[ gusSelectedSoldier ]->sGridNo, sSoldierGridNo ) / 10;
}
// WANNE: If we want to show the tooltip of milita and no merc is present in the sector
else
{
return;
}
if ( gGameExternalOptions.fEnableDynamicSoldierTooltips ) if ( gGameExternalOptions.fEnableDynamicSoldierTooltips )
{ {