This commit is contained in:
aozhiwei 2024-01-19 19:25:10 +08:00
parent 6432a4c81c
commit ca6a1191ee
3 changed files with 7 additions and 2 deletions

View File

@ -1463,7 +1463,7 @@ void CallFuncBuff::Shot()
auto on_bullet_exit =
[owner_wp, buff_uniid_copy, meta_copy] (Bullet* bullet) mutable
{
if (owner_wp.Get()) {
if (owner_wp.Get() && !owner_wp.Get()->IsDestorying()) {
std::shared_ptr<std::vector<float>> vars = std::make_shared<std::vector<float>>();
vars->push_back(bullet->GetPos().GetX());
vars->push_back(bullet->GetPos().GetY());

View File

@ -3346,6 +3346,9 @@ std::shared_ptr<std::set<int>> Creature::CalcReporterList(bool is_trace_bullet,
if (weapon_meta->equip_subtype() == GUN_SUB_EQUIP_TYPE_THREE_GUN) {
need_gen = true;
}
if (GetAbility()->GetSwitchTimes(kForceClientReportBullet) > 0) {
need_gen = true;
}
if (need_gen) {
float nearest_distance = FLT_MAX;
Creature* nearest_hum = nullptr;

View File

@ -55,6 +55,7 @@ struct BulletInfo
std::shared_ptr<std::set<int>> reporter_list;
int shot_uniid = 0;
a8::XTimerWp keep_shot_animi_timer_ptr;
bool ignore_original_dmg = false;
};
static void CalcGunMuzzlePosition(Creature* c,
@ -500,6 +501,7 @@ void InternalShot(Creature* c,
bullet_info.weapon_lv = weapon_lv;
bullet_info.weapon_buff_id = weapon_buff_id;
bullet_info.reporter_list = c->CalcReporterList(trace_target_uniid, weapon_meta, bullet_meta);
bullet_info.ignore_original_dmg = c->GetAbility()->GetSwitchTimes(kIgnoreOriginalDmg) > 0;
if (weapon_meta->double_gun() &&
bulletIdx > (int)(bulletNum / 2)) {
bullet_info.hand = 1;