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