]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hook.qc
Draw: purge SELFPARAM
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hook.qc
index 528646979e987606f70fc3f9c939f9cd15aebbd8..07123f06b5ec278b9bb1d609a7e9e8d195032836 100644 (file)
@@ -31,8 +31,8 @@ void Draw_GrapplingHook_trace_callback(vector start, vector hit, vector end)
 }
 
 class(Hook) .float teleport_time;
-void Draw_GrapplingHook()
-{SELFPARAM();
+void Draw_GrapplingHook(entity this)
+{
        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;
        }
 
@@ -168,7 +168,7 @@ void Draw_GrapplingHook()
 
 void Remove_GrapplingHook()
 {SELFPARAM();
-       sound (self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTEN_NORM);
+       sound (self, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM);
 }
 
 void Ent_ReadHook(float bIsNew, float type)
@@ -228,7 +228,7 @@ void Ent_ReadHook(float bIsNew, float type)
                                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,9 +236,4 @@ void Ent_ReadHook(float bIsNew, float type)
        self.teleport_time = time + 10;
 }
 
-void Hook_Precache()
-{
-       precache_sound(W_Sound("lgbeam_fly"));
-}
-
 // TODO: hook: temporarily transform self.origin for drawing the model along warpzones!