Merge 436a84ec5c into 7191ecc418
This commit is contained in:
commit
681ae639d1
|
|
@ -1253,7 +1253,6 @@ bool CWeaponMedigun::FindAndHealTargets( void )
|
|||
|
||||
if ( pTFPlayer && weapon_medigun_charge_rate.GetFloat() )
|
||||
{
|
||||
#ifdef GAME_DLL
|
||||
int iBoostMax = floor( pTFPlayer->m_Shared.GetMaxBuffedHealth() * 0.95);
|
||||
float flChargeModifier = 1.f;
|
||||
|
||||
|
|
@ -1310,7 +1309,7 @@ bool CWeaponMedigun::FindAndHealTargets( void )
|
|||
|
||||
CALL_ATTRIB_HOOK_FLOAT_ON_OTHER( pOwner, flChargeAmount, mult_medigun_uberchargerate );
|
||||
|
||||
|
||||
#ifdef GAME_DLL
|
||||
// Apply any bonus our target gives us.
|
||||
if ( pTarget )
|
||||
{
|
||||
|
|
@ -1323,6 +1322,7 @@ bool CWeaponMedigun::FindAndHealTargets( void )
|
|||
CALL_ATTRIB_HOOK_FLOAT_ON_OTHER( pTarget, flChargeAmount, mult_uberchargerate_for_healer );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if ( TFGameRules() )
|
||||
{
|
||||
if ( TFGameRules()->IsQuickBuildTime() )
|
||||
|
|
@ -1334,7 +1334,6 @@ bool CWeaponMedigun::FindAndHealTargets( void )
|
|||
flChargeAmount *= 3.f;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
float flNewLevel = MIN( m_flChargeLevel + flChargeAmount, 1.0 );
|
||||
|
||||
|
|
@ -1612,9 +1611,25 @@ void CWeaponMedigun::ItemPostFrame( void )
|
|||
m_bReloadDown = false;
|
||||
}
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
DrainCharge();
|
||||
#endif
|
||||
|
||||
WeaponIdle();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Drain Ubercharge on client during weapon draw to fix prediction errors
|
||||
//-----------------------------------------------------------------------------
|
||||
void CWeaponMedigun::ItemBusyFrame( void )
|
||||
{
|
||||
#ifdef CLIENT_DLL
|
||||
DrainCharge();
|
||||
#endif
|
||||
|
||||
BaseClass::ItemBusyFrame();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -1965,11 +1980,11 @@ void CWeaponMedigun::SecondaryAttack( void )
|
|||
{
|
||||
// Remove charge immediately and just give target and yourself the conditions
|
||||
m_bChargeRelease = false;
|
||||
SetChargeLevel( m_flChargeLevel - flChunkSize );
|
||||
#ifdef GAME_DLL
|
||||
float flResistDuration = weapon_vaccinator_resist_duration.GetFloat();
|
||||
CALL_ATTRIB_HOOK_FLOAT_ON_OTHER( pOwner, flResistDuration, add_uber_time );
|
||||
pOwner->m_Shared.AddCond( g_MedigunResistConditions[GetResistType()].uberCond, flResistDuration, pOwner );
|
||||
m_flChargeLevel -= flChunkSize;
|
||||
if ( pTFPlayerPatient )
|
||||
{
|
||||
pTFPlayerPatient->m_Shared.AddCond( g_MedigunResistConditions[GetResistType()].uberCond, flResistDuration, pOwner );
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ public:
|
|||
virtual void UpdateOnRemove( void );
|
||||
virtual void ItemHolsterFrame( void );
|
||||
virtual void ItemPostFrame( void );
|
||||
virtual void ItemBusyFrame( void );
|
||||
virtual bool Lower( void );
|
||||
virtual void PrimaryAttack( void );
|
||||
virtual void SecondaryAttack( void );
|
||||
|
|
|
|||
Loading…
Reference in New Issue