From acb5c2df452575eb22eeb6b5d36524e6376557e0 Mon Sep 17 00:00:00 2001 From: Thomas Hintz Date: Fri, 7 Feb 2020 21:07:47 -0800 Subject: [PATCH] Fixing multiplayer movement bug when skipping. --- src/components/farm/Board.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/farm/Board.jsx b/src/components/farm/Board.jsx index 97ce073..81884e0 100644 --- a/src/components/farm/Board.jsx +++ b/src/components/farm/Board.jsx @@ -903,6 +903,12 @@ class Moving extends React.Component { clearInterval(this.timerId); this.timerId = false; } + // if another player skips movement + if (this.state.currentPos !== this.endPos) { + this.props.movePlayer(this.endPos, + this.state.currentPos, + this.color); + } } tick() {