mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
BUGFIX 497 - Aim Level function was not allowing negative aim levels which might initially make sense, but if any modifiers would result in a negative value, we'd end up with an high value which would then get reset by the built in limits. I've recast the variable to an INT8 which will allow negative results, at least prior to the built in limits being applied.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4481 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2504,15 +2504,15 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
|
||||
{
|
||||
if( UsingNewCTHSystem() == false )
|
||||
{
|
||||
swprintf( pStr, L"%s", szUDBAdvStatsTooltipText[ 46 ]);
|
||||
swprintf( pStr, L"%s", szUDBAdvStatsTooltipText[ 47 ]);
|
||||
}
|
||||
else if (Item[ gpItemDescObject->usItem ].usItemClass & (IC_WEAPON|IC_PUNCH))
|
||||
{
|
||||
swprintf( pStr, L"%s%s", szUDBAdvStatsTooltipText[ 46 ], szUDBAdvStatsExplanationsTooltipTextForWeapons[ 46 ]);
|
||||
swprintf( pStr, L"%s%s", szUDBAdvStatsTooltipText[ 47 ], szUDBAdvStatsExplanationsTooltipTextForWeapons[ 47 ]);
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( pStr, L"%s%s", szUDBAdvStatsTooltipText[ 46 ], szUDBAdvStatsExplanationsTooltipText[ 46 ]);
|
||||
swprintf( pStr, L"%s%s", szUDBAdvStatsTooltipText[ 47 ], szUDBAdvStatsExplanationsTooltipText[ 47 ]);
|
||||
}
|
||||
SetRegionFastHelpText( &(gUDBFasthelpRegions[ iFirstDataRegion + (cnt-sFirstLine) ]), pStr );
|
||||
MSYS_EnableRegion( &gUDBFasthelpRegions[ iFirstDataRegion + (cnt-sFirstLine) ] );
|
||||
@@ -2531,15 +2531,15 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
|
||||
{
|
||||
if( UsingNewCTHSystem() == false )
|
||||
{
|
||||
swprintf( pStr, L"%s", szUDBAdvStatsTooltipText[ 47 ]);
|
||||
swprintf( pStr, L"%s", szUDBAdvStatsTooltipText[ 46 ]);
|
||||
}
|
||||
else if (Item[ gpItemDescObject->usItem ].usItemClass & (IC_WEAPON|IC_PUNCH))
|
||||
{
|
||||
swprintf( pStr, L"%s%s", szUDBAdvStatsTooltipText[ 47 ], szUDBAdvStatsExplanationsTooltipTextForWeapons[ 47 ]);
|
||||
swprintf( pStr, L"%s%s", szUDBAdvStatsTooltipText[ 46 ], szUDBAdvStatsExplanationsTooltipTextForWeapons[ 46 ]);
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( pStr, L"%s%s", szUDBAdvStatsTooltipText[ 47 ], szUDBAdvStatsExplanationsTooltipText[ 47 ]);
|
||||
swprintf( pStr, L"%s%s", szUDBAdvStatsTooltipText[ 46 ], szUDBAdvStatsExplanationsTooltipText[ 46 ]);
|
||||
}
|
||||
SetRegionFastHelpText( &(gUDBFasthelpRegions[ iFirstDataRegion + (cnt-sFirstLine) ]), pStr );
|
||||
MSYS_EnableRegion( &gUDBFasthelpRegions[ iFirstDataRegion + (cnt-sFirstLine) ] );
|
||||
|
||||
+1
-1
@@ -11622,7 +11622,7 @@ UINT8 GetAllowedAimingLevelsForItem( SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj, UI
|
||||
return 1;
|
||||
}
|
||||
|
||||
UINT8 aimLevels = 4;
|
||||
INT8 aimLevels = 4;
|
||||
|
||||
// HEADROCK HAM B2.6: Dynamic aiming level restrictions based on gun type and attachments.
|
||||
// HEADROCK HAM 3.5: Revamped this - it was illogically constructed.
|
||||
|
||||
Reference in New Issue
Block a user