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

◆ LoadParticleConfigOnOverheating()

void InventoryItem::LoadParticleConfigOnOverheating ( int id)
inlineprivate

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

464 {
467
468 if (!m_OnOverheatingEffect.Contains(id))
469 {
470 string config_to_search = "CfgVehicles";
471
472 if (IsInherited(Weapon))
473 config_to_search = "CfgWeapons";
474
475 string muzzle_owner_config = config_to_search + " " + GetType() + " ";
476 string config_OnOverheating_class = muzzle_owner_config + "Particles " + "OnOverheating ";
477
478 if (GetGame().ConfigIsExisting(config_OnOverheating_class))
479 {
480
481 m_ShotsToStartOverheating = GetGame().ConfigGetFloat(config_OnOverheating_class + "shotsToStartOverheating");
482
484 {
485 m_ShotsToStartOverheating = -1; // This prevents futher readings from config for future creations of this item
486 string error = "Error reading config " + GetType() + ">Particles>OnOverheating - Parameter shotsToStartOverheating is configured wrong or is missing! Its value must be 1 or higher!";
487 Error(error);
488 return;
489 }
490
491 m_OverheatingDecayInterval = GetGame().ConfigGetFloat(config_OnOverheating_class + "overheatingDecayInterval");
492 m_MaxOverheatingValue = GetGame().ConfigGetFloat(config_OnOverheating_class + "maxOverheatingValue");
493
494
495
496 int config_OnOverheating_subclass_count = GetGame().ConfigGetChildrenCount(config_OnOverheating_class);
497 array<ref WeaponParticlesOnOverheating> WPOOH_array = new array<ref WeaponParticlesOnOverheating>;
498
499 for (int i = 0; i < config_OnOverheating_subclass_count; i++)
500 {
501 string particle_class = "";
502 GetGame().ConfigGetChildName(config_OnOverheating_class, i, particle_class);
503 string config_OnOverheating_entry = config_OnOverheating_class + particle_class;
504 int entry_type = GetGame().ConfigGetType(config_OnOverheating_entry);
505
506 if (entry_type == CT_CLASS)
507 {
508 WeaponParticlesOnOverheating WPOF = new WeaponParticlesOnOverheating(this, config_OnOverheating_entry);
509 WPOOH_array.Insert(WPOF);
510 }
511 }
512
513
514 m_OnOverheatingEffect.Insert(id, WPOOH_array);
515 }
516 }
517 }
eBleedingSourceType GetType()
Определения BleedingSource.c:63
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 float ConfigGetFloat(string path)
Get float value from config on path.
proto native int ConfigGetType(string path)
Returns type of config value.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
int m_MaxOverheatingValue
Определения ItemBase.c:111
int m_ShotsToStartOverheating
Определения ItemBase.c:110
float m_OverheatingDecayInterval
Определения ItemBase.c:112
ref map< int, ref array< ref WeaponParticlesOnOverheating > > m_OnOverheatingEffect
Определения ItemBase.c:102
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки CGame::ConfigGetChildName(), CGame::ConfigGetChildrenCount(), CGame::ConfigGetFloat(), CGame::ConfigGetType(), Error(), GetGame(), GetType(), m_MaxOverheatingValue, m_OnOverheatingEffect, m_OverheatingDecayInterval и m_ShotsToStartOverheating.