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
+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;
}