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) void Room::OnPlayerOffline(Player* hum)
{ {
if (GetOnlinePlayerNum() <= 0) { if (GetOnlinePlayerNum() <= 0 && game_over_timer.expired()) {
xtimer.SetTimeoutEx game_over_timer = xtimer.SetTimeoutWpEx
( (
SERVER_FRAME_RATE * 15, SERVER_FRAME_RATE * 15,
[this] (int event, const a8::Args* args) [this] (int event, const a8::Args* args)

View File

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