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

◆ AttachBleedingToZonesByHeight()

void AttachBleedingToZonesByHeight ( notnull PlayerBase pPlayer)
private

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

177 {
179
180 int bleedingSelectionIndex;
181 BleedingSourcesManagerServer bleedingManager = pPlayer.GetBleedingManagerServer();
182 if (Math.RandomFloatInclusive(0.0, 1.0) <= m_FallDamageData.m_BleedingChanceCoef && m_FallDamageData.m_BleedingHandsCoef == 1.0 && pPlayer.FindAttachmentBySlotName("Gloves") == null)
183 {
184 bleedingSelectionIndex = Math.RandomInt(0, 2);
185 bleedingManager.AttemptAddBleedingSourceBySelection(BLEEDING_HANDS_SELECTIONS[bleedingSelectionIndex]);
186 }
187
188 if (Math.RandomFloatInclusive(0.0, 1.0) <= m_FallDamageData.m_BleedingChanceCoef && m_FallDamageData.m_BleedingFeetCoef == 1.0 && pPlayer.FindAttachmentBySlotName("Feet") == null)
189 {
190
191 bleedingSelectionIndex = Math.RandomInt(0, 2);
192 bleedingManager.AttemptAddBleedingSourceBySelection(BLEEDING_FEET_SELECTIONS[bleedingSelectionIndex]);
193 }
194 if (Math.RandomFloatInclusive(0.0, 1.0) <= m_FallDamageData.m_BleedingChanceLegsCoef && m_FallDamageData.m_BleedingLegsCoef == 1.0)
195 {
196
197 bleedingSelectionIndex = Math.RandomInt(0, 2);
198 bleedingManager.AttemptAddBleedingSourceBySelection(BLEEDING_LEGS_SELECTIONS[bleedingSelectionIndex]);
199 }
200 }
ref FallDamageData m_FallDamageData
Определения DayZPlayerImplementFallDamage.c:66
static const string BLEEDING_FEET_SELECTIONS[2]
Определения DayZPlayerImplementFallDamage.c:58
static const string BLEEDING_HANDS_SELECTIONS[2]
Определения DayZPlayerImplementFallDamage.c:57
static const string BLEEDING_LEGS_SELECTIONS[2]
Определения DayZPlayerImplementFallDamage.c:59
float GetTime()
Определения NotificationSystem.c:35
Определения EnMath.c:7
proto native CGame GetGame()
static proto int Randomize(int seed)
Sets the seed for the random number generator.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Определения EnMath.c:106
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].

Перекрестные ссылки BLEEDING_FEET_SELECTIONS, BLEEDING_HANDS_SELECTIONS, BLEEDING_LEGS_SELECTIONS, GetGame(), GetTime(), m_FallDamageData, Math::RandomFloatInclusive(), Math::RandomInt() и Math::Randomize().

Используется в HandleFallDamage().