hedgewars/uGearsHedgehog.pas
changeset 10146 1fb6d8cc4626
parent 10124 aabd1b75d5a3
child 10147 9a772dc5dfbe
--- a/hedgewars/uGearsHedgehog.pas	Tue Feb 18 06:02:22 2014 +0100
+++ b/hedgewars/uGearsHedgehog.pas	Wed Feb 19 19:10:11 2014 +0400
@@ -948,7 +948,7 @@
         end
     end;
 
-if (Gear^.State <> 0) then
+if (Gear^.State and (gstMoving or gstHHJumping or gstHHHJump)) <> 0 then
     DeleteCI(Gear);
 
 if isUnderwater then
@@ -1346,6 +1346,7 @@
 procedure doStepHedgehog(Gear: PGear);
 var tX: hwFloat;
 begin
+AddFileLog('[HOG] -#' + inttostr(Gear^.uid) + ': ' + floattostr(Gear^.X) + ', ' + floattostr(Gear^.Y) + ' (' + floattostr(Gear^.dX) + ', ' + floattostr(Gear^.dY) + ')');
 CheckGearDrowning(Gear);
 if Gear = nil then exit;
 tX:= Gear^.X;
@@ -1389,6 +1390,7 @@
         else
             doStepHedgehogDriven(Gear)
     end;
+AddFileLog('[HOG] +#' + inttostr(Gear^.uid) + ': ' + floattostr(Gear^.X) + ', ' + floattostr(Gear^.Y) + ' (' + floattostr(Gear^.dX) + ', ' + floattostr(Gear^.dY) + ')');
 end;
 
 end.