diff options
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(); |