mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
skip player input if the chat is active to prevent abusing the linked emoticon. Closes #678
This commit is contained in:
parent
15e1d4f1d6
commit
8d5badc260
|
@ -160,12 +160,20 @@ void CPlayer::OnDisconnect(const char *pReason)
|
|||
|
||||
void CPlayer::OnPredictedInput(CNetObj_PlayerInput *NewInput)
|
||||
{
|
||||
// skip the input if chat is active
|
||||
if((m_PlayerFlags&PLAYERFLAG_CHATTING) && (NewInput->m_PlayerFlags&PLAYERFLAG_CHATTING))
|
||||
return;
|
||||
|
||||
if(m_pCharacter)
|
||||
m_pCharacter->OnPredictedInput(NewInput);
|
||||
}
|
||||
|
||||
void CPlayer::OnDirectInput(CNetObj_PlayerInput *NewInput)
|
||||
{
|
||||
// skip the input if chat is active
|
||||
if((m_PlayerFlags&PLAYERFLAG_CHATTING) && (NewInput->m_PlayerFlags&PLAYERFLAG_CHATTING))
|
||||
return;
|
||||
|
||||
m_PlayerFlags = NewInput->m_PlayerFlags;
|
||||
|
||||
if(m_pCharacter)
|
||||
|
|
Loading…
Reference in a new issue