Added Gates

FIXUP: account for full gate footprint when updating neighbours.

FIXUP: gate-wall connection adjacency yaml.
This commit is contained in:
teees
2015-11-16 14:33:05 +01:00
parent 3d597c7880
commit 65e1e301f4
12 changed files with 464 additions and 4 deletions

View File

@@ -220,12 +220,14 @@ namespace OpenRA.Mods.Common.Activities
var nextCell = path[path.Count - 1];
var containsTemporaryBlocker = WorldUtils.ContainsTemporaryBlocker(self.World, nextCell, self);
// Next cell in the move is blocked by another actor
if (!mobile.CanMoveFreelyInto(nextCell, ignoredActor, true))
if (containsTemporaryBlocker || !mobile.CanMoveFreelyInto(nextCell, ignoredActor, true))
{
// Are we close enough?
var cellRange = nearEnough.Length / 1024;
if ((mobile.ToCell - destination.Value).LengthSquared <= cellRange * cellRange)
if (!containsTemporaryBlocker && (mobile.ToCell - destination.Value).LengthSquared <= cellRange * cellRange)
{
path.Clear();
return null;