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
|
-- Thanks to Glytcher and Matías N. Salas for helping out with this
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function SetMissingFootAnimation(check)
|
function SetMissingFootAnimation(check)
|
||||||
|
|
||||||
|
|
||||||
local player = getPlayer()
|
local player = getPlayer()
|
||||||
|
player:setVariable("IsCrawling", tostring(check))
|
||||||
if check then
|
|
||||||
player:setVariable("IsCrawling", "true")
|
|
||||||
else
|
|
||||||
player:setVariable("IsCrawling", "false")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- if isClient() then
|
if not isServer() and not isClient() then
|
||||||
-- sendClientCommand("TOC", "SetCrawlAnimation", {})
|
print("SP, so it's fine")
|
||||||
-- end
|
else
|
||||||
|
|
||||||
|
sendClientCommand(player, "TOC", "NotifyNewCrawlAnimation", {id = player:getOnlineID(), check = check})
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -129,16 +129,10 @@ end
|
|||||||
-- Used to propagate animation changes after amputating a foot
|
-- Used to propagate animation changes after amputating a foot
|
||||||
ServerCommands["SetCrawlAnimation"] = function(args)
|
ServerCommands["SetCrawlAnimation"] = function(args)
|
||||||
|
|
||||||
local source = getPlayer()
|
|
||||||
local player = getPlayerByOnlineID(args.id)
|
local player = getPlayerByOnlineID(args.id)
|
||||||
|
local check = args.check
|
||||||
|
|
||||||
if source ~= player then
|
player:setVariable('IsCrawling', tostring(check))
|
||||||
if args.hasInjury then
|
|
||||||
player:setVariable('SetCrawlAnimation', 'true');
|
|
||||||
else
|
|
||||||
player:setVariable('SetCrawlAnimation', 'false');
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -27,11 +27,9 @@ end
|
|||||||
|
|
||||||
|
|
||||||
-------- ANIMATIONS
|
-------- ANIMATIONS
|
||||||
TOC_Commands["SetCrawlAnimation"] = function(player, args)
|
TOC_Commands["NotifyNewCrawlAnimation"] = function(player, args)
|
||||||
|
|
||||||
local player_id = player:getOnlineID()
|
sendServerCommand("TOC", "SetCrawlAnimation", {id = args.id, check = args.check})
|
||||||
|
|
||||||
sendServerCommand(player, "TOC", "SetCrawlAnimation", {})
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user