From 4a65974901f42d693e0c654e3300421a30d72ea6 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 6 Feb 2017 13:32:30 +0100 Subject: [PATCH] [Weapon] Quick fix for sentry crash, icons are still shifted --- src/Components/Modules/Weapon.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Components/Modules/Weapon.cpp b/src/Components/Modules/Weapon.cpp index 072d506b..5d5495bf 100644 --- a/src/Components/Modules/Weapon.cpp +++ b/src/Components/Modules/Weapon.cpp @@ -375,9 +375,12 @@ namespace Components Utils::Hook::Set(0x59C095, cg_weaponsStaticArray); Utils::Hook::Set(0x59C09D, cg_weaponsStaticArray); - static int unknownMaterialArray[WEAPON_LIMIT]; - Utils::Hook::Set(0x4EF619, unknownMaterialArray); - Utils::Hook::Set(0x5896AB, unknownMaterialArray); + // TODO: Check the offsets, icons are still wrong, but at least crashes are 'fixed' + static int unknownMaterialArray[WEAPON_LIMIT + 0x10]; + Utils::Hook::Set(0x58D003, unknownMaterialArray); + Utils::Hook::Set(0x58969A, &unknownMaterialArray[0xC]); + Utils::Hook::Set(0x4EF619, &unknownMaterialArray[0x10]); + Utils::Hook::Set(0x5896AB, &unknownMaterialArray[0x10]); // Has to do with fx, but somehow lies within the material array //Utils::Hook::Set(0x402069, unknownArray);