mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-12-25 15:12:27 +01:00
multiwand: fix crash on left clicking background
This commit is contained in:
parent
cf0be6c1fb
commit
0983e09f50
@ -3,11 +3,11 @@ local wea = worldeditadditions
|
|||||||
local Vector3 = wea.Vector3
|
local Vector3 = wea.Vector3
|
||||||
|
|
||||||
local function push_pos(player_name, pos)
|
local function push_pos(player_name, pos)
|
||||||
pos = Vector3.clone(pos)
|
|
||||||
if player_name == nil then return end
|
if player_name == nil then return end
|
||||||
if pos == nil then
|
if pos == nil then
|
||||||
worldedit.player_notify(player_name, "[multi wand] Error: Too far away (try raising your maxdist with //farwand maxdist <number>)")
|
worldedit.player_notify(player_name, "[multi wand] Error: Too far away (try raising your maxdist with //farwand maxdist <number>)")
|
||||||
else
|
else
|
||||||
|
pos = Vector3.clone(pos)
|
||||||
wea_c.pos.push(player_name, pos)
|
wea_c.pos.push(player_name, pos)
|
||||||
worldedit.player_notify(player_name, "[multi wand] Added "..pos..". "..wea_c.pos.count(player_name).." points now registered.")
|
worldedit.player_notify(player_name, "[multi wand] Added "..pos..". "..wea_c.pos.count(player_name).." points now registered.")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user