Open afwn90cj93201nixr2e1re opened 4 years ago
e.g. SET_META_PRIORITY(99) and then plugins which are settting priority to 0 or 10 or 98 or 97 and etc gonna be skipped at reassigning state.
Also if you can add more MRES_ types, for example MRES_BREAK_POST, for breaking post calling, MRES_BREAK_ORIG_POST for breaking original call and post call, MRES_BREAK_NEXT_ORIG_POST for breaking next pre, origin, post calls MRES_BREAK_NEXT_POST for breaking next pre and post call's.
Btw i suggest to add another one value instead filling up MRES_ stuff.
But they must be very well designed so that we can flex them the way we want, for example, we can use bitsums to prevent the next pre call, next post call, call POST at all, call POST and origin at all. (im not talking about prevent calling origin due mres_supercede already exists)
@jkivilin can u take look?
Right now we can't handle which one hooked function value gonna be returned or overrided. https://github.com/Bots-United/metamod-p/blob/cd4f10b5311cb1372214ad1ebb1df0b7c276dd39/metamod/api_hook.cpp#L383
As you can see there's only check against MRES ret stuff.
For example: Plugin 1 hooking CmdStart_Post or something like that and returning 0 with override/supercede
Plugin 2 hooking CmdStart_Post or something like that and returning 0 with override/supercede, and this one plugins should override values without depending on order. It's main plugin which should controll all exclusive stuff.
Plugin 3 hooking CmdStart_Post or something like that and returning 0 with override/supercede