diff --git a/include/dusk/settings.h b/include/dusk/settings.h index 62fa02dbcc..2bdfe02bb1 100644 --- a/include/dusk/settings.h +++ b/include/dusk/settings.h @@ -104,6 +104,7 @@ struct CollisionViewSettings { struct TransientSettings { CollisionViewSettings collisionView; bool skipFrameRateLimit; + bool moveLinkActive; }; TransientSettings& getTransientSettings(); diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index e754d7522f..b218a8f1ee 100644 --- a/src/d/actor/d_a_alink.cpp +++ b/src/d/actor/d_a_alink.cpp @@ -51,6 +51,7 @@ #include "d/actor/d_a_ni.h" #include "d/d_s_play.h" +#include "dusk/settings.h" #include "res/Object/Alink.h" #include @@ -18048,7 +18049,10 @@ int daAlink_c::execute() { } BOOL isTrigDebugMoveInput = FALSE; - #if DEBUG +#if TARGET_PC + if (dusk::getTransientSettings().moveLinkActive && daPy_getPlayerActorClass() == this) { + isTrigDebugMoveInput = TRUE; +#elif DEBUG if (daPy_getPlayerActorClass() == this && checkDebugMoveInput()) { isTrigDebugMoveInput = TRUE; if (l_debugMode) { @@ -18059,6 +18063,8 @@ int daAlink_c::execute() { } if (l_debugMode) { +#endif +#if TARGET_PC || DEBUG if (checkModeFlg(0x400) && !checkBoardRide() && !checkSpinnerRide()) { if (checkCanoeRide()) { setSyncCanoePos(); @@ -18067,17 +18073,28 @@ int daAlink_c::execute() { } } else { f32 moveSpeed; +#if TARGET_PC + if (mDoCPd_c::getHoldZ(PAD_1)) { +#else if (mDoCPd_c::getHoldLockR(PAD_1)) { +#endif moveSpeed = 100.0f; } else { moveSpeed = 50.0f; } +#if TARGET_PC + f32 cStickY = mDoCPd_c::getSubStickY(PAD_1); + if (cStickY > 0.3f || cStickY < -0.3f) { + current.pos.y += moveSpeed * cStickY; + } +#else if (mDoCPd_c::getHoldY(PAD_1)) { current.pos.y += moveSpeed; } else if (mDoCPd_c::getHoldX(PAD_1)) { current.pos.y -= moveSpeed; } +#endif current.pos.x += moveSpeed * mStickValue * cM_ssin(mMoveAngle); current.pos.z += moveSpeed * mStickValue * cM_scos(mMoveAngle); @@ -18095,7 +18112,7 @@ int daAlink_c::execute() { setBodyPartPos(); setAttentionPos(); } else - #endif +#endif { if (isTrigDebugMoveInput) { mItemButton = 0; @@ -18563,9 +18580,11 @@ int daAlink_c::execute() { if (checkDeadHP()) { eventInfo.offCondition(fopAcCnd_NOEXEC_e); } else - #if DEBUG +#if TARGET_PC + if (!dusk::getTransientSettings().moveLinkActive) +#elif DEBUG if (!l_debugMode) - #endif +#endif { if (!checkMagneBootsOn()) { f32 gnd_nrm_y; diff --git a/src/dusk/imgui/ImGuiConsole.cpp b/src/dusk/imgui/ImGuiConsole.cpp index 6e917761f6..1bff5da458 100644 --- a/src/dusk/imgui/ImGuiConsole.cpp +++ b/src/dusk/imgui/ImGuiConsole.cpp @@ -13,6 +13,8 @@ #include "JSystem/JUtility/JUTGamePad.h" #include "SDL3/SDL_mouse.h" +#include "m_Do/m_Do_controller_pad.h" +#include "m_Do/m_Do_main.h" #include "dusk/config.hpp" #include "dusk/main.h" #include "dusk/settings.h" @@ -202,6 +204,13 @@ namespace dusk { void ImGuiConsole::UpdateSettings() { getTransientSettings().skipFrameRateLimit = getSettings().game.enableTurboKeybind && ImGui::IsKeyDown(ImGuiKey_Tab); + + if (mDoMain::developmentMode == 1 && mDoCPd_c::getHoldL(PAD_1) && mDoCPd_c::getHoldR(PAD_1) && mDoCPd_c::getTrigY(PAD_1)) { + getTransientSettings().moveLinkActive = !getTransientSettings().moveLinkActive; + } + if (mDoMain::developmentMode != 1) { + getTransientSettings().moveLinkActive = false; + } } void ImGuiConsole::PreDraw() {