.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;
// 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
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))
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);