3034: Render afk emote instead of chat emote r=def- a=ardadem

Sometimes ppl become afk while they are chatting, which is cause fail especially on t0 maps.

Co-authored-by: Arda Demir <ddmirarda@gmail.com>
This commit is contained in:
bors[bot] 2020-10-07 20:54:38 +00:00 committed by GitHub
commit ea056260f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -564,7 +564,7 @@ void CPlayers::RenderPlayer(
RenderTools()->RenderTee(&State, &RenderInfo, Player.m_Emote, Direction, Position);
int QuadOffsetToEmoticon = NUM_WEAPONS * 2 + 2 + 2;
if(Player.m_PlayerFlags & PLAYERFLAG_CHATTING)
if((Player.m_PlayerFlags & PLAYERFLAG_CHATTING) && !m_pClient->m_aClients[ClientID].m_Afk)
{
Graphics()->TextureSet(g_pData->m_aImages[IMAGE_EMOTICONS].m_Id);
int QuadOffset = QuadOffsetToEmoticon + (SPRITE_DOTDOT - SPRITE_OOP);
@ -578,7 +578,7 @@ void CPlayers::RenderPlayer(
if(ClientID < 0)
return;
if(g_Config.m_ClAfkEmote && m_pClient->m_aClients[ClientID].m_Afk && !(Player.m_PlayerFlags & PLAYERFLAG_CHATTING) && !(Client()->DummyConnected() && ClientID == m_pClient->m_LocalIDs[!g_Config.m_ClDummy]))
if(g_Config.m_ClAfkEmote && m_pClient->m_aClients[ClientID].m_Afk && !(Client()->DummyConnected() && ClientID == m_pClient->m_LocalIDs[!g_Config.m_ClDummy]))
{
Graphics()->TextureSet(g_pData->m_aImages[IMAGE_EMOTICONS].m_Id);
int QuadOffset = QuadOffsetToEmoticon + (SPRITE_ZZZ - SPRITE_OOP);