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

Go to the source code of this file.

Enumerations

enum  EFireState {
  NONE, SMOKING_LIGHT, SMOKING_HEAVY, SMOKING_IGNITING,
  BURNING
}
 

Functions

override void OnInit (IEntity pOwnerEntity, GenericComponent pManagerComponent)
 
override EHitZoneGroup GetHitZoneGroup ()
 
override void OnMaxHealthChanged ()
 
void InitFireRates ()
 Compute smoke and fire damage thresholds and rates. More...
 
override float ComputeEffectiveDamage (notnull BaseDamageContext damageContext, bool isDOT)
 
void ComputeIncendiaryDamage (float rawDamage, notnull Instigator instigator)
 
protected void SetFireInstigator (Instigator instigator)
 Inform damage manager about fire instigator. More...
 
Instigator GetFireInstigator ()
 Inform damage manager about fire instigator. More...
 
override void OnDamageStateChanged ()
 Destruction logic. More...
 
float GetFireRate ()
 Get rate of fire (dps). If it is below fire damage threshold, no damage will be dealt. More...
 
void SetFireRate (float fireRate)
 Set rate of fire (dps). If it is below fire damage threshold, no damage will be dealt. More...
 
float GetFireRateForState (EFireState fireState, float weight=-1)
 
EFireState GetFireState ()
 Returns current fire state. More...
 
void SetFireState (EFireState fireState, float weight=-1, bool changeRate=true)
 
EFireState GetFireStateForRate (float fireRate)
 
protected float CalculateNewFireRate (float fireRate, float deltaTime)
 
protected void ApplyFireDamage (float fireRate, float deltaTime)
 
protected void UpdateFireRate (bool forceUpdate=false)
 
void StopFireRateUpdate ()
 Stop fire rate updates until requested again. More...
 
void LockFireRate (bool locked=true)
 Temporarily stop fire rate changes until incendiary damage is received again. More...
 
void StartDestructionFire ()
 
protected void StartDestructionGroundFire ()
 Attempts to spawn fire effect on the ground under the burning wreck. More...
 
void StopDestructionFire ()
 
protected void UpdateFireEffects (EFireState fireState)
 Logic when vehicle is damaged. More...
 
protected void FireLightOn ()
 
protected void FireLightOff ()
 
override float GetSecondaryExplosionScale ()
 

Variables

enum EFireState FIRE_TERRAIN_HEIGHT_TOLERANCE = 2.2
 
protected Instigator m_FireInstigator
 
protected EFireState m_eFireState
 
protected float m_fFireRate
 
protected float m_fLightSmokeReductionRate
 
protected float m_fHeavySmokeReductionRate
 
protected float m_fIgnitingSmokeStokeRate
 
protected float m_fFireDamageRateMin
 
protected float m_fFireDamageRateMax
 
protected float m_fUpdateFireTime
 
protected bool m_bIsUpdatingFire
 
protected bool m_bIsFireRateLocked
 
protected ref array< LightEntity > m_aLightEntities
 
protected ref array< ref SCR_BaseLightDatam_aLightData
 
params __pad0__
 
params category
 
protected float m_fIncendiaryReduction
 
params __pad1__
 
params __pad2__
 
params __pad3__
 
params __pad4__
 
params __pad5__
 
params __pad6__
 
params __pad7__
 
params __pad8__
 
params __pad9__
 
params __pad10__
 
params __pad11__
 
protected ResourceName m_sDamagedParticle
 
protected ResourceName m_sDamagedParticleHeavy
 
protected ResourceName m_sBurningParticle
 
protected ResourceName m_sBurningGroundParticle
 
params __pad12__
 
protected string m_sFireStateSignal
 
protected SignalsManagerComponent m_SignalsManager
 
protected int m_iFireStateSignalIdx = -1
 
protected ParticleEffectEntity m_DamagedParticleLight
 
protected ParticleEffectEntity m_DamagedParticleHeavy
 
protected ParticleEffectEntity m_BurningParticle
 
protected ParticleEffectEntity m_BurningGroundParticle
 

Enumeration Type Documentation

◆ EFireState

enum EFireState
Enumerator
NONE 
SMOKING_LIGHT 
SMOKING_HEAVY 
SMOKING_IGNITING 
BURNING 

Definition at line 1 of file SCR_FlammableHitZone.c.

Function Documentation

◆ ApplyFireDamage()

protected void ApplyFireDamage ( float  fireRate,
float  deltaTime 
)

Apply fire damage to hitzone and to compartment occupants

Parameters
fireRateCurrent rate of fire
deltaTimeTime passed in seconds since last update

Definition at line 450 of file SCR_FlammableHitZone.c.

◆ CalculateNewFireRate()

protected float CalculateNewFireRate ( float  fireRate,
float  deltaTime 
)

Determine new fire rate

Parameters
fireRateCurrent rate of fire
deltaTimeTime passed in seconds since last update
Returns
fireRate

Definition at line 417 of file SCR_FlammableHitZone.c.

◆ ComputeEffectiveDamage()

override float ComputeEffectiveDamage ( notnull BaseDamageContext  damageContext,
bool  isDOT 
)

Calculates the amount of damage a hitzone will receive.

Parameters
damageTypeDamage type
rawDamageIncoming damage, without any modifiers taken into account
hitEntityDamaged entity
struckHitZoneHitzone to be damaged
damageSourceProjectile
instigatorInstigator
hitMaterialSurface physics material
colliderIDCollider ID if provided
hitTransformPosition, direction and normal
impactVelocityProjectile velocity at impact
nodeIDBone index in mesh object
isDOTTrue if this is a calculation for DamageOverTime

Definition at line 175 of file SCR_FlammableHitZone.c.

◆ ComputeIncendiaryDamage()

void ComputeIncendiaryDamage ( float  rawDamage,
notnull Instigator  instigator 
)

Modify fire rate based on received incendiary impacts

Parameters
rawDamageIncendiary damage to be handled
instigatorInstigator of the incendiary damage

Definition at line 200 of file SCR_FlammableHitZone.c.

◆ FireLightOff()

protected void FireLightOff ( )

Definition at line 760 of file SCR_FlammableHitZone.c.

◆ FireLightOn()

protected void FireLightOn ( )

Definition at line 732 of file SCR_FlammableHitZone.c.

◆ GetFireInstigator()

Instigator GetFireInstigator ( )

Inform damage manager about fire instigator.

Definition at line 242 of file SCR_FlammableHitZone.c.

◆ GetFireRate()

float GetFireRate ( )

Get rate of fire (dps). If it is below fire damage threshold, no damage will be dealt.

Definition at line 272 of file SCR_FlammableHitZone.c.

◆ GetFireRateForState()

float GetFireRateForState ( EFireState  fireState,
float  weight = -1 
)

Get fire rate that will achieve specified fire state

Parameters
fireStateNew fire state to be set
weightPart of fire state zone to aim for. Default: -1 (becomes 0.5)

Definition at line 292 of file SCR_FlammableHitZone.c.

◆ GetFireState()

EFireState GetFireState ( )

Returns current fire state.

Definition at line 338 of file SCR_FlammableHitZone.c.

◆ GetFireStateForRate()

EFireState GetFireStateForRate ( float  fireRate)

Get fire state that will be achieved for specified fire rate

Parameters
fireRateFire rate to test for
Returns
fireState New fire state

Definition at line 394 of file SCR_FlammableHitZone.c.

◆ GetHitZoneGroup()

override EHitZoneGroup GetHitZoneGroup ( )

Definition at line 118 of file SCR_FlammableHitZone.c.

◆ GetSecondaryExplosionScale()

override float GetSecondaryExplosionScale ( )

Definition at line 775 of file SCR_FlammableHitZone.c.

◆ InitFireRates()

void InitFireRates ( )

Compute smoke and fire damage thresholds and rates.

Definition at line 136 of file SCR_FlammableHitZone.c.

◆ LockFireRate()

void LockFireRate ( bool  locked = true)

Temporarily stop fire rate changes until incendiary damage is received again.

Definition at line 558 of file SCR_FlammableHitZone.c.

◆ OnDamageStateChanged()

override void OnDamageStateChanged ( )

Destruction logic.

Definition at line 252 of file SCR_FlammableHitZone.c.

◆ OnInit()

override void OnInit ( IEntity  pOwnerEntity,
GenericComponent  pManagerComponent 
)

Definition at line 102 of file SCR_FlammableHitZone.c.

◆ OnMaxHealthChanged()

override void OnMaxHealthChanged ( )

Definition at line 124 of file SCR_FlammableHitZone.c.

◆ SetFireInstigator()

protected void SetFireInstigator ( Instigator  instigator)

Inform damage manager about fire instigator.

Definition at line 235 of file SCR_FlammableHitZone.c.

◆ SetFireRate()

void SetFireRate ( float  fireRate)

Set rate of fire (dps). If it is below fire damage threshold, no damage will be dealt.

Definition at line 279 of file SCR_FlammableHitZone.c.

◆ SetFireState()

void SetFireState ( EFireState  fireState,
float  weight = -1,
bool  changeRate = true 
)

Set fire rate that will achieve specified fire state

Parameters
fireStateNew fire state to be set
weightPart of fire state zone to aim for. Default: -1 (if state is different, becomes 0.5, otherwise no change)
rateAllow changing fire rate. Default: true

Definition at line 350 of file SCR_FlammableHitZone.c.

◆ StartDestructionFire()

void StartDestructionFire ( )

Definition at line 564 of file SCR_FlammableHitZone.c.

◆ StartDestructionGroundFire()

protected void StartDestructionGroundFire ( )

Attempts to spawn fire effect on the ground under the burning wreck.

Definition at line 594 of file SCR_FlammableHitZone.c.

◆ StopDestructionFire()

void StopDestructionFire ( )

Definition at line 649 of file SCR_FlammableHitZone.c.

◆ StopFireRateUpdate()

void StopFireRateUpdate ( )

Stop fire rate updates until requested again.

Definition at line 550 of file SCR_FlammableHitZone.c.

◆ UpdateFireEffects()

protected void UpdateFireEffects ( EFireState  fireState)

Logic when vehicle is damaged.

Definition at line 663 of file SCR_FlammableHitZone.c.

◆ UpdateFireRate()

protected void UpdateFireRate ( bool  forceUpdate = false)

Flammable hitzone is not immediately set on fire. At first it generates smoke which can spontaneously extinguish or ignite itself. Damage is applied once fire rate exceeds damage threshold.

Definition at line 485 of file SCR_FlammableHitZone.c.

Variable Documentation

◆ __pad0__

params __pad0__

Definition at line 33 of file SCR_FlammableHitZone.c.

◆ __pad10__

params __pad10__

Definition at line 66 of file SCR_FlammableHitZone.c.

◆ __pad11__

params __pad11__

Definition at line 69 of file SCR_FlammableHitZone.c.

◆ __pad12__

params __pad12__

Definition at line 85 of file SCR_FlammableHitZone.c.

◆ __pad1__

params __pad1__

Definition at line 39 of file SCR_FlammableHitZone.c.

◆ __pad2__

params __pad2__

Definition at line 42 of file SCR_FlammableHitZone.c.

◆ __pad3__

params __pad3__

Definition at line 45 of file SCR_FlammableHitZone.c.

◆ __pad4__

params __pad4__

Definition at line 48 of file SCR_FlammableHitZone.c.

◆ __pad5__

params __pad5__

Definition at line 51 of file SCR_FlammableHitZone.c.

◆ __pad6__

params __pad6__

Definition at line 54 of file SCR_FlammableHitZone.c.

◆ __pad7__

params __pad7__

Definition at line 57 of file SCR_FlammableHitZone.c.

◆ __pad8__

params __pad8__

Definition at line 60 of file SCR_FlammableHitZone.c.

◆ __pad9__

params __pad9__

Definition at line 63 of file SCR_FlammableHitZone.c.

◆ category

params category

Definition at line 34 of file SCR_FlammableHitZone.c.

◆ FIRE_TERRAIN_HEIGHT_TOLERANCE

enum EFireState FIRE_TERRAIN_HEIGHT_TOLERANCE = 2.2

◆ m_aLightData

protected ref array<ref SCR_BaseLightData> m_aLightData

Definition at line 30 of file SCR_FlammableHitZone.c.

◆ m_aLightEntities

protected ref array<LightEntity> m_aLightEntities

Definition at line 27 of file SCR_FlammableHitZone.c.

◆ m_bIsFireRateLocked

protected bool m_bIsFireRateLocked

Definition at line 25 of file SCR_FlammableHitZone.c.

◆ m_bIsUpdatingFire

protected bool m_bIsUpdatingFire

Definition at line 24 of file SCR_FlammableHitZone.c.

◆ m_BurningGroundParticle

protected ParticleEffectEntity m_BurningGroundParticle

Definition at line 99 of file SCR_FlammableHitZone.c.

◆ m_BurningParticle

protected ParticleEffectEntity m_BurningParticle

Definition at line 98 of file SCR_FlammableHitZone.c.

◆ m_DamagedParticleHeavy

protected ParticleEffectEntity m_DamagedParticleHeavy

Definition at line 97 of file SCR_FlammableHitZone.c.

◆ m_DamagedParticleLight

protected ParticleEffectEntity m_DamagedParticleLight

Definition at line 96 of file SCR_FlammableHitZone.c.

◆ m_eFireState

protected EFireState m_eFireState

Definition at line 16 of file SCR_FlammableHitZone.c.

◆ m_fFireDamageRateMax

protected float m_fFireDamageRateMax

Definition at line 22 of file SCR_FlammableHitZone.c.

◆ m_fFireDamageRateMin

protected float m_fFireDamageRateMin

Definition at line 21 of file SCR_FlammableHitZone.c.

◆ m_fFireRate

protected float m_fFireRate

Definition at line 17 of file SCR_FlammableHitZone.c.

◆ m_fHeavySmokeReductionRate

protected float m_fHeavySmokeReductionRate

Definition at line 19 of file SCR_FlammableHitZone.c.

◆ m_fIgnitingSmokeStokeRate

protected float m_fIgnitingSmokeStokeRate

Definition at line 20 of file SCR_FlammableHitZone.c.

◆ m_fIncendiaryReduction

protected float m_fIncendiaryReduction

Definition at line 37 of file SCR_FlammableHitZone.c.

◆ m_FireInstigator

protected Instigator m_FireInstigator

Definition at line 15 of file SCR_FlammableHitZone.c.

◆ m_fLightSmokeReductionRate

protected float m_fLightSmokeReductionRate

Definition at line 18 of file SCR_FlammableHitZone.c.

◆ m_fUpdateFireTime

protected float m_fUpdateFireTime

Definition at line 23 of file SCR_FlammableHitZone.c.

◆ m_iFireStateSignalIdx

protected int m_iFireStateSignalIdx = -1

Definition at line 93 of file SCR_FlammableHitZone.c.

◆ m_sBurningGroundParticle

protected ResourceName m_sBurningGroundParticle

Definition at line 83 of file SCR_FlammableHitZone.c.

◆ m_sBurningParticle

protected ResourceName m_sBurningParticle

Definition at line 80 of file SCR_FlammableHitZone.c.

◆ m_sDamagedParticle

protected ResourceName m_sDamagedParticle

Definition at line 74 of file SCR_FlammableHitZone.c.

◆ m_sDamagedParticleHeavy

protected ResourceName m_sDamagedParticleHeavy

Definition at line 77 of file SCR_FlammableHitZone.c.

◆ m_sFireStateSignal

protected string m_sFireStateSignal

Definition at line 89 of file SCR_FlammableHitZone.c.

◆ m_SignalsManager

protected SignalsManagerComponent m_SignalsManager

Definition at line 92 of file SCR_FlammableHitZone.c.