mirror of
https://github.com/HaodongMo/ArcCW.git
synced 2025-03-04 03:13:30 -05:00
clientside firing animations, actually clamp playbackrate
This commit is contained in:
parent
e659be3d4c
commit
efaa247d42
@ -222,12 +222,12 @@ function SWEP:PlayAnimation(key, mult, pred, startfrom, tt, skipholster, ignorer
|
||||
timer.Simple(0, function()
|
||||
vm:SendViewModelMatchingSequence(seq)
|
||||
local dur = vm:SequenceDuration()
|
||||
vm:SetPlaybackRate(math.Clamp(dur / (ttime + startfrom), 0, 10))
|
||||
vm:SetPlaybackRate(math.Clamp(dur / (ttime + startfrom), -4, 12))
|
||||
end)
|
||||
else
|
||||
vm:SendViewModelMatchingSequence(seq)
|
||||
local dur = vm:SequenceDuration()
|
||||
vm:SetPlaybackRate(math.Clamp(dur / (ttime + startfrom), 0, 10))
|
||||
vm:SetPlaybackRate(math.Clamp(dur / (ttime + startfrom), -4, 12))
|
||||
self.LastAnimStartTime = CurTime()
|
||||
self.LastAnimFinishTime = CurTime() + (dur * mult)
|
||||
end
|
||||
|
@ -506,7 +506,7 @@ function SWEP:DoPrimaryAnim()
|
||||
|
||||
local time = self:GetBuff_Mult("Mult_FireAnimTime", anim) or 1
|
||||
|
||||
if anim then self:PlayAnimation(anim, time, true, 0, false) end
|
||||
if anim and (CLIENT or game.SinglePlayer()) then self:PlayAnimation(anim, time, true, 0, false) end
|
||||
end
|
||||
|
||||
function SWEP:DoPenetration(tr, penleft, alreadypenned)
|
||||
|
Loading…
Reference in New Issue
Block a user