Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс DestructionEffectBase
+ Граф наследования:DestructionEffectBase:

Закрытые члены

void ~DestructionEffectBase ()
 
void Init ()
 
bool HasExplosionDamage ()
 
void DealExplosionDamage ()
 
void OnHealthLevelChanged (notnull EntityAI entity, int oldLevel, int newLevel, string zone)
 
void ReplaceEntityServer ()
 
ParticleSource PlayParticle (int particleType, bool attach=false)
 
void OnEntityDestroyedOneTimeClient (EntityAI entity, int oldLevel, string zone)
 
void OnEntityDestroyedOneTimeServer (EntityAI entity, int oldLevel, string zone)
 
void OnEntityDestroyedPersistentClient (EntityAI entity, string zone)
 
void OnEntityDestroyedPersistentServer (EntityAI entity, string zone)
 
void OnExplosionEffects (Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
 

Закрытые данные

EntityAI m_Entity
 
bool m_EntityIsTakeable
 
ParticleSource m_POneTime
 
ParticleSource m_PPersistent
 
int m_ParticleOneTime
 
int m_ParticlePersistent
 
EffectSound m_SOneTime
 
EffectSound m_SPersistent
 
string m_SoundSetOneTime
 
string m_SoundSetPersistent
 
bool m_KeepHealthOnReplace
 
string m_ReplaceWithEntity
 
int m_ReplaceDelay
 
bool m_HasExplosionDamage
 
DamageType m_DamageType
 
string m_AmmoType
 

Подробное описание

Конструктор(ы)

◆ ~DestructionEffectBase()

void ~DestructionEffectBase ( )
inlineprivate
29 {
30 if (m_POneTime)
31 {
33 }
34 if (m_PPersistent)
35 {
37 }
38
41 }
ParticleSource m_POneTime
Definition DestructionEffectBase.c:7
ParticleSource m_PPersistent
Definition DestructionEffectBase.c:8
EffectSound m_SOneTime
Definition DestructionEffectBase.c:13
EffectSound m_SPersistent
Definition DestructionEffectBase.c:14
void Stop()
Legacy function for backwards compatibility with 1.14 and below.
Definition Particle.c:266
Manager class for managing Effect (EffectParticle, EffectSound)
Definition EffectManager.c:6
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Definition EffectManager.c:267

Перекрестные ссылки SEffectManager::DestroyEffect(), m_POneTime, m_PPersistent, m_SOneTime, m_SPersistent и Particle::Stop().

Методы

◆ DealExplosionDamage()

void DealExplosionDamage ( )
inlineprivate
51 {
52 DamageSystem.ExplosionDamage(m_Entity, null, m_AmmoType, m_Entity.GetPosition(), m_DamageType);
53 }
DamageType m_DamageType
Definition DestructionEffectBase.c:24
string m_AmmoType
Definition DestructionEffectBase.c:25
EntityAI m_Entity
Definition DestructionEffectBase.c:3
Definition EntityAI.c:95

Перекрестные ссылки m_AmmoType, m_DamageType и m_Entity.

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

◆ HasExplosionDamage()

bool HasExplosionDamage ( )
inlineprivate
46 {
48 }
bool m_HasExplosionDamage
Definition DestructionEffectBase.c:23

Перекрестные ссылки m_AmmoType и m_HasExplosionDamage.

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

◆ Init()

void Init ( )
private

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

◆ OnEntityDestroyedOneTimeClient()

void OnEntityDestroyedOneTimeClient ( EntityAI entity,
int oldLevel,
string zone )
private

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

◆ OnEntityDestroyedOneTimeServer()

void OnEntityDestroyedOneTimeServer ( EntityAI entity,
int oldLevel,
string zone )
private

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

◆ OnEntityDestroyedPersistentClient()

void OnEntityDestroyedPersistentClient ( EntityAI entity,
string zone )
private

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

◆ OnEntityDestroyedPersistentServer()

void OnEntityDestroyedPersistentServer ( EntityAI entity,
string zone )
private

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

◆ OnExplosionEffects()

void OnExplosionEffects ( Object source,
Object directHit,
int componentIndex,
string surface,
vector pos,
vector surfNormal,
float energyFactor,
float explosionFactor,
bool isWater,
string ammoType )
private

◆ OnHealthLevelChanged()

void OnHealthLevelChanged ( notnull EntityAI entity,
int oldLevel,
int newLevel,
string zone )
inlineprivate
56 {
58 Init();
59
60 if (GetGame().IsServer())
61 {
62 entity.SetTakeable(m_EntityIsTakeable);
63
64 if (oldLevel != -1 || entity.m_Initialized)
65 {
67 {
68 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(ReplaceEntityServer, m_ReplaceDelay, false);
69 }
71 {
73 }
75 }
77 }
78 #ifndef SERVER//client OR single
79 {
80 if (oldLevel != -1 || entity.m_Initialized)//one time
81 {
83
84 if (m_POneTime)
85 {
86 m_POneTime.SetOwner(this);
87 }
88
90
91 m_Entity.PlaySoundSet(m_SOneTime, m_SoundSetOneTime, 0, 0 );
92 m_Entity.PlaySoundSetLoop(m_SPersistent, m_SoundSetPersistent, 0, 0 );
93 }
94 else//Persistent
95 {
97 m_Entity.PlaySoundSetLoop(m_SPersistent, m_SoundSetPersistent, 0, 0 );
98 }
99
101
102 if (m_PPersistent)
103 {
105 }
106 }
107 #endif
108 }
string m_ReplaceWithEntity
Definition DestructionEffectBase.c:20
bool HasExplosionDamage()
Definition DestructionEffectBase.c:45
string m_SoundSetOneTime
Definition DestructionEffectBase.c:16
int m_ParticleOneTime
Definition DestructionEffectBase.c:10
string m_SoundSetPersistent
Definition DestructionEffectBase.c:17
void OnEntityDestroyedOneTimeServer(EntityAI entity, int oldLevel, string zone)
ParticleSource PlayParticle(int particleType, bool attach=false)
Definition DestructionEffectBase.c:121
void OnEntityDestroyedPersistentClient(EntityAI entity, string zone)
void OnEntityDestroyedPersistentServer(EntityAI entity, string zone)
int m_ReplaceDelay
Definition DestructionEffectBase.c:21
void ReplaceEntityServer()
Definition DestructionEffectBase.c:110
int m_ParticlePersistent
Definition DestructionEffectBase.c:11
void OnEntityDestroyedOneTimeClient(EntityAI entity, int oldLevel, string zone)
void DealExplosionDamage()
Definition DestructionEffectBase.c:50
bool m_EntityIsTakeable
Definition DestructionEffectBase.c:5
proto native void SetOwner(Class owner)
Set the owner of this ParticleSource.
proto native CGame GetGame()
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, DealExplosionDamage(), GetGame(), HasExplosionDamage(), Init(), m_Entity, m_EntityIsTakeable, m_ParticleOneTime, m_ParticlePersistent, m_POneTime, m_PPersistent, m_ReplaceDelay, m_ReplaceWithEntity, m_SOneTime, m_SoundSetOneTime, m_SoundSetPersistent, m_SPersistent, OnEntityDestroyedOneTimeClient(), OnEntityDestroyedOneTimeServer(), OnEntityDestroyedPersistentClient(), OnEntityDestroyedPersistentServer(), PlayParticle(), ReplaceEntityServer() и ParticleSource::SetOwner().

◆ PlayParticle()

ParticleSource PlayParticle ( int particleType,
bool attach = false )
inlineprivate
122 {
123 if (!m_Entity)
124 {
125 ErrorEx("Missing entity - something went wrong");
126 return null;
127 }
128 if (particleType)
129 {
130 ParticleSource p = ParticleManager.GetInstance().PlayInWorld(particleType, m_Entity.GetPosition());
131 if (attach && p)
132 {
133 p.AddAsChild(m_Entity);//Note: it's also possible to directly play on object: Particle.PlayOnObject
134 }
135 return p;
136 }
137 return null;
138 }
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition ParticleManager.c:84
Entity which has the particle instance as an ObjectComponent.
Definition ParticleSource.c:124
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, m_Entity и ParticleManager().

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

◆ ReplaceEntityServer()

void ReplaceEntityServer ( )
inlineprivate
111 {
113 dead_entity.SetOrientation(m_Entity.GetOrientation());
115 {
116 dead_entity.SetHealth(m_Entity.GetHealth());
117 }
118 m_Entity.Delete();
119 }
const int ECE_OBJECT_SWAP
Definition CentralEconomy.c:38
const int RF_ORIGINAL
Definition CentralEconomy.c:63
bool m_KeepHealthOnReplace
Definition DestructionEffectBase.c:19
Definition Building.c:6

Перекрестные ссылки ECE_OBJECT_SWAP, GetGame(), m_Entity, m_KeepHealthOnReplace, m_ReplaceWithEntity и RF_ORIGINAL.

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

Поля

◆ m_AmmoType

◆ m_DamageType

◆ m_Entity

◆ m_EntityIsTakeable

bool m_EntityIsTakeable
private

◆ m_HasExplosionDamage

bool m_HasExplosionDamage
private

◆ m_KeepHealthOnReplace

bool m_KeepHealthOnReplace
private

◆ m_ParticleOneTime

int m_ParticleOneTime
private

◆ m_ParticlePersistent

int m_ParticlePersistent
private

◆ m_POneTime

ParticleSource m_POneTime
private

Используется в OnHealthLevelChanged() и ~DestructionEffectBase().

◆ m_PPersistent

ParticleSource m_PPersistent
private

Используется в OnHealthLevelChanged() и ~DestructionEffectBase().

◆ m_ReplaceDelay

◆ m_ReplaceWithEntity

◆ m_SOneTime

EffectSound m_SOneTime
private

Используется в OnHealthLevelChanged() и ~DestructionEffectBase().

◆ m_SoundSetOneTime

◆ m_SoundSetPersistent

string m_SoundSetPersistent
private

◆ m_SPersistent

EffectSound m_SPersistent
private

Используется в OnHealthLevelChanged() и ~DestructionEffectBase().


Объявления и описания членов класса находятся в файле: