Fix harvesters harvesting resources from underground.

This commit is contained in:
Paul Chote
2017-04-20 19:57:26 +01:00
parent b97162d9f1
commit c5547ec20b

View File

@@ -125,6 +125,10 @@ namespace OpenRA.Mods.Common
public static bool CanHarvestAt(this Actor self, CPos pos, ResourceLayer resLayer, HarvesterInfo harvInfo,
ResourceClaimLayer territory)
{
// Resources only exist in the ground layer
if (pos.Layer != 0)
return false;
var resType = resLayer.GetResource(pos);
if (resType == null)
return false;