View Single Post
Re: Hooking into HL2 DLL ?
Old
  (#17)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Hooking into HL2 DLL ? - 17-01-2005

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.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote