DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс SyncPlayerList

Закрытые члены

void CreatePlayerList ()
 

Закрытые статические члены

static SyncPlayerList Compare (SyncPlayerList a, SyncPlayerList b)
 

Закрытые данные

ref array< ref SyncPlayerm_PlayerList
 

Подробное описание

Методы

◆ Compare()

static SyncPlayerList Compare ( SyncPlayerList a,
SyncPlayerList b )
inlinestaticprivate
26 {
28 new_list.m_PlayerList = new array<ref SyncPlayer>;
29
30 if (!a && b && b.m_PlayerList)
31 {
32 foreach (SyncPlayer player3 : b.m_PlayerList)
33 {
34 new_list.m_PlayerList.Insert(player3);
35 }
36 }
37 else if (a && a.m_PlayerList && !b)
38 {
39 foreach (SyncPlayer player4 : a.m_PlayerList)
40 {
41 new_list.m_PlayerList.Insert(player4);
42 }
43 }
44 else if (a && a.m_PlayerList && b && b.m_PlayerList)
45 {
48
49 foreach (SyncPlayer player : array_b)
50 {
51 bool found = false;
52 foreach (SyncPlayer player2 : array_a)
53 {
54 if (player.m_UID == player2.m_UID)
55 {
56 found = true;
57 break;
58 }
59 }
60
61 if (!found)
62 {
63 new_list.m_PlayerList.Insert(player);
64 }
65 }
66 }
67 return new_list;
68 }
Definition EntityAI.c:95
Definition SyncPlayer.c:2
Definition SyncPlayerList.c:2
ref array< ref SyncPlayer > m_PlayerList
Definition SyncPlayerList.c:3

Перекрестные ссылки m_PlayerList.

Используется в ClientData::SyncEvent_OnRecievedPlayerList().

◆ CreatePlayerList()

void CreatePlayerList ( )
inlineprivate
6 {
7 if (GetGame().IsServer())
8 {
10
12 GetGame().GetPlayerIndentities(identities);
13
14 foreach (auto identity : identities)
15 {
17 sync_player.m_Identity = identity;
18 sync_player.m_UID = identity.GetPlainId();
19 sync_player.m_PlayerName = identity.GetPlainName();
21 }
22 }
23 }
proto native CGame GetGame()

Перекрестные ссылки GetGame() и m_PlayerList.

Поля

◆ m_PlayerList

ref array<ref SyncPlayer> m_PlayerList
private

Используется в Compare() и CreatePlayerList().


Объявления и описания членов класса находятся в файле: