equal
deleted
inserted
replaced
1562 begin |
1562 begin |
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 begin |
1567 // Stop hedgehog if it collides with land *just* behind other side of world wrap edge |
1568 Gear^.X:= tX; |
1568 begin |
1569 Gear^.dX.isNegative:= (hwRound(tX) > LongInt(leftX) + Gear^.Radius * 2) |
1569 if (hwRound(tX) > LongInt(leftX) + Gear^.Radius * 2) then |
|
1570 Gear^.X:= int2HwFloat(RightX) |
|
1571 else |
|
1572 Gear^.X:= int2HwFloat(LeftX); |
|
1573 Gear^.dX.QWordValue:= 0; |
|
1574 Gear^.State := Gear^.State or gstCollision; |
1570 end |
1575 end |
1571 end; |
1576 end; |
1572 |
1577 |
1573 CheckSum:= CheckSum xor Gear^.Hedgehog^.BotLevel; |
1578 CheckSum:= CheckSum xor Gear^.Hedgehog^.BotLevel; |
1574 if (Gear^.Message and gmDestroy) <> 0 then |
1579 if (Gear^.Message and gmDestroy) <> 0 then |