This commit is contained in:
aozhiwei 2021-04-16 15:32:49 +08:00
parent 27b7ed100f
commit 5ea6bda761

View File

@ -417,6 +417,18 @@ void Bullet::ProcPosionGasBomb(int delay_time)
void Bullet::ProcMolotorCocktailBomb(int delay_time)
{
if (sender.Get()) {
#if 1
a8::Vec2 old_buff_vec2_param1 = sender.Get()->buff_vec2_param1;
sender.Get()->buff_vec2_param1 = GetPos();
MetaData::Buff * buff_meta = MetaMgr::Instance()->GetBuff(gun_meta->i->buffid());
if (buff_meta) {
sender.Get()->AddBuff(sender.Get(),
buff_meta,
1
);
}
sender.Get()->buff_vec2_param1 = old_buff_vec2_param1;
#else
MolotorCocktailMiTask* task = new MolotorCocktailMiTask();
task->room = room;
task->sender.Attach(sender.Get());
@ -442,5 +454,6 @@ void Bullet::ProcMolotorCocktailBomb(int delay_time)
},
&room->timer_attacher.timer_list_
);
#endif
}
}