mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Ensure all players are considered local in local game.
Took 10 minutes
This commit is contained in:
parent
d4a5bb3a79
commit
65a492aeb9
2 changed files with 8 additions and 0 deletions
|
|
@ -672,6 +672,9 @@ Player *TabGame::addPlayer(Player *newPlayer)
|
|||
if (game->getGameState()->getIsLocalGame() ||
|
||||
(game->getPlayerManager()->isLocalPlayer(newPlayer->getPlayerInfo()->getId()) &&
|
||||
!game->getPlayerManager()->isSpectator())) {
|
||||
if (game->getGameState()->getIsLocalGame()) {
|
||||
newPlayer->getPlayerInfo()->setLocal(true);
|
||||
}
|
||||
addLocalPlayer(newPlayer, newPlayer->getPlayerInfo()->getId());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ public:
|
|||
return userInfo;
|
||||
}
|
||||
|
||||
void setLocal(bool _local)
|
||||
{
|
||||
local = _local;
|
||||
}
|
||||
|
||||
bool getLocal() const
|
||||
{
|
||||
return local;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue