I'm trying to create my own entity with CEntity. But I ran into problems. If I use this define:
LINK_ENTITY_TO_CUSTOM_CLASS
to declare my entity, the extension doesn't call Think func for this entity. SetThink and SetNextThink don't work either. But all these functions work fine if I just spawn any default entity in the game.
CEntity version: TFDodgeball
Engine version: CSS v2230303 (Windows 7)
SourceMod Version: 1.6.3-dev+4588
PHP Code:
#define LINK_ENTITY_TO_CLASS(mapClassName,DLLClassName) \
static CEntityFactory<DLLClassName> mapClassName##Factory(#mapClassName);
#define LINK_ENTITY_TO_INTERNAL_CLASS(mapClassName,DLLClassName) \
static CEntityFactory<DLLClassName> mapClassName##Factory(#mapClassName,true);
#define LINK_ENTITY_TO_CUSTOM_CLASS(mapClassName,replaceClassName,DLLClassName); \
static CCustomEntityFactory<DLLClassName> mapClassName##CustomFactory(#mapClassName, #replaceClassName); \
static CEntityFactory<DLLClassName> mapClassName##Factory(#mapClassName);