4421 CurrentHedgehog^.Gear^.MsgParam := 0; |
4421 CurrentHedgehog^.Gear^.MsgParam := 0; |
4422 CurrentHedgehog^.Gear^.Message := CurrentHedgehog^.Gear^.Message and not gmSlot; |
4422 CurrentHedgehog^.Gear^.Message := CurrentHedgehog^.Gear^.Message and not gmSlot; |
4423 end; |
4423 end; |
4424 |
4424 |
4425 if (*((Gear^.Pos = 3) and ((GameFlags and gfSolidLand) <> 0)) or*) (Gear^.Pos = 5) then |
4425 if (*((Gear^.Pos = 3) and ((GameFlags and gfSolidLand) <> 0)) or*) (Gear^.Pos = 5) then |
4426 // bounce up to 10 times (3 times on gameflagged solid land) before dropping past landscape |
4426 begin |
4427 begin |
|
4428 Gear^.dY := Gear^.dY + cGravity * 2; |
4427 Gear^.dY := Gear^.dY + cGravity * 2; |
4429 Gear^.Y := Gear^.Y + Gear^.dY; |
4428 Gear^.Y := Gear^.Y + Gear^.dY; |
4430 CheckGearDrowning(Gear); |
4429 CheckGearDrowning(Gear); |
4431 if (Gear^.State and gstDrowning) <> 0 then |
4430 if (Gear^.State and gstDrowning) <> 0 then |
4432 begin |
4431 begin |
|
4432 OnUsedAmmo(CurrentHedgehog^); |
4433 if CurrentHedgehog^.Gear <> nil then |
4433 if CurrentHedgehog^.Gear <> nil then |
4434 begin |
4434 begin |
4435 // Drown the hedgehog. Could also just delete it, but hey, this gets a caption |
4435 // Drown the hedgehog. Could also just delete it, but hey, this gets a caption |
4436 CurrentHedgehog^.Gear^.Active := true; |
4436 CurrentHedgehog^.Gear^.Active := true; |
4437 CurrentHedgehog^.Gear^.X := Gear^.X; |
4437 CurrentHedgehog^.Gear^.X := Gear^.X; |
4438 CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128; |
4438 CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128; |
4439 CurrentHedgehog^.Unplaced := false; |
4439 CurrentHedgehog^.Unplaced := false; |
4440 if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft; |
4440 if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft; |
4441 TurnTimeLeft:= 0 |
4441 TurnTimeLeft:= 0 |
4442 end; |
4442 end; |
4443 ResumeMusic |
4443 ResumeMusic |
4444 end; |
4444 end; |
4445 exit |
4445 exit |
4446 end; |
4446 end; |
4447 |
4447 |
4448 odY:= Gear^.dY; |
4448 odY:= Gear^.dY; |
4449 doStepFallingGear(Gear); |
4449 doStepFallingGear(Gear); |
4450 |
4450 |
4451 if (Gear^.State and gstDrowning) <> 0 then |
4451 if (Gear^.State and gstDrowning) <> 0 then |
4452 begin |
4452 begin |
|
4453 OnUsedAmmo(CurrentHedgehog^); |
4453 if CurrentHedgehog^.Gear <> nil then |
4454 if CurrentHedgehog^.Gear <> nil then |
4454 begin |
4455 begin |
4455 // Drown the hedgehog. Could also just delete it, but hey, this gets a caption |
4456 // Drown the hedgehog. Could also just delete it, but hey, this gets a caption |
4456 CurrentHedgehog^.Gear^.Active := true; |
4457 CurrentHedgehog^.Gear^.Active := true; |
4457 CurrentHedgehog^.Gear^.X := Gear^.X; |
4458 CurrentHedgehog^.Gear^.X := Gear^.X; |
4458 CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128; |
4459 CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128; |
4459 CurrentHedgehog^.Unplaced := false; |
4460 CurrentHedgehog^.Unplaced := false; |
4460 if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft; |
4461 if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft; |
4461 TurnTimeLeft:= 0 |
4462 TurnTimeLeft:= 0 |
4462 end; |
4463 end; |
4463 ResumeMusic |
4464 ResumeMusic |
4464 end |
4465 end |
4465 else if (Gear^.State and gstCollision) <> 0 then |
4466 else if (Gear^.State and gstCollision) <> 0 then |
4466 begin |
4467 begin |
4467 r0 := GetRandom(21); |
4468 r0 := GetRandom(21); |
4468 r1 := GetRandom(21); |
4469 r1 := GetRandom(21); |
4469 doMakeExplosion(hwRound(Gear^.X) - 30 - r0, hwRound(Gear^.Y) + 40, 40 + r1, Gear^.Hedgehog, 0); |
4470 doMakeExplosion(hwRound(Gear^.X) - 30 - r0, hwRound(Gear^.Y) + 40, 40 + r1, Gear^.Hedgehog, 0); |
4470 doMakeExplosion(hwRound(Gear^.X) + 30 + r1, hwRound(Gear^.Y) + 40, 40 + r0, Gear^.Hedgehog, 0); |
4471 doMakeExplosion(hwRound(Gear^.X) + 30 + r1, hwRound(Gear^.Y) + 40, 40 + r0, Gear^.Hedgehog, 0); |
4471 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 80 + r0, Gear^.Hedgehog, EXPLAutoSound); |
4472 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 80 + r0, Gear^.Hedgehog, EXPLAutoSound); |
4472 for r0:= 0 to 4 do |
4473 for r0:= 0 to 4 do |
4473 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtNote); |
4474 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtNote); |
4474 Gear^.dY := odY * -1 + cGravity * 2; |
4475 Gear^.dY := odY * -1 + cGravity * 2; |
4475 Gear^.Pos := Gear^.Pos + 1; |
4476 Gear^.Pos := Gear^.Pos + 1; |
4476 end |
4477 end |
4477 else |
4478 else |
4478 Gear^.dY := Gear^.dY + cGravity * 2; |
4479 Gear^.dY := Gear^.dY + cGravity * 2; |
4479 // let it fall faster so itdoesn't take too long for the whole attack |
4480 // let it fall faster so itdoesn't take too long for the whole attack |
4480 end; |
4481 end; |