mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 08:16:04 +00:00
[P3] Fix persisting sleep animation when sprite is already loaded (#4562)
Ensure that a Pokémon's animation speed is reset properly after saving and quitting. Previously, if a Pokémon was put to sleep, which slows its framerate, saving and quitting would result in the slower framerate persisting even though the Pokémon was no longer asleep. This fix adds an else condition to reset the frameRate to 12 if the sprite is already loaded upon resuming the game. Fixes #4465
This commit is contained in:
parent
af51c1f2f0
commit
9c56c15a6c
@ -484,6 +484,8 @@ export abstract class PokemonSpeciesForm {
|
||||
frameRate: 12,
|
||||
repeat: -1
|
||||
});
|
||||
} else {
|
||||
scene.anims.get(spriteKey).frameRate = 12;
|
||||
}
|
||||
let spritePath = this.getSpriteAtlasPath(female, formIndex, shiny, variant).replace("variant/", "").replace(/_[1-3]$/, "");
|
||||
const useExpSprite = scene.experimentalSprites && scene.hasExpSprite(spriteKey);
|
||||
|
Loading…
Reference in New Issue
Block a user