]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/tuba.qc
Merge branch 'master' into TimePath/effectinfo
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / tuba.qc
index 0b300d3b2e17364b889d5939143cbdf9431a2e7e..91ccbba5c853e7d1d7367e1da60c0f404cefefca 100644 (file)
@@ -4,7 +4,6 @@
 #include "../common/constants.qh"
 #include "../common/util.qh"
 
-#include "../warpzonelib/mathlib.qh"
 
 #define TUBA_STARTNOTE(i, n) W_Sound(strcat("tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n)))
 
@@ -66,12 +65,12 @@ void tubasound(entity e, bool restart)
                if (restart) {
                        snd1 = TUBA_STARTNOTE(e.tuba_instrument, e.note);
                }
-               sound(e, CH_TUBA_SINGLE, snd1, e.tuba_volume, e.tuba_attenuate * autocvar_g_balance_tuba_attenuation);
+               _sound(e, CH_TUBA_SINGLE, snd1, e.tuba_volume, e.tuba_attenuate * autocvar_g_balance_tuba_attenuation);
        }
 }
 
 void Ent_TubaNote_Think()
-{
+{SELFPARAM();
        float f = autocvar_g_balance_tuba_fadetime;
        if (f > 0) {
                self.tuba_volume -= frametime * self.tuba_volume_initial / f;
@@ -80,9 +79,9 @@ void Ent_TubaNote_Think()
        }
        self.nextthink = time;
        if (self.tuba_volume <= 0) {
-               sound(self, CH_TUBA_SINGLE, "misc/null.wav", 0, 0);
+               sound(self, CH_TUBA_SINGLE, SND_Null, 0, 0);
                if (self.enemy) {
-                       sound(self.enemy, CH_TUBA_SINGLE, "misc/null.wav", 0, 0);
+                       sound(self.enemy, CH_TUBA_SINGLE, SND_Null, 0, 0);
                        remove(self.enemy);
                }
                remove(self);
@@ -92,7 +91,7 @@ void Ent_TubaNote_Think()
 }
 
 void Ent_TubaNote_UpdateSound()
-{
+{SELFPARAM();
        self.enemy.tuba_volume = bound(0, VOL_BASE * autocvar_g_balance_tuba_volume, 1);
        self.enemy.tuba_volume_initial = self.enemy.tuba_volume;
        self.enemy.note = self.note;
@@ -101,13 +100,13 @@ void Ent_TubaNote_UpdateSound()
 }
 
 void Ent_TubaNote_StopSound()
-{
+{SELFPARAM();
        self.enemy.nextthink = time;
        self.enemy = world;
 }
 
 void Ent_TubaNote(bool isNew)
-{
+{SELFPARAM();
        bool upd = false;
        int f = ReadByte();
        if (f & 1) {
@@ -164,7 +163,7 @@ void Tuba_Precache()
        Tuba_PitchStep = autocvar_g_balance_tuba_pitchstep;
        if (Tuba_PitchStep) {
                if (!checkextension("DP_SND_SOUND7_WIP2") && !checkextension("DP_SND_SOUND7")) {
-                       print("^1NOTE:^7 requested pitch shifting, but not supported by this engine build\n");
+                       LOG_INFO("^1NOTE:^7 requested pitch shifting, but not supported by this engine build\n");
                        Tuba_PitchStep = 0;
                }
        }