mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- updated Soldier tooltips
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@625 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -27,6 +27,7 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
|
||||
extern void GetSoldierScreenRect(SOLDIERTYPE*,SGPRect*);
|
||||
GetSoldierScreenRect( pSoldier, &aRect );
|
||||
INT16 a1,a2;
|
||||
BOOLEAN fDrawTooltip = FALSE;
|
||||
|
||||
if ( gfKeyState[ALT] && pSoldier &&
|
||||
IsPointInScreenRectWithRelative( gusMouseXPos, gusMouseYPos, &aRect, &a1, &a2 ) )
|
||||
@@ -42,6 +43,8 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
|
||||
UINT8 ubTooltipDetailLevel = gGameExternalOptions.ubSoldierTooltipDetailLevel;
|
||||
UINT32 uiMaxTooltipDistance = gGameExternalOptions.ubStraightSightRange;
|
||||
|
||||
fDrawTooltip = TRUE;
|
||||
|
||||
// get the gridno the cursor is at
|
||||
GetMouseMapPos( &sSoldierGridNo );
|
||||
|
||||
@@ -93,8 +96,8 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
|
||||
}
|
||||
else
|
||||
{
|
||||
// beyond visual range, do not display tooltip if player has not chosen full or debug details
|
||||
if ( ubTooltipDetailLevel < DL_Full )
|
||||
// beyond visual range, do not display tooltip if player has not chosen debug details
|
||||
if ( ubTooltipDetailLevel < DL_Debug )
|
||||
return;
|
||||
}
|
||||
} // fMercIsUsingScope is false
|
||||
@@ -107,7 +110,8 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
|
||||
// Get the current selected merc
|
||||
SOLDIERTYPE* pMerc = MercPtrs[ gusSelectedSoldier ];
|
||||
|
||||
if (ManLooksForMan(pMerc, pSoldier, 1) == FALSE)
|
||||
if ( pMerc->bOppList[pSoldier->ubID] != SEEN_CURRENTLY )
|
||||
//if (ManLooksForMan(pMerc, pSoldier, 1) == FALSE)
|
||||
{
|
||||
// We do not see the enemy. Return and do not display the tooltip.
|
||||
return;
|
||||
@@ -301,7 +305,7 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
|
||||
wcscpy( pRegion->FastHelpText, pStrInfo );
|
||||
}
|
||||
|
||||
if ( gfKeyState[ ALT ] )
|
||||
if ( gfKeyState[ ALT ] && fDrawTooltip )
|
||||
{
|
||||
DrawMouseTooltip();
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
|
||||
Reference in New Issue
Block a user