1
This commit is contained in:
parent
f76730f8aa
commit
f33b045769
@ -3305,15 +3305,11 @@ void Room::ForwardGasRing(int n)
|
||||
--n;
|
||||
}
|
||||
if (gas_data_.old_area_meta) {
|
||||
return;
|
||||
auto boss_tuple = gas_data_.old_area_meta->GetBoss();
|
||||
if (boss_tuple && !IsGameOver()) {
|
||||
const mt::Hero* hero_meta = mt::Hero::GetById(std::get<2>(*boss_tuple));
|
||||
if (hero_meta) {
|
||||
int boss_uniid = AllocUniid();
|
||||
#ifdef DEBUG
|
||||
boss_uniid = GetOneAlivePlayer()->GetUniId();
|
||||
#endif
|
||||
NotifyNewsTicker
|
||||
(2,
|
||||
{
|
||||
@ -3326,19 +3322,22 @@ void Room::ForwardGasRing(int n)
|
||||
});
|
||||
xtimer.SetTimeoutEx
|
||||
(SERVER_FRAME_RATE * std::get<1>(*boss_tuple),
|
||||
[this, boss_tuple, hero_meta] (int event, const a8::Args* args)
|
||||
[this, boss_tuple, hero_meta, boss_uniid] (int event, const a8::Args* args)
|
||||
{
|
||||
if (a8::TIMER_EXEC_EVENT == event) {
|
||||
#if 0
|
||||
CreateHero(nullptr,
|
||||
hero_meta,
|
||||
std::get<0>(*boss_tuple),
|
||||
);
|
||||
#endif
|
||||
Hero* hero = CreateHero
|
||||
(nullptr,
|
||||
hero_meta,
|
||||
std::get<0>(*boss_tuple),
|
||||
GlmHelper::UP,
|
||||
666,
|
||||
boss_uniid);
|
||||
if (hero) {
|
||||
batch_sync_->AddGlobalObject(hero);
|
||||
}
|
||||
}
|
||||
},
|
||||
&xtimer_attacher_);
|
||||
batch_sync_->AddGlobalObject(GetOneAlivePlayer());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user