Should block void __cdecl CHostageImprov::CHostageImprov (CHostageImprov * const this, CHostage * entity) function.
On Windows, it's a int * function. Not void. So in Windows, return nullptr; is needed.
Should block void * __cdecl operator new (unsigned size) call inside function void __cdecl CHostage::IdleThink (CHostage * const this).
On Windows and Linux, return nullptr; is needed. The void * __cdecl operator new (unsigned size) function is a void * function.
Warning, void __cdecl CHostageImprov::CHostageImprov (CHostageImprov * const this, CHostage * entity) is a main function, not a sub-function which resides inside a main function (like the others are). Perhaps this needs a different hook method.
No need to hook/ block void __cdecl CHostage::IdleThink (CHostage * const this) anymore. Can still be hooked but call the original function into the hook.
I use bot_chatter off setting and I don't need talkable bots. I use this Meta Mod hook above as is. And return false; into the custom hook for: int __cdecl UTIL_IsGame(const char * gameName) call inside function int __cdecl BotPhraseManager::Initialize (BotPhraseManager * this, char * a2, int a3).
Use Orpheu to patch
void CHostage::IdleThink(void)
.The
\steamapps\common\Half-Life\cstrike\addons\amxmodx\configs\orpheu\functions\CHostage\IdleThink
file.Wasn't able to test the Linux signatures. EDIT: Tested, working.
void CHostage::IdleThink(void)
L/ W Signatures (To Block This Function)[Update on Dec. 17, 2013] Patching
void CHostage::IdleThink(void)
/ blocking its execution will cause hostages to not work anymore. So:Should block
void __cdecl CHostageImprov::CHostageImprov (CHostageImprov * const this, CHostage * entity)
function. On Windows, it's aint *
function. Notvoid
. So in Windows,return nullptr;
is needed.Should block
void * __cdecl operator new (unsigned size)
call inside functionvoid __cdecl CHostage::IdleThink (CHostage * const this)
. On Windows and Linux,return nullptr;
is needed. Thevoid * __cdecl operator new (unsigned size)
function is avoid *
function.Warning,
void __cdecl CHostageImprov::CHostageImprov (CHostageImprov * const this, CHostage * entity)
is a main function, not a sub-function which resides inside a main function (like the others are). Perhaps this needs a different hook method.No need to hook/ block
void __cdecl CHostage::IdleThink (CHostage * const this)
anymore. Can still be hooked but call the original function into the hook.I use
bot_chatter off
setting and I don't need talkable bots. I use this Meta Mod hook above as is. Andreturn false;
into the custom hook for:int __cdecl UTIL_IsGame(const char * gameName)
call inside functionint __cdecl BotPhraseManager::Initialize (BotPhraseManager * this, char * a2, int a3)
.To hook functions (not sub-functions) on Windows/ Linux you can use https://github.com/Zeex/subhook To hook functions (not sub-functions) on Windows you can use https://github.com/microsoft/Detours