Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
human.c
Go to the documentation of this file.
1 
8 {
12 };
13 
14 // *************************************************************************************
15 // ! HumanInputController - what we know about the input - human.GetInputController()
16 // *************************************************************************************
18 {
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 
147  proto native bool IsReloadOrMechanismContinuousUse();
148 
150  proto native bool IsReloadOrMechanismContinuousUseStart();
151 
153  proto native bool IsReloadOrMechanismContinuousUseEnd();
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 
266  private void ~HumanInputController()
267  {
268  }
269 }
270 
271 
272 // *************************************************************************************
273 // ! HumanInputController - what we know about the input - human.GetInputController()
274 // *************************************************************************************
275 
276 typedef int TAnimGraphCommand;
277 typedef int TAnimGraphVariable;
278 typedef int TAnimGraphTag;
279 typedef 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();
312  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 
392  string GetStateString()
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 
423  bool IsSymptomCallback()
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 // *************************************************************************************
511 class HumanCommandMelee
512 {
513  private void HumanCommandMelee() {}
514  private void ~HumanCommandMelee() {}
515 
517  proto native void ContinueCombo();
518 
520  proto native bool IsInComboRange();
521 
523  proto native bool WasHit();
524 
526  proto native void Cancel();
527 
529  proto native bool IsOnBack();
530 }
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;
545 
547  proto native void ContinueCombo(bool pHeavyHit, float pComboValue, EntityAI target = null, vector hitPos = vector.Zero);
548 
550  proto native bool IsInComboRange();
551 
553  proto native bool WasHit();
554 
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 }
567 
568 
569 // *************************************************************************************
570 // ! HumanCommandFall - actually falling
571 // *************************************************************************************
572 class HumanCommandFall
573 {
574  private void HumanCommandFall() {}
575  private void ~HumanCommandFall() {}
576 
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;
581 
583  proto native bool PhysicsLanded();
584 
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 // *************************************************************************************
609 class HumanCommandDeath
610 {
611  private void HumanCommandDeath() {}
612  private void ~HumanCommandDeath() {}
613 }
614 
615 
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 // *************************************************************************************
635 class HumanCommandDamage
636 {
637  private void HumanCommandDamage() {}
638  private void ~HumanCommandDamage() {}
639 }
640 
641 // *************************************************************************************
642 // ! HumanCommandLadder ladder
643 // *************************************************************************************
645 {
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 // *************************************************************************************
671 class HumanCommandSwim
672 {
673  private void HumanCommandSwim() {}
674  private void ~HumanCommandSwim() {}
675 
677  proto native void StopSwimming();
678 
681  proto native static vector WaterLevelCheck(Human pHuman, vector pPosition);
682 }
683 
684 
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 
712  bool IsObjectIgnoredOnGettingOut(IEntity entity)
713  {
714  Object object;
715  if (!Class.CastTo(object, entity))
716  {
717  return true;
718  }
719 
720  Transport transport = GetTransport();
721  if (!transport)
722  {
723  return true;
724  }
725 
726  if (object == transport || object.GetParent() == transport)
727  {
728  return true;
729  }
730 
731  return transport.IsIgnoredObject(object);
732  }
733 }
734 
735 // *************************************************************************************
736 // ! HumanCommandClimb
737 // *************************************************************************************
738 
740 class SHumanCommandClimbResult
741 {
742  bool m_bIsClimb;
746 
748 
753 
757 };
758 
759 
762 {
768 };
769 
772 {
773  private void HumanCommandClimb() {}
774  private void ~HumanCommandClimb() {}
775 
777  proto native int GetState();
778 
780  proto native vector GetGrabPointWS();
781 
783  proto native vector GetClimbOverStandPointWS();
784 
787  proto native static bool DoClimbTest(Human pHuman, SHumanCommandClimbResult pResult, int pDebugDrawLevel);
788 
791  proto native static bool DebugDrawClimb(Human pHuman, int pLevel);
792 }
793 
794 
795 
796 
797 // *************************************************************************************
798 // ! HumanCommandFullBodyDamage - full body damages
799 // *************************************************************************************
801 {
802  private void HumanCommandFullBodyDamage() {}
803  private void ~HumanCommandFullBodyDamage() {}
804 }
805 
806 
809 {
810  INTERRUPT = 15,
811  NONE = -1,
812  RELOAD = 0,
817  FIRE = 5,
818  HIDE = 6,
819  SHOW = 7,
821 };
825 {
827  RELOADRIFLE_MAGAZINE_BULLET = 0, // CMD_Reload_Magazine
833 
834  // reload action types - pistols
843 
845  RELOADRIFLE_MAGAZINE_DETACH = 17, // CMD_Reload_Magazine
846 
847  RELOADSRIFLE_MAGAZINE_BULLET = 20, // CMD_Reload_Magazine
851 };
852 
854 {
857 }
858 
859 enum WeaponActionMechanismTypes
860 {
862  MECHANISM_OPENED = 0, // CMD_Reload_BoltAction
863  MECHANISM_CLOSED = 1,
864  MECHANISM_SPECIAL = 2, // crossbow, magnum ... special mechanism action apropriate for custom weapons
866 };
867 
869 {
872  CHAMBERING_ONEBULLET_OPENED = 0, // CMD_Reload_Chambering
877  CHAMBERING_TWOBULLETS_START = 6, // plays one bullet, then second, then ends, when CHAMBERING_TWOBULLETS_END arise, it's canceled
878  CHAMBERING_TWOBULLETS_END = 7, // - one bullet reload with closed mechanism
879  CHAMBERING_STARTLOOPABLE_CLOSED = 10, // start loop chambering
880  CHAMBERING_ENDLOOPABLE = 11, // end loop chambering
881  CHAMBERING_STARTLOOPABLE_CLOSED_KEEP = 12, // start loop chambering and keep last bullet
883 
886 
891 
892 
893  CHAMBERING_CROSSBOW_OPENED = 21, // chambering crossbow
894  CHAMBERING_CROSSBOW_CLOSED = 22, // chambering crossbow
895  CHAMBERING_CROSSBOW_FULL = 23, // chambering crossbow
896 };
897 
899 {
900  CHAMBERINGLOADER_OPENED = 0, // CMD_Reload_ChamberingFast - one bullet reload with open mechanism
901  CHAMBERINGLOADER_CLOSED = 1, // - one bullet reload with closed mechanism
902 };
903 
905 {
907  UNJAMMING_START = 1, // CMD_Weapon_Jam - 0
908  UNJAMMING_END = 0, // 1
910 };
911 
913 {
918  FIRE_DRY = 4,
920 };
921 
923 {
934 };
935 
936 string WeaponActionTypeToString (int A, int AT)
937 {
938  switch (A)
939  {
940  case WeaponActions.INTERRUPT: return "Weapon interrupt";
941  case WeaponActions.NONE: return "---";
942  case WeaponActions.RELOAD: return typename.EnumToString(WeaponActionReloadTypes, AT);
943  case WeaponActions.MECHANISM: return typename.EnumToString(WeaponActionMechanismTypes, AT);
944  case WeaponActions.CHAMBERING: return typename.EnumToString(WeaponActionChamberingTypes, AT);
945  case WeaponActions.CHAMBERING_LOADER: return typename.EnumToString(WeaponActionChamberingLoaderTypes, AT);
946  case WeaponActions.UNJAMMING: return typename.EnumToString(WeaponActionUnjammingTypes, AT);
947  case WeaponActions.FIRE: return typename.EnumToString(WeaponActionFireTypes, AT);
948  case WeaponActions.HIDE: return typename.EnumToString(WeaponHideShowTypes, AT);
949  case WeaponActions.SHOW: return typename.EnumToString(WeaponHideShowTypes, AT);
950  }
951  return "---";
952 }
953 
956 {
976  HAMMER_COCKED
980 };
981 
982 
983 // *************************************************************************************
984 // ! HumanCommandWeapons - weapon handling
985 // *************************************************************************************
987 {
988  private void HumanCommandWeapons() {}
989  private void ~HumanCommandWeapons() {}
990 
992  proto native bool IsActionFinished();
993 
995  proto native int GetRunningAction();
996 
998  proto native int GetRunningActionType();
999 
1001  proto native void SetActionProgressParams(float pStart, float pEnd);
1002 
1004  proto native bool StartAction(WeaponActions pAction, int pActionType);
1005 
1007  proto native void RegisterEvent(string pName, int pId);
1008 
1010  proto native int IsEvent();
1011 
1013  proto native bool IsInWeaponReloadBulletSwitchState();
1014 
1016  proto native void SetADS(bool pState);
1017 
1019  proto native void LiftWeapon(bool pState);
1020 
1022  void RegisterDefaultEvents()
1023  {
1024  RegisterEvent("Weapon_AttachmentHide", WeaponEvents.ATTACHMENT_HIDE);
1025  RegisterEvent("Weapon_AttachmentShow", WeaponEvents.ATTACHMENT_SHOW);
1026  RegisterEvent("Weapon_BulletEject", WeaponEvents.BULLET_EJECT);
1027  RegisterEvent("Weapon_BulletHide", WeaponEvents.BULLET_HIDE);
1028  RegisterEvent("Weapon_BulletHide2", WeaponEvents.BULLET_HIDE2);
1029  RegisterEvent("Weapon_BulletInChamber", WeaponEvents.BULLET_IN_CHAMBER);
1030  RegisterEvent("Weapon_BulletInMagazine", WeaponEvents.BULLET_IN_MAGAZINE);
1031  RegisterEvent("Weapon_BulletShow", WeaponEvents.BULLET_SHOW);
1032  RegisterEvent("Weapon_BulletShow2", WeaponEvents.BULLET_SHOW2);
1033  RegisterEvent("Weapon_CanUnjam_End", WeaponEvents.CANUNJAM_END);
1034  RegisterEvent("Weapon_CanUnjam_Start", WeaponEvents.CANUNJAM_START);
1035  RegisterEvent("Weapon_Cocked", WeaponEvents.COCKED);
1036  RegisterEvent("Weapon_MagazineAttached", WeaponEvents.MAGAZINE_ATTACHED);
1037  RegisterEvent("Weapon_MagazineDetached", WeaponEvents.MAGAZINE_DETACHED);
1038  RegisterEvent("Weapon_MagazineHide", WeaponEvents.MAGAZINE_HIDE);
1039  RegisterEvent("Weapon_MagazineShow", WeaponEvents.MAGAZINE_SHOW);
1040  RegisterEvent("Weapon_SliderOpen", WeaponEvents.SLIDER_OPEN);
1041  RegisterEvent("Weapon_Unjammed", WeaponEvents.UNJAMMED);
1042  RegisterEvent("Weapon_Hammer_Uncocked", WeaponEvents.HAMMER_UNCOCKED);
1043  RegisterEvent("Weapon_Hammer_Cocked", WeaponEvents.HAMMER_COCKED);
1044  RegisterEvent("Weapon_Change_Hide", WeaponEvents.CHANGE_HIDE);
1045  RegisterEvent("Weapon_Change_Show", WeaponEvents.CHANGE_SHOW);
1046  RegisterEvent("Weapon_CylinderRotate", WeaponEvents.CYLINDER_ROTATE);
1047  }
1048 
1049  //----------------------------------------------------
1050  // weapon init states
1051 
1052 
1057  proto native void SetInitState(int pFrameIndex);
1058 
1060  proto native static void StaticSetInitState(Human pHuman, int pFrameIdx);
1061 
1062 
1063  //----------------------------------------------------
1064  //
1065 
1067  proto native float GetBaseAimingAngleUD();
1068 
1070  proto native float GetBaseAimingAngleLR();
1071 
1072 
1073  //----------------------------------------------------
1074  // throwing
1075  proto native void SetThrowingMode(bool pState);
1076 
1077  proto native bool IsThrowingMode();
1078 
1079  proto native void ThrowItem(int throwType);
1080 
1081  proto native bool WasItemLeaveHandsEvent();
1082 
1083  //----------------------------------------------------
1084  // debug copy
1085 
1087  proto native int DebugIsEvent();
1088 
1090  proto native void DebugResetEvents();
1091 }
1092 
1093 
1094 // *************************************************************************************
1095 // ! HumanCommandAdditives - additional damage
1096 // *************************************************************************************
1098 {
1099  private void HumanCommandAdditives() {}
1100  private void ~HumanCommandAdditives() {}
1101 
1103  proto native void SetInjured(float pValue, bool pInterpolate);
1104 
1106  proto native void SetExhaustion(float pValue, bool pInterpolate);
1107 
1109  proto native void SetTalking(bool pValue);
1110 
1112  proto native void StartModifier(int pType);
1113 
1115  proto native void CancelModifier();
1116 
1118  proto native bool IsModifierActive();
1122 // *************************************************************************************
1123 // ! HumanMovementState - movement state, command, stance, movement, human.GetMovementState(movementState)
1124 // *************************************************************************************
1126 {
1127  int m_CommandTypeId;
1128  int m_iStanceIdx;
1129  int m_iMovement;
1130  float m_fLeaning;
1131 
1132  int m_LocalMovement = -1;
1135  bool IsRaised()
1136  {
1137  return m_iStanceIdx >= DayZPlayerConstants.STANCEIDX_RAISEDERECT;
1138  }
1141  bool IsRaisedInProne()
1142  {
1143  return m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE;
1144  }
1147  bool IsInProne()
1148  {
1149  return m_iStanceIdx == DayZPlayerConstants.STANCEIDX_PRONE;
1150  }
1153  bool IsInRaisedProne()
1154  {
1155  return m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE;
1156  }
1157 
1159  bool IsLeaning()
1160  {
1161  return m_fLeaning != 0;
1162  }
1163 }
1164 
1165 
1173 class HumanCommandScript
1174 {
1176  // HumanCommandScript(Human pHuman);
1177 
1180  void OnActivate() { };
1181 
1183  void OnDeactivate() { };
1184 
1185 
1186  //---------------------------------------------------------------
1187  // usable everywhere
1188 
1190  proto native void SetFlagFinished(bool pFinished);
1191 
1192 
1193  //---------------------------------------------------------------
1194  // PreAnim Update
1195 
1199  void PreAnimUpdate(float pDt);
1200 
1202  proto native void PreAnim_CallCommand(int pCommand, int pParamInt, float pParamFloat);
1203  proto native void PreAnim_SetFloat(int pVar, float pFlt);
1204  proto native void PreAnim_SetInt(int pVar, int pInt);
1205  proto native void PreAnim_SetBool(int pVar, bool pBool);
1206 
1208  proto native void PreAnim_SetFilteredHeading(float pYawAngle, float pFilterDt, float pMaxYawSpeed);
1209 
1210  //---------------------------------------------------------------
1211  // PrePhys Update
1212 
1215  void PrePhysUpdate(float pDt);
1216 
1218  proto native bool PrePhys_IsEvent(int pEvent);
1219  proto native bool PrePhys_IsTag(int pTag);
1220  proto native bool PrePhys_GetTranslation(out vector pOutTransl); // vec3 in local space !
1221  proto native bool PrePhys_GetRotation(out float pOutRot[4]); // quaternion in local space !
1222  proto native void PrePhys_SetTranslation(vector pInTransl); // vec3 in local space !
1223  proto native void PrePhys_SetRotation(float pInRot[4]); // quaternion in local space !
1224 
1225  //---------------------------------------------------------------
1226  // PostPhys Update
1227 
1231  bool PostPhysUpdate(float pDt);
1232 
1234  proto native void PostPhys_GetPosition(out vector pOutTransl);
1235  proto native void PostPhys_GetRotation(out float pOutRot[4]);
1236  proto native void PostPhys_SetPosition(vector pInTransl);
1237  proto native void PostPhys_SetRotation(float pInRot[4]);
1238  proto native void PostPhys_LockRotation();
1244  None = 0,
1254  CommandLadder = 512,
1255  CommandSwim = 1024,
1256  CommandVehicle = 2048,
1257  CommandActionFullbody = 4096,
1258  CommandActionAdditive = 8192
1259 }
1260 
1261 // *************************************************************************************
1262 // ! Human - human script interface
1263 // *************************************************************************************
1264 class Human extends Man
1265 {
1266 
1268  proto native void GetTransformWS(out vector pTm[4]);
1269 
1271  proto native bool CheckFreeSpace(vector localDir, float distance, bool useHeading, vector posOffset = vector.Zero, float xzScale = 1.0);
1272 
1274  proto float CollisionMoveTest(vector dir, vector offset, float xzScale, IEntity ignoreEntity, out IEntity hitEntity, out vector hitPosition, out vector hitNormal);
1275 
1276  //---------------------------------------------------------
1277  // link/unlink to/from local space
1278  proto native void LinkToLocalSpaceOf(notnull IEntity child, vector pLocalSpaceMatrix[4]);
1279  proto native void UnlinkFromLocalSpace();
1280 
1281  //---------------------------------------------------------
1282  // bone transforms
1283 
1285  proto native int GetBoneIndexByName(string pBoneName);
1286 
1287 
1289  proto native HumanAnimInterface GetAnimInterface();
1290 
1291  //---------------------------------------------------------
1292  // physic props
1293 
1295  proto native bool PhysicsIsFalling(bool pValidate);
1296 
1298  proto native void PhysicsGetVelocity(out vector pVelocity);
1299 
1300  proto native void PhysicsEnableGravity(bool pEnable);
1301 
1302  proto native bool PhysicsIsSolid();
1303  proto native void PhysicsSetSolid(bool pSolid);
1304 
1306  proto native void PhysicsSetRagdoll(bool pEnable);
1307 
1308  //---------------------------------------------------------
1309  // controller
1310 
1313 
1314  //---------------------------------------------------------
1315  // item accessor
1316 
1317  proto native HumanItemAccessor GetItemAccessor();
1318 
1319 
1320  //---------------------------------------------------------
1321  // commands
1322 
1324  proto native void GetMovementState(HumanMovementState pState);
1325 
1327  proto native int GetCurrentCommandID();
1328 
1329 
1331 
1333  proto native HumanCommandMove StartCommand_Move();
1334 
1335  proto native HumanCommandMove GetCommand_Move();
1336 
1338 
1340  proto native HumanCommandMelee StartCommand_Melee(EntityAI pTarget);
1341 
1342  proto native HumanCommandMelee GetCommand_Melee();
1343 
1345  proto native HumanCommandMelee2 StartCommand_Melee2(EntityAI pTarget, int pHitType, float pComboValue, vector hitPos = vector.Zero);
1346 
1347  proto native HumanCommandMelee2 GetCommand_Melee2();
1348 
1349 
1351 
1355  proto native HumanCommandFall StartCommand_Fall(float pYVelocity);
1356 
1358  proto native HumanCommandFall GetCommand_Fall();
1359 
1360 
1362 
1364  proto native HumanCommandLadder StartCommand_Ladder(Building pBuilding, int pLadderIndex);
1365 
1366  proto native HumanCommandLadder GetCommand_Ladder();
1367 
1368 
1370 
1372  proto native HumanCommandSwim StartCommand_Swim();
1373 
1374  proto native HumanCommandSwim GetCommand_Swim();
1375 
1376 
1378 
1380  proto native HumanCommandVehicle StartCommand_Vehicle(Transport pTransport, int pTransportPositionIndex, int pVehicleSeat, bool fromUnconscious = false);
1381 
1382  proto native HumanCommandVehicle GetCommand_Vehicle();
1383 
1384 
1386 
1388  proto native HumanCommandClimb StartCommand_Climb(SHumanCommandClimbResult pClimbResult, int pType);
1389 
1390  proto native HumanCommandClimb GetCommand_Climb();
1391 
1393 
1395  proto native HumanCommandDeathCallback StartCommand_Death(int pType, float pDirection, typename pCallbackClass, bool pKeepInLocalSpaceAfterLeave = false);
1396 
1398 
1399 
1401  proto native HumanCommandUnconscious StartCommand_Unconscious(float pType);
1402 
1404 
1405 
1407 
1409  // -> of type 0,...
1410  // -> from direction (lback -180,left -90,0,righ 90,rightback 180)
1411  proto native HumanCommandFullBodyDamage StartCommand_Damage(int pType, float pDirection);
1412 
1414 
1415 
1416 
1418 
1421  proto native HumanCommandActionCallback StartCommand_Action(int pActionID, typename pCallbackClass, int pStanceMask);
1422 
1425 
1426 
1427  //---------------------------------------------------------
1428  // command modifiers
1429 
1431  proto native int GetCommandModifierCount();
1432 
1434  proto native int GetCommandModifierID(int pIndex);
1435 
1436 
1438 
1441 
1444 
1445 
1446 
1447 
1448  // --- modifier/additive actions - played on COMMANDID_MOVE command
1449 
1451  proto native HumanCommandActionCallback AddCommandModifier_Action(int pActionID, typename pCallbackClass);
1452 
1454  proto native void DeleteCommandModifier_Action(HumanCommandActionCallback pCallback);
1455 
1458 
1459 
1460 
1462 
1464  // -> of type 0,...
1465  // -> from direction (lback -180,left -90,0,righ 90,rightback 180)
1466  proto native HumanCommandDamage AddCommandModifier_Damage(int pType, float pDirection);
1467 
1468  proto native void DeleteCommandModifier_Damage(HumanCommandDamage pDamage);
1469 
1471 
1472 
1474 
1477  proto native HumanCommandScript StartCommand_Script(HumanCommandScript pHumanCommand);
1478  proto native HumanCommandScript StartCommand_ScriptInst(typename pCallbackClass);
1479 
1481  proto native HumanCommandScript GetCommand_Script();
1482 
1483 
1484 
1485  //---------------------------------------------------------
1486  // debug info for Item Accessor
1487 
1488 
1490  proto native owned string DebugGetItemClass();
1491 
1493  proto native owned string DebugGetItemSuperClass();
1494 
1496  proto native owned string DebugGetItemAnimInstance();
1497 
1498 
1499  //---------------------------------------------------------
1500  // helper functions for disabling simulation upon death
1501  proto native void StartDeath();
1502  proto native void ResetDeath();
1503 
1504  proto native void ResetDeathCooldown();
1505  proto native bool IsDeathProcessed();
1506  proto native bool IsDeathConditionMet();
1507 
1508 
1509  //--------------------------------------------------------
1510  // commands start/finish events
1511 
1512  void OnCommandMoveStart();
1513  void OnCommandMoveFinish();
1514 
1515  void OnCommandMeleeStart();
1516  void OnCommandMeleeFinish();
1517 
1518  void OnCommandMelee2Start();
1519  void OnCommandMelee2Finish();
1520 
1521  void OnCommandFallStart();
1522  void OnCommandFallFinish();
1523 
1524  void OnCommandClimbStart();
1525  void OnCommandClimbFinish();
1526 
1527  void OnCommandDeathStart();
1528  void OnCommandDeathFinish();
1529 
1532 
1535 
1538 
1539  void OnCommandLadderStart();
1540  void OnCommandLadderFinish();
1541 
1542  void OnCommandSwimStart();
1543  void OnCommandSwimFinish();
1544 
1545  void OnCommandVehicleStart();
1546  void OnCommandVehicleFinish();
1547 
1550 
1553 
1555  void OnStanceChange(int previousStance, int newStance);
1556 
1558  bool CanChangeStance(int previousStance, int newStance);
1559 
1560  //--------------------------------------------------------
1561  // rolling API
1562 
1563  bool CanRoll();
1564  void OnRollStart(bool isToTheRight);
1565  void OnRollFinish();
1566 }
TAnimGraphCommand
class HumanInputController TAnimGraphCommand
MECHANISM
@ MECHANISM
Definition: human.c:813
CanRoll
bool CanRoll()
PostPhysUpdate
bool PostPhysUpdate(float pDt)
CommandMelee2
CommandMelee2
Definition: human.c:1242
RELOADRIFLE_CLIP_NOBULLET
@ RELOADRIFLE_CLIP_NOBULLET
Definition: human.c:855
HumanCommandActionCallback
class HumanAnimInterface HumanCommandActionCallback()
UNJAMMING
@ UNJAMMING
Definition: human.c:816
GetCommandModifier_Damage
proto native HumanCommandDamage GetCommandModifier_Damage()
UNJAMMING_START
@ UNJAMMING_START
unjam action types
Definition: human.c:907
MECHANISM_CLOSED_UNCOCKED
enum WeaponActionReloadClipTypes MECHANISM_CLOSED_UNCOCKED
m_ClimbGrabPointNormal
vector m_ClimbGrabPointNormal
grab point for climb && climb over (in local space of it's parent)
Definition: human.c:750
SetFlagFinished
proto native void SetFlagFinished(bool pFinished)
this terminates human command script and shows CommandHandler( ... pCurrentCommandFinished == true );
GetCommand_Fall
proto native HumanCommandFall GetCommand_Fall()
CHAMBERING_CROSSBOW_OPENED
@ CHAMBERING_CROSSBOW_OPENED
Definition: human.c:893
ONE_FRAME
@ ONE_FRAME
Permenantly active until DISABLED is passed.
Definition: human.c:11
GetCommandModifierID
proto native int GetCommandModifierID(int pIndex)
returns COMMANDID_ .. type id of command modifier on index pIndex
m_fClimbHeight
float m_fClimbHeight
Definition: human.c:747
HIDESHOW_SLOT_2HDRIGHTBACK
@ HIDESHOW_SLOT_2HDRIGHTBACK
Definition: human.c:927
HumanCommandAdditives
class HumanCommandWeapons HumanCommandAdditives()
Definition: human.c:1099
BULLET_EJECT
@ BULLET_EJECT
Definition: human.c:959
m_bIsClimbOver
bool m_bIsClimbOver
Definition: human.c:743
HumanAnimInterface
Definition: human.c:282
CHAMBERING_LOADER
@ CHAMBERING_LOADER
Definition: human.c:815
CHAMBERING_DOUBLE_4
@ CHAMBERING_DOUBLE_4
Definition: human.c:890
IsDeathProcessed
proto native bool IsDeathProcessed()
OnCommandMelee2Finish
void OnCommandMelee2Finish()
OnCommandMeleeStart
void OnCommandMeleeStart()
PrePhys_IsTag
proto native bool PrePhys_IsTag(int pTag)
SetAligning
proto native void SetAligning(vector pPositionWS, vector pDirectionWS)
enables character aligning to desired position and direction in world space
AddCommandModifier_Damage
proto native HumanCommandDamage AddCommandModifier_Damage(int pType, float pDirection)
— modifier for light Damages
GetCommand_Ladder
proto native HumanCommandLadder GetCommand_Ladder()
IsLanding
proto native bool IsLanding()
returns true if fall is in landing state
GetStateString
string GetStateString()
returns debug string of current state
Definition: human.c:392
GetState
proto native int GetState()
returns one of STATE_...
Definition: staminahandler.c:29
HumanCommandMelee
class HumanCommandMove HumanCommandMelee()
Definition: human.c:513
ATTACHMENT_SHOW
@ ATTACHMENT_SHOW
Definition: human.c:958
RegisterAnimationEvent
proto native void RegisterAnimationEvent(string pAnimationEventStr, int pId)
registers animation event, when event registered and received - it sends OnAnimationEvent with regist...
BULLET_SHOW
@ BULLET_SHOW
Definition: human.c:964
BULLET_IN_CHAMBER
@ BULLET_IN_CHAMBER
Definition: human.c:962
OnCommandMoveStart
void OnCommandMoveStart()
CommandMove
CommandMove
Definition: human.c:1240
CHAMBERINGLOADER_OPENED
@ CHAMBERINGLOADER_OPENED
Definition: human.c:900
OnCommandLadderFinish
void OnCommandLadderFinish()
OnCommandVehicleFinish
void OnCommandVehicleFinish()
PrePhysUpdate
void PrePhysUpdate(float pDt)
~HumanCommandMelee
private void ~HumanCommandMelee()
Definition: human.c:514
CommandActionFullbody
CommandActionFullbody
Definition: human.c:1252
HumanCommandFullBodyDamage
enum WeaponActions HumanCommandFullBodyDamage
Definition: human.c:802
RELOADRIFLE_MAGAZINE_DETACH
@ RELOADRIFLE_MAGAZINE_DETACH
Definition: human.c:845
HumanCommandDeath
class HumanCommandDeathCallback HumanCommandDeath()
Definition: human.c:611
OnActivate
class HumanMovementState OnActivate()
HumanCommandScript fully scriptable command.
Definition: human.c:1180
WeaponActionTypeToString
string WeaponActionTypeToString(int A, int AT)
Definition: human.c:936
HumanCommandDeathCallback
Definition: human.c:595
GetMovementState
proto native void GetMovementState(HumanMovementState pState)
returns movement state (current command id, )
OnCommandClimbFinish
void OnCommandClimbFinish()
DeleteCommandModifier_Action
proto native void DeleteCommandModifier_Action(HumanCommandActionCallback pCallback)
force remove - normally if action is ended or interrupted - this is not needed to call
RELOADRIFLE_MAGAZINE_BULLET
@ RELOADRIFLE_MAGAZINE_BULLET
reload action types - rifles
Definition: human.c:827
CommandLadder
CommandLadder
Definition: human.c:1249
StartCommand_Script
proto native HumanCommandScript StartCommand_Script(HumanCommandScript pHumanCommand)
— SCRIPTED COMMANDS
RELOADSRIFLE_NOMAGAZINE_BULLET
@ RELOADSRIFLE_NOMAGAZINE_BULLET
Definition: human.c:848
OnCommandMeleeFinish
void OnCommandMeleeFinish()
RELOADRIFLE_NOMAGAZINE_NOBULLET_OPEN
@ RELOADRIFLE_NOMAGAZINE_NOBULLET_OPEN
Definition: human.c:832
CHAMBERING_STARTLOOPABLE_SHOTGUN_UNCOCKED
@ CHAMBERING_STARTLOOPABLE_SHOTGUN_UNCOCKED
Definition: human.c:884
SetInjured
proto native void SetInjured(float pValue, bool pInterpolate)
sets injury level 0..1, interpolate == false -> resets the value, otherwise it's interpolating toward...
GetCommand_Death
proto native HumanCommandDeathCallback GetCommand_Death()
OnCommandSwimFinish
void OnCommandSwimFinish()
GetCommand_Damage
proto native HumanCommandFullBodyDamage GetCommand_Damage()
m_ClimbStandPoint
vector m_ClimbStandPoint
normal to grabpoint position (used for character orientation)
Definition: human.c:751
HumanCommandMelee2
Definition: human.c:536
~HumanCommandAdditives
private void ~HumanCommandAdditives()
Definition: human.c:1100
MECHANISM_SPECIAL
enum WeaponActionReloadClipTypes MECHANISM_SPECIAL
ResetDeath
proto native void ResetDeath()
PostPhys_GetPosition
proto native void PostPhys_GetPosition(out vector pOutTransl)
script function usable in PostPhysUpdate
StartModifier
proto native void StartModifier(int pType)
starts modifier
CollisionMoveTest
proto float CollisionMoveTest(vector dir, vector offset, float xzScale, IEntity ignoreEntity, out IEntity hitEntity, out vector hitPosition, out vector hitNormal)
makes test if character can physically move in given direction - length of dir means distance,...
OnCommandSwimStart
void OnCommandSwimStart()
PrePhys_SetRotation
proto native void PrePhys_SetRotation(float pInRot[4])
WeaponActionUnjammingTypes
WeaponActionUnjammingTypes
Definition: human.c:904
EnableCancelCondition
proto native void EnableCancelCondition(bool pEnable)
SetExhaustion
proto native void SetExhaustion(float pValue, bool pInterpolate)
sets exhaustion level 0..1, interpolate == false -> resets the value, otherwise it's interpolating to...
IsUserActionCallback
bool IsUserActionCallback()
Definition: human.c:413
BULLET_HIDE2
@ BULLET_HIDE2
Definition: human.c:961
CHAMBERING_ONEBULLET_CLOSED_UNCOCKED
@ CHAMBERING_ONEBULLET_CLOSED_UNCOCKED
Definition: human.c:874
BULLET_IN_MAGAZINE
@ BULLET_IN_MAGAZINE
Definition: human.c:963
CommandClimb
CommandClimb
Definition: human.c:1244
EnableStateChangeCallback
proto native void EnableStateChangeCallback()
enables state change callback OnStateChange
m_bFinishWithFall
bool m_bFinishWithFall
Definition: human.c:744
WeaponEvents
WeaponEvents
events
Definition: human.c:955
STATE_MOVE
@ STATE_MOVE
Definition: human.c:763
MAGAZINE_HIDE
@ MAGAZINE_HIDE
Definition: human.c:971
~HumanCommandActionCallback
private void ~HumanCommandActionCallback()
OnCommandVehicleStart
void OnCommandVehicleStart()
RELOAD
@ RELOAD
Definition: human.c:812
~HumanCommandDamage
private void ~HumanCommandDamage()
Definition: human.c:638
WeaponActionFireTypes
WeaponActionFireTypes
Definition: human.c:912
IsOnBack
proto native bool IsOnBack()
return true if prone is on back
RELOADPISTOL_MAGAZINE_BULLET_CLOSED
@ RELOADPISTOL_MAGAZINE_BULLET_CLOSED
Definition: human.c:837
PrePhys_IsEvent
proto native bool PrePhys_IsEvent(int pEvent)
script function usable in PrePhysUpdate
RELOADPISTOL_NOMAGAZINE_NOBULLET_CLOSED_UNCOCKED
@ RELOADPISTOL_NOMAGAZINE_NOBULLET_CLOSED_UNCOCKED
Definition: human.c:835
StartCommand_Ladder
proto native HumanCommandLadder StartCommand_Ladder(Building pBuilding, int pLadderIndex)
--— LADDER --—
PhysicsSetRagdoll
proto native void PhysicsSetRagdoll(bool pEnable)
Sets and synchronize interaction layers 'RAGDOLL' and 'RAGDOLL_NO_CHARACTER' to prevent body stacking...
STATE_ONTOP
@ STATE_ONTOP
Definition: human.c:765
OnCommandLadderStart
void OnCommandLadderStart()
GetTransformWS
enum HumanMoveCommandID GetTransformWS(out vector pTm[4])
gets human transform in World Space
ContinueCombo
proto native void ContinueCombo()
marks command to continue to combo
RELOADSRIFLE_MAGAZINE_NOBULLET
@ RELOADSRIFLE_MAGAZINE_NOBULLET
Definition: human.c:849
WeaponActionReloadTypes
WeaponActionReloadTypes
Definition: human.c:824
PrePhys_SetTranslation
proto native void PrePhys_SetTranslation(vector pInTransl)
StartCommand_Fall
proto native HumanCommandFall StartCommand_Fall(float pYVelocity)
--— FALL --—
CHAMBERING_DOUBLE_1
@ CHAMBERING_DOUBLE_1
Definition: human.c:887
GetCurrentCommandID
proto native int GetCurrentCommandID()
returns current command ID (see DayZPlayerConstants.COMMANDID_...)
m_ClimbStandPointParent
IEntity m_ClimbStandPointParent
parent of grabpoint
Definition: human.c:755
MAGAZINE_SHOW
@ MAGAZINE_SHOW
Definition: human.c:972
Param3
Definition: entityai.c:95
UNJAMMED
@ UNJAMMED
Definition: human.c:974
DeleteCommandModifier_Damage
proto native void DeleteCommandModifier_Damage(HumanCommandDamage pDamage)
GetCommandModifier_Additives
proto native HumanCommandAdditives GetCommandModifier_Additives()
default (always-on modifiers)
CommandVehicle
CommandVehicle
Definition: human.c:1251
m_ClimbOverStandPoint
vector m_ClimbOverStandPoint
where climb ends (in local space of it's parent)
Definition: human.c:752
StartCommand_Melee
proto native HumanCommandMelee StartCommand_Melee(EntityAI pTarget)
--— MELEE --—
RELOADRIFLE_NOMAGAZINE_NOBULLET
@ RELOADRIFLE_NOMAGAZINE_NOBULLET
Definition: human.c:830
StartCommand_Melee2
proto native HumanCommandMelee2 StartCommand_Melee2(EntityAI pTarget, int pHitType, float pComboValue, vector hitPos=vector.Zero)
starts command - melee2
PreAnim_SetBool
proto native void PreAnim_SetBool(int pVar, bool pBool)
IEntity
Definition: enentity.c:164
CHAMBERING_TWOBULLETS_START
@ CHAMBERING_TWOBULLETS_START
Definition: human.c:877
OnCommandFallStart
void OnCommandFallStart()
HIDESHOW_SLOT_1HDRIGHTBACK
@ HIDESHOW_SLOT_1HDRIGHTBACK
Definition: human.c:929
HumanMovementState
Definition: human.c:1125
GetItemAccessor
proto native HumanItemAccessor GetItemAccessor()
CYLINDER_ROTATE
@ CYLINDER_ROTATE
Definition: human.c:979
IsDeathConditionMet
proto native bool IsDeathConditionMet()
HIDESHOW_SLOT_RFLLEFTBACK
@ HIDESHOW_SLOT_RFLLEFTBACK
Definition: human.c:925
WeaponActions
WeaponActions
actions
Definition: human.c:808
m_GrabPointParent
IEntity m_GrabPointParent
where climb over ends (in local space of it's parent)
Definition: human.c:754
GetAnimInterface
proto native HumanAnimInterface GetAnimInterface()
returns animation interface - usable in HumanCommandScript implementations
DISABLED
@ DISABLED
Definition: human.c:9
CanChangeStance
bool CanChangeStance(int previousStance, int newStance)
Called by code to see if it can.
OnCommandActionFullbodyFinish
void OnCommandActionFullbodyFinish()
RELOAD_CLIP
@ RELOAD_CLIP
Definition: human.c:820
None
None
Definition: human.c:1239
HumanCommandClimb
command itself
Definition: human.c:771
HumanCommandDamage
class HumanCommandUnconscious HumanCommandDamage()
Definition: human.c:637
RELOAD_MAGAZINE_DETACH
@ RELOAD_MAGAZINE_DETACH
Definition: human.c:844
m_iStanceIdx
int m_iStanceIdx
current command's id
Definition: human.c:1120
PhysicsSetSolid
proto native void PhysicsSetSolid(bool pSolid)
StartCommand_Swim
proto native HumanCommandSwim StartCommand_Swim()
--— LADDER --—
RELOADPISTOL_NOMAGAZINE_NOBULLET_CLOSED_COCKED
@ RELOADPISTOL_NOMAGAZINE_NOBULLET_CLOSED_COCKED
Definition: human.c:840
MAGAZINE_DETACHED
@ MAGAZINE_DETACHED
Definition: human.c:970
OnCommandActionFullbodyStart
void OnCommandActionFullbodyStart()
RegisterEvent
proto native void RegisterEvent(string pName, int pId)
register events
CancelModifier
proto native void CancelModifier()
cancels modifier
RELOADPISTOL_MAGAZINE_NOBULLET_CLOSED_UNCOCKED
@ RELOADPISTOL_MAGAZINE_NOBULLET_CLOSED_UNCOCKED
Definition: human.c:836
vector
Definition: enconvert.c:105
HAMMER_UNCOCKED
@ HAMMER_UNCOCKED
Definition: human.c:975
StartDeath
proto native void StartDeath()
GetCommand_Melee2
proto native HumanCommandMelee2 GetCommand_Melee2()
HIDESHOW_SLOT_RFLRIGHTBACK
@ HIDESHOW_SLOT_RFLRIGHTBACK
Definition: human.c:928
HIDESHOW_SLOT_2HDLEFTBACK
@ HIDESHOW_SLOT_2HDLEFTBACK
Definition: human.c:924
Cancel
proto native void Cancel()
cancels action
HumanCommandFall
class HumanCommandMelee2 HumanCommandFall()
Definition: human.c:574
DebugGetItemAnimInstance
proto native owned string DebugGetItemAnimInstance()
returns current item's animation instance
GetCommandModifier_Action
proto native HumanCommandActionCallback GetCommandModifier_Action()
returns callback for action if any is active, null if nothing runs
DefaultCancelCondition
proto native bool DefaultCancelCondition()
system implemented cancel condition (now raise or sprint cancels action)
CommandFall
CommandFall
Definition: human.c:1243
CommandSwim
CommandSwim
Definition: human.c:1250
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
SetTalking
proto native void SetTalking(bool pValue)
sets talking
ResetAligning
proto native void ResetAligning()
disables character aligning
OnCommandDamageAdditiveStart
void OnCommandDamageAdditiveStart()
OnRollStart
void OnRollStart(bool isToTheRight)
RELOADRIFLE_MAGAZINE_NOBULLET_OPEN
@ RELOADRIFLE_MAGAZINE_NOBULLET_OPEN
Definition: human.c:831
CHAMBERING_END
@ CHAMBERING_END
Definition: human.c:870
CHAMBERING_DOUBLE_3
@ CHAMBERING_DOUBLE_3
Definition: human.c:889
HumanCommandMove
Definition: human.c:433
OnCommandMelee2Start
void OnCommandMelee2Start()
ATTACHMENT_HIDE
@ ATTACHMENT_HIDE
Definition: human.c:957
ENABLED
@ ENABLED
Definition: human.c:10
GetInputController
proto native HumanInputController GetInputController()
returns human input controller
Object
Definition: objecttyped.c:1
DebugGetItemSuperClass
proto native owned string DebugGetItemSuperClass()
returns current item's class that is found in config
CHAMBERING_STARTLOOPABLE_SHOTGUN_COCKED
@ CHAMBERING_STARTLOOPABLE_SHOTGUN_COCKED
Definition: human.c:885
GetBoneIndexByName
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
RELOADSRIFLE_NOMAGAZINE_NOBULLET
@ RELOADSRIFLE_NOMAGAZINE_NOBULLET
Definition: human.c:850
HumanCommandActionCallback
Definition: statecb.c:1
CommandMelee
CommandMelee
Definition: human.c:1241
MECHANISM_OPENED
enum WeaponActionReloadClipTypes MECHANISM_OPENED
mechanism action types
RELOADSRIFLE_MAGAZINE_BULLET
@ RELOADSRIFLE_MAGAZINE_BULLET
Definition: human.c:847
OnCommandDeathStart
void OnCommandDeathStart()
OnCommandUnconsciousStart
void OnCommandUnconsciousStart()
OnRollFinish
void OnRollFinish()
TAnimGraphTag
int TAnimGraphTag
Definition: human.c:278
Transport
Base native class for all motorized wheeled vehicles.
Definition: car.c:79
CHAMBERING_ONEBULLET_UNIQUE_CLOSED
@ CHAMBERING_ONEBULLET_UNIQUE_CLOSED
Definition: human.c:876
HumanCommandSwim
class HumanCommandLadder HumanCommandSwim()
Definition: human.c:673
AddCommandModifier_Action
proto native HumanCommandActionCallback AddCommandModifier_Action(int pActionID, typename pCallbackClass)
adds action command modifier, creates callback instance for you
OnCommandDeathFinish
void OnCommandDeathFinish()
UNJAMMING_INTERRUPT
@ UNJAMMING_INTERRUPT
Definition: human.c:909
PostPhys_SetRotation
proto native void PostPhys_SetRotation(float pInRot[4])
vec3 in world space
PostPhys_SetPosition
proto native void PostPhys_SetPosition(vector pInTransl)
quaternion in world space
GetCommand_Action
proto native HumanCommandActionCallback GetCommand_Action()
is human is in command action - returns its callback, if current command is action
WasHit
proto native bool WasHit()
is true only once after hit event
HumanCommandUnconscious
Definition: human.c:619
CHANGE_SHOW
@ CHANGE_SHOW
Definition: human.c:978
HIDESHOW_SLOT_PISTOLCHEST
@ HIDESHOW_SLOT_PISTOLCHEST
Definition: human.c:931
CheckFreeSpace
proto native bool CheckFreeSpace(vector localDir, float distance, bool useHeading, vector posOffset=vector.Zero, float xzScale=1.0)
makes test if there's enough space for character's collider assuming that character can be pushed awa...
StartCommand_Unconscious
proto native HumanCommandUnconscious StartCommand_Unconscious(float pType)
starts command - unconscious
OnCommandFallFinish
void OnCommandFallFinish()
HumanInputController
Definition: human.c:17
INTERRUPT
@ INTERRUPT
Definition: human.c:810
~HumanCommandFullBodyDamage
private void ~HumanCommandFullBodyDamage()
Definition: human.c:803
FIRE_JAM
@ FIRE_JAM
Definition: human.c:919
LinkToLocalSpaceOf
proto native void LinkToLocalSpaceOf(notnull IEntity child, vector pLocalSpaceMatrix[4])
MAGAZINE_ATTACHED
@ MAGAZINE_ATTACHED
Definition: human.c:969
HumanCommandVehicle
Definition: human.c:689
DebugGetItemClass
proto native owned string DebugGetItemClass()
returns current item's class name
PhysicsIsSolid
proto native bool PhysicsIsSolid()
m_ClimbOverStandPointParent
IEntity m_ClimbOverStandPointParent
Definition: human.c:756
RELOADRIFLE_MAGAZINE_NOBULLET
@ RELOADRIFLE_MAGAZINE_NOBULLET
Definition: human.c:829
IsInComboRange
proto native bool IsInComboRange()
returns true if hit is in range, where person can continue to combo
CHAMBERINGLOADER_CLOSED
@ CHAMBERINGLOADER_CLOSED
Definition: human.c:901
STATE_TAKEOFF
@ STATE_TAKEOFF
Definition: human.c:764
StartCommand_Damage
proto native HumanCommandFullBodyDamage StartCommand_Damage(int pType, float pDirection)
--— FullBody Damages --—
HIDESHOW_SLOT_PISTOLBELT
@ HIDESHOW_SLOT_PISTOLBELT
Definition: human.c:930
PhysicsGetVelocity
proto native void PhysicsGetVelocity(out vector pVelocity)
outs pVelocity - linear velocity of PHYSICS CONTROLLER
GetCommand_Swim
proto native HumanCommandSwim GetCommand_Swim()
GetCommand_Script
proto native HumanCommandScript GetCommand_Script()
is human is in command action - returns its callback, if current command is action
StartCommand_ScriptInst
proto native HumanCommandScript StartCommand_ScriptInst(typename pCallbackClass)
CHAMBERING_TWOBULLETS_END
@ CHAMBERING_TWOBULLETS_END
Definition: human.c:878
StartCommand_Action
proto native HumanCommandActionCallback StartCommand_Action(int pActionID, typename pCallbackClass, int pStanceMask)
--— ACTIONS --—
ResetDeathCooldown
proto native void ResetDeathCooldown()
CHAMBERING_STARTLOOPABLE_CLOSED_KEEP
@ CHAMBERING_STARTLOOPABLE_CLOSED_KEEP
Definition: human.c:881
FIRE_NORMAL
@ FIRE_NORMAL
Definition: human.c:914
OnDeactivate
void OnDeactivate()
called when command ends
Definition: human.c:1183
m_bIsClimb
class HumanCommandVehicle m_bIsClimb
result from static test
~HumanCommandFall
private void ~HumanCommandFall()
Definition: human.c:575
STATE_FINISH
@ STATE_FINISH
Definition: human.c:767
Land
proto native void Land(int pLandType)
end fall with land
PreAnim_CallCommand
proto native void PreAnim_CallCommand(int pCommand, int pParamInt, float pParamFloat)
function usable in PreAnimUpdate or in !!! OnActivate !!!
StartCommand_Climb
proto native HumanCommandClimb StartCommand_Climb(SHumanCommandClimbResult pClimbResult, int pType)
--— CLIMB --—
HumanCommandWeapons
Definition: human.c:986
CHAMBERING_CROSSBOW_FULL
@ CHAMBERING_CROSSBOW_FULL
Definition: human.c:895
OnStanceChange
void OnStanceChange(int previousStance, int newStance)
gets called on stance change
StartCommand_Move
proto native HumanCommandMove StartCommand_Move()
--— MOVE --—
m_ClimbGrabPoint
vector m_ClimbGrabPoint
Definition: human.c:749
IsModifierActive
proto native bool IsModifierActive()
is modifier active
MECHANISM_CLOSED
enum WeaponActionReloadClipTypes MECHANISM_CLOSED
TAnimGraphEvent
int TAnimGraphEvent
Definition: human.c:279
PreAnimUpdate
void PreAnimUpdate(float pDt)
GetHuman
proto native Human GetHuman()
get the human this cb belongs to
PreAnim_SetFloat
proto native void PreAnim_SetFloat(int pVar, float pFlt)
StartCommand_Death
proto native HumanCommandDeathCallback StartCommand_Death(int pType, float pDirection, typename pCallbackClass, bool pKeepInLocalSpaceAfterLeave=false)
--— Death --—
CHAMBERING_DOUBLE_2
@ CHAMBERING_DOUBLE_2
Definition: human.c:888
PrePhys_GetTranslation
proto native bool PrePhys_GetTranslation(out vector pOutTransl)
RELOADPISTOL_NOMAGAZINE_BULLET_CLOSED
@ RELOADPISTOL_NOMAGAZINE_BULLET_CLOSED
Definition: human.c:838
RELOADPISTOL_NOMAGAZINE_NOBULLET_OPENED
@ RELOADPISTOL_NOMAGAZINE_NOBULLET_OPENED
Definition: human.c:841
OnCommandUnconsciousFinish
void OnCommandUnconsciousFinish()
RELOADPISTOL_MAGAZINE_NOBULLET_OPENED
@ RELOADPISTOL_MAGAZINE_NOBULLET_OPENED
Definition: human.c:842
PreAnim_SetFilteredHeading
proto native void PreAnim_SetFilteredHeading(float pYawAngle, float pFilterDt, float pMaxYawSpeed)
sets character rotation (heading)
HIDESHOW_SLOT_INVENTORY
@ HIDESHOW_SLOT_INVENTORY
Definition: human.c:933
SHOW
@ SHOW
Definition: human.c:819
FIRE_COCKED
@ FIRE_COCKED
Definition: human.c:916
GetParent
proto native Widget GetParent()
Get parent of the Effect.
Definition: effect.c:405
HumanCommandLadder
Definition: human.c:644
TAnimGraphVariable
int TAnimGraphVariable
Definition: human.c:277
HIDE
@ HIDE
Definition: human.c:818
OnCommandClimbStart
void OnCommandClimbStart()
WeaponActionReloadClipTypes
WeaponActionReloadClipTypes
Definition: human.c:853
~HumanCommandSwim
private void ~HumanCommandSwim()
Definition: human.c:674
GetCommand_Vehicle
proto native HumanCommandVehicle GetCommand_Vehicle()
PhysicsIsFalling
proto native bool PhysicsIsFalling(bool pValidate)
returns true if physics controller is falling
WeaponHideShowTypes
WeaponHideShowTypes
Definition: human.c:922
PhysicsLanded
proto native bool PhysicsLanded()
this is true when fall has physically landed - need to call Land after this is true
HIDESHOW_SLOT_KNIFEBACK
@ HIDESHOW_SLOT_KNIFEBACK
Definition: human.c:932
WeaponActionChamberingLoaderTypes
WeaponActionChamberingLoaderTypes
Definition: human.c:898
HIDESHOW_SLOT_1HDLEFTBACK
@ HIDESHOW_SLOT_1HDLEFTBACK
Definition: human.c:926
OnCommandActionAdditiveFinish
void OnCommandActionAdditiveFinish()
GetCommand_Unconscious
proto native HumanCommandUnconscious GetCommand_Unconscious()
CommandActionAdditive
CommandActionAdditive
Definition: human.c:1253
OnCommandDamageFullbodyFinish
void OnCommandDamageFullbodyFinish()
HumanItemAccessor
private void HumanItemAccessor()
Definition: humanitems.c:141
RELOADPISTOL_MAGAZINE_NOBULLET_CLOSED_COCKED
@ RELOADPISTOL_MAGAZINE_NOBULLET_CLOSED_COCKED
Definition: human.c:839
GetCommandModifierCount
proto native int GetCommandModifierCount()
UNJAMMING_END
@ UNJAMMING_END
Definition: human.c:908
CommandDamageAdditive
CommandDamageAdditive
Definition: human.c:1248
WeaponActionChamberingTypes
WeaponActionChamberingTypes
Definition: human.c:868
PostPhys_GetRotation
proto native void PostPhys_GetRotation(out float pOutRot[4])
vec3 in world space
COCKED
@ COCKED
Definition: human.c:968
StopSwimming
proto native void StopSwimming()
NONE
@ NONE
Definition: human.c:811
CHAMBERING_ENDLOOPABLE
@ CHAMBERING_ENDLOOPABLE
Definition: human.c:880
CHAMBERING_ONEBULLET_UNIQUE_OPENED
@ CHAMBERING_ONEBULLET_UNIQUE_OPENED
Definition: human.c:875
~HumanCommandDeath
private void ~HumanCommandDeath()
Definition: human.c:612
IsGestureCallback
bool IsGestureCallback()
Definition: human.c:418
CANUNJAM_END
@ CANUNJAM_END
Definition: human.c:966
StartCommand_Vehicle
proto native HumanCommandVehicle StartCommand_Vehicle(Transport pTransport, int pTransportPositionIndex, int pVehicleSeat, bool fromUnconscious=false)
--— VEHICLE --—
CommandUnconscious
CommandUnconscious
Definition: human.c:1246
GetCommandModifier_Weapons
proto native HumanCommandWeapons GetCommandModifier_Weapons()
returns interface for handling weapons
FIRE_UNCOCKED
@ FIRE_UNCOCKED
Definition: human.c:917
CHAMBERING
@ CHAMBERING
Definition: human.c:814
CANUNJAM_START
@ CANUNJAM_START
Definition: human.c:967
PrePhys_GetRotation
proto native bool PrePhys_GetRotation(out float pOutRot[4])
Class
Super root of all classes in Enforce script.
Definition: enscript.c:10
STATE_FALLING
@ STATE_FALLING
Definition: human.c:766
OnCommandActionAdditiveStart
void OnCommandActionAdditiveStart()
RELOADRIFLE_CLIP_BULLET
@ RELOADRIFLE_CLIP_BULLET
Definition: human.c:856
OnCommandDamageAdditiveFinish
void OnCommandDamageAdditiveFinish()
m_fLeaning
float m_fLeaning
current movement (0 idle, 1 walk, 2-run, 3-sprint), only if the command has a movement
Definition: human.c:1122
SLIDER_OPEN
@ SLIDER_OPEN
Definition: human.c:973
CHAMBERING_ONEBULLET_OPENED
@ CHAMBERING_ONEBULLET_OPENED
chambering action types
Definition: human.c:872
CHAMBERING_ONEBULLET_CLOSED
@ CHAMBERING_ONEBULLET_CLOSED
Definition: human.c:873
GetCommand_Melee
proto native HumanCommandMelee GetCommand_Melee()
BULLET_HIDE
@ BULLET_HIDE
Definition: human.c:960
InternalCommand
proto native void InternalCommand(int pInternalCommandId)
PreAnim_SetInt
proto native void PreAnim_SetInt(int pVar, int pInt)
BULLET_SHOW2
@ BULLET_SHOW2
Definition: human.c:965
RELOADRIFLE_NOMAGAZINE_BULLET
@ RELOADRIFLE_NOMAGAZINE_BULLET
Definition: human.c:828
EntityAI
Definition: building.c:5
UnlinkFromLocalSpace
proto native void UnlinkFromLocalSpace()
GetCommand_Climb
proto native HumanCommandClimb GetCommand_Climb()
CommandDeath
CommandDeath
Definition: human.c:1245
CHAMBERING_CROSSBOW_CLOSED
@ CHAMBERING_CROSSBOW_CLOSED
Definition: human.c:894
OnCommandMoveFinish
void OnCommandMoveFinish()
OnCommandDamageFullbodyStart
void OnCommandDamageFullbodyStart()
FIRE
@ FIRE
Definition: human.c:817
PhysicsEnableGravity
proto native void PhysicsEnableGravity(bool pEnable)
m_bHasParent
bool m_bHasParent
Definition: human.c:745
GetCommand_Move
proto native HumanCommandMove GetCommand_Move()
CommandDamageFullbody
CommandDamageFullbody
Definition: human.c:1247
FIRE_DRY
@ FIRE_DRY
Definition: human.c:918
ClimbStates
ClimbStates
state of climb command
Definition: human.c:761
HumanMoveCommandID
HumanMoveCommandID
do not process rotations !
Definition: human.c:1242
A
@ A
Definition: ensystem.c:345
HumanInputControllerOverrideType
HumanInputControllerOverrideType
Definition: human.c:7
CHAMBERING_STARTLOOPABLE_OPENED
@ CHAMBERING_STARTLOOPABLE_OPENED
Definition: human.c:882
CHANGE_HIDE
@ CHANGE_HIDE
Definition: human.c:977
PostPhys_LockRotation
proto native void PostPhys_LockRotation()
quaternion in world space
FIRE_LAST
@ FIRE_LAST
Definition: human.c:915
CHAMBERING_STARTLOOPABLE_CLOSED
@ CHAMBERING_STARTLOOPABLE_CLOSED
Definition: human.c:879