1
This commit is contained in:
parent
212f97ce23
commit
6b1d493d2c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user