Finish game instantly if all players have left
This commit is contained in:
parent
6ea9bc27a3
commit
a9b0144e11
@ -813,6 +813,10 @@ impl Game {
|
|||||||
peer.broadcast_reliable(Package::SetHostPrivileges(player.id(), true));
|
peer.broadcast_reliable(Package::SetHostPrivileges(player.id(), true));
|
||||||
s.signals().on_host_privileges_changed().emit();
|
s.signals().on_host_privileges_changed().emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s.players.is_empty() && s.game_started {
|
||||||
|
s.finish_game();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user