diff --git a/data/SplinterCellConviction.FusionMod/src/system/update/blacklist.ini b/data/SplinterCellConviction.FusionMod/src/system/update/blacklist.ini index c3823b299..c5dfe00d7 100644 --- a/data/SplinterCellConviction.FusionMod/src/system/update/blacklist.ini +++ b/data/SplinterCellConviction.FusionMod/src/system/update/blacklist.ini @@ -167,7 +167,7 @@ m_Action=(Event=StackedDrop,Action=eActionType_PressB,Filter=epfCritical) m_Action=(Name=GeoDropToLedgeState,StateCommand=SlideDrop,Action=eActionType_PressB,TargetType=TTYPE_Ledge ) m_Action=(Name=CoverNavStartState,StateCommand=InstantCheck,Action=eActionType_PressB, TargetType=TTYPE_None ) m_Action=(Name=CoverNavStartState,Action=eActionType_HoldB, TargetType=TTYPE_None ) -m_Action=(Name=SlideOnGroundState,Action=eActionType_HoldB, TargetType=TTYPE_None ) +m_Action=(Name=SlideOnGroundState,Action=eActionType_PressB, TargetType=TTYPE_None ) m_Action=(Name=RollState,Action=eActionType_HoldB,TargetType=TTYPE_None) // [EchelonPlayer.SPNormalAction] -RightAnalog- @@ -177,7 +177,7 @@ m_Action=(Name=WeaponUtilityState,StateCommand=DrawReload,Action=eActionType_Pre // [EchelonPlayer.SPNormalAction] -LeftAnalog- m_Action=(Event=ToggleCrouch,Action=eActionType_PressLeftAnalog,Filter=epfCritical) m_Action=(Name=GeoDropToLedgeState,StateCommand=SlideDrop,Action=eActionType_PressB,TargetType=TTYPE_Ledge ) -m_Action=(Name=SlideOnGroundState,StateCommand=Crouch,Action=eActionType_HoldB, TargetType=TTYPE_None ) +m_Action=(Name=SlideOnGroundState,StateCommand=Crouch,Action=eActionType_PressLeftAnalog, TargetType=TTYPE_None ) // [EchelonPlayer.SPNormalAction] -LeftTrigger- m_Action=(Event=TogglePrecisionModeOn,Action=eActionType_PressLeftTrigger,Filter=epfCritical, TargetType=TTYPE_None ) @@ -1488,7 +1488,7 @@ m_Action=(Name=WeaponUtilityState,StateCommand=DrawReload,Action=eActionType_Pre // [EchelonPlayer.SPCosteNormalAction] -LeftAnalog- m_Action=(Event=ToggleCrouch,Action=eActionType_PressLeftAnalog,Filter=epfCritical) -m_Action=(Name=SlideOnGroundState,StateCommand=Crouch,Action=eActionType_HoldB, TargetType=TTYPE_None ) +m_Action=(Name=SlideOnGroundState,StateCommand=Crouch,Action=eActionType_PressLeftAnalog, TargetType=TTYPE_None ) // [EchelonPlayer.SPCosteNormalAction] -RightShoulder- @@ -1498,7 +1498,7 @@ m_Action=(Event=DetectB2W,Action=eActionType_HoldB,Filter=epfCritical) m_Action=(Event=StopDetectB2W,Action=eActionType_ReleaseB,Filter=epfCritical) m_Action=(Name=CoverNavStartState,StateCommand=InstantCheck,Action=eActionType_PressB, TargetType=TTYPE_None ) m_Action=(Name=CoverNavStartState,Action=eActionType_HoldB, TargetType=TTYPE_None ) -m_Action=(Name=SlideOnGroundState,Action=eActionType_HoldB, TargetType=TTYPE_None ) +m_Action=(Name=SlideOnGroundState,Action=eActionType_PressB, TargetType=TTYPE_None ) m_Action=(Name=RollState,Action=eActionType_HoldB,TargetType=TTYPE_None) // [EchelonPlayer.SPCosteNormalAction] -Visual Interaction- diff --git a/external/hooking b/external/hooking index 62d4ff80e..961c83cc2 160000 --- a/external/hooking +++ b/external/hooking @@ -1 +1 @@ -Subproject commit 62d4ff80e4a9c587f75bc6eaf6325e2b140bde28 +Subproject commit 961c83cc26c49ba4d0d2c73b17cd85b2421caed2 diff --git a/source/SplinterCellConviction.FusionMod/dllmain.cpp b/source/SplinterCellConviction.FusionMod/dllmain.cpp index 47c8b2756..39119dd7b 100644 --- a/source/SplinterCellConviction.FusionMod/dllmain.cpp +++ b/source/SplinterCellConviction.FusionMod/dllmain.cpp @@ -735,47 +735,20 @@ void Init() { if (regs.eax == DetectB2W || regs.eax == StopDetectB2W) { - static bool toggleState = false; // Toggle state for entering/exiting cover - static bool buttonWasPressed = false; // Tracks if the button was previously pressed auto bInCover = bCoverStateStarted; - // Check if the button is currently pressed - bool buttonIsPressed = (regs.eax == DetectB2W); - - // Toggle the state only on the transition from not pressed to pressed - if (buttonIsPressed && !buttonWasPressed) + if (regs.eax == DetectB2W) { - toggleState = !toggleState; - - // Apply the toggle state to enter or exit cover - if (toggleState) + if (bInCover) { - // Enter cover if not already in cover - if (!bInCover) - { - lastDetectTime = std::chrono::steady_clock::now(); - *(uint32_t*)(regs.esi + 0xA44) |= 0x100; - } + *(uint32_t*)(regs.esi + 0xA44) &= ~0x100; } else { - // Exit cover if currently in cover - if (bInCover) - { - *(uint32_t*)(regs.esi + 0xA44) &= ~0x100; - } + lastDetectTime = std::chrono::steady_clock::now(); + *(uint32_t*)(regs.esi + 0xA44) |= 0x100; } } - else if (!buttonIsPressed) - { - // If the button is released, ensure the player does not get stuck in a seeking cover state - //if (!bCoverStateStarted) - // *(uint32_t*)(regs.esi + 0xA44) &= ~0x100; - } - - // Update the buttonWasPressed state for the next frame - buttonWasPressed = buttonIsPressed; - //bCoverStateStarted = false; } else *(uintptr_t*)(regs.esp - 4) = loc_56DBB3;