This commit is contained in:
aozhiwei 2023-04-02 16:52:07 +08:00
parent 6fa87b3c70
commit cdd5389b30
2 changed files with 6 additions and 3 deletions

View File

@ -805,9 +805,14 @@ void Bullet::GetHitThings(BulletCheckResult& result)
room->grid_service->TraverseObstacles
(room->GetRoomIdx(),
GetGridList(),
[this] (Obstacle* ob, bool& stop)
[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);
}
}
#else
if (ob->meta->thing_type() == kObstacleStrengthenWall) {
if (!strengthened_ && sender.Get() &&

View File

@ -3492,7 +3492,6 @@ void Room::CreateWorldObjects()
break;
case WorldObjectType_e::kCarType:
{
#if 1
const mt::Equip* equip_meta = mt::Equip::GetById(obj->object_id);
if (equip_meta) {
int car_uniid = AllocUniid();
@ -3509,7 +3508,6 @@ void Room::CreateWorldObjects()
car_hash_[c->GetUniId()] = car;
}
}
#endif
}
break;
case WorldObjectType_e::kBornPointType: