feat: reduce lobby time when debug is active
This commit is contained in:
@@ -5,6 +5,12 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define MIN_PLAYER_WAITING 2
|
||||
#else
|
||||
#define MIN_PLAYER_WAITING 1
|
||||
#endif
|
||||
|
||||
namespace td {
|
||||
namespace server {
|
||||
|
||||
@@ -51,7 +57,7 @@ void Lobby::OnPlayerJoin(std::uint8_t playerID) {
|
||||
return;
|
||||
std::cout << "(Server) Player Joined Lobby !\n";
|
||||
m_Players.push_back(playerID);
|
||||
if (m_Players.size() == 2) { // start timer if a second player join the match
|
||||
if (m_Players.size() == MIN_PLAYER_WAITING) { // start timer if a second player join the match
|
||||
m_StartTimerTime = utils::getTime();
|
||||
m_Timer.reset();
|
||||
sendTimeRemaining();
|
||||
|
||||
Reference in New Issue
Block a user