From 7ee57de3e3d440e4d27b9e43e49fe48460cfe95a Mon Sep 17 00:00:00 2001 From: Diavolo Date: Thu, 21 Jul 2022 14:04:14 +0200 Subject: [PATCH] [ClanTags] Remove hooked function that must not be called when in-game --- src/Components/Modules/ClanTags.cpp | 11 +---------- src/Components/Modules/ClanTags.hpp | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Components/Modules/ClanTags.cpp b/src/Components/Modules/ClanTags.cpp index c2acad4c..c3247f2b 100644 --- a/src/Components/Modules/ClanTags.cpp +++ b/src/Components/Modules/ClanTags.cpp @@ -230,14 +230,6 @@ namespace Components return result; } - Game::PlayerCardData* ClanTags::PlayerCards_GetPartyMemberData(const int localClientNum, const Game::PlayerCardClientLookupType lookupType, const unsigned int memberIndex) - { - auto* result = Utils::Hook::Call(0x4A4A90)(localClientNum, lookupType, memberIndex); - Game::I_strncpyz(result->clanAbbrev, ClientState[memberIndex], sizeof(Game::PlayerCardData::clanAbbrev)); - - return result; - } - ClanTags::ClanTags() { Events::OnClientInit([] @@ -261,7 +253,7 @@ namespace Components return false; }); - + Utils::Hook(0x430B00, Dvar_InfoString_Stub, HOOK_CALL).install()->quick(); Utils::Hook(0x44532F, ClientUserinfoChanged_Stub, HOOK_JUMP).install()->quick(); @@ -276,7 +268,6 @@ namespace Components Utils::Hook(0x458DF4, PlayerCards_SetCachedPlayerData_Stub, HOOK_JUMP).install()->quick(); Utils::Hook(0x62EAB6, PlayerCards_GetLiveProfileDataForClient_Stub, HOOK_CALL).install()->quick(); Utils::Hook(0x62EAC3, PlayerCards_GetLiveProfileDataForController_Stub, HOOK_CALL).install()->quick(); - Utils::Hook(0x62EAE8, PlayerCards_GetPartyMemberData, HOOK_CALL).install()->quick(); // clanName in CG_Obituary Utils::Hook(0x586DD6, PlayerName::GetClientName, HOOK_CALL).install()->quick(); diff --git a/src/Components/Modules/ClanTags.hpp b/src/Components/Modules/ClanTags.hpp index dc1c7952..1893d620 100644 --- a/src/Components/Modules/ClanTags.hpp +++ b/src/Components/Modules/ClanTags.hpp @@ -43,6 +43,5 @@ namespace Components static Game::PlayerCardData* PlayerCards_GetLiveProfileDataForClient_Stub(unsigned int clientIndex); static Game::PlayerCardData* PlayerCards_GetLiveProfileDataForController_Stub(unsigned int controllerIndex); - static Game::PlayerCardData* PlayerCards_GetPartyMemberData(int localClientNum, Game::PlayerCardClientLookupType lookupType, unsigned int memberIndex); }; }