Cancel out dX/dY to handle the invulnerability case
authornemo
Sun, 31 Oct 2010 00:32:41 -0400
changeset 4045 e3a2a39a8277
parent 4044 de7170e51cc6
child 4046 cfdbddc4b385
Cancel out dX/dY to handle the invulnerability case
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Sat Oct 30 23:50:49 2010 -0400
+++ b/hedgewars/GSHandlers.inc	Sun Oct 31 00:32:41 2010 -0400
@@ -4112,8 +4112,6 @@
     (*DrawCircle(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Radius, 1.5, 0, 0, $FF,
             $FF);*)
 
-    if hh^.Gear^.Damage <> 0 then doStepHedgehogMoving(hh^.Gear);
-
     if ((Gear^.Message and gmUp) <> 0) then 
         begin
         if (GameTicks and $F) <> 0 then exit;
@@ -4176,6 +4174,8 @@
                     end
                 end;
 
+        hh^.Gear^.dY := _0;
+        hh^.Gear^.dX := _0;
         doStepHedgehogMoving(hh^.Gear);
         StopSound(Gear^.SoundChannel);
         Gear^.Timer := 250;