Fix for cursed_world position
(I forgot, again, that Lua table/array asiggment is by reference)
This commit is contained in:
parent
5d76bebe23
commit
580a796a87
2
init.lua
2
init.lua
@ -23,7 +23,7 @@ minetest.register_chatcommand("spawn", {
|
|||||||
pos.y > (cursed_world.location_y - cursed_world.dimension_y)
|
pos.y > (cursed_world.location_y - cursed_world.dimension_y)
|
||||||
then --check global table for cursed_world mod
|
then --check global table for cursed_world mod
|
||||||
--minetest.chat_send_player(name, "T"..(cursed_world.location_y + cursed_world.dimension_y).." "..(cursed_world.location_y - cursed_world.dimension_y))
|
--minetest.chat_send_player(name, "T"..(cursed_world.location_y + cursed_world.dimension_y).." "..(cursed_world.location_y - cursed_world.dimension_y))
|
||||||
local spawn_pos = spawn_command.pos;
|
local spawn_pos = vector.round(spawn_command.pos);
|
||||||
spawn_pos.y = spawn_pos.y + cursed_world.location_y;
|
spawn_pos.y = spawn_pos.y + cursed_world.location_y;
|
||||||
player:setpos(spawn_pos)
|
player:setpos(spawn_pos)
|
||||||
minetest.chat_send_player(name, "Teleported to spawn!")
|
minetest.chat_send_player(name, "Teleported to spawn!")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user