16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 15:49:18 +02:00

more deltatime hacking

This commit is contained in:
milek7
2019-01-19 14:05:51 +01:00
parent 1314f09c4d
commit 4f4f7e6afc
2 changed files with 16 additions and 11 deletions

View File

@@ -32,6 +32,8 @@ double GetTime()
double GetDeltaTime()
{ // czas symulacji (stoi gdy pauza)
if (override_delta != -1.0f)
return override_delta;
return DeltaTime;
}
@@ -79,10 +81,7 @@ void UpdateTimers(bool pause)
else
DeltaTime = 0.0; // wszystko stoi, bo czas nie płynie
if (override_delta != -1.0f)
DeltaTime = override_delta;
fSimulationTime += DeltaTime;
fSimulationTime += GetDeltaTime();
oldCount = count;
// Keep track of the time lapse and frame count