Skip to content

Commit 725e8bc

Browse files
committed
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 phaserjs#5336
1 parent 8091f09 commit 725e8bc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

plugins/spine/src/SpineFile.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ var SpineFile = new Class({
8484
for (i = 0; i < atlasURL.length; i++)
8585
{
8686
atlas = new TextFile(loader, {
87-
key: key + '_' + i,
87+
key: key + '!' + i,
8888
url: atlasURL[i],
8989
extension: GetFastValue(config, 'atlasExtension', 'atlas'),
9090
xhrSettings: GetFastValue(config, 'atlasXhrSettings')
@@ -106,7 +106,7 @@ var SpineFile = new Class({
106106

107107
for (i = 0; i < atlasURL.length; i++)
108108
{
109-
atlas = new TextFile(loader, key + '_' + i, atlasURL[i], atlasXhrSettings);
109+
atlas = new TextFile(loader, key + '!' + i, atlasURL[i], atlasXhrSettings);
110110
atlas.cache = cache;
111111

112112
files.push(atlas);
@@ -222,7 +222,7 @@ var SpineFile = new Class({
222222

223223
if (file.type === 'text')
224224
{
225-
atlasKey = file.key.replace(/_[\d]$/, '');
225+
atlasKey = file.key.replace(/![\d]$/, '');
226226

227227
atlasCache = file.cache;
228228

@@ -231,7 +231,7 @@ var SpineFile = new Class({
231231
else
232232
{
233233
var src = file.key.trim();
234-
var pos = src.indexOf('_');
234+
var pos = src.indexOf('!');
235235
var key = src.substr(pos + 1);
236236

237237
if (!textureManager.exists(key))

0 commit comments

Comments
 (0)