DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл ExplosivesBase.c

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

Структуры данных

class  ExplosiveLight
 

Функции

void ExplosivesBase ()
 
override bool IsExplosive ()
 
override void OnExplosionEffects (Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
 
override void EEDelete (EntityAI parent)
 
override void EEKilled (Object killer)
 
override void OnCEUpdate ()
 
override void UnpairRemote ()
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
void CreateLight ()
 
void DestroyParticle (Particle p)
 
void InitiateExplosion ()
 
void OnExplode ()
 
override void SetActions ()
 
override bool IsInventoryVisible ()
 
override bool IsTakeable ()
 
bool IsTimerDetonable ()
 
void Arm ()
 
void OnArmed ()
 
bool CanBeArmed ()
 
void Disarm (bool pWithTool=false)
 
void OnBeforeDisarm ()
 
void OnDisarmed (bool pWithTool)
 
bool CanBeDisarmed ()
 
bool GetArmed ()
 
void SetArmed (bool state)
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanPutIntoHands (EntityAI parent)
 
override bool CanRemoveFromHands (EntityAI parent)
 
bool GetDefused ()
 
void SetDefused (bool state)
 
void SetAmmoType (string pAmmoType)
 
void SetAmmoTypes (array< string > pAmmoTypes)
 
void SetParticleExplosion (int particle)
 
void SetParticlePosition (vector local_pos)
 set position for smoke particle - needs to be in Local Space
 
void SetParticleOrientation (vector local_ori)
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
void UpdateLED (int pState)
 HELPERS.
 
bool HasLockedTriggerSlots ()
 
void LockTriggerSlots ()
 
void UnlockTriggerSlots ()
 
void LockExplosivesSlots ()
 
void UnlockExplosivesSlots ()
 

Переменные

ExplosiveLight DEFAULT_AMMO_TYPE = "Explosion_NonLethal"
 
const string ANIM_PHASE_VISIBILITY = "Visibility"
 
bool m_Armed
 
bool m_Defused
 
ref array< stringm_AmmoTypes
 
ref Timer m_DeleteTimer
 
ExplosiveLight m_Light
 light

 
Particle m_ParticleExplosion
 particle
 
ref array< ParticleSourcem_ParticleExplosionArr = {}
 
int m_ParticleExplosionId
 
vector m_ParticlePosition
 
vector m_ParticleOrientation
 

Функции

◆ Arm()

void Arm ( )
protected
208 {
209 SetArmed(true);
210
211 OnArmed();
212 }
void SetArmed(bool state)
Definition ExplosivesBase.c:241
void OnArmed()

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

Используется в Grenade_ChemGas::Grenade_ChemGas(), ClaymoreMine::OnDebugSpawn(), ClaymoreMine::OnPlacementComplete(), ImprovisedExplosive::OnTriggerAttached(), Plastic_Explosive::OnTriggerAttached(), SetAlarmInXMins() и TurnOn().

◆ CanBeArmed()

bool CanBeArmed ( )
protected
217 {
218 return true;
219 }

◆ CanBeDisarmed()

bool CanBeDisarmed ( )
protected
232 {
233 return false;
234 }

◆ CanPutInCargo()

override bool CanPutInCargo ( EntityAI parent)
protected
248 {
249 if (!super.CanPutInCargo(parent))
250 {
251 return false;
252 }
253
254 return IsTakeable();
255 }
override bool IsTakeable()
Definition ExplosivesBase.c:197
Definition EntityAI.c:95

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

◆ CanPutIntoHands()

override bool CanPutIntoHands ( EntityAI parent)
protected
258 {
259 if (!super.CanPutIntoHands(parent))
260 {
261 return false;
262 }
263
264 return IsTakeable();
265 }

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

◆ CanRemoveFromHands()

override bool CanRemoveFromHands ( EntityAI parent)
protected
268 {
269 return IsTakeable();
270 }

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

◆ CreateLight()

void CreateLight ( )
protected
146 {
148 }
ExplosiveLight m_Light
light
Definition ExplosivesBase.c:31
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
Definition ExplosivesBase.c:2
Definition PointLightBase.c:2

Перекрестные ссылки GetPosition и m_Light.

Используется в EntityLightSource::CreateLightAtObjMemoryPoint() и OnExplosionEffects().

◆ DestroyParticle()

void DestroyParticle ( Particle p)
protected
151 {
152 #ifndef SERVER
153 if (p != null)
154 {
155 p.Stop();
156 }
157 #endif
158 }

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

◆ Disarm()

void Disarm ( bool pWithTool = false)
protected
222 {
223 SetArmed(false);
224
226 }
void OnDisarmed(bool pWithTool)

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

◆ EEDelete()

override void EEDelete ( EntityAI parent)
protected
81 {
82 super.EEDelete(parent);
83
85 {
87 {
89 }
90 }
91 }
void DestroyParticle(Particle p)
Definition ExplosivesBase.c:150
Particle m_ParticleExplosion
particle
Definition ExplosivesBase.c:34
ref array< ParticleSource > m_ParticleExplosionArr
Definition ExplosivesBase.c:35
Entity which has the particle instance as an ObjectComponent.
Definition ParticleSource.c:124

Перекрестные ссылки DestroyParticle(), m_ParticleExplosion и m_ParticleExplosionArr.

◆ EEKilled()

override void EEKilled ( Object killer)
protected

should be called only here to avoid multiple explosion calculations, call SetHealth("","",0.0) instead

94 {
95 super.EEKilled(killer);
96
99
100 UnpairRemote();
101 }
void InitiateExplosion()
Definition ExplosivesBase.c:160
override void UnpairRemote()
Definition ExplosivesBase.c:120

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

◆ ExplosivesBase()

void ExplosivesBase ( )
protected

no effect

41 {
42 m_DeleteTimer = new Timer();
44
47 SetParticlePosition(WorldToModel(GetPosition()));
49
50 RegisterNetSyncVariableBool("m_Armed");
51 RegisterNetSyncVariableBool("m_Defused");
52 }
ExplosiveLight DEFAULT_AMMO_TYPE
ref array< string > m_AmmoTypes
Definition ExplosivesBase.c:26
ref Timer m_DeleteTimer
Definition ExplosivesBase.c:28
void SetParticleExplosion(int particle)
Definition ExplosivesBase.c:294
void SetParticlePosition(vector local_pos)
set position for smoke particle - needs to be in Local Space
Definition ExplosivesBase.c:300
void SetAmmoType(string pAmmoType)
Definition ExplosivesBase.c:283
void SetParticleOrientation(vector local_ori)
Definition ExplosivesBase.c:310
Definition ParticleList.c:12
static const int INVALID
Definition ParticleList.c:20
Definition DayZPlayerImplement.c:63
Definition EnConvert.c:106
static const vector Zero
Definition EnConvert.c:110

Перекрестные ссылки DEFAULT_AMMO_TYPE, GetPosition, ParticleList::INVALID, m_AmmoTypes, m_DeleteTimer, SetAmmoType(), SetParticleExplosion(), SetParticleOrientation(), SetParticlePosition() и vector::Zero.

◆ GetArmed()

◆ GetDefused()

bool GetDefused ( )
protected
273 {
274 return m_Defused;
275 }
bool m_Defused
Definition ExplosivesBase.c:25

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

Используется в ClaymoreMine::InitiateExplosion() и ClaymoreMine::UpdateVisuals().

◆ HasLockedTriggerSlots()

bool HasLockedTriggerSlots ( )
protected
349 {
350 return false;
351 }

◆ InitiateExplosion()

void InitiateExplosion ( )
protected
161 {
162 int count = m_AmmoTypes.Count();
163 for (int i = 0; i < count; i++)
164 {
165 Explode(DamageType.EXPLOSION, m_AmmoTypes[i]);
166 }
167
168 OnExplode();
169 }
DamageType
exposed from C++ (do not change)
Definition DamageSystem.c:11
void OnExplode()
Definition ExplosivesBase.c:171
override void Explode(int damageType, string ammoType="")
Definition Trap_LandMine.c:220

Перекрестные ссылки Explode(), m_AmmoTypes и OnExplode().

Используется в EEKilled() и Plastic_Explosive::OnActivatedByItem().

◆ IsExplosive()

override bool IsExplosive ( )
protected
56 {
57 return true;
58 }

◆ IsInventoryVisible()

override bool IsInventoryVisible ( )
protected
188 {
189 if (!super.IsInventoryVisible())
190 {
191 return false;
192 }
193
194 return GetAnimationPhase("Visibility") == 0;
195 }

◆ IsTakeable()

override bool IsTakeable ( )
protected
198 {
199 return super.IsTakeable() && GetAnimationPhase("Visibility") == 0;
200 }

Используется в CanPutInCargo(), CanPutIntoHands() и CanRemoveFromHands().

◆ IsTimerDetonable()

bool IsTimerDetonable ( )
protected
203 {
204 return false;
205 }

◆ LockExplosivesSlots()

void LockExplosivesSlots ( )
protected

◆ LockTriggerSlots()

void LockTriggerSlots ( )
protected

◆ OnArmed()

void OnArmed ( )
protected

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

◆ OnBeforeDisarm()

void OnBeforeDisarm ( )
protected

◆ OnCEUpdate()

override void OnCEUpdate ( )
protected
104 {
105 super.OnCEUpdate();
106
107 if (!IsRuined() && GetArmed() && GetPairDevice())
108 {
110 {
112
113 return;
114 }
115 }
116
118 }
void UpdateLED(int pState)
HELPERS.
bool GetArmed()
Definition ExplosivesBase.c:236
ERemoteDetonatorLEDState
Definition RemoteDetonator.c:2
Definition EnMath.c:7
Definition ActionConstants.c:106
const float EXPLOSIVE_REMOTE_ACTIVATION
Definition ActionConstants.c:114
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
static proto float SqrFloat(float f)
Returns squared value.

Перекрестные ссылки vector::DistanceSq(), UAMaxDistances::EXPLOSIVE_REMOTE_ACTIVATION, GetArmed(), GetPosition, Math::SqrFloat() и UpdateLED().

◆ OnDisarmed()

void OnDisarmed ( bool pWithTool)
protected

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

◆ OnExplode()

void OnExplode ( )
protected
172 {
173 if (GetGame().IsServer())
174 {
175 m_DeleteTimer.Run(0.25, this, "DeleteSafe");
176 }
177 }
proto native CGame GetGame()

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

Используется в InitiateExplosion() и Grenade_Base::InitiateExplosion().

◆ 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
61 {
63
65 {
66 EntityAI parent = this;
67 if (GetHierarchyParent())
68 {
69 parent = GetHierarchyParent();
70 }
71
75 }
76
78 }
void CreateLight()
Definition ExplosivesBase.c:145
int m_ParticleExplosionId
Definition ExplosivesBase.c:36
vector m_ParticleOrientation
Definition ExplosivesBase.c:38
vector m_ParticlePosition
Definition ExplosivesBase.c:37
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition ParticleManager.c:84
Definition Building.c:6

Перекрестные ссылки CreateLight(), ParticleList::INVALID, m_ParticleExplosion, m_ParticleExplosionArr, m_ParticleExplosionId, m_ParticleOrientation, m_ParticlePosition и ParticleManager().

◆ OnPlacementComplete()

override void OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
protected
134 {
135 super.OnPlacementComplete(player, position, orientation);
136
137 if (GetGame().IsServer())
138 {
139 SetOrientation(orientation);
141 PlaceOnSurface();
142 }
143 }
proto native void SetPosition(vector position)
Set the world position of the Effect.
Definition Effect.c:438

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

◆ OnStoreLoad()

override bool OnStoreLoad ( ParamsReadContext ctx,
int version )
protected
328 {
329 if (!super.OnStoreLoad(ctx, version))
330 return false;
331
332 if (version > 129)
333 {
334 bool armed = false;
335 if (!ctx.Read(armed))
336 {
337 return false;
338 }
339
341 }
342
343 return true;
344 }

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

◆ OnStoreSave()

override void OnStoreSave ( ParamsWriteContext ctx)
protected
321 {
322 super.OnStoreSave(ctx);
323
324 ctx.Write(m_Armed);
325 }

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

◆ SetActions()

override void SetActions ( )
protected
180 {
181 super.SetActions();
182
183 AddAction(ActionAttach);
185 }
void ActionDetach()
Definition ActionDetach.c:10
void AddAction(typename actionName)
Definition AdvancedCommunication.c:220

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

◆ SetAmmoType()

void SetAmmoType ( string pAmmoType)
protected

◆ SetAmmoTypes()

void SetAmmoTypes ( array< string > pAmmoTypes)
protected
289 {
290 m_AmmoTypes.Clear();
292 }

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

Используется в ClaymoreMine::ClaymoreMine() и SetAmmoType().

◆ SetArmed()

void SetArmed ( bool state)
protected
242 {
243 m_Armed = state;
244 SetSynchDirty();
245 }

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

Используется в Arm(), Disarm(), ImprovisedExplosive::EEHealthLevelChanged(), Plastic_Explosive::EEHealthLevelChanged() и OnStoreLoad().

◆ SetDefused()

void SetDefused ( bool state)
protected
278 {
280 SetSynchDirty();
281 }

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

Используется в ClaymoreMine::OnDisarmed().

◆ SetParticleExplosion()

◆ SetParticleOrientation()

void SetParticleOrientation ( vector local_ori)
protected
311 {
313
314 if (GetHierarchyParent())
315 {
316 m_ParticleOrientation = GetHierarchyParent().WorldToModel(GetOrientation());
317 }
318 }
vector GetOrientation()
Definition AreaDamageManager.c:306

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

Используется в ClaymoreMine::ClaymoreMine() и ExplosivesBase().

◆ SetParticlePosition()

void SetParticlePosition ( vector local_pos)
protected

set position for smoke particle - needs to be in Local Space

301 {
303
304 if (GetHierarchyParent())
305 {
306 m_ParticlePosition = GetHierarchyParent().WorldToModel(GetPosition());
307 }
308 }

Перекрестные ссылки GetPosition и m_ParticlePosition.

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

◆ UnlockExplosivesSlots()

void UnlockExplosivesSlots ( )
protected

◆ UnlockTriggerSlots()

void UnlockTriggerSlots ( )
protected

◆ UnpairRemote()

override void UnpairRemote ( )
protected
121 {
123 {
124 if (GetPairDevice())
125 {
126 GetPairDevice().UnpairRemote();
127 }
129 }
130
131 }
override RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour()
Definition RemoteDetonator.c:272

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

Используется в EEKilled(), ClaymoreMine::OnDisarmed(), ImprovisedExplosive::OnDisarmed() и Plastic_Explosive::OnDisarmed().

◆ UpdateLED()

void UpdateLED ( int pState)
protected

HELPERS.

Переменные

◆ ANIM_PHASE_VISIBILITY

const string ANIM_PHASE_VISIBILITY = "Visibility"
protected

Используется в ImprovisedExplosive::OnActivatedByItem().

◆ DEFAULT_AMMO_TYPE

ExplosiveLight DEFAULT_AMMO_TYPE = "Explosion_NonLethal"

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

◆ m_AmmoTypes

ref array<string> m_AmmoTypes
protected

◆ m_Armed

bool m_Armed
protected

Используется в GetArmed(), OnStoreSave() и SetArmed().

◆ m_Defused

bool m_Defused
protected

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

◆ m_DeleteTimer

ref Timer m_DeleteTimer
protected

◆ m_Light

◆ m_ParticleExplosion

Particle m_ParticleExplosion
protected

particle

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

◆ m_ParticleExplosionArr

ref array<ParticleSource> m_ParticleExplosionArr = {}
protected
35{};

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

◆ m_ParticleExplosionId

int m_ParticleExplosionId
protected

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

◆ m_ParticleOrientation

vector m_ParticleOrientation
protected

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

◆ m_ParticlePosition

vector m_ParticlePosition
protected