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

◆ CanChangeStance()

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

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

4025 {
4026 // Check if the player is trying to perform restricted action while changing stance
4028 return false;
4029
4030 // Check if the player is playing a throwing animation
4031 if (GetThrowing().IsThrowingAnimationPlaying())
4032 return false;
4033
4034 // don't allow base stance change, only raised hands change
4035 if (IsRolling())
4036 {
4037 if (Math.AbsInt(previousStance - newStance) == 3)
4038 return true;
4039
4040 return false;
4041 }
4042
4043 // Check if the player is going to crouch or raised crouch
4044 if (newStance == DayZPlayerConstants.STANCEIDX_CROUCH || newStance == DayZPlayerConstants.STANCEIDX_RAISEDCROUCH)
4045 {
4046 return GetCurrentWaterLevel() <= GetDayZPlayerType().CommandSwimSettingsW().m_fToErectLevel;
4047 }
4048
4049 // Check if the player is going to prone
4050 if (newStance == DayZPlayerConstants.STANCEIDX_PRONE || newStance == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
4051 {
4052 return GetCurrentWaterLevel() <= GetDayZPlayerType().CommandSwimSettingsW().m_fToCrouchLevel;
4053 }
4054
4055 // The player can change stance if none of the conditions above are met
4056 return true;
4057 }
override bool CanBePerformedWhileChangingStance()
Определения ActionUnfoldMap.c:262
bool IsRolling()
Определения PlayerBase.c:5211
ActionManagerBase GetActionManager()
Определения PlayerBase.c:1699
proto native DayZPlayerType GetDayZPlayerType()
returns appropriate DayZPlayerType
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
float GetCurrentWaterLevel()
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
Определения ActionManagerBase.c:91

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