View Single Post
Author Message
Addie
Junior Member
Join Date: Nov 2018
Old 07-07-2019 , 18:33   [NMRiH/Any] DHooks with detours not superseding function
Reply With Quote #1

I'm trying to prevent the execution of:

PHP Code:
void __cdecl Bot_RunAll() 
using DHooks with Experimental Detours.

I successfully create the detour and simply return MRES_Supercede. Code below:

Spoiler


My gamedata:

Spoiler


My detour executes but so does the original function, why?

From dhooks.inc:

PHP Code:
enum MRESReturn
{
    
MRES_Supercede                // skip real function; use my return value
}; 
I've detoured plenty of functions in the past but never superseded them till now.
Am I doing something wrong?

Last edited by Addie; 07-07-2019 at 22:52.
Addie is offline