If LOWER_VISION_WHILE_RUNNING in JA2_Options.ini is set to 1 (default 0), vision range is lowered by 25% while running (2: only for player team)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8669 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2019-02-17 19:46:53 +00:00
parent 8fa754f072
commit a87707b36b
3 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -1246,7 +1246,7 @@ void LoadGameExternalOptions()
// Tunnel Vision
gGameExternalOptions.gfAllowLimitedVision = iniReader.ReadBoolean("Tactical Vision Settings","ALLOW_TUNNEL_VISION",0);
gGameExternalOptions.usLowerVisionWhileRunning = iniReader.ReadInteger("Tactical Vision Settings", "LOWER_VISION_WHILE_RUNNING", 0, 0, 2 );
//################# Tactical Tooltip Settings #################
+1
View File
@@ -577,6 +577,7 @@ typedef struct
INT8 ubBrightnessVisionMod[16];
BOOLEAN gfAllowLimitedVision;
UINT8 usLowerVisionWhileRunning;
BOOLEAN gfShiftFUnloadWeapons;
BOOLEAN gfShiftFRemoveAttachments;
+12
View File
@@ -14808,6 +14808,18 @@ INT16 SOLDIERTYPE::GetSightRangeBonus( )
if ( DoesMercHaveDisability( this, SHORTSIGHTED ) )
bonus -= 10;
if ( (gGameExternalOptions.usLowerVisionWhileRunning == 1) || ( gGameExternalOptions.usLowerVisionWhileRunning == 2 && bTeam == gbPlayerNum ) )
{
// Flugente: We have to decide depending on the animation we have, otherwise we can cause bugs if we do this after being hit by an explosion etc.
switch ( this->usAnimState )
{
case RUNNING:
case RUNNING_W_PISTOL:
bonus -= 25;
break;
}
}
return bonus;
}