diff --git a/src/game/shared/tf/tf_flame.cpp b/src/game/shared/tf/tf_flame.cpp index 7e9ceeda8..d7d2054e7 100644 --- a/src/game/shared/tf/tf_flame.cpp +++ b/src/game/shared/tf/tf_flame.cpp @@ -705,11 +705,11 @@ void CTFFlameManager::OnCollide( CBaseEntity *pEnt, int iPointIndex ) // Does he have the bow? CTFWeaponBase *pWpn = pPlayer->GetActiveTFWeapon(); - if ( pWpn && pWpn->GetWeaponID() == TF_WEAPON_COMPOUND_BOW ) - { - CTFCompoundBow *pBow = static_cast( pWpn ); - pBow->SetArrowAlight( true ); - } + if ( !pWpn || pWpn->GetWeaponID() != TF_WEAPON_COMPOUND_BOW ) + return; + + CTFCompoundBow *pBow = static_cast( pWpn ); + pBow->SetArrowAlight( true ); } else { diff --git a/src/game/shared/tf/tf_weapon_flamethrower.cpp b/src/game/shared/tf/tf_weapon_flamethrower.cpp index 28e515553..cd63c7934 100644 --- a/src/game/shared/tf/tf_weapon_flamethrower.cpp +++ b/src/game/shared/tf/tf_weapon_flamethrower.cpp @@ -3128,19 +3128,19 @@ void CTFFlameEntity::OnCollideWithTeammate( CTFPlayer *pPlayer ) if ( !pPlayer->IsPlayerClass(TF_CLASS_SNIPER) ) return; + // Does he have the bow? + CTFWeaponBase *pWpn = pPlayer->GetActiveTFWeapon(); + if ( !pWpn || pWpn->GetWeaponID() != TF_WEAPON_COMPOUND_BOW ) + return; + + CTFCompoundBow *pBow = static_cast( pWpn ); + pBow->SetArrowAlight( true ); + int iIndex = m_hEntitiesBurnt.Find( pPlayer ); if ( iIndex != m_hEntitiesBurnt.InvalidIndex() ) return; m_hEntitiesBurnt.AddToTail( pPlayer ); - - // Does he have the bow? - CTFWeaponBase *pWpn = pPlayer->GetActiveTFWeapon(); - if ( pWpn && pWpn->GetWeaponID() == TF_WEAPON_COMPOUND_BOW ) - { - CTFCompoundBow *pBow = static_cast( pWpn ); - pBow->SetArrowAlight( true ); - } } //-----------------------------------------------------------------------------