diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 6c4002eb2..6aab55a78 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -390,8 +390,9 @@ void CGameClient::OnDummySwap() { if(g_Config.m_ClDummyResetOnSwitch) { - m_pControls->ResetInput(!g_Config.m_ClDummy); - m_pControls->m_InputData[!g_Config.m_ClDummy].m_Hook = 0; + int PlayerOrDummy = (g_Config.m_ClDummyResetOnSwitch == 2) ? g_Config.m_ClDummy : (!g_Config.m_ClDummy); + m_pControls->ResetInput(PlayerOrDummy); + m_pControls->m_InputData[PlayerOrDummy].m_Hook = 0; } int tmp = m_DummyInput.m_Fire; m_DummyInput = m_pControls->m_InputData[!g_Config.m_ClDummy]; diff --git a/src/game/variables.h b/src/game/variables.h index 095f582d5..8911e83be 100644 --- a/src/game/variables.h +++ b/src/game/variables.h @@ -114,7 +114,7 @@ MACRO_CONFIG_COL(ClDummyColorFeet, dummy_color_feet, 65408, CFGFLAG_CLIENT|CFGFL MACRO_CONFIG_STR(ClDummySkin, dummy_skin, 24, "default", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Dummy skin") MACRO_CONFIG_INT(ClDummy, cl_dummy, 0, 0, 1, CFGFLAG_CLIENT, "0 - player / 1 - dummy") MACRO_CONFIG_INT(ClDummyHammer, cl_dummy_hammer, 0, 0, 1, CFGFLAG_CLIENT, "Whether dummy is hammering for a hammerfly") -MACRO_CONFIG_INT(ClDummyResetOnSwitch, cl_dummy_resetonswitch, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Whether dummy should stop pressing keys when you switch") +MACRO_CONFIG_INT(ClDummyResetOnSwitch, cl_dummy_resetonswitch, 0, 0, 2, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Whether dummy or player should stop pressing keys when you switch. 0 = off, 1 = dummy, 2 = player") MACRO_CONFIG_INT(ClDummyRestoreWeapon, cl_dummy_restore_weapon, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Whether dummy should switch to last weapon after hammerfly") MACRO_CONFIG_INT(ClDummyCopyMoves, cl_dummy_copy_moves, 0, 0, 1, CFGFLAG_CLIENT, "Whether dummy should copy your moves")