diff options
author | aap <aap@papnet.eu> | 2021-05-23 17:49:55 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 20:34:33 +0200 |
commit | 93e99299250fbc5e459883b514b871f6009edfc6 (patch) | |
tree | 551c1d8dfbc1b3cd2d8e2a2fd2a82109f54f09aa /src/peds/Population.cpp | |
parent | Undef PS2_AUDIO_CHANNELS for SQUEEZE_PERFORMANCE and VANILLA_DEFINES (diff) | |
download | re3-93e99299250fbc5e459883b514b871f6009edfc6.tar re3-93e99299250fbc5e459883b514b871f6009edfc6.tar.gz re3-93e99299250fbc5e459883b514b871f6009edfc6.tar.bz2 re3-93e99299250fbc5e459883b514b871f6009edfc6.tar.lz re3-93e99299250fbc5e459883b514b871f6009edfc6.tar.xz re3-93e99299250fbc5e459883b514b871f6009edfc6.tar.zst re3-93e99299250fbc5e459883b514b871f6009edfc6.zip |
Diffstat (limited to 'src/peds/Population.cpp')
-rw-r--r-- | src/peds/Population.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp index 3d4746d2..6a41b0c1 100644 --- a/src/peds/Population.cpp +++ b/src/peds/Population.cpp @@ -979,27 +979,30 @@ CPopulation::TestSafeForRealObject(CDummyObject *dummy) { CPtrNode *ptrNode; CColModel *dummyCol = dummy->GetColModel(); - float colRadius = dummy->GetBoundRadius(); - CVector colCentre = dummy->GetBoundCentre(); - int minX = CWorld::GetSectorIndexX(dummy->GetPosition().x - colRadius); + float radius = dummyCol->boundingSphere.radius; + int minX = CWorld::GetSectorIndexX(dummy->GetPosition().x - radius); if (minX < 0) minX = 0; - int minY = CWorld::GetSectorIndexY(dummy->GetPosition().y - colRadius); + int minY = CWorld::GetSectorIndexY(dummy->GetPosition().y - radius); if (minY < 0) minY = 0; - int maxX = CWorld::GetSectorIndexX(dummy->GetPosition().x + colRadius); + int maxX = CWorld::GetSectorIndexX(dummy->GetPosition().x + radius); #ifdef FIX_BUGS if (maxX >= NUMSECTORS_X) maxX = NUMSECTORS_X - 1; #else if (maxX >= NUMSECTORS_X) maxX = NUMSECTORS_X; #endif - int maxY = CWorld::GetSectorIndexY(dummy->GetPosition().y + colRadius); + int maxY = CWorld::GetSectorIndexY(dummy->GetPosition().y + radius); #ifdef FIX_BUGS if (maxY >= NUMSECTORS_Y) maxY = NUMSECTORS_Y - 1; #else if (maxY >= NUMSECTORS_Y) maxY = NUMSECTORS_Y; #endif + float colRadius = dummy->GetBoundRadius(); + CVUVECTOR colCentre; + dummy->GetBoundCentre(colCentre); + static CColPoint aTempColPoints[MAX_COLLISION_POINTS]; for (int curY = minY; curY <= maxY; curY++) { |