Make the AI only consider harvesters 'idle' if last resource search failed
Otherwise the AI would consider the harvester 'idle' in too many situations. This way, the AI now only uses its own resource search algorithm if the next resource patch is too far away for the FindResources activity to find it.
This commit is contained in:
@@ -826,7 +826,7 @@ namespace OpenRA.Mods.Common.AI
|
||||
if (!harvester.IsIdle)
|
||||
{
|
||||
var act = harvester.CurrentActivity;
|
||||
if (act.NextActivity == null || act.NextActivity.GetType() != typeof(FindResources))
|
||||
if (!harv.LastSearchFailed || act.NextActivity == null || act.NextActivity.GetType() != typeof(FindResources))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user