aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/core')
-rw-r--r--gamemode/core/animation/sh_animations.lua16
-rw-r--r--gamemode/core/animation/sv_animate.lua2
-rw-r--r--gamemode/core/inventory/common/animations/sh_swing_mele.lua500
3 files changed, 15 insertions, 503 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")
diff --git a/gamemode/core/inventory/common/animations/sh_swing_mele.lua b/gamemode/core/inventory/common/animations/sh_swing_mele.lua
deleted file mode 100644
index 09f79e7..0000000
--- a/gamemode/core/inventory/common/animations/sh_swing_mele.lua
+++ /dev/null
@@ -1,500 +0,0 @@
-nrequire("sh_animations.lua")
-
-RegisterLuaAnimation('swing_onehand_left', {
- FrameData = {
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- },
- ['ValveBiped.Bip01_Spine4'] = {
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- }
- },
- FrameRate = 10
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- RF = 14.9983
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- RU = 58.1181,
- RR = 27.0889
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- RU = -7.9421,
- RR = 34.3556,
- RF = 4.4799
- },
- ['ValveBiped.Bip01_Spine4'] = {
- RF = 39.5103
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- RR = 47.4665,
- RF = -19.7371
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- RU = -129.4263,
- RR = -47.9277
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RR = 2.574
- }
- },
- FrameRate = 5
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- RF = -18.8755
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RU = 90,
- RR = -4.5286,
- RF = -100.8045
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- RU = 23.8203,
- RR = -38.9972,
- RF = -25.2662
- },
- ['ValveBiped.Bip01_Spine4'] = {
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- RU = -7.9421,
- RR = 34.3556,
- RF = 4.4799
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- }
- },
- FrameRate = 10
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- },
- ['ValveBiped.Bip01_Spine4'] = {
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- }
- },
- FrameRate = 1.6667
- }
- },
- Type = TYPE_GESTURE
-})
-
-RegisterLuaAnimation('swing_onehand_overhead', {
- FrameData = {
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- },
- ['ValveBiped.Bip01_Neck1'] = {
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- },
- ['ValveBiped.Bip01_Spine1'] = {
- },
- ['ValveBiped.Bip01_Spine4'] = {
- },
- ['ValveBiped.Bip01_L_Clavicle'] = {
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- }
- },
- FrameRate = 10
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- },
- ['ValveBiped.Bip01_Neck1'] = {
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- RU = -14.9433,
- RR = -26.7191,
- RF = 10.6193
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RU = 83.616,
- RR = 93.0582,
- RF = 62.0103
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- RU = -111.0966,
- RR = -74.1549,
- RF = -62.4384
- },
- ['ValveBiped.Bip01_Spine1'] = {
- },
- ['ValveBiped.Bip01_Spine4'] = {
- RR = -2.5225,
- RF = -39.26
- },
- ['ValveBiped.Bip01_L_Clavicle'] = {
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- RU = -9.0093,
- RR = 14.4999,
- RF = 25.671
- }
- },
- FrameRate = 5
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- RF = 14.4193
- },
- ['ValveBiped.Bip01_Neck1'] = {
- RU = 10.6282,
- RR = 9.7472,
- RF = -42.9906
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- RU = -14.9433,
- RR = -26.7191,
- RF = 10.6193
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RU = 98.1268,
- RR = 5.534,
- RF = 96.1386
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- RU = -203.1287,
- RR = -120.029,
- RF = -2.2254
- },
- ['ValveBiped.Bip01_Spine1'] = {
- RF = 9.6129
- },
- ['ValveBiped.Bip01_Spine4'] = {
- RU = 18.6599,
- RF = 43.4352
- },
- ['ValveBiped.Bip01_L_Clavicle'] = {
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- RU = -41.5509,
- RR = -6.2725,
- RF = 16.9206
- }
- },
- FrameRate = 10
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- },
- ['ValveBiped.Bip01_Neck1'] = {
- },
- ['ValveBiped.Bip01_L_Clavicle'] = {
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- },
- ['ValveBiped.Bip01_Spine1'] = {
- },
- ['ValveBiped.Bip01_Spine4'] = {
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- }
- },
- FrameRate = 1.6667
- }
- },
- Type = TYPE_GESTURE
-})
-
-RegisterLuaAnimation('swing_onehand_right', {
- FrameData = {
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- },
- ['ValveBiped.Bip01_Neck1'] = {
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- },
- ['ValveBiped.Bip01_Spine1'] = {
- },
- ['ValveBiped.Bip01_Spine4'] = {
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- }
- },
- FrameRate = 10
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- RF = -13.0166
- },
- ['ValveBiped.Bip01_Neck1'] = {
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RU = 64.7312,
- RR = -12.5429,
- RF = -0.7
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- },
- ['ValveBiped.Bip01_Spine1'] = {
- },
- ['ValveBiped.Bip01_Spine4'] = {
- RF = -26.2859
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- RU = -2.0679,
- RR = -3.5029,
- RF = 87.3164
- }
- },
- FrameRate = 5
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- RF = 47.2023
- },
- ['ValveBiped.Bip01_Neck1'] = {
- RR = -15.9212,
- RF = -57.372
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- RR = 21.3645,
- RF = 0.6008
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RU = 64.7168,
- RR = -50.8221,
- RF = -48.8765
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- RR = -35.8651,
- RF = -47.1548
- },
- ['ValveBiped.Bip01_Spine1'] = {
- RF = 11.3894
- },
- ['ValveBiped.Bip01_Spine4'] = {
- RF = 36.4235
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- RU = 49.4639,
- RR = -10.0868,
- RF = 6.7341
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- RU = -2.0679,
- RR = 44.9745,
- RF = 85.4281
- }
- },
- FrameRate = 10
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- },
- ['ValveBiped.Bip01_Neck1'] = {
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- },
- ['ValveBiped.Bip01_Spine1'] = {
- },
- ['ValveBiped.Bip01_Spine4'] = {
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- }
- },
- FrameRate = 1.6667
- }
- },
- Type = TYPE_GESTURE
-})
-
-RegisterLuaAnimation('swing_onehand_stab', {
- FrameData = {
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- },
- ['ValveBiped.Bip01_Neck1'] = {
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- },
- ['ValveBiped.Bip01_Spine1'] = {
- },
- ['ValveBiped.Bip01_Spine4'] = {
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- }
- },
- FrameRate = 10
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- RF = -18.294
- },
- ['ValveBiped.Bip01_Neck1'] = {
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- RU = -23.5308,
- RF = -3.6617
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- RU = -22.1427
- },
- ['ValveBiped.Bip01_Spine1'] = {
- RF = -11.4656
- },
- ['ValveBiped.Bip01_Spine4'] = {
- RF = -4.7217
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RU = 24.4736,
- RR = -3.368
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- RU = 4.3187,
- RR = 2.4775,
- RF = -147.3305
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- RU = -43.7725,
- RR = -3.349,
- RF = -3.218
- }
- },
- FrameRate = 5
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- RF = 25.4603
- },
- ['ValveBiped.Bip01_Neck1'] = {
- RR = -20.3889,
- RF = -45.1608
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- RU = 3.6368,
- RR = 20.8097,
- RF = 6.6735
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RU = 83.1342,
- RR = -4.2804,
- RF = -21.4632
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- RU = -11.8714,
- RR = 4.3073,
- RF = -65.2235
- },
- ['ValveBiped.Bip01_Spine1'] = {
- RF = 45.7756
- },
- ['ValveBiped.Bip01_Spine4'] = {
- RF = 4.61
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- RU = -23.5308,
- RF = -3.6617
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- RU = -22.1427
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- RU = -48.1903,
- RR = -24.3979,
- RF = 53.5558
- }
- },
- FrameRate = 10
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- },
- ['ValveBiped.Bip01_Neck1'] = {
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- },
- ['ValveBiped.Bip01_Spine1'] = {
- },
- ['ValveBiped.Bip01_Spine4'] = {
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- }
- },
- FrameRate = 1.6667
- }
- },
- Type = TYPE_GESTURE
-})