1
This commit is contained in:
parent
64d87ad396
commit
056daf9b8a
@ -45,22 +45,18 @@ void AirRaid::Exec(int airraid_id)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto raid_cb =
|
|
||||||
[this, raid_meta, center]
|
|
||||||
(int event, const a8::Args* args)
|
|
||||||
{
|
|
||||||
if (a8::TIMER_EXEC_EVENT != event) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (room_->IsGameOver()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ExecOneRoundAirRaid(raid_meta, center);
|
|
||||||
};
|
|
||||||
|
|
||||||
room_->xtimer.SetTimeoutEx
|
room_->xtimer.SetTimeoutEx
|
||||||
(SERVER_FRAME_RATE * raid_meta->appear_time() / 1000.f,
|
(SERVER_FRAME_RATE * raid_meta->appear_time() / 1000.f,
|
||||||
raid_cb,
|
[this, raid_meta, center]
|
||||||
|
(int event, const a8::Args* args)
|
||||||
|
{
|
||||||
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
|
if (room_->IsGameOver()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ExecOneRoundAirRaid(raid_meta, center);
|
||||||
|
}
|
||||||
|
},
|
||||||
&room_->xtimer_attacher_);
|
&room_->xtimer_attacher_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user