hedgewars/uGearsHandlersMess.pas
changeset 14747 2e8213c0951f
parent 14740 2d859d34e6f6
child 14753 2ad6f0555e61
equal deleted inserted replaced
14746:37a781d28e43 14747:2e8213c0951f
  2997         end;
  2997         end;
  2998 
  2998 
  2999     if (GameTicks and $3F) = 0 then
  2999     if (GameTicks and $3F) = 0 then
  3000         AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace);
  3000         AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace);
  3001 
  3001 
  3002     if (hwRound(Gear^.X) > (max(LAND_WIDTH,4096)+2048)) or (hwRound(Gear^.X) < -2048) then
  3002     if (hwRound(Gear^.X) > (max(LAND_WIDTH,4096)+2048)) or (hwRound(Gear^.X) < -2048) or ((Gear^.Message and gmDestroy) > 0) then
  3003         begin
  3003         begin
  3004         // avoid to play forever (is this necessary?)
  3004         // avoid to play forever (is this necessary?)
  3005         StopSoundChan(Gear^.SoundChannel);
  3005         StopSoundChan(Gear^.SoundChannel);
  3006         DeleteGear(Gear)
  3006         DeleteGear(Gear)
  3007         end
  3007         end