mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-16 23:42:15 -07:00
zoneId is a dynamic gameplay property and thus belongs in player.cpp
Took 11 minutes Took 19 seconds
This commit is contained in:
parent
270bdefd87
commit
aaf3c1e3b2
11 changed files with 31 additions and 32 deletions
|
|
@ -766,13 +766,13 @@ void TabGame::createZoneForPlayer(Player *newPlayer, int playerId)
|
|||
for (int i = 1; i <= game->getPlayerManager()->getPlayerCount(); ++i) {
|
||||
bool aPlayerHasThisZone = false;
|
||||
for (auto &player : game->getPlayerManager()->getPlayers()) {
|
||||
if (player->getPlayerInfo()->getZoneId() == i) {
|
||||
if (player->getZoneId() == i) {
|
||||
aPlayerHasThisZone = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!aPlayerHasThisZone) {
|
||||
newPlayer->getPlayerInfo()->setZoneId(i);
|
||||
newPlayer->setZoneId(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue