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

◆ SetFromProjectile()

override void Ammunition_Base::SetFromProjectile ( ProjectileStoppedInfo info)
inlineprotected

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

51 {
52 float dmgPerUse = GetGame().ConfigGetFloat("cfgAmmo " + info.GetAmmoType() + " dmgPerUse");
53 float totalDmg = info.GetProjectileDamage() + dmgPerUse;
54 float health = Math.Max(1 - totalDmg, 0);
55
57 SetHealth01("","", health);
58
59 // SetCartridgeDamageAtIndex() MUST be called AFTER SetHealth01()!!
60 // otherwise, decreasing health by less than an entire health level get ignored
61 SetCartridgeDamageAtIndex(0, totalDmg);
62 }
override void SetQuantityToMinimum()
Определения AmmunitionPiles.c:45
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native string GetAmmoType()
proto native float GetProjectileDamage()
proto native CGame GetGame()

Перекрестные ссылки CGame::ConfigGetFloat(), ProjectileStoppedInfo::GetAmmoType(), GetGame(), ProjectileStoppedInfo::GetProjectileDamage(), Math::Max() и SetQuantityToMinimum().