Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл SmokeGrenadeBase.c

См. исходные тексты.

Перечисления

enum  ESmokeGrenadeState { NO_SMOKE , LOOP = 2 , END = 3 , COUNT = 4 }
 

Функции

void SetParticleSmokeCurrent (int particle)
 
void SetParticleSmokeStart (int particle)
 
void SetParticleSmokeLoop (int particle)
 
void SetParticleSmokeEnd (int particle)
 
void SetSoundSmokeStart (string sound)
 
void SetSoundSmokeLoop (string sound)
 
void SetSoundSmokeEnd (string sound)
 
void PlaySmokeParticle ()
 
void SoundSmokeStart ()
 
void SoundSmokeLoop ()
 
void SoundSmokeEnd ()
 
void SoundSmokeStop ()
 
void DestroySmokeGrenade ()
 
void RefreshParticlesAndSounds ()
 
override void Unpin ()
 
override void OnActivateFinished ()
 
override void OnWorkStart ()
 
override void OnWork (float consumed_energy)
 
override void OnWorkStop ()
 
override bool CanPutInCargo (EntityAI parent)
 
override void OnActivatedByItem (notnull ItemBase item)
 Called when this item is activated by other.
 
override void SetActions ()
 
override void OnVariablesSynchronized ()
 
override void OnExplosionEffects (Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
 
ESmokeGrenadeState GetSmokeGrenadeState ()
 
override void EEDelete (EntityAI parent)
 
void SetSmokeGrenadeState (ESmokeGrenadeState state)
 
void SmokeGrenadeBase ()
 
void ~SmokeGrenadeBase ()
 

Переменные

enum ESmokeGrenadeState m_TimerSmokeStart
 
ref Timer m_TimerSmokeLoop
 
ref Timer m_TimerSmokeEnd
 
ref Timer m_TimerDefer
 
ESmokeGrenadeState m_SmokeGrenadeState
 
ESmokeGrenadeState m_LastSmokeGrenadeState
 
Particle m_ParticleSmoke
 particle
 
int m_ParticleSmokeCurrentId
 
int m_ParticleSmokeStartId
 
int m_ParticleSmokeLoopId
 
int m_ParticleSmokeEndId
 
vector m_ParticleSmokePosition
 
EffectSound m_SoundSmoke
 sounds
 
string m_SoundSmokeStartId
 
string m_SoundSmokeLoopId
 
string m_SoundSmokeEndId
 
ref NoiseParams m_NoisePar
 Noise.
 

Перечисления

◆ ESmokeGrenadeState

Элементы перечислений
NO_SMOKE 
LOOP 
END 
COUNT 
2{
3 NO_SMOKE = 0
4 START = 1,
5 LOOP = 2,
6 END = 3,
8 COUNT = 4
9}
@ START
Definition ContaminatedArea_Dynamic.c:4
@ COUNT
Definition SmokeGrenadeBase.c:8
@ NO_SMOKE
Definition SmokeGrenadeBase.c:3
@ LOOP
Definition SmokeGrenadeBase.c:5
@ END
Definition SmokeGrenadeBase.c:6

Функции

◆ CanPutInCargo()

override bool CanPutInCargo ( EntityAI parent)
protected
217 {
218 return !GetCompEM().IsWorking();
219 }

◆ DestroySmokeGrenade()

void DestroySmokeGrenade ( )
protected
101 {
103
104 if ( GetGame().IsServer() )
105 {
106 SetHealth("", "", 0);
107 }
108 }
void SetSmokeGrenadeState(ESmokeGrenadeState state)
Definition SmokeGrenadeBase.c:255
ESmokeGrenadeState
Definition SmokeGrenadeBase.c:2
proto native CGame GetGame()

Перекрестные ссылки GetGame() и SetSmokeGrenadeState().

◆ EEDelete()

override void EEDelete ( EntityAI parent)
protected
248 {
249 super.EEDelete(parent);
250
253 }
void DestroyParticle(Particle p)
Definition ExplosivesBase.c:150
void SoundSmokeStop()
Definition SmokeGrenadeBase.c:95
Particle m_ParticleSmoke
particle
Definition SmokeGrenadeBase.c:23
Definition EntityAI.c:95

Перекрестные ссылки DestroyParticle(), m_ParticleSmoke и SoundSmokeStop().

◆ GetSmokeGrenadeState()

ESmokeGrenadeState GetSmokeGrenadeState ( )
protected
243 {
244 return m_SmokeGrenadeState;
245 }
ESmokeGrenadeState m_SmokeGrenadeState
Definition SmokeGrenadeBase.c:19

Перекрестные ссылки m_SmokeGrenadeState.

Используется в RefreshParticlesAndSounds().

◆ OnActivatedByItem()

override void OnActivatedByItem ( notnull ItemBase item)
protected

Called when this item is activated by other.

222 {
223 GetCompEM().SwitchOn();
224 }

◆ OnActivateFinished()

override void OnActivateFinished ( )
protected
167 {
168 if ( GetCompEM() && GetCompEM().CanWork() )
169 {
170 GetCompEM().SwitchOn();
171 }
172 }

◆ OnExplosionEffects()

override void OnExplosionEffects ( Object source,
Object directHit,
int componentIndex,
string surface,
vector pos,
vector surfNormal,
float energyFactor,
float explosionFactor,
bool isWater,
string ammoType )
protected
240{}

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )
protected
234 {
235 super.OnVariablesSynchronized();
236
238 }
void RefreshParticlesAndSounds()
Definition SmokeGrenadeBase.c:110

Перекрестные ссылки RefreshParticlesAndSounds().

◆ OnWork()

override void OnWork ( float consumed_energy)
protected
196 {
197 if ( GetGame().IsServer() )
198 {
199 NoiseSystem noise = GetGame().GetNoiseSystem();
200 if ( noise )
201 {
202 noise.AddNoisePos( this, GetPosition(), m_NoisePar);
203 }
204 }
205 }
ref NoiseParams m_NoisePar
Noise.
Definition SmokeGrenadeBase.c:37
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
Definition Noise.c:2

Перекрестные ссылки GetGame(), GetPosition и m_NoisePar.

◆ OnWorkStart()

override void OnWorkStart ( )
protected
176 {
178
179 if ( GetGame().IsServer() )
180 {
181 m_NoisePar = new NoiseParams();
182 m_NoisePar.LoadFromPath("cfgVehicles " + GetType() + " NoiseSmokeGrenade");
183 NoiseSystem noise = GetGame().GetNoiseSystem();
184 if ( noise )
185 {
186 noise.AddNoisePos( this, GetPosition(), m_NoisePar );
187 }
188 }
189
191 m_TimerSmokeLoop.Run(5.0, this, "SetSmokeGrenadeState", par);
192 }
eBleedingSourceType GetType()
Definition BleedingSource.c:63
class NoiseSystem NoiseParams()
Definition Noise.c:15
ref Timer m_TimerSmokeLoop
Definition SmokeGrenadeBase.c:14

Перекрестные ссылки GetGame(), GetPosition, GetType(), m_NoisePar, m_TimerSmokeLoop, NoiseParams() и SetSmokeGrenadeState().

◆ OnWorkStop()

override void OnWorkStop ( )
protected

defer timer

209 {
211
213 m_TimerDefer.Run(5.0, this, "DestroySmokeGrenade");
214 }
ref Timer m_TimerDefer
Definition SmokeGrenadeBase.c:17

Перекрестные ссылки m_TimerDefer и SetSmokeGrenadeState().

◆ PlaySmokeParticle()

void PlaySmokeParticle ( )
protected
75 {
77 }
vector m_ParticlePosition
Definition ExplosivesBase.c:37
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition ParticleManager.c:84
int m_ParticleSmokeCurrentId
Definition SmokeGrenadeBase.c:24
Definition EnConvert.c:106
static const vector Zero
Definition EnConvert.c:110

Перекрестные ссылки m_ParticlePosition, m_ParticleSmoke, m_ParticleSmokeCurrentId, ParticleManager() и vector::Zero.

Используется в RefreshParticlesAndSounds().

◆ RefreshParticlesAndSounds()

void RefreshParticlesAndSounds ( )
protected
111 {
113
115 {
116 if ( state == ESmokeGrenadeState.START )
117 {
118 //Print("RefreshAudioVisual:: START");
121
125 }
126 else if ( state == ESmokeGrenadeState.LOOP )
127 {
128 //Print("RefreshAudioVisual:: LOOP");
131
135 }
136 else if ( state == ESmokeGrenadeState.END )
137 {
138 //Print("RefreshAudioVisual:: END");
141
145 }
146 else if ( state == ESmokeGrenadeState.NO_SMOKE )
147 {
148 //Print("RefreshAudioVisual:: NO_SMOKE");
150
152 }
153
155 }
156 }
void SoundSmokeLoop()
Definition SmokeGrenadeBase.c:84
int m_ParticleSmokeStartId
Definition SmokeGrenadeBase.c:25
ESmokeGrenadeState m_LastSmokeGrenadeState
Definition SmokeGrenadeBase.c:20
int m_ParticleSmokeEndId
Definition SmokeGrenadeBase.c:27
void SoundSmokeStart()
Definition SmokeGrenadeBase.c:79
void PlaySmokeParticle()
Definition SmokeGrenadeBase.c:74
ESmokeGrenadeState GetSmokeGrenadeState()
Definition SmokeGrenadeBase.c:242
int m_ParticleSmokeLoopId
Definition SmokeGrenadeBase.c:26
void SoundSmokeEnd()
Definition SmokeGrenadeBase.c:89
void SetParticleSmokeCurrent(int particle)
Definition SmokeGrenadeBase.c:39

Перекрестные ссылки DestroyParticle(), GetSmokeGrenadeState(), m_LastSmokeGrenadeState, m_ParticleSmoke, m_ParticleSmokeEndId, m_ParticleSmokeLoopId, m_ParticleSmokeStartId, PlaySmokeParticle(), SetParticleSmokeCurrent(), SoundSmokeEnd(), SoundSmokeLoop(), SoundSmokeStart() и SoundSmokeStop().

Используется в OnVariablesSynchronized().

◆ SetActions()

override void SetActions ( )
protected
227 {
228 super.SetActions();
229
230 RemoveAction(ActionPin);
231 }
void RemoveAction(typename actionName)
Definition AdvancedCommunication.c:252

Перекрестные ссылки RemoveAction().

◆ SetParticleSmokeCurrent()

void SetParticleSmokeCurrent ( int particle)
protected

Перекрестные ссылки m_ParticleSmokeCurrentId.

Используется в RefreshParticlesAndSounds().

◆ SetParticleSmokeEnd()

◆ SetParticleSmokeLoop()

◆ SetParticleSmokeStart()

◆ SetSmokeGrenadeState()

void SetSmokeGrenadeState ( ESmokeGrenadeState state)
protected
256 {
257 //Print("Setting SGS to: " + typename.EnumToString(ESmokeGrenadeState, state));
258
259 if ( GetGame().IsServer() )
260 {
261 if ( m_SmokeGrenadeState != state )
262 {
264
265 //synchronize
266 SetSynchDirty();
267 }
268 }
269 }

Перекрестные ссылки GetGame() и m_SmokeGrenadeState.

Используется в DestroySmokeGrenade(), OnWorkStart() и OnWorkStop().

◆ SetSoundSmokeEnd()

void SetSoundSmokeEnd ( string sound)
protected
70 {
72 }
string m_SoundSmokeEndId
Definition SmokeGrenadeBase.c:34

Перекрестные ссылки m_SoundSmokeEndId.

Используется в SmokeGrenadeBase::M18SmokeGrenade_ColorBase() и SmokeGrenadeBase::RDG2SmokeGrenade_ColorBase().

◆ SetSoundSmokeLoop()

void SetSoundSmokeLoop ( string sound)
protected
65 {
67 }
string m_SoundSmokeLoopId
Definition SmokeGrenadeBase.c:33

Перекрестные ссылки m_SoundSmokeLoopId.

Используется в SmokeGrenadeBase::M18SmokeGrenade_ColorBase() и SmokeGrenadeBase::RDG2SmokeGrenade_ColorBase().

◆ SetSoundSmokeStart()

void SetSoundSmokeStart ( string sound)
protected
60 {
62 }
string m_SoundSmokeStartId
Definition SmokeGrenadeBase.c:32

Перекрестные ссылки m_SoundSmokeStartId.

Используется в SmokeGrenadeBase::M18SmokeGrenade_ColorBase() и SmokeGrenadeBase::RDG2SmokeGrenade_ColorBase().

◆ SmokeGrenadeBase()

void SmokeGrenadeBase ( )
protected

no effect on base

no effect on base

no effect on base

272 {
274
276 m_TimerDefer = new Timer;
277
278 SetAmmoType("");
279 SetPinnable(false);
280 SetGrenadeType(EGrenadeType.CHEMICAL);
284
285 RegisterNetSyncVariableInt("m_SmokeGrenadeState", ESmokeGrenadeState.NO_SMOKE, ESmokeGrenadeState.COUNT);
286 }
void SetAmmoType(string pAmmoType)
Definition ExplosivesBase.c:283
EGrenadeType
Definition Grenade_Base.c:2
void SetParticleSmokeLoop(int particle)
Definition SmokeGrenadeBase.c:49
void SetParticleSmokeEnd(int particle)
Definition SmokeGrenadeBase.c:54
void SetParticleSmokeStart(int particle)
Definition SmokeGrenadeBase.c:44
Definition ParticleList.c:12
static const int INVALID
Definition ParticleList.c:20
Definition DayZPlayerImplement.c:63

Перекрестные ссылки ParticleList::INVALID, m_SmokeGrenadeState, m_TimerDefer, m_TimerSmokeLoop, SetAmmoType(), SetParticleSmokeEnd(), SetParticleSmokeLoop() и SetParticleSmokeStart().

◆ SoundSmokeEnd()

void SoundSmokeEnd ( )
protected
90 {
91 PlaySoundSetLoop(m_SoundSmoke, m_SoundSmokeEndId, 1.0, 1.0);
92 }
EffectSound m_SoundSmoke
sounds
Definition SmokeGrenadeBase.c:31

Перекрестные ссылки m_SoundSmoke и m_SoundSmokeEndId.

Используется в RefreshParticlesAndSounds().

◆ SoundSmokeLoop()

void SoundSmokeLoop ( )
protected
85 {
86 PlaySoundSetLoop(m_SoundSmoke, m_SoundSmokeLoopId, 0.3, 1.0);
87 }

Перекрестные ссылки m_SoundSmoke и m_SoundSmokeLoopId.

Используется в RefreshParticlesAndSounds().

◆ SoundSmokeStart()

void SoundSmokeStart ( )
protected
80 {
81 PlaySoundSetLoop(m_SoundSmoke, m_SoundSmokeStartId, 0.3, 1.0);
82 }

Перекрестные ссылки m_SoundSmoke и m_SoundSmokeStartId.

Используется в RefreshParticlesAndSounds().

◆ SoundSmokeStop()

void SoundSmokeStop ( )
protected
96 {
97 StopSoundSet(m_SoundSmoke);
98 }

Перекрестные ссылки m_SoundSmoke.

Используется в EEDelete() и RefreshParticlesAndSounds().

◆ Unpin()

override void Unpin ( )
protected
159 {
160 super.Unpin();
161
162 Activate();
163
164 }
void Activate()
Definition ModifierBase.c:201

Перекрестные ссылки Activate().

◆ ~SmokeGrenadeBase()

void ~SmokeGrenadeBase ( )
protected

Переменные

◆ m_LastSmokeGrenadeState

ESmokeGrenadeState m_LastSmokeGrenadeState
protected

Используется в RefreshParticlesAndSounds().

◆ m_NoisePar

ref NoiseParams m_NoisePar
protected

Noise.

◆ m_ParticleSmoke

Particle m_ParticleSmoke
protected

◆ m_ParticleSmokeCurrentId

int m_ParticleSmokeCurrentId
protected

Используется в PlaySmokeParticle() и SetParticleSmokeCurrent().

◆ m_ParticleSmokeEndId

int m_ParticleSmokeEndId
protected

Используется в RefreshParticlesAndSounds() и SetParticleSmokeEnd().

◆ m_ParticleSmokeLoopId

int m_ParticleSmokeLoopId
protected

Используется в RefreshParticlesAndSounds() и SetParticleSmokeLoop().

◆ m_ParticleSmokePosition

vector m_ParticleSmokePosition
protected

◆ m_ParticleSmokeStartId

int m_ParticleSmokeStartId
protected

Используется в RefreshParticlesAndSounds() и SetParticleSmokeStart().

◆ m_SmokeGrenadeState

ESmokeGrenadeState m_SmokeGrenadeState
protected

◆ m_SoundSmoke

EffectSound m_SoundSmoke
protected

sounds

Используется в SoundSmokeEnd(), SoundSmokeLoop(), SoundSmokeStart() и SoundSmokeStop().

◆ m_SoundSmokeEndId

string m_SoundSmokeEndId
protected

Используется в SetSoundSmokeEnd() и SoundSmokeEnd().

◆ m_SoundSmokeLoopId

string m_SoundSmokeLoopId
protected

Используется в SetSoundSmokeLoop() и SoundSmokeLoop().

◆ m_SoundSmokeStartId

string m_SoundSmokeStartId
protected

Используется в SetSoundSmokeStart() и SoundSmokeStart().

◆ m_TimerDefer

ref Timer m_TimerDefer
protected

Используется в OnWorkStop() и SmokeGrenadeBase().

◆ m_TimerSmokeEnd

ref Timer m_TimerSmokeEnd
protected

◆ m_TimerSmokeLoop

ref Timer m_TimerSmokeLoop
protected

Используется в OnWorkStart() и SmokeGrenadeBase().

◆ m_TimerSmokeStart

enum ESmokeGrenadeState m_TimerSmokeStart