From e472d9537ee7919630e5f6039f8425b06f6c4213 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 8 Mar 2022 19:33:59 +0100 Subject: Replaced time funcs from Game with Clock equivalents This excludes time compression stuff, as it will need some more attention due to casting. I don't quite like the long invocations that go through game instance first then get the clock. It looks bad. I'll need to rethink how modules are being made available in the codebase. --- Stars45/Player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Stars45/Player.cpp') diff --git a/Stars45/Player.cpp b/Stars45/Player.cpp index 9ba5c35..e4944e6 100644 --- a/Stars45/Player.cpp +++ b/Stars45/Player.cpp @@ -641,7 +641,7 @@ Player::GetMissionPoints(ShipStats* s, DWORD start_time) if (s) { result = s->GetPoints(); - int flight_time = (Game::GetInstance()->GameTime() - start_time) / 1000; + int flight_time = (Game::GetInstance()->GetClock()->GameTime() - start_time) / 1000; // if player survived mission, award one experience point // for each minute of action, in ten point blocks: @@ -682,7 +682,7 @@ Player::ProcessStats(ShipStats* s, DWORD start_time) AddLosses(s->GetDeaths()); AddLosses(s->GetColls()); AddMissions(1); - AddFlightTime((Game::GetInstance()->GameTime() - start_time) / 1000); + AddFlightTime((Game::GetInstance()->GetClock()->GameTime() - start_time) / 1000); int rank = Rank(); -- cgit v1.1