Another float debug
authorunc0rr
Tue, 16 Jan 2007 22:13:58 +0000
changeset 346 fc1e0a4f152c
parent 345 fa39c61be4de
child 347 6521e1b2cd40
Another float debug
hedgewars/GSHandlers.inc
hedgewars/uMisc.pas
--- a/hedgewars/GSHandlers.inc	Tue Jan 16 16:51:12 2007 +0000
+++ b/hedgewars/GSHandlers.inc	Tue Jan 16 22:13:58 2007 +0000
@@ -569,6 +569,12 @@
       begin
       tx:= RopePoints.ar[Pred(RopePoints.Count)].X;
       ty:= RopePoints.ar[Pred(RopePoints.Count)].Y;
+      if GameTicks = 189245 then
+         begin
+         AddFileLog('tx = ' + floattostr(tx) + ' ty = ' + floattostr(ty));
+         AddFileLog('Gear.X = ' + floattostr(Gear.X) + ' Gear.Y = ' + floattostr(Gear.Y));
+         AddFileLog('HHGear.X = ' + floattostr(HHGear.X) + ' HHGear.Y = ' + floattostr(HHGear.Y));
+         end;
       if RopePoints.ar[Pred(RopePoints.Count)].b xor ((tx - Gear.X) * (ty - HHGear.Y) > (tx - HHGear.X) * (ty - Gear.Y)) then
          begin
          dec(RopePoints.Count);
--- a/hedgewars/uMisc.pas	Tue Jan 16 16:51:12 2007 +0000
+++ b/hedgewars/uMisc.pas	Tue Jan 16 22:13:58 2007 +0000
@@ -163,7 +163,8 @@
 
 function FloatToStr(n: Double): shortstring;
 begin
-str(n:5:5, Result)
+//str(n:5:5, Result)
+str(n, Result)
 end;
 
 {$IFNDEF FPC}