mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-03-03 09:05:28 +03:00
tf2: Fix prediction for jumping when huntsman is charged/released (#797)
* fix prediction for jumping when huntsman is charged/released * remove SetInternalChargeBeginTime override from CTFCompoundBow https://github.com/ValveSoftware/source-sdk-2013/pull/797#discussion_r1970597141
This commit is contained in:
parent
3de9978bb9
commit
aea94b32cb
@ -12110,6 +12110,13 @@ bool CTFPlayer::CanJump() const
|
||||
if ( m_Shared.InCond( TF_COND_TAUNTING ) )
|
||||
return false;
|
||||
|
||||
CTFWeaponBase *pActiveWeapon = m_Shared.GetActiveTFWeapon();
|
||||
if ( pActiveWeapon )
|
||||
{
|
||||
if ( !pActiveWeapon->OwnerCanJump() )
|
||||
return false;
|
||||
}
|
||||
|
||||
int iNoJump = 0;
|
||||
CALL_ATTRIB_HOOK_INT( iNoJump, no_jump );
|
||||
|
||||
|
@ -654,19 +654,7 @@ void CTFCompoundBow::SetArrowAlight( bool bAlight )
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CTFCompoundBow::SetInternalChargeBeginTime( float flChargeBeginTime )
|
||||
bool CTFCompoundBow::OwnerCanJump( void )
|
||||
{
|
||||
#ifdef GAME_DLL
|
||||
float flCurrentChargeBeginTime = GetInternalChargeBeginTime();
|
||||
if ( flCurrentChargeBeginTime == 0.f && flChargeBeginTime > 0.f )
|
||||
{
|
||||
DisableJump();
|
||||
}
|
||||
else if ( flCurrentChargeBeginTime > 0.f && flChargeBeginTime == 0.f )
|
||||
{
|
||||
EnableJump();
|
||||
}
|
||||
#endif // GAME_DLL
|
||||
|
||||
BaseClass::SetInternalChargeBeginTime( flChargeBeginTime );
|
||||
return GetInternalChargeBeginTime() == 0.f;
|
||||
}
|
||||
|
@ -89,8 +89,7 @@ public:
|
||||
|
||||
void SetArrowAlight( bool bAlight );
|
||||
|
||||
protected:
|
||||
virtual void SetInternalChargeBeginTime( float flChargeBeginTime ) OVERRIDE;
|
||||
bool OwnerCanJump( void );
|
||||
|
||||
private:
|
||||
#ifdef CLIENT_DLL
|
||||
|
@ -335,6 +335,7 @@ class CTFWeaponBase : public CBaseCombatWeapon, public IHasOwner, public IHasGen
|
||||
void EnableDuck();
|
||||
void DisableDuck();
|
||||
|
||||
virtual bool OwnerCanJump( void ) { return true; }
|
||||
virtual bool OwnerCanTaunt( void ) { return true; }
|
||||
virtual bool CanBeCritBoosted( void );
|
||||
bool CanHaveRevengeCrits( void );
|
||||
|
Loading…
x
Reference in New Issue
Block a user