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

◆ AttachBleedingToZonesByHeight()

void AttachBleedingToZonesByHeight ( notnull PlayerBase pPlayer)
private

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

189 {
190 Math.Randomize(g_Game.GetTime());
191
192 int bleedingSelectionIndex;
193 BleedingSourcesManagerServer bleedingManager = pPlayer.GetBleedingManagerServer();
194 if (Math.RandomFloatInclusive(0.0, 1.0) <= m_FallDamageData.m_BleedingChanceCoef && m_FallDamageData.m_BleedingHandsCoef == 1.0 && pPlayer.FindAttachmentBySlotName("Gloves") == null)
195 {
196 bleedingSelectionIndex = Math.RandomInt(0, 2);
197 bleedingManager.AttemptAddBleedingSourceBySelection(BLEEDING_HANDS_SELECTIONS[bleedingSelectionIndex]);
198 }
199
200 if (Math.RandomFloatInclusive(0.0, 1.0) <= m_FallDamageData.m_BleedingChanceCoef && m_FallDamageData.m_BleedingFeetCoef == 1.0 && pPlayer.FindAttachmentBySlotName("Feet") == null)
201 {
202
203 bleedingSelectionIndex = Math.RandomInt(0, 2);
204 bleedingManager.AttemptAddBleedingSourceBySelection(BLEEDING_FEET_SELECTIONS[bleedingSelectionIndex]);
205 }
206 if (Math.RandomFloatInclusive(0.0, 1.0) <= m_FallDamageData.m_BleedingChanceLegsCoef && m_FallDamageData.m_BleedingLegsCoef == 1.0)
207 {
208
209 bleedingSelectionIndex = Math.RandomInt(0, 2);
210 bleedingManager.AttemptAddBleedingSourceBySelection(BLEEDING_LEGS_SELECTIONS[bleedingSelectionIndex]);
211 }
212 }
DayZGame g_Game
Определения DayZGame.c:4074
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
Определения EnMath.c:7
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, g_Game, m_FallDamageData, Math::RandomFloatInclusive(), Math::RandomInt() и Math::Randomize().

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