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

◆ GetDrowningWaterLevelCheck()

bool ManBase::GetDrowningWaterLevelCheck ( )
inlineprotected

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

6588 {
6589 int index = GetBoneIndexByName("head");
6590 vector pos = GetBonePositionWS(index);
6591 float depth = g_Game.GetWaterDepth(pos);
6592
6593 if (IsSwimming())
6594 {
6595 return depth > PlayerConstants.DROWNING_SWIMMING_THRESHOLD;
6596 }
6597 else if (IsUnconscious())
6598 {
6599 return depth > PlayerConstants.DROWNING_UNCONSCIOUS_THRESHOLD;
6600 }
6601 return depth > PlayerConstants.DROWNING_DEFAULT_THRESHOLD;
6602 }
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:3536

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

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