summaryrefslogtreecommitdiffstats
path: root/game/shared/entity/collision.cc
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-09-11 16:00:57 +0500
committeruntodesu <kirill@untode.su>2025-09-11 16:00:57 +0500
commitcfa27fd8eed42599195fdff6d7d0e25586e8f18c (patch)
tree2cc0c50b5b94f38cbbd548ab47dd7ae75d64a54c /game/shared/entity/collision.cc
parentd0fbd68055e3f4a796330cc8acc6c0954b5327ff (diff)
downloadvoxelius-cfa27fd8eed42599195fdff6d7d0e25586e8f18c.tar.bz2
voxelius-cfa27fd8eed42599195fdff6d7d0e25586e8f18c.zip
Graft header-only math::AABB<T> from qfengine
Diffstat (limited to 'game/shared/entity/collision.cc')
-rw-r--r--game/shared/entity/collision.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/game/shared/entity/collision.cc b/game/shared/entity/collision.cc
index dbe7d30..24f5d49 100644
--- a/game/shared/entity/collision.cc
+++ b/game/shared/entity/collision.cc
@@ -24,7 +24,7 @@ static int vgrid_collide(const world::Dimension* dimension, int d, entity::Colli
const auto& ref_aabb = collision.aabb;
const auto current_aabb = ref_aabb.push(transform.local);
- auto next_aabb = math::AABB(current_aabb);
+ auto next_aabb = math::AABBf(current_aabb);
next_aabb.min[d] += move;
next_aabb.max[d] += move;
@@ -60,7 +60,7 @@ static int vgrid_collide(const world::Dimension* dimension, int d, entity::Colli
world::voxel_touch latch_touch = world::voxel_touch::NOTHING;
glm::fvec3 latch_values = glm::fvec3(0.0f, 0.0f, 0.0f);
world::voxel_surface latch_surface = world::voxel_surface::UNKNOWN;
- math::AABB latch_vbox;
+ math::AABBf latch_vbox;
for(auto i = dmin; i != dmax; i += ddir) {
for(auto j = lpos_min[u]; j < lpos_max[u]; ++j)
@@ -79,7 +79,7 @@ static int vgrid_collide(const world::Dimension* dimension, int d, entity::Colli
continue;
}
- math::AABB vbox;
+ math::AABBf vbox;
vbox.min = glm::fvec3(lpos);
vbox.max = glm::fvec3(lpos) + 1.0f;