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

◆ GetDrowningWaterLevelCheck()

bool ManBase::GetDrowningWaterLevelCheck ( )
inlineprotected

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

6580 {
6581 int index = GetBoneIndexByName("head");
6582 vector pos = GetBonePositionWS(index);
6583 float depth = g_Game.GetWaterDepth(pos);
6584
6585 if (IsSwimming())
6586 {
6587 return depth > PlayerConstants.DROWNING_SWIMMING_THRESHOLD;
6588 }
6589 else if (IsUnconscious())
6590 {
6591 return depth > PlayerConstants.DROWNING_UNCONSCIOUS_THRESHOLD;
6592 }
6593 return depth > PlayerConstants.DROWNING_DEFAULT_THRESHOLD;
6594 }
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
DayZGame g_Game
Определения DayZGame.c:3868
override bool IsUnconscious()
Определения PlayerBase.c:3518

Перекрестные ссылки PlayerConstants::DROWNING_DEFAULT_THRESHOLD, PlayerConstants::DROWNING_SWIMMING_THRESHOLD, PlayerConstants::DROWNING_UNCONSCIOUS_THRESHOLD, g_Game, GetBoneIndexByName() и IsUnconscious().

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