summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHume2 <teratux.mail@gmail.com>2018-09-11 10:18:54 +0200
committerHume2 <teratux.mail@gmail.com>2018-09-11 10:18:54 +0200
commitd44d85b06aea35a80d50083030c7dae2efcabfb3 (patch)
tree358fe751931ba07334e9b555e96c855cdb19c15a
parent20b52d315db3d813f9c1490044f6f043ce8a7c64 (diff)
Place the bike only to the player's spot.1.1.1origin/1.1.x
-rw-r--r--init.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index e573f5c..ac2c2ca 100644
--- a/init.lua
+++ b/init.lua
@@ -515,7 +515,8 @@ minetest.register_craftitem("bike:bike", {
return itemstack
end
- bike = minetest.add_entity(pointed_thing.above, "bike:bike")
+ player_pos = placer:get_pos()
+ bike = minetest.add_entity({x=player_pos.x, y=player_pos.y+0.5, z=player_pos.z}, "bike:bike")
if bike then
if placer then
bike:set_yaw(placer:get_look_horizontal())