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

◆ ReduceContents()

void ReduceContents ( float percent)
protected

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

167 {
168 percent = Math.Clamp(percent, 0, 100);
169 float reduction = percent * 0.01;
170
171 foreach (StomachItem item : m_StomachContents)
172 {
173 item.AddAmount( -(item.GetAmount() * reduction) );
174 }
175
176 m_StomachVolume -= m_StomachVolume * reduction;
177 }
ref array< ref StomachItem > m_StomachContents
Определения PlayerStomach.c:132
float m_StomachVolume
Определения PlayerStomach.c:137
Определения EnMath.c:7
Определения PlayerStomach.c:2
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.

Перекрестные ссылки Math::Clamp(), m_StomachContents и m_StomachVolume.