Files
The-Only-Cure/media/lua/client/JCIO_Animations.lua
2023-02-26 19:22:35 +01:00

25 lines
687 B
Lua

-- Thanks to Glytcher and Matías N. Salas for helping out with this
if JCIOAnims == nil then
JCIOAnims = {}
end
JCIOAnims.SetMissingFootAnimation = function(check)
local player = getPlayer()
player:setVariable("IsCrawling", tostring(check))
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
JCIOAnims.CheckAndSetMissingFootAnims = function(modData)
if modData.JCIO.limbs["Left_Foot"].isCut or modData.JCIO.limbs["Right_Foot"].isCut then
JCIOAnims.SetMissingFootAnimation(true)
end
end