hedgewars/uGears.pas
changeset 5348 0bc81de36e08
parent 5319 51d8e4747876
child 5351 a4409b50bdc2
--- a/hedgewars/uGears.pas	Wed Jun 29 17:32:05 2011 +0400
+++ b/hedgewars/uGears.pas	Thu Jun 30 13:59:57 2011 +0400
@@ -341,6 +341,7 @@
                     dx.QWordValue:= GetRandom(100000000);
                     dy.isNegative:= false;
                     dy.QWordValue:= GetRandom(70000000);
+                    State:= State or gstInvisible;
                     if GetRandom(2) = 0 then dx := -dx;
                     Health:= random(vobFrameTicks);
                     Timer:= random(vobFramesCount);
@@ -1175,9 +1176,12 @@
 Gear:= GearsList;
 while Gear <> nil do
     begin
-    x:= hwRound(Gear^.X) + WorldDx;
-    y:= hwRound(Gear^.Y) + WorldDy;
-    RenderGear(Gear, x, y);
+    if Gear^.State and gstInvisible = 0 then
+        begin
+        x:= hwRound(Gear^.X) + WorldDx;
+        y:= hwRound(Gear^.Y) + WorldDy;
+        RenderGear(Gear, x, y);
+        end;
     Gear:= Gear^.NextGear
     end;
 end;