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