hedgewars/VGSHandlers.inc
changeset 5562 8056d82b4d23
parent 5491 3a82724de759
child 5563 fc73b6e941f7
--- a/hedgewars/VGSHandlers.inc	Sun Aug 14 13:45:37 2011 -0400
+++ b/hedgewars/VGSHandlers.inc	Sun Aug 14 16:59:55 2011 -0400
@@ -711,4 +711,19 @@
 if WindBarWidth = Gear^.Tag then 
     DeleteVisualGear(Gear)
 end;
+////////////////////////////////////////////////////////////////////////////////
+procedure doStepStraightShot(Gear: PVisualGear; Steps: Longword);
+begin
+Gear^.X:= Gear^.X + Gear^.dX * Steps;
+Gear^.Y:= Gear^.Y - Gear^.dY * Steps;
 
+if Gear^.FrameTicks <= Steps then
+    DeleteVisualGear(Gear)
+else
+    begin
+    dec(Gear^.FrameTicks, Steps);
+    if (Gear^.FrameTicks < 501) and (Gear^.FrameTicks mod 5 = 0) then 
+        Gear^.Tint:= (Gear^.Tint and $FFFFFF00) or (((Gear^.Tint and $000000FF) * Gear^.FrameTicks) div 500)
+    end
+end;
+