From: Mircea Kitsune Date: Mon, 4 Oct 2010 17:11:32 +0000 (+0300) Subject: Attempt to re-spawn the projectile as a non-csqc entity once it hits the ground,... X-Git-Tag: xonotic-v0.1.0preview~307^2~33^2~17 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cc95d045e5f1ad8bbefe66203ffbeffd5ee4c7d2;p=xonotic%2Fxonotic-data.pk3dir.git Attempt to re-spawn the projectile as a non-csqc entity once it hits the ground, so it can face in the proper dirrection. Not ready yet and this revision only brakes the gun! --- diff --git a/qcsrc/server/w_minelayer.qc b/qcsrc/server/w_minelayer.qc index 06a639f08..d7bef312b 100644 --- a/qcsrc/server/w_minelayer.qc +++ b/qcsrc/server/w_minelayer.qc @@ -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';