From e556b835cdd045a71a383023edb3f53beed16885 Mon Sep 17 00:00:00 2001 From: Diavolo Date: Tue, 19 Jul 2022 14:02:53 +0200 Subject: [PATCH] [Weapons] Fix *gone right* (gone thankful for JTAG) --- .gitignore | 4 ++-- src/Components/Modules/QuickPatch.cpp | 1 - src/Components/Modules/Weapon.cpp | 10 ++-------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 5278875b..3b801e92 100644 --- a/.gitignore +++ b/.gitignore @@ -149,5 +149,5 @@ ida/* # User scripts user*.bat -# Premake binary -#premake5.exe +### Visual Studio Code +.vscode/ diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index 575a7b9d..f4e31ad4 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -404,7 +404,6 @@ namespace Components // fs_game fixes Utils::Hook::Nop(0x4A5D74, 2); // remove fs_game profiles Utils::Hook::Set(0x4081FD, 0xEB); // defaultweapon - Utils::Hook::Set(0x452C1D, 0xEB); // LoadObj weaponDefs // filesystem init default_mp.cfg check Utils::Hook::Nop(0x461A9E, 5); diff --git a/src/Components/Modules/Weapon.cpp b/src/Components/Modules/Weapon.cpp index c528fab0..ae82ada9 100644 --- a/src/Components/Modules/Weapon.cpp +++ b/src/Components/Modules/Weapon.cpp @@ -558,15 +558,9 @@ namespace Components Utils::Hook::Nop(0x4B3670, 5); Utils::Hook(0x57B4F0, LoadNoneWeaponHookStub, HOOK_JUMP).install()->quick(); - // Don't load bounce sounds for now, it causes crashes - // TODO: Actually check the weaponfiles and/or reset the soundtable correctly! - //Utils::Hook::Nop(0x57A360, 5); - //Utils::Hook::Nop(0x57A366, 6); - Utils::Hook::Nop(0x5795E9, 2); - // Clear weapons independently from fs_game - //Utils::Hook::Nop(0x452C1D, 2); - //Utils::Hook::Nop(0x452C24, 5); + Utils::Hook::Nop(0x452C1D, 2); + Utils::Hook::Nop(0x452C24, 5); Utils::Hook(0x59E341, CG_UpdatePrimaryForAltModeWeapon_Stub, HOOK_JUMP).install()->quick(); Utils::Hook(0x48BB25, CG_SelectWeaponIndex_Stub, HOOK_JUMP).install()->quick();