Merge pull request #7767 from furo321/fix-hookcoll-spec

Fix hook collision line being incorrect while paused.
This commit is contained in:
Dennis Felsing 2024-01-07 00:15:23 +00:00 committed by GitHub
commit fda996014b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,7 +136,7 @@ void CPlayers::RenderHookCollLine(
IntraTick = m_pClient->m_aClients[ClientID].m_IsPredicted ? Client()->PredIntraGameTick(g_Config.m_ClDummy) : Client()->IntraGameTick(g_Config.m_ClDummy);
float Angle;
if(Local && Client()->State() != IClient::STATE_DEMOPLAYBACK)
if(Local && (!m_pClient->m_Snap.m_SpecInfo.m_Active || m_pClient->m_Snap.m_SpecInfo.m_SpectatorID != SPEC_FREEVIEW) && Client()->State() != IClient::STATE_DEMOPLAYBACK)
{
// just use the direct input if it's the local player we are rendering
Angle = angle(m_pClient->m_Controls.m_aMousePos[g_Config.m_ClDummy]);
@ -167,7 +167,7 @@ void CPlayers::RenderHookCollLine(
{
vec2 ExDirection = Direction;
if(Local && Client()->State() != IClient::STATE_DEMOPLAYBACK)
if(Local && (!m_pClient->m_Snap.m_SpecInfo.m_Active || m_pClient->m_Snap.m_SpecInfo.m_SpectatorID != SPEC_FREEVIEW) && Client()->State() != IClient::STATE_DEMOPLAYBACK)
{
ExDirection = normalize(vec2((int)m_pClient->m_Controls.m_aMousePos[g_Config.m_ClDummy].x, (int)m_pClient->m_Controls.m_aMousePos[g_Config.m_ClDummy].y));