2911 t := CheckGearsCollision(Gear); |
2914 t := CheckGearsCollision(Gear); |
2912 //fixes drill not exploding when touching HH bug |
2915 //fixes drill not exploding when touching HH bug |
2913 if (Gear^.Timer = 0) |
2916 if (Gear^.Timer = 0) |
2914 or (t^.Count <> 0) |
2917 or (t^.Count <> 0) |
2915 or (not TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) |
2918 or (not TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) |
2916 and not TestCollisionXWithGear(Gear, hwSign(Gear^.dX))) |
2919 and not TestCollisionXWithGear(Gear, hwSign(Gear^.dX)) |
|
2920 and ((Gear^.State and gsttmpFlag) = 0)) |
2917 // CheckLandValue returns true if the type isn't matched |
2921 // CheckLandValue returns true if the type isn't matched |
2918 or not CheckLandValue(hwRound(Gear^.X), hwRound(Gear^.Y), lfIndestructible) then |
2922 or not CheckLandValue(hwRound(Gear^.X), hwRound(Gear^.Y), lfIndestructible) then |
2919 begin |
2923 begin |
2920 //out of time or exited ground |
2924 //out of time or exited ground |
2921 StopSound(Gear^.SoundChannel); |
2925 StopSound(Gear^.SoundChannel); |
2922 if (Gear^.State and gsttmpFlag) <> 0 then |
2926 if (Gear^.State and gsttmpFlag) <> 0 then |
2923 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, EXPLAutoSound) |
2927 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, EXPLAutoSound) |
2924 else |
2928 else |
2925 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound); |
2929 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound); |
2926 DeleteGear(Gear); |
2930 DeleteGear(Gear); |
2927 exit |
2931 exit |
2928 end; |
2932 end |
|
2933 else if not TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) and not TestCollisionXWithGear(Gear, hwSign(Gear^.dX)) then |
|
2934 begin |
|
2935 StopSound(Gear^.SoundChannel); |
|
2936 Gear^.doStep := @doStepDrill |
|
2937 end; |
2929 |
2938 |
2930 dec(Gear^.Timer); |
2939 dec(Gear^.Timer); |
2931 end; |
2940 end; |
2932 |
2941 |
2933 procedure doStepDrill(Gear: PGear); |
2942 procedure doStepDrill(Gear: PGear); |