DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл DayZAnimal.c

См. исходные тексты.

Структуры данных

class  DayZCreatureAnimInterface
 
class  DayZCreature
 
class  AnimCommandBase
 base class of all commands exposed to script to provide common functionality over animations Подробнее...
 
class  DayZCreatureAI
 do not process rotations ! Подробнее...
 

Функции

class DayZCreatureAnimInterface RegisterAnimationEvent (string event_name, string function_name)
 
void DayZCreatureAnimInterface ()
 
void ~DayZCreatureAnimInterface ()
 
proto native TAnimGraphCommand BindCommand (string pCommandName)
 returns command index -

 
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)
 
proto native void SetAnimationInstanceByName (string animation_instance_name, int instance_uuid, float duration)
 
proto native int GetCurrentAnimationInstanceUUID ()
 
proto native DayZCreatureAnimInterface GetAnimInterface ()
 
proto native void UpdateSimulationPrecision (int simLOD)
 
proto native void StartDeath ()
 
proto native void ResetDeath ()
 
proto native void ResetDeathCooldown ()
 
proto native bool IsDeathProcessed ()
 
proto native bool IsDeathConditionMet ()
 
proto native int GetBoneIndexByName (string pBoneName)
 returns bone index for a name (-1 if pBoneName doesn't exist)
 
override bool IsDayZCreature ()
 
override bool CanBeSkinned ()
 
override bool IsIgnoredByConstruction ()
 
override bool IsManagingArrows ()
 
override bool DisableVicinityIcon ()
 
override void AddArrow (Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
 
override bool HasFixedActionTargetCursorPosition ()
 
bool ModCommandHandlerBefore (float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
 
bool ModCommandHandlerInside (float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
 
bool ModCommandHandlerAfter (float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
 
class DayZAnimalCommandMove extends AnimCommandBase SetFlagFinished (bool pFinished)
 DayZAnimalCommandScript fully scriptable command.
 
proto native bool PrePhys_GetTranslation (out vector pOutTransl)
 script function usable in PrePhysUpdate
 
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
 
proto native void PostPhys_GetRotation (out float pOutRot[4])
 vec3 in world space
 
proto native void PostPhys_SetPosition (vector pInTransl)
 quaternion in world space
 
proto native void PostPhys_SetRotation (float pInRot[4])
 vec3 in world space
 
proto native void PostPhys_LockRotation ()
 quaternion in world space
 

Переменные

class DayZCreatureAI extends DayZCreature COMMANDID_MOVE
 
class DayZCreatureAI extends DayZCreature COMMANDID_JUMP
 
class DayZCreatureAI extends DayZCreature COMMANDID_DEATH
 
class DayZCreatureAI extends DayZCreature COMMANDID_HIT
 
class DayZCreatureAI extends DayZCreature COMMANDID_ATTACK
 
class DayZCreatureAI extends DayZCreature COMMANDID_SCRIPT
 

Функции

◆ AddArrow()

override void AddArrow ( Object arrow,
int componentIndex,
vector closeBonePosWS,
vector closeBoneRotWS )
81 {
83 GetActionComponentNameList(componentIndex, CachedObjectsArrays.ARRAY_STRING, "fire");
84
85 int pivot = -1;
86
87
88 for (int i = 0; i < CachedObjectsArrays.ARRAY_STRING.Count() && pivot == -1; i++)
89 {
91 }
92
95
96 if (pivot == -1)
97 {
98 GetTransform(parentTransMat);
99 }
100 else
101 {
102 vector rotMatrix[3];
104
109 }
110
111 arrow.GetTransform(arrowTransMat);
113 // orthogonalize matrix - parent might be skewed
115 arrow.SetTransform(arrowTransMat);
116
118 }
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
Definition UtilityClasses.c:41
static ref TStringArray ARRAY_STRING
Definition UtilityClasses.c:49
Definition EnMath3D.c:28
Definition EnMath.c:7
Definition EntityAI.c:95
Definition EnConvert.c:106
static proto void MatrixOrthogonalize4(vector mat[4])
Orthogonalizes matrix.
static proto void MatrixInvMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Invert-transforms matrix.
static proto void YawPitchRollMatrix(vector ang, out vector mat[3])
Creates rotation matrix from angles.
static const float RAD2DEG
Definition EnMath.c:16
proto native void AddChild(Widget child, bool immedUpdate=true)

Перекрестные ссылки AddChild(), CachedObjectsArrays::ARRAY_STRING, GetBoneIndexByName(), Math3D::MatrixInvMultiply4(), Math3D::MatrixOrthogonalize4(), Math::RAD2DEG и Math3D::YawPitchRollMatrix().

◆ BindCommand()

proto native TAnimGraphCommand BindCommand ( string pCommandName)
private

returns command index -

◆ BindEvent()

proto native TAnimGraphEvent BindEvent ( string pEventName)
private

◆ BindTag()

proto native TAnimGraphTag BindTag ( string pTagName)
private

◆ BindVariableBool()

proto native TAnimGraphVariable BindVariableBool ( string pVariable)
private

◆ BindVariableFloat()

proto native TAnimGraphVariable BindVariableFloat ( string pVariable)
private

◆ BindVariableInt()

proto native TAnimGraphVariable BindVariableInt ( string pVariable)
private

◆ CanBeSkinned()

override bool CanBeSkinned ( )
61 {
62 return true;
63 }

◆ DayZCreatureAnimInterface()

void DayZCreatureAnimInterface ( )
private

◆ DisableVicinityIcon()

override bool DisableVicinityIcon ( )
76 {
77 return true;
78 }

◆ GetAnimInterface()

proto native DayZCreatureAnimInterface GetAnimInterface ( )

◆ GetBoneIndexByName()

◆ GetCurrentAnimationInstanceUUID()

proto native int GetCurrentAnimationInstanceUUID ( )

◆ HasFixedActionTargetCursorPosition()

override bool HasFixedActionTargetCursorPosition ( )
121 {
122 return true;
123 }

Используется в ActionTargetsCursor::GetOnScreenPosition().

◆ IsDayZCreature()

override bool IsDayZCreature ( )
56 {
57 return true;
58 }

Используется в IEntity::CanBeIgnoredByDroppedItem().

◆ IsDeathConditionMet()

proto native bool IsDeathConditionMet ( )

◆ IsDeathProcessed()

proto native bool IsDeathProcessed ( )

◆ IsIgnoredByConstruction()

override bool IsIgnoredByConstruction ( )
66 {
67 return IsRuined();
68 }

◆ IsManagingArrows()

override bool IsManagingArrows ( )
71 {
72 return true;
73 }

◆ ModCommandHandlerAfter()

bool ModCommandHandlerAfter ( float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished )
142 {
143 return false;
144 }

Используется в DayZCreatureAI::CommandHandler(), DayZInfected::CommandHandler() и DayZPlayer::CommandHandler().

◆ ModCommandHandlerBefore()

bool ModCommandHandlerBefore ( float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished )

ModOverrides

132 {
133 return false;
134 }

Используется в DayZCreatureAI::CommandHandler(), DayZInfected::CommandHandler() и DayZPlayer::CommandHandler().

◆ ModCommandHandlerInside()

bool ModCommandHandlerInside ( float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished )
137 {
138 return false;
139 }

Используется в DayZCreatureAI::CommandHandler(), DayZInfected::CommandHandler() и DayZPlayer::CommandHandler().

◆ 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))

◆ PrePhys_GetRotation()

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

◆ PrePhys_GetTranslation()

proto native bool PrePhys_GetTranslation ( out vector pOutTransl)

script function usable in PrePhysUpdate

◆ PrePhys_SetRotation()

proto native void PrePhys_SetRotation ( float pInRot[4])

◆ PrePhys_SetTranslation()

proto native void PrePhys_SetTranslation ( vector pInTransl)

◆ RegisterAnimationEvent()

◆ ResetDeath()

proto native void ResetDeath ( )

◆ ResetDeathCooldown()

◆ SetAnimationInstanceByName()

proto native void SetAnimationInstanceByName ( string animation_instance_name,
int instance_uuid,
float duration )

◆ SetFlagFinished()

class DayZAnimalCommandMove extends AnimCommandBase SetFlagFinished ( bool pFinished)

DayZAnimalCommandScript fully scriptable command.

Предупреждения
NON-MANAGED, will be managed by C++ once it is sent to the CommandHandler through DayZAnimal.StartCommand_Script
Заметки
So ideally, it is best to set up the DayZAnimalCommandScript, not create any instances and start it through DayZAnimal.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 DayZAnimal this terminates command script and shows CommandHandler( ... pCurrentCommandFinished == true );

◆ StartDeath()

proto native void StartDeath ( )

◆ UpdateSimulationPrecision()

proto native void UpdateSimulationPrecision ( int simLOD)

◆ ~DayZCreatureAnimInterface()

Переменные

◆ COMMANDID_ATTACK

◆ COMMANDID_DEATH

◆ COMMANDID_HIT

◆ COMMANDID_JUMP

◆ COMMANDID_MOVE

◆ COMMANDID_SCRIPT