Validate order targets when resolving orders.

This commit is contained in:
RoosterDragon
2023-07-20 18:36:40 +01:00
committed by Gustas
parent c08ddb61b3
commit 2ac855488b
8 changed files with 27 additions and 0 deletions

View File

@@ -121,6 +121,9 @@ namespace OpenRA.Mods.Common.Traits
if (order.OrderString == "Move")
{
if (!order.Target.IsValidFor(self))
return;
var cell = self.World.Map.Clamp(self.World.Map.CellContaining(order.Target.CenterPosition));
if (!Info.MoveIntoShroud && !self.Owner.Shroud.IsExplored(cell))
return;