Update backflips.cpp to use snake_case and fix format

This commit is contained in:
Mirele 2024-01-06 16:24:29 -03:00 committed by GitHub
parent 3b8c8dda42
commit 62b5fdcd0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,37 +7,37 @@
namespace backflips
{
//returning 1 makes the game use the dvar value instead of hardcoded value
int UseViewPitchDvars()
{
return 1;
}
//returning 1 makes the game use the dvar value instead of hardcoded value
int use_view_pitch_dvars()
{
return 1;
}
class component final : public component_interface
{
public:
public:
void post_unpack() override
{
utils::hook::call(0xB6E70A_b, UseViewPitchDvars);
utils::hook::call(0xB6E70A_b, use_view_pitch_dvars);
utils::hook::call(0x6F5CF0_b, UseViewPitchDvars);
utils::hook::call(0x6F5D1A_b, UseViewPitchDvars);
utils::hook::call(0x6E6823_b, UseViewPitchDvars);
utils::hook::call(0x5B5BBB_b, UseViewPitchDvars);
utils::hook::call(0x5B5BE0_b, UseViewPitchDvars);
utils::hook::call(0x154E81_b, UseViewPitchDvars);
utils::hook::call(0x154EA1_b, UseViewPitchDvars);
utils::hook::call(0x5651E_b, UseViewPitchDvars);
utils::hook::call(0x56555_b, UseViewPitchDvars);
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(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);
}
};
}
REGISTER_COMPONENT(backflips::component)
REGISTER_COMPONENT(backflips::component)