DayZ 1.24
Loading...
Searching...
No Matches
Grenade_ChemGas.c
Go to the documentation of this file.
2{
3 protected bool m_Exploded;
6
7
9 {
12 m_Pinned = false;
13 SetPinnable(false);
14 Arm();
15 }
16
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
33 {
34 if (GetGame().IsServer())
35 {
36 if (!m_Exploded)
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);
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}
void SetParticleExplosion(int particle)
void Arm()
EGrenadeType
Definition Grenade_Base.c:2
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
class JsonUndergroundAreaTriggerData GetPosition
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
void OnActivateFinished()
void SetGrenadeType(EGrenadeType type)
void SetPinnable(bool state)
override void EEKilled(Object killer)
EffectSound m_ExplosionSound
override void EOnContact(IEntity other, Contact extra)
ParticleSource m_ParticleExploded
void ~Grenade_ChemGas()
override void OnDamageDestroyed(int oldLevel)
string GetExplosionSoundSet()
static const int RGD5
static const int GRENADE_CHEM_BREAK
Entity which has the particle instance as an ObjectComponent.
proto native CGame GetGame()
EntityFlags
Entity flags.
Definition EnEntity.c:114
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8
proto native int ClearFlags(int flags, bool immedUpdate=true)