mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Bugfix for laser performance bonus
The brightness modifier was calculated incorrectly. Also changed formula a bit to allow a better range of values. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6411 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2483,7 +2483,7 @@ BOOLEAN DrawCTHIndicator()
|
||||
fLaserBonus = gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE;
|
||||
|
||||
// light level influences how easy it is to spot the laser dot on the target
|
||||
FLOAT fBrightnessModifier = 1.0 - ( (FLOAT)(bLightLevel - SHADE_MAX) / (FLOAT)(SHADE_MIN - SHADE_MAX) );
|
||||
FLOAT fBrightnessModifier = (FLOAT)(bLightLevel) / (FLOAT)(NORMAL_LIGHTLEVEL_NIGHT);
|
||||
|
||||
// laser fully efficient
|
||||
if ( gCTHDisplay.iBestLaserRange > d2DDistance )
|
||||
|
||||
+1
-1
@@ -7555,7 +7555,7 @@ void AdjustTargetCenterPoint( SOLDIERTYPE *pShooter, INT32 iTargetGridNo, FLOAT
|
||||
fLaserBonus = gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE;
|
||||
|
||||
// light level influences how easy it is to spot the laser dot on the target
|
||||
FLOAT fBrightnessModifier = 1.0 - ( (FLOAT)(bLightLevel - SHADE_MAX) / (FLOAT)(SHADE_MIN - SHADE_MAX) );
|
||||
FLOAT fBrightnessModifier = (FLOAT)(bLightLevel) / (FLOAT)(NORMAL_LIGHTLEVEL_NIGHT);
|
||||
|
||||
// laser fully efficient
|
||||
if ( gCTHDisplay.iBestLaserRange > d2DDistance )
|
||||
|
||||
Reference in New Issue
Block a user