1
This commit is contained in:
parent
47734c0917
commit
c71d6ebc91
@ -54,9 +54,19 @@ void Bullet::RecalcSelfCollider()
|
||||
|
||||
void Bullet::OnHit(std::set<Entity*>& objects)
|
||||
{
|
||||
std::shared_ptr<Ability> old_context_ability = sender.Get()->context_ability;
|
||||
a8::Vec2 old_context_dir = sender.Get()->context_dir;
|
||||
a8::Vec2 old_context_pos = sender.Get()->context_pos;
|
||||
sender.Get()->context_dir = dir;
|
||||
sender.Get()->context_pos = GetPos();
|
||||
|
||||
for (auto& target : objects) {
|
||||
target->OnBulletHit(this);
|
||||
}
|
||||
|
||||
sender.Get()->context_dir = old_context_dir;
|
||||
sender.Get()->context_pos = old_context_pos;
|
||||
sender.Get()->context_ability = old_context_ability;
|
||||
}
|
||||
|
||||
void Bullet::ProcBomb()
|
||||
|
@ -3541,7 +3541,7 @@ void Human::OnBulletHit(Bullet* bullet)
|
||||
sender->stats.damage_amount_out += finaly_dmg;
|
||||
#endif
|
||||
if (bullet->meta->buff_meta) {
|
||||
MustBeAddBuff(this, bullet->meta->i->buffid());
|
||||
MustBeAddBuff(bullet->sender.Get(), bullet->meta->i->buffid());
|
||||
}
|
||||
if (bullet->sender.Get() && bullet->sender.Get()->IsCar() && bullet->passenger.Get()) {
|
||||
DecHP(finaly_dmg,
|
||||
|
Loading…
x
Reference in New Issue
Block a user