Fix hook collision line being incorrect while paused.

This commit is contained in:
furo 2024-01-06 20:45:14 +01:00
parent c5d6389132
commit e025c184af

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); IntraTick = m_pClient->m_aClients[ClientID].m_IsPredicted ? Client()->PredIntraGameTick(g_Config.m_ClDummy) : Client()->IntraGameTick(g_Config.m_ClDummy);
float Angle; 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 // 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]); Angle = angle(m_pClient->m_Controls.m_aMousePos[g_Config.m_ClDummy]);
@ -167,7 +167,7 @@ void CPlayers::RenderHookCollLine(
{ {
vec2 ExDirection = Direction; 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)); 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));