extensions/sdktools/vglobals.cpp
changeset 3817 87d44c16b4d2
parent 3816 31650bb3c7e8
child 3823 a15fe74da328
     1.1 --- a/extensions/sdktools/vglobals.cpp	Sat Mar 16 13:50:36 2013 -0400
     1.2 +++ b/extensions/sdktools/vglobals.cpp	Sat Mar 16 14:11:56 2013 -0400
     1.3 @@ -189,12 +189,13 @@
     1.4  {
     1.5  	g_ResourceEntity.Term();
     1.6  	
     1.7 +#if SOURCE_ENGINE >= SE_ORANGEBOX
     1.8  	const char *classname = g_pGameConf->GetKeyValue("ResourceEntityClassname");
     1.9  	if (classname != NULL)
    1.10  	{
    1.11 -		for (void *pEntity = servertools->FirstEntity(); pEntity; pEntity = servertools->NextEntity(pEntity))
    1.12 +		for (CBaseEntity *pEntity = (CBaseEntity *)servertools->FirstEntity(); pEntity; pEntity = (CBaseEntity *)servertools->NextEntity(pEntity))
    1.13  		{
    1.14 -			if (!strcmp(gamehelpers->GetEntityClassname((CBaseEntity *)pEntity), classname))
    1.15 +			if (!strcmp(gamehelpers->GetEntityClassname(pEntity), classname))
    1.16  			{
    1.17  				g_ResourceEntity = ((IHandleEntity *)pEntity)->GetRefEHandle();
    1.18  				break;
    1.19 @@ -202,6 +203,7 @@
    1.20  		}
    1.21  	}
    1.22  	else
    1.23 +#endif
    1.24  	{
    1.25  		int edictCount = gpGlobals->maxEntities;
    1.26