1
0
forked from 0ad/0ad

Gates now handle allies made using diplomacy.

This was SVN commit r13363.
This commit is contained in:
leper 2013-04-18 18:18:34 +00:00
parent 18a2b7d093
commit cd6a76bcaa

View File

@ -30,6 +30,16 @@ Gate.prototype.OnOwnershipChanged = function(msg)
}
};
Gate.prototype.OnDiplomacyChanged = function(msg)
{
var cmpOwnership = Engine.QueryInterface(this.entity, IID_Ownership);
if (cmpOwnership && cmpOwnership.GetOwner() == msg.player)
{
this.allies = [];
this.SetupRangeQuery(msg.player);
}
};
/**
* Cleanup on destroy
*/