Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Igor 2025-02-28 11:29:52 -05:00
commit 9928499d43
7 changed files with 17 additions and 22 deletions

View file

@ -6050,7 +6050,7 @@ void C_TFPlayer::ClientThink()
//
// Passtime ask for ball button
//
if ( m_nButtons & IN_ATTACK3 )
if ( m_afButtonPressed & IN_ATTACK3 )
{
engine->ClientCmd("voicemenu 1 8");
}

View file

@ -8101,14 +8101,14 @@ void CMovementSpeedMod::InputSpeedMod(inputdata_t &data)
}
}
void SendProxy_CropFlagsToPlayerFlagBitsLength( const SendProp *pProp, const void *pStruct, const void *pVarData, DVariant *pOut, int iElement, int objectID)
void SendProxy_CropFlagsToPlayerFlagBitsLength( const SendProp* pProp, const void* pStruct, const void* pVarData, DVariant* pOut, int iElement, int objectID )
{
int mask = (1<<PLAYER_FLAG_BITS) - 1;
int data = *(int *)pVarData;
int mask = ( 1 << PLAYER_FLAG_BITS ) - 1;
int data = *( int* )pVarData;
pOut->m_Int = ( data & mask );
}
// -------------------------------------------------------------------------------- //
// SendTable for CPlayerState.
// -------------------------------------------------------------------------------- //

View file

@ -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 );

View file

@ -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;
}

View file

@ -89,8 +89,7 @@ public:
void SetArrowAlight( bool bAlight );
protected:
virtual void SetInternalChargeBeginTime( float flChargeBeginTime ) OVERRIDE;
bool OwnerCanJump( void );
private:
#ifdef CLIENT_DLL

View file

@ -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 );

View file

@ -163,7 +163,7 @@
#define FL_INWATER (1<<10) // In water
// NOTE if you move things up, make sure to change this value
#define PLAYER_FLAG_BITS 11
#define PLAYER_FLAG_BITS 32
#define FL_FLY (1<<11) // Changes the SV_Movestep() behavior to not need to be on ground
#define FL_SWIM (1<<12) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)