Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Fogging.js
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | Fogging.prototype.LoadMirage = function(player) | ||||
Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface).AddMiragedEntity(player, this.entity, this.mirages[player]); | Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface).AddMiragedEntity(player, this.entity, this.mirages[player]); | ||||
// Notify the range manager the visibility of this entity must be updated. | // Notify the range manager the visibility of this entity must be updated. | ||||
Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager).RequestVisibilityUpdate(this.entity); | Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager).RequestVisibilityUpdate(this.entity); | ||||
}; | }; | ||||
Fogging.prototype.ForceMiraging = function(player) | Fogging.prototype.ForceMiraging = function(player) | ||||
{ | { | ||||
if (!this.activated) | if (!this.activated) | ||||
return; | this.activated = true; | ||||
this.seen[player] = true; | this.seen[player] = true; | ||||
wraitii: Based on how I read the code, it seems to me the bug is that the player isn't marked as having… | |||||
this.LoadMirage(player); | this.LoadMirage(player); | ||||
}; | }; | ||||
Fogging.prototype.IsMiraged = function(player) | Fogging.prototype.IsMiraged = function(player) | ||||
{ | { | ||||
if (player < 0 || player >= this.mirages.length) | if (player < 0 || player >= this.mirages.length) | ||||
return false; | return false; | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Based on how I read the code, it seems to me the bug is that the player isn't marked as having seen the entity, so the mirage isn't created in Activate later.
I think you fix the issue if you just move this.seen above the if and not change the if.