Reset the rallypoint when capturing that building or unit, since the rallypoint command is only meaningful to the player that issued it. Reviewed by fatherbushido.

This was SVN commit r18848.
This commit is contained in:
elexis 2016-10-21 11:34:20 +00:00
parent 7d3639a0f6
commit 20ea96e784

View File

@ -103,6 +103,16 @@ RallyPoint.prototype.OnGlobalEntityRenamed = function(msg)
}
};
RallyPoint.prototype.OnOwnershipChanged = function(msg)
{
// No need to reset when constructing or destructing the entity
// Don't reset upon defeat to improve performance
if (msg.from == -1 || msg.to < 1)
return;
this.Reset();
};
/**
* Returns true if the target exists and has non-zero hitpoints.
*/