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

◆ CanChangeStance()

override bool ManBase::CanChangeStance ( int previousStance,
int newStance )
inlineprotected

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

4037 {
4038 // Check if the player is playing a throwing animation
4039 if (GetThrowing().IsThrowingAnimationPlaying())
4040 {
4041 return false;
4042 }
4043
4044 // don't allow base stance change, only raised hands change
4045 if (IsRolling())
4046 {
4047 if (Math.AbsInt(previousStance - newStance) == 3)
4048 return true;
4049
4050 return false;
4051 }
4052
4053 // Check if the player is going to crouch or raised crouch
4054 if (newStance == DayZPlayerConstants.STANCEIDX_CROUCH || newStance == DayZPlayerConstants.STANCEIDX_RAISEDCROUCH)
4055 {
4056 return GetCurrentWaterLevel() <= GetDayZPlayerType().CommandSwimSettingsW().m_fToErectLevel;
4057 }
4058
4059 // Check if the player is going to prone
4060 if (newStance == DayZPlayerConstants.STANCEIDX_PRONE || newStance == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
4061 {
4062 return GetCurrentWaterLevel() <= GetDayZPlayerType().CommandSwimSettingsW().m_fToCrouchLevel;
4063 }
4064
4065 // The player can change stance if none of the conditions above are met
4066 return true;
4067 }
bool IsRolling()
Определения PlayerBase.c:5221
proto native DayZPlayerType GetDayZPlayerType()
returns appropriate DayZPlayerType
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
float GetCurrentWaterLevel()

Перекрестные ссылки Math::AbsInt(), GetCurrentWaterLevel(), GetDayZPlayerType() и IsRolling().