mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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:
+1
-1
@@ -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 #################
|
||||
|
||||
|
||||
@@ -577,6 +577,7 @@ typedef struct
|
||||
INT8 ubBrightnessVisionMod[16];
|
||||
|
||||
BOOLEAN gfAllowLimitedVision;
|
||||
UINT8 usLowerVisionWhileRunning;
|
||||
|
||||
BOOLEAN gfShiftFUnloadWeapons;
|
||||
BOOLEAN gfShiftFRemoveAttachments;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user