Cake makes a step after turn. This fixes cake stucking in air
--- a/hedgewars/GSHandlers.inc Sat Jan 10 15:36:28 2009 +0000
+++ b/hedgewars/GSHandlers.inc Sat Jan 10 15:45:15 2009 +0000
@@ -1676,14 +1676,17 @@
xxn:= dirs[(LongInt(Gear^.Angle) + 4 + dA) mod 4].x;
yyn:= dirs[(LongInt(Gear^.Angle) + 4 + dA) mod 4].y;
-
if (xx = 0) then
if TestCollisionYwithGear(Gear, yy) then
PrevAngle
else begin
Gear^.Tag:= 0;
Gear^.Y:= Gear^.Y + int2hwFloat(yy);
- if not TestCollisionXwithGear(Gear, xxn) then NextAngle
+ if not TestCollisionXwithGear(Gear, xxn) then
+ begin
+ Gear^.X:= Gear^.X + int2hwFloat(xxn);
+ NextAngle
+ end;
end;
if (yy = 0) then
@@ -1692,7 +1695,11 @@
else begin
Gear^.Tag:= 0;
Gear^.X:= Gear^.X + int2hwFloat(xx);
- if not TestCollisionYwithGear(Gear, yyn) then NextAngle
+ if not TestCollisionYwithGear(Gear, yyn) then
+ begin
+ Gear^.Y:= Gear^.Y + int2hwFloat(yyn);
+ NextAngle
+ end;
end;
if Gear^.Tag = 0 then