This commit is contained in:
aozhiwei 2023-05-24 17:52:11 +08:00
parent 5728dd0f1d
commit 6db1353c62
2 changed files with 3 additions and 1 deletions

View File

@ -20,11 +20,12 @@
void Incubator::Init() void Incubator::Init()
{ {
wait_alloc_time_ = 50 + mt::Param::s().wait_cloud_time;
xtimer_attacher_.SetOwner(&room->xtimer); xtimer_attacher_.SetOwner(&room->xtimer);
if (!room->IsPveRoom()) { if (!room->IsPveRoom()) {
room->xtimer.SetTimeoutEx room->xtimer.SetTimeoutEx
( (
SERVER_FRAME_RATE * (mt::Param::s().wait_cloud_time + rand() % 3), SERVER_FRAME_RATE * (wait_alloc_time_),
[this] (int event, const a8::Args* args) [this] (int event, const a8::Args* args)
{ {
if (a8::TIMER_EXEC_EVENT == event) { if (a8::TIMER_EXEC_EVENT == event) {

View File

@ -26,6 +26,7 @@ private:
void SpawnWaveMon(int wave); void SpawnWaveMon(int wave);
private: private:
int wait_alloc_time_ = 0;
bool timeout_ = false; bool timeout_ = false;
std::vector<Human*> hold_humans_; std::vector<Human*> hold_humans_;
a8::XTimerWp alloc_timer_; a8::XTimerWp alloc_timer_;