mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-26 02:54:14 +01:00
Merge remote-tracking branch 'samler/world' into Standalone
This commit is contained in:
commit
c8af08330a
@ -753,14 +753,16 @@ CWorld::FindObjectsOfTypeInRangeSectorList(uint32 modelId, CPtrList &list, const
|
||||
CEntity *pEntity = (CEntity *)pNode->item;
|
||||
if(pEntity->m_scanCode != GetCurrentScanCode()) {
|
||||
pEntity->m_scanCode = GetCurrentScanCode();
|
||||
float fMagnitude = 0.0f;
|
||||
if(bCheck2DOnly)
|
||||
fMagnitude = (position - pEntity->GetPosition()).MagnitudeSqr2D();
|
||||
else
|
||||
fMagnitude = (position - pEntity->GetPosition()).MagnitudeSqr();
|
||||
if(fMagnitude < radius * radius && *nEntitiesFound < maxEntitiesToFind) {
|
||||
if(aEntities) aEntities[*nEntitiesFound] = pEntity;
|
||||
++*nEntitiesFound;
|
||||
if(modelId == pEntity->m_modelIndex) {
|
||||
float fMagnitude = 0.0f;
|
||||
if(bCheck2DOnly)
|
||||
fMagnitude = (position - pEntity->GetPosition()).MagnitudeSqr2D();
|
||||
else
|
||||
fMagnitude = (position - pEntity->GetPosition()).MagnitudeSqr();
|
||||
if(fMagnitude < radius * radius && *nEntitiesFound < maxEntitiesToFind) {
|
||||
if(aEntities) aEntities[*nEntitiesFound] = pEntity;
|
||||
++*nEntitiesFound;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user