Dayz Explorer 1.28.160049
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 {
25 GetGame().CreateObject("ContaminatedArea_Local", GetPosition());
26 }
27 }
28
29 protected string GetExplosionSoundSet()
30 {
31 return "Grenade_detonation_SoundSet";
32 }
33
34 override void EOnContact(IEntity other, Contact extra)
35 {
36 if (GetGame().IsServer())
37 {
38 if (!m_Exploded)
39 {
41 }
42 }
43 }
44
45 override void EEKilled(Object killer)
46 {
47 super.EEKilled(killer);
48 }
49
50 override void OnDamageDestroyed(int oldLevel)
51 {
52 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
53 {
54 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(Delete, 1000);
55 }
56 #ifndef SERVER
57 ClearFlags(EntityFlags.VISIBLE, false);
58 m_ParticleExploded = ParticleManager.GetInstance().PlayInWorld(ParticleList.GRENADE_CHEM_BREAK, GetPosition());
59 PlaySoundSet( m_ExplosionSound, GetExplosionSoundSet(), 0, 0 );
60 #endif
61
62 }
63
64 override protected void Activate()
65 {
66 //we don't want base functionality here
67 }
68
69}
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()
Entity which has the particle instance as an ObjectComponent.
static override Particle PlayInWorld(int particle_id, vector global_pos)
Creates a particle emitter on the given position and activates it.
void SetParticleExplosion(int particle)
void Arm()
proto native CGame GetGame()
EGrenadeType
Definition grenade_base.c:2
EntityFlags
Entity flags.
Definition enentity.c:115
class JsonUndergroundAreaTriggerData GetPosition
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)