diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2018-11-02 16:10:02 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2018-11-02 16:10:02 -0400 |
| commit | 9408c8cc53b99585b1cfb3c4fbf0a1f4df438bd6 (patch) | |
| tree | 75a879b12dd1d313b6e4290d4d559a716291a844 /gamemode/core/animation | |
| parent | f4ea4dc0bbc852c1e519be8435dbfcc5bc1e3834 (diff) | |
| download | artery-9408c8cc53b99585b1cfb3c4fbf0a1f4df438bd6.tar.gz artery-9408c8cc53b99585b1cfb3c4fbf0a1f4df438bd6.tar.bz2 artery-9408c8cc53b99585b1cfb3c4fbf0a1f4df438bd6.zip | |
Use pac3's new animation library api
Pac3 modified it's animation library
Diffstat (limited to 'gamemode/core/animation')
| -rw-r--r-- | gamemode/core/animation/sh_animations.lua | 16 | ||||
| -rw-r--r-- | gamemode/core/animation/sv_animate.lua | 2 |
2 files changed, 15 insertions, 3 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 diff --git a/gamemode/core/animation/sv_animate.lua b/gamemode/core/animation/sv_animate.lua index b8cec56..96e4e1a 100644 --- a/gamemode/core/animation/sv_animate.lua +++ b/gamemode/core/animation/sv_animate.lua @@ -1,6 +1,4 @@ -nrequire("sh_animations.lua") - local meta = FindMetaTable("Player") util.AddNetworkString("art_start_animation") |
