Skip to content

Commit 3f1b8b0

Browse files
committed
1 parent 4cb96c6 commit 3f1b8b0

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/game/client/cdll_util.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
#include "tier0/memdbgon.h"
3434

3535
ConVar localplayer_visionflags( "localplayer_visionflags", "0", FCVAR_DEVELOPMENTONLY );
36+
#ifdef BDSBASE
37+
ConVar level_visits("level_visits", "0", FCVAR_USERINFO, "The number of times the player has visited the current map");
38+
#endif
3639

3740
//-----------------------------------------------------------------------------
3841
// ConVars
@@ -1243,7 +1246,11 @@ void UTIL_IncrementMapKey( const char *pszCustomKey )
12431246
KeyValues *pNewKey = new KeyValues( mapname );
12441247
if ( pNewKey )
12451248
{
1246-
pNewKey->SetString( pszCustomKey, "1" );
1249+
#ifdef BDSBASE
1250+
pNewKey->SetInt(pszCustomKey, iCount);
1251+
#else
1252+
pNewKey->SetString(pszCustomKey, "1");
1253+
#endif
12471254
kvMapLoadFile->AddSubKey( pNewKey );
12481255
}
12491256
}
@@ -1260,6 +1267,10 @@ void UTIL_IncrementMapKey( const char *pszCustomKey )
12601267
kvMapLoadFile->deleteThis();
12611268
}
12621269

1270+
#ifdef BDSBASE
1271+
level_visits.SetValue(iCount);
1272+
#endif
1273+
12631274
if ( IsX360() )
12641275
{
12651276
#ifdef _X360

0 commit comments

Comments
 (0)