|
@ -227,17 +227,25 @@ namespace GWConquest |
|
|
{ |
|
|
{ |
|
|
if(Formation.ZoneType == ZoneType.Ground) |
|
|
if(Formation.ZoneType == ZoneType.Ground) |
|
|
{ |
|
|
{ |
|
|
if (!Formation.IsEmbarked && ui.Type == ObjectType.District && ui.District.Zone.zoneType == ZoneType.Ground) |
|
|
|
|
|
|
|
|
if (ui.Type == ObjectType.District && ui.District.Zone.zoneType == ZoneType.Ground) |
|
|
{ |
|
|
{ |
|
|
// Transition Boden -> Boden
|
|
|
|
|
|
var goalZone = ui.District.Zone; |
|
|
|
|
|
var pathfinding = Formation.currentZone.planet.pathfindingGraph; |
|
|
|
|
|
var shortestPath = pathfinding.FindShortestPath(Formation, Formation.currentZone, goalZone); |
|
|
|
|
|
if (shortestPath != null) |
|
|
|
|
|
|
|
|
if(!Formation.IsEmbarked) |
|
|
{ |
|
|
{ |
|
|
Formation.StartMovingOnPath(shortestPath.zones); |
|
|
|
|
|
|
|
|
// Transition Boden -> Boden
|
|
|
|
|
|
var goalZone = ui.District.Zone; |
|
|
|
|
|
var pathfinding = Formation.currentZone.planet.pathfindingGraph; |
|
|
|
|
|
var shortestPath = pathfinding.FindShortestPath(Formation, Formation.currentZone, goalZone); |
|
|
|
|
|
if (shortestPath != null) |
|
|
|
|
|
{ |
|
|
|
|
|
Formation.StartMovingOnPath(shortestPath.zones); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
// Transition Weltall -> Boden
|
|
|
|
|
|
var goalZone = ui.District.Zone; |
|
|
|
|
|
var path = new List<Zone>() {Formation.currentZone, goalZone}; |
|
|
|
|
|
Formation.StartMovingOnPath(path); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
else if (ui.Type == ObjectType.Formation && ui.Formation.ZoneType == ZoneType.Space) |
|
|
else if (ui.Type == ObjectType.Formation && ui.Formation.ZoneType == ZoneType.Space) |
|
|
{ |
|
|
{ |
|
@ -248,7 +256,7 @@ namespace GWConquest |
|
|
// Transition Boden -> Weltall
|
|
|
// Transition Boden -> Weltall
|
|
|
var goalZone = ui.Formation.currentZone; |
|
|
var goalZone = ui.Formation.currentZone; |
|
|
var path = new List<Zone>() {Formation.currentZone, goalZone}; |
|
|
var path = new List<Zone>() {Formation.currentZone, goalZone}; |
|
|
Formation.StartMovingOnPath(path, ui.Formation); |
|
|
|
|
|
|
|
|
Formation.StartMovingOnPath(path, targetFormation: ui.Formation); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
// Transition Weltall -> Weltall (Flottenwechsel)
|
|
|
// Transition Weltall -> Weltall (Flottenwechsel)
|
|
|