summaryrefslogtreecommitdiffhomepage
path: root/Stars45/StarServer.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-03-07 23:56:54 +0100
committerAki <please@ignore.pl>2022-03-07 23:57:49 +0100
commitf725e598935860d15099a0310a3aef7197a58e9c (patch)
treeab227ca1318c4a79abdc5ba749724e158869aa46 /Stars45/StarServer.cpp
parenta80a4f25fe4f7b235443c87ff840e5e06a41290e (diff)
downloadstarshatter-f725e598935860d15099a0310a3aef7197a58e9c.zip
starshatter-f725e598935860d15099a0310a3aef7197a58e9c.tar.gz
starshatter-f725e598935860d15099a0310a3aef7197a58e9c.tar.bz2
Replaced old integrated clock with new one
The interface remains unchanged for now, but changing to use GetClock or similar method to get clock owned by the Game instance is preferred.
Diffstat (limited to 'Stars45/StarServer.cpp')
-rw-r--r--Stars45/StarServer.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/Stars45/StarServer.cpp b/Stars45/StarServer.cpp
index c972a41..34eb77f 100644
--- a/Stars45/StarServer.cpp
+++ b/Stars45/StarServer.cpp
@@ -320,21 +320,6 @@ StarServer::GameLoop()
void
StarServer::UpdateWorld()
{
- long new_time = real_time;
- double delta = new_time - frame_time;
- seconds = max_frame_length;
- gui_seconds = delta * 0.001;
-
- if (frame_time == 0)
- gui_seconds = 0;
-
- time_comp = 1;
-
- if (delta < max_frame_length * 1000)
- seconds = delta * 0.001;
-
- frame_time = new_time;
-
Galaxy* galaxy = Galaxy::GetInstance();
if (galaxy) galaxy->ExecFrame();
@@ -347,12 +332,10 @@ StarServer::UpdateWorld()
}
else {
- game_time += (DWORD) (seconds * 1000);
-
Drive::StartFrame();
if (world)
- world->ExecFrame(seconds);
+ world->ExecFrame(clock.Delta());
}
static DWORD refresh_time = 0;