diff --git a/DxOper.pas b/DxOper.pas index aa25a80..627f339 100644 --- a/DxOper.pas +++ b/DxOper.pas @@ -57,40 +57,22 @@ function TDxOperator.GetSendDelay: integer; // Result := Max(1, SecondsToBlocks(1 / Sqr(4*Skills))); // Result := Round(RndGaussLim(Result, 0.7 * Result)); - if State = osNeedPrevEnd - then Result := NEVER - else if RunMode = rmHst - then Result := SecondsToBlocks(0.05 + 0.5*Random * 10/Wpm) + if State = osNeedPrevEnd then + Result := NEVER + else if RunMode = rmHst then + Result := SecondsToBlocks(0.05 + 0.5*Random * 10/Wpm) else Result := SecondsToBlocks(0.1 + 0.5*Random); end; function TDxOperator.GetWpm: integer; -Var - xmin: integer; - xmax: integer; - xupdown: integer; begin - if RunMode = rmHst - then Result := Ini.Wpm - else begin - if (MaxRxWpm=0) and (MinRxWpm=0) then - Result := Round(Ini.Wpm * 0.5 * (1 + Random)) - else begin - if (MinRxWpm > 0) and (MaxRxWpm > 0) then begin - xupdown := random (2); - end else begin - if MinRxWpm > 0 then - xupdown := 0 - else - xupdown := 1; - end; - if xupdown = 0 then - result := Ini.Wpm - random(MinRxWpm+1) - else - result := Ini.Wpm + random(maxRxWpm+1); - end; - end; + if RunMode = rmHst then + Result := Ini.Wpm + else if (MaxRxWpm = -1) or (MinRxWpm = -1) then { use original algorithm } + Result := Round(Ini.Wpm * 0.5 * (1 + Random)) + else + Result := Round(Ini.Wpm - MinRxWpm + (MinRxWpm + MaxRxWpm) * Random); end; function TDxOperator.GetNR: integer;