diff options
author | Aki <please@ignore.pl> | 2022-03-23 22:57:42 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-03-23 22:57:42 +0100 |
commit | 6b2a17a2ccb1a0d45489208f7f23b9d6a65b110d (patch) | |
tree | 0c0c86871cdd51462617a946a9f35fe3501bd6a7 /Stars45/Weapon.cpp | |
parent | 9f9f2456d5ee0091bf171fae3ad321f82e5f2ca4 (diff) | |
download | starshatter-6b2a17a2ccb1a0d45489208f7f23b9d6a65b110d.zip starshatter-6b2a17a2ccb1a0d45489208f7f23b9d6a65b110d.tar.gz starshatter-6b2a17a2ccb1a0d45489208f7f23b9d6a65b110d.tar.bz2 |
Removed Clock from Game for now
While testing waters around exporting things out from Game to
GameWinDX9 I noticed that if both ContentBundle and Clock (primarily)
are removed from it, then the WinDX9 will be almost equivalent to base.
This is worrying mainly because I'm only fortified in seeing deep
relationships between various classes sadly including Video.
Diffstat (limited to 'Stars45/Weapon.cpp')
-rw-r--r-- | Stars45/Weapon.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Stars45/Weapon.cpp b/Stars45/Weapon.cpp index 2e35157..33a3238 100644 --- a/Stars45/Weapon.cpp +++ b/Stars45/Weapon.cpp @@ -25,6 +25,7 @@ #include "NetUtil.h" #include "Game.h" +#include "Clock.h" #include "ContentBundle.h" #include "Solid.h" @@ -1145,7 +1146,7 @@ Weapon::CanLockPoint(const Point& test, double& az, double& el, Point* obj) void Weapon::AimTurret(double az, double el) { - double seconds = (Game::GetInstance()->GetClock()->GameTime() - aim_time) / 1000.0; + double seconds = (Clock::GetInstance()->GameTime() - aim_time) / 1000.0; // don't let the weapon turn faster than turret slew rate: double max_turn = design->slew_rate * seconds; @@ -1170,7 +1171,7 @@ Weapon::AimTurret(double az, double el) old_azimuth = (float) az; old_elevation = (float) el; - aim_time = Game::GetInstance()->GetClock()->GameTime(); + aim_time = Clock::GetInstance()->GameTime(); } void |