222 dX:= dX + windSpeed; |
224 dX:= dX + windSpeed; |
223 dY:= dY + cGravityf; |
225 dY:= dY + cGravityf; |
224 dec(t) |
226 dec(t) |
225 until (((Me = CurrentHedgehog^.Gear) and TestColl(trunc(x), trunc(y), 5)) or |
227 until (((Me = CurrentHedgehog^.Gear) and TestColl(trunc(x), trunc(y), 5)) or |
226 ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me, trunc(x), trunc(y), 5))) or (y > cWaterLine); |
228 ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me, trunc(x), trunc(y), 5))) or (y > cWaterLine); |
227 |
229 |
|
230 if TestCollWithLand(trunc(x), trunc(y), 5) then |
|
231 begin |
|
232 timer := 500; |
|
233 t2 := 0.5 / sqrt(sqr(dX) + sqr(dY)); |
|
234 dX := dX * t2; |
|
235 dY := dY * t2; |
|
236 repeat |
|
237 x:= x + dX; |
|
238 y:= y + dY; |
|
239 dec(timer); |
|
240 until (Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 5) |
|
241 or (x < 0) |
|
242 or (y < 0) |
|
243 or (trunc(x) > LAND_WIDTH) |
|
244 or (trunc(y) > LAND_HEIGHT) |
|
245 or not TestCollWithLand(trunc(x), trunc(y), 5) |
|
246 or (timer = 0) |
|
247 end; |
228 EX:= trunc(x); |
248 EX:= trunc(x); |
229 EY:= trunc(y); |
249 EY:= trunc(y); |
230 if Level = 1 then |
250 if Level = 1 then |
231 value:= RateExplosion(Me, EX, EY, 101, afTrackFall or afErasesLand) |
251 value:= RateExplosion(Me, EX, EY, 101, afTrackFall or afErasesLand) |
232 else value:= RateExplosion(Me, EX, EY, 101); |
252 else value:= RateExplosion(Me, EX, EY, 101); |