added sorting tree group nodes prior to normal nodes (level sets / artwork)
authorHolger Schemel <info@artsoft.org>
Fri, 5 Feb 2021 16:45:19 +0000 (17:45 +0100)
committerHolger Schemel <info@artsoft.org>
Fri, 5 Feb 2021 16:45:19 +0000 (17:45 +0100)
src/libgame/setup.c

index af90c247d4a14c9031a8e3b6f6c56bb2a8c5a20e..31c92c8e1f2d92a1b19558dddfaf7d3c321ad509 100644 (file)
@@ -2877,6 +2877,8 @@ static int compareTreeInfoEntries(const void *object1, const void *object2)
 
   if (entry1->parent_link || entry2->parent_link)
     compare_result = (entry1->parent_link ? -1 : +1);
+  else if (entry1->level_group != entry2->level_group)
+    compare_result = (entry1->level_group ? -1 : +1);
   else if (entry1->sort_priority == entry2->sort_priority)
     compare_result = strcasecmp(entry1->name_sorting, entry2->name_sorting);
   else if (class_sorting1 == class_sorting2)