Fix projectile crash

This commit is contained in:
Sergeanur 2020-01-13 16:36:42 +02:00
parent 9d3c73156b
commit 8b57634c78
1 changed files with 0 additions and 15 deletions

View File

@ -213,9 +213,6 @@ CProjectileInfo::Update()
|| !CWorld::GetIsLineOfSightClear(gaProjectileInfo[i].m_vecPos, pos, true, true, true, true, false, false)
|| gaProjectileInfo[i].m_eWeaponType == WEAPONTYPE_ROCKETLAUNCHER && (CHeli::TestRocketCollision(&pos) || CPlane::TestRocketCollision(&pos))) {
RemoveProjectile(&gaProjectileInfo[i], ms_apProjectile[i]);
#ifdef FIX_BUGS
ms_apProjectile[i] = nil;
#endif
}
CWorld::pIgnoreEntity = nil;
} else if (gaProjectileInfo[i].m_eWeaponType == WEAPONTYPE_MOLOTOV) {
@ -229,18 +226,12 @@ CProjectileInfo::Update()
|| !CWorld::GetIsLineOfSightClear(gaProjectileInfo[i].m_vecPos, pos, true, true, true, true, false, false)
|| gaProjectileInfo[i].m_eWeaponType == WEAPONTYPE_ROCKETLAUNCHER && (CHeli::TestRocketCollision(&pos) || CPlane::TestRocketCollision(&pos))) {
RemoveProjectile(&gaProjectileInfo[i], ms_apProjectile[i]);
#ifdef FIX_BUGS
ms_apProjectile[i] = nil;
#endif
}
}
CWorld::pIgnoreEntity = nil;
}
} else {
RemoveProjectile(&gaProjectileInfo[i], ms_apProjectile[i]);
#ifdef FIX_BUGS
ms_apProjectile[i] = nil;
#endif
}
gaProjectileInfo[i].m_vecPos = ms_apProjectile[i]->GetPosition();
@ -261,9 +252,6 @@ CProjectileInfo::IsProjectileInRange(float x1, float x2, float y1, float y2, flo
gaProjectileInfo[i].m_bInUse = false;
CWorld::Remove(ms_apProjectile[i]);
delete ms_apProjectile[i];
#ifdef FIX_BUGS
ms_apProjectile[i] = nil;
#endif
}
}
}
@ -280,9 +268,6 @@ CProjectileInfo::RemoveAllProjectiles()
gaProjectileInfo[i].m_bInUse = false;
CWorld::Remove(ms_apProjectile[i]);
delete ms_apProjectile[i];
#ifdef FIX_BUGS
ms_apProjectile[i] = nil;
#endif
}
}
}