49 int muzzleIndex = weapon.GetCurrentMuzzle();
68 void Update(
SDayZPlayerAimingModel pModel, out
float axis_mouse_x, out
float axis_mouse_y, out
float axis_hands_x, out
float axis_hands_y,
float pDt )
84 PrintString(
"RecoilBase | BEFORE | axis_mouse_y: " + axis_mouse_y.ToString());
95 PrintString(
"RecoilBase | AFTER | axis_mouse_y: " + axis_mouse_y.ToString());
122 m_Player.GetCurrentCamera().SendRecoilOffsetZ(offset);
140 pRecResultX = pos_on_curve[0];
141 pRecResultY = pos_on_curve[1];
150 PrintString(
"RecoilBase | ApplyMouseOffset processing: " + b1 );
172 pRecResultX = delta_mouse_offset_x;
173 pRecResultY = delta_mouse_offset_y;
188 PrintString(
"RecoilBase | pRecResultY: " + pRecResultY );
197 return weapon.GetPropertyModifierObject().m_RecoilModifiers;
proto native bool IsDedicatedServer()
Robust check which is preferred than the above, as it is valid much sooner.
Input value between 0 and 1, returns value adjusted by easing, no automatic clamping of input(do your...
static float EaseOutBack(float t, float magnitude=1.70158)
void Update(SDayZPlayerAimingModel pModel, out float axis_mouse_x, out float axis_mouse_y, out float axis_hands_x, out float axis_hands_y, float pDt)
vector GetRecoilModifier(Weapon_Base weapon)
float m_HandsOffsetRelativeTime
protected vector m_RecoilModifier
vector GetPositionOnCurve(array< vector > points, float time)
protected vector m_MouseOffsetTargetAccum
float m_MouseOffsetRangeMin
float m_MouseOffsetRelativeTime
void ApplyCamOffset(SDayZPlayerAimingModel pModel)
void RecoilBase(Weapon_Base weapon)
float m_CamOffsetRelativeTime
protected bool m_IsClient
void ApplyMouseOffset(float pDt, out float pRecResultX, out float pRecResultY)
void PostInit(Weapon_Base weapon)
protected float m_ReloadTime
void ApplyHandsOffset(float pDt, out float pRecResultX, out float pRecResultY)
void Destroy()
Destroys this object next update tick.
float m_CamOffsetDistance
protected bool m_DeleteRequested
float m_MouseOffsetDistance
protected ref array< vector > m_HandsCurvePoints
protected vector m_MouseOffsetTarget
float m_MouseOffsetRangeMax
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto string ToString(bool beautify=true)
Vector to string.
proto static native vector YawToVector(float yaw)
Returns vector of yaw.
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
static proto native vector Curve(ECurveType type, float param, notnull array< vector > points)
Computes curve.
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,...
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.