reduce redundancy
This commit is contained in:
@@ -405,8 +405,8 @@ void Entities::render(Assets* assets, ModelBatch& batch, const Frustum& frustum,
|
||||
}
|
||||
|
||||
bool Entities::hasBlockingInside(AABB aabb) {
|
||||
auto view = registry.view<EntityId, Transform, Rigidbody>();
|
||||
for (auto [entity, eid, transform, body] : view.each()) {
|
||||
auto view = registry.view<EntityId, Rigidbody>();
|
||||
for (auto [entity, eid, body] : view.each()) {
|
||||
if (eid.def.blocking && aabb.intersect(body.hitbox.getAABB())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user