stuff
- some sp stuff - important symbols - 🐤 to 🎮 - listassetpool & give should work now - binding, materials, scripting, logfile but they need some revision
This commit is contained in:
@ -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
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ namespace logfile
|
||||
|
||||
std::string convert_mod(const int meansOfDeath)
|
||||
{
|
||||
const auto value = reinterpret_cast<game::scr_string_t**>(0x140FEC3F0)[meansOfDeath];
|
||||
const auto value = reinterpret_cast<game::scr_string_t**>(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<const char**>(0x140FEC4D0)[hitLoc];
|
||||
const std::string hitloc = reinterpret_cast<const char**>(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<const char**>(0x140FEC4D0)[hitLoc];
|
||||
const std::string hitloc = reinterpret_cast<const char**>(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<void>(0x140336000, clientNum);
|
||||
return utils::hook::invoke<void>(0x4132E0_b, clientNum);
|
||||
}
|
||||
|
||||
void g_shutdown_game_stub(const int freeScripts)
|
||||
@ -189,7 +189,7 @@ namespace logfile
|
||||
}
|
||||
|
||||
// G_ShutdownGame
|
||||
return utils::hook::invoke<void>(0x140345A60, freeScripts);
|
||||
return utils::hook::invoke<void>(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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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");
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user