# HG changeset patch # User unc0rr # Date 1231602315 0 # Node ID cc5976f292f9560a13c9dbed716b7652cfd3ee63 # Parent 486a89f0e8436201698b983f6fbbbb27f2a757c0 Cake makes a step after turn. This fixes cake stucking in air diff -r 486a89f0e843 -r cc5976f292f9 hedgewars/GSHandlers.inc --- 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