19class PlayerSwayConstants
101 m_SwayModifier = weapon.GetPropertyModifierObject().m_SwayModifiers;
164 float breathing_offset_x;
165 float breathing_offset_y;
167 float noise_offset_x;
168 float noise_offset_y;
170 float shake_offset_x;
171 float shake_offset_y;
173 float recoil_offset_mouse_x;
174 float recoil_offset_mouse_y;
176 float recoil_offset_hands_x;
177 float recoil_offset_hands_y;
182 float player_stamina =
m_PlayerPb.GetStaminaHandler().GetSyncedStaminaNormalized();
219 if (shake_level != 0)
221 ApplyShakes(shake_offset_x, shake_offset_y, shake_level);
227 m_CurrentRecoil.Update(pModel, recoil_offset_mouse_x, recoil_offset_mouse_y, recoil_offset_hands_x, recoil_offset_hands_y, pDt);
232 m_KuruShake.Update(pDt, kuru_offset_x, kuru_offset_y);
236 pModel.
m_fAimXHandsOffset = breathing_offset_x + noise_offset_x + recoil_offset_hands_x + shake_offset_x + kuru_offset_x;
237 pModel.
m_fAimYHandsOffset = breathing_offset_y + noise_offset_y + recoil_offset_hands_y + shake_offset_y + kuru_offset_y;
329 ret = PlayerSwayConstants.SWAY_MULTIPLIER_STABLE;
336 ret =
Math.
Lerp(PlayerSwayConstants.SWAY_MULTIPLIER_STABLE,PlayerSwayConstants.SWAY_MULTIPLIER_EXHAUSTED,(time_clamped/max));
342 max = PlayerSwayConstants.SWAY_TIME_OUT;
373 protected void ApplyBreathingPattern(out
float x_axis, out
float y_axis,
float pAmplitude,
float pTotalTime,
float weight)
385 x_axis = (
Math.
Sin(pTotalTime) * pAmplitude / 4) * weight;
386 y_axis = (
Math.
Sin((pTotalTime) * 0.8 + 0.6) * pAmplitude) * weight;
394 protected void ApplyHorizontalNoise(out
float x_axis, out
float y_axis,
float smooth_time,
float max_velocity_low,
float max_velocity_high,
float velocity_modifier,
float max_distance,
float weight,
float pDt)
412 protected void ApplyShakes(out
float x_axis, out
float y_axis,
int level)
414 float weight = level /
PlayerBase.SHAKE_LEVEL_MAX;
427 protected float CalculateWeight(
int stance_index,
float current_stamina,
float camera_sway_modifier,
bool holding_breath)
431 return PlayerSwayConstants.SWAY_ROLL;
433 float stance_modifier;
434 switch (stance_index)
437 stance_modifier = 0.5;
440 stance_modifier = 0.75;
443 stance_modifier = 0.925;
446 stance_modifier = 0.75;
464 Print(
"DayZPlayerImplementAiming | " + val);
Super root of all classes in Enforce script.
static float m_AimXClampRanges[]
float m_BreathingYAxisOffset
void SetRecoil(Weapon_Base weapon)
void ApplyShakes(out float x_axis, out float y_axis, int level)
void OnSwayStateChange(int state)
float m_SwayStateStartTime
proportionally shortens de/stabilization process and duration. Also affects stamina consumption (temp...
void OnRaiseBegin(DayZPlayerImplement player)
void DayZPlayerImplementAiming(DayZPlayerImplement player)
bool IsProceduralRecoilEnabled()
DayZPlayerImplement m_PlayerDpi
void ApplyBreathingPattern(out float x_axis, out float y_axis, float pAmplitude, float pTotalTime, float weight)
void RequestKuruShake(float amount)
float m_HoldBreathSwayCoef
stamina percentage at hold breath start
float CalculateSpeedMultiplier(float stamina)
float m_HorizontalTargetValue
bool UpdateSwayState(int state)
const float SWAY_WEIGHT_SCALER
This HeadingModel - Clamps heading.
bool ProcessAimFilters(float pDt, SDayZPlayerAimingModel pModel, int stance_index)
void SetAimNoiseAllowed(bool state)
ref KuruShake m_KuruShake
bool ProcessStealthFilters(float pDt, SDayZPlayerAimingModel pModel)
bool m_ProceduralRecoilEnabled
float m_StaminaPercentage
void OnFinisherBegin(float currentAimY)
float CalculateSwayMultiplier()
float m_StateStartSwayMultiplier
float m_HorizontalNoiseVelocity[1]
void DbgPrintAimingImplement(string val)
float m_BreathingXAxisOffset
void SetProceduralRecoilEnabled(bool state)
ref RecoilBase m_CurrentRecoil
float m_HorizontalNoiseXAxisOffset
void ApplyHorizontalNoise(out float x_axis, out float y_axis, float smooth_time, float max_velocity_low, float max_velocity_high, float velocity_modifier, float max_distance, float weight, float pDt)
int GetCurrentSwayState()
float m_LastSwayMultiplier
void SetCamShakeValues(float x_axis, float y_axis)
float CalculateWeight(int stance_index, float current_stamina, float camera_sway_modifier, bool holding_breath)
float m_FilterVelocityStealthAimY[1]
override RecoilBase SpawnRecoilObject()
DayZPlayerConstants
defined in C++
static const float SWAY_TIME_OUT
enum eSwayStates SWAY_MULTIPLIER_DEFAULT
static const float SWAY_TIME_EXHAUSTED
static const float SWAY_MULTIPLIER_STABLE
static const float SWAY_ROLL
static const float SWAY_TIME_IN
static const float SWAY_MULTIPLIER_EXHAUSTED
static const float HOLD_BREATH_STAMINA_THRESHOLD
static const float SWAY_TIME_STABLE
void DayZPlayerUtils()
cannot be instantiated
proto void Print(void var)
Prints content of variable to console/log.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Round(float f)
Returns mathematical round of value.
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 SmoothCD(float val, float target, inout float velocity[], float smoothTime, float maxVelocity, float dt)
Does the CD smoothing function - easy in | easy out / S shaped smoothing.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float AbsFloat(float f)
Returns absolute value.
static proto float Sin(float angle)
Returns sinus of angle in radians.