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

◆ CanChangeStance()

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

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

4181 {
4182 // Check if the player is trying to perform restricted action while changing stance
4184 return false;
4185
4186 // Check if the player is playing a throwing animation
4187 if (GetThrowing().IsThrowingAnimationPlaying())
4188 return false;
4189
4190 // don't allow base stance change, only raised hands change
4191 if (IsRolling())
4192 {
4193 if (Math.AbsInt(previousStance - newStance) == 3)
4194 return true;
4195
4196 return false;
4197 }
4198
4199 // Check if the player is going to crouch or raised crouch
4200 if (newStance == DayZPlayerConstants.STANCEIDX_CROUCH || newStance == DayZPlayerConstants.STANCEIDX_RAISEDCROUCH)
4201 {
4202 return GetCurrentWaterLevel() <= GetDayZPlayerType().CommandSwimSettingsW().m_fToErectLevel;
4203 }
4204
4205 // Check if the player is going to prone
4206 if (newStance == DayZPlayerConstants.STANCEIDX_PRONE || newStance == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
4207 {
4208 return GetCurrentWaterLevel() <= GetDayZPlayerType().CommandSwimSettingsW().m_fToCrouchLevel;
4209 }
4210
4211 // The player can change stance if none of the conditions above are met
4212 return true;
4213 }
override bool CanBePerformedWhileChangingStance()
Определения ActionUnfoldMap.c:258
bool IsRolling()
Определения PlayerBase.c:5368
ActionManagerBase GetActionManager()
Определения PlayerBase.c:1829
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().