From 52a450666dc3d315178b0cf2cb6ab716be524044 Mon Sep 17 00:00:00 2001 From: TimePath Date: Tue, 3 Nov 2015 21:47:10 +1100 Subject: [PATCH] Sounds: zone stored SND tempstrings --- qcsrc/common/gamemodes/gamemode/nexball/nexball.qc | 10 +++++----- qcsrc/common/triggers/trigger/keylock.qc | 2 +- qcsrc/common/triggers/trigger/multi.qc | 2 +- qcsrc/server/item_key.qc | 2 +- qcsrc/server/mutators/mutator/gamemode_ctf.qc | 14 +++++++------- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 69ad8f5f3..6c46395f8 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -545,13 +545,13 @@ void SpawnBall(void) if(!autocvar_g_nexball_sound_bounce) self.noise = ""; else if(self.noise == "") - self.noise = SND(NB_BOUNCE); + self.noise = strzone(SND(NB_BOUNCE)); //bounce sound placeholder (FIXME) if(self.noise1 == "") - self.noise1 = SND(NB_DROP); + self.noise1 = strzone(SND(NB_DROP)); //ball drop sound placeholder (FIXME) if(self.noise2 == "") - self.noise2 = SND(NB_STEAL); + self.noise2 = strzone(SND(NB_STEAL)); //stealing sound placeholder (FIXME) if(self.noise) precache_sound(self.noise); precache_sound(self.noise1); @@ -653,7 +653,7 @@ spawnfunc(nexball_fault) { self.team = GOAL_FAULT; if(self.noise == "") - self.noise = SND(TYPEHIT); + self.noise = strzone(SND(TYPEHIT)); SpawnGoal(); } @@ -661,7 +661,7 @@ spawnfunc(nexball_out) { self.team = GOAL_OUT; if(self.noise == "") - self.noise = SND(TYPEHIT); + self.noise = strzone(SND(TYPEHIT)); SpawnGoal(); } diff --git a/qcsrc/common/triggers/trigger/keylock.qc b/qcsrc/common/triggers/trigger/keylock.qc index 365c6f5a9..8cef73c7a 100644 --- a/qcsrc/common/triggers/trigger/keylock.qc +++ b/qcsrc/common/triggers/trigger/keylock.qc @@ -146,7 +146,7 @@ spawnfunc(trigger_keylock) if(self.sounds == 1) self.noise = "misc/secret.wav"; else if(self.sounds == 2) - self.noise = SND(TALK); + self.noise = strzone(SND(TALK)); else //if (self.sounds == 3) { self.noise = "misc/trigger1.wav"; } diff --git a/qcsrc/common/triggers/trigger/multi.qc b/qcsrc/common/triggers/trigger/multi.qc index bc5821c80..91bfc9983 100644 --- a/qcsrc/common/triggers/trigger/multi.qc +++ b/qcsrc/common/triggers/trigger/multi.qc @@ -153,7 +153,7 @@ spawnfunc(trigger_multiple) } else if (self.sounds == 2) { - self.noise = SND(TALK); + self.noise = strzone(SND(TALK)); } else if (self.sounds == 3) { diff --git a/qcsrc/server/item_key.qc b/qcsrc/server/item_key.qc index 5ab3c8df2..d1e1f32e4 100644 --- a/qcsrc/server/item_key.qc +++ b/qcsrc/server/item_key.qc @@ -239,7 +239,7 @@ spawnfunc(item_key) self.message = strzone(strcat("You've picked up the ", self.netname, "!")); if (self.noise == "") - self.noise = SND(ITEMPICKUP); + self.noise = strzone(SND(ITEMPICKUP)); // save the name for later item_keys_names[lowestbit(self.itemkeys)] = self.netname; diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index 13dec008e..61c021384 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -1408,15 +1408,15 @@ void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag e set_flag_string(flag, capeffect, "%s_cap", teamname); // sounds - flag.snd_flag_taken = SND(CTF_TAKEN(teamnumber)); - flag.snd_flag_returned = SND(CTF_RETURNED(teamnumber)); - flag.snd_flag_capture = SND(CTF_CAPTURE(teamnumber)); - flag.snd_flag_dropped = SND(CTF_DROPPED(teamnumber)); - if (flag.snd_flag_respawn == "") flag.snd_flag_respawn = SND(CTF_RESPAWN); // if there is ever a team-based sound for this, update the code to match. + flag.snd_flag_taken = strzone(SND(CTF_TAKEN(teamnumber))); + flag.snd_flag_returned = strzone(SND(CTF_RETURNED(teamnumber))); + flag.snd_flag_capture = strzone(SND(CTF_CAPTURE(teamnumber))); + flag.snd_flag_dropped = strzone(SND(CTF_DROPPED(teamnumber))); + if (flag.snd_flag_respawn == "") flag.snd_flag_respawn = strzone(SND(CTF_RESPAWN)); // if there is ever a team-based sound for this, update the code to match. precache_sound(flag.snd_flag_respawn); - if (flag.snd_flag_touch == "") flag.snd_flag_touch = SND(CTF_TOUCH); // again has no team-based sound + if (flag.snd_flag_touch == "") flag.snd_flag_touch = strzone(SND(CTF_TOUCH)); // again has no team-based sound precache_sound(flag.snd_flag_touch); - if (flag.snd_flag_pass == "") flag.snd_flag_pass = SND(CTF_PASS); // same story here + if (flag.snd_flag_pass == "") flag.snd_flag_pass = strzone(SND(CTF_PASS)); // same story here precache_sound(flag.snd_flag_pass); // precache -- 2.39.2