Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
human.c File Reference

Go to the source code of this file.

Data Structures

class  HumanInputController
 
class  HumanAnimInterface
 
class  HumanCommandMove
 
class  HumanCommandMelee2
 
class  HumanCommandDeathCallback
 
class  HumanCommandUnconscious
 
class  HumanCommandLadder
 
class  HumanCommandVehicle
 
class  HumanCommandClimb
 command itself More...
 
class  HumanCommandWeapons
 
class  HumanMovementState
 

Typedefs

typedef int TAnimGraphVariable
 
typedef int TAnimGraphTag
 
typedef int TAnimGraphEvent
 

Enumerations

enum  HumanInputControllerOverrideType { DISABLED, ENABLED, ONE_FRAME }
 
enum  ClimbStates {
  STATE_MOVE, STATE_TAKEOFF, STATE_ONTOP, STATE_FALLING,
  STATE_FINISH
}
 state of climb command More...
 
enum  WeaponActions {
  INTERRUPT = 15, NONE = -1, RELOAD = 0, MECHANISM = 1,
  CHAMBERING = 2, CHAMBERING_LOADER = 3, UNJAMMING = 4, FIRE = 5,
  HIDE = 6, SHOW = 7, RELOAD_CLIP = 8
}
 actions More...
 
enum  WeaponActionReloadTypes {
  RELOADRIFLE_MAGAZINE_BULLET = 0, RELOADRIFLE_NOMAGAZINE_BULLET = 1, RELOADRIFLE_MAGAZINE_NOBULLET = 2, RELOADRIFLE_NOMAGAZINE_NOBULLET = 3,
  RELOADRIFLE_MAGAZINE_NOBULLET_OPEN = 4, RELOADRIFLE_NOMAGAZINE_NOBULLET_OPEN = 5, RELOADPISTOL_NOMAGAZINE_NOBULLET_CLOSED_UNCOCKED = 8, RELOADPISTOL_MAGAZINE_NOBULLET_CLOSED_UNCOCKED = 9,
  RELOADPISTOL_MAGAZINE_BULLET_CLOSED = 10, RELOADPISTOL_NOMAGAZINE_BULLET_CLOSED = 11, RELOADPISTOL_MAGAZINE_NOBULLET_CLOSED_COCKED = 12, RELOADPISTOL_NOMAGAZINE_NOBULLET_CLOSED_COCKED = 13,
  RELOADPISTOL_NOMAGAZINE_NOBULLET_OPENED = 14, RELOADPISTOL_MAGAZINE_NOBULLET_OPENED = 15, RELOAD_MAGAZINE_DETACH = 16, RELOADRIFLE_MAGAZINE_DETACH = 17,
  RELOADSRIFLE_MAGAZINE_BULLET = 20, RELOADSRIFLE_NOMAGAZINE_BULLET = 21, RELOADSRIFLE_MAGAZINE_NOBULLET = 22, RELOADSRIFLE_NOMAGAZINE_NOBULLET = 23
}
 
enum  WeaponActionReloadClipTypes { RELOADRIFLE_CLIP_NOBULLET = 0, RELOADRIFLE_CLIP_BULLET = 1 }
 
enum  WeaponActionChamberingTypes {
  CHAMBERING_END = -1, CHAMBERING_ONEBULLET_OPENED = 0, CHAMBERING_ONEBULLET_CLOSED = 1, CHAMBERING_ONEBULLET_CLOSED_UNCOCKED = 2,
  CHAMBERING_ONEBULLET_UNIQUE_OPENED = 3, CHAMBERING_ONEBULLET_UNIQUE_CLOSED = 4, CHAMBERING_TWOBULLETS_START = 6, CHAMBERING_TWOBULLETS_END = 7,
  CHAMBERING_STARTLOOPABLE_CLOSED = 10, CHAMBERING_ENDLOOPABLE = 11, CHAMBERING_STARTLOOPABLE_CLOSED_KEEP = 12, CHAMBERING_STARTLOOPABLE_OPENED = 13,
  CHAMBERING_STARTLOOPABLE_SHOTGUN_UNCOCKED = 15, CHAMBERING_STARTLOOPABLE_SHOTGUN_COCKED = 16, CHAMBERING_DOUBLE_1 = 17, CHAMBERING_DOUBLE_2 = 18,
  CHAMBERING_DOUBLE_3 = 19, CHAMBERING_DOUBLE_4 = 20, CHAMBERING_CROSSBOW_OPENED = 21, CHAMBERING_CROSSBOW_CLOSED = 22,
  CHAMBERING_CROSSBOW_FULL = 23
}
 
enum  WeaponActionChamberingLoaderTypes { CHAMBERINGLOADER_OPENED = 0, CHAMBERINGLOADER_CLOSED = 1 }
 
enum  WeaponActionUnjammingTypes { UNJAMMING_START = 1, UNJAMMING_END = 0, UNJAMMING_INTERRUPT = -1 }
 
enum  WeaponActionFireTypes {
  FIRE_NORMAL = 0, FIRE_LAST = 1, FIRE_COCKED = 2, FIRE_UNCOCKED = 3,
  FIRE_DRY = 4, FIRE_JAM = 5
}
 
enum  WeaponHideShowTypes {
  HIDESHOW_SLOT_2HDLEFTBACK = 0, HIDESHOW_SLOT_RFLLEFTBACK = 1, HIDESHOW_SLOT_1HDLEFTBACK = 2, HIDESHOW_SLOT_2HDRIGHTBACK = 3,
  HIDESHOW_SLOT_RFLRIGHTBACK = 4, HIDESHOW_SLOT_1HDRIGHTBACK = 5, HIDESHOW_SLOT_PISTOLBELT = 6, HIDESHOW_SLOT_PISTOLCHEST = 7,
  HIDESHOW_SLOT_KNIFEBACK = 8, HIDESHOW_SLOT_INVENTORY = 9
}
 
enum  WeaponEvents {
  ATTACHMENT_HIDE, ATTACHMENT_SHOW, BULLET_EJECT, BULLET_HIDE,
  BULLET_HIDE2, BULLET_IN_CHAMBER, BULLET_IN_MAGAZINE, BULLET_SHOW,
  BULLET_SHOW2, CANUNJAM_END, CANUNJAM_START, COCKED,
  MAGAZINE_ATTACHED, MAGAZINE_DETACHED, MAGAZINE_HIDE, MAGAZINE_SHOW,
  SLIDER_OPEN, UNJAMMED, HAMMER_UNCOCKED, CHANGE_HIDE,
  CHANGE_SHOW, CYLINDER_ROTATE
}
 events More...
 
enum  HumanMoveCommandID
 do not process rotations ! More...
 

Functions

class HumanAnimInterface HumanCommandActionCallback ()
 
private void HumanAnimInterface ()
 
private void ~HumanAnimInterface ()
 
proto native TAnimGraphCommand BindCommand (string pCommandName)
 returns command index -
More...
 
proto native TAnimGraphVariable BindVariableFloat (string pVariable)
 
proto native TAnimGraphVariable BindVariableInt (string pVariable)
 
proto native TAnimGraphVariable BindVariableBool (string pVariable)
 
proto native TAnimGraphTag BindTag (string pTagName)
 
proto native TAnimGraphEvent BindEvent (string pEventName)
 
private void ~HumanCommandActionCallback ()
 
proto native Human GetHuman ()
 get the human this cb belongs to More...
 
proto native void Cancel ()
 cancels action More...
 
proto native void InternalCommand (int pInternalCommandId)
 
proto native void SetAligning (vector pPositionWS, vector pDirectionWS)
 enables character aligning to desired position and direction in world space More...
 
proto native void ResetAligning ()
 disables character aligning More...
 
proto native void EnableCancelCondition (bool pEnable)
 
proto native bool DefaultCancelCondition ()
 system implemented cancel condition (now raise or sprint cancels action) More...
 
proto native void RegisterAnimationEvent (string pAnimationEventStr, int pId)
 registers animation event, when event registered and received - it sends OnAnimationEvent with registered id More...
 
proto native void EnableStateChangeCallback ()
 enables state change callback OnStateChange More...
 
proto native int GetState ()
 returns one of STATE_... More...
 
string GetStateString ()
 returns debug string of current state More...
 
void OnAnimationEvent (int pEventID)
 calls animation event -> must be registered with RegisterAnimationEvent More...
 
void OnFinish (bool pCanceled)
 called ALWAYS! when action is finished (normal finish or cancel -> pCanceled) More...
 
void OnStateChange (int pOldState, int pCurrentState)
 called when enabled by EnableStateChangeCallback and state changes, call GetState() to get actual state More...
 
bool IsUserActionCallback ()
 
bool IsGestureCallback ()
 
bool IsSymptomCallback ()
 
class HumanCommandMove HumanCommandMelee ()
 
private void HumanCommandMove ()
 
private void ~HumanCommandMove ()
 
proto native float GetCurrentMovementAngle ()
 
proto bool GetCurrentInputAngle (out float pAngle)
 
proto native float GetCurrentMovementSpeed ()
 0,1,2..3 idle, walk, run, sprint More...
 
proto native bool IsChangingStance ()
 returns true if character is changing stance More...
 
proto native bool IsOnBack ()
 return true if prone is on back More...
 
proto native bool IsInRoll ()
 return true if character barrel rolling More...
 
proto native bool IsLeavingUncon ()
 return true if character transitions out of uncon More...
 
proto native bool IsStandingFromBack ()
 return true if prone on back is chaning to crounch/stand More...
 
proto native void StartMeleeEvade ()
 marks command to continue to combo More...
 
proto native void StartMeleeEvadeA (float pDirAngle)
 marks command to continue to combo, pDirAngle specifies angle More...
 
proto native bool IsMeleeEvade ()
 this is true when in melee evade More...
 
proto native void SetMeleeBlock (bool pBlock)
 this enables/disables block More...
 
proto native void ForceStance (int pStanceIdx)
 
proto native void ForceStanceUp (int pStanceIdx)
 
proto native void SetRunSprintFilterModifier (float value)
 sets the multiplier for SHumanCommandMoveSettings::m_fRunSpringTimeout More...
 
proto native void SetDirectionFilterModifier (float value)
 sets the multiplier for SHumanCommandMoveSettings::m_fDirFilterTimeout More...
 
proto native void SetDirectionSprintFilterModifier (float value)
 sets the multiplier for SHumanCommandMoveSettings::m_fDirFilterSprintTimeout More...
 
proto native void SetTurnSpanModifier (float value)
 sets the multiplier for HumanItemBehaviorCfg::m_fMoveHeadingFilterSpan More...
 
proto native void SetTurnSpanSprintModifier (float value)
 sets the multiplier for HumanItemBehaviorCfg::m_fMoveHeadingSprintFilterSpan More...
 
proto native void SetCurrentWaterLevel (float value)
 sets water level (depth) More...
 
private void ~HumanCommandMelee ()
 
proto native void ContinueCombo ()
 marks command to continue to combo More...
 
proto native bool IsInComboRange ()
 returns true if hit is in range, where person can continue to combo More...
 
proto native bool WasHit ()
 is true only once after hit event More...
 
class HumanCommandMelee2 HumanCommandFall ()
 
private void HumanCommandMelee2 ()
 
private void ~HumanCommandMelee2 ()
 
proto native void ContinueCombo (bool pHeavyHit, float pComboValue, EntityAI target=null, vector hitPos=vector.Zero)
 marks command to continue to combo More...
 
proto native int GetComboCount ()
 
proto native int GetCurrentHitType ()
 
proto native bool IsFinisher ()
 
private void ~HumanCommandFall ()
 
proto native bool PhysicsLanded ()
 this is true when fall has physically landed - need to call Land after this is true More...
 
proto native void Land (int pLandType)
 end fall with land More...
 
proto native bool IsLanding ()
 returns true if fall is in landing state More...
 
class HumanCommandDeathCallback HumanCommandDeath ()
 
void OnSimulationEnd ()
 
bool ShouldSimulationBeDisabled ()
 'OnSimulationEnd' is called before this More...
 
private void ~HumanCommandDeath ()
 
class HumanCommandUnconscious HumanCommandDamage ()
 
private void HumanCommandUnconscious ()
 
private void ~HumanCommandUnconscious ()
 
proto native void WakeUp (int targetStance=-1)
 
proto native bool IsWakingUp ()
 
proto native bool IsOnLand ()
 
proto native bool IsInWater ()
 
private void ~HumanCommandDamage ()
 
class HumanCommandLadder HumanCommandSwim ()
 
private void HumanCommandLadder ()
 
private void ~HumanCommandLadder ()
 
proto native bool CanExit ()
 returns true if on exiting point More...
 
proto native void Exit ()
 
proto native vector GetLogoutPosition ()
 
private void ~HumanCommandSwim ()
 
proto native void StopSwimming ()
 
private void HumanCommandClimb ()
 
private void ~HumanCommandClimb ()
 
proto native vector GetGrabPointWS ()
 returns world space position of climbing grab point More...
 
proto native vector GetClimbOverStandPointWS ()
 returns world space position of landspot after climbing over More...
 
private void ~HumanCommandFullBodyDamage ()
 
string WeaponActionTypeToString (int A, int AT)
 
class HumanCommandWeapons HumanCommandAdditives ()
 
private void HumanCommandWeapons ()
 
private void ~HumanCommandWeapons ()
 
proto native bool IsActionFinished ()
 
proto native int GetRunningAction ()
 returns -1 when no action is running or RELOAD,MECHANISM, .... More...
 
proto native int GetRunningActionType ()
 returns -1 when no action is running or appropriate action type More...
 
proto native void SetActionProgressParams (float pStart, float pEnd)
 sets start and end animation position - f.e. for reload clip action More...
 
proto native bool StartAction (WeaponActions pAction, int pActionType)
 start reload,mechanism,chambering,unjam ... More...
 
proto native void RegisterEvent (string pName, int pId)
 register events More...
 
proto native int IsEvent ()
 return -1 when there is no event, otherwise it returns pId of event from animation More...
 
proto native bool IsInWeaponReloadBulletSwitchState ()
 returns true when clip visual change is needed for reload clip action More...
 
proto native void SetADS (bool pState)
 sets head tilt to optics More...
 
proto native void LiftWeapon (bool pState)
 command for lifting weapon near obstacled (works only when weapon is raised) More...
 
void RegisterDefaultEvents ()
 
proto native void SetInitState (int pFrameIndex)
 
proto native float GetBaseAimingAngleUD ()
 returns base aiming angle UD - without sway/offsets/... More...
 
proto native float GetBaseAimingAngleLR ()
 returns base aiming angle LR - without sway/offsets/... More...
 
proto native void SetThrowingMode (bool pState)
 
proto native bool IsThrowingMode ()
 
proto native void ThrowItem (int throwType)
 
proto native bool WasItemLeaveHandsEvent ()
 
proto native int DebugIsEvent ()
 return -1 when there is no event, otherwise it returns pId of event from animation More...
 
proto native void DebugResetEvents ()
 
private void ~HumanCommandAdditives ()
 
proto native void SetInjured (float pValue, bool pInterpolate)
 sets injury level 0..1, interpolate == false -> resets the value, otherwise it's interpolating towards the new value More...
 
proto native void SetExhaustion (float pValue, bool pInterpolate)
 sets exhaustion level 0..1, interpolate == false -> resets the value, otherwise it's interpolating towards the new value More...
 
proto native void SetTalking (bool pValue)
 sets talking More...
 
proto native void StartModifier (int pType)
 starts modifier More...
 
proto native void CancelModifier ()
 cancels modifier More...
 
proto native bool IsModifierActive ()
 is modifier active More...
 
class HumanMovementState OnActivate ()
 HumanCommandScript fully scriptable command. More...
 
bool IsRaised ()
 
bool IsRaisedInProne ()
 
bool IsInProne ()
 
bool IsInRaisedProne ()
 
bool IsLeaning ()
 
void OnDeactivate ()
 called when command ends More...
 
proto native void SetFlagFinished (bool pFinished)
 this terminates human command script and shows CommandHandler( ... pCurrentCommandFinished == true ); More...
 
void PreAnimUpdate (float pDt)
 
proto native void PreAnim_CallCommand (int pCommand, int pParamInt, float pParamFloat)
 function usable in PreAnimUpdate or in !!! OnActivate !!! More...
 
proto native void PreAnim_SetFloat (int pVar, float pFlt)
 
proto native void PreAnim_SetInt (int pVar, int pInt)
 
proto native void PreAnim_SetBool (int pVar, bool pBool)
 
proto native void PreAnim_SetFilteredHeading (float pYawAngle, float pFilterDt, float pMaxYawSpeed)
 sets character rotation (heading) More...
 
void PrePhysUpdate (float pDt)
 
proto native bool PrePhys_IsEvent (int pEvent)
 script function usable in PrePhysUpdate More...
 
proto native bool PrePhys_IsTag (int pTag)
 
proto native bool PrePhys_GetTranslation (out vector pOutTransl)
 
proto native bool PrePhys_GetRotation (out float pOutRot[4])
 
proto native void PrePhys_SetTranslation (vector pInTransl)
 
proto native void PrePhys_SetRotation (float pInRot[4])
 
bool PostPhysUpdate (float pDt)
 
proto native void PostPhys_GetPosition (out vector pOutTransl)
 script function usable in PostPhysUpdate More...
 
proto native void PostPhys_GetRotation (out float pOutRot[4])
 vec3 in world space More...
 
proto native void PostPhys_SetPosition (vector pInTransl)
 quaternion in world space More...
 
proto native void PostPhys_SetRotation (float pInRot[4])
 vec3 in world space More...
 
proto native void PostPhys_LockRotation ()
 quaternion in world space More...
 
enum HumanMoveCommandID GetTransformWS (out vector pTm[4])
 gets human transform in World Space More...
 
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 away from obstacle - usable for checking if character is in some tight space More...
 
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, returns distance fraction More...
 
proto native void LinkToLocalSpaceOf (notnull IEntity child, vector pLocalSpaceMatrix[4])
 
proto native void UnlinkFromLocalSpace ()
 
proto native int GetBoneIndexByName (string pBoneName)
 returns bone index for a name (-1 if pBoneName doesn't exist) More...
 
proto native HumanAnimInterface GetAnimInterface ()
 returns animation interface - usable in HumanCommandScript implementations More...
 
proto native bool PhysicsIsFalling (bool pValidate)
 returns true if physics controller is falling More...
 
proto native void PhysicsGetVelocity (out vector pVelocity)
 outs pVelocity - linear velocity of PHYSICS CONTROLLER More...
 
proto native void PhysicsEnableGravity (bool pEnable)
 
proto native bool PhysicsIsSolid ()
 
proto native void PhysicsSetSolid (bool pSolid)
 
proto native void PhysicsSetRagdoll (bool pEnable)
 Sets and synchronize interaction layers 'RAGDOLL' and 'RAGDOLL_NO_CHARACTER' to prevent body stacking and players going through dead creatures. More...
 
proto native HumanInputController GetInputController ()
 returns human input controller More...
 
proto native HumanItemAccessor GetItemAccessor ()
 
proto native void GetMovementState (HumanMovementState pState)
 returns movement state (current command id, ) More...
 
proto native int GetCurrentCommandID ()
 returns current command ID (see DayZPlayerConstants.COMMANDID_...) More...
 
proto native HumanCommandMove StartCommand_Move ()
 --— MOVE --— More...
 
proto native HumanCommandMove GetCommand_Move ()
 
proto native HumanCommandMelee StartCommand_Melee (EntityAI pTarget)
 --— MELEE --— More...
 
proto native HumanCommandMelee GetCommand_Melee ()
 
proto native HumanCommandMelee2 StartCommand_Melee2 (EntityAI pTarget, int pHitType, float pComboValue, vector hitPos=vector.Zero)
 starts command - melee2 More...
 
proto native HumanCommandMelee2 GetCommand_Melee2 ()
 
proto native HumanCommandFall StartCommand_Fall (float pYVelocity)
 --— FALL --— More...
 
proto native HumanCommandFall GetCommand_Fall ()
 
proto native HumanCommandLadder StartCommand_Ladder (Building pBuilding, int pLadderIndex)
 --— LADDER --— More...
 
proto native HumanCommandLadder GetCommand_Ladder ()
 
proto native HumanCommandSwim StartCommand_Swim ()
 --— LADDER --— More...
 
proto native HumanCommandSwim GetCommand_Swim ()
 
proto native HumanCommandVehicle StartCommand_Vehicle (Transport pTransport, int pTransportPositionIndex, int pVehicleSeat, bool fromUnconscious=false)
 --— VEHICLE --— More...
 
proto native HumanCommandVehicle GetCommand_Vehicle ()
 
proto native HumanCommandClimb StartCommand_Climb (SHumanCommandClimbResult pClimbResult, int pType)
 --— CLIMB --— More...
 
proto native HumanCommandClimb GetCommand_Climb ()
 
proto native HumanCommandDeathCallback StartCommand_Death (int pType, float pDirection, typename pCallbackClass, bool pKeepInLocalSpaceAfterLeave=false)
 --— Death --— More...
 
proto native HumanCommandDeathCallback GetCommand_Death ()
 
proto native HumanCommandUnconscious StartCommand_Unconscious (float pType)
 starts command - unconscious More...
 
proto native HumanCommandUnconscious GetCommand_Unconscious ()
 
proto native HumanCommandFullBodyDamage StartCommand_Damage (int pType, float pDirection)
 --— FullBody Damages --— More...
 
proto native HumanCommandFullBodyDamage GetCommand_Damage ()
 
proto native HumanCommandActionCallback StartCommand_Action (int pActionID, typename pCallbackClass, int pStanceMask)
 --— ACTIONS --— More...
 
proto native HumanCommandActionCallback GetCommand_Action ()
 is human is in command action - returns its callback, if current command is action More...
 
proto native int GetCommandModifierCount ()
 
proto native int GetCommandModifierID (int pIndex)
 returns COMMANDID_ .. type id of command modifier on index pIndex More...
 
proto native HumanCommandAdditives GetCommandModifier_Additives ()
 default (always-on modifiers) More...
 
proto native HumanCommandWeapons GetCommandModifier_Weapons ()
 returns interface for handling weapons More...
 
proto native HumanCommandActionCallback AddCommandModifier_Action (int pActionID, typename pCallbackClass)
 adds action command modifier, creates callback instance for you More...
 
proto native void DeleteCommandModifier_Action (HumanCommandActionCallback pCallback)
 force remove - normally if action is ended or interrupted - this is not needed to call More...
 
proto native HumanCommandActionCallback GetCommandModifier_Action ()
 returns callback for action if any is active, null if nothing runs More...
 
proto native HumanCommandDamage AddCommandModifier_Damage (int pType, float pDirection)
 — modifier for light Damages More...
 
proto native void DeleteCommandModifier_Damage (HumanCommandDamage pDamage)
 
proto native HumanCommandDamage GetCommandModifier_Damage ()
 
proto native HumanCommandScript StartCommand_Script (HumanCommandScript pHumanCommand)
 — SCRIPTED COMMANDS More...
 
proto native HumanCommandScript StartCommand_ScriptInst (typename pCallbackClass)
 
proto native HumanCommandScript GetCommand_Script ()
 is human is in command action - returns its callback, if current command is action More...
 
proto native owned string DebugGetItemClass ()
 returns current item's class name More...
 
proto native owned string DebugGetItemSuperClass ()
 returns current item's class that is found in config More...
 
proto native owned string DebugGetItemAnimInstance ()
 returns current item's animation instance More...
 
proto native void StartDeath ()
 
proto native void ResetDeath ()
 
proto native void ResetDeathCooldown ()
 
proto native bool IsDeathProcessed ()
 
proto native bool IsDeathConditionMet ()
 
void OnCommandMoveStart ()
 
void OnCommandMoveFinish ()
 
void OnCommandMeleeStart ()
 
void OnCommandMeleeFinish ()
 
void OnCommandMelee2Start ()
 
void OnCommandMelee2Finish ()
 
void OnCommandFallStart ()
 
void OnCommandFallFinish ()
 
void OnCommandClimbStart ()
 
void OnCommandClimbFinish ()
 
void OnCommandDeathStart ()
 
void OnCommandDeathFinish ()
 
void OnCommandUnconsciousStart ()
 
void OnCommandUnconsciousFinish ()
 
void OnCommandDamageFullbodyStart ()
 
void OnCommandDamageFullbodyFinish ()
 
void OnCommandDamageAdditiveStart ()
 
void OnCommandDamageAdditiveFinish ()
 
void OnCommandLadderStart ()
 
void OnCommandLadderFinish ()
 
void OnCommandSwimStart ()
 
void OnCommandSwimFinish ()
 
void OnCommandVehicleStart ()
 
void OnCommandVehicleFinish ()
 
void OnCommandActionFullbodyStart ()
 
void OnCommandActionFullbodyFinish ()
 
void OnCommandActionAdditiveStart ()
 
void OnCommandActionAdditiveFinish ()
 
void OnStanceChange (int previousStance, int newStance)
 gets called on stance change More...
 
bool CanChangeStance (int previousStance, int newStance)
 Called by code to see if it can. More...
 
bool CanRoll ()
 
void OnRollStart (bool isToTheRight)
 
void OnRollFinish ()
 

Variables

class HumanInputController TAnimGraphCommand
 
class HumanCommandVehicle m_bIsClimb
 result from static test More...
 
bool m_bIsClimbOver
 
bool m_bFinishWithFall
 
bool m_bHasParent
 
float m_fClimbHeight
 
vector m_ClimbGrabPoint
 
vector m_ClimbGrabPointNormal
 grab point for climb && climb over (in local space of it's parent) More...
 
vector m_ClimbStandPoint
 normal to grabpoint position (used for character orientation) More...
 
vector m_ClimbOverStandPoint
 where climb ends (in local space of it's parent) More...
 
IEntity m_GrabPointParent
 where climb over ends (in local space of it's parent) More...
 
IEntity m_ClimbStandPointParent
 parent of grabpoint More...
 
IEntity m_ClimbOverStandPointParent
 
enum WeaponActions HumanCommandFullBodyDamage
 
enum WeaponActionReloadClipTypes MECHANISM_OPENED = 0
 mechanism action types More...
 
enum WeaponActionReloadClipTypes MECHANISM_CLOSED = 1
 
enum WeaponActionReloadClipTypes MECHANISM_SPECIAL = 2
 
enum WeaponActionReloadClipTypes MECHANISM_CLOSED_UNCOCKED = 3
 
int m_CommandTypeId
 
int m_iStanceIdx
 current command's id More...
 
int m_iMovement
 current stance (DayZPlayerConstants.STANCEIDX_ERECT, ...), only if the command has a stance More...
 
float m_fLeaning
 current movement (0 idle, 1 walk, 2-run, 3-sprint), only if the command has a movement More...
 
int m_LocalMovement = -1
 leaning state (not all commands need to have all movements) More...
 
 None = 0
 
 CommandMove = 1
 
 CommandMelee = 2
 
 CommandMelee2 = 4
 
 CommandFall = 8
 
 CommandClimb = 16
 
 CommandDeath = 32
 
 CommandUnconscious = 64
 
 CommandDamageFullbody = 128
 
 CommandDamageAdditive = 256
 
 CommandLadder = 512
 
 CommandSwim = 1024
 
 CommandVehicle = 2048
 
 CommandActionFullbody = 4096
 
 CommandActionAdditive = 8192
 

Detailed Description

this file is interface to Human

Definition in file human.c.

Typedef Documentation

◆ TAnimGraphEvent

Definition at line 279 of file human.c.

◆ TAnimGraphTag

typedef int TAnimGraphTag

Definition at line 278 of file human.c.

◆ TAnimGraphVariable

Definition at line 277 of file human.c.

Enumeration Type Documentation

◆ ClimbStates

state of climb command

Enumerator
STATE_MOVE 
STATE_TAKEOFF 
STATE_ONTOP 
STATE_FALLING 
STATE_FINISH 

Definition at line 761 of file human.c.

◆ HumanInputControllerOverrideType

Enumerator
DISABLED 
ENABLED 
ONE_FRAME 

Permenantly active until DISABLED is passed.

Definition at line 7 of file human.c.

◆ HumanMoveCommandID

do not process rotations !

used in script-side identification of animation commands on human (swim, fall, move...)

Definition at line 1242 of file human.c.

◆ WeaponActionChamberingLoaderTypes

Enumerator
CHAMBERINGLOADER_OPENED 
CHAMBERINGLOADER_CLOSED 

Definition at line 898 of file human.c.

◆ WeaponActionChamberingTypes

Enumerator
CHAMBERING_END 
CHAMBERING_ONEBULLET_OPENED 

chambering action types

CHAMBERING_ONEBULLET_CLOSED 
CHAMBERING_ONEBULLET_CLOSED_UNCOCKED 
CHAMBERING_ONEBULLET_UNIQUE_OPENED 
CHAMBERING_ONEBULLET_UNIQUE_CLOSED 
CHAMBERING_TWOBULLETS_START 
CHAMBERING_TWOBULLETS_END 
CHAMBERING_STARTLOOPABLE_CLOSED 
CHAMBERING_ENDLOOPABLE 
CHAMBERING_STARTLOOPABLE_CLOSED_KEEP 
CHAMBERING_STARTLOOPABLE_OPENED 
CHAMBERING_STARTLOOPABLE_SHOTGUN_UNCOCKED 
CHAMBERING_STARTLOOPABLE_SHOTGUN_COCKED 
CHAMBERING_DOUBLE_1 
CHAMBERING_DOUBLE_2 
CHAMBERING_DOUBLE_3 
CHAMBERING_DOUBLE_4 
CHAMBERING_CROSSBOW_OPENED 
CHAMBERING_CROSSBOW_CLOSED 
CHAMBERING_CROSSBOW_FULL 

Definition at line 868 of file human.c.

◆ WeaponActionFireTypes

Enumerator
FIRE_NORMAL 
FIRE_LAST 
FIRE_COCKED 
FIRE_UNCOCKED 
FIRE_DRY 
FIRE_JAM 

Definition at line 912 of file human.c.

◆ WeaponActionReloadClipTypes

Enumerator
RELOADRIFLE_CLIP_NOBULLET 
RELOADRIFLE_CLIP_BULLET 

Definition at line 853 of file human.c.

◆ WeaponActionReloadTypes

action types reload action types

Enumerator
RELOADRIFLE_MAGAZINE_BULLET 

reload action types - rifles

RELOADRIFLE_NOMAGAZINE_BULLET 
RELOADRIFLE_MAGAZINE_NOBULLET 
RELOADRIFLE_NOMAGAZINE_NOBULLET 
RELOADRIFLE_MAGAZINE_NOBULLET_OPEN 
RELOADRIFLE_NOMAGAZINE_NOBULLET_OPEN 
RELOADPISTOL_NOMAGAZINE_NOBULLET_CLOSED_UNCOCKED 
RELOADPISTOL_MAGAZINE_NOBULLET_CLOSED_UNCOCKED 
RELOADPISTOL_MAGAZINE_BULLET_CLOSED 
RELOADPISTOL_NOMAGAZINE_BULLET_CLOSED 
RELOADPISTOL_MAGAZINE_NOBULLET_CLOSED_COCKED 
RELOADPISTOL_NOMAGAZINE_NOBULLET_CLOSED_COCKED 
RELOADPISTOL_NOMAGAZINE_NOBULLET_OPENED 
RELOADPISTOL_MAGAZINE_NOBULLET_OPENED 
RELOAD_MAGAZINE_DETACH 
RELOADRIFLE_MAGAZINE_DETACH 
RELOADSRIFLE_MAGAZINE_BULLET 
RELOADSRIFLE_NOMAGAZINE_BULLET 
RELOADSRIFLE_MAGAZINE_NOBULLET 
RELOADSRIFLE_NOMAGAZINE_NOBULLET 

Definition at line 824 of file human.c.

◆ WeaponActions

actions

Enumerator
INTERRUPT 
NONE 
RELOAD 
MECHANISM 
CHAMBERING 
CHAMBERING_LOADER 
UNJAMMING 
FIRE 
HIDE 
SHOW 
RELOAD_CLIP 

Definition at line 808 of file human.c.

◆ WeaponActionUnjammingTypes

Enumerator
UNJAMMING_START 

unjam action types

UNJAMMING_END 
UNJAMMING_INTERRUPT 

Definition at line 904 of file human.c.

◆ WeaponEvents

events

Enumerator
ATTACHMENT_HIDE 
ATTACHMENT_SHOW 
BULLET_EJECT 
BULLET_HIDE 
BULLET_HIDE2 
BULLET_IN_CHAMBER 
BULLET_IN_MAGAZINE 
BULLET_SHOW 
BULLET_SHOW2 
CANUNJAM_END 
CANUNJAM_START 
COCKED 
MAGAZINE_ATTACHED 
MAGAZINE_DETACHED 
MAGAZINE_HIDE 
MAGAZINE_SHOW 
SLIDER_OPEN 
UNJAMMED 
HAMMER_UNCOCKED 
CHANGE_HIDE 
CHANGE_SHOW 
CYLINDER_ROTATE 

Definition at line 955 of file human.c.

◆ WeaponHideShowTypes

Enumerator
HIDESHOW_SLOT_2HDLEFTBACK 
HIDESHOW_SLOT_RFLLEFTBACK 
HIDESHOW_SLOT_1HDLEFTBACK 
HIDESHOW_SLOT_2HDRIGHTBACK 
HIDESHOW_SLOT_RFLRIGHTBACK 
HIDESHOW_SLOT_1HDRIGHTBACK 
HIDESHOW_SLOT_PISTOLBELT 
HIDESHOW_SLOT_PISTOLCHEST 
HIDESHOW_SLOT_KNIFEBACK 
HIDESHOW_SLOT_INVENTORY 

Definition at line 922 of file human.c.

Function Documentation

◆ AddCommandModifier_Action()

proto native HumanCommandActionCallback AddCommandModifier_Action ( int  pActionID,
typename pCallbackClass   
)

adds action command modifier, creates callback instance for you

◆ AddCommandModifier_Damage()

proto native HumanCommandDamage AddCommandModifier_Damage ( int  pType,
float  pDirection 
)

— modifier for light Damages

starts additive damage

◆ BindCommand()

proto native TAnimGraphCommand HumanCommandActionCallback::BindCommand ( string  pCommandName)

returns command index -

◆ BindEvent()

proto native TAnimGraphEvent HumanCommandActionCallback::BindEvent ( string  pEventName)

◆ BindTag()

proto native TAnimGraphTag HumanCommandActionCallback::BindTag ( string  pTagName)

◆ BindVariableBool()

proto native TAnimGraphVariable HumanCommandActionCallback::BindVariableBool ( string  pVariable)

◆ BindVariableFloat()

proto native TAnimGraphVariable HumanCommandActionCallback::BindVariableFloat ( string  pVariable)

◆ BindVariableInt()

proto native TAnimGraphVariable HumanCommandActionCallback::BindVariableInt ( string  pVariable)

◆ Cancel()

proto native void Cancel ( )

cancels action

cancels command melee and goes to HumanCommandMove

◆ CancelModifier()

proto native void CancelModifier ( )

cancels modifier

◆ CanChangeStance()

bool CanChangeStance ( int  previousStance,
int  newStance 
)

Called by code to see if it can.

◆ CanExit()

proto native bool HumanCommandSwim::CanExit ( )

returns true if on exiting point

◆ CanRoll()

bool CanRoll ( )

◆ 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 away from obstacle - usable for checking if character is in some tight space

◆ 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, returns distance fraction

◆ ContinueCombo() [1/2]

proto native void ContinueCombo ( )

marks command to continue to combo

◆ ContinueCombo() [2/2]

proto native void HumanCommandFall::ContinueCombo ( bool  pHeavyHit,
float  pComboValue,
EntityAI  target = null,
vector  hitPos = vector.Zero 
)

marks command to continue to combo

◆ DebugGetItemAnimInstance()

proto native owned string DebugGetItemAnimInstance ( )

returns current item's animation instance

◆ DebugGetItemClass()

proto native owned string DebugGetItemClass ( )

returns current item's class name

◆ DebugGetItemSuperClass()

proto native owned string DebugGetItemSuperClass ( )

returns current item's class that is found in config

◆ DebugIsEvent()

proto native int HumanCommandAdditives::DebugIsEvent ( )

return -1 when there is no event, otherwise it returns pId of event from animation

◆ DebugResetEvents()

proto native void HumanCommandAdditives::DebugResetEvents ( )

◆ DefaultCancelCondition()

proto native bool DefaultCancelCondition ( )

system implemented cancel condition (now raise or sprint cancels action)

◆ DeleteCommandModifier_Action()

proto native void DeleteCommandModifier_Action ( HumanCommandActionCallback  pCallback)

force remove - normally if action is ended or interrupted - this is not needed to call

◆ DeleteCommandModifier_Damage()

proto native void DeleteCommandModifier_Damage ( HumanCommandDamage  pDamage)

◆ EnableCancelCondition()

proto native void EnableCancelCondition ( bool  pEnable)

enables calling cancel condition default is disabled when enabled - there must be a function "bool CancelCondition()" implemented

◆ EnableStateChangeCallback()

proto native void EnableStateChangeCallback ( )

enables state change callback OnStateChange

◆ Exit()

proto native void HumanCommandSwim::Exit ( )

◆ ForceStance()

proto native void HumanCommandMelee::ForceStance ( int  pStanceIdx)

pStanceIds is one of STANCEIDX_ERECT,STANCEIDX_CROUCH,STANCEIDX_PRONE,STANCEIDX_RAISEDERECT,STANCEIDX_RAISEDCROUCH,STANCEIDX_RAISEDPRONE, or -1 when release the stance lock

◆ ForceStanceUp()

proto native void HumanCommandMelee::ForceStanceUp ( int  pStanceIdx)

pStanceIds is one of STANCEIDX_ERECT,STANCEIDX_CROUCH this forces to stand up to required stance

◆ GetAnimInterface()

proto native HumanAnimInterface GetAnimInterface ( )

returns animation interface - usable in HumanCommandScript implementations

◆ GetBaseAimingAngleLR()

proto native float HumanCommandAdditives::GetBaseAimingAngleLR ( )

returns base aiming angle LR - without sway/offsets/...

◆ GetBaseAimingAngleUD()

proto native float HumanCommandAdditives::GetBaseAimingAngleUD ( )

returns base aiming angle UD - without sway/offsets/...

◆ GetBoneIndexByName()

proto native int GetBoneIndexByName ( string  pBoneName)

returns bone index for a name (-1 if pBoneName doesn't exist)

◆ GetClimbOverStandPointWS()

proto native vector HumanCommandFullBodyDamage::GetClimbOverStandPointWS ( )

returns world space position of landspot after climbing over

◆ GetComboCount()

proto native int HumanCommandFall::GetComboCount ( )

◆ GetCommand_Action()

proto native HumanCommandActionCallback GetCommand_Action ( )

is human is in command action - returns its callback, if current command is action

◆ GetCommand_Climb()

proto native HumanCommandClimb GetCommand_Climb ( )

◆ GetCommand_Damage()

proto native HumanCommandFullBodyDamage GetCommand_Damage ( )

◆ GetCommand_Death()

proto native HumanCommandDeathCallback GetCommand_Death ( )

◆ GetCommand_Fall()

proto native HumanCommandFall GetCommand_Fall ( )

◆ GetCommand_Ladder()

proto native HumanCommandLadder GetCommand_Ladder ( )

◆ GetCommand_Melee()

proto native HumanCommandMelee GetCommand_Melee ( )

◆ GetCommand_Melee2()

proto native HumanCommandMelee2 GetCommand_Melee2 ( )

◆ GetCommand_Move()

proto native HumanCommandMove GetCommand_Move ( )

◆ GetCommand_Script()

proto native HumanCommandScript GetCommand_Script ( )

is human is in command action - returns its callback, if current command is action

◆ GetCommand_Swim()

proto native HumanCommandSwim GetCommand_Swim ( )

◆ GetCommand_Unconscious()

proto native HumanCommandUnconscious GetCommand_Unconscious ( )

◆ GetCommand_Vehicle()

proto native HumanCommandVehicle GetCommand_Vehicle ( )

◆ GetCommandModifier_Action()

proto native HumanCommandActionCallback GetCommandModifier_Action ( )

returns callback for action if any is active, null if nothing runs

◆ GetCommandModifier_Additives()

proto native HumanCommandAdditives GetCommandModifier_Additives ( )

default (always-on modifiers)

returns modifier for additives / small behaviours on human

◆ GetCommandModifier_Damage()

proto native HumanCommandDamage GetCommandModifier_Damage ( )

◆ GetCommandModifier_Weapons()

proto native HumanCommandWeapons GetCommandModifier_Weapons ( )

returns interface for handling weapons

◆ GetCommandModifierCount()

proto native int GetCommandModifierCount ( )

◆ GetCommandModifierID()

proto native int GetCommandModifierID ( int  pIndex)

returns COMMANDID_ .. type id of command modifier on index pIndex

◆ GetCurrentCommandID()

proto native int GetCurrentCommandID ( )

returns current command ID (see DayZPlayerConstants.COMMANDID_...)

◆ GetCurrentHitType()

proto native int HumanCommandFall::GetCurrentHitType ( )

Definition at line 68 of file dayzplayermeleefightlogic_lightheavy.c.

◆ GetCurrentInputAngle()

proto bool HumanCommandMelee::GetCurrentInputAngle ( out float  pAngle)

direction held on keyboard/controller -180 -90 0 90 180 angles of input movement (no filtering, no postprocesses) return false in idle states

◆ GetCurrentMovementAngle()

proto native float HumanCommandMelee::GetCurrentMovementAngle ( )

marks command to continue to combo -180 -90 0 90 180 angles of current movement

◆ GetCurrentMovementSpeed()

proto native float HumanCommandMelee::GetCurrentMovementSpeed ( )

0,1,2..3 idle, walk, run, sprint

◆ GetGrabPointWS()

proto native vector HumanCommandFullBodyDamage::GetGrabPointWS ( )

returns world space position of climbing grab point

◆ GetHuman()

proto native Human GetHuman ( )

get the human this cb belongs to

◆ GetInputController()

proto native HumanInputController GetInputController ( )

returns human input controller

◆ GetItemAccessor()

proto native HumanItemAccessor GetItemAccessor ( )

◆ GetLogoutPosition()

proto native vector HumanCommandSwim::GetLogoutPosition ( )

returns the safe logout position in worldspace the position is closest to the last possible exit point the player passed

◆ GetMovementState()

proto native void GetMovementState ( HumanMovementState  pState)

returns movement state (current command id, )

◆ GetRunningAction()

proto native int HumanCommandAdditives::GetRunningAction ( )

returns -1 when no action is running or RELOAD,MECHANISM, ....

Definition at line 90 of file actionmanagerbase.c.

◆ GetRunningActionType()

proto native int HumanCommandAdditives::GetRunningActionType ( )

returns -1 when no action is running or appropriate action type

◆ GetState()

proto native int GetState ( )

returns one of STATE_...

returns the state of climb (enum value of ClimbStates);

Definition at line 29 of file staminahandler.c.

◆ GetStateString()

string GetStateString ( )

returns debug string of current state

Definition at line 392 of file human.c.

◆ GetTransformWS()

enum HumanMoveCommandID GetTransformWS ( out vector  pTm[4])

gets human transform in World Space

◆ HumanAnimInterface()

private void HumanCommandActionCallback::HumanAnimInterface ( )

◆ HumanCommandActionCallback()

◆ HumanCommandAdditives()

class HumanCommandWeapons HumanCommandAdditives ( )

Definition at line 1099 of file human.c.

◆ HumanCommandClimb()

private void HumanCommandFullBodyDamage::HumanCommandClimb ( )

Definition at line 757 of file human.c.

◆ HumanCommandDamage()

class HumanCommandUnconscious HumanCommandDamage ( )

Definition at line 637 of file human.c.

◆ HumanCommandDeath()

class HumanCommandDeathCallback HumanCommandDeath ( )

Definition at line 611 of file human.c.

◆ HumanCommandFall()

class HumanCommandMelee2 HumanCommandFall ( )

Definition at line 574 of file human.c.

◆ HumanCommandLadder()

private void HumanCommandSwim::HumanCommandLadder ( )

Definition at line 639 of file human.c.

◆ HumanCommandMelee()

class HumanCommandMove HumanCommandMelee ( )

Definition at line 513 of file human.c.

◆ HumanCommandMelee2()

private void HumanCommandFall::HumanCommandMelee2 ( )

Definition at line 530 of file human.c.

◆ HumanCommandMove()

private void HumanCommandMelee::HumanCommandMove ( )

Definition at line 424 of file human.c.

◆ HumanCommandSwim()

class HumanCommandLadder HumanCommandSwim ( )

Definition at line 673 of file human.c.

◆ HumanCommandUnconscious()

private void HumanCommandDamage::HumanCommandUnconscious ( )

Definition at line 613 of file human.c.

◆ HumanCommandWeapons()

private void HumanCommandAdditives::HumanCommandWeapons ( )

Definition at line 937 of file human.c.

◆ InternalCommand()

proto native void InternalCommand ( int  pInternalCommandId)

calls internal command pInternalCommandId is one of CMD_ACTIONINT_ ...

◆ IsActionFinished()

proto native bool HumanCommandAdditives::IsActionFinished ( )

◆ IsChangingStance()

proto native bool HumanCommandMelee::IsChangingStance ( )

returns true if character is changing stance

◆ IsDeathConditionMet()

proto native bool IsDeathConditionMet ( )

◆ IsDeathProcessed()

proto native bool IsDeathProcessed ( )

◆ IsEvent()

proto native int HumanCommandAdditives::IsEvent ( )

return -1 when there is no event, otherwise it returns pId of event from animation

◆ IsFinisher()

proto native bool HumanCommandFall::IsFinisher ( )

◆ IsGestureCallback()

bool IsGestureCallback ( )

Definition at line 418 of file human.c.

◆ IsInComboRange()

proto native bool IsInComboRange ( )

returns true if hit is in range, where person can continue to combo

◆ IsInProne()

bool OnActivate::IsInProne ( )

Definition at line 1139 of file human.c.

◆ IsInRaisedProne()

bool OnActivate::IsInRaisedProne ( )

Definition at line 1145 of file human.c.

◆ IsInRoll()

proto native bool HumanCommandMelee::IsInRoll ( )

return true if character barrel rolling

◆ IsInWater()

proto native bool HumanCommandDamage::IsInWater ( )

◆ IsInWeaponReloadBulletSwitchState()

proto native bool HumanCommandAdditives::IsInWeaponReloadBulletSwitchState ( )

returns true when clip visual change is needed for reload clip action

◆ IsLanding()

proto native bool IsLanding ( )

returns true if fall is in landing state

◆ IsLeaning()

bool OnActivate::IsLeaning ( )

Definition at line 1151 of file human.c.

◆ IsLeavingUncon()

proto native bool HumanCommandMelee::IsLeavingUncon ( )

return true if character transitions out of uncon

◆ IsMeleeEvade()

proto native bool HumanCommandMelee::IsMeleeEvade ( )

this is true when in melee evade

◆ IsModifierActive()

proto native bool IsModifierActive ( )

is modifier active

◆ IsOnBack()

proto native bool IsOnBack ( )

return true if prone is on back

is on back in prone stance?

◆ IsOnLand()

proto native bool HumanCommandDamage::IsOnLand ( )

◆ IsRaised()

bool OnActivate::IsRaised ( )

Definition at line 1127 of file human.c.

◆ IsRaisedInProne()

bool OnActivate::IsRaisedInProne ( )

Definition at line 1133 of file human.c.

◆ IsStandingFromBack()

proto native bool HumanCommandMelee::IsStandingFromBack ( )

return true if prone on back is chaning to crounch/stand

◆ IsSymptomCallback()

bool IsSymptomCallback ( )

Definition at line 423 of file human.c.

◆ IsThrowingMode()

proto native bool HumanCommandAdditives::IsThrowingMode ( )

◆ IsUserActionCallback()

bool IsUserActionCallback ( )

Definition at line 413 of file human.c.

◆ IsWakingUp()

proto native bool HumanCommandDamage::IsWakingUp ( )

◆ Land()

proto native void Land ( int  pLandType)

end fall with land

◆ LiftWeapon()

proto native void HumanCommandAdditives::LiftWeapon ( bool  pState)

command for lifting weapon near obstacled (works only when weapon is raised)

◆ LinkToLocalSpaceOf()

proto native void LinkToLocalSpaceOf ( notnull IEntity  child,
vector  pLocalSpaceMatrix[4] 
)

◆ OnActivate()

class HumanMovementState OnActivate ( )

HumanCommandScript fully scriptable command.

Warning
NON-MANAGED, will be managed by C++ once it is sent to the CommandHandler through Human.StartCommand_Script
Note
So ideally, it is best to set up the HumanCommandScript, not create any instances and start it through Human.StartCommand_ScriptInst In case an instance needs to be created, it needs manual deletion if not sent to the CommandHandler But deleting it while it is in the CommandHandler will cause crashes constructor must have 1st parameter to be Human virtual to be overridden called when command starts

Definition at line 1180 of file human.c.

◆ OnAnimationEvent()

void OnAnimationEvent ( int  pEventID)

calls animation event -> must be registered with RegisterAnimationEvent

Definition at line 403 of file human.c.

◆ OnCommandActionAdditiveFinish()

void OnCommandActionAdditiveFinish ( )

◆ OnCommandActionAdditiveStart()

void OnCommandActionAdditiveStart ( )

◆ OnCommandActionFullbodyFinish()

void OnCommandActionFullbodyFinish ( )

◆ OnCommandActionFullbodyStart()

void OnCommandActionFullbodyStart ( )

◆ OnCommandClimbFinish()

void OnCommandClimbFinish ( )

◆ OnCommandClimbStart()

void OnCommandClimbStart ( )

◆ OnCommandDamageAdditiveFinish()

void OnCommandDamageAdditiveFinish ( )

◆ OnCommandDamageAdditiveStart()

void OnCommandDamageAdditiveStart ( )

◆ OnCommandDamageFullbodyFinish()

void OnCommandDamageFullbodyFinish ( )

◆ OnCommandDamageFullbodyStart()

void OnCommandDamageFullbodyStart ( )

◆ OnCommandDeathFinish()

void OnCommandDeathFinish ( )

◆ OnCommandDeathStart()

void OnCommandDeathStart ( )

◆ OnCommandFallFinish()

void OnCommandFallFinish ( )

◆ OnCommandFallStart()

void OnCommandFallStart ( )

◆ OnCommandLadderFinish()

void OnCommandLadderFinish ( )

◆ OnCommandLadderStart()

void OnCommandLadderStart ( )

◆ OnCommandMelee2Finish()

void OnCommandMelee2Finish ( )

◆ OnCommandMelee2Start()

void OnCommandMelee2Start ( )

◆ OnCommandMeleeFinish()

void OnCommandMeleeFinish ( )

◆ OnCommandMeleeStart()

void OnCommandMeleeStart ( )

◆ OnCommandMoveFinish()

void OnCommandMoveFinish ( )

◆ OnCommandMoveStart()

void OnCommandMoveStart ( )

◆ OnCommandSwimFinish()

void OnCommandSwimFinish ( )

◆ OnCommandSwimStart()

void OnCommandSwimStart ( )

◆ OnCommandUnconsciousFinish()

void OnCommandUnconsciousFinish ( )

◆ OnCommandUnconsciousStart()

void OnCommandUnconsciousStart ( )

◆ OnCommandVehicleFinish()

void OnCommandVehicleFinish ( )

◆ OnCommandVehicleStart()

void OnCommandVehicleStart ( )

◆ OnDeactivate()

void OnDeactivate ( )

called when command ends

Definition at line 1183 of file human.c.

◆ OnFinish()

void OnFinish ( bool  pCanceled)

called ALWAYS! when action is finished (normal finish or cancel -> pCanceled)

Definition at line 406 of file human.c.

◆ OnRollFinish()

void OnRollFinish ( )

◆ OnRollStart()

void OnRollStart ( bool  isToTheRight)

◆ OnSimulationEnd()

void HumanCommandDeath::OnSimulationEnd ( )

Definition at line 593 of file human.c.

◆ OnStanceChange()

void OnStanceChange ( int  previousStance,
int  newStance 
)

gets called on stance change

◆ OnStateChange()

void OnStateChange ( int  pOldState,
int  pCurrentState 
)

called when enabled by EnableStateChangeCallback and state changes, call GetState() to get actual state

Definition at line 409 of file human.c.

◆ PhysicsEnableGravity()

proto native void PhysicsEnableGravity ( bool  pEnable)

◆ PhysicsGetVelocity()

proto native void PhysicsGetVelocity ( out vector  pVelocity)

outs pVelocity - linear velocity of PHYSICS CONTROLLER

◆ PhysicsIsFalling()

proto native bool PhysicsIsFalling ( bool  pValidate)

returns true if physics controller is falling

◆ PhysicsIsSolid()

proto native bool PhysicsIsSolid ( )

◆ PhysicsLanded()

proto native bool PhysicsLanded ( )

this is true when fall has physically landed - need to call Land after this is true

◆ PhysicsSetRagdoll()

proto native void PhysicsSetRagdoll ( bool  pEnable)

Sets and synchronize interaction layers 'RAGDOLL' and 'RAGDOLL_NO_CHARACTER' to prevent body stacking and players going through dead creatures.

◆ PhysicsSetSolid()

proto native void PhysicsSetSolid ( bool  pSolid)

◆ PostPhys_GetPosition()

proto native void PostPhys_GetPosition ( out vector  pOutTransl)

script function usable in PostPhysUpdate

◆ PostPhys_GetRotation()

proto native void PostPhys_GetRotation ( out float  pOutRot[4])

vec3 in world space

◆ PostPhys_LockRotation()

proto native void PostPhys_LockRotation ( )

quaternion in world space

◆ PostPhys_SetPosition()

proto native void PostPhys_SetPosition ( vector  pInTransl)

quaternion in world space

◆ PostPhys_SetRotation()

proto native void PostPhys_SetRotation ( float  pInRot[4])

vec3 in world space

◆ PostPhysUpdate()

bool PostPhysUpdate ( float  pDt)

override this ! final adjustment of physics state (after physics was applied) returns true if command continues running / false if command should end (or you can use SetFlagFinished(true))

◆ PreAnim_CallCommand()

proto native void PreAnim_CallCommand ( int  pCommand,
int  pParamInt,
float  pParamFloat 
)

function usable in PreAnimUpdate or in !!! OnActivate !!!

◆ PreAnim_SetBool()

proto native void PreAnim_SetBool ( int  pVar,
bool  pBool 
)

◆ PreAnim_SetFilteredHeading()

proto native void PreAnim_SetFilteredHeading ( float  pYawAngle,
float  pFilterDt,
float  pMaxYawSpeed 
)

sets character rotation (heading)

◆ PreAnim_SetFloat()

proto native void PreAnim_SetFloat ( int  pVar,
float  pFlt 
)

◆ PreAnim_SetInt()

proto native void PreAnim_SetInt ( int  pVar,
int  pInt 
)

◆ PreAnimUpdate()

void PreAnimUpdate ( float  pDt)

override this ! called before any animation is processed here change animation values, add animation commands

◆ PrePhys_GetRotation()

proto native bool PrePhys_GetRotation ( out float  pOutRot[4])

◆ PrePhys_GetTranslation()

proto native bool PrePhys_GetTranslation ( out vector  pOutTransl)

◆ PrePhys_IsEvent()

proto native bool PrePhys_IsEvent ( int  pEvent)

script function usable in PrePhysUpdate

◆ PrePhys_IsTag()

proto native bool PrePhys_IsTag ( int  pTag)

◆ PrePhys_SetRotation()

proto native void PrePhys_SetRotation ( float  pInRot[4])

◆ PrePhys_SetTranslation()

proto native void PrePhys_SetTranslation ( vector  pInTransl)

◆ PrePhysUpdate()

void PrePhysUpdate ( float  pDt)

override this ! after animation is processed, before physics is processed

◆ RegisterAnimationEvent()

proto native void RegisterAnimationEvent ( string  pAnimationEventStr,
int  pId 
)

registers animation event, when event registered and received - it sends OnAnimationEvent with registered id

◆ RegisterDefaultEvents()

void HumanCommandAdditives::RegisterDefaultEvents ( )

Definition at line 971 of file human.c.

◆ RegisterEvent()

proto native void HumanCommandAdditives::RegisterEvent ( string  pName,
int  pId 
)

register events

◆ ResetAligning()

proto native void ResetAligning ( )

disables character aligning

◆ ResetDeath()

proto native void ResetDeath ( )

◆ ResetDeathCooldown()

proto native void ResetDeathCooldown ( )

◆ SetActionProgressParams()

proto native void HumanCommandAdditives::SetActionProgressParams ( float  pStart,
float  pEnd 
)

sets start and end animation position - f.e. for reload clip action

◆ SetADS()

proto native void HumanCommandAdditives::SetADS ( bool  pState)

sets head tilt to optics

◆ SetAligning()

proto native void SetAligning ( vector  pPositionWS,
vector  pDirectionWS 
)

enables character aligning to desired position and direction in world space

◆ SetCurrentWaterLevel()

proto native void HumanCommandMelee::SetCurrentWaterLevel ( float  value)

sets water level (depth)

◆ SetDirectionFilterModifier()

proto native void HumanCommandMelee::SetDirectionFilterModifier ( float  value)

sets the multiplier for SHumanCommandMoveSettings::m_fDirFilterTimeout

◆ SetDirectionSprintFilterModifier()

proto native void HumanCommandMelee::SetDirectionSprintFilterModifier ( float  value)

sets the multiplier for SHumanCommandMoveSettings::m_fDirFilterSprintTimeout

◆ SetExhaustion()

proto native void SetExhaustion ( float  pValue,
bool  pInterpolate 
)

sets exhaustion level 0..1, interpolate == false -> resets the value, otherwise it's interpolating towards the new value

◆ SetFlagFinished()

proto native void SetFlagFinished ( bool  pFinished)

this terminates human command script and shows CommandHandler( ... pCurrentCommandFinished == true );

◆ SetInitState()

proto native void HumanCommandAdditives::SetInitState ( int  pFrameIndex)

this sets to a weapon init state each weapon has a different weapon state those states are defined by animation set by AddItemInHandsProfileIK - in DayZPlayerCfgBase.c each frame of animation is one init state

◆ SetInjured()

proto native void SetInjured ( float  pValue,
bool  pInterpolate 
)

sets injury level 0..1, interpolate == false -> resets the value, otherwise it's interpolating towards the new value

◆ SetMeleeBlock()

proto native void HumanCommandMelee::SetMeleeBlock ( bool  pBlock)

this enables/disables block

◆ SetRunSprintFilterModifier()

proto native void HumanCommandMelee::SetRunSprintFilterModifier ( float  value)

sets the multiplier for SHumanCommandMoveSettings::m_fRunSpringTimeout

◆ SetTalking()

proto native void SetTalking ( bool  pValue)

sets talking

◆ SetThrowingMode()

proto native void HumanCommandAdditives::SetThrowingMode ( bool  pState)

◆ SetTurnSpanModifier()

proto native void HumanCommandMelee::SetTurnSpanModifier ( float  value)

sets the multiplier for HumanItemBehaviorCfg::m_fMoveHeadingFilterSpan

◆ SetTurnSpanSprintModifier()

proto native void HumanCommandMelee::SetTurnSpanSprintModifier ( float  value)

sets the multiplier for HumanItemBehaviorCfg::m_fMoveHeadingSprintFilterSpan

◆ ShouldSimulationBeDisabled()

bool HumanCommandDeath::ShouldSimulationBeDisabled ( )

'OnSimulationEnd' is called before this

Definition at line 596 of file human.c.

◆ StartAction()

proto native bool HumanCommandAdditives::StartAction ( WeaponActions  pAction,
int  pActionType 
)

start reload,mechanism,chambering,unjam ...

◆ StartCommand_Action()

proto native HumanCommandActionCallback StartCommand_Action ( int  pActionID,
typename pCallbackClass  ,
int  pStanceMask 
)

--— ACTIONS --—

starts command - Action pStanceMask is mix of flags STANCEMASK_ERECT, ...

◆ StartCommand_Climb()

proto native HumanCommandClimb StartCommand_Climb ( SHumanCommandClimbResult  pClimbResult,
int  pType 
)

--— CLIMB --—

starts command - climb

◆ StartCommand_Damage()

proto native HumanCommandFullBodyDamage StartCommand_Damage ( int  pType,
float  pDirection 
)

--— FullBody Damages --—

starts fullbody damage

◆ StartCommand_Death()

proto native HumanCommandDeathCallback StartCommand_Death ( int  pType,
float  pDirection,
typename pCallbackClass  ,
bool  pKeepInLocalSpaceAfterLeave = false 
)

--— Death --—

starts command - death

◆ StartCommand_Fall()

proto native HumanCommandFall StartCommand_Fall ( float  pYVelocity)

--— FALL --—

starts command - fall pYVelocity <= 0 -> fall pYVelocity > 0 -> jump

◆ StartCommand_Ladder()

proto native HumanCommandLadder StartCommand_Ladder ( Building  pBuilding,
int  pLadderIndex 
)

--— LADDER --—

starts command - fall

◆ StartCommand_Melee()

proto native HumanCommandMelee StartCommand_Melee ( EntityAI  pTarget)

--— MELEE --—

starts command - melee

◆ StartCommand_Melee2()

proto native HumanCommandMelee2 StartCommand_Melee2 ( EntityAI  pTarget,
int  pHitType,
float  pComboValue,
vector  hitPos = vector.Zero 
)

starts command - melee2

◆ StartCommand_Move()

proto native HumanCommandMove StartCommand_Move ( )

--— MOVE --—

starts command - Move

◆ StartCommand_Script()

proto native HumanCommandScript StartCommand_Script ( HumanCommandScript  pHumanCommand)

— SCRIPTED COMMANDS

starts command - Action pStanceMask is mix of flags STANCEMASK_ERECT, ...

◆ StartCommand_ScriptInst()

proto native HumanCommandScript StartCommand_ScriptInst ( typename pCallbackClass  )

◆ StartCommand_Swim()

proto native HumanCommandSwim StartCommand_Swim ( )

--— LADDER --—

starts command - Swim

◆ StartCommand_Unconscious()

proto native HumanCommandUnconscious StartCommand_Unconscious ( float  pType)

starts command - unconscious

◆ StartCommand_Vehicle()

proto native HumanCommandVehicle StartCommand_Vehicle ( Transport  pTransport,
int  pTransportPositionIndex,
int  pVehicleSeat,
bool  fromUnconscious = false 
)

--— VEHICLE --—

starts command - vehicle

◆ StartDeath()

proto native void StartDeath ( )

◆ StartMeleeEvade()

proto native void HumanCommandMelee::StartMeleeEvade ( )

marks command to continue to combo

◆ StartMeleeEvadeA()

proto native void HumanCommandMelee::StartMeleeEvadeA ( float  pDirAngle)

marks command to continue to combo, pDirAngle specifies angle

◆ StartModifier()

proto native void StartModifier ( int  pType)

starts modifier

◆ StopSwimming()

proto native void StopSwimming ( )

◆ ThrowItem()

proto native void HumanCommandAdditives::ThrowItem ( int  throwType)

◆ UnlinkFromLocalSpace()

proto native void UnlinkFromLocalSpace ( )

◆ WakeUp()

proto native void HumanCommandDamage::WakeUp ( int  targetStance = -1)

◆ WasHit()

proto native bool WasHit ( )

is true only once after hit event

◆ WasItemLeaveHandsEvent()

proto native bool HumanCommandAdditives::WasItemLeaveHandsEvent ( )

◆ WeaponActionTypeToString()

string WeaponActionTypeToString ( int  A,
int  AT 
)

Definition at line 936 of file human.c.

◆ ~HumanAnimInterface()

private void HumanCommandActionCallback::~HumanAnimInterface ( )

◆ ~HumanCommandActionCallback()

private void ~HumanCommandActionCallback ( )

◆ ~HumanCommandAdditives()

private void ~HumanCommandAdditives ( )

Definition at line 1100 of file human.c.

◆ ~HumanCommandClimb()

private void HumanCommandFullBodyDamage::~HumanCommandClimb ( )

Definition at line 758 of file human.c.

◆ ~HumanCommandDamage()

private void ~HumanCommandDamage ( )

Definition at line 638 of file human.c.

◆ ~HumanCommandDeath()

private void ~HumanCommandDeath ( )

Definition at line 612 of file human.c.

◆ ~HumanCommandFall()

private void ~HumanCommandFall ( )

Definition at line 575 of file human.c.

◆ ~HumanCommandFullBodyDamage()

private void ~HumanCommandFullBodyDamage ( )

Definition at line 803 of file human.c.

◆ ~HumanCommandLadder()

private void HumanCommandSwim::~HumanCommandLadder ( )

Definition at line 640 of file human.c.

◆ ~HumanCommandMelee()

private void ~HumanCommandMelee ( )

Definition at line 514 of file human.c.

◆ ~HumanCommandMelee2()

private void HumanCommandFall::~HumanCommandMelee2 ( )

Definition at line 531 of file human.c.

◆ ~HumanCommandMove()

private void HumanCommandMelee::~HumanCommandMove ( )

Definition at line 425 of file human.c.

◆ ~HumanCommandSwim()

private void ~HumanCommandSwim ( )

Definition at line 674 of file human.c.

◆ ~HumanCommandUnconscious()

private void HumanCommandDamage::~HumanCommandUnconscious ( )

Definition at line 614 of file human.c.

◆ ~HumanCommandWeapons()

private void HumanCommandAdditives::~HumanCommandWeapons ( )

Definition at line 938 of file human.c.

Variable Documentation

◆ CommandActionAdditive

CommandActionAdditive = 8192

Definition at line 1253 of file human.c.

◆ CommandActionFullbody

CommandActionFullbody = 4096

Definition at line 1252 of file human.c.

◆ CommandClimb

CommandClimb = 16

Definition at line 1244 of file human.c.

◆ CommandDamageAdditive

CommandDamageAdditive = 256

Definition at line 1248 of file human.c.

◆ CommandDamageFullbody

CommandDamageFullbody = 128

Definition at line 1247 of file human.c.

◆ CommandDeath

CommandDeath = 32

Definition at line 1245 of file human.c.

◆ CommandFall

CommandFall = 8

Definition at line 1243 of file human.c.

◆ CommandLadder

CommandLadder = 512

Definition at line 1249 of file human.c.

◆ CommandMelee

CommandMelee = 2

Definition at line 1241 of file human.c.

◆ CommandMelee2

CommandMelee2 = 4

Definition at line 1242 of file human.c.

◆ CommandMove

CommandMove = 1

Definition at line 1240 of file human.c.

◆ CommandSwim

CommandSwim = 1024

Definition at line 1250 of file human.c.

◆ CommandUnconscious

CommandUnconscious = 64

Definition at line 1246 of file human.c.

◆ CommandVehicle

CommandVehicle = 2048

Definition at line 1251 of file human.c.

◆ HumanCommandFullBodyDamage

class HumanCommandClimb HumanCommandFullBodyDamage

Definition at line 802 of file human.c.

◆ m_bFinishWithFall

bool m_bFinishWithFall

Definition at line 744 of file human.c.

◆ m_bHasParent

bool m_bHasParent

Definition at line 745 of file human.c.

◆ m_bIsClimb

class HumanCommandVehicle m_bIsClimb

result from static test

◆ m_bIsClimbOver

bool m_bIsClimbOver

Definition at line 743 of file human.c.

◆ m_ClimbGrabPoint

vector m_ClimbGrabPoint

Definition at line 749 of file human.c.

◆ m_ClimbGrabPointNormal

vector m_ClimbGrabPointNormal

grab point for climb && climb over (in local space of it's parent)

Definition at line 750 of file human.c.

◆ m_ClimbOverStandPoint

vector m_ClimbOverStandPoint

where climb ends (in local space of it's parent)

Definition at line 752 of file human.c.

◆ m_ClimbOverStandPointParent

IEntity m_ClimbOverStandPointParent

Definition at line 756 of file human.c.

◆ m_ClimbStandPoint

vector m_ClimbStandPoint

normal to grabpoint position (used for character orientation)

Definition at line 751 of file human.c.

◆ m_ClimbStandPointParent

IEntity m_ClimbStandPointParent

parent of grabpoint

Definition at line 755 of file human.c.

◆ m_CommandTypeId

int m_CommandTypeId

Definition at line 1119 of file human.c.

◆ m_fClimbHeight

float m_fClimbHeight

Definition at line 747 of file human.c.

◆ m_fLeaning

float m_fLeaning

current movement (0 idle, 1 walk, 2-run, 3-sprint), only if the command has a movement

Definition at line 1122 of file human.c.

◆ m_GrabPointParent

IEntity m_GrabPointParent

where climb over ends (in local space of it's parent)

Definition at line 754 of file human.c.

◆ m_iMovement

int m_iMovement

current stance (DayZPlayerConstants.STANCEIDX_ERECT, ...), only if the command has a stance

Definition at line 1121 of file human.c.

◆ m_iStanceIdx

int m_iStanceIdx

current command's id

Definition at line 1120 of file human.c.

◆ m_LocalMovement

int m_LocalMovement = -1

leaning state (not all commands need to have all movements)

Definition at line 1124 of file human.c.

◆ MECHANISM_CLOSED

enum WeaponActionReloadClipTypes MECHANISM_CLOSED = 1

◆ MECHANISM_CLOSED_UNCOCKED

enum WeaponActionReloadClipTypes MECHANISM_CLOSED_UNCOCKED = 3

◆ MECHANISM_OPENED

enum WeaponActionReloadClipTypes MECHANISM_OPENED = 0

mechanism action types

◆ MECHANISM_SPECIAL

enum WeaponActionReloadClipTypes MECHANISM_SPECIAL = 2

◆ None

@ None = 0

Definition at line 1239 of file human.c.

◆ TAnimGraphCommand

class HumanInputController TAnimGraphCommand