summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHume2 <teratux.mail@gmail.com>2018-09-10 20:36:01 +0200
committerHume2 <teratux.mail@gmail.com>2018-09-10 20:36:01 +0200
commit1f8da82be406721a20cad7ca2005f44268942103 (patch)
tree13149d9130eb4b56867ab6c66a28082bfb92407d
parent891cfac81d8742a00fa6f5c6c9da1030fee49b0d (diff)
Automatically dismount players on death1.1
-rw-r--r--init.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 38406b0..c9cbfca 100644
--- a/init.lua
+++ b/init.lua
@@ -481,6 +481,11 @@ minetest.register_on_shutdown(function()
end
end)
+-- Automatically dismount corpses
+minetest.register_on_dieplayer(function(player)
+ attached[player:get_player_name()] = nil
+end)
+
-- Register the entity
minetest.register_entity("bike:bike", bike)