mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +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:
@@ -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