Fix terrain positions for targets not being serialized for Orders

This commit is contained in:
abcdefg30
2022-08-13 15:08:13 +02:00
committed by Gustas
parent 29eaab59be
commit e41279fe6b
3 changed files with 31 additions and 4 deletions

View File

@@ -288,7 +288,8 @@ namespace OpenRA.Traits
// Expose internal state for serialization by the orders code *only*
internal static Target FromSerializedActor(Actor a, int generation) { return a != null ? new Target(a, generation) : Invalid; }
internal (TargetType Type, Actor Actor, int Generation, CPos? Cell, SubCell? SubCell, WPos Pos) SerializableState =>
(type, Actor, generation, cell, subCell, terrainCenterPosition);
internal static Target FromSerializedTerrainPosition(WPos centerPosition, WPos[] terrainPositions) { return new Target(centerPosition, terrainPositions); }
internal (TargetType Type, Actor Actor, int Generation, CPos? Cell, SubCell? SubCell, WPos Pos, WPos[] TerrainPositions) SerializableState =>
(type, Actor, generation, cell, subCell, terrainCenterPosition, terrainPositions);
}
}