🆙 Patch GlTextureSystem & Fix effects like BBRed

- Monkey-patch the renderer's GlTextureSystem to prevent crashes from destroyed textures
This commit is contained in:
DuckieTM
2026-02-07 19:08:39 +01:00
parent 9c43cb240e
commit 8f5a9f7188
7 changed files with 84 additions and 22 deletions
+6 -3
View File
@@ -291,8 +291,6 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
clear: true
});
container.destroy();
//@ts-ignore
this._activeTexture.source.hitMap = null;
@@ -585,7 +583,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
this._effectIdInUse = -1;
}
if(effectChanged) this._cache.disposeInactiveActions();
if(effectChanged) this._cache.disposeInactiveActions(0);
if(this._lastActionsString != this._currentActionsString)
{
@@ -653,6 +651,11 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
if(animation.hasDirectionData()) this._directionOffset = animation.directionData.offset;
if(animation.hasAvatarData()) this._avatarSpriteData = animation.avatarData;
if(!this._isAnimating && (animation.spriteData?.length > 0 || animation.hasAvatarData()))
{
this._isAnimating = true;
}
}
}
}