mirror of
https://git.code.sf.net/p/quake/game-source
synced 2024-11-10 14:41:57 +00:00
use a switch statement for the monster class config stuff
This commit is contained in:
parent
825691490b
commit
05df43535e
1 changed files with 22 additions and 19 deletions
|
@ -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":
|
||||||
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
|
case "monster_shambler":
|
||||||
if (self.classname == "monster_ogre")
|
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
|
||||||
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
|
break;
|
||||||
if (self.classname == "monster_shalrath")
|
case "monster_dog":
|
||||||
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
|
setsize (self, '-32 -32 -24', '32 32 40');
|
||||||
if (self.classname == "monster_shambler")
|
break;
|
||||||
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
|
case "monster_fish":
|
||||||
if (self.classname == "monster_dog")
|
setsize (self, '-16 -16 -24', '16 16 24');
|
||||||
setsize (self, '-32 -32 -24', '32 32 40');
|
self.flags = self.flags + FL_SWIM;
|
||||||
if (self.classname == "monster_fish") {
|
break;
|
||||||
setsize (self, '-16 -16 -24', '16 16 24');
|
case "monster_wizard":
|
||||||
self.flags = self.flags + FL_SWIM;
|
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;
|
||||||
}
|
}
|
||||||
if (self.classname == "monster_wizard")
|
|
||||||
self.flags = self.flags + FL_FLY;
|
|
||||||
|
|
||||||
spawn_tfog (self.origin);
|
spawn_tfog (self.origin);
|
||||||
spawn_tdeath (self.origin, self);
|
spawn_tdeath (self.origin, self);
|
||||||
|
|
Loading…
Reference in a new issue