Make teleport delay be 0 on creative mode

This commit is contained in:
Elias Åström 2023-05-11 17:27:11 +02:00 committed by cora
parent 1812f507f6
commit 248af89f78

View File

@ -536,7 +536,8 @@ local function teleport(obj)
end
local function initiate_teleport(obj)
minetest.after(TELEPORT_DELAY, function()
local creative = minetest.is_creative_enabled(obj:is_player() and obj:get_player_name() or nil)
minetest.after(creative and 0 or TELEPORT_DELAY, function()
teleport(obj)
end)
end