8 string stepsCfgPath =
"CfgVehicles SurvivorBase AnimEvents Steps ";
9 int stepsCount =
g_Game.ConfigGetChildrenCount(stepsCfgPath);
10 for(
int i = 0; i < stepsCount; i++)
13 g_Game.ConfigGetChildName(stepsCfgPath, i, stepName);
14 string stepPath = stepsCfgPath + stepName +
" ";
15 int id =
g_Game.ConfigGetInt(stepPath +
"id");
18 g_Game.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);
110 string attachCfgPath =
"CfgVehicles SurvivorBase AnimEvents Attachments ";
111 int attachCount =
g_Game.ConfigGetChildrenCount(attachCfgPath);
112 for(
int i = 0; i < attachCount; i++)
115 g_Game.ConfigGetChildName(attachCfgPath, i, defName);
116 string defPath = attachCfgPath + defName +
" ";
121 int id =
g_Game.ConfigGetInt(defPath +
"id");
124 g_Game.ConfigGetText(defPath +
"soundLookupTable", tableName);
129 table =
new AttachmentSoundLookupTable();
130 table.LoadTable(tableName);
145 if(soundBuilder == NULL)
177 string cfgPath =
"CfgVehicles SurvivorBase AnimEvents SoundVoice ";
178 int childCount =
g_Game.ConfigGetChildrenCount(cfgPath);
180 for(
int i = 0; i < childCount; i++)
183 g_Game.ConfigGetChildName(cfgPath, i, defName);
184 string defPath = cfgPath + defName +
" ";
186 int id =
g_Game.ConfigGetInt(defPath +
"id");
189 g_Game.ConfigGetText(defPath +
"soundLookupTable", tableName);
195 table.LoadTable(tableName);
199 if(
g_Game.ConfigGetText(defPath +
"noise", noiseName))
203 table.SetNoiseParam(np);
218 if(soundBuilder == NULL)
230 return table.GetNoiseParam();
257 string soundsCfgPath =
"CfgVehicles SurvivorBase AnimEvents Sounds ";
259 int soundCount =
g_Game.ConfigGetChildrenCount(soundsCfgPath);
260 for(
int i = 0; i < soundCount; i++)
263 g_Game.ConfigGetChildName(soundsCfgPath, i, soundName);
264 string soundPath = soundsCfgPath + soundName +
" ";
265 AnimSoundEvent soundEvent =
new AnimSoundEvent(soundPath);
266 if(soundEvent.IsValid())
321 g_Game.ProfilerStart(
"DayZPlayerTypeRegisterSounds");
323 pType.RegisterStepEvent(
"Step", 0.2);
325 pType.RegisterSoundEvent(
"Sound", -1);
326 pType.RegisterSoundEvent(
"SoundWeapon", 0.2);
327 pType.RegisterSoundEvent(
"SoundVoice", -1);
328 if(!
g_Game.IsDedicatedServer())
329 pType.RegisterSoundEvent(
"SoundAttachment", 0.2);
332 DayZPlayerTypeVoiceSoundLookupTableImpl voiceTable2 = DayZPlayerTypeVoiceSoundLookupTableImpl.GetInstance();
333 pType.RegisterVoiceSoundLookupTable(voiceTable2);
335 if(!
g_Game.IsDedicatedServer())
337 pType.RegisterParticleEvent(
"Particle", -1);
340 pType.RegisterStepSoundLookupTable(stepTable);
343 pType.RegisterAttachmentSoundLookupTable(attachTable);
348 pType.RegisterSoundTable(soundTable);
353 g_Game.ProfilerStop(
"DayZPlayerTypeRegisterSounds");
ref array< ref AnimSoundEvent > m_animSoundEvents
DEPRECATED.
InventoryItemSoundDetach m_AnimSoundEvents
PlayerSpawnPreset slotName
void PlayerVoiceLookupTable()
static AnimSoundObjectBuilderBank GetInstance()
static ref AnimSoundObjectBuilderBank m_instance
class SoundLookupTable StepSoundLookupTable()
void DayZPlayerTypeSoundTableImpl()
void DayZPlayerTypeStepSoundLookupTableImpl()
class DayZPlayerTypeStepSoundLookupTableImpl extends DayZPlayerTypeStepSoundLookupTable DayZPlayerTypeAttachmentSoundLookupTableImpl()
autoptr map< int, StepSoundLookupTable > m_pSoundTables
autoptr map< int, ref StepSoundLookupTable > m_pSoundTableInstances
void DayZPlayerTypeRegisterSounds(DayZPlayerType pType)
class NoiseSystem NoiseParams()
SoundObjectBuilder GetSoundBuilder(int eventId, string slotName, int attachmentHash)
autoptr map< int, ref StepSoundLookupTable > m_pSoundTableInstances
void DayZPlayerTypeStepSoundLookupTableImpl()
static DayZPlayerTypeStepSoundLookupTableImpl GetInstance()
static ref DayZPlayerTypeStepSoundLookupTableImpl m_instance
autoptr map< int, StepSoundLookupTable > m_pSoundTables
override SoundObjectBuilder GetSoundBuilder(int eventId, int pMovement, int pSurfaceHash, AnimBootsType pBoots)
void DayZPlayerTypeVoiceSoundLookupTableImpl()
autoptr map< int, ref PlayerVoiceLookupTable > m_pSoundTableInstances
override SoundObjectBuilder GetSoundBuilder(int eventId, int parameterHash)
static ref DayZPlayerTypeVoiceSoundLookupTableImpl m_instance
static DayZPlayerTypeVoiceSoundLookupTableImpl GetInstance()
override NoiseParams GetNoiseParams(int eventId)
autoptr map< int, PlayerVoiceLookupTable > m_pSoundTables
SoundObjectBuilder GetSoundBuilder(int parameterHash)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZPlayerConstants
defined in C++
class DayZPlayerTypeAttachmentSoundLookupTable GetSoundEvent(int event_id)
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
proto native int Hash()
Returns hash of string.