This commit is contained in:
aozhiwei 2023-04-02 15:45:58 +08:00
parent 3bcfdc02f6
commit 12217fc81a

View File

@ -1084,7 +1084,9 @@ void Bullet::ProcRequestBulletDmg(int shield_hit, int strength_wall_uniid, int t
GetMutablePos().FromGlmVec3(pos);
room->grid_service->MoveBullet(this);
float distance = GlmHelper::Norm(GetPos().ToGlmVec3() - born_pos.ToGlmVec3());
BulletCheckResult result;
result.flyed_distance = distance;
if (trace_target_id) {
if (trace_target_id == target_uniid) {
@ -1108,6 +1110,14 @@ void Bullet::ProcRequestBulletDmg(int shield_hit, int strength_wall_uniid, int t
}
}
} else {
GetHitThings(result);
if (result.o_hit_num <= 0) {
GetHitCreatures(result);
}
if (IsBomb()) {
ProcBomb();
} else {
ProcNormalBullet(result);
}
}
}