hedgewars/GSHandlers.inc
changeset 374 95169697cc38
parent 371 731ad6d27bd1
child 393 db01cc79f278
--- a/hedgewars/GSHandlers.inc	Sat Jan 27 18:33:14 2007 +0000
+++ b/hedgewars/GSHandlers.inc	Sun Jan 28 16:40:04 2007 +0000
@@ -220,6 +220,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepUFOWork(Gear: PGear);
 var t: hwFloat;
+    y: LongInt;
 begin
 AllInactive:= false;
 t:= Distance(Gear^.dX, Gear^.dY);
@@ -230,6 +231,14 @@
 Gear^.dY:= Gear^.dY * t;
 Gear^.X:= Gear^.X + Gear^.dX;
 Gear^.Y:= Gear^.Y + Gear^.dY;
+
+if (GameTicks and $3F) = 0 then
+   begin
+   y:= hwRound(Gear^.Y);
+   if y + Gear^.Radius < cWaterLine then
+      AddGear(hwRound(Gear^.X), y, gtSmokeTrace, 0, 0, 0, 0);
+   end;
+
 CheckCollision(Gear);
 dec(Gear^.Timer);
 if ((Gear^.State and gstCollision) <> 0) or (Gear^.Timer = 0) then