1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 16:40:01 +00:00

ConstructMloClumps

This commit is contained in:
Sergeanur 2020-01-21 09:47:24 +02:00
parent 06904755d9
commit 77515f04e0
4 changed files with 13 additions and 6 deletions

View file

@ -96,7 +96,7 @@ CFileLoader::LoadLevel(const char *filename)
LoadObjectTypes(line + 4);
}else if(strncmp(line, "IPL", 3) == 0){
if(!objectsLoaded){
// CModelInfo::ConstructMloClumps();
CModelInfo::ConstructMloClumps();
CObjectData::Initialise("DATA\\OBJECT.DAT");
objectsLoaded = true;
}

View file

@ -473,8 +473,8 @@ CCullZone::DoStuffEnteringZone_OneTreadablePlus10m(uint16 i)
int j;
if(i < 6000){
CPools::GetTreadablePool()->GetSlot(i)->bZoneCulled = true;;
CPools::GetTreadablePool()->GetSlot(i)->bZoneCulled2 = true;;
CPools::GetTreadablePool()->GetSlot(i)->bZoneCulled = true;
CPools::GetTreadablePool()->GetSlot(i)->bZoneCulled2 = true;
bb = CCullZones::aPointersToBigBuildingsForTreadables[i];
if(bb != -1)
CPools::GetBuildingPool()->GetSlot(bb)->bZoneCulled = true;
@ -492,7 +492,7 @@ CCullZone::DoStuffEnteringZone_OneTreadable(uint16 i)
int j;
if(i < 6000){
CPools::GetTreadablePool()->GetSlot(i)->bZoneCulled = true;;
CPools::GetTreadablePool()->GetSlot(i)->bZoneCulled = true;
bb = CCullZones::aPointersToBigBuildingsForTreadables[i];
if(bb != -1)
CPools::GetBuildingPool()->GetSlot(bb)->bZoneCulled = true;

View file

@ -121,7 +121,7 @@ CModelInfo::AddMloModel(int id)
CMloModelInfo *modelinfo;
modelinfo = CModelInfo::ms_mloModelStore.alloc();
CModelInfo::ms_modelInfoPtrs[id] = modelinfo;
modelinfo->m_clump = 0;
modelinfo->m_clump = nil;
modelinfo->firstInstance = 0;
modelinfo->lastInstance = 0;
return modelinfo;
@ -218,13 +218,19 @@ CModelInfo::RemoveColModelsFromOtherLevels(eLevelName level)
}
}
CStore<CInstance, MLOINSTANCESIZE>*
CModelInfo::GetMloInstanceStore()
{
return &CModelInfo::ms_mloInstanceStore;
}
void
CModelInfo::ConstructMloClumps()
{
for (int i = 0; i < ms_mloModelStore.allocPtr; i++)
ms_mloModelStore.store[i].ConstructClump();
}
STARTPATCHES
InjectHook(0x50B310, CModelInfo::Initialise, PATCH_JUMP);
InjectHook(0x50B5B0, CModelInfo::ShutDown, PATCH_JUMP);

View file

@ -46,4 +46,5 @@ public:
static bool IsBikeModel(int32 id);
static void RemoveColModelsFromOtherLevels(eLevelName level);
static CStore<CInstance, MLOINSTANCESIZE>* CModelInfo::GetMloInstanceStore();
static void ConstructMloClumps();
};