Skip to content

Commit

Permalink
check for DV_NONE, do not apply comp options if not MBF21
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiangreffrath committed Jan 6, 2025
1 parent 6231a05 commit 2a2f49d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/g_compatibility.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ void G_ParseCompDatabase(void)
continue;
}

record.complevel = DV_NONE;
const char *complevel = JS_GetStringValue(level, "complevel");
if (complevel)
{
Expand Down Expand Up @@ -234,17 +235,17 @@ void G_ApplyLevelCompatibility(int lump)
restore_comp = true;

demo_version_t new_demover = record->complevel;
if (demo_version != new_demover)
if (new_demover != DV_NONE && demo_version != new_demover)
{
demo_version = new_demover;
G_ReloadDefaults(true);
I_Printf(VB_INFO, "Automatically setting compatibility level \"%s\"",
G_GetCurrentComplevelName());
}

if (demo_compatibility)
{
return;
}
if (!mbf21)
{
return;
}

option_t *option;
Expand Down

0 comments on commit 2a2f49d

Please sign in to comment.