Fix crash in FindAndDeliverResources.GetSearchFromLocation.

This commit is contained in:
tovl
2019-04-05 20:43:03 +02:00
committed by reaperrr
parent 14a4c47758
commit 2a942bd04a

View File

@@ -223,10 +223,10 @@ namespace OpenRA.Mods.Common.Activities
CPos GetSearchFromLocation(Actor self)
{
if (harv.LastLinkedProc != null)
if (harv.LastLinkedProc != null && !harv.LastLinkedProc.IsDead && harv.LastLinkedProc.IsInWorld)
return harv.LastLinkedProc.Location + harv.LastLinkedProc.Trait<IAcceptResources>().DeliveryOffset;
if (harv.LinkedProc != null)
if (harv.LinkedProc != null && !harv.LinkedProc.IsDead && harv.LinkedProc.IsInWorld)
return harv.LinkedProc.Location + harv.LinkedProc.Trait<IAcceptResources>().DeliveryOffset;
return self.Location;