hedgewars/VGSHandlers.inc
changeset 4421 58c6918acde4
parent 4420 6be946bcd17a
child 4452 258945553b18
--- a/hedgewars/VGSHandlers.inc	Thu Nov 25 22:56:28 2010 -0500
+++ b/hedgewars/VGSHandlers.inc	Fri Nov 26 10:21:53 2010 -0500
@@ -631,19 +631,21 @@
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepCircle(Gear: PVisualGear; Steps: Longword);
 var tmp: byte;
+    i: LongWord;
 begin
 with Gear^ do
     if Frame <> 0 then
-        begin
-        inc(FrameTicks, Steps);
-        if (FrameTicks mod Frame) = 0 then
+        for i:= 1 to Steps do
             begin
-            tmp:= Gear^.Tint and $FF;
-            if tdY >= 0 then inc(tmp)
-            else dec(tmp);
-            if tmp < round(dX) then tdY:= 1;
-            if tmp > round(dY) then tdY:= -1;
-            Gear^.Tint:= (Gear^.Tint and $FFFFFF00) or tmp
+            inc(FrameTicks);
+            if (FrameTicks mod Frame) = 0 then
+                begin
+                tmp:= Gear^.Tint and $FF;
+                if tdY >= 0 then inc(tmp)
+                else dec(tmp);
+                if tmp < round(dX) then tdY:= 1;
+                if tmp > round(dY) then tdY:= -1;
+                Gear^.Tint:= (Gear^.Tint and $FFFFFF00) or tmp
+                end
             end
-        end
 end;