diff --git a/src/event_object_lock.c b/src/event_object_lock.c index dec2d79062..a7ae3a357f 100644 --- a/src/event_object_lock.c +++ b/src/event_object_lock.c @@ -147,6 +147,7 @@ static void Task_FreezeObjectAndPlayer(u8 taskId) void FreezeForApproachingTrainers(void) { u8 trainerObjectId1, trainerObjectId2, taskId; + struct ObjectEvent *followerObj = GetFollowerObject(); trainerObjectId1 = GetChosenApproachingTrainerObjectEventId(0); if (gNoOfApproachingTrainers == 2) @@ -184,6 +185,8 @@ void FreezeForApproachingTrainers(void) gTasks[taskId].tObjectFrozen = TRUE; } } + if (followerObj) // Unfreeze follower so it can move behind player + UnfreezeObjectEvent(followerObj); } bool8 IsFreezeObjectAndPlayerFinished(void) diff --git a/src/trainer_see.c b/src/trainer_see.c index b87e4dcb57..082b92f2cc 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -462,22 +462,11 @@ static bool8 TrainerSeeIdle(u8 taskId, struct Task *task, struct ObjectEvent *tr static bool8 TrainerExclamationMark(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj) { u8 direction; - struct ObjectEvent *followerObj = GetFollowerObject(); ObjectEventGetLocalIdAndMap(trainerObj, &gFieldEffectArguments[0], &gFieldEffectArguments[1], &gFieldEffectArguments[2]); FieldEffectStart(FLDEFF_EXCLAMATION_MARK_ICON); direction = GetFaceDirectionMovementAction(trainerObj->facingDirection); ObjectEventSetHeldMovement(trainerObj, direction); - if (followerObj) { - struct ObjectEvent *playerObj = &gObjectEvents[gPlayerAvatar.objectEventId]; - s16 x = playerObj->currentCoords.x; - s16 y = playerObj->currentCoords.y; - // Move back player's location by facing direction - MoveCoords(GetOppositeDirection(playerObj->facingDirection), &x, &y); - direction = GetDirectionToFace(followerObj->previousCoords.x, followerObj->previousCoords.y, x, y); - followerObj->singleMovementActive = FALSE; - ObjectEventSetHeldMovement(followerObj, GetWalkNormalMovementAction(direction)); - } task->tFuncId++; return TRUE; }