This commit is contained in:
aozhiwei 2024-03-26 11:16:22 +08:00
parent df69ebf264
commit 7e33a8fbda
2 changed files with 12 additions and 2 deletions

View File

@ -319,9 +319,16 @@ void CustomBattle::OnEnter(std::shared_ptr<cs::CMJoin> join_msg, long ip_saddr,
pair.second->is_ready_ = 1;
OnMemberReady(pair.second.get());
}
} else {
}
f8::Timer::Instance()->SetTimeoutEx
(
1000 * 3,
[] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {
}
},
&timer_attacher);
if (state_ == 1) {
NotifyState();
auto hum = GetRoom()->GetPlayerByAccountId(join_msg->account_id());

View File

@ -1,5 +1,7 @@
#pragma once
#include <f8/timer.h>
const int CUSTOM_ROOM_CUSTOM = 0;
const int CUSTOM_ROOM_NORMAL = 1;
@ -56,6 +58,7 @@ private:
void GameStart();
private:
f8::Attacher timer_attacher;
bool parse_ok_ = false;
int state_ = 0;
Room *room_ = nullptr;