Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Fogging.js
Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | Fogging.prototype.LoadMirage = function(player) | ||||
if (!cmpParentVisualActor || !cmpMirageVisualActor) | if (!cmpParentVisualActor || !cmpMirageVisualActor) | ||||
{ | { | ||||
error("Failed to copy the visual data of the fogged entity " + this.entity); | error("Failed to copy the visual data of the fogged entity " + this.entity); | ||||
return; | return; | ||||
} | } | ||||
cmpMirageVisualActor.SetActorSeed(cmpParentVisualActor.GetActorSeed()); | cmpMirageVisualActor.SetActorSeed(cmpParentVisualActor.GetActorSeed()); | ||||
// Store valuable information into the mirage component (especially for the GUI) | // Store valuable information into the mirage component (especially for the GUI) | ||||
var cmpIdentity = Engine.QueryInterface(this.entity, IID_Identity); | |||||
if (cmpIdentity) | |||||
cmpMirage.CopyIdentity(cmpIdentity); | |||||
var cmpFoundation = Engine.QueryInterface(this.entity, IID_Foundation); | var cmpFoundation = Engine.QueryInterface(this.entity, IID_Foundation); | ||||
if (cmpFoundation) | if (cmpFoundation) | ||||
cmpMirage.CopyFoundation(cmpFoundation); | cmpMirage.CopyFoundation(cmpFoundation); | ||||
var cmpRepairable = Engine.QueryInterface(this.entity, IID_Repairable); | var cmpRepairable = Engine.QueryInterface(this.entity, IID_Repairable); | ||||
if (cmpRepairable && !cmpFoundation) | if (cmpRepairable && !cmpFoundation) | ||||
cmpMirage.CopyRepairable(cmpRepairable); | cmpMirage.CopyRepairable(cmpRepairable); | ||||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator