mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
18 lines
No EOL
491 B
Lua
18 lines
No EOL
491 B
Lua
local ctx = dofile_once("mods/quant.ew/files/core/ctx.lua")
|
|
local net = dofile_once("mods/quant.ew/files/core/net.lua")
|
|
|
|
local module = {}
|
|
|
|
function module.on_world_update()
|
|
if GameGetFrameNum() % 30 ~= 6 then
|
|
return
|
|
end
|
|
for peer_id, player_data in pairs(ctx.players) do
|
|
local x, y = EntityGetTransform(player_data.entity)
|
|
if x ~= nil and y ~= nil then
|
|
net.proxy_send("peer_pos", peer_id.." "..x.." "..y)
|
|
end
|
|
end
|
|
end
|
|
|
|
return module |