summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9fad025)
raw | patch | inline | side by side (parent: 9fad025)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Fri, 15 Apr 2016 15:10:36 +0000 (18:10 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Fri, 15 Apr 2016 15:12:15 +0000 (18:12 +0300) |
src/game/g_game.pas | patch | blob | history | |
src/game/g_netmaster.pas | patch | blob | history | |
src/game/g_window.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index d369831615c5ff4bc92cc6dbbc0a737c814d7772..3bb18b729d9cff35516f93ecfdc0e0bdf4c66db2 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
gDelayedEvents[n].DENum := Num;
gDelayedEvents[n].DEStr := Str;
if DEType = DE_GLOBEVENT then
- gDelayedEvents[n].Time := (GetTimer() div 1000) + Time
+ gDelayedEvents[n].Time := (GetTimer() {div 1000}) + Time
else
gDelayedEvents[n].Time := gTime + Time;
Result := n;
// Äåëàåì ñêðèíøîò (íå ÷àùå 200 ìèëëèñåêóíä):
if e_KeyPressed(gGameControls.GameControls.TakeScreenshot) then
- if (GetTimer()-LastScreenShot) > 200000 then
+ if (GetTimer()-LastScreenShot) > 200000 div 1000 then
begin
g_TakeScreenShot();
LastScreenShot := GetTimer();
KeyPress(IK_F10);
end;
- Time := GetTimer() div 1000;
+ Time := GetTimer() {div 1000};
// Îáðàáîòêà îòëîæåííûõ ñîáûòèé:
if gDelayedEvents <> nil then
begin
if gExit = EXIT_QUIT then Exit;
- Time := GetTimer() div 1000;
+ Time := GetTimer() {div 1000};
FPSCounter := FPSCounter+1;
if Time - FPSTime >= 1000 then
begin
index a1b9b6feda29f39b78307cbedc888586d0b81529..e0eed50cdb6668dae4b2fd19671556f3cd92325c 100644 (file)
--- a/src/game/g_netmaster.pas
+++ b/src/game/g_netmaster.pas
function GetTimerMS(): Integer;
begin
- Result := GetTimer() div 1000;
+ Result := GetTimer() {div 1000};
end;
procedure PingServer(var S: TNetServer; Sock: ENetSocket);
diff --git a/src/game/g_window.pas b/src/game/g_window.pas
index ef1d362bd77362b5d5045ea3ffcea44b9ed24da7..419e135299da48568c51fe8974a8a2389016c0c6 100644 (file)
--- a/src/game/g_window.pas
+++ b/src/game/g_window.pas
function GetTimer(): Int64;
begin
- Result := SDL_GetTicks() * 1000; // TODO: do we really need microseconds here?
+ Result := SDL_GetTicks() {* 1000}; // TODO: do we really need microseconds here? k8: NOPE!
end;
procedure ResetTimer();
if wNeedTimeReset then
begin
- Time_Delta := 27777;
+ Time_Delta := (27777 div 1000);
wNeedTimeReset := False;
end;
- t := Time_Delta div 27777;
+ t := Time_Delta div (27777 div 1000);
if t > 0 then
begin
flag := True;
// Âðåìÿ ïðåäûäóùåãî îáíîâëåíèÿ:
if flag then
begin
- Time_Old := Time - (Time_Delta mod 27777);
+ Time_Old := Time - (Time_Delta mod (27777 div 1000));
if (not wMinimized) then
begin
Draw();