mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Some more dummy stuff, might fix sound
This commit is contained in:
parent
74844c98a6
commit
6bcdb4fdb8
|
@ -382,7 +382,8 @@ void CGameClient::OnConnected()
|
||||||
void CGameClient::OnReset()
|
void CGameClient::OnReset()
|
||||||
{
|
{
|
||||||
// clear out the invalid pointers
|
// clear out the invalid pointers
|
||||||
m_LastNewPredictedTick = -1;
|
m_LastNewPredictedTick[0] = -1;
|
||||||
|
m_LastNewPredictedTick[1] = -1;
|
||||||
mem_zero(&g_GameClient.m_Snap, sizeof(g_GameClient.m_Snap));
|
mem_zero(&g_GameClient.m_Snap, sizeof(g_GameClient.m_Snap));
|
||||||
|
|
||||||
for(int i = 0; i < MAX_CLIENTS; i++)
|
for(int i = 0; i < MAX_CLIENTS; i++)
|
||||||
|
@ -556,6 +557,7 @@ void CGameClient::OnDummyDisconnect()
|
||||||
{
|
{
|
||||||
m_DDRaceMsgSent[1] = false;
|
m_DDRaceMsgSent[1] = false;
|
||||||
m_ShowOthers[1] = -1;
|
m_ShowOthers[1] = -1;
|
||||||
|
m_LastNewPredictedTick[1] = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameClient::OnRelease()
|
void CGameClient::OnRelease()
|
||||||
|
@ -1193,9 +1195,9 @@ void CGameClient::OnPredict()
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if we want to trigger effects
|
// check if we want to trigger effects
|
||||||
if(Tick > m_LastNewPredictedTick)
|
if(Tick > m_LastNewPredictedTick[g_Config.m_ClDummy])
|
||||||
{
|
{
|
||||||
m_LastNewPredictedTick = Tick;
|
m_LastNewPredictedTick[g_Config.m_ClDummy] = Tick;
|
||||||
m_NewPredictedTick = true;
|
m_NewPredictedTick = true;
|
||||||
|
|
||||||
if(m_Snap.m_LocalClientID != -1 && World.m_apCharacters[m_Snap.m_LocalClientID])
|
if(m_Snap.m_LocalClientID != -1 && World.m_apCharacters[m_Snap.m_LocalClientID])
|
||||||
|
|
|
@ -59,7 +59,7 @@ class CGameClient : public IGameClient
|
||||||
void UpdatePositions();
|
void UpdatePositions();
|
||||||
|
|
||||||
int m_PredictedTick;
|
int m_PredictedTick;
|
||||||
int m_LastNewPredictedTick;
|
int m_LastNewPredictedTick[2];
|
||||||
|
|
||||||
int64 m_LastSendInfo;
|
int64 m_LastSendInfo;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue