From eb0dbf1aeb38614682521518b4811bfc28acf7a3 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Wed, 14 Nov 2018 01:15:43 +0100 Subject: [PATCH] Added a new "abort" flag to CSDKPlayerShared::EndSlide This currently only blocks the tutor popups. --- mp/src/game/shared/sdk/sdk_player_shared.cpp | 4 ++-- mp/src/game/shared/sdk/sdk_player_shared.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mp/src/game/shared/sdk/sdk_player_shared.cpp b/mp/src/game/shared/sdk/sdk_player_shared.cpp index 9ae5271c0..3629b5892 100644 --- a/mp/src/game/shared/sdk/sdk_player_shared.cpp +++ b/mp/src/game/shared/sdk/sdk_player_shared.cpp @@ -819,10 +819,10 @@ void CSDKPlayerShared::StartSliding(bool bDiveSliding) m_flLastUnSlideTime = 0; } -void CSDKPlayerShared::EndSlide() +void CSDKPlayerShared::EndSlide(bool abort) { // If it was long enough to notice what it was, then train the slide. - if (m_pOuter->GetCurrentTime() - m_flSlideStartTime > 1) + if (!abort && m_pOuter->GetCurrentTime() - m_flSlideStartTime > 1) { if (m_bDiveSliding) m_pOuter->Instructor_LessonLearned("slideafterdive"); diff --git a/mp/src/game/shared/sdk/sdk_player_shared.h b/mp/src/game/shared/sdk/sdk_player_shared.h index 990ccd350..87e534ec8 100644 --- a/mp/src/game/shared/sdk/sdk_player_shared.h +++ b/mp/src/game/shared/sdk/sdk_player_shared.h @@ -77,7 +77,7 @@ class CSDKPlayerShared void PlayStartSlideSound(); void PlayEndSlideSound(); void StartSliding(bool bDiveSliding = false); - void EndSlide(); + void EndSlide(bool abort = false); void StandUpFromSlide(bool bJumpUp = false); float GetSlideStartTime() const { return m_flSlideStartTime; }; float GetSlideAutoEndTime() const { return m_flSlideAutoEndTime; };