Skip to content

Commit c188933

Browse files
committed
fix(plugin): only propagate GameState update when game is still in progress
Fixes #308
1 parent 6e54b10 commit c188933

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/src/client/sc/plugin2021/AbstractClient.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ abstract class AbstractClient(
9696

9797
if (type == PlayerType.OBSERVER) return
9898

99-
handler?.onUpdate(gameState)
10099
if (gameState.orderedColors.isNotEmpty()) {
101100
if (gameState.currentTeam == team) {
102101
handler?.onUpdate(gameState.currentPlayer, gameState.otherPlayer)
103102
} else {
104103
handler?.onUpdate(gameState.otherPlayer, gameState.currentPlayer)
105104
}
105+
handler?.onUpdate(gameState)
106106
}
107107
}
108108

0 commit comments

Comments
 (0)