hedgewars/uGears.pas
changeset 7687 c73fd8cfa7c0
parent 7669 a85e1c167b69
child 7721 2b1ad418ba39
equal deleted inserted replaced
7613:ce6ead3327b2 7687:c73fd8cfa7c0
   282         if delay = 0 then
   282         if delay = 0 then
   283             inc(step)
   283             inc(step)
   284             end;
   284             end;
   285     stChWin:
   285     stChWin:
   286         begin
   286         begin
   287         CheckForWin;
   287         CheckForWin();
   288         inc(step)
   288         inc(step)
   289         end;
   289         end;
   290     stWater:
   290     stWater:
   291     if (not bBetweenTurns) and (not isInMultiShoot) then
   291     if (not bBetweenTurns) and (not isInMultiShoot) then
   292         begin
   292         begin
   294             bWaterRising:= true;
   294             bWaterRising:= true;
   295         if bWaterRising and (cWaterRise > 0) then
   295         if bWaterRising and (cWaterRise > 0) then
   296             AddGear(0, 0, gtWaterUp, 0, _0, _0, 0)^.Tag:= cWaterRise;
   296             AddGear(0, 0, gtWaterUp, 0, _0, _0, 0)^.Tag:= cWaterRise;
   297         inc(step)
   297         inc(step)
   298         end
   298         end
   299     else
   299     else // since we are not raising the water, a second win-check isn't needed
   300         inc(step);
   300         inc(step,2);
   301     stChWin2:
   301     stChWin2:
   302         begin
   302         begin
   303         CheckForWin;
   303         CheckForWin;
   304         inc(step)
   304         inc(step)
   305         end;
   305         end;
   568     x, y: LongInt;
   568     x, y: LongInt;
   569 begin
   569 begin
   570 Gear:= GearsList;
   570 Gear:= GearsList;
   571 while Gear <> nil do
   571 while Gear <> nil do
   572     begin
   572     begin
   573     if Gear^.State and gstInvisible = 0 then
   573     if (Gear^.State and gstInvisible = 0) and (Gear^.Message and gmRemoveFromList = 0) then
   574         begin
   574         begin
   575         x:= hwRound(Gear^.X) + WorldDx;
   575         x:= hwRound(Gear^.X) + WorldDx;
   576         y:= hwRound(Gear^.Y) + WorldDy;
   576         y:= hwRound(Gear^.Y) + WorldDy;
   577         RenderGear(Gear, x, y);
   577         RenderGear(Gear, x, y);
   578         end;
   578         end;