hedgewars/GSHandlers.inc
changeset 5067 57101536cf86
parent 5063 d0722d0b024d
child 5076 b3bb27f4ba6b
equal deleted inserted replaced
5066:d2684b6f02ce 5067:57101536cf86
  2371     end;
  2371     end;
  2372 
  2372 
  2373     if (GameTicks and $3F) = 0 then
  2373     if (GameTicks and $3F) = 0 then
  2374         AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace);
  2374         AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace);
  2375 
  2375 
  2376     if (hwRound(Gear^.X) > (LAND_WIDTH+1024)) or (hwRound(Gear^.X) < -1024) then
  2376     if (hwRound(Gear^.X) > (LAND_WIDTH+2048)) or (hwRound(Gear^.X) < -2048) then
  2377     begin
  2377     begin
  2378         // avoid to play forever (is this necessary?)
  2378         // avoid to play forever (is this necessary?)
  2379         StopSound(Gear^.SoundChannel);
  2379         StopSound(Gear^.SoundChannel);
  2380         DeleteGear(Gear)
  2380         DeleteGear(Gear)
  2381     end;
  2381     end;
  2386     AllInactive := false;
  2386     AllInactive := false;
  2387 
  2387 
  2388     if Gear^.X.QWordValue = 0 then
  2388     if Gear^.X.QWordValue = 0 then
  2389     begin
  2389     begin
  2390         Gear^.Tag :=  1;
  2390         Gear^.Tag :=  1;
  2391         Gear^.X := -_1024;
  2391         Gear^.X := -_2048;
  2392     end
  2392     end
  2393     else
  2393     else
  2394     begin
  2394     begin
  2395         Gear^.Tag := -1;
  2395         Gear^.Tag := -1;
  2396         Gear^.X := int2hwFloat(LAND_WIDTH + 1024);
  2396         Gear^.X := int2hwFloat(LAND_WIDTH + 2048);
  2397     end;
  2397     end;
  2398 
  2398 
  2399     Gear^.Y := int2hwFloat(topY-300);
  2399     Gear^.Y := int2hwFloat(topY-300);
  2400     Gear^.dX := int2hwFloat(TargetPoint.X - 5 * Gear^.Tag * 15);
  2400     Gear^.dX := int2hwFloat(TargetPoint.X - 5 * Gear^.Tag * 15);
  2401 
  2401