2024-08-07 17:11:55 +03:00
|
|
|
local ctx = dofile_once("mods/quant.ew/files/core/ctx.lua")
|
|
|
|
local net = dofile_once("mods/quant.ew/files/core/net.lua")
|
2024-06-21 19:06:40 +03:00
|
|
|
|
|
|
|
local module = {}
|
|
|
|
|
2024-06-21 20:18:01 +03:00
|
|
|
function module.on_world_update()
|
2024-06-21 19:19:49 +03:00
|
|
|
if GameGetFrameNum() % 30 ~= 6 then
|
2024-06-21 19:06:40 +03:00
|
|
|
return
|
|
|
|
end
|
|
|
|
for peer_id, player_data in pairs(ctx.players) do
|
|
|
|
local x, y = EntityGetTransform(player_data.entity)
|
2024-07-15 21:27:15 +03:00
|
|
|
if x ~= nil and y ~= nil then
|
|
|
|
net.proxy_send("peer_pos", peer_id.." "..x.." "..y)
|
|
|
|
end
|
2024-06-21 19:06:40 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2024-08-15 09:16:29 -04:00
|
|
|
return module
|