Also fix anims in slowmo

This commit is contained in:
LostTrackpad 2024-08-07 16:37:49 +07:00
parent 1c1e58ac98
commit 65a94f54e5

View file

@ -457,6 +457,7 @@ hook.Add("Think", "BodyAnimThink", function()
if not IsValid(BodyAnim) then return end
local ply = LocalPlayer()
SlowmoMultiplier = ply:GetLaggedMovementValue()
if not ply:Alive() and not deathanim then
RemoveBodyAnim()
@ -464,7 +465,7 @@ hook.Add("Think", "BodyAnimThink", function()
return
end
BodyAnimCycle = BodyAnimCycle + FrameTime() / BodyAnim:SequenceDuration() * BodyAnimSpeed
BodyAnimCycle = BodyAnimCycle + FrameTime() / BodyAnim:SequenceDuration() * BodyAnimSpeed * SlowmoMultiplier
if not customcycle then
BodyAnim:SetCycle(BodyAnimCycle)