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