]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Detonate mage missiles instantly if the mage dies
authorMario <mario.mario@y7mail.com>
Thu, 29 Aug 2013 13:08:07 +0000 (23:08 +1000)
committerMario <mario.mario@y7mail.com>
Thu, 29 Aug 2013 13:08:07 +0000 (23:08 +1000)
commands.cfg
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/monsters/sv_monsters.qc

index ee71c70f37b70ed4c4691e99e8d2fec3b1321d6a..e0d815f83826a0b69f483c9e44b0c8620f68a3ac 100644 (file)
@@ -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
index 743dc2968f189091852f32593d302428ad276d5e..817cea7c764242afadec30cb0f155ee8893440ca 100644 (file)
@@ -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);
index 0f81f283e0ca801890e85fd9ee5bc3d5f0940723..ab715efd5c72506b2c046043955d54d4865e8633 100644 (file)
@@ -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);