Skip to content

Commit f0ff52d

Browse files
committed
1 parent ca6185a commit f0ff52d

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

src/game/shared/tf/tf_player_shared.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12131,6 +12131,15 @@ bool CTFPlayer::CanJump() const
1213112131
if ( m_Shared.InCond( TF_COND_TAUNTING ) )
1213212132
return false;
1213312133

12134+
#ifdef BDSBASE
12135+
CTFWeaponBase* pActiveWeapon = m_Shared.GetActiveTFWeapon();
12136+
if (pActiveWeapon)
12137+
{
12138+
if (!pActiveWeapon->OwnerCanJump())
12139+
return false;
12140+
}
12141+
#endif
12142+
1213412143
int iNoJump = 0;
1213512144
CALL_ATTRIB_HOOK_INT( iNoJump, no_jump );
1213612145

src/game/shared/tf/tf_weapon_compound_bow.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,12 @@ void CTFCompoundBow::SetArrowAlight( bool bAlight )
651651
}
652652
}
653653

654+
#ifdef BDSBASE
655+
bool CTFCompoundBow::OwnerCanJump(void)
656+
{
657+
return GetInternalChargeBeginTime() == 0.f;
658+
}
659+
#else
654660
//-----------------------------------------------------------------------------
655661
// Purpose:
656662
//-----------------------------------------------------------------------------
@@ -670,3 +676,4 @@ void CTFCompoundBow::SetInternalChargeBeginTime( float flChargeBeginTime )
670676

671677
BaseClass::SetInternalChargeBeginTime( flChargeBeginTime );
672678
}
679+
#endif

src/game/shared/tf/tf_weapon_compound_bow.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,12 @@ class CTFCompoundBow : public CTFPipebombLauncher
8989

9090
void SetArrowAlight( bool bAlight );
9191

92+
#ifdef BDSBASE
93+
bool OwnerCanJump(void);
94+
#else
9295
protected:
9396
virtual void SetInternalChargeBeginTime( float flChargeBeginTime ) OVERRIDE;
97+
#endif
9498

9599
private:
96100
#ifdef CLIENT_DLL

src/game/shared/tf/tf_weaponbase.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ class CTFWeaponBase : public CBaseCombatWeapon, public IHasOwner, public IHasGen
338338
void EnableDuck();
339339
void DisableDuck();
340340

341+
#ifdef BDSBASE
342+
virtual bool OwnerCanJump(void) { return true; }
343+
#endif
341344
virtual bool OwnerCanTaunt( void ) { return true; }
342345
virtual bool CanBeCritBoosted( void );
343346
bool CanHaveRevengeCrits( void );

0 commit comments

Comments
 (0)