This commit is contained in:
aozhiwei 2021-08-24 16:06:45 +08:00
parent 212f97ce23
commit 6b1d493d2c

View File

@ -519,6 +519,16 @@ void Bullet::ProcC4Bomb(Car* target, int delay_time)
task->bomb_pos = GetPos();
if (target) {
task->follow_target.Attach(target);
if (gun_meta->int_param1 > 0) {
int buff_uniid = target->TryAddBuff(sender.Get(), gun_meta->int_param1);
if (buff_uniid != 0) {
Buff* buff = target->GetBuffByUniId(buff_uniid);
if (buff && buff->remover_timer) {
target->room->xtimer.ModifyTimer(buff->remover_timer,
std::max(1, (int)(delay_time / FRAME_RATE_MS)));
}
}
}
}
task->gun_meta = gun_meta;
task->meta = meta;