Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
AmmoEffects Class Reference

Static data holder for certain ammo config values. More...

Static Private Member Functions

Ammo particles

Methods regarding getting/playing ammo particle

static int GetAmmoParticleID (string ammoType)
 Get the ParticleList ID for the particle for this ammoType.
static bool PlayAmmoParticle (string ammoType, vector pos)
 Attempt to play the ammo particle at pos if found, returns true on success.
Ammo effects

Methods regarding getting/playing ammo effect

static GetAmmoEffectTypename (string ammoType)
 Get the typename for the effect for this ammoType.
static bool PlayAmmoEffect (string ammoType, vector pos)
 Attempt to play the ammo effect at pos if found, returns true on success.
Lifetime

Creation and cleanup

static void Init ()
 Initialize the containers: this is done this way, to have these not exist on server.
static void Cleanup ()
 Clean up the data.

Static Private Attributes

static ref map< string, typenamem_AmmoEffects
 Key: Ammo class name; Data: ParticleList ID.
static ref map< string, intm_AmmoParticles
 Key: Ammo class name; Data: ParticleList ID.

Detailed Description

Static data holder for certain ammo config values.

Note
Kept the names similar to what is in config, but it might be a little deceiving as this is mainly used for explosives

Definition at line 5 of file ammoeffects.c.

Member Function Documentation

◆ Cleanup()

void Cleanup ( )
inlinestaticprivate

Clean up the data.

Definition at line 128 of file ammoeffects.c.

Referenced by CGame::~CGame().

◆ GetAmmoEffectTypename()

GetAmmoEffectTypename ( string ammoType)
inlinestaticprivate

Get the typename for the effect for this ammoType.

Definition at line 68 of file ammoeffects.c.

References g_Game, m_AmmoEffects, and string::ToType().

Referenced by PlayAmmoEffect().

◆ GetAmmoParticleID()

int GetAmmoParticleID ( string ammoType)
inlinestaticprivate

Get the ParticleList ID for the particle for this ammoType.

Definition at line 21 of file ammoeffects.c.

References g_Game, ParticleList::GetParticleIDByName(), and m_AmmoParticles.

Referenced by PlayAmmoParticle().

◆ Init()

void Init ( )
inlinestaticprivate

Initialize the containers: this is done this way, to have these not exist on server.

Definition at line 121 of file ammoeffects.c.

References m_AmmoEffects, and m_AmmoParticles.

Referenced by CGame::CGame().

◆ PlayAmmoEffect()

bool PlayAmmoEffect ( string ammoType,
vector pos )
inlinestaticprivate

Attempt to play the ammo effect at pos if found, returns true on success.

Definition at line 93 of file ammoeffects.c.

References Effect(), GetAmmoEffectTypename(), and SEffectManager::PlayInWorld().

Referenced by IEntity::OnExplodeClient().

◆ PlayAmmoParticle()

bool PlayAmmoParticle ( string ammoType,
vector pos )
inlinestaticprivate

Attempt to play the ammo particle at pos if found, returns true on success.

Definition at line 46 of file ammoeffects.c.

References GetAmmoParticleID(), ParticleList::IsValidId(), and ParticleManager().

Referenced by IEntity::OnExplodeClient().

Field Documentation

◆ m_AmmoEffects

ref map<string, typename> m_AmmoEffects
staticprivate

Key: Ammo class name; Data: ParticleList ID.

Definition at line 11 of file ammoeffects.c.

Referenced by GetAmmoEffectTypename(), and Init().

◆ m_AmmoParticles

ref map<string, int> m_AmmoParticles
staticprivate

Key: Ammo class name; Data: ParticleList ID.

Definition at line 8 of file ammoeffects.c.

Referenced by GetAmmoParticleID(), and Init().


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