Quote:
Originally Posted by pRED*
You shouldn't need to detour anything new.
Modify the CEntity::AcceptEntityInput handler to do what you want. Which I assume is exactly a copy paste of the sdk version, with a fallback (if the prop name isn't found) to the actual CBaseEntity code.
That should be more or less it. The macros to generate datamaps for a CEntity should work directly from the sdk (I think, maybe) and you don't need to do anything special with them. Code left in there to inject them into the CBaseEntity datamap table needs to be deleted, not sure if that's still in there
|
the macros to generate datamaps is work
Code:
BEGIN_DATADESC( CBaseNPCMaker )
DEFINE_KEYFIELD( m_nMaxLiveChildren, FIELD_INTEGER, "MaxLiveChildren" ),
...
LINK_ENTITY_TO_CUSTOM_CLASS( npc_maker, info_target, CNPCMaker );
the game will parse "MaxLiveChildren" keyvalue to "info_target" - "m_nMaxLiveChildren"
the problem is "m_nMaxLiveChildren" no exist in that CBaseEntity, and it will overwrite a random memory address in that CBaseEntity. Not the custom entity.
know keyvalues problem now?