mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-07 03:17:22 -04:00
Time Freezing Camera (#1787)
Thanks to @bkd89 for the idea! Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user