]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
simplify
authorRudolf Polzer <divVerent@xonotic.org>
Mon, 13 Jun 2011 14:02:06 +0000 (16:02 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Mon, 13 Jun 2011 14:02:06 +0000 (16:02 +0200)
qcsrc/server/w_minelayer.qc

index e9f6453fc925a6630883e3d35ea0213d76f4a9b8..42bf4efa5a11328eb0267fc3bc0e009ffa9077e9 100644 (file)
@@ -220,21 +220,21 @@ void W_Mine_Think (void)
 
 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(other && other.takedamage == DAMAGE_AIM)
        {
                // hit some enemy
                // we do nothing, other than clearing velocity (falling straight down)
-               // but only if we're still moving (not stuck yet)
-               if(self.movetype != MOVETYPE_NONE && self.movetype != MOVETYPE_FOLLOW)
-               {
-                       // allow falling down, but no other movement, when hit an enemy
-                       self.velocity_x = 0;
-                       self.velocity_y = 0;
-                       if(self.velocity_z > 0)
-                               self.velocity_z = 0;
-               }
+
+               // allow falling down, but no other movement, when hit an enemy
+               self.velocity_x = 0;
+               self.velocity_y = 0;
+               if(self.velocity_z > 0)
+                       self.velocity_z = 0;
        }
        else
        {