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

◆ GetAmmoParticleID()

static int AmmoEffects::GetAmmoParticleID ( string ammoType)
inlinestaticprivate

Get the ParticleList ID for the particle for this ammoType.

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

22 {
23 int particleID;
24
25 // Search for it in the static map
26 if ( !m_AmmoParticles.Find(ammoType, particleID) )
27 {
28 // Load it in when we can't find it
29 string particleFileName;
30 GetGame().ConfigGetText(string.Format("cfgAmmo %1 particle", ammoType), particleFileName);
31
32 // If we found a valid entry, try looking for it in ParticleList
33 if ( particleFileName != "" )
34 {
35 particleID = ParticleList.GetParticleIDByName(particleFileName);
36 }
37
38 // Store it for next search
39 m_AmmoParticles.Insert(ammoType, particleID);
40 }
41
42 return particleID;
43 }
static ref map< string, int > m_AmmoParticles
Key: Ammo class name; Data: ParticleList ID.
Определения AmmoEffects.c:8
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto native CGame GetGame()

Перекрестные ссылки CGame::ConfigGetText(), GetGame(), ParticleList::GetParticleIDByName() и m_AmmoParticles.

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