8 string stepsCfgPath =
"CfgVehicles SurvivorBase AnimEvents Steps ";
9 int stepsCount =
GetGame().ConfigGetChildrenCount(stepsCfgPath);
10 for(
int i = 0; i < stepsCount; i++)
13 GetGame().ConfigGetChildName(stepsCfgPath, i, stepName);
14 string stepPath = stepsCfgPath + stepName +
" ";
15 int id =
GetGame().ConfigGetInt(stepPath +
"id");
18 GetGame().ConfigGetText(stepPath +
"soundLookupTable", tableName);
25 table.LoadTable(tableName);
39 if(soundBuilder == NULL)
44 soundBuilder.AddVariable(
"walk", 1);
45 soundBuilder.AddVariable(
"run", 0);
46 soundBuilder.AddVariable(
"sprint", 0);
50 soundBuilder.AddVariable(
"walk", 0);
51 soundBuilder.AddVariable(
"run", 1);
52 soundBuilder.AddVariable(
"sprint", 0);
56 soundBuilder.AddVariable(
"walk", 0);
57 soundBuilder.AddVariable(
"run", 0);
58 soundBuilder.AddVariable(
"sprint", 1);
62 soundBuilder.AddVariable(
"walk", 0);
63 soundBuilder.AddVariable(
"run", 0);
64 soundBuilder.AddVariable(
"sprint", 0);
69 soundBuilder.AddVariable(
"bare", 1);
70 soundBuilder.AddVariable(
"sneakers", 0);
71 soundBuilder.AddVariable(
"boots", 0);
75 soundBuilder.AddVariable(
"bare", 0);
76 soundBuilder.AddVariable(
"sneakers", 1);
77 soundBuilder.AddVariable(
"boots", 0);
81 soundBuilder.AddVariable(
"bare", 0);
82 soundBuilder.AddVariable(
"sneakers", 0);
83 soundBuilder.AddVariable(
"boots", 1);
91 if(m_instance == NULL)
110 string attachCfgPath =
"CfgVehicles SurvivorBase AnimEvents Attachments ";
111 int attachCount =
GetGame().ConfigGetChildrenCount(attachCfgPath);
112 for(
int i = 0; i < attachCount; i++)
115 GetGame().ConfigGetChildName(attachCfgPath, i, defName);
116 string defPath = attachCfgPath + defName +
" ";
121 int id =
GetGame().ConfigGetInt(defPath +
"id");
124 GetGame().ConfigGetText(defPath +
"soundLookupTable", tableName);
129 table =
new AttachmentSoundLookupTable();
130 table.LoadTable(tableName);
145 if(soundBuilder == NULL)
153 if(m_instance == NULL)
177 string cfgPath =
"CfgVehicles SurvivorBase AnimEvents SoundVoice ";
178 int childCount =
GetGame().ConfigGetChildrenCount(cfgPath);
180 for(
int i = 0; i < childCount; i++)
183 GetGame().ConfigGetChildName(cfgPath, i, defName);
184 string defPath = cfgPath + defName +
" ";
186 int id =
GetGame().ConfigGetInt(defPath +
"id");
189 GetGame().ConfigGetText(defPath +
"soundLookupTable", tableName);
195 table.LoadTable(tableName);
199 if(
GetGame().ConfigGetText(defPath +
"noise", noiseName))
203 table.SetNoiseParam(np);
218 if(soundBuilder == NULL)
230 return table.GetNoiseParam();
235 if(m_instance == NULL)
254 string soundsCfgPath =
"CfgVehicles SurvivorBase AnimEvents Sounds ";
256 int soundCount =
GetGame().ConfigGetChildrenCount(soundsCfgPath);
257 for(
int i = 0; i < soundCount; i++)
260 GetGame().ConfigGetChildName(soundsCfgPath, i, soundName);
261 string soundPath = soundsCfgPath + soundName +
" ";
262 AnimSoundEvent soundEvent =
new AnimSoundEvent(soundPath);
263 if(soundEvent.IsValid())
273 if(soundEvent.m_iID == event_id)
284 if(m_instance == NULL)
327 GetGame().ProfilerStart(
"DayZPlayerTypeRegisterSounds");
329 pType.RegisterStepEvent(
"Step", 0.2);
331 pType.RegisterSoundEvent(
"Sound", -1);
332 pType.RegisterSoundEvent(
"SoundWeapon", 0.2);
333 pType.RegisterSoundEvent(
"SoundVoice", -1);
334 if(!
GetGame().IsDedicatedServer())
335 pType.RegisterSoundEvent(
"SoundAttachment", 0.2);
339 pType.RegisterVoiceSoundLookupTable(voiceTable2);
341 if(!
GetGame().IsDedicatedServer())
343 pType.RegisterParticleEvent(
"Particle", -1);
346 pType.RegisterStepSoundLookupTable(stepTable);
349 pType.RegisterAttachmentSoundLookupTable(attachTable);
354 pType.RegisterSoundTable(soundTable);
359 GetGame().ProfilerStop(
"DayZPlayerTypeRegisterSounds");