diff --git a/actions.qc b/actions.qc index a474f55..fcc73f2 100644 --- a/actions.qc +++ b/actions.qc @@ -498,7 +498,7 @@ void() TeamFortress_ReloadCurrentWeapon = self.reload_shotgun = RE_SHOTGUN - self.ammo_shells; sprint(self, PRINT_HIGH, "reloading...\n"); - self.tfstate = (self.tfstate | TFSTATE_RELOADING); + self.tfstate |= TFSTATE_RELOADING; tWeapon = spawn(); tWeapon.netname = "reloadtimer"; //WK For Judoka code tWeapon.owner = self; @@ -535,7 +535,7 @@ void() TeamFortress_ReloadCurrentWeapon = self.reload_super_shotgun = RE_SUPER_SHOTGUN - self.ammo_shells; sprint (self, PRINT_HIGH, "reloading...\n"); - self.tfstate = (self.tfstate | TFSTATE_RELOADING); + self.tfstate |= TFSTATE_RELOADING; tWeapon = spawn(); tWeapon.netname = "reloadtimer"; //WK For Judoka code tWeapon.owner = self; @@ -572,7 +572,7 @@ void() TeamFortress_ReloadCurrentWeapon = self.reload_laser_cannon = RE_LASER_CANNON - self.ammo_cells; sprint (self, PRINT_HIGH, "Charging cannon...\n"); - self.tfstate = (self.tfstate | TFSTATE_RELOADING); + self.tfstate |= TFSTATE_RELOADING; tWeapon = spawn(); tWeapon.netname = "reloadtimer"; //WK For Judoka code tWeapon.owner = self; @@ -609,7 +609,7 @@ void() TeamFortress_ReloadCurrentWeapon = self.reload_light_assault = RE_LIGHT_ASSAULT - self.ammo_nails; sprint (self, PRINT_HIGH, "reloading...\n"); - self.tfstate = (self.tfstate | TFSTATE_RELOADING); + self.tfstate |= TFSTATE_RELOADING; tWeapon = spawn(); tWeapon.netname = "reloadtimer"; //WK For Judoka code tWeapon.owner = self; @@ -646,7 +646,7 @@ void() TeamFortress_ReloadCurrentWeapon = self.reload_grenade_launcher = RE_GRENADE_LAUNCHER - self.ammo_rockets; sprint (self, PRINT_HIGH, "reloading...\n"); - self.tfstate = (self.tfstate | TFSTATE_RELOADING); + self.tfstate |= TFSTATE_RELOADING; tWeapon = spawn(); tWeapon.netname = "reloadtimer"; //WK For Judoka code tWeapon.owner = self; @@ -682,7 +682,7 @@ void() TeamFortress_ReloadCurrentWeapon = self.reload_rocket_launcher = RE_ROCKET_LAUNCHER - self.ammo_rockets; sprint (self, PRINT_HIGH, "reloading...\n"); - self.tfstate = (self.tfstate | TFSTATE_RELOADING); + self.tfstate |= TFSTATE_RELOADING; tWeapon = spawn(); tWeapon.netname = "reloadtimer"; //WK For Judoka code tWeapon.owner = self; diff --git a/airfist.qc b/airfist.qc index 6edddd6..e307a5f 100644 --- a/airfist.qc +++ b/airfist.qc @@ -456,7 +456,7 @@ void() launch_horn = checkmove(self.origin, self.mins, self.maxs, self.origin + normalize(self.velocity), MOVE_NORMAL, self); setorigin(self, self.origin + normalize(self.velocity) * trace_fraction); // - OfN - And make them stuck in wall? - self.flags = self.flags - FL_ONGROUND; + self.flags &= ~FL_ONGROUND; } diff --git a/army.qc b/army.qc index cb26cbf..810a316 100644 --- a/army.qc +++ b/army.qc @@ -293,7 +293,7 @@ void(float inp) Menu_Army_Input2 = { self.demon_one.is_detpacking=0; self.demon_one.has_teleporter = 0; - self.demon_one.effects = self.demon_one.effects - (self.demon_one.effects & EF_DIMLIGHT); + self.demon_one.effects &= ~EF_DIMLIGHT; if (self.demon_one.enemy)//self.demon_one.goalentity) { @@ -390,7 +390,7 @@ void(float inp) Menu_Army_Input1 = { self.army_ready=FALSE; // needed for setarmytimer SetArmyTimer(); // prepare reserve soldier - self.job = self.job | JOB_DEMON_OUT; + self.job |= JOB_DEMON_OUT; } self.impulse = 0; @@ -490,7 +490,7 @@ void(float inp) Menu_Army_Input1 = } self.demon_one.has_teleporter = 0; - self.demon_one.effects = self.demon_one.effects - (self.demon_one.effects & EF_DIMLIGHT); + self.demon_one.effects &= ~EF_DIMLIGHT; self.demon_one.penance_time = 1; if (self.demon_one.goalentity != self) @@ -522,7 +522,7 @@ void(float inp) Menu_Army_Input1 = } self.demon_one.has_teleporter = 0; - self.demon_one.effects = self.demon_one.effects - (self.demon_one.effects & EF_DIMLIGHT); + self.demon_one.effects &= ~EF_DIMLIGHT; } self.demon_one.goalentity = NIL; @@ -548,7 +548,7 @@ void(float inp) Menu_Army_Input1 = return; } self.demon_one.has_teleporter = 0; - self.demon_one.effects = self.demon_one.effects - (self.demon_one.effects & EF_DIMLIGHT); + self.demon_one.effects &= ~EF_DIMLIGHT; } self.demon_one.penance_time = 3; @@ -564,7 +564,7 @@ void(float inp) Menu_Army_Input1 = }*/ self.demon_one.has_teleporter = 0; - self.demon_one.effects = self.demon_one.effects - (self.demon_one.effects & EF_DIMLIGHT); + self.demon_one.effects &= ~EF_DIMLIGHT; ResetMenu(); self.impulse = 0; @@ -631,8 +631,7 @@ float() TeleSoldier = //newmis.velocity = v_forward * 10 + '0 0 250'; newmis.velocity = v_forward * 10; newmis.angles = vectoangles(newmis.velocity); - if (newmis.flags & FL_ONGROUND) - newmis.flags = newmis.flags - FL_ONGROUND; + newmis.flags &= ~FL_ONGROUND; newmis.movetype = MOVETYPE_TOSS; newmis.solid = SOLID_SLIDEBOX; diff --git a/client.qc b/client.qc index caa8a5a..5dcd70d 100644 --- a/client.qc +++ b/client.qc @@ -119,7 +119,7 @@ void() SetChangeParms = } // remove items - self.items = self.items & ~(IT_KEY1 | IT_KEY2 | IT_INVISIBILITY | IT_INVULNERABILITY | IT_SUIT | IT_QUAD); + self.items &= ~(IT_KEY1 | IT_KEY2 | IT_INVISIBILITY | IT_INVULNERABILITY | IT_SUIT | IT_QUAD); // cap super health if (self.health > 100) @@ -149,7 +149,7 @@ void() SetChangeParms = { if (self.tfstate & TFSTATE_RANDOMPC) { - parm11 = (parm11 | TFSTATE_RANDOMPC); + parm11 |= TFSTATE_RANDOMPC); self.playerclass = 1 + floor(random() * (PC_RANDOM - 1)); while(!IsLegalClass(self.playerclass)) self.playerclass = 1 + floor(random() * (PC_RANDOM - 1)); @@ -196,7 +196,7 @@ void() autoteam_think = // if (!chris) PrematchBegin(); - toggleflags = toggleflags | TFLAG_AUTOTEAM; + toggleflags |= TFLAG_AUTOTEAM; dremove(self); }; @@ -209,7 +209,7 @@ void () PrematchBegin = while (other) { other.is_abouttodie = TRUE; - other.items = other.items & ~IT_INVULNERABILITY; + other.items &= ~IT_INVULNERABILITY; other.invincible_time = 0; other.invincible_finished = 0; other.effects &= ~EF_ANYGLOW; @@ -224,7 +224,7 @@ void () PrematchBegin = while (other) { other.is_abouttodie = TRUE; - other.items = other.items & ~IT_INVULNERABILITY; + other.items &= ~IT_INVULNERABILITY; other.invincible_time = 0; other.invincible_finished = 0; other.effects &= ~EF_ANYGLOW; @@ -439,7 +439,7 @@ void() SetToggleFlags = invis_only = SPY_INVIS_ONLY; if (coop || !deathmatch) - toggleflags = toggleflags | TFLAG_CLASS_PERSIST; + toggleflags |= TFLAG_CLASS_PERSIST; nextmap = mapname; @@ -526,21 +526,21 @@ void() SetToggleFlags = if (NEVER_TEAMFRAGS) { - toggleflags = toggleflags - (toggleflags & TFLAG_TEAMFRAGS); + toggleflags &= ~TFLAG_TEAMFRAGS; } if (ALWAYS_TEAMFRAGS) { - toggleflags = toggleflags | TFLAG_TEAMFRAGS; + toggleflags |= TFLAG_TEAMFRAGS; } if (CHECK_SPEEDS) { - toggleflags = toggleflags | TFLAG_CHEATCHECK; + toggleflags |= TFLAG_CHEATCHECK; } st = infokey(NIL, "temp1"); - toggleflags = (toggleflags | TFLAG_FIRSTENTRY | stof(st)); + toggleflags |= TFLAG_FIRSTENTRY | stof(st); local float autoteam_time; autoteam_time = 30; // check all serverinfo settings, to set the appropriate toggleflags @@ -550,12 +550,12 @@ void() SetToggleFlags = if (!st) st = infokey(NIL, "autoteam"); if (st == "on") - toggleflags = toggleflags | TFLAG_AUTOTEAM; + toggleflags |= TFLAG_AUTOTEAM; else if (st == "off") - toggleflags = toggleflags - (toggleflags & TFLAG_AUTOTEAM); + toggleflags &= ~TFLAG_AUTOTEAM; else if (stof(st) != 0) { - toggleflags = toggleflags | TFLAG_AUTOTEAM; + toggleflags |= TFLAG_AUTOTEAM; autoteam_time = stof(st); } @@ -564,9 +564,9 @@ void() SetToggleFlags = if (!st) st = infokey(NIL, "teamfrags"); if (st == "on") - toggleflags = toggleflags | TFLAG_TEAMFRAGS; + toggleflags |= TFLAG_TEAMFRAGS; else if (st == "off") - toggleflags = toggleflags - (toggleflags & TFLAG_TEAMFRAGS); + toggleflags &= ~TFLAG_TEAMFRAGS; //WK JELLO WATER st = infokey(NIL, "j"); @@ -605,7 +605,7 @@ void() SetToggleFlags = { prematch = time + prematchtime; // set it autoteam_time = prematchtime; - toggleflags = toggleflags | TFLAG_AUTOTEAM; + toggleflags |= TFLAG_AUTOTEAM; } else prematch = FALSE; // otherwise, no prematch @@ -662,7 +662,7 @@ void() SetToggleFlags = st = infokey(NIL, "respawn_delay"); respawn_delay_time = stof(st); if (respawn_delay_time) - toggleflags = toggleflags | TFLAG_RESPAWNDELAY; + toggleflags |= TFLAG_RESPAWNDELAY; // If no Respawndelay has been specified, set the default if (toggleflags & TFLAG_RESPAWNDELAY && respawn_delay_time == 0) @@ -672,7 +672,7 @@ void() SetToggleFlags = // Allows restructuring of the teams from the last map nicely. if (toggleflags & TFLAG_AUTOTEAM) { - toggleflags = toggleflags - (toggleflags & TFLAG_AUTOTEAM); + toggleflags &= ~TFLAG_AUTOTEAM; ent = spawn(); ent.nextthink = time + autoteam_time; ent.think = autoteam_think; @@ -1521,7 +1521,7 @@ void() ClientKill = self.health = -1; self.th_die(); self.deadflag = DEAD_RESPAWNABLE; - self.tfstate = self.tfstate | TFSTATE_RESPAWN_READY; + self.tfstate |= TFSTATE_RESPAWN_READY; // self.respawn_time = time; }; @@ -1934,9 +1934,9 @@ void() PutClientInServer = self.playerclass = self.nextpc; if (self.nextpc == PC_RANDOM) - self.tfstate = self.tfstate | TFSTATE_RANDOMPC; + self.tfstate |= TFSTATE_RANDOMPC; else - self.tfstate = self.tfstate - (self.tfstate & TFSTATE_RANDOMPC); + self.tfstate &= ~TFSTATE_RANDOMPC; } // some states are kept @@ -1958,7 +1958,7 @@ void() PutClientInServer = self.tfstate = 0; if (iszoom == 1) - self.tfstate = self.tfstate | TFSTATE_ZOOMOFF; + self.tfstate |= TFSTATE_ZOOMOFF; // Display the Player's class if (self.playerclass != PC_CUSTOM) @@ -2375,7 +2375,7 @@ void() PlayerDeathThink = return; self.deadflag = DEAD_RESPAWNABLE; // make sure that respawn flag has not been set - self.tfstate = self.tfstate - (self.tfstate & TFSTATE_RESPAWN_READY); + self.tfstate &= ~TFSTATE_RESPAWN_READY; return; } @@ -2398,7 +2398,7 @@ void() PlayerDeathThink = else { // button has been pressed, player is ready to respawn - self.tfstate = self.tfstate | TFSTATE_RESPAWN_READY; + self.tfstate |= TFSTATE_RESPAWN_READY; if (self.respawn_time <= time) { @@ -2453,7 +2453,7 @@ void() PlayerJump = if (!(self.flags & FL_JUMPRELEASED) ) return; // don't pogo stick - self.flags = self.flags - (self.flags & FL_JUMPRELEASED); + self.flags &= ~FL_JUMPRELEASED; self.button2 = 0; // player jumping sound if (!(self.cutf_items & CUTF_STEALTH)) // Only play it if we don't have stealth @@ -2603,9 +2603,9 @@ void() CheckWaterJump = traceline (start, end, TRUE, self); if (trace_fraction == 1) { // open at eye level - self.flags = self.flags | FL_WATERJUMP; + self.flags |= FL_WATERJUMP; self.velocity_z = 225; - self.flags = self.flags - (self.flags & FL_JUMPRELEASED); + self.flags &= ~FL_JUMPRELEASED; self.teleport_time = time + 2; // safety net return; } @@ -2738,8 +2738,8 @@ void() PlayerPreThink = if (self.effects & EF_ANYGLOW) { sprint(self, PRINT_MEDIUM, "The glowing removes your full invisibility.\n"); - self.job = self.job - (self.job & JOB_FULL_HIDE); - self.job = self.job | JOB_ACTIVE; + self.job &= ~JOB_FULL_HIDE); + self.job |= JOB_ACTIVE; } } */ @@ -2753,7 +2753,7 @@ void() PlayerPreThink = PlayerJump (); //WK This just does noises for jumps } else - self.flags = self.flags | FL_JUMPRELEASED; + self.flags |= FL_JUMPRELEASED; } //WK Scuba commando treads water :) @@ -2966,7 +2966,7 @@ void() CheckPowerups = if (self.invisible_finished < time) { // just stopped - self.items = self.items & ~IT_INVISIBILITY; + self.items &= ~IT_INVISIBILITY; self.invisible_finished = 0; self.invisible_time = 0; } @@ -3009,7 +3009,7 @@ void() CheckPowerups = if (self.invincible_finished < time) { // just stopped - self.items = self.items & ~IT_INVULNERABILITY; + self.items &= ~IT_INVULNERABILITY; self.invincible_time = 0; self.invincible_finished = 0; self.effects &= ~EF_ANYGLOW; @@ -3047,11 +3047,11 @@ void() CheckPowerups = if (self.super_damage_finished < time) { // just stopped - self.items = self.items & ~IT_QUAD; + self.items &= ~IT_QUAD; self.super_damage_finished = 0; self.super_time = 0; //WK If inspired, remove inspiration - self.tfstate = self.tfstate - (self.tfstate & TFSTATE_INSPIRED); + self.tfstate &= ~TFSTATE_INSPIRED; self.effects &= ~EF_ANYGLOW; self.effects |= EF_GlowColor(self); } @@ -3089,7 +3089,7 @@ void() CheckPowerups = if (self.radsuit_finished < time) { // just stopped - self.items = self.items & ~IT_SUIT; + self.items &= ~IT_SUIT; self.rad_time = 0; self.radsuit_finished = 0; } @@ -3099,7 +3099,7 @@ void() CheckPowerups = if (self.aura_time < time) { if (self.invisible_finished < time) - self.items = self.items & ~IT_INVISIBILITY; + self.items &= ~IT_INVISIBILITY; self.aura = 0; } @@ -3219,7 +3219,7 @@ void() ClientConnect = // Set Default autozoom if (DEFAULT_AUTOZOOM == OFF) - self.tfstate = self.tfstate | TFSTATE_ZOOMOFF; + self.tfstate |= TFSTATE_ZOOMOFF; // Set the MOTD on self.motd = 0; @@ -3405,7 +3405,7 @@ void() ClientDisconnect = { if (te.weaponmode == 1) // Detpack was being disarmed { - te.enemy.tfstate = te.enemy.tfstate - (te.enemy.tfstate & TFSTATE_CANT_MOVE); + te.enemy.tfstate &= ~TFSTATE_CANT_MOVE; TeamFortress_SetSpeed(te.enemy); dremove(te.oldenemy); // CountDown diff --git a/combat.qc b/combat.qc index 2ec5caa..6b5767d 100644 --- a/combat.qc +++ b/combat.qc @@ -568,7 +568,7 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags save = targ.armorvalue; targ.armortype = 0; // lost all armor targ.armorclass = 0; // lost special armor - targ.items = targ.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); + targ.items &= ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); if (targ.classname == "player") TeamFortress_SetSpeed(targ); } diff --git a/coop.qc b/coop.qc index e556015..45652cb 100644 --- a/coop.qc +++ b/coop.qc @@ -24,7 +24,7 @@ void() DropKey = if (self.items & IT_KEY1) { - self.items = self.items & ~IT_KEY1; + self.items &= ~IT_KEY1; newmis.items = IT_KEY1; if (world.worldtype == 0) { @@ -47,7 +47,7 @@ void() DropKey = } else if (self.items & IT_KEY2) { - self.items = self.items & ~IT_KEY2; + self.items &= ~IT_KEY2; newmis.items = IT_KEY2; if (world.worldtype == 0) { diff --git a/crusader.qc b/crusader.qc index a480946..5f0afae 100644 --- a/crusader.qc +++ b/crusader.qc @@ -157,7 +157,7 @@ void() CrusaderAddInvisibility = targ.aura_time = time + 10; amount = amount - 45; self.job_finished = time - amount; - targ.items = targ.items | IT_INVISIBILITY; + targ.items |= IT_INVISIBILITY; } else sprint(self, PRINT_HIGH, "You cannot bestow invisibility upon another Crusader\n"); diff --git a/custom.qc b/custom.qc index 81c990f..ca267a2 100644 --- a/custom.qc +++ b/custom.qc @@ -188,7 +188,7 @@ void() DropToCustomClassGen = sell_no = self.real_frags; else { sell_no = 0; - self.done_custom = self.done_custom - (self.done_custom & CUSTOM_SELLING); + self.done_custom &= ~CUSTOM_SELLING; } self.real_frags = self.real_frags - sell_no; @@ -232,7 +232,7 @@ void() DropFromCustomClassGen = //Make sure they have at least one axe-like weapon if (!(self.weapons_carried & (WEAP_MEDIKIT | WEAP_SPANNER)) || (self.cutf_items & CUTF_KNIFE)) - self.weapons_carried = self.weapons_carried | WEAP_AXE; + self.weapons_carried |= WEAP_AXE; //CH if you bought Guerilla, you get 20 rockets :) if (self.job & JOB_GUERILLA) @@ -560,12 +560,12 @@ void(float cost, float item) BuyWeapon = if (item == WEAP_ROCKET_LAUNCHER && self.tf_items & NIT_RL_LASER_SIGHT) { self.money = self.money + 1000; - self.tf_items = self.tf_items & ~NIT_RL_LASER_SIGHT; + self.tf_items &= ~NIT_RL_LASER_SIGHT; } if (item == WEAP_ROCKET_LAUNCHER && self.tf_items & NIT_CLUSTER_ROCKETS) { self.money = self.money + 3250; - self.tf_items = self.tf_items & ~NIT_CLUSTER_ROCKETS; + self.tf_items &= ~NIT_CLUSTER_ROCKETS; } self.maxammo_shells = self.maxammo_shells - countshells(item); self.maxammo_nails = self.maxammo_nails - countnails(item); @@ -586,7 +586,7 @@ void(float cost, float item) BuyWeapon = self.maxammo_rockets = self.maxammo_rockets + countrockets(item); self.maxammo_cells = self.maxammo_cells + countcells(item); - self.weapons_carried = self.weapons_carried | item; + self.weapons_carried |= item; self.money = self.money - cost; PrintMoney(); }; @@ -623,7 +623,7 @@ void(float cost, float item) BuyCuTF = self.maxammo_cells = self.maxammo_cells + 130; } - self.cutf_items = self.cutf_items | item; + self.cutf_items |= item; self.money = self.money - cost; PrintMoney(); }; @@ -695,7 +695,7 @@ void(float cost, float item) BuyItem = return; } - self.tf_items = self.tf_items | item; + self.tf_items |= item; self.money = self.money - cost; PrintMoney(); }; @@ -712,21 +712,21 @@ void(float cost, float type) BuyJob = if (!(self.cutf_items & CUTF_DEMONLORE)) cost = cost - 300; // sync with demonlore cost else - self.cutf_items = self.cutf_items - (self.cutf_items & CUTF_DEMONLORE); + self.cutf_items &= ~CUTF_DEMONLORE; } if (self.job & JOB_RUNNER) { if (!(self.cutf_items & CUTF_HIGHJUMP)) cost = cost - 200; // sync with highjump cost else - self.cutf_items = self.cutf_items - (self.cutf_items & CUTF_HIGHJUMP); + self.cutf_items &= ~CUTF_HIGHJUMP; } if (self.job & JOB_JUDOKA) { if (!(self.cutf_items & CUTF_STEALTH)) cost = cost - 400; // sync with stealth cost else - self.cutf_items = self.cutf_items - (self.cutf_items & CUTF_STEALTH); + self.cutf_items &= ~CUTF_STEALTH; } PrintRefund(cost); self.job = 0; @@ -750,19 +750,19 @@ void(float cost, float type) BuyJob = if (self.cutf_items & CUTF_DEMONLORE) self.money = self.money + 300; // sync this with demonlore cost else - self.cutf_items = self.cutf_items | CUTF_DEMONLORE; // warlocks see demon health + self.cutf_items |= CUTF_DEMONLORE; // warlocks see demon health if (type == JOB_RUNNER) if (self.cutf_items & CUTF_HIGHJUMP) self.money = self.money + 200; // sync with highjump cost else - self.cutf_items = self.cutf_items | CUTF_HIGHJUMP; // runner jumps high + self.cutf_items |= CUTF_HIGHJUMP; // runner jumps high if (type == JOB_JUDOKA) if (self.cutf_items & CUTF_STEALTH) self.money = self.money + 400; // sync with stealth price else - self.cutf_items = self.cutf_items | CUTF_STEALTH; // Judo is a master of stealth by default + self.cutf_items |= CUTF_STEALTH; // Judo is a master of stealth by default //Ok we buy it self.job = type; @@ -1161,7 +1161,7 @@ void() KracGrenadeExplode = // This code handles disarming a detpack if (te.weaponmode == 1) // Detpack was being disarmed { - te.enemy.tfstate = te.enemy.tfstate - (te.enemy.tfstate & TFSTATE_CANT_MOVE); + te.enemy.tfstate &= ~TFSTATE_CANT_MOVE; TeamFortress_SetSpeed(te.enemy); dremove(te.oldenemy); // CountDown diff --git a/demoman.qc b/demoman.qc index 82014c5..b274794 100644 --- a/demoman.qc +++ b/demoman.qc @@ -193,7 +193,7 @@ void(float timer) TeamFortress_SetDetpack = makeImmune(self,time + 2); //self.immune_to_check = time + 2; - self.tfstate = self.tfstate | TFSTATE_CANT_MOVE; + self.tfstate |= TFSTATE_CANT_MOVE; // Save the current weapon and remove it self.weapon = self.current_weapon; self.current_weapon = 0; @@ -246,7 +246,7 @@ void(float krac) TeamFortress_DetpackStop = dremove(detpack_timer); - self.tfstate = self.tfstate - (self.tfstate & TFSTATE_CANT_MOVE); + self.tfstate &= ~TFSTATE_CANT_MOVE; self.is_detpacking = 0; self.current_weapon = self.weapon; @@ -264,7 +264,7 @@ void() TeamFortress_DetpackSet = local entity countd, oldself; self.is_detpacking = 0; - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_CANT_MOVE); + self.owner.tfstate &= ~TFSTATE_CANT_MOVE; self.owner.is_detpacking = 0; TeamFortress_SetSpeed(self.owner); @@ -463,7 +463,7 @@ void() TeamFortress_DetpackTouch = makeImmune(other,time + 2); //other.immune_to_check = time + 2; - other.tfstate = other.tfstate | TFSTATE_CANT_MOVE; + other.tfstate |= TFSTATE_CANT_MOVE; sprint(other, PRINT_HIGH, "Disarming detpack...\n"); TeamFortress_SetSpeed(other); @@ -501,7 +501,7 @@ void() TeamFortress_DetpackDisarm = //if (!(self.owner.is_feigning)) //- OfN already checked on TeamFortress_SetSpeed() //{ - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_CANT_MOVE); + self.owner.tfstate &= ~TFSTATE_CANT_MOVE; // Reset speeds of scout TeamFortress_SetSpeed(self.owner); diff --git a/demon.qc b/demon.qc index e62e4ff..d9b8f27 100644 --- a/demon.qc +++ b/demon.qc @@ -137,8 +137,7 @@ void() demon1_jump4 =[ $leap4, demon1_jump5 ] self.velocity_z = self.velocity_z + jello; self.has_tesla = 0; } - if (self.flags & FL_ONGROUND) - self.flags = self.flags - FL_ONGROUND; + self.flags &= ~FL_ONGROUND; }; void() demon1_jump5 =[ $leap5, demon1_jump6 ] {}; void() demon1_jump6 =[ $leap6, demon1_jump7 ] {}; @@ -646,7 +645,7 @@ void() Demon_JumpTouch = //self.velocity_x = (random() - 0.5) * 600; //self.velocity_y = (random() - 0.5) * 600; //self.velocity_z = 200; - //self.flags = self.flags - FL_ONGROUND; + //self.flags &= ~FL_ONGROUND; } return; // not on ground yet } @@ -711,7 +710,7 @@ void () custom_demon_die = if (self.real_owner.classname == "player" && self.real_owner.demon_one == self) { sprint(self.real_owner,PRINT_HIGH,"Your fiend is dead.\n"); - self.real_owner.job = self.real_owner.job - (self.real_owner.job & JOB_DEMON_OUT); + self.real_owner.job &= ~JOB_DEMON_OUT; self.real_owner.job_finished = time + 5; //Can't summon streams of demons SB can so self.real_owner.demon_one = NIL; } diff --git a/dgrunt.qc b/dgrunt.qc index e621b8b..6fbd370 100644 --- a/dgrunt.qc +++ b/dgrunt.qc @@ -100,7 +100,7 @@ void() army_atk2 =[ $shoot2, army_atk3 ] {ai_face();}; void() army_atk3 =[ $shoot3, army_atk4 ] {ai_face();}; void() army_atk4 =[ $shoot4, army_atk5 ] {ai_face();}; void() army_atk5 =[ $shoot5, army_atk6 ] {ai_face();army_fire(); -self.effects = self.effects | EF_DIMLIGHT;}; +self.effects |= EF_DIMLIGHT;}; void() army_atk6 =[ $shoot6, army_atk7 ] {ai_face(); self.effects = 0;}; void() army_atk7 =[ $shoot7, army_atk8 ] {ai_face();SUB_CheckRefire (army_atk1);}; void() army_atk8 =[ $shoot8, army_atk9 ] {ai_face();}; @@ -208,7 +208,7 @@ void() custom_grunt_die = if (self.real_owner.classname == "player") { sprint(self.real_owner,PRINT_HIGH,"Your soldier has been killed\n"); - self.real_owner.job = self.real_owner.job - (self.real_owner.job & JOB_DEMON_OUT); + self.real_owner.job &= ~JOB_DEMON_OUT); self.real_owner.demon_points = self.real_owner.demon_points + 2; self.real_owner.job_finished = time + 10; //Can't summon streams of demons } diff --git a/doors.qc b/doors.qc index f7f455c..3e1615d 100644 --- a/doors.qc +++ b/doors.qc @@ -294,7 +294,7 @@ void() door_touch = } other.items = other.items - self.items; - other.tf_items = other.tf_items | self.items; + other.tf_items |= self.items; if (DoorShouldOpen()) { diff --git a/engineer.qc b/engineer.qc index b0c5f38..8cde7ce 100644 --- a/engineer.qc +++ b/engineer.qc @@ -569,7 +569,7 @@ void() TeamFortress_EngineerBuild = sprint(self, PRINT_HIGH, "You stop building.\n"); self.is_building = 0; - self.tfstate = self.tfstate - (self.tfstate & TFSTATE_CANT_MOVE); + self.tfstate &= ~TFSTATE_CANT_MOVE; TeamFortress_SetSpeed(self); @@ -838,7 +838,7 @@ void(float objtobuild) TeamFortress_Build = trace_endpos_z--; obj.origin = trace_endpos; - obj.flags = obj.flags | FL_ONGROUND; + obj.flags |= FL_ONGROUND; obj.movetype = MOVETYPE_TOSS; #ifdef DISALLOW_BLOCKED_TELE @@ -886,7 +886,7 @@ void(float objtobuild) TeamFortress_Build = self.is_building = 1; makeImmune(self,time + 2); //self.immune_to_check = time + 2; - self.tfstate = self.tfstate | TFSTATE_CANT_MOVE; + self.tfstate |= TFSTATE_CANT_MOVE; // Save the current weapon and remove it self.weapon = self.current_weapon; @@ -946,7 +946,7 @@ void() TeamFortress_FinishedBuilding = oldself.real_owner = self; self.is_building = 0; - self.tfstate = self.tfstate - (self.tfstate & TFSTATE_CANT_MOVE); + self.tfstate &= ~TFSTATE_CANT_MOVE; self.current_weapon = self.weapon; self.StatusRefreshTime = time + 0.1; diff --git a/grunty.qc b/grunty.qc index 75a13f1..ee6b6f5 100644 --- a/grunty.qc +++ b/grunty.qc @@ -396,9 +396,9 @@ void() grunty_shotgun = self.frame = $shotatt1 + floor(self.weaponframe); if (self.weaponframe == 0) - self.effects = self.effects | EF_DIMLIGHT; + self.effects |= EF_DIMLIGHT; else if (self.weaponframe == 0.5) - self.effects = self.effects - (self.effects & EF_DIMLIGHT); + self.effects &= ~EF_DIMLIGHT; self.weaponframe = self.weaponframe + 0.5; GruntyThink(); @@ -420,9 +420,9 @@ void() grunty_rocket = self.frame = $rockatt1 + floor(self.weaponframe); if (self.weaponframe == 0) - self.effects = self.effects | EF_DIMLIGHT; + self.effects |= EF_DIMLIGHT; else if (self.weaponframe == 0.5) - self.effects = self.effects - (self.effects & EF_DIMLIGHT); + self.effects &= ~EF_DIMLIGHT; self.weaponframe = self.weaponframe + 0.5; GruntyThink(); @@ -463,7 +463,7 @@ void(vector org, vector dir) grunty_spike = // Grunty uses the nailgun void() grunty_nail1 = [$nailatt1, grunty_nail2] { - GruntyThink(); GRun(); self.effects = self.effects | EF_DIMLIGHT; + GruntyThink(); GRun(); self.effects |= EF_DIMLIGHT; if (self.ammo_nails > 0) { W_FireSpikes(4); @@ -472,11 +472,11 @@ void() grunty_nail1 = [$nailatt1, grunty_nail2] }; void() grunty_nail2 = [$nailatt1, grunty_nail3] { - GruntyThink(); GRun(); self.effects = self.effects | EF_DIMLIGHT; + GruntyThink(); GRun(); self.effects |= EF_DIMLIGHT; }; void() grunty_nail3 = [$nailatt2, grunty_nail4] { - GruntyThink(); GRun(); self.effects = self.effects - (self.effects & EF_DIMLIGHT); + GruntyThink(); GRun(); self.effects &= ~EF_DIMLIGHT; if (self.ammo_nails > 0) { W_FireSpikes(-4); @@ -485,7 +485,7 @@ void() grunty_nail3 = [$nailatt2, grunty_nail4] }; void() grunty_nail4 = [$nailatt2, grunty_nail1] { - GruntyThink(); GRun(); self.effects = self.effects - (self.effects & EF_DIMLIGHT); + GruntyThink(); GRun(); self.effects &= ~EF_DIMLIGHT; local float vis, dist; @@ -695,7 +695,7 @@ void() GruntyScanTargets = } self.has_teleporter = 0; - self.effects = self.effects - (self.effects & EF_DIMLIGHT); + self.effects &= ~EF_DIMLIGHT; return; } // If we have a target already @@ -723,7 +723,7 @@ void() GruntyScanTargets = self.goalentity = ReturnEasyWaypoint(self,self); self.has_teleporter = 0; - self.effects = self.effects - (self.effects & EF_DIMLIGHT); + self.effects &= ~EF_DIMLIGHT; return; } @@ -959,7 +959,7 @@ void() GruntyCheckFire = else { // Do whatever you want - self.effects = self.effects - (self.effects & EF_DIMLIGHT); + self.effects &= ~EF_DIMLIGHT; //self.walkframe = 0; ofn if (self.health > 0) self.think = grunty_run; #ifdef VERBOSE_GRUNTY @@ -1340,7 +1340,7 @@ void() custom_grunt_die = if (self.real_owner.classname == "player") { sprint(self.real_owner,PRINT_HIGH,"Your soldier is dead.\n"); - self.real_owner.job = self.real_owner.job - (self.real_owner.job & JOB_DEMON_OUT); + self.real_owner.job &= ~JOB_DEMON_OUT; self.real_owner.job_finished = time + 2; //Can't summon streams of demons SB can so self.real_owner.demon_one = NIL; @@ -1790,7 +1790,7 @@ void () GruntyPayThink = r = random(); if (r < 0.5) { - self.weapons_carried = self.weapons_carried | WEAP_SHOTGUN; + self.weapons_carried |= WEAP_SHOTGUN; self.money = self.money - GRUNTY_COST_SHOTGUN; PrintFromSoldier(self,self.real_owner,"i have bought a shotgun.\n"); //sprint(self.real_owner, PRINT_HIGH, "Your soldier has just purchased a shotgun.\n"); @@ -1803,7 +1803,7 @@ void () GruntyPayThink = r = random(); if (r < 0.5) { - self.cutf_items = self.cutf_items | CUTF_KNIFE; + self.cutf_items |= CUTF_KNIFE; self.money = self.money - GRUNTY_COST_KNIFE; PrintFromSoldier(self,self.real_owner,"i have bought a knife.\n"); //sprint(self.real_owner, PRINT_HIGH, "Your soldier has just purchased a knife.\n"); @@ -1816,7 +1816,7 @@ void () GruntyPayThink = r = random(); if (r < 0.25) { - self.weapons_carried = self.weapons_carried | WEAP_NAILGUN; + self.weapons_carried |= WEAP_NAILGUN; self.money = self.money - GRUNTY_COST_NAILGUN; PrintFromSoldier(self,self.real_owner,"i now own a nailgun.\n"); //sprint(self.real_owner, PRINT_HIGH, "Your soldier now owns a nailgun.\n"); @@ -1829,7 +1829,7 @@ void () GruntyPayThink = r = random(); if (r < 0.25) { - self.weapons_carried = self.weapons_carried | WEAP_SUPER_SHOTGUN; + self.weapons_carried |= WEAP_SUPER_SHOTGUN; self.money = self.money - GRUNTY_COST_SUPER_SHOTGUN; PrintFromSoldier(self,self.real_owner,"i've just bought a super shotgun.\n"); //sprint(self.real_owner, PRINT_HIGH, "Your soldier just bought a super shotgun.\n"); @@ -1843,7 +1843,7 @@ void () GruntyPayThink = r = random(); if (r < 0.15) { - self.tf_items = self.tf_items | NIT_SCANNER; + self.tf_items |= NIT_SCANNER; self.money = self.money - GRUNTY_COST_SCANNER; PrintFromSoldier(self,self.real_owner,"i now own a scanner.\n"); //sprint(self.real_owner, PRINT_HIGH, "Your soldier now owns a scanner.\n"); @@ -1856,7 +1856,7 @@ void () GruntyPayThink = r = random(); if (r < 0.3) //- was 0.2 { - self.weapons_carried = self.weapons_carried | WEAP_ROCKET_LAUNCHER; + self.weapons_carried |= WEAP_ROCKET_LAUNCHER; self.money = self.money - GRUNTY_COST_ROCKET_LAUNCHER; PrintFromSoldier(self,self.real_owner,"i have bought a ROCKET LAUNCHER!! hehe\n"); //sprint(self.real_owner, PRINT_HIGH, "Your soldier is now the proud owner of a brand new rocket launcher.\n"); diff --git a/haxxx.qc b/haxxx.qc index c53dd53..3c8336e 100644 --- a/haxxx.qc +++ b/haxxx.qc @@ -351,7 +351,7 @@ void() SBFireInterface = self.is_haxxxoring = 0; - self.tfstate = self.tfstate - (self.tfstate & TFSTATE_CANT_MOVE); + self.tfstate &= ~TFSTATE_CANT_MOVE; TeamFortress_SetSpeed(self); if (hackThis == -2) @@ -404,7 +404,7 @@ void() SBFireInterface = sprint(self, PRINT_HIGH, "You make a few adjustments...\n"); if (hackThis == SCREWUP_ONE) { - targ.is_malfunctioning = targ.is_malfunctioning | SCREWUP_ONE; + targ.is_malfunctioning |= SCREWUP_ONE; if (targ.classname == "building_sentrygun") // sprint(self, PRINT_HIGH, "The sentrygun is now incapacitated.\n"); else if (targ.classname == "building_tesla") @@ -427,7 +427,7 @@ void() SBFireInterface = } else if (hackThis == SCREWUP_TWO) { - targ.is_malfunctioning = targ.is_malfunctioning | SCREWUP_TWO; + targ.is_malfunctioning |= SCREWUP_TWO; if (targ.classname == "building_sentrygun") sprint(self, PRINT_HIGH, "The sentrygun's accuracy is now reduced.\n"); else if (targ.classname == "building_tesla") @@ -454,7 +454,7 @@ void() SBFireInterface = } else if (hackThis == SCREWUP_THREE) { - targ.is_malfunctioning = targ.is_malfunctioning | SCREWUP_THREE; + targ.is_malfunctioning |= SCREWUP_THREE; if (targ.classname == "building_sentrygun") sprint(self, PRINT_HIGH, "The sentrygun rocket launcher will now malfunction...\n"); else if (targ.classname == "building_tesla") @@ -573,7 +573,7 @@ void() SBFireInterface = else if (Teammate(targ.team_no,self.team_no)) { //FRIENDLY IMPROVEMENTS - targ.num_mines = targ.num_mines | hackThis; + targ.num_mines |= hackThis; local string st; st=GetBuildingName(targ); @@ -917,7 +917,7 @@ void(float input) SBInitiateInterface = te.martyr_enemy = self.demon_two; te.think = SBHackDotTimerThink; - self.tfstate = self.tfstate | TFSTATE_CANT_MOVE; + self.tfstate |= TFSTATE_CANT_MOVE; TeamFortress_SetSpeed(self); sprint (self, PRINT_HIGH, "You immerse yourself in the cybernet...\n"); makeImmune(self,time + te.heat); //- OfN - WORKS? yup @@ -1164,7 +1164,7 @@ float() CheckHaxxx = if (!retval) { self.owner.is_haxxxoring = 0; - self.owner.tfstate = self.tfstate - (self.tfstate & TFSTATE_CANT_MOVE); + self.owner.tfstate &= ~TFSTATE_CANT_MOVE; TeamFortress_SetSpeed(self.owner); self.think = SUB_Remove; self.nextthink = time + 0.1; diff --git a/hknight.qc b/hknight.qc index d039015..c84fd59 100644 --- a/hknight.qc +++ b/hknight.qc @@ -203,7 +203,7 @@ void() hknight_die = if (self.real_owner.classname == "player") { sprint(self.real_owner,PRINT_HIGH,"Your hell knight is dead.\n"); - self.real_owner.job = self.real_owner.job - (self.real_owner.job & JOB_DEMON_OUT); + self.real_owner.job &= ~JOB_DEMON_OUT); self.real_owner.job_finished = time + 5; //Can't summon streams of demons SB can so self.real_owner.demon_one = NIL; } diff --git a/hook.qc b/hook.qc index cf4c7ae..30a24a4 100644 --- a/hook.qc +++ b/hook.qc @@ -302,7 +302,7 @@ void () Anchor_Grapple = if (self.owner.flags & FL_ONGROUND) { - self.owner.flags = self.owner.flags - FL_ONGROUND; + self.owner.flags &= ~FL_ONGROUND; setorigin(self.owner,self.owner.origin + '0 0 1'); } diff --git a/items.qc b/items.qc index 4df64de..f2b6c62 100644 --- a/items.qc +++ b/items.qc @@ -253,7 +253,7 @@ void() health_touch = { sprint(other, PRINT_MEDIUM, "You have been healed of your infection!"); - other.tfstate = other.tfstate - (other.tfstate & TFSTATE_INFECTED); + other.tfstate &= ~TFSTATE_INFECTED; } else { @@ -275,7 +275,7 @@ void() health_touch = // Megahealth = rot down the player's super health if (self.healtype == 2) { - other.items = other.items | IT_SUPERHEALTH; + other.items |= IT_SUPERHEALTH; self.nextthink = time + 5; self.think = item_megahealth_rot; self.owner = other; @@ -307,7 +307,7 @@ void() item_megahealth_rot = // it is possible for a player to die and respawn between rots, so don't // just blindly subtract the flag off - other.items = other.items & ~IT_SUPERHEALTH; + other.items &= ~IT_SUPERHEALTH; if (self.classname == "medikit_rot") { @@ -470,7 +470,7 @@ void() armor_touch = other.armortype = type; other.armorvalue = value; - other.items = other.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3) | bit; + other.items &= ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3) | bit; } if (other.armorvalue) { @@ -794,7 +794,7 @@ void() weapon_touch = // change to the weapon old = other.weapons_carried; - other.weapons_carried = other.weapons_carried | new; + other.weapons_carried |= new; stemp = self; self = other; @@ -1396,7 +1396,7 @@ void() key_touch = sound (other, CHAN_ITEM, self.noise, 1, ATTN_NORM); stuffcmd (other, "bf\n"); - other.items = other.items | self.items; + other.items |= self.items; if (!coop) { @@ -1547,7 +1547,7 @@ void() sigil_touch = stuffcmd (other, "bf\n"); self.solid = SOLID_NOT; self.model = ""; - serverflags = serverflags | (self.spawnflags & 15); + serverflags |= (self.spawnflags & 15); self.classname = ""; // so rune doors won't find it activator = other; @@ -1660,7 +1660,7 @@ void() powerup_touch = sound (other, CHAN_VOICE, self.noise, 1, ATTN_NORM); stuffcmd (other, "bf\n"); self.solid = SOLID_NOT; - other.items = other.items | self.items; + other.items |= self.items; self.model = ""; // do the apropriate action diff --git a/jobs.qc b/jobs.qc index cd1059f..e7848d6 100644 --- a/jobs.qc +++ b/jobs.qc @@ -93,17 +93,17 @@ void() JobThief = self.frame = 0; self.weaponframe = 0; self.modelindex = modelindex_null; - self.job = self.job | JOB_FULL_HIDE; + self.job |= JOB_FULL_HIDE; } */ if (self.invisible_time) sprint (self, PRINT_HIGH, "Leaving shadows... just as soon as this ring wears off...\n"); else { sprint (self, PRINT_HIGH, "Leaving shadows...\n"); - self.items = self.items & ~IT_INVISIBILITY; + self.items &= ~IT_INVISIBILITY; self.modelindex = modelindex_player; } self.job = self.job - JOB_ACTIVE; - self.job = self.job - (self.job & JOB_FULL_HIDE); + self.job &= ~JOB_FULL_HIDE; self.job_finished = time + 2; TeamFortress_SetSpeed(self); } @@ -126,10 +126,10 @@ void() JobThief = self.frame = 0; self.weaponframe = 0; self.modelindex = modelindex_eyes; - self.job = self.job | JOB_ACTIVE; + self.job |= JOB_ACTIVE; self.job_finished = time + 2; TeamFortress_SetSpeed(self); - self.items = self.items | IT_INVISIBILITY; + self.items |= IT_INVISIBILITY; te = spawn(); te.nextthink = time + PC_SPY_CELL_REGEN_TIME; @@ -158,13 +158,13 @@ void() RunnerThink = } else if (self.heat == 2) { sprint(self.owner,PRINT_HIGH,"Recovering...\n"); - self.owner.job = self.owner.job | JOB_TIRED; + self.owner.job |= JOB_TIRED; TeamFortress_SetSpeed(self.owner); self.nextthink = time + PHASE2; } else if (self.heat == 3) { - self.owner.job = self.owner.job - (self.owner.job & JOB_ACTIVE); - self.owner.job = self.owner.job - (self.owner.job & JOB_TIRED); + self.owner.job &= ~JOB_ACTIVE; + self.owner.job &= ~JOB_TIRED; TeamFortress_SetSpeed(self.owner); self.nextthink = time + PHASE3; } @@ -176,7 +176,7 @@ void() JobRunner = { local entity RunnerTimer; - self.job = self.job | JOB_ACTIVE; //Timer will remove this + self.job |= JOB_ACTIVE; //Timer will remove this RunnerTimer = spawn (); RunnerTimer.classname = "timer"; @@ -315,10 +315,10 @@ void() ChaplanThink = { else { //We stopped preaching sprint(self,PRINT_HIGH,"You finish your sermon\n"); //Sync CHAN_MUSIC with disconnect and sound below - self.job = self.job - (self.job & JOB_ACTIVE); + self.job &= ~JOB_ACTIVE; sound (self, CHAN_MUSIC, "items/r_item1.wav", 0.1, ATTN_NORM); self.effects &= ~EF_ANYGLOW; - //self.tfstate = self.tfstate - (self.tfstate & TFSTATE_RELOADING); + //self.tfstate &= ~TFSTATE_RELOADING); self.current_weapon = self.weapon; W_SetCurrentAmmo(); oself.nextthink = time + 0.1; @@ -352,7 +352,7 @@ void() JobChaplan = tWeapon.classname = "timer"; tWeapon.nextthink = time + GUIDE_TIME; tWeapon.think = ChaplanThink; - self.job = self.job | JOB_ACTIVE; + self.job |= JOB_ACTIVE; self.job_finished = time + 0.3; //Don't allow them to trigger too often //Hide our weapon. Can't shoot while preaching. @@ -361,7 +361,7 @@ void() JobChaplan = self.weaponmodel = ""; self.weaponframe = 0; self.heat = TRUE; //We're actively preaching. - //self.tfstate = self.tfstate | TFSTATE_RELOADING; + //self.tfstate |= TFSTATE_RELOADING; //Start playing preacher music, glow and inspire! //sound (self, CHAN_VOICE, "ambience/orff.wav", 0.75, ATTN_NORM); @@ -382,11 +382,11 @@ void() MartyrThink = //Self.owner is the guy who became a martyr //Clean these up so we can kill him - self.job = self.job - (self.job & JOB_ACTIVE); //why not? - self.owner.items = self.items & ~IT_INVULNERABILITY; + self.job &= ~JOB_ACTIVE; //why not? + self.owner.items &= ~IT_INVULNERABILITY; self.owner.invincible_time = 0; self.owner.invincible_finished = 0; - self.owner.effects = self.owner.effects - (self.owner.effects & EF_DIMLIGHT); + self.owner.effects &= ~EF_DIMLIGHT; //if (self.owner.martyr_enemy == self.owner) deathmsg = DMSG_MARTYR; @@ -412,7 +412,7 @@ void() JobMartyr = sprint(self,PRINT_HIGH,"Beginning your suicide run...\n"); GivePent (self, martyr_time + 1); - self.job = self.job | JOB_ACTIVE; //why not? + self.job |= JOB_ACTIVE; //why not? tWeapon = spawn(); tWeapon.owner = self; @@ -466,8 +466,8 @@ void() JobBerserker = } self.super_time = 1; self.super_damage_finished = time + BERSERK_TIME + 1; - self.items = self.items | IT_QUAD; - self.job = self.job | JOB_ACTIVE; //- OfN + self.items |= IT_QUAD; + self.job |= JOB_ACTIVE; //- OfN self.job_finished = time + BERSERK_TIME * 2; // GR was * 3 stuffcmd(self, "v_idlescale 30\n"); @@ -488,7 +488,7 @@ void() JudokaRearm = //Self.enemy is the guy who took it away local entity oself,te; - self.enemy.job = self.enemy.job - (self.enemy.job & JOB_ACTIVE); + self.enemy.job &= ~JOB_ACTIVE; if (self.heat == 1) { //We have their weapon ////Fix feign while stolen self.enemy.weapon = 0; @@ -509,8 +509,8 @@ void() JudokaRearm = ////Fix double weapons #ifndef NO_AUTORIFLE if (self.current_weapon == WEAP_SNIPER_RIFLE) { - self.owner.weapons_carried = self.owner.weapons_carried | WEAP_AUTO_RIFLE; - self.enemy.weapons_carried = self.enemy.weapons_carried - (self.enemy.weapons_carried & WEAP_AUTO_RIFLE); + self.owner.weapons_carried |= WEAP_AUTO_RIFLE; + self.enemy.weapons_carried &= ~WEAP_AUTO_RIFLE); } #endif ////Fix weird weapons @@ -537,10 +537,10 @@ void() JudokaRearm = } sprint(self.owner,PRINT_HIGH,"You get your weapon back\n"); - self.owner.weapons_carried = self.owner.weapons_carried | self.current_weapon; + self.owner.weapons_carried |= self.current_weapon; sprint(self.enemy,PRINT_HIGH,"You lose your stolen weapon\n"); - self.enemy.weapons_carried = self.enemy.weapons_carried - (self.enemy.weapons_carried & self.current_weapon); + self.enemy.weapons_carried &= ~self.current_weapon; //Fix for a bug that would let someone keep their weapon if they switched to autorifle before //the weapon returned. if (self.enemy.current_weapon == self.current_weapon || self.current_weapon == WEAP_SNIPER_RIFLE || self.current_weapon == WEAP_MEDIKIT) { @@ -608,7 +608,7 @@ void() JobJudoka = sprint (trace_ent, PRINT_HIGH, self.netname); sprint (trace_ent, PRINT_HIGH, "\n"); - self.job = self.job | JOB_ACTIVE; + self.job |= JOB_ACTIVE; //Simplify the dual-weapon problem #ifndef NO_AUTORIFLE if (trace_ent.current_weapon == WEAP_AUTO_RIFLE) @@ -671,8 +671,8 @@ void() JobJudoka = //Fix double weapons #ifndef NO_AUTORIFLE if (trace_ent.current_weapon == WEAP_SNIPER_RIFLE) { - self.weapons_carried = self.weapons_carried | WEAP_AUTO_RIFLE; - trace_ent.weapons_carried = trace_ent.weapons_carried - (trace_ent.weapons_carried & WEAP_AUTO_RIFLE); + self.weapons_carried |= WEAP_AUTO_RIFLE; + trace_ent.weapons_carried &= ~WEAP_AUTO_RIFLE); } #endif if (trace_ent.current_weapon == WEAP_MEDIKIT) { @@ -700,11 +700,11 @@ void() JobJudoka = self = oself; } - self.weapons_carried = self.weapons_carried | trace_ent.current_weapon; + self.weapons_carried |= trace_ent.current_weapon; self.current_weapon = trace_ent.current_weapon; W_SetCurrentAmmo(); - trace_ent.weapons_carried = trace_ent.weapons_carried - (trace_ent.weapons_carried & trace_ent.current_weapon); + trace_ent.weapons_carried &= ~trace_ent.current_weapon; trace_ent.current_weapon = 0; deathmsg = DMSG_JUDOKA; @@ -1039,7 +1039,7 @@ void (entity targ, float pain) RevealThief = if (!targ.invisible_time) { targ.modelindex = modelindex_player; - targ.items = targ.items & ~IT_INVISIBILITY; + targ.items &= ~IT_INVISIBILITY; } if (pain) { if (targ.invisible_time) @@ -1057,7 +1057,7 @@ void (entity targ, float pain) RevealThief = if (targ.job & JOB_FULL_HIDE) targ.attack_finished = time + FULLH_NORELOAD_TIME; } - targ.job = targ.job - (targ.job & JOB_FULL_HIDE); - targ.job = targ.job - (targ.job & JOB_ACTIVE); + targ.job &= ~JOB_FULL_HIDE; + targ.job &= ~JOB_ACTIVE; TeamFortress_SetSpeed(targ); }; diff --git a/knight.qc b/knight.qc index b6c1e40..8161bd9 100644 --- a/knight.qc +++ b/knight.qc @@ -255,7 +255,7 @@ void() knight_die = if (self.real_owner.classname == "player") { sprint(self.real_owner,PRINT_HIGH,"Your knight is dead.\n"); - self.real_owner.job = self.real_owner.job - (self.real_owner.job & JOB_DEMON_OUT); + self.real_owner.job &= ~JOB_DEMON_OUT); self.real_owner.job_finished = time + 5; //Can't summon streams of demons SB can so self.real_owner.demon_one = NIL; } diff --git a/medic.qc b/medic.qc index fecc016..0cfc000 100644 --- a/medic.qc +++ b/medic.qc @@ -62,7 +62,7 @@ float (entity targ, entity attacker, float prob) BioInfect = sprint(attacker,PRINT_HIGH,"!\n"); } - targ.tfstate = targ.tfstate | TFSTATE_INFECTED; + targ.tfstate |= TFSTATE_INFECTED; BioInfection = spawn (); BioInfection.classname = "timer"; @@ -134,7 +134,7 @@ float(entity doc, entity patient, vector org) CureAdverseEffects = if (te) { SpawnBlood(org, 20); - patient.tfstate = patient.tfstate - (patient.tfstate & TFSTATE_CONCUSSIONED); + patient.tfstate &= ~TFSTATE_CONCUSSIONED; if (doc == patient) sprint(doc, PRINT_HIGH, "The ground is behaving itself now.\n"); else @@ -166,7 +166,7 @@ float(entity doc, entity patient, vector org) CureAdverseEffects = if (te) { - patient.tfstate = patient.tfstate - (patient.tfstate & TFSTATE_HALLUCINATING); + patient.tfstate &= ~TFSTATE_HALLUCINATING; SpawnBlood(org, 20); if (patient == doc) sprint(doc, PRINT_HIGH, "The visions have stopped.\n"); @@ -203,7 +203,7 @@ float(entity doc, entity patient, vector org) CureAdverseEffects = } if (te) { - patient.tfstate = patient.tfstate - (patient.tfstate & TFSTATE_TRANQUILISED); + patient.tfstate &= ~TFSTATE_TRANQUILISED; TeamFortress_SetSpeed(patient); SpawnBlood(org, 20); @@ -234,7 +234,7 @@ float(entity doc, entity patient, vector org) CureAdverseEffects = // check if the healed player is blinded /*if (patient.tfstate & TFSTATE_STASIS) { - patient.tfstate = patient.tfstate - (patient.tfstate & TFSTATE_STASIS); + patient.tfstate &= ~TFSTATE_STASIS; TeamFortress_SetSpeed(patient); if (doc == patient) sprint(doc, PRINT_HIGH, "You can move freely again!\n"); @@ -245,7 +245,7 @@ float(entity doc, entity patient, vector org) CureAdverseEffects = } // patient.movetype = patient.stasismovetype; patient.gravity = patient.stasisGravity; - patient.effects = patient.effects - (patient.effects & EF_BRIGHTFIELD); + patient.effects &= ~EF_BRIGHTFIELD; return 1; }*/ @@ -257,7 +257,7 @@ float(entity doc, entity patient, vector org) CureAdverseEffects = healam = rint(patient.health / 2); // remove the infection - patient.tfstate = patient.tfstate - (patient.tfstate & TFSTATE_INFECTED); + patient.tfstate &= ~TFSTATE_INFECTED; te = find(NIL, netname, "biotimer"); diff --git a/menu.qc b/menu.qc index cfdb555..fcf07a3 100644 --- a/menu.qc +++ b/menu.qc @@ -210,7 +210,7 @@ void() Player_Menu = // WK - Check to see if the custom class menu is overriding us if ((self.done_custom & CUSTOM_BUILDING) && !(self.done_custom & CUSTOM_OVERRIDE) && self.playerclass == PC_CUSTOM) { self.current_menu = MENU_PRIMARY_WEAPON; - self.done_custom = self.done_custom | CUSTOM_OVERRIDE; + self.done_custom |= CUSTOM_OVERRIDE; } //Don't flash status bars @@ -1450,7 +1450,7 @@ void(float inp) Menu_EngineerFix_Dispenser_Input = { self.armortype = 0; // lost all armor self.armorclass = 0; // lost special armor - self.items = self.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); + self.items &= ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); } W_SetCurrentAmmo(); @@ -1630,11 +1630,11 @@ void(float inp) Menu_EngineerFix_SentryGun_Input = self.building.angles_z = 180; setmodel(self.building.trigger_field, ""); self.building.trigger_field.solid = SOLID_NOT; - self.building.flags = self.building.flags - (self.building.flags & FL_ONGROUND); + self.building.flags &= ~FL_ONGROUND; self.building.movetype = MOVETYPE_FLY; self.building.velocity_z = 200; setsize (self.building, '-16 -16 -40', '16 16 -10'); //WK -40, -10 - self.building.tf_items = self.building.tf_items | NIT_TURRET; + self.building.tf_items |= NIT_TURRET; } } } @@ -1649,7 +1649,7 @@ void(float inp) Menu_EngineerFix_SentryGun_Input = { self.armortype = 0; // lost all armor self.armorclass = 0; // lost special armor - self.items = self.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); + self.items &= ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); } W_SetCurrentAmmo(); @@ -1707,7 +1707,7 @@ void(float inp) Menu_EngineerFix_Sensor_Input = { self.armortype = 0; // lost all armor self.armorclass = 0; // lost special armor - self.items = self.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); + self.items &= ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); } W_SetCurrentAmmo(); @@ -1766,7 +1766,7 @@ void(float inp) Menu_EngineerFix_Camera_Input = { self.armortype = 0; // lost all armor self.armorclass = 0; // lost special armor - self.items = self.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); + self.items &= ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); } W_SetCurrentAmmo(); @@ -1838,7 +1838,7 @@ void(float inp) Menu_EngineerFix_Teleporter_Input = { self.armortype = 0; // lost all armor self.armorclass = 0; // lost special armor - self.items = self.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); + self.items &= ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); } W_SetCurrentAmmo(); @@ -1912,7 +1912,7 @@ void(float inp) Menu_EngineerFix_FieldGen_Input = { self.armortype = 0; // lost all armor self.armorclass = 0; // lost special armor - self.items = self.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); + self.items &= ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); } W_SetCurrentAmmo(); @@ -2263,13 +2263,13 @@ void(float inp) Menu_EngineerFix_Tesla_Input = if (inp == 4) { //Spy Detector if (Check_Tesla_Ups(4, self, self.building, 4, 0)) { - self.building.tf_items = self.building.tf_items | NIT_AUTOID; + self.building.tf_items |= NIT_AUTOID; } } if (inp == 5) { //CH Get frags for upgrades if (Check_Tesla_Ups(3, self, self.building, 5, 0)) { - self.building.tf_items = self.building.tf_items | NIT_TELEPORTER; + self.building.tf_items |= NIT_TELEPORTER; } } if (inp == 6){ // Tinker by Cyt0 Remade by CH to fit with new code @@ -2309,7 +2309,7 @@ void(float inp) Menu_EngineerFix_Tesla_Input = { self.armortype = 0; // lost all armor self.armorclass = 0; // lost special armor - self.items = self.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); + self.items &= ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); } W_SetCurrentAmmo(); @@ -2338,22 +2338,22 @@ void(float inp) Menu_EngineerFix_Tesla_Input2 = if (inp == 1) { //Kevlar if (Check_Tesla_Ups(1, self, self.building, 6, 1)) { - self.building.tf_items = self.building.tf_items | NIT_KEVLAR; - self.building.armorclass = self.building.armorclass | AT_SAVESHOT; + self.building.tf_items |= NIT_KEVLAR; + self.building.armorclass |= AT_SAVESHOT; } } if (inp == 2) { //Blast if (Check_Tesla_Ups(1, self, self.building, 7, 1)) { - self.building.tf_items = self.building.tf_items | NIT_BLAST; - self.building.armorclass = self.building.armorclass | AT_SAVEEXPLOSION; + self.building.tf_items |= NIT_BLAST; + self.building.armorclass |= AT_SAVEEXPLOSION; } } if (inp == 3) { //Blast if (Check_Tesla_Ups(1, self, self.building, 8, 1)) { - self.building.tf_items = self.building.tf_items | NIT_ASBESTOS; - self.building.armorclass = self.building.armorclass | AT_SAVEFIRE; + self.building.tf_items |= NIT_ASBESTOS; + self.building.armorclass |= AT_SAVEFIRE; } } if (inp == 4) { //Tesla Turret(tm) @@ -2387,11 +2387,11 @@ void(float inp) Menu_EngineerFix_Tesla_Input2 = } self.building.angles_z = 180; - self.building.flags = self.building.flags - (self.building.flags & FL_ONGROUND); + self.building.flags &= ~FL_ONGROUND; self.building.movetype = MOVETYPE_FLY; self.building.velocity_z = 200; setsize (self.building, '-16 -16 10', '16 16 62'); - self.building.tf_items = self.building.tf_items | NIT_TURRET; + self.building.tf_items |= NIT_TURRET; self.building.is_haxxxoring=1; //flag determines if flying and it's used for cloaking teslas, set to 0 when landed } @@ -2401,14 +2401,14 @@ void(float inp) Menu_EngineerFix_Tesla_Input2 = if (inp == 5) { //Improved Targeter if (Check_Tesla_Ups(1, self, self.building, 10, 1)) { - self.building.tf_items = self.building.tf_items | NIT_SCANNER; + self.building.tf_items |= NIT_SCANNER; } } //CH its commented out here and in the centerprint - OfN nomore! if (inp == 6) { //Cloaking tesla if (Check_Tesla_Ups(1, self, self.building, 11, 1)) { - self.building.tf_items = self.building.tf_items | NIT_TESLA_CLOAKING; + self.building.tf_items |= NIT_TESLA_CLOAKING; if (self.building.job == 1) { local entity oself; @@ -2448,7 +2448,7 @@ void(float inp) Menu_EngineerFix_Tesla_Input2 = { self.armortype = 0; // lost all armor self.armorclass = 0; // lost special armor - self.items = self.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); + self.items &= ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); } W_SetCurrentAmmo(); @@ -2557,7 +2557,7 @@ void(float inp) Menu_Dispenser_Input = if (self.armortype == 0) { self.armortype = self.armor_allowed; - //self.items = self.items | IT_ARMOR1; + //self.items |= IT_ARMOR1; W_SetCurrentAmmo(); } @@ -2581,7 +2581,7 @@ void(float inp) Menu_Dispenser_Input = { self.armortype = 0; // lost all armor self.armorclass = 0; // lost special armor - self.items = self.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); + self.items &= ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); } W_SetCurrentAmmo(); @@ -2692,7 +2692,7 @@ void(float inp) Menu_PrimaryWeapon_Input = } else if (self.money >= PRICE) { self.money = self.money - PRICE; - self.weapons_carried = self.weapons_carried | WEAP_SNIPER_RIFLE | WEAP_AUTO_RIFLE; + self.weapons_carried |= WEAP_SNIPER_RIFLE | WEAP_AUTO_RIFLE; self.maxammo_shells = self.maxammo_shells + 75; PrintMoney(); } @@ -2722,7 +2722,7 @@ void(float inp) Menu_PrimaryWeapon_Input = //Clean up asbestos armor if (!(self.tf_items & NIT_ASBESTOS)) self.money = self.money - 750; //Sync this with asbestos - self.tf_items = self.tf_items & ~NIT_ASBESTOS; + self.tf_items &= ~NIT_ASBESTOS; PrintRefund(PRICE); self.weapons_carried = self.weapons_carried - WEAP_INCENDIARY; @@ -2733,11 +2733,11 @@ void(float inp) Menu_PrimaryWeapon_Input = else if (self.money >= PRICE) { self.money = self.money - PRICE; - self.weapons_carried = self.weapons_carried | WEAP_INCENDIARY | WEAP_FLAMETHROWER; + self.weapons_carried |= WEAP_INCENDIARY | WEAP_FLAMETHROWER; //Give em asbestos armor, and a refund if they have it if (self.tf_items & NIT_ASBESTOS) self.money = self.money + 750; //Sync this with asbestos price - self.tf_items = self.tf_items | NIT_ASBESTOS; + self.tf_items |= NIT_ASBESTOS; self.maxammo_cells = self.maxammo_cells + 200; @@ -2850,7 +2850,7 @@ void(float inp) Menu_SecondaryWeapon_Input = } else if (self.money >= PRICE) { self.money = self.money - PRICE; - self.cutf_items = self.cutf_items | CUTF_KNIFE; + self.cutf_items |= CUTF_KNIFE; PrintMoney(); } else @@ -3490,16 +3490,16 @@ void(float inp) Menu_Special_Input = //Clean up auto-medic (sync this with Custom.qc) if (self.tf_items & NIT_AUTOSCANNER) self.money = self.money + 250; //Sync this with price below - self.tf_items = self.tf_items & ~NIT_AUTOSCANNER; + self.tf_items &= ~NIT_AUTOSCANNER; PrintRefund(PRICE); - self.tf_items = self.tf_items & ~NIT_SCANNER; - self.tf_items_flags = self.tf_items_flags - (self.tf_items & NIT_SCANNER_ENEMY); + self.tf_items &= ~NIT_SCANNER; + self.tf_items_flags &= ~NIT_SCANNER_ENEMY; } else if (self.money >= PRICE) { self.money = self.money - PRICE; - self.tf_items = self.tf_items | NIT_SCANNER; - self.tf_items_flags = self.tf_items_flags | NIT_SCANNER_ENEMY; + self.tf_items |= NIT_SCANNER; + self.tf_items_flags |= NIT_SCANNER_ENEMY; PrintMoney(); } else @@ -3525,7 +3525,7 @@ void(float inp) Menu_Special_Input = } else if (self.money >= PRICE) { self.money = self.money - PRICE; - self.cutf_items = self.cutf_items | CUTF_DETPACK; + self.cutf_items |= CUTF_DETPACK; self.maxammo_detpack = self.maxammo_detpack + 1; PrintMoney(); } @@ -3543,7 +3543,7 @@ void(float inp) Menu_Special_Input = } else if (self.money >= PRICE) { self.money = self.money - PRICE; - self.weapons_carried = self.weapons_carried | WEAP_MEDIKIT; + self.weapons_carried |= WEAP_MEDIKIT; self.maxammo_medikit = self.maxammo_medikit + 80; PrintMoney(); } diff --git a/monsters.qc b/monsters.qc index 24d2b15..d691945 100644 --- a/monsters.qc +++ b/monsters.qc @@ -545,7 +545,7 @@ void() walkmonster_start_go = if (IsMonster(self)) if (self.real_owner.classname == "player") { - //self.real_owner.job = self.real_owner.job - (self.real_owner.job & JOB_DEMON_OUT); + //self.real_owner.job &= ~JOB_DEMON_OUT); local string MName; MName=GetMonsterName(self); sprint(self.real_owner,PRINT_HIGH,"Your "); @@ -587,7 +587,7 @@ void() walkmonster_start_go = self.view_ofs = '0 0 25'; self.use = monster_use; - self.flags = self.flags | FL_MONSTER; + self.flags |= FL_MONSTER; if (self.target) { @@ -653,8 +653,8 @@ void() flymonster_start_go = self.view_ofs = '0 0 25'; self.use = monster_use; - self.flags = self.flags | FL_FLY; - self.flags = self.flags | FL_MONSTER; + self.flags |= FL_FLY; + self.flags |= FL_MONSTER; if (!walkmove(0,0)) { @@ -714,8 +714,8 @@ void() swimmonster_start_go = self.view_ofs = '0 0 10'; self.use = monster_use; - self.flags = self.flags | FL_SWIM; - self.flags = self.flags | FL_MONSTER; + self.flags |= FL_SWIM; + self.flags |= FL_MONSTER; if (self.target) { diff --git a/often.qc b/often.qc index 0768584..a28452c 100644 --- a/often.qc +++ b/often.qc @@ -413,7 +413,7 @@ void(entity player) UpdateCells = || player.current_weapon == WEAP_LASERCANNON) { player.currentammo = player.ammo_cells; - player.items = player.items | IT_CELLS; + player.items |= IT_CELLS; } }; @@ -624,7 +624,7 @@ void() FlareGrenadeExplode = WriteCoord (MSG_MULTICAST, org_z); multicast (org, MULTICAST_PVS); - self.effects = self.effects | EF_DIMLIGHT; + self.effects |= EF_DIMLIGHT; self.think = SUB_Remove; self.nextthink = time + FLARE_DURATION; diff --git a/player.qc b/player.qc index 2d605a6..f55d548 100644 --- a/player.qc +++ b/player.qc @@ -190,7 +190,7 @@ void() player_touch = Bio.classname = "timer"; Bio.netname = "biotimer"; - other.tfstate = other.tfstate | TFSTATE_INFECTED; + other.tfstate |= TFSTATE_INFECTED; other.infection_team_no = self.infection_team_no; sprint(other, PRINT_MEDIUM, "You have been infected by "); @@ -1145,7 +1145,7 @@ void(string gibname, float dm) ThrowHead = setsize (self, '-16 -16 0', '16 16 56'); self.velocity = VelocityForDamage (dm); self.origin_z = self.origin_z - 24; - self.flags = self.flags - (self.flags & FL_ONGROUND); + self.flags &= ~FL_ONGROUND; self.avelocity = crandom() * '0 600 0'; /* @@ -1176,7 +1176,7 @@ void(string gibname) HeadShotThrowHead = setsize (self, '-16 -16 0', '16 16 56'); self.velocity = normalize(self.head_shot_vector) * 600; self.origin_z = self.origin_z + 24; - self.flags = self.flags - (self.flags & FL_ONGROUND); + self.flags &= ~FL_ONGROUND; self.avelocity = '0 0 0'; setorigin (self, self.origin); @@ -1332,7 +1332,7 @@ void() PlayerDie = self.view_ofs = '0 0 -8'; self.deadflag = DEAD_DYING; self.solid = SOLID_NOT; - self.flags = self.flags - (self.flags & FL_ONGROUND); + self.flags &= ~FL_ONGROUND; self.movetype = MOVETYPE_TOSS; if (self.velocity_z < 10) diff --git a/pyro.qc b/pyro.qc index 21fff66..45c9b82 100644 --- a/pyro.qc +++ b/pyro.qc @@ -237,7 +237,7 @@ void() NapalmGrenadeExplode = local entity head; // do an incendiary-cannon explosion instead - self.effects = self.effects | EF_BRIGHTLIGHT; + self.effects |= EF_BRIGHTLIGHT; // don't do radius damage to the other, because all the damage // was done in the impact @@ -805,7 +805,7 @@ void() T_IncendiaryTouch = remove(self); return; } - self.effects = self.effects | EF_BRIGHTLIGHT; + self.effects |= EF_BRIGHTLIGHT; damg = 20 + random()*20; diff --git a/rotate.qc b/rotate.qc index 3b99cf1..3ad01e4 100644 --- a/rotate.qc +++ b/rotate.qc @@ -842,7 +842,7 @@ void() func_rotate_train = self.dest1 = self.origin; // original position - self.flags = self.flags | FL_ONGROUND; + self.flags |= FL_ONGROUND; }; //************************************************ diff --git a/sbitems.qc b/sbitems.qc index cb5185e..dfa6be1 100644 --- a/sbitems.qc +++ b/sbitems.qc @@ -151,7 +151,7 @@ void() PrimeC4Det = te.classname = "timer"; te.netname = "C4detpack_timer"; self.is_toffingadet = 1; - self.tfstate = self.tfstate | TFSTATE_C4THROW; + self.tfstate |= TFSTATE_C4THROW; TeamFortress_SetSpeed(self); sprint(self, PRINT_HIGH, "Arming detpack...\n"); }; @@ -175,7 +175,7 @@ void() TeamFortress_C4DetpackTouch = makeImmune(other,time + 2); //other.immune_to_check = time + 2; - other.tfstate = other.tfstate | TFSTATE_CANT_MOVE; + other.tfstate |= TFSTATE_CANT_MOVE; sprint(other, PRINT_HIGH, "Disarming detpack...\n"); TeamFortress_SetSpeed(other); @@ -284,7 +284,7 @@ void() ThrowC4Det = teamprefixsprint(self.team_no,self); teamsprint6(self,self.netname," throws a C4!\n","","","",""); - self.tfstate = self.tfstate - (self.tfstate & TFSTATE_C4THROW); + self.tfstate &= ~TFSTATE_C4THROW; TeamFortress_SetSpeed(self); // let's roll }; @@ -583,8 +583,7 @@ void(entity inflictor, entity attacker, float bounce, entity ignore) T_RadiusAnt if (head.classname != "player") { - if(head.flags & FL_ONGROUND) - head.flags = head.flags - FL_ONGROUND; + head.flags &= ~FL_ONGROUND; } else { diff --git a/scout.qc b/scout.qc index c2f37e6..402d250 100644 --- a/scout.qc +++ b/scout.qc @@ -73,7 +73,7 @@ void() FlashGrenadeExplode = local entity te; local float loopc = 0; - self.effects = self.effects | EF_BRIGHTLIGHT; + self.effects |= EF_BRIGHTLIGHT; sound (self, CHAN_WEAPON, "weapons/r_exp3.wav", 1, ATTN_NORM); @@ -323,11 +323,11 @@ void(float scanrange,float inAuto) TeamFortress_Scan = if (self.tf_items_flags & NIT_SCANNER_ENEMY) { sprint (self, PRINT_HIGH, "Enemy Scanning disabled.\n"); - self.tf_items_flags = self.tf_items_flags & ~NIT_SCANNER_ENEMY; + self.tf_items_flags &= ~NIT_SCANNER_ENEMY; return; } sprint (self, PRINT_HIGH, "Enemy Scanning enabled.\n"); - self.tf_items_flags = self.tf_items_flags | NIT_SCANNER_ENEMY; + self.tf_items_flags |= NIT_SCANNER_ENEMY; return; } @@ -337,11 +337,11 @@ void(float scanrange,float inAuto) TeamFortress_Scan = if (self.tf_items_flags & NIT_SCANNER_FRIENDLY) { sprint (self, PRINT_HIGH, "Friendly Scanning disabled.\n"); - self.tf_items_flags = self.tf_items_flags & ~NIT_SCANNER_FRIENDLY; + self.tf_items_flags &= ~NIT_SCANNER_FRIENDLY; return; } sprint (self, PRINT_HIGH, "Friendly Scanning enabled.\n"); - self.tf_items_flags = self.tf_items_flags | NIT_SCANNER_FRIENDLY; + self.tf_items_flags |= NIT_SCANNER_FRIENDLY; return; } @@ -709,8 +709,7 @@ void(entity inflictor, entity attacker, float bounce, entity ignore) T_RadiusBou if (head.classname != "player") { - if(head.flags & FL_ONGROUND) - head.flags = head.flags - FL_ONGROUND; + head.flags &= ~FL_ONGROUND; } else { diff --git a/sentry.qc b/sentry.qc index 0a3b9ca..493772c 100644 --- a/sentry.qc +++ b/sentry.qc @@ -55,7 +55,7 @@ $frame lvl3_shoot1 lvl3_shoot2 */ void() RemoveGlow = { - self.effects = self.effects - (self.effects & EF_DIMLIGHT); + self.effects &= ~EF_DIMLIGHT; }; //=========================== @@ -561,7 +561,7 @@ float() Sentry_Fire = if (self.ammo_shells > 0) { //WK muzzleflash(); - self.effects = self.effects | EF_DIMLIGHT; + self.effects |= EF_DIMLIGHT; /* if (self.tf_items & NIT_TURRET) sound (self ,CHAN_WEAPON, "weapons/asscan2.wav", 1, ATTN_NORM); else */ @@ -761,7 +761,7 @@ void() Sentry_Touch = } if (!other) { //The eagle has landed! // sprint(self.real_owner, PRINT_HIGH, "The eagle has landed!\n"); - self.flags = self.flags | FL_ONGROUND; + self.flags |= FL_ONGROUND; self.movetype = MOVETYPE_STEP; self.origin_z = self.origin_z + 32;//32; // was 40, old custom bug? fixed return; diff --git a/shambler.qc b/shambler.qc index 09a2b13..845b5ff 100644 --- a/shambler.qc +++ b/shambler.qc @@ -286,7 +286,7 @@ void() CastLightning = local vector org, dir; local float ldmg; - self.effects = self.effects | EF_DIMLIGHT; + self.effects |= EF_DIMLIGHT; ai_face (); @@ -359,7 +359,7 @@ void() sham_magic2 =[ $magic2, sham_magic3 ] {ai_face();}; void() sham_magic3 =[ $magic3, sham_magic4 ] {ai_face();self.nextthink = self.nextthink + 0.2; local entity o; -self.effects = self.effects | EF_DIMLIGHT; +self.effects |= EF_DIMLIGHT; ai_face(); self.owner = spawn(); o = self.owner; @@ -371,12 +371,12 @@ o.think = SUB_Remove; }; void() sham_magic4 =[ $magic4, sham_magic5 ] { -self.effects = self.effects | EF_DIMLIGHT; +self.effects |= EF_DIMLIGHT; self.owner.frame = 1; }; void() sham_magic5 =[ $magic5, sham_magic6 ] { -self.effects = self.effects | EF_DIMLIGHT; +self.effects |= EF_DIMLIGHT; self.owner.frame = 2; }; void() sham_magic6 =[ $magic6, sham_magic9 ] @@ -465,7 +465,7 @@ void() custom_shambler_die = if (self.real_owner.classname == "player" && self.real_owner.demon_one == self) { sprint(self.real_owner,PRINT_HIGH,"Your shambler is dead.\n"); - self.real_owner.job = self.real_owner.job - (self.real_owner.job & JOB_DEMON_OUT); + self.real_owner.job &= ~JOB_DEMON_OUT; self.real_owner.job_finished = time + 5; //Can't summon streams of demons SB can so self.real_owner.demon_one = NIL; } diff --git a/sniper.qc b/sniper.qc index 3e3c4db..963dac3 100644 --- a/sniper.qc +++ b/sniper.qc @@ -75,7 +75,7 @@ void() SniperSight_Update = if (!(self.owner.tfstate & TFSTATE_AIMING) || (self.owner.current_weapon != WEAP_SNIPER_RIFLE)) { - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_AIMING); + self.owner.tfstate &= ~TFSTATE_AIMING; TeamFortress_SetSpeed(self.owner); self.owner.heat = 0; dremove(self); @@ -122,7 +122,7 @@ void() SniperSight_Update2 = if (!(self.owner.tfstate & TFSTATE_RL_LASER) || (self.owner.current_weapon != WEAP_ROCKET_LAUNCHER)) { - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_RL_LASER); + self.owner.tfstate &= ~TFSTATE_RL_LASER; TeamFortress_SetSpeed(self.owner); self.owner.heat = 0; dremove(self); @@ -155,9 +155,9 @@ void(float type) SniperSight_Create = { local entity sight; if (type == 1) - self.tfstate = self.tfstate | TFSTATE_RL_LASER; + self.tfstate |= TFSTATE_RL_LASER; else - self.tfstate = self.tfstate | TFSTATE_AIMING; + self.tfstate |= TFSTATE_AIMING; sight = spawn (); sight.owner = self; @@ -182,12 +182,12 @@ void() TeamFortress_AutoZoomToggle = { if (self.tfstate & TFSTATE_ZOOMOFF) { - self.tfstate = self.tfstate - TFSTATE_ZOOMOFF; + self.tfstate &= ~TFSTATE_ZOOMOFF; sprint(self, PRINT_HIGH, "autozoom ON\n"); } else { - self.tfstate = self.tfstate | TFSTATE_ZOOMOFF; + self.tfstate |= TFSTATE_ZOOMOFF; sprint(self, PRINT_HIGH, "autozoom OFF\n"); } diff --git a/speed.qc b/speed.qc index d2d0b89..da7dda2 100644 --- a/speed.qc +++ b/speed.qc @@ -82,19 +82,19 @@ void () TeamFortress_CheckForSpeed = max = max + 200; //make sure ok to check if (self.owner.immune_to_chec > time) - immune = immune | IMMUNE; //its ok since IMMUNE becomes 1 + immune |= IMMUNE; //its ok since IMMUNE becomes 1 if (self.owner.hook_out) - immune = immune | GRAPPLE; + immune |= GRAPPLE; //WK We should boot if they have no set speed and are moving //if (self.owner.maxspeed == 0) // no set speed if (!(self.owner.flags & FL_ONGROUND)) //WK People in air immune - immune = immune | FLYING; + immune |= FLYING; if (self.owner.playerclass == PC_UNDEFINED) - immune = immune | NOCLASS; + immune |= NOCLASS; if (self.owner.done_custom & CUSTOM_BUILDING) - immune = immune | BUILDING; + immune |= BUILDING; if (self.owner.health <= 0) - immune = immune | DEAD; + immune |= DEAD; if (self.owner.has_disconnected) dremove(self); diff --git a/spy.qc b/spy.qc index 04654a0..9e5470a 100644 --- a/spy.qc +++ b/spy.qc @@ -240,7 +240,7 @@ void(float type) TeamFortress_SpyFeignDeath = self.current_weapon = self.weapon; W_SetCurrentAmmo(); - self.tfstate = self.tfstate - (self.tfstate & TFSTATE_CANT_MOVE); + self.tfstate &= ~TFSTATE_CANT_MOVE; TeamFortress_SetSpeed(self); // Check .weapon, because .current_weapon has been reset @@ -333,7 +333,7 @@ void(float type) TeamFortress_SpyFeignDeath = makeImmune(self,time+2); //self.immune_to_check = time + 2; - self.tfstate = self.tfstate | TFSTATE_CANT_MOVE; + self.tfstate |= TFSTATE_CANT_MOVE; TeamFortress_SetSpeed(self); self.is_feigning = TRUE; @@ -348,7 +348,7 @@ void(float type) TeamFortress_SpyFeignDeath = } if (self.undercover_team == 0 && self.undercover_skin == 0) - self.items = self.items & ~IT_INVISIBILITY; + self.items &= ~IT_INVISIBILITY; self.invisible_finished = 0; self.modelindex = modelindex_player; // don't use eyes @@ -417,7 +417,7 @@ void() TeamFortress_SpyGoUndercover = { self.is_undercover = 0; self.modelindex = modelindex_player; // return to normal -//WK self.items = self.items & ~IT_INVISIBILITY; +//WK self.items &= ~IT_INVISIBILITY; } else if (self.is_undercover == 2) { @@ -533,7 +533,7 @@ void() TeamFortress_SpyUndercoverThink = if (self.owner.is_undercover == 2) { -//WK self.owner.items = self.owner.items | IT_INVISIBILITY; +//WK self.owner.items |= IT_INVISIBILITY; if (invis_only == TRUE) { self.owner.frame = 0; @@ -653,7 +653,7 @@ void(float teamno) TeamFortress_SpyChangeColor = if (self.undercover_skin == 0) { -//WK self.items = self.items & ~IT_INVISIBILITY; +//WK self.items &= ~IT_INVISIBILITY; self.is_undercover = 0; } return; @@ -780,7 +780,7 @@ void() GasGrenadeMakeGas = else { sprint(te, PRINT_HIGH, "You stop breathing as the poison attacks your nerves...\n"); - te.tfstate = te.tfstate | TFSTATE_HALLUCINATING; + te.tfstate |= TFSTATE_HALLUCINATING; // Create a timer entity timer = spawn(); timer.nextthink = time + GR_HALLU_TIME; @@ -845,7 +845,7 @@ void() HallucinationTimer = if (self.owner.weapons_carried & WEAP_MEDIKIT) //WK self.health = self.health - GR_HALLU_DEC; if (self.health <= 0) - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_HALLUCINATING); + self.owner.tfstate &= ~TFSTATE_HALLUCINATING; if (!(self.owner.tfstate & TFSTATE_HALLUCINATING)) { sprint(self.owner, PRINT_HIGH, "You feel a little better now.\n"); @@ -988,7 +988,7 @@ void() T_TranqDartTouch = } else { - other.tfstate = other.tfstate | TFSTATE_TRANQUILISED; + other.tfstate |= TFSTATE_TRANQUILISED; // Create a timer entity timer = spawn(); timer.nextthink = time + TRANQ_TIME; @@ -1016,7 +1016,7 @@ void() T_TranqDartTouch = else { sprint(other, PRINT_HIGH, "You stop breathing...\n"); - other.tfstate = other.tfstate | TFSTATE_TRANQUILISED; + other.tfstate |= TFSTATE_TRANQUILISED; // Create a timer entity timer = spawn(); timer.nextthink = time + TRANQ_TIME; @@ -1054,7 +1054,7 @@ void() T_TranqDartTouch = // Just remove the player's tranquilisation. void() TranquiliserTimer = { - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_TRANQUILISED); + self.owner.tfstate &= ~TFSTATE_TRANQUILISED; TeamFortress_SetSpeed(self.owner); @@ -1066,7 +1066,7 @@ void() TranquiliserTimer = void() TranquiliserTimer2 = { if (self.owner.tfstate & TFSTATE_TRANQUILISED) //Just in case - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_TRANQUILISED); + self.owner.tfstate &= ~TFSTATE_TRANQUILISED; dremove(self); }; @@ -1082,7 +1082,7 @@ void(entity spy) Spy_RemoveDisguise = // Reset the Skin if (spy.undercover_skin != 0) { -//WK spy.items = spy.items & ~IT_INVISIBILITY; +//WK spy.items &= ~IT_INVISIBILITY; makeImmune(spy,time + 4); //spy.immune_to_check = time + 4; spy.undercover_skin = 0; @@ -1093,7 +1093,7 @@ void(entity spy) Spy_RemoveDisguise = // Set their color if (spy.undercover_team != 0) { -//WK spy.items = spy.items - (spy.items & IT_INVISIBILITY); +//WK spy.items &= ~IT_INVISIBILITY); makeImmune(spy,time + 4); //spy.immune_to_check = time + 4; spy.undercover_team = 0; @@ -1118,7 +1118,7 @@ void(entity spy) Spy_RemoveDisguise = spy.modelindex = modelindex_player; // return to normal //WK if (spy.items & IT_INVISIBILITY) -//WK spy.items = spy.items & ~IT_INVISIBILITY; +//WK spy.items &= ~IT_INVISIBILITY; self.StatusRefreshTime = time + 0.1; } diff --git a/tesla.qc b/tesla.qc index d3e424e..344ad15 100644 --- a/tesla.qc +++ b/tesla.qc @@ -146,7 +146,7 @@ void() Tesla_Lose_Glow = if (self.job == 3) self.job = 1; } } - self.effects = self.effects - (self.effects & EF_DIMLIGHT); + self.effects &= ~EF_DIMLIGHT; }; void() Tesla_Give_Glow = { @@ -160,7 +160,7 @@ void() Tesla_Give_Glow = self.pain_finished=1; } } - self.effects = self.effects | EF_DIMLIGHT; + self.effects |= EF_DIMLIGHT; }; void() TeslaThink; @@ -670,7 +670,7 @@ void() Tesla_Touch = { //The eagle has landed! // sprint(self.real_owner, PRINT_HIGH, "The eagle has landed!\n"); self.solid = SOLID_BBOX; - self.flags = self.flags | FL_ONGROUND; + self.flags |= FL_ONGROUND; self.movetype = MOVETYPE_STEP; self.origin_z = self.origin_z + 40; @@ -678,7 +678,7 @@ void() Tesla_Touch = if (self.job == 1) { - self.effects = self.effects | EF_DIMLIGHT; // hack to make lose_glow to run properly to make disappear again the tesla + self.effects |= EF_DIMLIGHT; // hack to make lose_glow to run properly to make disappear again the tesla Tesla_Lose_Glow(); } @@ -904,7 +904,7 @@ entity(entity OldTesla) TeslaClone = newmis.skin = OldTesla.skin; // - //newmis.flags = newmis.flags - (newmis.flags & FL_ONGROUND); + //newmis.flags &= ~FL_ONGROUND; newmis.flags = OldTesla.flags; /////////////////////////// @@ -922,7 +922,7 @@ entity(entity OldTesla) TeslaClone = newmis.colormap = OldTesla.colormap; //self.colormap; // Set the Base Color //newmis.velocity = '0 0 -8'; newmis.avelocity = '0 0 0'; - newmis.flags = OldTesla.flags; // newmis.flags - (newmis.flags & FL_ONGROUND); + newmis.flags = OldTesla.flags; // &= ~FL_ONGROUND; newmis.team_no = OldTesla.team_no; //- OfN - diff --git a/tfort.qc b/tfort.qc index 2a783da..54cf817 100644 --- a/tfort.qc +++ b/tfort.qc @@ -185,7 +185,7 @@ void() TeamFortress_ChangeClass = self.nextpc = self.impulse - TF_CHANGEPC; //WK - Handle Custom Class if (self.nextpc == PC_CUSTOM) { - self.done_custom = self.done_custom | CUSTOM_ON_SPAWN; //Generate a new custom class when we respawn + self.done_custom |= CUSTOM_ON_SPAWN; //Generate a new custom class when we respawn } sprint(self, PRINT_HIGH, "After dying, you will return as a new class\n"); return; @@ -301,7 +301,7 @@ void() TeamFortress_ChangeClass = if ( self.playerclass == PC_RANDOM ) { sprint(self, PRINT_HIGH, "Random Playerclass.\n"); - self.tfstate = (self.tfstate | TFSTATE_RANDOMPC); + self.tfstate |= TFSTATE_RANDOMPC); self.playerclass = 1 + floor(random() * (PC_RANDOM - 1)); } @@ -348,7 +348,7 @@ void() TeamFortress_ChangeClass = TeamFortress_SetSkin(self); //WK Give them invincibility if they are a normal class or bought it if (self.playerclass >= PC_SCOUT && self.playerclass <= PC_RANDOM) { - self.items = self.items & IT_INVULNERABILITY; + self.items &= IT_INVULNERABILITY; self.invincible_time = 1; self.invincible_finished = time + RESPAWN_GUARD_TIME; } @@ -1140,7 +1140,7 @@ void() TeamFortress_PrimeGrenade = } } - self.tfstate = (self.tfstate | TFSTATE_GRENPRIMED); + self.tfstate |= TFSTATE_GRENPRIMED; tGrenade = spawn(); tGrenade.owner = self; tGrenade.weapon = gtype; @@ -1184,8 +1184,8 @@ void() TeamFortress_GrenadePrimed = if (!(user.tfstate & TFSTATE_GRENPRIMED)) RPrint("GrenadePrimed logic error\n"); - user.tfstate = user.tfstate - (user.tfstate & TFSTATE_GRENPRIMED); - user.tfstate = user.tfstate - (user.tfstate & TFSTATE_GRENTHROWING); + user.tfstate &= ~TFSTATE_GRENPRIMED; + user.tfstate &= ~TFSTATE_GRENTHROWING; // ofn if (self.weapon == GR_TYPE_FLARE) @@ -1360,7 +1360,7 @@ void() TeamFortress_ThrowGrenade = if (self.job & JOB_THIEF && self.job & JOB_FULL_HIDE) RevealThief(self,FALSE); - self.tfstate = self.tfstate | TFSTATE_GRENTHROWING; + self.tfstate |= TFSTATE_GRENTHROWING; }; //========================================================================= @@ -1419,7 +1419,7 @@ void(entity p) TeamFortress_SetSpeed = //-----------------------------------------------------------------------// // STOP THAT SILLY DAMN BUGS, SPY SLIDING ETC.. !!!!!!!!!!!!!!!!!!!!!!! -// if (p.is_feigning || p.is_haxxxoring || p.is_detpacking || p.is_building) - p.tfstate = p.tfstate | TFSTATE_CANT_MOVE; + p.tfstate |= TFSTATE_CANT_MOVE; //-----------------------------------------------------------------------// // Check for any reason why they can't move at all @@ -1773,7 +1773,7 @@ void() TeamFortress_SetEquipment = self.done_custom = 0; //Clear job without losing track of demons, etc. - self.job = self.job - (self.job & JOB_ALL); + self.job &= ~JOB_ALL; } //WK ------^ @@ -1782,14 +1782,14 @@ void() TeamFortress_SetEquipment = self.hover_time = MAX_HOVER_FUEL; //10 secs of hovering or so self.respawn_time = 0; self.heat = 0; - self.tfstate = self.tfstate - (self.tfstate & TFSTATE_RELOADING); + self.tfstate &= ~TFSTATE_RELOADING; if (self.tf_items & NIT_SCUBA) { //WK We're a scuba commando! - self.items = self.items | IT_SUIT; + self.items |= IT_SUIT; self.rad_time = 1; - self.tfstate = self.tfstate | TFSTATE_RADSUIT; + self.tfstate |= TFSTATE_RADSUIT; self.radsuit_finished = time + 666; } else { - self.tfstate = self.tfstate - (self.tfstate & TFSTATE_RADSUIT); + self.tfstate &= ~TFSTATE_RADSUIT; self.items = 0; self.rad_time = 0; self.radsuit_finished = 0; @@ -1824,7 +1824,7 @@ void() TeamFortress_SetEquipment = if (self.team_no == 0) self.lives = -1; - self.items = self.items | kept_items; + self.items |= kept_items; // Start the Cheat-Checking Cyclic Event if CheatChecking Toggleflag is on if (!stof(infokey(NIL,"nospeed")) && (toggleflags&TFLAG_CHEATCHECK)) { @@ -1836,10 +1836,10 @@ void() TeamFortress_SetEquipment = } //WK -- Remove flags for job state - self.job = self.job - (self.job & JOB_ACTIVE); - self.job = self.job - (self.job & JOB_FULL_HIDE); - self.job = self.job - (self.job & JOB_TIRED); -// self.job = self.job - (self.job & JOB_MARTYR_ENEMY); + self.job &= ~JOB_ACTIVE; + self.job &= ~JOB_FULL_HIDE; + self.job &= ~JOB_TIRED; +// self.job &= ~JOB_MARTYR_ENEMY); self.job_finished = time; if ( self.playerclass == PC_CUSTOM ) { //WK - Reset the custom class @@ -1942,15 +1942,15 @@ void() TeamFortress_SetEquipment = self.armortype = self.armor_allowed; //Start with red if red's allowed self.armorclass = 0; //Default to no special armor type if (self.tf_items & NIT_KEVLAR) - self.armorclass = self.armorclass | AT_SAVESHOT; + self.armorclass |= AT_SAVESHOT; if (self.tf_items & NIT_GEL) - self.armorclass = self.armorclass | AT_SAVEMELEE; + self.armorclass |= AT_SAVEMELEE; if (self.tf_items & NIT_BLAST) - self.armorclass = self.armorclass | AT_SAVEEXPLOSION; + self.armorclass |= AT_SAVEEXPLOSION; if (self.tf_items & NIT_CERAMIC) - self.armorclass = self.armorclass | AT_SAVEELECTRICITY; + self.armorclass |= AT_SAVEELECTRICITY; if (self.tf_items & NIT_ASBESTOS) //Buying flamer gives this - self.armorclass = self.armorclass | AT_SAVEFIRE; + self.armorclass |= AT_SAVEFIRE; //Support for the "Auto" class itemry if (self.tf_items & NIT_AUTOSCANNER || self.weapons_carried & WEAP_MEDIKIT || self.tf_items & NIT_AUTOID) { @@ -1964,7 +1964,7 @@ void() TeamFortress_SetEquipment = self.current_weapon = W_BestWeapon (); } else if ( self.playerclass == PC_SCOUT ) { - self.weapons_carried = self.weapons_carried | PC_SCOUT_WEAPONS; + self.weapons_carried |= PC_SCOUT_WEAPONS; self.ammo_rockets = PC_SCOUT_INITAMMO_ROCKET; self.ammo_nails = PC_SCOUT_INITAMMO_NAIL; self.ammo_shells = PC_SCOUT_INITAMMO_SHOT; @@ -1980,13 +1980,13 @@ void() TeamFortress_SetEquipment = self.tp_grenades_2 = PC_SCOUT_GRENADE_TYPE_2; self.tf_items = PC_SCOUT_TF_ITEMS; self.cutf_items = PC_SCOUT_CUTFITEMS; - self.job = self.job | PC_SCOUT_JOB; + self.job |= PC_SCOUT_JOB; // the scanner defaults to enemy scanning ON, friendly scanning OFF // and movement scanner only OFF - self.tf_items_flags = self.tf_items_flags | NIT_SCANNER_ENEMY; + self.tf_items_flags |= NIT_SCANNER_ENEMY; - self.armorclass = self.armorclass | PC_SCOUT_INITARMORCLASS; + self.armorclass |= PC_SCOUT_INITARMORCLASS; self.armortype = PC_SCOUT_INITARMORTYPE; self.armorvalue = PC_SCOUT_INITARMOR; self.armor_allowed = PC_SCOUT_MAXARMORTYPE; @@ -1997,9 +1997,9 @@ void() TeamFortress_SetEquipment = kill_my_demon(); // set the weapon icons on the status bar - self.items = self.items | IT_SHOTGUN | IT_NAILGUN; + self.items |= IT_SHOTGUN | IT_NAILGUN; } else if ( self.playerclass == PC_SNIPER ) { - self.weapons_carried = self.weapons_carried | PC_SNIPER_WEAPONS; + self.weapons_carried |= PC_SNIPER_WEAPONS; self.ammo_rockets = PC_SNIPER_INITAMMO_ROCKET; self.ammo_nails = PC_SNIPER_INITAMMO_NAIL; self.ammo_shells = PC_SNIPER_INITAMMO_SHOT; @@ -2014,9 +2014,9 @@ void() TeamFortress_SetEquipment = self.tp_grenades_1 = PC_SNIPER_GRENADE_TYPE_1; self.tp_grenades_2 = PC_SNIPER_GRENADE_TYPE_2; self.tf_items = PC_SNIPER_TF_ITEMS; - self.job = self.job | PC_SNIPER_JOB; + self.job |= PC_SNIPER_JOB; - self.armorclass = self.armorclass | PC_SNIPER_INITARMORCLASS; + self.armorclass |= PC_SNIPER_INITARMORCLASS; self.armortype = PC_SNIPER_INITARMORTYPE; self.armorvalue = PC_SNIPER_INITARMOR; self.armor_allowed = PC_SNIPER_MAXARMORTYPE; @@ -2027,10 +2027,10 @@ void() TeamFortress_SetEquipment = self.cutf_items = PC_SNIPER_CUTF_ITEMS; // OFN -OTR // set the weapon icons on the status bar - self.items = self.items | IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_NAILGUN; + self.items |= IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_NAILGUN; kill_my_demon(); } else if ( self.playerclass == PC_SOLDIER ) { - self.weapons_carried = self.weapons_carried | PC_SOLDIER_WEAPONS; + self.weapons_carried |= PC_SOLDIER_WEAPONS; self.ammo_rockets = PC_SOLDIER_INITAMMO_ROCKET; self.ammo_nails = PC_SOLDIER_INITAMMO_NAIL; self.ammo_shells = PC_SOLDIER_INITAMMO_SHOT; @@ -2045,9 +2045,9 @@ void() TeamFortress_SetEquipment = self.tp_grenades_1 = PC_SOLDIER_GRENADE_TYPE_1; self.tp_grenades_2 = PC_SOLDIER_GRENADE_TYPE_2; self.tf_items = PC_SOLDIER_TF_ITEMS; - self.job = self.job | PC_SOLDIER_JOB; + self.job |= PC_SOLDIER_JOB; - self.armorclass = self.armorclass | PC_SOLDIER_INITARMORCLASS; + self.armorclass |= PC_SOLDIER_INITARMORCLASS; self.armortype = PC_SOLDIER_INITARMORTYPE; self.armorvalue = PC_SOLDIER_INITARMOR; self.armor_allowed = PC_SOLDIER_MAXARMORTYPE; @@ -2057,10 +2057,10 @@ void() TeamFortress_SetEquipment = self.items_allowed = PC_SOLDIER_WEAPONS; // set the weapon icons on the status bar - self.items = self.items | IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_ROCKET_LAUNCHER; + self.items |= IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_ROCKET_LAUNCHER; // kill_my_demon(); } else if ( self.playerclass == PC_DEMOMAN ) { - self.weapons_carried = self.weapons_carried | PC_DEMOMAN_WEAPONS; + self.weapons_carried |= PC_DEMOMAN_WEAPONS; self.ammo_rockets = PC_DEMOMAN_INITAMMO_ROCKET; self.ammo_nails = PC_DEMOMAN_INITAMMO_NAIL; self.ammo_shells = PC_DEMOMAN_INITAMMO_SHOT; @@ -2075,14 +2075,14 @@ void() TeamFortress_SetEquipment = self.tp_grenades_1 = PC_DEMOMAN_GRENADE_TYPE_1; self.tp_grenades_2 = PC_DEMOMAN_GRENADE_TYPE_2; self.tf_items = PC_DEMOMAN_TF_ITEMS; - self.job = self.job | PC_DEMOMAN_JOB; + self.job |= PC_DEMOMAN_JOB; self.cutf_items = PC_DEMOMAN_CUTFITEMS; // Detpacks self.ammo_detpack = PC_DEMOMAN_INITAMMO_DETPACK; self.maxammo_detpack = PC_DEMOMAN_MAXAMMO_DETPACK; - self.armorclass = self.armorclass | PC_DEMOMAN_INITARMORCLASS; + self.armorclass |= PC_DEMOMAN_INITARMORCLASS; self.armortype = PC_DEMOMAN_INITARMORTYPE; self.armorvalue = PC_DEMOMAN_INITARMOR; self.armor_allowed = PC_DEMOMAN_MAXARMORTYPE; @@ -2095,9 +2095,9 @@ void() TeamFortress_SetEquipment = self.items_allowed = PC_DEMOMAN_WEAPONS; // set the weapon icons on the status bar - self.items = self.items | IT_SHOTGUN | IT_GRENADE_LAUNCHER; + self.items |= IT_SHOTGUN | IT_GRENADE_LAUNCHER; } else if ( self.playerclass == PC_MEDIC ) { - self.weapons_carried = self.weapons_carried | PC_MEDIC_WEAPONS; + self.weapons_carried |= PC_MEDIC_WEAPONS; self.ammo_rockets = PC_MEDIC_INITAMMO_ROCKET; self.ammo_nails = PC_MEDIC_INITAMMO_NAIL; self.ammo_shells = PC_MEDIC_INITAMMO_SHOT; @@ -2112,9 +2112,9 @@ void() TeamFortress_SetEquipment = self.tp_grenades_1 = PC_MEDIC_GRENADE_TYPE_1; self.tp_grenades_2 = PC_MEDIC_GRENADE_TYPE_2; self.tf_items = PC_MEDIC_TF_ITEMS; - self.job = self.job | PC_MEDIC_JOB; + self.job |= PC_MEDIC_JOB; - self.armorclass = self.armorclass | PC_MEDIC_INITARMORCLASS; + self.armorclass |= PC_MEDIC_INITARMORCLASS; self.armortype = PC_MEDIC_INITARMORTYPE; self.armorvalue = PC_MEDIC_INITARMOR; self.armor_allowed = PC_MEDIC_MAXARMORTYPE; @@ -2134,10 +2134,10 @@ void() TeamFortress_SetEquipment = self.items_allowed = PC_MEDIC_WEAPONS; // set the weapon icons on the status bar - self.items = self.items | IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_LIGHT_ASSAULT; + self.items |= IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_LIGHT_ASSAULT; kill_my_demon(); } else if ( self.playerclass == PC_HVYWEAP ) { - self.weapons_carried = self.weapons_carried | PC_HVYWEAP_WEAPONS; + self.weapons_carried |= PC_HVYWEAP_WEAPONS; self.ammo_rockets = PC_HVYWEAP_INITAMMO_ROCKET; self.ammo_nails = PC_HVYWEAP_INITAMMO_NAIL; self.ammo_shells = PC_HVYWEAP_INITAMMO_SHOT; @@ -2152,9 +2152,9 @@ void() TeamFortress_SetEquipment = self.tp_grenades_1 = PC_HVYWEAP_GRENADE_TYPE_1; self.tp_grenades_2 = PC_HVYWEAP_GRENADE_TYPE_2; self.tf_items = PC_HVYWEAP_TF_ITEMS; - self.job = self.job | PC_HVYWEAP_JOB; + self.job |= PC_HVYWEAP_JOB; - self.armorclass = self.armorclass | PC_HVYWEAP_INITARMORCLASS; + self.armorclass |= PC_HVYWEAP_INITARMORCLASS; self.armortype = PC_HVYWEAP_INITARMORTYPE; self.armorvalue = PC_HVYWEAP_INITARMOR; self.armor_allowed = PC_HVYWEAP_MAXARMORTYPE; @@ -2165,10 +2165,10 @@ void() TeamFortress_SetEquipment = self.items_allowed = PC_HVYWEAP_WEAPONS; // set the weapon icons on the status bar - self.items = self.items | IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_ROCKET_LAUNCHER; + self.items |= IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_ROCKET_LAUNCHER; kill_my_demon(); } else if ( self.playerclass == PC_PYRO ) { - self.weapons_carried = self.weapons_carried | PC_PYRO_WEAPONS; + self.weapons_carried |= PC_PYRO_WEAPONS; self.ammo_rockets = PC_PYRO_INITAMMO_ROCKET; self.ammo_nails = PC_PYRO_INITAMMO_NAIL; self.ammo_shells = PC_PYRO_INITAMMO_SHOT; @@ -2183,9 +2183,9 @@ void() TeamFortress_SetEquipment = self.tp_grenades_1 = PC_PYRO_GRENADE_TYPE_1; self.tp_grenades_2 = PC_PYRO_GRENADE_TYPE_2; self.tf_items = PC_PYRO_TF_ITEMS; - self.job = self.job | PC_PYRO_JOB; + self.job |= PC_PYRO_JOB; - self.armorclass = self.armorclass | PC_PYRO_INITARMORCLASS; + self.armorclass |= PC_PYRO_INITARMORCLASS; self.armortype = PC_PYRO_INITARMORTYPE; self.armorvalue = PC_PYRO_INITARMOR; self.armor_allowed = PC_PYRO_MAXARMORTYPE; @@ -2195,9 +2195,9 @@ void() TeamFortress_SetEquipment = kill_my_demon(); // set the weapon icons on the status bar - self.items = self.items | IT_SHOTGUN | IT_GRENADE_LAUNCHER | IT_ROCKET_LAUNCHER; + self.items |= IT_SHOTGUN | IT_GRENADE_LAUNCHER | IT_ROCKET_LAUNCHER; } else if ( self.playerclass == PC_CIVILIAN ) { - self.weapons_carried = self.weapons_carried | PC_CIVILIAN_WEAPONS; + self.weapons_carried |= PC_CIVILIAN_WEAPONS; self.ammo_rockets = PC_CIVILIAN_INITAMMO_ROCKET; self.ammo_nails = PC_CIVILIAN_INITAMMO_NAIL; self.ammo_shells = PC_CIVILIAN_INITAMMO_SHOT; @@ -2212,9 +2212,9 @@ void() TeamFortress_SetEquipment = self.tp_grenades_1 = PC_CIVILIAN_GRENADE_TYPE_1; self.tp_grenades_2 = PC_CIVILIAN_GRENADE_TYPE_2; self.tf_items = PC_CIVILIAN_TF_ITEMS; - self.job = self.job | PC_CIVILIAN_JOB; + self.job |= PC_CIVILIAN_JOB; - self.armorclass = self.armorclass | PC_CIVILIAN_INITARMORCLASS; + self.armorclass |= PC_CIVILIAN_INITARMORCLASS; self.armortype = PC_CIVILIAN_INITARMORTYPE; self.armorvalue = PC_CIVILIAN_INITARMOR; self.armor_allowed = PC_CIVILIAN_MAXARMORTYPE; @@ -2227,7 +2227,7 @@ void() TeamFortress_SetEquipment = self.items = 0; kill_my_demon(); } else if ( self.playerclass == PC_SPY ) { - self.weapons_carried = self.weapons_carried | PC_SPY_WEAPONS; + self.weapons_carried |= PC_SPY_WEAPONS; self.ammo_rockets = PC_SPY_INITAMMO_ROCKET; self.ammo_nails = PC_SPY_INITAMMO_NAIL; self.ammo_shells = PC_SPY_INITAMMO_SHOT; @@ -2242,9 +2242,9 @@ void() TeamFortress_SetEquipment = self.tp_grenades_1 = PC_SPY_GRENADE_TYPE_1; self.tp_grenades_2 = PC_SPY_GRENADE_TYPE_2; self.tf_items = PC_SPY_TF_ITEMS; - self.job = self.job | PC_SPY_JOB; + self.job |= PC_SPY_JOB; - self.armorclass = self.armorclass | PC_SPY_INITARMORCLASS; + self.armorclass |= PC_SPY_INITARMORCLASS; self.armortype = PC_SPY_INITARMORTYPE; self.armorvalue = PC_SPY_INITARMOR; self.armor_allowed = PC_SPY_MAXARMORTYPE; @@ -2254,7 +2254,7 @@ void() TeamFortress_SetEquipment = self.cutf_items = PC_SPY_CUTFITEMS; // set the weapon icons on the status bar - self.items = self.items | IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_NAILGUN; + self.items |= IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_NAILGUN; // If the Spy only has invis, start the Spy's cell regen timer if (invis_only == TRUE) { @@ -2265,7 +2265,7 @@ void() TeamFortress_SetEquipment = te.classname = "timer"; } } else if ( self.playerclass == PC_ENGINEER ) { - self.weapons_carried = self.weapons_carried | PC_ENGINEER_WEAPONS; + self.weapons_carried |= PC_ENGINEER_WEAPONS; self.ammo_rockets = PC_ENGINEER_INITAMMO_ROCKET; self.ammo_nails = PC_ENGINEER_INITAMMO_NAIL; self.ammo_shells = PC_ENGINEER_INITAMMO_SHOT; @@ -2280,9 +2280,9 @@ void() TeamFortress_SetEquipment = self.tp_grenades_1 = PC_ENGINEER_GRENADE_TYPE_1; self.tp_grenades_2 = PC_ENGINEER_GRENADE_TYPE_2; self.tf_items = PC_ENGINEER_TF_ITEMS; - self.job = self.job | PC_ENGINEER_JOB; + self.job |= PC_ENGINEER_JOB; - self.armorclass = self.armorclass | PC_ENGINEER_INITARMORCLASS; + self.armorclass |= PC_ENGINEER_INITARMORCLASS; self.armortype = PC_ENGINEER_INITARMORTYPE; self.armorvalue = PC_ENGINEER_INITARMOR; self.armor_allowed = PC_ENGINEER_MAXARMORTYPE; @@ -2292,7 +2292,7 @@ void() TeamFortress_SetEquipment = self.cutf_items = PC_ENGINEER_CUTFITEMS; // set the weapon icons on the status bar - self.items = self.items | IT_SHOTGUN | IT_SUPER_SHOTGUN; + self.items |= IT_SHOTGUN | IT_SUPER_SHOTGUN; kill_my_demon(); } else if ( self.playerclass == PC_UNDEFINED ) { self.items = 0; @@ -2324,7 +2324,7 @@ void() TeamFortress_SetEquipment = self.modelindex = 0; self.weaponmodel = ""; modelindex_player = 0; - self.tfstate = self.tfstate | TFSTATE_RELOADING; + self.tfstate |= TFSTATE_RELOADING; setmodel(self, ""); } @@ -2342,14 +2342,14 @@ void() TeamFortress_SetEquipment = SetArmyTimer(); if (no_otr) // if its disabled get it off - self.cutf_items = self.cutf_items - (self.cutf_items & CUTF_OTR); + self.cutf_items &= ~CUTF_OTR; if (no_chaplan) - self.job = self.job - (self.job & JOB_CHAPLAN); + self.job &= ~JOB_CHAPLAN; // Give normal classes the hook // Custom classes get it in 'drop into custom class gen' if (allow_hook && self.playerclass != PC_UNDEFINED && self.playerclass != PC_CUSTOM) - self.weapons_carried = self.weapons_carried | WEAP_HOOK; + self.weapons_carried |= WEAP_HOOK; W_SetCurrentAmmo (); }; @@ -2773,13 +2773,13 @@ void() TeamFortress_CheckClassStats = T_Heal(self, (self.health - self.health), 0); // Update armor picture - self.items = self.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); + self.items &= ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); if (self.armortype >= 0.8) - self.items = self.items | IT_ARMOR3; + self.items |= IT_ARMOR3; else if (self.armortype >= 0.6) - self.items = self.items | IT_ARMOR2; + self.items |= IT_ARMOR2; else if (self.armortype >= 0.3) - self.items = self.items | IT_ARMOR1; + self.items |= IT_ARMOR1; }; //========================================================================= @@ -3220,7 +3220,7 @@ void() TeamFortress_ExplodePerson = te.nextthink = time + 25; te.owner = self.owner; te.solid = SOLID_NOT; - self.owner.effects = self.owner.effects | EF_BRIGHTLIGHT; + self.owner.effects |= EF_BRIGHTLIGHT; */ setsize (newmis, '0 0 0', '0 0 0'); setorigin (newmis, self.owner.origin); @@ -3372,20 +3372,20 @@ void() BioInfection_Decay = { // Remove infections which can't hurt the owner if ((teamplay & TEAMPLAY_NOEXPLOSIVE) && Teammate(self.owner.team_no,self.enemy.team_no)) { - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_INFECTED); + self.owner.tfstate &= ~TFSTATE_INFECTED; dremove(self); return; } if (self.invincible_finished > time) { - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_INFECTED); + self.owner.tfstate &= ~TFSTATE_INFECTED; dremove(self); return; } if (self.owner.current_weapon == WEAP_MEDIKIT) { sprint(self.owner,PRINT_HIGH,"You heal yourself of your infection.\n"); - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_INFECTED); + self.owner.tfstate &= ~TFSTATE_INFECTED; dremove(self); return; } @@ -3585,7 +3585,7 @@ void() TeamFortress_RegenerateCells = self.owner.frame = 0; self.owner.weaponframe = 0; self.owner.modelindex = modelindex_eyes; - self.owner.job = self.owner.job - (self.owner.job & JOB_FULL_HIDE); + self.owner.job &= ~JOB_FULL_HIDE; TeamFortress_SetSpeed(self.owner); /*self.owner.ammo_cells = self.owner.ammo_cells - PC_SPY_CELL_USAGE; if (self.owner.ammo_cells <= 0) { @@ -3600,7 +3600,7 @@ void() TeamFortress_RegenerateCells = self.owner.frame = 0; self.owner.weaponframe = 0; self.owner.modelindex = modelindex_null; - self.owner.job = self.owner.job | JOB_FULL_HIDE; + self.owner.job |= JOB_FULL_HIDE; } } /* @@ -3626,7 +3626,7 @@ void() TeamFortress_RegenerateCells = if (self.owner.ammo_cells == 0) { self.owner.is_undercover = 0; self.owner.modelindex = modelindex_player; // return to normal - self.owner.items = self.owner.items & ~IT_INVISIBILITY; + self.owner.items &= ~IT_INVISIBILITY; } else { // Decrease cells self.owner.ammo_cells = self.owner.ammo_cells - PC_SPY_CELL_USAGE; if (self.owner.ammo_cells < 0) diff --git a/tforthlp.qc b/tforthlp.qc index 9d96f5d..8d1175e 100644 --- a/tforthlp.qc +++ b/tforthlp.qc @@ -70,7 +70,7 @@ void() TeamFortress_MOTD = // Set Default autozoom if (DEFAULT_AUTOZOOM == OFF) - self.tfstate = self.tfstate | TFSTATE_ZOOMOFF; + self.tfstate |= TFSTATE_ZOOMOFF; // Set their color to white, so they stand out from teams if ((teamplay != 0) && (self.team_no == 0)) diff --git a/tfortmap.qc b/tfortmap.qc index 8726f49..17d10bd 100644 --- a/tfortmap.qc +++ b/tfortmap.qc @@ -231,7 +231,7 @@ void() TF_PlaceItem = // self.oldorigin = self.origin; // So we can return it later if (self.goal_activation & TFGI_ITEMGLOWS) - self.effects = self.effects | EF_GlowColor(self); + self.effects |= EF_GlowColor(self); // Setup the item_list mask if (item_list_bit == 0) @@ -651,22 +651,22 @@ void(entity AD) ParseTFDetect = if (illegalclasses1 == -1) { illegalclasses1 = 0; - civilianteams = civilianteams | TEAM1_CIVILIANS; + civilianteams |= TEAM1_CIVILIANS; } if (illegalclasses2 == -1) { illegalclasses2 = 0; - civilianteams = civilianteams | TEAM2_CIVILIANS; + civilianteams |= TEAM2_CIVILIANS; } if (illegalclasses3 == -1) { illegalclasses3 = 0; - civilianteams = civilianteams | TEAM3_CIVILIANS; + civilianteams |= TEAM3_CIVILIANS; } if (illegalclasses4 == -1) { illegalclasses4 = 0; - civilianteams = civilianteams | TEAM4_CIVILIANS; + civilianteams |= TEAM4_CIVILIANS; } }; @@ -938,7 +938,7 @@ void(entity Goal, entity Player, entity AP, float addb) Apply_Results = // If this is a goalitem, record the fact that this player // has been affected by it. if (Goal.classname == "item_tfgoal") - Player.item_list = Player.item_list | Goal.item_list; + Player.item_list |= Goal.item_list; if (Player == AP) { @@ -970,7 +970,7 @@ void(entity Goal, entity Player, entity AP, float addb) Apply_Results = if (Goal.invincible_finished < 0) { // KK allow goal to strip invinc cheats - Player.items = Player.items & ~IT_INVULNERABILITY; + Player.items &= ~IT_INVULNERABILITY; Player.invincible_time = 0; Player.invincible_finished = 0; } @@ -1004,15 +1004,15 @@ void(entity Goal, entity Player, entity AP, float addb) Apply_Results = // always get their bought armorclass back if (Player.tf_items & NIT_KEVLAR) - Player.armorclass = Player.armorclass | AT_SAVESHOT; + Player.armorclass |= AT_SAVESHOT; if (Player.tf_items & NIT_GEL) - Player.armorclass = Player.armorclass | AT_SAVEMELEE; + Player.armorclass |= AT_SAVEMELEE; if (Player.tf_items & NIT_BLAST) - Player.armorclass = Player.armorclass | AT_SAVEEXPLOSION; + Player.armorclass |= AT_SAVEEXPLOSION; if (Player.tf_items & NIT_CERAMIC) - Player.armorclass = Player.armorclass | AT_SAVEELECTRICITY; + Player.armorclass |= AT_SAVEELECTRICITY; if (Player.tf_items & NIT_ASBESTOS) - Player.armorclass = Player.armorclass | AT_SAVEFIRE; + Player.armorclass |= AT_SAVEFIRE; Player.items &= ~(IT_ARMOR3 | IT_ARMOR2 | IT_ARMOR1); @@ -1060,43 +1060,43 @@ void(entity Goal, entity Player, entity AP, float addb) Apply_Results = // if its a GoalItem, powerup is permanent, so we use TFSTATE flags if (Goal.classname == "item_tfgoal") { - Player.tfstate = Player.tfstate | TFSTATE_INVINCIBLE; + Player.tfstate |= TFSTATE_INVINCIBLE; Player.invincible_finished = time + 666; } } if (Goal.invisible_finished > 0) { - Player.items = Player.items | IT_INVISIBILITY; + Player.items |= IT_INVISIBILITY; Player.invisible_time = 1; Player.invisible_finished = time + Goal.invisible_finished; // if its a GoalItem, powerup is permanent, so we use TFSTATE flags if (Goal.classname == "item_tfgoal") { - Player.tfstate = Player.tfstate | TFSTATE_INVISIBLE; + Player.tfstate |= TFSTATE_INVISIBLE; Player.invisible_finished = time + 666; } } if (Goal.super_damage_finished > 0) { //WK Remove Inspiration when we get the real thing - Player.tfstate = Player.tfstate - (Player.tfstate & TFSTATE_INSPIRED); + Player.tfstate &= ~TFSTATE_INSPIRED; GiveQuad (Player, Goal.super_damage_finished); // if its a GoalItem, powerup is permanent, so we use TFSTATE flags if (Goal.classname == "item_tfgoal") { - Player.tfstate = Player.tfstate | TFSTATE_QUAD; + Player.tfstate |= TFSTATE_QUAD; Player.super_damage_finished = time + 666; } } if (Goal.radsuit_finished > 0) { - Player.items = Player.items | IT_SUIT; + Player.items |= IT_SUIT; Player.rad_time = 1; Player.radsuit_finished = time + Goal.radsuit_finished; // if its a GoalItem, powerup is permanent, so we use TFSTATE flags if (Goal.classname == "item_tfgoal") { - Player.tfstate = Player.tfstate | TFSTATE_RADSUIT; + Player.tfstate |= TFSTATE_RADSUIT; Player.radsuit_finished = time + 666; } } @@ -1257,7 +1257,7 @@ void (entity Goal, entity Player) RemoveResults = return; // Remove the affected flag - Player.item_list = Player.item_list - (Player.item_list & Goal.item_list); + Player.item_list &= ~Goal.item_list; } if (Goal.health > 0) @@ -1267,7 +1267,7 @@ void (entity Goal, entity Player) RemoveResults = Player.lives = Player.lives - Goal.lives; Player.armortype = Player.armortype - Goal.armortype; Player.armorvalue = Player.armorvalue - Goal.armorvalue; - Player.armorclass = Player.armorclass - (Player.armorclass & Goal.armorclass); + Player.armorclass &= ~Goal.armorclass; Player.real_frags = Player.real_frags - Goal.frags; if (!(toggleflags & TFLAG_TEAMFRAGS)) @@ -1309,24 +1309,24 @@ void (entity Goal, entity Player) RemoveResults = if ((Goal.invincible_finished > 0) && (!puinvin)) { // if its a GoalItem, powerup was permanent, so we remove TFSTATE flag - Player.tfstate = Player.tfstate - (Player.tfstate & TFSTATE_INVINCIBLE); - Player.items = Player.items | IT_INVULNERABILITY; + Player.tfstate &= ~TFSTATE_INVINCIBLE; + Player.items |= IT_INVULNERABILITY; Player.invincible_time = 1; Player.invincible_finished = time + Goal.invincible_finished; } if ((Goal.invisible_finished > 0) && (!puinvis)) { // if its a GoalItem, powerup was permanent, so we remove TFSTATE flag - Player.tfstate = Player.tfstate - (Player.tfstate & TFSTATE_INVISIBLE); - Player.items = Player.items | IT_INVISIBILITY; + Player.tfstate &= ~TFSTATE_INVISIBLE; + Player.items |= IT_INVISIBILITY; Player.invisible_time = 1; Player.invisible_finished = time + Goal.invisible_finished; } if ((Goal.super_damage_finished > 0) && (!puquad)) { // if its a GoalItem, powerup was permanent, so we remove TFSTATE flag - Player.tfstate = Player.tfstate - (Player.tfstate & TFSTATE_QUAD); - Player.items = Player.items | IT_QUAD; + Player.tfstate &= ~TFSTATE_QUAD; + Player.items |= IT_QUAD; Player.super_time = 1; Player.super_damage_finished = time + Goal.super_damage_finished; } @@ -1334,8 +1334,8 @@ void (entity Goal, entity Player) RemoveResults = if ((Goal.radsuit_finished > 0) && (!purad) && !(Player.tf_items & NIT_SCUBA)) { // if its a GoalItem, powerup was permanent, so we remove TFSTATE flag - Player.tfstate = Player.tfstate - (Player.tfstate & TFSTATE_RADSUIT); - Player.items = Player.items | IT_SUIT; + Player.tfstate &= ~TFSTATE_RADSUIT; + Player.items |= IT_SUIT; Player.rad_time = 1; Player.radsuit_finished = time + Goal.radsuit_finished; } @@ -2332,7 +2332,7 @@ void(entity Goal, entity AP, float addb) DoResults = bprint(PRINT_HIGH, AP.netname); bprint(PRINT_HIGH, " гот the блуе flag!\n"); - AP.items = AP.items | IT_KEY1; + AP.items |= IT_KEY1; } else if (Goal.goal_no == CTF_FLAG2) { @@ -2369,7 +2369,7 @@ void(entity Goal, entity AP, float addb) DoResults = } bprint(PRINT_HIGH, AP.netname); bprint(PRINT_HIGH, " гот the ред flag!\n"); - AP.items = AP.items | IT_KEY2; + AP.items |= IT_KEY2; } else if (Goal.goal_no == CTF_DROPOFF1) { @@ -2390,7 +2390,7 @@ void(entity Goal, entity AP, float addb) DoResults = } bprint(PRINT_HIGH, AP.netname); bprint(PRINT_HIGH, " цаптуред the ред flag!\n"); - AP.items = AP.items & ~IT_KEY2; + AP.items &= ~IT_KEY2; } else if (Goal.goal_no == CTF_DROPOFF2) @@ -2412,7 +2412,7 @@ void(entity Goal, entity AP, float addb) DoResults = } bprint(PRINT_HIGH, AP.netname); bprint(PRINT_HIGH, " цаптуред the блуе flag!\n"); - AP.items = AP.items & ~IT_KEY1; + AP.items &= ~IT_KEY1; } } } @@ -2823,7 +2823,7 @@ void(entity Item, entity AP, entity Goal) tfgoalitem_GiveToPlayer = // Do the deeds on the player if (Item.goal_activation & TFGI_GLOW) - AP.effects = AP.effects | EF_GlowColor(AP); + AP.effects |= EF_GlowColor(AP); if (Item.goal_activation & TFGI_SLOW) TeamFortress_SetSpeed(AP); @@ -2832,9 +2832,9 @@ void(entity Item, entity AP, entity Goal) tfgoalitem_GiveToPlayer = // Light up console icons if (Item.items & IT_KEY1) - AP.items = AP.items | IT_KEY1; + AP.items |= IT_KEY1; if (Item.items & IT_KEY2) - AP.items = AP.items | IT_KEY2; + AP.items |= IT_KEY2; // Only do the results if we're allowed to if (Goal != Item) @@ -2981,7 +2981,7 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer = AP.effects &= ~EF_ANYGLOW; if (Item.goal_activation & TFGI_ITEMGLOWS) - Item.effects = Item.effects | EF_GlowColor(Item); + Item.effects |= EF_GlowColor(Item); // Remove the Spy prevention if (!spyoff) @@ -2989,9 +2989,9 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer = // Remove the Light up of console icons if (!key1on) - AP.items = AP.items & ~IT_KEY1; + AP.items &= ~IT_KEY1; if (!key2on) - AP.items = AP.items & ~IT_KEY2; + AP.items &= ~IT_KEY2; // Remove AP Modifications // Go through all the players and do any results diff --git a/tinker.qc b/tinker.qc index d03af28..d72a72a 100644 --- a/tinker.qc +++ b/tinker.qc @@ -11,7 +11,7 @@ void () BadTinker = { sprint(self,PRINT_HIGH,"The tesla blew up.\n"); } else { // ZAP! - self.building.tf_items = self.building.tf_items | NIT_SECURITY_CAMERA; //Turns tesla against team. + self.building.tf_items |= NIT_SECURITY_CAMERA; //Turns tesla against team. self.building.health = 100; //WK Make it easy to kill self.building.max_health = 100; sprint(self,PRINT_HIGH,"You cut the wrong wire!\n"); @@ -60,7 +60,7 @@ void () DoTinker = { } else if (prob <= 0.35){ if (!(self.building.tf_items & NIT_SCANNER)){ - self.building.tf_items = self.building.tf_items | NIT_SCANNER; + self.building.tf_items |= NIT_SCANNER; sprint(self,PRINT_HIGH,"The tesla gets a free improved targeter!\n"); } else{ @@ -69,7 +69,7 @@ void () DoTinker = { } else if (prob <= 0.4){ if (!(self.building.tf_items & NIT_AUTOID)){ - self.building.tf_items = self.building.tf_items | NIT_AUTOID; + self.building.tf_items |= NIT_AUTOID; sprint(self,PRINT_HIGH,"The tesla got a free spy detector!\n"); } else{ diff --git a/triggers.qc b/triggers.qc index d1d3f6e..8e74f0f 100644 --- a/triggers.qc +++ b/triggers.qc @@ -497,11 +497,9 @@ void() teleport_touch = other.fixangle = 1; // turn this way immediately other.teleport_time = time + 0.7; - if (other.flags & FL_ONGROUND) - other.flags = other.flags - FL_ONGROUND; other.velocity = v_forward * 300; } - other.flags = other.flags - other.flags & FL_ONGROUND; + other.flags &= ~FL_ONGROUND; }; /*QUAKED info_teleport_destination (.5 .5 .5) (-8 -8 -8) (8 8 32) @@ -796,7 +794,7 @@ void() trigger_monsterjump_touch = if ( !(other.flags & FL_ONGROUND) ) return; - other.flags = other.flags - FL_ONGROUND; + other.flags &= ~FL_ONGROUND; other.velocity_z = self.height; }; diff --git a/turret.qc b/turret.qc index 225498c..b0b3a3c 100644 --- a/turret.qc +++ b/turret.qc @@ -42,7 +42,7 @@ void() turret_normal = // if no weapon model, it must be instantaneous fire if (!(self.weaponmodel)) - self.spawnflags = self.spawnflags | TURRET_INSTANT_FIRE; + self.spawnflags |= TURRET_INSTANT_FIRE; if (!(self.ammo_shells)) self.ammo_shells = -1; @@ -68,7 +68,7 @@ void() turret_normal = // this is the radius damage done if (self.all_active) - self.spawnflags = self.spawnflags | TURRET_EXPLOSIVE_FIRE; + self.spawnflags |= TURRET_EXPLOSIVE_FIRE; setmodel(self, self.model); setorigin(self, self.origin); diff --git a/warlock.qc b/warlock.qc index 543ae53..02e29e1 100644 --- a/warlock.qc +++ b/warlock.qc @@ -565,7 +565,7 @@ void (float points) custom_demon_create = sprint(self,PRINT_HIGH,"Not enough room to summon creature!\n"); newmis.think = SUB_Remove; newmis.nextthink = time + 0.1; - //self.job = self.job - (self.job & JOB_DEMON_OUT); // FIXME - This shouldn't be needed - OfN done + //self.job &= ~JOB_DEMON_OUT); // FIXME - This shouldn't be needed - OfN done return; } @@ -642,7 +642,7 @@ void (float points) custom_demon_create = teamsprint(self.team_no,self,"\n"); - self.job = self.job | JOB_DEMON_OUT; + self.job |= JOB_DEMON_OUT; self.job_finished = time + 3; //Don't let em kill demon for 15 secs. // SB 15 is tight; 10 // 10 is tight; 5 @@ -654,8 +654,7 @@ void (float points) custom_demon_create = newmis.velocity = v_forward * 10;// + '0 0 250'; newmis.angles = vectoangles(newmis.velocity); - if (newmis.flags & FL_ONGROUND) - newmis.flags = newmis.flags - FL_ONGROUND; + newmis.flags &= ~FL_ONGROUND; newmis.velocity = v_forward * 10; @@ -924,7 +923,7 @@ void () kill_my_demon = te.nextthink = time + 0.1; sprint(self, PRINT_HIGH, "Your fiend is dead.\n"); - self.job = self.job - (self.job & JOB_DEMON_OUT); + self.job &= ~JOB_DEMON_OUT; } te = find(te, classname, "monster_demon1"); @@ -1001,7 +1000,7 @@ void () kill_my_demon = self = oself; //grunt sprint (self, PRINT_HIGH, "Your soldier is dead.\n"); - self.job = self.job - (self.job & JOB_DEMON_OUT); + self.job &= ~JOB_DEMON_OUT; self.demon_one = NIL; SetArmyTimer(); @@ -1031,7 +1030,7 @@ void () kill_my_demon = te.nextthink = time + 0.1; self = oself; - //self.job = self.job - (self.job & JOB_DEMON_OUT); + //self.job &= ~JOB_DEMON_OUT); sprint (self, PRINT_HIGH, "Your knight is dead.\n"); //TF_T_Damage(te, NIL, NIL, 4000, 0, 0); } @@ -1056,7 +1055,7 @@ void () kill_my_demon = te.nextthink = time + 0.1; self = oself; - //self.job = self.job - (self.job & JOB_DEMON_OUT); + //self.job &= ~JOB_DEMON_OUT); sprint (self, PRINT_HIGH, "Your hell knight is dead.\n"); //TF_T_Damage(te, NIL, NIL, 4000, 0, 0); } @@ -1081,7 +1080,7 @@ void () kill_my_demon = te.nextthink = time + 0.1; self = oself; - //self.job = self.job - (self.job & JOB_DEMON_OUT); + //self.job &= ~JOB_DEMON_OUT); sprint (self, PRINT_HIGH, "Your shambler is dead.\n"); //TF_T_Damage(te, NIL, NIL, 4000, 0, 0); } @@ -1115,7 +1114,7 @@ void () kill_my_demon = } - self.job = self.job - (self.job & JOB_DEMON_OUT); + self.job &= ~JOB_DEMON_OUT; self.demon_one = NIL; self.summon_one = NIL; diff --git a/weapons.qc b/weapons.qc index 8684b8e..6670e0f 100644 --- a/weapons.qc +++ b/weapons.qc @@ -318,7 +318,7 @@ void() W_FireAxe = } else { //WK Only give blood if you hit an enemy when being a warlock if ((!Teammate(trace_ent.team_no, self.team_no) || !(self.job & JOB_WARLOCK)) && prematch < time) { - self.job = self.job | JOB_BLOODY_KNIFE; + self.job |= JOB_BLOODY_KNIFE; self.weaponmode = 1; // Put blood on the knife self.weaponmodel = "progs/v_knife2.mdl"; } else if (self.job & JOB_WARLOCK) { @@ -414,7 +414,7 @@ void() W_FireBackstab = //WK Only give blood if you hit an enemy when being a warlock if ((!Teammate(trace_ent.team_no, self.team_no) || !(self.job & JOB_WARLOCK)) && prematch < time) { - self.job = self.job | JOB_BLOODY_KNIFE; + self.job |= JOB_BLOODY_KNIFE; self.weaponmode = 1; self.weaponmodel = "progs/v_knife2.mdl"; } else if (self.job & JOB_WARLOCK) { @@ -680,7 +680,7 @@ void(float inAuto) W_FireMedikit = } if (te) { - trace_ent.tfstate = trace_ent.tfstate - (trace_ent.tfstate & TFSTATE_HALLUCINATING); + trace_ent.tfstate &= ~TFSTATE_HALLUCINATING; SpawnBlood(org, 20); sprint(trace_ent, PRINT_HIGH, "you have been healed of your hallucinations\n"); @@ -707,7 +707,7 @@ void(float inAuto) W_FireMedikit = } if (te) { - trace_ent.tfstate = trace_ent.tfstate - (trace_ent.tfstate & TFSTATE_TRANQUILISED); + trace_ent.tfstate &= ~TFSTATE_TRANQUILISED; TeamFortress_SetSpeed(trace_ent); SpawnBlood(org, 20); @@ -758,7 +758,7 @@ void(float inAuto) W_FireMedikit = healam = rint(trace_ent.health / 2); // remove the infection - trace_ent.tfstate = trace_ent.tfstate - (trace_ent.tfstate & TFSTATE_INFECTED); + trace_ent.tfstate &= ~TFSTATE_INFECTED; // some damage is caused (because of the use of leeches!) // remove half their remaining health @@ -821,7 +821,7 @@ void(float inAuto) W_FireMedikit = T_Heal(trace_ent, healam, 1); self.ammo_medikit = self.ammo_medikit - rint(healam / 10); if (!(trace_ent.items & IT_SUPERHEALTH)) { - trace_ent.items = trace_ent.items | IT_SUPERHEALTH; + trace_ent.items |= IT_SUPERHEALTH; newmis = spawn(); newmis.classname = "medikit_rot"; newmis.nextthink = time + 20; @@ -853,7 +853,7 @@ void(float inAuto) W_FireMedikit = if (trace_ent.tf_items & NIT_GEL && random() < 0.75) return; - trace_ent.tfstate = trace_ent.tfstate | TFSTATE_INFECTED; + trace_ent.tfstate |= TFSTATE_INFECTED; BioInfection = spawn (); BioInfection.classname = "timer"; @@ -942,7 +942,7 @@ void() W_FireBioweapon = if (trace_ent.weapons_carried & WEAP_MEDIKIT) //WK return; - trace_ent.tfstate = trace_ent.tfstate | TFSTATE_INFECTED; + trace_ent.tfstate |= TFSTATE_INFECTED; BioInfection = spawn (); BioInfection.classname = "timer"; @@ -2376,17 +2376,17 @@ void() W_SetCurrentAmmo = player_run(); - self.items = self.items & ~(IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS); + self.items &= ~(IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS); self.weapon = 0; //WK Set armor here... update armor picture - self.items = self.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); + self.items &= ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3); if (self.armortype >= 0.8) - self.items = self.items | IT_ARMOR3; + self.items |= IT_ARMOR3; else if (self.armortype >= 0.6) - self.items = self.items | IT_ARMOR2; + self.items |= IT_ARMOR2; else if (self.armortype >= 0.3) - self.items = self.items | IT_ARMOR1; + self.items |= IT_ARMOR1; //WK Show nothing for custom playerclass while building if ( self.playerclass == PC_CUSTOM @@ -2422,12 +2422,12 @@ void() W_SetCurrentAmmo = self.weaponframe = 0; } else if (self.current_weapon == WEAP_SHOTGUN) { self.currentammo = self.ammo_shells; - self.items = self.items | IT_CELLS; + self.items |= IT_CELLS; if (!(self.tfstate & TFSTATE_RELOADING)) { self.weaponmodel = "progs/v_shot.mdl"; self.weaponframe = 0; } - self.items = self.items | IT_SHELLS; + self.items |= IT_SHELLS; self.weapon = IT_SHOTGUN; } else if (self.current_weapon == WEAP_SUPER_SHOTGUN) { self.currentammo = self.ammo_shells; @@ -2435,7 +2435,7 @@ void() W_SetCurrentAmmo = self.weaponmodel = "progs/v_shot2.mdl"; self.weaponframe = 0; } - self.items = self.items | IT_SHELLS; + self.items |= IT_SHELLS; self.weapon = IT_SUPER_SHOTGUN; } else if (self.current_weapon == WEAP_NAILGUN) { self.currentammo = self.ammo_nails; @@ -2444,7 +2444,7 @@ void() W_SetCurrentAmmo = self.weaponframe = 0; } - self.items = self.items | IT_NAILS; + self.items |= IT_NAILS; self.weapon = IT_NAILGUN; } else if (self.current_weapon == WEAP_LIGHT_ASSAULT) { self.currentammo = self.ammo_nails; @@ -2452,7 +2452,7 @@ void() W_SetCurrentAmmo = self.weaponmodel = "progs/v_nail2.mdl"; self.weaponframe = 0; } - self.items = self.items | IT_NAILS; + self.items |= IT_NAILS; self.weapon = IT_LIGHT_ASSAULT; } else if (self.current_weapon == WEAP_GRENADE_LAUNCHER) { self.currentammo = self.ammo_rockets; @@ -2462,14 +2462,14 @@ void() W_SetCurrentAmmo = } self.weapon = IT_GRENADE_LAUNCHER; - self.items = self.items | IT_ROCKETS; + self.items |= IT_ROCKETS; } else if (self.current_weapon == WEAP_ROCKET_LAUNCHER) { self.currentammo = self.ammo_rockets; if (!(self.tfstate & TFSTATE_RELOADING)) { self.weaponmodel = "progs/v_rock2.mdl"; self.weaponframe = 0; } - self.items = self.items | IT_ROCKETS; + self.items |= IT_ROCKETS; self.weapon = IT_ROCKET_LAUNCHER; } else if (self.current_weapon == WEAP_LIGHTNING) { self.currentammo = self.ammo_cells; @@ -2477,7 +2477,7 @@ void() W_SetCurrentAmmo = self.weaponmodel = "progs/v_light.mdl"; self.weaponframe = 0; } - self.items = self.items | IT_CELLS; + self.items |= IT_CELLS; self.weapon = IT_LIGHTNING; } else if (self.current_weapon == WEAP_SNIPER_RIFLE) { self.currentammo = self.ammo_shells; @@ -2485,7 +2485,7 @@ void() W_SetCurrentAmmo = self.weaponmodel = "progs/v_srifle.mdl"; self.weaponframe = 0; } - self.items = self.items | IT_SHELLS; + self.items |= IT_SHELLS; self.weapon = IT_SHOTGUN; #ifndef NO_AUTORIFLE } else if (self.current_weapon == WEAP_AUTO_RIFLE) { @@ -2494,7 +2494,7 @@ void() W_SetCurrentAmmo = self.weaponmodel = "progs/v_srifle.mdl"; self.weaponframe = 0; } - self.items = self.items | IT_SHELLS; + self.items |= IT_SHELLS; self.weapon = IT_SUPER_SHOTGUN; #endif } else if (self.current_weapon == WEAP_ASSAULT_CANNON) { @@ -2503,7 +2503,7 @@ void() W_SetCurrentAmmo = self.weaponmodel = "progs/v_asscan.mdl"; self.weaponframe = 0; } - self.items = self.items | IT_SHELLS; + self.items |= IT_SHELLS; self.weapon = IT_ROCKET_LAUNCHER; } else if (self.current_weapon == WEAP_FLAMETHROWER) { self.currentammo = self.ammo_cells; @@ -2511,7 +2511,7 @@ void() W_SetCurrentAmmo = self.weaponmodel = "progs/v_rock.mdl"; self.weaponframe = 0; } - self.items = self.items | IT_CELLS; + self.items |= IT_CELLS; self.weapon = IT_GRENADE_LAUNCHER; } else if (self.current_weapon == WEAP_INCENDIARY) { self.currentammo = self.ammo_rockets; @@ -2519,7 +2519,7 @@ void() W_SetCurrentAmmo = self.weaponmodel = "progs/v_rock2.mdl"; self.weaponframe = 0; } - self.items = self.items | IT_ROCKETS; + self.items |= IT_ROCKETS; self.weapon = IT_ROCKET_LAUNCHER; } else if (self.current_weapon == WEAP_MEDIKIT) { self.currentammo = 0; @@ -2531,7 +2531,7 @@ void() W_SetCurrentAmmo = self.weaponmodel = "progs/v_shot.mdl"; self.weaponframe = 0; } - self.items = self.items | IT_NAILS; + self.items |= IT_NAILS; self.weapon = IT_SHOTGUN; } else if (self.current_weapon == WEAP_LASER) { self.currentammo = self.ammo_nails; @@ -2541,7 +2541,7 @@ void() W_SetCurrentAmmo = self.weaponframe = 0; } - self.items = self.items | IT_NAILS; + self.items |= IT_NAILS; self.weapon = IT_SHOTGUN; } else if (self.current_weapon == WEAP_DAEDALUS) { self.currentammo = self.ammo_cells; @@ -2551,7 +2551,7 @@ void() W_SetCurrentAmmo = self.weaponframe = 0; } - self.items = self.items | IT_CELLS; + self.items |= IT_CELLS; self.weapon = IT_LIGHTNING; } else if (self.current_weapon == WEAP_MAUSER) { self.currentammo = self.ammo_nails; @@ -2561,7 +2561,7 @@ void() W_SetCurrentAmmo = self.weaponframe = 0; } - self.items = self.items | IT_NAILS; + self.items |= IT_NAILS; self.weapon = IT_LIGHT_ASSAULT; } else if (self.current_weapon == WEAP_AIRF) { self.currentammo = 0; @@ -2575,7 +2575,7 @@ void() W_SetCurrentAmmo = self.weaponmodel = "progs/v_nail2.mdl"; self.weaponframe = 0; } - self.items = self.items | IT_NAILS; + self.items |= IT_NAILS; self.weapon = IT_LIGHT_ASSAULT;//IT_SUPER_NAILGUN; } else if (self.current_weapon == WEAP_LASERCANNON) { self.currentammo = self.ammo_cells; @@ -2584,7 +2584,7 @@ void() W_SetCurrentAmmo = self.weaponframe = 0; } - self.items = self.items | IT_CELLS; + self.items |= IT_CELLS; self.weapon = WEAP_LASERCANNON; } else { self.currentammo = 0; @@ -2682,7 +2682,7 @@ Is called when weapon has finished reloading ====================*/ void() W_Reload_shotgun = { - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_RELOADING); + self.owner.tfstate &= ~TFSTATE_RELOADING; self.owner.weaponmodel = "progs/v_shot.mdl"; sprint(self.owner, PRINT_LOW, "finished reloading\n"); self.owner.StatusRefreshTime = time + 0.1; @@ -2692,7 +2692,7 @@ void() W_Reload_shotgun = void() W_Reload_light_assault = { - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_RELOADING); + self.owner.tfstate &= ~TFSTATE_RELOADING; self.owner.weaponmodel = "progs/v_nail2.mdl"; sprint(self.owner, PRINT_LOW, "finished reloading\n"); self.owner.StatusRefreshTime = time + 0.1; @@ -2702,7 +2702,7 @@ void() W_Reload_light_assault = void() W_Reload_super_shotgun = { - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_RELOADING); + self.owner.tfstate &= ~TFSTATE_RELOADING; self.owner.weaponmodel = "progs/v_shot2.mdl"; sprint(self.owner, PRINT_LOW, "finished reloading\n"); self.owner.StatusRefreshTime = time + 0.1; @@ -2712,7 +2712,7 @@ void() W_Reload_super_shotgun = void() W_Reload_grenade_launcher = { - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_RELOADING); + self.owner.tfstate &= ~TFSTATE_RELOADING; self.owner.weaponmodel = "progs/v_rock.mdl"; sprint(self.owner, PRINT_LOW, "finished reloading\n"); self.owner.StatusRefreshTime = time + 0.1; @@ -2722,7 +2722,7 @@ void() W_Reload_grenade_launcher = void() W_Reload_rocket_launcher = { - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_RELOADING); + self.owner.tfstate &= ~TFSTATE_RELOADING; self.owner.weaponmodel = "progs/v_rock2.mdl"; sprint(self.owner, PRINT_LOW, "finished reloading\n"); self.owner.StatusRefreshTime = time + 0.1; @@ -2732,7 +2732,7 @@ void() W_Reload_rocket_launcher = void() W_Reload_laser_cannon = { - self.owner.tfstate = self.owner.tfstate - (self.owner.tfstate & TFSTATE_RELOADING); + self.owner.tfstate &= ~TFSTATE_RELOADING; self.owner.weaponmodel = "progs/v_laserg.mdl"; sprint(self.owner, PRINT_LOW, "Laser Cannon charged\n"); self.owner.StatusRefreshTime = time + 0.1; @@ -2751,7 +2751,7 @@ float() CheckForReload = self.reload_shotgun = RE_SHOTGUN - self.ammo_shells; sprint (self, PRINT_HIGH, "reloading...\n"); - self.tfstate = (self.tfstate | TFSTATE_RELOADING); + self.tfstate |= TFSTATE_RELOADING; tWeapon = spawn(); tWeapon.owner = self; tWeapon.classname = "timer"; @@ -2774,7 +2774,7 @@ float() CheckForReload = RE_SUPER_SHOTGUN - self.ammo_shells; sprint (self, PRINT_HIGH, "reloading...\n"); - self.tfstate = (self.tfstate | TFSTATE_RELOADING); + self.tfstate |= TFSTATE_RELOADING; tWeapon = spawn(); tWeapon.owner = self; tWeapon.classname = "timer"; @@ -2794,7 +2794,7 @@ float() CheckForReload = self.reload_light_assault = RE_LIGHT_ASSAULT - self.ammo_nails; sprint (self, PRINT_HIGH, "reloading...\n"); - self.tfstate = (self.tfstate | TFSTATE_RELOADING); + self.tfstate |= TFSTATE_RELOADING; tWeapon = spawn(); tWeapon.owner = self; tWeapon.classname = "timer"; @@ -2814,7 +2814,7 @@ float() CheckForReload = self.reload_laser_cannon = RE_LASER_CANNON - self.ammo_cells; sprint (self, PRINT_HIGH, "Charging cannon...\n"); - self.tfstate = (self.tfstate | TFSTATE_RELOADING); + self.tfstate |= TFSTATE_RELOADING; tWeapon = spawn(); tWeapon.owner = self; tWeapon.classname = "timer"; @@ -2835,7 +2835,7 @@ float() CheckForReload = RE_GRENADE_LAUNCHER - self.ammo_rockets; sprint (self, PRINT_HIGH, "reloading...\n"); - self.tfstate = (self.tfstate | TFSTATE_RELOADING); + self.tfstate |= TFSTATE_RELOADING; tWeapon = spawn(); tWeapon.owner = self; tWeapon.classname = "timer"; @@ -2856,7 +2856,7 @@ float() CheckForReload = - self.ammo_rockets; sprint (self, PRINT_HIGH, "reloading...\n"); - self.tfstate = (self.tfstate | TFSTATE_RELOADING); + self.tfstate |= TFSTATE_RELOADING; tWeapon = spawn(); tWeapon.owner = self; tWeapon.classname = "timer"; @@ -3107,7 +3107,7 @@ void() W_Attack = self.heat = 1; makeImmune(self,time+2); // self.immune_to_check = time + 2; - self.tfstate = self.tfstate | TFSTATE_ASSAULTCANNON; + self.tfstate |= TFSTATE_ASSAULTCANNON; TeamFortress_SetSpeed(self); player_assaultcannonup1(); } @@ -4094,7 +4094,7 @@ void() DeadImpulses = if (self.impulse == 69 && infokey(NIL, "allow_debug") == "yes") { self.demon_blood = MAX_KNIFE_BLOOD; - self.job = self.job | JOB_BLOODY_KNIFE; + self.job |= JOB_BLOODY_KNIFE; self.impulse=0; return; } @@ -4131,14 +4131,14 @@ void() DeadImpulses = //WK Have a normal "custom" command reset the "sell" flag //Have to do this here, since "upgrade" corrupts self.impulse if (self.impulse == TF_CHANGEPC + PC_CUSTOM) // - self.done_custom = self.done_custom - (self.done_custom & CUSTOM_SELLING); + self.done_custom &= ~CUSTOM_SELLING; //WK - CustomTF1.6 ability to sell frags //Sets a flag saying that we wish to sell //And then issues a command to rebuild our class. if (self.impulse == TF_SELL) { if (bounty) { - self.done_custom = self.done_custom | CUSTOM_SELLING; + self.done_custom |= CUSTOM_SELLING; self.impulse = TF_CHANGEPC + PC_CUSTOM; } else { sprint (self, PRINT_HIGH, "Sorry, the admin has bounty disabled\n"); @@ -4167,7 +4167,7 @@ void() DeadImpulses = TeamFortress_ChangeClass(); } else if (self.impulse == TF_UNCUSTOM && self.done_custom & CUSTOM_ON_SPAWN) { - self.done_custom = self.done_custom - (self.done_custom & CUSTOM_ON_SPAWN); + self.done_custom &= ~CUSTOM_ON_SPAWN; sprint(self, PRINT_HIGH, "You will no longer spawn as a new playerclass.\n"); } // TeamFortress Help Impulses @@ -4304,7 +4304,7 @@ void() W_WeaponFrame = #endif self.height = 90; - self.tfstate = self.tfstate | TFSTATE_AIMING; + self.tfstate |= TFSTATE_AIMING; TeamFortress_SetSpeed(self); } @@ -4313,7 +4313,7 @@ void() W_WeaponFrame = if (!(self.tfstate & TFSTATE_RL_LASER)) { // create the laser sight SniperSight_Create(1); - self.tfstate = self.tfstate | TFSTATE_RL_LASER; + self.tfstate |= TFSTATE_RL_LASER; SuperDamageSound (); W_Attack (); @@ -4367,8 +4367,8 @@ void() T_DaedalusTouch = head.velocity = head.velocity * (points / 20); if (head.cutf_items & CUTF_GYMNAST) head.velocity = head.velocity * (points / 20); - if (head.classname != "player" && head.flags & FL_ONGROUND) - head.flags = head.flags - FL_ONGROUND; + if (head.classname != "player") + head.flags &= ~FL_ONGROUND; } } if (head.takedamage) { @@ -4598,8 +4598,7 @@ void() HIP_LaserTouch = self.velocity = normalize(self.velocity); self.velocity = self.speed * self.velocity; self.neworigin = self.velocity; - if (self.flags & FL_ONGROUND) - self.flags = self.flags - FL_ONGROUND; + self.flags &= ~FL_ONGROUND; // r = random(); // self.attack_finished = time + 7; //ofn - restart its life of 7 seconds @@ -4624,8 +4623,7 @@ void() HIP_LaserThink = remove(self); return; } - if (self.flags & FL_ONGROUND) - self.flags = self.flags - FL_ONGROUND; + self.flags &= ~FL_ONGROUND; self.velocity = self.neworigin; self.angles = vectoangles(self.velocity); self.nextthink = time+0.15; diff --git a/wizard.qc b/wizard.qc index 6ba1b24..11c5eee 100644 --- a/wizard.qc +++ b/wizard.qc @@ -195,7 +195,7 @@ void() Wiz_FastFire = if (self.owner.health > 0) { - self.owner.effects = self.owner.effects | EF_DIMLIGHT; + self.owner.effects |= EF_DIMLIGHT; makevectors (self.enemy.angles); dst = self.enemy.origin - 13*self.movedir; @@ -339,7 +339,7 @@ void() wiz_death1 =[ $death1, wiz_death2 ] { self.velocity_x = -200 + 400*random(); self.velocity_y = -200 + 400*random(); self.velocity_z = 100 + 100*random(); -self.flags = self.flags - (self.flags & FL_ONGROUND); +self.flags &= ~FL_ONGROUND; sound (self, CHAN_VOICE, "wizard/wdeath.wav", 1, ATTN_MONSTERDIE); }; void() wiz_death2 =[ $death2, wiz_death3 ] {}; @@ -359,7 +359,7 @@ void() wiz_die = if (self.real_owner.classname == "player" && self.real_owner.demon_one == self) { sprint(self.real_owner,PRINT_HIGH,"Your scrag is dead.\n"); - self.real_owner.job = self.real_owner.job - (self.real_owner.job & JOB_DEMON_OUT); + self.real_owner.job &= ~JOB_DEMON_OUT; self.real_owner.job_finished = time + 5; //Can't summon streams of demons SB can so self.real_owner.demon_one = NIL; }