]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Attempt to re-spawn the projectile as a non-csqc entity once it hits the ground,...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 4 Oct 2010 17:11:32 +0000 (20:11 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 4 Oct 2010 17:11:32 +0000 (20:11 +0300)
qcsrc/server/w_minelayer.qc

index 06a639f0846a5f5e299214964a92e20162dea91f..d7bef312bc49235080e8d70e6bbbd4270035b05e 100644 (file)
@@ -14,6 +14,17 @@ void spawnfunc_weapon_minelayer (void)
        weapon_defaultspawnfunc(WEP_MINE_LAYER);
 }
 
+void W_Mine_RespawnEntity ()
+{
+       entity newmine;
+       newmine = spawn();
+       newmine.origin = '0 0 100';
+       newmine.model = "models/mine.md3";
+
+       remove(self);
+       self = newmine;
+}
+
 void W_Mine_Explode ()
 {
        if(other.takedamage == DAMAGE_AIM)
@@ -137,6 +148,8 @@ void W_Mine_Touch (void)
        {
                spamsound (self, CHAN_PROJECTILE, "weapons/mine_stick.wav", VOL_BASE, ATTN_NORM);
                self.movetype = MOVETYPE_NONE; // lock the mine in place
+
+               W_Mine_RespawnEntity();
        }
        else if(self.movetype != MOVETYPE_NONE) // don't unstick a locked mine when someone touches it
                self.velocity = '0 0 0';