Insert at front of same Z, not end. Saves a little time on insertion and lua lookup of recent adds.
authornemo
Sun, 08 Jul 2012 12:00:27 -0400
changeset 7366 e5a0856708dc
parent 7364 ee87ad50e18d
child 7368 20448801e86a
Insert at front of same Z, not end. Saves a little time on insertion and lua lookup of recent adds.
hedgewars/uGearsList.pas
--- a/hedgewars/uGearsList.pas	Sun Jul 08 11:43:22 2012 -0400
+++ b/hedgewars/uGearsList.pas	Sun Jul 08 12:00:27 2012 -0400
@@ -40,7 +40,7 @@
 begin
     tmp:= GearsList;
     ptmp:= GearsList;
-    while (tmp <> nil) and (tmp^.Z <= Gear^.Z) do
+    while (tmp <> nil) and (tmp^.Z < Gear^.Z) do
         begin
         ptmp:= tmp;
         tmp:= tmp^.NextGear