]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hook.qc
Extract more lib functions
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hook.qc
index 3da79866d874a4926033db89cd349562d6566a99..ce6ca92b5f4ec0c1b774c32540aefcf7bc10d4fe 100644 (file)
@@ -2,14 +2,12 @@
 #include "_all.qh"
 
 #include "hud.qh"
-#include "noise.qh"
 
 #include "../common/teams.qh"
 
 #include "../csqcmodellib/interpolate.qh"
 
 #include "../warpzonelib/common.qh"
-#include "../warpzonelib/mathlib.qh"
 
 entityclass(Hook);
 class(Hook) .float HookType; // ENT_CLIENT_*
@@ -18,33 +16,6 @@ class(Hook) .vector velocity;
 class(Hook) .float HookSilent;
 class(Hook) .float HookRange;
 
-void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg)
-{
-       // I want to draw a quad...
-       // from and to are MIDPOINTS.
-
-       vector axis, thickdir, A, B, C, D;
-       float length_tex;
-
-       axis = normalize(to - from);
-       length_tex = aspect * vlen(to - from) / thickness;
-
-       // direction is perpendicular to the view normal, and perpendicular to the axis
-       thickdir = normalize(cross(axis, vieworg - from));
-
-       A = from - thickdir * (thickness / 2);
-       B = from + thickdir * (thickness / 2);
-       C = to + thickdir * (thickness / 2);
-       D = to - thickdir * (thickness / 2);
-
-       R_BeginPolygon(texture, drawflag);
-       R_PolygonVertex(A, '0 0 0' + shift * '1 0 0', rgb, theAlpha);
-       R_PolygonVertex(B, '0 1 0' + shift * '1 0 0', rgb, theAlpha);
-       R_PolygonVertex(C, '0 1 0' + (shift + length_tex) * '1 0 0', rgb, theAlpha);
-       R_PolygonVertex(D, '0 0 0' + (shift + length_tex) * '1 0 0', rgb, theAlpha);
-       R_EndPolygon();
-}
-
 string Draw_GrapplingHook_trace_callback_tex;
 float Draw_GrapplingHook_trace_callback_rnd;
 vector Draw_GrapplingHook_trace_callback_rgb;