]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hook.qc
Remove server/pathlib.qc.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hook.qc
index ce6ca92b5f4ec0c1b774c32540aefcf7bc10d4fe..dd70c760c34534a1456165647e1fcc019b10754a 100644 (file)
@@ -32,7 +32,7 @@ void Draw_GrapplingHook_trace_callback(vector start, vector hit, vector end)
 
 class(Hook) .float teleport_time;
 void Draw_GrapplingHook()
-{
+{SELFPARAM();
        vector a, b, atrans;
        string tex;
        vector rgb;
@@ -44,7 +44,7 @@ void Draw_GrapplingHook()
        if(self.teleport_time)
        if(time > self.teleport_time)
        {
-               sound (self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTEN_NORM); // safeguard
+               sound (self, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM); // safeguard
                self.teleport_time = 0;
        }
 
@@ -161,18 +161,18 @@ void Draw_GrapplingHook()
                case ENT_CLIENT_HOOK:
                        break;
                case ENT_CLIENT_ARC_BEAM:
-                       pointparticles(particleeffectnum("electro_lightning"), trace_endpos, normalize(atrans - trace_endpos), frametime * intensity); // todo: new effect
+                       pointparticles(particleeffectnum(EFFECT_ARC_LIGHTNING2), trace_endpos, normalize(atrans - trace_endpos), frametime * intensity); // todo: new effect
                        break;
        }
 }
 
 void Remove_GrapplingHook()
-{
-       sound (self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTEN_NORM);
+{SELFPARAM();
+       sound (self, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM);
 }
 
 void Ent_ReadHook(float bIsNew, float type)
-{
+{SELFPARAM();
        self.HookType = type;
 
        int sf = ReadByte();
@@ -224,11 +224,11 @@ void Ent_ReadHook(float bIsNew, float type)
                        default:
                        case ENT_CLIENT_HOOK:
                                // for the model
-                               setmodel(self, "models/hook.md3");
+                               setmodel(self, MDL_HOOK);
                                self.drawmask = MASK_NORMAL;
                                break;
                        case ENT_CLIENT_ARC_BEAM:
-                               sound (self, CH_SHOTS_SINGLE, W_Sound("lgbeam_fly"), VOL_BASE, ATTEN_NORM);
+                               sound (self, CH_SHOTS_SINGLE, SND_LGBEAM_FLY, VOL_BASE, ATTEN_NORM);
                                break;
                }
        }
@@ -236,10 +236,4 @@ void Ent_ReadHook(float bIsNew, float type)
        self.teleport_time = time + 10;
 }
 
-void Hook_Precache()
-{
-       precache_sound(W_Sound("lgbeam_fly"));
-       precache_model("models/hook.md3");
-}
-
 // TODO: hook: temporarily transform self.origin for drawing the model along warpzones!