Arma Reforger Explorer
1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_VehiclePerceivableComponent.c
Go to the documentation of this file.
1
class
SCR_VehiclePerceivableComponentClass
:
VehiclePerceivableComponentClass
2
{
3
}
4
5
class
SCR_VehiclePerceivableComponent : VehiclePerceivableComponent
6
{
7
protected
SCR_DamageManagerComponent
m_DamageMgr
;
8
9
//------------------------------------------------------------------------------------------------
10
override
void
EOnInit
(IEntity owner)
11
{
12
m_DamageMgr
= SCR_DamageManagerComponent.GetDamageManager(owner);
13
14
if
(
m_DamageMgr
)
15
{
16
m_DamageMgr
.GetOnDamageOverTimeAdded().Insert(
OnDamageOverTimeAdded
);
17
m_DamageMgr
.GetOnDamageOverTimeRemoved().Insert(
OnDamageOverTimeRemoved
);
18
}
19
}
20
21
//------------------------------------------------------------------------------------------------
22
// destructor
23
void
~SCR_VehiclePerceivableComponent
()
24
{
25
if
(
m_DamageMgr
)
26
{
27
m_DamageMgr
.GetOnDamageOverTimeAdded().Remove(
OnDamageOverTimeAdded
);
28
m_DamageMgr
.GetOnDamageOverTimeRemoved().Remove(
OnDamageOverTimeRemoved
);
29
}
30
}
31
32
//------------------------------------------------------------------------------------------------
36
void
OnDamageOverTimeAdded
(
EDamageType
dType,
float
dps,
HitZone
hz)
37
{
38
// Consider the vehicle disarmed once it starts burning
39
if
(dType ==
EDamageType
.FIRE)
40
SetDisarmed
(
true
);
41
}
42
43
//------------------------------------------------------------------------------------------------
46
void
OnDamageOverTimeRemoved
(
EDamageType
dType,
HitZone
hz)
47
{
48
if
(dType ==
EDamageType
.FIRE)
49
SetDisarmed
(
false
);
50
}
51
}
HitZone
Definition:
HitZone.c:12
OnDamageOverTimeAdded
void OnDamageOverTimeAdded(EDamageType dType, float dps, HitZone hz)
Definition:
SCR_VehiclePerceivableComponent.c:36
m_DamageMgr
SCR_VehiclePerceivableComponentClass m_DamageMgr
SetDisarmed
proto external void SetDisarmed(bool disarmed)
SCR_VehiclePerceivableComponentClass
Definition:
SCR_VehiclePerceivableComponent.c:1
VehiclePerceivableComponentClass
Definition:
VehiclePerceivableComponent.c:12
EOnInit
override void EOnInit(IEntity owner)
Definition:
SCR_VehiclePerceivableComponent.c:10
OnDamageOverTimeRemoved
void OnDamageOverTimeRemoved(EDamageType dType, HitZone hz)
Definition:
SCR_VehiclePerceivableComponent.c:46
EDamageType
EDamageType
Definition:
EDamageType.c:12
~SCR_VehiclePerceivableComponent
void ~SCR_VehiclePerceivableComponent()
Definition:
SCR_VehiclePerceivableComponent.c:23
scripts_Arma_Reforger_v1.1.0.42
scripts
Game
AI
Components
SCR_VehiclePerceivableComponent.c
Generated by
1.8.17