deploy soundtable hack for listen server host

This commit is contained in:
TheOnly8Z 2023-10-03 18:09:27 -07:00
parent 458f258a14
commit 23e5d627ff
2 changed files with 6 additions and 1 deletions

View File

@ -195,8 +195,9 @@ function SWEP:PlayAnimation(key, mult, pred, startfrom, tt, skipholster, priorit
end
end
if !(game.SinglePlayer() and CLIENT) and (game.SinglePlayer() or IsFirstTimePredicted()) then
if !(game.SinglePlayer() and CLIENT) and (game.SinglePlayer() or IsFirstTimePredicted() or self.ReadySoundTableHack) then
self:PlaySoundTable(anim.SoundTable or {}, 1 / mult, startfrom, key)
self.ReadySoundTableHack = nil
end
if seq then

View File

@ -56,6 +56,10 @@ function SWEP:Deploy()
local r_anim = self:SelectAnimation("ready")
local d_anim = self:SelectAnimation("draw")
if (CLIENT and !game.SinglePlayer() and LocalPlayer():IsListenServerHost()) then
self.ReadySoundTableHack = true
end
if self.Animations[r_anim] and ( dev_alwaysready:GetBool() or self.UnReady ) then
self:PlayAnimation(r_anim, 1, true, 0, false)
prd = self.Animations[r_anim].ProcDraw