OMG COPYCAT, first homing sentry rockets, and now this!
When does it stop?!
It's surprising how much of it actually looks like copy and paste from my interface.
I'm implementing the VP hooks, and after looking at your code there is a flaw that I've discovered:
if (pNetworkable != NULL)
const char *serverName = pNetworkable->GetServerClass()->GetName();
edict_t *pEdict = pNetworkable->GetEdict();
CBaseEntity *pEnt = pNetworkable->GetBaseEntity();
if (!pEdict || !pEnt)
pFactory->Create(pEdict, pEnt, false);
pFactory->Create(pEdict, pEnt, true);
You are assuming that GetServerClass()->GetName() is going to be unique for every vtable, this isn't the case. There are several
entities where this will show up as "CBaseEntity", but they are seperate vtables.
For example, look at "info_target" and "soundent", completely different vtables, but same ServerClass "CBaseEntity".
I'd suggest using the classname of the entity instead, or some alternative method of detecting unique vtables because classname isn't perfect either.