2015-12-23 08:45:53 -05:00
|
|
|
#include "..\STDInclude.hpp"
|
|
|
|
|
|
|
|
namespace Components
|
|
|
|
{
|
2015-12-25 15:42:35 -05:00
|
|
|
__int64* QuickPatch::GetStatsID()
|
|
|
|
{
|
|
|
|
static __int64 id = 0x110000100001337;
|
|
|
|
return &id;
|
|
|
|
}
|
|
|
|
|
2015-12-23 08:45:53 -05:00
|
|
|
QuickPatch::QuickPatch()
|
|
|
|
{
|
|
|
|
// remove system pre-init stuff (improper quit, disk full)
|
|
|
|
Utils::Hook::Set<BYTE>(0x411350, 0xC3);
|
|
|
|
|
|
|
|
// remove STEAMSTART checking for DRM IPC
|
|
|
|
Utils::Hook::Nop(0x451145, 5);
|
|
|
|
Utils::Hook::Set<BYTE>(0x45114C, 0xEB);
|
|
|
|
|
2015-12-26 21:56:00 -05:00
|
|
|
// Apply new playlist
|
|
|
|
char* playlist = "mp_playlists_dlc2";
|
|
|
|
Utils::Hook::Set<char*>(0x494803, playlist);
|
|
|
|
Utils::Hook::Set<char*>(0x4C6EC1, playlist);
|
|
|
|
Utils::Hook::Set<char*>(0x4CF7F9, playlist);
|
|
|
|
Utils::Hook::Set<char*>(0x4D6E63, playlist);
|
|
|
|
Utils::Hook::Set<char*>(0x4D7358, playlist);
|
|
|
|
Utils::Hook::Set<char*>(0x4D73C8, playlist);
|
|
|
|
Utils::Hook::Set<char*>(0x4F4EA1, playlist);
|
|
|
|
Utils::Hook::Set<char*>(0x4D47FB, "mp_playlists_dlc2.ff");
|
|
|
|
Utils::Hook::Set<char*>(0x60B06E, "playlists.patch2");
|
|
|
|
|
2015-12-23 08:45:53 -05:00
|
|
|
// disable playlist download function
|
|
|
|
Utils::Hook::Set<BYTE>(0x4D4790, 0xC3);
|
|
|
|
|
|
|
|
// disable playlist.ff loading function
|
2015-12-26 21:56:00 -05:00
|
|
|
//Utils::Hook::Set<BYTE>(0x4D6E60, 0xC3);
|
|
|
|
|
|
|
|
// Load playlist, but don't delete it
|
|
|
|
Utils::Hook::Nop(0x4D6EBB, 5);
|
|
|
|
Utils::Hook::Nop(0x4D6E67, 5);
|
|
|
|
Utils::Hook::Nop(0x4D6E71, 2);
|
2015-12-23 08:45:53 -05:00
|
|
|
|
|
|
|
// playlist dvar 'validity check'
|
|
|
|
Utils::Hook::Set<BYTE>(0x4B1170, 0xC3);
|
|
|
|
|
|
|
|
//Got playlists is true
|
2015-12-26 21:56:00 -05:00
|
|
|
//Utils::Hook::Set<bool>(0x1AD3680, true);
|
2015-12-23 08:45:53 -05:00
|
|
|
|
|
|
|
// LSP disabled
|
|
|
|
Utils::Hook::Set<BYTE>(0x435950, 0xC3); // LSP HELLO
|
|
|
|
Utils::Hook::Set<BYTE>(0x49C220, 0xC3); // We wanted to send a logging packet, but we haven't connected to LSP!
|
|
|
|
Utils::Hook::Set<BYTE>(0x4BD900, 0xC3); // main LSP response func
|
|
|
|
Utils::Hook::Set<BYTE>(0x682170, 0xC3); // Telling LSP that we're playing a private match
|
|
|
|
|
|
|
|
// Don't delete config files if corrupted
|
|
|
|
Utils::Hook::Set<BYTE>(0x47DCB3, 0xEB);
|
|
|
|
|
|
|
|
// hopefully allow alt-tab during game, used at least in alt-enter handling
|
|
|
|
Utils::Hook::Set<DWORD>(0x45ACE0, 0xC301B0);
|
|
|
|
|
|
|
|
// fs_basegame
|
|
|
|
Utils::Hook::Set<char*>(0x6431D1, "data");
|
|
|
|
|
2015-12-23 21:26:46 -05:00
|
|
|
// remove limit on IWD file loading
|
|
|
|
Utils::Hook::Set<BYTE>(0x642BF3, 0xEB);
|
|
|
|
|
2015-12-23 16:21:03 -05:00
|
|
|
// Disable UPNP
|
|
|
|
Utils::Hook::Nop(0x60BE24, 5);
|
|
|
|
|
|
|
|
// disable the IWNet IP detection (default 'got ipdetect' flag to 1)
|
|
|
|
Utils::Hook::Set<BYTE>(0x649D6F0, 1);
|
|
|
|
|
|
|
|
// Fix stats sleeping
|
|
|
|
Utils::Hook::Set<BYTE>(0x6832BA, 0xEB);
|
|
|
|
Utils::Hook::Set<BYTE>(0x4BD190, 0xC3);
|
|
|
|
|
2015-12-23 21:26:46 -05:00
|
|
|
// default sv_pure to 0
|
|
|
|
Utils::Hook::Set<BYTE>(0x4D3A74, 0);
|
|
|
|
|
2015-12-25 15:42:35 -05:00
|
|
|
// Force debug logging
|
|
|
|
Utils::Hook::Nop(0x4AA89F, 2);
|
|
|
|
Utils::Hook::Nop(0x4AA8A1, 6);
|
|
|
|
|
|
|
|
// Patch stats steamid
|
|
|
|
Utils::Hook::Nop(0x682EBF, 20);
|
|
|
|
Utils::Hook::Nop(0x6830B1, 20);
|
|
|
|
Utils::Hook(0x682EBF, QuickPatch::GetStatsID, HOOK_CALL).Install()->Quick();
|
|
|
|
Utils::Hook(0x6830B1, QuickPatch::GetStatsID, HOOK_CALL).Install()->Quick();
|
2015-12-23 08:45:53 -05:00
|
|
|
}
|
|
|
|
}
|