From 9a03989e84c8d2719801889738c6af68864aba10 Mon Sep 17 00:00:00 2001 From: oy Date: Sun, 4 Dec 2011 14:34:27 +0100 Subject: added "Make an option for each envelope: (a) synchronized (b) starting at join" by Choupom --- src/game/client/components/maplayers.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/game/client') diff --git a/src/game/client/components/maplayers.cpp b/src/game/client/components/maplayers.cpp index 48f11f26..a1e629a6 100644 --- a/src/game/client/components/maplayers.cpp +++ b/src/game/client/components/maplayers.cpp @@ -99,10 +99,15 @@ void CMapLayers::EnvelopeEval(float TimeOffset, int Env, float *pChannels, void } else { - if(pThis->m_pClient->m_Snap.m_pGameInfoObj) - 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()); + if(pItem->m_Version < 2 || pItem->m_Synchronized) + { + if(pThis->m_pClient->m_Snap.m_pGameInfoObj) + 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 + Time = pThis->Client()->LocalTime(); pThis->RenderTools()->RenderEvalEnvelope(pPoints+pItem->m_StartPoint, pItem->m_NumPoints, 4, Time+TimeOffset, pChannels); } } -- cgit 1.4.1