[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;