aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/combat/cl_weaponswing.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/core/combat/cl_weaponswing.lua')
-rw-r--r--gamemode/core/combat/cl_weaponswing.lua17
1 files changed, 16 insertions, 1 deletions
diff --git a/gamemode/core/combat/cl_weaponswing.lua b/gamemode/core/combat/cl_weaponswing.lua
index 54f7dee..74365b1 100644
--- a/gamemode/core/combat/cl_weaponswing.lua
+++ b/gamemode/core/combat/cl_weaponswing.lua
@@ -24,6 +24,10 @@ local tracking = false
local animent
local swingtodraw = nil
+net.Receive("artery_setswingdebug",function()
+ swingtodraw = net.ReadTable()
+end)
+
hook.Add("PreDrawTranslucentRenderables","draw_wepswing",function()
local lpp = LocalPlayer():GetPos()
if swingtodraw ~= nil then
@@ -34,6 +38,17 @@ hook.Add("PreDrawTranslucentRenderables","draw_wepswing",function()
end
end)
+net.Receive("artery_weaponswing",function()
+ local animname = net.ReadString()
+ local who = net.ReadEntity()
+ local duration = net.ReadDouble()
+ who:SetLuaAnimation(animname)
+ timer.Simple(duration,function()
+ who:StopLuaAnimation(animname)
+ end)
+
+end)
+
net.Receive("artery_doanimation",function()
local animname = net.ReadString()
local animtime = net.ReadDouble()
@@ -61,7 +76,7 @@ net.Receive("artery_doanimation",function()
who:StopLuaAnimation(animname)
net.Start("artery_notifyserverofswing")
net.WriteString(wepname)
- net.WriteString(animname)
+ net.WriteString(animdir)
net.WriteTable(swingtbl)
net.SendToServer()
swingtodraw = swingtbl