Update SDKTools entity output functions to use core's GetEntityClassname instead of own.

This commit is contained in:
Nicholas Hastings
2014-06-19 11:27:26 -04:00
parent b0e466edae
commit 75254bbf25
3 changed files with 3 additions and 23 deletions
+1 -19
View File
@@ -115,7 +115,7 @@ void EntityOutputManager::FireEventDetour(void *pOutput, CBaseEntity *pActivator
// Fast lookup failed - check the slow way for hooks that haven't fired yet
if ((fastLookup = EntityOutputs->Retrieve(sOutput, (void **)&pOutputName)) == false)
{
const char *classname = GetEntityClassname(pCaller);
const char *classname = gamehelpers->GetEntityClassname(pCaller);
if (!classname)
{
return;
@@ -353,21 +353,3 @@ const char *EntityOutputManager::FindOutputName(void *pOutput, CBaseEntity *pCal
return NULL;
}
const char *EntityOutputManager::GetEntityClassname(CBaseEntity *pEntity)
{
static int offset = -1;
if (offset == -1)
{
datamap_t *pMap = gamehelpers->GetDataMap(pEntity);
sm_datatable_info_t info;
if (!gamehelpers->FindDataMapInfo(pMap, "m_iClassname", &info))
{
return NULL;
}
offset = info.actual_offset;
}
return *(const char **)(((unsigned char *)pEntity) + offset);
}