DayZ 1.24
Loading...
Searching...
No Matches
BillboardSetHandler Class Reference
Collaboration diagram for BillboardSetHandler:
[legend]

Protected Member Functions

string GetTextureByType (string type)
 
void OnRPCIndex (int index)
 
bool LoadBillboardConfigs ()
 

Static Protected Member Functions

static bool ActivateBillboardSet (string setClassName, PlayerIdentity identity)
 

Protected Attributes

bool m_BillboardSetIndex = -1
 
ref array< ref BillboardSetm_BillboardSets
 

Static Protected Attributes

static const string ROOT_CLASS = "BillboardPresets"
 
static int m_SetIndexCached = -1
 

Detailed Description

Definition at line 1 of file BillboardSet.c.

Member Function Documentation

◆ ActivateBillboardSet()

static bool BillboardSetHandler::ActivateBillboardSet ( string setClassName,
PlayerIdentity identity )
inlinestaticprotected

Definition at line 42 of file BillboardSet.c.

43 {
44 if (!g_Game)
45 return false;
46
47 if (m_SetIndexCached == -1)
48 {
49 int setCount = g_Game.ConfigGetChildrenCount(ROOT_CLASS);
50 for (int setIndex = 0; setIndex < setCount; setIndex++)
51 {
52 string setName;
53 GetGame().ConfigGetChildName(ROOT_CLASS, setIndex, setName);
54
55 if (setName == setClassName)
56 {
58 break
59 }
60 }
61 }
62
63 if (m_SetIndexCached != -1)
64 {
66 GetGame().RPCSingleParam(identity.GetPlayer(), ERPCs.RPC_SET_BILLBOARDS, param, true, identity);
67 return true;
68 }
69 return false;
70 }
DayZGame g_Game
Definition DayZGame.c:3528
ERPCs
Definition ERPCs.c:2
static int m_SetIndexCached
Definition BillboardSet.c:6
static const string ROOT_CLASS
Definition BillboardSet.c:5
proto native CGame GetGame()

References g_Game, GetGame(), m_SetIndexCached, and ROOT_CLASS.

◆ GetTextureByType()

string BillboardSetHandler::GetTextureByType ( string type)
inlineprotected

Definition at line 8 of file BillboardSet.c.

9 {
10 if (m_BillboardSetIndex == -1)
11 return "";
13 return bbset.GetTextureByType(type);
14 }
void BillboardSet(string path)
ref array< ref BillboardSet > m_BillboardSets
Definition BillboardSet.c:4

References BillboardSet(), m_BillboardSetIndex, and m_BillboardSets.

◆ LoadBillboardConfigs()

bool BillboardSetHandler::LoadBillboardConfigs ( )
inlineprotected

Definition at line 25 of file BillboardSet.c.

26 {
28
29 int setCount = g_Game.ConfigGetChildrenCount(ROOT_CLASS);
30
31 for (int setIndex = 0; setIndex < setCount; setIndex++)
32 {
33 string setName;
34 GetGame().ConfigGetChildName(ROOT_CLASS, setIndex, setName);
35 string path = ROOT_CLASS + " " + setName;
37 }
38
39 return true;
40 }

References BillboardSet(), g_Game, GetGame(), m_BillboardSets, path, and ROOT_CLASS.

Referenced by OnRPCIndex().

◆ OnRPCIndex()

void BillboardSetHandler::OnRPCIndex ( int index)
inlineprotected

Definition at line 16 of file BillboardSet.c.

17 {
18 if (!m_BillboardSets)
20
21 if (m_BillboardSets && m_BillboardSets.IsValidIndex(index))
23 }

References LoadBillboardConfigs(), m_BillboardSetIndex, and m_BillboardSets.

Member Data Documentation

◆ m_BillboardSetIndex

bool BillboardSetHandler::m_BillboardSetIndex = -1
protected

Definition at line 3 of file BillboardSet.c.

Referenced by GetTextureByType(), and OnRPCIndex().

◆ m_BillboardSets

ref array<ref BillboardSet> BillboardSetHandler::m_BillboardSets
protected

Definition at line 4 of file BillboardSet.c.

Referenced by GetTextureByType(), LoadBillboardConfigs(), and OnRPCIndex().

◆ m_SetIndexCached

int BillboardSetHandler::m_SetIndexCached = -1
staticprotected

Definition at line 6 of file BillboardSet.c.

Referenced by ActivateBillboardSet().

◆ ROOT_CLASS

const string BillboardSetHandler::ROOT_CLASS = "BillboardPresets"
staticprotected

Definition at line 5 of file BillboardSet.c.

Referenced by ActivateBillboardSet(), and LoadBillboardConfigs().


The documentation for this class was generated from the following file: