mirror of
https://github.com/halpz/re3.git
synced 2025-06-30 09:36:21 +00:00
cleaned up MIAMI ifdefs
This commit is contained in:
@ -187,11 +187,6 @@ CCivilianPed::CivilianAI(void)
|
||||
void
|
||||
CCivilianPed::ProcessControl(void)
|
||||
{
|
||||
#ifndef MIAMI
|
||||
if (m_nZoneLevel > LEVEL_NONE && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
return;
|
||||
#endif
|
||||
|
||||
CPed::ProcessControl();
|
||||
|
||||
if (bWasPostponed)
|
||||
|
@ -425,14 +425,9 @@ CCopPed::CopAI(void)
|
||||
#ifdef VC_PED_PORTS
|
||||
float dotProd;
|
||||
if (m_nRoadblockNode != -1) {
|
||||
#ifndef MIAMI
|
||||
CTreadable *roadBlockRoad = ThePaths.m_mapObjects[CRoadBlocks::RoadBlockObjects[m_nRoadblockNode]];
|
||||
dotProd = DotProduct2D(playerOrHisVeh->GetPosition() - roadBlockRoad->GetPosition(), GetPosition() - roadBlockRoad->GetPosition());
|
||||
#else
|
||||
// TODO: check this, i'm only getting this compile here....
|
||||
// TODO(MIAMI): check this, i'm only getting this compile here....
|
||||
CPathNode *roadBlockNode = &ThePaths.m_pathNodes[CRoadBlocks::RoadBlockNodes[m_nRoadblockNode]];
|
||||
dotProd = DotProduct2D(playerOrHisVeh->GetPosition() - roadBlockNode->GetPosition(), GetPosition() - roadBlockNode->GetPosition());
|
||||
#endif
|
||||
} else
|
||||
dotProd = -1.0f;
|
||||
|
||||
@ -565,11 +560,6 @@ CCopPed::CopAI(void)
|
||||
void
|
||||
CCopPed::ProcessControl(void)
|
||||
{
|
||||
#ifndef MIAMI
|
||||
if (m_nZoneLevel > LEVEL_NONE && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
return;
|
||||
#endif
|
||||
|
||||
CPed::ProcessControl();
|
||||
if (bWasPostponed)
|
||||
return;
|
||||
@ -717,7 +707,7 @@ CCopPed::ProcessControl(void)
|
||||
return;
|
||||
|
||||
bool dontShoot = false;
|
||||
if (GetIsOnScreenAndNotCulled()) {
|
||||
if (GetIsOnScreen()) {
|
||||
if (((CTimer::GetFrameCounter() + m_randomSeed) & 0x1F) == 17) {
|
||||
CEntity *foundBuilding = nil;
|
||||
CColPoint foundCol;
|
||||
|
@ -44,11 +44,6 @@ CEmergencyPed::InRange(CPed *victim)
|
||||
void
|
||||
CEmergencyPed::ProcessControl(void)
|
||||
{
|
||||
#ifndef MIAMI
|
||||
if (m_nZoneLevel > LEVEL_NONE && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
return;
|
||||
#endif
|
||||
|
||||
CPed::ProcessControl();
|
||||
if (bWasPostponed)
|
||||
return;
|
||||
|
@ -9397,11 +9397,6 @@ CPed::ProcessControl(void)
|
||||
CColPoint foundCol;
|
||||
CEntity *foundEnt = nil;
|
||||
|
||||
#ifndef MIAMI
|
||||
if (m_nZoneLevel > LEVEL_NONE && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
return;
|
||||
#endif
|
||||
|
||||
int alpha = CVisibilityPlugins::GetClumpAlpha(GetClump());
|
||||
if (!bFadeOut) {
|
||||
if (alpha < 255) {
|
||||
|
@ -858,90 +858,6 @@ CPopulation::AddPedInCar(CVehicle* car)
|
||||
void
|
||||
CPopulation::MoveCarsAndPedsOutOfAbandonedZones()
|
||||
{
|
||||
#ifndef MIAMI
|
||||
eLevelName level;
|
||||
int zone;
|
||||
int frame = CTimer::GetFrameCounter() & 7;
|
||||
if (frame == 1) {
|
||||
int movedVehicleCount = 0;
|
||||
int poolSize = CPools::GetVehiclePool()->GetSize();
|
||||
for (int poolIndex = poolSize - 1; poolIndex >= 0; poolIndex--) {
|
||||
|
||||
CVehicle* veh = CPools::GetVehiclePool()->GetSlot(poolIndex);
|
||||
if (veh && veh->m_nZoneLevel == LEVEL_NONE && veh->IsCar()) {
|
||||
|
||||
if(veh->GetStatus() != STATUS_ABANDONED && veh->GetStatus() != STATUS_WRECKED && veh->GetStatus() != STATUS_PLAYER &&
|
||||
veh->GetStatus() != STATUS_PLAYER_REMOTE) {
|
||||
|
||||
CVector vehPos(veh->GetPosition());
|
||||
CPopulation::FindCollisionZoneForCoors(&vehPos, &zone, &level);
|
||||
|
||||
// Level 0 is transition zones, and we don't wanna touch cars on transition zones.
|
||||
if (level != LEVEL_NONE && level != CCollision::ms_collisionInMemory && vehPos.z > -4.0f) {
|
||||
if (veh->bIsLocked || !veh->CanBeDeleted()) {
|
||||
switch (movedVehicleCount & 3) {
|
||||
case 0:
|
||||
veh->SetPosition(RegenerationPoint_a);
|
||||
break;
|
||||
case 1:
|
||||
veh->SetPosition(RegenerationPoint_b);
|
||||
break;
|
||||
case 2:
|
||||
veh->SetPosition(RegenerationPoint_a.x, RegenerationPoint_b.y, RegenerationPoint_a.z);
|
||||
break;
|
||||
case 3:
|
||||
veh->SetPosition(RegenerationPoint_b.x, RegenerationPoint_a.y, RegenerationPoint_a.z);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
veh->GetMatrix().GetPosition().z += (movedVehicleCount / 4) * 7.0f;
|
||||
veh->GetMatrix().GetForward() = RegenerationForward;
|
||||
((CAutomobile*)veh)->PlaceOnRoadProperly();
|
||||
CCarCtrl::JoinCarWithRoadSystem(veh);
|
||||
CTheScripts::ClearSpaceForMissionEntity(veh->GetPosition(), veh);
|
||||
++movedVehicleCount;
|
||||
} else {
|
||||
CWorld::Remove(veh);
|
||||
delete veh;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (frame == 5) {
|
||||
int poolSize = CPools::GetPedPool()->GetSize();
|
||||
for (int poolIndex = poolSize - 1; poolIndex >= 0; poolIndex--) {
|
||||
|
||||
CPed *ped = CPools::GetPedPool()->GetSlot(poolIndex);
|
||||
if (ped && ped->m_nZoneLevel == LEVEL_NONE && !ped->bInVehicle) {
|
||||
|
||||
CVector pedPos(ped->GetPosition());
|
||||
CPopulation::FindCollisionZoneForCoors(&pedPos, &zone, &level);
|
||||
|
||||
// Level 0 is transition zones, and we don't wanna touch peds on transition zones.
|
||||
if (level != LEVEL_NONE && level != CCollision::ms_collisionInMemory && pedPos.z > -4.0f) {
|
||||
if (ped->CanBeDeleted()) {
|
||||
CWorld::Remove(ped);
|
||||
delete ped;
|
||||
} else if (ped->m_nPedType != PEDTYPE_PLAYER1 && ped->m_nPedType != PEDTYPE_PLAYER2) {
|
||||
ped->SetPosition(RegenerationPoint_a);
|
||||
|
||||
bool foundGround;
|
||||
float groundZ = CWorld::FindGroundZFor3DCoord(ped->GetPosition().x, ped->GetPosition().y,
|
||||
ped->GetPosition().z + 2.0f, &foundGround);
|
||||
|
||||
if (foundGround) {
|
||||
ped->GetMatrix().GetPosition().z = 1.0f + groundZ;
|
||||
//ped->GetPosition().z += 0.0f;
|
||||
CTheScripts::ClearSpaceForMissionEntity(ped->GetPosition(), ped);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user