From: Ketmar Dark Date: Sun, 24 Apr 2016 09:03:14 +0000 (+0300) Subject: one game tick is closer to 28 milliseconds, so i made it 28 X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=ea2a0471121aabe9ff059e29c1c42fa313307c23;p=d2df-sdl.git one game tick is closer to 28 milliseconds, so i made it 28 --- diff --git a/src/game/g_map.pas b/src/game/g_map.pas index 5bca6b0..6b6b59f 100644 --- a/src/game/g_map.pas +++ b/src/game/g_map.pas @@ -652,9 +652,9 @@ begin f := meta.MetaItems[SMetaFrameDelay]; if f < 0 then f := 0; // rounding ;-) - c := f mod 27; + c := f mod 28; if c < 13 then c := 0 else c := 1; - f := (f div 27)+c; + f := (f div 28)+c; if f < 1 then f := 1 else if f > 255 then f := 255; _speed := f; except diff --git a/src/game/g_window.pas b/src/game/g_window.pas index f711ab2..5e7e926 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -553,11 +553,11 @@ begin if wNeedTimeReset then begin - Time_Delta := (27777 div 1000); + Time_Delta := 28{(27777 div 1000)}; wNeedTimeReset := False; end; - t := Time_Delta div (27777 div 1000); + t := Time_Delta div 28{(27777 div 1000)}; if t > 0 then begin flag := True; @@ -589,7 +589,7 @@ begin // Âðåìÿ ïðåäûäóùåãî îáíîâëåíèÿ: if flag then begin - Time_Old := Time - (Time_Delta mod (27777 div 1000)); + Time_Old := Time - (Time_Delta mod 28{(27777 div 1000)}); if (not wMinimized) then begin Draw();