From 5a93d9a5269ff574992ef55bcb2f8318f583a01d Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Fri, 19 Jun 2020 13:45:21 +1000 Subject: [PATCH] Fixed map fog draw undo not being sent to other players --- src/routes/Game.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/Game.js b/src/routes/Game.js index 6f2de46..6c1a2d3 100644 --- a/src/routes/Game.js +++ b/src/routes/Game.js @@ -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 }); } }