hedgewars/uVisualGearsHandlers.pas
changeset 15908 014f4edd0421
parent 15795 da1bb21e6fbf
--- a/hedgewars/uVisualGearsHandlers.pas	Thu Oct 06 20:58:54 2022 +0300
+++ b/hedgewars/uVisualGearsHandlers.pas	Sun Oct 16 13:14:16 2022 +0300
@@ -335,6 +335,18 @@
 end;
 
 ////////////////////////////////////////////////////////////////////////////////
+procedure doStepLine(Gear: PVisualGear; Steps: Longword);
+begin
+{$IFNDEF PAS2C}
+Steps := Steps;
+{$ENDIF}
+if Gear^.Timer <= Steps then
+    DeleteVisualGear(Gear)
+else
+    dec(Gear^.Timer, Steps)
+end;
+
+////////////////////////////////////////////////////////////////////////////////
 procedure doStepEgg(Gear: PVisualGear; Steps: Longword);
 begin
 Gear^.X:= Gear^.X + Gear^.dX * Steps;
@@ -1072,7 +1084,8 @@
             @doStepCircle,
             @doStepSmoothWindBar,
             @doStepStraightShot,
-            @doStepNoPlaceWarn
+            @doStepNoPlaceWarn,
+            @doStepLine
         );
 
 procedure initModule;