fix some fail desyncs in chronoshift code
This commit is contained in:
@@ -149,12 +149,12 @@ namespace OpenRA.Traits
|
|||||||
queue.RemoveAt(0);
|
queue.RemoveAt(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BeginProduction( string group, ProductionItem item )
|
void BeginProduction( string group, ProductionItem item )
|
||||||
{
|
{
|
||||||
production[group].Add(item);
|
production[group].Add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BuildUnit( string name )
|
void BuildUnit( string name )
|
||||||
{
|
{
|
||||||
var newUnitType = Rules.Info[ name ];
|
var newUnitType = Rules.Info[ name ];
|
||||||
var producerTypes = Rules.TechTree.UnitBuiltAt( newUnitType );
|
var producerTypes = Rules.TechTree.UnitBuiltAt( newUnitType );
|
||||||
|
|||||||
@@ -67,10 +67,6 @@ namespace OpenRA.Mods.Aftermath
|
|||||||
var movement = self.traits.GetOrDefault<IMovement>();
|
var movement = self.traits.GetOrDefault<IMovement>();
|
||||||
if (order.OrderString == "ChronoshiftSelf" && movement.CanEnterCell(order.TargetLocation))
|
if (order.OrderString == "ChronoshiftSelf" && movement.CanEnterCell(order.TargetLocation))
|
||||||
{
|
{
|
||||||
// Cannot chronoshift into unexplored location
|
|
||||||
if (!self.Owner.Shroud.IsExplored(order.TargetLocation))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (self.Owner == self.World.LocalPlayer)
|
if (self.Owner == self.World.LocalPlayer)
|
||||||
Game.controller.CancelInputMode();
|
Game.controller.CancelInputMode();
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ namespace OpenRA.Mods.Aftermath.Orders
|
|||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (world.LocalPlayer.Shroud.IsExplored(xy))
|
||||||
yield return new Order("ChronoshiftSelf", self, xy);
|
yield return new Order("ChronoshiftSelf", self, xy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,10 +51,6 @@ namespace OpenRA.Mods.RA
|
|||||||
if (self.Owner == self.World.LocalPlayer)
|
if (self.Owner == self.World.LocalPlayer)
|
||||||
Game.controller.CancelInputMode();
|
Game.controller.CancelInputMode();
|
||||||
|
|
||||||
// Cannot chronoshift into unexplored location
|
|
||||||
if (!self.Owner.Shroud.IsExplored(order.TargetLocation))
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Ensure the target cell is valid for the unit
|
// Ensure the target cell is valid for the unit
|
||||||
var movement = order.TargetActor.traits.GetOrDefault<IMovement>();
|
var movement = order.TargetActor.traits.GetOrDefault<IMovement>();
|
||||||
if (!movement.CanEnterCell(order.TargetLocation))
|
if (!movement.CanEnterCell(order.TargetLocation))
|
||||||
@@ -147,6 +143,8 @@ namespace OpenRA.Mods.RA
|
|||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cannot chronoshift into unexplored location
|
||||||
|
if (world.LocalPlayer.Shroud.IsExplored(xy))
|
||||||
yield return new Order("ChronosphereActivate", world.LocalPlayer.PlayerActor, self, xy);
|
yield return new Order("ChronosphereActivate", world.LocalPlayer.PlayerActor, self, xy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Drawing.Imaging;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Drawing.Imaging;
|
|
||||||
|
|
||||||
namespace OpenRA.TilesetBuilder
|
namespace OpenRA.TilesetBuilder
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user