64 m_DebugModesNames.Insert(
eDebugMode.CAMERA_MUZZLE_HYBRID,
"Mode " +
eDebugMode.CAMERA_MUZZLE_HYBRID.ToString() +
": shoot either from camera lens or from muzzle \n depending on the situation");
216 if (
DayZPhysics.
RaycastRV(
end_point,
aim_point,
contact_point,
contact_dir,
contact_component,
null,
null,
null,
false,
false,
ObjIntersectFire))
272 DbgUI.
Text(
"Hold LWIN to draw debug line");
274 DbgUI.
Text(
"Press Z to cycle debug modes");
307 if (
DayZPhysics.
RaycastRV(
camera_pos,
end_point,
contact_point_cam_trace,
contact_dir_camera,
contact_component,
null,
null,
player_o,
false,
false,
ObjIntersectFire, 0.1))
329 if (
DayZPhysics.
RaycastRV(
begin_point,
contact_point_cam_trace,
contact_point_muzzle_trace,
contact_dir_muzzle,
contact_component_muzzle,
null,
null,
null,
false,
false,
ObjIntersectFire, 0.0))
359 if (
DayZPhysics.
RaycastRV(
start_point,
end_point,
contact_point_cam_trace,
contact_dir,
contact_component,
null,
null,
player_o,
false,
false,
ObjIntersectFire))
364 if (
DayZPhysics.
RaycastRV(
usti_hlavne_position,
contact_point_cam_trace,
contact_point_muzzle_trace,
contact_dir,
contact_component,
null,
null,
player_o,
false,
false,
ObjIntersectFire, 0.05))
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)
void DrawBarrelMemoryPoints(vector begin_point, vector end_point)
vector m_AimTrailOrdered[BUFFER_SIZE]
const float CAMERA_TRACE_MIN_DISTANCE_TOLERANCE
bool m_IsToggleKeyPressed
void DisplayGeneralInfo()
void DrawLineOfFire(vector begin_point, vector end_point)
void OnCommandHandlerUpdate()
void OnKeyDown(KeyCode key)
const float COLLISIONS_DISTANCE_TOLERANCE
void RemoveAllShapes(bool is_exit=false)
const float MAX_MUZZLE_DISTANCE_TOLERANCE
void DrawLineOfFireMuzzleToHit(vector begin_point, vector camera_dir, vector camera_pos)
ref map< int, string > m_DebugModesNames
vector m_AimTrailCyclic[BUFFER_SIZE]
const float CAMERA_BULLET_ORIGIN_OFFSET
vector GetEyePointPosition(Weapon weapon)
Shape m_ShapeFireDirection2
Weapon GetWeaponInHands()
void AddPosToCyclicBuffer(vector pos)
Shape m_ShapeFireDirection1
void DrawLineOfFireCameraHybrid(vector usti_hlavne_position, vector camera_dir, vector camera_pos, vector konec_hlavne_position)
void DrawEyePoint(Weapon weapon)
Shape m_ShapeFireDirCamera
script counterpart to engine's class Weapon
proto float Normalize()
Normalizes vector. Returns length.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto native CGame GetGame()
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.
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
proto native void ClearKey(KeyCode key)
proto native int KeyState(KeyCode key)
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
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 InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
proto native int GetMouseState(MouseState index)