diff --git a/src/client/component/auth.cpp b/src/client/component/auth.cpp index a337cacd..c85ed081 100644 --- a/src/client/component/auth.cpp +++ b/src/client/component/auth.cpp @@ -234,9 +234,9 @@ namespace auth // Patch steam id bit check if (game::environment::is_sp()) { - //utils::hook::jump(0x140475C17, 0x140475C6A); // H1(1.4) - //utils::hook::jump(0x140476AFF, 0x140476B40); // H1(1.4) - //utils::hook::jump(0x140476FA4, 0x140476FF2); // H1(1.4) + utils::hook::jump(0x4FA1B3_b, 0x4FA21A_b); + utils::hook::jump(0x4FB272_b, 0x4FB2B7_b); + utils::hook::jump(0x140476FA4, 0x4FB7D3_b); } else { diff --git a/src/client/component/binding.cpp b/src/client/component/binding.cpp index ab101b1d..c525255c 100644 --- a/src/client/component/binding.cpp +++ b/src/client/component/binding.cpp @@ -124,13 +124,13 @@ namespace binding } // write all bindings to config file - utils::hook::call(SELECT_VALUE(0x1401881DB, 0x14025032F), key_write_bindings_to_buffer_stub); // H1(1.4) + utils::hook::call(SELECT_VALUE(0x1AC953_b, 0x199E8F_b), key_write_bindings_to_buffer_stub); // links a custom command to an index - utils::hook::jump(SELECT_VALUE(0x140343C00, 0x1404041E0), key_get_binding_for_cmd_stub); // H1(1.4) + utils::hook::jump(SELECT_VALUE(0x377280_b, 0x1572B0_b), key_get_binding_for_cmd_stub); // execute custom binds - cl_execute_key_hook.create(SELECT_VALUE(0x140183C70, 0x14024ACF0), &cl_execute_key_stub); // H1(1.4) + cl_execute_key_hook.create(SELECT_VALUE(0x1A8350_b, 0x23BD2A_b), &cl_execute_key_stub); } }; } diff --git a/src/client/component/branding.cpp b/src/client/component/branding.cpp index 06b71bc2..1474cd5c 100644 --- a/src/client/component/branding.cpp +++ b/src/client/component/branding.cpp @@ -63,7 +63,7 @@ namespace branding //dvars::override::set_string("version", utils::string::va("H1-Mod %s", VERSION)); ui_get_formatted_build_number_hook.create( - SELECT_VALUE(0x0, 0x1DF300_b), ui_get_formatted_build_number_stub); + SELECT_VALUE(0x406EC0_b, 0x1DF300_b), ui_get_formatted_build_number_stub); } }; } diff --git a/src/client/component/fastfiles.cpp b/src/client/component/fastfiles.cpp index bfb64af9..80d294ba 100644 --- a/src/client/component/fastfiles.cpp +++ b/src/client/component/fastfiles.cpp @@ -51,7 +51,7 @@ namespace fastfiles void post_unpack() override { db_try_load_x_file_internal_hook.create( - SELECT_VALUE(0, 0x39A620_b), &db_try_load_x_file_internal); + SELECT_VALUE(0x1F5700_b, 0x39A620_b), &db_try_load_x_file_internal); } }; } diff --git a/src/client/component/input.cpp b/src/client/component/input.cpp index d31dc888..9e92188f 100644 --- a/src/client/component/input.cpp +++ b/src/client/component/input.cpp @@ -64,8 +64,8 @@ namespace input return; } - cl_char_event_hook.create(SELECT_VALUE(0x0, 0x12C8F0_b), cl_char_event_stub); - cl_key_event_hook.create(SELECT_VALUE(0x0, 0x135A70_b), cl_key_event_stub); + cl_char_event_hook.create(SELECT_VALUE(0x1AB8F0_b, 0x12C8F0_b), cl_char_event_stub); + cl_key_event_hook.create(SELECT_VALUE(0x1ABC20_b, 0x135A70_b), cl_key_event_stub); } }; } diff --git a/src/client/component/localized_strings.cpp b/src/client/component/localized_strings.cpp index 207a62e5..1b72bea9 100644 --- a/src/client/component/localized_strings.cpp +++ b/src/client/component/localized_strings.cpp @@ -44,7 +44,7 @@ namespace localized_strings void post_unpack() override { // Change some localized strings - seh_string_ed_get_string_hook.create(SELECT_VALUE(0x0, 0x585DA0_b), &seh_string_ed_get_string); // 1.15 + seh_string_ed_get_string_hook.create(SELECT_VALUE(0x3E6CE0_b, 0x585DA0_b), &seh_string_ed_get_string); } }; } diff --git a/src/client/component/logfile.cpp b/src/client/component/logfile.cpp index 6251ebcc..edb00f28 100644 --- a/src/client/component/logfile.cpp +++ b/src/client/component/logfile.cpp @@ -58,7 +58,7 @@ namespace logfile std::string convert_mod(const int meansOfDeath) { - const auto value = reinterpret_cast(0x140FEC3F0)[meansOfDeath]; + const auto value = reinterpret_cast(0x10B5290_b)[meansOfDeath]; const auto string = game::SL_ConvertToString(*value); return string; } @@ -68,7 +68,7 @@ namespace logfile const bool isAlternate, const float* vDir, const unsigned int hitLoc, int psTimeOffset, int deathAnimDuration) { { - const std::string hitloc = reinterpret_cast(0x140FEC4D0)[hitLoc]; + const std::string hitloc = reinterpret_cast(0x10B5370_b)[hitLoc]; const auto mod_ = convert_mod(meansOfDeath); const auto weapon_ = get_weapon_name(weapon, isAlternate); @@ -110,7 +110,7 @@ namespace logfile const float* vDir, const unsigned int hitLoc, const int timeOffset) { { - const std::string hitloc = reinterpret_cast(0x140FEC4D0)[hitLoc]; + const std::string hitloc = reinterpret_cast(0x10B5370_b)[hitLoc]; const auto mod_ = convert_mod(meansOfDeath); const auto weapon_ = get_weapon_name(weapon, isAlternate); @@ -178,7 +178,7 @@ namespace logfile } // ClientCommand - return utils::hook::invoke(0x140336000, clientNum); + return utils::hook::invoke(0x4132E0_b, clientNum); } void g_shutdown_game_stub(const int freeScripts) @@ -189,7 +189,7 @@ namespace logfile } // G_ShutdownGame - return utils::hook::invoke(0x140345A60, freeScripts); + return utils::hook::invoke(0x422F30_b, freeScripts); } unsigned int local_id_to_entity(unsigned int local_id) @@ -254,7 +254,7 @@ namespace logfile a.inc(r14); a.mov(dword_ptr(rbp, 0xA4), r15d); - a.jmp(SELECT_VALUE(0x140376663, 0x140444653)); + a.jmp(SELECT_VALUE(0x0, 0x5111B3_b)); a.bind(replace); @@ -296,20 +296,20 @@ namespace logfile public: void post_unpack() override { - utils::hook::jump(SELECT_VALUE(0x140376655, 0x140444645), utils::hook::assemble(vm_execute_stub), true); + utils::hook::jump(SELECT_VALUE(0x0, 0x444645_b), utils::hook::assemble(vm_execute_stub), true); if (game::environment::is_sp()) { return; } - utils::hook::call(0x14048191D, client_command_stub); + utils::hook::call(0x54EB46_b, client_command_stub); - scr_player_damage_hook.create(0x14037DC50, scr_player_damage_stub); - scr_player_killed_hook.create(0x14037DF30, scr_player_killed_stub); + scr_player_damage_hook.create(0x1CE780_b, scr_player_damage_stub); + scr_player_killed_hook.create(0x1CEA60_b, scr_player_killed_stub); - utils::hook::call(0x140484EC0, g_shutdown_game_stub); - utils::hook::call(0x1404853C1, g_shutdown_game_stub); + utils::hook::call(0x5520E0_b, g_shutdown_game_stub); + utils::hook::call(0x5525E1_b, g_shutdown_game_stub); } }; } diff --git a/src/client/component/materials.cpp b/src/client/component/materials.cpp index eb2a7cd9..24aa5bd3 100644 --- a/src/client/component/materials.cpp +++ b/src/client/component/materials.cpp @@ -203,8 +203,8 @@ namespace materials } material_register_handle_hook.create(game::Material_RegisterHandle, material_register_handle_stub); - db_material_streaming_fail_hook.create(0x3A1600_b, db_material_streaming_fail_stub); - db_get_material_index_hook.create(0x396000_b, db_get_material_index_stub); + db_material_streaming_fail_hook.create(SELECT_VALUE(0x1FB400_b, 0x3A1600_b), db_material_streaming_fail_stub); + db_get_material_index_hook.create(SELECT_VALUE(0x1F1D80_b, 0x396000_b), db_get_material_index_stub); } }; } diff --git a/src/client/component/mods.cpp b/src/client/component/mods.cpp index db73d83c..13d8cbdb 100644 --- a/src/client/component/mods.cpp +++ b/src/client/component/mods.cpp @@ -61,7 +61,7 @@ namespace mods utils::io::create_directory("mods"); } - db_release_xassets_hook.create(SELECT_VALUE(0x1401CD560, 0x1402BF160), db_release_xassets_stub); + db_release_xassets_hook.create(SELECT_VALUE(0x0, 0x399740_b), db_release_xassets_stub); command::add("loadmod", [](const command::params& params) { diff --git a/src/client/component/scripting.cpp b/src/client/component/scripting.cpp index 56acae83..1d2e9635 100644 --- a/src/client/component/scripting.cpp +++ b/src/client/component/scripting.cpp @@ -186,24 +186,24 @@ namespace scripting public: void post_unpack() override { - vm_notify_hook.create(SELECT_VALUE(0x140379A00, 0x1404479F0), vm_notify_stub); + vm_notify_hook.create(SELECT_VALUE(0x0, 0x514560_b), vm_notify_stub); - scr_add_class_field_hook.create(SELECT_VALUE(0x140370370, 0x14043E2C0), scr_add_class_field_stub); + scr_add_class_field_hook.create(SELECT_VALUE(0x0, 0x50AE20_b), scr_add_class_field_stub); - scr_set_thread_position_hook.create(SELECT_VALUE(0x14036A180, 0x140437D10), scr_set_thread_position_stub); - process_script_hook.create(SELECT_VALUE(0x1403737E0, 0x1404417E0), process_script_stub); + scr_set_thread_position_hook.create(SELECT_VALUE(0x0, 0x504870_b), scr_set_thread_position_stub); + process_script_hook.create(SELECT_VALUE(0x0, 0x50E340_b), process_script_stub); sl_get_canonical_string_hook.create(game::SL_GetCanonicalString, sl_get_canonical_string_stub); if (!game::environment::is_sp()) { - scr_load_level_hook.create(SELECT_VALUE(0x1402A5BE0, 0x1403727C0), scr_load_level_stub); + scr_load_level_hook.create(SELECT_VALUE(0x0, 0x450FC0_b), scr_load_level_stub); } else { - vm_execute_hook.create(SELECT_VALUE(0x140376590, 0x140444580), vm_execute_stub); + vm_execute_hook.create(SELECT_VALUE(0x0, 0x5110E0_b), vm_execute_stub); } - g_shutdown_game_hook.create(SELECT_VALUE(0x140277D40, 0x140345A60), g_shutdown_game_stub); + g_shutdown_game_hook.create(SELECT_VALUE(0x0, 0x422F30_b), g_shutdown_game_stub); db_find_xasset_header_hook.create(game::DB_FindXAssetHeader, db_find_xasset_header_stub); g_dump_scripts = dvars::register_bool("g_dumpScripts", false, game::DVAR_FLAG_NONE, "Dump GSC scripts"); diff --git a/src/client/component/steam_proxy.cpp b/src/client/component/steam_proxy.cpp index 2454e01e..dcef9d12 100644 --- a/src/client/component/steam_proxy.cpp +++ b/src/client/component/steam_proxy.cpp @@ -42,7 +42,7 @@ namespace steam_proxy #ifndef DEV_BUILD try { - this->start_mod("\xF0\x9F\x90\xA4" " H1-Mod: "s + (game::environment::is_sp() ? "Singleplayer" : "Multiplayer"), game::environment::is_sp() ? 393080 : 393100); + this->start_mod("\xF0\x9F\x8E\xAE" " H1-Mod: "s + (game::environment::is_sp() ? "Singleplayer" : "Multiplayer"), game::environment::is_sp() ? 393080 : 393100); } catch (std::exception& e) { @@ -185,4 +185,4 @@ namespace steam_proxy } } -//REGISTER_COMPONENT(steam_proxy::component) +REGISTER_COMPONENT(steam_proxy::component) diff --git a/src/client/game/scripting/functions.cpp b/src/client/game/scripting/functions.cpp index ab2c0b9f..906889c0 100644 --- a/src/client/game/scripting/functions.cpp +++ b/src/client/game/scripting/functions.cpp @@ -59,8 +59,8 @@ namespace scripting script_function get_function_by_index(const unsigned index) { - static const auto function_table = SELECT_VALUE(0x14B1D1B90, 0x149813EF0); - static const auto method_table = SELECT_VALUE(0x14B1D33A0, 0x149815700); + static const auto function_table = SELECT_VALUE(0x14B1D1B90, 0xAC85070_b); + static const auto method_table = SELECT_VALUE(0x14B1D33A0, 0xAC85070_b); if (index < 0x301) { diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index 55728ef8..2a05431d 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -8,38 +8,38 @@ namespace game * Functions **************************************************************/ - WEAK symbol AddRefToValue{0x0, 0x5090E0}; - WEAK symbol RemoveRefToValue{0x0, 0x50ABF0}; - WEAK symbol AddRefToObject{0x0, 0x5090D0}; - WEAK symbol RemoveRefToObject{0x0, 0x50AAE0}; - WEAK symbol AllocThread{0x0, 0x509440}; + WEAK symbol AddRefToValue{0x3C1F50, 0x5090E0}; + WEAK symbol RemoveRefToValue{0x3C3A60, 0x50ABF0}; + WEAK symbol AddRefToObject{0x3C1F40, 0x5090D0}; + WEAK symbol RemoveRefToObject{0x3C3950, 0x50AAE0}; + WEAK symbol AllocThread{0x3C22B0, 0x509440}; WEAK symbol AllocVariable{0x0, 0x0}; - WEAK symbol Cbuf_AddText{0x0, 0x1CF480}; + WEAK symbol Cbuf_AddText{0x3764A0, 0x1CF480}; WEAK symbol Cbuf_ExecuteBufferInternal{0x0, 0x155BC0}; + void (int, int, const char*))> Cbuf_ExecuteBufferInternal{0x3765B0, 0x155BC0}; WEAK symbol Conbuf_AppendText{0x0, 0x0}; - WEAK symbol ConcatArgs{0x0, 0x413050}; + WEAK symbol ConcatArgs{0x296420, 0x413050}; WEAK symbol Cmd_ExecuteSingleCommand{0x0, 0x156E90}; - WEAK symbol Cmd_AddCommandInternal{0x0, 0x156880}; - WEAK symbol Cmd_RemoveCommand{0x0, 0x157690}; - WEAK symbol Cmd_TokenizeString{0x0, 0x0}; // not a function + WEAK symbol Cmd_AddCommandInternal{0x376A40, 0x156880}; + WEAK symbol Cmd_RemoveCommand{0x377670, 0x157690}; + WEAK symbol Cmd_TokenizeString{0x377790, 0x0}; // not a function WEAK symbol Cmd_EndTokenizeString{0x0, 0x0}; // not a function WEAK symbol AimAssist_AddToTargetList{0x0, 0xE66C0}; WEAK symbol BG_GetWeaponNameComplete{0x0, 0x2E2500}; + char* output, unsigned int maxStringLen)> BG_GetWeaponNameComplete{0x4B19C0, 0x2E2500}; - WEAK symbol Com_Frame_Try_Block_Function{0x0, 0x0}; + WEAK symbol Com_Frame_Try_Block_Function{0x385280, 0x0}; WEAK symbol Com_GetCurrentCoDPlayMode{0x0, 0x5AEF80}; - WEAK symbol Com_InFrontend{0x0, 0x76A40}; + WEAK symbol Com_InFrontend{0xF6430, 0x76A40}; WEAK symbol Com_SetSlowMotion{0x0, 0x17E5F0}; - WEAK symbol Com_Error{0x0, 0x159860}; + WEAK symbol Com_Error{0x384820, 0x159860}; WEAK symbol Com_Quit_f{0x0, 0x1F9280}; WEAK symbol Com_Shutdown{0x0, 0x0}; - WEAK symbol Quit{0x0, 0x17CF50}; + WEAK symbol Quit{0x105FF0, 0x17CF50}; WEAK symbol CG_GameMessage{0x0, 0x316210}; WEAK symbol CG_GameMessageBold{0x0, 0x3122F0}; @@ -51,14 +51,14 @@ namespace game WEAK symbol CL_IsCgameInitialized{0x0, 0x33C640}; WEAK symbol CL_VirtualLobbyShutdown{0x0, 0x0}; - WEAK symbol Dvar_SetCommand{0x0, 0x1857D0}; - WEAK symbol Dvar_FindVar{0x0, 0x183EB0}; + WEAK symbol Dvar_SetCommand{0x41BAD0, 0x1857D0}; + WEAK symbol Dvar_FindVar{0x41A600, 0x183EB0}; WEAK symbol Dvar_ClearModified{0x0, 0x0}; - WEAK symbol Dvar_GetCombinedString{0x0, 0x4EA020}; - WEAK symbol Dvar_ValueToString{0x0, 0x187000}; - WEAK symbol Dvar_Reset{0x0, 0x185390}; + WEAK symbol Dvar_GetCombinedString{0x3A7D60, 0x4EA020}; + WEAK symbol Dvar_ValueToString{0x41CE00, 0x187000}; + WEAK symbol Dvar_Reset{0x41B5F0, 0x185390}; WEAK symbol Dvar_SetFromStringByNameFromSource{0x0, 0x185BD0}; + DvarSetSource)> Dvar_SetFromStringByNameFromSource{0x41BD90, 0x185BD0}; WEAK symbol Dvar_RegisterBool{0x0, 0x182340}; @@ -92,12 +92,12 @@ namespace game WEAK symbol G_Glass_Update{0x0, 0x417940}; WEAK symbol G_GetClientScore{0x0, 0x0}; - WEAK symbol G_GetWeaponForName{0x0, 0x0}; + WEAK symbol G_GetWeaponForName{0x0, 0x461180}; WEAK symbol G_GivePlayerWeapon{0x0, 0x0}; - WEAK symbol G_InitializeAmmo{0x0, 0x0}; - WEAK symbol G_SelectWeapon{0x0, 0x0}; - WEAK symbol G_TakePlayerWeapon{0x0, 0x0}; + int startInAltMode, int, int, int, char, ...)> G_GivePlayerWeapon{0x0, 0x461600}; + WEAK symbol G_InitializeAmmo{0x0, 0x41C170}; + WEAK symbol G_SelectWeapon{0x0, 0x462560}; + WEAK symbol G_TakePlayerWeapon{0x0, 0x462770}; WEAK symbol I_CleanStr{0x0, 0x5AF2E0}; @@ -114,7 +114,7 @@ namespace game WEAK symbol R_AddCmdDrawStretchPic{0x0, 0x33B2B0}; - WEAK symbol R_RegisterFont{0x0, 0x67F630}; + WEAK symbol R_RegisterFont{0x55C4E0, 0x67F630}; WEAK symbol R_TextWidth{0x0, 0x67F8F0}; WEAK symbol R_GetFontHeight{0x0, 0x67F710}; WEAK symbol R_DrawSomething{0x0, 0x67ECE0}; @@ -150,7 +150,7 @@ namespace game WEAK symbol DB_EnumXAssets_Internal{0x0, 0x394C60}; - WEAK symbol DB_GetXAssetName{0x0, 0x0}; + WEAK symbol DB_GetXAssetName{0x0, 0x366140}; WEAK symbol DB_GetXAssetTypeSize{0x0, 0x0}; WEAK symbol DB_FindXAssetHeader{0x0, 0x3950C0}; @@ -179,7 +179,7 @@ namespace game WEAK symbol SV_GetGuid{0x0, 0x551D90}; WEAK symbol SV_GetClientPing{0x0, 0x551D70}; - WEAK symbol SV_GetPlayerstateForClientNum{0x0, 0x0}; + WEAK symbol SV_GetPlayerstateForClientNum{0x0, 0x551E10}; WEAK symbol SV_SetConfigstring{0x0, 0x553E60}; WEAK symbol SV_Loaded{0x0, 0x553970}; WEAK symbol SV_KickClientNum{0x0, 0x54C060}; @@ -216,8 +216,8 @@ namespace game WEAK symbol g_script_error_level{0x0, 0xB7AC1A4}; WEAK symbol g_script_error{0x0, 0xB7AC2C0}; - WEAK symbol levelEntityId{0x0, 0x0}; - WEAK symbol gameEntityId{0x0, 0x0}; + WEAK symbol levelEntityId{0x0, 0xB1100B0}; + WEAK symbol gameEntityId{0x0, 0xB1100B4}; WEAK symbol command_whitelist{0x0, 0x0}; WEAK symbol cmd_functions{0x0, 0x344DF18}; @@ -228,15 +228,15 @@ namespace game WEAK symbol scr_VarGlob{0x0, 0xB138180}; WEAK symbol scr_VmPub{0x0, 0xB7AE3C0}; - WEAK symbol scr_function_stack{0x0, 0x0}; + WEAK symbol scr_function_stack{0x0, 0xB7B8940}; WEAK symbol gfxDrawMethod{0x0, 0x0}; WEAK symbol dvarCount{0x0, 0x2999C34}; WEAK symbol dvarPool{0x0, 0x344DF20}; - WEAK symbol DB_XAssetPool{0x0, 0x0}; - WEAK symbol g_assetNames{0x0, 0x0}; + WEAK symbol DB_XAssetPool{0x0, 0x10B4460}; + WEAK symbol g_assetNames{0x0, 0x10B30D0}; WEAK symbol keyCatchers{0x0, 0x2EC82C4}; WEAK symbol playerKeys{0x0, 0x2999E1C}; diff --git a/src/client/steam/interfaces/utils.cpp b/src/client/steam/interfaces/utils.cpp index 95f923aa..0ba20de1 100644 --- a/src/client/steam/interfaces/utils.cpp +++ b/src/client/steam/interfaces/utils.cpp @@ -50,7 +50,7 @@ namespace steam unsigned int utils::GetAppID() { - return 209660; + return 393100; } void utils::SetOverlayNotificationPosition(int eNotificationPosition)