mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-27 17:05:22 -04:00
[Bug][Hotfix] Fix Transformed Sprites not loading properly (#5808)
* Fix ditto sprite not loading properly * Remove review comment
This commit is contained in:
parent
6c6821b47d
commit
d790b30a30
2 changed files with 11 additions and 8 deletions
|
@ -909,19 +909,22 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
const originalWarn = console.warn;
|
||||
// Ignore warnings for missing frames, because there will be a lot
|
||||
console.warn = () => {};
|
||||
const battleFrameNames = globalScene.anims.generateFrameNames(this.getBattleSpriteKey(), {
|
||||
const battleSpriteKey = this.getBattleSpriteKey(this.isPlayer(), ignoreOverride);
|
||||
const battleFrameNames = globalScene.anims.generateFrameNames(battleSpriteKey, {
|
||||
zeroPad: 4,
|
||||
suffix: ".png",
|
||||
start: 1,
|
||||
end: 400,
|
||||
});
|
||||
console.warn = originalWarn;
|
||||
globalScene.anims.create({
|
||||
key: this.getBattleSpriteKey(),
|
||||
frames: battleFrameNames,
|
||||
frameRate: 10,
|
||||
repeat: -1,
|
||||
});
|
||||
if (!globalScene.anims.exists(battleSpriteKey)) {
|
||||
globalScene.anims.create({
|
||||
key: battleSpriteKey,
|
||||
frames: battleFrameNames,
|
||||
frameRate: 10,
|
||||
repeat: -1,
|
||||
});
|
||||
}
|
||||
}
|
||||
// With everything loaded, now begin playing the animation.
|
||||
this.playAnim();
|
||||
|
|
|
@ -1110,7 +1110,7 @@ export class GameData {
|
|||
for (const p of sessionData.party) {
|
||||
const pokemon = p.toPokemon() as PlayerPokemon;
|
||||
pokemon.setVisible(false);
|
||||
loadPokemonAssets.push(pokemon.loadAssets());
|
||||
loadPokemonAssets.push(pokemon.loadAssets(false));
|
||||
party.push(pokemon);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue