Changed map and map state send order on sync
This commit is contained in:
parent
6f2e883e74
commit
81da404eec
@ -159,12 +159,12 @@ function Game() {
|
||||
|
||||
function handlePeerData({ data, peer }) {
|
||||
if (data.id === "sync") {
|
||||
if (map) {
|
||||
peer.connection.send({ id: "map", data: map });
|
||||
}
|
||||
if (mapState) {
|
||||
peer.connection.send({ id: "mapState", data: mapState });
|
||||
}
|
||||
if (map) {
|
||||
peer.connection.send({ id: "map", data: map });
|
||||
}
|
||||
}
|
||||
if (data.id === "map") {
|
||||
// If we have a file convert it to a url
|
||||
|
Loading…
Reference in New Issue
Block a user