2021-11-07 06:16:56 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Components
|
|
|
|
{
|
2022-11-23 16:19:47 -05:00
|
|
|
class PlayerMovement : public Component
|
2022-05-02 14:36:50 -04:00
|
|
|
{
|
|
|
|
public:
|
2022-11-23 16:19:47 -05:00
|
|
|
PlayerMovement();
|
2022-05-02 14:36:50 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
enum BouncesSettings { DISABLED, ENABLED, DOUBLE };
|
|
|
|
|
|
|
|
static Dvar::Var BGRocketJump;
|
2022-08-05 17:39:25 -04:00
|
|
|
static Dvar::Var BGRocketJumpScale;
|
2022-05-02 14:36:50 -04:00
|
|
|
static Dvar::Var BGPlayerEjection;
|
|
|
|
static Dvar::Var BGPlayerCollision;
|
|
|
|
// Can't use Var class inside assembly stubs
|
2022-11-23 16:19:47 -05:00
|
|
|
static const Game::dvar_t* CGNoclipScaler;
|
|
|
|
static const Game::dvar_t* CGUfoScaler;
|
|
|
|
static const Game::dvar_t* PlayerSpectateSpeedScale;
|
|
|
|
static const Game::dvar_t* BGBounces;
|
|
|
|
static const Game::dvar_t* BGBouncesAllAngles;
|
|
|
|
static const Game::dvar_t* PlayerDuckedSpeedScale;
|
|
|
|
static const Game::dvar_t* PlayerProneSpeedScale;
|
2022-05-02 14:36:50 -04:00
|
|
|
|
|
|
|
static void PM_PlayerDuckedSpeedScaleStub();
|
|
|
|
static void PM_PlayerProneSpeedScaleStub();
|
|
|
|
|
2022-11-23 16:19:47 -05:00
|
|
|
static void PM_MoveScale_Noclip();
|
|
|
|
static void PM_MoveScale_Ufo();
|
|
|
|
static void PM_MoveScale_Spectate();
|
2022-05-02 14:36:50 -04:00
|
|
|
|
|
|
|
// Bounce logic
|
|
|
|
static void PM_StepSlideMoveStub();
|
2022-11-23 16:19:47 -05:00
|
|
|
static void PM_ProjectVelocityStub();
|
2022-05-02 14:36:50 -04:00
|
|
|
static void Jump_ClearState_Hk(Game::playerState_s* ps);
|
|
|
|
|
|
|
|
static Game::gentity_s* Weapon_RocketLauncher_Fire_Hk(Game::gentity_s* ent, unsigned int weaponIndex, float spread, Game::weaponParms* wp, const float* gunVel, Game::lockonFireParms* lockParms, bool a7);
|
|
|
|
|
|
|
|
// Player collison
|
|
|
|
static int StuckInClient_Hk(Game::gentity_s* self);
|
|
|
|
static void CM_TransformedCapsuleTrace_Hk(Game::trace_t* results, const float* start, const float* end, const Game::Bounds* bounds, const Game::Bounds* capsule, int contents, const float* origin, const float* angles);
|
|
|
|
|
2022-11-23 16:19:47 -05:00
|
|
|
static const Game::dvar_t* Dvar_RegisterSpectateSpeedScale(const char* dvarName, float value, float min, float max, unsigned __int16 flags, const char* description);
|
2022-08-05 17:39:25 -04:00
|
|
|
|
|
|
|
static void RegisterMovementDvars();
|
2022-05-02 14:36:50 -04:00
|
|
|
};
|
2021-11-07 06:16:56 -05:00
|
|
|
}
|