fixed sorting global animation parts by draw order (which was confusing)
authorHolger Schemel <info@artsoft.org>
Sat, 9 Dec 2023 18:23:08 +0000 (19:23 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 9 Dec 2023 18:24:45 +0000 (19:24 +0100)
src/anim.c

index 82cb8dd248fc461b09ed6d081119c984ebced894..08abd6680cc7b2bc30b4e0ade4711ce7e3732667 100644 (file)
@@ -360,10 +360,8 @@ static int compareGlobalAnimPartControlInfo(const void *obj1, const void *obj2)
     (struct GlobalAnimPartControlInfo *)obj2;
   int compare_result;
 
-  if (o1->control_info.draw_order != o2->control_info.draw_order)
-    compare_result = o1->control_info.draw_order - o2->control_info.draw_order;
-  else
-    compare_result = o1->nr - o2->nr;
+  // do not sort animations parts by draw order (as it would be confusing)
+  compare_result = o1->nr - o2->nr;
 
   return compare_result;
 }