diff --git a/OpenRA.Mods.RA/Air/Plane.cs b/OpenRA.Mods.RA/Air/Plane.cs index 5f4faea934..eaba982678 100755 --- a/OpenRA.Mods.RA/Air/Plane.cs +++ b/OpenRA.Mods.RA/Air/Plane.cs @@ -25,10 +25,12 @@ namespace OpenRA.Mods.RA.Air public override object Create( ActorInitializer init ) { return new Plane( init, this ); } } - public class Plane : Aircraft, IIssueOrder, IResolveOrder, IOrderVoice, ITick, INotifyDamage + public class Plane : Aircraft, IIssueOrder, IResolveOrder, IOrderVoice, ITick, INotifyDamage, ISync { public IDisposable reservation; - + [Sync] + public int2 RTBPathHash; + public Plane( ActorInitializer init, PlaneInfo info ) : base( init, info ) { } bool firstTick = true; diff --git a/OpenRA.Mods.RA/Air/ReturnToBase.cs b/OpenRA.Mods.RA/Air/ReturnToBase.cs index 05f50dd7b1..50319ac224 100755 --- a/OpenRA.Mods.RA/Air/ReturnToBase.cs +++ b/OpenRA.Mods.RA/Air/ReturnToBase.cs @@ -37,11 +37,11 @@ namespace OpenRA.Mods.RA.Air { dest = ChooseAirfield(self); } - + + var plane = self.Trait(); var res = dest.TraitOrDefault(); if (res != null) { - var plane = self.Trait(); plane.UnReserve(); plane.reservation = res.Reserve(self); } @@ -77,6 +77,7 @@ namespace OpenRA.Mods.RA.Air w1 = (c1 + f).ToInt2(); w2 = (c2 + f).ToInt2(); w3 = (approachStart).ToInt2(); + plane.RTBPathHash = w1 + w2 + w3; isCalculated = true; }