fix blocks placing when crouching

This commit is contained in:
MihailRis
2024-07-13 04:48:03 +03:00
parent 6442a3476f
commit 8617784084
4 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -407,7 +407,7 @@ void Entities::render(Assets* assets, ModelBatch& batch, const Frustum& frustum,
bool Entities::hasBlockingInside(AABB aabb) {
auto view = registry.view<EntityId, Rigidbody>();
for (auto [entity, eid, body] : view.each()) {
if (eid.def.blocking && aabb.intersect(body.hitbox.getAABB())) {
if (eid.def.blocking && aabb.intersect(body.hitbox.getAABB(), -0.05f)) {
return true;
}
}