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

◆ DecreaseCookedItemQuantity()

void DecreaseCookedItemQuantity ( notnull Edible_Base pItem,
float pAmount = 0.0 )
protected

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

520 {
521 if (GetGame().IsServer())
522 {
523 float quantity = pItem.GetQuantity() - pAmount;
524 quantity = Math.Clamp(quantity, 0, pItem.GetQuantityMax());
525 pItem.SetQuantity(quantity);
526 }
527 }
Определения EnMath.c:7
proto native CGame GetGame()
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() и GetGame().

Используется в UpdateCookingState() и UpdateCookingStateOnStick().