DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
humanitems.c
См. документацию.
2// *************************************************************************************
3// ! HumanItemBehaviorCfg - per item config of stances / movements
4// *************************************************************************************
7
8 // static int DEFMOVEMENT = MOVEMENT_IDLE | MOVEMENT_WALK | MOVEMENT_RUN | SPRINT;
9
11 static int IKSETTING_AIMING = 0x1;
12 static int IKSETTING_RHAND = 0x2;
13 static int IKSETTING_LHAND = 0x4;
16
20 int m_IKSettings[24];
23
33
40
41 private bool m_bPlaceholder;
42
43
44 void SetIK(int pStance, int pMovement, bool pAim, bool pRArm, bool pLArm)
45 {
46 int val = 0;
47 if (pAim) val |= IKSETTING_AIMING;
48 if (pRArm) val |= IKSETTING_RHAND;
49 if (pLArm) val |= IKSETTING_LHAND;
50
51 // Print("Setting ik " + pStance.ToString() + "," + pMovement.ToString() );
52 pStance = pStance * 4;
53 pStance = pStance + pMovement;
54
55 // Print("Setting ik " + pStance.ToString() + " to value " + val.ToString() );
56 m_IKSettings[pStance] = val;
57 }
58
59 void SetIKStance(int pStance, bool pAim, bool pRArm, bool pLArm)
60 {
61 int val = 0;
62 if (pAim) val |= IKSETTING_AIMING;
63 if (pRArm) val |= IKSETTING_RHAND;
64 if (pLArm) val |= IKSETTING_LHAND;
65
66 int bo = pStance * 4;
68 for (int i = 0; i < 4; i++)
69 {
70 m_IKSettings[bo+i] = val;
71 }
72 }
73
74 void SetIKMelee(int pHitType, bool pAim, bool pRArm, bool pLArm)
75 {
76 int val = 0;
77 if (pAim) val |= IKSETTING_AIMING;
78 if (pRArm) val |= IKSETTING_RHAND;
79 if (pLArm) val |= IKSETTING_LHAND;
80
81 m_IKSettingsMelee[pHitType] = val;
82 }
83
84 void SetIKAll(bool pAim, bool pRArm, bool pLArm)
85 {
86 int val = 0;
87 if (pAim) val |= IKSETTING_AIMING;
88 if (pRArm) val |= IKSETTING_RHAND;
89 if (pLArm) val |= IKSETTING_LHAND;
90
91 int i;
92 for (i = 0; i < 24; i++)
93 {
94 m_IKSettings[i] = val;
95 }
96
97 for (i = 0; i < 2; i++)
98 {
99 m_IKSettingsMelee[i] = val;
100 }
101 }
102
103
104}
105
106// *************************************************************************************
107// ! HumanItemAccessor - item helpers
108// *************************************************************************************
110{
112 proto native void OnItemInHandsChanged(bool pInstant = false);
113
115 proto native void ResetWeaponInHands();
116
118 proto native void HideItemInHands(bool pState);
119
121 proto native bool IsItemInHandsHidden();
122
124 proto native bool IsItemInHandsWeapon();
125
127 proto native bool WeaponGetCameraPoint(out vector pPos, out vector pRot);
128
130 proto native bool WeaponGetCameraPointMSTransform (notnull EntityAI pCamEntity, vector pCamPoint, vector pCamDir, out vector pTm[4]);
131
133 proto native bool WeaponGetCameraPointBoneRelative(notnull EntityAI pCamEntity, vector pCamPoint, vector pCamDir, int pBoneIndex, out vector pTm[4]);
134
136 proto native bool WeaponGetAimingModelDirTm(out vector pTm[4]);
137
140
141 private void HumanItemAccessor()
142 {
143 }
144
145 private void ~HumanItemAccessor()
146 {
147 }
148}
void HideItemInHands()
Определения EmoteManager.c:662
Определения Building.c:6
bool m_bPlaceholder
default true
Определения humanitems.c:41
void SetIKMelee(int pHitType, bool pAim, bool pRArm, bool pLArm)
Определения humanitems.c:74
int m_IKSettingsMelee[2]
[stance][movement] mask for ik
Определения humanitems.c:21
int m_iStanceMask
combinations of STANCEMASK_
Определения humanitems.c:17
float m_fMeleeEvadeHeadingFilterSpan
max speed of alignment when moving
Определения humanitems.c:31
void SetIKStance(int pStance, bool pAim, bool pRArm, bool pLArm)
Определения humanitems.c:59
bool m_bJumpAllowed
default false
Определения humanitems.c:39
float m_fMoveHeadingSprintFilterSpan
default delay of alignment when moving
Определения humanitems.c:26
bool m_bAttackLean
max speed of alignment when evading
Определения humanitems.c:36
float m_fMoveHeadingFilterSpeed
delay of alignment when moving in prone stance
Определения humanitems.c:28
static int IKSETTING_RHAND
Определения humanitems.c:12
static int IKSETTING_AIMING
bit mask of ik settings
Определения humanitems.c:11
void SetIK(int pStance, int pMovement, bool pAim, bool pRArm, bool pLArm)
Определения humanitems.c:44
float m_fMoveHeadingProneFilterSpan
delay of alignment when sprintinh
Определения humanitems.c:27
int m_iType
Определения humanitems.c:15
float m_fMoveHeadingFilterSpan
per item camera user data - can be obtained in runtime by DayZPlayer.GetPerItemCameraUD()
Определения humanitems.c:25
float m_fMeleeEvadeHeadingFilterSpeed
delay of alignment when evading
Определения humanitems.c:32
static int IKSETTING_LHAND
Определения humanitems.c:13
int m_StanceMovements[6]
Определения humanitems.c:18
void SetIKAll(bool pAim, bool pRArm, bool pLArm)
Определения humanitems.c:84
int m_StanceRotation[6]
6 stances -> all has movement mask, STANCEIDX_ ... is index
Определения humanitems.c:19
int m_iPerItemCameraUserData
[inpact type] mask for ik (0 - light/1 - heavy)
Определения humanitems.c:22
int m_IKSettings[24]
Определения humanitems.c:20
Определения humanitems.c:6
Определения EnConvert.c:106
static int IKSETTING_AIMING
bit mask of ik settings
Определения humanitems.c:4
int m_IKSettings[24]
Определения humanitems.c:13
proto native void ResetWeaponInHands()
reset weapon anim override in case of premature death
int m_IKSettingsMelee[2]
[stance][movement] mask for ik
Определения humanitems.c:14
proto native HumanItemBehaviorCfg GetItemInHandsBehaviourCfg()
proto native bool IsItemInHandsHidden()
returns if item in hands is hidden visually
proto native bool WeaponGetCameraPointBoneRelative(notnull EntityAI pCamEntity, vector pCamPoint, vector pCamDir, int pBoneIndex, out vector pTm[4])
returns true if weapon is item and it has camera point - model space matrix -
void HumanItemAccessor()
Определения humanitems.c:141
proto native bool WeaponGetCameraPoint(out vector pPos, out vector pRot)
returns true if weapon is item and it has camera point - local pos, dir in weapon space
static int IKSETTING_RHAND
Определения humanitems.c:5
proto native bool WeaponGetAimingModelDirTm(out vector pTm[4])
return current aiming point from aiming model (additive swaying applied - no recoil points)
proto native bool WeaponGetCameraPointMSTransform(notnull EntityAI pCamEntity, vector pCamPoint, vector pCamDir, out vector pTm[4])
returns true if weapon is item and it has camera point - model space matrix -
class HumanItemBehaviorCfg OnItemInHandsChanged(bool pInstant=false)
signalization from script to engine that item in hands changed
static int IKSETTING_LHAND
Определения humanitems.c:6
void ~HumanItemAccessor()
Определения humanitems.c:145
proto native bool IsItemInHandsWeapon()
returns true if item in hands is a weapon