DayZ
1.24
Loading...
Searching...
No Matches
Grenade_ChemGas.c
Go to the documentation of this file.
1
class
Grenade_ChemGas
:
Grenade_Base
2
{
3
protected
bool
m_Exploded
;
4
protected
ParticleSource
m_ParticleExploded
;
5
protected
EffectSound
m_ExplosionSound
;
6
7
8
void
Grenade_ChemGas
()
9
{
10
SetParticleExplosion
(
ParticleList
.
RGD5
);
11
SetGrenadeType
(
EGrenadeType
.CHEMICAL);
12
m_Pinned
=
false
;
13
SetPinnable
(
false
);
14
Arm
();
15
}
16
17
void
~Grenade_ChemGas
();
18
19
override
protected
void
OnExplode
()
20
{
21
m_Exploded
=
true
;
22
23
if
(
GetGame
().IsServer())
24
GetGame
().CreateObject(
"ContaminatedArea_Local"
,
GetPosition
());
25
}
26
27
protected
string
GetExplosionSoundSet
()
28
{
29
return
"Grenade_detonation_SoundSet"
;
30
}
31
32
override
void
EOnContact
(
IEntity
other
,
Contact
extra
)
33
{
34
if
(
GetGame
().IsServer())
35
{
36
if
(!
m_Exploded
)
37
OnActivateFinished
();
38
}
39
}
40
41
override
void
EEKilled
(
Object
killer
)
42
{
43
super
.EEKilled(
killer
);
44
}
45
46
override
void
OnDamageDestroyed
(
int
oldLevel
)
47
{
48
if
(
GetGame
().IsServer() || !
GetGame
().IsMultiplayer())
49
GetGame
().GetCallQueue(
CALL_CATEGORY_SYSTEM
).CallLater(Delete, 1000);
50
#ifndef SERVER
51
ClearFlags
(
EntityFlags
.VISIBLE,
false
);
52
m_ParticleExploded
=
ParticleManager
.GetInstance().PlayInWorld(
ParticleList
.
GRENADE_CHEM_BREAK
,
GetPosition
());
53
PlaySoundSet(
m_ExplosionSound
,
GetExplosionSoundSet
(), 0, 0);
54
#endif
55
56
}
57
58
override
protected
void
Activate
()
59
{
60
//we don't want base functionality here
61
}
62
63
}
SetParticleExplosion
void SetParticleExplosion(int particle)
Definition
ExplosivesBase.c:276
Arm
void Arm()
Definition
ExplosivesBase.c:193
EGrenadeType
EGrenadeType
Definition
Grenade_Base.c:2
ParticleManager
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition
ParticleManager.c:84
GetPosition
class JsonUndergroundAreaTriggerData GetPosition
Definition
UndergroundAreaLoader.c:9
Contact
Definition
EnPhysics.c:301
EffectSound
Wrapper class for managing sound through SEffectManager.
Definition
EffectSound.c:5
Grenade_Base
Definition
FlashGrenade.c:2
Grenade_Base::OnActivateFinished
void OnActivateFinished()
Definition
Grenade_Base.c:193
Grenade_Base::SetGrenadeType
void SetGrenadeType(EGrenadeType type)
Definition
Grenade_Base.c:106
Grenade_Base::SetPinnable
void SetPinnable(bool state)
Definition
Grenade_Base.c:96
Grenade_Base::m_Pinned
bool m_Pinned
Definition
Grenade_Base.c:38
Grenade_ChemGas
Definition
Grenade_ChemGas.c:2
Grenade_ChemGas::EEKilled
override void EEKilled(Object killer)
Definition
Grenade_ChemGas.c:41
Grenade_ChemGas::m_ExplosionSound
EffectSound m_ExplosionSound
Definition
Grenade_ChemGas.c:5
Grenade_ChemGas::Activate
void Activate()
Definition
Grenade_ChemGas.c:58
Grenade_ChemGas::EOnContact
override void EOnContact(IEntity other, Contact extra)
Definition
Grenade_ChemGas.c:32
Grenade_ChemGas::OnExplode
void OnExplode()
Definition
Grenade_ChemGas.c:19
Grenade_ChemGas::m_ParticleExploded
ParticleSource m_ParticleExploded
Definition
Grenade_ChemGas.c:4
Grenade_ChemGas::m_Exploded
bool m_Exploded
Definition
Grenade_ChemGas.c:3
Grenade_ChemGas::Grenade_ChemGas
void Grenade_ChemGas()
Definition
Grenade_ChemGas.c:8
Grenade_ChemGas::~Grenade_ChemGas
void ~Grenade_ChemGas()
Grenade_ChemGas::OnDamageDestroyed
override void OnDamageDestroyed(int oldLevel)
Definition
Grenade_ChemGas.c:46
Grenade_ChemGas::GetExplosionSoundSet
string GetExplosionSoundSet()
Definition
Grenade_ChemGas.c:27
IEntity
Definition
EnEntity.c:164
Object
Definition
ObjectTyped.c:2
Param3
Definition
EntityAI.c:95
ParticleList
Definition
ParticleList.c:12
ParticleList::RGD5
static const int RGD5
Definition
ParticleList.c:130
ParticleList::GRENADE_CHEM_BREAK
static const int GRENADE_CHEM_BREAK
Definition
ParticleList.c:305
ParticleSource
Entity which has the particle instance as an ObjectComponent.
Definition
ParticleSource.c:124
GetGame
proto native CGame GetGame()
EntityFlags
EntityFlags
Entity flags.
Definition
EnEntity.c:114
CALL_CATEGORY_SYSTEM
const int CALL_CATEGORY_SYSTEM
Definition
tools.c:8
ClearFlags
proto native int ClearFlags(int flags, bool immedUpdate=true)
scripts
4_World
Entities
Grenade_Base
Grenade_ChemGas.c
Generated by
1.10.0