diff options
author | aap <aap@papnet.eu> | 2020-12-03 19:11:57 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-03 19:11:57 +0100 |
commit | 43fb7fe3422c91135e688405999b2dce6ce99a26 (patch) | |
tree | 8fb6eb45c98f7ef4ac27eb771a81a4ed964ddaee /src/core/World.cpp | |
parent | animviewer fixes (diff) | |
download | re3-43fb7fe3422c91135e688405999b2dce6ce99a26.tar re3-43fb7fe3422c91135e688405999b2dce6ce99a26.tar.gz re3-43fb7fe3422c91135e688405999b2dce6ce99a26.tar.bz2 re3-43fb7fe3422c91135e688405999b2dce6ce99a26.tar.lz re3-43fb7fe3422c91135e688405999b2dce6ce99a26.tar.xz re3-43fb7fe3422c91135e688405999b2dce6ce99a26.tar.zst re3-43fb7fe3422c91135e688405999b2dce6ce99a26.zip |
Diffstat (limited to 'src/core/World.cpp')
-rw-r--r-- | src/core/World.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp index 4c700f10..bc104fe9 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -942,26 +942,26 @@ CEntity * CWorld::TestSphereAgainstSectorList(CPtrList &list, CVector spherePos, float radius, CEntity *entityToIgnore, bool ignoreSomeObjects) { - static CColModel sphereCol; + static CColModel OurColModel; CColSphere sphere; - sphereCol.boundingSphere.center.x = 0.0f; - sphereCol.boundingSphere.center.y = 0.0f; - sphereCol.boundingSphere.center.z = 0.0f; - sphereCol.boundingSphere.radius = radius; - sphereCol.boundingBox.min.x = -radius; - sphereCol.boundingBox.min.y = -radius; - sphereCol.boundingBox.min.z = -radius; - sphereCol.boundingBox.max.x = radius; - sphereCol.boundingBox.max.y = radius; - sphereCol.boundingBox.max.z = radius; - sphereCol.numSpheres = 1; + OurColModel.boundingSphere.center.x = 0.0f; + OurColModel.boundingSphere.center.y = 0.0f; + OurColModel.boundingSphere.center.z = 0.0f; + OurColModel.boundingSphere.radius = radius; + OurColModel.boundingBox.min.x = -radius; + OurColModel.boundingBox.min.y = -radius; + OurColModel.boundingBox.min.z = -radius; + OurColModel.boundingBox.max.x = radius; + OurColModel.boundingBox.max.y = radius; + OurColModel.boundingBox.max.z = radius; + OurColModel.numSpheres = 1; sphere.Set(radius, CVector(0.0f, 0.0f, 0.0f)); - sphereCol.spheres = &sphere; - sphereCol.numLines = 0; - sphereCol.numBoxes = 0; - sphereCol.numTriangles = 0; - sphereCol.ownsCollisionVolumes = false; + OurColModel.spheres = &sphere; + OurColModel.numLines = 0; + OurColModel.numBoxes = 0; + OurColModel.numTriangles = 0; + OurColModel.ownsCollisionVolumes = false; CMatrix sphereMat; sphereMat.SetTranslate(spherePos); @@ -980,7 +980,7 @@ CWorld::TestSphereAgainstSectorList(CPtrList &list, CVector spherePos, float rad if(e->GetBoundRadius() + radius > distance) { CColModel *eCol = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(); int collidedSpheres = - CCollision::ProcessColModels(sphereMat, sphereCol, e->GetMatrix(), *eCol, + CCollision::ProcessColModels(sphereMat, OurColModel, e->GetMatrix(), *eCol, gaTempSphereColPoints, nil, nil); if(collidedSpheres != 0 || |