This commit is contained in:
aozhiwei 2023-12-29 13:55:23 +08:00
parent 5af1487982
commit 7bff245fcb

View File

@ -395,7 +395,19 @@ void Room::AddPlayer(Player* hum, std::shared_ptr<BornPoint> init_born_point, bo
team_hash_.erase(t->GetTeamId());
}
}
hum->SendMobaTeamNotify();
xtimer.SetIntervalEx
(SERVER_FRAME_RATE,
[this, hum] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {
if (!IsGameOver() && GetGasData().GetGasMode() == GasInactive) {
hum->SendMobaTeamNotify();
} else {
xtimer.DeleteCurrentTimer();
}
}
},
&hum->xtimer_attacher);
}
#endif
}