Eliminate need for gEntList gamedata on tf2/sdk2013 and soon dods/css/hl2dm.

This commit is contained in:
Nicholas Hastings 2014-10-30 19:23:27 -04:00
parent 5d78a5ff93
commit 350dd2ebc7

View File

@ -153,6 +153,18 @@ void CHalfLife2::OnSourceModAllInitialized_Post()
void CHalfLife2::InitLogicalEntData()
{
#if SOURCE_ENGINE == SE_TF2 \
|| SOURCE_ENGINE == SE_DODS \
|| SOURCE_ENGINE == SE_HL2DM \
|| SOURCE_ENGINE == SE_CSS \
|| SOURCE_ENGINE == SE_SDK2013
if (g_SMAPI->GetServerFactory(false)("VSERVERTOOLS003", nullptr))
{
g_EntList = servertools->GetEntityList();
}
#endif
char *addr = NULL;
/*
@ -162,6 +174,8 @@ void CHalfLife2::InitLogicalEntData()
* If symbols aren't present (Windows or stripped Linux/Mac),
* attempt find via LevelShutdown + offset
*/
if (!g_EntList)
{
if (g_pGameConf->GetMemSig("gEntList", (void **) &addr))
{
#if !defined PLATFORM_WINDOWS
@ -178,6 +192,7 @@ void CHalfLife2::InitLogicalEntData()
}
#endif
}
}
if (!g_EntList)
{