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

Закрытые члены

void DayZPlayerImplementJumpClimb (DayZPlayerImplement pPlayer)
 
bool WasSuccessful ()
 Only valid immediately after 'JumpOrClimb' is called.
 
void JumpOrClimb ()
 Can't change to bool return.
 
void CheckAndFinishJump (int pLandType=0)
 
bool Climb (SHumanCommandClimbResult pClimbRes)
 
void Jump ()
 
int GetClimbType (float pHeight)
 

Закрытые данные

bool m_bIsJumpInProgress
 
DayZPlayerImplement m_Player
 
bool m_bWasClimb
 

Подробное описание

Конструктор(ы)

◆ DayZPlayerImplementJumpClimb()

9 {
11 }
DayZPlayerImplement m_Player
Definition DayZPlayerImplementJumpClimb.c:5
Definition EntityAI.c:95

Перекрестные ссылки m_Player.

Методы

◆ CheckAndFinishJump()

void CheckAndFinishJump ( int pLandType = 0)
inlineprivate
69 {
71 {
72 m_bIsJumpInProgress = false;
73 m_Player.OnJumpEnd(pLandType);
74 }
75 }
bool m_bIsJumpInProgress
Definition DayZPlayerImplementJumpClimb.c:3

Перекрестные ссылки m_bIsJumpInProgress и m_Player.

◆ Climb()

bool Climb ( SHumanCommandClimbResult pClimbRes)
inlineprivate
78 {
79 int climbType = GetClimbType(pClimbRes.m_fClimbHeight);
80 if (climbType != -1)
81 {
82 m_Player.StartCommand_Climb(pClimbRes, climbType);
83 m_Player.StopHandEvent();
84
85 m_bWasClimb = true;
86 }
87
88 return climbType != -1;
89 }
bool m_bWasClimb
Definition DayZPlayerImplementJumpClimb.c:6
int GetClimbType(float pHeight)
Definition DayZPlayerImplementJumpClimb.c:101

Перекрестные ссылки GetClimbType(), m_bWasClimb и m_Player.

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

◆ GetClimbType()

int GetClimbType ( float pHeight)
inlineprivate
102 {
103 int climbType = -1;
104 if (pHeight < 1.1)
105 climbType = 0;
106 else if (pHeight >= 1.1 && pHeight < 1.7)
107 climbType = 1;
108 else if (pHeight >= 1.7 && pHeight < 2.75)
109 climbType = 2;
110
111 return climbType;
112 }

Используется в Climb() и JumpOrClimb().

◆ Jump()

void Jump ( )
inlineprivate
92 {
94 m_Player.SetFallYDiff(m_Player.PhysicsGetPositionWS()[1]);
95
96 m_Player.OnJumpStart();
97 m_Player.StartCommand_Fall(2.6);
98 m_Player.StopHandEvent();
99 }

Перекрестные ссылки m_bIsJumpInProgress и m_Player.

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

◆ JumpOrClimb()

void JumpOrClimb ( )
inlineprivate

Can't change to bool return.

Reset states

Early exit if the player is being heavy damaged so the stagger animation can't be skipped

21 {
23 m_bWasClimb = false;
24
26 if (m_Player.IsInFullbodyDamageAnimation())
27 return;
28
29 SHumanCommandClimbSettings hcls = m_Player.GetDayZPlayerType().CommandClimbSettingsW();
30
31 if (m_Player.m_MovementState.m_iMovement != DayZPlayerConstants.MOVEMENTIDX_IDLE)
32 hcls.m_fFwMaxDistance = 2.5;
33 else
34 hcls.m_fFwMaxDistance = 1.2;
35
36 if (m_Player.m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_SWIM)
37 hcls.m_fBackwardsCheckDist = 0.35;
38 else
39 hcls.m_fBackwardsCheckDist = 0;
40
42
44 if (climbRes.m_bIsClimb || climbRes.m_bIsClimbOver)
45 {
46 int climbType = GetClimbType(climbRes.m_fClimbHeight);
47 if (!m_Player.CanClimb(climbType, climbRes))
48 return;
49
50 if (Climb(climbRes))
51 {
52 if (climbType == 1)
53 m_Player.DepleteStamina(EStaminaModifiers.VAULT);
54 else if (climbType == 2)
55 m_Player.DepleteStamina(EStaminaModifiers.CLIMB);
56
57 return;
58 }
59 }
60
61 if (m_Player.CanJump())
62 {
63 Jump();
64 m_Player.DepleteStamina(EStaminaModifiers.JUMP);
65 }
66 }
EStaminaModifiers
Definition EStaminaModifiers.c:2
bool Climb(SHumanCommandClimbResult pClimbRes)
Definition DayZPlayerImplementJumpClimb.c:77
void Jump()
Definition DayZPlayerImplementJumpClimb.c:91
command itself
Definition human.c:773
proto static native bool DoPerformClimbTest(Human pHuman, SHumanCommandClimbResult pResult, int pDebugDrawLevel)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602
class SHumanCommandSwimSettings SHumanCommandClimbSettings()
Definition humansettings.c:74

Перекрестные ссылки Climb(), HumanCommandClimb::DoPerformClimbTest(), GetClimbType(), Jump(), m_bWasClimb, m_Player и SHumanCommandClimbSettings().

◆ WasSuccessful()

bool WasSuccessful ( )
inlineprivate

Only valid immediately after 'JumpOrClimb' is called.

15 {
17 }

Перекрестные ссылки m_bIsJumpInProgress и m_bWasClimb.

Поля

◆ m_bIsJumpInProgress

bool m_bIsJumpInProgress
private

Используется в CheckAndFinishJump(), Jump() и WasSuccessful().

◆ m_bWasClimb

bool m_bWasClimb
private

Используется в Climb(), JumpOrClimb() и WasSuccessful().

◆ m_Player


Объявления и описания членов класса находятся в файле: