1.汽油桶无法打爆

This commit is contained in:
aozhiwei 2021-06-25 14:31:31 +08:00
parent 1629441404
commit e111fd15f9

View File

@ -313,15 +313,13 @@ void Bullet::Check(float distance)
std::set<ColliderComponent*> colliders;
room->map_service->GetColliders(room, GetX(), GetY(), colliders);
for (ColliderComponent* collider : colliders) {
if (TestCollision(room, collider) &&
!a8::HasBitFlag(collider->tag, kHalfWallTag)) {
if (collider->owner->IsEntityType(ET_Obstacle)) {
Obstacle* obstacle = (Obstacle*)collider->owner;
if (obstacle->CanThroughable(this)) {
continue;
if (collider->owner->IsEntityType(ET_Obstacle)) {
Obstacle* obstacle = (Obstacle*)collider->owner;
if (!obstacle->CanThroughable(this)) {
if (TestCollision(room, collider)) {
objects.insert(collider->owner);
}
}
objects.insert(collider->owner);
}
}
}