[Bug][Beta] Fix Pokemon info flyout being offset on switchout after double battle (#4260)

This commit is contained in:
innerthunder 2024-09-14 16:13:32 -07:00 committed by GitHub
parent aecdcd34f5
commit d8dbc471af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -592,8 +592,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
// Resetting properties should not be shown on the field // Resetting properties should not be shown on the field
this.setVisible(false); this.setVisible(false);
// Reset field position // Remove the offset from having a Substitute active
this.setFieldPosition(FieldPosition.CENTER);
if (this.isOffsetBySubstitute()) { if (this.isOffsetBySubstitute()) {
this.x -= this.getSubstituteOffset()[0]; this.x -= this.getSubstituteOffset()[0];
this.y -= this.getSubstituteOffset()[1]; this.y -= this.getSubstituteOffset()[1];