a bit more
This commit is contained in:
@@ -174,6 +174,7 @@ namespace OpenRA.Traits
|
|||||||
if (MovementCostForCell(self, cell) == float.PositiveInfinity)
|
if (MovementCostForCell(self, cell) == float.PositiveInfinity)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
// Check for buildings
|
// Check for buildings
|
||||||
var building = bim.GetBuildingBlocking(cell);
|
var building = bim.GetBuildingBlocking(cell);
|
||||||
if (building != null && building != ignoreActor)
|
if (building != null && building != ignoreActor)
|
||||||
@@ -211,7 +212,7 @@ namespace OpenRA.Traits
|
|||||||
if (Info.Crushes == null && nonshareable.Count() > 0)
|
if (Info.Crushes == null && nonshareable.Count() > 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (nonshareable.Any(a => !(a.traits.Contains<ICrushable>() &&
|
if (nonshareable.Length > 0 && nonshareable.Any(a => !(a.traits.Contains<ICrushable>() &&
|
||||||
a.traits.WithInterface<ICrushable>().Any(b => b.CrushClasses.Intersect(Info.Crushes).Any()))))
|
a.traits.WithInterface<ICrushable>().Any(b => b.CrushClasses.Intersect(Info.Crushes).Any()))))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -219,8 +220,6 @@ namespace OpenRA.Traits
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static readonly Actor[] Nothing = { };
|
|
||||||
|
|
||||||
public virtual void FinishedMoving(Actor self)
|
public virtual void FinishedMoving(Actor self)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user