Fixed map fog draw undo not being sent to other players

This commit is contained in:
Mitchell McCaffrey
2020-06-19 13:45:21 +10:00
parent 1554e7ae5f
commit 5a93d9a526
+3 -3
View File
@@ -145,7 +145,7 @@ function Game() {
});
}
function updateDrawActionIndex(change, indexKey, actionsKey, peerId) {
function updateDrawActionIndex(change, indexKey, actionsKey) {
const newIndex = Math.min(
Math.max(currentMapState[indexKey] + change, -1),
currentMapState[actionsKey].length - 1
@@ -201,7 +201,7 @@ function Game() {
"fogDrawActions"
);
for (let peer of Object.values(peers)) {
peer.connection.send({ id: "fogDrawIndex", data: index });
peer.connection.send({ id: "mapFogIndex", data: index });
}
}
@@ -212,7 +212,7 @@ function Game() {
"fogDrawActions"
);
for (let peer of Object.values(peers)) {
peer.connection.send({ id: "fogDrawIndex", data: index });
peer.connection.send({ id: "mapFogIndex", data: index });
}
}