From 72efebb021bf270a5b72cbf9e00789d31b35f480 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sat, 9 Apr 2016 18:00:28 +0200 Subject: [PATCH] Fix fs_game crash --- deps/json11 | 2 +- src/Components/Modules/QuickPatch.cpp | 9 +++++++++ src/Utils/Hooking.cpp | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/deps/json11 b/deps/json11 index afcc8d0d..3ae18006 160000 --- a/deps/json11 +++ b/deps/json11 @@ -1 +1 @@ -Subproject commit afcc8d0d82b1ce2df587a7a0637d05ba493bf5e6 +Subproject commit 3ae180068db774650c9f39041764bc99a00c868e diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index cb26d2d2..9273db80 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -199,6 +199,15 @@ 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); + Utils::Hook::Nop(0x461AAA, 5); + Utils::Hook::Nop(0x461AB2, 0xB1); + + // vid_restart when ingame + Utils::Hook::Nop(0x4CA1FA, 6); // Filter log (initially com_logFilter, but I don't see why that dvar is needed) Utils::Hook::Nop(0x647466, 5); // 'dvar set' lines diff --git a/src/Utils/Hooking.cpp b/src/Utils/Hooking.cpp index 4957384e..fde46784 100644 --- a/src/Utils/Hooking.cpp +++ b/src/Utils/Hooking.cpp @@ -32,7 +32,7 @@ namespace Utils add esp, 4h // Clear the stack - mov [esp + 20h], eax // Store the return address at the reserves space + mov [esp + 20h], eax // Store the return address at the reserved space popad // Restore the registers retn // Return (jump to our return address)