remove _b addresses

This commit is contained in:
quaK 2024-07-03 19:34:50 +03:00
parent b795ad3a75
commit 72e89f0014
43 changed files with 669 additions and 711 deletions

View File

@ -105,27 +105,27 @@ namespace auth
patches.emplace_back(a, b);
};
p(0x5CC014_b, 0x5CC057_b);
p(0x5CC0D4_b, 0x5CC12B_b);
p(0x5CC1D4_b, 0x5CC227_b);
p(0x5CC2C4_b, 0x5CC317_b);
p(0x5CC3B4_b, 0x5CC407_b);
p(0x5CE0C0_b, 0x5CE131_b); // party
p(0xD2F495_b, 0xD2F4F7_b);
p(0xD304FD_b, 0xD3053D_b);
p(0xDA8650_b, 0xDA86AF_b);
p(0xDA891E_b, 0xDA898A_b); // steamlobbycreatefail
p(0xDA8B1A_b, 0xDA8B86_b); // steamlobbyjoinfail
p(0xDBCF55_b, 0xDBCF95_b);
p(0x1405CC014, 0x1405CC057);
p(0x1405CC0D4, 0x1405CC12B);
p(0x1405CC1D4, 0x1405CC227);
p(0x1405CC2C4, 0x1405CC317);
p(0x1405CC3B4, 0x1405CC407);
p(0x1405CE0C0, 0x1405CE131); // party
p(0x140D2F495, 0x140D2F4F7);
p(0x140D304FD, 0x140D3053D);
p(0x140DA8650, 0x140DA86AF);
p(0x140DA891E, 0x140DA898A); // steamlobbycreatefail
p(0x140DA8B1A, 0x140DA8B86); // steamlobbyjoinfail
p(0x140DBCF55, 0x140DBCF95);
p(0x5CE425_b, 0x5CE466_b); // party
p(0xDA8516_b, 0xDA853C_b);
p(0xDA8C89_b, 0xDA8CCF_b);
p(0x1405CE425, 0x1405CE466); // party
p(0x140DA8516, 0x140DA853C);
p(0x140DA8C89, 0x140DA8CCF);
p(0x5CCD2B_b, 0x5CCDD7_b);
p(0x5CCF25_b, 0x5CCF71_b);
p(0xD30126_b, 0xD30172_b);
p(0xDA8D76_b, 0xDA8DE2_b);
p(0x1405CCD2B, 0x1405CCDD7);
p(0x1405CCF25, 0x1405CCF71);
p(0x140D30126, 0x140D30172);
p(0x140DA8D76, 0x140DA8DE2);
for (const auto& patch : patches)
{

View File

@ -8,34 +8,34 @@
namespace backflips
{
//returning 1 makes the game use the dvar value instead of hardcoded value
int use_view_pitch_dvars()
{
return 1;
}
int use_view_pitch_dvars()
{
return 1;
}
class component final : public component_interface
{
public:
public:
void post_unpack() override
{
utils::hook::call(0xB6E70A_b, use_view_pitch_dvars);
utils::hook::call(0x140B6E70A, use_view_pitch_dvars);
utils::hook::call(0x6F5CF0_b, use_view_pitch_dvars);
utils::hook::call(0x6F5D1A_b, use_view_pitch_dvars);
utils::hook::call(0x6E6823_b, use_view_pitch_dvars);
utils::hook::call(0x5B5BBB_b, use_view_pitch_dvars);
utils::hook::call(0x5B5BE0_b, use_view_pitch_dvars);
utils::hook::call(0x154E81_b, use_view_pitch_dvars);
utils::hook::call(0x154EA1_b, use_view_pitch_dvars);
utils::hook::call(0x5651E_b, use_view_pitch_dvars);
utils::hook::call(0x56555_b, use_view_pitch_dvars);
dvars::override::register_float("player_view_pitch_down", 85, 0, 360, game::DVAR_FLAG_SAVED);
dvars::override::register_float("player_view_pitch_up", 85, 0, 360, game::DVAR_FLAG_SAVED);
utils::hook::call(0x1406F5CF0, use_view_pitch_dvars);
utils::hook::call(0x1406F5D1A, use_view_pitch_dvars);
utils::hook::call(0x1406E6823, use_view_pitch_dvars);
utils::hook::call(0x1405B5BBB, use_view_pitch_dvars);
utils::hook::call(0x1405B5BE0, use_view_pitch_dvars);
utils::hook::call(0x140154E81, use_view_pitch_dvars);
utils::hook::call(0x140154EA1, use_view_pitch_dvars);
utils::hook::call(0x14005651E, use_view_pitch_dvars);
utils::hook::call(0x140056555, use_view_pitch_dvars);
dvars::override::register_float("player_view_pitch_down", 85, 0, 360, game::DVAR_FLAG_SAVED);
dvars::override::register_float("player_view_pitch_up", 85, 0, 360, game::DVAR_FLAG_SAVED);
}
};
}

View File

@ -57,7 +57,7 @@ namespace branding
}
}, scheduler::pipeline::renderer);
ui_get_formatted_build_number_hook.create(0xCD1170_b, ui_get_formatted_build_number_stub);
ui_get_formatted_build_number_hook.create(0x140CD1170, ui_get_formatted_build_number_stub);
}
};
}

View File

@ -11,7 +11,7 @@ namespace chat
{
game::GfxFont* ui_get_font_handle_stub()
{
const auto font = *reinterpret_cast<game::GfxFont**>(0x74CC850_b); // textFont
const auto font = *reinterpret_cast<game::GfxFont**>(0x1474CC850); // textFont
return font;
}
}
@ -22,9 +22,9 @@ namespace chat
void post_unpack() override
{
// use better font
utils::hook::call(0x35602C_b, ui_get_font_handle_stub); // con_drawsay
utils::hook::call(0x9A7843_b, ui_get_font_handle_stub); // cl_keys_draw_text_override_field
utils::hook::call(0x77D250_b, ui_get_font_handle_stub); // cg_drawmp_drawchatmessages
utils::hook::call(0x14035602C, ui_get_font_handle_stub); // con_drawsay
utils::hook::call(0x1409A7843, ui_get_font_handle_stub); // cl_keys_draw_text_override_field
utils::hook::call(0x14077D250, ui_get_font_handle_stub); // cg_drawmp_drawchatmessages
}
};
}

View File

@ -96,7 +96,7 @@ namespace colors
const size_t unk, const size_t unk2)
{
// CL_GetClientName (CL_GetClientNameAndClantag?)
const auto result = utils::hook::invoke<size_t>(0x9BDAF0_b, local_client_num, index, buf, size, unk, unk2);
const auto result = utils::hook::invoke<size_t>(0x1409BDAF0, local_client_num, index, buf, size, unk, unk2);
utils::string::strip(buf, buf, size);
@ -109,11 +109,11 @@ namespace colors
if (index == '8')
{
*color = *reinterpret_cast<DWORD*>(0x8B9D284_b);
*color = *reinterpret_cast<DWORD*>(0x148B9D284);
}
else if (index == '9')
{
*color = *reinterpret_cast<DWORD*>(0x8B9D288_b);
*color = *reinterpret_cast<DWORD*>(0x148B9D288);
}
else if (index == ':')
{
@ -121,7 +121,7 @@ namespace colors
}
else if (index == ';')
{
*color = *reinterpret_cast<DWORD*>(0x8B9D290_b);
*color = *reinterpret_cast<DWORD*>(0x148B9D290);
}
else if (index == '<')
{
@ -145,19 +145,19 @@ namespace colors
}
// allows colored name in-game
utils::hook::jump(0xCFA700_b, com_clean_name_stub, true);
utils::hook::jump(0x140CFA700, com_clean_name_stub, true);
// don't apply colors to overhead names
utils::hook::call(0x6843FE_b, get_client_name_stub);
utils::hook::call(0x1406843FE, get_client_name_stub);
// patch I_CleanStr
utils::hook::jump(0xCFACC0_b, i_clean_str_stub, true);
utils::hook::jump(0x140CFACC0, i_clean_str_stub, true);
// force new colors
utils::hook::jump(0xE570E0_b, rb_lookup_color_stub, true);
utils::hook::jump(0x140E570E0, rb_lookup_color_stub, true);
// prevent name mismatch check
utils::hook::set<uint8_t>(0x805C10_b, 0xC3);
utils::hook::set<uint8_t>(0x140805C10, 0xC3);
// add colors
add(0, 0, 0); // 0 - Black

View File

@ -79,8 +79,8 @@ namespace command
static std::string comand_line_buffer = GetCommandLineA();
auto* command_line = comand_line_buffer.data();
auto& com_num_console_lines = *reinterpret_cast<int*>(0x6006DB0_b);
auto* com_console_lines = reinterpret_cast<char**>(0x6006DC0_b);
auto& com_num_console_lines = *reinterpret_cast<int*>(0x146006DB0);
auto* com_console_lines = reinterpret_cast<char**>(0x146006DC0);
auto inq = false;
com_console_lines[0] = command_line;
@ -111,8 +111,8 @@ namespace command
void parse_startup_variables()
{
auto& com_num_console_lines = *reinterpret_cast<int*>(0x6006DB0_b);
auto* com_console_lines = reinterpret_cast<char**>(0x6006DC0_b);
auto& com_num_console_lines = *reinterpret_cast<int*>(0x146006DB0);
auto* com_console_lines = reinterpret_cast<char**>(0x146006DC0);
for (int i = 0; i < com_num_console_lines; i++)
{
@ -435,11 +435,11 @@ namespace command
public:
void post_unpack() override
{
utils::hook::jump(0xBB1DC0_b, dvar_command_stub, true);
client_command_mp_hook.create(0xB105D0_b, &client_command_mp);
client_command_sp_hook.create(0x483130_b, &client_command_sp);
utils::hook::jump(0x140BB1DC0, dvar_command_stub, true);
client_command_mp_hook.create(0x140B105D0, &client_command_mp);
client_command_sp_hook.create(0x140483130, &client_command_sp);
parse_commandline_hook.create(0xF2F67B_b, parse_commandline);
parse_commandline_hook.create(0x140F2F67B, parse_commandline);
add_commands();
}

View File

@ -71,7 +71,7 @@ namespace dedicated
void sync_gpu_stub(void* a1)
{
// R_SyncGpu
utils::hook::invoke<void>(0xE08AE0_b, a1);
utils::hook::invoke<void>(0x140E08AE0, a1);
std::this_thread::sleep_for(1ms);
}
@ -117,20 +117,20 @@ namespace dedicated
void init_dedicated_server()
{
// R_RegisterDvars
utils::hook::invoke<void>(0xDF62C0_b);
utils::hook::invoke<void>(0x140DF62C0);
// R_RegisterCmds
utils::hook::invoke<void>(0xDD7E50_b);
utils::hook::invoke<void>(0x140DD7E50);
// RB_Tonemap_RegisterDvars
utils::hook::invoke<void>(0x4B1320_b);
utils::hook::invoke<void>(0x1404B1320);
static bool initialized = false;
if (initialized) return;
initialized = true;
// R_LoadGraphicsAssets
utils::hook::invoke<void>(0xE06220_b);
utils::hook::invoke<void>(0x140E06220);
}
void initialize()
@ -230,7 +230,7 @@ namespace dedicated
// Disable frontend
//dvars::override::register_bool("frontEndSceneEnabled", false, game::DVAR_FLAG_READ);
utils::hook::set<uint8_t>(0x5AC8F0_b, 0xC3); // Com_FastFile_Frame_FrontEnd
utils::hook::set<uint8_t>(0x1405AC8F0, 0xC3); // Com_FastFile_Frame_FrontEnd
// Disable shader preload
dvars::override::register_bool("r_preloadShaders", false, game::DVAR_FLAG_READ);
@ -241,118 +241,117 @@ namespace dedicated
dvars::override::register_bool("intro", false, game::DVAR_FLAG_READ);
// Stop crashing from sys_errors
utils::hook::jump(0xD34180_b, sys_error_stub, true);
utils::hook::jump(0x140D34180, sys_error_stub, true);
// Is party dedicated
utils::hook::jump(0x5DFC10_b, party_is_server_dedicated_stub);
utils::hook::jump(0x1405DFC10, party_is_server_dedicated_stub);
// Make GScr_IsUsingMatchRulesData return 0 so the game doesn't override the cfg
utils::hook::jump(0xB53950_b, gscr_is_using_match_rules_data_stub);
utils::hook::jump(0x140B53950, gscr_is_using_match_rules_data_stub);
// Hook R_SyncGpu
utils::hook::call(0x3428B1_b, sync_gpu_stub);
utils::hook::call(0x1403428B1, sync_gpu_stub);
utils::hook::jump(0x341B60_b, init_dedicated_server, true);
utils::hook::jump(0x140341B60, init_dedicated_server, true);
// delay startup commands until the initialization is done
utils::hook::call(0xB8D20F_b, execute_startup_command);
utils::hook::call(0x140B8D20F, execute_startup_command);
utils::hook::nop(0xCDD5D3_b, 5); // don't load config file
utils::hook::nop(0xB7CE46_b, 5); // ^
utils::hook::set<uint8_t>(0xBB0930_b, 0xC3); // don't save config file
utils::hook::nop(0x140CDD5D3, 5); // don't load config file
utils::hook::nop(0x140B7CE46, 5); // ^
utils::hook::set<uint8_t>(0x140BB0930, 0xC3); // don't save config file
utils::hook::set<uint8_t>(0x9D49C0_b, 0xC3); // disable self-registration
utils::hook::set<uint8_t>(0xE574E0_b, 0xC3); // render thread
utils::hook::set<uint8_t>(0x3471A0_b, 0xC3); // called from Com_Frame, seems to do renderer stuff
utils::hook::set<uint8_t>(0x9AA9A0_b, 0xC3); // CL_CheckForResend, which tries to connect to the local server constantly
utils::hook::set<uint8_t>(0xD2EBB0_b, 0xC3); // recommended settings check
utils::hook::set<uint8_t>(0x1409D49C0, 0xC3); // disable self-registration
utils::hook::set<uint8_t>(0x140E574E0, 0xC3); // render thread
utils::hook::set<uint8_t>(0x1403471A0, 0xC3); // called from Com_Frame, seems to do renderer stuff
utils::hook::set<uint8_t>(0x1409AA9A0, 0xC3); // CL_CheckForResend, which tries to connect to the local server constantly
utils::hook::set<uint8_t>(0x140D2EBB0, 0xC3); // recommended settings check
utils::hook::nop(0xC5007B_b, 6); // unknown check in SV_ExecuteClientMessage
utils::hook::nop(0xC4F407_b, 3); // allow first slot to be occupied
utils::hook::nop(0x3429A7_b, 2); // properly shut down dedicated servers
utils::hook::nop(0x34296F_b, 2); // ^
utils::hook::set<uint8_t>(0xE08360_b, 0xC3); // don't shutdown renderer
utils::hook::nop(0x140C5007B, 6); // unknown check in SV_ExecuteClientMessage
utils::hook::nop(0x140C4F407, 3); // allow first slot to be occupied
utils::hook::nop(0x1403429A7, 2); // properly shut down dedicated servers
utils::hook::nop(0x14034296F, 2); // ^
utils::hook::set<uint8_t>(0x140E08360, 0xC3); // don't shutdown renderer
// SOUND patches
//utils::hook::nop(0xC93213_b, 5); // snd stream thread
//utils::hook::set<uint8_t>(0xC93206_b, 0); // snd_active
//utils::hook::set<uint8_t>(0xCB9150_b, 0xC3); // sound queue thing
//utils::hook::set<uint8_t>(0xC75550_b, 0xC3); // SD_AllocInit
//utils::hook::set<uint8_t>(0xC75CA0_b, 0xC3); // SD_Init
//utils::hook::nop(0x140C93213, 5); // snd stream thread
//utils::hook::set<uint8_t>(0x140C93206, 0); // snd_active
//utils::hook::set<uint8_t>(0x140CB9150, 0xC3); // sound queue thing
//utils::hook::set<uint8_t>(0x140C75550, 0xC3); // SD_AllocInit
//utils::hook::set<uint8_t>(0x140C75CA0, 0xC3); // SD_Init
utils::hook::set<uint8_t>(0xD597C0_b, 0xC3); // Voice_Init
utils::hook::set(0xCFDC40_b, 0xC3C033); // sound stream reading
utils::hook::set<uint8_t>(0x140D597C0, 0xC3); // Voice_Init
utils::hook::set(0x140CFDC40, 0xC3C033); // sound stream reading
// lookup the length from our list
snd_lookup_sound_length_hook.create(0xC9BCE0_b, snd_lookup_sound_length_stub);
snd_lookup_sound_length_hook.create(0x140C9BCE0, snd_lookup_sound_length_stub);
// check the sounddata when server is launched
start_server_hook.create(0xC56050_b, start_server_stub);
start_server_hook.create(0x140C56050, start_server_stub);
// IMAGE patches
// image stream (pak)
utils::hook::set<uint8_t>(0xA7DB10_b, 0xC3); // DB_CreateGfxImageStreamInternal
utils::hook::set<uint8_t>(0x140A7DB10, 0xC3); // DB_CreateGfxImageStreamInternal
// UI patches
utils::hook::set<uint8_t>(0x615090_b, 0xC3); // LUI_CoD_Init
utils::hook::set<uint8_t>(0x140615090, 0xC3); // LUI_CoD_Init
// IW7 patches
utils::hook::set(0xE06060_b, 0xC3C033); //utils::hook::set<uint8_t>(0xE06060_b, 0xC3); // directx
utils::hook::set(0xE05B80_b, 0xC3C033); //utils::hook::set<uint8_t>(0xE05B80_b, 0xC3); // ^
utils::hook::set(0xDD2760_b, 0xC3C033); //utils::hook::set<uint8_t>(0xDD2760_b, 0xC3); // ^
utils::hook::set(0xE05E20_b, 0xC3C033); //utils::hook::set<uint8_t>(0xE05E20_b, 0xC3); // ^ buffer
utils::hook::set(0xE11270_b, 0xC3C033); //utils::hook::set<uint8_t>(0xE11270_b, 0xC3); // ^
utils::hook::set(0xDD3C50_b, 0xC3C033); //utils::hook::set<uint8_t>(0xDD3C50_b, 0xC3); // ^
utils::hook::set(0x0C1210_b, 0xC3C033); //utils::hook::set<uint8_t>(0x0C1210_b, 0xC3); // ^ idk
utils::hook::set(0x0C12B0_b, 0xC3C033); //utils::hook::set<uint8_t>(0x0C12B0_b, 0xC3); // ^ idk
utils::hook::set(0xE423A0_b, 0xC3C033); //utils::hook::set<uint8_t>(0xE423A0_b, 0xC3); // directx
utils::hook::set(0xE04680_b, 0xC3C033); //utils::hook::set<uint8_t>(0xE04680_b, 0xC3); // ^
utils::hook::set(0x140E06060, 0xC3C033); // directx
utils::hook::set(0x140E05B80, 0xC3C033); // ^
utils::hook::set(0x140DD2760, 0xC3C033); // ^
utils::hook::set(0x140E05E20, 0xC3C033); // ^ buffer
utils::hook::set(0x140E11270, 0xC3C033); // ^
utils::hook::set(0x140DD3C50, 0xC3C033); // ^
utils::hook::set(0x1400C1210, 0xC3C033); // ^ idk
utils::hook::set(0x1400C12B0, 0xC3C033); // ^ idk
utils::hook::set(0x140E423A0, 0xC3C033); // directx
utils::hook::set(0x140E04680, 0xC3C033); // ^
utils::hook::set(0xE00ED0_b, 0xC3C033); //utils::hook::set<uint8_t>(0xE00ED0_b, 0xC3); // Image_Create1DTexture_PC
utils::hook::set(0xE00FC0_b, 0xC3C033); //utils::hook::set<uint8_t>(0xE00FC0_b, 0xC3); // Image_Create2DTexture_PC
utils::hook::set(0xE011A0_b, 0xC3C033); //utils::hook::set<uint8_t>(0xE011A0_b, 0xC3); // Image_Create3DTexture_PC
utils::hook::set(0xE015C0_b, 0xC3C033); //utils::hook::set<uint8_t>(0xE015C0_b, 0xC3); // Image_CreateCubeTexture_PC
utils::hook::set(0xE01300_b, 0xC3C033); //utils::hook::set<uint8_t>(0xE01300_b, 0xC3); // Image_CreateArrayTexture_PC
utils::hook::set(0x140E00ED0, 0xC3C033); // Image_Create1DTexture_PC
utils::hook::set(0x140E00FC0, 0xC3C033); // Image_Create2DTexture_PC
utils::hook::set(0x140E011A0, 0xC3C033); // Image_Create3DTexture_PC
utils::hook::set(0x140E015C0, 0xC3C033); // Image_CreateCubeTexture_PC
utils::hook::set(0x140E01300, 0xC3C033); // Image_CreateArrayTexture_PC
utils::hook::set(0x5F1EA0_b, 0xC3C033); //utils::hook::set<uint8_t>(0x5F1EA0_b, 0xC3); // renderer
utils::hook::set(0x0C1370_b, 0xC3C033); //utils::hook::set<uint8_t>(0x0C1370_b, 0xC3); // ^
utils::hook::set(0xDD26E0_b, 0xC3C033); //utils::hook::set<uint8_t>(0xDD26E0_b, 0xC3); // directx
utils::hook::set(0x5F0610_b, 0xC3C033); //utils::hook::set<uint8_t>(0x5F0610_b, 0xC3); // ^
utils::hook::set(0x5F0580_b, 0xC3C033); //utils::hook::set<uint8_t>(0x5F0580_b, 0xC3); // ^
utils::hook::set(0x5F0820_b, 0xC3C033); //utils::hook::set<uint8_t>(0x5F0820_b, 0xC3); // ^
utils::hook::set(0x5F0790_b, 0xC3C033); //utils::hook::set<uint8_t>(0x5F0790_b, 0xC3); // ^
utils::hook::set(0x1405F1EA0, 0xC3C033); // renderer
utils::hook::set(0x1400C1370, 0xC3C033); // ^
utils::hook::set(0x140DD26E0, 0xC3C033); // directx
utils::hook::set(0x1405F0610, 0xC3C033); // ^
utils::hook::set(0x1405F0580, 0xC3C033); // ^
utils::hook::set(0x1405F0820, 0xC3C033); // ^
utils::hook::set(0x1405F0790, 0xC3C033); // ^
utils::hook::set(0xDD42A0_b, 0xC3C033); // shutdown
utils::hook::set(0xDD42E0_b, 0xC3C033); // ^
utils::hook::set(0xDD42E0_b, 0xC3C033); // ^
utils::hook::set(0xDD4280_b, 0xC3C033); // ^
utils::hook::set(0x140DD42A0, 0xC3C033); // shutdown
utils::hook::set(0x140DD42E0, 0xC3C033); // ^
utils::hook::set(0x140DD4280, 0xC3C033); // ^
utils::hook::set(0xDD4230_b, 0xC3C033); // ^
utils::hook::set(0x140DD4230, 0xC3C033); // ^
// r_loadForRenderer
//utils::hook::set<uint8_t>(0xE114A0_b, 0xC3); // ^
//utils::hook::set<uint8_t>(0xE11380_b, 0xC3); // ^
//utils::hook::set<uint8_t>(0xE113D0_b, 0xC3); // ^
//utils::hook::set<uint8_t>(0xE476F0_b, 0xC3); // ^
//utils::hook::set<uint8_t>(0xE11420_b, 0xC3); // ^
//utils::hook::set<uint8_t>(0xDD2300_b, 0xC3); // ^
//utils::hook::set<uint8_t>(0xDD2610_b, 0xC3); // ^
//utils::hook::set<uint8_t>(0xE11F40_b, 0xC3); // ^
//utils::hook::set<uint8_t>(0x140E114A0, 0xC3); // ^
//utils::hook::set<uint8_t>(0x140E11380, 0xC3); // ^
//utils::hook::set<uint8_t>(0x140E113D0, 0xC3); // ^
//utils::hook::set<uint8_t>(0x140E476F0, 0xC3); // ^
//utils::hook::set<uint8_t>(0x140E11420, 0xC3); // ^
//utils::hook::set<uint8_t>(0x140DD2300, 0xC3); // ^
//utils::hook::set<uint8_t>(0x140DD2610, 0xC3); // ^
//utils::hook::set<uint8_t>(0x140E11F40, 0xC3); // ^
// skip R_GetFrameIndex check in DB_LoadLevelXAssets
utils::hook::set<uint8_t>(0x3B9E72_b, 0xEB);
utils::hook::set<uint8_t>(0x1403B9E72, 0xEB);
// don't release buffer
utils::hook::set<uint8_t>(0xDD4430_b, 0xC3);
utils::hook::set<uint8_t>(0x140DD4430, 0xC3);
// R_LoadWorld
utils::hook::set<uint8_t>(0xDD14C0_b, 0xC3);
utils::hook::set<uint8_t>(0x140DD14C0, 0xC3);
// something to do with vls?
utils::hook::set<uint8_t>(0xD02CB0_b, 0xC3);
utils::hook::set<uint8_t>(0x140D02CB0, 0xC3);
// recipe save threads
utils::hook::set<uint8_t>(0xE7C970_b, 0xC3);
utils::hook::set<uint8_t>(0x140E7C970, 0xC3);
// set game mode
scheduler::once([]()

View File

@ -501,32 +501,32 @@ namespace demonware
void post_unpack() override
{
#ifdef DW_DEBUG
//utils::hook::jump(0x1285040_b, bd_logger_stub, true);
//utils::hook::jump(0x141285040, bd_logger_stub, true);
#endif
utils::hook::set<uint8_t>(0xB5BB96F_b, 0x0); // CURLOPT_SSL_VERIFYPEER
utils::hook::set<uint8_t>(0xB7C6CB1_b, 0xAF); // CURLOPT_SSL_VERIFYHOST
utils::hook::set<uint8_t>(0x15E4650_b, 0x0); // HTTPS -> HTTP
utils::hook::set<uint8_t>(0x14B5BB96F, 0x0); // CURLOPT_SSL_VERIFYPEER
utils::hook::set<uint8_t>(0x14B7C6CB1, 0xAF); // CURLOPT_SSL_VERIFYHOST
utils::hook::set<uint8_t>(0x1415E4650, 0x0); // HTTPS -> HTTP
utils::hook::copy_string(0x15E8010_b, "http://dev.umbrella.demonware.net");
utils::hook::copy_string(0x15E8038_b, "http://cert.umbrella.demonware.net");
utils::hook::copy_string(0x15E8060_b, "http://prod.umbrella.demonware.net");
utils::hook::copy_string(0x15E8418_b, "http://dev.uno.demonware.net/v1.0");
utils::hook::copy_string(0x15E8440_b, "http://cert.uno.demonware.net/v1.0");
utils::hook::copy_string(0x15E8468_b, "http://prod.uno.demonware.net/v1.0");
utils::hook::copy_string(0x15E3600_b, "http://%s:%d/auth/");
utils::hook::copy_string(0x1415E8010, "http://dev.umbrella.demonware.net");
utils::hook::copy_string(0x1415E8038, "http://cert.umbrella.demonware.net");
utils::hook::copy_string(0x1415E8060, "http://prod.umbrella.demonware.net");
utils::hook::copy_string(0x1415E8418, "http://dev.uno.demonware.net/v1.0");
utils::hook::copy_string(0x1415E8440, "http://cert.uno.demonware.net/v1.0");
utils::hook::copy_string(0x1415E8468, "http://prod.uno.demonware.net/v1.0");
utils::hook::copy_string(0x1415E3600, "http://%s:%d/auth/");
// Skip bdAuth::validateResponseSignature
utils::hook::set(0x129D200_b, 0xC301B0); // bdRSAKey::importKey
utils::hook::set(0x129D360_b, 0xC300000001B8); // bdRSAKey::verifySignatureSHA256
utils::hook::set(0x14129D200, 0xC301B0); // bdRSAKey::importKey
utils::hook::set(0x14129D360, 0xC300000001B8); // bdRSAKey::verifySignatureSHA256
// Remove Online_PatchStreamer checks
utils::hook::set<uint8_t>(0x52A6D0_b, 0xC3);
utils::hook::set(0x52AB60_b, 0xC300000001B8);
utils::hook::set(0x52B800_b, 0xC300000001B8);
utils::hook::set<uint8_t>(0x14052A6D0, 0xC3);
utils::hook::set(0x14052AB60, 0xC300000001B8);
utils::hook::set(0x14052B800, 0xC300000001B8);
// Remove Online_Dailylogin check
utils::hook::set(0x533390_b, 0xC300000001B8);
utils::hook::set(0x140533390, 0xC300000001B8);
// Increase Demonware connection timeouts
dvars::override::register_int("demonwareConsideredConnectedTime", 300000, 0, 0x7FFFFFFF, 0x0); // 5s -> 5min

View File

@ -72,6 +72,11 @@ namespace discord
void update_discord_frontend()
{
discord_presence.details = game::G_GAME_MODE_STRINGS_FORMATTED[game::Com_GameMode_GetActiveGameMode()];
if (game::Com_GameMode_GetActiveGameMode() == game::GAME_MODE_NONE)
{
discord_presence.details = game::G_GAME_MODE_STRINGS_FORMATTED[game::GAME_MODE_MP];
}
discord_presence.startTimestamp = 0;
/*

View File

@ -107,17 +107,17 @@ namespace dvar_cheats
// if we get here, we are non-zero source and CANNOT set values
a.popad64(); // if I do this before the jz it won't work. for some reason the popad64 is affecting the ZR flag
a.jmp(0xCEDBDF_b);
a.jmp(0x140CEDBDF);
// if we get here, we are non-zero source and CAN set values
a.bind(can_set_value);
a.popad64(); // if I do this before the jz it won't work. for some reason the popad64 is affecting the ZR flag
a.cmp(esi, 1);
a.jmp(0xCED8EE_b);
a.jmp(0x140CED8EE);
// if we get here, we are zero source and ignore flags
a.bind(zero_source);
a.jmp(0xCED97A_b);
a.jmp(0x140CED97A);
});
}
@ -126,8 +126,8 @@ namespace dvar_cheats
public:
void post_unpack() override
{
utils::hook::nop(0xCED8D4_b, 8); // let our stub handle zero-source sets
utils::hook::jump(0xCED8DF_b, get_dvar_flag_checks_stub(), true); // check extra dvar flags when setting values
utils::hook::nop(0x140CED8D4, 8); // let our stub handle zero-source sets
utils::hook::jump(0x140CED8DF, get_dvar_flag_checks_stub(), true); // check extra dvar flags when setting values
scheduler::once([]
{

View File

@ -377,17 +377,17 @@ namespace dvars
public:
void post_unpack() override
{
dvar_register_bool_hook.create(0xCEB380_b, &dvar_register_bool);
dvar_register_float_hook.create(0xCEB890_b, &dvar_register_float);
dvar_register_int_hook.create(0xCEB920_b, &dvar_register_int);
dvar_register_string_hook.create(0xCEBD50_b, &dvar_register_string);
dvar_register_vector2_hook.create(0xCEBF50_b, &dvar_register_vector2);
dvar_register_vector3_hook.create(0xCEBFE0_b, &dvar_register_vector3);
dvar_register_bool_hook.create(0x140CEB380, &dvar_register_bool);
dvar_register_float_hook.create(0x140CEB890, &dvar_register_float);
dvar_register_int_hook.create(0x140CEB920, &dvar_register_int);
dvar_register_string_hook.create(0x140CEBD50, &dvar_register_string);
dvar_register_vector2_hook.create(0x140CEBF50, &dvar_register_vector2);
dvar_register_vector3_hook.create(0x140CEBFE0, &dvar_register_vector3);
dvar_register_new_hook.create(0xCEBA60_b, dvar_register_new);
dvar_re_register_hook.create(0xCEC210_b, dvar_re_register);
dvar_de_register_hook.create(0xCE9F30_b, dvar_de_register);
dvar_register_variant_hook.create(0xCEBDD0_b, dvar_register_variant);
dvar_register_new_hook.create(0x140CEBA60, dvar_register_new);
dvar_re_register_hook.create(0x140CEC210, dvar_re_register);
dvar_de_register_hook.create(0x140CE9F30, dvar_de_register);
dvar_register_variant_hook.create(0x140CEBDD0, dvar_register_variant);
}
component_priority priority() override

View File

@ -146,17 +146,17 @@ namespace fastfiles
a.bind(original);
//a.popad64();
a.call(0x3BC450_b); // strnicmp_ffotd
a.call(0x1403BC450); // strnicmp_ffotd
a.mov(r12d, edi);
a.mov(rdx, 0x1467970_b); // "patch_"
a.jmp(0x3BA9C0_b);
a.mov(rdx, 0x141467970); // "patch_"
a.jmp(0x1403BA9C0);
a.bind(skip);
//a.popad64();
a.mov(r12d, game::DB_ZONE_CUSTOM);
a.not_(r12d);
a.and_(edi, r12d);
a.jmp(0x3BAC06_b);
a.jmp(0x1403BAC06);
}
}
using namespace zone_loading;
@ -181,29 +181,29 @@ namespace fastfiles
public:
void post_unpack() override
{
db_try_load_x_file_internal_hook.create(0x3BBC40_b, db_try_load_x_file_internal_stub);
db_try_load_x_file_internal_hook.create(0x1403BBC40, db_try_load_x_file_internal_stub);
#if defined(DEBUG) and defined(XFILE_DEBUG)
db_init_load_x_file_hook.create(0x9E8D10_b, db_init_load_x_file_stub);
db_init_load_x_file_hook.create(0x1409E8D10, db_init_load_x_file_stub);
#else
db_load_x_zone_hook.create(0x3BA920_b, db_load_x_zone_stub);
db_load_x_zone_hook.create(0x1403BA920, db_load_x_zone_stub);
#endif
db_find_xasset_header_hook.create(game::DB_FindXAssetHeader, db_find_xasset_header_stub);
db_add_xasset_hook.create(0xA76520_b, db_add_xasset_stub);
db_add_xasset_hook.create(0x140A76520, db_add_xasset_stub);
g_dump_scripts = game::Dvar_RegisterBool("g_dumpScripts", false, game::DVAR_FLAG_NONE, "Dump GSC scripts");
// Don't fatal on certain missing zones
db_is_patch_hook.create(0x3BC580_b, db_is_patch_stub);
db_is_patch_hook.create(0x1403BC580, db_is_patch_stub);
// Don't load extra zones with loadzone
utils::hook::nop(0x3BA9B1_b, 15);
utils::hook::jump(0x3BA9B1_b, utils::hook::assemble(skip_extra_zones_stub), true);
utils::hook::nop(0x1403BA9B1, 15);
utils::hook::jump(0x1403BA9B1, utils::hook::assemble(skip_extra_zones_stub), true);
// Allow loading of unsigned fastfiles
utils::hook::set<uint8_t>(0x9E8CAE_b, 0xEB); // DB_InflateInit
utils::hook::set<uint8_t>(0x1409E8CAE, 0xEB); // DB_InflateInit
// Skip signature validation
utils::hook::set(0x9E6390_b, 0xC301B0);
utils::hook::set(0x1409E6390, 0xC301B0);
command::add("loadzone", [](const command::params& params)
{

View File

@ -29,7 +29,7 @@ namespace filesystem
void fs_display_path()
{
console::info("Current language: %s\n", game::SEH_GetLanguageName(*reinterpret_cast<int*>(0x74C6420_b)));
console::info("Current language: %s\n", game::SEH_GetLanguageName(*reinterpret_cast<int*>(0x1474C6420)));
console::info("Current search paths:\n");
if (game::fs_searchpaths.get())
@ -243,13 +243,13 @@ namespace filesystem
public:
void post_unpack() override
{
fs_startup_hook.create(0xCDD800_b, fs_startup_stub);
fs_build_os_path_hook.create(0xCDBBF0_b, fs_build_os_path_stub);
fs_startup_hook.create(0x140CDD800, fs_startup_stub);
fs_build_os_path_hook.create(0x140CDBBF0, fs_build_os_path_stub);
utils::hook::jump(0xCFE5E0_b, sys_default_install_path_stub);
utils::hook::jump(0x140CFE5E0, sys_default_install_path_stub);
// fs_game flags
utils::hook::set<uint32_t>(0xCDD415_b, 0);
utils::hook::set<uint32_t>(0x140CDD415, 0);
}
};
}

View File

@ -13,8 +13,8 @@ namespace fx
void post_unpack() override
{
// skip "fx/" and "vfx/" name prefix checks
utils::hook::set<uint8_t>(0xB34889_b, 0xEB); // Scr_LoadFx
utils::hook::nop(0xD0FBFD_b, 2); // ParticleSystem_Register
utils::hook::set<uint8_t>(0x140B34889, 0xEB); // Scr_LoadFx
utils::hook::nop(0x140D0FBFD, 2); // ParticleSystem_Register
}
};
}

View File

@ -41,15 +41,15 @@ namespace gameplay
a.pop(rax);
a.jz(no_bounce);
a.jmp(0x70FBF0_b);
a.jmp(0x14070FBF0);
a.bind(no_bounce);
a.cmp(ptr(rsp, 0x44), r14d);
a.jnz(loc_70FB6F);
a.jmp(0x70FBE1_b);
a.jmp(0x14070FBE1);
a.bind(loc_70FB6F);
a.jmp(0x70FB6F_b);
a.jmp(0x14070FB6F);
});
}
@ -63,7 +63,7 @@ namespace gameplay
return utils::hook::assemble([](utils::hook::assembler& a)
{
// do moveSpeedScaleMultiplier first (xmm0)
a.call(0xBB3030_b);
a.call(0x140BB3030);
a.mov(ptr(rdi, 0x32C), eax);
// get bg_gravity as int
@ -74,7 +74,7 @@ namespace gameplay
a.mov(dword_ptr(rdi, 0x78), eax);
a.popad64();
a.jmp(0xAFA342_b);
a.jmp(0x140AFA342);
});
}
@ -84,7 +84,7 @@ namespace gameplay
{
a.push(rax);
a.mov(rax, qword_ptr(reinterpret_cast<int64_t>(&*reinterpret_cast<game::dvar_t**>(0x3C98330_b))));
a.mov(rax, qword_ptr(reinterpret_cast<int64_t>(&*reinterpret_cast<game::dvar_t**>(0x143C98330))));
a.mov(eax, dword_ptr(rax, 0x10));
a.mov(dword_ptr(rdi, 0x7C), eax);
@ -95,14 +95,14 @@ namespace gameplay
a.mov(eax, ptr(rdi, 0x1FD4));
a.add(eax, ptr(rdi, 0x1FD0));
a.jmp(0xAFB1EC_b);
a.jmp(0x140AFB1EC);
});
}
void cg_calculate_weapon_movement_debug_stub(game::cg_s* glob, float* origin)
{
// Retrieve the hook value
float value = utils::hook::invoke<float>(0x889B60_b, glob, origin);
float value = utils::hook::invoke<float>(0x140889B60, glob, origin);
// Initialize values
float valueX = -6.0f * value;
@ -144,27 +144,27 @@ namespace gameplay
{
// Implement ejection dvar
dvars::bg_playerEjection = game::Dvar_RegisterBool("bg_playerEjection", true, game::DVAR_FLAG_REPLICATED, "Flag whether player ejection is on or off");
stuck_in_client_hook.create(0xAFD9B0_b, stuck_in_client_stub);
stuck_in_client_hook.create(0x140AFD9B0, stuck_in_client_stub);
// Implement bounces dvar
dvars::bg_bounces = game::Dvar_RegisterBool("bg_bounces", false, game::DVAR_FLAG_REPLICATED, "Enables bounces");
utils::hook::jump(0x70FBB7_b, bg_bounces_stub(), true);
utils::hook::jump(0x14070FBB7, bg_bounces_stub(), true);
// Modify gravity dvar
dvars::override::register_float("bg_gravity", 800, 0, 1000, 0xC0 | game::DVAR_FLAG_REPLICATED);
utils::hook::nop(0xAFA330_b, 18);
utils::hook::jump(0xAFA330_b, bg_gravity_stub(), true);
utils::hook::nop(0x140AFA330, 18);
utils::hook::jump(0x140AFA330, bg_gravity_stub(), true);
// Modify speed dvar
dvars::override::register_int("g_speed", 190, 0x80000000, 0x7FFFFFFF, 0xC0 | game::DVAR_FLAG_REPLICATED);
utils::hook::nop(0xAFB1DF_b, 13);
utils::hook::jump(0xAFB1DF_b, g_speed_stub(), true);
utils::hook::nop(0x140AFB1DF, 13);
utils::hook::jump(0x140AFB1DF, g_speed_stub(), true);
// Implement gun position dvars
dvars::cg_gun_x = game::Dvar_RegisterFloat("cg_gun_x", 0.0f, -800.0f, 800.0f, game::DvarFlags::DVAR_FLAG_NONE, "Forward position of the viewmodel");
dvars::cg_gun_y = game::Dvar_RegisterFloat("cg_gun_y", 0.0f, -800.0f, 800.0f, game::DvarFlags::DVAR_FLAG_NONE, "Right position of the viewmodel");
dvars::cg_gun_z = game::Dvar_RegisterFloat("cg_gun_z", 0.0f, -800.0f, 800.0f, game::DvarFlags::DVAR_FLAG_NONE, "Up position of the viewmodel");
utils::hook::jump(0x8D5930_b, cg_calculate_weapon_movement_debug_stub);
utils::hook::jump(0x1408D5930, cg_calculate_weapon_movement_debug_stub);
}
};
}

View File

@ -31,37 +31,6 @@ namespace gsc
bool force_error_print = false;
std::optional<std::string> gsc_error_msg;
std::array<const char*, 27> var_typename =
{
"undefined",
"object",
"string",
"localized string",
"vector",
"float",
"int",
"codepos",
"precodepos",
"function",
"builtin function",
"builtin method",
"stack",
"animation",
"pre animation",
"thread",
"thread",
"thread",
"thread",
"struct",
"removed entity",
"entity",
"array",
"removed thread",
"<free>",
"thread list",
"endon list",
};
void scr_emit_function_stub(std::uint32_t filename, std::uint32_t thread_name, char* code_pos)
{
current_filename = filename;
@ -133,7 +102,7 @@ namespace gsc
return value->u.pointerValue;
}
scr_error(va("Type %s is not an object", var_typename[value->type]));
scr_error(va("Type %s is not an object", scripting::var_typename[value->type]));
}
scr_error(va("Parameter %u does not exist", index + 1));
@ -168,7 +137,7 @@ namespace gsc
return value->u.stringValue;
}
scr_error(va("Type %s is not a localized string", var_typename[value->type]));
scr_error(va("Type %s is not a localized string", scripting::var_typename[value->type]));
}
scr_error(va("Parameter %u does not exist", index + 1));
@ -205,7 +174,7 @@ namespace gsc
return;
}
scr_error(va("Type %s is not a vector", var_typename[value->type]));
scr_error(va("Type %s is not a vector", scripting::var_typename[value->type]));
}
scr_error(va("Parameter %u does not exist", index + 1));
@ -221,7 +190,7 @@ namespace gsc
return value->u.intValue;
}
scr_error(va("Type %s is not an int", var_typename[value->type]));
scr_error(va("Type %s is not an int", scripting::var_typename[value->type]));
}
scr_error(va("Parameter %u does not exist", index + 1));
@ -243,7 +212,7 @@ namespace gsc
return static_cast<float>(value->u.intValue);
}
scr_error(va("Type %s is not a float", var_typename[value->type]));
scr_error(va("Type %s is not a float", scripting::var_typename[value->type]));
}
scr_error(va("Parameter %u does not exist", index + 1));
@ -259,7 +228,7 @@ namespace gsc
return static_cast<int>(game::GetObjectType((game::scr_VmPub->top - index)->u.uintValue));
}
scr_error(va("Type %s is not an object", var_typename[(game::scr_VmPub->top - index)->type]));
scr_error(va("Type %s is not an object", scripting::var_typename[(game::scr_VmPub->top - index)->type]));
}
scr_error(va("Parameter %u does not exist", index + 1));
@ -281,7 +250,7 @@ namespace gsc
{
if (index < game::scr_VmPub->outparamcount)
{
return var_typename[(game::scr_VmPub->top - index)->type];
return scripting::var_typename[(game::scr_VmPub->top - index)->type];
}
scr_error(va("Parameter %u does not exist", index + 1));
@ -390,7 +359,7 @@ namespace gsc
console::warn("*********** script runtime error *************\n");
const auto opcode_id = *reinterpret_cast<std::uint8_t*>(0x6B22940_b);
const auto opcode_id = *reinterpret_cast<std::uint8_t*>(0x146B22940);
const std::string error_str = gsc_error_msg.has_value()
? utils::string::va(": %s", gsc_error_msg.value().data())
: "";
@ -431,7 +400,7 @@ namespace gsc
console::error("vm_error: %s\n", err.what());
}
utils::hook::invoke<void>(0x510C80_b, mark_pos);
utils::hook::invoke<void>(0x140510C80, mark_pos);
}
void scr_error_internal_stub()
@ -481,28 +450,28 @@ namespace gsc
public:
void post_unpack() override
{
scr_emit_function_hook.create(0xBFCF90_b, &scr_emit_function_stub);
scr_emit_function_hook.create(0x140BFCF90, &scr_emit_function_stub);
scr_error_internal_hook.create(game::Scr_ErrorInternal, scr_error_internal_stub);
utils::hook::call(0xC0F8C1_b, vm_error_stub); // LargeLocalResetToMark
utils::hook::call(0x140C0F8C1, vm_error_stub); // LargeLocalResetToMark
utils::hook::call(0xBFCF3A_b, compile_error_stub); // CompileError (LinkFile)
utils::hook::call(0xBFCF86_b, compile_error_stub); // ^
utils::hook::call(0xBFD06F_b, find_variable_stub); // Scr_EmitFunction
utils::hook::call(0x140BFCF3A, compile_error_stub); // CompileError (LinkFile)
utils::hook::call(0x140BFCF86, compile_error_stub); // ^
utils::hook::call(0x140BFD06F, find_variable_stub); // Scr_EmitFunction
// Restore basic error messages for commonly used scr functions
utils::hook::jump(0xC0BA10_b, scr_get_object);
utils::hook::jump(0xC0B4C0_b, scr_get_const_string);
utils::hook::jump(0xC0B270_b, scr_get_const_istring);
utils::hook::jump(0xB52210_b, scr_validate_localized_string_ref);
utils::hook::jump(0xC0BF40_b, scr_get_vector);
utils::hook::jump(0xC0B950_b, scr_get_int);
utils::hook::jump(0xC0B7E0_b, scr_get_float);
utils::hook::jump(0x140C0BA10, scr_get_object);
utils::hook::jump(0x140C0B4C0, scr_get_const_string);
utils::hook::jump(0x140C0B270, scr_get_const_istring);
utils::hook::jump(0x140B52210, scr_validate_localized_string_ref);
utils::hook::jump(0x140C0BF40, scr_get_vector);
utils::hook::jump(0x140C0B950, scr_get_int);
utils::hook::jump(0x140C0B7E0, scr_get_float);
utils::hook::jump(0xC0BC00_b, scr_get_pointer_type);
utils::hook::jump(0xC0BDE0_b, scr_get_type);
utils::hook::jump(0xC0BE50_b, scr_get_type_name);
utils::hook::jump(0x140C0BC00, scr_get_pointer_type);
utils::hook::jump(0x140C0BDE0, scr_get_type);
utils::hook::jump(0x140C0BE50, scr_get_type_name);
}
};
}

View File

@ -152,7 +152,7 @@ namespace gsc
a.pop(ecx);
a.popad64();
a.jmp(0xC0E8F2_b);
a.jmp(0x140C0E8F2);
}
void print(const function_args& args)
@ -205,7 +205,7 @@ namespace gsc
a.inc(rsi);
a.mov(dword_ptr(rbp, 0x94), r15d);
a.jmp(0xC0D0B2_b);
a.jmp(0x140C0D0B2);
a.bind(replace);
@ -295,21 +295,21 @@ namespace gsc
developer_script = game::Dvar_RegisterBool("developer_script", false, 0, "Enable developer script comments");
#endif
utils::hook::set<uint32_t>(0xBFD16B_b + 1, func_table_count); // change builtin func count
utils::hook::set<uint32_t>(0xBFD172_b + 4, static_cast<uint32_t>(reverse_b((&func_table))));
utils::hook::inject(0xBFD5A1_b + 3, &func_table);
utils::hook::set<uint32_t>(0xBFD595_b + 2, sizeof(func_table));
utils::hook::nop(0xC0E5CE_b, 7);
utils::hook::call(0xC0E5CE_b, vm_call_builtin_function_internal);
utils::hook::set<uint32_t>(0x140BFD16B + 1, func_table_count); // change builtin func count
utils::hook::set<uint32_t>(0x140BFD172 + 4, static_cast<uint32_t>(reverse_b((&func_table))));
utils::hook::inject(0x140BFD5A1 + 3, &func_table);
utils::hook::set<uint32_t>(0x140BFD595 + 2, sizeof(func_table));
utils::hook::nop(0x140C0E5CE, 7);
utils::hook::call(0x140C0E5CE, vm_call_builtin_function_internal);
utils::hook::set<uint32_t>(0xBFD182_b + 4, static_cast<uint32_t>(reverse_b((&meth_table))));
utils::hook::inject(0xBFD5AF_b + 3, &meth_table);
utils::hook::set<uint32_t>(0xBFD5B6_b + 2, sizeof(meth_table));
utils::hook::nop(0xC0E8EB_b, 14); // nop the lea & call at the end of call_builtin_method
utils::hook::jump(0xC0E8EB_b, utils::hook::assemble(vm_call_builtin_method_stub));
utils::hook::call(0xC0E8F2_b, vm_call_builtin_method_internal);
utils::hook::set<uint32_t>(0x140BFD182 + 4, static_cast<uint32_t>(reverse_b((&meth_table))));
utils::hook::inject(0x140BFD5AF + 3, &meth_table);
utils::hook::set<uint32_t>(0x140BFD5B6 + 2, sizeof(meth_table));
utils::hook::nop(0x140C0E8EB, 14); // nop the lea & call at the end of call_builtin_method
utils::hook::jump(0x140C0E8EB, utils::hook::assemble(vm_call_builtin_method_stub));
utils::hook::call(0x140C0E8F2, vm_call_builtin_method_internal);
utils::hook::jump(0xC0D0A4_b, utils::hook::assemble(vm_execute_stub), true);
utils::hook::jump(0x140C0D0A4, utils::hook::assemble(vm_execute_stub), true);
/*
if (game::environment::is_dedi())

View File

@ -465,29 +465,29 @@ namespace gsc
void post_unpack() override
{
// Allocate script memory (PMem doesn't work)
db_alloc_x_zone_memory_internal_hook.create(0xA75450_b, db_alloc_x_zone_memory_internal_stub);
db_alloc_x_zone_memory_internal_hook.create(0x140A75450, db_alloc_x_zone_memory_internal_stub);
// Increase allocated script memory
utils::hook::set<uint32_t>(0xA75B5C_b + 1, 0x480000 + static_cast<std::uint32_t>(script_memory.size));
utils::hook::set<uint32_t>(0xA75BAA_b + 4, 0x480 + (static_cast<std::uint32_t>(script_memory.size) >> 12));
utils::hook::set<uint32_t>(0xA75BBE_b + 6, 0x480 + (static_cast<std::uint32_t>(script_memory.size) >> 12));
utils::hook::set<uint32_t>(0x140A75B5C + 1, 0x480000 + static_cast<std::uint32_t>(script_memory.size));
utils::hook::set<uint32_t>(0x140A75BAA + 4, 0x480 + (static_cast<std::uint32_t>(script_memory.size) >> 12));
utils::hook::set<uint32_t>(0x140A75BBE + 6, 0x480 + (static_cast<std::uint32_t>(script_memory.size) >> 12));
// Load our scripts with an uncompressed stack
utils::hook::call(0xC09DA7_b, db_get_raw_buffer_stub);
utils::hook::call(0x140C09DA7, db_get_raw_buffer_stub);
// Compiler start and cleanup, also loads scripts
scr_begin_load_scripts_hook.create(0xBFD500_b, scr_begin_load_scripts_stub);
scr_end_load_scripts_hook.create(0xBFD630_b, scr_end_load_scripts_stub);
scr_begin_load_scripts_hook.create(0x140BFD500, scr_begin_load_scripts_stub);
scr_end_load_scripts_hook.create(0x140BFD630, scr_end_load_scripts_stub);
// ProcessScript: hook xasset functions to return our own custom scripts
utils::hook::call(0xC09D37_b, find_script);
utils::hook::call(0xC09D47_b, db_is_x_asset_default);
utils::hook::call(0x140C09D37, find_script);
utils::hook::call(0x140C09D47, db_is_x_asset_default);
// execute main handle
g_load_structs_hook.create(0x409FB0_b, g_load_structs_stub);
g_load_structs_hook.create(0x140409FB0, g_load_structs_stub);
// execute init handle
scr_load_level_hook.create(0xB51B40_b, scr_load_level_stub);
scr_load_level_hook.create(0x140B51B40, scr_load_level_stub);
scripting::on_shutdown([](bool free_scripts, bool post_shutdown)
{

View File

@ -54,7 +54,7 @@ namespace input
{
binding = binding + 1;
}
utils::hook::invoke<void>(0x35DFB0_b, local_client_num, binding, key, 1); // CL_InputMP_ExecBinding
utils::hook::invoke<void>(0x14035DFB0, local_client_num, binding, key, 1); // CL_InputMP_ExecBinding
}
}
@ -179,20 +179,20 @@ namespace input
return;
}
cl_char_event_hook.create(0x9A7350_b, cl_char_event_stub);
cl_key_event_hook.create(0x9A7980_b, cl_key_event_stub);
cl_char_event_hook.create(0x1409A7350, cl_char_event_stub);
cl_key_event_hook.create(0x1409A7980, cl_key_event_stub);
custom_binds.push_back("+actionslot 8");
custom_binds.push_back("-actionslot 8");
// write all bindings to config file
utils::hook::jump(0x9A9F70_b, key_write_bindings_to_buffer_stub);
utils::hook::jump(0x1409A9F70, key_write_bindings_to_buffer_stub);
// links a custom command to an index
utils::hook::jump(0x9A8EA0_b, key_get_binding_for_cmd_stub);
utils::hook::jump(0x1409A8EA0, key_get_binding_for_cmd_stub);
// execute custom binds
cl_execute_key_hook.create(0x32A3B0_b, &cl_execute_key_stub);
cl_execute_key_hook.create(0x14032A3B0, &cl_execute_key_stub);
}
};
}

View File

@ -35,7 +35,7 @@ namespace intro
public:
void post_unpack() override
{
cinematic_start_playback_hook.create(0xDD6A10_b, cinematic_start_playback);
cinematic_start_playback_hook.create(0x140DD6A10, cinematic_start_playback);
}
};
}

View File

@ -50,7 +50,7 @@ namespace localized_strings
void post_unpack() override
{
// Change some localized strings
seh_string_ed_get_string_hook.create(0xCBBB10_b, &seh_string_ed_get_string);
seh_string_ed_get_string_hook.create(0x140CBBB10, &seh_string_ed_get_string);
}
};
}

View File

@ -99,13 +99,13 @@ namespace logger
a.call_aligned(com_init_pre);
a.popad64();
a.call(0xB8EF90_b);
a.call(0x140B8EF90);
a.pushad64();
a.call_aligned(com_init_post);
a.popad64();
a.jmp(0xD4D8DD_b);
a.jmp(0x140D4D8DD);
}
}
@ -115,20 +115,20 @@ namespace logger
void post_unpack() override
{
// Sys_Print
utils::hook::call(0xC6E57A_b, sys_print_stub); // SV_SpawnServer: completed\n
utils::hook::call(0xC13641_b, sys_print_stub); // SV_CmdsSP_MapRestart: completed\n
utils::hook::jump(0x519772_b, sys_print_stub); // OnlineAutoTest:: Map load success. Server is listen.\n
utils::hook::call(0xB712BA_b, sys_print_stub); // G_SaveError
utils::hook::call(0x140C6E57A, sys_print_stub); // SV_SpawnServer: completed\n
utils::hook::call(0x140C13641, sys_print_stub); // SV_CmdsSP_MapRestart: completed\n
utils::hook::jump(0x140519772, sys_print_stub); // OnlineAutoTest:: Map load success. Server is listen.\n
utils::hook::call(0x140B712BA, sys_print_stub); // G_SaveError
// Com_Printf
utils::hook::jump(0x343080_b, print_info);
utils::hook::jump(0x140343080, print_info);
utils::hook::jump(0xD4D8D8_b, utils::hook::assemble(com_init_stub), false);
utils::hook::jump(0x140D4D8D8, utils::hook::assemble(com_init_stub), false);
if (!game::environment::is_dedi())
{
// R_WarnOncePerFrame
utils::hook::call(0xE4B121_b, r_warn_once_per_frame_vsnprintf_stub);
utils::hook::call(0x140E4B121, r_warn_once_per_frame_vsnprintf_stub);
}
}
};

View File

@ -45,7 +45,7 @@ namespace lui
"Print LUI DebugPrint to console. (DEV)");
// LUI_Interface_DebugPrint
utils::hook::jump(0x61C430_b, print_debug_lui);
utils::hook::jump(0x14061C430, print_debug_lui);
command::add("luiOpenMenu", [](const command::params& params)
{

View File

@ -171,7 +171,7 @@ namespace map_rotation
command::add("map_rotate", &perform_map_rotation);
// Hook GScr_ExitLevel
utils::hook::jump(0xB52E50_b, &trigger_map_rotation, true);
utils::hook::jump(0x140B52E50, &trigger_map_rotation, true);
previous_priority = GetPriorityClass(GetCurrentProcess());
}

View File

@ -214,7 +214,7 @@ namespace network
void net_init_stub()
{
init_socket();
utils::hook::invoke<void>(0xD57A00_b);
utils::hook::invoke<void>(0x140D57A00);
}
int get_protocol_version_stub()
@ -304,76 +304,76 @@ namespace network
scheduler::loop(game::fragment_handler::clean, scheduler::async, 5s);
// redirect dw packet sends to our stub
utils::hook::jump(0xD942C0_b, dw_send_to_stub);
utils::hook::jump(0x140D942C0, dw_send_to_stub);
// redirect dw packet receives to our stub
utils::hook::jump(0xD93D70_b, dw_recv_from_stub);
utils::hook::jump(0x140D93D70, dw_recv_from_stub);
// intercept command handling
cl_dispatch_connectionless_packet_hook.create(0x9B2250_b, cl_dispatch_connectionless_packet_stub);
cl_dispatch_connectionless_packet_hook.create(0x1409B2250, cl_dispatch_connectionless_packet_stub);
// handle xuid without secure connection
utils::hook::nop(0xC53315_b, 2);
utils::hook::nop(0xC55EC7_b, 6);
utils::hook::nop(0x140C53315, 2);
utils::hook::nop(0x140C55EC7, 6);
utils::hook::jump(game::NET_CompareAdr, net_compare_address);
utils::hook::jump(game::NET_CompareBaseAdr, net_compare_base_address);
// don't establish secure conenction
utils::hook::set<uint8_t>(0x9DBFDD_b, 0xEB);
utils::hook::set<uint8_t>(0x9DC47D_b, 0xEB);
utils::hook::set<uint8_t>(0x9DDC79_b, 0xEB);
utils::hook::set<uint8_t>(0x9AA9F9_b, 0xEB);
utils::hook::set<uint8_t>(0xC56030_b, 0xEB);
utils::hook::set<uint8_t>(0xC5341A_b, 0xEB);
utils::hook::set<uint8_t>(0xC4FFC6_b, 0xEB);
utils::hook::set<uint8_t>(0xC533B4_b, 0xEB);
utils::hook::set<uint8_t>(0x1409DBFDD, 0xEB);
utils::hook::set<uint8_t>(0x1409DC47D, 0xEB);
utils::hook::set<uint8_t>(0x1409DDC79, 0xEB);
utils::hook::set<uint8_t>(0x1409AA9F9, 0xEB);
utils::hook::set<uint8_t>(0x140C56030, 0xEB);
utils::hook::set<uint8_t>(0x140C5341A, 0xEB);
utils::hook::set<uint8_t>(0x140C4FFC6, 0xEB);
utils::hook::set<uint8_t>(0x140C533B4, 0xEB);
// ignore unregistered connection
utils::hook::jump(0xC4F200_b, 0xC4F1AB_b);
utils::hook::jump(0xC4F2F6_b, 0xC4F399_b);
utils::hook::jump(0x140C4F200, 0x140C4F1AB);
utils::hook::jump(0x140C4F2F6, 0x140C4F399);
// ignore configstring mismatch
utils::hook::set<uint8_t>(0x9B6F91_b, 0xEB);
utils::hook::set<uint8_t>(0x1409B6F91, 0xEB);
// ignore dw handle in SvClientMP::FindClientAtAddress
utils::hook::set<uint8_t>(0xC58B2B_b, 0xEB);
utils::hook::set<uint8_t>(0x140C58B2B, 0xEB);
// ignore dw handle in SV_DirectConnect
utils::hook::nop(0xC4EE1A_b, 2);
utils::hook::nop(0xC4F0FB_b, 6);
utils::hook::nop(0x140C4EE1A, 2);
utils::hook::nop(0x140C4F0FB, 6);
// ignore impure client
utils::hook::jump(0xC500C8_b, 0xC500DE_b); // maybe add sv_pure dvar?
utils::hook::jump(0x140C500C8, 0x140C500DE); // maybe add sv_pure dvar?
// don't send checksum
utils::hook::set<uint8_t>(0xCE6C7C_b, 0x0);
utils::hook::set<uint8_t>(0x140CE6C7C, 0x0);
// don't read checksum
utils::hook::set(0xCE6E60_b, 0xC301B0);
utils::hook::set(0x140CE6E60, 0xC301B0);
// don't try to reconnect client
utils::hook::call(0xC4F05F_b, reconnect_migratated_client);
utils::hook::nop(0xC4F03C_b, 4); // this crashes when reconnecting for some reason
utils::hook::call(0x140C4F05F, reconnect_migratated_client);
utils::hook::nop(0x140C4F03C, 4); // this crashes when reconnecting for some reason
// increase allowed packet size
const auto max_packet_size = 0x20000;
utils::hook::set<int>(0xBB4F01_b, max_packet_size);
utils::hook::set<int>(0xBB4F31_b, max_packet_size);
utils::hook::set<int>(0xBB4E22_b, max_packet_size);
utils::hook::set<int>(0xBB4F31_b, max_packet_size);
utils::hook::set<int>(0x140BB4F01, max_packet_size);
utils::hook::set<int>(0x140BB4F31, max_packet_size);
utils::hook::set<int>(0x140BB4E22, max_packet_size);
utils::hook::set<int>(0x140BB4F31, max_packet_size);
// ignore built in "print" oob command and add in our own
utils::hook::set<uint8_t>(0x9B0326_b, 0xEB);
utils::hook::set<uint8_t>(0x1409B0326, 0xEB);
// initialize query_socket
utils::hook::jump(0xD57C7E_b, net_init_stub);
utils::hook::jump(0x140D57C7E, net_init_stub);
// use our own protocol version
utils::hook::jump(0xCE8290_b, get_protocol_version_stub);
utils::hook::jump(0x140CE8290, get_protocol_version_stub);
// patch buffer overflow
utils::hook::call(0xBB4ABB_b, memmove_stub); // NET_DeferPacketToClient
utils::hook::call(0x140BB4ABB, memmove_stub); // NET_DeferPacketToClient
}
};
}

View File

@ -90,7 +90,7 @@ namespace party
perform_game_initialization();
// setup agent count
utils::hook::invoke<void>(0xC19B00_b, gametype.data());
utils::hook::invoke<void>(0x140C19B00, gametype.data());
preloaded_map = false;
@ -110,7 +110,7 @@ namespace party
if (game::Com_FrontEnd_IsInFrontEnd())
{
// Com_FrontEndScene_ShutdownAndDisable
utils::hook::invoke<void>(0x5AEFB0_b);
utils::hook::invoke<void>(0x1405AEFB0);
}
game::SV_CmdsMP_StartMapForParty(
@ -161,12 +161,12 @@ namespace party
if (preloaded_map)
{
// Com_GameStart_BeginClient
utils::hook::invoke<void>(0x5B0130_b, mapname, gametype, a3);
utils::hook::invoke<void>(0x1405B0130, mapname, gametype, a3);
}
else
{
// DB_LoadLevelXAssets
utils::hook::invoke<void>(0x3B9C90_b, mapname, 0);
utils::hook::invoke<void>(0x1403B9C90, mapname, 0);
}
}
@ -175,12 +175,12 @@ namespace party
if (preloaded_map)
{
// Com_RestartForFrontend
utils::hook::invoke<void>(0xBAF0B0_b);
utils::hook::invoke<void>(0x140BAF0B0);
}
else
{
// Com_Restart
utils::hook::invoke<void>(0xBAF0A0_b);
utils::hook::invoke<void>(0x140BAF0A0);
}
}
@ -198,7 +198,7 @@ namespace party
{
if (init_settings->maxClientCount != *game::svs_numclients)
{
game::Com_Error(game::ERR_DROP, reinterpret_cast<const char*>(0x1512140_b));
game::Com_Error(game::ERR_DROP, reinterpret_cast<const char*>(0x141512140));
}
if (!init_settings->serverThreadStartup)
@ -206,7 +206,7 @@ namespace party
if (!init_settings->isRestart)
{
// Nav_AllocNavPower
memset(&*reinterpret_cast<__int64*>(0x4E3A490_b + 8), 0, 0x78680ui64 - 8);
memset(&*reinterpret_cast<__int64*>(0x144E3A490 + 8), 0, 0x78680ui64 - 8);
}
}
}
@ -220,7 +220,7 @@ namespace party
a.popad64();
a.jmp(0xC563E2_b);
a.jmp(0x140C563E2);
}
}
@ -382,32 +382,32 @@ namespace party
static const char* a3 = "fast_restart_sp";
// patch singleplayer "map" -> "map_sp"
utils::hook::set(0x1BBA800_b + 0, a1);
utils::hook::set(0x1BBA800_b + 24, a1);
utils::hook::set(0x1BBA800_b + 56, a1);
utils::hook::set(0x141BBA800 + 0, a1);
utils::hook::set(0x141BBA800 + 24, a1);
utils::hook::set(0x141BBA800 + 56, a1);
// patch singleplayer map_restart -> "map_restart_sp"
utils::hook::set(0x1BBA740_b + 0, a2);
utils::hook::set(0x1BBA740_b + 24, a2);
utils::hook::set(0x1BBA740_b + 56, a2);
utils::hook::set(0x141BBA740 + 0, a2);
utils::hook::set(0x141BBA740 + 24, a2);
utils::hook::set(0x141BBA740 + 56, a2);
// patch singleplayer fast_restart -> "fast_restart_sp"
utils::hook::set(0x1BBA700_b + 0, a3);
utils::hook::set(0x1BBA700_b + 24, a3);
utils::hook::set(0x1BBA700_b + 56, a3);
utils::hook::set(0x141BBA700 + 0, a3);
utils::hook::set(0x141BBA700 + 24, a3);
utils::hook::set(0x141BBA700 + 56, a3);
utils::hook::set<uint8_t>(0xC562FD_b, 0xEB); // allow mapname to be changed while server is running
utils::hook::set<uint8_t>(0x140C562FD, 0xEB); // allow mapname to be changed while server is running
utils::hook::nop(0xA7A8DF_b, 5); // R_SyncRenderThread inside CL_MainMp_PreloadMap ( freezes )
utils::hook::nop(0x140A7A8DF, 5); // R_SyncRenderThread inside CL_MainMp_PreloadMap ( freezes )
utils::hook::call(0x9AFE84_b, com_gamestart_beginclient_stub); // blackscreen issue on connect
utils::hook::call(0x9B4077_b, com_gamestart_beginclient_stub); // may not be necessary (map rotate)
utils::hook::call(0x9B404A_b, com_restart_for_frontend_stub); // may not be necessary (map rotate)
utils::hook::call(0x1409AFE84, com_gamestart_beginclient_stub); // blackscreen issue on connect
utils::hook::call(0x1409B4077, com_gamestart_beginclient_stub); // may not be necessary (map rotate)
utils::hook::call(0x1409B404A, com_restart_for_frontend_stub); // may not be necessary (map rotate)
sv_start_map_for_party_hook.create(0xC4D150_b, sv_start_map_for_party_stub);
sv_start_map_for_party_hook.create(0x140C4D150, sv_start_map_for_party_stub);
utils::hook::nop(0xC563C3_b, 12); // far jump = 12 bytes
utils::hook::jump(0xC563C3_b, utils::hook::assemble(reset_mem_stuff_stub), true);
utils::hook::nop(0x140C563C3, 12); // far jump = 12 bytes
utils::hook::jump(0x140C563C3, utils::hook::assemble(reset_mem_stuff_stub), true);
command::add("map", [](const command::params& args)
{

View File

@ -48,15 +48,15 @@ namespace patches
cg_fovScale = game::Dvar_RegisterFloat("cg_fovScale", 1.0f, 0.1f, 2.0f, game::DVAR_FLAG_SAVED,
"Scale applied to the field of view");
*reinterpret_cast<game::dvar_t**>(0x6005758_b) = com_maxfps;
*reinterpret_cast<game::dvar_t**>(0x146005758) = com_maxfps;
dvars::disable::re_register("com_maxfps");
dvars::disable::de_register("com_maxfps");
*reinterpret_cast<game::dvar_t**>(0x1FA6DA0_b) = cg_fov;
*reinterpret_cast<game::dvar_t**>(0x141FA6DA0) = cg_fov;
dvars::disable::re_register("cg_fov");
dvars::disable::de_register("cg_fov");
*reinterpret_cast<game::dvar_t**>(0x1FA6DB0_b) = cg_fovScale;
*reinterpret_cast<game::dvar_t**>(0x141FA6DB0) = cg_fovScale;
dvars::disable::re_register("cg_fovScale");
dvars::disable::de_register("cg_fovScale");
@ -170,7 +170,7 @@ namespace patches
// original code
unsigned int index = 0;
auto result = utils::hook::invoke<__int64>(0xB7AC60_b, dvar, &index); // NetConstStrings_SV_GetNetworkDvarIndex
auto result = utils::hook::invoke<__int64>(0x140B7AC60, dvar, &index); // NetConstStrings_SV_GetNetworkDvarIndex
if (result)
{
std::string index_str = std::to_string(index);
@ -233,44 +233,44 @@ namespace patches
void post_unpack() override
{
// register custom dvars
com_register_common_dvars_hook.create(0xBADF30_b, com_register_common_dvars_stub);
com_register_common_dvars_hook.create(0x140BADF30, com_register_common_dvars_stub);
// patch some features
com_game_mode_supports_feature_hook.create(0x5AFDE0_b, com_game_mode_supports_feature_stub);
com_game_mode_supports_feature_hook.create(0x1405AFDE0, com_game_mode_supports_feature_stub);
// get client name from dvar
utils::hook::jump(0xD32770_b, live_get_local_client_name);
utils::hook::jump(0x140D32770, live_get_local_client_name);
// write better config
utils::hook::jump(0xBB2A90_b, dvar_write_variables_stub);
utils::hook::jump(0x140BB2A90, dvar_write_variables_stub);
// show missing fastfiles
utils::hook::call(0x3BBD4B_b, missing_content_error_stub);
utils::hook::call(0x1403BBD4B, missing_content_error_stub);
// show missing map
stored_mapname = nullptr;
live_get_map_index_hook.create(0xCE72C0_b, live_get_map_index_stub);
content_do_we_have_content_pack_hook.create(0xCE8550_b, content_do_we_have_content_pack_stub);
live_get_map_index_hook.create(0x140CE72C0, live_get_map_index_stub);
content_do_we_have_content_pack_hook.create(0x140CE8550, content_do_we_have_content_pack_stub);
// make setclientdvar behave like older games
cg_set_client_dvar_from_server_hook.create(0x856D70_b, cg_set_client_dvar_from_server_stub);
utils::hook::call(0xB0A9BB_b, get_client_dvar_checksum); // setclientdvar
utils::hook::call(0xB0ACD7_b, get_client_dvar_checksum); // setclientdvars
utils::hook::call(0xB0A984_b, get_client_dvar); // setclientdvar
utils::hook::call(0xB0AC9F_b, get_client_dvar); // setclientdvars
utils::hook::set<uint8_t>(0xB0A9AC_b, 0xEB); // setclientdvar
utils::hook::set<uint8_t>(0xB0ACC8_b, 0xEB); // setclientdvars
cg_set_client_dvar_from_server_hook.create(0x140856D70, cg_set_client_dvar_from_server_stub);
utils::hook::call(0x140B0A9BB, get_client_dvar_checksum); // setclientdvar
utils::hook::call(0x140B0ACD7, get_client_dvar_checksum); // setclientdvars
utils::hook::call(0x140B0A984, get_client_dvar); // setclientdvar
utils::hook::call(0x140B0AC9F, get_client_dvar); // setclientdvars
utils::hook::set<uint8_t>(0x140B0A9AC, 0xEB); // setclientdvar
utils::hook::set<uint8_t>(0x140B0ACC8, 0xEB); // setclientdvars
// Allow executing custom cfg files with the "exec" command
utils::hook::call(0xB7CEF9_b, db_read_raw_file_stub);
utils::hook::call(0x140B7CEF9, db_read_raw_file_stub);
// Add cheat override to exec
utils::hook::call(0xB7CF11_b, cbuf_execute_buffer_internal_stub);
utils::hook::call(0x140B7CF11, cbuf_execute_buffer_internal_stub);
// don't reset our fov
utils::hook::set<uint8_t>(0x8A6160_b, 0xC3);
utils::hook::set<uint8_t>(0x1408A6160, 0xC3);
// don't register every replicated dvar as a network dvar
init_network_dvars_hook.create(0xB7A920_b, init_network_dvars_stub);
init_network_dvars_hook.create(0x140B7A920, init_network_dvars_stub);
// some [data validation] anti tamper thing that kills performance
dvars::override::register_int("dvl", 0, 0, 0, game::DVAR_FLAG_READ);
@ -306,12 +306,13 @@ namespace patches
dvars::override::register_float("gpad_stick_pressed_hysteresis", 0.1f, 0, 1, game::DVAR_FLAG_SAVED);
// block changing name in-game
utils::hook::set<uint8_t>(0xC4DF90_b, 0xC3);
utils::hook::set<uint8_t>(0x140C4DF90, 0xC3);
// disable host migration
utils::hook::set<uint8_t>(0xC5A200_b, 0xC3);
utils::hook::set<uint8_t>(0x140C5A200, 0xC3);
utils::hook::set(0x6D5280_b, 0xC301B0); // NetConstStrings_IsPrecacheAllowed
// precache is always allowed
utils::hook::set(0x1406D5280, 0xC301B0); // NetConstStrings_IsPrecacheAllowed
}
};
}

View File

@ -381,8 +381,8 @@ namespace profile_infos
public:
void post_unpack() override
{
client_connect_hook.create(0xAFFF10_b, client_connect_stub);
session_unregister_remote_player_hook.create(0xC73970_b, session_unregister_remote_player_stub);
client_connect_hook.create(0x140AFFF10, client_connect_stub);
session_unregister_remote_player_hook.create(0x140C73970, session_unregister_remote_player_stub);
dvars::override::register_int("playercard_cache_validity_life", 5000, 0, 3600000, 0x0); // 5sec

View File

@ -25,7 +25,7 @@ namespace ranked
game::Dvar_RegisterBool("onlinegame", true, game::DVAR_FLAG_READ, "Current game is an online game with stats, custom classes, unlocks");
// Fix sessionteam always returning none (SV_ClientMP_HasAssignedTeam_Internal)
utils::hook::set(0xC50BC0_b, 0xC300B0);
utils::hook::set(0x140C50BC0, 0xC300B0);
}
}

View File

@ -65,8 +65,8 @@ namespace renderer
dvars::r_fullbright = game::Dvar_RegisterInt("r_fullbright", 0, 0, 2, game::DVAR_FLAG_SAVED, "Toggles rendering without lighting");
r_init_draw_method_hook.create(0xDE9260_b, &r_init_draw_method_stub);
r_update_front_end_dvar_options_hook.create(0xE28B60_b, &r_update_front_end_dvar_options_stub);
r_init_draw_method_hook.create(0x140DE9260, &r_init_draw_method_stub);
r_update_front_end_dvar_options_hook.create(0x140E28B60, &r_update_front_end_dvar_options_stub);
}
};
}

View File

@ -196,10 +196,10 @@ namespace scheduler
void post_unpack() override
{
r_end_frame_hook.create(0xE267B0_b, scheduler::r_end_frame_stub);
g_run_frame_hook.create(0xB15E20_b, scheduler::server_frame_stub);
main_frame_hook.create(0xB8E2D0_b, scheduler::main_frame_stub);
hks_frame_hook.create(0x613440_b, scheduler::hks_frame_stub);
r_end_frame_hook.create(0x140E267B0, scheduler::r_end_frame_stub);
g_run_frame_hook.create(0x140B15E20, scheduler::server_frame_stub);
main_frame_hook.create(0x140B8E2D0, scheduler::main_frame_stub);
hks_frame_hook.create(0x140613440, scheduler::hks_frame_stub);
}
void pre_destroy() override

View File

@ -265,18 +265,18 @@ namespace scripting
public:
void post_unpack() override
{
vm_notify_hook.create(0xC10460_b, vm_notify_stub);
vm_notify_hook.create(0x140C10460, vm_notify_stub);
scr_add_class_field_hook.create(0xC061F0_b, scr_add_class_field_stub);
scr_add_class_field_hook.create(0x140C061F0, scr_add_class_field_stub);
scr_set_thread_position_hook.create(0xBFD190_b, scr_set_thread_position_stub);
process_script_hook.create(0xC09D20_b, process_script_stub);
scr_set_thread_position_hook.create(0x140BFD190, scr_set_thread_position_stub);
process_script_hook.create(0x140C09D20, process_script_stub);
sl_get_canonical_string_hook.create(game::SL_GetCanonicalString, sl_get_canonical_string_stub);
mp::sv_initgame_vm_hook.create(0xBA3428D_b, mp::sv_initgame_vm_stub);
sp::sv_initgame_vm_hook.create(0xBED4A96_b, sp::sv_initgame_vm_stub);
mp::sv_shutdowngame_vm_hook.create(0xBB36D86_b, mp::sv_shutdowngame_vm_stub);
sp::sv_shutdowngame_vm_hook.create(0x12159B6_b, sp::sv_shutdowngame_vm_stub);
mp::sv_initgame_vm_hook.create(0x14BA3428D, mp::sv_initgame_vm_stub);
sp::sv_initgame_vm_hook.create(0x14BED4A96, sp::sv_initgame_vm_stub);
mp::sv_shutdowngame_vm_hook.create(0x14BB36D86, mp::sv_shutdowngame_vm_stub);
sp::sv_shutdowngame_vm_hook.create(0x1412159B6, sp::sv_shutdowngame_vm_stub);
}
};
}

View File

@ -436,7 +436,7 @@ namespace server_list
lui_open_menu_hook.create(game::LUI_OpenMenu, lui_open_menu_stub);
// replace UI_RunMenuScript call in LUI_CoD_LuaCall_RefreshServerList to our refresh_servers
utils::hook::jump(0x69E019_b, utils::hook::assemble([](utils::hook::assembler& a)
utils::hook::jump(0x14069E019, utils::hook::assemble([](utils::hook::assembler& a)
{
a.pushad64();
a.call_aligned(refresh_server_list);
@ -449,7 +449,7 @@ namespace server_list
a.ret();
}), true);
utils::hook::jump(0x69E9F7_b, utils::hook::assemble([](utils::hook::assembler& a)
utils::hook::jump(0x14069E9F7, utils::hook::assemble([](utils::hook::assembler& a)
{
a.mov(r8d, edi);
a.mov(ecx, eax);
@ -459,13 +459,13 @@ namespace server_list
a.call_aligned(join_server);
a.popad64();
a.jmp(0x69EA03_b);
a.jmp(0x14069EA03);
}), true);
utils::hook::nop(0x69EA1D_b, 5);
utils::hook::nop(0x14069EA1D, 5);
utils::hook::call(0x69E45E_b, get_server_count);
utils::hook::jump(0xCC5F00_b, ui_feeder_item_text);
utils::hook::call(0x14069E45E, get_server_count);
utils::hook::jump(0x140CC5F00, ui_feeder_item_text);
scheduler::loop(do_frame_work, scheduler::pipeline::main);
scheduler::loop(check_refresh, scheduler::pipeline::lui, 10ms);

View File

@ -35,11 +35,11 @@ namespace splash
void post_unpack() override
{
// Disable native splash screen
utils::hook::set<uint8_t>(0xD58240_b, 0xC3);
utils::hook::set<uint8_t>(0x140D58240, 0xC3);
if (!utils::nt::is_wine())
{
utils::hook::jump(0xD584F0_b, destroy_stub, true);
utils::hook::jump(0xD58530_b, destroy_stub, true);
utils::hook::jump(0x140D584F0, destroy_stub, true);
utils::hook::jump(0x140D58530, destroy_stub, true);
}
}

View File

@ -367,14 +367,14 @@ namespace stats
}, scheduler::main);
// unlockables
is_item_unlocked_hook.create(0x34E020_b, is_item_unlocked_stub);
is_item_unlocked_hook2.create(0x34CF40_b, is_item_unlocked_stub2);
is_item_unlocked_hook.create(0x14034E020, is_item_unlocked_stub);
is_item_unlocked_hook2.create(0x14034CF40, is_item_unlocked_stub2);
// loot
item_quantity_hook.create(0x51DBE0_b, item_quantity_stub);
item_quantity_hook.create(0x14051DBE0, item_quantity_stub);
// GetPlayerData print
utils::hook::jump(0xB84F00_b, com_ddl_print_state); // Com_DDL_PrintState
utils::hook::jump(0x140B84F00, com_ddl_print_state); // Com_DDL_PrintState
}
};
}

View File

@ -66,7 +66,7 @@ namespace system_check
void verify_binary_version()
{
const auto value = *reinterpret_cast<DWORD*>(0x1337_b);
const auto value = *reinterpret_cast<DWORD*>(0x140001337);
if (!utils::nt::is_wine() && value != 0xB43C9275)
{
throw std::runtime_error("Unsupported Call of Duty: Infinite Warfare version");

View File

@ -39,7 +39,7 @@ namespace ui
dvars::cg_draw2D = game::Dvar_RegisterBool("cg_draw2D", true, game::DVAR_FLAG_NONE, "Draw 2D screen elements");
}, scheduler::main);
cg_draw2d_hook.create(0x781D90_b, cg_draw2d_stub);
cg_draw2d_hook.create(0x140781D90, cg_draw2d_stub);
}
};
}

View File

@ -450,14 +450,14 @@ namespace ui_scripting
return;
}
utils::hook::call(0x5FC2F7_b, db_find_x_asset_header_stub);
utils::hook::call(0x5FC0AB_b, db_find_x_asset_header_stub);
utils::hook::call(0x1405FC2F7, db_find_x_asset_header_stub);
utils::hook::call(0x1405FC0AB, db_find_x_asset_header_stub);
hks_load_hook.create(0x11E0B00_b, hks_load_stub);
hks_load_hook.create(0x1411E0B00, hks_load_stub);
hks_package_require_hook.create(0x11C7F00_b, hks_package_require_stub);
hks_start_hook.create(0x615090_b, hks_start_stub);
hks_shutdown_hook.create(0x6124B0_b, hks_shutdown_stub);
hks_package_require_hook.create(0x1411C7F00, hks_package_require_stub);
hks_start_hook.create(0x140615090, hks_start_stub);
hks_shutdown_hook.create(0x1406124B0, hks_shutdown_stub);
}
};
}

View File

@ -62,9 +62,7 @@ namespace weapon
game::WeaponDef* GetWeaponDef(unsigned __int16* weapon)
{
game::symbol<game::WeaponDef*> bg_weaponDefs{ 0x5210120 };
auto* weapon_def = bg_weaponDefs[*weapon];
return weapon_def;
return game::bg_weaponDefs[*weapon];
}
int XAnimPartsGetLengthMsec(game::XAnimParts* parts)
@ -277,11 +275,11 @@ namespace weapon
});
#endif
CG_Weapons_GetWeaponAnimRate_hook.create(0x932550_b, CG_Weapons_GetWeaponAnimRate_stub);
BG_MapWeaponAnimStateToAnimIndex_hook.create(0x74A300_b, BG_MapWeaponAnimStateToAnimIndex_stub);
PM_Weapon_Check_hook.create(0x723350_b, PM_Weapon_Check_stub);
PM_Weapon_IsInInterruptibleState_hook.create(0x728210_b, PM_Weapon_IsInInterruptibleState_stub);
PM_WeaponProcessState_hook.create(0x72C3B0_b, PM_WeaponProcessState_stub);
CG_Weapons_GetWeaponAnimRate_hook.create(0x140932550, CG_Weapons_GetWeaponAnimRate_stub);
BG_MapWeaponAnimStateToAnimIndex_hook.create(0x14074A300, BG_MapWeaponAnimStateToAnimIndex_stub);
PM_Weapon_Check_hook.create(0x140723350, PM_Weapon_Check_stub);
PM_Weapon_IsInInterruptibleState_hook.create(0x140728210, PM_Weapon_IsInInterruptibleState_stub);
PM_WeaponProcessState_hook.create(0x14072C3B0, PM_WeaponProcessState_stub);
gsc::method::add("startweaponinspection", [](game::scr_entref_t ent_ref, const gsc::function_args& args)
{

View File

@ -5,7 +5,6 @@
#include "game.hpp"
#include "dvars.hpp"
#include <utils/hook.hpp>
namespace dvars
{

View File

@ -8,12 +8,6 @@ namespace game
{
uint64_t base_address;
void load_base_address()
{
const auto module = GetModuleHandleA(0);
base_address = reinterpret_cast<uint64_t>(module);
}
namespace environment
{
bool is_dedi()
@ -87,7 +81,7 @@ namespace game
const char* G_GAME_MODE_STRINGS_FORMATTED[] =
{
"Multiplayer", // this is really none, but its for discord presence :P
"None",
"Singleplayer",
"Multiplayer",
"Zombies",
@ -234,11 +228,6 @@ namespace game
}
}
size_t operator"" _b(const size_t ptr)
{
return game::base_address + ptr;
}
size_t reverse_b(const size_t ptr)
{
return ptr - game::base_address;

View File

@ -7,7 +7,6 @@
namespace game
{
extern uint64_t base_address;
void load_base_address();
template <typename T>
class symbol
@ -20,7 +19,7 @@ namespace game
T* get() const
{
return reinterpret_cast<T*>(reinterpret_cast<uint64_t>(address_) + base_address);
return reinterpret_cast<T*>(reinterpret_cast<uint64_t>(address_));
}
operator T* () const
@ -70,7 +69,6 @@ namespace game
bool SV_ClientIsBot(unsigned int client_num);
}
size_t operator"" _b(const size_t ptr);
size_t reverse_b(const size_t ptr);
size_t reverse_b(const void* ptr);

View File

@ -8,371 +8,371 @@ namespace game
* Functions
**************************************************************/
WEAK symbol<void(int type, VariableUnion u)> AddRefToValue{ 0xC04360 };
WEAK symbol<void(int type, VariableUnion u)> RemoveRefToValue{ 0xC05DB0 };
WEAK symbol<void(unsigned int id)> AddRefToObject{ 0xC04350 };
WEAK symbol<void(unsigned int id)> RemoveRefToObject{ 0xC05CA0 };
WEAK symbol<unsigned int(unsigned int id)> AllocThread{ 0xC04580 };
WEAK symbol<ObjectVariableValue* (unsigned int* id)> AllocVariable{ 0xC04650 };
WEAK symbol<unsigned int(const char* filename)> Scr_LoadScript{ 0xBFD900 };
WEAK symbol<unsigned int(const char* filename, unsigned int handle)> Scr_GetFunctionHandle{ 0xBFD780 };
WEAK symbol<unsigned int(int handle, int num_param)> Scr_ExecThread{ 0xC0ACD0 };
WEAK symbol<void(int type, VariableUnion u)> AddRefToValue{ 0x140C04360 };
WEAK symbol<void(int type, VariableUnion u)> RemoveRefToValue{ 0x140C05DB0 };
WEAK symbol<void(unsigned int id)> AddRefToObject{ 0x140C04350 };
WEAK symbol<void(unsigned int id)> RemoveRefToObject{ 0x140C05CA0 };
WEAK symbol<unsigned int(unsigned int id)> AllocThread{ 0x140C04580 };
WEAK symbol<ObjectVariableValue* (unsigned int* id)> AllocVariable{ 0x140C04650 };
WEAK symbol<unsigned int(const char* filename)> Scr_LoadScript{ 0x140BFD900 };
WEAK symbol<unsigned int(const char* filename, unsigned int handle)> Scr_GetFunctionHandle{ 0x140BFD780 };
WEAK symbol<unsigned int(int handle, int num_param)> Scr_ExecThread{ 0x140C0ACD0 };
WEAK symbol<float()> BG_GetGravity{ 0x68DD0 };
WEAK game::symbol<unsigned int(unsigned short* weapon, game::playerState_s* ps)> BG_PlayerLastWeaponHandForViewWeapon{ 0x74B410 };
WEAK game::symbol<bool(game::playerState_s* ps, game::weapAnimFiles_t anim, int hand, unsigned char pmoveHandler)> BG_ViewModelAnimExists{ 0x751200 };
WEAK symbol<float()> BG_GetGravity{ 0x140068DD0 };
WEAK game::symbol<unsigned int(unsigned short* weapon, game::playerState_s* ps)> BG_PlayerLastWeaponHandForViewWeapon{ 0x14074B410 };
WEAK game::symbol<bool(game::playerState_s* ps, game::weapAnimFiles_t anim, int hand, unsigned char pmoveHandler)> BG_ViewModelAnimExists{ 0x140751200 };
WEAK symbol<void(errorParm code, const char* message, ...)> Com_Error{ 0xB8D830 };
WEAK symbol<void(errorParm code, const char* message, ...)> Com_Error{ 0x140B8D830 };
WEAK symbol<void()> Com_Quit_f{ 0xBADC90 };
WEAK symbol<void()> j_Com_Quit_f{ 0xD33D10 };
WEAK symbol<void()> Com_Quit_f{ 0x140BADC90 };
WEAK symbol<void()> j_Com_Quit_f{ 0x140D33D10 };
WEAK symbol<bool()> Com_FrontEnd_IsInFrontEnd{ 0x5AE6C0 };
WEAK symbol<void()> Com_FrontEnd_ExitFrontEnd{ 0x5AE4F0 };
WEAK symbol<bool()> Com_FrontEndScene_IsActive{ 0x5AEBA0 };
WEAK symbol<void()> Com_FrontEndScene_ShutdownAndDisable{ 0x5AEFB0 };
WEAK symbol<void()> Com_FrontEndScene_Shutdown{ 0x5AED00 };
WEAK symbol<bool()> Com_FrontEnd_IsInFrontEnd{ 0x1405AE6C0 };
WEAK symbol<void()> Com_FrontEnd_ExitFrontEnd{ 0x1405AE4F0 };
WEAK symbol<bool()> Com_FrontEndScene_IsActive{ 0x1405AEBA0 };
WEAK symbol<void()> Com_FrontEndScene_ShutdownAndDisable{ 0x1405AEFB0 };
WEAK symbol<void()> Com_FrontEndScene_Shutdown{ 0x1405AED00 };
WEAK symbol<int> s_frontEndScene_state{ 0x4BFF608 };
WEAK symbol<void(GameModeType)> Com_GameMode_SetDesiredGameMode{ 0x1405AFDA0 };
WEAK symbol<GameModeType()> Com_GameMode_GetActiveGameMode{ 0x1405AFD50 };
WEAK symbol<bool(const char* name)> Com_GameMode_SupportsMap{ 0x1405AFE10 };
WEAK symbol<void(GameModeType)> Com_GameMode_SetDesiredGameMode{ 0x5AFDA0 };
WEAK symbol<GameModeType()> Com_GameMode_GetActiveGameMode{ 0x5AFD50 };
WEAK symbol<bool(const char* name)> Com_GameMode_SupportsMap{ 0x5AFE10 };
WEAK symbol<bool()> Com_IsAnyLocalServerStarting{ 0x140BAD9C0 };
WEAK symbol<bool()> Com_IsAnyLocalServerRunning{ 0x140BAD9A0 };
WEAK symbol<bool()> Com_IsAnyLocalServerStarting{ 0xBAD9C0 };
WEAK symbol<bool()> Com_IsAnyLocalServerRunning{ 0xBAD9A0 };
WEAK symbol<void(const char* localizedMessage, const char* localizedTitle)> Com_SetLocalizedErrorMessage{ 0x140BAF300 };
WEAK symbol<void(const char* localizedMessage, const char* localizedTitle)> Com_SetLocalizedErrorMessage{ 0xBAF300 };
WEAK symbol<void()> Com_SyncThreads{ 0x140BB02D0 };
WEAK symbol<void()> Com_SyncThreads{ 0xBB02D0 };
WEAK symbol<void(const char* finalmsg)> Com_Shutdown{ 0x140BAFEA0 };
WEAK symbol<void(const char* finalmsg)> Com_Shutdown{ 0xBAFEA0 };
WEAK symbol<void(int localClientNum, const char* text)> Cbuf_AddText{ 0x140B7C290 };
WEAK symbol<void(int localClientNum, void(*))> Cbuf_AddCall{ 0x140B7C220 };
WEAK symbol<void(int localClientNum, int controllerIndex, const char* buffer)> Cbuf_ExecuteBuffer{ 0x140B7C3B0 };
WEAK symbol<void(int localClientNum, int controllerIndex, const char* buffer, void(int, int, const char*))> Cbuf_ExecuteBufferInternal{ 0x140B7C3C0 };
WEAK symbol<void(int localClientNum, const char* text)> Cbuf_AddText{ 0xB7C290 };
WEAK symbol<void(int localClientNum, void(*))> Cbuf_AddCall{ 0xB7C220 };
WEAK symbol<void(int localClientNum, int controllerIndex, const char* buffer)> Cbuf_ExecuteBuffer{ 0xB7C3B0 };
WEAK symbol<void(int localClientNum, int controllerIndex, const char* buffer, void(int, int, const char*))> Cbuf_ExecuteBufferInternal{ 0xB7C3C0 };
WEAK symbol<void(int localClientNum, const char* msg, int flags)> CG_Utils_GameMessage{ 0x1D7FC0 };
WEAK symbol<void(int localClientNum, const char* msg, int flags)> CG_Utils_BoldGameMessage{ 0x1D7F10 };
WEAK symbol<void(int localClientNum, const char* msg, int flags)> CG_Utils_GameMessage{ 0x1401D7FC0 };
WEAK symbol<void(int localClientNum, const char* msg, int flags)> CG_Utils_BoldGameMessage{ 0x1401D7F10 };
WEAK symbol<void(int localClientNum, void* hostInfo, const netadr_s* addr, const char* mapname, const char* gametype)>
CL_MainMP_ConnectAndPreloadMap{ 0x9AED80 };
CL_MainMP_ConnectAndPreloadMap{ 0x1409AED80 };
WEAK symbol<void(int localClientNum, int andMask)> CL_Keys_RemoveCatcher{ 0x9A9B00 };
WEAK symbol<void(int localClientNum, int andMask)> CL_Keys_RemoveCatcher{ 0x1409A9B00 };
WEAK symbol<void(int localClientNum, int controllerIndex, const char* text)> Cmd_ExecuteSingleCommand{ 0xB7D040 };
WEAK symbol<void(const char* cmdName, void(), cmd_function_s* allocedCmd)> Cmd_AddCommandInternal{ 0xB7C8F0 };
WEAK symbol<void(const char* cmdName)> Cmd_RemoveCommand{ 0xB7D630 };
WEAK symbol<void(const char* text_in)> Cmd_TokenizeString{ 0xB7D850 };
WEAK symbol<void()> Cmd_EndTokenizeString{ 0xB7CC90 };
WEAK symbol<void(int localClientNum, int controllerIndex, const char* text)> Cmd_ExecuteSingleCommand{ 0x140B7D040 };
WEAK symbol<void(const char* cmdName, void(), cmd_function_s* allocedCmd)> Cmd_AddCommandInternal{ 0x140B7C8F0 };
WEAK symbol<void(const char* cmdName)> Cmd_RemoveCommand{ 0x140B7D630 };
WEAK symbol<void(const char* text_in)> Cmd_TokenizeString{ 0x140B7D850 };
WEAK symbol<void()> Cmd_EndTokenizeString{ 0x140B7CC90 };
WEAK symbol<__int64(void* stream, int flush)> db_inflate{ 0xE77380 };
WEAK symbol<__int64(void* stream, const char* version, int stream_size)> db_inflateInit_{ 0xE77980 };
WEAK symbol<__int64(void* stream)> db_inflateEnd{ 0xE777F0 };
WEAK symbol<__int64(void* stream, int flush)> db_inflate{ 0x140E77380 };
WEAK symbol<__int64(void* stream, const char* version, int stream_size)> db_inflateInit_{ 0x140E77980 };
WEAK symbol<__int64(void* stream)> db_inflateEnd{ 0x140E777F0 };
WEAK symbol<void(void* stream, void* memory, int size)> DB_Zip_InitThreadMemory{ 0xE78290 };
WEAK symbol<void(void* stream)> DB_Zip_ShutdownThreadMemory{ 0xE782D0 };
WEAK symbol<void(void* stream, void* memory, int size)> DB_Zip_InitThreadMemory{ 0x140E78290 };
WEAK symbol<void(void* stream)> DB_Zip_ShutdownThreadMemory{ 0x140E782D0 };
WEAK symbol<void(XZoneInfo* zoneInfo, unsigned int zoneCount, char syncMode)> DB_LoadXAssets{ 0xA78630 };
WEAK symbol<int(XAssetType type, const char* name)> DB_XAssetExists{ 0xA7C3A0 };
WEAK symbol<int(const RawFile* rawfile, char* buf, int size)> DB_GetRawBuffer{ 0xA77AB0 };
WEAK symbol<void(XZoneInfo* zoneInfo, unsigned int zoneCount, char syncMode)> DB_LoadXAssets{ 0x140A78630 };
WEAK symbol<int(XAssetType type, const char* name)> DB_XAssetExists{ 0x140A7C3A0 };
WEAK symbol<int(const RawFile* rawfile, char* buf, int size)> DB_GetRawBuffer{ 0x140A77AB0 };
WEAK symbol<const char* (XAssetType type, XAssetHeader header)> DB_GetXAssetHeaderName{ 0x9E5BA0 };
WEAK symbol<bool(std::int32_t, void(__cdecl*)(XAssetHeader, void*), const void*)> DB_EnumXAssets_FastFile{ 0xA76CE0 };
WEAK symbol<bool(XAssetType type, const char* name)> DB_IsXAssetDefault{ 0xA780D0 };
WEAK symbol<XAssetHeader(XAssetType type, const char* name, int allowCreateDefault)> DB_FindXAssetHeader{ 0xA76E00 };
WEAK symbol<bool(const char* zoneName)> DB_IsLocalized{ 0x3BC500 };
WEAK symbol<char* (const char* filename, char* buf, int size)> DB_ReadRawFile{ 0xA79E30 };
WEAK symbol<int(const RawFile* rawfile)> DB_GetRawFileLen{ 0xF20AF0 };
WEAK symbol<void(int flags)> DB_UnloadFastfilesByZoneFlags{ 0xA7BCE0 };
WEAK symbol<const char* (XAssetType type, XAssetHeader header)> DB_GetXAssetHeaderName{ 0x1409E5BA0 };
WEAK symbol<bool(std::int32_t, void(__cdecl*)(XAssetHeader, void*), const void*)> DB_EnumXAssets_FastFile{ 0x140A76CE0 };
WEAK symbol<bool(XAssetType type, const char* name)> DB_IsXAssetDefault{ 0x140A780D0 };
WEAK symbol<XAssetHeader(XAssetType type, const char* name, int allowCreateDefault)> DB_FindXAssetHeader{ 0x140A76E00 };
WEAK symbol<bool(const char* zoneName)> DB_IsLocalized{ 0x1403BC500 };
WEAK symbol<char* (const char* filename, char* buf, int size)> DB_ReadRawFile{ 0x140A79E30 };
WEAK symbol<int(const RawFile* rawfile)> DB_GetRawFileLen{ 0x140F20AF0 };
WEAK symbol<void(int flags)> DB_UnloadFastfilesByZoneFlags{ 0x140A7BCE0 };
WEAK symbol<const char* (const DDLState* state, int enumValue)> DDL_Lookup_GetEnumString{ 0x30430 };
WEAK symbol<bool(const DDLState* state)> DDL_StateIsLeaf{ 0x2E3C0 };
WEAK symbol<DDLType(const DDLState* state)> DDL_GetType{ 0x2E5A0 };
WEAK symbol<DDLValue(const DDLState* state, const DDLContext* ddlContext)> DDL_GetValue{ 0x2F5E0 };
WEAK symbol<const char* (const DDLState* state, int enumValue)> DDL_Lookup_GetEnumString{ 0x140030430 };
WEAK symbol<bool(const DDLState* state)> DDL_StateIsLeaf{ 0x14002E3C0 };
WEAK symbol<DDLType(const DDLState* state)> DDL_GetType{ 0x14002E5A0 };
WEAK symbol<DDLValue(const DDLState* state, const DDLContext* ddlContext)> DDL_GetValue{ 0x14002F5E0 };
WEAK symbol<dvar_t* (const char* name, bool value,
unsigned int flags, const char* description)> Dvar_RegisterBool{ 0xCEB380 };
unsigned int flags, const char* description)> Dvar_RegisterBool{ 0x140CEB380 };
WEAK symbol<dvar_t* (const char* name, int value, int min, int max,
unsigned int flags, const char* description)> Dvar_RegisterInt{ 0xCEB920 };
unsigned int flags, const char* description)> Dvar_RegisterInt{ 0x140CEB920 };
WEAK symbol<dvar_t* (const char* name, float value, float min,
float max, unsigned int flags, const char* description)> Dvar_RegisterFloat{ 0xCEB890 };
float max, unsigned int flags, const char* description)> Dvar_RegisterFloat{ 0x140CEB890 };
WEAK symbol<dvar_t* (const char* name, const char* value,
unsigned int flags, const char* description)> Dvar_RegisterString{ 0xCEBD50 };
unsigned int flags, const char* description)> Dvar_RegisterString{ 0x140CEBD50 };
WEAK symbol<dvar_t* (const char* name, float x, float y,
float min, float max, unsigned int flags, const char* description)> Dvar_RegisterVec2{ 0xCEBF50 };
float min, float max, unsigned int flags, const char* description)> Dvar_RegisterVec2{ 0x140CEBF50 };
WEAK symbol<dvar_t* (const char* name, float x, float y, float z,
float min, float max, unsigned int flags, const char* description)> Dvar_RegisterVec3{ 0xCEBFE0 };
float min, float max, unsigned int flags, const char* description)> Dvar_RegisterVec3{ 0x140CEBFE0 };
WEAK symbol<dvar_t* (const char* name, float x, float y, float z,
float w, float min, float max, unsigned int flags, const char* description)> Dvar_RegisterVec4{ 0xCEC110 };
float w, float min, float max, unsigned int flags, const char* description)> Dvar_RegisterVec4{ 0x140CEC110 };
WEAK symbol<dvar_t* (unsigned int checksum, const char* string, DvarSetSource source)> Dvar_SetFromStringByChecksum{ 0xCECDB0 };
WEAK symbol<dvar_t* (const char* name, const char* string, DvarSetSource source)> Dvar_SetFromStringByName{ 0xCECF30 };
WEAK symbol<void(dvar_t* dvar, const char* string, DvarSetSource source)> Dvar_SetFromStringFromSource{ 0xCECFF0 };
WEAK symbol<dvar_t* (unsigned int checksum, const char* string, DvarSetSource source)> Dvar_SetFromStringByChecksum{ 0x140CECDB0 };
WEAK symbol<dvar_t* (const char* name, const char* string, DvarSetSource source)> Dvar_SetFromStringByName{ 0x140CECF30 };
WEAK symbol<void(dvar_t* dvar, const char* string, DvarSetSource source)> Dvar_SetFromStringFromSource{ 0x140CECFF0 };
WEAK symbol<void(const char* name, const char* string)> Dvar_SetCommand{ 0xCECB30 };
WEAK symbol<dvar_t* (const char* name)> Dvar_FindVar{ 0xCEA460 };
WEAK symbol<void(void* callback, void* userData)> Dvar_ForEach{ 0xCEA480 };
WEAK symbol<dvar_t* (unsigned int checksum)> Dvar_FindMalleableVar{ 0xCEA3C0 };
WEAK symbol<void(const dvar_t* dvar)> Dvar_ClearModified{ 0xCE9E90 };
WEAK symbol<const char* (const dvar_t* dvar)> Dvar_DisplayableLatchedValue{ 0xCEA1D0 };
WEAK symbol<void(char* buffer, int index)> Dvar_GetCombinedString{ 0xBB1F30 };
WEAK symbol<const char* (dvar_t* dvar, DvarValue value)> Dvar_ValueToString{ 0xCEED00 };
WEAK symbol<void(dvar_t* dvar, DvarSetSource source)> Dvar_Reset{ 0xCEC490 };
WEAK symbol<unsigned int(const char* name)> Dvar_GenerateChecksum{ 0xCEA520 };
WEAK symbol<void(dvar_t* dvar, int value)> Dvar_SetInt{ 0xCED3D0 };
WEAK symbol<void(bool cheatOverride)> Dvar_OverrideCheatProtection{ 0XCEB250 };
WEAK symbol<void(const char* name, const char* string)> Dvar_SetCommand{ 0x140CECB30 };
WEAK symbol<dvar_t* (const char* name)> Dvar_FindVar{ 0x140CEA460 };
WEAK symbol<void(void* callback, void* userData)> Dvar_ForEach{ 0x140CEA480 };
WEAK symbol<dvar_t* (unsigned int checksum)> Dvar_FindMalleableVar{ 0x140CEA3C0 };
WEAK symbol<void(const dvar_t* dvar)> Dvar_ClearModified{ 0x140CE9E90 };
WEAK symbol<const char* (const dvar_t* dvar)> Dvar_DisplayableLatchedValue{ 0x140CEA1D0 };
WEAK symbol<void(char* buffer, int index)> Dvar_GetCombinedString{ 0x140BB1F30 };
WEAK symbol<const char* (dvar_t* dvar, DvarValue value)> Dvar_ValueToString{ 0x140CEED00 };
WEAK symbol<void(dvar_t* dvar, DvarSetSource source)> Dvar_Reset{ 0x140CEC490 };
WEAK symbol<unsigned int(const char* name)> Dvar_GenerateChecksum{ 0x140CEA520 };
WEAK symbol<void(dvar_t* dvar, int value)> Dvar_SetInt{ 0x140CED3D0 };
WEAK symbol<void(bool cheatOverride)> Dvar_OverrideCheatProtection{ 0x140CEB250 };
WEAK symbol<__int64(const char* qpath, char** buffer)> FS_ReadFile{ 0xCDE200 };
WEAK symbol<void(char* buffer)> FS_FreeFile{ 0xCDE1F0 };
WEAK symbol<void(int h, const char* fmt, ...)> FS_Printf{ 0xCDD1C0 };
WEAK symbol<__int64(const char* qpath, char** buffer)> FS_ReadFile{ 0x140CDE200 };
WEAK symbol<void(char* buffer)> FS_FreeFile{ 0x140CDE1F0 };
WEAK symbol<void(int h, const char* fmt, ...)> FS_Printf{ 0x140CDD1C0 };
WEAK symbol<gentity_s* (scr_entref_t ent)> GetEntity{ 0xB50EA0 };
WEAK symbol<unsigned int(unsigned int)> GetObjectType{ 0xC059E0 };
WEAK symbol<unsigned int(unsigned int, unsigned int)> GetVariable{ 0xC05A90 };
WEAK symbol<unsigned int(unsigned int parentId, unsigned int unsignedValue)> GetNewVariable{ 0xC05660 };
WEAK symbol<unsigned int(unsigned int parentId, unsigned int unsignedValue)> GetNewArrayVariable{ 0xC054E0 };
WEAK symbol<unsigned int(unsigned int parentId, unsigned int name)> FindVariable{ 0xC05100 };
WEAK symbol<unsigned int(int entnum, unsigned int classnum)> FindEntityId{ 0xC05000 };
WEAK symbol<void(unsigned int parentId, unsigned int index)> RemoveVariableValue{ 0xC05E90 };
WEAK symbol<gentity_s* (scr_entref_t ent)> GetEntity{ 0x140B50EA0 };
WEAK symbol<unsigned int(unsigned int)> GetObjectType{ 0x140C059E0 };
WEAK symbol<unsigned int(unsigned int, unsigned int)> GetVariable{ 0x140C05A90 };
WEAK symbol<unsigned int(unsigned int parentId, unsigned int unsignedValue)> GetNewVariable{ 0x140C05660 };
WEAK symbol<unsigned int(unsigned int parentId, unsigned int unsignedValue)> GetNewArrayVariable{ 0x140C054E0 };
WEAK symbol<unsigned int(unsigned int parentId, unsigned int name)> FindVariable{ 0x140C05100 };
WEAK symbol<unsigned int(int entnum, unsigned int classnum)> FindEntityId{ 0x140C05000 };
WEAK symbol<void(unsigned int parentId, unsigned int index)> RemoveVariableValue{ 0x140C05E90 };
WEAK symbol<void(VariableValue* result, unsigned int classnum,
int entnum, int offset)> GetEntityFieldValue{ 0xC09CC0 };
int entnum, int offset)> GetEntityFieldValue{ 0x140C09CC0 };
WEAK symbol<int(int clientNum)> G_MainMP_GetClientScore{ 0xB20550 };
WEAK symbol<void* (void*, const char* name)> G_GetWeaponForName { 0x733D40 };
WEAK symbol<int (void*, const void* weapon, int dualWield, int startInAltMode, int usedBefore)> G_GivePlayerWeapon{ 0x733D40 };
WEAK symbol<int(void*, const void* weapon, const bool isAlternate, int hadWeapon)> G_InitializeAmmo{ 0x733D40 };
WEAK symbol<int(int clientNum)> G_MainMP_GetClientScore{ 0x140B20550 };
WEAK symbol<void* (void*, const char* name)> G_GetWeaponForName { 0x140B4FCB0 };
WEAK symbol<int (void*, const void* weapon, int dualWield, int startInAltMode, int usedBefore)> G_GivePlayerWeapon{ 0x140B69400 };
WEAK symbol<int(void*, const void* weapon, const bool isAlternate, int hadWeapon)> G_InitializeAmmo{ 0x140B1B0E0 };
WEAK symbol<char* (char* string)> I_CleanStr{ 0xCFACC0 };
WEAK symbol<char* (char* string)> I_CleanStr{ 0x140CFACC0 };
WEAK symbol<const char* (int, int, int)> Key_KeynumToString{ 0x9A95E0 };
WEAK symbol<const char* (int, int, int)> Key_KeynumToString{ 0x1409A95E0 };
WEAK symbol<bool()> LUI_CoD_InFrontEnd{ 0x615080 };
WEAK symbol<void(bool frontend, bool errorRecovery)> LUI_CoD_Init{ 0x615090 };
WEAK symbol<void()> LUI_CoD_Shutdown{ 0x617610 };
WEAK symbol<void(int localClientNum, const char* menuName, int isPopup, int isModal, int isExclusive)> LUI_OpenMenu{ 0xCC0CA0 };
WEAK symbol<void(int localClientNum, const char* menuName, int immediate)> LUI_CloseMenu{ 0xCC0C40 };
WEAK symbol<void(int localClientNum)> LUI_CoD_CLoseAll{ 0x6135C0 };
WEAK symbol<bool()> LUI_CoD_InFrontEnd{ 0x140615080 };
WEAK symbol<void(bool frontend, bool errorRecovery)> LUI_CoD_Init{ 0x140615090 };
WEAK symbol<void()> LUI_CoD_Shutdown{ 0x140617610 };
WEAK symbol<void(int localClientNum, const char* menuName, int isPopup, int isModal, int isExclusive)> LUI_OpenMenu{ 0x140CC0CA0 };
WEAK symbol<void(int localClientNum, const char* menuName, int immediate)> LUI_CloseMenu{ 0x140CC0C40 };
WEAK symbol<void(int localClientNum)> LUI_CoD_CLoseAll{ 0x1406135C0 };
WEAK symbol<unsigned int(int controllerIndex)> Live_SyncOnlineDataFlags{ 0xDC5CE0 };
WEAK symbol<std::uint64_t(int controllerIndex)> Live_GetXuid{ 0xD32A20 };
WEAK symbol<unsigned int(int controllerIndex)> Live_SyncOnlineDataFlags{ 0x140DC5CE0 };
WEAK symbol<std::uint64_t(int controllerIndex)> Live_GetXuid{ 0x140D32A20 };
WEAK symbol<PartyData* ()> Lobby_GetPartyData{ 0x9C3E20 };
WEAK symbol<PartyData* ()> Lobby_GetPartyData{ 0x1409C3E20 };
WEAK symbol<void()> LUI_EnterCriticalSection{ 0x600080 };
WEAK symbol<void()> LUI_LeaveCriticalSection{ 0x602280 };
WEAK symbol<void()> LUI_EnterCriticalSection{ 0x140600080 };
WEAK symbol<void()> LUI_LeaveCriticalSection{ 0x140602280 };
WEAK symbol<Material* (const char* material)> Material_RegisterHandle{ 0xE11CE0 };
WEAK symbol<Material* (const char* material)> Material_RegisterHandle{ 0x140E11CE0 };
WEAK symbol<bool(int localClientNum, const char* menuName)> Menu_IsMenuOpenAndVisible{ 0x61CA70 };
WEAK symbol<bool(int localClientNum, const char* menuName)> Menu_IsMenuOpenAndVisible{ 0x14061CA70 };
WEAK symbol<void(netadr_s*, sockaddr*)> NetadrToSockadr{ 0xCE6B90 };
WEAK symbol<void(netsrc_t, netadr_s*, const char*)> NET_OutOfBandPrint{ 0xBB4EE0 };
WEAK symbol<void(netsrc_t sock, int length, const void* data, const netadr_s* to)> NET_SendLoopPacket{ 0xBB50A0 };
WEAK symbol<bool(const char* s, netadr_s* a)> NET_StringToAdr{ 0xBB5180 };
WEAK symbol<int(netadr_s a, netadr_s b)> NET_CompareAdr{ 0xBB49B0 };
WEAK symbol<int(netadr_s a, netadr_s b)> NET_CompareBaseAdr{ 0xBB4A00 };
WEAK symbol<void(netadr_s*, sockaddr*)> NetadrToSockadr{ 0x140CE6B90 };
WEAK symbol<void(netsrc_t, netadr_s*, const char*)> NET_OutOfBandPrint{ 0x140BB4EE0 };
WEAK symbol<void(netsrc_t sock, int length, const void* data, const netadr_s* to)> NET_SendLoopPacket{ 0x140BB50A0 };
WEAK symbol<bool(const char* s, netadr_s* a)> NET_StringToAdr{ 0x140BB5180 };
WEAK symbol<int(netadr_s a, netadr_s b)> NET_CompareAdr{ 0x140BB49B0 };
WEAK symbol<int(netadr_s a, netadr_s b)> NET_CompareBaseAdr{ 0x140BB4A00 };
WEAK symbol<PartyData* ()> Party_GetActiveParty{ 0x9CC010 };
WEAK symbol<PartyData* ()> Party_GetActiveParty{ 0x1409CC010 };
WEAK symbol<void(const unsigned int controllerIndex, XUID xuid)> PlayercardCache_AddToDownload{ 0xDB72E0 };
WEAK symbol<void(const unsigned int controllerIndex, XUID xuid)> PlayercardCache_AddToDownload{ 0x140DB72E0 };
WEAK symbol<GfxFont* (const char* font, int size)> R_RegisterFont{ 0xDFC670 };
WEAK symbol<int(const char* text, int maxChars, GfxFont* font)> R_TextWidth{ 0xDFC770 };
WEAK symbol<int(void* font)> R_GetFontHeight{ 0x12727B0 };
WEAK symbol<void* (int a1)> R_DrawSomething{ 0xDFBD00 };
WEAK symbol<void()> R_SyncRenderThread{ 0xE27EE0 };
WEAK symbol<GfxFont* (const char* font, int size)> R_RegisterFont{ 0x140DFC670 };
WEAK symbol<int(const char* text, int maxChars, GfxFont* font)> R_TextWidth{ 0x140DFC770 };
WEAK symbol<int(void* font)> R_GetFontHeight{ 0x1412727B0 };
WEAK symbol<void* (int a1)> R_Font_GetLegacyFontStyle{ 0x140DFBD00 };
WEAK symbol<void()> R_SyncRenderThread{ 0x140E27EE0 };
WEAK symbol<void(float x, float y, float width, float height, float s0, float t0, float s1, float t1,
float* color, Material* material, int unk)> R_AddCmdDrawStretchPic{ 0xE24DC0 };
float* color, Material* material, int unk)> R_AddCmdDrawStretchPic{ 0x140E24DC0 };
WEAK symbol<void* (const char* text, int maxChars, void* font, int fontHeight, float x,
float y, float xScale, float yScale, float rotation, float* color,
int cursor_pos, char cursor_char, void* style_unk, int a14, int a15, int a16, int a17)> IW7_AddBaseDrawTextCmd{ 0xE23D90 };
int cursor_pos, char cursor_char, void* style_unk, int a14, int a15, int a16, int a17)> AddBaseDrawTextCmd{ 0x140E23D90 };
#define R_AddCmdDrawText(TXT, MC, F, X, Y, XS, YS, R, C, S) \
IW7_AddBaseDrawTextCmd(TXT, MC, F, game::R_GetFontHeight(F), X, Y, XS, YS, R, C,-1, 0, game::R_DrawSomething(S), 0, 0, 0, 0)
AddBaseDrawTextCmd(TXT, MC, F, game::R_GetFontHeight(F), X, Y, XS, YS, R, C,-1, 0, game::R_Font_GetLegacyFontStyle(S), 0, 0, 0, 0)
#define R_AddCmdDrawTextWithCursor(TXT, MC, F, UNK, X, Y, XS, YS, R, C, S, CP, CC) \
IW7_AddBaseDrawTextCmd(TXT, MC, F, game::R_GetFontHeight(F), X, Y, XS, YS, R, C, CP, CC, game::R_DrawSomething(S), 0, 0, 0, 0)
AddBaseDrawTextCmd(TXT, MC, F, game::R_GetFontHeight(F), X, Y, XS, YS, R, C, CP, CC, game::R_Font_GetLegacyFontStyle(S), 0, 0, 0, 0)
WEAK symbol<std::uint64_t(const void* session, const int clientNum)> Session_GetXuid{ 0xC72AB0 };
WEAK symbol<bool(const SessionData* session, const int memberIndex)> Session_IsHost{ 0xD9B470 };
WEAK symbol<std::uint64_t(const void* session, const int clientNum)> Session_GetXuid{ 0x140C72AB0 };
WEAK symbol<bool(const SessionData* session, const int memberIndex)> Session_IsHost{ 0x140D9B470 };
WEAK symbol<int(const char* str, std::uint64_t* xuid)> StringToXUID{ 0xCE6C40 };
WEAK symbol<int(const char* str, std::uint64_t* xuid)> StringToXUID{ 0x140CE6C40 };
WEAK symbol<char* ()> Sys_Cwd{ 0xCFE5A0 };
WEAK symbol<char* ()> Sys_Cwd{ 0x140CFE5A0 };
WEAK symbol<int()> Sys_Milliseconds{ 0xD58110 };
WEAK symbol<int()> Sys_Milliseconds{ 0x140D58110 };
WEAK symbol<HANDLE(Sys_Folder folder, const char* baseFilename)> Sys_CreateFile{ 0xCFDF50 };
WEAK symbol<HANDLE(Sys_Folder folder, const char* baseFilename)> Sys_CreateFile{ 0x140CFDF50 };
WEAK symbol<int(int length, void const* data, const netadr_s* to)> Sys_SendPacket{ 0xD57DE0 };
WEAK symbol<int(netadr_s* net_from, msg_t* net_message)> Sys_GetPacket{ 0xD57D50 };
WEAK symbol<int(int length, void const* data, const netadr_s* to)> Sys_SendPacket{ 0x140D57DE0 };
WEAK symbol<int(netadr_s* net_from, msg_t* net_message)> Sys_GetPacket{ 0x140D57D50 };
WEAK symbol<bool()> Sys_IsDatabaseThread{ 0xBB7B30 };
WEAK symbol<bool()> Sys_IsDatabaseThread{ 0x140BB7B30 };
WEAK symbol<const char* ()> SEH_GetCurrentLanguageCode{ 0xCBAF50 };
WEAK symbol<char* ()> SEH_GetCurrentLanguageName{ 0xCBB090 };
WEAK symbol<char* (int code)> SEH_GetLanguageName{ 0xCBB140 };
WEAK symbol<const char* ()> SEH_GetCurrentLanguageCode{ 0x140CBAF50 };
WEAK symbol<char* ()> SEH_GetCurrentLanguageName{ 0x140CBB090 };
WEAK symbol<char* (int code)> SEH_GetLanguageName{ 0x140CBB140 };
WEAK symbol<void(const char* name, int allocDir)> PMem_BeginAlloc{ 0xCF0E10 };
WEAK symbol<void(const char* name, int allocDir)> PMem_EndAlloc{ 0xCF1070 };
WEAK symbol<char* (const size_t size, unsigned int alignment, int type, int source)> PMem_AllocFromSource_NoDebug{ 0xCF0A90 };
WEAK symbol<void(const char* name, int allocDir)> PMem_Free{ 0xCF10D0 };
WEAK symbol<void(const char* name, int allocDir)> PMem_BeginAlloc{ 0x140CF0E10 };
WEAK symbol<void(const char* name, int allocDir)> PMem_EndAlloc{ 0x140CF1070 };
WEAK symbol<char* (const size_t size, unsigned int alignment, int type, int source)> PMem_AllocFromSource_NoDebug{ 0x140CF0A90 };
WEAK symbol<void(const char* name, int allocDir)> PMem_Free{ 0x140CF10D0 };
WEAK game::symbol<bool(__int64 weaponMap, game::playerState_s* ps, unsigned int hand, unsigned char pmoveHandler)> PM_Weapon_IsInInterruptibleState{ 0x728210 };
WEAK game::symbol<void(__int64 weaponMap, game::playerState_s* ps, unsigned char pmoveHandler)> PM_BuildWeaponAnimArrays{ 0x71AC50 };
WEAK game::symbol<void(game::pmove_t* pm, int hand)> PM_Weapon_Idle{ 0x727910 };
WEAK game::symbol<bool(__int64 weaponMap, game::playerState_s* ps, unsigned int hand, unsigned char pmoveHandler)> PM_Weapon_IsInInterruptibleState{ 0x140728210 };
WEAK game::symbol<void(__int64 weaponMap, game::playerState_s* ps, unsigned char pmoveHandler)> PM_BuildWeaponAnimArrays{ 0x14071AC50 };
WEAK game::symbol<void(game::pmove_t* pm, int hand)> PM_Weapon_Idle{ 0x140727910 };
WEAK symbol<unsigned int(unsigned int localId, const char* pos,
unsigned int paramcount)> VM_Execute{ 0xC0CDB0 };
unsigned int paramcount)> VM_Execute{ 0x140C0CDB0 };
WEAK symbol<void(unsigned int id, scr_string_t stringValue,
unsigned int paramcount)> Scr_NotifyId{ 0xC0C2B0 };
WEAK symbol<const float* (const float* v)> Scr_AllocVector{ 0xC06960 };
WEAK symbol<void(int)> Scr_AddInt{ 0xC0A580 };
WEAK symbol<bool(VariableValue* value)> Scr_CastString{ 0xC06AE0 };
WEAK symbol<void()> Scr_ClearOutParams{ 0xC0ABC0 };
WEAK symbol<unsigned int(int classnum, unsigned int entnum)> Scr_GetEntityId{ 0xC08FA0 };
WEAK symbol<scr_entref_t(unsigned int entnum)> Scr_GetEntityIdRef{ 0xC09050 };
WEAK symbol<int(unsigned int classnum, int entnum, int offset)> Scr_SetObjectField{ 0x40B6E0 };
WEAK symbol<int()> Scr_GetInt{ 0xC0B950 };
WEAK symbol<void()> Scr_ErrorInternal{ 0xC0AC30 };
WEAK symbol<void(const char* str)> Scr_AllocGlobalString{ 0xC03C70 };
unsigned int paramcount)> Scr_NotifyId{ 0x140C0C2B0 };
WEAK symbol<const float* (const float* v)> Scr_AllocVector{ 0x140C06960 };
WEAK symbol<void(int)> Scr_AddInt{ 0x140C0A580 };
WEAK symbol<bool(VariableValue* value)> Scr_CastString{ 0x140C06AE0 };
WEAK symbol<void()> Scr_ClearOutParams{ 0x140C0ABC0 };
WEAK symbol<unsigned int(int classnum, unsigned int entnum)> Scr_GetEntityId{ 0x140C08FA0 };
WEAK symbol<scr_entref_t(unsigned int entnum)> Scr_GetEntityIdRef{ 0x140C09050 };
WEAK symbol<int(unsigned int classnum, int entnum, int offset)> Scr_SetObjectField{ 0x14040B6E0 };
WEAK symbol<int()> Scr_GetInt{ 0x140C0B950 };
WEAK symbol<void()> Scr_ErrorInternal{ 0x140C0AC30 };
WEAK symbol<void(const char* str)> Scr_AllocGlobalString{ 0x140C03C70 };
WEAK symbol<ScreenPlacement* ()> ScrPlace_GetViewPlacement{ 0x9E4090 };
WEAK symbol<ScreenPlacement* ()> ScrPlace_GetViewPlacement{ 0x1409E4090 };
WEAK symbol<const char* (const StringTable* table, const int comparisonColumn, const char* value, const int valueColumn)> StringTable_Lookup{ 0xCE7950 };
WEAK symbol<const char* (const StringTable* table, const int row, const int column)> StringTable_GetColumnValueForRow{ 0xCE78E0 };
WEAK symbol<const char* (const StringTable* table, const int comparisonColumn, const char* value, const int valueColumn)> StringTable_Lookup{ 0x140CE7950 };
WEAK symbol<const char* (const StringTable* table, const int row, const int column)> StringTable_GetColumnValueForRow{ 0x140CE78E0 };
WEAK symbol<scr_string_t(const char* str)> SL_FindString{ 0xC035F0 };
WEAK symbol<scr_string_t(const char* str, unsigned int user)> SL_GetString{ 0xC037E0 };
WEAK symbol<const char*(scr_string_t stringValue)> SL_ConvertToString{ 0xC03300 };
WEAK symbol<unsigned int(const char* str)> SL_GetCanonicalString{ 0xBFD340 };
WEAK symbol<scr_string_t(const char* str)> SL_FindString{ 0x140C035F0 };
WEAK symbol<scr_string_t(const char* str, unsigned int user)> SL_GetString{ 0x140C037E0 };
WEAK symbol<const char*(scr_string_t stringValue)> SL_ConvertToString{ 0x140C03300 };
WEAK symbol<unsigned int(const char* str)> SL_GetCanonicalString{ 0x140BFD340 };
WEAK symbol<void(const char* string)> SV_Cmd_TokenizeString{ 0xB7DD00 };
WEAK symbol<void()> SV_Cmd_EndTokenizedString{ 0xB7DCC0 };
WEAK symbol<void(int clientNum, const char* reason, bool kickedForInactivity)> SV_CmdsMP_KickClientNum{ 0xC4CCC0 };
WEAK symbol<void(const char* string)> SV_Cmd_TokenizeString{ 0x140B7DD00 };
WEAK symbol<void()> SV_Cmd_EndTokenizedString{ 0x140B7DCC0 };
WEAK symbol<void(int clientNum, const char* reason, bool kickedForInactivity)> SV_CmdsMP_KickClientNum{ 0x140C4CCC0 };
WEAK symbol<void(const char* map, const char* gameType, int clientCount, int agentCount, bool hardcore,
bool mapIsPreloaded, bool migrate)> SV_CmdsMP_StartMapForParty{ 0xC4D150 };
WEAK symbol<void()> SV_CmdsMP_CheckLoadGame{ 0xC4C9E0 };
WEAK symbol<void()> SV_CmdsSP_MapRestart_f{ 0xC12B30 };
WEAK symbol<void()> SV_CmdsSP_FastRestart_f{ 0xC12AF0 };
WEAK symbol<int (int clientNum)> SV_ClientMP_GetClientPing{ 0xC507D0 };
WEAK symbol<char* (int entNum)> SV_GameMP_GetGuid{ 0xC12410 };
WEAK symbol<void()> SV_MainMP_KillLocalServer{ 0xC58DF0 };
WEAK symbol<SessionData* ()> SV_MainMP_GetServerLobby{ 0xC58DA0 };
WEAK symbol<void(int clientNum, svscmd_type type, const char* text)> SV_GameSendServerCommand{ 0xC54780 };
WEAK symbol<void(client_t* drop, const char* reason, bool tellThem)> SV_DropClient{ 0xC4FBA0 };
WEAK symbol<bool()> SV_Loaded{ 0xC114C0 };
WEAK symbol<bool(const char* name)> SV_MapExists{ 0xCDB620 };
WEAK symbol<void* (int num)> SV_GetPlayerstateForClientNum{ 0xC123A0 };
bool mapIsPreloaded, bool migrate)> SV_CmdsMP_StartMapForParty{ 0x140C4D150 };
WEAK symbol<void()> SV_CmdsMP_CheckLoadGame{ 0x140C4C9E0 };
WEAK symbol<void()> SV_CmdsSP_MapRestart_f{ 0x140C12B30 };
WEAK symbol<void()> SV_CmdsSP_FastRestart_f{ 0x140C12AF0 };
WEAK symbol<int (int clientNum)> SV_ClientMP_GetClientPing{ 0x140C507D0 };
WEAK symbol<char* (int entNum)> SV_GameMP_GetGuid{ 0x140C12410 };
WEAK symbol<void()> SV_MainMP_KillLocalServer{ 0x140C58DF0 };
WEAK symbol<SessionData* ()> SV_MainMP_GetServerLobby{ 0x140C58DA0 };
WEAK symbol<void(int clientNum, svscmd_type type, const char* text)> SV_GameSendServerCommand{ 0x140C54780 };
WEAK symbol<void(client_t* drop, const char* reason, bool tellThem)> SV_DropClient{ 0x140C4FBA0 };
WEAK symbol<bool()> SV_Loaded{ 0x140C114C0 };
WEAK symbol<bool(const char* name)> SV_MapExists{ 0x140CDB620 };
WEAK symbol<playerState_s* (int num)> SV_GetPlayerstateForClientNum{ 0x140C123A0 };
WEAK symbol<gentity_s* (const char* bot_name, unsigned int head, unsigned int body, unsigned int helmet)> SV_AddBot{ 0xC4E340 };
WEAK symbol<bool(int clientNum)> SV_BotIsBot{ 0xC3BC90 };
WEAK symbol<const char* ()> SV_BotGetRandomName{ 0xC3B4E0 };
WEAK symbol<int(gentity_s* ent)> SV_SpawnTestClient{ 0xC51DE0 };
WEAK symbol<gentity_s* (const char* bot_name, unsigned int head, unsigned int body, unsigned int helmet)> SV_AddBot{ 0x140C4E340 };
WEAK symbol<bool(int clientNum)> SV_BotIsBot{ 0x140C3BC90 };
WEAK symbol<const char* ()> SV_BotGetRandomName{ 0x140C3B4E0 };
WEAK symbol<int(gentity_s* ent)> SV_SpawnTestClient{ 0x140C51DE0 };
WEAK symbol<void(int)> SND_StopSounds{ 0xCA06E0 };
WEAK symbol<void(const char*)> SND_SetMusicState{ 0xC9E110 };
WEAK symbol<void(int)> SND_StopSounds{ 0x140CA06E0 };
WEAK symbol<void(const char*)> SND_SetMusicState{ 0x140C9E110 };
WEAK symbol<const char* (const char*)> UI_GetMapDisplayName{ 0xCC6270 };
WEAK symbol<const char* (const char*)> UI_GetGameTypeDisplayName{ 0xCC61C0 };
WEAK symbol<void(unsigned int localClientNum, const char** args)> UI_RunMenuScript{ 0xCC9710 };
WEAK symbol<const char* (const char* string)> UI_SafeTranslateString{ 0xCC9790 };
WEAK symbol<const char* (const char*)> UI_GetMapDisplayName{ 0x140CC6270 };
WEAK symbol<const char* (const char*)> UI_GetGameTypeDisplayName{ 0x140CC61C0 };
WEAK symbol<void(unsigned int localClientNum, const char** args)> UI_RunMenuScript{ 0x140CC9710 };
WEAK symbol<const char* (const char* string)> UI_SafeTranslateString{ 0x140CC9790 };
WEAK game::symbol<float(game::XAnim_s* anims, unsigned int anim)> XAnimGetLengthMsec{ 0xD761C0 };
WEAK game::symbol<float(game::XAnim_s* anims, unsigned int anim)> XAnimGetLengthMsec{ 0x140D761C0 };
WEAK symbol<void* (jmp_buf* Buf, int Value)> longjmp{ 0x12C0758 };
WEAK symbol<int(jmp_buf* Buf)> _setjmp{ 0x1423110 };
WEAK symbol<void* (jmp_buf* Buf, int Value)> longjmp{ 0x1412C0758 };
WEAK symbol<int(jmp_buf* Buf)> _setjmp{ 0x141423110 };
/***************************************************************
* Variables
**************************************************************/
//WEAK symbol<int> client_actives_something{ 0x2246C51 }; // 0x140995A8B in IW7 idb shows this to be cgameinitialized times the local client number
WEAK symbol<int> g_script_error_level{ 0x146B16298 };
WEAK symbol<jmp_buf> g_script_error{ 0x146B162A0 };
WEAK symbol<int> g_script_error_level{ 0x6B16298 };
WEAK symbol<jmp_buf> g_script_error{ 0x6B162A0 };
WEAK symbol<unsigned int> levelEntityId{ 0x14665A120 };
WEAK symbol<unsigned int> levelEntityId{ 0x665A120 };
WEAK symbol<CmdArgs> sv_cmd_args{ 0x145D65C20 };
WEAK symbol<CmdArgs> cmd_args{ 0x145D65B70 };
WEAK symbol<cmd_function_s*> cmd_functions{ 0x145D65CC8 };
WEAK symbol<const char*> command_whitelist{ 0x1414D1B70 };
WEAK symbol<CmdArgs> sv_cmd_args{ 0x5D65C20 };
WEAK symbol<CmdArgs> cmd_args{ 0x5D65B70 };
WEAK symbol<cmd_function_s*> cmd_functions{ 0x5D65CC8 };
WEAK symbol<const char*> command_whitelist{ 0x14D1B70 };
WEAK symbol<PLAYERCARD_CACHE_TASK_STAGE> g_DWPlayercardCacheDownloadTaskStage{ 0x1480AE414 };
WEAK symbol<CachedPlayerProfile> cached_playercards{ 0x1480AE420 };
WEAK symbol<PLAYERCARD_CACHE_TASK_STAGE> g_DWPlayercardCacheDownloadTaskStage{ 0x80AE414 };
WEAK symbol<CachedPlayerProfile> cached_playercards{ 0x80AE420 };
WEAK symbol<GfxDrawMethod> gfxDrawMethod{ 0x1483E86A8 };
WEAK symbol<GfxDrawMethod> gfxDrawMethod{ 0x83E86A8 };
WEAK symbol<int> keyCatchers{ 0x142246C34 };
WEAK symbol<PlayerKeyState> playerKeys{ 0x14523BA0C };
WEAK symbol<int> keyCatchers{ 0x2246C34 };
WEAK symbol<PlayerKeyState> playerKeys{ 0x523BA0C };
WEAK symbol<int> dvarCount{ 0x147595E54 };
WEAK symbol<dvar_t*> dvarPool{ 0x147595E60 };
WEAK symbol<int> dvarCount{ 0x7595E54 };
WEAK symbol<dvar_t*> dvarPool{ 0x7595E60 };
WEAK symbol<char> isCheatOverride{ 0x141BBEF28 };
WEAK symbol<char> isCheatOverride{ 0x1BBEF28 };
WEAK symbol<gentity_s> g_entities{ 0x143D22610 };
WEAK symbol<gentity_s> g_entities{ 0x3D22610 };
WEAK symbol<unsigned int> svs_numclients{ 0x146B229E0 };
WEAK symbol<client_t*> svs_clients{ 0x146B22950 };
WEAK symbol<unsigned int> svs_numclients{ 0x6B229E0 };
WEAK symbol<client_t*> svs_clients{ 0x6B22950 };
WEAK symbol<SessionData> g_serverSession{ 0x146B4E080 };
WEAK symbol<SessionData> g_serverSession{ 0x6B4E080 };
WEAK symbol<clientUIActive_t> clientUIActives{ 0x142246C30 };
WEAK symbol<clientUIActive_t> clientUIActives{ 0x2246C30 };
WEAK symbol<connection_data*> cl_con_data{ 0x141FE58B8 };
WEAK symbol<connection_data*> cl_con_data{ 0x1FE58B8 };
WEAK symbol<int> sv_map_restart{ 0x146B2C9D4 };
WEAK symbol<int> sv_loadScripts{ 0x146B2C9D8 };
WEAK symbol<int> sv_migrate{ 0x146B2C9DC };
WEAK symbol<int> sv_map_restart{ 0x6B2C9D4 };
WEAK symbol<int> sv_loadScripts{ 0x6B2C9D8 };
WEAK symbol<int> sv_migrate{ 0x6B2C9DC };
WEAK symbol<SOCKET> query_socket{ 0x14779FDC8 };
WEAK symbol<SOCKET> query_socket{ 0x779FDC8 };
WEAK symbol<DWORD> threadIds{ 0x14602BAB0 };
WEAK symbol<DWORD> threadIds{ 0x602BAB0 };
WEAK symbol<scrVarGlob_t> scr_VarGlob{ 0x146691180 };
WEAK symbol<scrVmPub_t> scr_VmPub{ 0x146B183B0 };
WEAK symbol<function_stack_t> scr_function_stack{ 0x146B22908 };
WEAK symbol<scrVarGlob_t> scr_VarGlob{ 0x6691180 };
WEAK symbol<scrVmPub_t> scr_VmPub{ 0x6B183B0 };
WEAK symbol<function_stack_t> scr_function_stack{ 0x6B22908 };
WEAK symbol<PhysicalMemory> g_mem{ 0x147685560 };
WEAK symbol<PhysicalMemory> g_scriptmem{ 0x147685FC0 };
WEAK symbol<PhysicalMemory> g_mem{ 0x7685560 };
WEAK symbol<PhysicalMemory> g_scriptmem{ 0x7685FC0 };
WEAK symbol<searchpath_s> fs_searchpaths{ 0x14756DEE0 };
WEAK symbol<searchpath_s> fs_searchpaths{ 0x756DEE0 };
WEAK symbol<DB_LoadData> g_load{ 0x1452A8010 };
WEAK symbol<int> g_authLoad_isSecure{ 0x14529DD90 };
WEAK symbol<DB_ReadStream> db_stream{ 0x1452A8050 };
WEAK symbol<db_z_stream_s> db_zip_stream{ 0x14529DD30 };
WEAK symbol<char*> db_zip_memory{ 0x14525B500 };
WEAK symbol<DB_LoadData> g_load{ 0x52A8010 };
WEAK symbol<int> g_authLoad_isSecure{ 0x529DD90 };
WEAK symbol<DB_ReadStream> db_stream{ 0x52A8050 };
WEAK symbol<db_z_stream_s> db_zip_stream{ 0x529DD30 };
WEAK symbol<char*> db_zip_memory{ 0x525B500 };
WEAK symbol<unsigned __int64> g_streamPos{ 0x145687E30 };
WEAK symbol<unsigned __int64> g_streamPos{ 0x5687E30 };
WEAK symbol<bool> g_quitRequested{ 0x779CD44 };
WEAK symbol<bool> g_quitRequested{ 0x14779CD44 };
WEAK symbol<unsigned int> gameEntityId{ 0x665A124 };
WEAK symbol<int> level_time{ 0x3C986D8 };
WEAK symbol<unsigned int> gameEntityId{ 0x14665A124 };
WEAK symbol<int> level_time{ 0x143C986D8 };
WEAK symbol<int> s_frontEndScene_state{ 0x144BFF608 };
WEAK symbol<WeaponDef*> bg_weaponDefs{ 0x145210120 };
namespace hks
{
WEAK symbol<lua_State*> lua_state{ 0x4FC35F0 };
WEAK symbol<void(lua_State* s, const char* str, unsigned int l)> hksi_lua_pushlstring{ 0x309E0 };
WEAK symbol<HksObject* (HksObject* result, lua_State* s, const HksObject* table, const HksObject* key)> hks_obj_getfield{ 0x11E14D0 };
WEAK symbol<HksObject* (HksObject* result, lua_State* s, const HksObject* table, const HksObject* key)> hks_obj_gettable{ 0x11E19B0 };
WEAK symbol<void(lua_State* s, const HksObject* tbl, const HksObject* key, const HksObject* val)> hks_obj_settable{ 0x11E26F0 };
WEAK symbol<void(lua_State* s, int nargs, int nresults, const unsigned int* pc)> vm_call_internal{ 0x120CCE0 };
WEAK symbol<HashTable* (lua_State* s, unsigned int arraySize, unsigned int hashSize)> Hashtable_Create{ 0x11D0590 };
WEAK symbol<lua_State*> lua_state{ 0x144FC35F0 };
WEAK symbol<void(lua_State* s, const char* str, unsigned int l)> hksi_lua_pushlstring{ 0x1400309E0 };
WEAK symbol<HksObject* (HksObject* result, lua_State* s, const HksObject* table, const HksObject* key)> hks_obj_getfield{ 0x1411E14D0 };
WEAK symbol<HksObject* (HksObject* result, lua_State* s, const HksObject* table, const HksObject* key)> hks_obj_gettable{ 0x1411E19B0 };
WEAK symbol<void(lua_State* s, const HksObject* tbl, const HksObject* key, const HksObject* val)> hks_obj_settable{ 0x1411E26F0 };
WEAK symbol<void(lua_State* s, int nargs, int nresults, const unsigned int* pc)> vm_call_internal{ 0x14120CCE0 };
WEAK symbol<HashTable* (lua_State* s, unsigned int arraySize, unsigned int hashSize)> Hashtable_Create{ 0x1411D0590 };
WEAK symbol<cclosure* (lua_State* s, lua_function function, int num_upvalues,
int internal_, int profilerTreatClosureAsFunc)> cclosure_Create{ 0x11D07B0 };
WEAK symbol<int(lua_State* s, int t)> hksi_luaL_ref{ 0x11EAE10 };
int internal_, int profilerTreatClosureAsFunc)> cclosure_Create{ 0x1411D07B0 };
WEAK symbol<int(lua_State* s, int t)> hksi_luaL_ref{ 0x1411EAE10 };
WEAK symbol<int(lua_State* s, const HksCompilerSettings* options, const char* buff,
unsigned __int64 sz, const char* name)> hksi_hksL_loadbuffer{ 0x11E2F50 };
WEAK symbol<int(lua_State* s, const char* what, lua_Debug* ar)> hksi_lua_getinfo{ 0x11E48C0 };
WEAK symbol<int(lua_State* s, int level, lua_Debug* ar)> hksi_lua_getstack{ 0x11E4AA0 };
WEAK symbol<void(lua_State* s, const char* fmt, ...)> hksi_luaL_error{ 0x11EA860 };
WEAK symbol<void(lua_State* s, int what, int data)> hksi_lua_gc{ 0x11EAF00 };
WEAK symbol<void(lua_State* s, int t, int ref)> hksi_luaL_unref{ 0x11E4460 };
WEAK symbol<const char*> s_compilerTypeName{ 0x1BDEEF0 };
unsigned __int64 sz, const char* name)> hksi_hksL_loadbuffer{ 0x1411E2F50 };
WEAK symbol<int(lua_State* s, const char* what, lua_Debug* ar)> hksi_lua_getinfo{ 0x1411E48C0 };
WEAK symbol<int(lua_State* s, int level, lua_Debug* ar)> hksi_lua_getstack{ 0x1411E4AA0 };
WEAK symbol<void(lua_State* s, const char* fmt, ...)> hksi_luaL_error{ 0x1411EA860 };
WEAK symbol<void(lua_State* s, int what, int data)> hksi_lua_gc{ 0x1411EAF00 };
WEAK symbol<void(lua_State* s, int t, int ref)> hksi_luaL_unref{ 0x1411E4460 };
WEAK symbol<const char*> s_compilerTypeName{ 0x141BDEEF0 };
}
}