DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
human.c
См. документацию.
6
8{
12};
13
14// *************************************************************************************
15// ! HumanInputController - what we know about the input - human.GetInputController()
16// *************************************************************************************
19 //--------------------------------------------------------------
20
22 proto native void SetDisabled(bool pState);
23
25 proto void GetMovement(out float pSpeed, out vector pLocalDirection);
26
28 proto native float GetHeadingAngle();
29
31 proto native vector GetAimChange();
32
34 proto native vector GetAimDelta(float dt);
35
37 proto native vector GetTracking();
38
40 proto native bool CameraViewChanged();
41
43 proto native bool CameraIsFreeLook();
44
46 proto native void ResetFreeLookToggle();
47
49 proto native bool CameraIsTracking();
50
52 proto native bool Camera3rdIsRightShoulder();
53
54 //--------------------------------------------------------------
55
57 proto native bool IsStanceChange();
58
60 proto native bool IsJumpClimb();
61
62
63 //--------------------------------------------------------------
64
66 proto native bool IsMeleeEvade();
67
69 proto native bool IsMeleeFastAttackModifier();
70
72 proto native int IsMeleeLREvade();
73
75 proto native bool IsMeleeWeaponAttack();
76
77 //--------------------------------------------------------------
78
80 proto native bool WeaponWasRaiseClick();
81
83 proto native bool IsWeaponRaised();
84
86 proto native bool WeaponADS();
87
89 proto native void ResetADS();
90
92 proto native bool IsThrowingModeChange();
93
95 proto native void ResetThrowingMode();
96
98 proto native bool IsWalkToggled();
99
100 //--------------------------------------------------------------
101
106 proto native bool IsUseButton();
107
112 proto native bool IsUseButtonDown();
113
115 proto native bool IsUseItemButton();
117 proto native bool IsUseItemButtonDown();
118
120 proto native bool IsAttackButton();
122 proto native bool IsAttackButtonDown();
123
125 proto native bool IsSingleUse();
126
128 proto native bool IsContinuousUse();
129
131 proto native bool IsContinuousUseStart();
132
134 proto native bool IsContinuousUseEnd();
135
138 proto native bool IsImmediateAction(); //TODO: revise, may be obsolete
139
140 //--------------------------------------------------------------
142
144 proto native bool IsReloadOrMechanismSingleUse();
145
148
151
154
156 proto native bool IsZoom();
157
159 proto native bool IsZoomToggle();
160
162 proto native void ResetZoomToggle();
163
165 proto native bool IsSightChange();
166
168 proto native bool IsZoomIn();
169
171 proto native bool IsZoomOut();
172
174 proto native bool IsFireModeChange();
175
177 proto native bool IsZeroingUp();
178
180 proto native bool IsZeroingDown();
181
183 proto native bool IsHoldBreath();
184
186 proto native void ResetHoldBreath();
187
188 //--------------------------------------------------------------
189
192 proto native int IsGestureSlot();
193
195 proto native bool IsOtherController();
196
197 //--------------------------------------------------------------
198
200 proto native int IsQuickBarSlot();
201
204 proto native bool IsQuickBarSingleUse();
205
208 proto native bool IsQuickBarContinuousUse();
209
212 proto native bool IsQuickBarContinuousUseStart();
213
216 proto native bool IsQuickBarContinuousUseEnd();
217
218
219
220 //--------------------------------------------------------------
221 // LIMITS
222
224 proto native void LimitsDisableSprint(bool pDisable);
225
227 proto native bool LimitsIsSprintDisabled();
228
229
230 //--------------------------------------------------------------
231 // overrides
232
234 proto native void OverrideMovementSpeed(HumanInputControllerOverrideType overrideType, float value);
235
237 proto native void OverrideMovementAngle(HumanInputControllerOverrideType overrideType, float value);
238
240 proto native void OverrideAimChangeX(HumanInputControllerOverrideType overrideType, float value);
241
243 proto native void OverrideAimChangeY(HumanInputControllerOverrideType overrideType, float value);
244
246 proto native void OverrideMeleeEvade(HumanInputControllerOverrideType overrideType, bool value);
247
249 proto native void OverrideRaise(HumanInputControllerOverrideType overrideType, bool value);
250
252 proto native void Override3rdIsRightShoulder(HumanInputControllerOverrideType overrideType, bool value);
253
255 proto native void OverrideFreeLook(HumanInputControllerOverrideType overrideType, bool value);
256
257
258 //--------------------------------------------------------------
259
261 private void HumanInputController()
262 {
263 }
264
267 {
268 }
269}
270
271
272// *************************************************************************************
273// ! HumanInputController - what we know about the input - human.GetInputController()
274// *************************************************************************************
275
278typedef int TAnimGraphTag;
279typedef int TAnimGraphEvent;
280
283{
284 private void HumanAnimInterface();
285 private void ~HumanAnimInterface();
286
287 //-----------------------------------------------------
288 // Binds, returns -1 when error, otherwise if ok
289
291 proto native TAnimGraphCommand BindCommand(string pCommandName);
292
294 proto native TAnimGraphVariable BindVariableFloat(string pVariable);
295 proto native TAnimGraphVariable BindVariableInt(string pVariable);
296 proto native TAnimGraphVariable BindVariableBool(string pVariable);
297
299 proto native TAnimGraphTag BindTag(string pTagName);
300
302 proto native TAnimGraphEvent BindEvent(string pEventName);
303}
304
305
306// *************************************************************************************
307// ! HumanCommandActionCallback - called as action callback
308// *************************************************************************************
310{
311 private void HumanCommandActionCallback();
313
315 proto native Human GetHuman();
316
318 proto native void Cancel();
319
322 proto native void InternalCommand(int pInternalCommandId);
323
325 proto native void SetAligning(vector pPositionWS, vector pDirectionWS);
326
328 proto native void ResetAligning();
329
333 proto native void EnableCancelCondition(bool pEnable);
334
336 proto native bool DefaultCancelCondition();
337
339 proto native void RegisterAnimationEvent(string pAnimationEventStr, int pId);
340
342 proto native void EnableStateChangeCallback();
343
346 // bool CancelCondition() { return false; }
347
349 static const int STATE_NONE = 0;
350
352 static const int STATE_LOOP_IN = 1;
353 static const int STATE_LOOP_LOOP = 2;
354 static const int STATE_LOOP_END = 3;
355 static const int STATE_LOOP_END2 = 4;
356 static const int STATE_LOOP_LOOP2 = 5;
357 static const int STATE_LOOP_ACTION = 6;
358
360 static const int STATE_NORMAL = 7;
361
363 proto native int GetState();
364
365
366 //----------------------------------
367 // debug helper
368
370 static string GetStateString(int pState)
371 {
372 switch (pState)
373 {
374 case STATE_NONE: return "NONE";
375
376 case STATE_LOOP_IN: return "LOOP_IN";
377 case STATE_LOOP_LOOP: return "LOOP_LOOP";
378 case STATE_LOOP_END: return "LOOP_END";
379 case STATE_LOOP_END2: return "LOOP_END2";
380 case STATE_LOOP_LOOP2: return "LOOP_LOOP2";
381 case STATE_LOOP_ACTION: return "LOOP_ACTION";
382
384 case STATE_NORMAL: return "ONE TIME";
385 }
386
387 return "Undef";
388 }
389
390
393 {
394 return GetStateString(GetState());
395 }
396
397
398
399 //----------------------------------
400 // callbacks
401
403 void OnAnimationEvent(int pEventID) {};
404
406 void OnFinish(bool pCanceled) {};
407
409 void OnStateChange(int pOldState, int pCurrentState) {};
410
411
412 // helps identify type of callback
414 {
415 return false;
416 }
417
419 {
420 return false;
421 }
422
424 {
425 return false;
426 }
427}
428
429
430// *************************************************************************************
431// ! HumanCommandMove
432// *************************************************************************************
434{
435 private void HumanCommandMove() {}
436 private void ~HumanCommandMove() {}
437
440 proto native float GetCurrentMovementAngle();
441
445 proto bool GetCurrentInputAngle(out float pAngle);
446
448 proto native float GetCurrentMovementSpeed();
449
451 proto native bool IsChangingStance();
452
454 proto native bool IsOnBack();
455
457 proto native bool IsInRoll();
458
460 proto native bool IsLeavingUncon();
461
463 proto native bool IsStandingFromBack();
464
466 proto native void StartMeleeEvade();
467
469 proto native void StartMeleeEvadeA(float pDirAngle);
470
472 proto native bool IsMeleeEvade();
473
475 proto native void SetMeleeBlock(bool pBlock);
476
479 proto native void ForceStance(int pStanceIdx);
480
481
484 proto native void ForceStanceUp(int pStanceIdx);
485
486
488 proto native void SetRunSprintFilterModifier(float value);
489
491 proto native void SetDirectionFilterModifier(float value);
492
494 proto native void SetDirectionSprintFilterModifier(float value);
495
497 proto native void SetTurnSpanModifier(float value);
498
500 proto native void SetTurnSpanSprintModifier(float value);
501
503 proto native void SetCurrentWaterLevel(float value);
504}
505
506
507
508// *************************************************************************************
509// ! HumanCommandMelee - actual command melee running on
510// *************************************************************************************
512{
513 private void HumanCommandMelee() {}
514 private void ~HumanCommandMelee() {}
517 proto native void ContinueCombo();
518
520 proto native bool IsInComboRange();
521
523 proto native bool WasHit();
526 proto native void Cancel();
529 proto native bool IsOnBack();
531
532
533// *************************************************************************************
534// ! HumanCommandMelee2 - actual command melee running on - Heavy/Light version
535// *************************************************************************************
537{
538 private void HumanCommandMelee2() {}
539 private void ~HumanCommandMelee2() {}
540
541 static const int HIT_TYPE_LIGHT = 0;
542 static const int HIT_TYPE_HEAVY = 1;
543 static const int HIT_TYPE_FINISHER = 2; //liver stab
544 static const int HIT_TYPE_FINISHER_NECK = 3;
547 proto native void ContinueCombo(bool pHeavyHit, float pComboValue, EntityAI target = null, vector hitPos = vector.Zero);
550 proto native bool IsInComboRange();
553 proto native bool WasHit();
556 proto native void Cancel();
557
559 proto native bool IsOnBack();
560
561 proto native int GetComboCount();
562
563 proto native int GetCurrentHitType();
564
565 proto native bool IsFinisher();
566}
568
569// *************************************************************************************
570// ! HumanCommandFall - actually falling
571// *************************************************************************************
574 private void HumanCommandFall() {}
575 private void ~HumanCommandFall() {}
577 static const int LANDTYPE_NONE = 0;
578 static const int LANDTYPE_LIGHT = 1;
579 static const int LANDTYPE_MEDIUM = 2;
580 static const int LANDTYPE_HEAVY = 3;
583 proto native bool PhysicsLanded();
586 proto native void Land(int pLandType);
587
589 proto native bool IsLanding();
590}
591
592// *************************************************************************************
593// ! HumanCommandDeathCallback - called as action callback
594// *************************************************************************************
596{
597 //----------------------------------
598 // callbacks
599
600 void OnSimulationEnd() {};
601
603 bool ShouldSimulationBeDisabled() { return true; };
604}
605
606// *************************************************************************************
607// ! HumanCommandDeath - actually dying
608// *************************************************************************************
610{
611 private void HumanCommandDeath() {}
612 private void ~HumanCommandDeath() {}
613}
614
616// *************************************************************************************
617// ! HumanCommandUnconscious - actually not dying
618// *************************************************************************************
620{
621 private void HumanCommandUnconscious() {}
622 private void ~HumanCommandUnconscious() {}
623
624 proto native void WakeUp(int targetStance = -1);
625 proto native bool IsWakingUp();
626
627 proto native bool IsOnLand();
628 proto native bool IsInWater();
629}
630
631
632// *************************************************************************************
633// ! HumanCommandDamage - additional damage
634// *************************************************************************************
636{
637 private void HumanCommandDamage() {}
638 private void ~HumanCommandDamage() {}
640
641// *************************************************************************************
642// ! HumanCommandLadder ladder
643// *************************************************************************************
646 private void HumanCommandLadder() {}
647 private void ~HumanCommandLadder() {}
648
650 proto native bool CanExit();
651
653 proto native void Exit();
654
656 proto native static bool DebugDrawLadder(Building pBuilding, int pLadderIndex);
657
659 proto native static int DebugGetLadderIndex(string pComponentName);
660
663 proto native vector GetLogoutPosition();
664}
665
666
667
668// *************************************************************************************
669// ! HumanCommandLadder ladder
670// *************************************************************************************
672{
673 private void HumanCommandSwim() {}
674 private void ~HumanCommandSwim() {}
677 proto native void StopSwimming();
681 proto native static vector WaterLevelCheck(Human pHuman, vector pPosition);
682}
683
685
686// *************************************************************************************
687// ! HumanCommandVehicle vehicle
688// *************************************************************************************
690{
691 private void HumanCommandVehicle() {}
692 private void ~HumanCommandVehicle() {}
693
694 proto native Transport GetTransport();
695 proto native int GetVehicleClass();
696 proto native int GetVehicleSeat();
697 proto native void SetVehicleType(int pVehicleType);
698 proto native int GetVehicleType();
699
700 proto native void GetOutVehicle();
701 proto native void KnockedOutVehicle();
702 proto native bool ShouldBeKnockedOut();
703 proto native void JumpOutVehicle();
704 proto native void SwitchSeat(int pTransportPositionIndex, int pVehicleSeat);
705 proto native bool IsGettingIn();
706 proto native bool IsGettingOut();
707 proto native bool IsSwitchSeat();
708 proto native bool WasGearChange();
709 proto native void SetClutchState(bool pState);
710 proto native void KeepInVehicleSpaceAfterLeave(bool pState);
711 proto native void ProcessLeaveEvents();
712
714 {
715 Object object;
716 if (!Class.CastTo(object, entity))
717 {
718 return true;
719 }
720
721 Transport transport = GetTransport();
722 if (!transport)
723 {
724 return true;
725 }
726
727 if (object == transport || object.GetParent() == transport)
728 {
729 return true;
730 }
731
732 return transport.IsIgnoredObject(object);
733 }
734}
735
736// *************************************************************************************
737// ! HumanCommandClimb
738// *************************************************************************************
739
741class SHumanCommandClimbResult
742{
747
749
754
758};
759
760
770
773{
774 private void HumanCommandClimb() {}
775 private void ~HumanCommandClimb() {}
776
778 proto native int GetState();
779
781 proto native vector GetGrabPointWS();
782
785
789 proto native static bool DoClimbTest(Human pHuman, SHumanCommandClimbResult pResult, int pDebugDrawLevel);
790
794 proto native static bool DoPerformClimbTest(Human pHuman, SHumanCommandClimbResult pResult, int pDebugDrawLevel);
795
798 proto native static bool DebugDrawClimb(Human pHuman, int pLevel);
799}
800
801
802
803
804// *************************************************************************************
805// ! HumanCommandFullBodyDamage - full body damages
806// *************************************************************************************
808{
809 private void HumanCommandFullBodyDamage() {}
812
813
829
859
865
866enum WeaponActionMechanismTypes
867{
869 MECHANISM_OPENED = 0, // CMD_Reload_BoltAction
871 MECHANISM_SPECIAL = 2, // crossbow, magnum ... special mechanism action apropriate for custom weapons
873};
874
876{
879 CHAMBERING_ONEBULLET_OPENED = 0, // CMD_Reload_Chambering
884 CHAMBERING_TWOBULLETS_START = 6, // plays one bullet, then second, then ends, when CHAMBERING_TWOBULLETS_END arise, it's canceled
885 CHAMBERING_TWOBULLETS_END = 7, // - one bullet reload with closed mechanism
886
888 CHAMBERING_STARTLOOPABLE_CLOSED = 10, // start loop chambering
889 CHAMBERING_ENDLOOPABLE = 11, // end loop chambering
890 CHAMBERING_STARTLOOPABLE_CLOSED_KEEP = 12, // start loop chambering and keep last bullet
892
894
897
902
903
904 CHAMBERING_CROSSBOW_OPENED = 21, // chambering crossbow
905 CHAMBERING_CROSSBOW_CLOSED = 22, // chambering crossbow
906 CHAMBERING_CROSSBOW_FULL = 23, // chambering crossbow
907};
908
910{
911 CHAMBERINGLOADER_OPENED = 0, // CMD_Reload_ChamberingFast - one bullet reload with open mechanism
912 CHAMBERINGLOADER_CLOSED = 1, // - one bullet reload with closed mechanism
913};
914
916{
918 UNJAMMING_START = 1, // CMD_Weapon_Jam - 0
921};
922
932
946
947string WeaponActionTypeToString (int A, int AT)
948{
949 switch (A)
950 {
951 case WeaponActions.INTERRUPT: return "Weapon interrupt";
952 case WeaponActions.NONE: return "---";
953 case WeaponActions.RELOAD: return typename.EnumToString(WeaponActionReloadTypes, AT);
954 case WeaponActions.MECHANISM: return typename.EnumToString(WeaponActionMechanismTypes, AT);
955 case WeaponActions.CHAMBERING: return typename.EnumToString(WeaponActionChamberingTypes, AT);
956 case WeaponActions.CHAMBERING_LOADER: return typename.EnumToString(WeaponActionChamberingLoaderTypes, AT);
957 case WeaponActions.UNJAMMING: return typename.EnumToString(WeaponActionUnjammingTypes, AT);
958 case WeaponActions.FIRE: return typename.EnumToString(WeaponActionFireTypes, AT);
959 case WeaponActions.HIDE: return typename.EnumToString(WeaponHideShowTypes, AT);
960 case WeaponActions.SHOW: return typename.EnumToString(WeaponHideShowTypes, AT);
961 }
962 return "---";
963}
964
992
993
994// *************************************************************************************
995// ! HumanCommandWeapons - weapon handling
996// *************************************************************************************
998{
999 private void HumanCommandWeapons() {}
1000 private void ~HumanCommandWeapons() {}
1001
1003 proto native bool IsActionFinished();
1004
1006 proto native int GetRunningAction();
1007
1009 proto native int GetRunningActionType();
1010
1012 proto native void SetActionProgressParams(float pStart, float pEnd);
1013
1015 proto native bool StartAction(WeaponActions pAction, int pActionType);
1016
1018 proto native void RegisterEvent(string pName, int pId);
1019
1021 proto native int IsEvent();
1022
1025
1027 proto native void SetADS(bool pState);
1028
1030 proto native void LiftWeapon(bool pState);
1031
1033 proto native bool IsWeaponLifted();
1034
1036 proto native void ObstructWeapon(float pState01);
1037
1039 proto native float GetWeaponObstruction();
1040
1042 proto native float GetAimingHandsOffsetUD();
1043
1045 proto native float GetAimingHandsOffsetLR();
1046
1049 {
1050 RegisterEvent("Weapon_AttachmentHide", WeaponEvents.ATTACHMENT_HIDE);
1051 RegisterEvent("Weapon_AttachmentShow", WeaponEvents.ATTACHMENT_SHOW);
1052 RegisterEvent("Weapon_BulletEject", WeaponEvents.BULLET_EJECT);
1053 RegisterEvent("Weapon_BulletHide", WeaponEvents.BULLET_HIDE);
1054 RegisterEvent("Weapon_BulletHide2", WeaponEvents.BULLET_HIDE2);
1055 RegisterEvent("Weapon_BulletInChamber", WeaponEvents.BULLET_IN_CHAMBER);
1056 RegisterEvent("Weapon_BulletInMagazine", WeaponEvents.BULLET_IN_MAGAZINE);
1057 RegisterEvent("Weapon_BulletShow", WeaponEvents.BULLET_SHOW);
1058 RegisterEvent("Weapon_BulletShow2", WeaponEvents.BULLET_SHOW2);
1059 RegisterEvent("Weapon_CanUnjam_End", WeaponEvents.CANUNJAM_END);
1060 RegisterEvent("Weapon_CanUnjam_Start", WeaponEvents.CANUNJAM_START);
1061 RegisterEvent("Weapon_Cocked", WeaponEvents.COCKED);
1062 RegisterEvent("Weapon_MagazineAttached", WeaponEvents.MAGAZINE_ATTACHED);
1063 RegisterEvent("Weapon_MagazineDetached", WeaponEvents.MAGAZINE_DETACHED);
1064 RegisterEvent("Weapon_MagazineHide", WeaponEvents.MAGAZINE_HIDE);
1065 RegisterEvent("Weapon_MagazineShow", WeaponEvents.MAGAZINE_SHOW);
1066 RegisterEvent("Weapon_SliderOpen", WeaponEvents.SLIDER_OPEN);
1067 RegisterEvent("Weapon_Unjammed", WeaponEvents.UNJAMMED);
1068 RegisterEvent("Weapon_Hammer_Uncocked", WeaponEvents.HAMMER_UNCOCKED);
1069 RegisterEvent("Weapon_Hammer_Cocked", WeaponEvents.HAMMER_COCKED);
1070 RegisterEvent("Weapon_Change_Hide", WeaponEvents.CHANGE_HIDE);
1071 RegisterEvent("Weapon_Change_Show", WeaponEvents.CHANGE_SHOW);
1072 RegisterEvent("Weapon_CylinderRotate", WeaponEvents.CYLINDER_ROTATE);
1073 }
1074
1075 //----------------------------------------------------
1076 // weapon init states
1077
1078
1083 proto native void SetInitState(int pFrameIndex);
1084
1086 proto native static void StaticSetInitState(Human pHuman, int pFrameIdx);
1087
1088
1089 //----------------------------------------------------
1090 //
1091
1093 proto native float GetBaseAimingAngleUD();
1094
1096 proto native float GetBaseAimingAngleLR();
1097
1098
1099 //----------------------------------------------------
1100 // throwing
1101 proto native void SetThrowingMode(bool pState);
1102
1103 proto native bool IsThrowingMode();
1104
1105 proto native void ThrowItem(int throwType);
1106
1107 proto native bool WasItemLeaveHandsEvent();
1108
1109 //----------------------------------------------------
1110 // debug copy
1111
1113 proto native int DebugIsEvent();
1114
1116 proto native void DebugResetEvents();
1117}
1118
1119
1120// *************************************************************************************
1121// ! HumanCommandAdditives - additional damage
1122// *************************************************************************************
1124{
1125 private void HumanCommandAdditives() {}
1126 private void ~HumanCommandAdditives() {}
1129 proto native void SetInjured(float pValue, bool pInterpolate);
1132 proto native void SetExhaustion(float pValue, bool pInterpolate);
1133
1135 proto native void SetTalking(bool pValue);
1138 proto native void StartModifier(int pType);
1141 proto native void CancelModifier();
1144 proto native bool IsModifierActive();
1146
1147
1148// *************************************************************************************
1149// ! HumanMovementState - movement state, command, stance, movement, human.GetMovementState(movementState)
1150// *************************************************************************************
1152{
1159
1162 {
1163 return m_iStanceIdx >= DayZPlayerConstants.STANCEIDX_RAISEDERECT;
1164 }
1165
1168 {
1169 return m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE;
1170 }
1171
1174 {
1175 return m_iStanceIdx == DayZPlayerConstants.STANCEIDX_PRONE;
1176 }
1177
1180 {
1181 return m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE;
1182 }
1183
1186 {
1187 return m_fLeaning != 0;
1188 }
1189}
1190
1191enum HumanRelativeHeadingMode
1192{
1195
1198};
1199
1201
1208{
1210 // HumanCommandScript(Human pHuman);
1211
1214 void OnActivate() { };
1215
1217 void OnDeactivate() { };
1218
1219
1220 //---------------------------------------------------------------
1221 // usable everywhere
1222
1224 proto native void SetFlagFinished(bool pFinished);
1225
1226#ifdef FEATURE_NETWORK_RECONCILIATION
1228 proto native void OverrideCorrectionType(AnimPhysCorrectionType correctionType);
1229#endif
1232 proto native void SetHeading(float yawAngle, float filterDt = -1, float maxYawSpeed = FLT_MAX);
1233 proto native void AddHeadingRelativeTo(HumanRelativeHeadingMode mode, float yawAngle, float filterDt = -1, float maxYawSpeed = FLT_MAX);
1237 {
1238 return DayZPlayerConstants.STANCEIDX_ERECT;
1239 }
1244 return DayZPlayerConstants.MOVEMENT_IDLE;
1245 }
1246
1249 {
1250 return 0.0;
1251 }
1252
1253 //---------------------------------------------------------------
1254 // PreAnim Update
1255
1259 void PreAnimUpdate(float pDt);
1260
1262 proto native void PreAnim_CallCommand(int pCommand, int pParamInt, float pParamFloat);
1263 proto native void PreAnim_SetFloat(int pVar, float pFlt);
1264 proto native void PreAnim_SetInt(int pVar, int pInt);
1265 proto native void PreAnim_SetBool(int pVar, bool pBool);
1266
1267 void PreAnim_SetFilteredHeading(float pYawAngle, float pFilterDt, float pMaxYawSpeed)
1268 {
1269 SetHeading(pYawAngle, pFilterDt, pMaxYawSpeed);
1270 }
1271
1272 //---------------------------------------------------------------
1273 // PrePhys Update
1274
1277 void PrePhysUpdate(float pDt);
1278
1280 proto native bool PrePhys_IsEvent(int pEvent);
1281 proto native bool PrePhys_IsTag(int pTag);
1282 proto native bool PrePhys_GetTranslation(out vector pOutTransl); // vec3 in local space !
1283 proto native bool PrePhys_GetRotation(out float pOutRot[4]); // quaternion in local space !
1284 proto native void PrePhys_SetTranslation(vector pInTransl); // vec3 in local space !
1285 proto native void PrePhys_SetRotation(float pInRot[4]); // quaternion in local space !
1286
1287 //---------------------------------------------------------------
1288 // PostPhys Update
1289
1293 bool PostPhysUpdate(float pDt);
1294
1296 proto native void PostPhys_GetPosition(out vector pOutTransl);
1297 proto native void PostPhys_GetRotation(out float pOutRot[4]);
1298 proto native void PostPhys_SetPosition(vector pInTransl);
1299 proto native void PostPhys_SetRotation(float pInRot[4]);
1300 proto native void PostPhys_LockRotation();
1301}
1302
1304enum HumanMoveCommandID
1305{
1306 None = 0,
1320 CommandActionAdditive = 8192
1321}
1322
1323// *************************************************************************************
1324// ! Human - human script interface
1325// *************************************************************************************
1326class Human extends Man
1327{
1329
1331 proto native void GetTransformWS(out vector pTm[4]);
1332
1335 proto native void PhysicsGetTransformWS(out vector pTm[4]);
1336
1338 proto native void PhysicsGetTransformLS(out vector pTm[4]);
1339
1342 proto native vector PhysicsGetPositionWS();
1343
1345 proto native vector PhysicsGetPositionLS();
1346
1348 proto native bool CheckFreeSpace(vector localDir, float distance, bool useHeading, vector posOffset = vector.Zero, float xzScale = 1.0);
1349
1351 proto float CollisionMoveTest(vector dir, vector offset, float xzScale, IEntity ignoreEntity, out IEntity hitEntity, out vector hitPosition, out vector hitNormal);
1352
1353 //---------------------------------------------------------
1354 // link/unlink to/from local space (enfusion hierachy)
1355 proto native void LinkToLocalSpaceOf(notnull IEntity child, vector pLocalSpaceMatrix[4]);
1356 proto native void UnlinkFromLocalSpace();
1357
1358 //---------------------------------------------------------
1359 // heading component
1360
1362 proto native void AlignPositionWS(vector position);
1363
1365 proto native void AlignTranslationWS(vector translation);
1366
1368 proto native void AlignTranslationLS(vector translation);
1369
1371 proto native void AlignDirectionWS(vector direction);
1372
1375 void OnPhysMove(float dt, vector transform[4]) {}
1376
1377 //---------------------------------------------------------
1378 // bone transforms
1379
1381 proto native int GetBoneIndexByName(string pBoneName);
1382
1383
1385 proto native HumanAnimInterface GetAnimInterface();
1386
1387 //---------------------------------------------------------
1388 // physic props
1389
1391 proto native bool PhysicsIsFalling(bool pValidate);
1392
1394 proto native IEntity PhysicsGetFloorEntity();
1395
1397 proto native IEntity PhysicsGetLinkedEntity();
1398
1401 proto native bool PhysicsWasSlidingOffLinkedEntity();
1402
1404 proto native void PhysicsGetVelocity(out vector pVelocity);
1405
1406 proto native void PhysicsEnableGravity(bool pEnable);
1407
1408 proto native bool PhysicsIsSolid();
1409 proto native void PhysicsSetSolid(bool pSolid);
1410
1412 proto native void PhysicsSetRagdoll(bool pEnable);
1413
1414 //---------------------------------------------------------
1415 // controller
1416
1418 proto native HumanInputController GetInputController();
1419
1420 //---------------------------------------------------------
1421 // item accessor
1422
1423 proto native HumanItemAccessor GetItemAccessor();
1424
1425
1426 //---------------------------------------------------------
1427 // commands
1428
1430 proto native void GetMovementState(HumanMovementState pState);
1431
1433 proto native int GetCurrentCommandID();
1434
1435
1437
1439 proto native HumanCommandMove StartCommand_Move();
1440
1441 proto native HumanCommandMove GetCommand_Move();
1442
1444
1446 proto native HumanCommandMelee StartCommand_Melee(EntityAI pTarget);
1447
1448 proto native HumanCommandMelee GetCommand_Melee();
1449
1451 proto native HumanCommandMelee2 StartCommand_Melee2(EntityAI pTarget, int pHitType, float pComboValue, vector hitPos = vector.Zero);
1452
1453 proto native HumanCommandMelee2 GetCommand_Melee2();
1454
1455
1457
1461 proto native HumanCommandFall StartCommand_Fall(float pYVelocity);
1462
1464 proto native HumanCommandFall GetCommand_Fall();
1465
1466
1468
1470 proto native HumanCommandLadder StartCommand_Ladder(Building pBuilding, int pLadderIndex);
1471
1472 proto native HumanCommandLadder GetCommand_Ladder();
1473
1474
1476
1478 proto native HumanCommandSwim StartCommand_Swim();
1479
1480 proto native HumanCommandSwim GetCommand_Swim();
1481
1482
1484
1486 proto native HumanCommandVehicle StartCommand_Vehicle(Transport pTransport, int pTransportPositionIndex, int pVehicleSeat, bool fromUnconscious = false);
1487
1488 proto native HumanCommandVehicle GetCommand_Vehicle();
1489
1490
1492
1494 proto native HumanCommandClimb StartCommand_Climb(SHumanCommandClimbResult pClimbResult, int pType);
1495
1496 proto native HumanCommandClimb GetCommand_Climb();
1497
1499
1501 proto native HumanCommandDeathCallback StartCommand_Death(int pType, float pDirection, typename pCallbackClass, bool pKeepInLocalSpaceAfterLeave = false);
1502
1503 proto native HumanCommandDeathCallback GetCommand_Death();
1504
1505
1507 proto native HumanCommandUnconscious StartCommand_Unconscious(float pType);
1508
1509 proto native HumanCommandUnconscious GetCommand_Unconscious();
1510
1511
1513
1515 // -> of type 0,...
1516 // -> from direction (lback -180,left -90,0,righ 90,rightback 180)
1517 proto native HumanCommandFullBodyDamage StartCommand_Damage(int pType, float pDirection);
1518
1519 proto native HumanCommandFullBodyDamage GetCommand_Damage();
1520
1521
1522
1524
1527 proto native HumanCommandActionCallback StartCommand_Action(int pActionID, typename pCallbackClass, int pStanceMask);
1528
1530 proto native HumanCommandActionCallback GetCommand_Action();
1531
1532
1533 //---------------------------------------------------------
1534 // command modifiers
1535
1537 proto native int GetCommandModifierCount();
1538
1540 proto native int GetCommandModifierID(int pIndex);
1541
1542
1544
1546 proto native HumanCommandAdditives GetCommandModifier_Additives();
1547
1549 proto native HumanCommandWeapons GetCommandModifier_Weapons();
1550
1551
1552
1553
1554 // --- modifier/additive actions - played on COMMANDID_MOVE command
1555
1557 proto native HumanCommandActionCallback AddCommandModifier_Action(int pActionID, typename pCallbackClass);
1558
1560 proto native void DeleteCommandModifier_Action(HumanCommandActionCallback pCallback);
1561
1563 proto native HumanCommandActionCallback GetCommandModifier_Action();
1564
1565
1566
1568
1570 // -> of type 0,...
1571 // -> from direction (lback -180,left -90,0,righ 90,rightback 180)
1572 proto native HumanCommandDamage AddCommandModifier_Damage(int pType, float pDirection);
1573
1574 proto native void DeleteCommandModifier_Damage(HumanCommandDamage pDamage);
1575
1576 proto native HumanCommandDamage GetCommandModifier_Damage();
1577
1578
1580
1583 proto native HumanCommandScript StartCommand_Script(HumanCommandScript pHumanCommand);
1584 proto native HumanCommandScript StartCommand_ScriptInst(typename pCallbackClass);
1585
1587 proto native HumanCommandScript GetCommand_Script();
1588
1589
1590
1591 //---------------------------------------------------------
1592 // debug info for Item Accessor
1593
1594
1596 proto native owned string DebugGetItemClass();
1597
1599 proto native owned string DebugGetItemSuperClass();
1600
1602 proto native owned string DebugGetItemAnimInstance();
1603
1604
1605 //---------------------------------------------------------
1606 // helper functions for disabling simulation upon death
1607 proto native void StartDeath();
1608 proto native void ResetDeath();
1609
1610 proto native void ResetDeathCooldown();
1611 proto native bool IsDeathProcessed();
1612 proto native bool IsDeathConditionMet();
1613
1614
1615 //--------------------------------------------------------
1616 // commands start/finish events
1617
1618 void OnCommandMoveStart();
1619 void OnCommandMoveFinish();
1620
1621 void OnCommandMeleeStart();
1622 void OnCommandMeleeFinish();
1623
1624 void OnCommandMelee2Start();
1625 void OnCommandMelee2Finish();
1626
1627 void OnCommandFallStart();
1628 void OnCommandFallFinish();
1629
1630 void OnCommandClimbStart();
1631 void OnCommandClimbFinish();
1632
1633 void OnCommandDeathStart();
1634 void OnCommandDeathFinish();
1635
1636 void OnCommandUnconsciousStart();
1637 void OnCommandUnconsciousFinish();
1638
1639 void OnCommandDamageFullbodyStart();
1640 void OnCommandDamageFullbodyFinish();
1641
1642 void OnCommandDamageAdditiveStart();
1643 void OnCommandDamageAdditiveFinish();
1644
1645 void OnCommandLadderStart();
1646 void OnCommandLadderFinish();
1647
1648 void OnCommandSwimStart();
1649 void OnCommandSwimFinish();
1650
1651 void OnCommandVehicleStart();
1652 void OnCommandVehicleFinish();
1653
1654 void OnCommandActionFullbodyStart();
1655 void OnCommandActionFullbodyFinish();
1656
1657 void OnCommandActionAdditiveStart();
1658 void OnCommandActionAdditiveFinish();
1659
1661 void OnStanceChange(int previousStance, int newStance);
1662
1664 bool CanChangeStance(int previousStance, int newStance);
1665
1666 //--------------------------------------------------------
1667 // rolling API
1668
1669 bool CanRoll();
1670 void OnRollStart(bool isToTheRight);
1671 void OnRollFinish();
1672
1673 //--------------------------------------------------------
1674 // vehicle API
1675
1676 void OnVehicleSeatDriverEnter();
1677 void OnVehicleSeatDriverLeft();
1678
1679 proto native bool IsControllingVehicle();
1680
1681}
class LogManager EntityAI
ENABLED
Определения CfgGameplayDataJson.c:375
proto native DayZCreatureAnimInterface GetAnimInterface()
class DayZCreatureAnimInterface RegisterAnimationEvent(string event_name, string function_name)
proto native bool IsDeathProcessed()
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
proto native void ResetDeath()
proto native void StartDeath()
proto native void ResetDeathCooldown()
proto native bool IsDeathConditionMet()
Super root of all classes in Enforce script.
Определения EnScript.c:11
proto native TAnimGraphTag BindTag(string pTagName)
proto native TAnimGraphEvent BindEvent(string pEventName)
void ~HumanAnimInterface()
proto native TAnimGraphVariable BindVariableInt(string pVariable)
proto native TAnimGraphVariable BindVariableFloat(string pVariable)
proto native TAnimGraphCommand BindCommand(string pCommandName)
returns command index -
proto native TAnimGraphVariable BindVariableBool(string pVariable)
override void OnStateChange(int pOldState, int pCurrentState)
Определения PluginDayzPlayerDebug.c:158
override void OnFinish(bool pCanceled)
Определения StateCB.c:8
override bool IsSymptomCallback()
Определения StateCB.c:42
override void OnAnimationEvent(int pEventID)
Определения PluginDayzPlayerDebug.c:143
void HumanCommandClimb()
Определения human.c:774
proto static native bool DoClimbTest(Human pHuman, SHumanCommandClimbResult pResult, int pDebugDrawLevel)
proto native int GetState()
returns the state of climb (enum value of ClimbStates);
proto static native bool DebugDrawClimb(Human pHuman, int pLevel)
void ~HumanCommandClimb()
Определения human.c:775
proto native vector GetGrabPointWS()
returns world space position of climbing grab point
proto native vector GetClimbOverStandPointWS()
returns world space position of landspot after climbing over
proto static native bool DoPerformClimbTest(Human pHuman, SHumanCommandClimbResult pResult, int pDebugDrawLevel)
bool ShouldSimulationBeDisabled()
'OnSimulationEnd' is called before this
Определения human.c:603
void OnSimulationEnd()
Определения human.c:600
proto native vector GetLogoutPosition()
proto static native bool DebugDrawLadder(Building pBuilding, int pLadderIndex)
debug draws any ladder
void HumanCommandLadder()
Определения human.c:646
proto native void Exit()
void ~HumanCommandLadder()
Определения human.c:647
proto static native int DebugGetLadderIndex(string pComponentName)
proto native bool CanExit()
returns true if on exiting point
proto native bool IsFinisher()
proto native int GetComboCount()
proto native bool WasHit()
is true only once after hit event
static const int HIT_TYPE_FINISHER
Определения human.c:543
static const int HIT_TYPE_HEAVY
Определения human.c:542
static const int HIT_TYPE_LIGHT
Определения human.c:541
proto native bool IsInComboRange()
returns true if hit is in range, where person can continue to combo
void ~HumanCommandMelee2()
Определения human.c:539
proto native int GetCurrentHitType()
void HumanCommandMelee2()
Определения human.c:538
proto native void ContinueCombo(bool pHeavyHit, float pComboValue, EntityAI target=null, vector hitPos=vector.Zero)
marks command to continue to combo
proto native void Cancel()
cancels command melee and goes to HumanCommandMove
proto native bool IsOnBack()
is on back in prone stance?
static const int HIT_TYPE_FINISHER_NECK
Определения human.c:544
proto native void StartMeleeEvadeA(float pDirAngle)
marks command to continue to combo, pDirAngle specifies angle
proto native bool IsMeleeEvade()
this is true when in melee evade
proto native float GetCurrentMovementSpeed()
0,1,2..3 idle, walk, run, sprint
proto native void SetTurnSpanModifier(float value)
sets the multiplier for HumanItemBehaviorCfg::m_fMoveHeadingFilterSpan
proto native bool IsInRoll()
return true if character barrel rolling
proto native void SetTurnSpanSprintModifier(float value)
sets the multiplier for HumanItemBehaviorCfg::m_fMoveHeadingSprintFilterSpan
proto native void SetDirectionFilterModifier(float value)
sets the multiplier for SHumanCommandMoveSettings::m_fDirFilterTimeout
proto native bool IsLeavingUncon()
return true if character transitions out of uncon
proto native void ForceStance(int pStanceIdx)
proto native void SetRunSprintFilterModifier(float value)
sets the multiplier for SHumanCommandMoveSettings::m_fRunSpringTimeout
proto bool GetCurrentInputAngle(out float pAngle)
proto native bool IsOnBack()
return true if prone is on back
proto native void SetDirectionSprintFilterModifier(float value)
sets the multiplier for SHumanCommandMoveSettings::m_fDirFilterSprintTimeout
void ~HumanCommandMove()
Определения human.c:436
proto native float GetCurrentMovementAngle()
proto native bool IsStandingFromBack()
return true if prone on back is chaning to crounch/stand
proto native void SetCurrentWaterLevel(float value)
sets water level (depth)
proto native void StartMeleeEvade()
marks command to continue to combo
proto native void SetMeleeBlock(bool pBlock)
this enables/disables block
void HumanCommandMove()
Определения human.c:435
proto native void ForceStanceUp(int pStanceIdx)
proto native bool IsChangingStance()
returns true if character is changing stance
bool PostPhysUpdate(float pDt)
void PreAnimUpdate(float pDt)
proto native void PreAnim_SetFloat(int pVar, float pFlt)
void OnActivate()
constructor must have 1st parameter to be Human
Определения human.c:1214
proto native void SetFlagFinished(bool pFinished)
this terminates human command script and shows CommandHandler( ... pCurrentCommandFinished == true );
proto native void PostPhys_GetRotation(out float pOutRot[4])
vec3 in world space
int GetCurrentStance()
Override this to return the current stance of the human.
Определения human.c:1236
proto native void PostPhys_LockRotation()
quaternion in world space
proto native void SetHeading(float yawAngle, float filterDt=-1, float maxYawSpeed=FLT_MAX)
sets character rotation (heading) (PreAnim/PrePhys only!)
proto native void PreAnim_SetBool(int pVar, bool pBool)
int GetCurrentMovement()
Override this to return the current movement state of the human.
Определения human.c:1242
proto native void PreAnim_CallCommand(int pCommand, int pParamInt, float pParamFloat)
function usable in PreAnimUpdate or in !!! OnActivate !!!
proto native void PrePhys_SetTranslation(vector pInTransl)
proto native bool PrePhys_IsTag(int pTag)
float GetCurrentLeaning()
Override this to return the current leaning state of the human. <-1, 1>
Определения human.c:1248
proto native void PrePhys_SetRotation(float pInRot[4])
proto native void PostPhys_SetRotation(float pInRot[4])
vec3 in world space
proto native bool PrePhys_GetTranslation(out vector pOutTransl)
proto native bool PrePhys_IsEvent(int pEvent)
script function usable in PrePhysUpdate
proto native void PostPhys_GetPosition(out vector pOutTransl)
script function usable in PostPhysUpdate
void PrePhysUpdate(float pDt)
proto native void PostPhys_SetPosition(vector pInTransl)
quaternion in world space
proto native void PreAnim_SetInt(int pVar, int pInt)
void PreAnim_SetFilteredHeading(float pYawAngle, float pFilterDt, float pMaxYawSpeed)
Определения human.c:1267
void OnDeactivate()
called when command ends
Определения human.c:1217
proto native bool PrePhys_GetRotation(out float pOutRot[4])
proto native void AddHeadingRelativeTo(HumanRelativeHeadingMode mode, float yawAngle, float filterDt=-1, float maxYawSpeed=FLT_MAX)
HumanCommandScript fully scriptable command.
Определения human.c:1208
void HumanCommandUnconscious()
Определения human.c:621
proto native bool IsWakingUp()
proto native bool IsInWater()
proto native void WakeUp(int targetStance=-1)
void ~HumanCommandUnconscious()
Определения human.c:622
proto native bool IsOnLand()
proto native int GetVehicleType()
proto native Transport GetTransport()
proto native bool IsGettingIn()
void HumanCommandVehicle()
Определения human.c:691
proto native void ProcessLeaveEvents()
bool IsObjectIgnoredOnGettingOut(IEntity entity)
Определения human.c:713
proto native bool WasGearChange()
void ~HumanCommandVehicle()
Определения human.c:692
proto native int GetVehicleSeat()
proto native void KeepInVehicleSpaceAfterLeave(bool pState)
proto native int GetVehicleClass()
proto native void GetOutVehicle()
proto native void SetVehicleType(int pVehicleType)
proto native bool IsSwitchSeat()
proto native bool ShouldBeKnockedOut()
proto native void JumpOutVehicle()
proto native bool IsGettingOut()
proto native void SwitchSeat(int pTransportPositionIndex, int pVehicleSeat)
proto native void KnockedOutVehicle()
proto native void SetClutchState(bool pState)
proto native bool IsActionFinished()
void ~HumanCommandWeapons()
Определения human.c:1000
proto native void DebugResetEvents()
proto native bool WasItemLeaveHandsEvent()
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
proto static native void StaticSetInitState(Human pHuman, int pFrameIdx)
just static version of SetInitState
proto native void SetThrowingMode(bool pState)
proto native void LiftWeapon(bool pState)
command for lifting weapon near obstacles (works only when weapon is raised)
proto native void ObstructWeapon(float pState01)
command for obstruction weapon near obstacles
proto native void SetActionProgressParams(float pStart, float pEnd)
sets start and end animation position - f.e. for reload clip action
proto native float GetAimingHandsOffsetUD()
returns aiming hands up/down (y) offset angle
proto native bool IsInWeaponReloadBulletSwitchState()
returns true when clip visual change is needed for reload clip action
proto native float GetWeaponObstruction()
return obstruction value
proto native bool IsWeaponLifted()
return if lifting weapon is active
proto native bool IsThrowingMode()
proto native float GetBaseAimingAngleLR()
returns base aiming angle LR - without sway/offsets/...
proto native bool StartAction(WeaponActions pAction, int pActionType)
start reload,mechanism,chambering,unjam ...
proto native void SetADS(bool pState)
sets head tilt to optics
proto native int IsEvent()
return -1 when there is no event, otherwise it returns pId of event from animation
proto native float GetAimingHandsOffsetLR()
returns aiming hands left/right (x) offset angle
void RegisterDefaultEvents()
Определения human.c:1048
proto native int DebugIsEvent()
return -1 when there is no event, otherwise it returns pId of event from animation
proto native void ThrowItem(int throwType)
proto native void SetInitState(int pFrameIndex)
proto native int GetRunningActionType()
returns -1 when no action is running or appropriate action type
proto native float GetBaseAimingAngleUD()
returns base aiming angle UD - without sway/offsets/...
proto native void RegisterEvent(string pName, int pId)
register events
void HumanCommandWeapons()
Определения human.c:999
proto native int IsGestureSlot()
proto native void OverrideMovementAngle(HumanInputControllerOverrideType overrideType, float value)
proto native bool IsZoomIn()
proto native bool IsUseItemButtonDown()
returns true if 'UADefaultAction' button has just been pressed (== true for 1 tick only)....
proto native bool WeaponADS()
returns true if weapon ADS mode
proto native bool IsQuickBarContinuousUse()
void ~HumanInputController()
never created by script
Определения human.c:266
proto native int IsMeleeLREvade()
returns 0,1,2 = none,left,right
proto native bool LimitsIsSprintDisabled()
is sprint disabled
proto native bool IsUseItemButton()
returns true if 'UADefaultAction' button is pressed (== true for multiple ticks). Synced.
proto native bool CameraIsFreeLook()
returns true if freelook is active
proto native void OverrideAimChangeX(HumanInputControllerOverrideType overrideType, float value)
proto native void SetDisabled(bool pState)
disables input controller
proto native bool IsZeroingDown()
zeroing down
proto native void OverrideMovementSpeed(HumanInputControllerOverrideType overrideType, float value)
proto native bool IsReloadOrMechanismSingleUse()
weapon handling
proto native void LimitsDisableSprint(bool pDisable)
this disables sprint
proto void GetMovement(out float pSpeed, out vector pLocalDirection)
returns pSpeed 0,1..2..3 (idle, walk, run, sprint), local normalized direction vector
proto native bool WeaponWasRaiseClick()
returns true if weapon click perfomed recently (before raise specifically)
proto native void ResetFreeLookToggle()
reset freelook toggle
proto native bool IsUseButton()
Deprecated; returns true if Use/Attack button is pressed (== true for multiple ticks)....
proto native bool IsImmediateAction()
proto native void OverrideFreeLook(HumanInputControllerOverrideType overrideType, bool value)
proto native bool IsReloadOrMechanismContinuousUseStart()
R - reloading / bolting (== true for 1 tick only)
proto native bool IsAttackButton()
returns true if 'UAFire' button is pressed (== true for multiple ticks). Synced.
proto native bool IsHoldBreath()
holding breath
proto native void ResetHoldBreath()
reset hold breath toggle
proto native vector GetAimChange()
returns per tick aim change (in radians)
proto native bool IsOtherController()
returns true, if player controls other entity (vehicle for example)
proto native bool IsThrowingModeChange()
returns true if change of throwing mode has been requested
proto native bool CameraViewChanged()
1st/3rd person camera view
proto native bool IsMeleeEvade()
returns pressed SHIFT (melee evade)
proto native bool IsWalkToggled()
returns true if Walk set to toggle
proto native void OverrideRaise(HumanInputControllerOverrideType overrideType, bool value)
proto native bool IsContinuousUse()
Long click 'UADefaultAction' (== true for multiple ticks) + not raised.
proto native bool Camera3rdIsRightShoulder()
returns true if camera is on right/ false-left shoulder
proto native bool CameraIsTracking()
returns if camera is tracking (using IR device)
proto native bool IsFireModeChange()
fire mode has changed
proto native void Override3rdIsRightShoulder(HumanInputControllerOverrideType overrideType, bool value)
proto native bool IsContinuousUseEnd()
is end of cont. 'UADefaultAction' (== true for 1 tick only) + not raised
proto native vector GetTracking()
returns absolute tracking change (in radians)
proto native bool IsQuickBarContinuousUseStart()
proto native bool IsWeaponRaised()
returns true if weapon is raised
proto native bool IsZoomToggle()
zooming toggle
proto native void ResetThrowingMode()
resets Throwing mode
proto native bool IsSingleUse()
single 'UADefaultAction' (== true for 1 tick only) + not raised
proto native bool IsZoom()
zooming
proto native bool IsZoomOut()
proto native bool IsStanceChange()
stance change button was pressed
proto native bool IsMeleeWeaponAttack()
return weapon melee attack modifier
proto native void OverrideAimChangeY(HumanInputControllerOverrideType overrideType, float value)
proto native bool IsSightChange()
sight has been changed (in/out ironsights)
proto native bool IsJumpClimb()
jump/climb action was pressed
proto native void ResetADS()
resets ADS mode to default
proto native bool IsReloadOrMechanismContinuousUseEnd()
R - reloading / bolting - long press (== true for multiple ticks)
proto native void ResetZoomToggle()
reset zoom toggle
proto native void OverrideMeleeEvade(HumanInputControllerOverrideType overrideType, bool value)
proto native bool IsZeroingUp()
zeroing up
proto native vector GetAimDelta(float dt)
returns aim change (in radians)
proto native int IsQuickBarSlot()
returns 1..10 if some quickbar slot is used, 0 otherwise
proto native float GetHeadingAngle()
returns main heading angle (in radians) -PI .. PI (this is world Y angle player is actualy pointing t...
proto native bool IsQuickBarSingleUse()
proto native bool IsUseButtonDown()
Deprecated; returns true if Use/Attack button has just been pressed (== true for 1 tick only)....
void HumanInputController()
never created by script
Определения human.c:261
proto native bool IsQuickBarContinuousUseEnd()
proto native bool IsContinuousUseStart()
is start of cont. 'UADefaultAction' (== true for 1 tick only) + not raised
proto native bool IsAttackButtonDown()
returns true if 'UAFire' button has just been pressed (== true for 1 tick only). Synced.
proto native bool IsReloadOrMechanismContinuousUse()
R - reloading / bolting - long press (== true for multiple ticks)
proto native bool IsMeleeFastAttackModifier()
returns SHIFT down (melee fast/heavy) attack modifier
int m_iMovement
current stance (DayZPlayerConstants.STANCEIDX_ERECT, ...), only if the command has a stance
Определения human.c:1155
int m_iStanceIdx
current command's id
Определения human.c:1154
int m_LocalMovement
leaning state (not all commands need to have all movements)
Определения human.c:1158
int m_CommandTypeId
Определения human.c:1153
float m_fLeaning
current movement (0 idle, 1 walk, 2-run, 3-sprint), only if the command has a movement
Определения human.c:1156
bool IsRaisedInProne()
Определения human.c:1167
bool IsLeaning()
Определения human.c:1185
bool IsInProne()
Определения human.c:1173
bool IsInRaisedProne()
Определения human.c:1179
bool IsRaised()
Определения human.c:1161
Определения human.c:1152
Определения EnEntity.c:165
Определения ObjectTyped.c:2
Native class for boats - handles physics simulation.
Определения Boat.c:28
static const vector Zero
Определения EnConvert.c:110
Определения EnConvert.c:106
override void OnCommandDeathStart()
Определения dayzplayer.c:1382
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
@ None
Определения EnWorld.c:73
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
@ A
Определения EnSystem.c:345
@ NONE
No flags.
Определения EnProfiler.c:11
proto native Widget GetParent()
Get parent of the Effect.
Определения Effect.c:422
@ DISABLED
Определения EnWidgets.c:79
enum WeaponActions HumanCommandFullBodyDamage
Определения human.c:809
class HumanCommandScript CommandSwim
class HumanCommandScript CommandVehicle
int TAnimGraphVariable
Определения human.c:277
proto static native vector WaterLevelCheck(Human pHuman, vector pPosition)
static const int STATE_NONE
undef state - not running anymore
Определения human.c:349
class HumanCommandScript CommandLadder
static const int STATE_LOOP_END2
Определения human.c:355
proto native void CancelModifier()
cancels modifier
proto native bool IsModifierActive()
is modifier active
enum WeaponActionReloadClipTypes MECHANISM_CLOSED_UNCOCKED
IEntity m_ClimbOverStandPointParent
Определения human.c:757
class HumanCommandMove HumanCommandMelee()
Определения human.c:513
static const int STATE_NORMAL
one time state
Определения human.c:360
proto native bool WasHit()
is true only once after hit event
void ~HumanCommandMelee()
Определения human.c:514
static const int STATE_LOOP_IN
looped state
Определения human.c:352
class HumanCommandVehicle m_bIsClimb
result from static test
float m_fClimbHeight
Определения human.c:748
class HumanCommandLadder HumanCommandSwim()
Определения human.c:673
proto native void SetTalking(bool pValue)
sets talking
vector m_ClimbGrabPointNormal
grab point for climb && climb over (in local space of it's parent)
Определения human.c:751
proto native void StopSwimming()
static const int LANDTYPE_NONE
Определения human.c:577
static const int LANDTYPE_LIGHT
Определения human.c:578
WeaponActionReloadClipTypes
Определения human.c:861
@ RELOADRIFLE_CLIP_NOBULLET
Определения human.c:862
@ RELOADRIFLE_CLIP_BULLET
Определения human.c:863
static const int STATE_LOOP_END
Определения human.c:354
proto native void SetInjured(float pValue, bool pInterpolate)
sets injury level 0..1, interpolate == false -> resets the value, otherwise it's interpolating toward...
class HumanCommandUnconscious HumanCommandDamage()
Определения human.c:637
class HumanCommandScript CommandDamageFullbody
void HumanAnimInterface()
bool IsGestureCallback()
Определения human.c:418
proto native void SetExhaustion(float pValue, bool pInterpolate)
sets exhaustion level 0..1, interpolate == false -> resets the value, otherwise it's interpolating to...
void ~HumanCommandDamage()
Определения human.c:638
static const int LANDTYPE_MEDIUM
Определения human.c:579
proto native void SetAligning(vector pPositionWS, vector pDirectionWS)
enables character aligning to desired position and direction in world space
WeaponActionChamberingTypes
Определения human.c:876
@ CHAMBERING_DOUBLE_4
Определения human.c:901
@ CHAMBERING_ONEBULLET_CLOSED
Определения human.c:880
@ CHAMBERING_STARTLOOPABLE_CLOSED_EXTRA
Определения human.c:887
@ CHAMBERING_TWOBULLETS_END
Определения human.c:885
@ CHAMBERING_CROSSBOW_CLOSED
Определения human.c:905
@ CHAMBERING_STARTLOOPABLE_SHOTGUN_UNCOCKED
Определения human.c:895
@ CHAMBERING_END
Определения human.c:877
@ CHAMBERING_DOUBLE_2
Определения human.c:899
@ CHAMBERING_ENDLOOPABLE
Определения human.c:889
@ CHAMBERING_ONEBULLET_UNIQUE_OPENED
Определения human.c:882
@ CHAMBERING_CROSSBOW_OPENED
Определения human.c:904
@ CHAMBERING_ONEBULLET_OPENED
chambering action types
Определения human.c:879
@ CHAMBERING_STARTLOOPABLE_CLOSED_KEEP
Определения human.c:890
@ CHAMBERING_CROSSBOW_FULL
Определения human.c:906
@ CHAMBERING_STARTLOOPABLE_OPENED
Определения human.c:891
@ CHAMBERING_STARTLOOPABLE_CLOSED
Определения human.c:888
@ CHAMBERING_ONEBULLET_UNIQUE_CLOSED
Определения human.c:883
@ CHAMBERING_STARTLOOPABLE_SHOTGUN_COCKED
Определения human.c:896
@ CHAMBERING_DOUBLE_1
Определения human.c:898
@ CHAMBERING_DOUBLE_3
Определения human.c:900
@ CHAMBERING_STARTLOOPABLE_CLOSED_WITHCHAMBER
Определения human.c:893
@ CHAMBERING_ONEBULLET_CLOSED_UNCOCKED
Определения human.c:881
@ CHAMBERING_TWOBULLETS_START
Определения human.c:884
WeaponHideShowTypes
Определения human.c:934
@ HIDESHOW_SLOT_RFLRIGHTBACK
Определения human.c:939
@ HIDESHOW_SLOT_INVENTORY
Определения human.c:944
@ HIDESHOW_SLOT_2HDRIGHTBACK
Определения human.c:938
@ HIDESHOW_SLOT_RFLLEFTBACK
Определения human.c:936
@ HIDESHOW_SLOT_PISTOLCHEST
Определения human.c:942
@ HIDESHOW_SLOT_1HDRIGHTBACK
Определения human.c:940
@ HIDESHOW_SLOT_KNIFEBACK
Определения human.c:943
@ HIDESHOW_SLOT_PISTOLBELT
Определения human.c:941
@ HIDESHOW_SLOT_2HDLEFTBACK
Определения human.c:935
@ HIDESHOW_SLOT_1HDLEFTBACK
Определения human.c:937
class HumanCommandScript CommandUnconscious
bool m_bFinishWithFall
Определения human.c:745
bool m_bHasParent
Определения human.c:746
WeaponActions
actions
Определения human.c:816
@ UNJAMMING
Определения human.c:823
@ RELOAD_CLIP
Определения human.c:827
@ MECHANISM
Определения human.c:820
@ FIRE
Определения human.c:824
@ CHAMBERING
Определения human.c:821
@ HIDE
Определения human.c:825
@ CHAMBERING_LOADER
Определения human.c:822
@ INTERRUPT
Определения human.c:817
@ SHOW
Определения human.c:826
@ RELOAD
Определения human.c:819
class HumanCommandScript CommandDeath
proto native bool PhysicsLanded()
this is true when fall has physically landed - need to call Land after this is true
proto native void EnableCancelCondition(bool pEnable)
class HumanCommandDeathCallback HumanCommandDeath()
Определения human.c:611
WeaponEvents
events
Определения human.c:967
@ CHANGE_SHOW
Определения human.c:989
@ BULLET_SHOW
Определения human.c:975
@ ATTACHMENT_SHOW
Определения human.c:969
@ ATTACHMENT_HIDE
Определения human.c:968
@ MAGAZINE_SHOW
Определения human.c:983
@ CHANGE_HIDE
Определения human.c:988
@ BULLET_EJECT
Определения human.c:970
@ CYLINDER_ROTATE
Определения human.c:990
@ MAGAZINE_ATTACHED
Определения human.c:980
@ HAMMER_COCKED
Определения human.c:987
@ BULLET_IN_MAGAZINE
Определения human.c:974
@ UNJAMMED
Определения human.c:985
@ BULLET_SHOW2
Определения human.c:976
@ CANUNJAM_END
Определения human.c:977
@ CANUNJAM_START
Определения human.c:978
@ BULLET_HIDE
Определения human.c:971
@ HAMMER_UNCOCKED
Определения human.c:986
@ MAGAZINE_HIDE
Определения human.c:982
@ COCKED
Определения human.c:979
@ SLIDER_OPEN
Определения human.c:984
@ BULLET_IN_CHAMBER
Определения human.c:973
@ MAGAZINE_DETACHED
Определения human.c:981
@ BULLET_HIDE2
Определения human.c:972
bool IsUserActionCallback()
Определения human.c:413
vector m_ClimbGrabPoint
Определения human.c:750
string WeaponActionTypeToString(int A, int AT)
Определения human.c:947
void ~HumanCommandActionCallback()
class HumanMovementState INPUT
Actual input value.
int TAnimGraphTag
Определения human.c:278
class HumanCommandScript CommandClimb
void HumanCommandLadder()
Определения human.c:674
static const int STATE_LOOP_ACTION
Определения human.c:357
enum WeaponActionReloadClipTypes MECHANISM_OPENED
mechanism action types
proto native void InternalCommand(int pInternalCommandId)
class HumanCommandScript CommandMove
WeaponActionChamberingLoaderTypes
Определения human.c:910
@ CHAMBERINGLOADER_CLOSED
Определения human.c:912
@ CHAMBERINGLOADER_OPENED
Определения human.c:911
proto native void EnableStateChangeCallback()
enables state change callback OnStateChange
enum WeaponActionReloadClipTypes MECHANISM_CLOSED
class HumanAnimInterface HumanCommandActionCallback()
proto native void ContinueCombo()
marks command to continue to combo
class HumanCommandScript CommandActionFullbody
class HumanCommandScript CommandFall
string GetStateString()
returns debug string of current state
Определения human.c:392
void ~HumanCommandDeath()
Определения human.c:612
proto native void ResetAligning()
disables character aligning
proto native void Cancel()
cancels action
class HumanCommandScript CommandMelee2
void HumanCommandClimb()
Определения human.c:810
proto native bool IsLanding()
returns true if fall is in landing state
void ~HumanCommandFullBodyDamage()
Определения human.c:810
static const int LANDTYPE_HEAVY
Определения human.c:580
enum WeaponActionReloadClipTypes MECHANISM_SPECIAL
static const int STATE_LOOP_LOOP
Определения human.c:353
void ~HumanCommandAdditives()
Определения human.c:1126
proto native void Land(int pLandType)
end fall with land
class HumanInputController TAnimGraphCommand
WeaponActionReloadTypes
Определения human.c:832
@ RELOAD_MAGAZINE_DETACH
Определения human.c:851
@ RELOADRIFLE_NOMAGAZINE_NOBULLET_OPEN
Определения human.c:839
@ RELOADPISTOL_NOMAGAZINE_NOBULLET_CLOSED_COCKED
Определения human.c:847
@ RELOADRIFLE_MAGAZINE_DETACH
Определения human.c:852
@ RELOADPISTOL_NOMAGAZINE_NOBULLET_CLOSED_UNCOCKED
Определения human.c:842
@ RELOADRIFLE_MAGAZINE_NOBULLET
Определения human.c:836
@ RELOADSRIFLE_MAGAZINE_NOBULLET
Определения human.c:856
@ RELOADPISTOL_NOMAGAZINE_NOBULLET_OPENED
Определения human.c:848
@ RELOADPISTOL_MAGAZINE_NOBULLET_CLOSED_COCKED
Определения human.c:846
@ RELOADSRIFLE_NOMAGAZINE_NOBULLET
Определения human.c:857
@ RELOADPISTOL_MAGAZINE_NOBULLET_OPENED
Определения human.c:849
@ RELOADPISTOL_NOMAGAZINE_BULLET_CLOSED
Определения human.c:845
@ RELOADRIFLE_NOMAGAZINE_NOBULLET
Определения human.c:837
@ RELOADSRIFLE_MAGAZINE_BULLET
Определения human.c:854
@ RELOADRIFLE_NOMAGAZINE_BULLET
Определения human.c:835
@ RELOADPISTOL_MAGAZINE_BULLET_CLOSED
Определения human.c:844
@ RELOADRIFLE_MAGAZINE_NOBULLET_OPEN
Определения human.c:838
@ RELOADPISTOL_MAGAZINE_NOBULLET_CLOSED_UNCOCKED
Определения human.c:843
@ RELOADRIFLE_MAGAZINE_BULLET
reload action types - rifles
Определения human.c:834
@ RELOADSRIFLE_NOMAGAZINE_BULLET
Определения human.c:855
proto native int GetState()
returns one of STATE_...
Определения StaminaHandler.c:31
proto native void StartModifier(int pType)
starts modifier
static const int STATE_LOOP_LOOP2
Определения human.c:356
HumanInputControllerOverrideType
Определения human.c:8
@ ONE_FRAME
Permenantly active until DISABLED is passed.
Определения human.c:11
proto native Human GetHuman()
get the human this cb belongs to
class HumanCommandScript CommandDamageAdditive
IEntity m_ClimbStandPointParent
parent of grabpoint
Определения human.c:756
class HumanCommandMelee2 HumanCommandFall()
Определения human.c:574
vector m_ClimbStandPoint
normal to grabpoint position (used for character orientation)
Определения human.c:752
ClimbStates
state of climb command
Определения human.c:763
@ STATE_FINISH
Определения human.c:768
@ STATE_MOVE
Определения human.c:764
@ STATE_TAKEOFF
Определения human.c:765
@ STATE_ONTOP
Определения human.c:766
@ STATE_FALLING
Определения human.c:767
void ~HumanCommandFall()
Определения human.c:575
proto native bool IsInComboRange()
returns true if hit is in range, where person can continue to combo
bool m_bIsClimbOver
Определения human.c:744
void HumanCommandMove()
Определения human.c:514
WeaponActionUnjammingTypes
Определения human.c:916
@ UNJAMMING_INTERRUPT
Определения human.c:920
@ UNJAMMING_END
Определения human.c:919
@ UNJAMMING_START
unjam action types
Определения human.c:918
void ~HumanCommandSwim()
Определения human.c:674
int TAnimGraphEvent
Определения human.c:279
proto native bool IsOnBack()
return true if prone is on back
vector m_ClimbOverStandPoint
where climb ends (in local space of it's parent)
Определения human.c:753
void HumanCommandWeapons()
Определения human.c:1126
IEntity m_GrabPointParent
where climb over ends (in local space of it's parent)
Определения human.c:755
proto native bool DefaultCancelCondition()
system implemented cancel condition (now raise or sprint cancels action)
void HumanCommandUnconscious()
Определения human.c:638
class HumanCommandScript CommandMelee
void HumanCommandMelee2()
Определения human.c:575
WeaponActionFireTypes
Определения human.c:924
@ FIRE_NORMAL
Определения human.c:925
@ FIRE_JAM
Определения human.c:930
@ FIRE_LAST
Определения human.c:926
@ FIRE_COCKED
Определения human.c:927
@ FIRE_UNCOCKED
Определения human.c:928
@ FIRE_DRY
Определения human.c:929
class HumanMovementState CURRENT
From the last value that was set.
class HumanCommandWeapons HumanCommandAdditives()
Определения human.c:1125
void HumanItemAccessor()
Определения humanitems.c:141