void _Packet(ScPing p) { if ((p.type & 0x02) == 0) { return; } ping = Level.realTime - m_lastPing; if (!m_useGameSession) { m_waitPing = pingInterval; } }
void _Packet(ScPing p) { if ((p.type & 0x01) == 0) { return; } ping = Level.realTime - m_lastPing; serverTimeStamp = (int)p.timestamp; serverLocalTimeStamp = serverTimeStamp + serverTimeZoneDiff; m_waitPing = pingInterval; DispatchEvent(Events.EVENT_PING_UPDATE); localTimeOffset = 0; }