Move up harv.IsEmpty check in HackyAI
This is a fairly cheap check, so we should perform it before the activity checks
This commit is contained in:
@@ -820,6 +820,9 @@ namespace OpenRA.Mods.Common.AI
|
||||
if (harv == null)
|
||||
continue;
|
||||
|
||||
if (!harv.IsEmpty)
|
||||
continue;
|
||||
|
||||
if (!harvester.IsIdle)
|
||||
{
|
||||
var act = harvester.CurrentActivity;
|
||||
@@ -827,9 +830,6 @@ namespace OpenRA.Mods.Common.AI
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!harv.IsEmpty)
|
||||
continue;
|
||||
|
||||
// Tell the idle harvester to quit slacking:
|
||||
var newSafeResourcePatch = FindNextResource(harvester, harv);
|
||||
BotDebug("AI: Harvester {0} is idle. Ordering to {1} in search for new resources.".F(harvester, newSafeResourcePatch));
|
||||
|
||||
Reference in New Issue
Block a user