if CLIENT and not (pac and pac.animations and pac.animations.RegisterAnimation) then error("JetBoom's libanimbone is required for animations. (It's bundeled with PAC3)") return end local anim = {} local sequences local log = nrequire("log.lua") if SERVER then sequences = nrequire("core/animation/sv_animate.lua") else -- CLIENT sequences = nrequire("core/animation/cl_animate.lua") end hook.Add("UpdateAnimation","art_updateanim",function(ply,vel,mgs) if sequences and ply and sequences[ply] and CurTime() < sequences[ply][1] then ply:SetPlaybackRate(sequences[ply][3]) end end) hook.Add("CalcMainActivity","art_swing",function(ply,vel) if sequences and ply and sequences[ply] and CurTime() < sequences[ply][1] then return -1, sequences[ply][2] end end) --Why not just call RegisterAnimation directly? --While writing this gamemode, pac3 changed it's API, --And it was a pain in the ass to change all the code --that called RegisterAnimation(). if CLIENT then function anim.RegisterAnimation(name,tbl) pac.animations.RegisterAnimation(name,tbl) end end return anim