Fix collision loading for mission entities

This commit is contained in:
Sergeanur 2021-07-02 00:18:38 +03:00
parent 65219365db
commit 8e6e46a919

View File

@ -186,7 +186,7 @@ CColStore::LoadCollision(const CVector2D &pos)
}else{ }else{
for (int j = 0; j < MAX_CLEANUP; j++) { for (int j = 0; j < MAX_CLEANUP; j++) {
CPhysical* pEntity = nil; CPhysical* pEntity = nil;
cleanup_entity_struct* pCleanup = &CTheScripts::MissionCleanUp.m_sEntities[i]; cleanup_entity_struct* pCleanup = &CTheScripts::MissionCleanUp.m_sEntities[j];
if (pCleanup->type == CLEANUP_CAR) { if (pCleanup->type == CLEANUP_CAR) {
pEntity = CPools::GetVehiclePool()->GetAt(pCleanup->id); pEntity = CPools::GetVehiclePool()->GetAt(pCleanup->id);
if (!pEntity || pEntity->GetStatus() == STATUS_WRECKED) if (!pEntity || pEntity->GetStatus() == STATUS_WRECKED)