Skip to content

Commit

Permalink
Added a new "abort" flag to CSDKPlayerShared::EndSlide
Browse files Browse the repository at this point in the history
This currently only blocks the tutor popups.
  • Loading branch information
TomyLobo committed Nov 14, 2018
1 parent 6022e03 commit eb0dbf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mp/src/game/shared/sdk/sdk_player_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion mp/src/game/shared/sdk/sdk_player_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; };
Expand Down

0 comments on commit eb0dbf1

Please sign in to comment.