paradrop now asks its *cargo* whether a cell is suitable, rather than itself.

This commit is contained in:
Chris Forbes
2010-07-20 17:55:10 +12:00
parent 2684284c27
commit 1cbc3dd60f

View File

@@ -43,17 +43,17 @@ namespace OpenRA.Mods.RA
if ((self.Location - lz).LengthSquared <= r * r && !droppedAt.Contains(self.Location))
{
if (!IsSuitableCell(self, self.Location))
return;
// unload a dude here
droppedAt.Add(self.Location);
var cargo = self.traits.Get<Cargo>();
if (cargo.IsEmpty(self))
FinishedDropping(self);
else
{
if (!IsSuitableCell(cargo.Peek(self), self.Location))
return;
// unload a dude here
droppedAt.Add(self.Location);
var a = cargo.Unload(self);
var rs = a.traits.Get<RenderSimple>();