forked from mirrors/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:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user