This commit is contained in:
aozhiwei 2024-01-03 14:53:55 +08:00
parent a4391150d0
commit 0a6be20a56

View File

@ -532,6 +532,8 @@ void Bullet::Check(float distance)
GetHitThings(result);
if (result.o_hit_num <= 0) {
GetHitCreatures(result);
} else {
}
if (!result.objects.empty() ||
#if 1
@ -844,12 +846,13 @@ void Bullet::GetHitThings(BulletCheckResult& result)
room->grid_service->TraverseObstacles
(room->GetRoomIdx(),
GetGridList(),
[this, result] (Obstacle* ob, bool& stop) mutable
[this, &result] (Obstacle* ob, bool& stop) mutable
{
#if 1
if (!ob->CanThroughable(this) && !ob->IsDead(room)) {
if (Collision::CheckBullet(this, ob)) {
result.objects.insert(ob);
++result.o_hit_num;
}
}
#else