diff options
Diffstat (limited to 'gamemode/core/animation/sh_animations.lua')
| -rw-r--r-- | gamemode/core/animation/sh_animations.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gamemode/core/animation/sh_animations.lua b/gamemode/core/animation/sh_animations.lua index a1430a5..e8c1f22 100644 --- a/gamemode/core/animation/sh_animations.lua +++ b/gamemode/core/animation/sh_animations.lua @@ -1,8 +1,10 @@ -if not RegisterLuaAnimation then +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 @@ -22,3 +24,15 @@ hook.Add("CalcMainActivity","art_swing",function(ply,vel) 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 |
