mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-22 17:19:15 +01:00
Rename LEVEL_NONE to LEVEL_GENERIC
This commit is contained in:
parent
6eb8f6ae5a
commit
841fa5155c
@ -121,8 +121,8 @@ CGameLogic::Update()
|
||||
CCarCtrl::ClearInterestingVehicleList();
|
||||
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
|
||||
CRestart::FindClosestHospitalRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
|
||||
CRestart::OverrideHospitalLevel = LEVEL_NONE;
|
||||
CRestart::OverridePoliceStationLevel = LEVEL_NONE;
|
||||
CRestart::OverrideHospitalLevel = LEVEL_GENERIC;
|
||||
CRestart::OverridePoliceStationLevel = LEVEL_GENERIC;
|
||||
PassTime(720);
|
||||
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
|
||||
SortOutStreamingAndMemory(pPlayerInfo.GetPos());
|
||||
@ -200,8 +200,8 @@ CGameLogic::Update()
|
||||
CCarCtrl::ClearInterestingVehicleList();
|
||||
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
|
||||
CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
|
||||
CRestart::OverrideHospitalLevel = LEVEL_NONE;
|
||||
CRestart::OverridePoliceStationLevel = LEVEL_NONE;
|
||||
CRestart::OverrideHospitalLevel = LEVEL_GENERIC;
|
||||
CRestart::OverridePoliceStationLevel = LEVEL_GENERIC;
|
||||
PassTime(720);
|
||||
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
|
||||
pPlayerInfo.m_pPed->ClearWeapons();
|
||||
@ -249,8 +249,8 @@ CGameLogic::Update()
|
||||
CCarCtrl::ClearInterestingVehicleList();
|
||||
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
|
||||
CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
|
||||
CRestart::OverridePoliceStationLevel = LEVEL_NONE;
|
||||
CRestart::OverrideHospitalLevel = LEVEL_NONE;
|
||||
CRestart::OverridePoliceStationLevel = LEVEL_GENERIC;
|
||||
CRestart::OverrideHospitalLevel = LEVEL_GENERIC;
|
||||
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
|
||||
SortOutStreamingAndMemory(pPlayerInfo.GetPos());
|
||||
TheCamera.m_fCamShakeForce = 0.0f;
|
||||
|
@ -426,8 +426,8 @@ void RemoveUnusedCollision(void)
|
||||
"com_rvroads52", "com_roadsrv", "com_roadkb23", "com_roadkb22"
|
||||
};
|
||||
for (int i = 0; i < ARRAY_SIZE(dontDeleteArray); i++)
|
||||
CModelInfo::GetModelInfo(dontDeleteArray[i], nil)->GetColModel()->level = LEVEL_NONE;
|
||||
CModelInfo::RemoveColModelsFromOtherLevels(LEVEL_NONE);
|
||||
CModelInfo::GetModelInfo(dontDeleteArray[i], nil)->GetColModel()->level = LEVEL_GENERIC;
|
||||
CModelInfo::RemoveColModelsFromOtherLevels(LEVEL_GENERIC);
|
||||
for (int i = 0; i < ARRAY_SIZE(dontDeleteArray); i++)
|
||||
CModelInfo::GetModelInfo(dontDeleteArray[i], nil)->GetColModel()->level = LEVEL_COMMERCIAL;
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ static void ApplyPanelDamageToCar(uint32 panels, CAutomobile* vehicle, bool flyi
|
||||
|
||||
void PrintElementsInPtrList(void)
|
||||
{
|
||||
for (CPtrNode* node = CWorld::GetBigBuildingList(LEVEL_NONE).first; node; node = node->next) {
|
||||
for (CPtrNode* node = CWorld::GetBigBuildingList(LEVEL_GENERIC).first; node; node = node->next) {
|
||||
/* Most likely debug print was present here */
|
||||
}
|
||||
}
|
||||
@ -1124,7 +1124,7 @@ void CReplay::StoreStuffInMem(void)
|
||||
pWorld1 = new uint8[sizeof(CSector) * NUMSECTORS_X * NUMSECTORS_Y];
|
||||
memcpy(pWorld1, CWorld::GetSector(0, 0), NUMSECTORS_X * NUMSECTORS_Y * sizeof(CSector));
|
||||
WorldPtrList = CWorld::GetMovingEntityList().first; // why
|
||||
BigBuildingPtrList = CWorld::GetBigBuildingList(LEVEL_NONE).first;
|
||||
BigBuildingPtrList = CWorld::GetBigBuildingList(LEVEL_GENERIC).first;
|
||||
pPickups = new uint8[sizeof(CPickup) * NUMPICKUPS];
|
||||
memcpy(pPickups, CPickups::aPickUps, NUMPICKUPS * sizeof(CPickup));
|
||||
pReferences = new uint8[(sizeof(CReference) * NUMREFERENCES)];
|
||||
@ -1170,7 +1170,7 @@ void CReplay::RestoreStuffFromMem(void)
|
||||
delete[] pWorld1;
|
||||
pWorld1 = nil;
|
||||
CWorld::GetMovingEntityList().first = WorldPtrList;
|
||||
CWorld::GetBigBuildingList(LEVEL_NONE).first = BigBuildingPtrList;
|
||||
CWorld::GetBigBuildingList(LEVEL_GENERIC).first = BigBuildingPtrList;
|
||||
memcpy(CPickups::aPickUps, pPickups, sizeof(CPickup) * NUMPICKUPS);
|
||||
delete[] pPickups;
|
||||
pPickups = nil;
|
||||
|
@ -24,8 +24,8 @@ uint16 CRestart::NumberOfPoliceRestarts;
|
||||
void
|
||||
CRestart::Initialise()
|
||||
{
|
||||
OverridePoliceStationLevel = LEVEL_NONE;
|
||||
OverrideHospitalLevel = LEVEL_NONE;
|
||||
OverridePoliceStationLevel = LEVEL_GENERIC;
|
||||
OverrideHospitalLevel = LEVEL_GENERIC;
|
||||
bFadeInAfterNextArrest = true;
|
||||
bFadeInAfterNextDeath = true;
|
||||
OverrideHeading = 0.0f;
|
||||
@ -86,7 +86,7 @@ CRestart::FindClosestHospitalRestartPoint(const CVector &pos, CVector *outPos, f
|
||||
|
||||
// find closest point on this level
|
||||
for (int i = 0; i < NumberOfHospitalRestarts; i++) {
|
||||
if (CTheZones::FindZoneForPoint(HospitalRestartPoints[i]) == (OverrideHospitalLevel != LEVEL_NONE ? OverrideHospitalLevel : curlevel)) {
|
||||
if (CTheZones::FindZoneForPoint(HospitalRestartPoints[i]) == (OverrideHospitalLevel != LEVEL_GENERIC ? OverrideHospitalLevel : curlevel)) {
|
||||
float dist = (pos - HospitalRestartPoints[i]).MagnitudeSqr();
|
||||
if (fMinDist >= dist) {
|
||||
fMinDist = dist;
|
||||
@ -133,7 +133,7 @@ CRestart::FindClosestPoliceRestartPoint(const CVector &pos, CVector *outPos, flo
|
||||
|
||||
// find closest point on this level
|
||||
for (int i = 0; i < NumberOfPoliceRestarts; i++) {
|
||||
if (CTheZones::FindZoneForPoint(PoliceRestartPoints[i]) == (OverridePoliceStationLevel != LEVEL_NONE ? OverridePoliceStationLevel : curlevel)) {
|
||||
if (CTheZones::FindZoneForPoint(PoliceRestartPoints[i]) == (OverridePoliceStationLevel != LEVEL_GENERIC ? OverridePoliceStationLevel : curlevel)) {
|
||||
float dist = (pos - PoliceRestartPoints[i]).MagnitudeSqr();
|
||||
if (fMinDist >= dist) {
|
||||
fMinDist = dist;
|
||||
|
@ -8708,7 +8708,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
|
||||
CEntity* apEntities[16];
|
||||
CWorld::FindObjectsOfTypeInRange(mi, pos, range, true, &total, 16, apEntities, true, false, false, true, true);
|
||||
if (total == 0)
|
||||
CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(LEVEL_NONE), pos, range, true, &total, 16, apEntities);
|
||||
CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(LEVEL_GENERIC), pos, range, true, &total, 16, apEntities);
|
||||
if (total == 0)
|
||||
CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(CTheZones::FindZoneForPoint(pos)), pos, range, true, &total, 16, apEntities);
|
||||
CEntity* pClosestEntity = nil;
|
||||
@ -9460,7 +9460,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
|
||||
CEntity* apEntities[16];
|
||||
CWorld::FindObjectsOfTypeInRange(mi1, pos, radius, true, &total, 16, apEntities, true, false, false, false, false);
|
||||
if (total == 0)
|
||||
CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(LEVEL_NONE), pos, radius, true, &total, 16, apEntities);
|
||||
CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(LEVEL_GENERIC), pos, radius, true, &total, 16, apEntities);
|
||||
if (total == 0)
|
||||
CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(CTheZones::FindZoneForPoint(pos)), pos, radius, true, &total, 16, apEntities);
|
||||
CEntity* pClosestEntity = nil;
|
||||
@ -10062,7 +10062,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
|
||||
if (ScriptParams[1])
|
||||
pVehicle->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pVehicle->GetPosition());
|
||||
else
|
||||
pVehicle->m_nZoneLevel = LEVEL_NONE;
|
||||
pVehicle->m_nZoneLevel = LEVEL_GENERIC;
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_SET_CHAR_STAYS_IN_CURRENT_LEVEL:
|
||||
@ -10073,7 +10073,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
|
||||
if (ScriptParams[1])
|
||||
pPed->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pPed->GetPosition());
|
||||
else
|
||||
pPed->m_nZoneLevel = LEVEL_NONE;
|
||||
pPed->m_nZoneLevel = LEVEL_GENERIC;
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_REGISTER_4X4_ONE_TIME:
|
||||
|
@ -38,7 +38,7 @@ void
|
||||
CCollision::Init(void)
|
||||
{
|
||||
ms_colModelCache.Init(NUMCOLCACHELINKS);
|
||||
ms_collisionInMemory = LEVEL_NONE;
|
||||
ms_collisionInMemory = LEVEL_GENERIC;
|
||||
}
|
||||
|
||||
void
|
||||
@ -59,7 +59,7 @@ CCollision::Update(void)
|
||||
return;
|
||||
|
||||
// hardcode a level if there are no zones
|
||||
if(level == LEVEL_NONE){
|
||||
if(level == LEVEL_GENERIC){
|
||||
if(CGame::currLevel == LEVEL_INDUSTRIAL &&
|
||||
playerCoors.x < 400.0f){
|
||||
level = LEVEL_COMMERCIAL;
|
||||
@ -78,7 +78,7 @@ CCollision::Update(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
if(level != LEVEL_NONE && level != CGame::currLevel)
|
||||
if(level != LEVEL_GENERIC && level != CGame::currLevel)
|
||||
CGame::currLevel = level;
|
||||
if(ms_collisionInMemory != CGame::currLevel)
|
||||
LoadCollisionWhenINeedIt(forceLevelChange);
|
||||
@ -95,10 +95,10 @@ GetCollisionInSectorList(CPtrList &list)
|
||||
for(node = list.first; node; node = node->next){
|
||||
e = (CEntity*)node->item;
|
||||
level = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel()->level;
|
||||
if(level != LEVEL_NONE)
|
||||
if(level != LEVEL_GENERIC)
|
||||
return (eLevelName)level;
|
||||
}
|
||||
return LEVEL_NONE;
|
||||
return LEVEL_GENERIC;
|
||||
}
|
||||
|
||||
// Get a level this sector is in based on collision models
|
||||
@ -108,15 +108,15 @@ GetCollisionInSector(CSector §)
|
||||
int level;
|
||||
|
||||
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_BUILDINGS]);
|
||||
if(level == LEVEL_NONE)
|
||||
if(level == LEVEL_GENERIC)
|
||||
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_BUILDINGS_OVERLAP]);
|
||||
if(level == LEVEL_NONE)
|
||||
if(level == LEVEL_GENERIC)
|
||||
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_OBJECTS]);
|
||||
if(level == LEVEL_NONE)
|
||||
if(level == LEVEL_GENERIC)
|
||||
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_OBJECTS_OVERLAP]);
|
||||
if(level == LEVEL_NONE)
|
||||
if(level == LEVEL_GENERIC)
|
||||
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_DUMMIES]);
|
||||
if(level == LEVEL_NONE)
|
||||
if(level == LEVEL_GENERIC)
|
||||
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_DUMMIES_OVERLAP]);
|
||||
return (eLevelName)level;
|
||||
}
|
||||
@ -133,7 +133,7 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
||||
int xmin, xmax, ymin, ymax;
|
||||
int x, y;
|
||||
|
||||
level = LEVEL_NONE;
|
||||
level = LEVEL_GENERIC;
|
||||
|
||||
playerCoors = FindPlayerCoors();
|
||||
sx = CWorld::GetSectorIndexX(playerCoors.x);
|
||||
@ -161,8 +161,8 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
||||
for(x = xmin; x <= xmax; x++)
|
||||
for(y = ymin; y <= ymax; y++){
|
||||
l = GetCollisionInSector(*CWorld::GetSector(x, y));
|
||||
if(l != LEVEL_NONE){
|
||||
if(level == LEVEL_NONE)
|
||||
if(l != LEVEL_GENERIC){
|
||||
if(level == LEVEL_GENERIC)
|
||||
level = l;
|
||||
if(level != l)
|
||||
multipleLevels = true;
|
||||
@ -173,7 +173,7 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
||||
if(multipleLevels && veh && veh->IsBoat())
|
||||
for(ei = veh->m_entryInfoList.first; ei; ei = ei->next){
|
||||
level = GetCollisionInSector(*ei->sector);
|
||||
if(level != LEVEL_NONE)
|
||||
if(level != LEVEL_GENERIC)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -205,7 +205,7 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
||||
ms_collisionInMemory = CGame::currLevel;
|
||||
CReplay::EmptyReplayBuffer();
|
||||
#ifndef NO_ISLAND_LOADING
|
||||
if(CGame::currLevel != LEVEL_NONE)
|
||||
if(CGame::currLevel != LEVEL_GENERIC)
|
||||
LoadSplash(GetLevelSplashScreen(CGame::currLevel));
|
||||
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
||||
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
||||
@ -232,7 +232,7 @@ CCollision::SortOutCollisionAfterLoad(void)
|
||||
#ifndef NO_ISLAND_LOADING
|
||||
CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
|
||||
#endif
|
||||
if (CGame::currLevel != LEVEL_NONE) {
|
||||
if (CGame::currLevel != LEVEL_GENERIC) {
|
||||
#ifdef NO_ISLAND_LOADING
|
||||
static bool bAlreadyLoaded = false;
|
||||
if (bAlreadyLoaded) {
|
||||
|
@ -357,7 +357,7 @@ bool CGame::Initialise(const char* datFile)
|
||||
CStreaming::Init();
|
||||
CStreaming::LoadInitialVehicles();
|
||||
CStreaming::LoadInitialPeds();
|
||||
CStreaming::RequestBigBuildings(LEVEL_NONE);
|
||||
CStreaming::RequestBigBuildings(LEVEL_GENERIC);
|
||||
CStreaming::LoadAllRequestedModels(false);
|
||||
printf("Streaming uses %dK of its memory", CStreaming::ms_memoryUsed / 1024);
|
||||
LoadingScreen("Loading the Game", "Load animations", GetRandomSplashScreen());
|
||||
@ -511,7 +511,7 @@ void CGame::ReInitGameObjectVariables(void)
|
||||
CTimeCycle::Initialise();
|
||||
CDraw::SetFOV(120.0f);
|
||||
CDraw::ms_fLODDistance = 500.0f;
|
||||
CStreaming::RequestBigBuildings(LEVEL_NONE);
|
||||
CStreaming::RequestBigBuildings(LEVEL_GENERIC);
|
||||
CStreaming::LoadAllRequestedModels(false);
|
||||
CPed::Initialise();
|
||||
CEventList::Initialise();
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
enum eLevelName {
|
||||
LEVEL_IGNORE = -1, // beware, this is only used in CPhysical's m_nZoneLevel
|
||||
LEVEL_NONE = 0,
|
||||
LEVEL_GENERIC = 0,
|
||||
LEVEL_INDUSTRIAL,
|
||||
LEVEL_COMMERCIAL,
|
||||
LEVEL_SUBURBAN
|
||||
|
@ -553,7 +553,7 @@ CPlayerInfo::Process(void)
|
||||
veh->m_nZoneLevel = LEVEL_IGNORE;
|
||||
for (int i = 0; i < ARRAY_SIZE(veh->pPassengers); i++) {
|
||||
if (veh->pPassengers[i])
|
||||
veh->pPassengers[i]->m_nZoneLevel = LEVEL_NONE;
|
||||
veh->pPassengers[i]->m_nZoneLevel = LEVEL_GENERIC;
|
||||
}
|
||||
CStats::DistanceTravelledInVehicle += veh->m_fDistanceTravelled;
|
||||
} else {
|
||||
|
@ -36,19 +36,19 @@ CTempColModels::Initialise(void)
|
||||
#define SET_COLMODEL_SPHERES(colmodel, sphrs)\
|
||||
colmodel.numSpheres = ARRAY_SIZE(sphrs);\
|
||||
colmodel.spheres = sphrs;\
|
||||
colmodel.level = LEVEL_NONE;\
|
||||
colmodel.level = LEVEL_GENERIC;\
|
||||
colmodel.ownsCollisionVolumes = false;\
|
||||
|
||||
int i;
|
||||
|
||||
ms_colModelBBox.boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f), SURFACE_DEFAULT, 0);
|
||||
ms_colModelBBox.boundingBox.Set(CVector(-2.0f, -2.0f, -2.0f), CVector(2.0f, 2.0f, 2.0f), SURFACE_DEFAULT, 0);
|
||||
ms_colModelBBox.level = LEVEL_NONE;
|
||||
ms_colModelBBox.level = LEVEL_GENERIC;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ms_colModelCutObj); i++) {
|
||||
ms_colModelCutObj[i].boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f), SURFACE_DEFAULT, 0);
|
||||
ms_colModelCutObj[i].boundingBox.Set(CVector(-2.0f, -2.0f, -2.0f), CVector(2.0f, 2.0f, 2.0f), SURFACE_DEFAULT, 0);
|
||||
ms_colModelCutObj[i].level = LEVEL_NONE;
|
||||
ms_colModelCutObj[i].level = LEVEL_GENERIC;
|
||||
}
|
||||
|
||||
// Ped Spheres
|
||||
|
@ -1797,7 +1797,7 @@ CWorld::ClearForRestart(void)
|
||||
CWorld::Remove(pEntity);
|
||||
delete pEntity;
|
||||
}
|
||||
for(CPtrNode *pNode = GetBigBuildingList(LEVEL_NONE).first; pNode; pNode = pNode->next) {
|
||||
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);
|
||||
|
@ -90,7 +90,7 @@ CTheZones::Init(void)
|
||||
TotalNumberOfZoneInfos = 1; // why 1?
|
||||
TotalNumberOfZones = 1;
|
||||
|
||||
m_CurrLevel = LEVEL_NONE;
|
||||
m_CurrLevel = LEVEL_GENERIC;
|
||||
m_pPlayersZone = &ZoneArray[0];
|
||||
|
||||
strcpy(ZoneArray[0].name, "CITYZON");
|
||||
@ -100,7 +100,7 @@ CTheZones::Init(void)
|
||||
ZoneArray[0].maxx = 4000.0f;
|
||||
ZoneArray[0].maxy = 4000.0f;
|
||||
ZoneArray[0].maxz = 500.0f;
|
||||
ZoneArray[0].level = LEVEL_NONE;
|
||||
ZoneArray[0].level = LEVEL_GENERIC;
|
||||
|
||||
for(i = 0; i < NUMMAPZONES; i++){
|
||||
memset(&MapZoneArray[i], 0, sizeof(CZone));
|
||||
@ -116,7 +116,7 @@ CTheZones::Init(void)
|
||||
MapZoneArray[0].maxx = 4000.0f;
|
||||
MapZoneArray[0].maxy = 4000.0f;
|
||||
MapZoneArray[0].maxz = 500.0f;
|
||||
MapZoneArray[0].level = LEVEL_NONE;
|
||||
MapZoneArray[0].level = LEVEL_GENERIC;
|
||||
}
|
||||
|
||||
void
|
||||
@ -577,7 +577,7 @@ CTheZones::FindZoneForPoint(const CVector &pos)
|
||||
return LEVEL_COMMERCIAL;
|
||||
if(PointLiesWithinZone(&pos, GetZone(FindZoneByLabelAndReturnIndex("SUB_ZON"))))
|
||||
return LEVEL_SUBURBAN;
|
||||
return LEVEL_NONE;
|
||||
return LEVEL_GENERIC;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -17,6 +17,6 @@ CBuilding::ReplaceWithNewModel(int32 id)
|
||||
m_modelIndex = id;
|
||||
|
||||
if(bIsBIGBuilding)
|
||||
if(m_level == LEVEL_NONE || m_level == CGame::currLevel)
|
||||
if(m_level == LEVEL_GENERIC || m_level == CGame::currLevel)
|
||||
CStreaming::RequestModel(id, STREAMFLAGS_DONT_REMOVE);
|
||||
}
|
||||
|
@ -332,14 +332,14 @@ CEntity::SetupBigBuilding(void)
|
||||
bStreamingDontDelete = true;
|
||||
bUsesCollision = false;
|
||||
m_level = CTheZones::GetLevelFromPosition(&GetPosition());
|
||||
if(m_level == LEVEL_NONE){
|
||||
if(m_level == LEVEL_GENERIC){
|
||||
if(mi->GetTxdSlot() != CTxdStore::FindTxdSlot("generic")){
|
||||
mi->SetTexDictionary("generic");
|
||||
printf("%d:%s txd has been set to generic\n", m_modelIndex, mi->GetName());
|
||||
}
|
||||
}
|
||||
if(mi->m_lodDistances[0] > 2000.0f)
|
||||
m_level = LEVEL_NONE;
|
||||
m_level = LEVEL_GENERIC;
|
||||
}
|
||||
|
||||
CRect
|
||||
|
@ -70,7 +70,7 @@ CPhysical::CPhysical(void)
|
||||
#ifdef FIX_BUGS
|
||||
m_nSurfaceTouched = SURFACE_DEFAULT;
|
||||
#endif
|
||||
m_nZoneLevel = LEVEL_NONE;
|
||||
m_nZoneLevel = LEVEL_GENERIC;
|
||||
}
|
||||
|
||||
CPhysical::~CPhysical(void)
|
||||
|
@ -226,7 +226,7 @@ CModelInfo::RemoveColModelsFromOtherLevels(eLevelName level)
|
||||
mi = GetModelInfo(i);
|
||||
if(mi){
|
||||
colmodel = mi->GetColModel();
|
||||
if(colmodel && colmodel->level != LEVEL_NONE && colmodel->level != level)
|
||||
if(colmodel && colmodel->level != LEVEL_GENERIC && colmodel->level != level)
|
||||
colmodel->RemoveCollisionVolumes();
|
||||
}
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ CPedModelInfo::CreateHitColModel(void)
|
||||
max.x = max.y = 0.5f;
|
||||
max.z = 1.2f;
|
||||
colmodel->boundingBox.Set(min, max, 0, 0);
|
||||
colmodel->level = LEVEL_NONE;
|
||||
colmodel->level = LEVEL_GENERIC;
|
||||
m_hitColModel = colmodel;
|
||||
}
|
||||
|
||||
@ -349,7 +349,7 @@ CPedModelInfo::CreateHitColModelSkinned(RpClump *clump)
|
||||
max.x = max.y = 0.5f;
|
||||
max.z = 1.2f;
|
||||
colmodel->boundingBox.Set(min, max, 0, 0);
|
||||
colmodel->level = LEVEL_NONE;
|
||||
colmodel->level = LEVEL_GENERIC;
|
||||
m_hitColModel = colmodel;
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ CCivilianPed::CivilianAI(void)
|
||||
void
|
||||
CCivilianPed::ProcessControl(void)
|
||||
{
|
||||
if (m_nZoneLevel > LEVEL_NONE && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
if (m_nZoneLevel > LEVEL_GENERIC && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
return;
|
||||
|
||||
CPed::ProcessControl();
|
||||
|
@ -559,7 +559,7 @@ CCopPed::CopAI(void)
|
||||
void
|
||||
CCopPed::ProcessControl(void)
|
||||
{
|
||||
if (m_nZoneLevel > LEVEL_NONE && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
if (m_nZoneLevel > LEVEL_GENERIC && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
return;
|
||||
|
||||
CPed::ProcessControl();
|
||||
|
@ -44,7 +44,7 @@ CEmergencyPed::InRange(CPed *victim)
|
||||
void
|
||||
CEmergencyPed::ProcessControl(void)
|
||||
{
|
||||
if (m_nZoneLevel > LEVEL_NONE && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
if (m_nZoneLevel > LEVEL_GENERIC && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
return;
|
||||
|
||||
CPed::ProcessControl();
|
||||
|
@ -9177,7 +9177,7 @@ CPed::ProcessControl(void)
|
||||
CColPoint foundCol;
|
||||
CEntity *foundEnt = nil;
|
||||
|
||||
if (m_nZoneLevel > LEVEL_NONE && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
if (m_nZoneLevel > LEVEL_GENERIC && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
return;
|
||||
|
||||
int alpha = CVisibilityPlugins::GetClumpAlpha(GetClump());
|
||||
|
@ -394,7 +394,7 @@ CPopulation::FindCollisionZoneForCoors(CVector *coors, int *safeZoneOut, eLevelN
|
||||
}
|
||||
// Then it's transition area
|
||||
if (*safeZoneOut >= 0)
|
||||
*levelOut = LEVEL_NONE;
|
||||
*levelOut = LEVEL_GENERIC;
|
||||
else
|
||||
*levelOut = CTheZones::GetLevelFromPosition(coors);
|
||||
}
|
||||
@ -867,7 +867,7 @@ CPopulation::MoveCarsAndPedsOutOfAbandonedZones()
|
||||
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 && veh->m_nZoneLevel == LEVEL_GENERIC && veh->IsCar()) {
|
||||
|
||||
if(veh->GetStatus() != STATUS_ABANDONED && veh->GetStatus() != STATUS_WRECKED && veh->GetStatus() != STATUS_PLAYER &&
|
||||
veh->GetStatus() != STATUS_PLAYER_REMOTE) {
|
||||
@ -876,7 +876,7 @@ CPopulation::MoveCarsAndPedsOutOfAbandonedZones()
|
||||
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 (level != LEVEL_GENERIC && level != CCollision::ms_collisionInMemory && vehPos.z > -4.0f) {
|
||||
if (veh->bIsLocked || !veh->CanBeDeleted()) {
|
||||
switch (movedVehicleCount & 3) {
|
||||
case 0:
|
||||
@ -913,13 +913,13 @@ CPopulation::MoveCarsAndPedsOutOfAbandonedZones()
|
||||
for (int poolIndex = poolSize - 1; poolIndex >= 0; poolIndex--) {
|
||||
|
||||
CPed *ped = CPools::GetPedPool()->GetSlot(poolIndex);
|
||||
if (ped && ped->m_nZoneLevel == LEVEL_NONE && !ped->bInVehicle) {
|
||||
if (ped && ped->m_nZoneLevel == LEVEL_GENERIC && !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 (level != LEVEL_GENERIC && level != CCollision::ms_collisionInMemory && pedPos.z > -4.0f) {
|
||||
if (ped->CanBeDeleted()) {
|
||||
CWorld::Remove(ped);
|
||||
delete ped;
|
||||
|
@ -706,11 +706,11 @@ CRenderer::ScanWorld(void)
|
||||
ScanBigBuildingList(CWorld::GetBigBuildingList(LEVEL_SUBURBAN));
|
||||
#else
|
||||
#ifdef FIX_BUGS
|
||||
if (CCollision::ms_collisionInMemory != LEVEL_NONE)
|
||||
if (CCollision::ms_collisionInMemory != LEVEL_GENERIC)
|
||||
#endif
|
||||
ScanBigBuildingList(CWorld::GetBigBuildingList(CCollision::ms_collisionInMemory));
|
||||
#endif
|
||||
ScanBigBuildingList(CWorld::GetBigBuildingList(LEVEL_NONE));
|
||||
ScanBigBuildingList(CWorld::GetBigBuildingList(LEVEL_GENERIC));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -489,7 +489,7 @@ CheckDataNotCorrupt(int32 slot, char *name)
|
||||
char filename[100];
|
||||
|
||||
int32 blocknum = 0;
|
||||
eLevelName level = LEVEL_NONE;
|
||||
eLevelName level = LEVEL_GENERIC;
|
||||
CheckSum = 0;
|
||||
uint32 bytes_processed = 0;
|
||||
sprintf(filename, "%s%i%s", DefaultPCSaveFileName, slot + 1, ".b");
|
||||
|
@ -230,7 +230,7 @@ CAutomobile::ProcessControl(void)
|
||||
bWarnedPeds = false;
|
||||
|
||||
// skip if the collision isn't for the current level
|
||||
if(colModel->level > LEVEL_NONE && colModel->level != CCollision::ms_collisionInMemory)
|
||||
if(colModel->level > LEVEL_GENERIC && colModel->level != CCollision::ms_collisionInMemory)
|
||||
return;
|
||||
|
||||
// Improve grip of vehicles in certain cases
|
||||
|
@ -109,7 +109,7 @@ CBoat::GetComponentWorldPosition(int32 component, CVector &pos)
|
||||
void
|
||||
CBoat::ProcessControl(void)
|
||||
{
|
||||
if(m_nZoneLevel > LEVEL_NONE && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
if(m_nZoneLevel > LEVEL_GENERIC && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||
return;
|
||||
|
||||
bool onLand = m_fDamageImpulse > 0.0f && m_vecDamageNormal.z > 0.1f;
|
||||
|
@ -83,7 +83,7 @@ CPlane::CPlane(int32 id, uint8 CreatedBy)
|
||||
|
||||
SetStatus(STATUS_PLANE);
|
||||
bIsBIGBuilding = true;
|
||||
m_level = LEVEL_NONE;
|
||||
m_level = LEVEL_GENERIC;
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
m_isFarAway = true;
|
||||
|
Loading…
Reference in New Issue
Block a user