I'm trying to detour this function:
PHP Code:
bool CBot<CCSPlayer>::IsPlayerLookingAtMe(CBasePlayer *, float) const
Linux signature:
PHP Code:
_ZNK4CBotI9CCSPlayerE19IsPlayerLookingAtMeEP11CBasePlayerf
I get this gamedata:
PHP Code:
"CBot_CCSPlayer::IsPlayerLookingAtMe"
{
"library" "server"
"linux" "@_ZNK4CBotI9CCSPlayerE19IsPlayerLookingAtMeEP11CBasePlayerf"
}
PHP Code:
DETOUR_DECL_MEMBER2(IsPlayerLookingAtMe, bool, CBasePlayer *, player, float, epsilon)
{
return DETOUR_MEMBER_CALL(IsPlayerLookingAtMe)(player, epsilon);
}
bool CreateIsPlayerLookingAtMeDetour()
{
DIsPlayerLookingAtMe = DETOUR_CREATE_MEMBER(IsPlayerLookingAtMe, "CBot_CCSPlayer::IsPlayerLookingAtMe");
if(DIsPlayerLookingAtMe != NULL)
{
DIsPlayerLookingAtMe->EnableDetour();
return true;
}
g_pSM->LogError(myself, "CBot<CCSPlayer>::IsPlayerLookingAtMe detour could not be initialized");
return false;
}
After calling CreateIsPlayerLookingAtMeDetour I get this message:
"CBot<CCSPlayer>::IsPlayerLookingAtMe detour could not be initialized" and the detour doesn't work. I compared this function with the other i've detoured and the only difference is that it's class is a template class... Any ideas ?