DIFF

class DayZPlayerUtilsSource

Constructors 1

private void DayZPlayerUtils()

cannot be instantiated

Members 1

private static ref array<Object> m_CachedEntList

if total water depth >= 1.5m && character is 1.5m in water

Methods 26

static proto native void 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[])

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)

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)

returns entities in height-extended 2D cone

in angle
angle in degrees
in minHeigh
cone 3D-extension Y min
in maxHeight
cone 3D-extension Y max
Notethe detection hits points/faces from ANY non-edit model geometry, including resolution LODs, regardless of animation hiding (scaling). That is why certain animated objects, like flags in folded state, get detected from significant distance away!
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 FindMagazinesForAmmo(DayZPlayer player, string ammoTypeName, out array<Magazine> mags)

searches inventory for all magazines that can hold specified ammo type

in player
DayZPlayer
in ammoTypeName
type name of the cartridge
out mags
array filled with suitable magazines

Returns: true if found at least one

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

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

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

initializes table of component collisions

in player
DayZPlayer
in boxes
array filled with box @see ComponentCollisionBox
in capsules
array filled with capsules @see ComponentCollisionCapsule

Returns: true if success

static proto native bool IsComponentCollisionInitialized()

Returns: true if already initialized

static proto native void ClearComponentCollisions()
static proto native vector GetMemoryPointPositionBoneRelative(DayZPlayer pPlayer, int pBoneIndex, int pPointIndex)
static int ConvertStanceMaskToStanceIdx(int stanceMask)
private static void InitCachedEntList()
Referenced by GetMeleeTarget()