mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-08 11:01:33 +00:00
Merge cbbc68d609
into ceb6d4d783
This commit is contained in:
commit
facaacdc75
3 changed files with 17 additions and 3 deletions
|
@ -31,6 +31,11 @@ void CSpellPickup::Spawn( void )
|
|||
{
|
||||
BaseClass::Spawn();
|
||||
m_nSkin = m_nTier;
|
||||
|
||||
if ( !TFGameRules()->IsUsingSpells() )
|
||||
{
|
||||
SetDisabled( true );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -741,7 +741,7 @@ ConVar tf_force_holidays_off( "tf_force_holidays_off", "0", FCVAR_NOTIFY | FCVAR
|
|||
#endif // GAME_DLL
|
||||
);
|
||||
ConVar tf_birthday( "tf_birthday", "0", FCVAR_NOTIFY | FCVAR_REPLICATED );
|
||||
ConVar tf_spells_enabled( "tf_spells_enabled", "0", FCVAR_NOTIFY | FCVAR_REPLICATED, "Enable to Allow Halloween Spells to be dropped and used by players" );
|
||||
ConVar tf_spells_enabled( "tf_spells_enabled", "-1", FCVAR_NOTIFY | FCVAR_REPLICATED, "-1 Default (Map-based)\n0 - Force off\n1 - Force on" );
|
||||
|
||||
ConVar tf_caplinear( "tf_caplinear", "1", FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY, "If set to 1, teams must capture control points linearly." );
|
||||
ConVar tf_stalematechangeclasstime( "tf_stalematechangeclasstime", "20", FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY, "Amount of time that players are allowed to change class in stalemates." );
|
||||
|
@ -3661,9 +3661,15 @@ CTFGameRules::HalloweenScenarioType CTFGameRules::GetHalloweenScenario( void ) c
|
|||
//-----------------------------------------------------------------------------
|
||||
bool CTFGameRules::IsUsingSpells( void ) const
|
||||
{
|
||||
if ( tf_spells_enabled.GetBool() )
|
||||
if ( tf_spells_enabled.GetInt() == 0 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ( tf_spells_enabled.GetInt() > 0 )
|
||||
{
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
if ( IsHalloweenScenario( CTFGameRules::HALLOWEEN_SCENARIO_HIGHTOWER ) )
|
||||
return true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue