clean up some flag manipulation

This commit is contained in:
Bill Currie 2007-04-28 00:39:42 +00:00
parent 7f6ed1c476
commit 47c500011e
7 changed files with 12 additions and 12 deletions

View file

@ -31,11 +31,11 @@
break;
case "monster_fish":
setsize (self, '-16 -16 -24', '16 16 24');
self.flags = self.flags + FL_SWIM;
self.flags |= FL_SWIM;
break;
case "monster_wizard":
setsize (self, '-16 -16 -24', '16 16 40');
self.flags = self.flags + FL_FLY;
self.flags |= FL_FLY;
break;
default:
// about 3/4 of quakes critters use this size

View file

@ -548,7 +548,7 @@ void() NextLevel =
serverflags |= 4;
} else if (!(serverflags & 8)) {
mapname = "e4m1";
serverflags -= 7; //FIXME should this be &= ~7?
serverflags &= ~7;
}
o = spawn();

View file

@ -82,7 +82,7 @@ void() demon1_jump4 =[ $leap4, demon1_jump5 ]
self.origin_z = self.origin_z + 1;
self.velocity = v_forward * 600 + '0 0 250';
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 ] {};
@ -355,7 +355,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
}

View file

@ -90,7 +90,7 @@ void() Dog_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
}
@ -160,7 +160,7 @@ void() dog_leap2 =[ $leap2, dog_leap3 ]
self.origin_z = self.origin_z + 1;
self.velocity = v_forward * 300 + '0 0 200';
if (self.flags & FL_ONGROUND)
self.flags = self.flags - FL_ONGROUND;
self.flags &= ~FL_ONGROUND;
};
void() dog_leap3 =[ $leap3, dog_leap4 ] {};

View file

@ -23,12 +23,12 @@ void() light_use =
if (self.spawnflags & START_OFF)
{
lightstyle(self.style, "m");
self.spawnflags = self.spawnflags - START_OFF;
self.spawnflags &= ~START_OFF;
}
else
{
lightstyle(self.style, "a");
self.spawnflags = self.spawnflags + START_OFF;
self.spawnflags |= START_OFF;
}
};

View file

@ -50,9 +50,9 @@ void() monster_death_use =
{
// fall to ground
if (self.flags & FL_FLY)
self.flags = self.flags - FL_FLY;
self.flags &= ~FL_FLY;
if (self.flags & FL_SWIM)
self.flags = self.flags - FL_SWIM;
self.flags &= ~FL_SWIM;
if (!self.target)
return;

View file

@ -111,7 +111,7 @@ void() Tar_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
}