mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-06-28 06:12:08 +02:00
Broadcast player posistion to websocket clients this could be high traffic.
This commit is contained in:
@ -47,13 +47,18 @@ L.Control.AutoUpdate = L.Control.extend({
|
||||
if (!(typeof json === "string")) {
|
||||
return invalidateAll;
|
||||
}
|
||||
var tiles;
|
||||
var msg;
|
||||
try {
|
||||
tiles = JSON.parse(json);
|
||||
msg = JSON.parse(json);
|
||||
} catch (err) {
|
||||
return invalidateAll;
|
||||
}
|
||||
|
||||
var tiles = msg.tiles;
|
||||
if !tiles {
|
||||
continue;
|
||||
}
|
||||
|
||||
var pyramid = new Array(9);
|
||||
var last = new Object();
|
||||
pyramid[8] = last;
|
||||
|
Reference in New Issue
Block a user