Harvesters no longer block each other during low-ore contention and wait for a random amount of time while idle to search for more resources.

This commit is contained in:
James Dunne
2012-06-24 17:01:21 -05:00
parent 80123b6aa4
commit 845379e577
4 changed files with 44 additions and 6 deletions

View File

@@ -178,6 +178,11 @@ namespace OpenRA.Mods.RA.Move
var nudge = blocker.TraitOrDefault<INudge>();
if (nudge != null)
nudge.OnNudge(blocker, self, false);
// Notify the blocker that he's blocking our move:
INotifyBlockingMove moveBlocked;
if ((moveBlocked = blocker.TraitOrDefault<INotifyBlockingMove>()) != null)
moveBlocked.OnNotifyBlockingMove(blocker, self, nextCell);
}
Pair<CPos, SubCell>? PopPath(Actor self, Mobile mobile)