diff --git a/deps/protobuf b/deps/protobuf index 3ffbdd71..814685ca 160000 --- a/deps/protobuf +++ b/deps/protobuf @@ -1 +1 @@ -Subproject commit 3ffbdd712f0413ce4964d626c5e10533f1f74893 +Subproject commit 814685ca2cd9280ca401e1842fd6311440921a0a diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index d65574c3..3d050a34 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -235,6 +235,48 @@ namespace Components Utils::Hook(0x4D4007, QuickPatch::ShutdownStub, HOOK_CALL).Install()->Quick(); + // Disable profile system + Utils::Hook::Nop(0x60BEB1, 5); // GamerProfile_InitAllProfiles + Utils::Hook::Nop(0x60BEB8, 5); // GamerProfile_LogInProfile +// Utils::Hook::Nop(0x4059EA, 5); // GamerProfile_RegisterCommands + Utils::Hook::Nop(0x4059EF, 5); // GamerProfile_RegisterDvars + Utils::Hook::Nop(0x47DF9A, 5); // GamerProfile_UpdateSystemDvars + Utils::Hook::Set(0x5AF0D0, 0xC3); // GamerProfile_SaveProfile + Utils::Hook::Set(0x4E6870, 0xC3); // GamerProfile_UpdateSystemVarsFromProfile + Utils::Hook::Set(0x4C37F0, 0xC3); // GamerProfile_UpdateProfileAndSaveIfNeeded + Utils::Hook::Set(0x633CA0, 0xC3); // GamerProfile_SetPercentCompleteMP + + // GamerProfile_RegisterCommands + // Some random function used as nullsub :P + Utils::Hook::Set(0x45B868, 0x5188FB); // profile_menuDvarsSetup + Utils::Hook::Set(0x45B87E, 0x5188FB); // profile_menuDvarsFinish + Utils::Hook::Set(0x45B894, 0x5188FB); // profile_toggleInvertedPitch + Utils::Hook::Set(0x45B8AA, 0x5188FB); // profile_setViewSensitivity + Utils::Hook::Set(0x45B8C3, 0x5188FB); // profile_setButtonsConfig + Utils::Hook::Set(0x45B8D9, 0x5188FB); // profile_setSticksConfig + Utils::Hook::Set(0x45B8EF, 0x5188FB); // profile_toggleAutoAim + Utils::Hook::Set(0x45B905, 0x5188FB); // profile_SetHasEverPlayed_MainMenu + Utils::Hook::Set(0x45B91E, 0x5188FB); // profile_SetHasEverPlayed_SP + Utils::Hook::Set(0x45B934, 0x5188FB); // profile_SetHasEverPlayed_SO + Utils::Hook::Set(0x45B94A, 0x5188FB); // profile_SetHasEverPlayed_MP + Utils::Hook::Set(0x45B960, 0x5188FB); // profile_setVolume + Utils::Hook::Set(0x45B979, 0x5188FB); // profile_setGamma + Utils::Hook::Set(0x45B98F, 0x5188FB); // profile_setBlacklevel + Utils::Hook::Set(0x45B9A5, 0x5188FB); // profile_toggleCanSkipOffensiveMissions + + // Fix mouse pitch adjustments + UIScript::Add("updateui_mousePitch", [] () + { + if (Dvar::Var("ui_mousePitch").Get()) + { + Dvar::Var("m_pitch").Set(-0.022f); + } + else + { + Dvar::Var("m_pitch").Set(0.022f); + } + }); + // Rename stat file Utils::Hook::SetString(0x71C048, "iw4x.stat");