refactor: update player position handling to include label for improved tracking
This commit is contained in:
@@ -356,8 +356,8 @@ local function handlePocketMessage(message)
|
|||||||
|
|
||||||
elseif message.type == "player_position" then
|
elseif message.type == "player_position" then
|
||||||
addLog("Pocket #" .. pocketID .. " GPS", colors.cyan)
|
addLog("Pocket #" .. pocketID .. " GPS", colors.cyan)
|
||||||
if not wsSend({ type = "player_update", playerID = message.playerID, position = message.position }) then
|
if not wsSend({ type = "player_update", playerID = message.playerID, position = message.position, label = message.label }) then
|
||||||
httpPost("/api/player/update", { playerID = message.playerID, position = message.position, timestamp = message.timestamp })
|
httpPost("/api/player/update", { playerID = message.playerID, position = message.position, label = message.label, timestamp = message.timestamp })
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif message.type == "server_stats_request" then
|
elseif message.type == "server_stats_request" then
|
||||||
|
|||||||
Reference in New Issue
Block a user