bit manip cleanup

This commit is contained in:
Bill Currie 2004-02-08 05:38:36 +00:00
parent 66891f8e88
commit 0a95abcc29
5 changed files with 12 additions and 12 deletions

View file

@ -144,9 +144,9 @@ SetNewParms =
void () void ()
DecodeLevelParms = DecodeLevelParms =
{ {
self.player_flag = self.player_flag | parm16; self.player_flag |= parm16;
self.player_flag = self.player_flag - (self.player_flag & ITEM_RUNE_MASK); self.player_flag &= ~ITEM_RUNE_MASK;
self.player_flag = self.player_flag - (self.player_flag & ITEM_ENEMY_FLAG); self.player_flag &= ~ITEM_ENEMY_FLAG;
self.statstate = parm14; self.statstate = parm14;
if (gamestart) { if (gamestart) {
@ -910,7 +910,7 @@ PlayerJump =
if (!(self.flags & FL_JUMPRELEASED)) if (!(self.flags & FL_JUMPRELEASED))
return; // don't pogo stick return; // don't pogo stick
self.flags = self.flags - (self.flags & FL_JUMPRELEASED); self.flags &= ~FL_JUMPRELEASED;
self.button2 = 0; self.button2 = 0;
// player jumping sound // player jumping sound

View file

@ -173,7 +173,7 @@ health_touch =
// Megahealth = rot down the player's super health // Megahealth = rot down the player's super health
if (self.healtype == 2) { if (self.healtype == 2) {
other.items = other.items | IT_SUPERHEALTH; other.items |= IT_SUPERHEALTH;
self.nextthink = time + 5; self.nextthink = time + 5;
self.think = item_megahealth_rot; self.think = item_megahealth_rot;
self.owner = other; self.owner = other;
@ -851,7 +851,7 @@ key_touch =
sound (other, CHAN_ITEM, self.noise, 1, ATTN_NORM); sound (other, CHAN_ITEM, self.noise, 1, ATTN_NORM);
stuffcmd (other, "bf\n"); stuffcmd (other, "bf\n");
other.items = other.items | self.items; other.items |= self.items;
self.solid = SOLID_NOT; self.solid = SOLID_NOT;
self.model = string_null; self.model = string_null;

View file

@ -572,7 +572,7 @@ ThrowHead =
setsize (self, '-16 -16 0', '16 16 56'); setsize (self, '-16 -16 0', '16 16 56');
self.velocity = VelocityForDamage (dm); self.velocity = VelocityForDamage (dm);
self.origin_z = self.origin_z - 24; 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'; self.avelocity = crandom() * '0 600 0';
}; };
@ -637,7 +637,7 @@ PlayerDie =
self.view_ofs = '0 0 -8'; self.view_ofs = '0 0 -8';
self.deadflag = DEAD_DYING; self.deadflag = DEAD_DYING;
self.solid = SOLID_NOT; self.solid = SOLID_NOT;
self.flags = self.flags - (self.flags & FL_ONGROUND); self.flags &= ~FL_ONGROUND;
self.movetype = MOVETYPE_TOSS; self.movetype = MOVETYPE_TOSS;
if (self.velocity_z < 10) if (self.velocity_z < 10)
self.velocity_z = self.velocity_z + random()*300; self.velocity_z = self.velocity_z + random()*300;

View file

@ -472,8 +472,8 @@ TeamSkinAssign =
self.ctfskinno = 3; self.ctfskinno = 3;
if (random () < 0.5) if (random () < 0.5)
self.ctfskinno++; self.ctfskinno++;
self.player_flag -= self.player_flag & 65280; self.player_flag &= ~65280;
self.player_flag += self.ctfskinno * 256; self.player_flag |= self.ctfskinno * 256;
TeamSkinSet (); TeamSkinSet ();
}; };

View file

@ -765,7 +765,7 @@ W_SetCurrentAmmo =
self.currentammo = self.ammo_rockets; self.currentammo = self.ammo_rockets;
self.weaponmodel = "progs/v_rock.mdl"; self.weaponmodel = "progs/v_rock.mdl";
self.weaponframe = 0; self.weaponframe = 0;
self.items = self.items | IT_ROCKETS; self.items |= IT_ROCKETS;
break; break;
case IT_ROCKET_LAUNCHER: case IT_ROCKET_LAUNCHER:
self.currentammo = self.ammo_rockets; self.currentammo = self.ammo_rockets;
@ -1123,7 +1123,7 @@ ServerflagsCommand =
{ {
serverflags = serverflags * 2 + 1; serverflags = serverflags * 2 + 1;
// ZOID: Bug fix // ZOID: Bug fix
serverflags = (serverflags & 15); serverflags &= 15;
}; };
//ZOID: Uhm, where am I? //ZOID: Uhm, where am I?