aboutsummaryrefslogtreecommitdiff
path: root/gamemode
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode')
-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
-rw-r--r--gamemode/shared/animations/move_evade.lua4
-rw-r--r--gamemode/shared/animations/swing_axe.lua8
-rw-r--r--gamemode/shared/animations/swing_fists.lua8
-rw-r--r--gamemode/shared/animations/swing_hammer.lua8
-rw-r--r--gamemode/shared/animations/swing_knife.lua10
-rw-r--r--gamemode/shared/animations/swing_mele.lua10
9 files changed, 39 insertions, 527 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
-})
diff --git a/gamemode/shared/animations/move_evade.lua b/gamemode/shared/animations/move_evade.lua
index c4afa59..b051570 100644
--- a/gamemode/shared/animations/move_evade.lua
+++ b/gamemode/shared/animations/move_evade.lua
@@ -1,6 +1,6 @@
-nrequire("sh_animations.lua")
+local ani = nrequire("sh_animations.lua")
-RegisterLuaAnimation('evade_left', {
+ani.RegisterAnimation('evade_left', {
FrameData = {
{
BoneInfo = {
diff --git a/gamemode/shared/animations/swing_axe.lua b/gamemode/shared/animations/swing_axe.lua
index 9e8ddb4..065c114 100644
--- a/gamemode/shared/animations/swing_axe.lua
+++ b/gamemode/shared/animations/swing_axe.lua
@@ -1,6 +1,6 @@
-nrequire("sh_animations.lua")
+local ani = nrequire("sh_animations.lua")
-RegisterLuaAnimation('axe_swing_up', {
+ani.RegisterAnimation('axe_swing_up', {
FrameData = {
{
BoneInfo = {
@@ -52,7 +52,7 @@ RegisterLuaAnimation('axe_swing_up', {
Type = TYPE_GESTURE
})
-RegisterLuaAnimation('axe_swing_left', {
+ani.RegisterAnimation('axe_swing_left', {
FrameData = {
{
BoneInfo = {
@@ -91,7 +91,7 @@ RegisterLuaAnimation('axe_swing_left', {
Type = TYPE_GESTURE
})
-RegisterLuaAnimation('axe_swing_right', {
+ani.RegisterAnimation('axe_swing_right', {
FrameData = {
{
BoneInfo = {
diff --git a/gamemode/shared/animations/swing_fists.lua b/gamemode/shared/animations/swing_fists.lua
index 8c0f106..f3da179 100644
--- a/gamemode/shared/animations/swing_fists.lua
+++ b/gamemode/shared/animations/swing_fists.lua
@@ -1,6 +1,6 @@
-nrequire("sh_animations.lua")
+local ani = nrequire("sh_animations.lua")
-RegisterLuaAnimation('fist_swing_up', {
+ani.RegisterAnimation('fist_swing_up', {
FrameData = {
{
BoneInfo = {
@@ -39,7 +39,7 @@ RegisterLuaAnimation('fist_swing_up', {
Type = TYPE_GESTURE
})
-RegisterLuaAnimation('fist_swing_down', {
+ani.RegisterAnimation('fist_swing_down', {
FrameData = {
{
BoneInfo = {
@@ -120,7 +120,7 @@ RegisterLuaAnimation('fist_swing_down', {
Type = TYPE_GESTURE
})
-RegisterLuaAnimation('fist_swing_left', {
+ani.RegisterAnimation('fist_swing_left', {
FrameData = {
{
BoneInfo = {
diff --git a/gamemode/shared/animations/swing_hammer.lua b/gamemode/shared/animations/swing_hammer.lua
index 2152709..183d3d2 100644
--- a/gamemode/shared/animations/swing_hammer.lua
+++ b/gamemode/shared/animations/swing_hammer.lua
@@ -1,6 +1,6 @@
-nrequire("sh_animations.lua")
+local ani = nrequire("sh_animations.lua")
-RegisterLuaAnimation('hammer_swing_up', {
+ani.RegisterAnimation('hammer_swing_up', {
FrameData = {
{
BoneInfo = {
@@ -70,7 +70,7 @@ RegisterLuaAnimation('hammer_swing_up', {
Type = TYPE_GESTURE
})
-RegisterLuaAnimation('hammer_swing_left', {
+ani.RegisterAnimation('hammer_swing_left', {
FrameData = {
{
BoneInfo = {
@@ -137,7 +137,7 @@ RegisterLuaAnimation('hammer_swing_left', {
Type = TYPE_GESTURE
})
-RegisterLuaAnimation('hammer_swing_right', {
+ani.RegisterAnimation('hammer_swing_right', {
FrameData = {
{
BoneInfo = {
diff --git a/gamemode/shared/animations/swing_knife.lua b/gamemode/shared/animations/swing_knife.lua
index cf78bb5..89e7ab2 100644
--- a/gamemode/shared/animations/swing_knife.lua
+++ b/gamemode/shared/animations/swing_knife.lua
@@ -1,6 +1,6 @@
-nrequire("sh_animations.lua")
+local ani = nrequire("sh_animations.lua")
-RegisterLuaAnimation('knife_swing_up', {
+ani.RegisterAnimation('knife_swing_up', {
FrameData = {
{
BoneInfo = {
@@ -41,7 +41,7 @@ RegisterLuaAnimation('knife_swing_up', {
Type = TYPE_GESTURE
})
-RegisterLuaAnimation('knife_swing_down', {
+ani.RegisterAnimation('knife_swing_down', {
FrameData = {
{
BoneInfo = {
@@ -92,7 +92,7 @@ RegisterLuaAnimation('knife_swing_down', {
Type = TYPE_GESTURE
})
-RegisterLuaAnimation('knife_swing_left', {
+ani.RegisterAnimation('knife_swing_left', {
FrameData = {
{
BoneInfo = {
@@ -144,7 +144,7 @@ RegisterLuaAnimation('knife_swing_left', {
Type = TYPE_GESTURE
})
-RegisterLuaAnimation('knife_swing_right', {
+ani.RegisterAnimation('knife_swing_right', {
FrameData = {
{
BoneInfo = {
diff --git a/gamemode/shared/animations/swing_mele.lua b/gamemode/shared/animations/swing_mele.lua
index 4a38876..c47c0b3 100644
--- a/gamemode/shared/animations/swing_mele.lua
+++ b/gamemode/shared/animations/swing_mele.lua
@@ -1,6 +1,6 @@
-nrequire("sh_animations.lua")
+local ani = nrequire("sh_animations.lua")
-RegisterLuaAnimation('swing_onehand_left', {
+ani.RegisterAnimation('swing_onehand_left', {
FrameData = {
{
BoneInfo = {
@@ -104,7 +104,7 @@ RegisterLuaAnimation('swing_onehand_left', {
Type = TYPE_GESTURE
})
-RegisterLuaAnimation('swing_onehand_overhead', {
+ani.RegisterAnimation('swing_onehand_overhead', {
FrameData = {
{
BoneInfo = {
@@ -235,7 +235,7 @@ RegisterLuaAnimation('swing_onehand_overhead', {
Type = TYPE_GESTURE
})
-RegisterLuaAnimation('swing_onehand_right', {
+ani.RegisterAnimation('swing_onehand_right', {
FrameData = {
{
BoneInfo = {
@@ -359,7 +359,7 @@ RegisterLuaAnimation('swing_onehand_right', {
Type = TYPE_GESTURE
})
-RegisterLuaAnimation('swing_onehand_stab', {
+ani.RegisterAnimation('swing_onehand_stab', {
FrameData = {
{
BoneInfo = {