mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #1949
1949: Add cl_dummy_resetonswitch 2 r=Learath2 a=d3fault Idea by @ChillerDragon : Only resets the active tee. So if you hold right and switch your dummy keeps walking. But if you switch back you don't have to press right twice to walk again. Fix #1854 Co-authored-by: d3fault <d3fault@d3fault.net>
This commit is contained in:
commit
dc6a2959be
|
@ -390,8 +390,9 @@ void CGameClient::OnDummySwap()
|
||||||
{
|
{
|
||||||
if(g_Config.m_ClDummyResetOnSwitch)
|
if(g_Config.m_ClDummyResetOnSwitch)
|
||||||
{
|
{
|
||||||
m_pControls->ResetInput(!g_Config.m_ClDummy);
|
int PlayerOrDummy = (g_Config.m_ClDummyResetOnSwitch == 2) ? g_Config.m_ClDummy : (!g_Config.m_ClDummy);
|
||||||
m_pControls->m_InputData[!g_Config.m_ClDummy].m_Hook = 0;
|
m_pControls->ResetInput(PlayerOrDummy);
|
||||||
|
m_pControls->m_InputData[PlayerOrDummy].m_Hook = 0;
|
||||||
}
|
}
|
||||||
int tmp = m_DummyInput.m_Fire;
|
int tmp = m_DummyInput.m_Fire;
|
||||||
m_DummyInput = m_pControls->m_InputData[!g_Config.m_ClDummy];
|
m_DummyInput = m_pControls->m_InputData[!g_Config.m_ClDummy];
|
||||||
|
|
|
@ -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_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(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(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(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")
|
MACRO_CONFIG_INT(ClDummyCopyMoves, cl_dummy_copy_moves, 0, 0, 1, CFGFLAG_CLIENT, "Whether dummy should copy your moves")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue