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

Go to the source code of this file.

Classes

class  ExplosionLight
 
class  FireworksLauncherClientEvent
 
class  FireworksLauncher
 

Functions

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

Variables

FireworksLauncherClientEvent m_ShotPos
 

Function Documentation

◆ ExplosionLight()

void OnFired::ExplosionLight ( )

Definition at line 0 of file FireworksLauncher.c.

1{
2 void ExplosionLight()
3 {
4 SetVisibleDuringDaylight(true);
5 SetRadiusTo(60);
6 SetBrightnessTo(0.05);
7 SetFlareVisible(false);
8 SetAmbientColor(1.0, 1.0, 1.0);
9 SetDiffuseColor(1.0, 1.0, 1.0);
10 SetLifetime(2.1);
11 //SetDisableShadowsWithinRadius(-1);
12 SetFadeOutTime(1);
13 m_FadeInTime = 0.25;
14 SetFlickerSpeed(7);
15 //SetFlickerAmplitude(0.5);
16 SetFlickerAmplitudeMax(3);
void ExplosionLight()

◆ GetExplosionDistance()

float GetExplosionDistance ( )
protected

Definition at line 298 of file FireworksLauncher.c.

299 {
300 return Math.RandomFloatInclusive(10, 15);
301 }
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().

Referenced by GetExplosionPosition().

◆ GetExplosionPosition()

vector GetExplosionPosition ( )
protected

Definition at line 280 of file FireworksLauncher.c.

281 {
282 return GetShotPos() + m_ShotDir * GetExplosionDistance();
283 }
float GetExplosionDistance()
vector GetShotPos()

References GetExplosionDistance(), and GetShotPos().

Referenced by OnExplode().

◆ GetShotPos()

vector GetShotPos ( )
protected

Definition at line 293 of file FireworksLauncher.c.

294 {
295 return m_ShotPos;
296 }
FireworksLauncherClientEvent m_ShotPos

References m_ShotPos.

Referenced by GetExplosionPosition().

◆ Init()

void Init ( vector pos)
protected

Definition at line 285 of file FireworksLauncher.c.

286 {
287 m_ShotPos = pos;
288 m_ShotDir[0] = Math.RandomFloatInclusive(-1, 1);
289 m_ShotDir[1] = Math.RandomFloatInclusive(-1, 1);
290 m_ShotDir[2] = Math.RandomFloatInclusive(-1, 1);
291 m_ShotDir.Normalize();
292 }

References m_ShotPos, and Math::RandomFloatInclusive().

◆ OnExplode()

override void OnExplode ( )
protected

Definition at line 303 of file FireworksLauncher.c.

304 {
305 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(PlayExplosionSound, GetSoundDelay(), false);
306 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(SpawnLight, GetLightDelay(), false);
307 m_ParticleExplosion = ParticleManager.GetInstance().PlayInWorld(GetExplParticleFromSequence(), GetExplosionPosition());
308 }
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().

◆ OnFired()

Variable Documentation

◆ m_ShotPos

Referenced by GetShotPos(), and Init().