From 1cbc3dd60ff69c982c937da153f712723033d620 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 20 Jul 2010 17:55:10 +1200 Subject: [PATCH] paradrop now asks its *cargo* whether a cell is suitable, rather than itself. --- OpenRA.Mods.RA/ParaDrop.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenRA.Mods.RA/ParaDrop.cs b/OpenRA.Mods.RA/ParaDrop.cs index 7ecab7be09..22034d3316 100644 --- a/OpenRA.Mods.RA/ParaDrop.cs +++ b/OpenRA.Mods.RA/ParaDrop.cs @@ -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(); 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();