diff --git a/imgui.ini b/imgui.ini index f48e8afa..0037d574 100644 --- a/imgui.ini +++ b/imgui.ini @@ -88,6 +88,11 @@ Pos=10,30 Size=275,400 Collapsed=0 +[Window][Camera Stats] +Pos=10,609 +Size=115,114 +Collapsed=0 + [Table][0xD0F0C6E3,2] Column 0 Weight=1.0000 Column 1 Weight=1.0000 diff --git a/src/game/camera.c b/src/game/camera.c index c290eaaf..9414d470 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -2931,6 +2931,15 @@ void set_camera_mode(struct Camera *c, s16 mode, s16 frames) { * Updates Lakitu's position/focus and applies camera shakes. */ void update_lakitu(struct Camera *c) { + if (camera_frozen) { + vec3f_copy(gLakituState.pos, c->pos); + vec3f_copy(gLakituState.focus, c->focus); + vec3f_copy(gLakituState.goalPos, c->pos); + vec3f_copy(gLakituState.goalFocus, c->focus); + c->yaw = calculate_yaw(c->focus, c->pos); + gLakituState.yaw = c->yaw; + return; + } struct Surface *floor = NULL; Vec3f newPos; Vec3f newFoc; @@ -3393,15 +3402,15 @@ void update_camera(struct Camera *c) { if (camera_frozen) { if (should_update_cam_from_keyframes) { should_update_cam_from_keyframes = false; - vec3f_copy(gLakituState.pos, freezecamPos); - vec3f_set_dist_and_angle(gLakituState.pos, gLakituState.focus, 100, freezecamPitch, freezecamYaw); + vec3f_copy(c->pos, freezecamPos); + vec3f_set_dist_and_angle(c->pos, c->focus, 100, freezecamYaw, freezecamPitch); } else { float dist; s16 yaw; s16 pitch; - vec3f_copy(freezecamPos, gLakituState.pos); - vec3f_get_dist_and_angle(gLakituState.pos, gLakituState.focus, &dist, &pitch, &yaw); + vec3f_copy(freezecamPos, c->pos); + vec3f_get_dist_and_angle(c->pos, c->focus, &dist, &yaw, &pitch); freezecamYaw = yaw; freezecamPitch = pitch; }