mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-19 04:06:06 +08:00
[saco] Implement/match CGame::GetLoadedVehicleModelCount()
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
|
@ -128,6 +128,7 @@ public:
|
||||
void LoadScene(char* szScene);
|
||||
int GetMemoryUsedForStreaming();
|
||||
int GetMemoryAvailableForStreaming();
|
||||
int GetLoadedVehicleModelCount();
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user