From 0bec40fd6799c0ee8eeeb7a08678b7765a2d506e Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 29 Aug 2013 23:08:07 +1000 Subject: [PATCH] Detonate mage missiles instantly if the mage dies --- commands.cfg | 2 +- qcsrc/common/monsters/monster/mage.qc | 10 +--------- qcsrc/common/monsters/sv_monsters.qc | 3 ++- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/commands.cfg b/commands.cfg index ee71c70f3..e0d815f83 100644 --- a/commands.cfg +++ b/commands.cfg @@ -160,7 +160,7 @@ alias selfstuff "qc_cmd_cmd selfstuff ${* ?}" // Stuffc 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 diff --git a/qcsrc/common/monsters/monster/mage.qc b/qcsrc/common/monsters/monster/mage.qc index 743dc2968..817cea7c7 100644 --- a/qcsrc/common/monsters/monster/mage.qc +++ b/qcsrc/common/monsters/monster/mage.qc @@ -189,7 +189,7 @@ void mage_spike_think() 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(); @@ -239,14 +239,6 @@ void mage_spike_think() /////////////// - 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); diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 0f81f283e..ab715efd5 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -818,7 +818,8 @@ void monster_die() self.velocity = '0 0 0'; self.SendFlags |= MSF_MOVE; - + + // number of monsters spawned with mobspawn command totalspawned -= 1; MON_ACTION(self.monsterid, MR_DEATH); -- 2.39.2