Add cod4 map to dlc list (and absolutely nothing else) (#663)
Co-authored-by: louve <louve@louve.systems> Co-authored-by: Diavolo <edoardo.sanguineti222@gmail.com>
This commit is contained in:
parent
a4a622be52
commit
6692e99d86
@ -684,7 +684,7 @@ namespace Components
|
||||
Maps::AddDlc({ 6, "Freighter", {"mp_cargoship_sh"} });
|
||||
Maps::AddDlc({ 7, "Resurrection Pack", {"mp_shipment_long", "mp_rust_long", "mp_firingrange"} });
|
||||
Maps::AddDlc({ 8, "Recycled Pack", {"mp_bloc_sh", "mp_crash_tropical", "mp_estate_tropical", "mp_fav_tropical", "mp_storm_spring"} });
|
||||
Maps::AddDlc({ 9, "Classics Pack #3", {"mp_farm", "mp_backlot", "mp_pipeline", "mp_countdown", "mp_crash_snow", "mp_carentan"}});
|
||||
Maps::AddDlc({ 9, "Classics Pack #3", {"mp_farm", "mp_backlot", "mp_pipeline", "mp_countdown", "mp_crash_snow", "mp_carentan", "mp_broadcast", "mp_showdown", "mp_convoy"} });
|
||||
|
||||
Maps::UpdateDlcStatus();
|
||||
|
||||
|
@ -7,6 +7,7 @@ namespace Components
|
||||
Dvar::Var PlayerMovement::BGRocketJumpScale;
|
||||
Dvar::Var PlayerMovement::BGPlayerEjection;
|
||||
Dvar::Var PlayerMovement::BGPlayerCollision;
|
||||
Dvar::Var PlayerMovement::BGClimbAnything;
|
||||
const Game::dvar_t* PlayerMovement::CGNoclipScaler;
|
||||
const Game::dvar_t* PlayerMovement::CGUfoScaler;
|
||||
const Game::dvar_t* PlayerMovement::PlayerSpectateSpeedScale;
|
||||
@ -15,6 +16,16 @@ namespace Components
|
||||
const Game::dvar_t* PlayerMovement::PlayerDuckedSpeedScale;
|
||||
const Game::dvar_t* PlayerMovement::PlayerProneSpeedScale;
|
||||
|
||||
void PlayerMovement::PM_PlayerTraceStub(Game::pmove_s* pm, Game::trace_t* results, const float* start, const float* end, Game::Bounds* bounds, int passEntityNum, int contentMask)
|
||||
{
|
||||
Game::PM_playerTrace(pm, results, start, end, bounds, passEntityNum, contentMask);
|
||||
|
||||
if (results && BGClimbAnything.get<bool>())
|
||||
{
|
||||
results[0].surfaceFlags |= SURF_LADDER;
|
||||
}
|
||||
}
|
||||
|
||||
__declspec(naked) void PlayerMovement::PM_PlayerDuckedSpeedScaleStub()
|
||||
{
|
||||
__asm
|
||||
@ -242,6 +253,9 @@ namespace Components
|
||||
|
||||
BGPlayerCollision = Dvar::Register<bool>("bg_playerCollision",
|
||||
true, Game::DVAR_CODINFO, "Push intersecting players away from each other");
|
||||
|
||||
BGClimbAnything = Dvar::Register<bool>("bg_climbAnything",
|
||||
false, Game::DVAR_CODINFO, "Allows to treat any surface as a ladder");
|
||||
}
|
||||
|
||||
PlayerMovement::PlayerMovement()
|
||||
@ -289,6 +303,9 @@ namespace Components
|
||||
Utils::Hook(0x45A5BF, CM_TransformedCapsuleTrace_Hk, HOOK_CALL).install()->quick(); // SV_ClipMoveToEntity
|
||||
Utils::Hook(0x5A0CAD, CM_TransformedCapsuleTrace_Hk, HOOK_CALL).install()->quick(); // CG_ClipMoveToEntity
|
||||
|
||||
Utils::Hook(0x573F39, PM_PlayerTraceStub, HOOK_CALL).install()->quick();
|
||||
Utils::Hook(0x573E93, PM_PlayerTraceStub, HOOK_CALL).install()->quick();
|
||||
|
||||
Script::AddMethod("IsSprinting", GScr_IsSprinting);
|
||||
|
||||
RegisterMovementDvars();
|
||||
|
@ -10,10 +10,13 @@ namespace Components
|
||||
private:
|
||||
enum BouncesSettings { DISABLED, ENABLED, DOUBLE };
|
||||
|
||||
static constexpr auto SURF_LADDER = 0x8;
|
||||
|
||||
static Dvar::Var BGRocketJump;
|
||||
static Dvar::Var BGRocketJumpScale;
|
||||
static Dvar::Var BGPlayerEjection;
|
||||
static Dvar::Var BGPlayerCollision;
|
||||
static Dvar::Var BGClimbAnything;
|
||||
// Can't use Var class inside assembly stubs
|
||||
static const Game::dvar_t* CGNoclipScaler;
|
||||
static const Game::dvar_t* CGUfoScaler;
|
||||
@ -22,7 +25,8 @@ namespace Components
|
||||
static const Game::dvar_t* BGBouncesAllAngles;
|
||||
static const Game::dvar_t* PlayerDuckedSpeedScale;
|
||||
static const Game::dvar_t* PlayerProneSpeedScale;
|
||||
|
||||
|
||||
static void PM_PlayerTraceStub(Game::pmove_s* pm, Game::trace_t* results, const float* start, const float* end, Game::Bounds* bounds, int passEntityNum, int contentMask);
|
||||
static void PM_PlayerDuckedSpeedScaleStub();
|
||||
static void PM_PlayerProneSpeedScaleStub();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user