DayZ 1.24
Loading...
Searching...
No Matches
FireworksLauncherAnniversary.c File Reference

Go to the source code of this file.

Classes

class  AnniversaryFireworksLauncherClientEvent
 
class  Anniversary_FireworksLauncher
 

Functions

vector GetExplosionPosition ()
 
void Init (vector pos)
 
vector GetShotPos ()
 
float GetExplosionDistance ()
 
override void OnExplode ()
 

Variables

AnniversaryFireworksLauncherClientEvent m_ShotPos
 

Function Documentation

◆ GetExplosionDistance()

float GetExplosionDistance ( )
protected

Definition at line 85 of file FireworksLauncherAnniversary.c.

86 {
87 return Math.RandomFloatInclusive(10, 15);
88 }
Definition EnMath.c:7
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106

References Math::RandomFloatInclusive().

◆ GetExplosionPosition()

vector GetExplosionPosition ( )
protected

Definition at line 67 of file FireworksLauncherAnniversary.c.

68 {
69 return GetShotPos() + m_ShotDir * GetExplosionDistance();
70 }
float GetExplosionDistance()
vector GetShotPos()

References GetExplosionDistance(), and GetShotPos().

◆ GetShotPos()

vector GetShotPos ( )
protected

Definition at line 80 of file FireworksLauncherAnniversary.c.

81 {
82 return m_ShotPos;
83 }
AnniversaryFireworksLauncherClientEvent m_ShotPos

References m_ShotPos.

◆ Init()

void Init ( vector pos)
protected

Definition at line 72 of file FireworksLauncherAnniversary.c.

73 {
74 m_ShotPos = pos;
75 m_ShotDir[0] = Math.RandomFloatInclusive(-1, 1);
76 m_ShotDir[1] = Math.RandomFloatInclusive(-1, 1);
77 m_ShotDir[2] = Math.RandomFloatInclusive(-1, 1);
78 m_ShotDir.Normalize();
79 }

References m_ShotPos, and Math::RandomFloatInclusive().

◆ OnExplode()

override void OnExplode ( )
protected

Definition at line 90 of file FireworksLauncherAnniversary.c.

91 {
92 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(PlayExplosionSound, GetSoundDelay(), false);
93 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(SpawnLight, GetLightDelay(), false);
94 m_ParticleExplosion = ParticleManager.GetInstance().PlayInWorld(GetExplParticleFromSequence(), GetExplosionPosition());
95 }
Particle m_ParticleExplosion
particle
vector GetExplosionPosition()
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
proto native CGame GetGame()
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

References CALL_CATEGORY_SYSTEM, GetExplosionPosition(), GetGame(), m_ParticleExplosion, and ParticleManager().

Variable Documentation

◆ m_ShotPos