.float HookType; // ENT_CLIENT_*
.vector origin;
.vector velocity;
-.float HookSound;
.float HookSilent;
.float HookRange;
Draw_GrapplingHook_trace_callback_rnd += 0.25 * vlen(hit - start) / 8;
}
+.float teleport_time;
void Draw_GrapplingHook()
{
vector a, b, atrans;
- string tex, snd;
+ string tex;
vector rgb;
float t;
float s;
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");
{
default:
case ENT_CLIENT_HOOK:
- setorigin(self, trace_endpos); // hook endpoint!
- self.angles = vectoangles(trace_endpos - atrans);
+ if(vlen(trace_endpos - atrans) > 0.5)
+ {
+ setorigin(self, trace_endpos); // hook endpoint!
+ self.angles = vectoangles(trace_endpos - atrans);
+ self.drawmask = MASK_NORMAL;
+ }
+ else
+ {
+ self.drawmask = 0;
+ }
break;
case ENT_CLIENT_LGBEAM:
case ENT_CLIENT_GAUNTLET:
InterpolateOrigin_Note();
- if(bIsNew)
+ if(bIsNew || !self.teleport_time)
{
self.draw = Draw_GrapplingHook;
self.entremove = Remove_GrapplingHook;
break;
}
}
+
+ self.teleport_time = time + 10;
}
void Hook_Precache()