1328 len := _0_8 / hwSqrt(len); |
1328 len := _0_8 / hwSqrt(len); |
1329 HHGear^.dX := HHGear^.dX * len; |
1329 HHGear^.dX := HHGear^.dX * len; |
1330 HHGear^.dY := HHGear^.dY * len; |
1330 HHGear^.dY := HHGear^.dY * len; |
1331 end; |
1331 end; |
1332 |
1332 |
1333 |
1333 haveCollision:= false; |
1334 if (Gear^.Message and gmAttack) <> 0 then |
1334 if RopePoints.Count > 0 then |
|
1335 begin |
|
1336 ly:= hwRound(RopePoints.ar[0].Y); |
|
1337 lx:= hwRound(RopePoints.ar[0].X) |
|
1338 end |
|
1339 else if Gear^.Elasticity.QWordValue > 0 then |
|
1340 begin |
|
1341 ly:= hwRound(Gear^.Y); |
|
1342 lx:= hwRound(Gear^.X) |
|
1343 end; |
|
1344 (* // just in case it turns out we have rounding problems |
|
1345 i:= -1; |
|
1346 while not haveCollision and (i < 2) do |
|
1347 begin |
|
1348 j:= -1; |
|
1349 while not haveCollision and (j < 2) do |
|
1350 begin |
|
1351 haveCollision:= ((((ly + i) and LAND_HEIGHT_MASK) = 0) and |
|
1352 (((lx + j) and LAND_WIDTH_MASK) = 0) and |
|
1353 ((Land[ly + i, lx + j] and $FF00) <> 0)); |
|
1354 inc(j) |
|
1355 end; |
|
1356 inc(i) |
|
1357 end; *) |
|
1358 if ((Gear^.Message and gmAttack) <> 0) or |
|
1359 (((ly and LAND_HEIGHT_MASK) = 0) and |
|
1360 ((lx and LAND_WIDTH_MASK) = 0) and |
|
1361 ((Land[ly, lx] and $FF00) = 0)) then |
1335 if (Gear^.State and gsttmpFlag) <> 0 then |
1362 if (Gear^.State and gsttmpFlag) <> 0 then |
1336 with Gear^.Hedgehog^ do |
1363 with Gear^.Hedgehog^ do |
1337 begin |
1364 begin |
1338 PlaySound(sndRopeRelease); |
1365 PlaySound(sndRopeRelease); |
1339 if CurAmmoType <> amParachute then |
1366 if CurAmmoType <> amParachute then |