2022-03-11 20:43:11 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class player_movement final : public module
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void post_load() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
static const game::native::dvar_t* player_sustainAmmo;
|
2022-03-17 12:55:01 +00:00
|
|
|
static const game::native::dvar_t* jump_slowdownEnable;
|
2022-03-16 20:25:41 +00:00
|
|
|
static const game::native::dvar_t* jump_ladderPushVel;
|
2022-03-21 11:06:20 +00:00
|
|
|
static const game::native::dvar_t* jump_enableFallDamage;
|
2022-03-16 20:25:41 +00:00
|
|
|
static const game::native::dvar_t* jump_height;
|
2022-03-22 20:29:02 +00:00
|
|
|
static const game::native::dvar_t* jump_stepSize;
|
2022-03-22 20:52:31 +00:00
|
|
|
static const game::native::dvar_t* jump_spreadAdd;
|
2022-03-14 23:54:41 +00:00
|
|
|
static const game::native::dvar_t* pm_bounces;
|
2022-03-23 13:48:13 +00:00
|
|
|
static const game::native::dvar_t* pm_bouncesAllAngles;
|
2022-03-15 10:10:15 +00:00
|
|
|
static const game::native::dvar_t* pm_playerEjection;
|
|
|
|
static const game::native::dvar_t* pm_playerCollision;
|
2022-03-15 14:48:19 +00:00
|
|
|
static const game::native::dvar_t* pm_rocketJump;
|
|
|
|
static const game::native::dvar_t* pm_elevators;
|
2022-03-11 20:43:11 +00:00
|
|
|
|
2022-03-17 12:55:01 +00:00
|
|
|
static DWORD bounce_addr;
|
|
|
|
static DWORD dont_bounce_addr;
|
|
|
|
static DWORD push_off_ladder_addr;
|
2022-03-22 20:52:31 +00:00
|
|
|
static DWORD jump_start_addr;
|
2022-03-23 16:03:49 +00:00
|
|
|
static DWORD jump_get_step_height_addr;
|
2022-03-17 12:55:01 +00:00
|
|
|
|
2022-03-11 20:43:11 +00:00
|
|
|
static void pm_weapon_use_ammo(game::native::playerState_s* ps, const game::native::Weapon weapon,
|
2022-03-16 20:25:41 +00:00
|
|
|
bool is_alternate, int amount, game::native::PlayerHandIndex hand);
|
2022-03-11 20:43:11 +00:00
|
|
|
|
2022-03-16 20:25:41 +00:00
|
|
|
static const game::native::dvar_t* dvar_register_jump_ladder_push_vel(const char* dvar_name,
|
|
|
|
float value, float min, float max, unsigned __int16 flags, const char* description);
|
|
|
|
static const game::native::dvar_t* dvar_register_jump_height(const char* dvar_name,
|
|
|
|
float value, float min, float max, unsigned __int16 flags, const char* description);
|
2022-03-22 20:29:02 +00:00
|
|
|
static const game::native::dvar_t* dvar_register_jump_step_size(const char* dvar_name,
|
|
|
|
float value, float min, float max, unsigned __int16 flags, const char* description);
|
2022-03-22 20:52:31 +00:00
|
|
|
static const game::native::dvar_t* dvar_register_jump_spread_add(const char* dvar_name,
|
|
|
|
float value, float min, float max, unsigned __int16 flags, const char* description);
|
2022-03-17 12:55:01 +00:00
|
|
|
static const game::native::dvar_t* dvar_register_jump_slowdown_enable(const char* dvar_name,
|
|
|
|
bool value, unsigned __int16 flags, const char* description);
|
2022-03-11 20:43:11 +00:00
|
|
|
static const game::native::dvar_t* dvar_register_player_sustain_ammo(const char* dvar_name,
|
|
|
|
bool value, unsigned __int16 flags, const char* description);
|
|
|
|
|
2022-03-16 20:25:41 +00:00
|
|
|
static void pm_step_slide_move_stub();
|
2022-03-14 23:54:41 +00:00
|
|
|
|
2022-03-15 10:10:15 +00:00
|
|
|
static int stuck_in_client_stub(game::native::gentity_s* self);
|
|
|
|
static void cm_transformed_capsule_trace_stub(game::native::trace_t* results, const float* start,
|
|
|
|
const float* end, const game::native::Bounds* bounds, const game::native::Bounds* capsule,
|
|
|
|
int contents, const float* origin, const float* angles);
|
|
|
|
|
2022-03-15 14:48:19 +00:00
|
|
|
static game::native::gentity_s* weapon_rocket_launcher_fire_stub(game::native::gentity_s* ent,
|
|
|
|
const game::native::Weapon weapon, float spread, game::native::weaponParms* wp,
|
|
|
|
const float* gun_vel, game::native::missileFireParms* fire_parms, game::native::missileFireParms* magic_bullet);
|
|
|
|
|
|
|
|
static void pm_player_trace_stub(game::native::pmove_t* pm, game::native::trace_t* results,
|
|
|
|
const float* start, const float* end, const game::native::Bounds* bounds,
|
|
|
|
int pass_entity_num, int content_mask);
|
|
|
|
|
2022-03-15 14:59:24 +00:00
|
|
|
static void pm_trace_stub(const game::native::pmove_t* pm, game::native::trace_t* results,
|
2022-03-15 14:48:19 +00:00
|
|
|
const float* start, const float* end, const game::native::Bounds* bounds, int pass_entity_num, int content_mask);
|
|
|
|
|
2022-03-16 20:25:41 +00:00
|
|
|
static void jump_push_off_ladder_stub();
|
|
|
|
// On SP this is already unlocked
|
2022-03-22 20:52:31 +00:00
|
|
|
static void jump_check_stub();
|
2022-03-16 20:25:41 +00:00
|
|
|
|
2022-03-17 12:55:01 +00:00
|
|
|
static void jump_apply_slowdown_stub(game::native::playerState_s* ps);
|
2022-03-17 13:29:01 +00:00
|
|
|
static float jump_get_land_factor(game::native::playerState_s* ps);
|
|
|
|
static void jump_get_land_factor_stub();
|
2022-03-17 12:55:01 +00:00
|
|
|
|
2022-03-21 11:06:20 +00:00
|
|
|
static void pm_crash_land_stub_mp();
|
|
|
|
static void pm_crash_land_stub_sp();
|
|
|
|
|
2022-03-23 16:03:49 +00:00
|
|
|
static void jump_get_step_height_stub();
|
2022-03-22 20:29:02 +00:00
|
|
|
|
2022-03-22 20:52:31 +00:00
|
|
|
static void jump_start_stub();
|
|
|
|
|
2022-03-23 13:48:13 +00:00
|
|
|
static void pm_project_velocity_stub(const float* vel_in, const float* normal, float* vel_out);
|
|
|
|
|
2022-03-11 20:43:11 +00:00
|
|
|
static void patch_mp();
|
|
|
|
static void patch_sp();
|
|
|
|
};
|