mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Process local player first.
Took 45 minutes
This commit is contained in:
parent
98da0a066f
commit
18fdf94fb2
2 changed files with 47 additions and 34 deletions
|
|
@ -513,21 +513,6 @@ void Server_Game::addPlayer(Server_AbstractUserInterface *userInterface,
|
|||
userInterface->playerAddedToGame(gameId, room->getId(), newPlayer->getPlayerId());
|
||||
|
||||
createGameJoinedEvent(newPlayer, rc, false);
|
||||
|
||||
Event_PlayerPropertiesChanged event;
|
||||
GameEventStorage ges;
|
||||
|
||||
if (getShareDecklistsOnLoad()) {
|
||||
for (const auto &player : players) {
|
||||
Context_DeckSelect context;
|
||||
if (player->getDeckList() != nullptr) {
|
||||
context.set_deck_list(player->getDeckList()->writeToString_Native().toStdString());
|
||||
ges.setGameEventContext(context);
|
||||
ges.enqueueGameEvent(event, player->getPlayerId());
|
||||
ges.sendToGame(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Server_Game::removePlayer(Server_Player *player, Event_Leave::LeaveReason reason)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue