]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Give it a unique identifier and precache it too
authorSamual Lenks <samual@xonotic.org>
Fri, 31 Aug 2012 20:11:27 +0000 (16:11 -0400)
committerSamual Lenks <samual@xonotic.org>
Fri, 31 Aug 2012 20:11:27 +0000 (16:11 -0400)
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/gamemode_ctf.qh

index 70dafd5009b09e62170e9ba27b14339aec2ac515..8f1952d4b7ffdf4b4656283be5501d8ab87e126f 100644 (file)
@@ -226,7 +226,7 @@ void ctf_Handle_Retrieve(entity flag, entity player)
        flag.ctf_status = FLAG_CARRY;
 
        // messages and sounds
-       sound(player, CH_TRIGGER, "ctf/pass.wav", VOL_BASE, ATTN_NORM);
+       sound(player, CH_TRIGGER, flag.snd_flag_pass, VOL_BASE, ATTN_NORM);
        ctf_EventLog("recieve", flag.team, player);
        
        FOR_EACH_REALPLAYER(tmp_player)
@@ -957,6 +957,7 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag
        if(!flag.snd_flag_respawn) { flag.snd_flag_respawn = "ctf/flag_respawn.wav"; } // if there is ever a team-based sound for this, update the code to match.
        if(!flag.snd_flag_dropped) { flag.snd_flag_dropped = ((teamnumber) ? "ctf/red_dropped.wav" : "ctf/blue_dropped.wav"); }
        if(!flag.snd_flag_touch) { flag.snd_flag_touch = "keepaway/touch.wav"; } // again has no team-based sound // FIXME
+       if(!flag.snd_flag_pass) { flag.snd_flag_pass = "ctf/pass.wav"; } // same story here
        
        // precache
        precache_sound(flag.snd_flag_taken);
@@ -965,6 +966,7 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag
        precache_sound(flag.snd_flag_respawn);
        precache_sound(flag.snd_flag_dropped);
        precache_sound(flag.snd_flag_touch);
+       precache_sound(flag.snd_flag_pass);
        precache_model(flag.model);
        precache_model("models/ctf/shield.md3");
        precache_model("models/ctf/shockwavetransring.md3");
index aca06e615d7f76d60f82ffd4f6c5a515506c7597..fc91e94a453af269718d5189fa736f4f4dca253c 100644 (file)
@@ -43,6 +43,7 @@ void spawnfunc_ctf_team();
 #define snd_flag_respawn noise3
 .string snd_flag_dropped;
 .string snd_flag_touch;
+.string snd_flag_pass;
 
 // effects
 .string toucheffect;