Add tpose emote

This commit is contained in:
NullBite 2022-03-24 02:15:07 -04:00
parent f0af26d609
commit 858c7d401b
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -478,6 +478,8 @@ action_wheel.SLOT_2.setTitle('log health')
action_wheel.SLOT_2.setFunction(function() print(player.getHealth()) end) action_wheel.SLOT_2.setFunction(function() print(player.getHealth()) end)
action_wheel.SLOT_3.setTitle('Toggle Armor') action_wheel.SLOT_3.setTitle('Toggle Armor')
action_wheel.SLOT_3.setFunction(function() setArmor() end) action_wheel.SLOT_3.setFunction(function() setArmor() end)
action_wheel.SLOT_4.setTitle('T-Pose')
action_wheel.SLOT_4.setFunction(function() ping.tPose() end)
-- Pings -- -- Pings --
--- Damage function -- --- Damage function --
@ -537,6 +539,11 @@ function ping.syncState(tbl)
end end
PartsManager.refreshAll() PartsManager.refreshAll()
end end
function ping.tPose()
local_state.emote_vector=player.getPos()
animation.tpose.start()
end
-- }}} -- }}}
-- Timer (not mine lol) -- {{{ -- Timer (not mine lol) -- {{{
@ -644,6 +651,11 @@ function tick()
ping.oof(player.getHealth()) ping.oof(player.getHealth())
end end
if animation.tpose.isPlaying() and local_state.emote_vector.distanceTo(player.getPos()) >= 0.5 then
animation.tpose.stop()
end
if old_state.isUnderwater ~= player.isUnderwater() then syncState() end if old_state.isUnderwater ~= player.isUnderwater() then syncState() end
old_state.isUnderwater=player.isUnderwater() old_state.isUnderwater=player.isUnderwater()
-- End of tick -- -- End of tick --