void CPlayer::MaybeUpdateOthersNearList ( void ) { // If too long since last update if ( m_UpdateNearListTimer.Get () > (uint)g_TickRateSettings.iNearListUpdate * 9 / 10 ) { CLOCK( "RelayPlayerPuresync", "UpdateNearList_Timer" ); UpdateOthersNearList (); UNCLOCK( "RelayPlayerPuresync", "UpdateNearList_Timer" ); } else // or player has moved too far if ( ( m_vecUpdateNearLastPosition - GetPosition () ).LengthSquared () > MOVEMENT_UPDATE_THRESH * MOVEMENT_UPDATE_THRESH ) { CLOCK( "RelayPlayerPuresync", "UpdateNearList_Movement" ); UpdateOthersNearList (); UNCLOCK( "RelayPlayerPuresync", "UpdateNearList_Movement" ); } }
void CPlayer::DoPulse ( void ) { if ( GetStatus () == STATUS_JOINED ) { m_pPlayerTextManager->Process (); if ( GetTickCount64_ () > m_llNearListUpdateTime + 300 ) UpdateOthersNearList (); } }