Fix build restrictions for neutral players.

This was SVN commit r13158.
This commit is contained in:
leper 2013-02-10 20:13:37 +00:00
parent 06a3bf9e99
commit ab4db58e82

View File

@ -110,7 +110,8 @@ BuildRestrictions.prototype.CheckPlacement = function()
var isOwn = (tileOwner == cmpPlayer.GetPlayerID());
var isNeutral = (tileOwner == 0);
var isAlly = !isOwn && cmpPlayer.IsAlly(tileOwner);
var isEnemy = !isNeutral && cmpPlayer.IsEnemy(tileOwner);
// We count neutral players as enemies, so you can't build in their territory.
var isEnemy = !isNeutral && (cmpPlayer.IsEnemy(tileOwner) || cmpPlayer.IsNeutral(tileOwner));
if ((isAlly && !this.HasTerritory("ally"))
|| (isOwn && !this.HasTerritory("own"))