Update SafetyRoll.lua Fixes missing sound when falling on hands

Fixes sound when falling on hands in singleplayer.
For some reason CLIENT_IFTP() was preventing to play these sounds in singleplayer.
This will ensure that the sounds are played regardless of whether it's a singleplayer or multiplayer.
This commit is contained in:
RedyRT 2023-08-03 16:01:41 +03:00 committed by GitHub
parent c61a2b129d
commit 9d807b190b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,7 +91,7 @@ hook.Add("SetupMove", "EvadeRoll", function(ply, mv, cmd)
if SERVER and not land then
ply:EmitSound("Cloth.Roll")
ply:EmitSound("Cloth.RollLand")
elseif true then
elseif CLIENT_IFTP() or game.SinglePlayer() then
ply:EmitSound("Handsteps.ConcreteHard")
ply:EmitSound("Land.Concrete")
end
@ -155,7 +155,7 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed)
if SERVER and not land then
ply:EmitSound("Cloth.Roll")
ply:EmitSound("Cloth.RollLand")
elseif true then
elseif CLIENT_IFTP() or game.SinglePlayer() then
ply:EmitSound("Handsteps.ConcreteHard")
ply:EmitSound("Land.Concrete")
end