mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
Only keep holding hook, reset all other keys on /pause and chat
This commit is contained in:
parent
4429092ca5
commit
99a086200f
|
@ -24,7 +24,7 @@ CControls::CControls()
|
|||
void CControls::OnReset()
|
||||
{
|
||||
m_LastData.m_Direction = 0;
|
||||
m_LastData.m_Hook = 0;
|
||||
//m_LastData.m_Hook = 0;
|
||||
// simulate releasing the fire button
|
||||
if((m_LastData.m_Fire&1) != 0)
|
||||
m_LastData.m_Fire++;
|
||||
|
@ -137,7 +137,7 @@ int CControls::SnapInput(int *pData)
|
|||
// we freeze the input if chat or menu is activated
|
||||
if(!(m_InputData.m_PlayerFlags&PLAYERFLAG_PLAYING))
|
||||
{
|
||||
//OnReset();
|
||||
OnReset();
|
||||
|
||||
mem_copy(pData, &m_InputData, sizeof(m_InputData));
|
||||
|
||||
|
|
|
@ -625,13 +625,13 @@ void CCharacter::OnDirectInput(CNetObj_PlayerInput *pNewInput)
|
|||
|
||||
void CCharacter::ResetInput()
|
||||
{
|
||||
//m_Input.m_Direction = 0;
|
||||
m_Input.m_Direction = 0;
|
||||
//m_Input.m_Hook = 0;
|
||||
// simulate releasing the fire button
|
||||
//if((m_Input.m_Fire&1) != 0)
|
||||
// m_Input.m_Fire++;
|
||||
//m_Input.m_Fire &= INPUT_STATE_MASK;
|
||||
//m_Input.m_Jump = 0;
|
||||
if((m_Input.m_Fire&1) != 0)
|
||||
m_Input.m_Fire++;
|
||||
m_Input.m_Fire &= INPUT_STATE_MASK;
|
||||
m_Input.m_Jump = 0;
|
||||
m_LatestPrevInput = m_LatestInput = m_Input;
|
||||
}
|
||||
|
||||
|
@ -1017,8 +1017,7 @@ void CCharacter::Snap(int SnappingClient)
|
|||
pCharacter->m_Weapon = m_ActiveWeapon;
|
||||
pCharacter->m_AttackTick = m_AttackTick;
|
||||
|
||||
if (!m_Paused)
|
||||
pCharacter->m_Direction = m_Input.m_Direction;
|
||||
pCharacter->m_Direction = m_Input.m_Direction;
|
||||
|
||||
if(m_pPlayer->GetCID() == SnappingClient || SnappingClient == -1 ||
|
||||
(!g_Config.m_SvStrictSpectateMode && m_pPlayer->GetCID() == GameServer()->m_apPlayers[SnappingClient]->m_SpectatorID))
|
||||
|
|
Loading…
Reference in a new issue