mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Bugfix: UDB display/color coding of handling, armor piercing and their respective comparison feature was wrong. Also enabled display of maximum counter force modifier for other items than guns.
Bugfix: Calculation of maximum counter force modifier was wrong. Stance based bonus was applied to gun and each of its attachments. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7275 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3259,7 +3259,7 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
|
||||
|| GetObjectModifier( gpItemDescSoldier, gpItemDescObject, ANIM_CROUCH, ITEMMODIFIER_COUNTERFORCEMAX ) != 0
|
||||
|| GetObjectModifier( gpItemDescSoldier, gpItemDescObject, ANIM_PRONE, ITEMMODIFIER_COUNTERFORCEMAX ) != 0 )
|
||||
{
|
||||
if( UsingNewCTHSystem() == true && Item[gpItemDescObject->usItem].usItemClass == IC_GUN )
|
||||
if( UsingNewCTHSystem() == true ) //&& Item[gpItemDescObject->usItem].usItemClass == IC_GUN )
|
||||
{
|
||||
if (cnt >= sFirstLine && cnt < sLastLine)
|
||||
{
|
||||
@@ -5344,7 +5344,7 @@ void DrawAdvancedStats( OBJECTTYPE * gpItemDescObject )
|
||||
|| GetObjectModifier( gpItemDescSoldier, gpComparedItemDescObject, ANIM_CROUCH, ITEMMODIFIER_COUNTERFORCEMAX ) != 0
|
||||
|| GetObjectModifier( gpItemDescSoldier, gpComparedItemDescObject, ANIM_PRONE, ITEMMODIFIER_COUNTERFORCEMAX ) != 0 ) ) )
|
||||
{
|
||||
if( UsingNewCTHSystem() == true && Item[gpItemDescObject->usItem].usItemClass == IC_GUN )
|
||||
if( UsingNewCTHSystem() == true ) //&& Item[gpItemDescObject->usItem].usItemClass == IC_GUN )
|
||||
{
|
||||
if (cnt >= sFirstLine && cnt < sLastLine)
|
||||
{
|
||||
@@ -6865,7 +6865,7 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject )
|
||||
// Print base value
|
||||
DrawPropertyValueInColour( iHandlingValue, ubNumLine, 1, fComparisonMode, FALSE, TRUE );
|
||||
// Print modifier
|
||||
DrawPropertyValueInColour( iHandlingModifier, ubNumLine, 2, fComparisonMode, TRUE, TRUE );
|
||||
DrawPropertyValueInColour( iHandlingModifier, ubNumLine, 2, fComparisonMode, TRUE, FALSE );
|
||||
// Print final value
|
||||
DrawPropertyValueInColour( iFinalHandlingValue, ubNumLine, 3, fComparisonMode, FALSE, TRUE, FONT_MCOLOR_WHITE );
|
||||
}
|
||||
@@ -6883,11 +6883,11 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject )
|
||||
// Get Final Gun Handling value
|
||||
UINT16 iComparedFinalHandlingValue = iComparedHandlingValue + iComparedHandlingModifier;
|
||||
// Print difference in base value
|
||||
DrawPropertyValueInColour( iComparedHandlingValue - iHandlingValue, ubNumLine, 1, fComparisonMode, FALSE, TRUE );
|
||||
DrawPropertyValueInColour( iComparedHandlingValue - iHandlingValue, ubNumLine, 1, fComparisonMode, FALSE, FALSE );
|
||||
// Print difference in modifier
|
||||
DrawPropertyValueInColour( iComparedHandlingModifier - iHandlingModifier, ubNumLine, 2, fComparisonMode, TRUE, TRUE );
|
||||
DrawPropertyValueInColour( iComparedHandlingModifier - iHandlingModifier, ubNumLine, 2, fComparisonMode, TRUE, FALSE );
|
||||
// Print difference in final value
|
||||
DrawPropertyValueInColour( iComparedFinalHandlingValue - iFinalHandlingValue, ubNumLine, 3, fComparisonMode, FALSE, TRUE );
|
||||
DrawPropertyValueInColour( iComparedFinalHandlingValue - iFinalHandlingValue, ubNumLine, 3, fComparisonMode, FALSE, FALSE );
|
||||
}
|
||||
}
|
||||
else if( fComparisonMode && UsingNewCTHSystem() == TRUE &&
|
||||
@@ -8726,7 +8726,7 @@ void DrawAmmoValues( OBJECTTYPE * gpItemDescObject, int shotsLeft )
|
||||
if( !fComparisonMode )
|
||||
{
|
||||
// Print base value
|
||||
DrawPropertyValueInColourFloat( fArmourImpactReduction, ubNumLine, 1, fComparisonMode, FALSE, TRUE, 0, 1.0f, 2 );
|
||||
DrawPropertyValueInColourFloat( fArmourImpactReduction, ubNumLine, 1, fComparisonMode, FALSE, FALSE, 0, 1.0f, 2 );
|
||||
// Print modifier
|
||||
DrawPropertyTextInColour( L"--", ubNumLine, 2 );
|
||||
// Print final value
|
||||
@@ -8774,11 +8774,11 @@ void DrawAmmoValues( OBJECTTYPE * gpItemDescObject, int shotsLeft )
|
||||
// Get base Tumbling
|
||||
FLOAT fComparedFinalAfterArmourImpactReduction = fComparedAfterArmourImpactReduction;
|
||||
// Print difference in base value
|
||||
DrawPropertyValueInColourFloat( fComparedAfterArmourImpactReduction - fAfterArmourImpactReduction, ubNumLine, 1, fComparisonMode, FALSE, FALSE, 0, 0.0f, 2 );
|
||||
DrawPropertyValueInColourFloat( fComparedAfterArmourImpactReduction - fAfterArmourImpactReduction, ubNumLine, 1, fComparisonMode, FALSE, TRUE, 0, 0.0f, 2 );
|
||||
// Print difference in modifier
|
||||
DrawPropertyTextInColour( L"=", ubNumLine, 2 );
|
||||
// Print difference in final value
|
||||
DrawPropertyValueInColourFloat( fComparedFinalAfterArmourImpactReduction - fFinalAfterArmourImpactReduction, ubNumLine, 3, fComparisonMode, FALSE, FALSE, 0, 0.0f, 2 );
|
||||
DrawPropertyValueInColourFloat( fComparedFinalAfterArmourImpactReduction - fFinalAfterArmourImpactReduction, ubNumLine, 3, fComparisonMode, FALSE, TRUE, 0, 0.0f, 2 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11248,8 +11248,8 @@ void DrawAdvancedValues( OBJECTTYPE *gpItemDescObject )
|
||||
iComparedModifier[1] = GetObjectModifier( gpItemDescSoldier, gpComparedItemDescObject, ANIM_CROUCH, ITEMMODIFIER_COUNTERFORCEMAX );
|
||||
iComparedModifier[2] = GetObjectModifier( gpItemDescSoldier, gpComparedItemDescObject, ANIM_PRONE, ITEMMODIFIER_COUNTERFORCEMAX );
|
||||
}
|
||||
if ( ((iModifier[0] != 0 || iModifier[1] != 0 || iModifier[2] != 0) && UsingNewCTHSystem() == true && Item[gpItemDescObject->usItem].usItemClass == IC_GUN ) ||
|
||||
( fComparisonMode && (iComparedModifier[0] != 0 || iComparedModifier[1] != 0 || iComparedModifier[2] != 0) && UsingNewCTHSystem() == true && Item[gpComparedItemDescObject->usItem].usItemClass == IC_GUN ) )
|
||||
if ( ((iModifier[0] != 0 || iModifier[1] != 0 || iModifier[2] != 0) && UsingNewCTHSystem() == true /*&& Item[gpItemDescObject->usItem].usItemClass == IC_GUN*/ ) ||
|
||||
( fComparisonMode && (iComparedModifier[0] != 0 || iComparedModifier[1] != 0 || iComparedModifier[2] != 0) && UsingNewCTHSystem() == true /*&& Item[gpComparedItemDescObject->usItem].usItemClass == IC_GUN*/ ) )
|
||||
{
|
||||
if (cnt >= sFirstLine && cnt < sLastLine)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user