[saco] Implement/match IsValidPedModel; the model bounds test is signed, and the vtable is 0x85BDC0

This commit is contained in:
ricardoofnl
2026-09-03 02:09:43 +07:00
parent 910e879b56
commit c761f03055
2 changed files with 18 additions and 0 deletions
+15
View File
@@ -191,6 +191,21 @@ void ReplaceBuildingModel(ENTITY_TYPE *pEntity, int iModelID)
//-----------------------------------------------------------
BOOL __stdcall IsValidPedModel(int iModel)
{
DWORD *pModelInfo;
if(iModel >= 0 && iModel <= 30000 &&
(pModelInfo = GetModelInfo(iModel)) != NULL &&
*pModelInfo == 0x85BDC0)
{
return TRUE;
}
return FALSE;
}
//-----------------------------------------------------------
int GetInvalidModelInfoCount()
{
DWORD *dwModelInfos = (DWORD *)0xA9C068;
+3
View File
@@ -69,6 +69,9 @@ OBJECT_TYPE * GamePool_GetObject();
void ReplaceBuildingModel(ENTITY_TYPE *pEntity, int iModelID);
int GetInvalidModelInfoCount();
DWORD * __stdcall GetModelInfo(unsigned int uiModel); // .text:100A7A40
BOOL __stdcall IsValidPedModel(int iModel); // .text:100B3DD0
bool HasCollisionLoaded(VECTOR *vec);
BOOL __stdcall IsATrainPart(ENTITY_TYPE *pEntity);
BOOL __stdcall FUNC_100B4860(VEHICLE_TYPE *pVehicle); // .text:100B4860