Generalize RallyPointInfo.Offset to support arbitrary length paths.

This commit is contained in:
Paul Chote
2020-02-09 15:30:14 +00:00
committed by abcdefg30
parent 9dc4ea8541
commit b2f0ac15e8
16 changed files with 80 additions and 25 deletions

View File

@@ -123,7 +123,7 @@ namespace OpenRA.Mods.Common.Traits
var initialFacing = exitinfo.Facing < 0 ? (to - spawn).Yaw.Facing : exitinfo.Facing;
exitLocations = rp.Value != null ? rp.Value.Path : new List<CPos> { exit };
exitLocations = rp.Value != null && rp.Value.Path.Count > 0 ? rp.Value.Path : new List<CPos> { exit };
td.Add(new LocationInit(exit));
td.Add(new CenterPositionInit(spawn));