From: Mario Date: Fri, 19 Apr 2013 04:42:13 +0000 (+1000) Subject: Remove strength sound mutator hook X-Git-Tag: xonotic-v0.7.0~55^2~3^2~10 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a64d8a6a5b0a3ed53934ee72229c64112233db5a;p=xonotic%2Fxonotic-data.pk3dir.git Remove strength sound mutator hook --- diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index f84538d76..e961e2941 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -117,12 +117,9 @@ vector w_shotend; .float prevstrengthsoundattempt; void W_PlayStrengthSound(entity player) // void W_PlayStrengthSound { - if(MUTATOR_CALLHOOK(PlayStrengthSound)) - return; - - if((player.items & IT_STRENGTH) - && ((time > player.prevstrengthsound + autocvar_sv_strengthsound_antispam_time) // prevent insane sound spam - || (time > player.prevstrengthsoundattempt + autocvar_sv_strengthsound_antispam_refire_threshold))) + if((player.items & IT_STRENGTH) + && ((time > player.prevstrengthsound + autocvar_sv_strengthsound_antispam_time) // prevent insane sound spam + || (time > player.prevstrengthsoundattempt + autocvar_sv_strengthsound_antispam_refire_threshold))) { sound(player, CH_TRIGGER, "weapons/strength_fire.wav", VOL_BASE, ATTN_NORM); player.prevstrengthsound = time; diff --git a/qcsrc/server/mutators/base.qh b/qcsrc/server/mutators/base.qh index 8cd28c102..d74201f97 100644 --- a/qcsrc/server/mutators/base.qh +++ b/qcsrc/server/mutators/base.qh @@ -123,9 +123,6 @@ MUTATOR_HOOKABLE(GetCvars); // INPUT: float get_cvars_f; string get_cvars_s; - -MUTATOR_HOOKABLE(PlayStrengthSound); - // called when a player fires a weapon with the strength powerup MUTATOR_HOOKABLE(EditProjectile); // can edit any "just fired" projectile diff --git a/qcsrc/server/mutators/mutator_minstagib.qc b/qcsrc/server/mutators/mutator_minstagib.qc index afada9042..f8c833144 100644 --- a/qcsrc/server/mutators/mutator_minstagib.qc +++ b/qcsrc/server/mutators/mutator_minstagib.qc @@ -199,12 +199,6 @@ MUTATOR_HOOKFUNCTION(minstagib_ForbidThrowing) return TRUE; } -MUTATOR_HOOKFUNCTION(minstagib_PlayStrengthSound) -{ - // You shall not play! - return TRUE; -} - MUTATOR_HOOKFUNCTION(minstagib_PlayerDamage) { if(autocvar_g_friendlyfire == 0 && !IsDifferentTeam(frag_target, frag_attacker) && IS_PLAYER(frag_target)) @@ -396,7 +390,6 @@ MUTATOR_DEFINITION(mutator_minstagib) MUTATOR_HOOK(PlayerPhysics, minstagib_PlayerPhysics, CBC_ORDER_ANY); MUTATOR_HOOK(PlayerSpawn, minstagib_PlayerSpawn, CBC_ORDER_ANY); MUTATOR_HOOK(PlayerDamage_Calculate, minstagib_PlayerDamage, CBC_ORDER_ANY); - MUTATOR_HOOK(PlayStrengthSound, minstagib_PlayStrengthSound, CBC_ORDER_ANY); MUTATOR_HOOK(MakePlayerObserver, minstagib_MakePlayerObserver, CBC_ORDER_ANY); MUTATOR_HOOK(SetStartItems, minstagib_SetStartItems, CBC_ORDER_ANY); MUTATOR_HOOK(Item_GiveTo, minstagib_GiveItem, CBC_ORDER_ANY);