From: Rudolf Polzer Date: Mon, 13 Jun 2011 14:02:06 +0000 (+0200) Subject: simplify X-Git-Tag: xonotic-v0.5.0~199^2~18^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8882f65e788fa39dc434f5eb5a2ba22ac78ccc14;p=xonotic%2Fxonotic-data.pk3dir.git simplify --- diff --git a/qcsrc/server/w_minelayer.qc b/qcsrc/server/w_minelayer.qc index e9f6453fc..42bf4efa5 100644 --- a/qcsrc/server/w_minelayer.qc +++ b/qcsrc/server/w_minelayer.qc @@ -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 {