back to lobby state when server ends

This commit is contained in:
2023-08-14 13:35:17 +02:00
parent 118a04cd01
commit 7f650f282c
7 changed files with 36 additions and 10 deletions

View File

@@ -12,7 +12,7 @@ class Server;
class Lobby {
private:
Server* m_Server;
bool m_GameStarted = false;
bool m_LobbyOpened = false;
std::uint64_t m_StartTimerTime = 0;
std::vector<std::uint8_t> m_Players;
utils::AutoTimer m_Timer;
@@ -22,6 +22,8 @@ public:
void OnPlayerJoin(std::uint8_t playerID);
void OnPlayerLeave(std::uint8_t playerID);
void OpenLobby();
void SendTimeRemaining();
void Tick();

View File

@@ -70,6 +70,8 @@ public:
void Stop(); // force the server to stop
void Close(); // at the end of a game
void Restart(); // go back to lobby state
bool LoadMap(const std::string& worldFilePath);
bool IsMapLoaded();