mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-21 15:52:18 +02:00
Fix substitute disappearing on hit (maybe?)
This commit is contained in:
parent
67249b75e2
commit
bd9d5931e5
@ -803,10 +803,10 @@ export abstract class BattleAnim {
|
|||||||
targetSprite.pipelineData["tone"] = [ 0.0, 0.0, 0.0, 0.0 ];
|
targetSprite.pipelineData["tone"] = [ 0.0, 0.0, 0.0, 0.0 ];
|
||||||
targetSprite.setAngle(0);
|
targetSprite.setAngle(0);
|
||||||
if (!this.isHideUser() && userSprite) {
|
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())) {
|
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()) {
|
for (const ms of Object.values(spriteCache).flat()) {
|
||||||
if (ms) {
|
if (ms) {
|
||||||
|
Loading…
Reference in New Issue
Block a user