PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
MiscGameplayFunctions.c File Reference

Data Structures

class  ReplaceItemWithNewLambda
 adds automatic QuickBar handling More...
 
class  TurnItemIntoItemLambda
 
class  DropEquipAndDestroyRootLambda
 this one is a bit special: it drops all items and destroys the ex-root of the hierarchy More...
 
class  DestroyItemInCorpsesHandsAndCreateNewOnGndLambda
 

Enumerations

enum  TransferInventoryResult { Ok , DroppedSome }
 
enum  ThrowEntityFlags
 

Functions

class TurnItemIntoItemLambdaAnimSysNotifyLambda extends TurnItemIntoItemLambda OnSuccess (EntityAI new_item)
 
void DropEquipAndDestroyRootLambda (EntityAI old_item, string new_item_type, PlayerBase player)
 
override void CopyOldPropertiesToNew (notnull EntityAI old_item, EntityAI new_item)
 
void MoveEquipToExistingItemAndDestroyOldRootLambda (EntityAI old_item, string new_item_type, PlayerBase player, EntityAI new_item)
 
override protected void RemoveNetworkObjectInfo ()
 
override protected void UndoRemoveNetworkObjectInfo ()
 
override protected void CreateNetworkObjectInfo (EntityAI new_item)
 
enum ThrowEntityFlags Truncate (float value, int decimals=2)
 truncate float to specified precision
 
static string TruncateToS (float value, int decimals=2)
 truncate float to specified precision, output as string
 
static vector TruncateVec (vector value, int decimals=2)
 truncate float to specified precision
 
static string TruncateVecToS (vector value, int decimals=2, string delimiter=" ")
 
static string GetColorString (float r, float g, float b, float a)
 
static string ValueToBar (float value, string bar="[----------]", string mark="x")
 Produces ACII "progress bar" based on an 0..1 'value' input.
 
static string InsertAtPos (string base, string insert, int pos)
 Insert 'insert' behind index 'pos' of the 'base' string.
 
static void TransferItemProperties (EntityAI source, notnull EntityAI target, bool transfer_agents=true, bool transfer_variables=true, bool transfer_health=true, bool exclude_quantity=false)
 will transform variables, agents and other local scripted properties as well as any relevant non-scripted properties like health
 
static void TransferEntityVariables (EntityAI source, EntityAI target, bool exclude_quantity=false)
 
static void TransferItemVariables (ItemBase source, ItemBase target, bool exclude_quantity=false)
 DEPRECATED.
 
static TransferInventoryResult TransferInventory (EntityAI sourceItem, EntityAI targetItem, PlayerBase player)
 
static void TransferEntityHealth (EntityAI source, EntityAI target, array< string > healthTypes=null, bool transferZoneDamage=true)
 
static void UnlimitedAmmoDebugCheck (Weapon_Base weapon)
 
static void TurnItemIntoItem (notnull ItemBase old_item, string new_item_type, notnull PlayerBase player)
 
static void TurnItemIntoItemEx (notnull PlayerBase player, ReplaceItemWithNewLambdaBase lambda)
 
static void TurnItemInHandsIntoItem (notnull ItemBase old_item, string new_item_type, notnull PlayerBase player)
 
static void TurnItemInHandsIntoItemEx (notnull PlayerBase player, ReplaceItemWithNewLambdaBase lambda)
 
static array< ItemBaseCreateItemBasePiles (string item_name, vector ground_position, float quantity, float health, bool floaty_spawn=false)
 Spawns multiple piles of stackable ItemBase objects on ground (intended for generic use)
 
static array< ItemBaseCreateItemBasePilesDispersed (string item_name, vector starPos, vector targetPos, float radius, float quantity, float health, Object ignoreObjectCollison)
 creation method using raycast-dispersed positioning; ECE_TRACE not used as a result
 
static array< Magazine > CreateMagazinePiles (string item_name, vector ground_position, float quantity, float health)
 
static array< Magazine > CreateMagazinePilesDispersed (string item_name, vector starPos, vector targetPos, float radius, float quantity, float health, Object ignoreObjectCollison)
 creation method using raycast-dispersed positioning; ECE_TRACE not used as a result
 
static array< Magazine > CreateMagazinePilesFromBullet (string bullet_type, vector ground_position, float quantity, float health)
 
static array< Magazine > CreateMagazinePilesFromBulletDispersed (string bullet_type, vector starPos, vector targetPos, float radius, float quantity, float health, Object ignoreObjectCollison)
 
static int GetHealthLevelForAmmo (string class_name, float health)
 
static float GetTypeMaxGlobalHealth (string class_name, string health_type="Health")
 
static bool GetProjectedCursorPos3d (out vector position, Weapon_Base weapon)
 
static void GetHeadBonePos (notnull PlayerBase player, out vector pos)
 
static vector GetHeadingVector (notnull PlayerBase player)
 
static float GetHeadingAngle (notnull DayZPlayerImplement player)
 
static float GetEnergyMetabolicSpeed (int movement_speed)
 
static float GetWaterMetabolicSpeed (int movement_speed)
 
static string ObtainRestrainItemTargetClassname (notnull EntityAI entity)
 
static void TransformRestrainItem (EntityAI current_item, EntityAI tool, PlayerBase player_source, PlayerBase player_target, bool destroy=false)
 
static bool IsValueInRange (float value, float from, float to)
 
static bool IsPlayerOrientedTowardPos (notnull DayZPlayerImplement player, vector target_pos, float cone_angle)
 Check if player direction(based on cone of defined angle) is oriented to target position.
 
static string SanitizeString (string input)
 
static bool ComplexBuildCollideCheckClient (PlayerBase player, ActionTarget target, ItemBase item, string partName="")
 
static bool ComplexBuildCollideCheckClient (PlayerBase player, ActionTarget target, ItemBase item, int constraction_index)
 
static bool BuildCondition (PlayerBase player, ActionTarget target, ItemBase item, bool camera_check)
 
static bool BuildCondition (PlayerBase player, ActionTarget target, ItemBase item, bool camera_check, int constraction_index)
 
static void IsUnderRoofFromToCalculation (EntityAI entity, out vector from, out vector to, float height=GameConstants.ROOF_CHECK_RAYCAST_DIST)
 
static bool IsUnderRoof (EntityAI entity, float height=GameConstants.ROOF_CHECK_RAYCAST_DIST)
 
static bool IsUnderRoofEx (EntityAI entity, float height=GameConstants.ROOF_CHECK_RAYCAST_DIST, int geometry=ObjIntersectView)
 
static vector GetSteamPosition (EntityAI parent)
 
static vector GetRandomizedPosition (vector targetPos, float radius)
 
static vector GetRandomizedPositionVerified (vector startPos, vector targetPos, float radius, Object ignore=null)
 
static vector GetRandomizedPositionVerifiedPlayer (Man player, float distance, float radius, Object ignore)
 
static void DropAllItemsInInventoryInBounds (ItemBase ib, vector halfExtents)
 
static void ThrowAllItemsInInventory (notnull EntityAI parent, int flags)
 
static void ThrowEntityFromInventory (notnull EntityAI entity, vector position, float direction[4], vector force, int flags)
 
static float GetCurrentItemHeatIsolation (ItemBase pItem)
 
static void FilterObstructingObjects (array< Object > potentiallyObstructingObjects, out array< Object > obstructingObjects)
 
static bool CanIgnoreDistanceCheck (Object obj)
 
static void FilterObstructedObjectsByGrouping (vector origin, float range, float distanceDelta, array< Object > objects, array< Object > obstructingObjects, out array< Object > filteredObjects, bool doDistanceCheck=false, bool checkIfDistanceCanBeIgnored=false, float maxDist=0)
 group objects that are close to each other together
 
static void SplitArrayIntoGroupsByDistance (array< Object > objects, array< ref array< Object > > objectGroups, float squaredDistanceDelta)
 
static bool IsObjectObstructed (Object object, bool doDistanceCheck=false, vector distanceCheckPos="0 0 0", float maxDist=0)
 
static bool IsObjectObstructedEx (Object object, IsObjectObstructedCache cache, bool doDistanceCheck=false, vector distanceCheckPos="0 0 0", float maxDist=0)
 
static bool IsObjectObstructedProxy (Object object, IsObjectObstructedCache cache, PlayerBase player)
 
static bool IsObjectObstructedFilter (Object object, IsObjectObstructedCache cache, PlayerBase player)
 
static bool IsObjectObstructedFilterEx (Object object, IsObjectObstructedCache cache, PlayerBase player, int geometryTypeOverride=-1)
 groups 'RaycastRVProxy' and 'RaycastRV' approaches into one method, allowes for comprehensive geometry override, if desired
 
static void DealEvinronmentAdjustedDmg (ItemBase item, PlayerBase player, float baseDamage)
 
static void DealAbsoluteDmg (ItemBase item, float dmg)
 
static float Normalize (int val, int maxVal)
 
static float Bobbing (float period, float amplitude, float elapsedTime)
 
static float FModulus (float x, float y)
 
static void RemoveSplint (PlayerBase player)
 
static void TeleportCheck (notnull PlayerBase player, notnull array< ref array< float > > safe_positions)
 checks if we should teleport the player to a safe location and if so, performs the teleportation
 
static vector GetClosestSafePos (vector to_pos, notnull array< ref array< float > > positions)
 
static bool TeleportPlayerToSafeLocation3D (notnull PlayerBase player, vector safePos)
 'stupider' teleport method, does not touch flag management. Applies Y from the position as well!
 
static void GenerateAINoiseAtPosition (vector position, float lifeTime, NoiseParams noiseParams)
 
static float GetMinValue (array< float > pArray)
 
static float GetMaxValue (array< float > pArray)
 
static string GetItemDisplayName (string type)
 
static bool IsComponentInSelection (array< Selection > pSelection, string pCompName)
 
static int GetComponentIndex (array< Selection > pSelection, string pCompName)
 
static void RemoveAllAttachedChildrenByTypename (notnull EntityAI parent, array< typename > listOfTypenames)
 
static void DeleteAttachedChildrenByTypename (notnull EntityAI parent, array< typename > listOfTypenames)
 
static void GetAttachedChildren (IEntity parent, array< IEntity > outputObjects)
 Fills the provided array with all children entities in hierarchy of this entity.
 
static void SoakItemInsideParentContainingLiquidAboveThreshold (notnull ItemBase item, notnull ItemBase parent, float liquidQuantityThresholdPercentage=0.05)
 
static float GetCombinedSnowfallWindValue ()
 
void IsObjectObstructedCache (vector rayCastStart, int totalObjects)
 
void ClearCache ()
 

Variables

PlayerBase m_Player
 
EntityAI m_NewItem
 
 NONE = 0
 
 SPLIT = 1
 
DestroyItemInCorpsesHandsAndCreateNewOnGndLambda RaycastStart = "0 0 0"
 
int TotalObjects = 0
 
vector ObjectCenterPos = "0 0 0"
 
vector ObjectContactPos = "0 0 0"
 
vector ObjectContactDir = "0 0 0"
 
int ContactComponent = -1
 
ref array< ref RaycastRVResultHitProxyObjects = new array<ref RaycastRVResult>
 
ref set< ObjectHitObjects = new set<Object>
 

Enumeration Type Documentation

◆ ThrowEntityFlags

◆ TransferInventoryResult

Enumerator
Ok 
DroppedSome 

Function Documentation

◆ Bobbing()

static float Bobbing ( float  period,
float  amplitude,
float  elapsedTime 
)
static

References FModulus(), and Math::Sin().

◆ BuildCondition() [1/2]

static bool BuildCondition ( PlayerBase  player,
ActionTarget  target,
ItemBase  item,
bool  camera_check 
)
static

◆ BuildCondition() [2/2]

◆ CanIgnoreDistanceCheck()

static bool CanIgnoreDistanceCheck ( Object  obj)
static

◆ ClearCache()

◆ ComplexBuildCollideCheckClient() [1/2]

◆ ComplexBuildCollideCheckClient() [2/2]

static bool ComplexBuildCollideCheckClient ( PlayerBase  player,
ActionTarget  target,
ItemBase  item,
string  partName = "" 
)
static

◆ CopyOldPropertiesToNew()

override void CopyOldPropertiesToNew ( notnull EntityAI  old_item,
EntityAI  new_item 
)

We don't care if a valid transform couldn't be found, we just want to preferably use it instead of placing on the old item

◆ CreateItemBasePiles()

static array< ItemBase > CreateItemBasePiles ( string  item_name,
vector  ground_position,
float  quantity,
float  health,
bool  floaty_spawn = false 
)
static

Spawns multiple piles of stackable ItemBase objects on ground (intended for generic use)

References CGame::CreateObjectEx(), ECE_CREATEPHYSICS, ECE_PLACE_ON_SURFACE, ECE_UPDATEPATHGRAPH, Math::Floor(), g_Game, GetGame(), and ItemBase::SetQuantity().

◆ CreateItemBasePilesDispersed()

static array< ItemBase > CreateItemBasePilesDispersed ( string  item_name,
vector  starPos,
vector  targetPos,
float  radius,
float  quantity,
float  health,
Object  ignoreObjectCollison 
)
static

creation method using raycast-dispersed positioning; ECE_TRACE not used as a result

References CGame::CreateObjectEx(), ECE_PLACE_ON_SURFACE, Math::Floor(), g_Game, GetGame(), and ItemBase::SetQuantity().

◆ CreateMagazinePiles()

static array< Magazine > CreateMagazinePiles ( string  item_name,
vector  ground_position,
float  quantity,
float  health 
)
static

◆ CreateMagazinePilesDispersed()

static array< Magazine > CreateMagazinePilesDispersed ( string  item_name,
vector  starPos,
vector  targetPos,
float  radius,
float  quantity,
float  health,
Object  ignoreObjectCollison 
)
static

creation method using raycast-dispersed positioning; ECE_TRACE not used as a result

References CGame::CreateObjectEx(), ECE_CREATEPHYSICS, ECE_UPDATEPATHGRAPH, Math::Floor(), g_Game, and GetGame().

Referenced by CreateMagazinePilesFromBulletDispersed().

◆ CreateMagazinePilesFromBullet()

static array< Magazine > CreateMagazinePilesFromBullet ( string  bullet_type,
vector  ground_position,
float  quantity,
float  health 
)
static

◆ CreateMagazinePilesFromBulletDispersed()

static array< Magazine > CreateMagazinePilesFromBulletDispersed ( string  bullet_type,
vector  starPos,
vector  targetPos,
float  radius,
float  quantity,
float  health,
Object  ignoreObjectCollison 
)
static

◆ CreateNetworkObjectInfo()

override protected void CreateNetworkObjectInfo ( EntityAI  new_item)

◆ DealAbsoluteDmg()

static void DealAbsoluteDmg ( ItemBase  item,
float  dmg 
)
static

◆ DealEvinronmentAdjustedDmg()

◆ DeleteAttachedChildrenByTypename()

static void DeleteAttachedChildrenByTypename ( notnull EntityAI  parent,
array< typename listOfTypenames 
)
static

◆ DropAllItemsInInventoryInBounds()

static void DropAllItemsInInventoryInBounds ( ItemBase  ib,
vector  halfExtents 
)
static

◆ DropEquipAndDestroyRootLambda()

void DropEquipAndDestroyRootLambda ( EntityAI  old_item,
string  new_item_type,
PlayerBase  player 
)

◆ FilterObstructedObjectsByGrouping()

static void FilterObstructedObjectsByGrouping ( vector  origin,
float  range,
float  distanceDelta,
array< Object objects,
array< Object obstructingObjects,
out array< Object filteredObjects,
bool  doDistanceCheck = false,
bool  checkIfDistanceCanBeIgnored = false,
float  maxDist = 0 
)
static

◆ FilterObstructingObjects()

static void FilterObstructingObjects ( array< Object potentiallyObstructingObjects,
out array< Object obstructingObjects 
)
static

◆ FModulus()

static float FModulus ( float  x,
float  y 
)
static

References Math::ModFloat(), x, and y.

Referenced by Bobbing().

◆ GenerateAINoiseAtPosition()

static void GenerateAINoiseAtPosition ( vector  position,
float  lifeTime,
NoiseParams  noiseParams 
)
static

◆ GetAttachedChildren()

static void GetAttachedChildren ( IEntity  parent,
array< IEntity outputObjects 
)
static

Fills the provided array with all children entities in hierarchy of this entity.

References IEntity::GetChildren(), and IEntity::GetSibling().

◆ GetClosestSafePos()

static vector GetClosestSafePos ( vector  to_pos,
notnull array< ref array< float > >  positions 
)
static

References vector::DistanceSq().

◆ GetColorString()

static string GetColorString ( float  r,
float  g,
float  b,
float  a 
)
static

References string::Format().

◆ GetCombinedSnowfallWindValue()

static float GetCombinedSnowfallWindValue ( )
static

References g_Game.

◆ GetComponentIndex()

static int GetComponentIndex ( array< Selection pSelection,
string  pCompName 
)
static

◆ GetCurrentItemHeatIsolation()

◆ GetEnergyMetabolicSpeed()

◆ GetHeadBonePos()

static void GetHeadBonePos ( notnull PlayerBase  player,
out vector  pos 
)
static

◆ GetHeadingAngle()

static float GetHeadingAngle ( notnull DayZPlayerImplement  player)
static

◆ GetHeadingVector()

static vector GetHeadingVector ( notnull PlayerBase  player)
static

◆ GetHealthLevelForAmmo()

static int GetHealthLevelForAmmo ( string  class_name,
float  health 
)
static

◆ GetItemDisplayName()

static string GetItemDisplayName ( string  type)
static

◆ GetMaxValue()

static float GetMaxValue ( array< float pArray)
static

◆ GetMinValue()

static float GetMinValue ( array< float pArray)
static

◆ GetProjectedCursorPos3d()

static bool GetProjectedCursorPos3d ( out vector  position,
Weapon_Base  weapon 
)
static

◆ GetRandomizedPosition()

static vector GetRandomizedPosition ( vector  targetPos,
float  radius 
)
static

◆ GetRandomizedPositionVerified()

static vector GetRandomizedPositionVerified ( vector  startPos,
vector  targetPos,
float  radius,
Object  ignore = null 
)
static

◆ GetRandomizedPositionVerifiedPlayer()

static vector GetRandomizedPositionVerifiedPlayer ( Man  player,
float  distance,
float  radius,
Object  ignore 
)
static

◆ GetSteamPosition()

◆ GetTypeMaxGlobalHealth()

static float GetTypeMaxGlobalHealth ( string  class_name,
string  health_type = "Health" 
)
static

◆ GetWaterMetabolicSpeed()

◆ InsertAtPos()

static string InsertAtPos ( string  base,
string  insert,
int  pos 
)
static

Insert 'insert' behind index 'pos' of the 'base' string.

References string::Length(), and string::Substring().

Referenced by ValueToBar().

◆ IsComponentInSelection()

static bool IsComponentInSelection ( array< Selection pSelection,
string  pCompName 
)
static

◆ IsObjectObstructed()

static bool IsObjectObstructed ( Object  object,
bool  doDistanceCheck = false,
vector  distanceCheckPos = "0 0 0",
float  maxDist = 0 
)
static

◆ IsObjectObstructedCache()

void IsObjectObstructedCache ( vector  rayCastStart,
int  totalObjects 
)

◆ IsObjectObstructedEx()

static bool IsObjectObstructedEx ( Object  object,
IsObjectObstructedCache  cache,
bool  doDistanceCheck = false,
vector  distanceCheckPos = "0 0 0",
float  maxDist = 0 
)
static

◆ IsObjectObstructedFilter()

static bool IsObjectObstructedFilter ( Object  object,
IsObjectObstructedCache  cache,
PlayerBase  player 
)
static

◆ IsObjectObstructedFilterEx()

static bool IsObjectObstructedFilterEx ( Object  object,
IsObjectObstructedCache  cache,
PlayerBase  player,
int  geometryTypeOverride = -1 
)
static

groups 'RaycastRVProxy' and 'RaycastRV' approaches into one method, allowes for comprehensive geometry override, if desired

References RaycastRVParams::flags, GetGame(), GetPlayer(), DayZPhysics::RaycastRV(), DayZPhysics::RaycastRVProxy(), and RaycastRVParams::type.

Referenced by IsObjectObstructedEx().

◆ IsObjectObstructedProxy()

static bool IsObjectObstructedProxy ( Object  object,
IsObjectObstructedCache  cache,
PlayerBase  player 
)
static

◆ IsPlayerOrientedTowardPos()

static bool IsPlayerOrientedTowardPos ( notnull DayZPlayerImplement  player,
vector  target_pos,
float  cone_angle 
)
static

Check if player direction(based on cone of defined angle) is oriented to target position.

dir in cone or in a tip of cone

References Math::AbsFloat(), Math::Acos(), vector::Dot(), vector::Normalize(), and Math::RAD2DEG.

◆ IsUnderRoof()

static bool IsUnderRoof ( EntityAI  entity,
float  height = GameConstants.ROOF_CHECK_RAYCAST_DIST 
)
static

References IsUnderRoofEx().

◆ IsUnderRoofEx()

static bool IsUnderRoofEx ( EntityAI  entity,
float  height = GameConstants.ROOF_CHECK_RAYCAST_DIST,
int  geometry = ObjIntersectView 
)
static

◆ IsUnderRoofFromToCalculation()

static void IsUnderRoofFromToCalculation ( EntityAI  entity,
out vector  from,
out vector  to,
float  height = GameConstants.ROOF_CHECK_RAYCAST_DIST 
)
static

References Vector().

Referenced by IsUnderRoofEx().

◆ IsValueInRange()

static bool IsValueInRange ( float  value,
float  from,
float  to 
)
static

◆ MoveEquipToExistingItemAndDestroyOldRootLambda()

void MoveEquipToExistingItemAndDestroyOldRootLambda ( EntityAI  old_item,
string  new_item_type,
PlayerBase  player,
EntityAI  new_item 
)

References Empty, Error(), m_NewItem, and m_Player.

◆ Normalize()

static float Normalize ( int  val,
int  maxVal 
)
static

References Debug::LogError().

◆ ObtainRestrainItemTargetClassname()

static string ObtainRestrainItemTargetClassname ( notnull EntityAI  entity)
static

◆ OnSuccess()

class TurnItemIntoItemLambdaAnimSysNotifyLambda extends TurnItemIntoItemLambda OnSuccess ( EntityAI  new_item)

◆ RemoveAllAttachedChildrenByTypename()

static void RemoveAllAttachedChildrenByTypename ( notnull EntityAI  parent,
array< typename listOfTypenames 
)
static

◆ RemoveNetworkObjectInfo()

override protected void RemoveNetworkObjectInfo ( )

◆ RemoveSplint()

◆ SanitizeString()

static string SanitizeString ( string  input)
static

◆ SoakItemInsideParentContainingLiquidAboveThreshold()

static void SoakItemInsideParentContainingLiquidAboveThreshold ( notnull ItemBase  item,
notnull ItemBase  parent,
float  liquidQuantityThresholdPercentage = 0.05 
)
static

References g_Game.

◆ SplitArrayIntoGroupsByDistance()

static void SplitArrayIntoGroupsByDistance ( array< Object objects,
array< ref array< Object > >  objectGroups,
float  squaredDistanceDelta 
)
static

◆ TeleportCheck()

static void TeleportCheck ( notnull PlayerBase  player,
notnull array< ref array< float > >  safe_positions 
)
static

checks if we should teleport the player to a safe location and if so, performs the teleportation

References GetGame(), GetPlugin(), CGame::RPCSingleParam(), and CGame::SurfaceY().

◆ TeleportPlayerToSafeLocation3D()

static bool TeleportPlayerToSafeLocation3D ( notnull PlayerBase  player,
vector  safePos 
)
static

'stupider' teleport method, does not touch flag management. Applies Y from the position as well!

References GetGame(), and CGame::RPCSingleParam().

◆ ThrowAllItemsInInventory()

static void ThrowAllItemsInInventory ( notnull EntityAI  parent,
int  flags 
)
static

◆ ThrowEntityFromInventory()

static void ThrowEntityFromInventory ( notnull EntityAI  entity,
vector  position,
float  direction[4],
vector  force,
int  flags 
)
static

◆ TransferEntityHealth()

static void TransferEntityHealth ( EntityAI  source,
EntityAI  target,
array< string healthTypes = null,
bool  transferZoneDamage = true 
)
static

Referenced by TransferItemProperties().

◆ TransferEntityVariables()

◆ TransferInventory()

◆ TransferItemProperties()

static void TransferItemProperties ( EntityAI  source,
notnull EntityAI  target,
bool  transfer_agents = true,
bool  transfer_variables = true,
bool  transfer_health = true,
bool  exclude_quantity = false 
)
static

will transform variables, agents and other local scripted properties as well as any relevant non-scripted properties like health

References GetGame(), and TransferEntityHealth().

◆ TransferItemVariables()

static void TransferItemVariables ( ItemBase  source,
ItemBase  target,
bool  exclude_quantity = false 
)
static

DEPRECATED.

References TransferEntityVariables().

◆ TransformRestrainItem()

static void TransformRestrainItem ( EntityAI  current_item,
EntityAI  tool,
PlayerBase  player_source,
PlayerBase  player_target,
bool  destroy = false 
)
static

References Error().

◆ Truncate()

enum ThrowEntityFlags Truncate ( float  value,
int  decimals = 2 
)

truncate float to specified precision

Referenced by TruncateToS().

◆ TruncateToS()

static string TruncateToS ( float  value,
int  decimals = 2 
)
static

truncate float to specified precision, output as string

References Truncate().

◆ TruncateVec()

static vector TruncateVec ( vector  value,
int  decimals = 2 
)
static

truncate float to specified precision

References Math::Clamp(), Math::Floor(), float::LOWEST, float::MAX, Math::Pow(), and Vector().

◆ TruncateVecToS()

static string TruncateVecToS ( vector  value,
int  decimals = 2,
string  delimiter = " " 
)
static

◆ TurnItemInHandsIntoItem()

static void TurnItemInHandsIntoItem ( notnull ItemBase  old_item,
string  new_item_type,
notnull PlayerBase  player 
)
static

◆ TurnItemInHandsIntoItemEx()

static void TurnItemInHandsIntoItemEx ( notnull PlayerBase  player,
ReplaceItemWithNewLambdaBase  lambda 
)
static

Referenced by TurnItemInHandsIntoItem().

◆ TurnItemIntoItem()

static void TurnItemIntoItem ( notnull ItemBase  old_item,
string  new_item_type,
notnull PlayerBase  player 
)
static

References TurnItemIntoItemEx().

◆ TurnItemIntoItemEx()

static void TurnItemIntoItemEx ( notnull PlayerBase  player,
ReplaceItemWithNewLambdaBase  lambda 
)
static

Referenced by TurnItemIntoItem().

◆ UndoRemoveNetworkObjectInfo()

override protected void UndoRemoveNetworkObjectInfo ( )

◆ UnlimitedAmmoDebugCheck()

static void UnlimitedAmmoDebugCheck ( Weapon_Base  weapon)
static

References GetGame().

◆ ValueToBar()

static string ValueToBar ( float  value,
string  bar = "[----------]",
string  mark = "x" 
)
static

Produces ACII "progress bar" based on an 0..1 'value' input.

References Math::Clamp(), InsertAtPos(), string::Length(), Math::Lerp(), and Math::Round().

Variable Documentation

◆ ContactComponent

int ContactComponent = -1

Referenced by ClearCache().

◆ HitObjects

ref set<Object> HitObjects = new set<Object>

Referenced by ClearCache().

◆ HitProxyObjects

ref array<ref RaycastRVResult> HitProxyObjects = new array<ref RaycastRVResult>

Referenced by ClearCache().

◆ m_NewItem

◆ m_Player

◆ NONE

@ NONE = 0

◆ ObjectCenterPos

vector ObjectCenterPos = "0 0 0"

Referenced by ClearCache().

◆ ObjectContactDir

vector ObjectContactDir = "0 0 0"

Referenced by ClearCache().

◆ ObjectContactPos

vector ObjectContactPos = "0 0 0"

Referenced by ClearCache().

◆ RaycastStart

◆ SPLIT

SPLIT = 1

◆ TotalObjects

int TotalObjects = 0

Referenced by IsObjectObstructedCache().