Ticket #3149: ticket3149_observer_undefined_mirage.patch
File ticket3149_observer_undefined_mirage.patch, 1.2 KB (added by , 9 years ago) |
---|
-
binaries/data/mods/public/simulation/components/Fogging.js
154 154 155 155 Fogging.prototype.IsMiraged = function(player) 156 156 { 157 if (player >= this.mirages.length)157 if (player < 0 || player >= this.mirages.length) 158 158 return false; 159 159 160 160 return this.miraged[player]; … … 162 162 163 163 Fogging.prototype.GetMirage = function(player) 164 164 { 165 if (player >= this.mirages.length)165 if (player < 0 || player >= this.mirages.length) 166 166 return INVALID_ENTITY; 167 167 168 168 return this.mirages[player]; … … 170 170 171 171 Fogging.prototype.WasSeen = function(player) 172 172 { 173 if (player >= this.seen.length)173 if (player < 0 || player >= this.seen.length) 174 174 return false; 175 175 176 176 return this.seen[player]; … … 202 202 203 203 Fogging.prototype.OnVisibilityChanged = function(msg) 204 204 { 205 if (msg.player >= this.mirages.length)205 if (msg.player < 0 || msg.player >= this.mirages.length) 206 206 return; 207 207 208 208 if (msg.newVisibility == VIS_VISIBLE)