Fix for potential infinite loop freeze
This commit is contained in:
@@ -134,6 +134,9 @@ namespace OpenRA.Mods.Common.Activities
|
||||
/// </summary>
|
||||
CPos? ClosestHarvestablePos(Actor self)
|
||||
{
|
||||
if (IsHarvestable(self, self.Location))
|
||||
return self.Location;
|
||||
|
||||
// Determine where to search from and how far to search:
|
||||
var searchFromLoc = harv.LastOrderLocation ?? (harv.LastLinkedProc ?? harv.LinkedProc ?? self).Location;
|
||||
var searchRadius = harv.LastOrderLocation.HasValue ? harvInfo.SearchFromOrderRadius : harvInfo.SearchFromProcRadius;
|
||||
|
||||
Reference in New Issue
Block a user