No Climbing disables ladders now

This commit is contained in:
Pinsplash 2023-04-18 00:09:49 -05:00
parent 54f882dfc4
commit 409de7b8b9
2 changed files with 6 additions and 2 deletions

View File

@ -93,6 +93,7 @@ extern ConVar r_vehicleBrakeRate;
extern ConVar steepness_limit;
extern ConVar chaos_no_reload;
extern ConVar chaos_npc_teleport;
extern ConVar chaos_disable_ladders;
//Do not touch with without seeing me, please! (sjb)
//For consistency's sake, enemy gunfire is traced against a scaled down
//version of the player's hull, not the hitboxes for the player's model
@ -7933,12 +7934,14 @@ void CEIncline::StartEffect()
steepness_limit.SetValue(0.96f);//1.0 is too aggressive, we will slide around on seemingly flat things
sv_airaccelerate.SetValue(1);
UTIL_GetLocalPlayer()->m_Local.m_flStepSize = 0;
chaos_disable_ladders.SetValue(true);
}
void CEIncline::StopEffect()
{
steepness_limit.SetValue(0.7f);
sv_airaccelerate.SetValue(10);
UTIL_GetLocalPlayer()->m_Local.m_flStepSize = 18;
chaos_disable_ladders.SetValue(false);
}
void CEDeathWater::FastThink()
{

View File

@ -15,7 +15,8 @@
static ConVar sv_autoladderdismount( "sv_autoladderdismount", "1", FCVAR_REPLICATED, "Automatically dismount from ladders when you reach the end (don't have to +USE)." );
static ConVar sv_ladderautomountdot( "sv_ladderautomountdot", "0.4", FCVAR_REPLICATED, "When auto-mounting a ladder by looking up its axis, this is the tolerance for looking now directly along the ladder axis." );
static ConVar sv_ladder_useonly( "sv_ladder_useonly", "0", FCVAR_REPLICATED, "If set, ladders can only be mounted by pressing +USE" );
static ConVar sv_ladder_useonly("sv_ladder_useonly", "0", FCVAR_REPLICATED, "If set, ladders can only be mounted by pressing +USE");
ConVar chaos_disable_ladders("chaos_disable_ladders", "0");
#define USE_DISMOUNT_SPEED 100
@ -884,7 +885,7 @@ bool CHL2GameMovement::CheckLadderAutoMount( CFuncLadder *ladder, const Vector&
bool CHL2GameMovement::LadderMove( void )
{
if ( player->GetMoveType() == MOVETYPE_NOCLIP )
if ( player->GetMoveType() == MOVETYPE_NOCLIP || chaos_disable_ladders.GetBool())
{
SetLadder( NULL );
return false;