changed function to determine correct tree type
authorHolger Schemel <info@artsoft.org>
Tue, 2 Feb 2021 11:39:26 +0000 (12:39 +0100)
committerHolger Schemel <info@artsoft.org>
Tue, 2 Feb 2021 11:39:26 +0000 (12:39 +0100)
src/libgame/setup.c

index 2372886f92d3b02af60f605f6dc93a7c6c4b46b7..a4228a4edd76bb774ceb136c08622a6c49dc659f 100644 (file)
@@ -2904,14 +2904,15 @@ static TreeInfo *createTopTreeInfoNode(TreeInfo *node_first)
     return NULL;
 
   TreeInfo *ti_new = newTreeInfo();
+  int type = node_first->type;
 
-  setTreeInfoToDefaults(ti_new, TREE_TYPE_LEVEL_DIR);
+  setTreeInfoToDefaults(ti_new, type);
 
   ti_new->node_parent = NULL;
   ti_new->parent_link = FALSE;
 
   setString(&ti_new->identifier, node_first->identifier);
-  setString(&ti_new->name, INFOTEXT_LEVEL_DIR);
+  setString(&ti_new->name, TREE_INFOTEXT(type));
   setString(&ti_new->name_sorting, ti_new->name);
 
   setString(&ti_new->subdir, STRING_TOP_DIRECTORY);
@@ -2920,7 +2921,7 @@ static TreeInfo *createTopTreeInfoNode(TreeInfo *node_first)
   ti_new->sort_priority = node_first->sort_priority;;
   ti_new->latest_engine = node_first->latest_engine;
 
-  setString(&ti_new->class_desc, INFOTEXT_LEVEL_DIR);
+  setString(&ti_new->class_desc, TREE_INFOTEXT(type));
 
   ti_new->node_group = node_first;
   ti_new->level_group = TRUE;