forked from MineClone5/MineClone5
ignore static spawnpoint if compass has lodestone meta
This commit is contained in:
parent
97b10f15ef
commit
d8986b4a4c
|
@ -24,7 +24,7 @@ function mcl_compass.get_compass_image(pos, dir, x, y, z)
|
||||||
if dim == playerdim then --Check if player and compass target are in the same dimension, above check is just if the diemension is valid for the non lodestone compass
|
if dim == playerdim then --Check if player and compass target are in the same dimension, above check is just if the diemension is valid for the non lodestone compass
|
||||||
local spawn = {x=x,y=y,z=z}
|
local spawn = {x=x,y=y,z=z}
|
||||||
local ssp = minetest.setting_get_pos("static_spawnpoint")
|
local ssp = minetest.setting_get_pos("static_spawnpoint")
|
||||||
if ssp then
|
if ssp and x == 0 and y == 0 and z == 0 then
|
||||||
spawn = ssp
|
spawn = ssp
|
||||||
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
|
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
|
||||||
spawn = {x=0,y=0,z=0}
|
spawn = {x=0,y=0,z=0}
|
||||||
|
@ -45,7 +45,7 @@ function mcl_compass.get_compass_image(pos, dir, x, y, z)
|
||||||
if dim == playerdim then --already explained that very same if statement above
|
if dim == playerdim then --already explained that very same if statement above
|
||||||
local spawn = {x=x,y=y,z=z}
|
local spawn = {x=x,y=y,z=z}
|
||||||
local ssp = minetest.setting_get_pos("static_spawnpoint")
|
local ssp = minetest.setting_get_pos("static_spawnpoint")
|
||||||
if ssp then
|
if ssp and x == 0 and y == 0 and z == 0 then
|
||||||
spawn = ssp
|
spawn = ssp
|
||||||
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
|
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
|
||||||
spawn = {x=0,y=0,z=0}
|
spawn = {x=0,y=0,z=0}
|
||||||
|
|
Loading…
Reference in New Issue