Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions Client/mods/deathmatch/logic/CClientPed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3178,23 +3178,29 @@ void CClientPed::ApplyControllerStateFixes(CControllerState& Current)
Current.ButtonSquare = 0;
Current.ButtonCross = 0;
}
// Disable the fire keys whilst crouching as well
Current.ButtonCircle = 0;
Current.LeftShoulder1 = 0;
// Disable the fire keys whilst crouching as well unless crouchbug or fastfire glitch is enabled
if (!g_pClientGame->IsGlitchEnabled(CClientGame::GLITCH_CROUCHBUG) && !g_pClientGame->IsGlitchEnabled(CClientGame::GLITCH_FASTFIRE))
{
Current.ButtonCircle = 0;
Current.LeftShoulder1 = 0;
}
if (m_ulLastTimeBeganCrouch >= ulNow - 400.0f * fSpeedRatio)
{
// Disable double crouching (another anim cut)
if (g_pClientGame->IsUsingAlternatePulseOrder())
Current.ShockButtonL = 255; // Do this differently if we have changed the pulse order
else
Current.ShockButtonL = 0;
// Disable double crouching (another anim cut) unless glitch is enabled
if (!g_pClientGame->IsGlitchEnabled(CClientGame::GLITCH_CROUCHBUG) && !g_pClientGame->IsGlitchEnabled(CClientGame::GLITCH_FASTFIRE))
{
if (g_pClientGame->IsUsingAlternatePulseOrder())
Current.ShockButtonL = 255; // Do this differently if we have changed the pulse order
else
Current.ShockButtonL = 0;
}
}
}
}
// If we just started aiming, make sure they dont try and crouch
// If we just started aiming, make sure they dont try and crouch unless crouchbug or fastfire is enabled
else if ((m_ulLastTimeBeganAiming != 0 && m_ulLastTimeBeganAiming >= ulNow - 300.0f * fSpeedRatio) || (ulNow - m_ulLastTimeFired) <= 300.0f * fSpeedRatio)
{
if (!g_pClientGame->IsGlitchEnabled(CClientGame::GLITCH_FASTFIRE))
if (!g_pClientGame->IsGlitchEnabled(CClientGame::GLITCH_CROUCHBUG) && !g_pClientGame->IsGlitchEnabled(CClientGame::GLITCH_FASTFIRE))
{
Current.ShockButtonL = 0;
}
Expand Down
Loading