Fix CWorld::FindObjectsOfTypeInRangeSectorList bug

This commit is contained in:
saml1er 2020-04-17 17:04:09 +05:00
parent 2a4717fa41
commit ac61da3feb

View File

@ -753,6 +753,7 @@ CWorld::FindObjectsOfTypeInRangeSectorList(uint32 modelId, CPtrList &list, const
CEntity *pEntity = (CEntity *)pNode->item;
if(pEntity->m_scanCode != GetCurrentScanCode()) {
pEntity->m_scanCode = GetCurrentScanCode();
if(modelId == pEntity->m_modelIndex) {
float fMagnitude = 0.0f;
if(bCheck2DOnly)
fMagnitude = (position - pEntity->GetPosition()).MagnitudeSqr2D();
@ -764,6 +765,7 @@ CWorld::FindObjectsOfTypeInRangeSectorList(uint32 modelId, CPtrList &list, const
}
}
}
}
}
void