diff --git a/code/player_names.js b/code/player_names.js index d2acee5a..86062520 100644 --- a/code/player_names.js +++ b/code/player_names.js @@ -40,8 +40,10 @@ window.playerNameToGuid = function(playerName) { if (cachedGuid !== undefined) return cachedGuid; // IITC needs our own player GUID, from a lookup by name. so we retrieve this from localstorage (if available) - cachedGuid = localStorage['PLAYER-'+PLAYER.nickname]; - if (cachedGuid !== undefined) return cachedGuid; + if (playerName == PLAYER.nickname) { + cachedGuid = localStorage['PLAYER-'+PLAYER.nickname]; + if (cachedGuid !== undefined) return cachedGuid; + } var guid = null; $.each(Object.keys(sessionStorage), function(ind,key) {