game: shared: Implement "mod_medic_buff_range" attribute
This attribute allows user to modify The Amputator's healing radius.
This commit is contained in:
parent
39f6dde8fb
commit
ceff9d7d17
|
|
@ -14187,6 +14187,10 @@ void CTFPlayerShared::PulseMedicRadiusHeal( void )
|
|||
#ifdef GAME_DLL
|
||||
if ( gpGlobals->curtime >= m_flRadiusHealCheckTime )
|
||||
{
|
||||
float fMaxRadius = 450.0f;
|
||||
CALL_ATTRIB_HOOK_FLOAT_ON_OTHER( m_pOuter, fMaxRadius, mod_medic_buff_range );
|
||||
const float fMaxRadiusSq = fMaxRadius * fMaxRadius;
|
||||
|
||||
for( int iPlayerIndex = 1; iPlayerIndex <= MAX_PLAYERS; ++iPlayerIndex )
|
||||
{
|
||||
CTFPlayer *pTFPlayer = ToTFPlayer( UTIL_PlayerByIndex( iPlayerIndex ) );
|
||||
|
|
@ -14217,7 +14221,7 @@ void CTFPlayerShared::PulseMedicRadiusHeal( void )
|
|||
}
|
||||
|
||||
Vector vDist = pTFPlayer->GetAbsOrigin() - m_pOuter->GetAbsOrigin();
|
||||
if ( vDist.LengthSqr() <= 450 * 450 )
|
||||
if ( vDist.LengthSqr() <= fMaxRadiusSq )
|
||||
{
|
||||
// Ignore players we can't see
|
||||
trace_t trace;
|
||||
|
|
|
|||
Loading…
Reference in New Issue