Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
humanitems.h
Go to the documentation of this file.
2// *************************************************************************************
3// ! HumanItemBehaviorCfg - per item config of stances / movements
4// *************************************************************************************
6{
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;
15 int m_iType;
16
17 int m_iStanceMask;
18 int m_StanceMovements[6];
19 int m_StanceRotation[6];
20 int m_IKSettings[24];
21 int m_iPerItemCameraUserData;
24 float m_fMoveHeadingFilterSpan;
25 float m_fMoveHeadingFilterSpeed;
28 float m_fMeleeEvadeHeadingFilterSpan;
29 float m_fMeleeEvadeHeadingFilterSpeed;
30
31
33 bool m_bAttackLean;
34
36 bool m_bJumpAllowed;
37
38
39 void SetIK(int pStance, int pMovement, bool pAim, bool pRArm, bool pLArm)
40 {
41 int val = 0;
42 if (pAim) val |= IKSETTING_AIMING;
43 if (pRArm) val |= IKSETTING_RHAND;
44 if (pLArm) val |= IKSETTING_LHAND;
45
46 // Print("Setting ik " + pStance.ToString() + "," + pMovement.ToString() );
47 pStance = pStance*4;
48 pStance = pStance + pMovement;
49
50 // Print("Setting ik " + pStance.ToString() + " to value " + val.ToString() );
51 m_IKSettings[pStance] = val;
52 }
53
54 void SetIKStance(int pStance, bool pAim, bool pRArm, bool pLArm)
55 {
56 int val = 0;
57 if (pAim) val |= IKSETTING_AIMING;
58 if (pRArm) val |= IKSETTING_RHAND;
59 if (pLArm) val |= IKSETTING_LHAND;
60
61 int bo = pStance * 4;
63 for (int i = 0; i < 4; i++)
64 {
65 m_IKSettings[bo+i] = val;
66 }
67 }
68
69 void SetIKAll(bool pAim, bool pRArm, bool pLArm)
70 {
71 int val = 0;
72 if (pAim) val |= IKSETTING_AIMING;
73 if (pRArm) val |= IKSETTING_RHAND;
74 if (pLArm) val |= IKSETTING_LHAND;
75
76 for (int i = 0; i < 24; i++)
77 {
78 m_IKSettings[i] = val;
79 }
80 }
81
82
83}
84
85
86
87// *************************************************************************************
88// ! HumanItemAccessor - item helpers
89// *************************************************************************************
90class HumanItemAccessor
91{
93 proto native void OnItemInHandsChanged(bool pInstant = false);
94
96 proto native void ResetWeaponInHands();
97
99 proto native void HideItemInHands(bool pState);
100
102 proto native bool IsItemInHandsHidden();
103
105 proto native bool IsItemInHandsWeapon();
106
108 proto native bool WeaponGetCameraPoint(out vector pPos, out vector pRot);
109
111 proto native bool WeaponGetCameraPointMSTransform (notnull EntityAI pCamEntity, vector pCamPoint, vector pCamDir, out vector pTm[4]);
112
114 proto native bool WeaponGetCameraPointBoneRelative(notnull EntityAI pCamEntity, vector pCamPoint, vector pCamDir, int pBoneIndex, out vector pTm[4]);
115
117 proto native bool WeaponGetAimingModelDirTm(out vector pTm[4]);
118
121
122 private void HumanItemAccessor()
123 {
124 }
125
126 private void ~HumanItemAccessor()
127 {
128 }
129}
void HideItemInHands()
int m_IKSettings[24]
Definition humanitems.c:13
proto native void ResetWeaponInHands()
reset weapon anim override in case of premature death
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 -
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
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
proto native bool IsItemInHandsWeapon()
returns true if item in hands is a weapon