Skip to content

Commit acb0d8c

Browse files
committed
make it so BDS Base detects previous2021 SDK 2013 installs
1 parent 6e29b20 commit acb0d8c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/game/client/cdll_client_int.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,13 +1266,34 @@ bool CHLClient::ReplayPostInit()
12661266
#endif
12671267
}
12681268

1269+
#ifdef BDSBASE
1270+
bool IsNewSDK()
1271+
{
1272+
return engine->GetProtocolVersion() != 24;
1273+
}
1274+
#endif
1275+
12691276
//-----------------------------------------------------------------------------
12701277
// Purpose: Called after client & server DLL are loaded and all systems initialized
12711278
//-----------------------------------------------------------------------------
12721279
void CHLClient::PostInit()
12731280
{
12741281
IGameSystem::PostInitAllSystems();
12751282

1283+
#ifdef BDSBASE
1284+
if (!CommandLine()->FindParm("-forcelaunch") && !IsNewSDK())
1285+
{
1286+
const char* modName = "";
1287+
KeyValuesAD pKVGameInfo("GameInfo");
1288+
if (pKVGameInfo->LoadFromFile(g_pFullFileSystem, "gameinfo.txt", "MOD"))
1289+
{
1290+
modName = pKVGameInfo->GetString("game", "Half-Life 2");
1291+
}
1292+
1293+
Error("The default branch or the upcoming beta must be selected for Source SDK Base 2013 Multiplayer to play %s.", modName);
1294+
}
1295+
#endif
1296+
12761297
#ifdef SIXENSE
12771298
// allow sixnese input to perform post-init operations
12781299
g_pSixenseInput->PostInit();

0 commit comments

Comments
 (0)