hedgewars/uGearsHandlersMess.pas
changeset 10642 8fdfa2b77d83
parent 10634 35d059bd0932
child 10645 b8c73bacb31e
equal deleted inserted replaced
10641:802589828f99 10642:8fdfa2b77d83
  2169         if (Gear^.dX.QWordValue > _2.QWordValue)
  2169         if (Gear^.dX.QWordValue > _2.QWordValue)
  2170             or (Gear^.dY.QWordValue > _2.QWordValue)
  2170             or (Gear^.dY.QWordValue > _2.QWordValue)
  2171         then
  2171         then
  2172         begin
  2172         begin
  2173             // norm speed vector to length of 2 for fire particles to keep flying in the same direction
  2173             // norm speed vector to length of 2 for fire particles to keep flying in the same direction
  2174             f:= _2 / Distance(Gear^.dX, Gear^.dY);
  2174             f:= _1_9 / Distance(Gear^.dX, Gear^.dY);
  2175             Gear^.dX:= Gear^.dX * f;
  2175             Gear^.dX:= Gear^.dX * f;
  2176             Gear^.dY:= Gear^.dY * f;
  2176             Gear^.dY:= Gear^.dY * f;
  2177         end
  2177         end
  2178         else begin
  2178         else begin
  2179             if Gear^.dX.QWordValue > _0_01.QWordValue then
  2179             if Gear^.dX.QWordValue > _0_01.QWordValue then