Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/Mirage.js
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
// ============================ | // ============================ | ||||
// Parent entity data | // Parent entity data | ||||
Mirage.prototype.CopyIdentity = function(cmpIdentity) | Mirage.prototype.CopyIdentity = function(cmpIdentity) | ||||
{ | { | ||||
this.miragedIids.add(IID_Identity); | this.miragedIids.add(IID_Identity); | ||||
this.classesList = cmpIdentity.GetClassesList(); | // In almost all cases we want to ignore mirage entities when querying Identity components of owned entities. | ||||
// To avoid adding a test everywhere, we don't transfer the classeslist in the template but here. | |||||
// We clone this since the classes list is not synchronized and since the mirage should be a snapshot of the entity at the given time. | |||||
this.classesList = clone(cmpIdentity.GetClassesList()); | |||||
}; | }; | ||||
Mirage.prototype.GetClassesList = function() { return this.classesList }; | Mirage.prototype.GetClassesList = function() { return this.classesList }; | ||||
// Foundation data | // Foundation data | ||||
Mirage.prototype.CopyFoundation = function(cmpFoundation) | Mirage.prototype.CopyFoundation = function(cmpFoundation) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 142 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator