From 8a1fc7ded650b844349fe352b5e930265d394950 Mon Sep 17 00:00:00 2001 From: jonnypower Date: Sun, 29 Apr 2018 21:48:30 -0700 Subject: [PATCH] fix: Strongly typed collision tests for linux compile - Regression from macos source changes --- main/source/mod/CollisionChecker.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/main/source/mod/CollisionChecker.cpp b/main/source/mod/CollisionChecker.cpp index e7789d0f..cd21cffa 100644 --- a/main/source/mod/CollisionChecker.cpp +++ b/main/source/mod/CollisionChecker.cpp @@ -454,7 +454,7 @@ void CollisionChecker::SetIgnoreEntityClass(int ignore_entity_class) int CollisionChecker::GetContentsAtPoint(const nspoint_t& point) const { - auto tmp = PointCollisionTest(point); + PointCollisionTest tmp = PointCollisionTest(point); return GetContents(&tmp); } @@ -469,7 +469,7 @@ int CollisionChecker::GetWorldContentsAtPoint(const nspoint_t& point) const int CollisionChecker::GetAllEntityContentsAtPoint(const nspoint_t& point) const { - auto tmp = PointCollisionTest(point); + PointCollisionTest tmp = PointCollisionTest(point); return GetAllEntityContents(&tmp); } @@ -477,7 +477,7 @@ int CollisionChecker::GetAllEntityContentsAtPoint(const nspoint_t& point) const int CollisionChecker::GetSingleEntityContentsAtPoint(const nspoint_t& point, int entity_index) const { - auto tmp = PointCollisionTest(point); + PointCollisionTest tmp = PointCollisionTest(point); return GetSingleEntityContents(&tmp, entity_index); } @@ -489,7 +489,7 @@ const static nspoint_t CYLINDER_UP_DEFAULT = {0,0,1.0f}; int CollisionChecker::GetContentsInCylinder(const nspoint_t& base, float radius, float height) const { - auto tmp = CylinderCollisionTest(CYLINDER_UP_DEFAULT,base,radius,height); + CylinderCollisionTest tmp = CylinderCollisionTest(CYLINDER_UP_DEFAULT,base,radius,height); return GetContents(&tmp); } @@ -497,7 +497,7 @@ int CollisionChecker::GetContentsInCylinder(const nspoint_t& base, float radius, int CollisionChecker::GetWorldContentsInCylinder(const nspoint_t& base, float radius, float height) const { - auto tmp = CylinderCollisionTest(CYLINDER_UP_DEFAULT,base,radius,height); + CylinderCollisionTest tmp = CylinderCollisionTest(CYLINDER_UP_DEFAULT,base,radius,height); return GetSingleEntityContents(&tmp, WORLD_ENTITY); } @@ -505,7 +505,7 @@ int CollisionChecker::GetWorldContentsInCylinder(const nspoint_t& base, float ra int CollisionChecker::GetAllEntityContentsInCylinder(const nspoint_t& base, float radius, float height) const { - auto tmp = CylinderCollisionTest(CYLINDER_UP_DEFAULT,base,radius,height); + CylinderCollisionTest tmp = CylinderCollisionTest(CYLINDER_UP_DEFAULT,base,radius,height); return GetAllEntityContents(&tmp); } @@ -513,7 +513,7 @@ int CollisionChecker::GetAllEntityContentsInCylinder(const nspoint_t& base, floa int CollisionChecker::GetSingleEntityContentsInCylinder(const nspoint_t& base, float radius, float height, int entity_index) const { - auto tmp = CylinderCollisionTest(CYLINDER_UP_DEFAULT,base,radius,height); + CylinderCollisionTest tmp = CylinderCollisionTest(CYLINDER_UP_DEFAULT,base,radius,height); return GetSingleEntityContents(&tmp,entity_index); } @@ -523,7 +523,7 @@ int CollisionChecker::GetSingleEntityContentsInCylinder(const nspoint_t& base, f int CollisionChecker::GetContentsInAABB(const nspoint_t& mins, const nspoint_t& maxs) const { - auto tmp = AABBCollisionTest(mins,maxs); + AABBCollisionTest tmp = AABBCollisionTest(mins,maxs); return GetContents(&tmp); } @@ -531,7 +531,7 @@ int CollisionChecker::GetContentsInAABB(const nspoint_t& mins, const nspoint_t& int CollisionChecker::GetWorldContentsInAABB(const nspoint_t& mins, const nspoint_t& maxs) const { - auto tmp = AABBCollisionTest(mins,maxs); + AABBCollisionTest tmp = AABBCollisionTest(mins,maxs); return GetSingleEntityContents(&tmp, WORLD_ENTITY); } @@ -539,7 +539,7 @@ int CollisionChecker::GetWorldContentsInAABB(const nspoint_t& mins, const nspoin int CollisionChecker::GetAllEntityContentsInAABB(const nspoint_t& mins, const nspoint_t& maxs) const { - auto tmp = AABBCollisionTest(mins,maxs); + AABBCollisionTest tmp = AABBCollisionTest(mins,maxs); return GetAllEntityContents(&tmp); } @@ -547,7 +547,7 @@ int CollisionChecker::GetAllEntityContentsInAABB(const nspoint_t& mins, const ns int CollisionChecker::GetSingleEntityContentsInAABB(const nspoint_t& mins, const nspoint_t& maxs, int entity_index) const { - auto tmp = AABBCollisionTest(mins,maxs); + AABBCollisionTest tmp = AABBCollisionTest(mins,maxs); return GetSingleEntityContents(&tmp,entity_index); }