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

◆ ApplyWetnessToClothes()

void ActionWashHeadWettingClothesBase::ApplyWetnessToClothes ( PlayerBase player,
bool fromContainer,
float scale )
inlineprotected

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

73 {
74 if (!player)
75 return;
76
77 map<int, float> wetnessBySlot = GetWetnessMap(fromContainer);
78
79 foreach (int slotId, float wetnessValue : wetnessBySlot)
80 {
81 float add = wetnessValue * scale;
82
83 ItemBase clothing = ItemBase.Cast(player.GetInventory().FindAttachment(slotId));
84 if (!clothing)
85 continue;
86
87 clothing.SetWet(Math.Clamp(clothing.GetWet() + add, 0.0, 1.0));
88 }
89 }
class GP5GasMask extends MaskBase ItemBase
map< int, float > GetWetnessMap(bool fromContainer)

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

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