From 33cb09366c096b14a3bed87571739450b1299f21 Mon Sep 17 00:00:00 2001 From: silversurfer Date: Sun, 15 Feb 2015 09:26:09 +0000 Subject: [PATCH] enhancement: in NCTH the EDB now shows the effective mag factor for a gun in the final column. This should make it easier to decide who will profit most from a scope on the gun. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7739 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Interface Enhanced.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tactical/Interface Enhanced.cpp b/Tactical/Interface Enhanced.cpp index 36e37a763..3946caae5 100644 --- a/Tactical/Interface Enhanced.cpp +++ b/Tactical/Interface Enhanced.cpp @@ -7050,6 +7050,8 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject ) FLOAT iScopeMagModifier = GetHighestScopeMagnificationFactor( gpItemDescObject ); // Get final Magnification value FLOAT iFinalScopeMagValue = __max( iScopeMagValue, iScopeMagModifier ); + // get the real effective mag factor for this soldier + iFinalScopeMagValue = CalcEffectiveMagFactor(gpItemDescSoldier, iFinalScopeMagValue); if( !fComparisonMode ) { @@ -7074,6 +7076,8 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject ) FLOAT iComparedScopeMagModifier = GetHighestScopeMagnificationFactor( gpComparedItemDescObject ); // Get final Magnification value FLOAT iComparedFinalScopeMagValue = __max( iComparedScopeMagValue, iComparedScopeMagModifier ); + // get the real effective mag factor for this soldier + iComparedFinalScopeMagValue = CalcEffectiveMagFactor(gpItemDescSoldier, iComparedFinalScopeMagValue); // Print difference in base value DrawPropertyValueInColourFloat( iComparedScopeMagValue - iScopeMagValue, ubNumLine, 1, fComparisonMode, FALSE, TRUE ); @@ -7092,6 +7096,9 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject ) FLOAT iScopeMagModifier = GetHighestScopeMagnificationFactor( gpComparedItemDescObject ); // Get final Magnification value FLOAT iFinalScopeMagValue = __max( iScopeMagValue, iScopeMagModifier ); + // get the real effective mag factor for this soldier + iFinalScopeMagValue = CalcEffectiveMagFactor(gpItemDescSoldier, iFinalScopeMagValue); + // Print base value if( iScopeMagValue > 1.0f ) DrawPropertyValueInColourFloat( iScopeMagValue, ubNumLine, 1, fComparisonMode, FALSE, TRUE );