working no foot animations in mp
This commit is contained in:
@@ -1,23 +1,17 @@
|
||||
-- Thanks to Glytcher and Matías N. Salas for helping out with this
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function SetMissingFootAnimation(check)
|
||||
|
||||
|
||||
local player = getPlayer()
|
||||
|
||||
if check then
|
||||
player:setVariable("IsCrawling", "true")
|
||||
else
|
||||
player:setVariable("IsCrawling", "false")
|
||||
end
|
||||
player:setVariable("IsCrawling", tostring(check))
|
||||
|
||||
-- if isClient() then
|
||||
-- sendClientCommand("TOC", "SetCrawlAnimation", {})
|
||||
-- end
|
||||
if not isServer() and not isClient() then
|
||||
print("SP, so it's fine")
|
||||
else
|
||||
|
||||
sendClientCommand(player, "TOC", "NotifyNewCrawlAnimation", {id = player:getOnlineID(), check = check})
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -129,16 +129,10 @@ end
|
||||
-- Used to propagate animation changes after amputating a foot
|
||||
ServerCommands["SetCrawlAnimation"] = function(args)
|
||||
|
||||
local source = getPlayer()
|
||||
local player = getPlayerByOnlineID(args.id)
|
||||
local check = args.check
|
||||
|
||||
if source ~= player then
|
||||
if args.hasInjury then
|
||||
player:setVariable('SetCrawlAnimation', 'true');
|
||||
else
|
||||
player:setVariable('SetCrawlAnimation', 'false');
|
||||
end
|
||||
end
|
||||
player:setVariable('IsCrawling', tostring(check))
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user