hedgewars/uGearsHandlers.pas
changeset 7416 2f2f78fc65a3
parent 7405 63f56edae4c6
child 7671 43f38923bc6e
equal deleted inserted replaced
7414:a9f18c66ce34 7416:2f2f78fc65a3
    50     tdx, tdy: hwFloat;
    50     tdx, tdy: hwFloat;
    51 begin
    51 begin
    52     dA := hwSign(Gear^.dX);
    52     dA := hwSign(Gear^.dX);
    53     xx := dirs[Gear^.Angle].x;
    53     xx := dirs[Gear^.Angle].x;
    54     yy := dirs[Gear^.Angle].y;
    54     yy := dirs[Gear^.Angle].y;
    55     xxn := dirs[(LongInt(Gear^.Angle) + 4 + dA) mod 4].x;
    55     xxn := dirs[(Gear^.Angle + dA) and 3].x;
    56     yyn := dirs[(LongInt(Gear^.Angle) + 4 + dA) mod 4].y;
    56     yyn := dirs[(Gear^.Angle + dA) and 3].y;
    57 
    57 
    58     if (xx = 0) then
    58     if (xx = 0) then
    59         if TestCollisionYwithGear(Gear, yy) <> 0 then
    59         if TestCollisionYwithGear(Gear, yy) <> 0 then
    60             PrevAngle(Gear, dA)
    60             PrevAngle(Gear, dA)
    61     else
    61     else