mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Corrected uses of GetBattlerSide
This commit is contained in:
parent
0a34d47041
commit
6c457f42af
@ -203,7 +203,7 @@ static void AnimMegahornHorn(struct Sprite *sprite)
|
||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||
}
|
||||
else if (!GetBattlerSide(gBattleAnimTarget))
|
||||
else if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
|
||||
{
|
||||
StartSpriteAffineAnim(sprite, 1);
|
||||
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
||||
@ -230,7 +230,7 @@ static void AnimLeechLifeNeedle(struct Sprite *sprite)
|
||||
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||
StartSpriteAffineAnim(sprite, 2);
|
||||
}
|
||||
else if (!GetBattlerSide(gBattleAnimTarget))
|
||||
else if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
|
||||
{
|
||||
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
||||
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||
@ -301,7 +301,7 @@ static void AnimStringWrap(struct Sprite *sprite)
|
||||
sprite->x += gBattleAnimArgs[0];
|
||||
|
||||
sprite->y += gBattleAnimArgs[1];
|
||||
if (!GetBattlerSide(gBattleAnimTarget))
|
||||
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
|
||||
sprite->y += 8;
|
||||
|
||||
sprite->callback = AnimStringWrap_Step;
|
||||
|
@ -926,7 +926,7 @@ static void CreateEruptionLaunchRocks(u8 spriteId, u8 taskId, u8 activeSpritesId
|
||||
u16 y = GetEruptionLaunchRockInitialYPos(spriteId);
|
||||
u16 x = gSprites[spriteId].x;
|
||||
|
||||
if(!GetBattlerSide(gBattleAnimAttacker))
|
||||
if(GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER)
|
||||
{
|
||||
x -= 12;
|
||||
sign = 1;
|
||||
|
@ -910,8 +910,8 @@ static void AnimWhirlwindLine(struct Sprite * sprite)
|
||||
else
|
||||
InitSpritePosToAnimTarget(sprite, FALSE);
|
||||
|
||||
if ((gBattleAnimArgs[2] == ANIM_ATTACKER && !GetBattlerSide(gBattleAnimAttacker))
|
||||
|| (gBattleAnimArgs[2] == ANIM_TARGET && !GetBattlerSide(gBattleAnimTarget)))
|
||||
if ((gBattleAnimArgs[2] == ANIM_ATTACKER && GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER)
|
||||
|| (gBattleAnimArgs[2] == ANIM_TARGET && GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER))
|
||||
{
|
||||
sprite->x += 8;
|
||||
}
|
||||
|
@ -885,11 +885,11 @@ void AnimTask_RotateMonSpriteToSide(u8 taskId)
|
||||
{
|
||||
if (gBattleAnimArgs[2] == ANIM_ATTACKER)
|
||||
{
|
||||
gTasks[taskId].data[7] = !GetBattlerSide(gBattleAnimAttacker);
|
||||
gTasks[taskId].data[7] = GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER;
|
||||
}
|
||||
else
|
||||
{
|
||||
gTasks[taskId].data[7] = !GetBattlerSide(gBattleAnimTarget);
|
||||
gTasks[taskId].data[7] = GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER;
|
||||
}
|
||||
}
|
||||
if (gTasks[taskId].data[7])
|
||||
|
@ -2519,7 +2519,7 @@ void AnimWeatherBallUp(struct Sprite *sprite)
|
||||
{
|
||||
sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2);
|
||||
sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET);
|
||||
if (!GetBattlerSide(gBattleAnimAttacker))
|
||||
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER)
|
||||
sprite->data[0] = 5;
|
||||
else
|
||||
sprite->data[0] = -10;
|
||||
@ -2545,7 +2545,7 @@ void AnimWeatherBallDown(struct Sprite *sprite)
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
sprite->data[2] = sprite->x + gBattleAnimArgs[4];
|
||||
sprite->data[4] = sprite->y + gBattleAnimArgs[5];
|
||||
if (!GetBattlerSide(gBattleAnimTarget))
|
||||
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
|
||||
{
|
||||
x = (u16)gBattleAnimArgs[4] + 30;
|
||||
sprite->x += x;
|
||||
|
Loading…
Reference in New Issue
Block a user