diff options
author | aap <aap@papnet.eu> | 2020-12-03 16:04:59 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-03 16:04:59 +0100 |
commit | 13cefd329390c119126af6dcf0558ceb7c720e59 (patch) | |
tree | fa6f5344fe2e0f590d135515e40a5e673fcbf39a /src/core/World.cpp | |
parent | little fixes for animviewer (diff) | |
download | re3-13cefd329390c119126af6dcf0558ceb7c720e59.tar re3-13cefd329390c119126af6dcf0558ceb7c720e59.tar.gz re3-13cefd329390c119126af6dcf0558ceb7c720e59.tar.bz2 re3-13cefd329390c119126af6dcf0558ceb7c720e59.tar.lz re3-13cefd329390c119126af6dcf0558ceb7c720e59.tar.xz re3-13cefd329390c119126af6dcf0558ceb7c720e59.tar.zst re3-13cefd329390c119126af6dcf0558ceb7c720e59.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/World.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp index 844a4fb7..0bc564ff 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -922,24 +922,24 @@ CEntity * CWorld::TestSphereAgainstSectorList(CPtrList &list, CVector spherePos, float radius, CEntity *entityToIgnore, bool ignoreSomeObjects) { - static CColModel sphereCol; - - 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; - sphereCol.spheres = &sphereCol.boundingSphere; - sphereCol.numLines = 0; - sphereCol.numBoxes = 0; - sphereCol.numTriangles = 0; - sphereCol.ownsCollisionVolumes = false; + static CColModel OurColModel; + + 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; + OurColModel.spheres = &OurColModel.boundingSphere; + OurColModel.numLines = 0; + OurColModel.numBoxes = 0; + OurColModel.numTriangles = 0; + OurColModel.ownsCollisionVolumes = false; CMatrix sphereMat; sphereMat.SetTranslate(spherePos); @@ -962,7 +962,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 || |