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

◆ GetDrowningWaterLevelCheck()

bool ManBase::GetDrowningWaterLevelCheck ( )
inlineprotected

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

6814 {
6815 int index = GetBoneIndexByName("head");
6816 vector pos = GetBonePositionWS(index);
6817 float depth = g_Game.GetWaterDepth(pos);
6818
6819 if (IsSwimming())
6820 {
6821 return depth > PlayerConstants.DROWNING_SWIMMING_THRESHOLD;
6822 }
6823 else if (IsUnconscious())
6824 {
6825 return depth > PlayerConstants.DROWNING_UNCONSCIOUS_THRESHOLD;
6826 }
6827 return depth > PlayerConstants.DROWNING_DEFAULT_THRESHOLD;
6828 }
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
DayZGame g_Game
Определения DayZGame.c:3942
override bool IsUnconscious()
Определения PlayerBase.c:3655

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

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