Changeset View
Changeset View
Standalone View
Standalone View
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) | ||||
Stan: What would be the proper fix? | |||||
Done Inline ActionsI need to add a "RefreshActorName" function or something. Will do it, but didn't bother yesterday evening. wraitii: I need to add a "RefreshActorName" function or something. Will do it, but didn't bother… | |||||
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); | ||||
Not Done Inline Actionsdo we need to invalidate both? Below only check for one or the other. Stan: do we need to invalidate both? Below only check for one or the other. | |||||
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 104 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
What would be the proper fix?