Fixes ships just going back and forth to Europe. The issue was caused by the ship's mission being overridden to PrivateerMission in Europe.

This commit is contained in:
Stian Grenborgen 2024-01-26 22:17:33 +01:00
parent b39385eb80
commit b3baff9650
1 changed files with 2 additions and 1 deletions

View File

@ -1989,9 +1989,10 @@ public class EuropeanAIPlayer extends MissionAIPlayer {
if (unit.isNaval()) {
ret = (old instanceof PrivateerMission) ? old
: ((m = getPrivateerMission(aiUnit, null)) != null) ? m
: (!unit.isInEurope() && (m = getPrivateerMission(aiUnit, null)) != null) ? m
: (old instanceof TransportMission) ? old
: ((m = getTransportMission(aiUnit)) != null) ? m
: ((m = getPrivateerMission(aiUnit, null)) != null) ? m
: (old instanceof UnitSeekAndDestroyMission) ? old
: ((m = getSeekAndDestroyMission(aiUnit, 8)) != null) ? m
: (old instanceof UnitWanderHostileMission) ? old