From: Mircea Kitsune Date: Tue, 12 Apr 2011 16:52:26 +0000 (+0300) Subject: Play the beep sound when the last rocket is loaded, to notify the player of that... X-Git-Tag: xonotic-v0.5.0~263^2~10^2~29 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2e39cb9464c314591c5ce8cf8998e9475732c2ee;p=xonotic%2Fxonotic-data.pk3dir.git Play the beep sound when the last rocket is loaded, to notify the player of that. Idea by FruitieX --- diff --git a/qcsrc/server/w_hagar.qc b/qcsrc/server/w_hagar.qc index 025edf927..80384e35d 100644 --- a/qcsrc/server/w_hagar.qc +++ b/qcsrc/server/w_hagar.qc @@ -164,6 +164,10 @@ void W_Hagar_Attack2_Load (void) self.hagar_load += 1; sound(self, CHAN_WEAPON2, "weapons/hagar_load.wav", VOL_BASE, ATTN_NORM); + // if this is the last rocket we can load, play a beep sound to notify the player of that + if(self.hagar_load >= autocvar_g_balance_hagar_secondary_load_max) + sound(self, CHAN_WEAPON, "weapons/hagar_beep.wav", VOL_BASE, ATTN_NORM); + self.hagar_loadstep = time + autocvar_g_balance_hagar_secondary_load_speed; } } @@ -289,6 +293,7 @@ float w_hagar(float req) precache_model ("models/weapons/h_hagar.iqm"); precache_sound ("weapons/hagar_fire.wav"); precache_sound ("weapons/hagar_load.wav"); + precache_sound ("weapons/hagar_beep.wav"); //precache_sound ("weapons/reload.wav"); // until weapons have individual reload sounds, precache the reload sound somewhere else } else if (req == WR_SETUP)