Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/RallyPoint.js
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | for (var data of this.data) | ||||
if (data.source && data.source == msg.entity) | if (data.source && data.source == msg.entity) | ||||
data.source = msg.newentity; | data.source = msg.newentity; | ||||
} | } | ||||
}; | }; | ||||
RallyPoint.prototype.OnOwnershipChanged = function(msg) | RallyPoint.prototype.OnOwnershipChanged = function(msg) | ||||
{ | { | ||||
// No need to reset when constructing or destructing the entity | // 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) | ||||
if (msg.from == -1 || msg.to < 1) | |||||
return; | return; | ||||
this.Reset(); | this.Reset(); | ||||
}; | }; | ||||
/** | /** | ||||
* Returns true if the target exists and has non-zero hitpoints. | * Returns true if the target exists and has non-zero hitpoints. | ||||
*/ | */ | ||||
Show All 11 Lines |
Wildfire Games · Phabricator