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

Data Structures

class  ComponentCollisionBox
 
class  ComponentCollisionCapsule
 

Enumerations

enum  QueryFlags
 

Functions

enum QueryFlags EnableDebugDraw (bool pEnable)
 enables debug draw in functions
 
static proto native void DrawDebugText (string text, vector pos, float size)
 
static proto native void DrawStartFrame ()
 clear info - new draw starts
 
static proto native void DrawDebugBox (vector pos, float size, int color)
 draws debug box (color=red)
 
static proto native bool DebugOverrideAnimationTranslation (string pAnimName, vector pTranslation)
 overrides total animation translation
 
static proto native bool DebugOverrideAnimationRotation (string pAnimName, vector pRotation)
 overrides total animation rotation
 
static proto native bool DebugOverrideAnimationSpeed (string pAnimName, float pSpeed)
 overrides total animation speed
 
static proto float LinearRangeClamp (float pValueX, float pValueY, float pLimits[])
 
static proto native void PhysicsGetEntitiesInBox (vector min, vector max, notnull out array< EntityAI > entList)
 returns entities overlapping/touching in AABB box -
 
static proto native void SceneGetEntitiesInBox (vector min, vector max, notnull out array< EntityAI > entList, int flags=QueryFlags.DYNAMIC)
 returns entities overlapping/touching in AABB box -
 
static proto native void GetEntitiesInCone (vector pos, vector dir, float angle, float dist, float minHeigh, float maxHeight, out array< Object > entList)
 
static Object GetMeleeTarget (vector pos, vector dir, float angle, float dist, float minHeight, float maxHeight, EntityAI pToIgnore, array< typename > targetableObjects, out array< Object > allTargets=NULL)
 returns fight target
 
static proto native bool PlayerCanChangeStance (DayZPlayer pPlayer, int pTargetStance, bool forceCheck=false)
 
static proto native bool FindMagazinesForAmmo (DayZPlayer player, string ammoTypeName, out array< Magazine > mags)
 
static Magazine SelectStoreCartridge (DayZPlayer player, Weapon_Base weapon, int muzzleIndex, Magazine exclude_mag, float damage, string magTypeName)
 
static bool HandleDropMagazine (DayZPlayer player, Magazine mag)
 
static bool HandleDropCartridge (DayZPlayer player, float damage, string cartTypeName, string magTypeName)
 
static bool HandleStoreCartridge (DayZPlayer player, Weapon_Base weapon, int muzzleIndex, float damage, string cartTypeName, string magTypeName, bool CanDrop=true)
 
static proto native bool InitComponentCollisions (Human player, array< ref ComponentCollisionBox > boxes, array< ref ComponentCollisionCapsule > capsules)
 
static proto native bool IsComponentCollisionInitialized ()
 
static proto native void ClearComponentCollisions ()
 
static proto native vector GetMemoryPointPositionBoneRelative (DayZPlayer pPlayer, int pBoneIndex, int pPointIndex)
 
static void InitPlayerComponentCollisions (Human player)
 
static int ConvertStanceMaskToStanceIdx (int stanceMask)
 
static EWaterLevels CheckWaterLevel (DayZPlayer pPlayer, out vector waterLevel)
 
private void DayZPlayerUtils ()
 cannot be instantiated
 
static private void InitCachedEntList ()
 

Variables

 NONE
 
 STATIC
 Static objects are included in the query.
 
 DYNAMIC
 Dynamic objects are included in the query.
 
 ORIGIN_DISTANCE
 Check only distance to object origins, not BB.
 
 ONLY_ROADWAYS
 Only roadways are included in the query.
 
static private ref array< Objectm_CachedEntList
 
class ComponentCollisionBox EnableDebugDraw
 

Enumeration Type Documentation

◆ QueryFlags

enum QueryFlags

Function Documentation

◆ CheckWaterLevel()

static EWaterLevels CheckWaterLevel ( DayZPlayer  pPlayer,
out vector  waterLevel 
)
static

◆ ClearComponentCollisions()

ClearComponentCollisions ( )
static

◆ ConvertStanceMaskToStanceIdx()

static int ConvertStanceMaskToStanceIdx ( int  stanceMask)
static

◆ DayZPlayerUtils()

◆ DebugOverrideAnimationRotation()

static proto native bool DebugOverrideAnimationRotation ( string  pAnimName,
vector  pRotation 
)
static

overrides total animation rotation

◆ DebugOverrideAnimationSpeed()

static proto native bool DebugOverrideAnimationSpeed ( string  pAnimName,
float  pSpeed 
)
static

overrides total animation speed

◆ DebugOverrideAnimationTranslation()

static proto native bool DebugOverrideAnimationTranslation ( string  pAnimName,
vector  pTranslation 
)
static

overrides total animation translation

◆ DrawDebugBox()

static proto native void DrawDebugBox ( vector  pos,
float  size,
int  color 
)
static

draws debug box (color=red)

◆ DrawDebugText()

static proto native void DrawDebugText ( string  text,
vector  pos,
float  size 
)
static

◆ DrawStartFrame()

static proto native void DrawStartFrame ( )
static

clear info - new draw starts

◆ EnableDebugDraw()

enum QueryFlags EnableDebugDraw ( bool  pEnable)

enables debug draw in functions

◆ FindMagazinesForAmmo()

static proto native bool FindMagazinesForAmmo ( DayZPlayer  player,
string  ammoTypeName,
out array< Magazine >  mags 
)
static

◆ GetEntitiesInCone()

static proto native void GetEntitiesInCone ( vector  pos,
vector  dir,
float  angle,
float  dist,
float  minHeigh,
float  maxHeight,
out array< Object entList 
)
static

Referenced by GetMeleeTarget().

◆ GetMeleeTarget()

static Object GetMeleeTarget ( vector  pos,
vector  dir,
float  angle,
float  dist,
float  minHeight,
float  maxHeight,
EntityAI  pToIgnore,
array< typename targetableObjects,
out array< Object allTargets = NULL 
)
static

◆ GetMemoryPointPositionBoneRelative()

static proto native vector GetMemoryPointPositionBoneRelative ( DayZPlayer  pPlayer,
int  pBoneIndex,
int  pPointIndex 
)
static

◆ HandleDropCartridge()

static bool HandleDropCartridge ( DayZPlayer  player,
float  damage,
string  cartTypeName,
string  magTypeName 
)
static

References Class::CastTo().

Referenced by HandleStoreCartridge().

◆ HandleDropMagazine()

static bool HandleDropMagazine ( DayZPlayer  player,
Magazine  mag 
)
static

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

References Error(), GameInventory::LocationSyncMoveEntity(), Math3D::MatrixIdentity4(), GameInventory::PrepareDropEntityPos(), and InventoryLocation::SetGround().

◆ HandleStoreCartridge()

static bool HandleStoreCartridge ( DayZPlayer  player,
Weapon_Base  weapon,
int  muzzleIndex,
float  damage,
string  cartTypeName,
string  magTypeName,
bool  CanDrop = true 
)
static

find suitable heap / mag

create a new one in inventory

drop on ground

References Class::CastTo(), DayZPlayerUtils(), ECE_IN_INVENTORY, HandleDropCartridge(), RF_DEFAULT, and SpawnEntity().

◆ InitCachedEntList()

static private void InitCachedEntList ( )
static

References m_CachedEntList.

Referenced by GetMeleeTarget().

◆ InitComponentCollisions()

static proto native bool InitComponentCollisions ( Human  player,
array< ref ComponentCollisionBox boxes,
array< ref ComponentCollisionCapsule capsules 
)
static

◆ InitPlayerComponentCollisions()

static void InitPlayerComponentCollisions ( Human  player)
static

◆ IsComponentCollisionInitialized()

IsComponentCollisionInitialized ( )
static
Returns
true if already initialized

Referenced by InitPlayerComponentCollisions().

◆ LinearRangeClamp()

static proto float LinearRangeClamp ( float  pValueX,
float  pValueY,
float  pLimits[] 
)
static

pLimits in form Xvalue, Ymin, Ymax, Xvalue1, Ymin1, Ymax1, .... sample 0, 0, 5, 1, 2, 3, 2, 0, 1 for X <= 0 it clamps Y to Rangle (0,5)
for X == 0.5 it clamps Y to Rangle (1,4)
for X == 1 it clamps Y to Rangle (2,3)
for X == 1.5 it clamps Y to Rangle (1,2)
for X >= 2 it clamps Y to Rangle (0,1)

◆ PhysicsGetEntitiesInBox()

static proto native void PhysicsGetEntitiesInBox ( vector  min,
vector  max,
notnull out array< EntityAI entList 
)
static

returns entities overlapping/touching in AABB box -

◆ PlayerCanChangeStance()

static proto native bool PlayerCanChangeStance ( DayZPlayer  pPlayer,
int  pTargetStance,
bool  forceCheck = false 
)
static

◆ SceneGetEntitiesInBox()

static proto native void SceneGetEntitiesInBox ( vector  min,
vector  max,
notnull out array< EntityAI entList,
int  flags = QueryFlags.DYNAMIC 
)
static

returns entities overlapping/touching in AABB box -

◆ SelectStoreCartridge()

static Magazine SelectStoreCartridge ( DayZPlayer  player,
Weapon_Base  weapon,
int  muzzleIndex,
Magazine  exclude_mag,
float  damage,
string  magTypeName 
)
static

Variable Documentation

◆ DYNAMIC

@ DYNAMIC

Dynamic objects are included in the query.

◆ EnableDebugDraw

class ComponentCollisionBox EnableDebugDraw

◆ m_CachedEntList

private ref array<Object> m_CachedEntList
static

◆ NONE

@ NONE

◆ ONLY_ROADWAYS

ONLY_ROADWAYS

Only roadways are included in the query.

◆ ORIGIN_DISTANCE

ORIGIN_DISTANCE

Check only distance to object origins, not BB.

◆ STATIC

@ STATIC

Static objects are included in the query.