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

◆ SetFromProjectile()

override void Ammunition_Base::SetFromProjectile ( ProjectileStoppedInfo info)
inlineprotected

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

51 {
52 float dmgPerUse = g_Game.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 }
DayZGame g_Game
Определения DayZGame.c:3942
override void SetQuantityToMinimum()
Определения AmmunitionPiles.c:45
proto native string GetAmmoType()
proto native float GetProjectileDamage()

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