forked from 0ad/0ad
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:
parent
7d3639a0f6
commit
20ea96e784
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user