mirror of
https://github.com/minetest-mods/worldedge.git
synced 2024-12-22 15:50:19 +01:00
intial push
This commit is contained in:
parent
83ccf91e8c
commit
71ed42b74e
0
depends.txt
Normal file
0
depends.txt
Normal file
66
init.lua
Normal file
66
init.lua
Normal file
@ -0,0 +1,66 @@
|
||||
|
||||
--[[
|
||||
local count = 0
|
||||
minetest.register_globalstep(function(dtime)
|
||||
count = count + dtime
|
||||
if count > 5 then
|
||||
count = 0
|
||||
local players = minetest.get_connected_players()
|
||||
for _,player in pairs(players) do
|
||||
local pos = player:getpos()
|
||||
if pos.x >= 30850 then
|
||||
player:moveto({x = -30800, y = pos.y, z = pos.z})
|
||||
end
|
||||
if pos.x <= -30850 then
|
||||
player:moveto({x = 30800, y = pos.y, z = pos.z})
|
||||
end
|
||||
|
||||
if pos.y >= 30850 then
|
||||
player:moveto({x = pos.x, y = -30800, z = pos.z})
|
||||
end
|
||||
if pos.y <= -30850 then
|
||||
player:moveto({x = pos.x, y = 30800, z = pos.z})
|
||||
end
|
||||
|
||||
if pos.z >= 30850 then
|
||||
player:moveto({x = pos.x, y = pos.y, z = -30800})
|
||||
end
|
||||
if pos.z <= -30850 then
|
||||
player:moveto({x = pos.x, y = pos.y, z = 30800})
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
--]]
|
||||
|
||||
local count = 0
|
||||
minetest.register_globalstep(function(dtime)
|
||||
count = count + dtime
|
||||
if count > 5 then
|
||||
count = 0
|
||||
local players = minetest.get_connected_players()
|
||||
for _,player in pairs(players) do
|
||||
local pos = player:getpos()
|
||||
if pos.x >= 100 then
|
||||
player:moveto({x = -100, y = pos.y, z = pos.z})
|
||||
end
|
||||
if pos.x <= -100 then
|
||||
player:moveto({x = 100, y = pos.y, z = pos.z})
|
||||
end
|
||||
|
||||
--[[if pos.y >= 30850 then
|
||||
player:moveto({x = pos.x, y = -30800, z = pos.z})
|
||||
end
|
||||
if pos.y <= -30850 then
|
||||
player:moveto({x = pos.x, y = 30800, z = pos.z})
|
||||
end--]]
|
||||
|
||||
if pos.z >= 100 then
|
||||
player:moveto({x = pos.x, y = pos.y, z = -100})
|
||||
end
|
||||
if pos.z <= -100 then
|
||||
player:moveto({x = pos.x, y = pos.y, z = 100})
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
Loading…
Reference in New Issue
Block a user