summaryrefslogtreecommitdiffhomepage
path: root/Stars45/Starshatter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/Starshatter.cpp')
-rw-r--r--Stars45/Starshatter.cpp25
1 files changed, 3 insertions, 22 deletions
diff --git a/Stars45/Starshatter.cpp b/Stars45/Starshatter.cpp
index 7326128..eb971e8 100644
--- a/Stars45/Starshatter.cpp
+++ b/Stars45/Starshatter.cpp
@@ -855,23 +855,6 @@ Starshatter::GameLoop()
void
Starshatter::UpdateWorld()
{
- long new_time = real_time;
- double delta = new_time - frame_time; // in milliseconds
- seconds = max_frame_length; // in seconds
- gui_seconds = delta * 0.001;
-
- if (frame_time == 0)
- gui_seconds = 0;
-
- if (delta < time_comp * max_frame_length * 1000) {
- seconds = time_comp * delta * 0.001;
- }
- else {
- seconds = time_comp * max_frame_length;
- }
-
- frame_time = new_time;
-
Galaxy* galaxy = Galaxy::GetInstance();
if (galaxy) galaxy->ExecFrame();
@@ -890,12 +873,10 @@ Starshatter::UpdateWorld()
}
else {
- game_time += (DWORD) (seconds * 1000);
-
Drive::StartFrame();
if (world)
- world->ExecFrame(seconds);
+ world->ExecFrame(clock.Delta());
}
if (game_mode == PLAY_MODE || InCutscene()) {
@@ -906,7 +887,7 @@ Starshatter::UpdateWorld()
cam_dir->VirtualHeadOffset(head_tracker->GetX(), head_tracker->GetY(), head_tracker->GetZ());
}
- cam_dir->ExecFrame(gui_seconds);
+ cam_dir->ExecFrame(clock.GuiDelta());
}
Sim* sim = Sim::GetSim();
@@ -916,7 +897,7 @@ Starshatter::UpdateWorld()
ListIter<Ship> iter = rgn->Ships();
while (++iter) {
Ship* s = iter.value();
- s->SelectDetail(seconds);
+ s->SelectDetail(clock.Delta());
}
}
}