alias sentcvar "qc_cmd_cmd sentcvar ${* ?}" // New system for sending a client cvar to the server
alias editmob "qc_cmd_cmd mobedit ${* ?}" // Edit a monster's properties
alias killmob "qc_cmd_cmd mobkill ${* ?}" // Kill a monster
-alias spawnmob "qc_cmd_cmd mobspawn ${* ?}" // Spawn a monster infront of the player
+alias spawnmob "qc_cmd_cmd mobspawn ${* ?}" // Spawn a monster infront of the player
alias spectate "qc_cmd_cmd spectate ${* ?}" // Become an observer
alias suggestmap "qc_cmd_cmd suggestmap ${* ?}" // Suggest a map to the mapvote at match end
//alias tell "qc_cmd_cmd tell ${* ?}" // Send a message directly to a player
float dist;
float spd;
- if (time > self.ltime)
+ if (time > self.ltime || self.enemy.health <= 0 || self.owner.health <= 0)
{
self.projectiledeathtype |= HITTYPE_SPLASH;
mage_spike_explode();
///////////////
- if (self.enemy.deadflag != DEAD_NO || self.owner.health < 1)
- {
- self.enemy = world;
- self.ltime = time + 1 + (random() * 4);
- self.nextthink = self.ltime;
- return;
- }
-
//self.angles = vectoangles(self.velocity); // turn model in the new flight direction
self.nextthink = time;// + 0.05; // csqc projectiles
UpdateCSQCProjectile(self);
self.velocity = '0 0 0';
self.SendFlags |= MSF_MOVE;
-
+
+ // number of monsters spawned with mobspawn command
totalspawned -= 1;
MON_ACTION(self.monsterid, MR_DEATH);