Fix substitute disappearing on hit (maybe?)

This commit is contained in:
innerthunder 2024-09-11 23:05:20 -07:00
parent 67249b75e2
commit bd9d5931e5

View File

@ -803,10 +803,10 @@ export abstract class BattleAnim {
targetSprite.pipelineData["tone"] = [ 0.0, 0.0, 0.0, 0.0 ];
targetSprite.setAngle(0);
if (!this.isHideUser() && userSprite) {
this.user?.getSprite().setVisible(true); // using this.user to fix context loss due to isOppAnim swap (#481)
userSprite.setVisible(true); // using this.user to fix context loss due to isOppAnim swap (#481)
}
if (!this.isHideTarget() && (targetSprite !== userSprite || !this.isHideUser())) {
this.target?.getSprite().setVisible(true); // using this.target to fix context loss due to isOppAnim swap (#481)
targetSprite.setVisible(true); // using this.target to fix context loss due to isOppAnim swap (#481)
}
for (const ms of Object.values(spriteCache).flat()) {
if (ms) {