1
This commit is contained in:
parent
745f5861bd
commit
090cea717b
@ -875,14 +875,17 @@ void Bullet::ProcFlyHook(Entity* target)
|
||||
buff_uniids.push_back(buff_uniid);
|
||||
}
|
||||
}
|
||||
CreatureWeakPtr sender_bk = sender;
|
||||
int ok_buff_id = gun_meta->int_param1;
|
||||
c->AutoNavigation(born_pos, gun_meta->i->bullet_speed() * 2,
|
||||
[buff_uniids, ok_buff_id] (Creature* c)
|
||||
[buff_uniids, ok_buff_id, sender_bk] (Creature* c) mutable
|
||||
{
|
||||
for (int buff_uniid : buff_uniids) {
|
||||
c->RemoveBuffByUniId(buff_uniid);
|
||||
}
|
||||
int buff_uniid = c->TryAddBuff(c, ok_buff_id);
|
||||
if (sender_bk.Get()) {
|
||||
int buff_uniid = sender_bk.Get()->TryAddBuff(sender_bk.Get(), ok_buff_id);
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user