equal
deleted
inserted
replaced
71 //////////////////////////////////////////////////////////////////////////////// |
71 //////////////////////////////////////////////////////////////////////////////// |
72 procedure doStepDrowningGear(Gear: PGear); |
72 procedure doStepDrowningGear(Gear: PGear); |
73 begin |
73 begin |
74 AllInactive:= false; |
74 AllInactive:= false; |
75 Gear.Y:= Gear.Y + cDrownSpeed; |
75 Gear.Y:= Gear.Y + cDrownSpeed; |
76 if round(Gear.Y) > Gear.Radius + cWaterLine + 48 + cVisibleWater then DeleteGear(Gear) |
76 if round(Gear.Y) > Gear.Radius + cWaterLine + cVisibleWater then DeleteGear(Gear) |
77 end; |
77 end; |
78 |
78 |
79 //////////////////////////////////////////////////////////////////////////////// |
79 //////////////////////////////////////////////////////////////////////////////// |
80 procedure doStepFallingGear(Gear: PGear); |
80 procedure doStepFallingGear(Gear: PGear); |
81 var b: boolean; |
81 var b: boolean; |
250 Gear.X:= Gear.X + Gear.dX; |
250 Gear.X:= Gear.X + Gear.dX; |
251 Gear.Y:= Gear.Y + Gear.dY; |
251 Gear.Y:= Gear.Y + Gear.dY; |
252 CheckCollision(Gear); |
252 CheckCollision(Gear); |
253 if (Gear.State and gstCollision) <> 0 then |
253 if (Gear.State and gstCollision) <> 0 then |
254 begin |
254 begin |
255 AmmoShove(Gear, 25); |
255 AmmoShove(Gear, 25, 25); |
256 doMakeExplosion(round(Gear.X), round(Gear.Y), 25, EXPLNoDamage or EXPLDoNotTouchHH); |
256 doMakeExplosion(round(Gear.X), round(Gear.Y), 25, EXPLNoDamage or EXPLDoNotTouchHH); |
257 DeleteGear(Gear); |
257 DeleteGear(Gear); |
|
258 AfterAttack; |
258 exit |
259 exit |
259 end; |
260 end; |
260 dec(i) |
261 dec(i) |
261 until i = 0; |
262 until i = 0; |
262 if (Gear.X < 0) or (Gear.Y < 0) or (Gear.X > 2048) or (Gear.Y > 1024) then |
263 if (Gear.X < 0) or (Gear.Y < 0) or (Gear.X > 2048) or (Gear.Y > 1024) then |
277 Gear.Y:= Gear.Y + Gear.dY; |
278 Gear.Y:= Gear.Y + Gear.dY; |
278 x:= round(Gear.X); |
279 x:= round(Gear.X); |
279 y:= round(Gear.Y); |
280 y:= round(Gear.Y); |
280 if ((y and $FFFFFC00) = 0) and ((x and $FFFFF800) = 0) |
281 if ((y and $FFFFFC00) = 0) and ((x and $FFFFF800) = 0) |
281 and (Land[y, x] <> 0) then inc(Gear.Damage); |
282 and (Land[y, x] <> 0) then inc(Gear.Damage); |
282 AmmoShove(Gear, 12); |
283 AmmoShove(Gear, 7, 20); |
283 dec(i) |
284 dec(i) |
284 until (i = 0) or (Gear.Damage > Gear.Health); |
285 until (i = 0) or (Gear.Damage > Gear.Health); |
285 if Gear.Damage > 0 then |
286 if Gear.Damage > 0 then |
286 begin |
287 begin |
287 DrawTunnel(oX, oY, Gear.dX, Gear.dY, 82 - i, 1); |
288 DrawTunnel(oX, oY, Gear.dX, Gear.dY, 82 - i, 1); |
489 |
490 |
490 HHGear.dX:= HHGear.X - HHGear.dX; |
491 HHGear.dX:= HHGear.X - HHGear.dX; |
491 HHGear.dY:= HHGear.Y - HHGear.dY; |
492 HHGear.dY:= HHGear.Y - HHGear.dY; |
492 |
493 |
493 if TestCollisionXwithGear(HHGear, Sign(HHGear.dX)) then |
494 if TestCollisionXwithGear(HHGear, Sign(HHGear.dX)) then |
494 HHGear.dX:= -0.9 * HHGear.dX; |
495 HHGear.dX:= -0.6 * HHGear.dX; |
495 if TestCollisionYwithGear(HHGear, Sign(HHGear.dY)) then |
496 if TestCollisionYwithGear(HHGear, Sign(HHGear.dY)) then |
496 HHGear.dY:= -0.9 * HHGear.dY; |
497 HHGear.dY:= -0.6 * HHGear.dY; |
497 |
498 |
498 if (Gear.Message and gm_Attack) <> 0 then |
499 if (Gear.Message and gm_Attack) <> 0 then |
499 if (Gear.State and gsttmpFlag) <> 0 then DeleteMe else |
500 if (Gear.State and gsttmpFlag) <> 0 then DeleteMe else |
500 else if (Gear.State and gsttmpFlag) = 0 then Gear.State:= Gear.State or gsttmpFlag; |
501 else if (Gear.State and gsttmpFlag) = 0 then Gear.State:= Gear.State or gsttmpFlag; |
501 end; |
502 end; |