This commit is contained in:
aozhiwei 2023-04-07 12:13:55 +08:00
parent 563dd8f7ee
commit ea02c777f3
2 changed files with 3 additions and 2 deletions

View File

@ -1015,8 +1015,8 @@ bool Room::CanJoin(class MatchTeam* team)
void Room::OnPlayerOffline(Player* hum)
{
if (GetOnlinePlayerNum() <= 0) {
xtimer.SetTimeoutEx
if (GetOnlinePlayerNum() <= 0 && game_over_timer.expired()) {
game_over_timer = xtimer.SetTimeoutWpEx
(
SERVER_FRAME_RATE * 15,
[this] (int event, const a8::Args* args)

View File

@ -77,6 +77,7 @@ public:
bool stop_world = false;
//target_uniid, frameno
std::map<int, long long> report_bullet_hash;
a8::XTimerWp game_over_timer;
#ifdef DEBUG
std::map<int, int> debug_params;
#endif