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

◆ LoadParticleConfigOnOverheating()

void InventoryItem::LoadParticleConfigOnOverheating ( int id)
inlineprivate

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

474 {
477
478 if (!m_OnOverheatingEffect.Contains(id))
479 {
480 string config_to_search = "CfgVehicles";
481
482 if (IsInherited(Weapon))
483 config_to_search = "CfgWeapons";
484
485 string muzzle_owner_config = config_to_search + " " + GetType() + " ";
486 string config_OnOverheating_class = muzzle_owner_config + "Particles " + "OnOverheating ";
487
488 if (g_Game.ConfigIsExisting(config_OnOverheating_class))
489 {
490
491 m_ShotsToStartOverheating = g_Game.ConfigGetFloat(config_OnOverheating_class + "shotsToStartOverheating");
492
494 {
495 m_ShotsToStartOverheating = -1; // This prevents futher readings from config for future creations of this item
496 string error = "Error reading config " + GetType() + ">Particles>OnOverheating - Parameter shotsToStartOverheating is configured wrong or is missing! Its value must be 1 or higher!";
497 Error(error);
498 return;
499 }
500
501 m_OverheatingDecayInterval = g_Game.ConfigGetFloat(config_OnOverheating_class + "overheatingDecayInterval");
502 m_MaxOverheatingValue = g_Game.ConfigGetFloat(config_OnOverheating_class + "maxOverheatingValue");
503
504
505
506 int config_OnOverheating_subclass_count = g_Game.ConfigGetChildrenCount(config_OnOverheating_class);
507 array<ref WeaponParticlesOnOverheating> WPOOH_array = new array<ref WeaponParticlesOnOverheating>;
508
509 for (int i = 0; i < config_OnOverheating_subclass_count; i++)
510 {
511 string particle_class = "";
512 g_Game.ConfigGetChildName(config_OnOverheating_class, i, particle_class);
513 string config_OnOverheating_entry = config_OnOverheating_class + particle_class;
514 int entry_type = g_Game.ConfigGetType(config_OnOverheating_entry);
515
516 if (entry_type == CT_CLASS)
517 {
518 WeaponParticlesOnOverheating WPOF = new WeaponParticlesOnOverheating(this, config_OnOverheating_entry);
519 WPOOH_array.Insert(WPOF);
520 }
521 }
522
523
524 m_OnOverheatingEffect.Insert(id, WPOOH_array);
525 }
526 }
527 }
eBleedingSourceType GetType()
map
Определения ControlsXboxNew.c:4
DayZGame g_Game
Определения DayZGame.c:3942
int m_MaxOverheatingValue
Определения ItemBase.c:117
int m_ShotsToStartOverheating
Определения ItemBase.c:116
float m_OverheatingDecayInterval
Определения ItemBase.c:118
ref map< int, ref array< ref WeaponParticlesOnOverheating > > m_OnOverheatingEffect
Определения ItemBase.c:108
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки Error(), g_Game, GetType(), m_MaxOverheatingValue, m_OnOverheatingEffect, m_OverheatingDecayInterval и m_ShotsToStartOverheating.