From 53c27aa425f04eb58f9030a4990c49d53d848cc2 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sat, 11 Feb 2017 14:12:43 +0100 Subject: [PATCH] [Weapon] Fix material stuff --- src/Components/Modules/FastFiles.cpp | 5 +++++ src/Components/Modules/Weapon.cpp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Components/Modules/FastFiles.cpp b/src/Components/Modules/FastFiles.cpp index 58cc730b..2d9b09a8 100644 --- a/src/Components/Modules/FastFiles.cpp +++ b/src/Components/Modules/FastFiles.cpp @@ -493,6 +493,11 @@ namespace Components // XFile header loading Utils::Hook(0x4159E2, FastFiles::ReadXFileHeader, HOOK_CALL).install()->quick(); + // Replace internal ZLib + //Utils::Hook(0x44B160, inflateInit2_, HOOK_JUMP).install()->quick(); + //Utils::Hook(0x453750, inflateEnd, HOOK_JUMP).install()->quick(); + //Utils::Hook(0x49EA00, inflate, HOOK_JUMP).install()->quick(); + // Add custom zone paths FastFiles::AddZonePath("zone\\patch\\"); FastFiles::AddZonePath("zone\\dlc\\"); diff --git a/src/Components/Modules/Weapon.cpp b/src/Components/Modules/Weapon.cpp index 7251cea5..e3d74c3f 100644 --- a/src/Components/Modules/Weapon.cpp +++ b/src/Components/Modules/Weapon.cpp @@ -384,8 +384,8 @@ namespace Components Utils::Hook::Set(0x5896AB, &unknownMaterialArray[4]); // Has to do with fx, but somehow lies within the material array - //Utils::Hook::Set(0x402069, unknownArray); - //Utils::Hook::Set(0x4E05D9, unknownArray); + Utils::Hook::Set(0x402069, &unknownMaterialArray[32]); + Utils::Hook::Set(0x4E05D9, &unknownMaterialArray[32]); // Patch bg_weaponDefs on the stack Utils::Hook::Set(0x40C31D, sizeof(bg_weaponDefs));