mirror of
https://git.code.sf.net/p/quake/game-source
synced 2024-11-22 03:51:12 +00:00
bit manipulation cleanup
This commit is contained in:
parent
9d82f07eaa
commit
9b44735884
3 changed files with 13 additions and 13 deletions
|
@ -549,16 +549,16 @@ NextLevel =
|
|||
mapname = "e1m1";
|
||||
} else if (!(serverflags & 1)) {
|
||||
mapname = "e1m1";
|
||||
serverflags = serverflags | 1;
|
||||
serverflags |= 1;
|
||||
} else if (!(serverflags & 2)) {
|
||||
mapname = "e2m1";
|
||||
serverflags = serverflags | 2;
|
||||
serverflags |= 2;
|
||||
} else if (!(serverflags & 4)) {
|
||||
mapname = "e3m1";
|
||||
serverflags = serverflags | 4;
|
||||
serverflags |= 4;
|
||||
} else if (!(serverflags & 8)) {
|
||||
mapname = "e4m1";
|
||||
serverflags = serverflags - 7;
|
||||
serverflags -= 7; //FIXME &= ~7?
|
||||
}
|
||||
|
||||
o = spawn ();
|
||||
|
@ -802,7 +802,7 @@ PlayerPreThink =
|
|||
if (self.button2)
|
||||
PlayerJump ();
|
||||
else
|
||||
self.flags = self.flags | FL_JUMPRELEASED;
|
||||
self.flags |= FL_JUMPRELEASED;
|
||||
|
||||
// teleporters can force a non-moving pause time
|
||||
if (time < self.pausetime)
|
||||
|
|
|
@ -588,7 +588,7 @@ weapon_touch =
|
|||
|
||||
// change to the weapon
|
||||
old = other.items;
|
||||
other.items = other.items | new;
|
||||
other.items |= new;
|
||||
|
||||
stemp = self;
|
||||
self = other;
|
||||
|
@ -980,7 +980,7 @@ 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;
|
||||
|
||||
self.solid = SOLID_NOT;
|
||||
self.model = string_null;
|
||||
|
@ -1286,7 +1286,7 @@ item_artifact_super_damage =
|
|||
else
|
||||
self.netname = "Quad Damage";
|
||||
self.items = IT_QUAD;
|
||||
self.effects = self.effects | EF_BLUE;
|
||||
self.effects |= EF_BLUE;
|
||||
setsize (self, '-16 -16 -24', '16 16 32');
|
||||
StartItem ();
|
||||
};
|
||||
|
@ -1331,11 +1331,11 @@ BackpackTouch =
|
|||
if (other.invincible_time != 1) {
|
||||
other.invincible_time = 1;
|
||||
other.invincible_finished = time + 30;
|
||||
other.items = other.items | IT_INVULNERABILITY;
|
||||
other.items |= IT_INVULNERABILITY;
|
||||
|
||||
other.super_time = 1;
|
||||
other.super_damage_finished = time + 30;
|
||||
other.items = other.items | IT_QUAD;
|
||||
other.items |= IT_QUAD;
|
||||
|
||||
other.ammo_cells = 0;
|
||||
|
||||
|
|
|
@ -519,7 +519,7 @@ 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';
|
||||
};
|
||||
|
||||
|
@ -635,7 +635,7 @@ PlayerDie =
|
|||
local float i;
|
||||
local string s;
|
||||
|
||||
self.items = self.items - (self.items & IT_INVISIBILITY);
|
||||
self.items &= ~IT_INVISIBILITY;
|
||||
|
||||
if ((stof (infokey (world, "dq"))) != 0) {
|
||||
if (self.super_damage_finished > 0) {
|
||||
|
@ -674,7 +674,7 @@ 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)
|
||||
self.velocity_z = self.velocity_z + 300 * random ();
|
||||
|
|
Loading…
Reference in a new issue