From: Rudolf Polzer Date: Fri, 17 Sep 2010 22:46:35 +0000 (+0200) Subject: Merge branch 'master' of ssh://git.xonotic.org/xonotic-data.pk3dir X-Git-Tag: xonotic-v0.1.0preview~267^2~26 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=3c3d7d44f47a050c65fbfe990c0042c5d85159e1;hp=a7057abe85405a114ef491f30c7334ae8c175463 Merge branch 'master' of ssh://git.xonotic.org/xonotic-data.pk3dir --- diff --git a/qcsrc/client/hook.qc b/qcsrc/client/hook.qc index 06858d597a..c1e8383aa6 100644 --- a/qcsrc/client/hook.qc +++ b/qcsrc/client/hook.qc @@ -53,6 +53,7 @@ void Draw_GrapplingHook_trace_callback(vector start, vector hit, vector end) Draw_GrapplingHook_trace_callback_rnd += 0.25 * vlen(hit - start) / 8; } +.float teleport_time; void Draw_GrapplingHook() { vector a, b, atrans; @@ -63,6 +64,13 @@ void Draw_GrapplingHook() vector vs; float intensity, offset; + if(self.teleport_time) + if(time > self.teleport_time) + { + sound (self, CHAN_PROJECTILE, "misc/null.wav", VOL_BASE, ATTN_NORM); // safeguard + self.teleport_time = 0; + } + InterpolateOrigin_Do(); s = cvar("cl_gunalign"); @@ -253,7 +261,7 @@ void Ent_ReadHook(float bIsNew, float type) InterpolateOrigin_Note(); - if(bIsNew) + if(bIsNew || !self.teleport_time) { self.draw = Draw_GrapplingHook; self.entremove = Remove_GrapplingHook; @@ -274,6 +282,8 @@ void Ent_ReadHook(float bIsNew, float type) break; } } + + self.teleport_time = time + 10; } void Hook_Precache()