DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
StaticObjectType.c
См. документацию.
2{
3 //may not contain every soundset info, defaults from DayZPlayerType used in that case
4 protected ref map<int, ref SoundObjectBuilder> m_CustomVegetationSoundsMap; //<stepEventID, SoundObjectBuilder>
5
10
11 protected void LoadCustomStepSounds()
12 {
13 string pathBase = "CfgNonAIVehicles " + GetName() + " VegetationSounds";
14 if (!g_Game.ConfigIsExisting(pathBase))
15 return;
16
18
19 int vegSoundsCount = g_Game.ConfigGetChildrenCount(pathBase);
20 for (int i = 0; i < vegSoundsCount; ++i)
21 {
22 string subclass;
23 g_Game.ConfigGetChildName(pathBase, i, subclass);
24
25 string soundSet = "";
26 g_Game.ConfigGetText(pathBase + " " + subclass + " soundSet", soundSet);
27
28 TIntArray animEventIds = new TIntArray();
29 g_Game.ConfigGetIntArray(pathBase + " " + subclass + " animEventIds", animEventIds);
30
31 SoundParams soundParams = new SoundParams(soundSet);
32
33 if (soundParams.IsValid() && animEventIds.Count() > 0)
34 {
35 SoundObjectBuilder builder = new SoundObjectBuilder(soundParams);
36 foreach (int eventID : animEventIds)
37 {
38 m_CustomVegetationSoundsMap.Set(eventID, builder);
39 }
40 }
41 }
42 }
43
45 {
47 return m_CustomVegetationSoundsMap.Get(stepEventID);
48
49 return null;
50 }
51}
DayZGame g_Game
Определения DayZGame.c:4074
void EntityType()
Определения EntityType.c:3
proto native owned string GetName()
void LoadCustomStepSounds()
Определения StaticObjectType.c:11
SoundObjectBuilder GetVegetationSoundBuilderFromEventID(int stepEventID)
Определения StaticObjectType.c:44
ref map< int, ref SoundObjectBuilder > m_CustomVegetationSoundsMap
Определения StaticObjectType.c:4
void StaticObjectType()
Определения StaticObjectType.c:6
Определения Transport.c:70
array< int > TIntArray
Определения EnScript.c:733
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
class SoundObject SoundParams(string name)