PDA

View Full Version : IEntityListener::Create called twice?


Quimbo
08-08-2009, 18:46
Hi!

I'm digging into C++ SM extensions and I did all the stuff to get LevelShutdown, gEntList offset and the sig for AddListenerEntity (on windows).

When I call AddListenerEntity for an instance of a class implementing IEntityListener the methods Spawn and Destroy seem to get called correctly while Create is called twice for each entity created.

Does anyone have a hint how to avoid this? Is this a problem in my code or the usual behaviour?
Are there any disadvatages to add my hooks in Spawn and not in Create?

Thanks!

EDIT: Oh and does someone happen to have a sig for CGlobalEntityList::RemoveListenerEntity? The method is odd, I wasn't able to reliably get a sig (AddListenerEntity was easy).