diff options
-rw-r--r-- | init.lua | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -38,7 +38,7 @@ local function get_player_skin(player) local skin = player:get_properties().textures[1] -- If we just have 3d_armor enabled make sure we get the player skin properly if minetest.global_exists("armor") then - skin = armor.default_skin..".png" + skin = armor:get_player_skin(name) end return skin..armor_tex end @@ -542,6 +542,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) @@ -577,8 +582,10 @@ minetest.register_craftitem("bike:bike", { color, alpha = "#FFFFFF", 150 end + bike_pos = placer:get_pos() + bike_pos.y = bike_pos.y + 0.5 -- Use the saved color data and place the bike - bike = minetest.add_entity(pointed_thing.above, "bike:bike", minetest.serialize({v=0,color=color,alpha=alpha})) + bike = minetest.add_entity(bike_pos, "bike:bike", minetest.serialize({v=0,color=color,alpha=alpha})) -- Point it the right direction if bike then |