Address review comments
This commit is contained in:
parent
3be7aa2cfc
commit
601fd81d5c
9 changed files with 58 additions and 72 deletions
|
@ -104,11 +104,12 @@ void MultiplayerState::OnCreateRoom() {
|
|||
|
||||
void MultiplayerState::OnCloseRoom() {
|
||||
if (auto room = Network::GetRoom().lock()) {
|
||||
if (room->GetState() == Network::Room::State::Open) {
|
||||
if (NetworkMessage::WarnCloseRoom()) {
|
||||
room->Destroy();
|
||||
announce_multiplayer_session->Stop();
|
||||
}
|
||||
if (room->GetState() != Network::Room::State::Open) {
|
||||
return;
|
||||
}
|
||||
if (NetworkMessage::WarnCloseRoom()) {
|
||||
room->Destroy();
|
||||
announce_multiplayer_session->Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue