From 62aa8acd3ede95bf9147d70141930a7e9e5dde05 Mon Sep 17 00:00:00 2001 From: Flugente Date: Wed, 21 Aug 2013 19:14:43 +0000 Subject: [PATCH] Fix: previous fix was very bad git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6301 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Weapons.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tactical/Weapons.cpp b/Tactical/Weapons.cpp index 164318b0..29fdf03e 100644 --- a/Tactical/Weapons.cpp +++ b/Tactical/Weapons.cpp @@ -5011,7 +5011,7 @@ UINT32 CalcNewChanceToHitGun(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 ubAimTi gbForceWeaponNotReady = false; // Flugente: blind soldiers have sDistVisNoScope = 0... - scopeRangeMod = (float)sDistVis / (float)min(1.0f, sDistVisNoScope); // percentage DistVis has been enhanced due to an attached scope + scopeRangeMod = (float)sDistVis / (float)max(1.0f, sDistVisNoScope); // percentage DistVis has been enhanced due to an attached scope iSightRange = (INT32)(iSightRange / scopeRangeMod); if(iSightRange > 0){ //CHRISL: The LOS system, which determines whether to display an enemy unit, does not factor in the AimBonus tag during it's calculations. So having