mirror of
https://github.com/halpz/re3.git
synced 2025-07-03 01:30:45 +00:00
CEntity and C(Vu)Vector fixes and cleanup
This commit is contained in:
@ -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++) {
|
||||
|
Reference in New Issue
Block a user