Update tf_weapon_spellbook.cpp

This commit is contained in:
Rowedahelicon 2025-02-28 14:53:14 -05:00 committed by GitHub
parent 69b520e719
commit cbbc68d609
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1065,6 +1065,9 @@ void CTFSpellBook::CreateSpellJar( const Vector &position, const QAngle &angles,
//-----------------------------------------------------------------------------
void CTFSpellBook::RollNewSpell( int iTier, bool bForceReroll /*= false*/ )
{
if ( !TFGameRules()->IsUsingSpells() )
return;
// do not do anything if we already have a spell for low tier, always roll for high tier
if ( m_iSpellCharges > 0 && iTier == 0 && !bForceReroll )
return;