Don't use predicted position for the hook when spectating

This commit is contained in:
trml 2017-04-01 13:10:29 +02:00 committed by heinrich5991
parent 4a0abf6747
commit 1211746491

View file

@ -309,7 +309,7 @@ void CPlayers::RenderHook(
{
if(pPlayerChar->m_HookedPlayer != -1)
{
if(m_pClient->m_Snap.m_pLocalInfo && pPlayerChar->m_HookedPlayer == m_pClient->m_Snap.m_pLocalInfo->m_ClientID)
if(m_pClient->m_Snap.m_pLocalInfo && pPlayerChar->m_HookedPlayer == m_pClient->m_Snap.m_pLocalInfo->m_ClientID && !m_pClient->m_Snap.m_SpecInfo.m_Active)
{
if(Client()->State() == IClient::STATE_DEMOPLAYBACK) // only use prediction if needed
HookPos = vec2(m_pClient->m_LocalCharacterPos.x, m_pClient->m_LocalCharacterPos.y);