Have SDKTools use IServerTools to get ent facts where available (bug 5968, r=asherkin).
This commit is contained in:
parent
080e2563c3
commit
46e89891e1
@ -516,6 +516,12 @@ CON_COMMAND(sm_dump_classes, "Dumps the class list as a text file")
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CEntityFactoryDictionary *dict = NULL;
|
||||||
|
|
||||||
|
#if SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM
|
||||||
|
dict = (CEntityFactoryDictionary *)servertools->GetEntityFactoryDictionary();
|
||||||
|
#else
|
||||||
|
|
||||||
ICallWrapper *pWrapper = NULL;
|
ICallWrapper *pWrapper = NULL;
|
||||||
|
|
||||||
if (!pWrapper)
|
if (!pWrapper)
|
||||||
@ -535,21 +541,13 @@ CON_COMMAND(sm_dump_classes, "Dumps the class list as a text file")
|
|||||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_Cdecl, &retData, NULL, 0);
|
pWrapper = g_pBinTools->CreateCall(addr, CallConv_Cdecl, &retData, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pWrapper->Execute(NULL, &dict);
|
||||||
void *returnData = NULL;
|
|
||||||
|
|
||||||
pWrapper->Execute(NULL, &returnData);
|
|
||||||
|
|
||||||
pWrapper->Destroy();
|
pWrapper->Destroy();
|
||||||
|
|
||||||
if (returnData == NULL)
|
#endif
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
CEntityFactoryDictionary *dict = ( CEntityFactoryDictionary * )returnData;
|
if (dict == NULL)
|
||||||
|
|
||||||
if ( !dict )
|
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user