You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
take a look at the code blow:
else if( Packet->GetID( ) == CGameProtocol :: W3GS_INCOMING_ACTION )
{
if( m_GameIsReliable )
{
// we received a game update which means we can reset the number of empty actions we have to work with
// we also must send any remaining empty actions now
// note: the lag screen can't be up right now otherwise the server made a big mistake, so we don't need to check for it
BYTEARRAY EmptyAction;
EmptyAction.push_back( 0xF7 );
EmptyAction.push_back( 0x0C );
EmptyAction.push_back( 0x06 );
EmptyAction.push_back( 0x00 );
EmptyAction.push_back( 0x00 );
EmptyAction.push_back( 0x00 );
for( unsigned char i = m_NumEmptyActionsUsed; i < m_NumEmptyActions; i++ )
m_LocalSocket->PutBytes( EmptyAction );
m_NumEmptyActionsUsed = 0;
}
m_ActionReceived = true;
m_LastActionTime = GetTime( );
}
GProxy sends a couple (m_NumEmptyActions) of empty actions on EACH
W3GS_INCOMING_ACTION packet, and this issue cause non-gproxy players to desync
with others.
W3GS_INCOMING_ACTION2 handler doesn't have this issue, it does send required
number of emty actions only once after reconnect happens:
else if( Packet->GetID( ) == CGameProtocol :: W3GS_INCOMING_ACTION2 )
{
if( m_GameIsReliable )
{
// we received a fractured game update which means we cannot use any empty actions until we receive the subsequent game update
// we also must send any remaining empty actions now
// note: this means if we get disconnected right now we can't use any of our buffer time, which would be very unlucky
// it still gives us 60 seconds total to reconnect though
// note: the lag screen can't be up right now otherwise the server made a big mistake, so we don't need to check for it
BYTEARRAY EmptyAction;
EmptyAction.push_back( 0xF7 );
EmptyAction.push_back( 0x0C );
EmptyAction.push_back( 0x06 );
EmptyAction.push_back( 0x00 );
EmptyAction.push_back( 0x00 );
EmptyAction.push_back( 0x00 );
for( unsigned char i = m_NumEmptyActionsUsed; i < m_NumEmptyActions; i++ )
m_LocalSocket->PutBytes( EmptyAction );
m_NumEmptyActionsUsed = m_NumEmptyActions;
}
}
diff:
m_NumEmptyActionsUsed = 0;
m_NumEmptyActionsUsed = m_NumEmptyActions;
Original issue reported on code.google.com by [email protected] on 29 Apr 2014 at 6:40
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 29 Apr 2014 at 6:40The text was updated successfully, but these errors were encountered: