This commit is contained in:
aozhiwei 2022-09-06 16:43:50 +08:00
parent 47a4d9c5bc
commit 93f639cd0d

View File

@ -3526,6 +3526,7 @@ void Human::OnBulletHit(Bullet* bullet)
RemoveBuffByEffectId(kBET_PeaceMode);
if (!dead && (bullet->IsBomb() || bullet->sender.Get()->team_id != team_id)) {
#ifdef ATTR
float finaly_dmg = bullet->sender.Get()->GetBattleContext()->CalcDmg(this, bullet);
#else
float old_hp = GetHP();
float old_max_hp = GetMaxHP();
@ -3533,6 +3534,7 @@ void Human::OnBulletHit(Bullet* bullet)
float atk_rate = 0;
float def_rate = 0;
bullet->CalcDmg(this, finaly_dmg, atk_rate, def_rate);
#endif
if (bullet->sender.Get()->IsHuman()) {
bullet->sender.Get()->AsHuman()->stats.damage_amount_out += finaly_dmg;
}
@ -3558,7 +3560,6 @@ void Human::OnBulletHit(Bullet* bullet)
bullet->gun_meta->i->id());
}
}
#endif
}
}