39 Class.
CastTo(weaponInHands, player.GetItemInHands());
135 vector cameraDirection =
g_Game.GetCurrentCameraDirection();
136 vector cameraPosition =
g_Game.GetCurrentCameraPosition();
137 vector usti_hlavne_position = weapon.GetSelectionPositionLS(
"usti hlavne" );
138 usti_hlavne_position = weapon.ModelToWorld(usti_hlavne_position);
179 if ( unordered_index < 0 )
191 float sway_weight = player.GetAimingModel().GetSwayWeight();
211 if (player.IsRaised())
214 player.GetTransformWS(transform);
225 vector aimAngles =
Vector(LeftRightBase + LeftRightOffset, UpDownBase + UpDownOffset, 0.0);
228 vector resAngle = aimAngles + plrAngles;
230 vector start = camera_pos;
237 vector end = start + (direction * range);
243 if (
DayZPhysics.
RaycastRV(start, end, contact, contactDir, muz, null, null, player,
false,
false, ObjIntersectFire, 0.0) )
Super root of all classes in Enforce script.
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.
static Shape DrawLines(vector[] positions, int count, int color=0xFFFFFFFF, int flags=0)
static Shape DrawSphere(vector pos, float size=1, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE)
static void RemoveShape(out Shape shape)
static Shape DrawLine(vector from, vector to, int color=0xFFFFFFFF, int flags=0)
proto native float GetAimingHandsOffsetUD()
returns aiming hands up/down (y) offset angle
proto native float GetBaseAimingAngleLR()
returns base aiming angle LR - without sway/offsets/...
proto native float GetAimingHandsOffsetLR()
returns aiming hands left/right (x) offset angle
proto native float GetBaseAimingAngleUD()
returns base aiming angle UD - without sway/offsets/...
vector m_AimTrailOrdered[BUFFER_SIZE]
void DisplayGeneralInfo()
eWeaponDebugMode m_CurrentMode
void CycleWeaponDebugMode()
void OnCommandHandlerUpdate()
void OnKeyDown(KeyCode key)
void RemoveAllShapes(bool is_exit=false)
void DrawLineOfFireMuzzleToHit(vector begin_point, vector camera_dir, vector camera_pos)
ref map< int, string > m_DebugModesNames
vector m_AimTrailCyclic[BUFFER_SIZE]
Weapon GetWeaponInHands()
void AddPosToCyclicBuffer(vector pos)
bool m_IsDrawKeyHeldDownPrev
Shape m_ShapeFireDirCamera
script counterpart to engine's class Weapon
proto string ToString(bool simple=true)
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto vector AnglesToVector()
Converts spherical coordinates (yaw, pitch, roll in degrees) to unit length vector.
static proto native void End()
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto native void Text(string label)
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
proto native void ClearKey(KeyCode key)
proto native int KeyState(KeyCode key)
static proto vector MatrixToAngles(vector mat[3])
Returns angles of rotation matrix.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.