DayZ 1.29
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 g_Game.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 }
DayZGame g_Game
Определения DayZGame.c:3942
static ref map< string, typename > m_AmmoEffects
Key: Ammo class name; Data: ParticleList ID.
Определения AmmoEffects.c:11
proto native ToType()
Returns internal type representation. Can be used in runtime, or cached in variables and used for fas...

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

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