Skip to content

Commit 05b9f86

Browse files
committed
fix(server): end game if a client triggers a GameLogicException
1 parent 355c8a3 commit 05b9f86

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/src/sc/server/gaming/GameRoom.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ public synchronized void onEvent(Client source, ProtocolMessage data) throws Res
493493
this.game.onAction(resolvePlayer(source), data);
494494
} catch (InvalidMoveException e) {
495495
this.observerBroadcast(new RoomPacket(this.id, new ProtocolErrorMessage(e.move, e.getMessage())));
496+
this.game.onPlayerLeft(resolvePlayer(source), ScoreCause.RULE_VIOLATION);
496497
throw new GameLogicException(e.toString());
497498
}
498499
}

0 commit comments

Comments
 (0)