.float HookType; // ENT_CLIENT_*
.vector origin;
.vector velocity;
-.float HookSound;
.float HookSilent;
.float HookRange;
// direction is perpendicular to the view normal, and perpendicular to the axis
thickdir = normalize(cross(axis, vieworg - from));
-/*
- print("from ", vtos(from), "\n");
- print("to ", vtos(to), "\n");
- print("org ", vtos(view_origin), "\n");
- print("dir ", vtos(thickdir), "\n");
-*/
-
A = from - thickdir * (thickness / 2);
B = from + thickdir * (thickness / 2);
C = to + thickdir * (thickness / 2);
void Draw_GrapplingHook()
{
vector a, b, atrans;
- string tex, snd;
+ string tex;
vector rgb;
float t;
float s;
InterpolateOrigin_Do();
- s = cvar("cl_gunalign");
+ s = autocvar_cl_gunalign;
if(s != 1 && s != 2 && s != 4)
s = 3; // default value
--s;
{
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: