SpineFile now uses a ! character to split the keys, instead of an underscore, preventing the plugin from incorrectly working out the keys for filenames with underscores in them. Fix #5336

This commit is contained in:
Richard Davey 2020-10-05 14:15:15 +01:00
parent 8091f09c10
commit 725e8bcbd6

View file

@ -84,7 +84,7 @@ var SpineFile = new Class({
for (i = 0; i < atlasURL.length; i++)
{
atlas = new TextFile(loader, {
key: key + '_' + i,
key: key + '!' + i,
url: atlasURL[i],
extension: GetFastValue(config, 'atlasExtension', 'atlas'),
xhrSettings: GetFastValue(config, 'atlasXhrSettings')
@ -106,7 +106,7 @@ var SpineFile = new Class({
for (i = 0; i < atlasURL.length; i++)
{
atlas = new TextFile(loader, key + '_' + i, atlasURL[i], atlasXhrSettings);
atlas = new TextFile(loader, key + '!' + i, atlasURL[i], atlasXhrSettings);
atlas.cache = cache;
files.push(atlas);
@ -222,7 +222,7 @@ var SpineFile = new Class({
if (file.type === 'text')
{
atlasKey = file.key.replace(/_[\d]$/, '');
atlasKey = file.key.replace(/![\d]$/, '');
atlasCache = file.cache;
@ -231,7 +231,7 @@ var SpineFile = new Class({
else
{
var src = file.key.trim();
var pos = src.indexOf('_');
var pos = src.indexOf('!');
var key = src.substr(pos + 1);
if (!textureManager.exists(key))