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

◆ LoadSoundEvents()

void InventoryItemType::LoadSoundEvents ( )
inlineprivate

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

13 {
14 string cfgPath = "CfgVehicles " + GetName() + " AnimEvents SoundWeapon";
15
17
18 int soundCount = GetGame().ConfigGetChildrenCount(cfgPath);
19
20 if (soundCount <= 0)//try other path
21 {
22 cfgPath = "CfgWeapons " + GetName() + " AnimEvents SoundWeapon";
23 soundCount = GetGame().ConfigGetChildrenCount(cfgPath);
24 }
25
26 if (soundCount <= 0)//try other path
27 {
28 cfgPath = "CfgMagazines " + GetName() + " AnimEvents SoundWeapon";
29 soundCount = GetGame().ConfigGetChildrenCount(cfgPath);
30 }
31
32 if (soundCount <= 0)//try other path
33 {
34 cfgPath = "CfgAmmo " + GetName() + " AnimEvents SoundWeapon";
35 soundCount = GetGame().ConfigGetChildrenCount(cfgPath);
36 }
37
38 for (int i = 0; i < soundCount; i++)
39 {
40 string soundName;
41 GetGame().ConfigGetChildName(cfgPath, i, soundName);
42 string soundPath = cfgPath + " " + soundName + " ";
43 AnimSoundEvent soundEvent = new AnimSoundEvent(soundPath);
44 if (soundEvent.IsValid())
45 m_AnimSoundEvents.Set(soundEvent.m_iID, soundEvent);
46 }
47 }
map
Определения ControlsXboxNew.c:4
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
proto native owned string GetName()
ref map< int, ref AnimSoundEvent > m_AnimSoundEvents
Определения InventoryItemType.c:3
proto native CGame GetGame()

Перекрестные ссылки CGame::ConfigGetChildName(), CGame::ConfigGetChildrenCount(), GetGame(), GetName() и m_AnimSoundEvents.

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