2305 3: FollowGear := AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtDrill, gsttmpFlag, cBombsSpeed * |
2305 3: FollowGear := AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtDrill, gsttmpFlag, cBombsSpeed * |
2306 Gear^.Tag, _0, Gear^.Timer + 1); |
2306 Gear^.Tag, _0, Gear^.Timer + 1); |
2307 //4: FollowGear := AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtWaterMelon, 0, cBombsSpeed * |
2307 //4: FollowGear := AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtWaterMelon, 0, cBombsSpeed * |
2308 // Gear^.Tag, _0, 5000); |
2308 // Gear^.Tag, _0, 5000); |
2309 end; |
2309 end; |
2310 Gear^.dX := Gear^.dX + int2hwFloat(30 * Gear^.Tag) |
2310 Gear^.dX := Gear^.dX + int2hwFloat(30 * Gear^.Tag); |
|
2311 StopSound(Gear^.SoundChannel, 4000); |
2311 end; |
2312 end; |
2312 |
2313 |
2313 if (GameTicks and $3F) = 0 then |
2314 if (GameTicks and $3F) = 0 then |
2314 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace); |
2315 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace); |
2315 |
2316 |
2316 if (hwRound(Gear^.X) > (LAND_WIDTH+1024)) or (hwRound(Gear^.X) < -1024) then DeleteGear(Gear) |
2317 if (hwRound(Gear^.X) > (LAND_WIDTH+1024)) or (hwRound(Gear^.X) < -1024) then |
|
2318 begin |
|
2319 // avoid to play forever (is this necessary?) |
|
2320 StopSound(Gear^.SoundChannel); |
|
2321 DeleteGear(Gear) |
|
2322 end; |
2317 end; |
2323 end; |
2318 |
2324 |
2319 procedure doStepAirAttack(Gear: PGear); |
2325 procedure doStepAirAttack(Gear: PGear); |
2320 begin |
2326 begin |
2321 AllInactive := false; |
2327 AllInactive := false; |
2342 Gear^.dX := Gear^.dX - cBombsSpeed * hwSqrt((int2hwFloat(TargetPoint.Y) - Gear^.Y) * 2 / |
2348 Gear^.dX := Gear^.dX - cBombsSpeed * hwSqrt((int2hwFloat(TargetPoint.Y) - Gear^.Y) * 2 / |
2343 cGravity) * Gear^.Tag; |
2349 cGravity) * Gear^.Tag; |
2344 |
2350 |
2345 Gear^.Health := 6; |
2351 Gear^.Health := 6; |
2346 Gear^.doStep := @doStepAirAttackWork; |
2352 Gear^.doStep := @doStepAirAttackWork; |
|
2353 Gear^.SoundChannel := LoopSound(sndPlane, 4000); |
|
2354 |
2347 end; |
2355 end; |
2348 |
2356 |
2349 //////////////////////////////////////////////////////////////////////////////// |
2357 //////////////////////////////////////////////////////////////////////////////// |
2350 |
2358 |
2351 procedure doStepAirBomb(Gear: PGear); |
2359 procedure doStepAirBomb(Gear: PGear); |