hedgewars/uGears.pas
changeset 64 9df467527ae5
parent 57 e1a77ae57065
child 68 cbb93eb90304
--- a/hedgewars/uGears.pas	Fri Feb 24 16:06:12 2006 +0000
+++ b/hedgewars/uGears.pas	Wed Jun 14 15:50:22 2006 +0000
@@ -146,6 +146,7 @@
                 Result.Radius:= cHHRadius;
                 Result.Elasticity:= 0.002;
                 Result.Friction:= 0.999;
+                Result.Angle:= cMaxAngle div 2;
                 end;
 gtAmmo_Grenade: begin
                 Result.Radius:= 4;
@@ -571,6 +572,7 @@
 procedure AmmoShove(Ammo: PGear; Power: integer);
 var t: PGearArray;
     i: integer;
+    Gear: PGear;
 begin
 t:= CheckGearsCollision(Ammo);
 i:= t.Count;
@@ -589,7 +591,14 @@
                        FollowGear:= t.ar[i]
                        end;
            end
-    end
+    end;
+Gear:= GearsList;
+while Gear <> nil do
+      begin
+      if Round(sqrt(sqr(Gear.X - Ammo.X) + sqr(Gear.Y - Ammo.Y))) < 50 then // why 50?
+         Gear.Active:= true;
+      Gear:= Gear.NextGear
+      end
 end;
 
 procedure AssignHHCoords;