1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-25 02:00:37 +01:00

bugfix de "flowers-plus"

Merci à Davedevils pour ce bugfix, qui faisait crasher le serveur
This commit is contained in:
Ombridride 2014-11-02 20:43:20 +01:00
parent 6a795320a7
commit 199c75dd27

3
mods/plantlife_modpack/flowers_plus/init.lua Executable file → Normal file
View File

@ -118,7 +118,8 @@ for i in ipairs(lilies_list) do
elseif waterlily == 8 then elseif waterlily == 8 then
nodename = "flowers:waterlily_s4" nodename = "flowers:waterlily_s4"
end end
minetest.set_node(place_pos, {name = nodename, param2 = math.random(0,3) }) if place_pos == nil then return itemstack end -- pour éviter crash avec nénuphare
minetest.set_node(place_pos, {name = nodename, param2 = math.random(0,3) })
else else
local fdir = minetest.dir_to_facedir(placer:get_look_dir()) local fdir = minetest.dir_to_facedir(placer:get_look_dir())
minetest.set_node(place_pos, {name = "flowers:waterlily", param2 = fdir}) minetest.set_node(place_pos, {name = "flowers:waterlily", param2 = fdir})