hedgewars/uGearsHedgehog.pas
changeset 13611 65a10215ba43
parent 13610 f1b6070a6e14
child 13617 a6abc2c1fc1a
equal deleted inserted replaced
13610:f1b6070a6e14 13611:65a10215ba43
  1563     if (WorldEdge <> weBounce) and (Gear = CurrentHedgehog^.Gear) and
  1563     if (WorldEdge <> weBounce) and (Gear = CurrentHedgehog^.Gear) and
  1564        (CurAmmoGear <> nil) and (CurAmmoGear^.Kind =gtRope) and (CurAmmoGear^.Elasticity <> _0) then
  1564        (CurAmmoGear <> nil) and (CurAmmoGear^.Kind =gtRope) and (CurAmmoGear^.Elasticity <> _0) then
  1565        CurAmmoGear^.PortalCounter:= 1;
  1565        CurAmmoGear^.PortalCounter:= 1;
  1566     if (WorldEdge = weWrap) and ((TestCollisionXwithGear(Gear, 1) <> 0) or (TestCollisionXwithGear(Gear, -1) <> 0))  then
  1566     if (WorldEdge = weWrap) and ((TestCollisionXwithGear(Gear, 1) <> 0) or (TestCollisionXwithGear(Gear, -1) <> 0))  then
  1567         // Stop hedgehog if it collides with land *just* behind other side of world wrap edge
  1567         // Stop hedgehog if it collides with land *just* behind other side of world wrap edge
  1568         begin
  1568         if ((Gear^.State and gstNotKickable) = 0) then
  1569         if (hwRound(tX) > LongInt(leftX) + Gear^.Radius * 2) then
  1569             begin
  1570             Gear^.X:= int2HwFloat(RightX)
  1570             if (hwRound(tX) > LongInt(leftX) + Gear^.Radius * 2) then
  1571         else
  1571                 Gear^.X:= int2HwFloat(RightX)
  1572             Gear^.X:= int2HwFloat(LeftX);
  1572             else
  1573         Gear^.dX.QWordValue:= 0;
  1573                 Gear^.X:= int2HwFloat(LeftX);
  1574         Gear^.State := Gear^.State or gstCollision;
  1574             Gear^.dX.QWordValue:= 0;
  1575         end
  1575             Gear^.State := Gear^.State or gstCollision;
       
  1576             end;
  1576     end;
  1577     end;
  1577 
  1578 
  1578 CheckSum:= CheckSum xor Gear^.Hedgehog^.BotLevel;
  1579 CheckSum:= CheckSum xor Gear^.Hedgehog^.BotLevel;
  1579 if (Gear^.Message and gmDestroy) <> 0 then
  1580 if (Gear^.Message and gmDestroy) <> 0 then
  1580     begin
  1581     begin