Permalink
Browse files

cgame: fix Sniper zoom is available even sniper isn't quipped, refs #…

…1024
  • Loading branch information...
Aranud committed Nov 13, 2017
1 parent 20a574a commit e077a11a53a49dbc84c10269863884d5406f0e9e
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/cgame/cg_weapons.c
View
@@ -3051,12 +3051,12 @@ void CG_AddPlayerWeapon(refEntity_t *parent, playerState_t *ps, centity_t *cent)
CG_FlamethrowerFlame(cent, flash.origin);
// make a dlight for the flash
if(!(muzzleContents & MASK_WATER))
if (!(muzzleContents & MASK_WATER))
{
if (weapon->flashDlightColor[0] != 0.f || weapon->flashDlightColor[1] != 0.f || weapon->flashDlightColor[2] != 0.f)
{
trap_R_AddLightToScene(flash.origin, 320, 1.25 + (rand() & 31) / 128.0f, weapon->flashDlightColor[0],
weapon->flashDlightColor[1], weapon->flashDlightColor[2], 0, 0);
weapon->flashDlightColor[1], weapon->flashDlightColor[2], 0, 0);
}
}
}
@@ -3901,10 +3901,10 @@ void CG_AltWeapon_f(void)
if (cg.time - cg.weaponSelectTime < cg_weaponCycleDelay.integer)
{
return; // force pause so holding it down won't go too fast
}
// Don't try to switch when in the middle of reloading.
if (cg.snap->ps.weaponstate == WEAPON_RELOADING)
// Don't try to switch when in the middle of reloading or firing.
if (cg.snap->ps.weaponstate == WEAPON_RELOADING || cg.snap->ps.weaponstate == WEAPON_FIRING)
{
return;
}

0 comments on commit e077a11

Please sign in to comment.