From 1f43c946af303a75b30752d83c6365f0ec3a0c13 Mon Sep 17 00:00:00 2001 From: Alexander Grist-Hucker Date: Mon, 20 Aug 2018 00:03:12 +0100 Subject: [PATCH] Prevent pain sound from playing when dead. --- gamemode/core/hooks/sv_hooks.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamemode/core/hooks/sv_hooks.lua b/gamemode/core/hooks/sv_hooks.lua index 3d8ad8782..c3fdf023c 100644 --- a/gamemode/core/hooks/sv_hooks.lua +++ b/gamemode/core/hooks/sv_hooks.lua @@ -519,7 +519,7 @@ function GM:GetPlayerPainSound(client) end function GM:PlayerHurt(client, attacker, health, damage) - if ((client.ixNextPain or 0) < CurTime()) then + if ((client.ixNextPain or 0) < CurTime() and health > 0) then local painSound = hook.Run("GetPlayerPainSound", client) or painSounds[math.random(1, #painSounds)] if (client:IsFemale() and !painSound:find("female")) then