From b6acb56def35cbe31b1440c1bdab435aad27fc7b Mon Sep 17 00:00:00 2001 From: MelonSpeedruns Date: Sun, 24 May 2026 13:46:59 -0400 Subject: [PATCH] Time Freezing Camera Thanks to @bkd89 for the idea! --- src/dusk/imgui/ImGuiCameraOverlay.cpp | 4 ++-- src/f_op/f_op_camera.cpp | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/dusk/imgui/ImGuiCameraOverlay.cpp b/src/dusk/imgui/ImGuiCameraOverlay.cpp index 0d2168924c..8963b88ede 100644 --- a/src/dusk/imgui/ImGuiCameraOverlay.cpp +++ b/src/dusk/imgui/ImGuiCameraOverlay.cpp @@ -75,12 +75,12 @@ namespace dusk { if (!getSettings().game.debugFlyCam) { ImGui::BeginDisabled(); } - config::ImGuiCheckbox("Lock Events", getSettings().game.debugFlyCamLockEvents); + config::ImGuiCheckbox("Freeze Time", getSettings().game.debugFlyCamLockEvents); if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled)) { if (!getSettings().game.debugFlyCam) { ImGui::SetTooltip("Enable Fly Mode first."); } else { - ImGui::SetTooltip("Freeze game events while flying."); + ImGui::SetTooltip("Freezes the game while flying."); } } if (!getSettings().game.debugFlyCam) { diff --git a/src/f_op/f_op_camera.cpp b/src/f_op/f_op_camera.cpp index 48045aeae7..567f80904f 100644 --- a/src/f_op/f_op_camera.cpp +++ b/src/f_op/f_op_camera.cpp @@ -36,9 +36,20 @@ static int fopCam_Execute(camera_class* i_this) { fapGm_HIO_c::startCpuTimer(); #endif + #if TARGET_PC + if (dusk::getSettings().game.debugFlyCam && dusk::getSettings().game.debugFlyCamLockEvents) { + dScnPly_c::setPauseTimer(1); + ret = fpcMtd_Execute((process_method_class*)i_this->submethod, i_this); + } else { + if (!dComIfGp_isPauseFlag() && !dScnPly_c::isPause()) { + ret = fpcMtd_Execute((process_method_class*)i_this->submethod, i_this); + } + } + #else if (!dComIfGp_isPauseFlag() && !dScnPly_c::isPause()) { ret = fpcMtd_Execute((process_method_class*)i_this->submethod, i_this); } + #endif #if DEBUG fapGm_HIO_c::stopCpuTimer("カメラ(計算処理)"); // Camera (computational processing)