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

Защищенные члены

void EntityAI ()
 
void ~EntityAI ()
 
void InitItemVariables ()
 
void DeferredInit ()
 
bool IsInitialized ()
 
int GetHideIconMask ()
 should the item's icon be hidden in any part of the inventory?
 
float ConvertNonlethalDamage (float damage, DamageType damageType)
 
float ConvertNonlethalDamage (float damage)
 DEPRECATED - for legacy purposes.
 
DamageZoneMap GetEntityDamageZoneMap ()
 
map< int, stringGetEntityDamageDisplayNameMap ()
 
bool CanDisplayWeight ()
 'displayWeight' in item config
 
void Log (string msg, string fnc_name="n/a")
 Log.
 
void LogWarning (string msg, string fnc_name="n/a")
 LogWarning.
 
void LogError (string msg, string fnc_name="n/a")
 LogError.
 
bool HasFlammableMaterial ()
 Override this method to return TRUE when this item has or can provide fire. Evaluated on server and client.
 
bool CanBeIgnitedBy (EntityAI igniter=NULL)
 Override this method so it checks whenever this item can be ignited right now or not. Evaluated on Server and Client.
 
bool CanIgniteItem (EntityAI ignite_target=NULL)
 Override this method and check if the given item can be ignited right now by this one. Evaluated on Server and Client.
 
bool IsIgnited ()
 Override this method and make it so it returns whenever this item is on fire right now or not. Evaluated on Server and Client.
 
bool DisassembleOnLastDetach ()
 
bool IsBasebuildingKit ()
 
bool PlacementCanBeRotated ()
 Should return false if you want to disable hologram rotation.
 
void OnIgnitedTarget (EntityAI target_item)
 Executed on Server when this item ignites some target item.
 
void OnIgnitedThis (EntityAI fire_source)
 Executed on Server when some item ignited this one.
 
void OnIgnitedTargetFailed (EntityAI target_item)
 Executed on Server when this item failed to ignite target item.
 
void OnIgnitedThisFailed (EntityAI fire_source)
 Executed on Server when some item failed to ignite this one.
 
bool IsTargetIgnitionSuccessful (EntityAI item_target)
 Final evaluation just before the target item is actually ignited. Evaluated on Server.
 
bool IsThisIgnitionSuccessful (EntityAI item_source=NULL)
 Final evaluation just before this item is actually ignited from fire source. Evaluated on Server.
 
void OnPlacementStarted (Man player)
 
void OnHologramBeingPlaced (Man player)
 
void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
void OnPlacementCancelled (Man player)
 
bool CanBePlaced (Man player, vector position)
 
string CanBePlacedFailMessage (Man player, vector position)
 Method which returns message why object can't be placed at given position.
 
bool DoPlacingHeightCheck ()
 Do the roof check when placing this?
 
float HeightCheckOverride ()
 used as script-side override of distance for specific height checks
 
float HeightStartCheckOverride ()
 used as script-side override of start pos for specific height checks
 
bool IsEmpty ()
 is this container empty or not, checks both cargo and attachments
 
bool IsSplitable ()
 returns just the configured 'canBeSplit' bool
 
bool CanBeSplit ()
 returns current splitability
 
bool HasAnyCargo ()
 is this container empty or not, checks only cargo
 
array< EntityAIGetAttachmentsWithCargo ()
 
array< EntityAIGetAttachmentsWithAttachments ()
 
bool IsRoofAbove ()
 
void SetRoofAbove (bool state)
 
void CheckForRoofLimited (float timeTresholdMS=3000)
 Roof check for entity, limited by time (anti-spam solution)
 
int GetAgents ()
 
void RemoveAgent (int agent_id)
 
void RemoveAllAgents ()
 
void RemoveAllAgentsExcept (int agent_to_keep)
 
void InsertAgent (int agent, float count=1)
 
override bool IsEntityAI ()
 
bool IsInventoryVisible ()
 
bool IsPlayer ()
 
bool IsAnimal ()
 
bool IsZombie ()
 
bool IsZombieMilitary ()
 
bool IsIgnoredByConstruction ()
 
bool CanBeTargetedByAI (EntityAI ai)
 
bool CanBeBackstabbed ()
 
override void Delete ()
 Delete this object in next frame.
 
void DeleteOnClient ()
 
void DeleteSafe ()
 
void DeleteSave ()
 
bool IsSetForDeletion ()
 
override bool CanBeActionTarget ()
 
void SetPrepareToDelete ()
 
bool IsPreparedToDelete ()
 
void CheckForDestroy ()
 
bool IsPrepareToDelete ()
 
bool TryDelete ()
 
void OnBeforeTryDelete ()
 
proto native EntityAI GetHierarchyRoot ()
 Returns root of current hierarchy (for example: if this entity is in Backpack on gnd, returns Backpack)
 
proto native Man GetHierarchyRootPlayer ()
 Returns root of current hierarchy cast to Man.
 
proto native EntityAI GetHierarchyParent ()
 Returns direct parent of current entity.
 
proto native CEItemProfile GetEconomyProfile ()
 Get economy item profile (if assigned, otherwise null)
 
int GetHierarchyLevel (int lvl=0)
 
void OnInventoryInit ()
 
void EEInit ()
 Called upon object creation.
 
void EEDelete (EntityAI parent)
 Called right before object deleting.
 
override void OnExplosionEffects (Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
 
void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
void OnItemAttachmentSlotChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
void EEParentedTo (EntityAI parent)
 Called from 'IEntity.AddChild'.
 
void EEParentedFrom (EntityAI parent)
 Called from 'IEntity.RemoveChild' or 'IEntity.AddChild' when hierarchy changes.
 
void EEInventoryIn (Man newParentMan, EntityAI diz, EntityAI newParent)
 
void EEInventoryOut (Man oldParentMan, EntityAI diz, EntityAI newParent)
 
void EEAmmoChanged ()
 
void EEHealthLevelChanged (int oldLevel, int newLevel, string zone)
 
void OnDamageDestroyed (int oldLevel)
 Called when the health gets to the min value, 'oldLevel' is previous health level, 'oldLevel' -1 means this entity was just spawned.
 
void AttemptDestructionBehaviour (int oldLevel, int newLevel, string zone)
 
void SetTakeable (bool pState)
 
void EEKilled (Object killer)
 called on server when the entity is killed
 
bool ReplaceOnDeath ()
 
string GetDeadItemName ()
 
bool KeepHealthOnReplace ()
 
void DeathUpdate ()
 
void OnAttachmentRuined (EntityAI attachment)
 Called when some attachment of this parent is ruined. Called on server and client side.
 
void EEHitBy (TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
 
void EEHitByRemote (int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos)
 
void EEItemAttached (EntityAI item, string slot_name)
 
void SwitchItemSelectionTexture (EntityAI item, string slot_name)
 
void SwitchItemSelectionTextureEx (EItemManipulationContext context, Param par=null)
 
void EEItemDetached (EntityAI item, string slot_name)
 
void EECargoIn (EntityAI item)
 
void EECargoOut (EntityAI item)
 
void EECargoMove (EntityAI item)
 
ScriptInvoker GetOnItemAttached ()
 
ScriptInvoker GetOnItemDetached ()
 
ScriptInvoker GetOnItemAddedIntoCargo ()
 
ScriptInvoker GetOnItemRemovedFromCargo ()
 
ScriptInvoker GetOnItemMovedInCargo ()
 
ScriptInvoker GetOnItemFlipped ()
 
ScriptInvoker GetOnViewIndexChanged ()
 
ScriptInvoker GetOnSetLock ()
 
ScriptInvoker GetOnReleaseLock ()
 
ScriptInvoker GetOnAttachmentSetLock ()
 
ScriptInvoker GetOnAttachmentReleaseLock ()
 
ScriptInvoker GetOnHitByInvoker ()
 
ScriptInvoker GetOnKilledInvoker ()
 
void OnMovedInsideCargo (EntityAI container)
 Called when this item enters cargo of some container.
 
void OnRemovedFromCargo (EntityAI container)
 Called when this item exits cargo of some container.
 
void OnMovedWithinCargo (EntityAI container)
 Called when this item moves within cargo of some container.
 
void EEOnAfterLoad ()
 Called when entity is part of "connected system" and being restored after load.
 
void EEOnCECreate ()
 Called when entity is being created as new by CE/ Debug.
 
void AfterStoreLoad ()
 Called when entity is being loaded from DB or Storage (after all children loaded)
 
void OnBinLoadItemsDropped ()
 Called when an item fails to get loaded into the inventory of an entity and gets dropped.
 
void HideAllSelections ()
 Sets all animation values to 1, making them INVISIBLE if they are configured in models.cfg in such way. These selections must also be defined in the entity's config class in 'AnimationSources'.
 
void ShowAllSelections ()
 Sets all animation values to 0, making them VISIBLE if they are configured in models.cfg in such way. These selections must also be defined in the entity's config class in 'AnimationSources'.
 
bool CanReceiveAttachment (EntityAI attachment, int slotId)
 calls this->CanReceiveAttachment(attachment)
 
bool CanLoadAttachment (EntityAI attachment)
 
bool CanPutAsAttachment (EntityAI parent)
 calls this->CanPutAsAttachment(parent)
 
bool CanSwitchDuringAttach (EntityAI parent)
 
bool CanReleaseAttachment (EntityAI attachment)
 calls this->CanReleaseAttachment(attachment)
 
bool CanDetachAttachment (EntityAI parent)
 calls this->CanDetachAttachment(parent)
 
bool CanBeFSwaped ()
 
bool CanCombineAttachment (notnull EntityAI e, int slot, bool stack_max_limit=false)
 
bool CanBeCombined (EntityAI other_item, bool reservation_check=true, bool stack_max_limit=false)
 
void CombineItemsEx (EntityAI entity2, bool use_stack_max=false)
 
void SplitIntoStackMaxEx (EntityAI destination_entity, int slot_id)
 
void CombineItemsClient (EntityAI entity2, bool use_stack_max=false)
 
void SplitIntoStackMaxClient (EntityAI destination_entity, int slot_id)
 
bool CanReceiveItemIntoCargo (EntityAI item)
 calls this->CanReceiveItemIntoCargo(item)
 
bool CanLoadItemIntoCargo (EntityAI item)
 calls this->CanLoadItemIntoCargo(item), is called on server start when loading in the storage
 
bool CanPutInCargo (EntityAI parent)
 calls this->CanPutInCargo(parent)
 
bool CanSwapItemInCargo (EntityAI child_entity, EntityAI new_entity)
 calls this->CanSwapItemInCargo(child_entity, new_entity)
 
bool CanReleaseCargo (EntityAI cargo)
 calls this->CanReleaseCargo(cargo)
 
bool CanRemoveFromCargo (EntityAI parent)
 calls this->CanRemoveFromCargo(parent)
 
bool CanReceiveItemIntoHands (EntityAI item_to_hands)
 calls this->CanReceiveItemIntoHands(item_to_hands)
 
bool AreChildrenAccessible ()
 
bool IsBeingPlaced ()
 
override bool IsHologram ()
 
bool CanSaveItemInHands (EntityAI item_in_hands)
 
bool CanPutIntoHands (EntityAI parent)
 calls this->CanPutIntoHands(parent)
 
bool CanReleaseFromHands (EntityAI handheld)
 calls this->CanReleaseFromHands(handheld)
 
bool CanRemoveFromHands (EntityAI parent)
 calls this->CanRemoveFromHands(parent)
 
bool CanDisplayAttachmentSlot (string slot_name)
 
bool CanDisplayAttachmentSlot (int slot_id)
 
bool CanDisplayAnyAttachmentSlot ()
 
bool CanDisplayAttachmentCategory (string category_name)
 
bool CanDisplayCargo ()
 
bool CanAssignToQuickbar ()
 
bool CanAssignAttachmentsToQuickbar ()
 
bool IgnoreOutOfReachCondition ()
 
void OnWasAttached (EntityAI parent, int slot_id)
 
void OnWasDetached (EntityAI parent, int slot_id)
 
void OnCargoChanged ()
 
bool IsTakeable ()
 
proto native GameInventory GetInventory ()
 
proto native void CreateAndInitInventory ()
 
proto native void DestroyInventory ()
 
int GetSlotsCountCorrect ()
 
EntityAI FindAttachmentBySlotName (string slot_name)
 
bool IsLockedInSlot ()
 
bool PredictiveTakeEntityToInventory (FindInventoryLocationType flags, notnull EntityAI item)
 Put item anywhere into this entity (as attachment or into cargo, recursively)
 
bool LocalTakeEntityToInventory (FindInventoryLocationType flags, notnull EntityAI item)
 
bool ServerTakeEntityToInventory (FindInventoryLocationType flags, notnull EntityAI item)
 
bool PredictiveTakeEntityToTargetInventory (notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
 
bool LocalTakeEntityToTargetInventory (notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
 
bool ServerTakeEntityToTargetInventory (notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
 
bool PredictiveTakeEntityToCargo (notnull EntityAI item)
 Put item into into cargo.
 
bool LocalTakeEntityToCargo (notnull EntityAI item)
 
bool ServerTakeEntityToCargo (notnull EntityAI item)
 
bool PredictiveTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
 
bool LocalTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
 
bool ServerTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
 
bool PredictiveTakeEntityToCargoEx (notnull EntityAI item, int idx, int row, int col)
 Put item into into cargo on specific cargo location.
 
bool LocalTakeEntityToCargoEx (notnull EntityAI item, int idx, int row, int col)
 
bool PredictiveTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
 
bool LocalTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
 
bool ServerTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
 
bool PredictiveTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
 Returns if item can be added as attachment on specific slot. Note that slot index IS NOT slot ID! Slot ID is defined in DZ/data/config.cpp.
 
bool LocalTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
 
bool ServerTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
 
bool PredictiveTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
 
bool LocalTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
 
bool ServerTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
 
bool PredictiveTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
 
bool LocalTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
 
bool ServerTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
 
bool PredictiveTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
 
bool LocalTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
 
bool ServerTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
 
bool PredictiveTakeEntityAsAttachment (notnull EntityAI item)
 Put item into as attachment.
 
bool LocalTakeEntityAsAttachment (notnull EntityAI item)
 
bool ServerTakeEntityAsAttachment (notnull EntityAI item)
 
bool PredictiveDropEntity (notnull EntityAI item)
 
bool LocalDropEntity (notnull EntityAI item)
 
bool ServerDropEntity (notnull EntityAI item)
 
EntityAI GetAttachmentByType (typename type)
 Get attached entity by type.
 
EntityAI GetAttachmentByConfigTypeName (string type)
 Get attached entity by config type name.
 
bool CanDropEntity (notnull EntityAI item)
 Returns if item can be dropped out from this entity.
 
EntityAI SpawnInInventoryOrGroundPos (string object_name, GameInventory inv, vector pos)
 
EntityAI SpawnEntityOnGroundPos (string object_name, vector pos)
 
EntityAI SpawnEntityOnGround (string object_name, vector mat[4])
 
bool CanSwapEntities (EntityAI otherItem, InventoryLocation otherDestination, InventoryLocation destination)
 
void SetWet (float value, bool allow_client=false)
 
void AddWet (float value)
 
void SetWetMax ()
 
float GetWet ()
 
float GetWetMax ()
 
float GetWetMin ()
 
float GetWetInit ()
 
bool HasWetness ()
 
void OnWetChanged (float newVal, float oldVal)
 
void OnWetLevelChanged (EWetnessLevel newLevel, EWetnessLevel oldLevel)
 
EWetnessLevel GetWetLevel ()
 
bool HasQuantity ()
 
bool SetQuantity (float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
 
float GetQuantity ()
 
float GetQuantityNormalized ()
 
int GetQuantityMax ()
 
int GetQuantityMin ()
 
void SetQuantityToMinimum ()
 
int GetTargetQuantityMax (int attSlotID=-1)
 
int GetQuickBarBonus ()
 
bool UseConfigInitTemperature ()
 
void InitTemperature ()
 
void SetTemperatureDirect (float value, bool allow_client=false)
 
void SetTemperature (float value, bool allow_client=false)
 not really deprecated, but missing context info from TemperatureData. Default values used instead.
 
void AddTemperature (float value)
 
void SetTemperatureEx (TemperatureData data)
 sets temperature, handles base overheating and freezing state progression logics
 
void RefreshTemperatureAccess (TemperatureData data)
 refreshes access without setting temperature, keeps the source locked in
 
void InterpolateTempData (TemperatureDataInterpolated data)
 
void SetTemperatureMax ()
 presumably for debug purposes?
 
float GetTemperature ()
 
float GetTemperatureInit ()
 
float GetTemperatureMin ()
 
float GetTemperatureMax ()
 
float GetHeatPermeabilityCoef ()
 Returns temperature change speed multiplier for this item and all its children (multiplicative interaction)
 
float GetTemperatureFreezeThreshold ()
 
float GetTemperatureThawThreshold ()
 
float GetTemperatureFreezeTime ()
 
float GetTemperatureThawTime ()
 
float GetFreezeThawProgress ()
 on server only
 
void SetFreezeThawProgress (float val)
 0->1 when freezing, 1->0 when thawing
 
bool CanFreeze ()
 
bool GetIsFrozen ()
 
void SetFrozen (bool frozen)
 
void HandleFreezingProgression (float deltaHeat, TemperatureData data)
 
void OnFreezeStateChangeClient ()
 
void OnFreezeStateChangeServer ()
 
bool CanItemOverheat ()
 Overheat time CAN be 0, GameConstants.TEMPERATURE_TIME_OVERHEAT_MIN is ignored if so.
 
float GetItemOverheatThreshold ()
 if undefined, max temperature used as default
 
float GetItemOverheatTime ()
 any configured value >= 0 will simulate overheating
 
bool IsItemOverheated ()
 
float GetItemOverheatProgress ()
 
void SetItemOverheatProgress (float val, float deltaTime=0)
 
void OnItemOverheatStart ()
 override to implement desired overheat behavior on entity
 
void OnItemOverheat (float deltaTime)
 
void OnItemOverheatEnd ()
 note, that the deltaTime could be reverse-calculated and not totally accurate
 
void HandleItemOverheating (float deltaHeat, TemperatureData data)
 
void SetLiquidType (int value, bool allow_client=false)
 
int GetLiquidType ()
 
void SetColor (int r, int g, int b, int a)
 
void GetColor (out int r, out int g, out int b, out int a)
 
void SetStoreLoad (bool value)
 
bool IsStoreLoad ()
 
void SetStoreLoadedQuantity (float value)
 
float GetStoreLoadedQuantity ()
 
void SetCleanness (int value, bool allow_client=false)
 
int GetCleanness ()
 
bool IsServerCheck (bool allow_client)
 
HiddenSelectionsData GetHiddenSelectionsData ()
 
int GetHiddenSelectionIndex (string selection)
 Returns index of the string found in cfg array 'hiddenSelections'. If it's not found then it returns -1.
 
override TStringArray GetHiddenSelections ()
 Returns the hiddenSelectionsTextures array from the object's config.
 
override TStringArray GetHiddenSelectionsTextures ()
 Returns the hiddenSelectionsTextures array from the object's config.
 
override TStringArray GetHiddenSelectionsMaterials ()
 Returns the hiddenSelectionsMaterials array from the object's config.
 
proto native void PlaceOnSurfaceRotated (out vector trans[4], vector pos, float dx=0, float dz=0, float fAngle=0, bool align=false)
 
proto native void RegisterNetSyncVariableBool (string variableName)
 registers bool variable synchronized over network
 
proto native void RegisterNetSyncVariableBoolSignal (string variableName)
 when bool variable is true, it's sent to clients and become false again
 
proto native void RegisterNetSyncVariableInt (string variableName, int minValue=0, int maxValue=0)
 registers int variable synchronized over network
 
proto native void RegisterNetSyncVariableFloat (string variableName, float minValue=0, float maxValue=0, int precision=1)
 registers float variable synchronized over network
 
proto native void RegisterNetSyncVariableObject (string variableName)
 registers object variable synchronized over network, only synchronizes if network id is assigned. Doesn't handle object despawn on client
 
proto native void UpdateNetSyncVariableInt (string variableName, float minValue=0, float maxValue=0)
 
proto native void UpdateNetSyncVariableFloat (string variableName, float minValue=0, float maxValue=0, int precision=1)
 
proto native void SwitchLight (bool isOn)
 
proto native void SetSimpleHiddenSelectionState (int index, bool state)
 Simple hidden selection state; 0 == hidden.
 
proto native bool IsSimpleHiddenSelectionVisible (int index)
 
proto native void SetObjectTexture (int index, string texture_name)
 Change texture in hiddenSelections.
 
proto native owned string GetObjectTexture (int index)
 
proto native void SetObjectMaterial (int index, string mat_name)
 Change material in hiddenSelections.
 
proto native owned string GetObjectMaterial (int index)
 
proto native bool IsPilotLight ()
 
proto native void SetPilotLight (bool isOn)
 
void OnStoreSave (ParamsWriteContext ctx)
 Engine calls this function to collect data from entity to store for persistence (on server side).
 
bool OnStoreLoad (ParamsReadContext ctx, int version)
 Called when data is loaded from persistence (on server side).
 
proto native void SetSynchDirty ()
 Sets object synchronization dirty flag, which signalize that object wants to be synchronized (take effect only in MP on server side)
 
void OnVariablesSynchronized ()
 Called on clients after receiving synchronization data from server.
 
bool IsVariableSet (int variable)
 'true' if this variable has ever been changed from default
 
void SetVariableMask (int variable)
 
void RemoveItemVariable (int variable)
 Removes variable from variable mask, making it appear as though the variable has never been changed from default.
 
void TransferVariablesFloat (array< float > float_vars)
 
array< floatGetVariablesFloat ()
 
void SaveVariables (ParamsWriteContext ctx)
 
bool LoadVariables (ParamsReadContext ctx, int version=-1)
 
void WriteVarsToCTX (ParamsWriteContext ctx)
 Writes to storage CTX.
 
bool ReadVarsFromCTX (ParamsReadContext ctx, int version=-1)
 Reads from storage CTX.
 
void SerializeNumericalVars (array< float > floats_out)
 
void DeSerializeNumericalVars (array< float > floats)
 
proto native void SetAITargetCallbacks (AbstractAITargetCallbacks callbacks)
 
override void EOnFrame (IEntity other, float timeSlice)
 
string GetDebugText ()
 
void GetDebugButtonNames (out string button1, out string button2, out string button3, out string button4)
 
void OnDebugButtonPressClient (int button_index)
 
void OnDebugButtonPressServer (int button_index)
 
Shape DebugBBoxDraw ()
 
void DebugBBoxSetColor (int color)
 
void DebugBBoxDelete ()
 
Shape DebugDirectionDraw (float distance=1)
 
void DebugDirectionSetColor (int color)
 
void DebugDirectionDelete ()
 
void HideSelection (string selection_name)
 Hides selection of the given name. Must be configed in config.cpp and models.cfg.
 
void ShowSelection (string selection_name)
 Shows selection of the given name. Must be configed in config.hpp and models.cfg.
 
proto void GetPersistentID (out int b1, out int b2, out int b3, out int b4)
 
proto native void SetLifetime (float fLifeTime)
 Set (override) remaining economy lifetime (seconds)
 
proto native float GetLifetime ()
 Get remaining economy lifetime (seconds)
 
proto native void IncreaseLifetime ()
 Reset economy lifetime to default (seconds)
 
proto native void SetLifetimeMax (float fLifeTime)
 Set (override) max economy lifetime per entity instance (seconds)
 
proto native float GetLifetimeMax ()
 Get max economy lifetime per instance - default is from DB (seconds)
 
void IncreaseLifetimeUp ()
 Reset economy lifetime to default across entity hierarchy all the way to the topmost entity.
 
ComponentBodyStaging GetCompBS ()
 Use this to access Body Staging component on dead character. Returns NULL if the given object lacks such component.
 
override void OnRPC (PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
 
float GetWetWeightModifier ()
 
float GetConfigWeightModified ()
 
int GetWeight ()
 
void ClearWeightDirty ()
 
void SetWeightDirty ()
 
float GetInventoryAndCargoWeight (bool forceRecalc=false)
 
float GetWeightSpecialized (bool forceRecalc=false)
 returns weight of the entity in a way that's specific to the entity type and is internal to the weight system calculation, to obtain entity's weight, use the 'GetWeightEx' method instead
 
float GetWeightEx (bool forceRecalc=false)
 returns overall weight of the entity, 'forceRecalc = true' is meant to be used only when debugging, using it in gameplay code is higly inadvisable as it bypasses the weight caching and has adverse effect on performance
 
void UpdateWeight (WeightUpdateType updateType=WeightUpdateType.FULL, float weightAdjustment=0)
 
float GetSingleInventoryItemWeightEx ()
 
void GetDebugActions (out TSelectableActionInfoArrayEx outputList)
 
bool OnAction (int action_id, Man player, ParamsReadContext ctx)
 
string GetHitComponentForAI ()
 Returns hit component for the Entity (overriden for each Type - PlayerBase, DayZInfected, DayZAnimal, etc.)
 
string GetDefaultHitComponent ()
 returns default hit component for the Entity (overriden for each Type - PlayerBase, DayZInfected, DayZAnimal, etc.)
 
string GetDefaultHitPositionComponent ()
 returns default hit position component name for the Entity (overriden by type if needed - used mainly as support for impact particles)
 
array< stringGetSuitableFinisherHitComponents ()
 
vector GetDefaultHitPosition ()
 
int GetMeleeTargetType ()
 value is related to EMeleeTargetType
 
string GetAttachmentSoundType ()
 returns sound type of attachment (used for clothing and weapons on DayZPlayerImplement, paired with Anim*Type enum from DayZAnimEvents)
 
bool IsHeavyBehaviour ()
 returns item behaviour of item (more in ItemBase)
 
bool IsOneHandedBehaviour ()
 returns item behaviour of item (more in ItemBase)
 
bool IsTwoHandedBehaviour ()
 returns item behaviour of item (more in ItemBase)
 
string ChangeIntoOnAttach (string slot)
 
string ChangeIntoOnDetach ()
 
bool CanHaveTemperature ()
 returns true used on selected items that have a temperature effect and can processes temperature changes
 
bool IsSelfAdjustingTemperature ()
 
void OnCEUpdate ()
 Central economy calls this function whenever going over all the entities.
 
void ProcessVariables ()
 
void OnDebugSpawnEx (DebugSpawnParams params)
 
void OnDebugSpawn ()
 
override EntityAI ProcessMeleeItemDamage (int mode=0)
 
float GetLiquidThroughputCoef ()
 Returns liquid throughput coeficient.
 
string GetInvulnerabilityTypeString ()
 
void ProcessInvulnerabilityCheck (string servercfg_param)
 
void SetBayonetAttached (bool pState, int slot_idx=-1)
 
bool HasBayonetAttached ()
 
int GetBayonetAttachmentIdx ()
 
void SetButtstockAttached (bool pState, int slot_idx=-1)
 
bool HasButtstockAttached ()
 
int GetButtstockAttachmentIdx ()
 
void SetInvisibleRecursive (bool invisible, EntityAI parent=null, array< int > attachments=null)
 
void SoundHardTreeFallingPlay ()
 
void SoundSoftTreeFallingPlay ()
 
void SoundHardBushFallingPlay ()
 
void SoundSoftBushFallingPlay ()
 
void RegisterTransportHit (Transport transport)
 
bool GetInventoryHandAnimation (notnull InventoryLocation loc, out int value)
 
bool TranslateSlotFromSelection (string selection_name, out int slot_id)
 
bool IsUniversalTemperatureSource ()
 Universal Temperature Sources Helpers.
 
UTemperatureSource GetUniversalTemperatureSource ()
 
void SetUniversalTemperatureSource (UTemperatureSource uts)
 
vector GetUniversalTemperatureSourcePosition ()
 
RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour ()
 Remotely controlled devices helpers.
 
void PairRemote (notnull EntityAI trigger)
 
void UnpairRemote ()
 
EntityAI GetPairDevice ()
 
void SetPersistentPairID (int id)
 
bool HasTurnableValveBehavior ()
 Turnable Valve behaviour.
 
bool IsValveTurnable (int pValveIndex)
 
int GetTurnableValveIndex (int pComponentIndex)
 
void ExecuteActionsConnectedToValve (int pValveIndex)
 
set< intGetAttachmentExclusionInitSlotValue (int slotId)
 override this to modify slot behavior for specific items, or just set 'm_AttachmentExclusionMaskGlobal' value for simple items
 
void InitLegacyConfigExclusionValues ()
 
bool InitLegacyExclusionCheck ()
 
void InitLegacySlotExclusionValuesImplicit ()
 adding base one-directional relations between headgear, masks, eyewear, and headstraps (exception)
 
void InitLegacySlotExclusionValuesDerived ()
 
void InitGlobalExclusionValues ()
 override to init part of the mask, independent of slot-specific behavior
 
void AddSingleExclusionValueGlobal (EAttExclusions value)
 to help with item staging exclusions
 
void ClearSingleExclusionValueGlobal (EAttExclusions value)
 to help with item staging exclusions
 
void SetAttachmentExclusionMaskGlobal (set< int > values)
 
void SetAttachmentExclusionMaskSlot (int slotId, set< int > values)
 sets values for specific slot
 
bool IsExclusionFlagPresent (set< int > values)
 checks 'this' if the incoming flag is present for the current state (slot behavior and others)
 
bool IsExclusionFlagPresentRecursive (set< int > values, int targetSlot)
 Gets flag from what is effectively an owner.
 
bool CheckExclusionAccessCondition (int occupiedSlot, int targetSlot, set< int > value, inout set< int > adjustedValue)
 
void AdjustExclusionAccessCondition (int occupiedSlot, int testedSlot, set< int > value, inout set< int > adjustedValue)
 if we want to filter
 
bool CheckExclusionAccessPropagation (int occupiedSlot, int targetSlot, set< int > value, inout set< int > adjustedValue)
 special propagation contition
 
void AdjustExclusionAccessPropagation (int occupiedSlot, int testedSlot, set< int > value, inout set< int > adjustedValue)
 if we want to filter propagation specifically; DO NOT override unless you know what you are doing.
 
bool IsManagingArrows ()
 
ArrowManagerBase GetArrowManager ()
 
void SetFromProjectile (ProjectileStoppedInfo info)
 
void ClearInventory ()
 
bool IsSkinned ()
 Skinning.
 
void SetAsSkinned ()
 
bool CanBeSkinnedWith (EntityAI tool)
 
ComponentEnergyManager GetCompEM ()
 
bool HasEnergyManager ()
 If this item has class EnergyManager in its config then it returns true. Otherwise returns false.
 
void OnWorkStart ()
 Energy manager event: Called only once when this device starts doing its work.
 
void OnWork (float consumed_energy)
 Energy manager event: Called every device update if its supposed to do some work. The update can be every second or at random, depending on its manipulation.
 
void OnWorkStop ()
 Energy manager event: Called when the device stops working (was switched OFF or ran out of energy)
 
void OnSwitchOn ()
 Energy manager event: Called when the device is switched on.
 
void OnSwitchOff ()
 Energy manager event: Called when the device is switched OFF.
 
void OnIsPlugged (EntityAI source_device)
 Energy manager event: Called when this device is plugged into some energy source.
 
void OnIsUnplugged (EntityAI last_energy_source)
 Energy manager event: Called when this device is UNPLUGGED from the energy source.
 
void OnOwnSocketTaken (EntityAI device)
 Energy manager event: When something is plugged into this device.
 
void OnOwnSocketReleased (EntityAI device)
 Energy manager event: When something is UNPLUGGED from this device.
 
void OnInitEnergy ()
 Energy manager event: Object's initialization. Energy Manager is fully initialized by this point.
 
void OnEnergyConsumed ()
 Energy manager event: Called when energy was consumed on this device. ALWAYS CALL super.OnEnergyConsumed() !!!
 
void OnEnergyAdded ()
 Energy manager event: Called when energy was added on this device. ALWAYS CALL super.OnEnergyAdded() !!!
 

Защищенные статические члены

static EWetnessLevel GetWetLevelInternal (float wetness)
 

Защищенные данные

bool m_RoofAbove = false
 
ref DamageZoneMap m_DamageZoneMap
 
bool m_CanDisplayWeight
 
float m_ElapsedSinceLastUpdate
 
float m_PreviousRoofTestTime = 0
 
UTemperatureSource m_UniversalTemperatureSource
 
bool m_PendingDelete = false
 
bool m_Initialized = false
 
bool m_TransportHitRegistered = false
 
vector m_TransportHitVelocity
 
int m_VariablesMask
 
float m_VarTemperature
 
float m_VarTemperatureInit
 
float m_VarTemperatureMin
 
float m_VarTemperatureMax
 
float m_VarTemperatureFreezeThreshold
 
float m_VarTemperatureThawThreshold
 
float m_VarTemperatureFreezeTime
 
float m_VarTemperatureThawTime
 
float m_VarTemperatureOverheatTime
 
float m_VarHeatPermeabilityCoef
 
ref TemperatureAccessComponent m_TAC
 
bool m_IsFrozen
 
bool m_IsFrozenLocal
 
float m_FreezeThawProgress
 
float m_OverheatProgress
 
ref ScriptInvoker m_OnItemAttached
 
ref ScriptInvoker m_OnItemDetached
 
ref ScriptInvoker m_OnItemAddedIntoCargo
 
ref ScriptInvoker m_OnItemRemovedFromCargo
 
ref ScriptInvoker m_OnItemMovedInCargo
 
ref ScriptInvoker m_OnItemFlipped
 
ref ScriptInvoker m_OnViewIndexChanged
 
ref ScriptInvoker m_OnSetLock
 
ref ScriptInvoker m_OnReleaseLock
 
ref ScriptInvoker m_OnAttachmentSetLock
 
ref ScriptInvoker m_OnAttachmentReleaseLock
 
ref ScriptInvoker m_OnHitByInvoker
 
ref ScriptInvoker m_OnKilledInvoker
 

Закрытые члены

proto native void SetNearPlane (float nearPlane)
 
proto native float GetNearPlane ()
 
proto native void SetActive (bool active)
 Sets this camera as active.
 
proto native bool IsActive ()
 Is this camera active?
 
proto native void SetFOV (float fov)
 Field of View settings.
 
proto native void SetFocus (float distance, float blur)
 Depth of Field settings.
 
proto native void LookAt (vector targetPos)
 Orientation change by lookAt point.
 
Component CreateComponent (int comp_type, string extended_class_name="")
 CreateComponent.
 
Component GetComponent (int comp_type, string extended_class_name="")
 GetComponent.
 
bool DeleteComponent (int comp_type)
 DeleteComponent.
 
string GetDestructionBehaviour ()
 
bool IsDestructionBehaviour ()
 
bool HasComponent (int comp_type)
 IsComponentExist.
 
void MaxLifetimeRefreshCalc ()
 Calculates if the max lifetime is higher than refresher frequency (i.e. gets kept alive by refresher)
 
bool IsRefresherSignalingViable ()
 
void InitDamageZoneMapping ()
 Initializes script-side map of damage zones and their components (named selections in models)
 
void InitDamageZoneDisplayNameMapping ()
 Initialize map of damage zone display names for more optimized retrieval.
 
void InitAttachmentExclusionValues ()
 
void InitInherentSlotExclusionMap ()
 map stored on instance to better respond to various state changes
 
void PropagateExclusionValueRecursive (set< int > values, int slotId)
 
void ClearExclusionValueRecursive (set< int > values, int slotId)
 
set< intGetAttachmentExclusionMaskAll (int slotId)
 Slot-specific, children (attachments), and additional (state etc.) masks combined.
 
set< intGetAttachmentExclusionMaskSlot (int slotId)
 Specific slot behavior.
 
set< intGetAttachmentExclusionMaskGlobal ()
 Global mask value, independent of slot-specific behavior!
 
set< intGetAttachmentExclusionMaskChildren ()
 Mask value coming from the item's attachments.
 
bool HasInternalExclusionConflicts (int targetSlot)
 checks if any attachment or item state would interfere with this being attached into a different slot (Headgear -> Mask)
 
proto native void SetLightType (int pType)
 
proto native int GetLightType ()
 
proto native void SetEnabled (bool pState)
 
proto native bool IsEnabled ()
 
proto native void SetCastShadow (bool pState)
 
proto native bool GetCastShadow ()
 
proto native bool EnableSpecular (bool pState)
 
proto native bool EnableLinear (bool pState)
 
proto native void SetPulseCoef (float pState)
 
proto native void SetVisibleDuringDaylight (bool pState)
 
proto native bool IsVisibleDuringDaylight ()
 
proto native void SetRadius (float pValue)
 
proto native float GetRadius ()
 
proto native void EnableHeatHaze (bool pState)
 
proto native void SetHeatHazeRadius (float pValue)
 
proto native float GetHeatHazeRadius ()
 
proto native void SetHeatHazePower (float pValue)
 
proto native float GetHeatHazePower ()
 
proto native void SetDiffuseColor (float pRed, float pGreen, float pBlue)
 
proto native void SetDiffuseColorV (vector pColorVector)
 
proto native void SetDiffuseAlpha (float pAlpha)
 
proto native vector GetDiffuseColorV ()
 
proto native float GetDiffuseAlpha ()
 
proto native void SetAmbientColor (float pRed, float pGreen, float pBlue)
 
proto native void SetAmbientColorV (vector pColorVector)
 
proto native void SetAmbientAlpha (float pAlpha)
 
proto native vector GetAmbientColorV ()
 
proto native float GetAmbientAlpha ()
 
proto native void SetBrightness (float pValue)
 
proto native float GetBrightness ()
 
proto native void SetFlareVisible (bool pState)
 
proto native bool IsFlareVisible ()
 
proto native void SetFlareRelPosition (vector pPosition)
 
proto native vector GetFlareRelPosition ()
 
proto native void SetSpotLightAngle (float pValue)
 
proto native float GetSpotLightAngle ()
 
proto native float GetSoundLength ()
 

Закрытые статические члены

static proto native Camera GetCurrentCamera ()
 Returns active Camera instance (note: player's camera is not Camera instance - thus it return null)
 
static proto native float GetCurrentFOV ()
 Returns FOV of current camera object.
 
static proto native void InterpolateTo (Camera targetCamera, float time, int type)
 Interpolation between camera instances (current camera becomes targetCamera at the end of interpolation)
 

Закрытые данные

bool m_DeathSyncSent
 
bool m_KilledByHeadshot
 
bool m_PreparedToDelete = false
 
bool m_RefresherViable = false
 
bool m_WeightDirty = 1
 
ref map< int, ref set< int > > m_AttachmentExclusionSlotMap
 
ref set< intm_AttachmentExclusionMaskGlobal
 
ref set< intm_AttachmentExclusionMaskChildren
 
ref DestructionEffectBase m_DestructionBehaviourObj
 
ref KillerData m_KillerData
 
ref HiddenSelectionsData m_HiddenSelectionsData
 
const int DEAD_REPLACE_DELAY = 250
 
const int DELETE_CHECK_DELAY = 100
 
ref array< EntityAIm_AttachmentsWithCargo
 
ref array< EntityAIm_AttachmentsWithAttachments
 
ref InventoryLocation m_OldLocation
 
ref map< int, stringm_DamageDisplayNameMap = new map<int, string>
 
float m_Weight
 
float m_WeightEx
 
float m_ConfigWeight = ConfigGetInt("weight")
 
float m_LastUpdatedTime
 
ref ComponentsBank m_ComponentsBank
 
ComponentEnergyManager m_EM
 
int m_ViewIndex = 0
 
void SetViewIndex (int index)
 Sets item preview index.
 
int GetViewIndex ()
 Returns item preview index !!!! IF OVERRIDING with more dynamic events call GetOnViewIndexChanged() in constructor on client !!!!
 

Подробное описание

Конструктор(ы)

◆ ~EntityAI()

void ~EntityAI ( )
inlineprotected
240 {
241
242 }

Методы

◆ AddSingleExclusionValueGlobal()

void AddSingleExclusionValueGlobal ( EAttExclusions value)
inlineprotected

to help with item staging exclusions

4329 {
4330 if (m_AttachmentExclusionMaskGlobal.Find(value) == -1)
4332 }
ref set< int > m_AttachmentExclusionMaskGlobal
Definition EntityAI.c:108
Definition EntityAI.c:95

◆ AddTemperature()

void AddTemperature ( float value)
inlineprotected
2258 {
2260 }
void SetTemperature(float value, bool allow_client=false)
not really deprecated, but missing context info from TemperatureData. Default values used instead.
Definition EntityAI.c:2245
float GetTemperature()
Definition EntityAI.c:2379

◆ AddWet()

void AddWet ( float value)
protected

◆ AdjustExclusionAccessCondition()

void AdjustExclusionAccessCondition ( int occupiedSlot,
int testedSlot,
set< int > value,
inout set< int > adjustedValue )
inlineprotected

if we want to filter

4516 {
4518 }

◆ AdjustExclusionAccessPropagation()

void AdjustExclusionAccessPropagation ( int occupiedSlot,
int testedSlot,
set< int > value,
inout set< int > adjustedValue )
inlineprotected

if we want to filter propagation specifically; DO NOT override unless you know what you are doing.

4538 {
4540 }
void AdjustExclusionAccessCondition(int occupiedSlot, int testedSlot, set< int > value, inout set< int > adjustedValue)
if we want to filter
Definition EntityAI.c:4515

◆ AfterStoreLoad()

void AfterStoreLoad ( )
inlineprotected

Called when entity is being loaded from DB or Storage (after all children loaded)

1330 {
1331 }

◆ AreChildrenAccessible()

bool AreChildrenAccessible ( )
inlineprotected
1614 {
1616 EntityAI ent = this;
1617 int attachmentDepth = 0;
1618 while (ent)
1619 {
1620 if (ent.GetInventory().GetCurrentInventoryLocation(lcn) && lcn.IsValid())
1621 {
1622 if (lcn.GetType() == InventoryLocationType.CARGO || lcn.GetType() == InventoryLocationType.PROXYCARGO)
1623 {
1624 return false;
1625 }
1626
1627 //hands treated as regular attachment here
1628 if (lcn.GetType() == InventoryLocationType.ATTACHMENT || lcn.GetType() == InventoryLocationType.HANDS)
1629 {
1631 }
1632 }
1633
1634 ent = ent.GetHierarchyParent();
1635 }
1636
1638 }
InventoryLocationType
types of Inventory Location
Definition InventoryLocation.c:4
Definition Building.c:6
Definition constants.c:638
InventoryLocation.
Definition InventoryLocation.c:29
const int INVENTORY_MAX_REACHABLE_DEPTH_ATT
Inventory visibility depth, also governs default direct access for most cases. Actual inventory depth...
Definition constants.c:1013

Перекрестные ссылки GameConstants::INVENTORY_MAX_REACHABLE_DEPTH_ATT.

◆ AttemptDestructionBehaviour()

void AttemptDestructionBehaviour ( int oldLevel,
int newLevel,
string zone )
inlineprotected
1002 {
1004 {
1006
1007 if (destType)
1008 {
1010 {
1012 }
1013
1015 {
1016 m_DestructionBehaviourObj.OnHealthLevelChanged(this, oldLevel, newLevel, zone);
1017 }
1018 }
1019 else
1020 {
1021 ErrorEx("Incorrect destruction behaviour type, make sure the class returned in 'GetDestructionBehaviour()' is a valid type inheriting from 'DestructionEffectBase'");
1022 }
1023 }
1024 }
Definition DestructionEffectBase.c:2
ref DestructionEffectBase m_DestructionBehaviourObj
Definition EntityAI.c:111
bool IsDestructionBehaviour()
Definition EntityAI.c:330
string GetDestructionBehaviour()
Definition EntityAI.c:325
enum ShapeType ErrorEx
proto native ToType()
Returns internal type representation. Can be used in runtime, or cached in variables and used for fas...

Перекрестные ссылки ErrorEx, GetDestructionBehaviour() и IsDestructionBehaviour().

◆ CanAssignAttachmentsToQuickbar()

CanAssignAttachmentsToQuickbar ( )
inlineprotected
Возвращает
true if attached item can be assigned to quickbar safely
1755 {
1756 return true;
1757 }

◆ CanAssignToQuickbar()

CanAssignToQuickbar ( )
inlineprotected
Возвращает
true if item can be assigned to quickbar safely
1747 {
1748 return true;
1749 }

◆ CanBeActionTarget()

override bool CanBeActionTarget ( )
inlineprotected
778 {
779 if (super.CanBeActionTarget())
780 {
781 return !IsSetForDeletion();
782 }
783 else
784 {
785 return false;
786 }
787 }
bool IsSetForDeletion()
Definition EntityAI.c:772

◆ CanBeBackstabbed()

bool CanBeBackstabbed ( )
inlineprotected
727 {
728 return false;
729 }

◆ CanBeCombined()

bool CanBeCombined ( EntityAI other_item,
bool reservation_check = true,
bool stack_max_limit = false )
inlineprotected
1495 {
1496 return false;
1497 }

◆ CanBeFSwaped()

bool CanBeFSwaped ( )
inlineprotected
1482 {
1483 return true;
1484 }

◆ CanBeIgnitedBy()

bool CanBeIgnitedBy ( EntityAI igniter = NULL)
inlineprotected

Override this method so it checks whenever this item can be ignited right now or not. Evaluated on Server and Client.

510 {
511 return false;
512 }

◆ CanBePlaced()

bool CanBePlaced ( Man player,
vector position )
inlineprotected
589 {
590 return true;
591 }

◆ CanBePlacedFailMessage()

string CanBePlacedFailMessage ( Man player,
vector position )
inlineprotected

Method which returns message why object can't be placed at given position.

595 {
596 return "";
597 }

◆ CanBeSkinnedWith()

bool CanBeSkinnedWith ( EntityAI tool)
inlineprotected
493 {
494 if ( !IsSkinned() && tool )
495 if ( !IsAlive() )
496 return true;
497 return false;
498 }
bool IsSkinned()
Skinning.
Definition EntityAI.c:481

◆ CanBeSplit()

bool CanBeSplit ( )
inlineprotected

returns current splitability

631 {
632 return false;
633 }

◆ CanBeTargetedByAI()

bool CanBeTargetedByAI ( EntityAI ai)
inlineprotected
715 {
716 if (ai && ai.IsBeingBackstabbed())
717 {
718 return false;
719 }
720
721 if ( !dBodyIsActive( this ) && !IsMan() )
722 return false;
723 return !IsDamageDestroyed();
724 }
proto native bool dBodyIsActive(notnull IEntity ent)

Перекрестные ссылки dBodyIsActive() и EntityAI::IsMan().

◆ CanCombineAttachment()

bool CanCombineAttachment ( notnull EntityAI e,
int slot,
bool stack_max_limit = false )
inlineprotected
1487 {
1488 EntityAI att = GetInventory().FindAttachment(slot);
1489 if(att)
1490 return att.CanBeCombined(e, true, stack_max_limit);
1491 return false;
1492 }
proto native GameInventory GetInventory()

◆ CanDetachAttachment()

CanDetachAttachment ( EntityAI parent)
inlineprotected

calls this->CanDetachAttachment(parent)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, parent, "CanDetachAttachment");
1477 {
1478 return true;
1479 }

◆ CanDisplayAnyAttachmentSlot()

CanDisplayAnyAttachmentSlot ( )
inlineprotected
Возвращает
true if any attachment slot can be shown
1711 {
1712 int count = GetInventory().GetAttachmentSlotsCount();
1713 int slotID;
1714 for (int i = 0; i < count; i++)
1715 {
1716 slotID = GetInventory().GetAttachmentSlotId(i);
1718 {
1719 return true;
1720 }
1721 }
1722
1723 return false;
1724 }
bool CanDisplayAttachmentSlot(string slot_name)
Definition EntityAI.c:1692

Перекрестные ссылки CanDisplayAttachmentSlot().

◆ CanDisplayAttachmentCategory()

CanDisplayAttachmentCategory ( string category_name)
inlineprotected
Аргументы
category_name->nameof the attachment category that will or won't be displayed
Возвращает
true if attachment icon can be displayed in UI (inventory)
1731 {
1732 return true;
1733 }

◆ CanDisplayAttachmentSlot() [1/2]

bool CanDisplayAttachmentSlot ( int slot_id)
inlineprotected
1703 {
1705 }
provides access to slot configuration
Definition InventorySlots.c:6
static proto native bool GetShowForSlotId(int slot_Id)

Перекрестные ссылки InventorySlots::GetShowForSlotId().

◆ CanDisplayAttachmentSlot() [2/2]

bool CanDisplayAttachmentSlot ( string slot_name)
inlineprotected
1693 {
1694 Debug.LogWarning("Obsolete function - use CanDisplayAttachmentSlot with slot id parameter");
1696 }
Definition Debug.c:14
static void LogWarning(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as warning message.
Definition Debug.c:244
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id

Перекрестные ссылки InventorySlots::GetShowForSlotId(), InventorySlots::GetSlotIdFromString() и Debug::LogWarning().

◆ CanDisplayCargo()

CanDisplayCargo ( )
inlineprotected
Возвращает
true if cargo can be displayed in UI (inventory)
1739 {
1740 return GetInventory().GetCargo() != null;
1741 }

◆ CanDisplayWeight()

bool CanDisplayWeight ( )
inlineprotected

'displayWeight' in item config

458 {
459 return m_CanDisplayWeight;
460 }
bool m_CanDisplayWeight
Definition EntityAI.c:129

◆ CanDropEntity()

bool CanDropEntity ( notnull EntityAI item)
inlineprotected

Returns if item can be dropped out from this entity.

2057 {
2058 return true;
2059 }

◆ CanFreeze()

bool CanFreeze ( )
inlineprotected
2441 {
2443 }
float GetTemperatureMax()
Definition EntityAI.c:2394
float GetTemperatureMin()
Definition EntityAI.c:2389
float GetTemperatureFreezeThreshold()
Definition EntityAI.c:2408
float GetTemperatureThawThreshold()
Definition EntityAI.c:2413
bool CanHaveTemperature()
returns true used on selected items that have a temperature effect and can processes temperature chan...
Definition EntityAI.c:3744

Перекрестные ссылки CanHaveTemperature(), GetTemperatureFreezeThreshold() и GetTemperatureThawThreshold().

◆ CanHaveTemperature()

bool CanHaveTemperature ( )
inlineprotected

returns true used on selected items that have a temperature effect and can processes temperature changes

3745 {
3747 }

◆ CanIgniteItem()

bool CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprotected

Override this method and check if the given item can be ignited right now by this one. Evaluated on Server and Client.

516 {
517 return false;
518 }

◆ CanItemOverheat()

bool CanItemOverheat ( )
inlineprotected

Overheat time CAN be 0, GameConstants.TEMPERATURE_TIME_OVERHEAT_MIN is ignored if so.

2556 {
2557 return GetItemOverheatTime() >= 0;
2558 }
float GetItemOverheatTime()
any configured value >= 0 will simulate overheating
Definition EntityAI.c:2567

◆ CanLoadAttachment()

bool CanLoadAttachment ( EntityAI attachment)
inlineprotected
1429 {
1430 return true;
1431 }

◆ CanLoadItemIntoCargo()

CanLoadItemIntoCargo ( EntityAI item)
inlineprotected

calls this->CanLoadItemIntoCargo(item), is called on server start when loading in the storage

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, item, "CanLoadItemIntoCargo");
1529 {
1530 return true;
1531 }

◆ CanPutAsAttachment()

CanPutAsAttachment ( EntityAI parent)
inlineprotected

calls this->CanPutAsAttachment(parent)

Аргументы
[in]parenttarget entity this is trying to attach to
Возвращает
true if action allowed
Заметки
: engine code is scriptConditionExecute(this, parent, "CanPutAsAttachment")
1441 {
1442 return !IsHologram();
1443 }
override bool IsHologram()
Definition EntityAI.c:1645

Перекрестные ссылки IsHologram().

◆ CanPutInCargo()

CanPutInCargo ( EntityAI parent)
inlineprotected

calls this->CanPutInCargo(parent)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, parent, "CanPutInCargo");
1540 {
1541 return !IsHologram();
1542 }

Перекрестные ссылки IsHologram().

◆ CanPutIntoHands()

CanPutIntoHands ( EntityAI parent)
inlineprotected

calls this->CanPutIntoHands(parent)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, parent, "CanPutIntoHands");
1662 {
1663 return !IsHologram();
1664 }

Перекрестные ссылки IsHologram().

◆ CanReceiveAttachment()

CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprotected

calls this->CanReceiveAttachment(attachment)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, attachment, "CanReceiveAttachment");
1383 {
1384 //generic occupancy check
1385 EntityAI currentAtt = GetInventory().FindAttachment(slotId);
1386 bool hasInternalConflict = attachment.HasInternalExclusionConflicts(slotId);
1387 set<int> diff;
1389 if (currentAtt) //probably a swap or same-type swap
1390 {
1391 diff = attachment.GetAttachmentExclusionMaskAll(slotId);
1392 diff.RemoveItems(currentAtt.GetAttachmentExclusionMaskAll(slotId));
1393 if (diff.Count() == 0)
1394 {
1395 return !hasInternalConflict;
1396 }
1397 else
1398 {
1400 }
1401 }
1402 else if (attachment.GetInventory().GetCurrentInventoryLocation(curLoc) && curLoc.GetType() == InventoryLocationType.ATTACHMENT)
1403 {
1404 EntityAI rootOwner = attachment.GetHierarchyRoot();
1405 if (rootOwner && rootOwner == this.GetHierarchyRoot()) //attachment within the same exclusion hierarchy context
1406 {
1407 diff = attachment.GetAttachmentExclusionMaskAll(slotId);
1408 diff.RemoveItems(attachment.GetAttachmentExclusionMaskAll(curLoc.GetSlot()));
1409 if (diff.Count() == 0)
1410 {
1411 return !hasInternalConflict;
1412 }
1413 else
1414 {
1416 }
1417 }
1418 }
1419 return !hasInternalConflict && !IsExclusionFlagPresentRecursive(attachment.GetAttachmentExclusionMaskAll(slotId),slotId);
1420 }
bool IsExclusionFlagPresentRecursive(set< int > values, int targetSlot)
Gets flag from what is effectively an owner.
Definition EntityAI.c:4471
proto native EntityAI GetHierarchyRoot()
Returns root of current hierarchy (for example: if this entity is in Backpack on gnd,...

◆ CanReceiveItemIntoCargo()

CanReceiveItemIntoCargo ( EntityAI item)
inlineprotected

calls this->CanReceiveItemIntoCargo(item)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, item, "CanReceiveItemIntoCargo");
1515 {
1516 if (GetInventory() && GetInventory().GetCargo())
1517 return GetInventory().GetCargo().CanReceiveItemIntoCargo(item));
1518
1519 return true;
1520 }

◆ CanReceiveItemIntoHands()

CanReceiveItemIntoHands ( EntityAI item_to_hands)
inlineprotected

calls this->CanReceiveItemIntoHands(item_to_hands)

Возвращает
true if action allowed
Заметки
: scriptConditionExecute(this, item_to_hands, "CanReceiveItemIntoHands");
1609 {
1610 return true;
1611 }

◆ CanReleaseAttachment()

CanReleaseAttachment ( EntityAI attachment)
inlineprotected

calls this->CanReleaseAttachment(attachment)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, attachment, "CanReleaseAttachment");
1457 {
1458 if( attachment && attachment.GetInventory() && GetInventory() )
1459 {
1461 attachment.GetInventory().GetCurrentInventoryLocation( il );
1462 if( il.IsValid() )
1463 {
1464 int slot = il.GetSlot();
1465 return !GetInventory().GetSlotLock( slot );
1466 }
1467 }
1468 return true;
1469 }

◆ CanReleaseCargo()

CanReleaseCargo ( EntityAI cargo)
inlineprotected

calls this->CanReleaseCargo(cargo)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, cargo, "CanReleaseCargo");
1565 {
1566 return true;
1567 }

◆ CanReleaseFromHands()

CanReleaseFromHands ( EntityAI handheld)
inlineprotected

calls this->CanReleaseFromHands(handheld)

Возвращает
true if action allowed
Заметки
: scriptConditionExecute(this, handheld, "CanReleaseFromHands");
1673 {
1674 return true;
1675 }

◆ CanRemoveFromCargo()

CanRemoveFromCargo ( EntityAI parent)
inlineprotected

calls this->CanRemoveFromCargo(parent)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, parent, "CanRemoveFromCargo");
1576 {
1577 return true;
1578 }

◆ CanRemoveFromHands()

CanRemoveFromHands ( EntityAI parent)
inlineprotected

calls this->CanRemoveFromHands(parent)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, parent, "CanRemoveFromHands");
1684 {
1685 return true;
1686 }

◆ CanSaveItemInHands()

bool CanSaveItemInHands ( EntityAI item_in_hands)
inlineprotected
1651 {
1652 return true;
1653 }

◆ CanSwapEntities()

bool CanSwapEntities ( EntityAI otherItem,
InventoryLocation otherDestination,
InventoryLocation destination )
inlineprotected
2098 {
2099 return true;
2100 }

◆ CanSwapItemInCargo()

CanSwapItemInCargo ( EntityAI child_entity,
EntityAI new_entity )
inlineprotected

calls this->CanSwapItemInCargo(child_entity, new_entity)

Возвращает
true if action allowed
Заметки
: return ScriptConditionExecute(GetOwner(), child_entity, "CanSwapItemInCargo", new_entity);
1551 {
1552 if (GetInventory() && GetInventory().GetCargo())
1553 return GetInventory().GetCargo().CanSwapItemInCargo(child_entity, new_entity));
1554
1555 return true;
1556 }

◆ CanSwitchDuringAttach()

bool CanSwitchDuringAttach ( EntityAI parent)
inlineprotected
1447 {
1448 return false;
1449 }

◆ ChangeIntoOnAttach()

string ChangeIntoOnAttach ( string slot)
inlineprotected
3740{}

◆ ChangeIntoOnDetach()

string ChangeIntoOnDetach ( )
inlineprotected
3741{}

◆ CheckExclusionAccessCondition()

bool CheckExclusionAccessCondition ( int occupiedSlot,
int targetSlot,
set< int > value,
inout set< int > adjustedValue )
inlineprotected
4494 {
4497
4499 {
4501 return false;
4502 }
4503
4504 if (targetException)
4505 {
4507 return false;
4508 }
4509
4511 return adjustedValue.Count() != 0;
4512 }

◆ CheckExclusionAccessPropagation()

bool CheckExclusionAccessPropagation ( int occupiedSlot,
int targetSlot,
set< int > value,
inout set< int > adjustedValue )
inlineprotected

special propagation contition

4522 {
4525
4526 if (targetException)
4527 {
4529 return false;
4530 }
4531
4533 return adjustedValue.Count() != 0;
4534 }
void AdjustExclusionAccessPropagation(int occupiedSlot, int testedSlot, set< int > value, inout set< int > adjustedValue)
if we want to filter propagation specifically; DO NOT override unless you know what you are doing.
Definition EntityAI.c:4537
const int INVALID
Invalid slot (-1)
Definition InventorySlots.c:17

Перекрестные ссылки InventorySlots::INVALID.

◆ CheckForDestroy()

void CheckForDestroy ( )
inlineprotected
801 {
802 if (IsPrepareToDelete())
803 {
804 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(TryDelete, DELETE_CHECK_DELAY, false);
805 }
806 }
bool IsPrepareToDelete()
Definition EntityAI.c:808
bool TryDelete()
Definition EntityAI.c:813
const int DELETE_CHECK_DELAY
Definition EntityAI.c:117
proto native CGame GetGame()
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, GetGame() и IsPrepareToDelete().

◆ CheckForRoofLimited()

void CheckForRoofLimited ( float timeTresholdMS = 3000)
protected

Roof check for entity, limited by time (anti-spam solution)

◆ ClearExclusionValueRecursive()

void ClearExclusionValueRecursive ( set< int > values,
int slotId )
inlineprivate
4377 {
4378 if (values && values.Count() != 0)
4379 {
4382 GetInventory().GetCurrentInventoryLocation(lcn);
4384 {
4385 int count = passThis.Count();
4386 for (int i = 0; i < count; i++)
4387 {
4389 }
4390 EntityAI parent = GetHierarchyParent();
4391 if (parent)
4392 parent.ClearExclusionValueRecursive(passThis,lcn.GetSlot());
4393 }
4394 }
4395 }
ref set< int > m_AttachmentExclusionMaskChildren
Definition EntityAI.c:109
proto native EntityAI GetHierarchyParent()
Returns direct parent of current entity.
bool CheckExclusionAccessPropagation(int occupiedSlot, int targetSlot, set< int > value, inout set< int > adjustedValue)
special propagation contition
Definition EntityAI.c:4521

◆ ClearInventory()

void ClearInventory ( )
protected

◆ ClearSingleExclusionValueGlobal()

void ClearSingleExclusionValueGlobal ( EAttExclusions value)
inlineprotected

to help with item staging exclusions

4336 {
4338 if (idx != -1)
4340 }

◆ ClearWeightDirty()

void ClearWeightDirty ( )
inlineprotected
3455 {
3456 //Print("ent:" + this + " - ClearWeightDirty");
3457 m_WeightDirty = 0;
3458 }
bool m_WeightDirty
Definition EntityAI.c:105

◆ CombineItemsClient()

void CombineItemsClient ( EntityAI entity2,
bool use_stack_max = false )
inlineprotected
1504 {}

◆ CombineItemsEx()

void CombineItemsEx ( EntityAI entity2,
bool use_stack_max = false )
protected

◆ ConvertNonlethalDamage() [1/2]

float ConvertNonlethalDamage ( float damage)
inlineprotected

DEPRECATED - for legacy purposes.

442 {
443 return 0.0;
444 }

◆ ConvertNonlethalDamage() [2/2]

float ConvertNonlethalDamage ( float damage,
DamageType damageType )
inlineprotected
436 {
437 return 0.0;
438 }

◆ CreateAndInitInventory()

proto native void CreateAndInitInventory ( )
protected

◆ CreateComponent()

Component CreateComponent ( int comp_type,
string extended_class_name = "" )
inlineprivate

CreateComponent.

306 {
308 }
Component GetComponent(int comp_type, string extended_class_name="")
GetComponent.
Definition EntityAI.c:311

◆ DeathUpdate()

void DeathUpdate ( )
inlineprotected
1057 {
1059 dead_entity.SetOrientation(GetOrientation());
1060 if (KeepHealthOnReplace())
1061 dead_entity.SetHealth(GetHealth());
1062
1063 DeleteSafe();
1064 }
vector GetOrientation()
Definition AreaDamageManager.c:306
const int ECE_OBJECT_SWAP
Definition CentralEconomy.c:38
const int RF_ORIGINAL
Definition CentralEconomy.c:63
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
void DeleteSafe()
Definition EntityAI.c:751
string GetDeadItemName()
Definition EntityAI.c:1046
bool KeepHealthOnReplace()
Definition EntityAI.c:1051

Перекрестные ссылки ECE_OBJECT_SWAP, GetDeadItemName(), GetGame(), GetOrientation(), GetPosition, KeepHealthOnReplace() и RF_ORIGINAL.

◆ DebugBBoxDelete()

void DebugBBoxDelete ( )
inlineprotected
3235 {
3237 }
void DebugBBoxDelete()
const int COMP_TYPE_ETITY_DEBUG
Definition Component.c:8

Перекрестные ссылки COMP_TYPE_ETITY_DEBUG.

◆ DebugBBoxDraw()

Shape DebugBBoxDraw ( )
inlineprotected
3225 {
3227 }
Shape DebugBBoxDraw()

Перекрестные ссылки COMP_TYPE_ETITY_DEBUG.

◆ DebugBBoxSetColor()

void DebugBBoxSetColor ( int color)
inlineprotected
3230 {
3232 }
void DebugBBoxSetColor(int color)

Перекрестные ссылки COMP_TYPE_ETITY_DEBUG.

◆ DebugDirectionDelete()

void DebugDirectionDelete ( )
inlineprotected

Перекрестные ссылки COMP_TYPE_ETITY_DEBUG.

◆ DebugDirectionDraw()

Shape DebugDirectionDraw ( float distance = 1)
inlineprotected
3240 {
3242 }
Shape DebugDirectionDraw(float distance=1)

Перекрестные ссылки COMP_TYPE_ETITY_DEBUG.

◆ DebugDirectionSetColor()

void DebugDirectionSetColor ( int color)
inlineprotected
3245 {
3247 }
void DebugDirectionSetColor(int color)

Перекрестные ссылки COMP_TYPE_ETITY_DEBUG.

◆ DeferredInit()

void DeferredInit ( )
inlineprotected
286 {
287 m_Initialized = true;
288 }
bool m_Initialized
Definition EntityAI.c:137

Перекрестные ссылки m_Initialized.

◆ Delete()

override void Delete ( )
inlineprotected

Delete this object in next frame.

Возвращает
void
ItemBase item = GetGame().GetPlayer().CreateInInventory("GrenadeRGD5");
item.Delete();
Definition InventoryItem.c:731
740 {
741 m_PendingDelete = true;
742 super.Delete();
743 }
bool m_PendingDelete
Definition EntityAI.c:136

◆ DeleteComponent()

bool DeleteComponent ( int comp_type)
inlineprivate

DeleteComponent.

321 {
322 return m_ComponentsBank.DeleteComponent(comp_type);
323 }
ref ComponentsBank m_ComponentsBank
Definition EntityAI.c:301

◆ DeleteOnClient()

void DeleteOnClient ( )
inlineprotected
746 {
747 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Call(GetGame().ObjectDeleteOnClient, this);
748 }

Перекрестные ссылки CALL_CATEGORY_SYSTEM и GetGame().

◆ DeleteSafe()

void DeleteSafe ( )
inlineprotected
752 {
754 {
755 Delete();
756 }
757 else
758 {
759 if (GetGame().IsServer() && GetGame().IsMultiplayer())
760 GetHierarchyRootPlayer().JunctureDeleteItem(this);
761 else
762 GetHierarchyRootPlayer().AddItemToDelete(this);
763 }
764 }
override void Delete()
Delete this object in next frame.
Definition EntityAI.c:739
proto native Man GetHierarchyRootPlayer()
Returns root of current hierarchy cast to Man.

Перекрестные ссылки GetGame().

◆ DeleteSave()

void DeleteSave ( )
inlineprotected
768 {
769 DeleteSafe();
770 }

◆ DeSerializeNumericalVars()

void DeSerializeNumericalVars ( array< float > floats)
inlineprotected
3158 {
3159 // the order of serialization must be the same as the order of de-serialization
3160 int index = 0;
3161 int mask = Math.Round(floats.Get(index));
3162
3163 index++;
3164 //--------------------------------------------
3166 {
3167 float temperature = floats.Get(index);
3169 floats.RemoveOrdered(index);
3170
3171 bool frozen = Math.Round(floats.Get(index));
3173 floats.RemoveOrdered(index);
3174 }
3175 }
void SetFrozen(bool frozen)
Definition EntityAI.c:2450
void SetTemperatureDirect(float value, bool allow_client=false)
Definition EntityAI.c:2230
Definition EnMath.c:7
const int VARIABLE_TEMPERATURE
Definition constants.c:607
static proto float Round(float f)
Returns mathematical round of value.

Перекрестные ссылки Math::Round() и VARIABLE_TEMPERATURE.

◆ DestroyInventory()

proto native void DestroyInventory ( )
protected

◆ DisassembleOnLastDetach()

bool DisassembleOnLastDetach ( )
inlineprotected
530 {
531 return false;
532 }

◆ DoPlacingHeightCheck()

bool DoPlacingHeightCheck ( )
inlineprotected

Do the roof check when placing this?

601 {
602 return false;
603 }

◆ EEAmmoChanged()

void EEAmmoChanged ( )
inlineprotected
975 {
977 }
void SetWeightDirty()
Definition EntityAI.c:3460

◆ EECargoIn()

void EECargoIn ( EntityAI item)
inlineprotected
1153 {
1155
1157 m_OnItemAddedIntoCargo.Invoke( item, this );
1158
1159 item.OnMovedInsideCargo(this);
1160 }
ref ScriptInvoker m_OnItemAddedIntoCargo
Definition EntityAI.c:173

◆ EECargoMove()

void EECargoMove ( EntityAI item)
inlineprotected
1173 {
1175 m_OnItemMovedInCargo.Invoke( item, this );
1176 item.OnMovedWithinCargo(this);
1177 }
ref ScriptInvoker m_OnItemMovedInCargo
Definition EntityAI.c:177

◆ EECargoOut()

void EECargoOut ( EntityAI item)
inlineprotected
1163 {
1165
1167 m_OnItemRemovedFromCargo.Invoke( item, this );
1168
1169 item.OnRemovedFromCargo(this);
1170 }
ref ScriptInvoker m_OnItemRemovedFromCargo
Definition EntityAI.c:175

◆ EEDelete()

void EEDelete ( EntityAI parent)
inlineprotected

Called right before object deleting.

898 {
899 m_PendingDelete = true;
900 GetInventory().EEDelete(parent);
901
902 if (m_EM)
904 }
void OnDeviceDestroyed()
Definition ComponentEnergyManager.c:322
ComponentEnergyManager m_EM
Definition EntityAI.c:302

Перекрестные ссылки ComponentEnergyManager::OnDeviceDestroyed().

◆ EEHealthLevelChanged()

void EEHealthLevelChanged ( int oldLevel,
int newLevel,
string zone )
inlineprotected
980 {
981 // Notify potential parent that this item was ruined
982 EntityAI parent = GetHierarchyParent();
983
985 {
986 if (parent)
987 {
988 parent.OnAttachmentRuined(this);
989 }
990 if (!zone)
991 {
993 }
995 }
996 }
void AttemptDestructionBehaviour(int oldLevel, int newLevel, string zone)
Definition EntityAI.c:1001
void OnDamageDestroyed(int oldLevel)
Called when the health gets to the min value, 'oldLevel' is previous health level,...
const int STATE_RUINED
Definition constants.c:807

Перекрестные ссылки OnDamageDestroyed() и GameConstants::STATE_RUINED.

◆ EEHitBy()

void EEHitBy ( TotalDamageResult damageResult,
int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo,
vector modelPos,
float speedCoef )
inlineprotected
1070 {
1071 if (m_OnHitByInvoker)
1073 #ifdef DEVELOPER
1074 //Print("EEHitBy: " + this + "; damageResult:"+ damageResult.GetDamage("","") +"; damageType: "+ damageType +"; source: "+ source +"; component: "+ component +"; dmgZone: "+ dmgZone +"; ammo: "+ ammo +"; modelPos: "+ modelPos);
1075 #endif
1076 }
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
ref ScriptInvoker m_OnHitByInvoker
Definition EntityAI.c:191

Перекрестные ссылки component.

◆ EEHitByRemote()

void EEHitByRemote ( int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo,
vector modelPos )
inlineprotected
1080 {
1081
1082 }

◆ EEInit()

void EEInit ( )
inlineprotected

Called upon object creation.

866 {
867 if (GetInventory())
868 {
869 GetInventory().EEInit();
872 for ( int i = 0; i < GetInventory().AttachmentCount(); i++ )
873 {
874 EntityAI attachment = GetInventory().GetAttachmentFromIndex( i );
875 if ( attachment )
876 {
877 if ( attachment.GetInventory().GetCargo() )
878 {
880 }
881
882 if ( attachment.GetInventory().GetAttachmentSlotsCount() > 0 )
883 {
885 }
886 }
887 }
888 }
889
891
892 if (CanHaveTemperature() && GetGame().IsServer())
894 }
void MaxLifetimeRefreshCalc()
Calculates if the max lifetime is higher than refresher frequency (i.e. gets kept alive by refresher)
Definition EntityAI.c:345
void InitTemperature()
Definition EntityAI.c:2207
ref array< EntityAI > m_AttachmentsWithAttachments
Definition EntityAI.c:120
ref array< EntityAI > m_AttachmentsWithCargo
Definition EntityAI.c:119

Перекрестные ссылки CanHaveTemperature() и GetGame().

◆ EEInventoryIn()

void EEInventoryIn ( Man newParentMan,
EntityAI diz,
EntityAI newParent )
inlineprotected
962 {
963 }

◆ EEInventoryOut()

void EEInventoryOut ( Man oldParentMan,
EntityAI diz,
EntityAI newParent )
inlineprotected
965 {
966 m_LastUpdatedTime = GetGame().GetTickTime();
967
968 if (GetInventory() && newParent == null)
969 {
970 GetInventory().ResetFlipCargo();
971 }
972 }
float m_LastUpdatedTime
Definition EntityAI.c:130

Перекрестные ссылки GetGame().

◆ EEItemAttached()

void EEItemAttached ( EntityAI item,
string slot_name )
inlineprotected
1086 {
1088 PropagateExclusionValueRecursive(item.GetAttachmentExclusionMaskAll(slotId),slotId); //Performed from parent to avoid event order issues on swap
1090
1091 if ( m_ComponentsBank != NULL )
1092 {
1093 for ( int comp_key = 0; comp_key < COMP_TYPE_COUNT; ++comp_key )
1094 {
1095 if ( m_ComponentsBank.IsComponentAlreadyExist(comp_key) )
1096 {
1097 m_ComponentsBank.GetComponent(comp_key).Event_OnItemAttached(item, slot_name);
1098 }
1099 }
1100 }
1101
1102 // Energy Manager
1103 if ( m_EM && item.GetCompEM())
1105
1106 if ( item.GetInventory().GetCargo() )
1107 m_AttachmentsWithCargo.Insert( item );
1108
1109 if ( item.GetInventory().GetAttachmentSlotsCount() > 0 )
1111
1112 if ( m_OnItemAttached )
1113 m_OnItemAttached.Invoke( item, slot_name, this );
1114 }
void OnAttachmentAdded(EntityAI elec_device)
Definition ComponentEnergyManager.c:1416
void PropagateExclusionValueRecursive(set< int > values, int slotId)
Definition EntityAI.c:4359
ref ScriptInvoker m_OnItemAttached
Definition EntityAI.c:169
const int COMP_TYPE_COUNT
Definition Component.c:12

Перекрестные ссылки COMP_TYPE_COUNT, InventorySlots::GetSlotIdFromString() и ComponentEnergyManager::OnAttachmentAdded().

◆ EEItemDetached()

void EEItemDetached ( EntityAI item,
string slot_name )
inlineprotected
1121 {
1123 ClearExclusionValueRecursive(item.GetAttachmentExclusionMaskAll(slotId),slotId); //Performed from parent to avoid event order issues on swap
1125
1126 if ( m_ComponentsBank != NULL )
1127 {
1128 for ( int comp_key = 0; comp_key < COMP_TYPE_COUNT; ++comp_key )
1129 {
1130 if ( m_ComponentsBank.IsComponentAlreadyExist(comp_key) )
1131 {
1132 m_ComponentsBank.GetComponent(comp_key).Event_OnItemDetached(item, slot_name);
1133 }
1134 }
1135 }
1136
1137 // Energy Manager
1138 if (m_EM && item.GetCompEM())
1140
1141 if ( m_AttachmentsWithCargo.Find( item ) > -1 )
1142 m_AttachmentsWithCargo.RemoveItem( item );
1143
1144 if ( m_AttachmentsWithAttachments.Find( item ) > -1 )
1145 m_AttachmentsWithAttachments.RemoveItem( item );
1146
1147
1148 if ( m_OnItemDetached )
1149 m_OnItemDetached.Invoke( item, slot_name, this );
1150 }
void OnAttachmentRemoved(EntityAI elec_device)
Definition ComponentEnergyManager.c:1434
void ClearExclusionValueRecursive(set< int > values, int slotId)
Definition EntityAI.c:4376
ref ScriptInvoker m_OnItemDetached
Definition EntityAI.c:171

Перекрестные ссылки COMP_TYPE_COUNT, InventorySlots::GetSlotIdFromString() и ComponentEnergyManager::OnAttachmentRemoved().

◆ EEItemLocationChanged()

void EEItemLocationChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprotected
924 {
925 EntityAI old_owner = oldLoc.GetParent();
926 EntityAI new_owner = newLoc.GetParent();
928
929 if (oldLoc.GetType() == InventoryLocationType.ATTACHMENT && newLoc.GetType() == InventoryLocationType.ATTACHMENT)
930 {
932 }
933
934 if (oldLoc.GetType() == InventoryLocationType.ATTACHMENT)
935 {
936 if (old_owner)
937 OnWasDetached(old_owner, oldLoc.GetSlot());
938 else
939 Error("EntityAI::EEItemLocationChanged - detached, but old_owner is null");
940 }
941
942 if (newLoc.GetType() == InventoryLocationType.ATTACHMENT)
943 {
944 if (new_owner)
945 OnWasAttached(newLoc.GetParent(), newLoc.GetSlot());
946 else
947 Error("EntityAI::EEItemLocationChanged - attached, but new_owner is null");
948 }
949 }
void OnWasDetached(EntityAI parent, int slot_id)
Definition EntityAI.c:1771
void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
Definition EntityAI.c:919
void OnWasAttached(EntityAI parent, int slot_id)
void OnItemAttachmentSlotChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
Definition EntityAI.c:921
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

Перекрестные ссылки Error(), OnItemAttachmentSlotChanged(), OnItemLocationChanged(), OnWasAttached() и OnWasDetached().

◆ EEKilled()

void EEKilled ( Object killer)
inlineprotected

called on server when the entity is killed

1031 {
1033 m_OnKilledInvoker.Invoke(this, killer);
1034
1035 GetGame().GetAnalyticsServer().OnEntityKilled(killer, this);
1036
1037 if (ReplaceOnDeath())
1038 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(DeathUpdate, DEAD_REPLACE_DELAY, false);
1039 }
void DeathUpdate()
Definition EntityAI.c:1056
bool ReplaceOnDeath()
Definition EntityAI.c:1041
const int DEAD_REPLACE_DELAY
Definition EntityAI.c:116
ref ScriptInvoker m_OnKilledInvoker
Definition EntityAI.c:193

Перекрестные ссылки CALL_CATEGORY_SYSTEM, DeathUpdate(), GetGame() и ReplaceOnDeath().

◆ EEOnAfterLoad()

void EEOnAfterLoad ( )
inlineprotected

Called when entity is part of "connected system" and being restored after load.

1292 {
1293 // ENERGY MANAGER
1294 // Restore connections between devices which were connected before server restart
1295 if ( m_EM && m_EM.GetRestorePlugState() )
1296 {
1301
1302 // get pointer to EntityAI based on this ID
1303 EntityAI potential_energy_source = GetGame().GetEntityByPersitentID(b1, b2, b3, b4); // This function is available only in this event!
1304
1305 // IMPORTANT!
1306 // Object IDs acquired here become INVALID when electric devices are transfered to another server while in plugged state (like Flashlight plugged into its attachment 9V battery)
1307 // To avoid issues, these items must be excluded from this system of restoring plug state so they don't unintentionally plug to incorrect devices through these invalid IDs.
1308 // Therefore their plug state is being restored withing the EEItemAttached() event while being excluded by the following 'if' conditions...
1309
1310 bool is_attachment = false;
1311
1314
1316 is_attachment = potential_energy_source.GetInventory().HasAttachment(this);
1317
1318 if ( potential_energy_source && potential_energy_source.GetCompEM() /*&& potential_energy_source.HasEnergyManager()*/ && !is_attachment )
1319 m_EM.PlugThisInto(potential_energy_source); // restore connection
1320 }
1321 }
int GetEnergySourceStorageIDb2()
Definition ComponentEnergyManager.c:1126
bool GetRestorePlugState()
Definition ComponentEnergyManager.c:729
int GetEnergySourceStorageIDb4()
Definition ComponentEnergyManager.c:1138
bool PlugThisInto(EntityAI energy_source, int socket_id=-1)
Energy manager: Attempts to plug this device into the energy_source. Returns true if the action was s...
Definition ComponentEnergyManager.c:735
int GetEnergySourceStorageIDb1()
Definition ComponentEnergyManager.c:1120
int GetEnergySourceStorageIDb3()
Definition ComponentEnergyManager.c:1132

Перекрестные ссылки ComponentEnergyManager::GetEnergySourceStorageIDb1(), ComponentEnergyManager::GetEnergySourceStorageIDb2(), ComponentEnergyManager::GetEnergySourceStorageIDb3(), ComponentEnergyManager::GetEnergySourceStorageIDb4(), GetGame(), ComponentEnergyManager::GetRestorePlugState() и ComponentEnergyManager::PlugThisInto().

◆ EEOnCECreate()

void EEOnCECreate ( )
inlineprotected

Called when entity is being created as new by CE/ Debug.

1325 {
1326 }

◆ EEParentedFrom()

void EEParentedFrom ( EntityAI parent)
inlineprotected

Called from 'IEntity.RemoveChild' or 'IEntity.AddChild' when hierarchy changes.

958 {
959 }

◆ EEParentedTo()

void EEParentedTo ( EntityAI parent)
inlineprotected

Called from 'IEntity.AddChild'.

953 {
954 }

◆ EnableHeatHaze()

proto native void EnableHeatHaze ( bool pState)
private

◆ EnableLinear()

proto native bool EnableLinear ( bool pState)
private

◆ EnableSpecular()

proto native bool EnableSpecular ( bool pState)
private

◆ EntityAI()

void EntityAI ( )
inlineprotected
201 {
202 // Set up the Energy Manager
203 string type = GetType();
204 string param_access_energy_sys = "CfgVehicles " + type + " EnergyManager ";
205 bool is_electic_device = GetGame().ConfigIsExisting(param_access_energy_sys);
206
207 if (is_electic_device) // TO DO: Check if this instance is a hologram (advanced placement). If Yes, then do not create Energy Manager component.
208 {
210 RegisterNetSyncVariableBool("m_EM.m_IsSwichedOn");
211 RegisterNetSyncVariableBool("m_EM.m_CanWork");
212 RegisterNetSyncVariableBool("m_EM.m_IsPlugged");
213 RegisterNetSyncVariableInt("m_EM.m_EnergySourceNetworkIDLow");
214 RegisterNetSyncVariableInt("m_EM.m_EnergySourceNetworkIDHigh");
215 RegisterNetSyncVariableFloat("m_EM.m_Energy");
216 }
217
218 // Item preview index
219 RegisterNetSyncVariableInt( "m_ViewIndex", 0, 99 );
220 // Refresher signalization
221 RegisterNetSyncVariableBool("m_RefresherViable");
222
225 m_LastUpdatedTime = 0.0;
227
228 m_CanDisplayWeight = ConfigGetBool("displayWeight");
229
233
235
236 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(DeferredInit,34);
237 }
eBleedingSourceType GetType()
Definition BleedingSource.c:63
ref HiddenSelectionsData m_HiddenSelectionsData
Definition EntityAI.c:114
proto native void RegisterNetSyncVariableFloat(string variableName, float minValue=0, float maxValue=0, int precision=1)
registers float variable synchronized over network
proto native void RegisterNetSyncVariableBool(string variableName)
registers bool variable synchronized over network
void InitDamageZoneDisplayNameMapping()
Initialize map of damage zone display names for more optimized retrieval.
Definition EntityAI.c:390
proto native void RegisterNetSyncVariableInt(string variableName, int minValue=0, int maxValue=0)
registers int variable synchronized over network
Component CreateComponent(int comp_type, string extended_class_name="")
CreateComponent.
Definition EntityAI.c:305
void DeferredInit()
Definition EntityAI.c:285
void InitItemVariables()
Definition EntityAI.c:244
void InitDamageZoneMapping()
Initializes script-side map of damage zones and their components (named selections in models)
Definition EntityAI.c:383
float m_ElapsedSinceLastUpdate
Definition EntityAI.c:131
Definition HiddenSelectionsData.c:2
const int COMP_TYPE_ENERGY_MANAGER
Definition Component.c:9

Перекрестные ссылки CALL_CATEGORY_SYSTEM, COMP_TYPE_ENERGY_MANAGER, GetGame(), GetType() и InitItemVariables().

◆ EOnFrame()

override void EOnFrame ( IEntity other,
float timeSlice )
inlineprotected
3182 {
3183 if ( m_ComponentsBank != NULL )
3184 {
3185 for ( int comp_key = 0; comp_key < COMP_TYPE_COUNT; ++comp_key )
3186 {
3187 if ( m_ComponentsBank.IsComponentAlreadyExist(comp_key) )
3188 {
3189 m_ComponentsBank.GetComponent(comp_key).Event_OnFrame(other, timeSlice);
3190 }
3191 }
3192 }
3193 }

Перекрестные ссылки COMP_TYPE_COUNT.

◆ ExecuteActionsConnectedToValve()

void ExecuteActionsConnectedToValve ( int pValveIndex)
protected

◆ FindAttachmentBySlotName()

EntityAI FindAttachmentBySlotName ( string slot_name)
inlineprotected
1801 {
1802 if ( GetGame() )
1803 {
1806 return GetInventory().FindAttachment(slot_id);
1807 }
1808 return null;
1809 }

Перекрестные ссылки GetGame(), InventorySlots::GetSlotIdFromString() и InventorySlots::INVALID.

◆ GetAgents()

int GetAgents ( )
inlineprotected
676{ return 0; }

◆ GetAmbientAlpha()

proto native float GetAmbientAlpha ( )
private

◆ GetAmbientColorV()

proto native vector GetAmbientColorV ( )
private

◆ GetArrowManager()

ArrowManagerBase GetArrowManager ( )
inlineprotected
4548 {
4549 return null;
4550 }

◆ GetAttachmentByConfigTypeName()

EntityAI GetAttachmentByConfigTypeName ( string type)
inlineprotected

Get attached entity by config type name.

2044 {
2045 for ( int i = 0; i < GetInventory().AttachmentCount(); i++ )
2046 {
2047 EntityAI attachment = GetInventory().GetAttachmentFromIndex ( i );
2048 if ( attachment.IsKindOf ( type ) )
2049 return attachment;
2050 }
2051 return NULL;
2052 }

◆ GetAttachmentByType()

EntityAI GetAttachmentByType ( typename type )
inlineprotected

Get attached entity by type.

2030 {
2031 for ( int i = 0; i < GetInventory().AttachmentCount(); i++ )
2032 {
2033 EntityAI attachment = GetInventory().GetAttachmentFromIndex( i );
2034 if ( attachment && attachment.IsInherited( type ) )
2035 return attachment;
2036 }
2037 return NULL;
2038 }

◆ GetAttachmentExclusionInitSlotValue()

set< int > GetAttachmentExclusionInitSlotValue ( int slotId)
inlineprotected

override this to modify slot behavior for specific items, or just set 'm_AttachmentExclusionMaskGlobal' value for simple items

4142 {
4143 set<int> dflt = new set<int>;
4144 return dflt;
4145 }

◆ GetAttachmentExclusionMaskAll()

set< int > GetAttachmentExclusionMaskAll ( int slotId)
inlineprivate

Slot-specific, children (attachments), and additional (state etc.) masks combined.

4399 {
4400 set<int> values = new set<int>();
4402 if (slotValues)
4403 values.InsertSet(slotValues);
4406
4407 return values;
4408 }
set< int > GetAttachmentExclusionMaskSlot(int slotId)
Specific slot behavior.
Definition EntityAI.c:4411

◆ GetAttachmentExclusionMaskChildren()

set< int > GetAttachmentExclusionMaskChildren ( )
inlineprivate

Mask value coming from the item's attachments.

4424 {
4426 }

◆ GetAttachmentExclusionMaskGlobal()

set< int > GetAttachmentExclusionMaskGlobal ( )
inlineprivate

Global mask value, independent of slot-specific behavior!

4418 {
4420 }

◆ GetAttachmentExclusionMaskSlot()

set< int > GetAttachmentExclusionMaskSlot ( int slotId)
inlineprivate

Specific slot behavior.

4412 {
4414 }
ref map< int, ref set< int > > m_AttachmentExclusionSlotMap
Definition EntityAI.c:107

◆ GetAttachmentSoundType()

string GetAttachmentSoundType ( )
inlineprotected

returns sound type of attachment (used for clothing and weapons on DayZPlayerImplement, paired with Anim*Type enum from DayZAnimEvents)

3718 {
3719 return "None";
3720 }

◆ GetAttachmentsWithAttachments()

array< EntityAI > GetAttachmentsWithAttachments ( )
inlineprotected
658 {
660 }

◆ GetAttachmentsWithCargo()

array< EntityAI > GetAttachmentsWithCargo ( )
inlineprotected
653 {
655 }

◆ GetBayonetAttachmentIdx()

int GetBayonetAttachmentIdx ( )
inlineprotected
3906{};

◆ GetBrightness()

proto native float GetBrightness ( )
private

◆ GetButtstockAttachmentIdx()

int GetButtstockAttachmentIdx ( )
inlineprotected
3910{};

◆ GetCastShadow()

proto native bool GetCastShadow ( )
private

◆ GetCleanness()

int GetCleanness ( )
inlineprotected
2669 {
2670 return 0;
2671 }

◆ GetColor()

void GetColor ( out int r,
out int g,
out int b,
out int a )
inlineprotected
2644 {
2645 r = -1;
2646 g = -1;
2647 b = -1;
2648 a = -1;
2649 }

◆ GetCompBS()

ComponentBodyStaging GetCompBS ( )
inlineprotected

Use this to access Body Staging component on dead character. Returns NULL if the given object lacks such component.

3300 {
3303 return NULL;
3304 }
Definition BodyStaging.c:10
bool HasComponent(int comp_type)
IsComponentExist.
Definition EntityAI.c:336
const int COMP_TYPE_BODY_STAGING
Definition Component.c:10

Перекрестные ссылки COMP_TYPE_BODY_STAGING.

◆ GetCompEM()

ComponentEnergyManager GetCompEM ( )
inlineprotected

energy manager ENERGY MANAGER:Documentation: Confluence >> Camping & Squatting >> Electricity >> Energy Manager functionalities Use this to access Energy Manager component on your device. Returns NULL if the given object lacks such component.

3310 {
3311 if (m_EM)
3312 return m_EM;
3313
3316 return NULL;
3317 }
Definition ComponentEnergyManager.c:19

Перекрестные ссылки COMP_TYPE_ENERGY_MANAGER.

◆ GetComponent()

Component GetComponent ( int comp_type,
string extended_class_name = "" )
inlineprivate

GetComponent.

312 {
313 if ( m_ComponentsBank == NULL )
315
316 return m_ComponentsBank.GetComponent(comp_type, extended_class_name);
317 }
Definition ComponentsBank.c:2

◆ GetConfigWeightModified()

float GetConfigWeightModified ( )
inlineprotected
3432 {
3434 }
float GetWetWeightModifier()
Definition EntityAI.c:3426
float m_ConfigWeight
Definition EntityAI.c:128

◆ GetCurrentCamera()

static proto native Camera GetCurrentCamera ( )
staticprivate

Returns active Camera instance (note: player's camera is not Camera instance - thus it return null)

Возвращает
Camera active Camera instance

◆ GetCurrentFOV()

static proto native float GetCurrentFOV ( )
staticprivate

Returns FOV of current camera object.

Возвращает
float FOV of current camera object

◆ GetDeadItemName()

string GetDeadItemName ( )
inlineprotected
1047 {
1048 return "";
1049 }

◆ GetDebugActions()

void GetDebugActions ( out TSelectableActionInfoArrayEx outputList)
inlineprotected
3547 {
3548 //fix entity
3549 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.FIX_ENTITY, "Fix Entity", FadeColors.LIGHT_GREY));
3550
3551 //weight
3552 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.GET_TOTAL_WEIGHT, "Print Weight", FadeColors.LIGHT_GREY));
3553 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.GET_TOTAL_WEIGHT_RECALC, "Print Weight Verbose", FadeColors.LIGHT_GREY));
3554 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.GET_PLAYER_WEIGHT, "Print Player Weight", FadeColors.LIGHT_GREY));
3555 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.GET_PLAYER_WEIGHT_RECALC, "Print Player Weight Verbose", FadeColors.LIGHT_GREY));
3556 }
Param4< int, int, string, int > TSelectableActionInfoWithColor
Definition EntityAI.c:97
EActions
Definition EActions.c:2
const int SAT_DEBUG_ACTION
Definition constants.c:431

Перекрестные ссылки SAT_DEBUG_ACTION.

◆ GetDebugButtonNames()

void GetDebugButtonNames ( out string button1,
out string button2,
out string button3,
out string button4 )
inlineprotected
3219{}//DEPRICATED, USE GetDebugActions / OnAction

◆ GetDebugText()

string GetDebugText ( )
inlineprotected
3196 {
3197 string text = string.Empty;
3198
3199 text += "Weight: " + GetWeightEx() + "\n";
3200 text += "Disabled: " + GetIsSimulationDisabled() + "\n";
3201 #ifdef SERVER
3202 if (GetEconomyProfile())
3203 text += "CE Lifetime default: " + (int)GetEconomyProfile().GetLifetime() + "\n";
3204 text += "CE Lifetime remaining: " + (int)GetLifetime() + "\n";
3205 #endif
3206
3208 if (compEM)
3209 {
3210 text += "Energy Source: " + Object.GetDebugName(compEM.GetEnergySource()) + "\n";
3211 text += "Switched On: " + compEM.IsSwitchedOn() + "\n";
3212 text += "Is Working: " + compEM.IsWorking() + "\n";
3213 }
3214
3215 return text;
3216 }
Param3 int
float GetWeightEx(bool forceRecalc=false)
returns overall weight of the entity, 'forceRecalc = true' is meant to be used only when debugging,...
Definition EntityAI.c:3516
proto native CEItemProfile GetEconomyProfile()
Get economy item profile (if assigned, otherwise null)
proto native float GetLifetime()
Get remaining economy lifetime (seconds)
ComponentEnergyManager GetCompEM()
Definition EntityAI.c:3309
Definition ObjectTyped.c:2

◆ GetDefaultHitComponent()

string GetDefaultHitComponent ( )
inlineprotected

returns default hit component for the Entity (overriden for each Type - PlayerBase, DayZInfected, DayZAnimal, etc.)

returns Global so it is obvious you need to configure that properly on entity

3685 {
3686 Debug.LogError("EntityAI: DefaultHitComponent not set properly for that entity (" + GetType() + ")");
3688 return "";
3689 }
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:259

Перекрестные ссылки GetType() и Debug::LogError().

◆ GetDefaultHitPosition()

vector GetDefaultHitPosition ( )
inlineprotected
3705 {
3706 Debug.LogError("EntityAI: DefaultHitPosition not set for that entity (" + GetType() + ")");
3707 return vector.Zero;
3708 }
Definition EnConvert.c:106
static const vector Zero
Definition EnConvert.c:110

Перекрестные ссылки GetType(), Debug::LogError() и vector::Zero.

◆ GetDefaultHitPositionComponent()

string GetDefaultHitPositionComponent ( )
inlineprotected

returns default hit position component name for the Entity (overriden by type if needed - used mainly as support for impact particles)

3693 {
3694 Debug.LogError("EntityAI: DefaultHitPositionComponent not set for that entity (" + GetType() + ")");
3695 return "";
3696 }

Перекрестные ссылки GetType() и Debug::LogError().

◆ GetDestructionBehaviour()

string GetDestructionBehaviour ( )
inlineprivate
326 {
327 return "";
328 }

◆ GetDiffuseAlpha()

proto native float GetDiffuseAlpha ( )
private

◆ GetDiffuseColorV()

proto native vector GetDiffuseColorV ( )
private

◆ GetEconomyProfile()

proto native CEItemProfile GetEconomyProfile ( )
protected

Get economy item profile (if assigned, otherwise null)

◆ GetEntityDamageDisplayNameMap()

map< int, string > GetEntityDamageDisplayNameMap ( )
inlineprotected
452 {
454 }
ref map< int, string > m_DamageDisplayNameMap
Definition EntityAI.c:124

◆ GetEntityDamageZoneMap()

DamageZoneMap GetEntityDamageZoneMap ( )
inlineprotected
447 {
448 return m_DamageZoneMap;
449 }
ref DamageZoneMap m_DamageZoneMap
Definition EntityAI.c:123

◆ GetFlareRelPosition()

proto native vector GetFlareRelPosition ( )
private

◆ GetFreezeThawProgress()

float GetFreezeThawProgress ( )
inlineprotected

on server only

2430 {
2431 return m_FreezeThawProgress;
2432 }
float m_FreezeThawProgress
Definition EntityAI.c:162

◆ GetHeatHazePower()

proto native float GetHeatHazePower ( )
private

◆ GetHeatHazeRadius()

proto native float GetHeatHazeRadius ( )
private

◆ GetHeatPermeabilityCoef()

float GetHeatPermeabilityCoef ( )
inlineprotected

Returns temperature change speed multiplier for this item and all its children (multiplicative interaction)

Заметки
Values > 1 accelerate, values in <0,1) interval decelerate. Values < 0 should not be used here, but I'm not your mom.
2404 {
2406 }
float m_VarHeatPermeabilityCoef
Definition EntityAI.c:156

◆ GetHiddenSelectionIndex()

int GetHiddenSelectionIndex ( string selection)
inlineprotected

Returns index of the string found in cfg array 'hiddenSelections'. If it's not found then it returns -1.

2701 {
2703 return m_HiddenSelectionsData.GetHiddenSelectionIndex( selection );
2704
2705 return -1;
2706 }

◆ GetHiddenSelections()

override TStringArray GetHiddenSelections ( )
inlineprotected

Returns the hiddenSelectionsTextures array from the object's config.

2710 {
2712 return m_HiddenSelectionsData.m_HiddenSelections;
2713 else
2714 return super.GetHiddenSelections();
2715 }

◆ GetHiddenSelectionsData()

HiddenSelectionsData GetHiddenSelectionsData ( )
inlineprotected
2695 {
2697 }

◆ GetHiddenSelectionsMaterials()

override TStringArray GetHiddenSelectionsMaterials ( )
inlineprotected

Returns the hiddenSelectionsMaterials array from the object's config.

2728 {
2730 return m_HiddenSelectionsData.m_HiddenSelectionsMaterials;
2731 else
2732 return super.GetHiddenSelectionsMaterials();
2733 }

◆ GetHiddenSelectionsTextures()

override TStringArray GetHiddenSelectionsTextures ( )
inlineprotected

Returns the hiddenSelectionsTextures array from the object's config.

2719 {
2721 return m_HiddenSelectionsData.m_HiddenSelectionsTextures;
2722 else
2723 return super.GetHiddenSelectionsTextures();
2724 }

◆ GetHideIconMask()

int GetHideIconMask ( )
inlineprotected

should the item's icon be hidden in any part of the inventory?

297 {
298 return EInventoryIconVisibility.ALWAYS;
299 }

◆ GetHierarchyLevel()

int GetHierarchyLevel ( int lvl = 0)
inlineprotected
852 {
853 if (!GetHierarchyParent())
854 return lvl;
855
856 return GetHierarchyParent().GetHierarchyLevel(lvl+1);
857 }

◆ GetHierarchyParent()

proto native EntityAI GetHierarchyParent ( )
protected

Returns direct parent of current entity.

◆ GetHierarchyRoot()

proto native EntityAI GetHierarchyRoot ( )
protected

Returns root of current hierarchy (for example: if this entity is in Backpack on gnd, returns Backpack)

◆ GetHierarchyRootPlayer()

proto native Man GetHierarchyRootPlayer ( )
protected

Returns root of current hierarchy cast to Man.

◆ GetHitComponentForAI()

string GetHitComponentForAI ( )
inlineprotected

Returns hit component for the Entity (overriden for each Type - PlayerBase, DayZInfected, DayZAnimal, etc.)

returns Global so it is obvious you need to configure that properly on entity

3677 {
3678 Debug.LogError("EntityAI: HitComponentForAI not set properly for that entity (" + GetType() + ")");
3680 return "";
3681 }

Перекрестные ссылки GetType() и Debug::LogError().

◆ GetInventory()

proto native GameInventory GetInventory ( )
protected

◆ GetInventoryAndCargoWeight()

float GetInventoryAndCargoWeight ( bool forceRecalc = false)
inlineprotected
3482 {
3483 float totalWeight;
3484 if (GetInventory())
3485 {
3486 int i = 0;
3487 int AttachmentsCount = GetInventory().AttachmentCount();
3488 if (AttachmentsCount > 0)
3489 {
3490 for (i = 0; i < AttachmentsCount; i++)
3491 {
3492 totalWeight += GetInventory().GetAttachmentFromIndex(i).GetWeightEx(forceRecalc);
3493 }
3494 }
3495
3496 CargoBase cargo = GetInventory().GetCargo();
3497 if (cargo)
3498 {
3499 int cargoCount = cargo.GetItemCount();
3500 for (i = 0; i < cargoCount; i++)
3501 {
3502 totalWeight += cargo.GetItem(i).GetWeightEx(forceRecalc);
3503 }
3504 }
3505 }
3506 return totalWeight;
3507 }
represents base for cargo storage for entities
Definition Cargo.c:7

◆ GetInventoryHandAnimation()

bool GetInventoryHandAnimation ( notnull InventoryLocation loc,
out int value )
inlineprotected
4051 {
4052 value = -1;
4053 return false;
4054 }

◆ GetInvulnerabilityTypeString()

string GetInvulnerabilityTypeString ( )
inlineprotected
3877 {
3878 return "";
3879 }

◆ GetIsFrozen()

bool GetIsFrozen ( )
inlineprotected
2446 {
2447 return m_IsFrozen;
2448 }
bool m_IsFrozen
Definition EntityAI.c:160

◆ GetItemOverheatProgress()

float GetItemOverheatProgress ( )
inlineprotected
2578 {
2579 return m_OverheatProgress;
2580 }
float m_OverheatProgress
Definition EntityAI.c:164

◆ GetItemOverheatThreshold()

float GetItemOverheatThreshold ( )
inlineprotected

if undefined, max temperature used as default

2562 {
2563 return GetTemperatureMax();
2564 }

◆ GetItemOverheatTime()

float GetItemOverheatTime ( )
inlineprotected

any configured value >= 0 will simulate overheating

2568 {
2570 }
float m_VarTemperatureOverheatTime
Definition EntityAI.c:155

◆ GetLifetime()

proto native float GetLifetime ( )
protected

Get remaining economy lifetime (seconds)

◆ GetLifetimeMax()

proto native float GetLifetimeMax ( )
protected

Get max economy lifetime per instance - default is from DB (seconds)

◆ GetLightType()

proto native int GetLightType ( )
private

◆ GetLiquidThroughputCoef()

float GetLiquidThroughputCoef ( )
inlineprotected

Returns liquid throughput coeficient.

3872 {
3874 }
const float LIQUID_THROUGHPUT_DEFAULT
Definition constants.c:547

Перекрестные ссылки LIQUID_THROUGHPUT_DEFAULT.

◆ GetLiquidType()

int GetLiquidType ( )
inlineprotected
2637 {
2638 return 0;
2639 }

◆ GetMeleeTargetType()

int GetMeleeTargetType ( )
inlineprotected

value is related to EMeleeTargetType

3712 {
3713 return EMeleeTargetType.ALIGNABLE;
3714 }
EMeleeTargetType
Definition EMeleeTargetType.c:2

◆ GetNearPlane()

proto native float GetNearPlane ( )
private

get near plane of camera

◆ GetObjectMaterial()

proto native owned string GetObjectMaterial ( int index)
protected

◆ GetObjectTexture()

proto native owned string GetObjectTexture ( int index)
protected

◆ GetOnAttachmentReleaseLock()

ScriptInvoker GetOnAttachmentReleaseLock ( )
inlineprotected
1250 {
1254 }
ref ScriptInvoker m_OnAttachmentReleaseLock
Definition EntityAI.c:189
ScriptInvoker Class provide list of callbacks usage:
Definition tools.c:116

◆ GetOnAttachmentSetLock()

ScriptInvoker GetOnAttachmentSetLock ( )
inlineprotected
1243 {
1246 return m_OnAttachmentSetLock;
1247 }
ref ScriptInvoker m_OnAttachmentSetLock
Definition EntityAI.c:187

◆ GetOnHitByInvoker()

ScriptInvoker GetOnHitByInvoker ( )
inlineprotected
1257 {
1258 if ( !m_OnHitByInvoker )
1260 return m_OnHitByInvoker;
1261 }

◆ GetOnItemAddedIntoCargo()

ScriptInvoker GetOnItemAddedIntoCargo ( )
inlineprotected
1194 {
1198 }

◆ GetOnItemAttached()

ScriptInvoker GetOnItemAttached ( )
inlineprotected
1180 {
1181 if( !m_OnItemAttached )
1183 return m_OnItemAttached;
1184 }

◆ GetOnItemDetached()

ScriptInvoker GetOnItemDetached ( )
inlineprotected
1187 {
1188 if( !m_OnItemDetached )
1190 return m_OnItemDetached;
1191 }

◆ GetOnItemFlipped()

ScriptInvoker GetOnItemFlipped ( )
inlineprotected
1215 {
1216 if( !m_OnItemFlipped )
1218 return m_OnItemFlipped;
1219 }
ref ScriptInvoker m_OnItemFlipped
Definition EntityAI.c:179

◆ GetOnItemMovedInCargo()

ScriptInvoker GetOnItemMovedInCargo ( )
inlineprotected
1208 {
1211 return m_OnItemMovedInCargo;
1212 }

◆ GetOnItemRemovedFromCargo()

ScriptInvoker GetOnItemRemovedFromCargo ( )
inlineprotected

◆ GetOnKilledInvoker()

ScriptInvoker GetOnKilledInvoker ( )
inlineprotected
1264 {
1265 if ( !m_OnKilledInvoker )
1267 return m_OnKilledInvoker;
1268 }

◆ GetOnReleaseLock()

ScriptInvoker GetOnReleaseLock ( )
inlineprotected
1236 {
1237 if( !m_OnReleaseLock )
1239 return m_OnReleaseLock;
1240 }
ref ScriptInvoker m_OnReleaseLock
Definition EntityAI.c:185

◆ GetOnSetLock()

ScriptInvoker GetOnSetLock ( )
inlineprotected
1229 {
1230 if( !m_OnSetLock )
1232 return m_OnSetLock;
1233 }
ref ScriptInvoker m_OnSetLock
Definition EntityAI.c:183

◆ GetOnViewIndexChanged()

ScriptInvoker GetOnViewIndexChanged ( )
inlineprotected
1222 {
1225 return m_OnViewIndexChanged;
1226 }
ref ScriptInvoker m_OnViewIndexChanged
Definition EntityAI.c:181

◆ GetPairDevice()

EntityAI GetPairDevice ( )
protected

◆ GetPersistentID()

proto void GetPersistentID ( out int b1,
out int b2,
out int b3,
out int b4 )
protected

Returns blocks of bits of persistence id of this entity. This id stays the same even after server restart.

◆ GetQuantity()

float GetQuantity ( )
inlineprotected
2169 {
2170 return 0;
2171 }

◆ GetQuantityMax()

int GetQuantityMax ( )
inlineprotected
2179 {
2180 return 0;
2181 }

◆ GetQuantityMin()

int GetQuantityMin ( )
inlineprotected
2184 {
2185 return 0;
2186 }

◆ GetQuantityNormalized()

float GetQuantityNormalized ( )
inlineprotected
2174 {
2175 return 0;
2176 }

◆ GetQuickBarBonus()

int GetQuickBarBonus ( )
inlineprotected
2196 {
2197 return 0;
2198 }

◆ GetRadius()

proto native float GetRadius ( )
private

◆ GetRemotelyActivatedItemBehaviour()

RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour ( )
protected

Remotely controlled devices helpers.

◆ GetSingleInventoryItemWeightEx()

float GetSingleInventoryItemWeightEx ( )
inlineprotected
3544{}

◆ GetSlotsCountCorrect()

int GetSlotsCountCorrect ( )
inlineprotected
1793 {
1794 if (GetInventory())
1795 return GetInventory().GetAttachmentSlotsCount();
1796 else
1797 return -1;
1798 }

◆ GetSoundLength()

proto native float GetSoundLength ( )
private

◆ GetSpotLightAngle()

proto native float GetSpotLightAngle ( )
private

◆ GetStoreLoadedQuantity()

float GetStoreLoadedQuantity ( )
inlineprotected
2661 {
2662 return 0.0;
2663 }

◆ GetSuitableFinisherHitComponents()

array< string > GetSuitableFinisherHitComponents ( )
inlineprotected
3699 {
3700 Debug.LogError("EntityAI: SuitableFinisherHitComponents not set for that entity (" + GetType() + ")");
3701 return null;
3702 }

Перекрестные ссылки GetType() и Debug::LogError().

◆ GetTargetQuantityMax()

int GetTargetQuantityMax ( int attSlotID = -1)
inlineprotected
2191 {
2192 return 0;
2193 }

◆ GetTemperature()

float GetTemperature ( )
inlineprotected
2380 {
2381 return m_VarTemperature;
2382 }
float m_VarTemperature
Definition EntityAI.c:147

◆ GetTemperatureFreezeThreshold()

float GetTemperatureFreezeThreshold ( )
inlineprotected
2409 {
2411 }
float m_VarTemperatureFreezeThreshold
Definition EntityAI.c:151

◆ GetTemperatureFreezeTime()

float GetTemperatureFreezeTime ( )
inlineprotected
2419 {
2421 }
float m_VarTemperatureFreezeTime
Definition EntityAI.c:153

◆ GetTemperatureInit()

float GetTemperatureInit ( )
inlineprotected
2385 {
2386 return m_VarTemperatureInit;
2387 }
float m_VarTemperatureInit
Definition EntityAI.c:148

◆ GetTemperatureMax()

float GetTemperatureMax ( )
inlineprotected
2395 {
2396 return m_VarTemperatureMax;
2397 }
float m_VarTemperatureMax
Definition EntityAI.c:150

◆ GetTemperatureMin()

float GetTemperatureMin ( )
inlineprotected
2390 {
2391 return m_VarTemperatureMin;
2392 }
float m_VarTemperatureMin
Definition EntityAI.c:149

◆ GetTemperatureThawThreshold()

float GetTemperatureThawThreshold ( )
inlineprotected
2414 {
2416 }
float m_VarTemperatureThawThreshold
Definition EntityAI.c:152

◆ GetTemperatureThawTime()

float GetTemperatureThawTime ( )
inlineprotected
2424 {
2426 }
float m_VarTemperatureThawTime
Definition EntityAI.c:154

◆ GetTurnableValveIndex()

int GetTurnableValveIndex ( int pComponentIndex)
protected

◆ GetUniversalTemperatureSource()

UTemperatureSource GetUniversalTemperatureSource ( )
inlineprotected
4068 {
4070 }
UTemperatureSource m_UniversalTemperatureSource
Definition EntityAI.c:134

◆ GetUniversalTemperatureSourcePosition()

vector GetUniversalTemperatureSourcePosition ( )
inlineprotected
4078 {
4079 return GetPosition();
4080 }

Перекрестные ссылки GetPosition.

◆ GetVariablesFloat()

array< float > GetVariablesFloat ( )
inlineprotected
3059 {
3063 }
Definition UtilityClasses.c:41
static ref TFloatArray ARRAY_FLOAT
Definition UtilityClasses.c:50
void SerializeNumericalVars(array< float > floats_out)
Definition EntityAI.c:3144

Перекрестные ссылки CachedObjectsArrays::ARRAY_FLOAT и SerializeNumericalVars().

◆ GetViewIndex()

int GetViewIndex ( )
inlineprotected

Returns item preview index !!!! IF OVERRIDING with more dynamic events call GetOnViewIndexChanged() in constructor on client !!!!

3631 {
3632 if ( MemoryPointExists( "invView2" ) )
3633 {
3634 #ifdef PLATFORM_WINDOWS
3636 GetInventory().GetCurrentInventoryLocation( il );
3637 InventoryLocationType type = il.GetType();
3638 switch ( type )
3639 {
3640 case InventoryLocationType.CARGO:
3641 {
3642 return 0;
3643 }
3644 case InventoryLocationType.ATTACHMENT:
3645 {
3646 return 1;
3647 }
3648 case InventoryLocationType.HANDS:
3649 {
3650 return 0;
3651 }
3652 case InventoryLocationType.GROUND:
3653 {
3654 return 1;
3655 }
3656 case InventoryLocationType.PROXYCARGO:
3657 {
3658 return 0;
3659 }
3660 default:
3661 {
3662 return 0;
3663 }
3664 }
3665 #endif
3666
3667 #ifdef PLATFORM_CONSOLE
3668 return 1;
3669 #endif
3670 }
3671 return 0;
3672 }

◆ GetWeight()

int GetWeight ( )
inlineprotected
3450 {
3451 return GetWeightEx();
3452 }

◆ GetWeightEx()

float GetWeightEx ( bool forceRecalc = false)
inlineprotected

returns overall weight of the entity, 'forceRecalc = true' is meant to be used only when debugging, using it in gameplay code is higly inadvisable as it bypasses the weight caching and has adverse effect on performance

3517 {
3518 if (m_WeightDirty || forceRecalc)//recalculate
3519 {
3522
3523 #ifdef DEVELOPER
3524 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3525 {
3526 WeightDebug.GetWeightDebug(this).SetWeight(m_WeightEx);
3527 }
3528 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_DIRTY)
3529 {
3530 Print("ent:" + this + " - Dirty Recalc");
3531 if (WeightDebug.m_VerbosityFlags & WeightDebugType.DUMP_STACK)
3532 {
3533 DumpStack();
3534 }
3535 }
3536 #endif
3537 }
3538
3539 return m_WeightEx;
3540 }
void ClearWeightDirty()
Definition EntityAI.c:3454
float GetWeightSpecialized(bool forceRecalc=false)
returns weight of the entity in a way that's specific to the entity type and is internal to the weigh...
Definition EntityAI.c:3509
float m_WeightEx
Definition EntityAI.c:127
proto void DumpStack()
Prints current call stack (stack trace)
proto void Print(void var)
Prints content of variable to console/log.

Перекрестные ссылки DumpStack(), GetWeightSpecialized() и Print().

◆ GetWeightSpecialized()

float GetWeightSpecialized ( bool forceRecalc = false)
inlineprotected

returns weight of the entity in a way that's specific to the entity type and is internal to the weight system calculation, to obtain entity's weight, use the 'GetWeightEx' method instead

3510 {
3512 }
float GetInventoryAndCargoWeight(bool forceRecalc=false)
Definition EntityAI.c:3481

◆ GetWet()

float GetWet ( )
inlineprotected
2109 {
2110 return 0;
2111 }

◆ GetWetInit()

float GetWetInit ( )
inlineprotected
2124 {
2125 return 0;
2126 }

◆ GetWetLevel()

EWetnessLevel GetWetLevel ( )
protected

◆ GetWetLevelInternal()

static EWetnessLevel GetWetLevelInternal ( float wetness)
inlinestaticprotected
2141 {
2143 {
2144 return EWetnessLevel.DRY;
2145 }
2146 else if (wetness < GameConstants.STATE_WET)
2147 {
2148 return EWetnessLevel.DAMP;
2149 }
2151 {
2152 return EWetnessLevel.WET;
2153 }
2155 {
2156 return EWetnessLevel.SOAKING;
2157 }
2158 return EWetnessLevel.DRENCHED;
2159 }
EWetnessLevel
Definition EntityAI.c:2
const float STATE_SOAKING_WET
Definition constants.c:832
const float STATE_WET
Definition constants.c:833
const float STATE_DRENCHED
Definition constants.c:831
const float STATE_DAMP
Definition constants.c:834

Перекрестные ссылки GameConstants::STATE_DAMP, GameConstants::STATE_DRENCHED, GameConstants::STATE_SOAKING_WET и GameConstants::STATE_WET.

◆ GetWetMax()

float GetWetMax ( )
inlineprotected
2114 {
2115 return 0;
2116 }

◆ GetWetMin()

float GetWetMin ( )
inlineprotected
2119 {
2120 return 0;
2121 }

◆ GetWetWeightModifier()

float GetWetWeightModifier ( )
inlineprotected
3427 {
3429 }
Definition CfgGameplayHandler.c:2
static array< float > GetWetnessWeightModifiers()
Definition CfgGameplayHandler.c:155
EWetnessLevel GetWetLevel()

Перекрестные ссылки GetWetLevel() и CfgGameplayHandler::GetWetnessWeightModifiers().

◆ HandleFreezingProgression()

void HandleFreezingProgression ( float deltaHeat,
TemperatureData data )
inlineprotected
2467 {
2469 float progressDelta = 1;
2470
2471 if (deltaHeat > 0)
2472 progressDelta = -1;
2473
2474 if (data.m_UpdateTimeInfo == -1)
2475 progressDelta = (-deltaHeat / GameConstants.TEMPERATURE_RATE_AVERAGE_ABS) * GameConstants.TEMPERATURE_FREEZETHAW_LEGACY_COEF; //reverse-calculate the progress if actual time is not available
2476 else
2477 progressDelta *= data.m_UpdateTimeInfo;
2478
2479 if (progressDelta == 0)
2480 return;
2481
2482 float changeTimeDefault;
2483 float changeTimeMin;
2484 float changeTime;
2485
2486 if (!m_IsFrozen)
2487 {
2490 }
2491 else
2492 {
2495 }
2496
2497 float coef = data.m_UpdateTimeCoef;
2498 if (deltaHeat < 0) //use cooling coef when freezing (mostly just to make sure)
2500
2501 if (coef != 0)
2502 changeTimeDefault *= 1/coef;
2503
2506
2507 float remnantTemp = 0;
2508 if (!m_IsFrozen && progressVal >= 1)
2509 {
2510 SetFrozen(true);
2511 if (progressVal > 1.0)
2512 {
2513 if (data.m_UpdateTimeInfo == -1)
2515 else
2517 }
2518 }
2519 else if (m_IsFrozen && progressVal <= 0)
2520 {
2521 SetFrozen(false);
2522 if (progressVal < 0.0)
2523 {
2524 if (data.m_UpdateTimeInfo == -1)
2526 else
2528 }
2529 }
2530 else
2531 {
2533 }
2534
2535 if (remnantTemp >= GameConstants.TEMPERATURE_SENSITIVITY_THRESHOLD)//discards tiny values
2537
2538 #ifdef DEVELOPER
2539 if (progressVal > 0 && progressVal < 1)
2540 {
2542 if (!m_IsFrozen)
2544 else
2546 }
2547 #endif
2548 }
void SetFreezeThawProgress(float val)
0->1 when freezing, 1->0 when thawing
Definition EntityAI.c:2435
float GetTemperatureThawTime()
Definition EntityAI.c:2423
float GetTemperatureFreezeTime()
Definition EntityAI.c:2418
const float TEMP_COEF_COOLING_GLOBAL
Definition constants.c:908
static const float TEMPERATURE_SENSITIVITY_THRESHOLD
Definition constants.c:898
static const float TEMPERATURE_FREEZETHAW_LEGACY_COEF
Definition constants.c:887
static const float TEMPERATURE_RATE_AVERAGE_ABS
Definition constants.c:881
static const float TEMPERATURE_TIME_FREEZE_MIN
Definition constants.c:890
static const float TEMPERATURE_TIME_THAW_MIN
Definition constants.c:891
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.

Перекрестные ссылки Math::Clamp(), GetTemperatureFreezeTime(), GetTemperatureThawTime(), Math::Lerp(), Math::Max(), GameConstants::TEMP_COEF_COOLING_GLOBAL, GameConstants::TEMPERATURE_FREEZETHAW_LEGACY_COEF, GameConstants::TEMPERATURE_RATE_AVERAGE_ABS, GameConstants::TEMPERATURE_SENSITIVITY_THRESHOLD, GameConstants::TEMPERATURE_TIME_FREEZE_MIN и GameConstants::TEMPERATURE_TIME_THAW_MIN.

◆ HandleItemOverheating()

void HandleItemOverheating ( float deltaHeat,
TemperatureData data )
inlineprotected
2606 {
2607 float deltaTime = 1;
2609
2610 if (deltaHeat < 0)
2611 deltaTime = -1;
2612
2613 if (data.m_UpdateTimeInfo == -1)
2614 deltaTime = deltaHeat / GameConstants.TEMPERATURE_RATE_AVERAGE_ABS; //reverse-calculate the progress if actual time is not available
2615 else
2616 deltaTime *= data.m_UpdateTimeInfo;
2617
2618 if (GetItemOverheatTime() > 0)
2619 {
2622 }
2623 else
2624 {
2625 if (deltaHeat < 0)
2626 progressVal = 0;
2627 else if (deltaHeat > 0)
2628 progressVal = 1;
2629 }
2630
2632 }
void SetItemOverheatProgress(float val, float deltaTime=0)
Definition EntityAI.c:2582
static const float TEMPERATURE_TIME_OVERHEAT_MIN
Definition constants.c:889

Перекрестные ссылки Math::Clamp(), Math::Lerp(), Math::Max(), GameConstants::TEMPERATURE_RATE_AVERAGE_ABS и GameConstants::TEMPERATURE_TIME_OVERHEAT_MIN.

◆ HasAnyCargo()

bool HasAnyCargo ( )
inlineprotected

is this container empty or not, checks only cargo

637 {
638 CargoBase cargo = GetInventory().GetCargo();
639
640 if(!cargo) return false;//this is not a cargo container
641
642 if( cargo.GetItemCount() > 0 )
643 {
644 return true;
645 }
646 else
647 {
648 return false;
649 }
650 }

◆ HasBayonetAttached()

bool HasBayonetAttached ( )
inlineprotected
3905{};

◆ HasButtstockAttached()

bool HasButtstockAttached ( )
inlineprotected
3909{};

◆ HasComponent()

bool HasComponent ( int comp_type)
inlineprivate

IsComponentExist.

337 {
338 if ( m_ComponentsBank )
339 return m_ComponentsBank.IsComponentAlreadyExist(comp_type);
340
341 return false;
342 }

◆ HasEnergyManager()

bool HasEnergyManager ( )
inlineprotected

If this item has class EnergyManager in its config then it returns true. Otherwise returns false.

3321 {
3323 }

Перекрестные ссылки COMP_TYPE_ENERGY_MANAGER.

◆ HasFlammableMaterial()

bool HasFlammableMaterial ( )
inlineprotected

Override this method to return TRUE when this item has or can provide fire. Evaluated on server and client.

504 {
505 return false;
506 }

◆ HasInternalExclusionConflicts()

bool HasInternalExclusionConflicts ( int targetSlot)
inlineprivate

checks if any attachment or item state would interfere with this being attached into a different slot (Headgear -> Mask)

4430 {
4432 if (targetSlotValues) //can be null, if so, no conflict
4433 {
4434 set<int> additionalValues = new set<int>(); //NOT slot values
4437
4438 if (additionalValues.Count() > 0)
4439 {
4440 int countTarget = targetSlotValues.Count();
4441 for (int i = 0; i < countTarget; i++)
4442 {
4443 if (additionalValues.Find(targetSlotValues[i]) != -1)
4444 {
4445 return true;
4446 }
4447 }
4448 }
4449 }
4450 return false;
4451 }
set< int > GetAttachmentExclusionMaskChildren()
Mask value coming from the item's attachments.
Definition EntityAI.c:4423
set< int > GetAttachmentExclusionMaskGlobal()
Global mask value, independent of slot-specific behavior!
Definition EntityAI.c:4417

◆ HasQuantity()

bool HasQuantity ( )
inlineprotected
2162 {
2163 return false;
2164 }

◆ HasTurnableValveBehavior()

bool HasTurnableValveBehavior ( )
protected

Turnable Valve behaviour.

◆ HasWetness()

bool HasWetness ( )
inlineprotected
2129 {
2130 return GetWetMax() - GetWetMin() != 0;
2131 }
float GetWetMax()
Definition EntityAI.c:2113
float GetWetMin()
Definition EntityAI.c:2118

Перекрестные ссылки GetWetMax() и GetWetMin().

◆ HeightCheckOverride()

float HeightCheckOverride ( )
inlineprotected

used as script-side override of distance for specific height checks

607 {
608 return 0.0;
609 }

◆ HeightStartCheckOverride()

float HeightStartCheckOverride ( )
inlineprotected

used as script-side override of start pos for specific height checks

613 {
614 return 0.0;
615 }

◆ HideAllSelections()

void HideAllSelections ( )
inlineprotected

Sets all animation values to 1, making them INVISIBLE if they are configured in models.cfg in such way. These selections must also be defined in the entity's config class in 'AnimationSources'.

1342 {
1343 string cfg_path = "cfgVehicles " + GetType() + " AnimationSources";
1344
1345 if ( GetGame().ConfigIsExisting(cfg_path) )
1346 {
1347 int selections = GetGame().ConfigGetChildrenCount(cfg_path);
1348
1349 for (int i = 0; i < selections; i++)
1350 {
1351 string selection_name;
1352 GetGame().ConfigGetChildName(cfg_path, i, selection_name);
1354 }
1355 }
1356 }
void HideSelection(string selection_name)
Hides selection of the given name. Must be configed in config.cpp and models.cfg.
Definition EntityAI.c:3255

Перекрестные ссылки GetGame() и GetType().

◆ HideSelection()

void HideSelection ( string selection_name)
inlineprotected

Hides selection of the given name. Must be configed in config.cpp and models.cfg.

3256 {
3257 if ( !ToDelete() )
3258 {
3259 SetAnimationPhase ( selection_name, 1 ); // 1 = hide, 0 = unhide!
3260 }
3261 }

◆ IgnoreOutOfReachCondition()

IgnoreOutOfReachCondition ( )
inlineprotected
Возвращает
if true, attachment condition for out of reach (inventory) will be ignored
1763 {
1764 return GetHierarchyRootPlayer() == GetGame().GetPlayer();
1765 }

Перекрестные ссылки GetGame().

◆ IncreaseLifetime()

proto native void IncreaseLifetime ( )
protected

Reset economy lifetime to default (seconds)

◆ IncreaseLifetimeUp()

void IncreaseLifetimeUp ( )
inlineprotected

Reset economy lifetime to default across entity hierarchy all the way to the topmost entity.

3290 {
3292 if (GetHierarchyParent())
3293 GetHierarchyParent().IncreaseLifetimeUp();
3294 }
proto native void IncreaseLifetime()
Reset economy lifetime to default (seconds)

◆ InitAttachmentExclusionValues()

void InitAttachmentExclusionValues ( )
inlineprivate
4110 {
4114
4115 int count = GetInventory().GetSlotIdCount();
4116 //no sense in performing inits for something that cannot be attached anywhere (hand/lefthand and some other 'special' slots are the reason for creating 'new' sets above)
4117 if (count == 0)
4118 return;
4119
4123 }
void InitInherentSlotExclusionMap()
map stored on instance to better respond to various state changes
Definition EntityAI.c:4126
void InitLegacyConfigExclusionValues()
Definition EntityAI.c:4148
void InitGlobalExclusionValues()
override to init part of the mask, independent of slot-specific behavior

◆ InitDamageZoneDisplayNameMapping()

void InitDamageZoneDisplayNameMapping ( )
inlineprivate

Initialize map of damage zone display names for more optimized retrieval.

391 {
392 string path_base;
393 string path;
394 string component_name;
395
396 if ( IsWeapon() )
397 {
399 }
400 else if ( IsMagazine() )
401 {
403 }
404 else
405 {
407 }
408
409 path_base = string.Format( "%1 %2 DamageSystem DamageZones", path_base, GetType() );
410
411 if ( !GetGame().ConfigIsExisting(path_base) )
412 {
414 GetGame().FormatRawConfigStringKeys(component_name);
415 m_DamageDisplayNameMap.Insert( "".Hash(), component_name );
416 }
417 else
418 {
420 GetDamageZones( zone_names );
421
422 for ( int i = 0; i < zone_names.Count(); i++ )
423 {
424 path = string.Format( "%1 %2 displayName", path_base, zone_names[i] );
425
426 if (GetGame().ConfigIsExisting(path) && GetGame().ConfigGetTextRaw(path,component_name))
427 {
428 GetGame().FormatRawConfigStringKeys(component_name);
430 }
431 }
432 }
433 }
static string GetDisplayName(int liquid_type)
Definition Liquid.c:360
string path
Definition OptionSelectorMultistate.c:142
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition IsBoxCollidingGeometryProxyClasses.c:28
array< string > TStringArray
Definition EnScript.c:685
const string CFG_VEHICLESPATH
Definition constants.c:217
const string CFG_WEAPONSPATH
Definition constants.c:218
const string CFG_MAGAZINESPATH
Definition constants.c:219
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.

Перекрестные ссылки CFG_MAGAZINESPATH, CFG_VEHICLESPATH, CFG_WEAPONSPATH, string::Format(), GetDisplayName(), GetGame(), GetType() и path.

◆ InitDamageZoneMapping()

void InitDamageZoneMapping ( )
inlineprivate

Initializes script-side map of damage zones and their components (named selections in models)

384 {
386 DamageSystem.GetDamageZoneMap(this,m_DamageZoneMap);
387 }
map< string, ref array< string > > DamageZoneMap
Definition DamageSystem.c:157

◆ InitGlobalExclusionValues()

void InitGlobalExclusionValues ( )
protected

override to init part of the mask, independent of slot-specific behavior

◆ InitInherentSlotExclusionMap()

void InitInherentSlotExclusionMap ( )
inlineprivate

map stored on instance to better respond to various state changes

4127 {
4128 int count = GetInventory().GetSlotIdCount();
4129 //starting with the INVALID slot, so it is always in the map of attachable items
4131
4132 int slotId;
4133 for (int i = 0; i < count; i++)
4134 {
4135 slotId = GetInventory().GetSlotId(i);
4137 }
4138 }
void SetAttachmentExclusionMaskSlot(int slotId, set< int > values)
sets values for specific slot
Definition EntityAI.c:4349
set< int > GetAttachmentExclusionInitSlotValue(int slotId)
override this to modify slot behavior for specific items, or just set 'm_AttachmentExclusionMaskGloba...
Definition EntityAI.c:4141

Перекрестные ссылки InventorySlots::INVALID.

◆ InitItemVariables()

void InitItemVariables ( )
inlineprotected
245 {
246 m_VarTemperatureInit = ConfigGetFloat("varTemperatureInit");
247 m_VarTemperatureMin = ConfigGetFloat("varTemperatureMin");
248 m_VarTemperatureMax = ConfigGetFloat("varTemperatureMax");
249
250 if (ConfigIsExisting("varTemperatureFreezePoint"))
251 m_VarTemperatureFreezeThreshold = ConfigGetFloat("varTemperatureFreezePoint");
252 else
254
255 if (ConfigIsExisting("varTemperatureThawPoint"))
256 m_VarTemperatureThawThreshold = ConfigGetFloat("varTemperatureThawPoint");
257 else
259
260 m_VarTemperatureFreezeTime = Math.Clamp(ConfigGetFloat("varTemperatureFreezeTime"),1,float.MAX);
261 m_VarTemperatureThawTime = Math.Clamp(ConfigGetFloat("varTemperatureThawTime"),1,float.MAX);
262 if (ConfigIsExisting("varTemperatureOverheatTime"))
263 m_VarTemperatureOverheatTime = ConfigGetFloat("varTemperatureOverheatTime");
264 else
266
267 if (ConfigIsExisting("varHeatPermeabilityCoef"))
268 m_VarHeatPermeabilityCoef = ConfigGetFloat("varHeatPermeabilityCoef");
269 else
271
272 if (CanHaveTemperature())
273 {
275 RegisterNetSyncVariableBool("m_IsFrozen");
276
277 if (GetGame().IsServer())
279
280 if (!GetGame().IsMultiplayer() || GetGame().IsClient())
282 }
283 }
const int MAX
Definition EnConvert.c:27
ref TemperatureAccessComponent m_TAC
Definition EntityAI.c:158
Definition TemperatureAccessComponent.c:2
const float LOWEST
Definition EnConvert.c:100

Перекрестные ссылки CanHaveTemperature(), Math::Clamp(), GetGame(), float::LOWEST и MAX.

◆ InitLegacyConfigExclusionValues()

void InitLegacyConfigExclusionValues ( )
inlineprotected
4149 {
4151
4152 //adding implicit slot info AFTER the check is performed
4154
4157 }
void InitLegacySlotExclusionValuesImplicit()
adding base one-directional relations between headgear, masks, eyewear, and headstraps (exception)
Definition EntityAI.c:4188
bool InitLegacyExclusionCheck()
Definition EntityAI.c:4160
void InitLegacySlotExclusionValuesDerived()
Definition EntityAI.c:4241

◆ InitLegacyExclusionCheck()

bool InitLegacyExclusionCheck ( )
inlineprotected
4161 {
4162 //first check the globals
4163 if (m_AttachmentExclusionMaskGlobal.Count() > 0)
4164 return false;
4165
4166 //now the map
4167 int count = m_AttachmentExclusionSlotMap.Count();
4168 if (count > 1) //more than InventorySlots.INVALID
4169 {
4170 for (int i = 0; i < count; i++)
4171 {
4172 int countSet = m_AttachmentExclusionSlotMap.GetElement(i).Count();
4173 if (countSet > 0) //SOMETHING is defined
4174 {
4175 return false;
4176 }
4177 }
4178 }
4179
4180 return true;
4181 }

◆ InitLegacySlotExclusionValuesDerived()

void InitLegacySlotExclusionValuesDerived ( )
inlineprotected
4242 {
4243 int slotId;
4244 int slotCount = GetInventory().GetSlotIdCount();
4245 for (int i = 0; i < slotCount; i++)
4246 {
4247 slotId = GetInventory().GetSlotId(i);
4248 set<int> tmp;
4249 switch (slotId)
4250 {
4251 case InventorySlots.HEADGEAR:
4252 {
4253 tmp = new set<int>;
4255 if (ConfigGetBool("noNVStrap"))
4256 {
4257 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_HEADGEAR);
4258 }
4259 if (ConfigGetBool("noMask"))
4260 {
4261 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADGEAR);
4262 }
4263 if (ConfigGetBool("noEyewear"))
4264 {
4265 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_HEADGEAR);
4266 }
4268 break;
4269 }
4270
4271 case InventorySlots.MASK:
4272 {
4273 tmp = new set<int>;
4275 if (ConfigGetBool("noNVStrap"))
4276 {
4277 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_MASK);
4278 }
4279 if (ConfigGetBool("noHelmet"))
4280 {
4281 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_MASK);
4282 }
4283 if (ConfigGetBool("noEyewear"))
4284 {
4285 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_MASK);
4286 }
4288 break;
4289 }
4290
4291 case InventorySlots.EYEWEAR:
4292 {
4293 tmp = new set<int>;
4295 if (ConfigGetBool("isStrap"))
4296 {
4297 if (ConfigGetBool("noHelmet"))
4298 {
4299 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_HEADSTRAP);
4300 }
4301 if (ConfigGetBool("noMask"))
4302 {
4303 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADSTRAP);
4304 }
4305 }
4306 else
4307 {
4308 if (ConfigGetBool("noHelmet"))
4309 {
4310 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_EYEWEWEAR);
4311 }
4312 if (ConfigGetBool("noMask"))
4313 {
4314 tmp.Insert(EAttExclusions.LEGACY_MASK_EYEWEWEAR);
4315 }
4316 }
4318 break;
4319 }
4320 }
4321 }
4322 }

◆ InitLegacySlotExclusionValuesImplicit()

InitLegacySlotExclusionValuesImplicit ( )
inlineprotected

adding base one-directional relations between headgear, masks, eyewear, and headstraps (exception)

Заметки
: 'InitLegacyConfigExclusionValues' adds them the other way if the item does not have any script-side exclusions AND has some legacy config parameter.
4189 {
4190 int slotId;
4191 int slotCount = GetInventory().GetSlotIdCount();
4192 for (int i = 0; i < slotCount; i++)
4193 {
4194 slotId = GetInventory().GetSlotId(i);
4195 set<int> tmp;
4196 switch (slotId)
4197 {
4198 case InventorySlots.HEADGEAR:
4199 {
4200 tmp = new set<int>;
4202 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_MASK);
4203 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_HEADSTRAP);
4204 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_EYEWEWEAR);
4206 break;
4207 }
4208
4209 case InventorySlots.MASK:
4210 {
4211 tmp = new set<int>;
4213 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADGEAR);
4214 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADSTRAP);
4215 tmp.Insert(EAttExclusions.LEGACY_MASK_EYEWEWEAR);
4217 break;
4218 }
4219
4220 case InventorySlots.EYEWEAR:
4221 {
4222 tmp = new set<int>;
4224 if (ConfigGetBool("isStrap"))
4225 {
4226 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_HEADGEAR);
4227 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_MASK);
4228 }
4229 else
4230 {
4231 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_HEADGEAR);
4232 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_MASK);
4233 }
4235 break;
4236 }
4237 }
4238 }
4239 }

◆ InitTemperature()

void InitTemperature ( )
inlineprotected
2208 {
2210 bool isParentAliveOrganism = false;
2211 if (rootParent && rootParent != this)
2212 isParentAliveOrganism = (rootParent.IsMan() || rootParent.IsAnimal() || rootParent.IsZombie()) && rootParent.IsAlive();
2213
2215 {
2217 }
2218 else if (isParentAliveOrganism) //living player's inventory etc.
2219 {
2220 SetTemperatureDirect(rootParent.GetTemperature());
2221 }
2222 else
2223 {
2224 SetTemperatureDirect(g_Game.GetMission().GetWorldData().GetBaseEnvTemperatureAtObject(this));
2225 }
2226
2228 }
DayZGame g_Game
Definition DayZGame.c:3815
bool UseConfigInitTemperature()
Definition EntityAI.c:2202

Перекрестные ссылки g_Game и GetTemperatureFreezeThreshold().

◆ InsertAgent()

void InsertAgent ( int agent,
float count = 1 )
protected

◆ InterpolateTempData()

void InterpolateTempData ( TemperatureDataInterpolated data)
inlineprotected
2366 {
2367 if (data)
2368 data.InterpolateTemperatureDelta(GetTemperature());
2369 }

◆ InterpolateTo()

static proto native void InterpolateTo ( Camera targetCamera,
float time,
int type )
staticprivate

Interpolation between camera instances (current camera becomes targetCamera at the end of interpolation)

Аргументы
targetCamerato which camera we want to interpolate
timetrue interpolation time
type0 = without dynamics 1 = first half - acceleration, second half deceleration 2 = first third - acceleration, second third - linear movement, last third - deceleration

◆ IsActive()

proto native bool IsActive ( )
private

Is this camera active?

Возвращает
bool true if this camera is active

◆ IsAnimal()

bool IsAnimal ( )
inlineprotected
695 {
696 return false;
697 }

◆ IsBasebuildingKit()

bool IsBasebuildingKit ( )
inlineprotected
535 {
536 return false;
537 }

◆ IsBeingPlaced()

bool IsBeingPlaced ( )
inlineprotected
1641 {
1642 return false;
1643 }

◆ IsDestructionBehaviour()

bool IsDestructionBehaviour ( )
inlineprivate
331 {
332 return false;
333 }

◆ IsEmpty()

bool IsEmpty ( )
inlineprotected

is this container empty or not, checks both cargo and attachments

619 {
620 return (!HasAnyCargo() && GetInventory().AttachmentCount() == 0);
621 }
bool HasAnyCargo()
is this container empty or not, checks only cargo
Definition EntityAI.c:636

◆ IsEnabled()

proto native bool IsEnabled ( )
private

◆ IsEntityAI()

override bool IsEntityAI ( )
inlineprotected
682{ return true; }

◆ IsExclusionFlagPresent()

bool IsExclusionFlagPresent ( set< int > values)
inlineprotected

checks 'this' if the incoming flag is present for the current state (slot behavior and others)

4455 {
4456 int slotId;
4457 string slotName;
4458 GetInventory().GetCurrentAttachmentSlotInfo(slotId,slotName); //if currently attached, treat it accordingly
4459
4461 int count = values.Count();
4462 for (int i = 0; i < count; i++)
4463 {
4464 if (currentSlotValuesAll.Find(values[i]) != -1)
4465 return true;
4466 }
4467 return false;
4468 }
PlayerSpawnPreset slotName
set< int > GetAttachmentExclusionMaskAll(int slotId)
Slot-specific, children (attachments), and additional (state etc.) masks combined.
Definition EntityAI.c:4398

Перекрестные ссылки slotName.

◆ IsExclusionFlagPresentRecursive()

bool IsExclusionFlagPresentRecursive ( set< int > values,
int targetSlot )
inlineprotected

Gets flag from what is effectively an owner.

4472 {
4473 if (values && values.Count() != 0)
4474 {
4476 GetInventory().GetCurrentInventoryLocation(lcn);
4477 EntityAI parent = GetHierarchyParent();
4480 {
4481 if (parent && parent != this) //we reached root if false
4482 {
4483 return parent.IsExclusionFlagPresentRecursive(passThis,lcn.GetSlot());
4484 }
4485 }
4487 }
4488
4489 return false;
4490 }
bool IsExclusionFlagPresent(set< int > values)
checks 'this' if the incoming flag is present for the current state (slot behavior and others)
Definition EntityAI.c:4454
bool CheckExclusionAccessCondition(int occupiedSlot, int targetSlot, set< int > value, inout set< int > adjustedValue)
Definition EntityAI.c:4493

◆ IsFlareVisible()

proto native bool IsFlareVisible ( )
private

◆ IsHeavyBehaviour()

bool IsHeavyBehaviour ( )
inlineprotected

returns item behaviour of item (more in ItemBase)

3724 {
3725 return false;
3726 }

◆ IsHologram()

override bool IsHologram ( )
inlineprotected
1646 {
1647 return false;
1648 }

◆ IsIgnited()

bool IsIgnited ( )
inlineprotected

Override this method and make it so it returns whenever this item is on fire right now or not. Evaluated on Server and Client.

522 {
523 if (m_EM)
524 return m_EM.IsWorking();
525 return false;
526 }
bool IsWorking()
Energy manager: Returns true if this device is working right now.
Definition ComponentEnergyManager.c:900

Перекрестные ссылки ComponentEnergyManager::IsWorking().

◆ IsIgnoredByConstruction()

bool IsIgnoredByConstruction ( )
inlineprotected
710 {
711 return IsDamageDestroyed();
712 }

◆ IsInitialized()

bool IsInitialized ( )
inlineprotected
291 {
292 return m_Initialized;
293 }

Перекрестные ссылки m_Initialized.

◆ IsInventoryVisible()

bool IsInventoryVisible ( )
inlineprotected
685 {
686 return !( GetParent() || GetHierarchyParent() );
687 }
proto native Widget GetParent()
Get parent of the Effect.
Definition Effect.c:407

Перекрестные ссылки GetParent().

◆ IsItemOverheated()

bool IsItemOverheated ( )
inlineprotected
2573 {
2574 return m_OverheatProgress >= 1;
2575 }

◆ IsLockedInSlot()

IsLockedInSlot ( )
inlineprotected
Возвращает
true if entity is locked in attachment slot
1815 {
1816 EntityAI parent = GetHierarchyParent();
1817 if ( parent )
1818 {
1820 GetInventory().GetCurrentInventoryLocation( inventory_location );
1821
1822 return parent.GetInventory().GetSlotLock( inventory_location.GetSlot() );
1823 }
1824
1825 return false;
1826 }

◆ IsManagingArrows()

bool IsManagingArrows ( )
inlineprotected
4543 {
4544 return false;
4545 }

◆ IsOneHandedBehaviour()

bool IsOneHandedBehaviour ( )
inlineprotected

returns item behaviour of item (more in ItemBase)

3730 {
3731 return false;
3732 }

◆ IsPilotLight()

proto native bool IsPilotLight ( )
protected

◆ IsPlayer()

bool IsPlayer ( )
inlineprotected
690 {
691 return false;
692 }

◆ IsPreparedToDelete()

bool IsPreparedToDelete ( )
inlineprotected
795 {
796 return m_PreparedToDelete;
797 }
bool m_PreparedToDelete
Definition EntityAI.c:103

◆ IsPrepareToDelete()

bool IsPrepareToDelete ( )
inlineprotected
809 {
810 return false;
811 }

◆ IsRefresherSignalingViable()

bool IsRefresherSignalingViable ( )
inlineprivate
365 {
366 if (IsRuined())
367 {
368 return false;
369 }
370 return m_RefresherViable;
371 }
bool m_RefresherViable
Definition EntityAI.c:104

◆ IsRoofAbove()

bool IsRoofAbove ( )
inlineprotected
664 {
665 return m_RoofAbove;
666 }
bool m_RoofAbove
Definition EntityAI.c:106

◆ IsSelfAdjustingTemperature()

bool IsSelfAdjustingTemperature ( )
inlineprotected
3750 {
3751 return false;
3752 }

◆ IsServerCheck()

bool IsServerCheck ( bool allow_client)
inlineprotected
2676 {
2677 if (g_Game.IsServer())
2678 return true;
2679
2680 if (allow_client)
2681 return true;
2682
2683 if (GetGame().IsClient() && GetGame().IsMultiplayer())
2684 {
2685 Error("Attempting to change variable client side, variables are supposed to be changed on server only !!");
2686 return false;
2687 }
2688
2689 return true;
2690 }

Перекрестные ссылки Error(), g_Game и GetGame().

◆ IsSetForDeletion()

bool IsSetForDeletion ( )
inlineprotected
773 {
774 return IsPreparedToDelete() || m_PendingDelete || ToDelete() || IsPendingDeletion();
775 }
bool IsPreparedToDelete()
Definition EntityAI.c:794
bool IsPendingDeletion()
Get whether the Effect is queued up for being cleaned up.
Definition Effect.c:258

Перекрестные ссылки IsPendingDeletion().

◆ IsSimpleHiddenSelectionVisible()

proto native bool IsSimpleHiddenSelectionVisible ( int index)
protected

◆ IsSkinned()

bool IsSkinned ( )
inlineprotected

Skinning.

482 {
483 return GetCompBS() && GetCompBS().IsSkinned();
484 }
bool IsSkinned()
Definition BodyStaging.c:44
ComponentBodyStaging GetCompBS()
Use this to access Body Staging component on dead character. Returns NULL if the given object lacks s...
Definition EntityAI.c:3299

◆ IsSplitable()

bool IsSplitable ( )
inlineprotected

returns just the configured 'canBeSplit' bool

625 {
626 return false;
627 }

◆ IsStoreLoad()

bool IsStoreLoad ( )
inlineprotected
2655 {
2656 return false;
2657 }

◆ IsTakeable()

bool IsTakeable ( )
inlineprotected
1784 {
1785 return false;
1786 }

◆ IsTargetIgnitionSuccessful()

bool IsTargetIgnitionSuccessful ( EntityAI item_target)
inlineprotected

Final evaluation just before the target item is actually ignited. Evaluated on Server.

571 {
572 return true;
573 }

◆ IsThisIgnitionSuccessful()

bool IsThisIgnitionSuccessful ( EntityAI item_source = NULL)
inlineprotected

Final evaluation just before this item is actually ignited from fire source. Evaluated on Server.

577 {
578 return true;
579 }

◆ IsTwoHandedBehaviour()

bool IsTwoHandedBehaviour ( )
inlineprotected

returns item behaviour of item (more in ItemBase)

3736 {
3737 return false;
3738 }

◆ IsUniversalTemperatureSource()

bool IsUniversalTemperatureSource ( )
inlineprotected

Universal Temperature Sources Helpers.

4063 {
4065 }
UTemperatureSource GetUniversalTemperatureSource()
Definition EntityAI.c:4067

◆ IsValveTurnable()

bool IsValveTurnable ( int pValveIndex)
protected

◆ IsVariableSet()

bool IsVariableSet ( int variable)
inlineprotected

'true' if this variable has ever been changed from default

3034 {
3035 return (variable & m_VariablesMask);
3036 }
int m_VariablesMask
Definition EntityAI.c:144

◆ IsVisibleDuringDaylight()

proto native bool IsVisibleDuringDaylight ( )
private

◆ IsZombie()

bool IsZombie ( )
inlineprotected
700 {
701 return false;
702 }

◆ IsZombieMilitary()

bool IsZombieMilitary ( )
inlineprotected
705 {
706 return false;
707 }

◆ KeepHealthOnReplace()

bool KeepHealthOnReplace ( )
inlineprotected
1052 {
1053 return false;
1054 }

◆ LoadVariables()

bool LoadVariables ( ParamsReadContext ctx,
int version = -1 )
inlineprotected
3084 {
3085 int varFlags;
3086
3087 //read the flags
3088 if (!ctx.Read(varFlags))
3089 {
3090 return false;
3091 }
3092
3093 //--------------
3095 {
3096 if (!ReadVarsFromCTX(ctx, version))
3097 return false;
3098 }
3099 return true;
3100 }
bool ReadVarsFromCTX(ParamsReadContext ctx, int version=-1)
Reads from storage CTX.
Definition EntityAI.c:3116
Definition UtilityClasses.c:2
static const int FLOAT
Definition UtilityClasses.c:4

Перекрестные ссылки ItemVariableFlags::FLOAT и ReadVarsFromCTX().

◆ LocalDropEntity()

bool LocalDropEntity ( notnull EntityAI item)
inlineprotected
2017 {
2018 return false;
2019 }

◆ LocalTakeEntityAsAttachment()

bool LocalTakeEntityAsAttachment ( notnull EntityAI item)
inlineprotected
2003 {
2004 return GetInventory().TakeEntityAsAttachment(InventoryMode.LOCAL, item);
2005 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Definition Inventory.c:22

◆ LocalTakeEntityAsAttachmentEx()

bool LocalTakeEntityAsAttachmentEx ( notnull EntityAI item,
int slot )
inlineprotected
1936 {
1937 return GetInventory().TakeEntityAsAttachmentEx(InventoryMode.LOCAL, item, slot);
1938 }

◆ LocalTakeEntityToCargo()

bool LocalTakeEntityToCargo ( notnull EntityAI item)
inlineprotected
1872 {
1873 return GetInventory().TakeEntityToCargo(InventoryMode.LOCAL, item);
1874 }

◆ LocalTakeEntityToCargoEx()

bool LocalTakeEntityToCargoEx ( notnull EntityAI item,
int idx,
int row,
int col )
inlineprotected
1906 {
1907 return GetInventory().TakeEntityToCargoEx(InventoryMode.LOCAL, item, idx, row, col);
1908 }

◆ LocalTakeEntityToInventory()

bool LocalTakeEntityToInventory ( FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected
1839 {
1840 return GetInventory().TakeEntityToInventory(InventoryMode.LOCAL, flags, item);
1841 }

◆ LocalTakeEntityToTargetAttachment()

bool LocalTakeEntityToTargetAttachment ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected
1968 {
1969 return GetInventory().TakeEntityAsTargetAttachment(InventoryMode.LOCAL, target, item);
1970 }

◆ LocalTakeEntityToTargetAttachmentEx()

bool LocalTakeEntityToTargetAttachmentEx ( notnull EntityAI target,
notnull EntityAI item,
int slot )
inlineprotected
1952 {
1953 return GetInventory().TakeEntityAsTargetAttachmentEx(InventoryMode.LOCAL, target, item, slot);
1954 }

◆ LocalTakeEntityToTargetCargo()

bool LocalTakeEntityToTargetCargo ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected
1888 {
1889 return GetInventory().TakeEntityToTargetCargo(InventoryMode.LOCAL, target, item);
1890 }

◆ LocalTakeEntityToTargetCargoEx()

bool LocalTakeEntityToTargetCargoEx ( notnull CargoBase cargo,
notnull EntityAI item,
int row,
int col )
inlineprotected
1918 {
1919 return GetInventory().TakeEntityToTargetCargoEx(InventoryMode.LOCAL, cargo, item, row, col);
1920 }

◆ LocalTakeEntityToTargetInventory()

bool LocalTakeEntityToTargetInventory ( notnull EntityAI target,
FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected
1854 {
1855 return GetInventory().TakeEntityToTargetInventory(InventoryMode.LOCAL, target, flags, item);
1856 }

◆ LocalTakeToDst()

bool LocalTakeToDst ( notnull InventoryLocation src,
notnull InventoryLocation dst )
inlineprotected
1984 {
1985 return GetInventory().TakeToDst(InventoryMode.LOCAL, src, dst);
1986 }

◆ Log()

void Log ( string msg,
string fnc_name = "n/a" )
inlineprotected

Log.

464 {
465 Debug.Log(msg, "Object", "n/a", fnc_name, this.GetType());
466 }
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Definition Debug.c:136

Перекрестные ссылки GetType() и Debug::Log().

◆ LogError()

void LogError ( string msg,
string fnc_name = "n/a" )
inlineprotected

LogError.

476 {
477 Debug.LogError(msg, "Object", "n/a", fnc_name, this.GetType());
478 }

Перекрестные ссылки GetType() и Debug::LogError().

◆ LogWarning()

void LogWarning ( string msg,
string fnc_name = "n/a" )
inlineprotected

LogWarning.

470 {
471 Debug.LogWarning(msg, "Object", "n/a", fnc_name, this.GetType());
472 }

Перекрестные ссылки GetType() и Debug::LogWarning().

◆ LookAt()

proto native void LookAt ( vector targetPos)
private

Orientation change by lookAt point.

Аргументы
targetPoswhere to look at

◆ MaxLifetimeRefreshCalc()

void MaxLifetimeRefreshCalc ( )
inlineprivate

Calculates if the max lifetime is higher than refresher frequency (i.e. gets kept alive by refresher)

346 {
347 if ( (!GetGame().IsMultiplayer() || GetGame().IsServer()) && GetEconomyProfile() )
348 {
349 float lifetime = GetEconomyProfile().GetLifetime();
350 int frequency = GetCEApi().GetCEGlobalInt("FlagRefreshFrequency");
351 if ( frequency <= 0 )
352 {
354 }
355
356 if ( frequency <= lifetime )
357 {
358 m_RefresherViable = true;
360 }
361 }
362 }
proto native CEApi GetCEApi()
Get the CE API.
proto native void SetSynchDirty()
Sets object synchronization dirty flag, which signalize that object wants to be synchronized (take ef...
const int REFRESHER_FREQUENCY_DEFAULT
Definition constants.c:978

Перекрестные ссылки GetCEApi(), GetGame() и GameConstants::REFRESHER_FREQUENCY_DEFAULT.

◆ OnAction()

bool OnAction ( int action_id,
Man player,
ParamsReadContext ctx )
inlineprotected
3558 {
3559 if (action_id == EActions.FIX_ENTITY)
3560 {
3561 #ifdef DIAG_DEVELOPER
3562 FixEntity();
3563 #endif
3564 }
3565 else if (action_id == EActions.GET_TOTAL_WEIGHT) //Prints total weight of item + its contents
3566 {
3567 WeightDebug.ClearWeightDebug();
3568 #ifndef SERVER
3569 Debug.Log("======================== "+ GetType() +" =================================");
3570 #endif
3571 Debug.Log("Weight:" + GetWeightEx().ToString());
3572 Debug.Log("Weight excluding cargo and attachments:" + GetSingleInventoryItemWeightEx());
3573 Debug.Log("----------------------------------------------------------------------------------------------");
3574 }
3575 else if (action_id == EActions.GET_TOTAL_WEIGHT_RECALC) //Prints total weight of item + its contents
3576 {
3577 WeightDebug.ClearWeightDebug();
3578 WeightDebug.SetVerbosityFlags(WeightDebugType.RECALC_FORCED);
3579 #ifndef SERVER
3580 Debug.Log("======================== "+ GetType() +" RECALC ===========================");
3581 #endif
3582 Debug.Log("Weight:" + GetWeightEx(true).ToString());
3583 Debug.Log("Weight excluding cargo and attachments:" + GetSingleInventoryItemWeightEx());
3584 WeightDebug.PrintAll(this);
3585 Debug.Log("----------------------------------------------------------------------------------------------");
3586 WeightDebug.SetVerbosityFlags(0);
3587 }
3588 else if (action_id == EActions.GET_PLAYER_WEIGHT) //Prints total weight of item + its contents
3589 {
3590 WeightDebug.ClearWeightDebug();
3591 #ifndef SERVER
3592 Debug.Log("======================== PLAYER: "+player+" ===========================");
3593 #endif
3594 Debug.Log("New overall weight Player:"+player.GetWeightEx().ToString());
3595
3596 Debug.Log("----------------------------------------------------------------------------------------------");
3597 }
3598 else if (action_id == EActions.GET_PLAYER_WEIGHT_RECALC) //Prints total weight of item + its contents
3599 {
3600 WeightDebug.ClearWeightDebug();
3601 WeightDebug.SetVerbosityFlags(WeightDebugType.RECALC_FORCED);
3602 #ifndef SERVER
3603 Debug.Log("======================== PLAYER RECALC: "+player+" ===========================");
3604 #endif
3605 Debug.Log("New overall weight Player:"+player.GetWeightEx(true).ToString());
3606 WeightDebug.PrintAll(player);
3607 Debug.Log("----------------------------------------------------------------------------------------------");
3608 WeightDebug.SetVerbosityFlags(0);
3609 }
3610 return false;
3611 }
proto string ToString()
float GetSingleInventoryItemWeightEx()
Definition EntityAI.c:3544

Перекрестные ссылки GetSingleInventoryItemWeightEx(), GetType(), Debug::Log() и ToString().

◆ OnAttachmentRuined()

void OnAttachmentRuined ( EntityAI attachment)
protected

Called when some attachment of this parent is ruined. Called on server and client side.

◆ OnBeforeTryDelete()

void OnBeforeTryDelete ( )
protected

◆ OnBinLoadItemsDropped()

void OnBinLoadItemsDropped ( )
inlineprotected

Called when an item fails to get loaded into the inventory of an entity and gets dropped.

1335 {
1337 GetHierarchyRootPlayer().SetProcessUIWarning(true);
1338 }

◆ OnCargoChanged()

void OnCargoChanged ( )
inlineprotected
1781{ }

◆ OnCEUpdate()

void OnCEUpdate ( )
inlineprotected

Central economy calls this function whenever going over all the entities.

void OnCEUpdate()
{
// dont forget to propagate this call trough class hierarchy! - always at the start of the function
super.OnCEUpdate();
// use m_ElapsedSinceLastUpdate for time-related purposes
}
void OnCEUpdate()
Central economy calls this function whenever going over all the entities.
Definition EntityAI.c:3766
3767 {
3768 float currentTime = GetGame().GetTickTime();
3769 if (m_LastUpdatedTime == 0)
3771
3774
3776 }
void ProcessVariables()
Definition EntityAI.c:3778

Перекрестные ссылки GetGame() и ProcessVariables().

◆ OnDamageDestroyed()

void OnDamageDestroyed ( int oldLevel)
protected

Called when the health gets to the min value, 'oldLevel' is previous health level, 'oldLevel' -1 means this entity was just spawned.

◆ OnDebugButtonPressClient()

void OnDebugButtonPressClient ( int button_index)
inlineprotected
3220{}//DEPRICATED, USE GetDebugActions / OnAction

◆ OnDebugButtonPressServer()

void OnDebugButtonPressServer ( int button_index)
inlineprotected
3221{}//DEPRICATED, USE GetDebugActions / OnAction

◆ OnDebugSpawn()

void OnDebugSpawn ( )
inlineprotected
3808 {
3810 ConfigGetTextArray("Attachments", slots);
3811
3813 ConfigGetTextArray("magazines", mags);
3814
3815 //-------
3816
3818
3821 all_paths.Insert(CFG_WEAPONSPATH);
3822
3823 string config_path;
3824 string child_name;
3825 int scope;
3826 string path;
3827 int consumable_count;
3828
3829 for (int i = 0; i < all_paths.Count(); i++)
3830 {
3831 config_path = all_paths.Get(i);
3832 int children_count = GetGame().ConfigGetChildrenCount(config_path);
3833
3834 for (int x = 0; x < children_count; x++)
3835 {
3836 GetGame().ConfigGetChildName(config_path, x, child_name);
3837 path = config_path + " " + child_name;
3838 scope = GetGame().ConfigGetInt( config_path + " " + child_name + " scope" );
3839 bool should_check = 1;
3840 if ( config_path == "CfgVehicles" && scope == 0)
3841 {
3842 should_check = 0;
3843 }
3844
3845 if ( should_check )
3846 {
3847 string inv_slot;
3848 GetGame().ConfigGetText( config_path + " " + child_name + " inventorySlot",inv_slot );
3849 for (int z = 0; z < slots.Count(); z++)
3850 {
3851 if (slots.Get(z) == inv_slot)
3852 {
3853 this.GetInventory().CreateInInventory( child_name );
3854 continue;
3855 //Print("matching attachment: " + child_name + " for inv. slot name:" +inv_slot);
3856 }
3857 }
3858 }
3859 }
3860 }
3861 };
Icon x

Перекрестные ссылки CFG_MAGAZINESPATH, CFG_VEHICLESPATH, CFG_WEAPONSPATH, GetGame(), path и x.

◆ OnDebugSpawnEx()

void OnDebugSpawnEx ( DebugSpawnParams params)
inlineprotected
3803 {
3804 OnDebugSpawn();
3805 }
void OnDebugSpawn()
Definition EntityAI.c:3807

Перекрестные ссылки OnDebugSpawn.

◆ OnEnergyAdded()

void OnEnergyAdded ( )
inlineprotected

Energy manager event: Called when energy was added on this device. ALWAYS CALL super.OnEnergyAdded() !!!

3361{}

◆ OnEnergyConsumed()

void OnEnergyConsumed ( )
inlineprotected

Energy manager event: Called when energy was consumed on this device. ALWAYS CALL super.OnEnergyConsumed() !!!

3358{}

◆ OnExplosionEffects()

override void OnExplosionEffects ( Object source,
Object directHit,
int componentIndex,
string surface,
vector pos,
vector surfNormal,
float energyFactor,
float explosionFactor,
bool isWater,
string ammoType )
inlineprotected
907 {
909 #ifndef SERVER
910 g_Game.GetWorld().AddEnvShootingSource(pos, 1.0);
911 #endif
912 if (m_DestructionBehaviourObj && m_DestructionBehaviourObj.HasExplosionDamage())
913 {
915 }
916 }

Перекрестные ссылки g_Game.

◆ OnFreezeStateChangeClient()

void OnFreezeStateChangeClient ( )
protected

◆ OnFreezeStateChangeServer()

void OnFreezeStateChangeServer ( )
protected

◆ OnHologramBeingPlaced()

void OnHologramBeingPlaced ( Man player)
protected

◆ OnIgnitedTarget()

void OnIgnitedTarget ( EntityAI target_item)
inlineprotected

Executed on Server when this item ignites some target item.

547 {
548
549 }

◆ OnIgnitedTargetFailed()

void OnIgnitedTargetFailed ( EntityAI target_item)
inlineprotected

Executed on Server when this item failed to ignite target item.

559 {
560
561 }

◆ OnIgnitedThis()

void OnIgnitedThis ( EntityAI fire_source)
inlineprotected

Executed on Server when some item ignited this one.

553 {
554
555 }

◆ OnIgnitedThisFailed()

void OnIgnitedThisFailed ( EntityAI fire_source)
inlineprotected

Executed on Server when some item failed to ignite this one.

565 {
566
567 }

◆ OnInitEnergy()

void OnInitEnergy ( )
inlineprotected

Energy manager event: Object's initialization. Energy Manager is fully initialized by this point.

3355{}

◆ OnInventoryInit()

void OnInventoryInit ( )
inlineprotected
860 {
862 }
void InitAttachmentExclusionValues()
Definition EntityAI.c:4109

◆ OnIsPlugged()

void OnIsPlugged ( EntityAI source_device)
inlineprotected

Energy manager event: Called when this device is plugged into some energy source.

3343{}

◆ OnIsUnplugged()

void OnIsUnplugged ( EntityAI last_energy_source)
inlineprotected

Energy manager event: Called when this device is UNPLUGGED from the energy source.

3346{}

◆ OnItemAttachmentSlotChanged()

void OnItemAttachmentSlotChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprotected
921{}

◆ OnItemLocationChanged()

void OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
inlineprotected
919{ }

◆ OnItemOverheat()

void OnItemOverheat ( float deltaTime)
protected

◆ OnItemOverheatEnd()

void OnItemOverheatEnd ( )
protected

note, that the deltaTime could be reverse-calculated and not totally accurate

◆ OnItemOverheatStart()

void OnItemOverheatStart ( )
protected

override to implement desired overheat behavior on entity

◆ OnMovedInsideCargo()

void OnMovedInsideCargo ( EntityAI container)
inlineprotected

Called when this item enters cargo of some container.

1273 {
1274 if (m_EM)
1276 }
void HandleMoveInsideCargo(EntityAI container)
Definition ComponentEnergyManager.c:711

Перекрестные ссылки ComponentEnergyManager::HandleMoveInsideCargo().

◆ OnMovedWithinCargo()

void OnMovedWithinCargo ( EntityAI container)
inlineprotected

Called when this item moves within cargo of some container.

1286 {
1287
1288 }

◆ OnOwnSocketReleased()

void OnOwnSocketReleased ( EntityAI device)
inlineprotected

Energy manager event: When something is UNPLUGGED from this device.

3352{}

◆ OnOwnSocketTaken()

void OnOwnSocketTaken ( EntityAI device)
inlineprotected

Energy manager event: When something is plugged into this device.

3349{}

◆ OnPlacementCancelled()

void OnPlacementCancelled ( Man player)
protected

◆ OnPlacementComplete()

void OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
protected

◆ OnPlacementStarted()

void OnPlacementStarted ( Man player)
protected

◆ OnRemovedFromCargo()

void OnRemovedFromCargo ( EntityAI container)
inlineprotected

Called when this item exits cargo of some container.

1280 {
1281
1282 }

◆ OnRPC()

override void OnRPC ( PlayerIdentity sender,
int rpc_type,
ParamsReadContext ctx )
inlineprotected
3365 {
3366 super.OnRPC(sender, rpc_type, ctx);
3367
3368 if ( GetGame().IsClient() )
3369 {
3370 switch (rpc_type)
3371 {
3372 // BODY STAGING - server => client synchronization of skinned state.
3373 case ERPCs.RPC_BS_SKINNED_STATE:
3374 {
3376 if (ctx.Read(p_skinned_state))
3377 {
3378 float state = p_skinned_state.param1;
3379 if (state && GetCompBS())
3381 }
3382 break;
3383 }
3384
3385 case ERPCs.RPC_EXPLODE_EVENT:
3386 {
3387 OnExplodeClient();
3388 break;
3389 }
3390 }
3391 }
3392 }
ERPCs
Definition ERPCs.c:2
void SetAsSkinnedClient()
Definition BodyStaging.c:49

Перекрестные ссылки GetGame().

◆ OnStoreLoad()

bool OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

Called when data is loaded from persistence (on server side).

void OnStoreLoad(ParamsReadContext ctx, int version)
{
// dont forget to propagate this call trough class hierarchy!
if ( !super.OnStoreLoad(ctx, version) )
return false;
// read data loaded from game database (format and order of reading must be the same as writing!)
int a;
if ( !ctx.Read(a) )
return false;
float b;
if ( !ctx.Read(b) )
return false;
return true;
}
bool OnStoreLoad(ParamsReadContext ctx, int version)
Called when data is loaded from persistence (on server side).
Definition EntityAI.c:2893
Serialization general interface. Serializer API works with:
Definition Serializer.c:56
2894 {
2895 // Restoring of energy related states
2896 if ( m_EM )
2897 {
2898 // Load energy amount
2899 float f_energy = 0;
2900 if ( !ctx.Read( f_energy ) )
2901 f_energy = 0;
2903
2904 // Load passive/active state
2905 bool b_is_passive = false;
2906 if ( !ctx.Read( b_is_passive ) )
2907 return false;
2909
2910 // Load ON/OFF state
2911 bool b_is_on = false;
2912 if ( !ctx.Read( b_is_on ) )
2913 {
2914 m_EM.SwitchOn();
2915 return false;
2916 }
2917
2918 // Load plugged/unplugged state
2919 bool b_is_plugged = false;
2920 if ( !ctx.Read( b_is_plugged ) )
2921 return false;
2922
2923 // ENERGY SOURCE
2924 if ( version <= 103 )
2925 {
2926 // Load energy source ID low
2927 int i_energy_source_ID_low = 0; // Even 0 can be valid ID!
2928 if ( !ctx.Read( i_energy_source_ID_low ) )
2929 return false;
2930
2931 // Load energy source ID high
2932 int i_energy_source_ID_high = 0; // Even 0 can be valid ID!
2933 if ( !ctx.Read( i_energy_source_ID_high ) )
2934 return false;
2935 }
2936 else
2937 {
2938 int b1 = 0;
2939 int b2 = 0;
2940 int b3 = 0;
2941 int b4 = 0;
2942
2943 if ( !ctx.Read(b1) ) return false;
2944 if ( !ctx.Read(b2) ) return false;
2945 if ( !ctx.Read(b3) ) return false;
2946 if ( !ctx.Read(b4) ) return false;
2947
2948 if ( b_is_plugged )
2949 {
2950 // Because function GetEntityByPersitentID() cannot be called here, ID values must be stored and used later.
2952 m_EM.RestorePlugState(true);
2953 }
2954 }
2955
2956 if (b_is_on)
2957 {
2958 m_EM.SwitchOn();
2959 }
2960 }
2961
2962 if (version >= 140)
2963 {
2964 // variable management system
2965 if (!LoadVariables(ctx, version))
2966 return false;
2967 }
2968
2969 return true;
2970 }
void StoreEnergySourceIDs(int b1, int b2, int b3, int b4)
Definition ComponentEnergyManager.c:621
void SwitchOn()
Energy manager: Switches ON the device so it starts doing its work if it has enough energy.
Definition ComponentEnergyManager.c:375
void SetEnergy(float new_energy)
Energy manager: Sets stored energy for this device. It ignores the min/max limit!
Definition ComponentEnergyManager.c:525
void RestorePlugState(bool state)
Definition ComponentEnergyManager.c:519
void SetPassiveState(bool state=true)
Energy manager: Changes the status of this device. When it's passive (true), the main timer and OnWor...
Definition ComponentEnergyManager.c:441
bool LoadVariables(ParamsReadContext ctx, int version=-1)
Definition EntityAI.c:3083

Перекрестные ссылки ComponentEnergyManager::RestorePlugState(), ComponentEnergyManager::SetEnergy(), ComponentEnergyManager::SetPassiveState(), ComponentEnergyManager::StoreEnergySourceIDs() и ComponentEnergyManager::SwitchOn().

◆ OnStoreSave()

void OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Engine calls this function to collect data from entity to store for persistence (on server side).

{
// dont forget to propagate this call trough class hierarchy!
super.OnStoreSave(ctx);
// write any data (using params) you want to store
int a = 5;
float b = 6.0;
ctx.Write(a);
ctx.Write(b);
}
void OnStoreSave(ParamsWriteContext ctx)
Engine calls this function to collect data from entity to store for persistence (on server side).
Definition EntityAI.c:2829
2830 {
2831 // Saving of energy related states
2832 if ( m_EM )
2833 {
2834 // Save energy amount
2835 ctx.Write( m_EM.GetEnergy() );
2836
2837 // Save passive/active state
2838 ctx.Write( m_EM.IsPassive() );
2839
2840 // Save ON/OFF state
2841 ctx.Write( m_EM.IsSwitchedOn() );
2842
2843 // Save plugged/unplugged state
2844 ctx.Write( m_EM.IsPlugged() );
2845
2846 // ENERGY SOURCE
2847 // Save energy source IDs
2849 int b1 = 0;
2850 int b2 = 0;
2851 int b3 = 0;
2852 int b4 = 0;
2853
2854 if (energy_source)
2855 {
2856 energy_source.GetPersistentID(b1, b2, b3, b4);
2857 }
2858
2859 ctx.Write( b1 ); // Save energy source block 1
2860 ctx.Write( b2 ); // Save energy source block 2
2861 ctx.Write( b3 ); // Save energy source block 3
2862 ctx.Write( b4 ); // Save energy source block 4
2863 }
2864
2865 // variable management system
2867 }
bool IsPlugged()
Energy manager: Returns true if this device is plugged into some other device (even if they are OFF o...
Definition ComponentEnergyManager.c:887
float GetEnergy()
Energy manager: Returns the amount of stored energy this device has.
Definition ComponentEnergyManager.c:1214
EntityAI GetEnergySource()
Energy manager: Returns the energy source this device is plugged into.
Definition ComponentEnergyManager.c:1292
bool IsPassive()
Energy manager: Returns true if this device is set to be passive. False if otherwise.
Definition ComponentEnergyManager.c:881
bool IsSwitchedOn()
Energy manager: Returns state of the switch. Whenever the device is working or not does not matter....
Definition ComponentEnergyManager.c:866
void SaveVariables(ParamsWriteContext ctx)
Definition EntityAI.c:3065

Перекрестные ссылки ComponentEnergyManager::GetEnergy(), ComponentEnergyManager::GetEnergySource(), ComponentEnergyManager::IsPassive(), ComponentEnergyManager::IsPlugged() и ComponentEnergyManager::IsSwitchedOn().

◆ OnSwitchOff()

void OnSwitchOff ( )
inlineprotected

Energy manager event: Called when the device is switched OFF.

3340{}

◆ OnSwitchOn()

void OnSwitchOn ( )
inlineprotected

Energy manager event: Called when the device is switched on.

3337{}

◆ OnVariablesSynchronized()

void OnVariablesSynchronized ( )
inlineprotected

Called on clients after receiving synchronization data from server.

2979 {
2980 if ( m_EM )
2981 {
2982 if ( GetGame().IsMultiplayer() )
2983 {
2984 bool is_on = m_EM.IsSwitchedOn();
2985
2987 {
2988 if (is_on)
2989 m_EM.SwitchOn();
2990 else
2991 m_EM.SwitchOff();
2992 }
2993
2996
2997 EntityAI energy_source = EntityAI.Cast( GetGame().GetObjectByNetworkId(id_low, id_High) );
2998
2999 if (energy_source)
3000 {
3002
3003 if ( !esem )
3004 {
3005 string object = energy_source.GetType();
3006 Error("Synchronization error! Object " + object + " has no instance of the Energy Manager component!");
3007 }
3008
3010
3011 }
3012 else
3013 {
3014 m_EM.UnplugThis();
3015 }
3016
3019 }
3020 }
3021
3022 if (m_IsFrozen != m_IsFrozenLocal && !GetGame().IsDedicatedServer())
3023 {
3026 }
3027 }
void SwitchOff()
Energy manager: Switches OFF the device.
Definition ComponentEnergyManager.c:406
void UnplugThis()
Energy manager: Unplugs this device from its power source.
Definition ComponentEnergyManager.c:494
int GetEnergySourceNetworkIDHigh()
Definition ComponentEnergyManager.c:1150
void StartUpdates()
Definition ComponentEnergyManager.c:1452
int GetEnergySourceNetworkIDLow()
Definition ComponentEnergyManager.c:1144
bool GetPreviousSwitchState()
Definition ComponentEnergyManager.c:860
void DeviceUpdate()
Definition ComponentEnergyManager.c:1747
bool m_IsFrozenLocal
Definition EntityAI.c:161
void OnFreezeStateChangeClient()

Перекрестные ссылки ComponentEnergyManager::DeviceUpdate(), Error(), ComponentEnergyManager::GetEnergySourceNetworkIDHigh(), ComponentEnergyManager::GetEnergySourceNetworkIDLow(), GetGame(), ComponentEnergyManager::GetPreviousSwitchState(), ComponentEnergyManager::IsSwitchedOn(), ComponentEnergyManager::PlugThisInto(), ComponentEnergyManager::StartUpdates(), ComponentEnergyManager::SwitchOff(), ComponentEnergyManager::SwitchOn() и ComponentEnergyManager::UnplugThis().

◆ OnWasAttached()

void OnWasAttached ( EntityAI parent,
int slot_id )
protected

◆ OnWasDetached()

void OnWasDetached ( EntityAI parent,
int slot_id )
inlineprotected
1772 {
1773 if (!IsFlagSet(EntityFlags.VISIBLE))
1774 {
1775 SetInvisible(false);
1776 OnInvisibleSet(false);
1777 SetInvisibleRecursive(false,parent);
1778 }
1779 }
void SetInvisibleRecursive(bool invisible, EntityAI parent=null, array< int > attachments=null)
Definition EntityAI.c:3912
EntityFlags
Entity flags.
Definition EnEntity.c:115

◆ OnWetChanged()

void OnWetChanged ( float newVal,
float oldVal )
protected

◆ OnWetLevelChanged()

void OnWetLevelChanged ( EWetnessLevel newLevel,
EWetnessLevel oldLevel )
protected

◆ OnWork()

void OnWork ( float consumed_energy)
inlineprotected

Energy manager event: Called every device update if its supposed to do some work. The update can be every second or at random, depending on its manipulation.

3331{}

◆ OnWorkStart()

void OnWorkStart ( )
inlineprotected

Energy manager event: Called only once when this device starts doing its work.

3328{}

◆ OnWorkStop()

void OnWorkStop ( )
inlineprotected

Energy manager event: Called when the device stops working (was switched OFF or ran out of energy)

3334{}

◆ PairRemote()

void PairRemote ( notnull EntityAI trigger)
protected

◆ PlacementCanBeRotated()

bool PlacementCanBeRotated ( )
inlineprotected

Should return false if you want to disable hologram rotation.

541 {
542 return true;
543 }

◆ PlaceOnSurfaceRotated()

proto native void PlaceOnSurfaceRotated ( out vector trans[4],
vector pos,
float dx = 0,
float dz = 0,
float fAngle = 0,
bool align = false )
protected

◆ PredictiveDropEntity()

bool PredictiveDropEntity ( notnull EntityAI item)
inlineprotected
2012 {
2013 return false;
2014 }

◆ PredictiveTakeEntityAsAttachment()

bool PredictiveTakeEntityAsAttachment ( notnull EntityAI item)
inlineprotected

Put item into as attachment.

1996 {
1997 if (GetGame().IsMultiplayer())
1998 return GetInventory().TakeEntityAsAttachment(InventoryMode.JUNCTURE, item);
1999 else
2000 return GetInventory().TakeEntityAsAttachment(InventoryMode.PREDICTIVE, item);
2001 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityAsAttachmentEx()

bool PredictiveTakeEntityAsAttachmentEx ( notnull EntityAI item,
int slot )
inlineprotected

Returns if item can be added as attachment on specific slot. Note that slot index IS NOT slot ID! Slot ID is defined in DZ/data/config.cpp.

1929 {
1930 if ( GetGame().IsMultiplayer() )
1931 return GetInventory().TakeEntityAsAttachmentEx(InventoryMode.JUNCTURE, item, slot);
1932 else
1933 return GetInventory().TakeEntityAsAttachmentEx(InventoryMode.PREDICTIVE, item, slot);
1934 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToCargo()

bool PredictiveTakeEntityToCargo ( notnull EntityAI item)
inlineprotected

Put item into into cargo.

1865 {
1866 if ( GetGame().IsMultiplayer() )
1867 return GetInventory().TakeEntityToCargo(InventoryMode.JUNCTURE, item);
1868 else
1869 return GetInventory().TakeEntityToCargo(InventoryMode.PREDICTIVE, item);
1870 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToCargoEx()

bool PredictiveTakeEntityToCargoEx ( notnull EntityAI item,
int idx,
int row,
int col )
inlineprotected

Put item into into cargo on specific cargo location.

1899 {
1900 if ( GetGame().IsMultiplayer() )
1901 return GetInventory().TakeEntityToCargoEx(InventoryMode.JUNCTURE, item, idx, row, col);
1902 else
1903 return GetInventory().TakeEntityToCargoEx(InventoryMode.PREDICTIVE, item, idx, row, col);
1904 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToInventory()

bool PredictiveTakeEntityToInventory ( FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected

Put item anywhere into this entity (as attachment or into cargo, recursively)

1832 {
1833 if ( GetGame().IsMultiplayer() )
1834 return GetInventory().TakeEntityToInventory(InventoryMode.JUNCTURE, flags, item);
1835 else
1836 return GetInventory().TakeEntityToInventory(InventoryMode.PREDICTIVE, flags, item);
1837 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToTargetAttachment()

bool PredictiveTakeEntityToTargetAttachment ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected
1961 {
1962 if ( GetGame().IsMultiplayer() )
1963 return GetInventory().TakeEntityAsTargetAttachment(InventoryMode.JUNCTURE, target, item);
1964 else
1965 return GetInventory().TakeEntityAsTargetAttachment(InventoryMode.PREDICTIVE, target, item);
1966 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToTargetAttachmentEx()

bool PredictiveTakeEntityToTargetAttachmentEx ( notnull EntityAI target,
notnull EntityAI item,
int slot )
inlineprotected
1945 {
1946 if ( GetGame().IsMultiplayer() )
1947 return GetInventory().TakeEntityAsTargetAttachmentEx(InventoryMode.JUNCTURE, target, item, slot);
1948 else
1949 return GetInventory().TakeEntityAsTargetAttachmentEx(InventoryMode.PREDICTIVE, target, item, slot);
1950 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToTargetCargo()

bool PredictiveTakeEntityToTargetCargo ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected
1881 {
1882 if ( GetGame().IsMultiplayer() )
1883 return GetInventory().TakeEntityToTargetCargo(InventoryMode.JUNCTURE, target, item);
1884 else
1885 return GetInventory().TakeEntityToTargetCargo(InventoryMode.PREDICTIVE, target, item);
1886 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToTargetCargoEx()

bool PredictiveTakeEntityToTargetCargoEx ( notnull CargoBase cargo,
notnull EntityAI item,
int row,
int col )
inlineprotected
1911 {
1912 if ( GetGame().IsMultiplayer() )
1913 return GetInventory().TakeEntityToTargetCargoEx(InventoryMode.JUNCTURE, cargo, item, row, col);
1914 else
1915 return GetInventory().TakeEntityToTargetCargoEx(InventoryMode.PREDICTIVE, cargo, item, row, col);
1916 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToTargetInventory()

bool PredictiveTakeEntityToTargetInventory ( notnull EntityAI target,
FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected
1847 {
1848 if ( GetGame().IsMultiplayer() )
1849 return GetInventory().TakeEntityToTargetInventory(InventoryMode.JUNCTURE, target, flags, item);
1850 else
1851 return GetInventory().TakeEntityToTargetInventory(InventoryMode.PREDICTIVE, target, flags, item);
1852 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeToDst()

bool PredictiveTakeToDst ( notnull InventoryLocation src,
notnull InventoryLocation dst )
inlineprotected
1977 {
1978 if ( GetGame().IsMultiplayer() )
1979 return GetInventory().TakeToDst(InventoryMode.JUNCTURE, src, dst);
1980 else
1981 return GetInventory().TakeToDst(InventoryMode.PREDICTIVE, src, dst);
1982 }

Перекрестные ссылки GetGame().

◆ ProcessInvulnerabilityCheck()

void ProcessInvulnerabilityCheck ( string servercfg_param)
inlineprotected
3882 {
3883 if ( GetGame() && GetGame().IsMultiplayer() && GetGame().IsServer() )
3884 {
3885 int invulnerability;
3886 switch (servercfg_param)
3887 {
3888 case "disableContainerDamage":
3890 break;
3891
3892 case "disableBaseDamage":
3894 break;
3895 }
3896
3897 if (invulnerability > 0)
3898 {
3899 SetAllowDamage(false);
3900 }
3901 }
3902 }
static bool GetDisableBaseDamage()
Definition CfgGameplayHandler.c:162
static bool GetDisableContainerDamage()
Definition CfgGameplayHandler.c:168

Перекрестные ссылки CfgGameplayHandler::GetDisableBaseDamage(), CfgGameplayHandler::GetDisableContainerDamage() и GetGame().

◆ ProcessMeleeItemDamage()

override EntityAI ProcessMeleeItemDamage ( int mode = 0)
inlineprotected
3864 {
3865 if (GetGame().IsServer())
3866 AddHealth("","Health",-MELEE_ITEM_DAMAGE);
3867 return this;
3868 }
const float MELEE_ITEM_DAMAGE
Definition constants.c:625

Перекрестные ссылки GetGame() и MELEE_ITEM_DAMAGE.

◆ ProcessVariables()

void ProcessVariables ( )
inlineprotected
3779 {
3780 //currently only temperature on EntityAI
3781 if (g_Game.IsWorldWetTempUpdateEnabled())
3782 {
3784 {
3785 float target = g_Game.GetMission().GetWorldData().GetBaseEnvTemperatureAtObject(this);
3786 if (GetTemperature() != target)
3787 {
3788 float heatPermCoef = 1.0;
3789 EntityAI ent = this;
3790 while (ent)
3791 {
3792 heatPermCoef *= ent.GetHeatPermeabilityCoef();
3793 ent = ent.GetHierarchyParent();
3794 }
3795
3797 }
3798 }
3799 }
3800 }
ETemperatureAccessTypes
Definition TemperatureAccessConstants.c:2
void SetTemperatureEx(TemperatureData data)
sets temperature, handles base overheating and freezing state progression logics
Definition EntityAI.c:2264
bool IsSelfAdjustingTemperature()
Definition EntityAI.c:3749
const float TEMP_COEF_WORLD
Definition constants.c:900

Перекрестные ссылки CanHaveTemperature(), g_Game, IsSelfAdjustingTemperature() и GameConstants::TEMP_COEF_WORLD.

◆ PropagateExclusionValueRecursive()

void PropagateExclusionValueRecursive ( set< int > values,
int slotId )
inlineprivate
4360 {
4361 if (values && values.Count() != 0)
4362 {
4365 GetInventory().GetCurrentInventoryLocation(lcn);
4367 {
4369 EntityAI parent = GetHierarchyParent();
4370 if (parent)
4371 parent.PropagateExclusionValueRecursive(passThis,lcn.GetSlot());
4372 }
4373 }
4374 }

◆ ReadVarsFromCTX()

bool ReadVarsFromCTX ( ParamsReadContext ctx,
int version = -1 )
inlineprotected

Reads from storage CTX.

3117 {
3118 if (version < 140)
3119 return true;
3120
3121 int intValue;
3122 float value;
3123
3124 if (!ctx.Read(intValue))
3125 return false;
3126
3127 m_VariablesMask = intValue; //necessary for higher implement overrides. Hope it does not bork some init somewhere.
3128
3129 //--------------------------------------------
3131 {
3132 if (!ctx.Read(value))
3133 return false;
3135
3136 if (!ctx.Read(intValue))
3137 return false;
3139 }
3140
3141 return true;
3142 }

Перекрестные ссылки VARIABLE_TEMPERATURE.

◆ RefreshTemperatureAccess()

void RefreshTemperatureAccess ( TemperatureData data)
inlineprotected

refreshes access without setting temperature, keeps the source locked in

2355 {
2356 if (!CanHaveTemperature())
2357 {
2358 Debug.Log("RefreshTemperatureAccess | entity " + this + " does not have temperature range defined!");
2359 return;
2360 }
2361
2362 m_TAC.TryAccessSource(data);
2363 }

Перекрестные ссылки CanHaveTemperature() и Debug::Log().

◆ RegisterNetSyncVariableBool()

RegisterNetSyncVariableBool ( string variableName)
protected

registers bool variable synchronized over network

Аргументы
[in]variableNamewhich variable should be synchronized

◆ RegisterNetSyncVariableBoolSignal()

RegisterNetSyncVariableBoolSignal ( string variableName)
protected

when bool variable is true, it's sent to clients and become false again

Аргументы
[in]variableNamewhich variable should be synchronized

◆ RegisterNetSyncVariableFloat()

RegisterNetSyncVariableFloat ( string variableName,
float minValue = 0,
float maxValue = 0,
int precision = 1 )
protected

registers float variable synchronized over network

Аргументы
[in]variableNamewhich variable should be synchronized
[in]minValueminimal value used for quantization (when minValue == maxValue, no quatization is done)
[in]maxValuemaximal value used for quantization (when minValue == maxValue, no quatization is done)
[in]precisionprecision in number of digits after decimal point

◆ RegisterNetSyncVariableInt()

RegisterNetSyncVariableInt ( string variableName,
int minValue = 0,
int maxValue = 0 )
protected

registers int variable synchronized over network

Аргументы
[in]variableNamewhich variable should be synchronized
[in]minValueminimal value used for quantization (when minValue == maxValue, no quatization is done)
[in]maxValuemaximal value used for quantization (when minValue == maxValue, no quatization is done)

◆ RegisterNetSyncVariableObject()

RegisterNetSyncVariableObject ( string variableName)
protected

registers object variable synchronized over network, only synchronizes if network id is assigned. Doesn't handle object despawn on client

Аргументы
[in]variableNamewhich variable should be synchronized

◆ RegisterTransportHit()

void RegisterTransportHit ( Transport transport)
inlineprotected
3978 {
3980 {
3983 Car car;
3984 Boat boat;
3985 float damage;
3987
3988 // a different attempt to solve hits from "standing" car to the players
3989 if (Car.CastTo(car, transport))
3990 {
3991 if (car.GetSpeedometerAbsolute() > 2 )
3992 {
3994 ProcessDirectDamage(DT_CUSTOM, transport, "", "TransportHit", "0 0 0", damage);
3995 }
3996 else
3997 {
3999 }
4000
4001 // compute impulse and apply only if the body dies
4002 if (IsDamageDestroyed() && car.GetSpeedometerAbsolute() > 3)
4003 {
4005 impulse[1] = 40 * 1.5;
4007 }
4008 }
4009 else if (Boat.CastTo(boat, transport))
4010 {
4011 Human player = Human.Cast(this);
4012 if (player && player.PhysicsGetLinkedEntity() == boat) // standing on boat
4013 {
4015 return;
4016 }
4017
4018 if (m_TransportHitVelocity.Normalize() > 5) // 5 m/s
4019 {
4021 ProcessDirectDamage(DT_CUSTOM, transport, "", "TransportHit", "0 0 0", damage);
4022 }
4023 else
4025 }
4026 else //old solution just in case if somebody use it
4027 {
4028 // avoid damage because of small movements
4029 if (m_TransportHitVelocity.Length() > 0.1)
4030 {
4032 ProcessDirectDamage(DT_CUSTOM, transport, "", "TransportHit", "0 0 0", damage);
4033 }
4034 else
4035 {
4037 }
4038
4039 // compute impulse and apply only if the body dies
4040 if (IsDamageDestroyed() && m_TransportHitVelocity.Length() > 0.3)
4041 {
4043 impulse[1] = 40 * 1.5;
4045 }
4046 }
4047 }
4048 }
vector m_TransportHitVelocity
Definition EntityAI.c:139
bool m_TransportHitRegistered
Definition EntityAI.c:138
proto float Normalize()
Normalizes vector. Returns length.
proto native float Length()
Returns length of vector (magnitude)
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.
proto void dBodyApplyImpulse(notnull IEntity body, vector impulse)
Applies impuls on a rigidbody (origin)

Перекрестные ссылки dBodyApplyImpulse(), GetVelocity(), vector::Length() и vector::Normalize().

◆ RemoveAgent()

void RemoveAgent ( int agent_id)
protected

◆ RemoveAllAgents()

void RemoveAllAgents ( )
protected

◆ RemoveAllAgentsExcept()

void RemoveAllAgentsExcept ( int agent_to_keep)
protected

◆ RemoveItemVariable()

void RemoveItemVariable ( int variable)
inlineprotected

Removes variable from variable mask, making it appear as though the variable has never been changed from default.

3049 {
3051 }

◆ ReplaceOnDeath()

bool ReplaceOnDeath ( )
inlineprotected
1042 {
1043 return false;
1044 }

◆ SaveVariables()

void SaveVariables ( ParamsWriteContext ctx)
inlineprotected
3066 {
3067 //first set the flags
3068 int varFlags = 0;
3069
3070 if (m_VariablesMask)
3072
3073 ctx.Write(varFlags);
3074 //-------------------
3075 //now serialize the variables
3076
3077 //floats
3078 if (m_VariablesMask)
3080 }
void WriteVarsToCTX(ParamsWriteContext ctx)
Writes to storage CTX.
Definition EntityAI.c:3103

Перекрестные ссылки ItemVariableFlags::FLOAT и WriteVarsToCTX().

◆ SerializeNumericalVars()

void SerializeNumericalVars ( array< float > floats_out)
inlineprotected
3145 {
3146 // the order of serialization must be the same as the order of de-serialization
3148
3149 //--------------------------------------------
3151 {
3153 floats_out.Insert((float)GetIsFrozen());
3154 }
3155 }
bool GetIsFrozen()
Definition EntityAI.c:2445
bool IsVariableSet(int variable)
'true' if this variable has ever been changed from default
Definition EntityAI.c:3033

Перекрестные ссылки VARIABLE_TEMPERATURE.

◆ ServerDropEntity()

bool ServerDropEntity ( notnull EntityAI item)
inlineprotected
2022 {
2023 return false;
2024 }

◆ ServerTakeEntityAsAttachment()

bool ServerTakeEntityAsAttachment ( notnull EntityAI item)
inlineprotected
2007 {
2008 return GetInventory().TakeEntityAsAttachment(InventoryMode.SERVER, item);
2009 }

◆ ServerTakeEntityAsAttachmentEx()

bool ServerTakeEntityAsAttachmentEx ( notnull EntityAI item,
int slot )
inlineprotected
1940 {
1941 return GetInventory().TakeEntityAsAttachmentEx(InventoryMode.SERVER, item, slot);
1942 }

◆ ServerTakeEntityToCargo()

bool ServerTakeEntityToCargo ( notnull EntityAI item)
inlineprotected
1876 {
1877 return GetInventory().TakeEntityToCargo(InventoryMode.SERVER, item);
1878 }

◆ ServerTakeEntityToInventory()

bool ServerTakeEntityToInventory ( FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected
1843 {
1844 return GetInventory().TakeEntityToInventory(InventoryMode.SERVER, flags, item);
1845 }

◆ ServerTakeEntityToTargetAttachment()

bool ServerTakeEntityToTargetAttachment ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected
1972 {
1973 return GetInventory().TakeEntityAsTargetAttachment(InventoryMode.SERVER, target, item);
1974 }

◆ ServerTakeEntityToTargetAttachmentEx()

bool ServerTakeEntityToTargetAttachmentEx ( notnull EntityAI target,
notnull EntityAI item,
int slot )
inlineprotected
1956 {
1957 return GetInventory().TakeEntityAsTargetAttachmentEx(InventoryMode.SERVER, target, item, slot);
1958 }

◆ ServerTakeEntityToTargetCargo()

bool ServerTakeEntityToTargetCargo ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected
1892 {
1893 return GetInventory().TakeEntityToTargetCargo(InventoryMode.SERVER, target, item);
1894 }

◆ ServerTakeEntityToTargetCargoEx()

bool ServerTakeEntityToTargetCargoEx ( notnull CargoBase cargo,
notnull EntityAI item,
int row,
int col )
inlineprotected
1922 {
1923 return GetInventory().TakeEntityToTargetCargoEx(InventoryMode.SERVER, cargo, item, row, col);
1924 }

◆ ServerTakeEntityToTargetInventory()

bool ServerTakeEntityToTargetInventory ( notnull EntityAI target,
FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected
1858 {
1859 return GetInventory().TakeEntityToTargetInventory(InventoryMode.SERVER, target, flags, item);
1860 }

◆ ServerTakeToDst()

bool ServerTakeToDst ( notnull InventoryLocation src,
notnull InventoryLocation dst )
inlineprotected
1988 {
1989 return GetInventory().TakeToDst(InventoryMode.SERVER, src, dst);
1990 }

◆ SetActive()

proto native void SetActive ( bool active)
private

Sets this camera as active.

◆ SetAITargetCallbacks()

proto native void SetAITargetCallbacks ( AbstractAITargetCallbacks callbacks)
protected

◆ SetAmbientAlpha()

proto native void SetAmbientAlpha ( float pAlpha)
private

◆ SetAmbientColor()

proto native void SetAmbientColor ( float pRed,
float pGreen,
float pBlue )
private

◆ SetAmbientColorV()

proto native void SetAmbientColorV ( vector pColorVector)
private

◆ SetAsSkinned()

void SetAsSkinned ( )
inlineprotected
487 {
488 if (GetCompBS())
490 }
void SetAsSkinned()
Definition BodyStaging.c:23

◆ SetAttachmentExclusionMaskGlobal()

void SetAttachmentExclusionMaskGlobal ( set< int > values)
inlineprotected

◆ SetAttachmentExclusionMaskSlot()

void SetAttachmentExclusionMaskSlot ( int slotId,
set< int > values )
inlineprotected

sets values for specific slot

4350 {
4352 {
4354 }
4355 else
4356 ErrorEx("m_AttachmentExclusionSlotMap not available! Fill the 'inventorySlot[]' in the " + this + " config file.");
4357 }

Перекрестные ссылки ErrorEx.

◆ SetBayonetAttached()

void SetBayonetAttached ( bool pState,
int slot_idx = -1 )
inlineprotected
3904{};

◆ SetBrightness()

proto native void SetBrightness ( float pValue)
private

◆ SetButtstockAttached()

void SetButtstockAttached ( bool pState,
int slot_idx = -1 )
inlineprotected
3908{};

◆ SetCastShadow()

proto native void SetCastShadow ( bool pState)
private

◆ SetCleanness()

void SetCleanness ( int value,
bool allow_client = false )
protected

◆ SetColor()

void SetColor ( int r,
int g,
int b,
int a )
protected

◆ SetDiffuseAlpha()

proto native void SetDiffuseAlpha ( float pAlpha)
private

◆ SetDiffuseColor()

proto native void SetDiffuseColor ( float pRed,
float pGreen,
float pBlue )
private

◆ SetDiffuseColorV()

proto native void SetDiffuseColorV ( vector pColorVector)
private

◆ SetEnabled()

proto native void SetEnabled ( bool pState)
private

◆ SetFlareRelPosition()

proto native void SetFlareRelPosition ( vector pPosition)
private

◆ SetFlareVisible()

proto native void SetFlareVisible ( bool pState)
private

◆ SetFocus()

proto native void SetFocus ( float distance,
float blur )
private

Depth of Field settings.

Аргументы
distanceDOF distance parameter
blurDOF blur parameter

◆ SetFOV()

proto native void SetFOV ( float fov)
private

Field of View settings.

Аргументы
fovFOV angle in radians

◆ SetFreezeThawProgress()

void SetFreezeThawProgress ( float val)
inlineprotected

0->1 when freezing, 1->0 when thawing

2436 {
2438 }

◆ SetFromProjectile()

void SetFromProjectile ( ProjectileStoppedInfo info)
inlineprotected
4553 {
4554 }

◆ SetFrozen()

void SetFrozen ( bool frozen)
inlineprotected
2451 {
2452 if (!CanFreeze() && frozen)
2453 return;
2454
2455 bool previous = m_IsFrozen;
2458
2459 if (previous != frozen)
2460 {
2461 SetSynchDirty();
2463 }
2464 }
void OnFreezeStateChangeServer()
bool CanFreeze()
Definition EntityAI.c:2440

◆ SetHeatHazePower()

proto native void SetHeatHazePower ( float pValue)
private

◆ SetHeatHazeRadius()

proto native void SetHeatHazeRadius ( float pValue)
private

◆ SetInvisibleRecursive()

void SetInvisibleRecursive ( bool invisible,
EntityAI parent = null,
array< int > attachments = null )
inlineprotected
3913 {
3916 if (attachments)
3918 else
3919 {
3920 for (int i = 0; i < GetInventory().GetAttachmentSlotsCount(); i++)
3921 {
3922 attachmentsArray.Insert(GetInventory().GetAttachmentSlotId(i));
3923 }
3924 }
3925
3926 EntityAI item;
3927
3928 foreach( int slot : attachmentsArray )
3929 {
3930 if( parent )
3931 item = parent.GetInventory().FindAttachment(slot);
3932 else
3933 item = this;//GetInventory().FindAttachment(slot);
3934
3935 if( item )
3936 {
3937 if( item.GetInventory().AttachmentCount() > 0 )
3938 {
3939 for(i = 0; i < item.GetInventory().GetAttachmentSlotsCount(); i++)
3940 {
3941 childrenAtt.Insert(item.GetInventory().GetAttachmentSlotId(i));
3942 }
3943
3945 }
3946
3947 item.SetInvisible(invisible);
3948 item.OnInvisibleSet(invisible);
3949 }
3950 }
3951 }

◆ SetItemOverheatProgress()

void SetItemOverheatProgress ( float val,
float deltaTime = 0 )
inlineprotected
2583 {
2586
2587 if (m_OverheatProgress >= 1)
2588 {
2589 if (previous < 1)
2591
2593 }
2594 else if (previous >= 1)
2595 {
2597 }
2598 }
void OnItemOverheatStart()
override to implement desired overheat behavior on entity
void OnItemOverheat(float deltaTime)
void OnItemOverheatEnd()
note, that the deltaTime could be reverse-calculated and not totally accurate

Перекрестные ссылки Math::Clamp().

◆ SetLifetime()

proto native void SetLifetime ( float fLifeTime)
protected

Set (override) remaining economy lifetime (seconds)

◆ SetLifetimeMax()

proto native void SetLifetimeMax ( float fLifeTime)
protected

Set (override) max economy lifetime per entity instance (seconds)

◆ SetLightType()

proto native void SetLightType ( int pType)
private

◆ SetLiquidType()

void SetLiquidType ( int value,
bool allow_client = false )
protected

◆ SetNearPlane()

proto native void SetNearPlane ( float nearPlane)
private

set near plane of camera

Аргументы
nearPlaneclamped internally to 0.01m

◆ SetObjectMaterial()

proto native void SetObjectMaterial ( int index,
string mat_name )
protected

Change material in hiddenSelections.

◆ SetObjectTexture()

proto native void SetObjectTexture ( int index,
string texture_name )
protected

Change texture in hiddenSelections.

◆ SetPersistentPairID()

void SetPersistentPairID ( int id)
inlineprotected
4092 {
4094 if (raib)
4095 {
4096 raib.SetPersistentPairID(id);
4097 }
4098 }
RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour()
Remotely controlled devices helpers.
Definition RemotelyActivatedItemBehaviour.c:2

Перекрестные ссылки GetRemotelyActivatedItemBehaviour().

◆ SetPilotLight()

proto native void SetPilotLight ( bool isOn)
protected

◆ SetPrepareToDelete()

void SetPrepareToDelete ( )
inlineprotected
790 {
791 m_PreparedToDelete = true;
792 }

◆ SetPulseCoef()

proto native void SetPulseCoef ( float pState)
private

◆ SetQuantity()

bool SetQuantity ( float value,
bool destroy_config = true,
bool destroy_forced = false,
bool allow_client = false,
bool clamp_to_stack_max = true )
protected

◆ SetQuantityToMinimum()

void SetQuantityToMinimum ( )
protected

◆ SetRadius()

proto native void SetRadius ( float pValue)
private

◆ SetRoofAbove()

void SetRoofAbove ( bool state)
inlineprotected
669 {
671 }

◆ SetSimpleHiddenSelectionState()

proto native void SetSimpleHiddenSelectionState ( int index,
bool state )
protected

Simple hidden selection state; 0 == hidden.

◆ SetSpotLightAngle()

proto native void SetSpotLightAngle ( float pValue)
private

◆ SetStoreLoad()

void SetStoreLoad ( bool value)
protected

◆ SetStoreLoadedQuantity()

void SetStoreLoadedQuantity ( float value)
protected

◆ SetSynchDirty()

proto native void SetSynchDirty ( )
protected

Sets object synchronization dirty flag, which signalize that object wants to be synchronized (take effect only in MP on server side)

◆ SetTakeable()

void SetTakeable ( bool pState)
protected

◆ SetTemperature()

void SetTemperature ( float value,
bool allow_client = false )
inlineprotected

not really deprecated, but missing context info from TemperatureData. Default values used instead.

2246 {
2247 /*#ifdef DEVELOPER
2248 ErrorEx("Obsolete 'SetTemperature' called! Metadata will be extrapolated from base values.");
2249 #endif*/
2250
2252 return;
2253
2255 }
void TemperatureData(float val, ETemperatureAccessTypes accessType=ETemperatureAccessTypes.ACCESS_UNKNOWN, float time=-1, float timeCoef=1, float heatPermCoef=1)
Definition TemperatureData.c:44
bool IsServerCheck(bool allow_client)
Definition EntityAI.c:2675

Перекрестные ссылки TemperatureData().

◆ SetTemperatureDirect()

void SetTemperatureDirect ( float value,
bool allow_client = false )
inlineprotected
2231 {
2233 return;
2234
2235 float min = GetTemperatureMin();
2236 float max = GetTemperatureMax();
2239
2242 }
void SetVariableMask(int variable)
Definition EntityAI.c:3038

Перекрестные ссылки Math::Clamp() и VARIABLE_TEMPERATURE.

◆ SetTemperatureEx()

void SetTemperatureEx ( TemperatureData data)
inlineprotected

sets temperature, handles base overheating and freezing state progression logics

CanFreeze

2265 {
2266 #ifdef DEVELOPER
2267 m_LastFTChangeTime = -1;
2269 #endif
2270
2271 if (!CanHaveTemperature())
2272 {
2273 Debug.Log("SetTemperatureEx | entity " + this + " does not have temperature range defined!");
2274 return;
2275 }
2276
2277 if (!m_TAC.TryAccessSource(data))
2278 return;
2279
2280 if (!IsServerCheck(false))
2281 return;
2282
2284 float target = Math.Clamp(data.m_AdjustedTarget, GetTemperatureMin(), GetTemperatureMax());
2285 float delta;
2286 //overheating
2287 if (CanItemOverheat())
2288 {
2290 delta = data.m_AdjustedTarget - GetTemperature();
2291 else
2292 delta = data.m_AdjustedTarget - GetItemOverheatThreshold();
2293
2295 }
2296
2297 //freezing, can obstruct temperature change
2298 if (CanFreeze())
2299 {
2300 if (!m_IsFrozen)
2301 {
2304 {
2305 //first crossing the threshold
2306 if (m_VarTemperature >= GetTemperatureFreezeThreshold()) //going DOWN or STAYING AT THRESHOLD, FREEZING;
2307 {
2309 }
2310 else //going UP, still FREEZING
2311 {
2313 }
2315 }
2316 else
2317 {
2321 }
2322 }
2323 else
2324 {
2327 {
2328 //first crossing the threshold
2329 if (m_VarTemperature <= GetTemperatureThawThreshold()) //going UP, THAWING
2330 {
2332 }
2333 else //going DOWN, still THAWING
2334 {
2336 }
2338 }
2339 else
2340 {
2344 }
2345 }
2346 }
2347 else
2348 {
2350 }
2351 }
void InterpolateTempData(TemperatureDataInterpolated data)
Definition EntityAI.c:2365
void HandleFreezingProgression(float deltaHeat, TemperatureData data)
Definition EntityAI.c:2466
void HandleItemOverheating(float deltaHeat, TemperatureData data)
Definition EntityAI.c:2605
float GetItemOverheatThreshold()
if undefined, max temperature used as default
Definition EntityAI.c:2561
bool CanItemOverheat()
Overheat time CAN be 0, GameConstants.TEMPERATURE_TIME_OVERHEAT_MIN is ignored if so.
Definition EntityAI.c:2555

Перекрестные ссылки CanHaveTemperature(), CanItemOverheat(), Math::Clamp(), GetItemOverheatThreshold(), GetTemperatureFreezeThreshold(), GetTemperatureThawThreshold() и Debug::Log().

◆ SetTemperatureMax()

void SetTemperatureMax ( )
inlineprotected

presumably for debug purposes?

Перекрестные ссылки GetTemperatureFreezeThreshold().

◆ SetUniversalTemperatureSource()

void SetUniversalTemperatureSource ( UTemperatureSource uts)
inlineprotected
4073 {
4075 }

◆ SetVariableMask()

void SetVariableMask ( int variable)
inlineprotected
3039 {
3041 if (GetGame().IsServer())
3042 {
3043 SetSynchDirty();
3044 }
3045 }

Перекрестные ссылки GetGame().

◆ SetViewIndex()

void SetViewIndex ( int index)
inlineprotected

Sets item preview index.

3620 {
3622
3623 if( GetGame().IsServer() )
3624 {
3625 SetSynchDirty();
3626 }
3627 }
int m_ViewIndex
Definition EntityAI.c:3616

Перекрестные ссылки GetGame().

◆ SetVisibleDuringDaylight()

proto native void SetVisibleDuringDaylight ( bool pState)
private

◆ SetWeightDirty()

void SetWeightDirty ( )
inlineprotected
3461 {
3462 #ifdef DEVELOPER
3463 if (WeightDebug.m_VerbosityFlags & WeightDebugType.SET_DIRTY_FLAG)
3464 {
3465 Print("---------------------------------------");
3466 Print("ent:" + this + " - SetWeightDirty");
3467 if (WeightDebug.m_VerbosityFlags & WeightDebugType.DUMP_STACK)
3468 {
3469 DumpStack();
3470 }
3471 Print("---------------------------------------");
3472 }
3473 #endif
3474 m_WeightDirty = 1;
3475 if (GetHierarchyParent())
3476 {
3477 GetHierarchyParent().SetWeightDirty();
3478 }
3479 }

Перекрестные ссылки DumpStack() и Print().

◆ SetWet()

void SetWet ( float value,
bool allow_client = false )
protected

◆ SetWetMax()

void SetWetMax ( )
protected

◆ ShowAllSelections()

void ShowAllSelections ( )
inlineprotected

Sets all animation values to 0, making them VISIBLE if they are configured in models.cfg in such way. These selections must also be defined in the entity's config class in 'AnimationSources'.

1360 {
1361 string cfg_path = "cfgVehicles " + GetType() + " AnimationSources";
1362
1363 if ( GetGame().ConfigIsExisting(cfg_path) )
1364 {
1365 int selections = GetGame().ConfigGetChildrenCount(cfg_path);
1366
1367 for (int i = 0; i < selections; i++)
1368 {
1369 string selection_name;
1370 GetGame().ConfigGetChildName(cfg_path, i, selection_name);
1372 }
1373 }
1374 }
void ShowSelection(string selection_name)
Shows selection of the given name. Must be configed in config.hpp and models.cfg.
Definition EntityAI.c:3264

Перекрестные ссылки GetGame() и GetType().

◆ ShowSelection()

void ShowSelection ( string selection_name)
inlineprotected

Shows selection of the given name. Must be configed in config.hpp and models.cfg.

3265 {
3266 if ( !ToDelete() )
3267 {
3268 SetAnimationPhase ( selection_name, 0 ); // 1 = hide, 0 = unhide!
3269 }
3270 }

◆ SoundHardBushFallingPlay()

void SoundHardBushFallingPlay ( )
inlineprotected
3966 {
3967 EffectSound sound = SEffectManager.PlaySound( "hardBushFall_SoundSet", GetPosition() );
3968 sound.SetAutodestroy( true );
3969 }
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
Manager class for managing Effect (EffectParticle, EffectSound)
Definition EffectManager.c:6
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Definition EffectManager.c:169

Перекрестные ссылки GetPosition и SEffectManager::PlaySound().

◆ SoundHardTreeFallingPlay()

void SoundHardTreeFallingPlay ( )
inlineprotected
3954 {
3955 EffectSound sound = SEffectManager.PlaySound( "hardTreeFall_SoundSet", GetPosition() );
3956 sound.SetAutodestroy( true );
3957 }

Перекрестные ссылки GetPosition и SEffectManager::PlaySound().

◆ SoundSoftBushFallingPlay()

void SoundSoftBushFallingPlay ( )
inlineprotected
3972 {
3973 EffectSound sound = SEffectManager.PlaySound( "softBushFall_SoundSet", GetPosition() );
3974 sound.SetAutodestroy( true );
3975 }

Перекрестные ссылки GetPosition и SEffectManager::PlaySound().

◆ SoundSoftTreeFallingPlay()

void SoundSoftTreeFallingPlay ( )
inlineprotected
3960 {
3961 EffectSound sound = SEffectManager.PlaySound( "softTreeFall_SoundSet", GetPosition() );
3962 sound.SetAutodestroy( true );
3963 }

Перекрестные ссылки GetPosition и SEffectManager::PlaySound().

◆ SpawnEntityOnGround()

EntityAI SpawnEntityOnGround ( string object_name,
vector mat[4] )
inlineprotected
2089 {
2091 il.SetGround(NULL, mat);
2093 }
const int ECE_PLACE_ON_SURFACE
Definition CentralEconomy.c:37
const int RF_DEFAULT
Definition CentralEconomy.c:65
EntityAI SpawnEntity(string object_name, notnull InventoryLocation inv_loc, int iSetupFlags, int iRotation)
Definition gameplay.c:1520

Перекрестные ссылки ECE_PLACE_ON_SURFACE, RF_DEFAULT и SpawnEntity().

◆ SpawnEntityOnGroundPos()

EntityAI SpawnEntityOnGroundPos ( string object_name,
vector pos )
inlineprotected
2078 {
2080 vector mat[4];
2082 mat[3] = pos;
2083 il.SetGround(NULL, mat);
2085 }
Definition EnMath3D.c:28
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
Definition EnMath3D.c:256

Перекрестные ссылки ECE_PLACE_ON_SURFACE, Math3D::MatrixIdentity4(), RF_DEFAULT и SpawnEntity().

◆ SpawnInInventoryOrGroundPos()

EntityAI SpawnInInventoryOrGroundPos ( string object_name,
GameInventory inv,
vector pos )
inlineprotected
2062 {
2063 if (inv)
2064 {
2065 EntityAI res = inv.CreateInInventory(object_name);
2066 if (res)
2067 {
2068 return res;
2069 }
2070 }
2071
2073 }
EntityAI SpawnEntityOnGroundPos(string object_name, vector pos)
Definition EntityAI.c:2077

◆ SplitIntoStackMaxClient()

void SplitIntoStackMaxClient ( EntityAI destination_entity,
int slot_id )
protected

◆ SplitIntoStackMaxEx()

void SplitIntoStackMaxEx ( EntityAI destination_entity,
int slot_id )
protected

◆ SwitchItemSelectionTexture()

void SwitchItemSelectionTexture ( EntityAI item,
string slot_name )
protected

◆ SwitchItemSelectionTextureEx()

void SwitchItemSelectionTextureEx ( EItemManipulationContext context,
Param par = null )
protected

◆ SwitchLight()

proto native void SwitchLight ( bool isOn)
protected

◆ TransferVariablesFloat()

void TransferVariablesFloat ( array< float > float_vars)
inlineprotected
3054 {
3056 }
void DeSerializeNumericalVars(array< float > floats)
Definition EntityAI.c:3157

Перекрестные ссылки DeSerializeNumericalVars().

◆ TranslateSlotFromSelection()

bool TranslateSlotFromSelection ( string selection_name,
out int slot_id )
inlineprotected
4057 {
4058 return false;
4059 }

◆ TryDelete()

bool TryDelete ( )
inlineprotected
814 {
815 if (!IsPrepareToDelete())
816 {
817 Debug.Log("TryDelete - not ready for deletion");
818 return false;
819 }
820
821 if (GetGame().HasInventoryJunctureItem(this))
822 {
823 Debug.Log("TryDelete - deferred call");
824 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(TryDelete, DELETE_CHECK_DELAY, false);
825 return false;
826 }
827
829 Debug.Log("TryDelete - OnBeforeTryDelete end");
830 DeleteSafe();
831 Debug.Log("TryDelete - DeleteSafe end");
832
833 return true;
834 }
void OnBeforeTryDelete()

Перекрестные ссылки CALL_CATEGORY_SYSTEM, GetGame(), IsPrepareToDelete() и Debug::Log().

◆ UnpairRemote()

void UnpairRemote ( )
protected

◆ UpdateNetSyncVariableFloat()

proto native void UpdateNetSyncVariableFloat ( string variableName,
float minValue = 0,
float maxValue = 0,
int precision = 1 )
protected

◆ UpdateNetSyncVariableInt()

proto native void UpdateNetSyncVariableInt ( string variableName,
float minValue = 0,
float maxValue = 0 )
protected

◆ UpdateWeight()

void UpdateWeight ( WeightUpdateType updateType = WeightUpdateType.FULL,
float weightAdjustment = 0 )
protected

◆ UseConfigInitTemperature()

bool UseConfigInitTemperature ( )
inlineprotected
2203 {
2204 return (IsMan() || IsAnimal() || IsZombie()) && IsAlive() || IsCorpse();
2205 }
override bool IsCorpse()
Definition Edible_Base.c:1277
bool IsZombie()
Definition EntityAI.c:699
bool IsAnimal()
Definition EntityAI.c:694

Перекрестные ссылки IsCorpse() и EntityAI::IsMan().

◆ WriteVarsToCTX()

void WriteVarsToCTX ( ParamsWriteContext ctx)
inlineprotected

Writes to storage CTX.

3104 {
3105 ctx.Write(m_VariablesMask);
3106
3107 //--------------------------------------------
3109 {
3110 ctx.Write(GetTemperature());
3111 ctx.Write((int)GetIsFrozen());
3112 }
3113 }

Перекрестные ссылки VARIABLE_TEMPERATURE.

Поля

◆ DEAD_REPLACE_DELAY

const int DEAD_REPLACE_DELAY = 250
private

◆ DELETE_CHECK_DELAY

const int DELETE_CHECK_DELAY = 100
private

◆ m_AttachmentExclusionMaskChildren

ref set<int> m_AttachmentExclusionMaskChildren
private

◆ m_AttachmentExclusionMaskGlobal

ref set<int> m_AttachmentExclusionMaskGlobal
private

◆ m_AttachmentExclusionSlotMap

ref map<int,ref set<int> > m_AttachmentExclusionSlotMap
private

◆ m_AttachmentsWithAttachments

ref array<EntityAI> m_AttachmentsWithAttachments
private

◆ m_AttachmentsWithCargo

ref array<EntityAI> m_AttachmentsWithCargo
private

◆ m_CanDisplayWeight

bool m_CanDisplayWeight
protected

◆ m_ComponentsBank

ref ComponentsBank m_ComponentsBank
private

◆ m_ConfigWeight

float m_ConfigWeight = ConfigGetInt("weight")
private

◆ m_DamageDisplayNameMap

ref map<int, string> m_DamageDisplayNameMap = new map<int, string>
private

◆ m_DamageZoneMap

ref DamageZoneMap m_DamageZoneMap
protected

◆ m_DeathSyncSent

bool m_DeathSyncSent
private

◆ m_DestructionBehaviourObj

ref DestructionEffectBase m_DestructionBehaviourObj
private

◆ m_ElapsedSinceLastUpdate

float m_ElapsedSinceLastUpdate
protected

◆ m_EM

ComponentEnergyManager m_EM
private

◆ m_FreezeThawProgress

float m_FreezeThawProgress
protected

◆ m_HiddenSelectionsData

ref HiddenSelectionsData m_HiddenSelectionsData
private

◆ m_Initialized

bool m_Initialized = false
protected

◆ m_IsFrozen

bool m_IsFrozen
protected

◆ m_IsFrozenLocal

bool m_IsFrozenLocal
protected

◆ m_KilledByHeadshot

bool m_KilledByHeadshot
private

◆ m_KillerData

ref KillerData m_KillerData
private

◆ m_LastUpdatedTime

float m_LastUpdatedTime
private

◆ m_OldLocation

ref InventoryLocation m_OldLocation
private

◆ m_OnAttachmentReleaseLock

ref ScriptInvoker m_OnAttachmentReleaseLock
protected

◆ m_OnAttachmentSetLock

ref ScriptInvoker m_OnAttachmentSetLock
protected

◆ m_OnHitByInvoker

ref ScriptInvoker m_OnHitByInvoker
protected

◆ m_OnItemAddedIntoCargo

ref ScriptInvoker m_OnItemAddedIntoCargo
protected

◆ m_OnItemAttached

ref ScriptInvoker m_OnItemAttached
protected

◆ m_OnItemDetached

ref ScriptInvoker m_OnItemDetached
protected

◆ m_OnItemFlipped

ref ScriptInvoker m_OnItemFlipped
protected

◆ m_OnItemMovedInCargo

ref ScriptInvoker m_OnItemMovedInCargo
protected

◆ m_OnItemRemovedFromCargo

ref ScriptInvoker m_OnItemRemovedFromCargo
protected

◆ m_OnKilledInvoker

ref ScriptInvoker m_OnKilledInvoker
protected

◆ m_OnReleaseLock

ref ScriptInvoker m_OnReleaseLock
protected

◆ m_OnSetLock

ref ScriptInvoker m_OnSetLock
protected

◆ m_OnViewIndexChanged

ref ScriptInvoker m_OnViewIndexChanged
protected

◆ m_OverheatProgress

float m_OverheatProgress
protected

◆ m_PendingDelete

bool m_PendingDelete = false
protected

◆ m_PreparedToDelete

bool m_PreparedToDelete = false
private

◆ m_PreviousRoofTestTime

float m_PreviousRoofTestTime = 0
protected

◆ m_RefresherViable

bool m_RefresherViable = false
private

◆ m_RoofAbove

bool m_RoofAbove = false
protected

◆ m_TAC

◆ m_TransportHitRegistered

bool m_TransportHitRegistered = false
protected

◆ m_TransportHitVelocity

vector m_TransportHitVelocity
protected

◆ m_UniversalTemperatureSource

UTemperatureSource m_UniversalTemperatureSource
protected

◆ m_VarHeatPermeabilityCoef

float m_VarHeatPermeabilityCoef
protected

◆ m_VariablesMask

int m_VariablesMask
protected

◆ m_VarTemperature

float m_VarTemperature
protected

◆ m_VarTemperatureFreezeThreshold

float m_VarTemperatureFreezeThreshold
protected

◆ m_VarTemperatureFreezeTime

float m_VarTemperatureFreezeTime
protected

◆ m_VarTemperatureInit

float m_VarTemperatureInit
protected

◆ m_VarTemperatureMax

float m_VarTemperatureMax
protected

◆ m_VarTemperatureMin

float m_VarTemperatureMin
protected

◆ m_VarTemperatureOverheatTime

float m_VarTemperatureOverheatTime
protected

◆ m_VarTemperatureThawThreshold

float m_VarTemperatureThawThreshold
protected

◆ m_VarTemperatureThawTime

float m_VarTemperatureThawTime
protected

◆ m_ViewIndex

int m_ViewIndex = 0
protected

view index Item view index is used to setup which camera will be used in item view widget in inventory. With this index you can setup various camera angles for different item states (e.g. fireplace, weapons).

◆ m_Weight

float m_Weight
private

◆ m_WeightDirty

bool m_WeightDirty = 1
private

◆ m_WeightEx

float m_WeightEx
private

Объявления и описания членов классов находятся в файлах: