Skip to content

Commit 6dc4a5f

Browse files
committed
gameplay: sniper reload upgrade doesn't apply without auto rezoom
I've decided to only apply the speed up to the shared 0.9 second delay between auto rezoom and non-autorezoom for regression considerations ref: ValveSoftware/Source-1-Games#4657
1 parent 62fb9ff commit 6dc4a5f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/game/shared/tf/tf_weapon_sniperrifle.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -523,19 +523,19 @@ void CTFSniperRifle::ZoomOutIn( void )
523523
ZoomOut();
524524

525525
CTFPlayer *pPlayer = GetTFPlayerOwner();
526+
float flRezoomDelay = 0.9f;
527+
if ( !UsesClipsForAmmo1() )
528+
{
529+
// Since sniper rifles don't actually use clips the fast reload hook also affects unzoom and zoom delays
530+
ApplyScopeSpeedModifications( flRezoomDelay );
531+
}
526532
if ( pPlayer && pPlayer->ShouldAutoRezoom() )
527533
{
528-
float flRezoomDelay = 0.9f;
529-
if ( !UsesClipsForAmmo1() )
530-
{
531-
// Since sniper rifles don't actually use clips the fast reload hook also affects unzoom and zoom delays
532-
ApplyScopeSpeedModifications( flRezoomDelay );
533-
}
534534
m_flRezoomTime = gpGlobals->curtime + flRezoomDelay;
535535
}
536536
else
537537
{
538-
m_flNextSecondaryAttack = gpGlobals->curtime + 1.0f;
538+
m_flNextSecondaryAttack = gpGlobals->curtime + flRezoomDelay + 0.1f;
539539
}
540540
}
541541

0 commit comments

Comments
 (0)