With metamod there does not seem to be a way to modify the parameters passed to functions.
Take PM_Move for example, sure I can modify the parameters within my PM_Move function then call the mod's version but the problem is that even if I return MRES_SUPERCEDE other plugins will still have their PM_Move functions get called and if they do the same there could be trouble.
Example, typed in edit so it sucks:
Code:
void PM_Move( struct playermove_s* PMove, qboolean Server ) {
PMove->blah = blah; // Do stuff with PMove
MDLL_PM_Move( PMove, Server ); // Call mod's PM_Move with modified vars
RETURN_META( MRES_SUPERCEDE );
}
Any ways around this?
I could overwrite the first few bytes of the mod's function with a jump to hook code which does what I want but that's really messy.