local model = model_name and models[model_name]
if model and not player_attached[name] then
local controls = player:get_player_control()
local model = model_name and models[model_name]
if model and not player_attached[name] then
local controls = player:get_player_control()
-- Determine if the player is sneaking, and reduce animation speed if so
if controls.sneak then
animation_speed_mod = animation_speed_mod / 2
-- Determine if the player is sneaking, and reduce animation speed if so
if controls.sneak then
animation_speed_mod = animation_speed_mod / 2
-- Apply animations based on what the player is doing
if player:get_hp() == 0 then
player_set_animation(player, "lay")
-- Apply animations based on what the player is doing
if player:get_hp() == 0 then
player_set_animation(player, "lay")