- use a command line switch to set Duke compatibility

At this point the command line CCMD execution has not run yet, so setting the CVAR does not work as expected.
This commit is contained in:
Christoph Oelckers 2020-02-13 16:09:27 +01:00
parent d63d9f80bb
commit 91b7770e84

View file

@ -309,6 +309,14 @@ CVAR(Bool, duke_compatibility_15, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
void CheckFrontend(int flags)
{
bool duke_compat = duke_compatibility_15;
// This point is too early to have cmdline CVAR checkers working so it must be with a switch.
auto c = Args->CheckValue("-duke_compatibility_15");
if (c)
{
if (strtol(c, nullptr, 0)) duke_compatibility_15 = true;
else duke_compatibility_15 = false;
}
if (flags & GAMEFLAG_BLOOD)
{
gi = Blood::CreateInterface();