diff options
Diffstat (limited to 'Stars45/ShipAI.cpp')
-rw-r--r-- | Stars45/ShipAI.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Stars45/ShipAI.cpp b/Stars45/ShipAI.cpp index c3d5a3a..43c34d9 100644 --- a/Stars45/ShipAI.cpp +++ b/Stars45/ShipAI.cpp @@ -35,7 +35,7 @@ #include "Debris.h" #include "Asteroid.h" -#include "Game.h" +#include "Clock.h" #include "ContentBundle.h" #include "Random.h" @@ -279,12 +279,12 @@ ShipAI::ExecFrame(double secs) if (target == ship->GetTarget() && target->Type() == SimObject::SIM_SHIP) { // if this isn't the same ship we last called out: - if (target->Identity() != engaged_ship_id && Game::GetInstance()->GetClock()->GameTime() - last_call_time > 10000) { + if (target->Identity() != engaged_ship_id && Clock::GetInstance()->GameTime() - last_call_time > 10000) { // call engaging: RadioMessage* msg = new(__FILE__,__LINE__) RadioMessage(ship->GetElement(), ship, RadioMessage::CALL_ENGAGING); msg->AddTarget(target); RadioTraffic::Transmit(msg); - last_call_time = Game::GetInstance()->GetClock()->GameTime(); + last_call_time = Clock::GetInstance()->GameTime(); engaged_ship_id = target->Identity(); } @@ -1047,7 +1047,7 @@ ShipAI::AvoidCollision() last_avoid_time = 0; // check for a new obstacle immediately } - if (!other && Game::GetInstance()->GetClock()->GameTime() - last_avoid_time < 500) + if (!other && Clock::GetInstance()->GameTime() - last_avoid_time < 500) return avoid; brake = 0; @@ -1124,7 +1124,7 @@ ShipAI::AvoidCollision() } } - last_avoid_time = Game::GetInstance()->GetClock()->GameTime(); + last_avoid_time = Clock::GetInstance()->GameTime(); return avoid; } |