DayZ 1.24
Loading...
Searching...
No Matches
Grenade_ChemGas Class Reference
Inheritance diagram for Grenade_ChemGas:
[legend]
Collaboration diagram for Grenade_ChemGas:
[legend]

Protected Member Functions

void Grenade_ChemGas ()
 
void ~Grenade_ChemGas ()
 
void OnExplode ()
 
string GetExplosionSoundSet ()
 
override void EOnContact (IEntity other, Contact extra)
 
override void EEKilled (Object killer)
 
override void OnDamageDestroyed (int oldLevel)
 
void Activate ()
 

Protected Attributes

bool m_Exploded
 
ParticleSource m_ParticleExploded
 
EffectSound m_ExplosionSound
 

Additional Inherited Members

- Private Member Functions inherited from Grenade_Base
override void CreateLight ()
 
void ~FlashGrenade ()
 
void Pin ()
 
void Unpin ()
 
override void OnActivatedByTripWire ()
 DEPRECATED use OnActivatedByItem.
 
override void OnActivatedByItem (notnull ItemBase item)
 
bool IsPinned ()
 
bool IsPinnable ()
 
void ActivateImmediate ()
 
void ActivateRandomTime ()
 
void SetPinnable (bool state)
 
void SetFuseDelay (float delay)
 
void SetGrenadeType (EGrenadeType type)
 
EGrenadeType GetGrenadeType ()
 
void Activate ()
 
void Deactivate ()
 
override void InitiateExplosion ()
 
void ExplodeGrenade (EGrenadeType grenade_type)
 DEPRECATED - for backward compatibility only.
 
void OnPin ()
 
void OnUnpin ()
 
void OnActivateStarted ()
 
void OnActivateFinished ()
 
void OnActivateImmediate ()
 
void OnDeactivate ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override bool CanBeArmed ()
 
override bool CanBeDisarmed ()
 
override bool CanExplodeInFire ()
 
override void SetActions ()
 
override void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
override void OnWasAttached (EntityAI parent, int slot_id)
 
void Grenade_Base ()
 
- Private Attributes inherited from Grenade_Base
const float DEFAULT_FUSE_DELAY = 10
 
ref Timer m_FuseTimer
 
float m_FuseDelay
 
float m_RemainingFuseTime
 
bool m_Pinned
 
bool m_Pinnable
 
EGrenadeType m_GrenadeType
 

Detailed Description

Definition at line 1 of file Grenade_ChemGas.c.

Constructor & Destructor Documentation

◆ Grenade_ChemGas()

void Grenade_ChemGas::Grenade_ChemGas ( )
inlineprotected

Definition at line 8 of file Grenade_ChemGas.c.

9 {
12 m_Pinned = false;
13 SetPinnable(false);
14 Arm();
15 }
void SetParticleExplosion(int particle)
void Arm()
EGrenadeType
Definition Grenade_Base.c:2
void SetGrenadeType(EGrenadeType type)
void SetPinnable(bool state)
static const int RGD5

References Arm(), Grenade_Base::m_Pinned, ParticleList::RGD5, Grenade_Base::SetGrenadeType(), SetParticleExplosion(), and Grenade_Base::SetPinnable().

◆ ~Grenade_ChemGas()

void Grenade_ChemGas::~Grenade_ChemGas ( )
protected

Member Function Documentation

◆ Activate()

void Grenade_ChemGas::Activate ( )
inlineprotected

Definition at line 58 of file Grenade_ChemGas.c.

59 {
60 //we don't want base functionality here
61 }

◆ EEKilled()

override void Grenade_ChemGas::EEKilled ( Object killer)
inlineprotected

Definition at line 41 of file Grenade_ChemGas.c.

42 {
43 super.EEKilled(killer);
44 }

◆ EOnContact()

override void Grenade_ChemGas::EOnContact ( IEntity other,
Contact extra )
inlineprotected

Definition at line 32 of file Grenade_ChemGas.c.

33 {
34 if (GetGame().IsServer())
35 {
36 if (!m_Exploded)
38 }
39 }
void OnActivateFinished()
proto native CGame GetGame()

References GetGame(), m_Exploded, and Grenade_Base::OnActivateFinished().

◆ GetExplosionSoundSet()

string Grenade_ChemGas::GetExplosionSoundSet ( )
inlineprotected

Definition at line 27 of file Grenade_ChemGas.c.

28 {
29 return "Grenade_detonation_SoundSet";
30 }

Referenced by OnDamageDestroyed().

◆ OnDamageDestroyed()

override void Grenade_ChemGas::OnDamageDestroyed ( int oldLevel)
inlineprotected

Definition at line 46 of file Grenade_ChemGas.c.

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 }
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
class JsonUndergroundAreaTriggerData GetPosition
EffectSound m_ExplosionSound
ParticleSource m_ParticleExploded
string GetExplosionSoundSet()
static const int GRENADE_CHEM_BREAK
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)

References CALL_CATEGORY_SYSTEM, ClearFlags(), GetExplosionSoundSet(), GetGame(), GetPosition, ParticleList::GRENADE_CHEM_BREAK, m_ExplosionSound, m_ParticleExploded, and ParticleManager().

◆ OnExplode()

void Grenade_ChemGas::OnExplode ( )
inlineprotected

Definition at line 19 of file Grenade_ChemGas.c.

20 {
21 m_Exploded = true;
22
23 if (GetGame().IsServer())
24 GetGame().CreateObject("ContaminatedArea_Local", GetPosition());
25 }

References GetGame(), GetPosition, and m_Exploded.

Member Data Documentation

◆ m_Exploded

bool Grenade_ChemGas::m_Exploded
protected

Definition at line 3 of file Grenade_ChemGas.c.

Referenced by EOnContact(), and OnExplode().

◆ m_ExplosionSound

EffectSound Grenade_ChemGas::m_ExplosionSound
protected

Definition at line 5 of file Grenade_ChemGas.c.

Referenced by OnDamageDestroyed().

◆ m_ParticleExploded

ParticleSource Grenade_ChemGas::m_ParticleExploded
protected

Definition at line 4 of file Grenade_ChemGas.c.

Referenced by OnDamageDestroyed().


The documentation for this class was generated from the following file: