diff options
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/webAO/client.js b/webAO/client.js index 8a5ddfb..f417c5b 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -1414,7 +1414,7 @@ window.changeCharacter = changeCharacter; * Triggered when there was an error loading a character sprite. * @param {HTMLImageElement} image the element containing the missing image */ -export function imgError(image) { +export function charError(image) { image.onerror = ""; image.src = "misc/placeholder.gif"; return true; @@ -1422,6 +1422,17 @@ export function imgError(image) { window.imgError = imgError; /** + * Triggered when there was an error loading a generic sprite. + * @param {HTMLImageElement} image the element containing the missing image + */ +export function imgError(image) { + image.onerror = ""; + image.src = ""; //unload so the old sprite doesn't persist + return true; +} +window.imgError = imgError; + +/** * Triggered when there was an error loading a character icon. * @param {HTMLImageElement} image the element containing the missing image */ |
