Intermediate crushable-behavior checkin; Muliple units per cell in UIM; Crushable TraitInterface; Crushable units are taken into account in pathfinding; Crashes when trying to crush a unit

This commit is contained in:
Paul Chote
2009-12-22 22:37:11 -08:00
parent 980ce2df56
commit 4667679f12
13 changed files with 146 additions and 43 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using OpenRa.Game.Graphics;
namespace OpenRa.Game.Traits
@@ -35,7 +36,7 @@ namespace OpenRa.Game.Traits
if (doneBuilding) roof.Tick();
var b = self.Bounds;
if (isOpen && null == Game.UnitInfluence.GetUnitAt(((1/24f) * self.CenterLocation).ToInt2()))
if (isOpen && !Game.UnitInfluence.GetUnitsAt(((1/24f) * self.CenterLocation).ToInt2()).Any())
{
isOpen = false;
roof.PlayBackwardsThen(prefix + "build-top", () => roof.Play(prefix + "idle-top"));