remove superfluous CWorld::

This commit is contained in:
aap 2020-12-31 22:03:37 +01:00
parent 4e7c2b90f7
commit 31000fb4f0

View File

@ -144,13 +144,13 @@ CWorld::ClearExcitingStuffFromArea(const CVector &pos, float radius, bool bRemov
}
}
CCarCtrl::RemoveFromInterestingVehicleList(pVehicle);
CWorld::Remove(pVehicle);
Remove(pVehicle);
delete pVehicle;
}
}
CObject::DeleteAllTempObjectsInArea(pos, radius);
gFireManager.ExtinguishPoint(pos, radius);
CWorld::ExtinguishAllCarFiresInArea(pos, radius);
ExtinguishAllCarFiresInArea(pos, radius);
CExplosion::RemoveAllExplosionsInArea(pos, radius);
if(bRemoveProjectilesAndTidyUpShadows) {
CProjectileInfo::RemoveAllProjectiles();
@ -781,7 +781,7 @@ CWorld::FindObjectsOfTypeInRange(uint32 modelId, const CVector &position, float
int16 *nEntitiesFound, int16 maxEntitiesToFind, CEntity **aEntities, bool bBuildings,
bool bVehicles, bool bPeds, bool bObjects, bool bDummies)
{
CWorld::AdvanceCurrentScanCode();
AdvanceCurrentScanCode();
*nEntitiesFound = 0;
const CVector2D vecSectorStartPos(position.x - radius, position.y - radius);
const CVector2D vecSectorEndPos(position.x + radius, position.y + radius);
@ -791,44 +791,44 @@ CWorld::FindObjectsOfTypeInRange(uint32 modelId, const CVector &position, float
const int32 nEndY = Min(CWorld::GetSectorIndexY(vecSectorEndPos.y), NUMSECTORS_Y - 1);
for(int32 y = nStartY; y <= nEndY; y++) {
for(int32 x = nStartX; x <= nEndX; x++) {
CSector *pSector = CWorld::GetSector(x, y);
CSector *pSector = GetSector(x, y);
if(bBuildings) {
CWorld::FindObjectsOfTypeInRangeSectorList(
FindObjectsOfTypeInRangeSectorList(
modelId, pSector->m_lists[ENTITYLIST_BUILDINGS], position, radius, bCheck2DOnly,
nEntitiesFound, maxEntitiesToFind, aEntities);
CWorld::FindObjectsOfTypeInRangeSectorList(
FindObjectsOfTypeInRangeSectorList(
modelId, pSector->m_lists[ENTITYLIST_BUILDINGS_OVERLAP], position, radius,
bCheck2DOnly, nEntitiesFound, maxEntitiesToFind, aEntities);
}
if(bVehicles) {
CWorld::FindObjectsOfTypeInRangeSectorList(
FindObjectsOfTypeInRangeSectorList(
modelId, pSector->m_lists[ENTITYLIST_VEHICLES], position, radius, bCheck2DOnly,
nEntitiesFound, maxEntitiesToFind, aEntities);
CWorld::FindObjectsOfTypeInRangeSectorList(
FindObjectsOfTypeInRangeSectorList(
modelId, pSector->m_lists[ENTITYLIST_VEHICLES_OVERLAP], position, radius,
bCheck2DOnly, nEntitiesFound, maxEntitiesToFind, aEntities);
}
if(bPeds) {
CWorld::FindObjectsOfTypeInRangeSectorList(
FindObjectsOfTypeInRangeSectorList(
modelId, pSector->m_lists[ENTITYLIST_PEDS], position, radius, bCheck2DOnly,
nEntitiesFound, maxEntitiesToFind, aEntities);
CWorld::FindObjectsOfTypeInRangeSectorList(
FindObjectsOfTypeInRangeSectorList(
modelId, pSector->m_lists[ENTITYLIST_PEDS_OVERLAP], position, radius, bCheck2DOnly,
nEntitiesFound, maxEntitiesToFind, aEntities);
}
if(bObjects) {
CWorld::FindObjectsOfTypeInRangeSectorList(
FindObjectsOfTypeInRangeSectorList(
modelId, pSector->m_lists[ENTITYLIST_OBJECTS], position, radius, bCheck2DOnly,
nEntitiesFound, maxEntitiesToFind, aEntities);
CWorld::FindObjectsOfTypeInRangeSectorList(
FindObjectsOfTypeInRangeSectorList(
modelId, pSector->m_lists[ENTITYLIST_OBJECTS_OVERLAP], position, radius,
bCheck2DOnly, nEntitiesFound, maxEntitiesToFind, aEntities);
}
if(bDummies) {
CWorld::FindObjectsOfTypeInRangeSectorList(
FindObjectsOfTypeInRangeSectorList(
modelId, pSector->m_lists[ENTITYLIST_DUMMIES], position, radius, bCheck2DOnly,
nEntitiesFound, maxEntitiesToFind, aEntities);
CWorld::FindObjectsOfTypeInRangeSectorList(
FindObjectsOfTypeInRangeSectorList(
modelId, pSector->m_lists[ENTITYLIST_DUMMIES_OVERLAP], position, radius,
bCheck2DOnly, nEntitiesFound, maxEntitiesToFind, aEntities);
}
@ -1052,7 +1052,7 @@ CWorld::FindObjectsKindaColliding(const CVector &position, float radius, bool bC
int16 maxEntitiesToFind, CEntity **aEntities, bool bBuildings, bool bVehicles,
bool bPeds, bool bObjects, bool bDummies)
{
CWorld::AdvanceCurrentScanCode();
AdvanceCurrentScanCode();
*nCollidingEntities = 0;
const CVector2D vecSectorStartPos(position.x - radius, position.y - radius);
const CVector2D vecSectorEndPos(position.x + radius, position.y + radius);
@ -1062,44 +1062,44 @@ CWorld::FindObjectsKindaColliding(const CVector &position, float radius, bool bC
const int32 nEndY = Min(CWorld::GetSectorIndexY(vecSectorEndPos.y), NUMSECTORS_Y - 1);
for(int32 y = nStartY; y <= nEndY; y++) {
for(int32 x = nStartX; x <= nEndX; x++) {
CSector *pSector = CWorld::GetSector(x, y);
CSector *pSector = GetSector(x, y);
if(bBuildings) {
CWorld::FindObjectsKindaCollidingSectorList(
FindObjectsKindaCollidingSectorList(
pSector->m_lists[ENTITYLIST_BUILDINGS], position, radius, bCheck2DOnly,
nCollidingEntities, maxEntitiesToFind, aEntities);
CWorld::FindObjectsKindaCollidingSectorList(
FindObjectsKindaCollidingSectorList(
pSector->m_lists[ENTITYLIST_BUILDINGS_OVERLAP], position, radius, bCheck2DOnly,
nCollidingEntities, maxEntitiesToFind, aEntities);
}
if(bVehicles) {
CWorld::FindObjectsKindaCollidingSectorList(
FindObjectsKindaCollidingSectorList(
pSector->m_lists[ENTITYLIST_VEHICLES], position, radius, bCheck2DOnly,
nCollidingEntities, maxEntitiesToFind, aEntities);
CWorld::FindObjectsKindaCollidingSectorList(
FindObjectsKindaCollidingSectorList(
pSector->m_lists[ENTITYLIST_VEHICLES_OVERLAP], position, radius, bCheck2DOnly,
nCollidingEntities, maxEntitiesToFind, aEntities);
}
if(bPeds) {
CWorld::FindObjectsKindaCollidingSectorList(pSector->m_lists[ENTITYLIST_PEDS], position,
FindObjectsKindaCollidingSectorList(pSector->m_lists[ENTITYLIST_PEDS], position,
radius, bCheck2DOnly, nCollidingEntities,
maxEntitiesToFind, aEntities);
CWorld::FindObjectsKindaCollidingSectorList(
FindObjectsKindaCollidingSectorList(
pSector->m_lists[ENTITYLIST_PEDS_OVERLAP], position, radius, bCheck2DOnly,
nCollidingEntities, maxEntitiesToFind, aEntities);
}
if(bObjects) {
CWorld::FindObjectsKindaCollidingSectorList(
FindObjectsKindaCollidingSectorList(
pSector->m_lists[ENTITYLIST_OBJECTS], position, radius, bCheck2DOnly,
nCollidingEntities, maxEntitiesToFind, aEntities);
CWorld::FindObjectsKindaCollidingSectorList(
FindObjectsKindaCollidingSectorList(
pSector->m_lists[ENTITYLIST_OBJECTS_OVERLAP], position, radius, bCheck2DOnly,
nCollidingEntities, maxEntitiesToFind, aEntities);
}
if(bDummies) {
CWorld::FindObjectsKindaCollidingSectorList(
FindObjectsKindaCollidingSectorList(
pSector->m_lists[ENTITYLIST_DUMMIES], position, radius, bCheck2DOnly,
nCollidingEntities, maxEntitiesToFind, aEntities);
CWorld::FindObjectsKindaCollidingSectorList(
FindObjectsKindaCollidingSectorList(
pSector->m_lists[ENTITYLIST_DUMMIES_OVERLAP], position, radius, bCheck2DOnly,
nCollidingEntities, maxEntitiesToFind, aEntities);
}
@ -1133,7 +1133,7 @@ CWorld::FindObjectsIntersectingCube(const CVector &vecStartPos, const CVector &v
int16 maxEntitiesToFind, CEntity **aEntities, bool bBuildings, bool bVehicles,
bool bPeds, bool bObjects, bool bDummies)
{
CWorld::AdvanceCurrentScanCode();
AdvanceCurrentScanCode();
*nIntersecting = 0;
const int32 nStartX = Max(CWorld::GetSectorIndexX(vecStartPos.x), 0);
const int32 nStartY = Max(CWorld::GetSectorIndexY(vecStartPos.y), 0);
@ -1141,44 +1141,44 @@ CWorld::FindObjectsIntersectingCube(const CVector &vecStartPos, const CVector &v
const int32 nEndY = Min(CWorld::GetSectorIndexY(vecEndPos.y), NUMSECTORS_Y - 1);
for(int32 y = nStartY; y <= nEndY; y++) {
for(int32 x = nStartX; x <= nEndX; x++) {
CSector *pSector = CWorld::GetSector(x, y);
CSector *pSector = GetSector(x, y);
if(bBuildings) {
CWorld::FindObjectsIntersectingCubeSectorList(pSector->m_lists[ENTITYLIST_BUILDINGS],
FindObjectsIntersectingCubeSectorList(pSector->m_lists[ENTITYLIST_BUILDINGS],
vecStartPos, vecEndPos, nIntersecting,
maxEntitiesToFind, aEntities);
CWorld::FindObjectsIntersectingCubeSectorList(
FindObjectsIntersectingCubeSectorList(
pSector->m_lists[ENTITYLIST_BUILDINGS_OVERLAP], vecStartPos, vecEndPos,
nIntersecting, maxEntitiesToFind, aEntities);
}
if(bVehicles) {
CWorld::FindObjectsIntersectingCubeSectorList(pSector->m_lists[ENTITYLIST_VEHICLES],
FindObjectsIntersectingCubeSectorList(pSector->m_lists[ENTITYLIST_VEHICLES],
vecStartPos, vecEndPos, nIntersecting,
maxEntitiesToFind, aEntities);
CWorld::FindObjectsIntersectingCubeSectorList(
FindObjectsIntersectingCubeSectorList(
pSector->m_lists[ENTITYLIST_VEHICLES_OVERLAP], vecStartPos, vecEndPos,
nIntersecting, maxEntitiesToFind, aEntities);
}
if(bPeds) {
CWorld::FindObjectsIntersectingCubeSectorList(pSector->m_lists[ENTITYLIST_PEDS],
FindObjectsIntersectingCubeSectorList(pSector->m_lists[ENTITYLIST_PEDS],
vecStartPos, vecEndPos, nIntersecting,
maxEntitiesToFind, aEntities);
CWorld::FindObjectsIntersectingCubeSectorList(pSector->m_lists[ENTITYLIST_PEDS_OVERLAP],
FindObjectsIntersectingCubeSectorList(pSector->m_lists[ENTITYLIST_PEDS_OVERLAP],
vecStartPos, vecEndPos, nIntersecting,
maxEntitiesToFind, aEntities);
}
if(bObjects) {
CWorld::FindObjectsIntersectingCubeSectorList(pSector->m_lists[ENTITYLIST_OBJECTS],
FindObjectsIntersectingCubeSectorList(pSector->m_lists[ENTITYLIST_OBJECTS],
vecStartPos, vecEndPos, nIntersecting,
maxEntitiesToFind, aEntities);
CWorld::FindObjectsIntersectingCubeSectorList(
FindObjectsIntersectingCubeSectorList(
pSector->m_lists[ENTITYLIST_OBJECTS_OVERLAP], vecStartPos, vecEndPos, nIntersecting,
maxEntitiesToFind, aEntities);
}
if(bDummies) {
CWorld::FindObjectsIntersectingCubeSectorList(pSector->m_lists[ENTITYLIST_DUMMIES],
FindObjectsIntersectingCubeSectorList(pSector->m_lists[ENTITYLIST_DUMMIES],
vecStartPos, vecEndPos, nIntersecting,
maxEntitiesToFind, aEntities);
CWorld::FindObjectsIntersectingCubeSectorList(
FindObjectsIntersectingCubeSectorList(
pSector->m_lists[ENTITYLIST_DUMMIES_OVERLAP], vecStartPos, vecEndPos, nIntersecting,
maxEntitiesToFind, aEntities);
}
@ -1214,7 +1214,7 @@ CWorld::FindObjectsIntersectingAngledCollisionBox(const CColBox &boundingBox, co
CEntity **aEntities, bool bBuildings, bool bVehicles, bool bPeds,
bool bObjects, bool bDummies)
{
CWorld::AdvanceCurrentScanCode();
AdvanceCurrentScanCode();
*nEntitiesFound = 0;
const int32 nStartX = Max(CWorld::GetSectorIndexX(fStartX), 0);
const int32 nStartY = Max(CWorld::GetSectorIndexY(fStartY), 0);
@ -1222,44 +1222,44 @@ CWorld::FindObjectsIntersectingAngledCollisionBox(const CColBox &boundingBox, co
const int32 nEndY = Min(CWorld::GetSectorIndexY(fEndY), NUMSECTORS_Y - 1);
for(int32 y = nStartY; y <= nEndY; y++) {
for(int32 x = nStartX; x <= nEndX; x++) {
CSector *pSector = CWorld::GetSector(x, y);
CSector *pSector = GetSector(x, y);
if(bBuildings) {
CWorld::FindObjectsIntersectingAngledCollisionBoxSectorList(
FindObjectsIntersectingAngledCollisionBoxSectorList(
pSector->m_lists[ENTITYLIST_BUILDINGS], boundingBox, matrix, position,
nEntitiesFound, maxEntitiesToFind, aEntities);
CWorld::FindObjectsIntersectingAngledCollisionBoxSectorList(
FindObjectsIntersectingAngledCollisionBoxSectorList(
pSector->m_lists[ENTITYLIST_BUILDINGS_OVERLAP], boundingBox, matrix, position,
nEntitiesFound, maxEntitiesToFind, aEntities);
}
if(bVehicles) {
CWorld::FindObjectsIntersectingAngledCollisionBoxSectorList(
FindObjectsIntersectingAngledCollisionBoxSectorList(
pSector->m_lists[ENTITYLIST_VEHICLES], boundingBox, matrix, position,
nEntitiesFound, maxEntitiesToFind, aEntities);
CWorld::FindObjectsIntersectingAngledCollisionBoxSectorList(
FindObjectsIntersectingAngledCollisionBoxSectorList(
pSector->m_lists[ENTITYLIST_VEHICLES_OVERLAP], boundingBox, matrix, position,
nEntitiesFound, maxEntitiesToFind, aEntities);
}
if(bPeds) {
CWorld::FindObjectsIntersectingAngledCollisionBoxSectorList(
FindObjectsIntersectingAngledCollisionBoxSectorList(
pSector->m_lists[ENTITYLIST_PEDS], boundingBox, matrix, position, nEntitiesFound,
maxEntitiesToFind, aEntities);
CWorld::FindObjectsIntersectingAngledCollisionBoxSectorList(
FindObjectsIntersectingAngledCollisionBoxSectorList(
pSector->m_lists[ENTITYLIST_PEDS_OVERLAP], boundingBox, matrix, position,
nEntitiesFound, maxEntitiesToFind, aEntities);
}
if(bObjects) {
CWorld::FindObjectsIntersectingAngledCollisionBoxSectorList(
FindObjectsIntersectingAngledCollisionBoxSectorList(
pSector->m_lists[ENTITYLIST_OBJECTS], boundingBox, matrix, position, nEntitiesFound,
maxEntitiesToFind, aEntities);
CWorld::FindObjectsIntersectingAngledCollisionBoxSectorList(
FindObjectsIntersectingAngledCollisionBoxSectorList(
pSector->m_lists[ENTITYLIST_OBJECTS_OVERLAP], boundingBox, matrix, position,
nEntitiesFound, maxEntitiesToFind, aEntities);
}
if(bDummies) {
CWorld::FindObjectsIntersectingAngledCollisionBoxSectorList(
FindObjectsIntersectingAngledCollisionBoxSectorList(
pSector->m_lists[ENTITYLIST_DUMMIES], boundingBox, matrix, position, nEntitiesFound,
maxEntitiesToFind, aEntities);
CWorld::FindObjectsIntersectingAngledCollisionBoxSectorList(
FindObjectsIntersectingAngledCollisionBoxSectorList(
pSector->m_lists[ENTITYLIST_DUMMIES_OVERLAP], boundingBox, matrix, position,
nEntitiesFound, maxEntitiesToFind, aEntities);
}
@ -1294,7 +1294,7 @@ CWorld::FindMissionEntitiesIntersectingCube(const CVector &vecStartPos, const CV
int16 maxEntitiesToFind, CEntity **aEntities, bool bVehicles, bool bPeds,
bool bObjects)
{
CWorld::AdvanceCurrentScanCode();
AdvanceCurrentScanCode();
*nIntersecting = 0;
const int32 nStartX = Max(CWorld::GetSectorIndexX(vecStartPos.x), 0);
const int32 nStartY = Max(CWorld::GetSectorIndexY(vecStartPos.y), 0);
@ -1302,28 +1302,28 @@ CWorld::FindMissionEntitiesIntersectingCube(const CVector &vecStartPos, const CV
const int32 nEndY = Min(CWorld::GetSectorIndexY(vecEndPos.y), NUMSECTORS_Y - 1);
for(int32 y = nStartY; y <= nEndY; y++) {
for(int32 x = nStartX; x <= nEndX; x++) {
CSector *pSector = CWorld::GetSector(x, y);
CSector *pSector = GetSector(x, y);
if(bVehicles) {
CWorld::FindMissionEntitiesIntersectingCubeSectorList(
FindMissionEntitiesIntersectingCubeSectorList(
pSector->m_lists[ENTITYLIST_VEHICLES], vecStartPos, vecEndPos, nIntersecting,
maxEntitiesToFind, aEntities, true, false);
CWorld::FindMissionEntitiesIntersectingCubeSectorList(
FindMissionEntitiesIntersectingCubeSectorList(
pSector->m_lists[ENTITYLIST_VEHICLES_OVERLAP], vecStartPos, vecEndPos,
nIntersecting, maxEntitiesToFind, aEntities, true, false);
}
if(bPeds) {
CWorld::FindMissionEntitiesIntersectingCubeSectorList(
FindMissionEntitiesIntersectingCubeSectorList(
pSector->m_lists[ENTITYLIST_PEDS], vecStartPos, vecEndPos, nIntersecting,
maxEntitiesToFind, aEntities, false, true);
CWorld::FindMissionEntitiesIntersectingCubeSectorList(
FindMissionEntitiesIntersectingCubeSectorList(
pSector->m_lists[ENTITYLIST_PEDS_OVERLAP], vecStartPos, vecEndPos, nIntersecting,
maxEntitiesToFind, aEntities, false, true);
}
if(bObjects) {
CWorld::FindMissionEntitiesIntersectingCubeSectorList(
FindMissionEntitiesIntersectingCubeSectorList(
pSector->m_lists[ENTITYLIST_OBJECTS], vecStartPos, vecEndPos, nIntersecting,
maxEntitiesToFind, aEntities, false, false);
CWorld::FindMissionEntitiesIntersectingCubeSectorList(
FindMissionEntitiesIntersectingCubeSectorList(
pSector->m_lists[ENTITYLIST_OBJECTS_OVERLAP], vecStartPos, vecEndPos, nIntersecting,
maxEntitiesToFind, aEntities, false, false);
}
@ -1383,7 +1383,7 @@ CWorld::ClearCarsFromArea(float x1, float y1, float z1, float x2, float y2, floa
}
}
CCarCtrl::RemoveFromInterestingVehicleList(pVehicle);
CWorld::Remove(pVehicle);
Remove(pVehicle);
delete pVehicle;
}
}
@ -1409,7 +1409,7 @@ CWorld::ClearPedsFromArea(float x1, float y1, float z1, float x2, float y2, floa
void
CWorld::CallOffChaseForArea(float x1, float y1, float x2, float y2)
{
CWorld::AdvanceCurrentScanCode();
AdvanceCurrentScanCode();
float fStartX = x1 - 10.0f;
float fStartY = y1 - 10.0f;
float fEndX = x2 + 10.0f;
@ -1420,13 +1420,13 @@ CWorld::CallOffChaseForArea(float x1, float y1, float x2, float y2)
const int32 nEndY = Min(CWorld::GetSectorIndexY(fEndY), NUMSECTORS_Y - 1);
for(int32 y = nStartY; y <= nEndY; y++) {
for(int32 x = nStartX; x <= nEndX; x++) {
CSector *pSector = CWorld::GetSector(x, y);
CWorld::CallOffChaseForAreaSectorListVehicles(pSector->m_lists[ENTITYLIST_VEHICLES], x1, y1, x2,
CSector *pSector = GetSector(x, y);
CallOffChaseForAreaSectorListVehicles(pSector->m_lists[ENTITYLIST_VEHICLES], x1, y1, x2,
y2, fStartX, fStartY, fEndX, fEndY);
CWorld::CallOffChaseForAreaSectorListVehicles(pSector->m_lists[ENTITYLIST_VEHICLES_OVERLAP], x1,
CallOffChaseForAreaSectorListVehicles(pSector->m_lists[ENTITYLIST_VEHICLES_OVERLAP], x1,
y1, x2, y2, fStartX, fStartY, fEndX, fEndY);
CWorld::CallOffChaseForAreaSectorListPeds(pSector->m_lists[ENTITYLIST_PEDS], x1, y1, x2, y2);
CWorld::CallOffChaseForAreaSectorListPeds(pSector->m_lists[ENTITYLIST_PEDS_OVERLAP], x1, y1, x2,
CallOffChaseForAreaSectorListPeds(pSector->m_lists[ENTITYLIST_PEDS], x1, y1, x2, y2);
CallOffChaseForAreaSectorListPeds(pSector->m_lists[ENTITYLIST_PEDS_OVERLAP], x1, y1, x2,
y2);
}
}
@ -1629,27 +1629,27 @@ CWorld::ShutDown(void)
CSector *pSector = GetSector(i % NUMSECTORS_X, i / NUMSECTORS_Y);
for(CPtrNode *pNode = pSector->m_lists[ENTITYLIST_BUILDINGS].first; pNode; pNode = pNode->next) {
CEntity *pEntity = (CEntity *)pNode->item;
CWorld::Remove(pEntity);
Remove(pEntity);
delete pEntity;
}
for(CPtrNode *pNode = pSector->m_lists[ENTITYLIST_VEHICLES].first; pNode; pNode = pNode->next) {
CEntity *pEntity = (CEntity *)pNode->item;
CWorld::Remove(pEntity);
Remove(pEntity);
delete pEntity;
}
for(CPtrNode *pNode = pSector->m_lists[ENTITYLIST_PEDS].first; pNode; pNode = pNode->next) {
CEntity *pEntity = (CEntity *)pNode->item;
CWorld::Remove(pEntity);
Remove(pEntity);
delete pEntity;
}
for(CPtrNode *pNode = pSector->m_lists[ENTITYLIST_OBJECTS].first; pNode; pNode = pNode->next) {
CEntity *pEntity = (CEntity *)pNode->item;
CWorld::Remove(pEntity);
Remove(pEntity);
delete pEntity;
}
for(CPtrNode *pNode = pSector->m_lists[ENTITYLIST_DUMMIES].first; pNode; pNode = pNode->next) {
CEntity *pEntity = (CEntity *)pNode->item;
CWorld::Remove(pEntity);
Remove(pEntity);
delete pEntity;
}
#ifndef FIX_BUGS
@ -1722,19 +1722,19 @@ CWorld::ClearForRestart(void)
CSector *pSector = GetSector(i % NUMSECTORS_X, i / NUMSECTORS_Y);
for(CPtrNode *pNode = pSector->m_lists[ENTITYLIST_PEDS].first; pNode; pNode = pNode->next) {
CEntity *pEntity = (CEntity *)pNode->item;
CWorld::Remove(pEntity);
Remove(pEntity);
delete pEntity;
}
for(CPtrNode *pNode = GetBigBuildingList(LEVEL_GENERIC).first; pNode; pNode = pNode->next) {
CVehicle *pVehicle = (CVehicle *)pNode->item;
if(pVehicle && pVehicle->IsVehicle() && pVehicle->IsPlane()) {
CWorld::Remove(pVehicle);
Remove(pVehicle);
delete pVehicle;
}
}
for(CPtrNode *pNode = pSector->m_lists[ENTITYLIST_VEHICLES].first; pNode; pNode = pNode->next) {
CEntity *pEntity = (CEntity *)pNode->item;
CWorld::Remove(pEntity);
Remove(pEntity);
delete pEntity;
}
}
@ -1765,7 +1765,7 @@ CWorld::RepositionOneObject(CEntity *pEntity)
modelId == MI_PARKTABLE) {
CVector &position = pEntity->GetMatrix().GetPosition();
float fBoundingBoxMinZ = pEntity->GetColModel()->boundingBox.min.z;
position.z = CWorld::FindGroundZFor3DCoord(position.x, position.y,
position.z = FindGroundZFor3DCoord(position.x, position.y,
position.z + OBJECT_REPOSITION_OFFSET_Z, nil) -
fBoundingBoxMinZ;
pEntity->m_matrix.UpdateRW();
@ -1774,7 +1774,7 @@ CWorld::RepositionOneObject(CEntity *pEntity)
float fWaterLevel = 0.0f;
bool bFound = true;
const CVector &position = pEntity->GetPosition();
float fGroundZ = CWorld::FindGroundZFor3DCoord(position.x, position.y,
float fGroundZ = FindGroundZFor3DCoord(position.x, position.y,
position.z + OBJECT_REPOSITION_OFFSET_Z, &bFound);
if(CWaterLevel::GetWaterLevelNoWaves(position.x, position.y, position.z + OBJECT_REPOSITION_OFFSET_Z,
&fWaterLevel)) {
@ -1822,17 +1822,17 @@ CWorld::RemoveStaticObjects()
CSector *pSector = GetSector(i % NUMSECTORS_X, i / NUMSECTORS_Y);
for(CPtrNode *pNode = pSector->m_lists[ENTITYLIST_BUILDINGS].first; pNode; pNode = pNode->next) {
CEntity *pEntity = (CEntity *)pNode->item;
CWorld::Remove(pEntity);
Remove(pEntity);
delete pEntity;
}
for(CPtrNode *pNode = pSector->m_lists[ENTITYLIST_OBJECTS].first; pNode; pNode = pNode->next) {
CEntity *pEntity = (CEntity *)pNode->item;
CWorld::Remove(pEntity);
Remove(pEntity);
delete pEntity;
}
for(CPtrNode *pNode = pSector->m_lists[ENTITYLIST_DUMMIES].first; pNode; pNode = pNode->next) {
CEntity *pEntity = (CEntity *)pNode->item;
CWorld::Remove(pEntity);
Remove(pEntity);
delete pEntity;
}
pSector->m_lists[ENTITYLIST_BUILDINGS].Flush();
@ -2026,12 +2026,12 @@ CWorld::TriggerExplosion(const CVector &position, float fRadius, float fPower, C
const int32 nEndY = Min(CWorld::GetSectorIndexY(vecEndPos.y), NUMSECTORS_Y - 1);
for(int32 y = nStartY; y <= nEndY; y++) {
for(int32 x = nStartX; x <= nEndX; x++) {
CSector *pSector = CWorld::GetSector(x, y);
CWorld::TriggerExplosionSectorList(pSector->m_lists[ENTITYLIST_VEHICLES], position, fRadius,
CSector *pSector = GetSector(x, y);
TriggerExplosionSectorList(pSector->m_lists[ENTITYLIST_VEHICLES], position, fRadius,
fPower, pCreator, bProcessVehicleBombTimer);
CWorld::TriggerExplosionSectorList(pSector->m_lists[ENTITYLIST_PEDS], position, fRadius, fPower,
TriggerExplosionSectorList(pSector->m_lists[ENTITYLIST_PEDS], position, fRadius, fPower,
pCreator, bProcessVehicleBombTimer);
CWorld::TriggerExplosionSectorList(pSector->m_lists[ENTITYLIST_OBJECTS], position, fRadius,
TriggerExplosionSectorList(pSector->m_lists[ENTITYLIST_OBJECTS], position, fRadius,
fPower, pCreator, bProcessVehicleBombTimer);
}
}