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

◆ DecreaseCookedItemQuantity()

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

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

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

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