Fix gimmick icon not appearing correctly in 1v2 (#8474)

This commit is contained in:
FosterProgramming 2025-12-08 13:12:02 +01:00 committed by GitHub
parent aafa937b86
commit f71404bce1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -147,7 +147,7 @@ void CreateGimmickTriggerSprite(u32 battler)
if (gBattleStruct->gimmick.triggerSpriteId == 0xFF)
{
if (IsDoubleBattle())
if (GetBattlerCoordsIndex(battler) == BATTLE_COORDS_DOUBLES)
gBattleStruct->gimmick.triggerSpriteId = CreateSprite(gimmick->triggerTemplate,
gSprites[gHealthboxSpriteIds[battler]].x - DOUBLES_GIMMICK_TRIGGER_POS_X_SLIDE,
gSprites[gHealthboxSpriteIds[battler]].y - DOUBLES_GIMMICK_TRIGGER_POS_Y_DIFF, 0);
@ -204,7 +204,7 @@ static void SpriteCb_GimmickTrigger(struct Sprite *sprite)
s32 yDiff;
s32 xHealthbox = gSprites[gHealthboxSpriteIds[sprite->tBattler]].x;
if (IsDoubleBattle())
if (GetBattlerCoordsIndex(sprite->tBattler) == BATTLE_COORDS_DOUBLES)
{
xSlide = DOUBLES_GIMMICK_TRIGGER_POS_X_SLIDE;
xPriority = DOUBLES_GIMMICK_TRIGGER_POS_X_PRIORITY;