]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hook.qc
Use the function in client code too
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hook.qc
index 5d8394cd0b0e4423e3fdba009976b2003b6d3057..3da79866d874a4926033db89cd349562d6566a99 100644 (file)
@@ -1,10 +1,7 @@
 #include "hook.qh"
+#include "_all.qh"
 
-#include "autocvars.qh"
-#include "defs.qh"
 #include "hud.qh"
-#include "main.qh"
-#include "miscfunctions.qh"
 #include "noise.qh"
 
 #include "../common/teams.qh"
@@ -14,7 +11,7 @@
 #include "../warpzonelib/common.qh"
 #include "../warpzonelib/mathlib.qh"
 
-entityclass(Hook)
+entityclass(Hook);
 class(Hook) .float HookType; // ENT_CLIENT_*
 class(Hook) .vector origin;
 class(Hook) .vector velocity;
@@ -260,7 +257,7 @@ void Ent_ReadHook(float bIsNew, float type)
                                self.drawmask = MASK_NORMAL;
                                break;
                        case ENT_CLIENT_ARC_BEAM:
-                               sound (self, CH_SHOTS_SINGLE, "weapons/lgbeam_fly.wav", VOL_BASE, ATTEN_NORM);
+                               sound (self, CH_SHOTS_SINGLE, W_Sound("lgbeam_fly"), VOL_BASE, ATTEN_NORM);
                                break;
                }
        }
@@ -270,7 +267,7 @@ void Ent_ReadHook(float bIsNew, float type)
 
 void Hook_Precache()
 {
-       precache_sound("weapons/lgbeam_fly.wav");
+       precache_sound(W_Sound("lgbeam_fly"));
        precache_model("models/hook.md3");
 }