Disable grenade prediction with cl_predict 0

This commit is contained in:
trml 2019-05-07 02:21:21 +02:00
parent b03dad7626
commit d9ade50e0a

View file

@ -53,7 +53,7 @@ void CItems::RenderProjectile(const CNetObj_Projectile *pCurrent, int ItemID)
s_LastGameTickTime = Client()->GameTickTime();
float Ct;
if(m_pClient->AntiPingGrenade() && LocalPlayerInGame && !(Client()->State() == IClient::STATE_DEMOPLAYBACK))
if(m_pClient->Predict() && m_pClient->AntiPingGrenade() && LocalPlayerInGame && !(Client()->State() == IClient::STATE_DEMOPLAYBACK))
Ct = ((float)(Client()->PredGameTick() - 1 - pCurrent->m_StartTick) + Client()->PredIntraGameTick())/(float)SERVER_TICK_SPEED;
else
Ct = (Client()->PrevGameTick() - pCurrent->m_StartTick)/(float)SERVER_TICK_SPEED + s_LastGameTickTime;