]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
a player's mines shall explode if he disconnects or dies
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 4 Oct 2010 21:11:14 +0000 (00:11 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 4 Oct 2010 21:11:14 +0000 (00:11 +0300)
qcsrc/server/w_minelayer.qc

index 8b1337f1434606a7a393c25bdafa3c58d604a52a..5a1f8fa6689eef9b90f2ae8d3834e7bad3cec0e2 100644 (file)
@@ -134,7 +134,17 @@ void W_Mine_Think (void)
        {
                other = world;
                self.projectiledeathtype |= HITTYPE_BOUNCE;
-               W_Mine_Explode ();
+               W_Mine_Explode();
+               return;
+       }
+
+       // a player's mines shall explode if he disconnects or dies
+       // TODO: Do this on team change too
+       if(self.owner.classname != "player" || self.owner.health <= 0)
+       {
+               other = world;
+               self.projectiledeathtype |= HITTYPE_BOUNCE;
+               W_Mine_Explode();
                return;
        }