Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/Fogging.js
Show First 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | Fogging.prototype.LoadMirage = function(player) | ||||
// Copy cmpVisualActor data | // Copy cmpVisualActor data | ||||
var cmpParentVisualActor = Engine.QueryInterface(this.entity, IID_Visual); | var cmpParentVisualActor = Engine.QueryInterface(this.entity, IID_Visual); | ||||
var cmpMirageVisualActor = Engine.QueryInterface(this.mirages[player], IID_Visual); | var cmpMirageVisualActor = Engine.QueryInterface(this.mirages[player], IID_Visual); | ||||
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.RecomputeActorName(); | |||||
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); | var cmpIdentity = Engine.QueryInterface(this.entity, IID_Identity); | ||||
if (cmpIdentity) | if (cmpIdentity) | ||||
cmpMirage.CopyIdentity(cmpIdentity); | cmpMirage.CopyIdentity(cmpIdentity); | ||||
var cmpFoundation = Engine.QueryInterface(this.entity, IID_Foundation); | var cmpFoundation = Engine.QueryInterface(this.entity, IID_Foundation); | ||||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator