Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
contaminatedarea.c
Go to the documentation of this file.
2 {
3  override void OnPlayerEnterServer(PlayerBase player, EffectTrigger trigger)
4  {
5  super.OnPlayerEnterServer(player, trigger);
6  player.IncreaseContaminatedAreaCount();
7  }
8 
9  override void OnPlayerExitServer(PlayerBase player, EffectTrigger trigger)
10  {
11  super.OnPlayerExitServer(player, trigger);
12  player.DecreaseContaminatedAreaCount();
13  }
14 }
15 
16 class ContaminatedArea_Static : ContaminatedArea_Base
17 {
18  // ----------------------------------------------
19  // INITIAL SETUP
20  // ----------------------------------------------
21 
22  override void SetupZoneData( EffectAreaParams params )
23  {
24  super.SetupZoneData( params );
25  }
26 
27  override void EEInit()
28  {
29  // We make sure we have the particle array
30  if ( !m_ToxicClouds )
31  m_ToxicClouds = new array<Particle>;
32 
33  SetSynchDirty();
34 
35  #ifdef DEVELOPER
36  // Debugs when placing entity by hand using internal tools
37  if ( GetGame().IsServer() && !GetGame().IsMultiplayer() )
38  {
39  Debug.Log("YOU CAN IGNORE THE FOLLOWING DUMP");
40  InitZone();
41  Debug.Log("YOU CAN USE FOLLOWING DATA PROPERLY");
42  }
43  #endif
44 
45  if ( GetGame().IsClient() && GetGame().IsMultiplayer() )
46  InitZone();
47 
48  super.EEInit();
49  }
50 
51 
52  override void InitZoneServer()
53  {
54  super.InitZoneServer();
55 
56  // We create the trigger on server
57  if ( m_TriggerType != "" )
59  }
60 
61  override void InitZoneClient()
62  {
63  super.InitZoneClient();
64 
65  // We spawn VFX on client
66  PlaceParticles( GetWorldPosition(), m_Radius, m_InnerRings, m_InnerSpacing, m_OuterRingToggle, m_OuterSpacing, m_OuterRingOffset, m_ParticleID );
67  }
68 
69  override void EEDelete( EntityAI parent )
70  {
71  super.EEDelete( parent );
72  }
73 }
GetGame
proto native CGame GetGame()
m_Position
protected vector m_Position
Cached world position.
Definition: effect.c:41
SetupZoneData
ContaminatedArea_Base EffectArea SetupZoneData(EffectAreaParams params)
Definition: contaminatedarea.c:22
m_Radius
float m_Radius
Definition: aigroupbehaviour.c:10
EEDelete
override void EEDelete(EntityAI parent)
Definition: contaminatedarea.c:69
EffectArea
Definition: effectarea.c:36
PlayerBase
Definition: playerbaseclient.c:1
InitZoneServer
override void InitZoneServer()
Definition: contaminatedarea.c:52
CreateTrigger
override void CreateTrigger()
Definition: trap_tripwire.c:70
array< Particle >
ContaminatedArea_Base
Definition: contaminatedarea.c:1
Debug
Definition: debug.c:13
EEInit
override void EEInit()
Definition: contaminatedarea.c:27
EffectTrigger
Definition: contaminatedtrigger.c:2
InitZoneClient
override void InitZoneClient()
Definition: contaminatedarea.c:61
EntityAI
Definition: building.c:5