Remove profile menu aka. fix
This commit is contained in:
parent
3c703e6db4
commit
1e0fe1c060
2
deps/protobuf
vendored
2
deps/protobuf
vendored
@ -1 +1 @@
|
||||
Subproject commit 3ffbdd712f0413ce4964d626c5e10533f1f74893
|
||||
Subproject commit 814685ca2cd9280ca401e1842fd6311440921a0a
|
@ -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<BYTE>(0x5AF0D0, 0xC3); // GamerProfile_SaveProfile
|
||||
Utils::Hook::Set<BYTE>(0x4E6870, 0xC3); // GamerProfile_UpdateSystemVarsFromProfile
|
||||
Utils::Hook::Set<BYTE>(0x4C37F0, 0xC3); // GamerProfile_UpdateProfileAndSaveIfNeeded
|
||||
Utils::Hook::Set<BYTE>(0x633CA0, 0xC3); // GamerProfile_SetPercentCompleteMP
|
||||
|
||||
// GamerProfile_RegisterCommands
|
||||
// Some random function used as nullsub :P
|
||||
Utils::Hook::Set<DWORD>(0x45B868, 0x5188FB); // profile_menuDvarsSetup
|
||||
Utils::Hook::Set<DWORD>(0x45B87E, 0x5188FB); // profile_menuDvarsFinish
|
||||
Utils::Hook::Set<DWORD>(0x45B894, 0x5188FB); // profile_toggleInvertedPitch
|
||||
Utils::Hook::Set<DWORD>(0x45B8AA, 0x5188FB); // profile_setViewSensitivity
|
||||
Utils::Hook::Set<DWORD>(0x45B8C3, 0x5188FB); // profile_setButtonsConfig
|
||||
Utils::Hook::Set<DWORD>(0x45B8D9, 0x5188FB); // profile_setSticksConfig
|
||||
Utils::Hook::Set<DWORD>(0x45B8EF, 0x5188FB); // profile_toggleAutoAim
|
||||
Utils::Hook::Set<DWORD>(0x45B905, 0x5188FB); // profile_SetHasEverPlayed_MainMenu
|
||||
Utils::Hook::Set<DWORD>(0x45B91E, 0x5188FB); // profile_SetHasEverPlayed_SP
|
||||
Utils::Hook::Set<DWORD>(0x45B934, 0x5188FB); // profile_SetHasEverPlayed_SO
|
||||
Utils::Hook::Set<DWORD>(0x45B94A, 0x5188FB); // profile_SetHasEverPlayed_MP
|
||||
Utils::Hook::Set<DWORD>(0x45B960, 0x5188FB); // profile_setVolume
|
||||
Utils::Hook::Set<DWORD>(0x45B979, 0x5188FB); // profile_setGamma
|
||||
Utils::Hook::Set<DWORD>(0x45B98F, 0x5188FB); // profile_setBlacklevel
|
||||
Utils::Hook::Set<DWORD>(0x45B9A5, 0x5188FB); // profile_toggleCanSkipOffensiveMissions
|
||||
|
||||
// Fix mouse pitch adjustments
|
||||
UIScript::Add("updateui_mousePitch", [] ()
|
||||
{
|
||||
if (Dvar::Var("ui_mousePitch").Get<bool>())
|
||||
{
|
||||
Dvar::Var("m_pitch").Set(-0.022f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Dvar::Var("m_pitch").Set(0.022f);
|
||||
}
|
||||
});
|
||||
|
||||
// Rename stat file
|
||||
Utils::Hook::SetString(0x71C048, "iw4x.stat");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user