From b4984ff31d1e103191c6e737c2d7a2465c0fb95e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Sun, 14 Sep 2025 21:04:08 +0200 Subject: [PATCH] Don't get local ID from playerInfo. Took 39 minutes Took 39 seconds --- cockatrice/src/game/player/player_manager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/game/player/player_manager.cpp b/cockatrice/src/game/player/player_manager.cpp index 461747562..813cdb6d1 100644 --- a/cockatrice/src/game/player/player_manager.cpp +++ b/cockatrice/src/game/player/player_manager.cpp @@ -68,7 +68,13 @@ Player *PlayerManager::getPlayer(int playerId) const void PlayerManager::onPlayerConceded(int playerId, bool conceded) { // GameEventHandler cares about this for sending the concede/unconcede commands - if (playerId == getActiveLocalPlayer(playerId)->getPlayerInfo()->getId()) { + if (game->getGameState()->getIsLocalGame()) { + if (conceded) { + emit activeLocalPlayerConceded(); + } else { + emit activeLocalPlayerUnconceded(); + } + } else if (playerId == localPlayerId) { if (conceded) { emit activeLocalPlayerConceded(); } else {