these are ugly hacks, I definitely wouldn't want to use them
anyway, let me correct one thing:
Quote:
For example, the engine calls the game DLL GameFrame() function, then when the game DLL returns back to the engine, the engine calls it for plugin A, then plugin B, then plugin C, like this...
engine->GameDLL::GameFrame()
<- GameDLL::GameFrame() returns back to the engine
engine->PluginA::GameFrame()
<- PluginA::GameFrame() returns back to then engine
engine->PluginB::GameFrame()
<- PluginB::GameFrame() returns back to the engine
|
Technically speaking, it's the other way around in metamod : the game DLL functions are called AFTER all the plugins hooks (which enables us to set a MRES_SUPERCEDE to prevent the real function from being called). Same goes for engine functions. For hooking a function AFTER the actual call, we use metamod's *_Post function tables.
This is actually what we would need in HL2.