Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
contaminatedarea_local.c
Go to the documentation of this file.
2 {
3  const float TICK_RATE = 1;
4  ref Timer m_Timer1 = new Timer;
5  float m_Lifetime = 360;
6  // ----------------------------------------------
7  // INITIAL SETUP
8  // ----------------------------------------------
9 
11  {
12  m_EffectsPriority = -10;
13  }
14 
15  override void SetupZoneData( EffectAreaParams params )
16  {
17  params.m_ParamPartId = ParticleList.CONTAMINATED_AREA_GAS_AROUND;
18  params.m_ParamInnerRings = 0;
19  params.m_ParamPosHeight = 3;
20  params.m_ParamNegHeight = 5;
21  params.m_ParamRadius = 10;
22  params.m_ParamOuterToggle = false;
23  params.m_ParamTriggerType = "ContaminatedTrigger_Local";
24 
25  params.m_ParamAroundPartId = 0;
26  params.m_ParamTinyPartId = 0;
27 
28  super.SetupZoneData( params );
29  }
30 
31  override void EEInit()
32  {
33  if (GetGame().IsServer() || !GetGame().IsMultiplayer())
34  {
35  SetupZoneData(new EffectAreaParams);
36  m_Timer1.Run(TICK_RATE, this, "Tick", NULL, true);
37  }
38  }
39 
40  override void SpawnItems()
41  {
42  // override base funcionality as we don't want any items spawned here
43  }
44 
45  override float GetStartDecayLifetime()
46  {
47  return 20;
48  }
49 
50  override float GetFinishDecayLifetime()
51  {
52  return 10;
53  }
54 
55  override float GetRemainingTime()
56  {
57  return m_Lifetime;
58  }
59 
60  override void Tick()
61  {
62  m_Lifetime -= TICK_RATE;
63  if (m_Lifetime <= 0)
64  {
65  Delete();
66  }
67  }
68 
69 
70 }
GetGame
proto native CGame GetGame()
m_Lifetime
class MuzzleFlashLight extends PointLightBase m_Lifetime
ParticleList
Definition: particlelist.c:11
ContaminatedArea_Dynamic
Definition: contaminatedarea_dynamic.c:31
Timer
Definition: dayzplayerimplement.c:62
ContaminatedArea_Local
Definition: contaminatedarea_local.c:1