diff options
author | aap <aap@papnet.eu> | 2021-05-23 17:55:55 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 20:45:21 +0200 |
commit | e014bb5359ae464f14a413dd5ee98f0b5a385f67 (patch) | |
tree | 0a687f497f318c4a849e7054f05851a73f2f0c0c /src/peds/Population.cpp | |
parent | Undef PS2_AUDIO_CHANNELS for SQUEEZE_PERFORMANCE and VANILLA_DEFINES (diff) | |
download | re3-e014bb5359ae464f14a413dd5ee98f0b5a385f67.tar re3-e014bb5359ae464f14a413dd5ee98f0b5a385f67.tar.gz re3-e014bb5359ae464f14a413dd5ee98f0b5a385f67.tar.bz2 re3-e014bb5359ae464f14a413dd5ee98f0b5a385f67.tar.lz re3-e014bb5359ae464f14a413dd5ee98f0b5a385f67.tar.xz re3-e014bb5359ae464f14a413dd5ee98f0b5a385f67.tar.zst re3-e014bb5359ae464f14a413dd5ee98f0b5a385f67.zip |
Diffstat (limited to '')
-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 b8984165..f0e41231 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++) { |