hedgewars/uGears.pas
changeset 37 2b7f2a43b999
parent 35 9367f246fb5f
child 38 c1ec4b15d70e
--- a/hedgewars/uGears.pas	Sat Dec 31 13:46:49 2005 +0000
+++ b/hedgewars/uGears.pas	Thu Jan 05 15:54:22 2006 +0000
@@ -110,7 +110,8 @@
                                                                doStepSmokeTrace,
                                                                doStepExplosion,
                                                                doStepMine,
-                                                               doStepCase
+                                                               doStepCase,
+                                                               doStepDEagleShot
                                                                );
 
 function AddGear(X, Y: integer; Kind: TGearType; State: Cardinal; const dX: real=0.0; dY: real=0.0; Timer: LongWord=0): PGear;
@@ -202,6 +203,10 @@
                 Result.HalfHeight:= 14;
                 Result.Elasticity:= 0.6
                 end;
+  gtDEagleShot: begin
+                Result.HalfWidth:= 1;
+                Result.HalfHeight:= 1
+                end;
      end;
 if GearsList = nil then GearsList:= Result
                    else begin
@@ -369,6 +374,11 @@
     var i, x, y: integer;
         t, k, ladd: real;
     begin
+    if (X1 = X2) and (Y1 = Y2) then
+       begin
+       {$IFDEF DEBUGFILE}AddFileLog('zero length rope line!!!!!');{$ENDIF}
+       exit
+       end;
     if abs(X1 - X2) > abs(Y1 - Y2) then
        begin
        if X1 > X2 then
@@ -550,6 +560,7 @@
       if Gear.Kind = gtHedgehog then
          begin
          GetHHPoint(pX, pY);
+         {$IFDEF DEBUGFILE}AddFileLog('HH at ('+inttostr(pX)+','+inttostr(pY)+')');{$ENDIF}
          Gear.X:= pX;
          Gear.Y:= pY
          end;