-
Автор темы
- #1
В Panorama UI cl_fullupdate не обновляет иконки оружия на HUD'е, вот моё решение проблемы:
clearHudWeaponIcon: '55 8B EC 51 53 56 8B 75 08 8B D9 57 6B FE 2C 89 5D FC' в 'client_panorama.dll'
Код:
static signed int ForceFullupdate()
{
if (CUtils::IsPanoramaUpdate()) {
DWORD dwHudWeaponSelection = CGameUtils::FindHudElement(XORSTRING("CCSGO_HudWeaponSelection"));
if (dwHudWeaponSelection) {
int *pHudWeapons = (int*)(dwHudWeaponSelection - 0x1C);
if (pHudWeapons && (*pHudWeapons)) {
typedef int(__thiscall *ClearHudWeaponIcon_t)(void*, int);
static ClearHudWeaponIcon_t ClearHudWeaponIcon = 0; if (!ClearHudWeaponIcon) ClearHudWeaponIcon = (ClearHudWeaponIcon_t)(COffsets::GetOffset(EOffsets::clearHudWeaponIcon));
for (int i = 0; i < (*pHudWeapons); i++) i = ClearHudWeaponIcon((void*)(dwHudWeaponSelection - 0x9C), i);
(*pHudWeapons) = 0;
}
}
}
typedef signed int(*ForceFullUpdate_t)();
static ForceFullUpdate_t ForceFullUpdate = 0; if (!ForceFullUpdate) ForceFullUpdate = (ForceFullUpdate_t)(COffsets::GetOffset(EOffsets::forceFullUpdate));
return ForceFullUpdate();
}