- tooltips on the enemy are only displayed if the enemy can be seen by the selected merc. This only takes effect if tooltip detail level = 1 (limited) or 2 (basic)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@624 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2006-11-08 21:27:13 +00:00
parent ac91cfb731
commit 447ba8cbf7
10 changed files with 30 additions and 16 deletions
+15 -1
View File
@@ -75,7 +75,7 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
if ( !(Item[MercPtrs[gusSelectedSoldier]->inv[HEAD1POS].usItem].nightvisionrangebonus > 0) &&
!(Item[MercPtrs[gusSelectedSoldier]->inv[HEAD2POS].usItem].nightvisionrangebonus > 0) &&
!DayTime() )
!DayTime() )
{
// if night reduce max tooltip viewing distance by a factor of 4 if merc is not wearing NVG
uiMaxTooltipDistance >>= 2;
@@ -100,6 +100,20 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
} // fMercIsUsingScope is false
} // gGameExternalOptions.fEnableDynamicSoldierTooltips
// WANNE: Check if enemy soldier is in line of sight only if player has not chosen full or debug details
if ( ubTooltipDetailLevel < DL_Full)
{
// Get the current selected merc
SOLDIERTYPE* pMerc = MercPtrs[ gusSelectedSoldier ];
if (ManLooksForMan(pMerc, pSoldier, 1) == FALSE)
{
// We do not see the enemy. Return and do not display the tooltip.
return;
}
}
swprintf( pStrInfo, L"" );
if ( ubTooltipDetailLevel == DL_Debug )
{