Start rally point lines at the spawn position instead of the exit cell.

This commit is contained in:
Paul Chote
2021-01-01 22:44:52 +00:00
committed by reaperrr
parent 60195e2842
commit fc1032cd9e

View File

@@ -72,8 +72,7 @@ namespace OpenRA.Mods.Common.Effects
return; return;
var exit = building.NearestExitOrDefault(targetLineNodes[0]); var exit = building.NearestExitOrDefault(targetLineNodes[0]);
var exitPos = exit != null ? building.World.Map.CenterOfCell(building.Location + exit.Info.ExitCell) : building.CenterPosition; targetLineNodes.Insert(0, building.CenterPosition + (exit?.Info.SpawnOffset ?? WVec.Zero));
targetLineNodes.Insert(0, exitPos);
} }
IEnumerable<IRenderable> IEffect.Render(WorldRenderer wr) { return SpriteRenderable.None; } IEnumerable<IRenderable> IEffect.Render(WorldRenderer wr) { return SpriteRenderable.None; }