mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 18:39:00 +00:00
Merge remote-tracking branch 'samler/world' into Standalone
This commit is contained in:
commit
c8af08330a
1 changed files with 10 additions and 8 deletions
|
@ -753,14 +753,16 @@ CWorld::FindObjectsOfTypeInRangeSectorList(uint32 modelId, CPtrList &list, const
|
||||||
CEntity *pEntity = (CEntity *)pNode->item;
|
CEntity *pEntity = (CEntity *)pNode->item;
|
||||||
if(pEntity->m_scanCode != GetCurrentScanCode()) {
|
if(pEntity->m_scanCode != GetCurrentScanCode()) {
|
||||||
pEntity->m_scanCode = GetCurrentScanCode();
|
pEntity->m_scanCode = GetCurrentScanCode();
|
||||||
float fMagnitude = 0.0f;
|
if(modelId == pEntity->m_modelIndex) {
|
||||||
if(bCheck2DOnly)
|
float fMagnitude = 0.0f;
|
||||||
fMagnitude = (position - pEntity->GetPosition()).MagnitudeSqr2D();
|
if(bCheck2DOnly)
|
||||||
else
|
fMagnitude = (position - pEntity->GetPosition()).MagnitudeSqr2D();
|
||||||
fMagnitude = (position - pEntity->GetPosition()).MagnitudeSqr();
|
else
|
||||||
if(fMagnitude < radius * radius && *nEntitiesFound < maxEntitiesToFind) {
|
fMagnitude = (position - pEntity->GetPosition()).MagnitudeSqr();
|
||||||
if(aEntities) aEntities[*nEntitiesFound] = pEntity;
|
if(fMagnitude < radius * radius && *nEntitiesFound < maxEntitiesToFind) {
|
||||||
++*nEntitiesFound;
|
if(aEntities) aEntities[*nEntitiesFound] = pEntity;
|
||||||
|
++*nEntitiesFound;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue