1690 AllInactive := false |
1690 AllInactive := false |
1691 end |
1691 end |
1692 else |
1692 else |
1693 if ((GameTicks and $3F) = 25) then |
1693 if ((GameTicks and $3F) = 25) then |
1694 doStepFallingGear(Gear); |
1694 doStepFallingGear(Gear); |
|
1695 if (Gear^.Health = 0) then |
|
1696 begin |
|
1697 if not Gear^.dY.isNegative and (Gear^.dY > _0_2) and TestCollisionYwithGear(Gear, 1) then |
|
1698 inc(Gear^.Damage, hwRound(Gear^.dY * _70)) |
|
1699 else if not Gear^.dX.isNegative and (Gear^.dX > _0_2) and TestCollisionXwithGear(Gear, 1) then |
|
1700 inc(Gear^.Damage, hwRound(Gear^.dX * _70)) |
|
1701 else if Gear^.dY.isNegative and (Gear^.dY < -_0_2) and TestCollisionYwithGear(Gear, -1) then |
|
1702 inc(Gear^.Damage, hwRound(Gear^.dY * -_70)) |
|
1703 else if Gear^.dX.isNegative and (Gear^.dX < -_0_2) and TestCollisionXwithGear(Gear, -1) then |
|
1704 inc(Gear^.Damage, hwRound(Gear^.dX * -_70)); |
|
1705 |
|
1706 if (Gear^.Damage > random(10)) and ((GameTicks and $FF) = 0) then |
|
1707 AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y), vgtSmoke); |
|
1708 |
|
1709 if (Gear^.Damage > 35) then |
|
1710 begin |
|
1711 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, Gear^.Hedgehog, EXPLAutoSound); |
|
1712 DeleteGear(Gear); |
|
1713 exit |
|
1714 end |
|
1715 end; |
1695 |
1716 |
1696 if ((Gear^.State and gsttmpFlag) <> 0) and (Gear^.Health <> 0) then |
1717 if ((Gear^.State and gsttmpFlag) <> 0) and (Gear^.Health <> 0) then |
1697 if ((Gear^.State and gstAttacking) = 0) then |
1718 if ((Gear^.State and gstAttacking) = 0) then |
1698 begin |
1719 begin |
1699 if ((GameTicks and $1F) = 0) then |
1720 if ((GameTicks and $1F) = 0) then |