bit manipulation cleanup

This commit is contained in:
Bill Currie 2004-02-08 04:52:32 +00:00
parent 9d82f07eaa
commit 9b44735884
3 changed files with 13 additions and 13 deletions

View file

@ -549,16 +549,16 @@ NextLevel =
mapname = "e1m1"; mapname = "e1m1";
} else if (!(serverflags & 1)) { } else if (!(serverflags & 1)) {
mapname = "e1m1"; mapname = "e1m1";
serverflags = serverflags | 1; serverflags |= 1;
} else if (!(serverflags & 2)) { } else if (!(serverflags & 2)) {
mapname = "e2m1"; mapname = "e2m1";
serverflags = serverflags | 2; serverflags |= 2;
} else if (!(serverflags & 4)) { } else if (!(serverflags & 4)) {
mapname = "e3m1"; mapname = "e3m1";
serverflags = serverflags | 4; serverflags |= 4;
} else if (!(serverflags & 8)) { } else if (!(serverflags & 8)) {
mapname = "e4m1"; mapname = "e4m1";
serverflags = serverflags - 7; serverflags -= 7; //FIXME &= ~7?
} }
o = spawn (); o = spawn ();
@ -802,7 +802,7 @@ PlayerPreThink =
if (self.button2) if (self.button2)
PlayerJump (); PlayerJump ();
else else
self.flags = self.flags | FL_JUMPRELEASED; self.flags |= FL_JUMPRELEASED;
// teleporters can force a non-moving pause time // teleporters can force a non-moving pause time
if (time < self.pausetime) if (time < self.pausetime)

View file

@ -588,7 +588,7 @@ weapon_touch =
// change to the weapon // change to the weapon
old = other.items; old = other.items;
other.items = other.items | new; other.items |= new;
stemp = self; stemp = self;
self = other; self = other;
@ -980,7 +980,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;
@ -1286,7 +1286,7 @@ item_artifact_super_damage =
else else
self.netname = "Quad Damage"; self.netname = "Quad Damage";
self.items = IT_QUAD; self.items = IT_QUAD;
self.effects = self.effects | EF_BLUE; self.effects |= EF_BLUE;
setsize (self, '-16 -16 -24', '16 16 32'); setsize (self, '-16 -16 -24', '16 16 32');
StartItem (); StartItem ();
}; };
@ -1331,11 +1331,11 @@ BackpackTouch =
if (other.invincible_time != 1) { if (other.invincible_time != 1) {
other.invincible_time = 1; other.invincible_time = 1;
other.invincible_finished = time + 30; other.invincible_finished = time + 30;
other.items = other.items | IT_INVULNERABILITY; other.items |= IT_INVULNERABILITY;
other.super_time = 1; other.super_time = 1;
other.super_damage_finished = time + 30; other.super_damage_finished = time + 30;
other.items = other.items | IT_QUAD; other.items |= IT_QUAD;
other.ammo_cells = 0; other.ammo_cells = 0;

View file

@ -519,7 +519,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';
}; };
@ -635,7 +635,7 @@ PlayerDie =
local float i; local float i;
local string s; local string s;
self.items = self.items - (self.items & IT_INVISIBILITY); self.items &= ~IT_INVISIBILITY;
if ((stof (infokey (world, "dq"))) != 0) { if ((stof (infokey (world, "dq"))) != 0) {
if (self.super_damage_finished > 0) { if (self.super_damage_finished > 0) {
@ -674,7 +674,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 + 300 * random (); self.velocity_z = self.velocity_z + 300 * random ();