fix pos2 to x2,y2
This commit is contained in:
parent
7322166f8b
commit
bed5472014
@ -1308,15 +1308,15 @@ static bool8 WaitStairExitMovementFinished(s16 *a0, s16 *a1, s16 *a2, s16 *a3, s
|
||||
{
|
||||
*a2 += *a0;
|
||||
*a3 += *a1;
|
||||
sprite->pos2.x = *a2 >> 5;
|
||||
sprite->pos2.y = *a3 >> 5;
|
||||
sprite->x2 = *a2 >> 5;
|
||||
sprite->y2 = *a3 >> 5;
|
||||
(*a4)--;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->pos2.x = 0;
|
||||
sprite->pos2.y = 0;
|
||||
sprite->x2 = 0;
|
||||
sprite->y2 = 0;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -1341,8 +1341,8 @@ static void ExitStairsMovement(s16 *a0, s16 *a1, s16 *a2, s16 *a3, s16 *a4)
|
||||
*a3 = *a1 * 16;
|
||||
*a4 = 16;
|
||||
sprite = &gSprites[gPlayerAvatar.spriteId];
|
||||
sprite->pos2.x = *a2 >> 5;
|
||||
sprite->pos2.y = *a3 >> 5;
|
||||
sprite->x2 = *a2 >> 5;
|
||||
sprite->y2 = *a3 >> 5;
|
||||
*a0 *= -1;
|
||||
*a1 *= -1;
|
||||
}
|
||||
@ -1410,8 +1410,8 @@ static void UpdateStairsMovement(s16 a0, s16 a1, s16 *a2, s16 *a3, s16 *a4)
|
||||
|
||||
*a2 += a0;
|
||||
(*a4)++;
|
||||
playerSpr->pos2.x = *a2 >> 5;
|
||||
playerSpr->pos2.y = *a3 >> 5;
|
||||
playerSpr->x2 = *a2 >> 5;
|
||||
playerSpr->y2 = *a3 >> 5;
|
||||
if (playerObj->heldMovementFinished)
|
||||
ObjectEventForceSetHeldMovement(playerObj, GetWalkInPlaceNormalMovementAction(GetPlayerFacingDirection()));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user