hedgewars/uGearsList.pas
changeset 7366 e5a0856708dc
parent 7364 ee87ad50e18d
child 7389 15c3fb4882df
equal deleted inserted replaced
7364:ee87ad50e18d 7366:e5a0856708dc
    38 procedure InsertGearToList(Gear: PGear);
    38 procedure InsertGearToList(Gear: PGear);
    39 var tmp, ptmp: PGear;
    39 var tmp, ptmp: PGear;
    40 begin
    40 begin
    41     tmp:= GearsList;
    41     tmp:= GearsList;
    42     ptmp:= GearsList;
    42     ptmp:= GearsList;
    43     while (tmp <> nil) and (tmp^.Z <= Gear^.Z) do
    43     while (tmp <> nil) and (tmp^.Z < Gear^.Z) do
    44         begin
    44         begin
    45         ptmp:= tmp;
    45         ptmp:= tmp;
    46         tmp:= tmp^.NextGear
    46         tmp:= tmp^.NextGear
    47         end;
    47         end;
    48 
    48