From 409de7b8b9a14cce825ef81676406785a18397d0 Mon Sep 17 00:00:00 2001 From: Pinsplash <39359267+Pinsplash@users.noreply.github.com> Date: Tue, 18 Apr 2023 00:09:49 -0500 Subject: [PATCH] No Climbing disables ladders now --- sp/src/game/server/hl2/hl2_player.cpp | 3 +++ sp/src/game/shared/hl2/hl_gamemovement.cpp | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sp/src/game/server/hl2/hl2_player.cpp b/sp/src/game/server/hl2/hl2_player.cpp index 1606643f..a53d920d 100644 --- a/sp/src/game/server/hl2/hl2_player.cpp +++ b/sp/src/game/server/hl2/hl2_player.cpp @@ -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() { diff --git a/sp/src/game/shared/hl2/hl_gamemovement.cpp b/sp/src/game/shared/hl2/hl_gamemovement.cpp index e7e573ec..e1892bbf 100644 --- a/sp/src/game/shared/hl2/hl_gamemovement.cpp +++ b/sp/src/game/shared/hl2/hl_gamemovement.cpp @@ -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;