diff --git a/src/shared/rewolf/w_beamgun.c b/src/shared/rewolf/w_beamgun.c index 48cda5fb..a4f8d649 100644 --- a/src/shared/rewolf/w_beamgun.c +++ b/src/shared/rewolf/w_beamgun.c @@ -44,8 +44,6 @@ w_beamgun_release(void) { player pl = (player)self; - pl.flags |= FL_SEMI_TOGGLED; - if (pl.w_idle_next) { return; } @@ -60,13 +58,13 @@ w_beamgun_primary(void) vector src; player pl = (player)self; - if not (pl.flags & FL_SEMI_TOGGLED) { + if (pl.flags & FL_SEMI_TOGGLED) { return; } if (pl.a_ammo1 > 0) { pl.a_ammo1 = 0; - pl.flags &= ~FL_SEMI_TOGGLED; + pl.flags |= FL_SEMI_TOGGLED; Weapons_ViewAnimation(BEAMGUN_CONFIG); pl.w_attack_next = 2.26087f; pl.w_idle_next = 2.26087f; @@ -92,11 +90,11 @@ w_beamgun_secondary(void) { player pl = (player)self; - if not (pl.flags & FL_SEMI_TOGGLED) { + if (pl.flags & FL_SEMI_TOGGLED) { return; } - pl.flags &= ~FL_SEMI_TOGGLED; + pl.flags |= FL_SEMI_TOGGLED; if (pl.w_attack_next) { return; diff --git a/src/shared/rewolf/w_chemicalgun.c b/src/shared/rewolf/w_chemicalgun.c index b40e033f..5f166895 100644 --- a/src/shared/rewolf/w_chemicalgun.c +++ b/src/shared/rewolf/w_chemicalgun.c @@ -43,13 +43,13 @@ w_chemicalgun_primary(void) vector src; player pl = (player)self; - if not (pl.flags & FL_SEMI_TOGGLED) { + if (pl.flags & FL_SEMI_TOGGLED) { return; } if (pl.a_ammo1 > 0) { pl.a_ammo1 = 0; - pl.flags &= ~FL_SEMI_TOGGLED; + pl.flags |= FL_SEMI_TOGGLED; Weapons_ViewAnimation(CHEMGUN_CONFIG); pl.w_attack_next = 2.08f; pl.w_idle_next = pl.w_attack_next; @@ -75,11 +75,11 @@ w_chemicalgun_secondary(void) { player pl = (player)self; - if not (pl.flags & FL_SEMI_TOGGLED) { + if (pl.flags & FL_SEMI_TOGGLED) { return; } - pl.flags &= ~FL_SEMI_TOGGLED; + pl.flags |= FL_SEMI_TOGGLED; if (pl.w_attack_next) { return; @@ -98,8 +98,6 @@ w_chemicalgun_release(void) { player pl = (player)self; - pl.flags |= FL_SEMI_TOGGLED; - if (pl.w_idle_next) { return; } diff --git a/src/shared/rewolf/w_dml.c b/src/shared/rewolf/w_dml.c index dce14891..e18c2903 100644 --- a/src/shared/rewolf/w_dml.c +++ b/src/shared/rewolf/w_dml.c @@ -90,7 +90,7 @@ void w_dml_release(void) { player pl = (player)self; - pl.flags |= FL_SEMI_TOGGLED; + if (pl.w_idle_next) { return; } @@ -131,13 +131,13 @@ w_dml_primary(void) vector src; player pl = (player)self; - if not (pl.flags & FL_SEMI_TOGGLED) { + if (pl.flags & FL_SEMI_TOGGLED) { return; } if (pl.a_ammo1 > 0) { pl.a_ammo1 = 0; - pl.flags &= ~FL_SEMI_TOGGLED; + pl.flags |= FL_SEMI_TOGGLED; Weapons_ViewAnimation(DML_CUSTOMIZE); #ifdef SERVER Sound_Play(pl, 8, "weapon_dml.customize"); @@ -173,11 +173,11 @@ w_dml_secondary(void) { player pl = (player)self; - if not (pl.flags & FL_SEMI_TOGGLED) { + if (pl.flags & FL_SEMI_TOGGLED) { return; } - pl.flags &= ~FL_SEMI_TOGGLED; + pl.flags |= FL_SEMI_TOGGLED; if (pl.w_attack_next) { return; diff --git a/src/shared/rewolf/w_gausspistol.c b/src/shared/rewolf/w_gausspistol.c index 1011b9ca..67ec5757 100644 --- a/src/shared/rewolf/w_gausspistol.c +++ b/src/shared/rewolf/w_gausspistol.c @@ -58,8 +58,6 @@ w_gausspistol_release(void) { player pl = (player)self; - pl.flags |= FL_SEMI_TOGGLED; - if (pl.w_idle_next) { return; } @@ -86,13 +84,13 @@ w_gausspistol_primary(void) int take = 1; player pl = (player)self; - if not (pl.flags & FL_SEMI_TOGGLED) { + if (pl.flags & FL_SEMI_TOGGLED) { return; } if (pl.a_ammo1 > 0) { pl.a_ammo1 = 0; - pl.flags &= ~FL_SEMI_TOGGLED; + pl.flags |= FL_SEMI_TOGGLED; return; } @@ -129,7 +127,7 @@ w_gausspistol_primary(void) pl.w_idle_next = 5.0f; break; default: - pl.flags &= ~FL_SEMI_TOGGLED; + pl.flags |= FL_SEMI_TOGGLED; Weapons_ViewAnimation(GP_FIRESINGLE); #ifdef SERVER Sound_Play(pl, CHAN_WEAPON, "weapon_gausspistol.firesingle"); @@ -155,11 +153,11 @@ w_gausspistol_secondary(void) { player pl = (player)self; - if not (pl.flags & FL_SEMI_TOGGLED) { + if (pl.flags & FL_SEMI_TOGGLED) { return; } - pl.flags &= ~FL_SEMI_TOGGLED; + pl.flags |= FL_SEMI_TOGGLED; /* activate menu */ pl.a_ammo1 = 1; diff --git a/src/shared/rewolf/w_grenade.c b/src/shared/rewolf/w_grenade.c index 302dac61..b64ff71a 100644 --- a/src/shared/rewolf/w_grenade.c +++ b/src/shared/rewolf/w_grenade.c @@ -45,13 +45,13 @@ w_grenade_primary(void) vector src; player pl = (player)self; - if not (pl.flags & FL_SEMI_TOGGLED) { + if (pl.flags & FL_SEMI_TOGGLED) { return; } if (pl.a_ammo1 > 0) { pl.a_ammo1 = 0; - pl.flags &= ~FL_SEMI_TOGGLED; + pl.flags |= FL_SEMI_TOGGLED; Weapons_ViewAnimation(GREN_FIDGET); pl.w_attack_next = 1.2f; pl.w_idle_next = pl.w_attack_next; @@ -77,11 +77,11 @@ w_grenade_secondary(void) { player pl = (player)self; - if not (pl.flags & FL_SEMI_TOGGLED) { + if (pl.flags & FL_SEMI_TOGGLED) { return; } - pl.flags &= ~FL_SEMI_TOGGLED; + pl.flags |= FL_SEMI_TOGGLED; if (pl.w_attack_next) { return; @@ -104,8 +104,6 @@ w_grenade_release(void) { player pl = (player)self; - pl.flags |= FL_SEMI_TOGGLED; - if (pl.w_idle_next) { return; } diff --git a/src/shared/rewolf/w_shotgun.c b/src/shared/rewolf/w_shotgun.c index 13dda6c2..5d0183ed 100644 --- a/src/shared/rewolf/w_shotgun.c +++ b/src/shared/rewolf/w_shotgun.c @@ -68,13 +68,13 @@ w_shotgun_primary(void) vector src; player pl = (player)self; - if not (pl.flags & FL_SEMI_TOGGLED) { + if (pl.flags & FL_SEMI_TOGGLED) { return; } if (pl.a_ammo1 > 0) { pl.a_ammo1 = 0; - pl.flags &= ~FL_SEMI_TOGGLED; + pl.flags |= FL_SEMI_TOGGLED; Weapons_ViewAnimation(SHOTGUN_CUSTOMIZE); pl.w_attack_next = 2.25f; pl.w_idle_next = 2.25f; @@ -137,13 +137,11 @@ w_shotgun_secondary(void) { player pl = (player)self; - if not (pl.flags & FL_SEMI_TOGGLED) { + if (pl.w_attack_next) { return; } - pl.flags &= ~FL_SEMI_TOGGLED; - - if (pl.w_attack_next) { + if (pl.flags & FL_SEMI_TOGGLED) { return; } @@ -157,13 +155,14 @@ w_shotgun_secondary(void) pl.a_ammo1 = 1; } } + + pl.flags |= FL_SEMI_TOGGLED; } void w_shotgun_release(void) { player pl = (player)self; - pl.flags |= FL_SEMI_TOGGLED; if (pl.w_idle_next) { return;