diff --git a/src/game/camera.c b/src/game/camera.c index 89c82e535..95bf0e4eb 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -908,20 +908,21 @@ void pan_ahead_of_player(struct Camera *c) { } s16 find_in_bounds_yaw_wdw_bob_thi(UNUSED Vec3f pos, UNUSED Vec3f origin, s16 yaw) { - // switch (gCurrLevelArea) { - // case AREA_WDW_MAIN: - // yaw = clamp_positions_and_find_yaw(pos, origin, 4508.f, -3739.f, 4508.f, -3739.f); - // break; - // case AREA_BOB: - // yaw = clamp_positions_and_find_yaw(pos, origin, 8000.f, -8000.f, 7050.f, -8000.f); - // break; - // case AREA_THI_HUGE: - // yaw = clamp_positions_and_find_yaw(pos, origin, 8192.f, -8192.f, 8192.f, -8192.f); - // break; - // case AREA_THI_TINY: - // yaw = clamp_positions_and_find_yaw(pos, origin, 2458.f, -2458.f, 2458.f, -2458.f); - // break; - // } + if (!gCameraUseCourseSpecificSettings) { return yaw; } + switch (gCurrLevelArea) { + case AREA_WDW_MAIN: + yaw = clamp_positions_and_find_yaw(pos, origin, 4508.f, -3739.f, 4508.f, -3739.f); + break; + case AREA_BOB: + yaw = clamp_positions_and_find_yaw(pos, origin, 8000.f, -8000.f, 7050.f, -8000.f); + break; + case AREA_THI_HUGE: + yaw = clamp_positions_and_find_yaw(pos, origin, 8192.f, -8192.f, 8192.f, -8192.f); + break; + case AREA_THI_TINY: + yaw = clamp_positions_and_find_yaw(pos, origin, 2458.f, -2458.f, 2458.f, -2458.f); + break; + } return yaw; } @@ -1926,14 +1927,18 @@ s32 update_behind_mario_camera(struct Camera *c, Vec3f focus, Vec3f pos) { dist = 300.f; } vec3f_set_dist_and_angle(focus, pos, dist, pitch, yaw); - if (gCurrLevelArea == AREA_WDW_MAIN) { - yaw = clamp_positions_and_find_yaw(pos, focus, 4508.f, -3739.f, 4508.f, -3739.f); - } - if (gCurrLevelArea == AREA_THI_HUGE) { - yaw = clamp_positions_and_find_yaw(pos, focus, 8192.f, -8192.f, 8192.f, -8192.f); - } - if (gCurrLevelArea == AREA_THI_TINY) { - yaw = clamp_positions_and_find_yaw(pos, focus, 2458.f, -2458.f, 2458.f, -2458.f); + + if (!gCameraUseCourseSpecificSettings) { return yaw; } + switch (gCurrLevelArea) { + case AREA_WDW_MAIN: + yaw = clamp_positions_and_find_yaw(pos, focus, 4508.f, -3739.f, 4508.f, -3739.f); + break; + case AREA_THI_HUGE: + yaw = clamp_positions_and_find_yaw(pos, focus, 8192.f, -8192.f, 8192.f, -8192.f); + break; + case AREA_THI_TINY: + yaw = clamp_positions_and_find_yaw(pos, focus, 2458.f, -2458.f, 2458.f, -2458.f); + break; } return yaw; @@ -2425,7 +2430,7 @@ s16 update_default_camera(struct Camera *c) { c->pos[1] = ceilHeight; } } - if (gCurrLevelArea == AREA_WDW_TOWN) { + if (gCameraUseCourseSpecificSettings && gCurrLevelArea == AREA_WDW_TOWN) { yaw = clamp_positions_and_find_yaw(c->pos, c->focus, 2254.f, -3789.f, 3790.f, -2253.f); } return yaw;