summaryrefslogtreecommitdiffhomepage
path: root/Stars45/TacticalAI.cpp
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-06-17 06:38:09 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-06-17 06:38:09 +0000
commit05f1b225a03adeab4cda01a6c96595359464ac0e (patch)
treebe9beaaee8116ed81ef9c2aa07d0e16864b4b84b /Stars45/TacticalAI.cpp
parent89fce9332d6a40fe82acea1c235129b3c823bddc (diff)
downloadstarshatter-05f1b225a03adeab4cda01a6c96595359464ac0e.zip
starshatter-05f1b225a03adeab4cda01a6c96595359464ac0e.tar.gz
starshatter-05f1b225a03adeab4cda01a6c96595359464ac0e.tar.bz2
(Hopefully) Allows SWACS ships to do more than sit around. Needs testing.
Diffstat (limited to 'Stars45/TacticalAI.cpp')
-rw-r--r--Stars45/TacticalAI.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Stars45/TacticalAI.cpp b/Stars45/TacticalAI.cpp
index 32d364a..f020298 100644
--- a/Stars45/TacticalAI.cpp
+++ b/Stars45/TacticalAI.cpp
@@ -630,7 +630,7 @@ TacticalAI::SelectTargetOpportunity()
if (rogue || tgt_ok) {
if (c_ship && c_ship != ship && !c_ship->InTransition()) {
if (c_ship->Class() < Ship::DESTROYER ||
- (c_ship->Class() >= Ship::MINE && c_ship->Class() <= Ship::SWACS)) {
+ (c_ship->Class() >= Ship::MINE && c_ship->Class() <= Ship::DEFSAT)) {
// found an enemy, check distance:
double dist = (ship->Location() - c_ship->Location()).length();
@@ -736,7 +736,7 @@ TacticalAI::SelectTargetOpportunity()
}
}
- if (ship->Class() != Ship::CARRIER)
+ if (ship->Class() != Ship::CARRIER || ship->Class() != Ship::SWACS)
ship_ai->SetTarget(potential_target);
}