summaryrefslogtreecommitdiffstats
path: root/src/core/World.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-06 17:56:38 +0200
committeraap <aap@papnet.eu>2020-05-06 17:56:38 +0200
commitf1c1f56b1268b900a01a479f9ad67cd92e63eb52 (patch)
treef936f78ebcc7b736995b68b4d65a66c26cc790c2 /src/core/World.cpp
parentMerge remote-tracking branch 'origin/master' into miami (diff)
downloadre3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar
re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.gz
re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.bz2
re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.lz
re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.xz
re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.zst
re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.zip
Diffstat (limited to 'src/core/World.cpp')
-rw-r--r--src/core/World.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 15330923..37ad6221 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -920,6 +920,7 @@ CWorld::TestSphereAgainstSectorList(CPtrList &list, CVector spherePos, float rad
bool ignoreSomeObjects)
{
static CColModel sphereCol;
+ CColSphere sphere;
sphereCol.boundingSphere.center.x = 0.0f;
sphereCol.boundingSphere.center.y = 0.0f;
@@ -932,7 +933,8 @@ CWorld::TestSphereAgainstSectorList(CPtrList &list, CVector spherePos, float rad
sphereCol.boundingBox.max.y = radius;
sphereCol.boundingBox.max.z = radius;
sphereCol.numSpheres = 1;
- sphereCol.spheres = &sphereCol.boundingSphere;
+ sphere.Set(radius, CVector(0.0f, 0.0f, 0.0f));
+ sphereCol.spheres = &sphere;
sphereCol.numLines = 0;
sphereCol.numBoxes = 0;
sphereCol.numTriangles = 0;
@@ -1201,7 +1203,7 @@ CWorld::FindObjectsIntersectingCubeSectorList(CPtrList &list, const CVector &vec
}
void
-CWorld::FindObjectsIntersectingAngledCollisionBox(const CColBox &boundingBox, const CMatrix &matrix,
+CWorld::FindObjectsIntersectingAngledCollisionBox(const CBox &boundingBox, const CMatrix &matrix,
const CVector &position, float fStartX, float fStartY, float fEndX,
float fEndY, int16 *nEntitiesFound, int16 maxEntitiesToFind,
CEntity **aEntities, bool bBuildings, bool bVehicles, bool bPeds,
@@ -1261,7 +1263,7 @@ CWorld::FindObjectsIntersectingAngledCollisionBox(const CColBox &boundingBox, co
}
void
-CWorld::FindObjectsIntersectingAngledCollisionBoxSectorList(CPtrList &list, const CColBox &boundingBox,
+CWorld::FindObjectsIntersectingAngledCollisionBoxSectorList(CPtrList &list, const CBox &boundingBox,
const CMatrix &matrix, const CVector &position,
int16 *nEntitiesFound, int16 maxEntitiesToFind,
CEntity **aEntities)