- updated Shadow Warrior's tooltip code

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@536 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2006-09-18 20:30:20 +00:00
parent 6f06b9ce78
commit 7bd0bda5f0
7 changed files with 13 additions and 34 deletions
+3 -28
View File
@@ -49,7 +49,8 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
if ( gusSelectedSoldier != NOBODY )
iRangeToTarget = GetRangeInCellCoordsFromGridNoDiff( MercPtrs[ gusSelectedSoldier ]->sGridNo, sSoldierGridNo ) / 10;
if ( gGameExternalOptions.fEnableDynamicSoldierTooltips )
// WANNE NEW
//if ( gGameExternalOptions.fEnableDynamicSoldierTooltips )
{
for ( INT32 cnt = 0; cnt < MAX_ATTACHMENTS; cnt++ )
{
@@ -297,10 +298,6 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
void DisplayWeaponInfo( SOLDIERTYPE* pSoldier, CHAR16* pStrInfo, UINT8 ubSlot, UINT8 ubTooltipDetailLevel )
{
const int TriggerGroup = 1026;
const int GunBarrelExtender = 310;
const int CMagAdapter556mm = 1001;
const int CMagAdapter9mm = 1002;
INT32 iNumAttachments = 0;
BOOLEAN fDisplayAttachment = FALSE;
@@ -358,31 +355,9 @@ void DisplayWeaponInfo( SOLDIERTYPE* pSoldier, CHAR16* pStrInfo, UINT8 ubSlot, U
if ( ubTooltipDetailLevel == DL_Basic )
{
// display only externally-visible weapon attachments
// don't display inseparable attachments such as the integral GLs on OICW & AICW
if ( !Item[pSoldier->inv[ubSlot].usAttachItem[ cnt ]].inseparable )
{
if ( pSoldier->inv[ubSlot].usAttachItem[ cnt ] != TriggerGroup )
if ( !Item[pSoldier->inv[ubSlot].usAttachItem[ cnt ]].hiddenattachment )
{
fDisplayAttachment = TRUE;
}
}
else
{
// display C-mags and barrel extensions
switch( pSoldier->inv[ubSlot].usAttachItem[ cnt ] )
{
case GunBarrelExtender:
fDisplayAttachment = TRUE;
break;
case CMagAdapter556mm:
fDisplayAttachment = TRUE;
break;
case CMagAdapter9mm:
fDisplayAttachment = TRUE;
break;
default:
break;
}
}
}
else