Fixed some engine builds failing.

This commit is contained in:
Nicholas Hastings 2013-03-16 14:11:56 -04:00
parent 0c7696da65
commit 707e820af6

View File

@ -189,12 +189,13 @@ void GetResourceEntity()
{
g_ResourceEntity.Term();
#if SOURCE_ENGINE >= SE_ORANGEBOX
const char *classname = g_pGameConf->GetKeyValue("ResourceEntityClassname");
if (classname != NULL)
{
for (void *pEntity = servertools->FirstEntity(); pEntity; pEntity = servertools->NextEntity(pEntity))
for (CBaseEntity *pEntity = (CBaseEntity *)servertools->FirstEntity(); pEntity; pEntity = (CBaseEntity *)servertools->NextEntity(pEntity))
{
if (!strcmp(gamehelpers->GetEntityClassname((CBaseEntity *)pEntity), classname))
if (!strcmp(gamehelpers->GetEntityClassname(pEntity), classname))
{
g_ResourceEntity = ((IHandleEntity *)pEntity)->GetRefEHandle();
break;
@ -202,6 +203,7 @@ void GetResourceEntity()
}
}
else
#endif
{
int edictCount = gpGlobals->maxEntities;