Fixes issue where A2G cannot be selected for A2G tasks with an airplane.

Added the IsInstanceOf check in COORDINATE:ToString method. If Task is
given, (the Task), then it is checked which parent task it was from. If
A2A, the mode will be A2A, if A2G or CARGO, the mode will be A2G. If
Task was not given, then the unit type will decide upon the A2A or A2G
mode.
This commit is contained in:
FlightControl
2017-07-13 21:35:48 +02:00
parent f8cca7d510
commit 6f581cadf1
2 changed files with 29 additions and 5 deletions

View File

@@ -174,6 +174,7 @@ do -- ACT_ROUTE
end
local Task = self:GetTask() -- This is to dermine that the coordinates are for a specific task mode (A2A or A2G).
local CC = self:GetTask():GetMission():GetCommandCenter()
if CC then
if CC:IsModeWWII() then
@@ -198,7 +199,7 @@ do -- ACT_ROUTE
RouteText = Coordinate:ToStringFromRP( ShortestReferencePoint, ShortestReferenceName, Controllable )
end
else
RouteText = Coordinate:ToString( Controllable )
RouteText = Coordinate:ToString( Controllable, nil, Task )
end
end