🆙 Fix latency problems with walking / avatars

This commit is contained in:
duckietm
2026-03-25 09:46:54 +01:00
parent d33cca4d5e
commit 5e136bb6b6
+7
View File
@@ -9,6 +9,7 @@ export class AssetManager implements IAssetManager
{
private _textures: Map<string, Texture> = new Map();
private _collections: Map<string, IGraphicAssetCollection> = new Map();
private _missingAssetNames: Set<string> = new Set();
public getTexture(name: string): Texture
{
@@ -30,6 +31,8 @@ export class AssetManager implements IAssetManager
{
if(!name) return null;
if(this._missingAssetNames.has(name)) return null;
for(const collection of this._collections.values())
{
if(!collection) continue;
@@ -41,6 +44,8 @@ export class AssetManager implements IAssetManager
return existing;
}
this._missingAssetNames.add(name);
return null;
}
@@ -70,6 +75,8 @@ export class AssetManager implements IAssetManager
this._collections.set(collection.name, collection);
if(this._missingAssetNames.size > 0) this._missingAssetNames.clear();
return collection;
}