Make LastSearchFailed local to FindAndDeliverResources.

This commit is contained in:
Paul Chote
2019-08-24 22:38:12 +00:00
committed by reaperrr
parent 1d2b3ac917
commit 815ea1e13b
3 changed files with 13 additions and 11 deletions

View File

@@ -111,8 +111,10 @@ namespace OpenRA.Mods.Common.Traits
{
if (!h.Key.IsIdle)
{
var act = h.Key.CurrentActivity;
if (!h.Value.Harvester.LastSearchFailed || act.NextActivity == null || !(act.NextActivity is FindAndDeliverResources))
var act = h.Key.CurrentActivity as FindAndDeliverResources;
// Ignore this actor if FindAndDeliverResources is working fine or it is performing a different activity
if (act == null || !act.LastSearchFailed)
continue;
}