1
This commit is contained in:
parent
528dd5a07a
commit
d31722115f
@ -111,21 +111,6 @@ void Room::InitData(RoomInitInfo& init_info)
|
|||||||
poly_ext_datas_ = map_instance->GetPolyExtDatas();
|
poly_ext_datas_ = map_instance->GetPolyExtDatas();
|
||||||
custom_battle_ = init_info.custom_battle;
|
custom_battle_ = init_info.custom_battle;
|
||||||
rank_match_conf_ = mt::Param::GetRankModeConfByRoomType(room_type_);
|
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()
|
void Room::Init()
|
||||||
@ -150,6 +135,21 @@ void Room::Init()
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
InitDebugInfo();
|
InitDebugInfo();
|
||||||
#endif
|
#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()
|
void Room::UnInit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user