fixed warning when not finding any valid level sets in level directory
authorHolger Schemel <info@artsoft.org>
Sat, 11 Jun 2022 12:36:01 +0000 (14:36 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 11 Jun 2022 12:36:34 +0000 (14:36 +0200)
src/libgame/setup.c

index acee4a9fd2634ddb52320b2a9df1722a28052685..fa696c581e2d1a69c966a0d4fe54d3c153aaf010 100644 (file)
@@ -3893,9 +3893,13 @@ static void LoadLevelInfoFromLevelDir(TreeInfo **node_first,
                                                    level_directory, ".");
   }
 
-  if (!valid_entry_found)
+  boolean valid_entry_expected =
+    (strEqual(level_directory, options.level_directory) ||
+     setup.internal.create_user_levelset);
+
+  if (valid_entry_expected && !valid_entry_found)
     Warn("cannot find any valid level series in directory '%s'",
-         level_directory);
+        level_directory);
 }
 
 boolean AdjustGraphicsForEMC(void)