Merge branch 'romhack' into lighting
This commit is contained in:
commit
1834e487b9
1 changed files with 3 additions and 6 deletions
|
@ -4862,13 +4862,13 @@ bool8 MovementType_FollowPlayer_Shadow(struct ObjectEvent *objectEvent, struct S
|
||||||
objectEvent->triggerGroundEffectsOnMove = FALSE; // Stop endless reflection spawning
|
objectEvent->triggerGroundEffectsOnMove = FALSE; // Stop endless reflection spawning
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
sprite->data[1] = 1; // Enter idle state
|
sprite->data[1] = 1; // Enter active state; if the player moves the follower will appear
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 MovementType_FollowPlayer_Active(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
bool8 MovementType_FollowPlayer_Active(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (gObjectEvents[gPlayerAvatar.objectEventId].movementActionId == 0xFF || gPlayerAvatar.tileTransitionState == T_TILE_CENTER) { // do nothing if player is stationary
|
if (gPlayerAvatar.tileTransitionState == T_NOT_MOVING && !gObjectEvents[gPlayerAvatar.objectEventId].heldMovementActive ) { // do nothing if player is stationary
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else if (!IsFollowerVisible()) {
|
} else if (!IsFollowerVisible()) {
|
||||||
if (objectEvent->invisible) { // Return to shadowing state
|
if (objectEvent->invisible) { // Return to shadowing state
|
||||||
|
@ -4889,8 +4889,7 @@ bool8 MovementType_FollowPlayer_Active(struct ObjectEvent *objectEvent, struct S
|
||||||
|
|
||||||
bool8 MovementType_FollowPlayer_Moving(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
bool8 MovementType_FollowPlayer_Moving(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
// TODO: This check for 0xFF fixes a crash on Route 111, why?
|
if (ObjectEventExecSingleMovementAction(objectEvent, sprite))
|
||||||
if (objectEvent->movementActionId == 0xFF || ObjectEventExecSingleMovementAction(objectEvent, sprite))
|
|
||||||
{
|
{
|
||||||
objectEvent->singleMovementActive = 0;
|
objectEvent->singleMovementActive = 0;
|
||||||
if (sprite->data[1]) { // restore nonzero state
|
if (sprite->data[1]) { // restore nonzero state
|
||||||
|
@ -4921,8 +4920,6 @@ bool8 FollowablePlayerMovement_Step(struct ObjectEvent *objectEvent, struct Spri
|
||||||
s16 y;
|
s16 y;
|
||||||
s16 targetX;
|
s16 targetX;
|
||||||
s16 targetY;
|
s16 targetY;
|
||||||
u32 *debugPtr = (u32*) 0x0203d000;
|
|
||||||
*(debugPtr) = (u32) &sprite->data[0];
|
|
||||||
|
|
||||||
targetX = gObjectEvents[gPlayerAvatar.objectEventId].previousCoords.x;
|
targetX = gObjectEvents[gPlayerAvatar.objectEventId].previousCoords.x;
|
||||||
targetY = gObjectEvents[gPlayerAvatar.objectEventId].previousCoords.y;
|
targetY = gObjectEvents[gPlayerAvatar.objectEventId].previousCoords.y;
|
||||||
|
|
Loading…
Reference in a new issue