Skip to content

[TF2] Fix various CYOAPDA/ConTracker animation bugs ("iPad cancelling") #1319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jus7n
Copy link

@jus7n jus7n commented May 31, 2025

This patch fixes a bug in CTFPlayerAnimState::CheckCYOAPDAAnimtion() that prevented the server from ever playing ConTracker animations which caused desync between client and server hitboxes.

Here's a video showing some silly effects of the bug: https://youtu.be/Qgl0uRBl9_E

Before patch (server hitbox does not match client's):
image

After patch:
image

Additional changes:

  • Update checks that prevented certain player actions while viewing the ConTracker to instead check for actively playing ConTracker animations. This fixes wonky behavior like players being able to move/shoot while viewing the ConTracker.

  • Add new checks to prevent player input while viewing the ConTracker.

  • Remove client check preventing the quest panel from being opened while taunting.

  • Players are now put in third person to make it obvious when ConTracker animations are playing (and thus are unable to move/shoot).

  • Add ConVar tf_cyoa_pda_animations to control ConTracker animations.

  • Add IsAllowedToViewCYOAPDA() and IsInCYOAPDAAnimation() script functions.

This patch fixes a bug in CTFPlayerAnimState::CheckCYOAPDAAnimtion() that prevented
the server from ever playing ConTracker animations which caused desync between client
and server hitboxes.

- Update checks that prevented certain player actions while viewing the ConTracker
  to instead check for actively playing ConTracker animations. This fixes wonky behavior like
  players being able to move/shoot while viewing the ConTracker.

- Add new checks to prevent player input while viewing the ConTracker.

- Remove client check preventing the quest panel from being opened while taunting.

- Players are now put in third person to make it obvious when ConTracker animations are playing
  (and thus are unable to move/shoot).

- Add ConVar tf_cyoa_pda_animations to control ConTracker animations.

- Add IsAllowedToViewCYOAPDA() and IsInCYOAPDAAnimation() script functions.
@@ -748,6 +748,7 @@ class CTFPlayer : public CBaseMultiplayerPlayer, public IHasAttributes, public I
bool IsTaunting( void ) const { return m_Shared.InCond( TF_COND_TAUNTING ); }
void DoTauntAttack( void );
bool IsAllowedToTaunt( void );
bool IsAllowedToViewCYOAPDA( void );
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool IsAllowedToViewCYOAPDA( void );
bool IsAllowedToViewCYOAPDA( void );

@@ -762,6 +764,71 @@ bool CTFPlayer::IsAllowedToTaunt( void )
return true;
}

//-----------------------------------------------------------------------------
// Purpose: Check if a player is allowed to view the ConTracker. Mostly borrowed from IsAllowedToTaunt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Borrowed" as in copy pasted. Factor the code out into a shared function!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants