Remove current targets when changing ownership. Fixes #1794.

This was SVN commit r13014.
This commit is contained in:
leper 2012-12-23 20:03:00 +00:00
parent 61734c48d4
commit 18b532a195

View File

@ -30,6 +30,9 @@ BuildingAI.prototype.Init = function()
BuildingAI.prototype.OnOwnershipChanged = function(msg)
{
// Remove current targets, to prevent them from being added twice
this.targetUnits = [];
if (msg.to != -1)
this.SetupRangeQuery(msg.to);