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

◆ GetAmmoEffectTypename()

static AmmoEffects::GetAmmoEffectTypename ( string ammoType)
inlinestaticprivate

Get the typename for the effect for this ammoType.

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

69 {
70 typename typeName;
71
72 // Search for it in the static map
73 if ( !m_AmmoEffects.Find(ammoType, typeName) )
74 {
75 // Load it in when we can't find it
76 string effectName;
77 GetGame().ConfigGetText(string.Format("cfgAmmo %1 effect", ammoType), effectName);
78
79 // If we found a valid entry, try looking for it in ParticleList
80 if ( effectName != "" )
81 {
82 typeName = effectName.ToType();
83 }
84
85 // Store it for next search
86 m_AmmoEffects.Insert(ammoType, typeName);
87 }
88
89 return typeName;
90 }
static ref map< string, typename > m_AmmoEffects
Key: Ammo class name; Data: ParticleList ID.
Определения AmmoEffects.c:11
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto native CGame GetGame()
proto native ToType()
Returns internal type representation. Can be used in runtime, or cached in variables and used for fas...

Перекрестные ссылки CGame::ConfigGetText(), GetGame(), m_AmmoEffects и string::ToType().

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