Allow resource placement outside the map cordon.

This commit is contained in:
Paul Chote
2015-06-07 22:59:40 +01:00
parent 55cea73cf4
commit 6e09c62fdd
6 changed files with 52 additions and 29 deletions

View File

@@ -50,9 +50,14 @@ namespace OpenRA.Mods.Common.Traits
{
var sum = 0;
for (var u = -1; u < 2; u++)
{
for (var v = -1; v < 2; v++)
if (content[cell + new CVec(u, v)].Type == t)
{
var c = cell + new CVec(u, v);
if (content.Contains(c) && content[c].Type == t)
++sum;
}
}
return sum;
}