2021-11-07 06:16:56 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class Movement : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Movement();
|
|
|
|
~Movement();
|
|
|
|
|
|
|
|
private:
|
2022-01-18 19:49:50 -05:00
|
|
|
enum BouncesSettings { DISABLED, ENABLED, DOUBLE };
|
|
|
|
|
2021-11-07 06:16:56 -05:00
|
|
|
static Dvar::Var PlayerDuckedSpeedScale;
|
|
|
|
static Dvar::Var PlayerLastStandCrawlSpeedScale;
|
|
|
|
static Dvar::Var PlayerProneSpeedScale;
|
2022-01-07 06:20:43 -05:00
|
|
|
static Dvar::Var PlayerSpectateSpeedScale;
|
|
|
|
static Dvar::Var CGUfoScaler;
|
|
|
|
static Dvar::Var CGNoclipScaler;
|
2022-01-18 19:49:50 -05:00
|
|
|
static Dvar::Var BGBouncesAllAngles;
|
|
|
|
// Can't use Var class inside assembly stubs
|
|
|
|
static Game::dvar_t* BGBounces;
|
2021-11-07 06:16:56 -05:00
|
|
|
|
2022-01-07 06:20:43 -05:00
|
|
|
static float PM_CmdScaleForStance(const Game::pmove_s* move);
|
|
|
|
static void PM_CmdScaleForStanceStub();
|
2021-11-11 08:38:51 -05:00
|
|
|
|
2022-01-07 06:20:43 -05:00
|
|
|
static float PM_MoveScale(Game::playerState_s* ps, float forwardmove, float rightmove, float upmove);
|
|
|
|
static void PM_MoveScaleStub();
|
|
|
|
|
2022-01-18 19:49:50 -05:00
|
|
|
// Bounce logic
|
|
|
|
static void PM_StepSlideMoveStub();
|
|
|
|
static void PM_ProjectVelocityStub(const float* velIn, const float* normal, float* velOut);
|
|
|
|
static void Jump_ClearStateHk(Game::playerState_s* ps);
|
|
|
|
|
2022-01-07 06:20:43 -05:00
|
|
|
static Game::dvar_t* Dvar_RegisterLastStandSpeedScale(const char* name, float value, float min, float max, int flags, const char* desc);
|
|
|
|
static Game::dvar_t* Dvar_RegisterSpectateSpeedScale(const char* name, float value, float min, float max, int flags, const char* desc);
|
2021-11-07 06:16:56 -05:00
|
|
|
};
|
|
|
|
}
|