DayZ 1.24
Loading...
Searching...
No Matches
DayZAnimEventMaps.c
Go to the documentation of this file.
1//individual sound table consisting of map of parameter hashes as keys and soundbuilder array as values
3{
8
14
16 {
17 string path = "CfgSoundTables " + m_tableCategoryName + " " + soundLookupTableName;
18
19 //load all classes names
20 int soundCount = GetGame().ConfigGetChildrenCount(path);
21
22 for (int i = 0; i < soundCount; i++)
23 {
24 string soundClassName;
25 GetGame().ConfigGetChildName(path, i, soundClassName);
26 string soundClassPath = path + " " + soundClassName + " ";
27
28 string parameter;
30
32 GetGame().ConfigGetTextArray(soundClassPath + "soundSets", soundSetNames);
33
34 //TODO create SoundObject for every entry, save in Game?
36 for (int j = 0; j < soundSetNames.Count(); j++)
37 {
40
43 }
44
45 if (soundObjectBuilders.Count() > 0)
46 {
47 //Print("SoundLookupTable::LoadTable: path: " + path + " param:" + parameter + " param#:" + parameter.Hash() + " objBuildersCount: " + soundObjectBuilders.Count());
49 }
50 }
51 }
52
54 {
56
57 if (soundObjects == NULL || soundObjects.Count() == 0)
58 return NULL;
59 else if (soundObjects.Count() == 1)
60 return soundObjects.Get(0);
61 else
62 {
63 int index = Math.RandomInt(0, soundObjects.Count());
64 return soundObjects.Get(index);
65 }
66 }
67
68
69 private string m_tableCategoryName;
70 private string m_parameterName;
72}
73
74
76{
78 {
79 InitTable("CfgStepSoundTables", "surface");
80 }
81}
82
83class AttachmentSoundLookupTable extends SoundLookupTable
84{
86 {
87 InitTable("CfgAttachmentSoundTables", "category");
88 }
90
92{
94
96 {
97 InitTable("CfgVoiceSoundTables", "category");
98 }
99
104
106 {
107 return m_NoiseParams;
108 }
109}
110
111
113{
115 {
116 InitTable("CfgImpactSoundTables", "surface");
117 }
118}
119
121{
124 InitTable("CfgActionsSoundTables", "category");
125 }
126}
128
130{
135
136
147 {
148 int soundSetNameHash = soundSetName.Hash();
149
151 if (builder == NULL)
152 {
154 if (params.IsValid())
155 {
158 }
159 else
160 {
161 Print("AnimSoundObjectBuilderBank: Invalid sound set \"" + soundSetName + "\".");
162 return NULL;
163 }
164 }
165 return builder;
166 }
167
170}
171
172
174{
180
183 if (m_instance == NULL)
185
186 return m_instance;
187 }
188
189
192 int tableNameHash = tableName.Hash();
193
195 if (table == NULL)
196 {
198 table.LoadTable(tableName);
200 }
201 return table;
202 }
203
205 {
206 int tableNameHash = tableName.Hash();
207
209 if (table == NULL)
210 {
212 table.LoadTable(tableName);
215 return table;
216 }
217
219 {
220 int tableNameHash = tableName.Hash();
221
223 if (table == NULL)
224 {
226 table.LoadTable(tableName);
228 }
229 return table;
230 }
231
234}
void PlayerVoiceLookupTable()
SoundLookupTable GetImpactTable(string tableName)
void SetNoiseParam(NoiseParams param)
class AnimSoundObjectBuilderBank AnimSoundLookupTableBank()
static AnimSoundObjectBuilderBank GetInstance()
SoundLookupTable GetStepTable(string tableName)
SoundLookupTable GetActionTable(string tableName)
static ref AnimSoundObjectBuilderBank m_instance
class AttachmentSoundLookupTable extends SoundLookupTable m_NoiseParams
class ImpactSoundLookupTable extends SoundLookupTable ActionSoundLookupTable()
autoptr map< int, ref SoundLookupTable > m_pTables
class SoundLookupTable StepSoundLookupTable()
NoiseParams GetNoiseParam()
void ImpactSoundLookupTable()
class NoiseSystem NoiseParams()
Definition Noise.c:15
void SoundObjectBuilder(SoundParams soundParams)
static AnimSoundObjectBuilderBank GetInstance()
static ref AnimSoundObjectBuilderBank m_instance
SoundObjectBuilder GetBuilder(string soundSetName)
autoptr map< int, ref SoundObjectBuilder > m_pBuilders
Definition EnMath.c:7
void AttachmentSoundLookupTable()
void LoadTable(string soundLookupTableName)
ref map< int, ref array< SoundObjectBuilder > > m_soundBuilders
SoundObjectBuilder GetSoundBuilder(int parameterHash)
void InitTable(string tableCategoryName, string parameterName)
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].