Highly WIP, do not use.
223 {
225
228 {
229 widget.SetPos(0, 0);
230 widget.Update();
231 return;
232 }
233
235
237
239
242
245
248
249 vector resAngle = aimAngles + plrAngles;
250
252 MiscGameplayFunctions.GetHeadBonePos(
m_Player, start);
253
255
256 int layer = ObjIntersectView;
257 float range = 1.0;
258
261 {
262 layer = ObjIntersectFire;
263 range = 10.0;
264
265 vector usti_hlavne_position = weapon.GetSelectionPositionMS(
"usti hlavne" );
266 vector konec_hlavne_position = weapon.GetSelectionPositionMS(
"konec hlavne" );
267 usti_hlavne_position =
m_Player.ModelToWorld(usti_hlavne_position);
268 konec_hlavne_position =
m_Player.ModelToWorld(konec_hlavne_position);
269
271 int contact_component;
272
273 direction = konec_hlavne_position - usti_hlavne_position;
275
276 start = konec_hlavne_position;
277
279 }
280 else
281 {
283 {
286 }
287
288 float r0[4];
289 float r1[4];
290
292
295
298
300
302
303 direction = t[2];
304
306 }
307
308 vector end = start + (direction * range);
310
311 DayZPhysics.
RaycastRV(start, end,
position, contact_dir, contact_component, null,
m_Player,
m_Player,
false,
false, layer);
312
313
314
315
316
317
318
319
320
321
322
324
325 float sx, sy;
326 widget.GetScreenSize(sx, sy);
327 screenSpace[0] = screenSpace[0] - (sx * 0.5);
328 screenSpace[1] = screenSpace[1] - (sy * 0.5);
329
330 widget.SetScreenPos(screenSpace[0], screenSpace[1]);
331 widget.Update();
332 }
vector m_PreviousDirection
Floating crosshair.
bool m_PreviousDirectionSet
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.
proto native float GetBaseAimingAngleLR()
returns base aiming angle LR - without sway/offsets/...
proto native float GetBaseAimingAngleUD()
returns base aiming angle UD - without sway/offsets/...
proto float Normalize()
Normalizes vector. Returns length.
proto vector AnglesToVector()
Converts spherical coordinates (yaw, pitch, roll in degrees) to unit length vector.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto void QuatToMatrix(float q[4], out vector mat[3])
Converts quaternion to rotation matrix.
static proto vector MatrixToAngles(vector mat[3])
Returns angles of rotation matrix.
static proto void QuatLerp(out float qout[4], float q1[4], float q2[4], float frac)
Linear interpolation between q1 and q2 with weight 'frac' (0...1)
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto void MatrixToQuat(vector mat[3], out float d[4])
Converts rotation matrix to quaternion.
static proto void DirectionAndUpMatrix(vector dir, vector up, out vector mat[4])
Creates rotation matrix from direction and up vector.
static const float RAD2DEG