Fix misaligned shadows of transformed mons when B_ENEMY_MON_SHADOW_STYLE <= GEN_3 (#8887)

This commit is contained in:
Estellar 2026-01-13 11:08:38 -03:00 committed by GitHub
parent 50428e0cab
commit 016cbcd8a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1268,10 +1268,13 @@ void SpriteCB_EnemyShadow(struct Sprite *shadowSprite)
}
else if (transformSpecies != SPECIES_NONE)
{
xOffset = gSpeciesInfo[transformSpecies].enemyShadowXOffset + (shadowSprite->tSpriteSide == SPRITE_SIDE_LEFT ? -16 : 16);
xOffset = gSpeciesInfo[transformSpecies].enemyShadowXOffset;
yOffset = gSpeciesInfo[transformSpecies].enemyShadowYOffset + 16;
size = gSpeciesInfo[transformSpecies].enemyShadowSize;
if (B_ENEMY_MON_SHADOW_STYLE >= GEN_4)
xOffset += (shadowSprite->tSpriteSide == SPRITE_SIDE_LEFT ? -16 : 16);
invisible = (B_ENEMY_MON_SHADOW_STYLE >= GEN_4 && P_GBA_STYLE_SPECIES_GFX == FALSE)
? gSpeciesInfo[transformSpecies].suppressEnemyShadow
: gSpeciesInfo[transformSpecies].enemyMonElevation == 0;