]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix this bug reported by matthiaskrgr long time ago: "when I shoot a mine out of...
authorterencehill <piuntn@gmail.com>
Mon, 18 Feb 2013 21:19:53 +0000 (22:19 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 18 Feb 2013 21:19:53 +0000 (22:19 +0100)
qcsrc/server/defs.qh
qcsrc/server/w_minelayer.qc

index f777254138e0c0dc4facdb4259567ac397d11cba..9660c6044f5b2b61dac3393833ac9872a1fa549a 100644 (file)
@@ -291,8 +291,6 @@ float nJoinAllowed(entity ignore);
 
 .entity flagcarried;
 
-.entity lastrocket;
-
 .float playerid;
 float playerid_last;
 .float noalign;                // if set to 1, the item or spawnpoint won't be dropped to the floor
@@ -590,7 +588,13 @@ float client_cefc_accumulatortime;
 .float clip_load;
 .float old_clip_load;
 .float clip_size;
+
+.entity lastrocket;
 .float minelayer_mines;
+.float nex_charge;
+.float nex_charge_rottime;
+.float nex_chargepool_ammo;
+.float hagar_load;
 
 .float grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab
 
@@ -627,12 +631,6 @@ string deathmessage;
 .void (float act_state) setactive;
 .entity realowner;
 
-.float nex_charge;
-.float nex_charge_rottime;
-.float nex_chargepool_ammo;
-
-.float hagar_load;
-
 float allowed_to_spawn; // boolean variable used by the clan arena code to determine if a player can spawn (after the round has ended)
 
 float serverflags;
index 3268b9b5b67e851dcf3dddb3b7d394e79695bf16..bcce5ebd152ee267046824528cab88450512e1ed 100644 (file)
@@ -226,7 +226,12 @@ void W_Mine_Touch (void)
        if(self.movetype == MOVETYPE_NONE || self.movetype == MOVETYPE_FOLLOW)
                return; // we're already a stuck mine, why do we get called? TODO does this even happen?
 
-       PROJECTILE_TOUCH;
+       if(WarpZone_Projectile_Touch())
+       {
+               if(wasfreed(self))
+                       self.realowner.minelayer_mines -= 1;
+               return;
+       }
 
        if(other && other.classname == "player" && other.deadflag == DEAD_NO)
        {