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 cmpHealth = Engine.QueryInterface(this.entity, IID_Health); | var cmpHealth = Engine.QueryInterface(this.entity, IID_Health); | ||||
if (cmpHealth) | if (cmpHealth) | ||||
cmpMirage.CopyHealth(cmpHealth); | cmpMirage.CopyHealth(cmpHealth); | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator