9 void InitTable(
string tableCategoryName,
string parameterName)
11 m_tableCategoryName = tableCategoryName;
12 m_parameterName = parameterName;
15 void LoadTable(
string soundLookupTableName)
17 string path =
"CfgSoundTables " + m_tableCategoryName +
" " + soundLookupTableName;
20 int soundCount =
g_Game.ConfigGetChildrenCount(
path);
22 for(
int i = 0; i < soundCount; i++)
24 string soundClassName;
25 g_Game.ConfigGetChildName(
path, i, soundClassName);
26 string soundClassPath =
path +
" " + soundClassName +
" ";
29 g_Game.ConfigGetText(soundClassPath + m_parameterName, parameter);
32 g_Game.ConfigGetTextArray(soundClassPath +
"soundSets", soundSetNames);
36 for(
int j = 0; j < soundSetNames.Count(); j++)
41 if(soundObjectBuilder != NULL)
42 soundObjectBuilders.Insert(soundObjectBuilder);
45 if(soundObjectBuilders.Count() > 0)
48 m_soundBuilders.Insert(parameter.Hash(), soundObjectBuilders);
57 if(soundObjects == NULL || soundObjects.Count() == 0)
61 else if (soundObjects.Count() == 1)
63 return soundObjects.Get(0);
67 int index =
Math.RandomInt(0, soundObjects.Count());
68 return soundObjects.Get(index);
73 private string m_tableCategoryName;
74 private string m_parameterName;
83 InitTable(
"CfgStepSoundTables",
"surface");
89 void AttachmentSoundLookupTable()
91 InitTable(
"CfgAttachmentSoundTables",
"category");
101 InitTable(
"CfgVoiceSoundTables",
"category");
120 InitTable(
"CfgImpactSoundTables",
"surface");
128 InitTable(
"CfgActionsSoundTables",
"category");
133class AnimSoundObjectBuilderBank
141 static AnimSoundObjectBuilderBank GetInstance()
143 if(m_instance == NULL)
152 int soundSetNameHash = soundSetName.Hash();
161 m_pBuilders.Insert(soundSetNameHash, builder);
165 Print(
"AnimSoundObjectBuilderBank: Invalid sound set \"" + soundSetName +
"\".");
172 private static ref AnimSoundObjectBuilderBank m_instance;
187 if(m_instance == NULL)
196 int tableNameHash = tableName.Hash();
202 table.LoadTable(tableName);
203 m_pTables.Insert(tableNameHash, table);
210 int tableNameHash = tableName.Hash();
216 table.LoadTable(tableName);
217 m_pTables.Insert(tableNameHash, table);
224 int tableNameHash = tableName.Hash();
230 table.LoadTable(tableName);
231 m_pTables.Insert(tableNameHash, table);
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
void PlayerVoiceLookupTable()
SoundLookupTable GetImpactTable(string tableName)
void InitTable(string tableCategoryName, string parameterName)
void SetNoiseParam(NoiseParams param)
class AnimSoundObjectBuilderBank AnimSoundLookupTableBank()
SoundLookupTable GetStepTable(string tableName)
SoundLookupTable GetActionTable(string tableName)
void AnimSoundObjectBuilderBank()
class AttachmentSoundLookupTable extends SoundLookupTable m_NoiseParams
class ImpactSoundLookupTable extends SoundLookupTable ActionSoundLookupTable()
class SoundLookupTable StepSoundLookupTable()
NoiseParams GetNoiseParam()
void ImpactSoundLookupTable()
proto void Print(void var)
Prints content of variable to console/log.
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
class SoundObject SoundParams(string name)
class NoiseSystem NoiseParams()