mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-28 15:55:31 +03:00
Fixed env_credits always resetting sv_unlockedchapters to 15 when it shouldn't
This commit is contained in:
parent
36a459d21c
commit
d953468bc1
@ -212,6 +212,10 @@ static ConCommand creditsdone("creditsdone", CreditsDone_f );
|
|||||||
|
|
||||||
extern ConVar sv_unlockedchapters;
|
extern ConVar sv_unlockedchapters;
|
||||||
|
|
||||||
|
#ifdef MAPBASE
|
||||||
|
extern int Mapbase_GetChapterCount();
|
||||||
|
#endif
|
||||||
|
|
||||||
void CCredits::OnRestore()
|
void CCredits::OnRestore()
|
||||||
{
|
{
|
||||||
BaseClass::OnRestore();
|
BaseClass::OnRestore();
|
||||||
@ -226,6 +230,10 @@ void CCredits::OnRestore()
|
|||||||
|
|
||||||
void CCredits::RollOutroCredits()
|
void CCredits::RollOutroCredits()
|
||||||
{
|
{
|
||||||
|
#ifdef MAPBASE
|
||||||
|
// Don't set this if we're using Mapbase chapters or if sv_unlockedchapters is already greater than 15
|
||||||
|
if (Mapbase_GetChapterCount() <= 0 && sv_unlockedchapters.GetInt() < 15)
|
||||||
|
#endif
|
||||||
sv_unlockedchapters.SetValue( "15" );
|
sv_unlockedchapters.SetValue( "15" );
|
||||||
|
|
||||||
CBasePlayer *pPlayer = UTIL_GetLocalPlayer();
|
CBasePlayer *pPlayer = UTIL_GetLocalPlayer();
|
||||||
|
@ -553,6 +553,11 @@ CUtlVector<MODCHAPTER> *Mapbase_GetChapterList()
|
|||||||
return &g_MapbaseChapterList;
|
return &g_MapbaseChapterList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Mapbase_GetChapterCount()
|
||||||
|
{
|
||||||
|
return g_MapbaseChapterList.Count();
|
||||||
|
}
|
||||||
|
|
||||||
ThreeState_t Flashlight_GetLegacyVersionKey()
|
ThreeState_t Flashlight_GetLegacyVersionKey()
|
||||||
{
|
{
|
||||||
KeyValues *gameinfo = new KeyValues( "GameInfo" );
|
KeyValues *gameinfo = new KeyValues( "GameInfo" );
|
||||||
|
Loading…
Reference in New Issue
Block a user