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/StarshipAI.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/StarshipAI.cpp')
-rw-r--r-- | Stars45/StarshipAI.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Stars45/StarshipAI.cpp b/Stars45/StarshipAI.cpp index 5a32391..5b6b697 100644 --- a/Stars45/StarshipAI.cpp +++ b/Stars45/StarshipAI.cpp @@ -29,7 +29,7 @@ #include "Farcaster.h" #include "QuantumDrive.h" -#include "Game.h" +#include "Clock.h" #include "ContentBundle.h" #include "Random.h" @@ -66,7 +66,7 @@ StarshipAI::StarshipAI(SimObject* s) tactical = new(__FILE__,__LINE__) StarshipTacticalAI(this); } - sub_select_time = Game::GetInstance()->GetClock()->GameTime() + (DWORD) Random(0, 2000); + sub_select_time = Clock::GetInstance()->GameTime() + (DWORD) Random(0, 2000); point_defense_time = sub_select_time; } @@ -639,7 +639,7 @@ StarshipAI::FireControl() System* StarshipAI::SelectSubtarget() { - if (Game::GetInstance()->GetClock()->GameTime() - sub_select_time < 2345) + if (Clock::GetInstance()->GameTime() - sub_select_time < 2345) return subtarget; subtarget = 0; @@ -656,7 +656,7 @@ StarshipAI::SelectSubtarget() double dist = 50e3; Point svec = ship->Location() - tgt_ship->Location(); - sub_select_time = Game::GetInstance()->GetClock()->GameTime(); + sub_select_time = Clock::GetInstance()->GameTime(); // first pass: turrets ListIter<WeaponGroup> g_iter = tgt_ship->Weapons(); @@ -727,7 +727,7 @@ StarshipAI::SelectSubtarget() bool StarshipAI::AssessTargetPointDefense() { - if (Game::GetInstance()->GetClock()->GameTime() - point_defense_time < 3500) + if (Clock::GetInstance()->GameTime() - point_defense_time < 3500) return tgt_point_defense; tgt_point_defense = false; @@ -743,7 +743,7 @@ StarshipAI::AssessTargetPointDefense() Weapon* subtgt = 0; Point svec = ship->Location() - tgt_ship->Location(); - point_defense_time = Game::GetInstance()->GetClock()->GameTime(); + point_defense_time = Clock::GetInstance()->GameTime(); // first pass: turrets ListIter<WeaponGroup> g_iter = tgt_ship->Weapons(); |