mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 00:12:15 -07:00
Don't get local ID from playerInfo.
Took 39 minutes Took 39 seconds
This commit is contained in:
parent
ab6b32b8ba
commit
b4984ff31d
1 changed files with 7 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue