DayZ 1.24
Loading...
Searching...
No Matches
EntityAI Class Reference
Collaboration diagram for EntityAI:
[legend]

Protected Member Functions

void InitImpactSoundData ()
 
AbstractWave PlaySound (SoundObject so, SoundObjectBuilder sob)
 
void PlaySoundByAnimEvent (EAnimSoundEventID id)
 
string GetImpactSurfaceType (IEntity other, Contact impact)
 
string GetImpactSurfaceTypeEx (IEntity other, Contact impact, out int liquid)
 
string GetRuinedMeleeAmmoType ()
 returns ammo (projectile) used in melee if the item is destroyed. Override higher for specific use
 
float ProcessImpactSound (IEntity other, Contact extra, float weight, out int surfaceHash)
 
float ProcessImpactSoundEx (IEntity other, Contact extra, float weight, out int surfaceHash, out int liquidType)
 
override bool CanDropEntity (notnull EntityAI item)
 
void OnItemInHandsChanged ()
 
bool NeedInventoryJunctureFromServer (notnull EntityAI item, EntityAI currParent, EntityAI newParent)
 
void LocalDestroyEntityInHands ()
 
void PredictiveMoveItemFromHandsToInventory ()
 
void JunctureDeleteItem (EntityAI item)
 
override bool CanBeSkinned ()
 
void UpdateInventoryMenu ()
 
bool IsInventorySoftLocked ()
 
void SetInventorySoftLock (bool status)
 
bool IsInTransport ()
 returns true if man is in transport, false otherwise
 
void StopDeathDarkeningEffect ()
 
bool PhysicalPredictiveDropItem (EntityAI entity, bool heavy_item_only=true)
 
void SetProcessUIWarning (bool state)
 
void OnGameplayDataHandlerSync ()
 
bool CanPlaceItem (EntityAI item)
 
void HandleByCrewMemberState (ECrewMemberState state)
 
vector GetTransportCameraOffset ()
 
int GetAnimInstance ()
 
int GetSeatAnimationType (int posIdx)
 
int Get3rdPersonCameraType ()
 
bool CrewCanGetThrough (int posIdx)
 
bool CanReachSeatFromSeat (int currentSeat, int nextSeat)
 
bool CanReachSeatFromDoors (string pSeatSelection, vector pFromPos, float pDistance=1.0)
 
bool CanReachDoorsFromSeat (string pDoorsSelection, int pCurrentSeat)
 
int GetSeatIndexFromDoor (string pDoorSelection)
 
bool IsIgnoredObject (Object o)
 
bool IsAreaAtDoorFree (int currentSeat, float maxAllowedObjHeight, inout vector extents, out vector transform[4])
 
bool IsAreaAtDoorFree (int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
 
Shape DebugFreeAreaAtDoor (int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
 
void JunctureTakeEntityToHands (notnull EntityAI item)
 hand juncture
 
void PredictiveTakeEntityToHands (EntityAI item)
 
void LocalTakeEntityToHands (EntityAI item)
 
void ServerTakeEntityToHands (EntityAI item)
 
void TakeEntityToHandsImpl (InventoryMode mode, EntityAI item)
 
bool ReplaceItemWithNewImpl (InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
 !hand -> !hand replace
 
bool LocalReplaceItemWithNew (ReplaceItemWithNewLambdaBase lambda)
 
bool ServerReplaceItemWithNew (ReplaceItemWithNewLambdaBase lambda)
 
bool ReplaceItemElsewhereWithNewInHandsImpl (InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
 !hand replace -> hand
 
bool LocalReplaceItemElsewhereWithNewInHands (ReplaceItemWithNewLambdaBase lambda)
 
bool ServerReplaceItemElsewhereWithNewInHands (ReplaceItemWithNewLambdaBase lambda)
 
bool ReplaceItemInHandsWithNewImpl (InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
 hand replace
 
bool LocalReplaceItemInHandsWithNew (ReplaceItemWithNewLambdaBase lambda)
 
bool ServerReplaceItemInHandsWithNew (ReplaceItemWithNewLambdaBase lambda)
 
bool ReplaceItemInHandsWithNewElsewhereImpl (InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
 hand replace2
 
bool LocalReplaceItemInHandsWithNewElsewhere (ReplaceItemWithNewLambdaBase lambda)
 
bool ServerReplaceItemInHandsWithNewElsewhere (ReplaceItemWithNewLambdaBase lambda)
 
bool JunctureTakeEntityToInventory (FindInventoryLocationType flags, notnull EntityAI item)
 to inv juncture
 
override bool PredictiveTakeEntityToInventory (FindInventoryLocationType flags, notnull EntityAI item)
 
override bool LocalTakeEntityToInventory (FindInventoryLocationType flags, notnull EntityAI item)
 
override bool ServerTakeEntityToInventory (FindInventoryLocationType flags, notnull EntityAI item)
 
bool TakeEntityToInventoryImpl (InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item)
 
bool JunctureTakeEntityToCargo (notnull EntityAI item)
 to cgo juncture
 
override bool PredictiveTakeEntityToCargo (notnull EntityAI item)
 
override bool LocalTakeEntityToCargo (notnull EntityAI item)
 
override bool ServerTakeEntityToCargo (notnull EntityAI item)
 
bool TakeEntityToCargoImpl (InventoryMode mode, notnull EntityAI item)
 
bool JunctureTakeEntityAsAttachment (notnull EntityAI item)
 as att juncture
 
override bool PredictiveTakeEntityAsAttachment (notnull EntityAI item)
 
override bool LocalTakeEntityAsAttachment (notnull EntityAI item)
 
override bool ServerTakeEntityAsAttachment (notnull EntityAI item)
 
bool TakeEntityAsAttachmentImpl (InventoryMode mode, notnull EntityAI item)
 
bool JunctureTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
 as att ex juncture
 
override bool PredictiveTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
 
override bool LocalTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
 
override bool ServerTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
 
bool TakeEntityAsAttachmentExImpl (InventoryMode mode, notnull EntityAI item, int slot)
 
bool JunctureSwapEntities (notnull EntityAI item1, notnull EntityAI item2)
 swap juncture
 
bool PredictiveSwapEntities (notnull EntityAI item1, notnull EntityAI item2)
 
bool LocalSwapEntities (notnull EntityAI item1, notnull EntityAI item2)
 
bool ServerSwapEntities (notnull EntityAI item1, notnull EntityAI item2)
 
bool SwapEntitiesImpl (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2)
 
bool JunctureForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
 ForceSwap juncture.
 
bool PredictiveForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
 
bool LocalForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
 
bool ServerForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
 
bool ForceSwapEntitiesImpl (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
 
bool JunctureTakeEntityToTargetInventory (notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
 to target inv juncture
 
override bool PredictiveTakeEntityToTargetInventory (notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
 
bool PredictiveTakeOrSwapAttachment (notnull EntityAI item)
 
override bool LocalTakeEntityToTargetInventory (notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
 
bool TakeEntityToTargetInventoryImpl (InventoryMode mode, notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
 
bool JunctureTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
 to target cgo ex juncture
 
override bool PredictiveTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
 
override bool LocalTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
 
override bool ServerTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
 
bool TakeEntityToTargetCargoExImpl (InventoryMode mode, notnull CargoBase cargo, notnull EntityAI item, int row, int col)
 
bool JunctureTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
 to target cgo juncture
 
override bool PredictiveTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
 
override bool LocalTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
 
override bool ServerTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
 
bool TakeEntityToTargetCargoImpl (InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
 
bool JunctureTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
 to target att ex juncture
 
override bool PredictiveTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
 
override bool LocalTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
 
override bool ServerTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
 
bool TakeEntityToTargetAttachmentExImpl (InventoryMode mode, notnull EntityAI target, notnull EntityAI item, int slot)
 
bool JunctureTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
 to target att juncture
 
override bool PredictiveTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
 
override bool LocalTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
 
override bool ServerTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
 
bool TakeEntityToTargetAttachmentImpl (InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
 
bool JunctureTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
 to dst juncture
 
override bool PredictiveTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
 
override bool LocalTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
 
override bool ServerTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
 
bool TakeToDstImpl (InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
 
proto native bool StatRegister (string name)
 
proto native float StatGet (string name)
 Gets counter value of the specified stat type.
 
proto void StatGetCounter (string name, out string value)
 Gets counter value as string of the specified stat type.
 
proto void StatGetAsTime (string name, out string value)
 Gets counter value as formatted time string of the specified stat type.
 
proto native void StatUpdate (string name, float value)
 Updates stat counter with given value.
 
proto native void StatUpdateByTime (string name)
 Updates stat counter by time.
 
proto native void StatUpdateByPosition (string name)
 Updates stat counter by player's actual position.
 
proto native void StatUpdateByGivenPos (string name, vector pos)
 Updates stat counter by given position.
 
proto native void StatInvokeUpdate ()
 
proto native void StatSyncToClient ()
 

Private Member Functions

proto native int GetLaddersCount ()
 
proto native vector GetLadderPosTop (int ladderIndex)
 
proto native vector GetLadderPosBottom (int ladderIndex)
 
proto native int GetDoorIndex (int componentIndex)
 Gets the index of the door based on the view geometry component index.
 
proto native int GetDoorCount ()
 Returns the number of the doors in the building.
 
proto native bool IsDoorOpen (int index)
 When the door is requested to be fully open (animation wanted phase is greater than 0.5)
 
proto native bool IsDoorOpening (int index)
 When the wanted phase is at the open phase target (1.0)
 
proto native bool IsDoorOpeningAjar (int index)
 When the wanted phase is at the ajar phase target (0.2)
 
proto native bool IsDoorClosing (int index)
 When the wanted phase is at the close phase target (0.0)
 
proto native bool IsDoorOpened (int index)
 When the phase is at the open phase target (1.0)
 
proto native bool IsDoorOpenedAjar (int index)
 When the phase is at the ajar phase target (0.2)
 
proto native bool IsDoorClosed (int index)
 When the phase is at the close phase target (0.0)
 
proto native bool IsDoorLocked (int index)
 When the door is locked.
 
proto native void PlayDoorSound (int index)
 Plays the appropriate sound at the door, based on animation phase and state.
 
proto native void OpenDoor (int index)
 Attempts to open the door.
 
proto native void CloseDoor (int index)
 Attempts to close the door.
 
proto native void LockDoor (int index, bool force=false)
 Locks the door if not already locked, resets the door health. 'force = true' will close the door if open.
 
proto native void UnlockDoor (int index)
 Unlocks the door if locked.
 
proto native vector GetDoorSoundPos (int index)
 Position in world space for where the door sounds are played from.
 
proto native float GetDoorSoundDistance (int index)
 Audible distance for the door sound.
 
proto native void OutputDoorLog ()
 Requires special build as logging is disabled even on internal builds due to memory usage. Used for checking of possible causes of navmesh desync.
 
int GetNearestDoorBySoundPos (vector position)
 Gets the nearest door based on the sound position (quick and dirty function for debugging)
 
void OnDoorOpenStart (DoorStartParams params)
 Event for when the door starts opening.
 
void OnDoorOpenFinish (DoorFinishParams params)
 Event for when the door finishes opening.
 
void OnDoorOpenAjarStart (DoorStartParams params)
 Event for when the door starts opening ajarred (usually after unlock)
 
void OnDoorOpenAjarFinish (DoorFinishParams params)
 Event for when the door finishes opening ajarred (usually after unlock)
 
void OnDoorCloseStart (DoorStartParams params)
 Event for when the door starts closing.
 
void OnDoorCloseFinish (DoorFinishParams params)
 Event for when the door finishes closing.
 
void OnDoorLocked (DoorLockParams params)
 Event for when the door is locked.
 
void OnDoorUnlocked (DoorLockParams params)
 Event for when the door is unlocked.
 
bool CanDoorBeOpened (int doorIndex, bool checkIfLocked=false)
 
bool CanDoorBeClosed (int doorIndex)
 
bool CanDoorBeLocked (int doorIndex)
 Check if the door is closed and if the door is unlocked.
 
override void GetDebugActions (out TSelectableActionInfoArrayEx outputList)
 
override bool OnAction (int action_id, Man player, ParamsReadContext ctx)
 
override bool IsBuilding ()
 
override bool CanObstruct ()
 
override bool IsHealthVisible ()
 
void Building ()
 
override bool IsInventoryVisible ()
 
override int GetMeleeTargetType ()
 
proto native InventoryItemType GetInventoryItemType ()
 
proto native void SwitchOn (bool onOff)
 Some inventoryItem devices can be switched on/off (radios, transmitters)
 
proto native bool IsOn ()
 Some inventoryItem devices can be switched on/off (radios, transmitters)
 
proto native void EnableCollisionsWithCharacter (bool state)
 collisions with character
 
proto native bool HasCollisionsWithCharacter ()
 
proto native MeleeCombatData GetMeleeCombatData ()
 
proto native void ThrowPhysically (DayZPlayer player, vector force, bool collideWithCharacters=true)
 
proto native void ForceFarBubble (bool state)
 Sets the item to use the server configured 'networkRangeFar' instead of 'networkRangeNear'.
 
void InventoryItem ()
 
void OnRightClick ()
 
event bool OnUseFromInventory (Man owner)
 
string GetTooltip ()
 Get tooltip text.
 
override bool IsInventoryItem ()
 
int GetMeleeMode ()
 
int GetMeleeHeavyMode ()
 
int GetMeleeSprintMode ()
 
override bool IsMeleeWeapon ()
 
bool IsMeleeFinisher ()
 
void PlayImpactSound (float weight, float velocity, int surfaceHash)
 
proto native UAInterface GetInputInterface ()
 Returns player's input interface.
 
proto native PlayerIdentity GetIdentity ()
 Returns player's identity.
 
proto native EntityAI GetDrivingVehicle ()
 Returns vehicle which this Man object is driving. If this Man object isn't as driver of any vehicle it will return NULL.
 
proto native owned string GetCurrentWeaponMode ()
 
proto native void SetSpeechRestricted (bool state)
 Set speech restriction.
 
proto native bool IsSpeechRestricted ()
 Check if player has resctricted speech.
 
proto native void SetFaceTexture (string texture_name)
 Texture that is used on the Man's face and hands.
 
proto native void SetFaceMaterial (string material_name)
 Material that is used on the Man's face and hands.
 
proto native bool IsSoundInsideBuilding ()
 
proto native bool IsCameraInsideVehicle ()
 
proto native owned string GetMasterAttenuation ()
 
proto native void SetMasterAttenuation (string masterAttenuation)
 
void Man ()
 
override bool IsMan ()
 
override bool IsHealthVisible ()
 
override bool HasFixedActionTargetCursorPosition ()
 
bool IsUnconscious ()
 
int GetPlayerState ()
 
void AddItemToDelete (EntityAI item)
 
void Transport ()
 
override int GetMeleeTargetType ()
 
proto native void Synchronize ()
 Synchronizes car's state in case the simulation is not running.
 
proto native int CrewSize ()
 Returns crew capacity of this vehicle.
 
proto native int CrewPositionIndex (int componentIdx)
 
proto native int CrewMemberIndex (Human player)
 
proto native Human CrewMember (int posIdx)
 
proto void CrewEntry (int posIdx, out vector pos, out vector dir)
 Reads entry point and direction into vehicle on given position in model space.
 
proto void CrewEntryWS (int posIdx, out vector pos, out vector dir)
 Reads entry point and direction into vehicle on given position in world space.
 
proto void CrewTransform (int posIdx, out vector mat[4])
 Returns crew transformation indside vehicle in model space.
 
proto void CrewTransformWS (int posIdx, out vector mat[4])
 Returns crew transformation indside vehicle in world space.
 
proto native void CrewGetIn (Human player, int posIdx)
 Performs transfer of player from world into vehicle on given position.
 
proto native Human CrewGetOut (int posIdx)
 Performs transfer of player from vehicle into world from given position.
 
proto native void CrewDeath (int posIdx)
 Handles death of player in vehicle and awakes its physics if needed.
 
override bool IsTransport ()
 
override bool IsIgnoredByConstruction ()
 
override bool IsHealthVisible ()
 
override bool ShowZonesHealth ()
 
bool IsAnyCrewPresent ()
 
float GetTransportCameraDistance ()
 
void MarkCrewMemberUnconscious (int crewMemberIndex)
 
void MarkCrewMemberDead (int crewMemberIndex)
 
void AdvancedCommunication ()
 
void TurnOnTransmitter ()
 
void TurnOffTransmitter ()
 
void InitializeActions ()
 
override void GetActions (typename action_input_type, out array< ActionBase_Basic > actions)
 
void SetActions ()
 
void AddAction (typename actionName)
 
void RemoveAction (typename actionName)
 

Private Attributes

ref TIntArray m_InteractActions
 
SoundLookupTable m_SoundImpactTable
 
float m_SoundContactTickTime
 
bool m_IsMeleeWeapon = false
 
ref TIntArray m_SingleUseActions
 
ref TIntArray m_ContinuousActions
 
TInputActionMap m_InputActionMap
 
bool m_ActionsInitialize
 

Static Private Attributes

const float SOUND_CONTACT_SKIP = 0.33
 
static ref map< typename, ref TInputActionMapm_AdvComTypeActionsMap = new map<typename, ref TInputActionMap>
 
ref ScriptInvoker m_OnItemAddedToHands
 
ref ScriptInvoker m_OnItemRemovedFromHands
 
HumanInventory GetHumanInventory ()
 inventory
 
ScriptInvoker GetOnItemAddedToHands ()
 
ScriptInvoker GetOnItemRemovedFromHands ()
 
void EEItemIntoHands (EntityAI item)
 
void EEItemOutOfHands (EntityAI item)
 
bool JunctureDropEntity (notnull EntityAI item)
 drop juncture
 
override bool PredictiveDropEntity (notnull EntityAI item)
 
override bool LocalDropEntity (notnull EntityAI item)
 
override bool ServerDropEntity (notnull EntityAI item)
 
bool DropEntityImpl (InventoryMode mode, notnull EntityAI owner, notnull EntityAI item)
 

Detailed Description

Base native class of all vehicles in game.

Definition at line 5 of file Building.c.

Member Function Documentation

◆ AddAction()

void EntityAI::AddAction ( typename actionName )
inlineprivate

Definition at line 85 of file AdvancedCommunication.c.

86 {
87 ActionBase action = ActionManagerBase.GetAction(actionName);
88
89 if (!action)
90 {
91 Debug.LogError("Action " + actionName + " dosn't exist!");
92 return;
93 }
94
95 typename ai = action.GetInputType();
96 if (!ai)
97 {
98 m_ActionsInitialize = false;
99 return;
100 }
101
103
104 if (!action_array)
105 {
108 }
109
111 Debug.ActionLog(action.ToString() + " -> " + ai, this.ToString(), "n/a", "Add action");
112 action_array.Insert(action);
113 }
Definition Debug.c:14
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition Debug.c:341
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition Debug.c:143
TInputActionMap m_InputActionMap
static bool IsActionLogEnable()
Definition Debug.c:719

References Debug::ActionLog(), LogManager::IsActionLogEnable(), Debug::LogError(), m_ActionsInitialize, and m_InputActionMap.

◆ AddItemToDelete()

void EntityAI::AddItemToDelete ( EntityAI item)
private

◆ AdvancedCommunication()

void EntityAI::AdvancedCommunication ( )
inlineprivate

Definition at line 7 of file AdvancedCommunication.c.

8 {
9 if (!GetGame().IsDedicatedServer())
10 {
11 if (GetGame().GetPlayer())
12 m_ActionsInitialize = false;
13 }
14 }
PlayerBase GetPlayer()
proto native CGame GetGame()

References GetGame(), GetPlayer(), and m_ActionsInitialize.

◆ Building()

void EntityAI::Building ( )
inlineprivate

Definition at line 223 of file Building.c.

224 {
226 g_Game.ConfigGetIntArray("cfgVehicles " + GetType() + " InteractActions", m_InteractActions);
227 }
eBleedingSourceType GetType()
DayZGame g_Game
Definition DayZGame.c:3528
ref TIntArray m_InteractActions
Definition Building.c:221
array< int > TIntArray
Definition EnScript.c:668

References g_Game, GetType(), and m_InteractActions.

◆ CanBeSkinned()

override bool EntityAI::CanBeSkinned ( )
inlineprotected

Definition at line 835 of file Man.c.

836 {
837 return true;
838 }

◆ CanDoorBeClosed()

bool EntityAI::CanDoorBeClosed ( int doorIndex)
inlineprivate

Definition at line 143 of file Building.c.

144 {
145 return IsDoorOpen(doorIndex);
146 }
proto native bool IsDoorOpen(int index)
When the door is requested to be fully open (animation wanted phase is greater than 0....

◆ CanDoorBeLocked()

bool EntityAI::CanDoorBeLocked ( int doorIndex)
inlineprivate

Check if the door is closed and if the door is unlocked.

Definition at line 149 of file Building.c.

150 {
152 }
proto native bool IsDoorLocked(int index)
When the door is locked.

◆ CanDoorBeOpened()

bool EntityAI::CanDoorBeOpened ( int doorIndex,
bool checkIfLocked = false )
inlineprivate

Definition at line 125 of file Building.c.

126 {
128 return false;
129
130 if (checkIfLocked)
131 {
133 return false;
134 }
135 else
136 {
138 return false;
139 }
140 return true;
141 }

◆ CanDropEntity()

override bool EntityAI::CanDropEntity ( notnull EntityAI item)
inlineprotected

Definition at line 142 of file Man.c.

142{ return true; }

◆ CanObstruct()

override bool EntityAI::CanObstruct ( )
inlineprivate

Definition at line 211 of file Building.c.

212 {
213 return true;
214 }

◆ CanPlaceItem()

bool EntityAI::CanPlaceItem ( EntityAI item)
protected

◆ CanReachDoorsFromSeat()

bool EntityAI::CanReachDoorsFromSeat ( string pDoorsSelection,
int pCurrentSeat )
inlineprotected

Definition at line 160 of file Transport.c.

161 {
162#ifndef CFGMODS_DEFINE_TEST
163 return false;
164#else
165 return true;
166#endif
167 }

◆ CanReachSeatFromDoors()

bool EntityAI::CanReachSeatFromDoors ( string pSeatSelection,
vector pFromPos,
float pDistance = 1.0 )
inlineprotected

Definition at line 151 of file Transport.c.

152 {
153#ifndef CFGMODS_DEFINE_TEST
154 return false;
155#else
156 return true;
157#endif
158 }

◆ CanReachSeatFromSeat()

bool EntityAI::CanReachSeatFromSeat ( int currentSeat,
int nextSeat )
inlineprotected

Definition at line 142 of file Transport.c.

143 {
144#ifndef CFGMODS_DEFINE_TEST
145 return false;
146#else
147 return true;
148#endif
149 }

◆ CloseDoor()

proto native void EntityAI::CloseDoor ( int index)
private

Attempts to close the door.

◆ CrewCanGetThrough()

bool EntityAI::CrewCanGetThrough ( int posIdx)
inlineprotected

Definition at line 133 of file Transport.c.

134 {
135#ifndef CFGMODS_DEFINE_TEST
136 return false;
137#else
138 return true;
139#endif
140 }

◆ CrewDeath()

proto native void EntityAI::CrewDeath ( int posIdx)
private

Handles death of player in vehicle and awakes its physics if needed.

◆ CrewEntry()

proto void EntityAI::CrewEntry ( int posIdx,
out vector pos,
out vector dir )
private

Reads entry point and direction into vehicle on given position in model space.

◆ CrewEntryWS()

proto void EntityAI::CrewEntryWS ( int posIdx,
out vector pos,
out vector dir )
private

Reads entry point and direction into vehicle on given position in world space.

◆ CrewGetIn()

proto native void EntityAI::CrewGetIn ( Human player,
int posIdx )
private

Performs transfer of player from world into vehicle on given position.

◆ CrewGetOut()

proto native Human EntityAI::CrewGetOut ( int posIdx)
private

Performs transfer of player from vehicle into world from given position.

◆ CrewMember()

proto native Human EntityAI::CrewMember ( int posIdx)
private

Returns crew member based on position index. Null can be returned if no Human is present on the given position.

◆ CrewMemberIndex()

proto native int EntityAI::CrewMemberIndex ( Human player)
private

Returns crew member index based on player's instance. -1 is returned when the player is not isnide.

◆ CrewPositionIndex()

proto native int EntityAI::CrewPositionIndex ( int componentIdx)
private

Returns crew member index based on action component index. -1 is returned when no crew position corresponds to given component index.

◆ CrewSize()

proto native int EntityAI::CrewSize ( )
private

Returns crew capacity of this vehicle.

◆ CrewTransform()

proto void EntityAI::CrewTransform ( int posIdx,
out vector mat[4] )
private

Returns crew transformation indside vehicle in model space.

◆ CrewTransformWS()

proto void EntityAI::CrewTransformWS ( int posIdx,
out vector mat[4] )
private

Returns crew transformation indside vehicle in world space.

◆ DebugFreeAreaAtDoor()

Shape EntityAI::DebugFreeAreaAtDoor ( int currentSeat,
float maxAllowedObjHeight = 0.5,
float horizontalExtents = 0.5,
float playerHeight = 1.7 )
inlineprotected

Definition at line 272 of file Transport.c.

273 {
274 int color = ARGB(20, 0, 255, 0);
275
276 vector transform[4];
278
282
284 color = ARGB(20, 255, 0, 0);
285
286 Shape shape = Debug.DrawBox(-extents * 0.5, extents * 0.5, color);
287 shape.SetMatrix(transform);
288 return shape;
289 }
static Shape DrawBox(vector pos1, vector pos2, int color=0x1fff7f7f)
Definition Debug.c:401
bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight, inout vector extents, out vector transform[4])
Definition Transport.c:215
class DiagMenu Shape
don't call destructor directly. Use Destroy() instead
int ARGB(int a, int r, int g, int b)
Definition proto.c:322

References ARGB(), Debug::DrawBox(), Transport::IsAreaAtDoorFree(), and Shape.

◆ DropEntityImpl()

bool EntityAI::DropEntityImpl ( InventoryMode mode,
notnull EntityAI owner,
notnull EntityAI item )
inlineprotected

Definition at line 133 of file Man.c.

134 {
135 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::DropEntity(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
138 return code;
139 }
void syncDebugPrint(string s)
Definition Debug.c:1
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Definition Inventory.c:22
void UpdateInventoryMenu()
HumanInventory GetHumanInventory()
inventory
Definition Man.c:61
override bool DropEntity(InventoryMode mode, EntityAI owner, notnull EntityAI item)
static bool IsSyncLogEnable()
Definition Debug.c:759
override string GetDebugName()

References HumanInventory::DropEntity(), GetDebugName(), GetHumanInventory(), LogManager::IsSyncLogEnable(), syncDebugPrint(), and UpdateInventoryMenu().

Referenced by JunctureDropEntity(), LocalDropEntity(), PredictiveDropEntity(), and ServerDropEntity().

◆ EEItemIntoHands()

void EntityAI::EEItemIntoHands ( EntityAI item)
inlineprotected

Definition at line 89 of file Man.c.

90 {
91 SetWeightDirty();
93 m_OnItemAddedToHands.Invoke(item, this);
94 }
ref ScriptInvoker m_OnItemAddedToHands
Definition Man.c:68

◆ EEItemOutOfHands()

void EntityAI::EEItemOutOfHands ( EntityAI item)
inlineprotected

Definition at line 96 of file Man.c.

97 {
98 SetWeightDirty();
100 m_OnItemRemovedFromHands.Invoke(item, this);
101 }
ref ScriptInvoker m_OnItemRemovedFromHands
Definition Man.c:70

◆ EnableCollisionsWithCharacter()

proto native void EntityAI::EnableCollisionsWithCharacter ( bool state)
private

collisions with character

◆ ForceFarBubble()

proto native void EntityAI::ForceFarBubble ( bool state)
private

Sets the item to use the server configured 'networkRangeFar' instead of 'networkRangeNear'.

◆ ForceSwapEntitiesImpl()

bool EntityAI::ForceSwapEntitiesImpl ( InventoryMode mode,
notnull EntityAI item1,
notnull EntityAI item2,
notnull InventoryLocation item2_dst )
inlineprotected

Definition at line 566 of file Man.c.

567 {
568 bool code = false;
569 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ForceSwapImpl(" + typename.EnumToString(InventoryMode, mode) + ") item1=" + Object.GetDebugName(item1) + " item2=" + item2.GetDebugName(this));
571
573 if (!code)
574 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ForceSwapEntitiesImpl - cannot Forceswap");
575 return code;
576 }
override bool ForceSwapEntities(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)

References HumanInventory::ForceSwapEntities(), GetDebugName(), GetHumanInventory(), LogManager::IsSyncLogEnable(), syncDebugPrint(), and UpdateInventoryMenu().

Referenced by JunctureForceSwapEntities(), LocalForceSwapEntities(), PredictiveForceSwapEntities(), and ServerForceSwapEntities().

◆ Get3rdPersonCameraType()

int EntityAI::Get3rdPersonCameraType ( )
inlineprotected

Definition at line 123 of file Transport.c.

124 {
125#ifndef CFGMODS_DEFINE_TEST
126 Error("Get3rdPersonCameraType() not implemented");
127 return 0;
128#else
129 return 31;
130#endif
131 }
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

References Error().

◆ GetActions()

override void EntityAI::GetActions ( typename action_input_type ,
out array< ActionBase_Basic > actions )
inlineprivate

Definition at line 67 of file AdvancedCommunication.c.

68 {
70 {
73 }
74
76 }

References InitializeActions(), m_ActionsInitialize, and m_InputActionMap.

◆ GetAnimInstance()

int EntityAI::GetAnimInstance ( )
inlineprotected

Definition at line 105 of file Transport.c.

106 {
107#ifndef CFGMODS_DEFINE_TEST
108 Error("GetAnimInstance() not implemented");
109 return 0;
110#else
111 return 2;
112#endif
113 }

References Error().

◆ GetCurrentWeaponMode()

proto native owned string EntityAI::GetCurrentWeaponMode ( )
private

◆ GetDebugActions()

override void EntityAI::GetDebugActions ( out TSelectableActionInfoArrayEx outputList)
inlineprivate

Definition at line 154 of file Building.c.

155 {
156 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.BUILDING_OUTPUT_LOG, "Output Door Log", FadeColors.LIGHT_GREY));
157 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.SEPARATOR, " --- ", FadeColors.LIGHT_GREY));
158
159 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.BUILDING_PLAY_DOOR_SOUND, "Play Door Sound", FadeColors.LIGHT_GREY));
160 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.BUILDING_OPEN_DOOR, "Open Door", FadeColors.LIGHT_GREY));
161 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.BUILDING_CLOSE_DOOR, "Close Door", FadeColors.LIGHT_GREY));
162 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.BUILDING_LOCK_DOOR, "Lock Door", FadeColors.LIGHT_GREY));
163 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.BUILDING_UNLOCK_DOOR, "Unlock Door", FadeColors.LIGHT_GREY));
164 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.SEPARATOR, " --- ", FadeColors.LIGHT_GREY));
165
166 super.GetDebugActions(outputList);
167 }
Param4< int, int, string, int > TSelectableActionInfoWithColor
Definition EntityAI.c:97
EActions
Definition EActions.c:2
const int SAT_DEBUG_ACTION
Definition constants.c:424

References SAT_DEBUG_ACTION.

◆ GetDoorCount()

proto native int EntityAI::GetDoorCount ( )
private

Returns the number of the doors in the building.

◆ GetDoorIndex()

proto native int EntityAI::GetDoorIndex ( int componentIndex)
private

Gets the index of the door based on the view geometry component index.

◆ GetDoorSoundDistance()

proto native float EntityAI::GetDoorSoundDistance ( int index)
private

Audible distance for the door sound.

◆ GetDoorSoundPos()

proto native vector EntityAI::GetDoorSoundPos ( int index)
private

Position in world space for where the door sounds are played from.

◆ GetDrivingVehicle()

proto native EntityAI EntityAI::GetDrivingVehicle ( )
private

Returns vehicle which this Man object is driving. If this Man object isn't as driver of any vehicle it will return NULL.

◆ GetHumanInventory()

◆ GetIdentity()

proto native PlayerIdentity EntityAI::GetIdentity ( )
private

Returns player's identity.

◆ GetImpactSurfaceType()

string EntityAI::GetImpactSurfaceType ( IEntity other,
Contact impact )
inlineprotected

Definition at line 152 of file InventoryItem.c.

153 {
154 string surface;
155 int liquid = -1;
157 }
string GetImpactSurfaceTypeEx(IEntity other, Contact impact, out int liquid)

◆ GetImpactSurfaceTypeEx()

string EntityAI::GetImpactSurfaceTypeEx ( IEntity other,
Contact impact,
out int liquid )
inlineprotected

Definition at line 160 of file InventoryItem.c.

161 {
163 GetWorldBounds(mins, maxs);
164 vector size = maxs - mins;
165
166 vector add = impact.RelativeVelocityBefore.Normalized() * size.Length();
167 string surfaceImpact;
169 Object.Cast(other),
170 impact.Position + add,
171 impact.Position - add,
173 liquid))
174 return surfaceImpact;
175 string surface;
176 GetGame().SurfaceUnderObjectEx(this, surface, surfaceImpact, liquid);
177
178 return surfaceImpact;
179 }
static proto bool GetHitSurfaceAndLiquid(Object other, vector begPos, vector endPos, string surface, out int liquidType)

References GetGame(), and DayZPhysics::GetHitSurfaceAndLiquid().

◆ GetInputInterface()

proto native UAInterface EntityAI::GetInputInterface ( )
private

Returns player's input interface.

◆ GetInventoryItemType()

proto native InventoryItemType EntityAI::GetInventoryItemType ( )
private

◆ GetLadderPosBottom()

proto native vector EntityAI::GetLadderPosBottom ( int ladderIndex)
private

◆ GetLadderPosTop()

proto native vector EntityAI::GetLadderPosTop ( int ladderIndex)
private

◆ GetLaddersCount()

proto native int EntityAI::GetLaddersCount ( )
private

◆ GetMasterAttenuation()

proto native owned string EntityAI::GetMasterAttenuation ( )
private

◆ GetMeleeCombatData()

proto native MeleeCombatData EntityAI::GetMeleeCombatData ( )
private

◆ GetMeleeHeavyMode()

int EntityAI::GetMeleeHeavyMode ( )
inlineprivate

Definition at line 71 of file InventoryItem.c.

72 {
73 return 1;
74 }

◆ GetMeleeMode()

int EntityAI::GetMeleeMode ( )
inlineprivate

Definition at line 66 of file InventoryItem.c.

67 {
68 return 0;
69 }

◆ GetMeleeSprintMode()

int EntityAI::GetMeleeSprintMode ( )
inlineprivate

Definition at line 76 of file InventoryItem.c.

77 {
78 return 2;
79 }

◆ GetMeleeTargetType() [1/2]

override int EntityAI::GetMeleeTargetType ( )
inlineprivate

Definition at line 234 of file Building.c.

235 {
236 return EMeleeTargetType.NONALIGNABLE;
237 }
EMeleeTargetType

Referenced by DayZInfected::FightLogic().

◆ GetMeleeTargetType() [2/2]

override int EntityAI::GetMeleeTargetType ( )
inlineprivate

Definition at line 14 of file Transport.c.

15 {
16 return EMeleeTargetType.NONALIGNABLE;
17 }

◆ GetNearestDoorBySoundPos()

int EntityAI::GetNearestDoorBySoundPos ( vector position)
inlineprivate

Gets the nearest door based on the sound position (quick and dirty function for debugging)

Definition at line 66 of file Building.c.

67 {
68 float smallestDist = float.MAX;
69 int nearestDoor = -1;
70
71 int count = GetDoorCount();
72 for (int i = 0; i < count; i++)
73 {
75 if (dist < smallestDist)
76 {
77 nearestDoor = i;
79 }
80 }
81
82 return nearestDoor;
83 }
proto native int GetDoorCount()
Returns the number of the doors in the building.
proto native vector GetDoorSoundPos(int index)
Position in world space for where the door sounds are played from.
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.

References vector::DistanceSq().

◆ GetOnItemAddedToHands()

ScriptInvoker EntityAI::GetOnItemAddedToHands ( )
inlineprotected

Definition at line 72 of file Man.c.

73 {
76
78 }
ScriptInvoker Class provide list of callbacks usage:
Definition tools.c:116

References m_OnItemAddedToHands.

◆ GetOnItemRemovedFromHands()

ScriptInvoker EntityAI::GetOnItemRemovedFromHands ( )
inlineprotected

Definition at line 81 of file Man.c.

References m_OnItemRemovedFromHands.

◆ GetPlayerState()

int EntityAI::GetPlayerState ( )
inlineprivate

Definition at line 50 of file Man.c.

51 {
52 if (IsAlive())
53 return EPlayerStates.ALIVE;
54
55 return EPlayerStates.DEAD;
56 }
EPlayerStates

◆ GetRuinedMeleeAmmoType()

string EntityAI::GetRuinedMeleeAmmoType ( )
inlineprotected

returns ammo (projectile) used in melee if the item is destroyed. Override higher for specific use

Definition at line 182 of file InventoryItem.c.

183 {
184 return "MeleeSoft";
185 }

◆ GetSeatAnimationType()

int EntityAI::GetSeatAnimationType ( int posIdx)
inlineprotected

Definition at line 115 of file Transport.c.

116 {
117#ifndef CFGMODS_DEFINE_TEST
118 Error("GetSeatAnimationType() not implemented");
119#endif
120 return 0;
121 }

References Error().

◆ GetSeatIndexFromDoor()

int EntityAI::GetSeatIndexFromDoor ( string pDoorSelection)
inlineprotected

Definition at line 169 of file Transport.c.

170 {
171 //Potientially could be fixed some other way, currently follows the unfortunate pattern that CanReachDoorsFromSeat has created
172 switch (pDoorSelection)
173 {
174 case "DoorsDriver":
175 return 0;
176 break;
177 case "DoorsCoDriver":
178 return 1;
179 break;
180 case "DoorsCargo1":
181 return 2;
182 break;
183 case "DoorsCargo2":
184 return 3;
185 break;
186 }
187 return -1;
188 }

◆ GetTooltip()

string EntityAI::GetTooltip ( )
inlineprivate

Get tooltip text.

Definition at line 53 of file InventoryItem.c.

54 {
55 string temp;
56 if (!DescriptionOverride(temp))
57 temp = ConfigGetString("descriptionShort");
58 return temp;
59 }

◆ GetTransportCameraDistance()

float EntityAI::GetTransportCameraDistance ( )
inlineprivate

Definition at line 91 of file Transport.c.

92 {
93 return 4.0;
94 }

◆ GetTransportCameraOffset()

vector EntityAI::GetTransportCameraOffset ( )
inlineprotected

Definition at line 100 of file Transport.c.

101 {
102 return "0 1.3 0";
103 }

◆ HandleByCrewMemberState()

void EntityAI::HandleByCrewMemberState ( ECrewMemberState state)
protected

◆ HasCollisionsWithCharacter()

proto native bool EntityAI::HasCollisionsWithCharacter ( )
private

◆ HasFixedActionTargetCursorPosition()

override bool EntityAI::HasFixedActionTargetCursorPosition ( )
inlineprivate

Definition at line 43 of file Man.c.

44 {
45 return true;
46 }

◆ InitializeActions()

void EntityAI::InitializeActions ( )
inlineprivate

Definition at line 55 of file AdvancedCommunication.c.

56 {
59 {
62 SetActions();
64 }
65 }
map< typename, ref array< ActionBase_Basic > > TInputActionMap
string Type
static ref map< typename, ref TInputActionMap > m_AdvComTypeActionsMap

References m_AdvComTypeActionsMap, m_InputActionMap, SetActions(), and Type.

◆ InitImpactSoundData()

void EntityAI::InitImpactSoundData ( )
inlineprotected

Definition at line 114 of file InventoryItem.c.

115 {
116#ifndef SERVER
117 string soundImpactType = "default";
118 if (ConfigIsExisting("soundImpactType"))
119 soundImpactType = ConfigGetString("soundImpactType");
120
121 m_SoundImpactTable = AnimSoundLookupTableBank.GetInstance().GetImpactTable(soundImpactType + "_Impact_LookupTable");
122#endif
123 }
class AnimSoundObjectBuilderBank AnimSoundLookupTableBank()
SoundLookupTable m_SoundImpactTable

References AnimSoundLookupTableBank().

◆ InventoryItem()

void EntityAI::InventoryItem ( )
inlineprivate

Definition at line 33 of file InventoryItem.c.

34 {
36
37 if (ConfigIsExisting("isMeleeWeapon"))
38 m_IsMeleeWeapon = ConfigGetBool("isMeleeWeapon");
39 }
void InitImpactSoundData()
bool m_IsMeleeWeapon

◆ IsAnyCrewPresent()

bool EntityAI::IsAnyCrewPresent ( )
inlineprivate

Definition at line 80 of file Transport.c.

81 {
82 for (int index = 0; index < CrewSize(); ++index)
83 {
84 if (CrewMember(index) != null)
85 return true;
86 }
87
88 return false;
89 }
proto native Human CrewMember(int posIdx)
proto native int CrewSize()
Returns crew capacity of this vehicle.

◆ IsAreaAtDoorFree() [1/2]

bool EntityAI::IsAreaAtDoorFree ( int currentSeat,
float maxAllowedObjHeight,
inout vector extents,
out vector transform[4] )
inlineprotected

Definition at line 215 of file Transport.c.

216 {
217 GetTransform(transform);
218
222
223 vector entry[4];
224 entry[2] = crewDir;
225 entry[0] = vector.Up * crewDir;
226 entry[1] = entry[2] * entry[0];
227 entry[3] = crewPos;
228
230
233
234 position[1] = position[1] + maxAllowedObjHeight + (extents[1] * 0.5);
235
238
239 excluded.Insert(this);
240
241 GetGame().IsBoxColliding(position, orientation, extents, excluded, collided);
242
243 orientation.RotationMatrixFromAngles(transform);
244 transform[3] = position;
245
246 foreach (Object o : collided)
247 {
248 EntityAI e = EntityAI.Cast(o);
249 if (IsIgnoredObject(o))
250 continue;
251
252 vector minmax[2];
253 if (o.GetCollisionBox(minmax))
254 return false;
255 }
256
257 return true;
258 }
proto void CrewEntry(int posIdx, out vector pos, out vector dir)
Reads entry point and direction into vehicle on given position in model space.
bool IsIgnoredObject(Object o)
Definition Transport.c:190
static const vector Up
Definition EnConvert.c:107
static proto vector MatrixToAngles(vector mat[3])
Returns angles of rotation matrix.
static proto void MatrixMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Transforms matrix.

References GetGame(), Math3D::MatrixMultiply4(), Math3D::MatrixToAngles(), and vector::Up.

◆ IsAreaAtDoorFree() [2/2]

bool EntityAI::IsAreaAtDoorFree ( int currentSeat,
float maxAllowedObjHeight = 0.5,
float horizontalExtents = 0.5,
float playerHeight = 1.7 )
inlineprotected

Definition at line 260 of file Transport.c.

References Transport::IsAreaAtDoorFree().

◆ IsBuilding()

override bool EntityAI::IsBuilding ( )
inlineprivate

Definition at line 206 of file Building.c.

207 {
208 return true;
209 }

◆ IsCameraInsideVehicle()

proto native bool EntityAI::IsCameraInsideVehicle ( )
private

◆ IsDoorClosed()

proto native bool EntityAI::IsDoorClosed ( int index)
private

When the phase is at the close phase target (0.0)

◆ IsDoorClosing()

proto native bool EntityAI::IsDoorClosing ( int index)
private

When the wanted phase is at the close phase target (0.0)

◆ IsDoorLocked()

proto native bool EntityAI::IsDoorLocked ( int index)
private

When the door is locked.

◆ IsDoorOpen()

proto native bool EntityAI::IsDoorOpen ( int index)
private

When the door is requested to be fully open (animation wanted phase is greater than 0.5)

◆ IsDoorOpened()

proto native bool EntityAI::IsDoorOpened ( int index)
private

When the phase is at the open phase target (1.0)

◆ IsDoorOpenedAjar()

proto native bool EntityAI::IsDoorOpenedAjar ( int index)
private

When the phase is at the ajar phase target (0.2)

◆ IsDoorOpening()

proto native bool EntityAI::IsDoorOpening ( int index)
private

When the wanted phase is at the open phase target (1.0)

◆ IsDoorOpeningAjar()

proto native bool EntityAI::IsDoorOpeningAjar ( int index)
private

When the wanted phase is at the ajar phase target (0.2)

◆ IsHealthVisible() [1/3]

override bool EntityAI::IsHealthVisible ( )
inlineprivate

Definition at line 216 of file Building.c.

217 {
218 return false;
219 }

◆ IsHealthVisible() [2/3]

override bool EntityAI::IsHealthVisible ( )
inlineprivate

Definition at line 38 of file Man.c.

39 {
40 return false;
41 }

◆ IsHealthVisible() [3/3]

override bool EntityAI::IsHealthVisible ( )
inlineprivate

Definition at line 70 of file Transport.c.

71 {
72 return true;
73 }

◆ IsIgnoredByConstruction()

override bool EntityAI::IsIgnoredByConstruction ( )
inlineprivate

Definition at line 65 of file Transport.c.

66 {
67 return false;
68 }

◆ IsIgnoredObject()

bool EntityAI::IsIgnoredObject ( Object o)
inlineprotected

If the player can't interact (hint: collide) with the object, then it is ignored

Ignore any player that is currently in this vehicle

Definition at line 190 of file Transport.c.

191 {
192 if (!o)
193 return false;
194
198 if (!interacts)
199 return true;
200
202 if (Class.CastTo(player, o))
203 {
205 HumanCommandVehicle hcv = player.GetCommand_Vehicle();
206 if (hcv && hcv.GetTransport() == this)
207 return true;
208 }
209
210 EntityAI e = EntityAI.Cast(o);
211 // CanBeSkinned means it is a dead entity which should not block the door
212 return ((e && (e.IsZombie() || e.IsHologram())) || o.CanBeSkinned() || o.IsBush() || o.IsTree());
213 }
PhxInteractionLayers
Definition DayZPhysics.c:2
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
proto native bool dGetInteractionLayer(notnull IEntity worldEntity, int mask1, int mask2)
proto native int dBodyGetInteractionLayer(notnull IEntity ent)

References Class::CastTo(), dBodyGetInteractionLayer(), and dGetInteractionLayer().

◆ IsInTransport()

bool EntityAI::IsInTransport ( )
inlineprotected

returns true if man is in transport, false otherwise

Definition at line 907 of file Man.c.

908 {
909 return Transport.Cast(GetParent()) != null;
910 }
Base native class for all motorized wheeled vehicles.
Definition Car.c:75
proto native Widget GetParent()
Get parent of the Effect.
Definition Effect.c:389

References GetParent().

◆ IsInventoryItem()

override bool EntityAI::IsInventoryItem ( )
inlineprivate

Definition at line 61 of file InventoryItem.c.

62 {
63 return true;
64 }

◆ IsInventorySoftLocked()

bool EntityAI::IsInventorySoftLocked ( )
inlineprotected

Definition at line 899 of file Man.c.

900 {
901 return false;
902 }

◆ IsInventoryVisible()

override bool EntityAI::IsInventoryVisible ( )
inlineprivate

Definition at line 229 of file Building.c.

230 {
231 return false;
232 }

◆ IsMan()

◆ IsMeleeFinisher()

bool EntityAI::IsMeleeFinisher ( )
inlineprivate

Definition at line 86 of file InventoryItem.c.

87 {
88 return false;
89 }

◆ IsMeleeWeapon()

override bool EntityAI::IsMeleeWeapon ( )
inlineprivate

Definition at line 81 of file InventoryItem.c.

82 {
83 return m_IsMeleeWeapon;
84 }

◆ IsOn()

proto native bool EntityAI::IsOn ( )
private

Some inventoryItem devices can be switched on/off (radios, transmitters)

◆ IsSoundInsideBuilding()

proto native bool EntityAI::IsSoundInsideBuilding ( )
private

◆ IsSpeechRestricted()

proto native bool EntityAI::IsSpeechRestricted ( )
private

Check if player has resctricted speech.

◆ IsTransport()

override bool EntityAI::IsTransport ( )
inlineprivate

Definition at line 60 of file Transport.c.

61 {
62 return true;
63 }

◆ IsUnconscious()

bool EntityAI::IsUnconscious ( )
private

◆ JunctureDeleteItem()

void EntityAI::JunctureDeleteItem ( EntityAI item)
inlineprotected

Definition at line 830 of file Man.c.

831 {
832
833 }

◆ JunctureDropEntity()

bool EntityAI::JunctureDropEntity ( notnull EntityAI item)
inlineprotected

drop juncture

Definition at line 104 of file Man.c.

105 {
106 return DropEntityImpl(InventoryMode.JUNCTURE, this, item);
107 }
bool DropEntityImpl(InventoryMode mode, notnull EntityAI owner, notnull EntityAI item)
Definition Man.c:133

References DropEntityImpl().

Referenced by PredictiveDropEntity().

◆ JunctureForceSwapEntities()

bool EntityAI::JunctureForceSwapEntities ( notnull EntityAI item1,
notnull EntityAI item2,
notnull InventoryLocation item2_dst )
inlineprotected

ForceSwap juncture.

Definition at line 535 of file Man.c.

536 {
538 }
bool ForceSwapEntitiesImpl(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
Definition Man.c:566

References ForceSwapEntitiesImpl().

◆ JunctureSwapEntities()

bool EntityAI::JunctureSwapEntities ( notnull EntityAI item1,
notnull EntityAI item2 )
inlineprotected

swap juncture

Definition at line 487 of file Man.c.

488 {
489 return SwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2);
490 }
bool SwapEntitiesImpl(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2)
Definition Man.c:518

References SwapEntitiesImpl().

◆ JunctureTakeEntityAsAttachment()

bool EntityAI::JunctureTakeEntityAsAttachment ( notnull EntityAI item)
inlineprotected

as att juncture

Definition at line 409 of file Man.c.

410 {
412 }
bool TakeEntityAsAttachmentImpl(InventoryMode mode, notnull EntityAI item)
Definition Man.c:438

References TakeEntityAsAttachmentImpl().

Referenced by PredictiveTakeEntityAsAttachment().

◆ JunctureTakeEntityAsAttachmentEx()

bool EntityAI::JunctureTakeEntityAsAttachmentEx ( notnull EntityAI item,
int slot )
inlineprotected

as att ex juncture

Definition at line 448 of file Man.c.

449 {
450 return TakeEntityAsAttachmentExImpl(InventoryMode.JUNCTURE, item, slot);
451 }
bool TakeEntityAsAttachmentExImpl(InventoryMode mode, notnull EntityAI item, int slot)
Definition Man.c:477

References TakeEntityAsAttachmentExImpl().

Referenced by PredictiveTakeEntityAsAttachmentEx().

◆ JunctureTakeEntityToCargo()

bool EntityAI::JunctureTakeEntityToCargo ( notnull EntityAI item)
inlineprotected

to cgo juncture

Definition at line 370 of file Man.c.

371 {
372 return TakeEntityToCargoImpl(InventoryMode.JUNCTURE, item);
373 }
bool TakeEntityToCargoImpl(InventoryMode mode, notnull EntityAI item)
Definition Man.c:399

References TakeEntityToCargoImpl().

Referenced by PredictiveTakeEntityToCargo().

◆ JunctureTakeEntityToHands()

void EntityAI::JunctureTakeEntityToHands ( notnull EntityAI item)
inlineprotected

hand juncture

Definition at line 149 of file Man.c.

150 {
152 }
void TakeEntityToHandsImpl(InventoryMode mode, EntityAI item)
Definition Man.c:178

References TakeEntityToHandsImpl().

Referenced by PredictiveTakeEntityToHands().

◆ JunctureTakeEntityToInventory()

bool EntityAI::JunctureTakeEntityToInventory ( FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected

to inv juncture

Definition at line 331 of file Man.c.

332 {
333 return TakeEntityToInventoryImpl(InventoryMode.JUNCTURE, flags, item);
334 }
bool TakeEntityToInventoryImpl(InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item)
Definition Man.c:360

References TakeEntityToInventoryImpl().

Referenced by PredictiveTakeEntityToInventory().

◆ JunctureTakeEntityToTargetAttachment()

bool EntityAI::JunctureTakeEntityToTargetAttachment ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected

to target att juncture

Definition at line 752 of file Man.c.

753 {
755 }
bool TakeEntityToTargetAttachmentImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
Definition Man.c:781

References TakeEntityToTargetAttachmentImpl().

Referenced by PredictiveTakeEntityToTargetAttachment().

◆ JunctureTakeEntityToTargetAttachmentEx()

bool EntityAI::JunctureTakeEntityToTargetAttachmentEx ( notnull EntityAI target,
notnull EntityAI item,
int slot )
inlineprotected

to target att ex juncture

Definition at line 713 of file Man.c.

714 {
716 }
bool TakeEntityToTargetAttachmentExImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item, int slot)
Definition Man.c:742

References TakeEntityToTargetAttachmentExImpl().

Referenced by PredictiveTakeEntityToTargetAttachmentEx().

◆ JunctureTakeEntityToTargetCargo()

bool EntityAI::JunctureTakeEntityToTargetCargo ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected

to target cgo juncture

Definition at line 670 of file Man.c.

671 {
673 }
bool TakeEntityToTargetCargoImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
Definition Man.c:702

References TakeEntityToTargetCargoImpl().

Referenced by PredictiveTakeEntityToTargetCargo().

◆ JunctureTakeEntityToTargetCargoEx()

bool EntityAI::JunctureTakeEntityToTargetCargoEx ( notnull CargoBase cargo,
notnull EntityAI item,
int row,
int col )
inlineprotected

to target cgo ex juncture

Definition at line 631 of file Man.c.

632 {
634 }
bool TakeEntityToTargetCargoExImpl(InventoryMode mode, notnull CargoBase cargo, notnull EntityAI item, int row, int col)
Definition Man.c:660

References TakeEntityToTargetCargoExImpl().

Referenced by PredictiveTakeEntityToTargetCargoEx().

◆ JunctureTakeEntityToTargetInventory()

bool EntityAI::JunctureTakeEntityToTargetInventory ( notnull EntityAI target,
FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected

to target inv juncture

Definition at line 580 of file Man.c.

581 {
583 }
bool TakeEntityToTargetInventoryImpl(InventoryMode mode, notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
Definition Man.c:621

References TakeEntityToTargetInventoryImpl().

Referenced by PredictiveTakeEntityToTargetInventory().

◆ JunctureTakeToDst()

bool EntityAI::JunctureTakeToDst ( notnull InventoryLocation src,
notnull InventoryLocation dst )
inlineprotected

to dst juncture

Definition at line 791 of file Man.c.

792 {
793 return TakeToDstImpl(InventoryMode.JUNCTURE, src, dst);
794 }
bool TakeToDstImpl(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
Definition Man.c:820

References TakeToDstImpl().

Referenced by PredictiveTakeToDst().

◆ LocalDestroyEntityInHands()

void EntityAI::LocalDestroyEntityInHands ( )
inlineprotected

Definition at line 206 of file Man.c.

207 {
208 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Destroy IH=" + GetHumanInventory().GetEntityInHands());
211 }
override bool LocalDestroyEntity(notnull EntityAI item)

References GetDebugName(), GetHumanInventory(), LogManager::IsSyncLogEnable(), HumanInventory::LocalDestroyEntity(), syncDebugPrint(), and UpdateInventoryMenu().

◆ LocalDropEntity()

override bool EntityAI::LocalDropEntity ( notnull EntityAI item)
inlineprotected

Definition at line 123 of file Man.c.

124 {
125 return DropEntityImpl(InventoryMode.LOCAL, this, item);
126 }

References DropEntityImpl().

◆ LocalForceSwapEntities()

bool EntityAI::LocalForceSwapEntities ( notnull EntityAI item1,
notnull EntityAI item2,
notnull InventoryLocation item2_dst )
inlineprotected

Definition at line 556 of file Man.c.

557 {
559 }

References ForceSwapEntitiesImpl().

◆ LocalReplaceItemElsewhereWithNewInHands()

bool EntityAI::LocalReplaceItemElsewhereWithNewInHands ( ReplaceItemWithNewLambdaBase lambda)
inlineprotected

Definition at line 279 of file Man.c.

280 {
282 }
bool ReplaceItemElsewhereWithNewInHandsImpl(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
!hand replace -> hand
Definition Man.c:271

References ReplaceItemElsewhereWithNewInHandsImpl().

◆ LocalReplaceItemInHandsWithNew()

bool EntityAI::LocalReplaceItemInHandsWithNew ( ReplaceItemWithNewLambdaBase lambda)
inlineprotected

Definition at line 299 of file Man.c.

300 {
302 }
bool ReplaceItemInHandsWithNewImpl(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
hand replace
Definition Man.c:291

References ReplaceItemInHandsWithNewImpl().

◆ LocalReplaceItemInHandsWithNewElsewhere()

bool EntityAI::LocalReplaceItemInHandsWithNewElsewhere ( ReplaceItemWithNewLambdaBase lambda)
inlineprotected

Definition at line 319 of file Man.c.

320 {
322 }
bool ReplaceItemInHandsWithNewElsewhereImpl(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
hand replace2
Definition Man.c:311

References ReplaceItemInHandsWithNewElsewhereImpl().

◆ LocalReplaceItemWithNew()

bool EntityAI::LocalReplaceItemWithNew ( ReplaceItemWithNewLambdaBase lambda)
inlineprotected

Definition at line 259 of file Man.c.

260 {
262 }
bool ReplaceItemWithNewImpl(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
!hand -> !hand replace
Definition Man.c:251

References ReplaceItemWithNewImpl().

◆ LocalSwapEntities()

bool EntityAI::LocalSwapEntities ( notnull EntityAI item1,
notnull EntityAI item2 )
inlineprotected

Definition at line 508 of file Man.c.

509 {
511 }

References SwapEntitiesImpl().

◆ LocalTakeEntityAsAttachment()

override bool EntityAI::LocalTakeEntityAsAttachment ( notnull EntityAI item)
inlineprotected

Definition at line 428 of file Man.c.

429 {
431 }

References TakeEntityAsAttachmentImpl().

◆ LocalTakeEntityAsAttachmentEx()

override bool EntityAI::LocalTakeEntityAsAttachmentEx ( notnull EntityAI item,
int slot )
inlineprotected

Definition at line 467 of file Man.c.

468 {
470 }

References TakeEntityAsAttachmentExImpl().

◆ LocalTakeEntityToCargo()

override bool EntityAI::LocalTakeEntityToCargo ( notnull EntityAI item)
inlineprotected

Definition at line 389 of file Man.c.

390 {
392 }

References TakeEntityToCargoImpl().

◆ LocalTakeEntityToHands()

void EntityAI::LocalTakeEntityToHands ( EntityAI item)
inlineprotected

Definition at line 168 of file Man.c.

169 {
171 }

References TakeEntityToHandsImpl().

◆ LocalTakeEntityToInventory()

override bool EntityAI::LocalTakeEntityToInventory ( FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected

Definition at line 350 of file Man.c.

351 {
352 return TakeEntityToInventoryImpl(InventoryMode.LOCAL, flags, item);
353 }

References TakeEntityToInventoryImpl().

◆ LocalTakeEntityToTargetAttachment()

override bool EntityAI::LocalTakeEntityToTargetAttachment ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected

Definition at line 771 of file Man.c.

772 {
774 }

References TakeEntityToTargetAttachmentImpl().

◆ LocalTakeEntityToTargetAttachmentEx()

override bool EntityAI::LocalTakeEntityToTargetAttachmentEx ( notnull EntityAI target,
notnull EntityAI item,
int slot )
inlineprotected

Definition at line 732 of file Man.c.

733 {
735 }

References TakeEntityToTargetAttachmentExImpl().

◆ LocalTakeEntityToTargetCargo()

override bool EntityAI::LocalTakeEntityToTargetCargo ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected

Definition at line 689 of file Man.c.

690 {
692 }

References TakeEntityToTargetCargoImpl().

◆ LocalTakeEntityToTargetCargoEx()

override bool EntityAI::LocalTakeEntityToTargetCargoEx ( notnull CargoBase cargo,
notnull EntityAI item,
int row,
int col )
inlineprotected

Definition at line 650 of file Man.c.

651 {
653 }

References TakeEntityToTargetCargoExImpl().

◆ LocalTakeEntityToTargetInventory()

override bool EntityAI::LocalTakeEntityToTargetInventory ( notnull EntityAI target,
FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected

Definition at line 616 of file Man.c.

617 {
619 }

References TakeEntityToTargetInventoryImpl().

◆ LocalTakeToDst()

override bool EntityAI::LocalTakeToDst ( notnull InventoryLocation src,
notnull InventoryLocation dst )
inlineprotected

Definition at line 810 of file Man.c.

811 {
812 return TakeToDstImpl(InventoryMode.LOCAL, src, dst);
813 }

References TakeToDstImpl().

Referenced by DropNonUsableMaterialsServer().

◆ LockDoor()

proto native void EntityAI::LockDoor ( int index,
bool force = false )
private

Locks the door if not already locked, resets the door health. 'force = true' will close the door if open.

◆ Man()

void EntityAI::Man ( )
inlineprivate

Definition at line 28 of file Man.c.

29 {
30 SetFlags(EntityFlags.TOUCHTRIGGERS, false);
31 }
proto native void SetFlags(ShapeFlags flags)
EntityFlags
Entity flags.
Definition EnEntity.c:114

References SetFlags().

◆ MarkCrewMemberDead()

void EntityAI::MarkCrewMemberDead ( int crewMemberIndex)
private

◆ MarkCrewMemberUnconscious()

void EntityAI::MarkCrewMemberUnconscious ( int crewMemberIndex)
private

◆ NeedInventoryJunctureFromServer()

◆ OnAction()

override bool EntityAI::OnAction ( int action_id,
Man player,
ParamsReadContext ctx )
inlineprivate

Definition at line 169 of file Building.c.

170 {
171 if (super.OnAction(action_id, player, ctx))
172 return true;
173
174 switch (action_id)
175 {
176 case EActions.BUILDING_PLAY_DOOR_SOUND:
178 return true;
179 }
180
181 if (!GetGame().IsServer())
182 return false;
183
184 switch (action_id)
185 {
186 case EActions.BUILDING_OUTPUT_LOG:
188 return true;
189 case EActions.BUILDING_OPEN_DOOR:
191 return true;
192 case EActions.BUILDING_CLOSE_DOOR:
194 return true;
195 case EActions.BUILDING_LOCK_DOOR:
197 return true;
198 case EActions.BUILDING_UNLOCK_DOOR:
200 return true;
201 }
202
203 return false;
204 }
proto native void CloseDoor(int index)
Attempts to close the door.
int GetNearestDoorBySoundPos(vector position)
Gets the nearest door based on the sound position (quick and dirty function for debugging)
Definition Building.c:66
proto native void UnlockDoor(int index)
Unlocks the door if locked.
proto native void OpenDoor(int index)
Attempts to open the door.
proto native void LockDoor(int index, bool force=false)
Locks the door if not already locked, resets the door health. 'force = true' will close the door if o...
proto native void OutputDoorLog()
Requires special build as logging is disabled even on internal builds due to memory usage....
proto native void PlayDoorSound(int index)
Plays the appropriate sound at the door, based on animation phase and state.

References GetGame().

◆ OnDoorCloseFinish()

void EntityAI::OnDoorCloseFinish ( DoorFinishParams params)
inlineprivate

Event for when the door finishes closing.

Definition at line 111 of file Building.c.

112 {
113 }

◆ OnDoorCloseStart()

void EntityAI::OnDoorCloseStart ( DoorStartParams params)
inlineprivate

Event for when the door starts closing.

Definition at line 106 of file Building.c.

107 {
108 }

◆ OnDoorLocked()

void EntityAI::OnDoorLocked ( DoorLockParams params)
inlineprivate

Event for when the door is locked.

Definition at line 116 of file Building.c.

117 {
118 }

◆ OnDoorOpenAjarFinish()

void EntityAI::OnDoorOpenAjarFinish ( DoorFinishParams params)
inlineprivate

Event for when the door finishes opening ajarred (usually after unlock)

Definition at line 101 of file Building.c.

102 {
103 }

◆ OnDoorOpenAjarStart()

void EntityAI::OnDoorOpenAjarStart ( DoorStartParams params)
inlineprivate

Event for when the door starts opening ajarred (usually after unlock)

Definition at line 96 of file Building.c.

97 {
98 }

◆ OnDoorOpenFinish()

void EntityAI::OnDoorOpenFinish ( DoorFinishParams params)
inlineprivate

Event for when the door finishes opening.

Definition at line 91 of file Building.c.

92 {
93 }

◆ OnDoorOpenStart()

void EntityAI::OnDoorOpenStart ( DoorStartParams params)
inlineprivate

Event for when the door starts opening.

Definition at line 86 of file Building.c.

87 {
88 }

◆ OnDoorUnlocked()

void EntityAI::OnDoorUnlocked ( DoorLockParams params)
inlineprivate

Event for when the door is unlocked.

Definition at line 121 of file Building.c.

122 {
123 }

◆ OnGameplayDataHandlerSync()

void EntityAI::OnGameplayDataHandlerSync ( )
protected

◆ OnItemInHandsChanged()

void EntityAI::OnItemInHandsChanged ( )
inlineprotected

Definition at line 144 of file Man.c.

144{ }

◆ OnRightClick()

void EntityAI::OnRightClick ( )
inlineprivate

Definition at line 42 of file InventoryItem.c.

43 {
44
45 }

◆ OnUseFromInventory()

event bool EntityAI::OnUseFromInventory ( Man owner)
inlineprivate

Definition at line 47 of file InventoryItem.c.

48 {
49 return false;
50 }

◆ OpenDoor()

proto native void EntityAI::OpenDoor ( int index)
private

Attempts to open the door.

◆ OutputDoorLog()

proto native void EntityAI::OutputDoorLog ( )
private

Requires special build as logging is disabled even on internal builds due to memory usage. Used for checking of possible causes of navmesh desync.

◆ PhysicalPredictiveDropItem()

bool EntityAI::PhysicalPredictiveDropItem ( EntityAI entity,
bool heavy_item_only = true )
protected

◆ PlayDoorSound()

proto native void EntityAI::PlayDoorSound ( int index)
private

Plays the appropriate sound at the door, based on animation phase and state.

◆ PlayImpactSound()

void EntityAI::PlayImpactSound ( float weight,
float velocity,
int surfaceHash )
inlineprivate

Definition at line 92 of file InventoryItem.c.

93 {
95 return;
96
98 if (soundBuilder != null)
99 {
100 soundBuilder.AddVariable("weight", weight);
101 soundBuilder.AddVariable("speed", velocity);
102 soundBuilder.AddEnvSoundVariables(GetPosition());
103
104 SoundObject soundObject = soundBuilder.BuildSoundObject();
105 if (soundObject != null)
106 {
107 soundObject.SetKind(WaveKind.WAVEEFFECTEX);
109 }
110 }
111 }
void PlaySound()
WaveKind
Definition Sound.c:2
class SoundObjectBuilder SoundObject(SoundParams soundParams)
class JsonUndergroundAreaTriggerData GetPosition
SoundObjectBuilder GetSoundBuilder(int parameterHash)

References GetPosition, SoundLookupTable::GetSoundBuilder(), PlaySound(), and SoundObject().

◆ PlaySound()

AbstractWave EntityAI::PlaySound ( SoundObject so,
SoundObjectBuilder sob )
inlineprotected

Definition at line 126 of file InventoryItem.c.

127 {
128 if (so == null)
129 return null;
130
131 so.SetPosition(GetPosition());
132 AbstractWave wave = GetGame().GetSoundScene().Play3D(so, sob);
133
134 return wave;
135 }

References GetGame(), and GetPosition.

◆ PlaySoundByAnimEvent()

void EntityAI::PlaySoundByAnimEvent ( EAnimSoundEventID id)
inlineprotected

Definition at line 138 of file InventoryItem.c.

139 {
140 AnimSoundEvent soundEvent = GetInventoryItemType().GetSoundEvent(id);
141 if (soundEvent)
142 {
143 SoundObjectBuilder builder = soundEvent.GetSoundBuilder();
144 SoundObject soundObject = builder.BuildSoundObject();
145 if (soundObject)
147 }
148 }
proto native InventoryItemType GetInventoryItemType()

References PlaySound(), and SoundObject().

◆ PredictiveDropEntity()

override bool EntityAI::PredictiveDropEntity ( notnull EntityAI item)
inlineprotected

Definition at line 109 of file Man.c.

110 {
112 {
113 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveDropEntity input data not sent yet, cannot allow another input action");
114 return false;
115 }
116
117 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
118 return JunctureDropEntity(item);
119 else
120 return DropEntityImpl(InventoryMode.PREDICTIVE, this, item);
121 }
bool JunctureDropEntity(notnull EntityAI item)
drop juncture
Definition Man.c:104
bool NeedInventoryJunctureFromServer(notnull EntityAI item, EntityAI currParent, EntityAI newParent)
Definition Man.c:146
proto static native bool CanStoreInputUserData()
proto void Print(void var)
Prints content of variable to console/log.

References ScriptInputUserData::CanStoreInputUserData(), DropEntityImpl(), JunctureDropEntity(), NeedInventoryJunctureFromServer(), and Print().

◆ PredictiveForceSwapEntities()

bool EntityAI::PredictiveForceSwapEntities ( notnull EntityAI item1,
notnull EntityAI item2,
notnull InventoryLocation item2_dst )
inlineprotected

Definition at line 540 of file Man.c.

541 {
543 {
544 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveForceSwapEntities input data not sent yet, cannot allow another input action");
545 return false;
546 }
547
548 bool need_j1 = NeedInventoryJunctureFromServer(item1, item1.GetHierarchyParent(), item2.GetHierarchyParent());
549 bool need_j2 = NeedInventoryJunctureFromServer(item2, item2.GetHierarchyParent(), item1.GetHierarchyParent());
550 if (need_j1 || need_j2)
552 else
554 }

References ScriptInputUserData::CanStoreInputUserData(), ForceSwapEntitiesImpl(), NeedInventoryJunctureFromServer(), and Print().

◆ PredictiveMoveItemFromHandsToInventory()

void EntityAI::PredictiveMoveItemFromHandsToInventory ( )
inlineprotected

returns item to previous location, if available

Definition at line 213 of file Man.c.

214 {
215 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Stash IH=" + GetHumanInventory().GetEntityInHands());
217 {
218 Print("[inv] PredictiveMoveItemFromHandsToInventory input data not sent yet, cannot allow another input action");
219 return;
220 }
221
223
224 if (NeedInventoryJunctureFromServer(GetHumanInventory().GetEntityInHands(), this, this))
225 invMode = InventoryMode.JUNCTURE;
226
228 if (GetHumanInventory().GetEntityInHands().m_OldLocation && GetHumanInventory().GetEntityInHands().m_OldLocation.IsValid())
229 {
231 GetHumanInventory().GetEntityInHands().GetInventory().GetCurrentInventoryLocation(invLoc);
232 //old location is somewhere on player
233 if (GetHumanInventory().GetEntityInHands().m_OldLocation.GetParent() && GetHumanInventory().GetEntityInHands().m_OldLocation.GetParent().GetHierarchyRootPlayer())
234 {
235 if (GetHumanInventory().LocationCanMoveEntity(invLoc, GetHumanInventory().GetEntityInHands().m_OldLocation))
236 {
237 if (GetHumanInventory().TakeToDst(invMode, invLoc, GetHumanInventory().GetEntityInHands().m_OldLocation))
238 {
240 return;
241 }
242 }
243 }
244 }
245
248 }
override bool TakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
FindInventoryLocationType
flags for searching locations in inventory
proto native EntityAI GetEntityInHands()
override bool TakeEntityToInventory(InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item)
InventoryLocation.

References ScriptInputUserData::CanStoreInputUserData(), GetDebugName(), HumanInventory::GetEntityInHands(), GetHumanInventory(), LogManager::IsSyncLogEnable(), NeedInventoryJunctureFromServer(), Print(), syncDebugPrint(), HumanInventory::TakeEntityToInventory(), TakeToDst(), and UpdateInventoryMenu().

◆ PredictiveSwapEntities()

bool EntityAI::PredictiveSwapEntities ( notnull EntityAI item1,
notnull EntityAI item2 )
inlineprotected

Definition at line 492 of file Man.c.

493 {
495 {
496 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveSwapEntities input data not sent yet, cannot allow another input action");
497 return false;
498 }
499
500 bool need_j1 = NeedInventoryJunctureFromServer(item1, item1.GetHierarchyParent(), item2.GetHierarchyParent());
501 bool need_j2 = NeedInventoryJunctureFromServer(item2, item2.GetHierarchyParent(), item1.GetHierarchyParent());
502 if (need_j1 || need_j2)
503 return SwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2);
504 else
505 return SwapEntitiesImpl(InventoryMode.PREDICTIVE, item1, item2);
506 }

References ScriptInputUserData::CanStoreInputUserData(), NeedInventoryJunctureFromServer(), Print(), and SwapEntitiesImpl().

Referenced by PredictiveTakeOrSwapAttachment().

◆ PredictiveTakeEntityAsAttachment()

override bool EntityAI::PredictiveTakeEntityAsAttachment ( notnull EntityAI item)
inlineprotected

Definition at line 414 of file Man.c.

415 {
417 {
418 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityAsAttachment input data not sent yet, cannot allow another input action");
419 return false;
420 }
421
422 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
424 else
426 }
bool JunctureTakeEntityAsAttachment(notnull EntityAI item)
as att juncture
Definition Man.c:409

References ScriptInputUserData::CanStoreInputUserData(), JunctureTakeEntityAsAttachment(), NeedInventoryJunctureFromServer(), Print(), and TakeEntityAsAttachmentImpl().

Referenced by PredictiveTakeOrSwapAttachment().

◆ PredictiveTakeEntityAsAttachmentEx()

override bool EntityAI::PredictiveTakeEntityAsAttachmentEx ( notnull EntityAI item,
int slot )
inlineprotected

Definition at line 453 of file Man.c.

454 {
456 {
457 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityAsAttachmentEx input data not sent yet, cannot allow another input action");
458 return false;
459 }
460
461 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
463 else
464 return TakeEntityAsAttachmentExImpl(InventoryMode.PREDICTIVE, item, slot);
465 }
bool JunctureTakeEntityAsAttachmentEx(notnull EntityAI item, int slot)
as att ex juncture
Definition Man.c:448

References ScriptInputUserData::CanStoreInputUserData(), JunctureTakeEntityAsAttachmentEx(), NeedInventoryJunctureFromServer(), Print(), and TakeEntityAsAttachmentExImpl().

◆ PredictiveTakeEntityToCargo()

override bool EntityAI::PredictiveTakeEntityToCargo ( notnull EntityAI item)
inlineprotected

Definition at line 375 of file Man.c.

376 {
378 {
379 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityToCargo input data not sent yet, cannot allow another input action");
380 return false;
381 }
382
383 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
385 else
386 return TakeEntityToCargoImpl(InventoryMode.PREDICTIVE, item);
387 }
bool JunctureTakeEntityToCargo(notnull EntityAI item)
to cgo juncture
Definition Man.c:370

References ScriptInputUserData::CanStoreInputUserData(), JunctureTakeEntityToCargo(), NeedInventoryJunctureFromServer(), Print(), and TakeEntityToCargoImpl().

◆ PredictiveTakeEntityToHands()

void EntityAI::PredictiveTakeEntityToHands ( EntityAI item)
inlineprotected

Definition at line 154 of file Man.c.

155 {
157 {
158 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityToHands input data not sent yet, cannot allow another input action");
159 return;
160 }
161
162 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
164 else
166 }
void JunctureTakeEntityToHands(notnull EntityAI item)
hand juncture
Definition Man.c:149

References ScriptInputUserData::CanStoreInputUserData(), JunctureTakeEntityToHands(), NeedInventoryJunctureFromServer(), Print(), and TakeEntityToHandsImpl().

◆ PredictiveTakeEntityToInventory()

override bool EntityAI::PredictiveTakeEntityToInventory ( FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected

Definition at line 336 of file Man.c.

337 {
339 {
340 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityToInventory input data not sent yet, cannot allow another input action");
341 return false;
342 }
343
344 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
345 return JunctureTakeEntityToInventory(flags, item);
346 else
347 return TakeEntityToInventoryImpl(InventoryMode.PREDICTIVE, flags, item);
348 }
bool JunctureTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
to inv juncture
Definition Man.c:331

References ScriptInputUserData::CanStoreInputUserData(), JunctureTakeEntityToInventory(), NeedInventoryJunctureFromServer(), Print(), and TakeEntityToInventoryImpl().

◆ PredictiveTakeEntityToTargetAttachment()

override bool EntityAI::PredictiveTakeEntityToTargetAttachment ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected

Definition at line 757 of file Man.c.

758 {
760 {
761 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityToTargetAttachment input data not sent yet, cannot allow another input action");
762 return false;
763 }
764
765 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), target))
767 else
769 }
bool JunctureTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
to target att juncture
Definition Man.c:752

References ScriptInputUserData::CanStoreInputUserData(), JunctureTakeEntityToTargetAttachment(), NeedInventoryJunctureFromServer(), Print(), and TakeEntityToTargetAttachmentImpl().

◆ PredictiveTakeEntityToTargetAttachmentEx()

override bool EntityAI::PredictiveTakeEntityToTargetAttachmentEx ( notnull EntityAI target,
notnull EntityAI item,
int slot )
inlineprotected

Definition at line 718 of file Man.c.

719 {
721 {
722 Print("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::PredictiveTakeEntityToTargetAttachmentEx input data not sent yet, cannot allow another input action");
723 return false;
724 }
725
726 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), target))
728 else
730 }
bool JunctureTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
to target att ex juncture
Definition Man.c:713

References ScriptInputUserData::CanStoreInputUserData(), GetDebugName(), JunctureTakeEntityToTargetAttachmentEx(), NeedInventoryJunctureFromServer(), Print(), and TakeEntityToTargetAttachmentExImpl().

◆ PredictiveTakeEntityToTargetCargo()

override bool EntityAI::PredictiveTakeEntityToTargetCargo ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected

Definition at line 675 of file Man.c.

676 {
678 {
679 Print("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::PredictiveTakeEntityToTargetCargo input data not sent yet, cannot allow another input action");
680 return false;
681 }
682
683 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), target))
685 else
687 }
bool JunctureTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
to target cgo juncture
Definition Man.c:670

References ScriptInputUserData::CanStoreInputUserData(), GetDebugName(), JunctureTakeEntityToTargetCargo(), NeedInventoryJunctureFromServer(), Print(), and TakeEntityToTargetCargoImpl().

◆ PredictiveTakeEntityToTargetCargoEx()

override bool EntityAI::PredictiveTakeEntityToTargetCargoEx ( notnull CargoBase cargo,
notnull EntityAI item,
int row,
int col )
inlineprotected

Definition at line 636 of file Man.c.

637 {
639 {
640 Print("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::PredictiveTakeEntityToTargetCargoEx input data not sent yet, cannot allow another input action");
641 return false;
642 }
643
644 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), cargo.GetCargoOwner()))
646 else
648 }
bool JunctureTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
to target cgo ex juncture
Definition Man.c:631

References ScriptInputUserData::CanStoreInputUserData(), GetDebugName(), JunctureTakeEntityToTargetCargoEx(), NeedInventoryJunctureFromServer(), Print(), and TakeEntityToTargetCargoExImpl().

◆ PredictiveTakeEntityToTargetInventory()

override bool EntityAI::PredictiveTakeEntityToTargetInventory ( notnull EntityAI target,
FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected

Definition at line 585 of file Man.c.

586 {
588 {
589 Print("[inv] " + GetSimulationTimeStamp() + " ::PredictiveTakeEntityToTargetInventory input data not sent yet, cannot allow another input action");
590 return false;
591 }
592
593 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), target))
595 else
596 return TakeEntityToTargetInventoryImpl(InventoryMode.PREDICTIVE, target, flags, item);
597 }
bool JunctureTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
to target inv juncture
Definition Man.c:580

References ScriptInputUserData::CanStoreInputUserData(), JunctureTakeEntityToTargetInventory(), NeedInventoryJunctureFromServer(), Print(), and TakeEntityToTargetInventoryImpl().

◆ PredictiveTakeOrSwapAttachment()

bool EntityAI::PredictiveTakeOrSwapAttachment ( notnull EntityAI item)
inlineprotected

Definition at line 599 of file Man.c.

600 {
601 if (GetInventory().CanAddAttachment(item))
603 else
604 {
605 for (int i = 0; i < item.GetInventory().GetSlotIdCount(); i++)
606 {
607 int slot_id = item.GetInventory().GetSlotId(i);
608 EntityAI slot_item = GetInventory().FindAttachment(slot_id);
609 if (slot_item && GetInventory().CanSwapEntitiesEx(item, slot_item))
611 }
612 }
613 return false;
614 }
override bool PredictiveTakeEntityAsAttachment(notnull EntityAI item)
Definition Man.c:414
bool PredictiveSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
Definition Man.c:492

References PredictiveSwapEntities(), and PredictiveTakeEntityAsAttachment().

◆ PredictiveTakeToDst()

override bool EntityAI::PredictiveTakeToDst ( notnull InventoryLocation src,
notnull InventoryLocation dst )
inlineprotected

Definition at line 796 of file Man.c.

797 {
799 {
800 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeToDst input data not sent yet, cannot allow another input action");
801 return false;
802 }
803
804 if (NeedInventoryJunctureFromServer(src.GetItem(), src.GetParent(), dst.GetParent()))
805 return JunctureTakeToDst(src, dst);
806 else
807 return TakeToDstImpl(InventoryMode.PREDICTIVE, src, dst);
808 }
bool JunctureTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
to dst juncture
Definition Man.c:791

References ScriptInputUserData::CanStoreInputUserData(), JunctureTakeToDst(), NeedInventoryJunctureFromServer(), Print(), and TakeToDstImpl().

◆ ProcessImpactSound()

float EntityAI::ProcessImpactSound ( IEntity other,
Contact extra,
float weight,
out int surfaceHash )
inlineprotected

Definition at line 188 of file InventoryItem.c.

189 {
190 int liquidType = -1;
192 }
float ProcessImpactSoundEx(IEntity other, Contact extra, float weight, out int surfaceHash, out int liquidType)

◆ ProcessImpactSoundEx()

float EntityAI::ProcessImpactSoundEx ( IEntity other,
Contact extra,
float weight,
out int surfaceHash,
out int liquidType )
inlineprotected

Definition at line 196 of file InventoryItem.c.

197 {
198 float impactVelocity = extra.RelativeVelocityBefore.Length();
199 if (impactVelocity < 0.3)
200 return 0.0;
201
202 float tickTime = GetGame().GetTickTime();
204 return 0.0;
205
207 if (surfaceName == "")
208 return 0.0;
209
210#ifdef DIAG_DEVELOPER
211 string infoText = "Surface: " + surfaceName + ", Weight: " + weight + ", Speed: " + impactVelocity;
212
213 if (s_ImpactSoundsInfo.Count() == 10)
214 s_ImpactSoundsInfo.Remove(9);
215
216 s_ImpactSoundsInfo.InsertAt(infoText, 0);
217#endif
218
220
221 surfaceHash = surfaceName.Hash();
222 return impactVelocity;
223 }
const float SOUND_CONTACT_SKIP
float m_SoundContactTickTime

References GetGame().

◆ RemoveAction()

void EntityAI::RemoveAction ( typename actionName )
inlineprivate

Definition at line 115 of file AdvancedCommunication.c.

116 {
118 ActionBase action = player.GetActionManager().GetAction(actionName);
119 typename ai = action.GetInputType();
121
122 if (action_array)
123 action_array.RemoveItem(action);
124 }

References GetGame(), GetPlayer(), and m_InputActionMap.

◆ ReplaceItemElsewhereWithNewInHandsImpl()

bool EntityAI::ReplaceItemElsewhereWithNewInHandsImpl ( InventoryMode mode,
ReplaceItemWithNewLambdaBase lambda )
inlineprotected

!hand replace -> hand

Definition at line 271 of file Man.c.

272 {
273 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Replace !HND->HND lambda=" + lambda.DumpToString());
276 return code;
277 }
bool ReplaceItemElsewhereWithNewInHands(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)

References GetDebugName(), GetHumanInventory(), LogManager::IsSyncLogEnable(), HumanInventory::ReplaceItemElsewhereWithNewInHands(), syncDebugPrint(), and UpdateInventoryMenu().

Referenced by LocalReplaceItemElsewhereWithNewInHands(), and ServerReplaceItemElsewhereWithNewInHands().

◆ ReplaceItemInHandsWithNewElsewhereImpl()

bool EntityAI::ReplaceItemInHandsWithNewElsewhereImpl ( InventoryMode mode,
ReplaceItemWithNewLambdaBase lambda )
inlineprotected

hand replace2

Definition at line 311 of file Man.c.

312 {
313 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Replace HND->elsewhere lambda=" + lambda.DumpToString());
316 return code;
317 }
bool ReplaceItemInHandsWithNewElsewhere(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)

References GetDebugName(), GetHumanInventory(), LogManager::IsSyncLogEnable(), HumanInventory::ReplaceItemInHandsWithNewElsewhere(), syncDebugPrint(), and UpdateInventoryMenu().

Referenced by LocalReplaceItemInHandsWithNewElsewhere(), and ServerReplaceItemInHandsWithNewElsewhere().

◆ ReplaceItemInHandsWithNewImpl()

bool EntityAI::ReplaceItemInHandsWithNewImpl ( InventoryMode mode,
ReplaceItemWithNewLambdaBase lambda )
inlineprotected

hand replace

Definition at line 291 of file Man.c.

292 {
293 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Replace HND->HND lambda=" + lambda.DumpToString());
296 return code;
297 }
bool ReplaceItemInHandsWithNew(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)

References GetDebugName(), GetHumanInventory(), LogManager::IsSyncLogEnable(), HumanInventory::ReplaceItemInHandsWithNew(), syncDebugPrint(), and UpdateInventoryMenu().

Referenced by LocalReplaceItemInHandsWithNew(), and ServerReplaceItemInHandsWithNew().

◆ ReplaceItemWithNewImpl()

bool EntityAI::ReplaceItemWithNewImpl ( InventoryMode mode,
ReplaceItemWithNewLambdaBase lambda )
inlineprotected

!hand -> !hand replace

Definition at line 251 of file Man.c.

252 {
253 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Replace !HND lambda=" + lambda.DumpToString());
256 return code;
257 }
override bool ReplaceItemWithNew(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)

References GetDebugName(), GetHumanInventory(), LogManager::IsSyncLogEnable(), HumanInventory::ReplaceItemWithNew(), syncDebugPrint(), and UpdateInventoryMenu().

Referenced by LocalReplaceItemWithNew(), and ServerReplaceItemWithNew().

◆ ServerDropEntity()

override bool EntityAI::ServerDropEntity ( notnull EntityAI item)
inlineprotected

Definition at line 128 of file Man.c.

129 {
130 return DropEntityImpl(InventoryMode.SERVER, this, item);
131 }

References DropEntityImpl().

◆ ServerForceSwapEntities()

bool EntityAI::ServerForceSwapEntities ( notnull EntityAI item1,
notnull EntityAI item2,
notnull InventoryLocation item2_dst )
inlineprotected

Definition at line 561 of file Man.c.

562 {
564 }

References ForceSwapEntitiesImpl().

◆ ServerReplaceItemElsewhereWithNewInHands()

bool EntityAI::ServerReplaceItemElsewhereWithNewInHands ( ReplaceItemWithNewLambdaBase lambda)
inlineprotected

Definition at line 284 of file Man.c.

References ReplaceItemElsewhereWithNewInHandsImpl().

◆ ServerReplaceItemInHandsWithNew()

bool EntityAI::ServerReplaceItemInHandsWithNew ( ReplaceItemWithNewLambdaBase lambda)
inlineprotected

Definition at line 304 of file Man.c.

305 {
307 }

References ReplaceItemInHandsWithNewImpl().

◆ ServerReplaceItemInHandsWithNewElsewhere()

bool EntityAI::ServerReplaceItemInHandsWithNewElsewhere ( ReplaceItemWithNewLambdaBase lambda)
inlineprotected

Definition at line 324 of file Man.c.

References ReplaceItemInHandsWithNewElsewhereImpl().

◆ ServerReplaceItemWithNew()

bool EntityAI::ServerReplaceItemWithNew ( ReplaceItemWithNewLambdaBase lambda)
inlineprotected

Definition at line 264 of file Man.c.

265 {
267 }

References ReplaceItemWithNewImpl().

◆ ServerSwapEntities()

bool EntityAI::ServerSwapEntities ( notnull EntityAI item1,
notnull EntityAI item2 )
inlineprotected

Definition at line 513 of file Man.c.

514 {
515 return SwapEntitiesImpl(InventoryMode.SERVER, item1, item2);
516 }

References SwapEntitiesImpl().

◆ ServerTakeEntityAsAttachment()

override bool EntityAI::ServerTakeEntityAsAttachment ( notnull EntityAI item)
inlineprotected

Definition at line 433 of file Man.c.

434 {
436 }

References TakeEntityAsAttachmentImpl().

◆ ServerTakeEntityAsAttachmentEx()

override bool EntityAI::ServerTakeEntityAsAttachmentEx ( notnull EntityAI item,
int slot )
inlineprotected

Definition at line 472 of file Man.c.

473 {
474 return TakeEntityAsAttachmentExImpl(InventoryMode.SERVER, item, slot);
475 }

References TakeEntityAsAttachmentExImpl().

◆ ServerTakeEntityToCargo()

override bool EntityAI::ServerTakeEntityToCargo ( notnull EntityAI item)
inlineprotected

Definition at line 394 of file Man.c.

395 {
397 }

References TakeEntityToCargoImpl().

◆ ServerTakeEntityToHands()

void EntityAI::ServerTakeEntityToHands ( EntityAI item)
inlineprotected

Definition at line 173 of file Man.c.

174 {
176 }

References TakeEntityToHandsImpl().

◆ ServerTakeEntityToInventory()

override bool EntityAI::ServerTakeEntityToInventory ( FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected

Definition at line 355 of file Man.c.

356 {
357 return TakeEntityToInventoryImpl(InventoryMode.SERVER, flags, item);
358 }

References TakeEntityToInventoryImpl().

◆ ServerTakeEntityToTargetAttachment()

override bool EntityAI::ServerTakeEntityToTargetAttachment ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected

Definition at line 776 of file Man.c.

777 {
779 }

References TakeEntityToTargetAttachmentImpl().

◆ ServerTakeEntityToTargetAttachmentEx()

override bool EntityAI::ServerTakeEntityToTargetAttachmentEx ( notnull EntityAI target,
notnull EntityAI item,
int slot )
inlineprotected

Definition at line 737 of file Man.c.

738 {
740 }

References TakeEntityToTargetAttachmentExImpl().

◆ ServerTakeEntityToTargetCargo()

override bool EntityAI::ServerTakeEntityToTargetCargo ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected

Definition at line 694 of file Man.c.

695 {
696 if (IsAlive())
698 else
700 }

References TakeEntityToTargetCargoImpl().

◆ ServerTakeEntityToTargetCargoEx()

override bool EntityAI::ServerTakeEntityToTargetCargoEx ( notnull CargoBase cargo,
notnull EntityAI item,
int row,
int col )
inlineprotected

Definition at line 655 of file Man.c.

656 {
658 }

References TakeEntityToTargetCargoExImpl().

◆ ServerTakeToDst()

override bool EntityAI::ServerTakeToDst ( notnull InventoryLocation src,
notnull InventoryLocation dst )
inlineprotected

Definition at line 815 of file Man.c.

816 {
817 return TakeToDstImpl(InventoryMode.SERVER, src, dst);
818 }

References TakeToDstImpl().

Referenced by DropNonUsableMaterialsServer().

◆ SetActions()

◆ SetFaceMaterial()

proto native void EntityAI::SetFaceMaterial ( string material_name)
private

Material that is used on the Man's face and hands.

◆ SetFaceTexture()

proto native void EntityAI::SetFaceTexture ( string texture_name)
private

Texture that is used on the Man's face and hands.

◆ SetInventorySoftLock()

void EntityAI::SetInventorySoftLock ( bool status)
protected

◆ SetMasterAttenuation()

proto native void EntityAI::SetMasterAttenuation ( string masterAttenuation)
private

◆ SetProcessUIWarning()

void EntityAI::SetProcessUIWarning ( bool state)
protected

◆ SetSpeechRestricted()

proto native void EntityAI::SetSpeechRestricted ( bool state)
private

Set speech restriction.

◆ ShowZonesHealth()

override bool EntityAI::ShowZonesHealth ( )
inlineprivate

Definition at line 75 of file Transport.c.

76 {
77 return true;
78 }

◆ StatGet()

proto native float EntityAI::StatGet ( string name)
protected

Gets counter value of the specified stat type.

Parameters
[in]nameThe name of the stat type.

◆ StatGetAsTime()

proto void EntityAI::StatGetAsTime ( string name,
out string value )
protected

Gets counter value as formatted time string of the specified stat type.

Parameters
[in]nameThe name of the stat type.
[out]valueA formatted string containing stat value.

◆ StatGetCounter()

proto void EntityAI::StatGetCounter ( string name,
out string value )
protected

Gets counter value as string of the specified stat type.

Parameters
[in]nameThe name of the stat type.
[out]valueA formatted string containing stat value.

◆ StatInvokeUpdate()

proto native void EntityAI::StatInvokeUpdate ( )
protected

Invokes read stats from server to client.

Note
Call this on client when you need update stats.

◆ StatRegister()

proto native bool EntityAI::StatRegister ( string name)
protected

Stats Registers new stat type for this player.

Parameters
[in]nameThe name of the stat type.

◆ StatSyncToClient()

proto native void EntityAI::StatSyncToClient ( )
protected

Invokes save stats from server to client.

Note
Call this on server when you need update stats.

◆ StatUpdate()

proto native void EntityAI::StatUpdate ( string name,
float value )
protected

Updates stat counter with given value.

Parameters
[in]nameThe name of the stat type.
[in]valueThe specified value.

◆ StatUpdateByGivenPos()

proto native void EntityAI::StatUpdateByGivenPos ( string name,
vector pos )
protected

Updates stat counter by given position.

Parameters
[in]nameThe name of the stat type.
[in]posThe specified position.

◆ StatUpdateByPosition()

proto native void EntityAI::StatUpdateByPosition ( string name)
protected

Updates stat counter by player's actual position.

Use this to measure player's travelling distance.

Parameters
[in]nameThe name of the stat type.

◆ StatUpdateByTime()

proto native void EntityAI::StatUpdateByTime ( string name)
protected

Updates stat counter by time.

Use this to measure play time.

Parameters
[in]nameThe name of the stat type.

◆ StopDeathDarkeningEffect()

void EntityAI::StopDeathDarkeningEffect ( )
protected

◆ SwapEntitiesImpl()

bool EntityAI::SwapEntitiesImpl ( InventoryMode mode,
notnull EntityAI item1,
notnull EntityAI item2 )
inlineprotected

Definition at line 518 of file Man.c.

519 {
520 bool code;
521 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::SwapImpl(" + typename.EnumToString(InventoryMode, mode) + ") item1=" + Object.GetDebugName(item1) + " item2=" + item2.GetDebugName(this));
523 Error("[inv] (Man@" + this + ") SwapEntitiesImpl - cannot swap items!");
524
526
528 if (!code)
529 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " SwapEntitiesImpl - cannot swap or forceswap");
530 return code;
531 }
script counterpart to engine's class Inventory
Definition Inventory.c:79
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
Definition Inventory.c:610
override bool SwapEntities(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2)

References GameInventory::CanSwapEntitiesEx(), Error(), GetDebugName(), GetHumanInventory(), LogManager::IsSyncLogEnable(), HumanInventory::SwapEntities(), syncDebugPrint(), and UpdateInventoryMenu().

Referenced by JunctureSwapEntities(), LocalSwapEntities(), PredictiveSwapEntities(), and ServerSwapEntities().

◆ SwitchOn()

proto native void EntityAI::SwitchOn ( bool onOff)
private

Some inventoryItem devices can be switched on/off (radios, transmitters)

◆ Synchronize()

proto native void EntityAI::Synchronize ( )
private

Synchronizes car's state in case the simulation is not running.

◆ TakeEntityAsAttachmentExImpl()

bool EntityAI::TakeEntityAsAttachmentExImpl ( InventoryMode mode,
notnull EntityAI item,
int slot )
inlineprotected

Definition at line 477 of file Man.c.

478 {
479 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2AttEx(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
482 return code;
483 }
override bool TakeEntityAsAttachmentEx(InventoryMode mode, notnull EntityAI item, int slot)

References GetDebugName(), GetHumanInventory(), LogManager::IsSyncLogEnable(), syncDebugPrint(), HumanInventory::TakeEntityAsAttachmentEx(), and UpdateInventoryMenu().

Referenced by JunctureTakeEntityAsAttachmentEx(), LocalTakeEntityAsAttachmentEx(), PredictiveTakeEntityAsAttachmentEx(), and ServerTakeEntityAsAttachmentEx().

◆ TakeEntityAsAttachmentImpl()

bool EntityAI::TakeEntityAsAttachmentImpl ( InventoryMode mode,
notnull EntityAI item )
inlineprotected

Definition at line 438 of file Man.c.

439 {
440 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Att(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
443 return code;
444 }
bool TakeEntityAsAttachment(InventoryMode mode, notnull EntityAI item)
Definition Inventory.c:1134

References GetDebugName(), GetHumanInventory(), LogManager::IsSyncLogEnable(), syncDebugPrint(), GameInventory::TakeEntityAsAttachment(), and UpdateInventoryMenu().

Referenced by JunctureTakeEntityAsAttachment(), LocalTakeEntityAsAttachment(), PredictiveTakeEntityAsAttachment(), and ServerTakeEntityAsAttachment().

◆ TakeEntityToCargoImpl()

bool EntityAI::TakeEntityToCargoImpl ( InventoryMode mode,
notnull EntityAI item )
inlineprotected

Definition at line 399 of file Man.c.

400 {
401 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Cgo(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
404 return code;
405 }
bool TakeEntityToCargo(InventoryMode mode, notnull EntityAI item)
moves item to cargo of this intentory
Definition Inventory.c:1054

References GetDebugName(), GetHumanInventory(), LogManager::IsSyncLogEnable(), syncDebugPrint(), GameInventory::TakeEntityToCargo(), and UpdateInventoryMenu().

Referenced by JunctureTakeEntityToCargo(), LocalTakeEntityToCargo(), PredictiveTakeEntityToCargo(), and ServerTakeEntityToCargo().

◆ TakeEntityToHandsImpl()

void EntityAI::TakeEntityToHandsImpl ( InventoryMode mode,
EntityAI item )
inlineprotected

Definition at line 178 of file Man.c.

179 {
180 if (!GetGame().IsDedicatedServer())
181 {
183 il.SetHands(this, item);
184 //GetInventory().AddInventoryReservationEx(item, il ,GameInventory.c_InventoryReservationTimeoutShortMS);
185 }
186
187 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Hands(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
189
191 if (item.GetInventory().GetCurrentInventoryLocation(src_item))
192 {
193 if (itemInHands == null)
194 {
196 hand_dst.SetHands(this, item);
198 }
199 else if (GetHumanInventory().CanSwapEntitiesEx(itemInHands, item))
200 GetInventory().SwapEntities(mode, itemInHands, item);
202 }
203 }
override bool TakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)

References GetDebugName(), HumanInventory::GetEntityInHands(), GetGame(), GetHumanInventory(), LogManager::IsSyncLogEnable(), syncDebugPrint(), HumanInventory::TakeToDst(), and UpdateInventoryMenu().

Referenced by JunctureTakeEntityToHands(), LocalTakeEntityToHands(), PredictiveTakeEntityToHands(), and ServerTakeEntityToHands().

◆ TakeEntityToInventoryImpl()

bool EntityAI::TakeEntityToInventoryImpl ( InventoryMode mode,
FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected

Definition at line 360 of file Man.c.

361 {
362 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Inv(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
365 return code;
366 }

References GetDebugName(), GetHumanInventory(), LogManager::IsSyncLogEnable(), syncDebugPrint(), HumanInventory::TakeEntityToInventory(), and UpdateInventoryMenu().

Referenced by JunctureTakeEntityToInventory(), LocalTakeEntityToInventory(), PredictiveTakeEntityToInventory(), and ServerTakeEntityToInventory().

◆ TakeEntityToTargetAttachmentExImpl()

bool EntityAI::TakeEntityToTargetAttachmentExImpl ( InventoryMode mode,
notnull EntityAI target,
notnull EntityAI item,
int slot )
inlineprotected

Definition at line 742 of file Man.c.

743 {
744 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2TargetAtt(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
745 bool code = GetInventory().TakeEntityAsTargetAttachmentEx(mode, target, item, slot);
747 return code;
748 }

References GetDebugName(), LogManager::IsSyncLogEnable(), syncDebugPrint(), and UpdateInventoryMenu().

Referenced by JunctureTakeEntityToTargetAttachmentEx(), LocalTakeEntityToTargetAttachmentEx(), PredictiveTakeEntityToTargetAttachmentEx(), ServerTakeEntityToTargetAttachmentEx(), and TakeEntityToTargetAttachmentImpl().

◆ TakeEntityToTargetAttachmentImpl()

bool EntityAI::TakeEntityToTargetAttachmentImpl ( InventoryMode mode,
notnull EntityAI target,
notnull EntityAI item )
inlineprotected

◆ TakeEntityToTargetCargoExImpl()

bool EntityAI::TakeEntityToTargetCargoExImpl ( InventoryMode mode,
notnull CargoBase cargo,
notnull EntityAI item,
int row,
int col )
inlineprotected

Definition at line 660 of file Man.c.

661 {
662 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2TargetCgoEx(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
663 bool code = GetInventory().TakeEntityToTargetCargoEx(mode, cargo, item, row, col);
665 return code;
666 }

References GetDebugName(), LogManager::IsSyncLogEnable(), syncDebugPrint(), and UpdateInventoryMenu().

Referenced by JunctureTakeEntityToTargetCargoEx(), LocalTakeEntityToTargetCargoEx(), PredictiveTakeEntityToTargetCargoEx(), and ServerTakeEntityToTargetCargoEx().

◆ TakeEntityToTargetCargoImpl()

bool EntityAI::TakeEntityToTargetCargoImpl ( InventoryMode mode,
notnull EntityAI target,
notnull EntityAI item )
inlineprotected

Definition at line 702 of file Man.c.

703 {
704 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Take2TargetCgo(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
705
706 bool code = GetInventory().TakeEntityToTargetInventory(mode, target, FindInventoryLocationType.CARGO, item);
708 return code;
709 }

References GetDebugName(), LogManager::IsSyncLogEnable(), syncDebugPrint(), and UpdateInventoryMenu().

Referenced by JunctureTakeEntityToTargetCargo(), LocalTakeEntityToTargetCargo(), PredictiveTakeEntityToTargetCargo(), and ServerTakeEntityToTargetCargo().

◆ TakeEntityToTargetInventoryImpl()

bool EntityAI::TakeEntityToTargetInventoryImpl ( InventoryMode mode,
notnull EntityAI target,
FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected

Definition at line 621 of file Man.c.

622 {
623 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2TargetInv(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
624 bool code = GetInventory().TakeEntityToTargetInventory(mode, target, flags, item);
626 return code;
627 }

References GetDebugName(), LogManager::IsSyncLogEnable(), syncDebugPrint(), and UpdateInventoryMenu().

Referenced by JunctureTakeEntityToTargetInventory(), LocalTakeEntityToTargetInventory(), and PredictiveTakeEntityToTargetInventory().

◆ TakeToDstImpl()

bool EntityAI::TakeToDstImpl ( InventoryMode mode,
notnull InventoryLocation src,
notnull InventoryLocation dst )
inlineprotected

Definition at line 820 of file Man.c.

821 {
822 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Dst(" + typename.EnumToString(InventoryMode, mode) + ") src=" + InventoryLocation.DumpToStringNullSafe(src) + " dst=" + InventoryLocation.DumpToStringNullSafe(dst));
825 return code;
826 }
static string DumpToStringNullSafe(InventoryLocation loc)

References InventoryLocation::DumpToStringNullSafe(), GetDebugName(), GetHumanInventory(), LogManager::IsSyncLogEnable(), syncDebugPrint(), HumanInventory::TakeToDst(), and UpdateInventoryMenu().

Referenced by JunctureTakeToDst(), LocalTakeToDst(), PredictiveTakeToDst(), and ServerTakeToDst().

◆ ThrowPhysically()

proto native void EntityAI::ThrowPhysically ( DayZPlayer player,
vector force,
bool collideWithCharacters = true )
private

◆ Transport()

void EntityAI::Transport ( )
inlineprivate

Definition at line 10 of file Transport.c.

11 {
12 }

◆ TurnOffTransmitter()

void EntityAI::TurnOffTransmitter ( )
inlineprivate

Definition at line 50 of file AdvancedCommunication.c.

51 {
52 GetCompEM().SwitchOff();
53 }

◆ TurnOnTransmitter()

void EntityAI::TurnOnTransmitter ( )
inlineprivate

Definition at line 45 of file AdvancedCommunication.c.

46 {
47 GetCompEM().SwitchOn();
48 }

◆ UnlockDoor()

proto native void EntityAI::UnlockDoor ( int index)
private

Unlocks the door if locked.

◆ UpdateInventoryMenu()

Member Data Documentation

◆ m_ActionsInitialize

bool EntityAI::m_ActionsInitialize
private

Definition at line 5 of file AdvancedCommunication.c.

◆ m_AdvComTypeActionsMap

ref map<typename, ref TInputActionMap> EntityAI::m_AdvComTypeActionsMap = new map<typename, ref TInputActionMap>
staticprivate

Definition at line 3 of file AdvancedCommunication.c.

◆ m_ContinuousActions

ref TIntArray EntityAI::m_ContinuousActions
private

Definition at line 7 of file Transport.c.

◆ m_InputActionMap

TInputActionMap EntityAI::m_InputActionMap
private

Definition at line 4 of file AdvancedCommunication.c.

◆ m_InteractActions

ref TIntArray EntityAI::m_InteractActions
private

Definition at line 221 of file Building.c.

◆ m_IsMeleeWeapon

bool EntityAI::m_IsMeleeWeapon = false
private

Definition at line 11 of file InventoryItem.c.

◆ m_OnItemAddedToHands

ref ScriptInvoker EntityAI::m_OnItemAddedToHands
protected

Definition at line 68 of file Man.c.

Referenced by GetOnItemAddedToHands().

◆ m_OnItemRemovedFromHands

ref ScriptInvoker EntityAI::m_OnItemRemovedFromHands
protected

Definition at line 70 of file Man.c.

Referenced by GetOnItemRemovedFromHands().

◆ m_SingleUseActions

ref TIntArray EntityAI::m_SingleUseActions
private

Definition at line 6 of file Transport.c.

◆ m_SoundContactTickTime

float EntityAI::m_SoundContactTickTime
private

Definition at line 10 of file InventoryItem.c.

◆ m_SoundImpactTable

SoundLookupTable EntityAI::m_SoundImpactTable
private

Definition at line 9 of file InventoryItem.c.

◆ SOUND_CONTACT_SKIP

const float EntityAI::SOUND_CONTACT_SKIP = 0.33
staticprivate

Definition at line 3 of file InventoryItem.c.


The documentation for this class was generated from the following files: