mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
fix blocks placing when crouching
This commit is contained in:
parent
6442a3476f
commit
8617784084
4 changed files with 13 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ static std::tuple<size_t, std::unique_ptr<Bone>> read_node(
|
|||
std::string model;
|
||||
root->str("name", name);
|
||||
root->str("model", model);
|
||||
|
||||
std::vector<std::unique_ptr<Bone>> bones;
|
||||
size_t count = 1;
|
||||
if (auto nodesList = root->list("nodes")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue