skip player input if the chat is active to prevent abusing the linked emoticon. Closes #678

This commit is contained in:
oy 2011-05-05 02:13:32 +02:00
parent 15e1d4f1d6
commit 8d5badc260

View file

@ -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)