Fixing multiplayer movement bug when skipping.

This commit is contained in:
2020-02-07 21:07:47 -08:00
parent 653a43c748
commit acb5c2df45

View File

@@ -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() {