From 1e319fa27901c1457b069031e0cc01b075750e5f Mon Sep 17 00:00:00 2001 From: Edgar Luque Date: Thu, 11 May 2023 23:04:05 +0200 Subject: [PATCH] fix opacity for jumps --- src/game/client/gameclient.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 5fb439a62..1f410ccdf 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -1707,8 +1707,6 @@ void CGameClient::OnNewSnapshot() for(auto &pComponent : m_vpAll) pComponent->OnNewSnapshot(); - float Alpha = g_Config.m_ClShowOthersAlpha / 100.0f; - // detect air jump for other players for(int i = 0; i < MAX_CLIENTS; i++) if(m_Snap.m_aCharacters[i].m_Active && (m_Snap.m_aCharacters[i].m_Cur.m_Jumped & 2) && !(m_Snap.m_aCharacters[i].m_Prev.m_Jumped & 2)) @@ -1717,6 +1715,10 @@ void CGameClient::OnNewSnapshot() vec2 Pos = mix(vec2(m_Snap.m_aCharacters[i].m_Prev.m_X, m_Snap.m_aCharacters[i].m_Prev.m_Y), vec2(m_Snap.m_aCharacters[i].m_Cur.m_X, m_Snap.m_aCharacters[i].m_Cur.m_Y), Client()->IntraGameTick(g_Config.m_ClDummy)); + float Alpha = 1.0f; + bool SameTeam = m_Teams.SameTeam(m_Snap.m_LocalClientID, i); + if(!SameTeam || m_aClients[i].m_Solo || m_aClients[m_Snap.m_LocalClientID].m_Solo) + Alpha = g_Config.m_ClShowOthersAlpha / 100.0f; m_Effects.AirJump(Pos, Alpha); }