Merge branch 'main' of https://github.com/HarbourMasters/Starship
Some checks failed
GenerateBuilds / generate-port-o2r (push) Has been cancelled
GenerateBuilds / build-windows (push) Has been cancelled
GenerateBuilds / build-macos (push) Has been cancelled
GenerateBuilds / build-linux (push) Has been cancelled

This commit is contained in:
Sonic Dreamcaster 2025-02-18 20:12:19 -03:00
commit 2b2e10a7c4
3 changed files with 21 additions and 4 deletions

View File

@ -60,7 +60,7 @@ if (NOT LINUXDEPLOY_EXECUTABLE)
message(STATUS "Downloading linuxdeploy") message(STATUS "Downloading linuxdeploy")
set(LINUXDEPLOY_EXECUTABLE ${CPACK_PACKAGE_DIRECTORY}/linuxdeploy/linuxdeploy) set(LINUXDEPLOY_EXECUTABLE ${CPACK_PACKAGE_DIRECTORY}/linuxdeploy/linuxdeploy)
file(DOWNLOAD file(DOWNLOAD
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-x86_64.AppImage
${LINUXDEPLOY_EXECUTABLE} ${LINUXDEPLOY_EXECUTABLE}
INACTIVITY_TIMEOUT 10 INACTIVITY_TIMEOUT 10
LOG ${CPACK_PACKAGE_DIRECTORY}/linuxdeploy/download.log LOG ${CPACK_PACKAGE_DIRECTORY}/linuxdeploy/download.log
@ -87,4 +87,4 @@ execute_process(
endif() endif()
include(CPack) include(CPack)

View File

@ -165,7 +165,21 @@ void OnGameUpdatePost(IEvent* event) {
} }
void OnPlayUpdateEvent(IEvent* event){ void OnPlayUpdateEvent(IEvent* event){
bool debugPaused = CVarGetInteger("gDebugPause", 0);
bool shouldRepause = false;
if (CVarGetInteger("gLToDebugPause", 0)){
if (gControllerPress[0].button & L_TRIG) {
CVarSetInteger("gDebugPause", !debugPaused);
shouldRepause = debugPaused && CVarGetInteger("gLToFrameAdvance", 0);
}
} else {
CVarSetInteger("gDebugPause", 0); //Unpause if we disable the shortcut
}
event->cancelled = CVarGetInteger("gDebugPause", 0); event->cancelled = CVarGetInteger("gDebugPause", 0);
if (shouldRepause){
CVarSetInteger("gDebugPause", 1);
}
} }
void RefillBoostMeter(Player* player) { void RefillBoostMeter(Player* player) {

View File

@ -718,8 +718,11 @@ void DrawDebugMenu() {
.tooltip = "Jump to credits at the main menu" .tooltip = "Jump to credits at the main menu"
}); });
if (gGameState == GSTATE_PLAY){ UIWidgets::CVarCheckbox("Press L to toggle Debug Pause", "gLToDebugPause");
UIWidgets::CVarCheckbox("Debug Pause", "gDebugPause"); if (CVarGetInteger("gLToDebugPause", 0)){
ImGui::Dummy(ImVec2(22.0f, 0.0f));
ImGui::SameLine();
UIWidgets::CVarCheckbox("Pressing L again advances one frame instead", "gLToFrameAdvance");
} }
if (CVarGetInteger(StringHelper::Sprintf("gCheckpoint.%d.Set", gCurrentLevel).c_str(), 0)) { if (CVarGetInteger(StringHelper::Sprintf("gCheckpoint.%d.Set", gCurrentLevel).c_str(), 0)) {