1
0
鏡像自 https://github.com/tacigar/maidroid.git 已同步 2025-11-06 05:25:20 +01:00

Merge pull request #103 from tacigar/tacigar/direction_when_added

Fix maidroid's direction when spawned
此提交包含在:
tacigar
2016-12-23 12:38:26 +09:00
提交者 GitHub
當前提交 63467d8337

查看文件

@@ -314,7 +314,12 @@ function maidroid.register_egg(egg_name, def)
on_use = function(itemstack, user, pointed_thing)
if pointed_thing.above ~= nil and def.product_name ~= nil then
minetest.add_entity(pointed_thing.above, def.product_name)
-- set maidroid's direction.
local new_maidroid = minetest.add_entity(pointed_thing.above, def.product_name)
new_maidroid:get_luaentity():set_yaw_by_direction(
vector.subtract(user:getpos(), new_maidroid:getpos())
)
itemstack:take_item()
return itemstack
end