mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
reduce redundancy
This commit is contained in:
parent
5874abff98
commit
8edf9440a3
4 changed files with 5 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue