use a switch statement for the monster class config stuff

This commit is contained in:
Bill Currie 2004-02-11 04:11:29 +00:00
parent 825691490b
commit 05df43535e
1 changed files with 22 additions and 19 deletions

View File

@ -3,7 +3,7 @@
// void bringback (); declared in ogre.qc ( first file its referanced in);
// void savecritter (); ""
integer respawn_enabled = 1;
integer respawn_enabled;
@static {
@ -32,25 +32,28 @@ void () im_alive =
setmodel(self, self.weaponmodel);
self.health = self.max_health;
// about 3/4 of quakes critters use this size
setsize (self, '-16 -16 -24', '16 16 40');
if (self.classname == "monster_demon1")
switch (self.classname) {
case "monster_demon1":
case "monster_ogre":
case "monster_shalrath":
case "monster_shambler":
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
if (self.classname == "monster_ogre")
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
if (self.classname == "monster_shalrath")
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
if (self.classname == "monster_shambler")
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
if (self.classname == "monster_dog")
break;
case "monster_dog":
setsize (self, '-32 -32 -24', '32 32 40');
if (self.classname == "monster_fish") {
break;
case "monster_fish":
setsize (self, '-16 -16 -24', '16 16 24');
self.flags = self.flags + FL_SWIM;
}
if (self.classname == "monster_wizard")
break;
case "monster_wizard":
self.flags = self.flags + FL_FLY;
break;
default:
// about 3/4 of quakes critters use this size
setsize (self, '-16 -16 -24', '16 16 40');
break;
}
spawn_tfog (self.origin);
spawn_tdeath (self.origin, self);