diff --git a/src/game/server/Server.cpp b/src/game/server/Server.cpp index a32d83a..611a914 100644 --- a/src/game/server/Server.cpp +++ b/src/game/server/Server.cpp @@ -145,6 +145,10 @@ void Server::OnPlayerJoin(std::uint8_t id) { void Server::OnPlayerLeave(std::uint8_t id) { protocol::PlayerLeavePacket packet(id); BroadcastPacket(&packet); + + if (GetPlayers().empty()) { + Close(); + } } } // namespace server