[saco] Implement/match CGame::GetLoadedVehicleModelCount()

This commit is contained in:
RD42
2024-08-14 23:13:15 +08:00
parent e3c87d2776
commit 8495b4eeba
2 changed files with 22 additions and 0 deletions

View File

@ -1006,3 +1006,24 @@ int CGame::GetMemoryAvailableForStreaming()
//-----------------------------------------------------------
int CGame::GetLoadedVehicleModelCount()
{
int iCount = 0;
struct DUMMY {
PADDING(_pad0,16); // 0-16
BOOL bLoaded; // 16-20
};
DUMMY *pStreamingModelInfo = (DUMMY*)0x8E4CC0;
int x = 400;
while(x != 611) {
if(pStreamingModelInfo[x].bLoaded)
iCount++;
x++;
}
return iCount;
}
//-----------------------------------------------------------

View File

@ -128,6 +128,7 @@ public:
void LoadScene(char* szScene);
int GetMemoryUsedForStreaming();
int GetMemoryAvailableForStreaming();
int GetLoadedVehicleModelCount();
};
//-----------------------------------------------------------