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

◆ GetDrowningWaterLevelCheck()

bool ManBase::GetDrowningWaterLevelCheck ( )
inlineprotected

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

7135 {
7136 int index = GetBoneIndexByName("head");
7137 vector pos = GetBonePositionWS(index);
7138 float depth = g_Game.GetWaterDepth(pos);
7139
7140 if (IsSwimming())
7141 {
7142 return depth > PlayerConstants.DROWNING_SWIMMING_THRESHOLD;
7143 }
7144 else if (IsUnconscious())
7145 {
7146 return depth > PlayerConstants.DROWNING_UNCONSCIOUS_THRESHOLD;
7147 }
7148 return depth > PlayerConstants.DROWNING_DEFAULT_THRESHOLD;
7149 }
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
DayZGame g_Game
Определения DayZGame.c:4074
override bool IsUnconscious()
Определения PlayerBase.c:3925

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

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