209 {
210 PlayerBase player = PlayerBase.Cast(
g_Game.GetPlayer());
211 if (player.IsRaised())
212 {
213 vector transform[4];
214 player.GetTransformWS(transform);
215
217 HumanInputController hic = player.GetInputController();
218
223
224
225 vector aimAngles =
Vector(LeftRightBase + LeftRightOffset, UpDownBase + UpDownOffset, 0.0);
226 vector plrAngles = Math3D.MatrixToAngles(transform);
227
228 vector resAngle = aimAngles + plrAngles;
229
230 vector start = camera_pos;
231
232
234
235 float range = 50.0;
236
237 vector end = start + (direction * range);
238 vector contact;
239 vector contactDir;
240 int muz;
241
243 if ( DayZPhysics.RaycastRV(start, end, contact, contactDir, muz, null, null, player, false, false, ObjIntersectFire, 0.0) )
244 {
248
249
251 {
254 else
257 }
258
260 {
265 }
266
267
268
269
270 }
271 else
272 {
274
277
279 {
282 else
285 }
286
288 {
293 }
294 }
295 }
296 }
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/...
eWeaponDebugMode m_CurrentMode
void AddPosToCyclicBuffer(vector pos)
Shape m_ShapeFireDirCamera
proto vector AnglesToVector()
Converts spherical coordinates (yaw, pitch, roll in degrees) to unit length vector.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
void HumanCommandWeapons()