This commit is contained in:
aozhiwei 2023-10-11 11:49:41 +08:00
parent 528dd5a07a
commit d31722115f

View File

@ -111,21 +111,6 @@ void Room::InitData(RoomInitInfo& init_info)
poly_ext_datas_ = map_instance->GetPolyExtDatas();
custom_battle_ = init_info.custom_battle;
rank_match_conf_ = mt::Param::GetRankModeConfByRoomType(room_type_);
if (IsMobaModeRoom()) {
moba_over_timer = xtimer.SetTimeoutWpEx
(SERVER_FRAME_RATE * mt::Param::s().moba_room_time,
[this] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {
if (!IsGameOver()) {
game_over_ = true;
game_over_frameno_ = GetFrameNo();
OnGameOver();
}
}
},
&xtimer_attacher_);
}
}
void Room::Init()
@ -150,6 +135,21 @@ void Room::Init()
#ifdef DEBUG
InitDebugInfo();
#endif
if (IsMobaModeRoom()) {
moba_over_timer = xtimer.SetTimeoutWpEx
(SERVER_FRAME_RATE * mt::Param::s().moba_room_time,
[this] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {
if (!IsGameOver()) {
game_over_ = true;
game_over_frameno_ = GetFrameNo();
OnGameOver();
}
}
},
&xtimer_attacher_);
}
}
void Room::UnInit()