mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #1934
1934: repair the problem that class selector appear when demo playing r=def- a=sirius1242 I think this problem is solved, but this may be a little hack, I don't know the effect of this if-else condition. ![2019-10-12-12-27-ScreenShot2](https://user-images.githubusercontent.com/32300858/66710842-eac12980-edb2-11e9-8866-cf3a1348616b.png) Co-authored-by: sirius <sirius.ustc@gmail.com>
This commit is contained in:
commit
4717b21844
|
@ -92,12 +92,19 @@ void CMapLayers::EnvelopeEval(float TimeOffset, int Env, float *pChannels, void
|
|||
pThis->m_LastLocalTick = pThis->m_CurrentLocalTick;
|
||||
pThis->m_CurrentLocalTick = pInfo->m_CurrentTick;
|
||||
}
|
||||
|
||||
s_Time = mix(pThis->m_LastLocalTick / (float)pThis->Client()->GameTickSpeed(),
|
||||
if(pItem->m_Version < 2 || pItem->m_Synchronized)
|
||||
{
|
||||
s_Time = mix((pThis->Client()->PrevGameTick()-pThis->m_pClient->m_Snap.m_pGameInfoObj->m_RoundStartTick) / (float)pThis->Client()->GameTickSpeed(),
|
||||
(pThis->Client()->GameTick()-pThis->m_pClient->m_Snap.m_pGameInfoObj->m_RoundStartTick) / (float)pThis->Client()->GameTickSpeed(),
|
||||
pThis->Client()->IntraGameTick());
|
||||
}
|
||||
else
|
||||
{
|
||||
s_Time = mix(pThis->m_LastLocalTick / (float)pThis->Client()->GameTickSpeed(),
|
||||
pThis->m_CurrentLocalTick / (float)pThis->Client()->GameTickSpeed(),
|
||||
pThis->Client()->IntraGameTick());
|
||||
}
|
||||
}
|
||||
|
||||
pThis->RenderTools()->RenderEvalEnvelope(pPoints+pItem->m_StartPoint, pItem->m_NumPoints, 4, s_Time+TimeOffset, pChannels);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue