13 static void ResetClientData()
15 if ( m_PlayerBaseList )
16 m_PlayerBaseList.Clear();
17 if ( m_PlayerList && m_PlayerList.m_PlayerList )
18 m_PlayerList.m_PlayerList.Clear();
19 if ( m_LastNewPlayers && m_LastNewPlayers.m_PlayerList )
20 m_LastNewPlayers.m_PlayerList.Clear();
23 static void AddPlayerBase( Man player )
26 m_PlayerBaseList.Insert( player );
29 static void RemovePlayerBase( Man player )
31 if ( m_PlayerBaseList )
32 m_PlayerBaseList.RemoveItem( player );
35 static void SyncEvent_PreprocessPlayerList(
SyncPlayerList player_list)
37 foreach (
auto sync_player : player_list.m_PlayerList)
46 sync_player.m_UID = identity.GetPlainId();
47 sync_player.m_PlayerName = identity.GetPlainName();
51 static void SyncEvent_OnRecievedPlayerList(
SyncPlayerList player_list )
53 if (m_PlayerList && m_PlayerList.m_PlayerList)
60 if ( !m_LastNewPlayers )
62 m_LastNewPlayers = player_list;
66 m_LastNewPlayers =
SyncPlayerList.Compare( m_LastNewPlayers, new_players );
71 #ifdef PLATFORM_CONSOLE
72 #ifndef PLATFORM_WINDOWS // if app is not on Windows with -XBOX parameter
73 array<string> newPlayersSimple = GetSimplePlayerList( new_players );
75 OnlineServices.m_ClientServices.GetSessionService().OnSessionPlayerListUpdate(newPlayersSimple);
77 if ( new_players.m_PlayerList.Count() > 0 )
82 if (
g_Game.GetGameState() == DayZGameState.IN_GAME )
89 SyncEvent_OnPlayerListUpdate.Invoke( player_list );
95 if ( m_PlayerList && m_PlayerList.m_PlayerList )
97 for (
int i = 0; i < m_PlayerList.m_PlayerList.Count(); i++ )
99 SyncPlayer player = m_PlayerList.m_PlayerList.Get( i );
100 ids.Insert( player.m_UID );
112 for (
int i = 0; i < list.m_PlayerList.Count(); i++ )
114 SyncPlayer player = list.m_PlayerList.Get( i );
115 ids.Insert( player.m_UID );
124 SyncEvent_OnEntityKilled.Invoke(entity_killed_data.m_EntityVictim, entity_killed_data.m_EntityKiller, entity_killed_data.m_EntitySource, entity_killed_data.m_IsHeadShot );
127 static void SyncEvent_OnPlayerIgnitedFireplace(
EFireIgniteType igante_type )
129 SyncEvent_OnPlayerIgnitedFireplace.Invoke(igante_type);