fail to deliver ore to a proc which has just died.

This commit is contained in:
Chris Forbes
2010-08-26 20:30:44 +12:00
parent 6234f53e2c
commit 58ebd68478

View File

@@ -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<IAcceptOre>().GiveOre(contents.Sum(kv => kv.Key.ValuePerUnit * kv.Value));
contents.Clear();
}