From 58ebd684783db36a0f9f469da6588c0643955514 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 26 Aug 2010 20:30:44 +1200 Subject: [PATCH] fail to deliver ore to a proc which has just died. --- OpenRA.Mods.RA/Harvester.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Harvester.cs b/OpenRA.Mods.RA/Harvester.cs index 8f69105829..a1dfb5cbaf 100644 --- a/OpenRA.Mods.RA/Harvester.cs +++ b/OpenRA.Mods.RA/Harvester.cs @@ -85,7 +85,10 @@ namespace OpenRA.Mods.RA } public void Deliver(Actor self, Actor proc) - { + { + if (!proc.IsInWorld) + return; // fail to deliver if there is no proc. + proc.Trait().GiveOre(contents.Sum(kv => kv.Key.ValuePerUnit * kv.Value)); contents.Clear(); }