Skip to content

Commit 4319c06

Browse files
KoloInDaCribAbnormalPoof
authored andcommitted
copy maps instead of assigning
1 parent a702040 commit 4319c06

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/funkin/FunkinMemory.hx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class FunkinMemory
170170
graphic.persist = true;
171171
permanentCachedTextures.set(key, graphic);
172172
forceRender(graphic);
173-
currentCachedTextures = permanentCachedTextures;
173+
currentCachedTextures = permanentCachedTextures.copy();
174174
}
175175

176176
/**
@@ -211,7 +211,7 @@ class FunkinMemory
211211
*/
212212
public inline static function preparePurgeTextureCache():Void
213213
{
214-
previousCachedTextures = currentCachedTextures;
214+
previousCachedTextures = currentCachedTextures.copy();
215215

216216
for (graphicKey in previousCachedTextures.keys())
217217
{
@@ -221,7 +221,7 @@ class FunkinMemory
221221
}
222222
}
223223

224-
currentCachedTextures = permanentCachedTextures;
224+
currentCachedTextures = permanentCachedTextures.copy();
225225
}
226226

227227
/**
@@ -358,7 +358,7 @@ class FunkinMemory
358358

359359
public static function preparePurgeSoundCache():Void
360360
{
361-
previousCachedSounds = currentCachedSounds;
361+
previousCachedSounds = currentCachedSounds.copy();
362362

363363
for (key in previousCachedSounds.keys())
364364
{
@@ -368,7 +368,7 @@ class FunkinMemory
368368
}
369369
}
370370

371-
currentCachedSounds = permanentCachedSounds;
371+
currentCachedSounds = permanentCachedSounds.copy();
372372
}
373373

374374
/**

0 commit comments

Comments
 (0)