1492 len := _0_8 / hwSqrt(len); |
1492 len := _0_8 / hwSqrt(len); |
1493 HHGear^.dX := HHGear^.dX * len; |
1493 HHGear^.dX := HHGear^.dX * len; |
1494 HHGear^.dY := HHGear^.dY * len; |
1494 HHGear^.dY := HHGear^.dY * len; |
1495 end; |
1495 end; |
1496 |
1496 |
1497 haveCollision:= false; |
1497 |
1498 if RopePoints.Count > 0 then |
1498 if (Gear^.Message and gmAttack) <> 0 then |
1499 begin |
|
1500 ly:= hwRound(RopePoints.ar[0].Y); |
|
1501 lx:= hwRound(RopePoints.ar[0].X) |
|
1502 end |
|
1503 else if Gear^.Elasticity.QWordValue > 0 then |
|
1504 begin |
|
1505 ly:= hwRound(Gear^.Y); |
|
1506 lx:= hwRound(Gear^.X) |
|
1507 end; |
|
1508 (* // just in case it turns out we have rounding problems |
|
1509 i:= -1; |
|
1510 while not haveCollision and (i < 2) do |
|
1511 begin |
|
1512 j:= -1; |
|
1513 while not haveCollision and (j < 2) do |
|
1514 begin |
|
1515 haveCollision:= ((((ly + i) and LAND_HEIGHT_MASK) = 0) and |
|
1516 (((lx + j) and LAND_WIDTH_MASK) = 0) and |
|
1517 ((Land[ly + i, lx + j] and $FF00) <> 0)); |
|
1518 inc(j) |
|
1519 end; |
|
1520 inc(i) |
|
1521 end; *) |
|
1522 if ((Gear^.Message and gmAttack) <> 0) or |
|
1523 (((ly and LAND_HEIGHT_MASK) = 0) and |
|
1524 ((lx and LAND_WIDTH_MASK) = 0) and |
|
1525 ((Land[ly, lx] and $FF00) = 0)) then |
|
1526 if (Gear^.State and gsttmpFlag) <> 0 then |
1499 if (Gear^.State and gsttmpFlag) <> 0 then |
1527 with Gear^.Hedgehog^ do |
1500 with Gear^.Hedgehog^ do |
1528 begin |
1501 begin |
1529 PlaySound(sndRopeRelease); |
1502 PlaySound(sndRopeRelease); |
1530 if CurAmmoType <> amParachute then |
1503 if CurAmmoType <> amParachute then |