diff options
Diffstat (limited to 'Stars45/StarServer.cpp')
-rw-r--r-- | Stars45/StarServer.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Stars45/StarServer.cpp b/Stars45/StarServer.cpp index 98b1287..5385a6b 100644 --- a/Stars45/StarServer.cpp +++ b/Stars45/StarServer.cpp @@ -45,6 +45,7 @@ #include "MachineInfo.h" #include "Game.h" #include "GameWinDX9.h" +#include "Clock.h" #include "ContentBundle.h" #include "Keyboard.h" #include "Mouse.h" @@ -169,7 +170,7 @@ StarServer::InitGame() Shot::Initialize(); RadioTraffic::Initialize(); - time_mark = Game::GetInstance()->GetClock()->GameTime(); + time_mark = Clock::GetInstance()->GameTime(); minutes = 0; NetServerConfig* server_config = NetServerConfig::GetInstance(); @@ -221,7 +222,7 @@ StarServer::SetGameMode(int m) // stand alone server should wait for players to connect // before unpausing the simulation... - clock.SetTimeCompression(1.0); + Clock::GetInstance()->SetTimeCompression(1.0); Pause(true); } @@ -336,12 +337,12 @@ StarServer::UpdateWorld() Drive::StartFrame(); if (world) - world->ExecFrame(clock.Delta()); + world->ExecFrame(Clock::GetInstance()->Delta()); } static DWORD refresh_time = 0; - if (clock.RealTime() - refresh_time > 1000) { - refresh_time = clock.RealTime(); + if (Clock::GetInstance()->RealTime() - refresh_time > 1000) { + refresh_time = Clock::GetInstance()->RealTime(); RedrawWindow(hwnd, 0, 0, RDW_ERASE|RDW_INVALIDATE); } } @@ -370,8 +371,8 @@ StarServer::GameState() } else if (game_mode == PLAY_MODE) { - if (Game::GetInstance()->GetClock()->GameTime() - time_mark > 60000) { - time_mark = Game::GetInstance()->GetClock()->GameTime(); + if (Clock::GetInstance()->GameTime() - time_mark > 60000) { + time_mark = Clock::GetInstance()->GameTime(); minutes++; if (minutes > 60) Print(" TIME %2d:%02d:00\n", minutes/60, minutes%60); |