Fixed bug
When player leave server after his death, his ragdoll is in not removed as it is done with player:set_ragdoll_state(RAGDOLL_NONE) called in PlayerSpawn hook.
So it was moved into the create_ragdoll_entity function.
Typo
Decay is a bit ambiguous parameter name, so it was renamed into delay
Feature
Corpse removement delay was moved into config.yml
To be negotiated
Is it better to store delay parameter in the separated table that is passed to set_ragdoll_state as parameter or initialize it directly in this method
Also, whether there are any others way to call PlayerDeathThink hook without calling player:is_ragdolled() method, that would allow to delete corpses before player respawned
player:set_ragdoll_state(RAGDOLL_NONE)
called inPlayerSpawn
hook. So it was moved into the create_ragdoll_entity function.set_ragdoll_state
as parameter or initialize it directly in this method Also, whether there are any others way to callPlayerDeathThink
hook without callingplayer:is_ragdolled()
method, that would allow to delete corpses before player respawned