DayZ 1.24
Loading...
Searching...
No Matches
ClientData.c
Go to the documentation of this file.
2{
6
10
12
13 static void ResetClientData()
14 {
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();
21 }
22
23 static void AddPlayerBase(Man player)
24 {
27 }
28
29 static void RemovePlayerBase(Man player)
30 {
32 m_PlayerBaseList.RemoveItem(player);
33 }
34
36 {
37 foreach (auto sync_player : player_list.m_PlayerList)
38 {
40 if (!identity)
41 {
42 ErrorEx("PlayerIdentity not synchronized before SyncPlayer", ErrorExSeverity.WARNING);
43 continue;
44 }
45
46 sync_player.m_UID = identity.GetPlainId();
47 sync_player.m_PlayerName = identity.GetPlainName();
48 }
49 }
50
52 {
53 if (m_PlayerList && m_PlayerList.m_PlayerList)
54 {
55 //Print("SyncEvent_OnRecievedPlayerList | " + m_PlayerList.m_PlayerList.Count());
56 }
57
59
62 else
64
66
67#ifdef PLATFORM_CONSOLE
68#ifndef PLATFORM_WINDOWS // if app is not on Windows with -XBOX parameter
71 OnlineServices.m_ClientServices.GetSessionService().OnSessionPlayerListUpdate(newPlayersSimple);
72
73 if (new_players.m_PlayerList.Count() > 0)
75
76 if (g_Game.GetGameState() == DayZGameState.IN_GAME)
78#endif
79#endif
80
82 }
83
85 {
87 if (m_PlayerList && m_PlayerList.m_PlayerList)
88 {
89 for (int i = 0; i < m_PlayerList.m_PlayerList.Count(); i++)
90 {
91 SyncPlayer player = m_PlayerList.m_PlayerList.Get(i);
92 ids.Insert(player.m_UID);
93 }
94 }
95
96 return ids;
97 }
98
100 {
102 if (list)
103 {
104 for (int i = 0; i < list.m_PlayerList.Count(); i++)
105 {
106 SyncPlayer player = list.m_PlayerList.Get(i);
107 ids.Insert(player.m_UID);
108 }
109 }
110
111 return ids;
112 }
113
115 {
116 SyncEvent_OnEntityKilled.Invoke(entity_killed_data.m_EntityVictim, entity_killed_data.m_EntityKiller, entity_killed_data.m_EntitySource, entity_killed_data.m_IsHeadShot);
117 }
118
123}
DayZGame g_Game
Definition DayZGame.c:3528
EFireIgniteType
PlayerBase GetPlayer()
static ref ScriptInvoker SyncEvent_OnPlayerListUpdate
Definition ClientData.c:3
static void SyncEvent_PreprocessPlayerList(SyncPlayerList player_list)
Definition ClientData.c:35
static array< string > GetSimplePlayerList()
Definition ClientData.c:84
static ref SyncPlayerList m_PlayerList
Definition ClientData.c:8
static ref OnlineServices m_OnlineServices
Definition ClientData.c:11
static ref SyncPlayerList m_LastNewPlayers
Definition ClientData.c:9
static void RemovePlayerBase(Man player)
Definition ClientData.c:29
static void ResetClientData()
Definition ClientData.c:13
static void SyncEvent_OnPlayerIgnitedFireplace(EFireIgniteType igante_type)
Definition ClientData.c:119
static ref array< Man > m_PlayerBaseList
Definition ClientData.c:7
static void SyncEvent_OnEntityKilled(SyncEntityKillInfo entity_killed_data)
Definition ClientData.c:114
static void SyncEvent_OnRecievedPlayerList(SyncPlayerList player_list)
Definition ClientData.c:51
static void AddPlayerBase(Man player)
Definition ClientData.c:23
static ref ScriptInvoker SyncEvent_OnPlayerIgnitedFireplace
Definition ClientData.c:5
static array< string > GetSimplePlayerList(SyncPlayerList list)
Definition ClientData.c:99
static ref ScriptInvoker SyncEvent_OnEntityKilled
Definition ClientData.c:4
static bool GetMultiplayState()
static void LoadFriends()
static ref BiosClientServices m_ClientServices
static void LoadPermissions(array< string > player_list)
static void SetMultiplayState(bool state)
The class that will be instanced (moddable)
Definition gameplay.c:376
ScriptInvoker Class provide list of callbacks usage:
Definition tools.c:116
static SyncPlayerList Compare(SyncPlayerList a, SyncPlayerList b)
proto native CGame GetGame()
ErrorExSeverity
Definition EnDebug.c:62
enum ShapeType ErrorEx