]> git.localhorst.tv Git - blank.git/blobdiff - src/ai/ai.cpp
index chunk access in entity/world intersection test
[blank.git] / src / ai / ai.cpp
index a2f5938eb707c3c58fc9199c3759a935b51a3393..0d4c9e9158256011e3477e595a93472cd52d4e8a 100644 (file)
@@ -169,7 +169,7 @@ Player *AIController::ClosestVisiblePlayer(const Entity &e) noexcept {
 
                // LOS test, assumes all entities are see-through
                WorldCollision col;
-               if (world.Intersection(aim, glm::mat4(1.0f), reference, col) && col.depth < dist) {
+               if (world.Intersection(aim, reference, col) && col.depth < dist) {
                        continue;
                }
 
@@ -189,7 +189,7 @@ bool AIController::LineOfSight(const Entity &from, const Entity &to) const noexc
                return false;
        }
        WorldCollision col;
-       if (world.Intersection(aim, glm::mat4(1.0f), reference, col) && col.depth < dist) {
+       if (world.Intersection(aim, reference, col) && col.depth < dist) {
                return false;
        }
        return true;