DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ LoadCustomStepSounds()

void StaticObjectType::LoadCustomStepSounds ( )
inlineprotected

См. определение в файле StaticObjectType.c строка 11

12 {
13 string pathBase = "CfgNonAIVehicles " + GetName() + " VegetationSounds";
14 if (!g_Game.ConfigIsExisting(pathBase))
15 return;
16
17 m_CustomVegetationSoundsMap = new map<int, ref SoundObjectBuilder>();
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 }
DayZGame g_Game
Определения DayZGame.c:4074
proto native owned string GetName()
ref map< int, ref SoundObjectBuilder > m_CustomVegetationSoundsMap
Определения StaticObjectType.c:4
array< int > TIntArray
Определения EnScript.c:733
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
class SoundObject SoundParams(string name)

Перекрестные ссылки g_Game, EntityType::GetName(), m_CustomVegetationSoundsMap, SoundObjectBuilder() и SoundParams().

Используется в StaticObjectType().