Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_HelicopterSoundComponent.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_HelicopterSoundComponentClass
 

Functions

override void UpdateSoundJob (IEntity owner, float timeSlice)
 Call when component is in range. More...
 
protected void CalculateSpeedToCameraSignal (IEntity owner)
 
protected void HandleWashRotor (IEntity owner)
 
protected void RegisterOnDamageChanged ()
 
protected void UnregisterOnDamageChanged ()
 
protected void OnDamageStateChanged (EDamageState state)
 
protected void RegisterRotorMainOnDamageChanged ()
 
protected void UnregisterRotorMainOnDamageChanged ()
 
protected void RotorMainOnStateChanged ()
 
override void OnPostInit (IEntity owner)
 Called on PostInit when all components are added. More...
 
override void OnInit (IEntity owner)
 
void ~SCR_HelicopterSoundComponent ()
 

Variables

SCR_HelicopterSoundComponentClass SPEED_TO_CAMERA_SIGNAL_NAME = "SpeedToCamera"
 
const protected string DISTANCE_SIGNAL_NAME = "Distance"
 
const protected string ALTITUDE_AGL = "AltitudeAGL"
 
const protected string MAIN_ROTOR_RPM_SCALED = "MainRotorRPMScaled"
 
const protected string MAIN_ROTOR_HIT_ZONE_NAME = "RotorMain"
 
const protected string DAMAGE_STATE_SIGNAL_NAME = "DamageState"
 
const protected string ROTOR_MAIN_DAMAGE_STATE_SIGNAL_NAME = "RotorMainDamageState"
 
const protected float UPDATE_TIME = 0.15
 
const protected float WASH_ROTOR_DISTANCE_LIMIT = 100
 
const protected float ALTITUDE_LIMIT = 50
 
const protected float MAIN_ROTOR_RPM_SCALED_THRESHOLD = 0.2
 
protected int m_iDistanceSignalIdx
 
protected int m_iSpeedToCameraSignalIdx
 
protected int m_AltitudeAGLSignalIdx
 
protected int m_MainRotorRPMScaledIdx
 
protected SignalsManagerComponent m_SignalsManagerComponent
 
protected float m_fTimer
 
protected AudioHandle m_WashRotorAudioHandle = AudioHandle.Invalid
 Wash rotor audio handle. More...
 
protected SCR_HelicopterDamageManagerComponent m_HelicopterDamageManagerComponent
 Damage state signal. More...
 
protected SCR_HitZone m_RotorMainHitZone
 Main rotor damage state. More...
 
protected EDamageState m_eRotorMainDamageState
 

Function Documentation

◆ CalculateSpeedToCameraSignal()

protected void CalculateSpeedToCameraSignal ( IEntity  owner)

Updates SpeedToCamera signal based on owner velocity towards the camera

Parameters
ownerowner entity - cannot be null

Definition at line 64 of file SCR_HelicopterSoundComponent.c.

◆ HandleWashRotor()

protected void HandleWashRotor ( IEntity  owner)

Handles wash rotor sound. Triggers the sound, when conditions are met and updates sounds position based on owner's altitude.

Parameters
[in]ownercannot be null

Definition at line 86 of file SCR_HelicopterSoundComponent.c.

◆ OnDamageStateChanged()

protected void OnDamageStateChanged ( EDamageState  state)

Definition at line 129 of file SCR_HelicopterSoundComponent.c.

◆ RegisterOnDamageChanged()

protected void RegisterOnDamageChanged ( )

Definition at line 112 of file SCR_HelicopterSoundComponent.c.

◆ RegisterRotorMainOnDamageChanged()

protected void RegisterRotorMainOnDamageChanged ( )

Definition at line 135 of file SCR_HelicopterSoundComponent.c.

◆ RotorMainOnStateChanged()

protected void RotorMainOnStateChanged ( )

Definition at line 161 of file SCR_HelicopterSoundComponent.c.

◆ UnregisterOnDamageChanged()

protected void UnregisterOnDamageChanged ( )

Definition at line 122 of file SCR_HelicopterSoundComponent.c.

◆ UnregisterRotorMainOnDamageChanged()

protected void UnregisterRotorMainOnDamageChanged ( )

Definition at line 148 of file SCR_HelicopterSoundComponent.c.

◆ ~SCR_HelicopterSoundComponent()

void ~SCR_HelicopterSoundComponent ( )

Definition at line 197 of file SCR_HelicopterSoundComponent.c.

Variable Documentation

◆ ALTITUDE_AGL

const protected string ALTITUDE_AGL = "AltitudeAGL"

Definition at line 11 of file SCR_HelicopterSoundComponent.c.

◆ ALTITUDE_LIMIT

const protected float ALTITUDE_LIMIT = 50

Definition at line 20 of file SCR_HelicopterSoundComponent.c.

◆ DAMAGE_STATE_SIGNAL_NAME

const protected string DAMAGE_STATE_SIGNAL_NAME = "DamageState"

Definition at line 14 of file SCR_HelicopterSoundComponent.c.

◆ DISTANCE_SIGNAL_NAME

const protected string DISTANCE_SIGNAL_NAME = "Distance"

Definition at line 10 of file SCR_HelicopterSoundComponent.c.

◆ m_AltitudeAGLSignalIdx

protected int m_AltitudeAGLSignalIdx

Definition at line 26 of file SCR_HelicopterSoundComponent.c.

◆ m_eRotorMainDamageState

protected EDamageState m_eRotorMainDamageState

Definition at line 42 of file SCR_HelicopterSoundComponent.c.

◆ m_fTimer

protected float m_fTimer

Definition at line 31 of file SCR_HelicopterSoundComponent.c.

◆ m_HelicopterDamageManagerComponent

protected SCR_HelicopterDamageManagerComponent m_HelicopterDamageManagerComponent

Damage state signal.

Definition at line 37 of file SCR_HelicopterSoundComponent.c.

◆ m_iDistanceSignalIdx

protected int m_iDistanceSignalIdx

Definition at line 24 of file SCR_HelicopterSoundComponent.c.

◆ m_iSpeedToCameraSignalIdx

protected int m_iSpeedToCameraSignalIdx

Definition at line 25 of file SCR_HelicopterSoundComponent.c.

◆ m_MainRotorRPMScaledIdx

protected int m_MainRotorRPMScaledIdx

Definition at line 27 of file SCR_HelicopterSoundComponent.c.

◆ m_RotorMainHitZone

protected SCR_HitZone m_RotorMainHitZone

Main rotor damage state.

Definition at line 40 of file SCR_HelicopterSoundComponent.c.

◆ m_SignalsManagerComponent

protected SignalsManagerComponent m_SignalsManagerComponent

Definition at line 30 of file SCR_HelicopterSoundComponent.c.

◆ m_WashRotorAudioHandle

protected AudioHandle m_WashRotorAudioHandle = AudioHandle.Invalid

Wash rotor audio handle.

Definition at line 34 of file SCR_HelicopterSoundComponent.c.

◆ MAIN_ROTOR_HIT_ZONE_NAME

const protected string MAIN_ROTOR_HIT_ZONE_NAME = "RotorMain"

Definition at line 13 of file SCR_HelicopterSoundComponent.c.

◆ MAIN_ROTOR_RPM_SCALED

const protected string MAIN_ROTOR_RPM_SCALED = "MainRotorRPMScaled"

Definition at line 12 of file SCR_HelicopterSoundComponent.c.

◆ MAIN_ROTOR_RPM_SCALED_THRESHOLD

const protected float MAIN_ROTOR_RPM_SCALED_THRESHOLD = 0.2

Definition at line 21 of file SCR_HelicopterSoundComponent.c.

◆ ROTOR_MAIN_DAMAGE_STATE_SIGNAL_NAME

const protected string ROTOR_MAIN_DAMAGE_STATE_SIGNAL_NAME = "RotorMainDamageState"

Definition at line 15 of file SCR_HelicopterSoundComponent.c.

◆ SPEED_TO_CAMERA_SIGNAL_NAME

SCR_HelicopterSoundComponentClass SPEED_TO_CAMERA_SIGNAL_NAME = "SpeedToCamera"

◆ UPDATE_TIME

const protected float UPDATE_TIME = 0.15

Definition at line 18 of file SCR_HelicopterSoundComponent.c.

◆ WASH_ROTOR_DISTANCE_LIMIT

const protected float WASH_ROTOR_DISTANCE_LIMIT = 100

Definition at line 19 of file SCR_HelicopterSoundComponent.c.