removed showing level in cave names for BDCFF cave sets without levels
authorHolger Schemel <holger.schemel@virtion.de>
Sat, 11 May 2024 08:31:02 +0000 (10:31 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Sat, 11 May 2024 08:31:57 +0000 (10:31 +0200)
src/files.c

index 7d0194f24a920eb286c009f4235946c4263ea4bb..ad0686319b94adfa80143698cd0233df7ad0bd41 100644 (file)
@@ -4645,7 +4645,11 @@ static void CopyNativeLevel_BD_to_RND(struct LevelInfo *level)
 
   // level name
   char *cave_name_latin1 = getLatin1FromUTF8(cave->name);
-  char *cave_name_final = getStringPrint("%s / %d", cave_name_latin1, bd_level_nr + 1);
+  char *cave_name_final;
+  if (gd_caveset_has_levels())
+    cave_name_final = getStringPrint("%s / %d", cave_name_latin1, bd_level_nr + 1);
+  else
+    cave_name_final = getStringCopy(cave_name_latin1);
 
   strncpy(level->name, cave_name_final, MAX_LEVEL_NAME_LEN);
   level->name[MAX_LEVEL_NAME_LEN] = '\0';