Swap preprocessor directive with global

Since launcher does not get compiled with the engine, the dedicated check has to be performed using the global instead.
This commit is contained in:
Kawe Mazidjatari 2023-05-13 18:07:05 +02:00
parent ab3abce664
commit 04ed774c46

View File

@ -10,6 +10,7 @@
#include "tier0/commandline.h"
#include "tier1/strtools.h"
#include "launcher/launcher.h"
#include <eiface.h>
int HWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
@ -74,7 +75,8 @@ void RemoveSpuriousGameParameters()
// as all there are required to run the game with the game sdk.
void AppendSDKParametersPreInit()
{
#ifdef DEDICATED
if (s_bIsDedicated)
{
CommandLine()->AppendParm("-collate", "");
CommandLine()->AppendParm("-multiple", "");
CommandLine()->AppendParm("-noorigin", "");
@ -87,7 +89,8 @@ void AppendSDKParametersPreInit()
CommandLine()->AppendParm("-nomouse", "");
CommandLine()->AppendParm("-nojoy", "");
CommandLine()->AppendParm("-nosendtable", "");
#endif
}
// Assume default configs if the game isn't launched with the SDKLauncher.
if (!CommandLine()->FindParm("-launcher"))
{