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

Go to the source code of this file.

Classes

class  EffectTrigger
 
class  ContaminatedTrigger_Local
 

Functions

void ContaminatedTrigger_Dynamic ()
 
void SetAreaState (int state)
 
void OnStayClientEvent (TriggerInsider insider, float deltaTime)
 
override void OnVariablesSynchronized ()
 

Variables

class ContaminatedTrigger extends EffectTrigger m_AreaState
 

Function Documentation

◆ ContaminatedTrigger_Dynamic()

void ContaminatedTrigger_Dynamic ( )

Definition at line 91 of file ContaminatedTrigger.c.

92 {
93 RegisterNetSyncVariableInt("m_AreaState");
94
95 // Register in the trigger effect manager
97 m_Manager.RegisterTriggerType(this);
98 }
ModifiersManager m_Manager
static TriggerEffectManager GetInstance()

References TriggerEffectManager::GetInstance(), and m_Manager.

Referenced by ContaminatedArea_Dynamic::CreateTrigger(), and ContaminatedArea_Dynamic::SetDecayState().

◆ OnStayClientEvent()

void OnStayClientEvent ( TriggerInsider insider,
float deltaTime )
protected

Definition at line 107 of file ContaminatedTrigger.c.

108 {
109 //no super, overriding parent behaviour
110 if (insider.GetObject().IsMan())
111 {
113
114 // We will only handle the controlled player, as effects are only relevant to this player instance
115 if (playerInsider.IsControlledPlayer())
116 {
117 // We check if we are not in the standard LIVE state
119 if (nonDefaultState)
120 {
121 // if not we check the specific state and update local effect values
123 if (m_AreaState == eAreaDecayStage.DECAY_START)
125 else
127
128 playerInsider.RequestTriggerEffect(this, m_PPERequester, m_AroundPartId, m_TinyPartId, GetAmbientSoundsetName(), nonDefaultState, localPartBirthRate);
129 }
130 else
131 playerInsider.RequestTriggerEffect(this, m_PPERequester, m_AroundPartId, m_TinyPartId, GetAmbientSoundsetName());
132 }
133 }
134 }
PPERequester_PainBlur m_PPERequester
class ContaminatedTrigger extends EffectTrigger m_AreaState
Object GetObject()
Definition Trigger.c:28

References TriggerInsider::GetObject(), m_AreaState, and m_PPERequester.

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )
protected

Definition at line 137 of file ContaminatedTrigger.c.

138 {
139 super.OnVariablesSynchronized();
140
141 // Is the controlled player inside when trigger is synchronized
142 for (int i = 0; i < GetInsiders().Count(); i++)
143 {
144 PlayerBase playerInsider = PlayerBase.Cast(m_insiders.Get(i).GetObject());
145 if (playerInsider)
146 {
147 if (playerInsider.IsControlledPlayer())
148 {
149 // Update Local particle effects
151 if (nonDefaultState)
152 {
154 if (m_AreaState == eAreaDecayStage.DECAY_START)
156 else
158
159 //Update the local effects
160 playerInsider.RequestTriggerEffect(this, m_PPERequester, m_AroundPartId, m_TinyPartId, GetAmbientSoundsetName(), nonDefaultState, localPartBirthRate, true);
161 }
162 return;
163 }
164 }
165 }
166 }

References m_AreaState, and m_PPERequester.

◆ SetAreaState()

void SetAreaState ( int state)

Definition at line 100 of file ContaminatedTrigger.c.

101 {
103 SetSynchDirty();
104 }

References m_AreaState.

Variable Documentation

◆ m_AreaState

class ContaminatedTrigger extends EffectTrigger m_AreaState