hedgewars/GSHandlers.inc
changeset 3080 b7fa8ad60e3b
parent 3075 b4ef08187d22
child 3081 27170e35d9ef
--- a/hedgewars/GSHandlers.inc	Fri Mar 26 15:56:26 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Fri Mar 26 15:59:21 2010 +0000
@@ -458,14 +458,14 @@
 end;
 
 ////////////////////////////////////////////////////////////////////////////////
-procedure doStepUFOWork(Gear: PGear);
+procedure doStepBeeWork(Gear: PGear);
 var t: hwFloat;
-    y: LongInt;
 begin
 AllInactive:= false;
 t:= Distance(Gear^.dX, Gear^.dY);
 Gear^.dX:= Gear^.Elasticity * (Gear^.dX + _0_000004 * (TargetPoint.X - hwRound(Gear^.X)));
 Gear^.dY:= Gear^.Elasticity * (Gear^.dY + _0_000004 * (TargetPoint.Y - hwRound(Gear^.Y)));
+
 t:= t / Distance(Gear^.dX, Gear^.dY);
 Gear^.dX:= Gear^.dX * t;
 Gear^.dY:= Gear^.dY * t;
@@ -474,9 +474,7 @@
 
 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);
+      AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtBeeTrace);
    end;
 
 CheckCollision(Gear);
@@ -489,7 +487,7 @@
    end;
 end;
 
-procedure doStepUFO(Gear: PGear);
+procedure doStepBee(Gear: PGear);
 begin
 AllInactive:= false;
 Gear^.X:= Gear^.X + Gear^.dX;
@@ -505,9 +503,9 @@
 dec(Gear^.Timer);
 if Gear^.Timer = 0 then
    begin
-   Gear^.SoundChannel:= LoopSound(sndUFO);
+   Gear^.SoundChannel:= LoopSound(sndBee);
    Gear^.Timer:= 5000;
-   Gear^.doStep:= @doStepUFOWork
+   Gear^.doStep:= @doStepBeeWork
    end;
 end;