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

Защищенные члены

void FlareSimulation ()
 
void OnActivation (Entity flare)
 
void OnTermination (Entity flare)
 
void OnFire (Entity flare)
 
void Simulate (Entity flare)
 
void FlareParticleUpdate ()
 
void CastFlareAINoise (vector position)
 
void TurnOffDistantLight ()
 
void ~FlareSimulation ()
 

Защищенные данные

Particle m_ParMainFire
 
EffectSound m_BurningSound
 
FlareLight m_FlareLight
 
float m_LastNoiseTime = -1
 
float m_NoiseTimer = 0
 
const float NOISE_DELAY = 5
 
const float FLARE_SPIN_RATE = 1.15
 
const float FLARE_SPIN_RADIUS = 0.18
 
Entity m_Flare
 
vector m_RotationPoint
 
vector m_FlarePosition
 
float m_RotationDegrees
 

Статические защищенные данные

static const float MAX_FARLIGHT_DIST = 40
 
static const float MIN_FARLIGHT_DIST = 5
 
static ref NoiseParams m_NoisePar
 
 m_ScriptedLight
 
int m_ParticleId
 

Дополнительные унаследованные члены

- Закрытые члены унаследованные от Managed
void IntroSceneCharacter ()
 
void ~IntroSceneCharacter ()
 
bool IsDefaultCharacter ()
 
void SetToDefaultCharacter ()
 
void SetCharacterID (int char_id)
 
int GetCharacterID ()
 
PlayerBase GetCharacterObj ()
 
TStringArray GetCharGenderList ()
 
TStringArray GetCharList (ECharGender gender)
 
TStringArray GetCharShirtsList ()
 
TStringArray GetCharPantsList ()
 
TStringArray GetCharShoesList ()
 
void SetCharacterGender (ECharGender gender)
 
bool IsCharacterFemale ()
 
ECharGender GetCharacterGender ()
 
vector GetPosition ()
 
int GetNextCharacterID ()
 
int GetPrevCharacterID ()
 
void CreateNewCharacterRandom ()
 
void CreateNewCharacterById (int character_id)
 
void CreateNewCharacterByName (string character_name, bool randomize_equip=true)
 
void CreateDefaultCharacter ()
 
void GetLastPlayedServer (int characterID, out string address, out string name, out int port)
 
void GetLastPlayedServerEx (int characterID, out string address, out string name, out int port, out int steamQueryPort)
 
void CreateNewCharacter ()
 
void LoadCharacterData (vector char_pos, vector char_rot, bool default_char=false)
 Generates random equip for the new IntroSceneCharacter, whatever is defined in 'cfgCharacterCreation'.
 
void CharacterUnload ()
 
void CharacterLoad (int character_id, vector char_pos, vector char_rot)
 
void SetupPlayerName (bool new_name)
 
void SetAttachment (string type, int slot)
 
string GetCharacterNameById (int char_id)
 
string GetCharacterName ()
 
void SaveCharName (string name)
 
void SaveDefaultCharacter ()
 
void TransferValues (PlayerBase player)
 
void Init ()
 
void OnScheduledTick (float deltatime)
 
void CheckValues ()
 
float GetBlood ()
 
float GetHealth ()
 
void CheckHealth ()
 
void CheckBlood ()
 
void SendInitValues ()
 Sends values on object creation.
 
void SendValue (int value_type, float value)
 
void ReceiveValue (int value_type, float value)
 
void OnRPC (ParamsReadContext ctx)
 
void ShowDebugValues (bool show)
 
void BleedingIndicator (int source_ID, int severity, GameplayEffectsDataBleeding parent)
 
void InitIndicator (vector position)
 
void StopIndicator (bool instant=false)
 
void StartRunningDrops ()
 
bool IsRunningDrops ()
 Are any drops currently being animated?
 
void TrySpawnNextDrop ()
 
void ResetSequence ()
 
void ResetIndicator ()
 
void Update (float timeSlice)
 
bool GetEndNow ()
 
int GetSeverity ()
 
void GameplayEffectsData (array< ref Widget > input, int type, int user_override=-1)
 
void Init (array< ref Widget > input, int type, Widget layout_root, int user_override=-1)
 
array< ref WidgetGetWidgetSet ()
 
int GetWidgetSetType ()
 
int GetWidgetSetID ()
 
bool HasDefinedHandle ()
 Returns 'true' if this class contains update info.
 
bool DataInitialized ()
 
void UpdateVisibility (bool state)
 
void RegisterData (Param p)
 
void Update (float timeSlice=0, Param p=null, int handle=-1)
 
void ForceStop ()
 
- Закрытые данные унаследованные от Managed
int m_CharacterId
 
string m_CharacterType
 
MenuData m_CharacterDta
 
PlayerBase m_CharacterObj
 
vector m_CharacterPos
 
vector m_CharacterRot
 
ref TStringArray m_CharGenderList = new TStringArray
 
ref TStringArray m_CharShirtList = new TStringArray
 
ref TStringArray m_CharPantsList = new TStringArray
 
ref TStringArray m_CharShoesList = new TStringArray
 
ref map< ECharGender, ref array< string > > m_Characters = new map<ECharGender, ref array<string>>
 
ECharGender m_CharGender
 
bool m_InitialSyncSent
 
bool m_Initialized
 
bool m_Terminating = false
 
bool m_EndNow = false
 
bool m_IsRunning = false
 
int m_DropSpawnsQueued
 
int m_ActiveDropsCount
 
int m_Severity
 
int m_SourceID
 
GameplayEffectsDataBleeding m_ParentMetaData
 
array< floatm_DropProbabilityArray
 
float m_AverageFrequency
 
float m_SequenceTick
 
float m_SequenceDuration
 
float m_TimeElapsedTotal
 
float m_TimeElapsedSequence
 
float m_LastDropSpawnTime
 
float m_DropSpawnMinDelay
 
float m_DropSpawnMaxDelay
 
int m_CurrentDropProbabilityStep
 
int m_DropProbabilityRollsCount
 
vector m_BasePosition
 
ref set< ref BleedingIndicatorDropDatam_ActiveDrops
 
ref set< intm_CleanupQueue
 
ref array< ref Widgetm_WidgetArray
 
int m_Type
 
int m_WidgetSetIdentifier
 
Widget m_LayoutRoot
 

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

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

◆ FlareSimulation()

void FlareSimulation ( )
inlineprotected
26 {
29 }
void FlareLight()
Definition FlareLight.c:43
m_ScriptedLight
Definition FlareSimulation.c:22
int m_ParticleId
Definition FlareSimulation.c:23
Definition ParticleList.c:12
static const int FLAREPROJ_ACTIVATE
Definition ParticleList.c:90

Перекрестные ссылки FlareLight(), ParticleList::FLAREPROJ_ACTIVATE, m_ParticleId и m_ScriptedLight.

◆ ~FlareSimulation()

void ~FlareSimulation ( )
inlineprotected
154 {
155 if (m_ParMainFire)
157
158 if (m_BurningSound)
160
161 if (m_FlareLight)
162 m_FlareLight.FadeOut();
163 }
void SoundStop()
Stops sound.
Definition EffectSound.c:217
EffectSound m_BurningSound
Definition FlareSimulation.c:4
FlareLight m_FlareLight
Definition FlareSimulation.c:5
Particle m_ParMainFire
Definition FlareSimulation.c:3
void Stop()
Legacy function for backwards compatibility with 1.14 and below.
Definition Particle.c:266

Перекрестные ссылки m_BurningSound, m_FlareLight, m_ParMainFire, EffectSound::SoundStop() и Particle::Stop().

Методы

◆ CastFlareAINoise()

void CastFlareAINoise ( vector position)
inlineprotected
125 {
126 if ( m_LastNoiseTime < 0 )
127 m_LastNoiseTime = GetGame().GetTime() * 0.0033;
128
129 float delta_time = GetGame().GetTime() * 0.0033 - m_LastNoiseTime;
130 m_LastNoiseTime = GetGame().GetTime() * 0.0033;
131
133
134 if ( m_NoiseTimer >= NOISE_DELAY )
135 {
136 MiscGameplayFunctions.GenerateAINoiseAtPosition(position, NOISE_DELAY, m_NoisePar);
137
138 m_NoiseTimer = 0;
139 }
140 }
static ref NoiseParams m_NoisePar
Definition FlareSimulation.c:9
const float NOISE_DELAY
Definition FlareSimulation.c:12
float m_LastNoiseTime
Definition FlareSimulation.c:10
float m_NoiseTimer
Definition FlareSimulation.c:11
Definition EntityAI.c:95
proto native CGame GetGame()

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

◆ FlareParticleUpdate()

void FlareParticleUpdate ( )
inlineprotected
90 {
92 if (m_RotationDegrees > 360)
94
96 float sin = Math.Sin(angleRad);
97 float cos = Math.Cos(angleRad);
98
99 vector newFlarePos = m_ParMainFire.GetOrigin();
100 float surfacePos = GetGame().SurfaceY(newFlarePos[0], newFlarePos[2]);
101
102 if (newFlarePos[1] - surfacePos < 1) // reached ground
103 {
104 if (m_Flare.GetOrigin()[1] <= surfacePos) // actual flare pos might not match and height could be underground
106 else
107 m_ParMainFire.SetPosition(Vector(newFlarePos[0], m_Flare.GetOrigin()[1] ,newFlarePos[2]));
108
109 return;
110 }
111
112 // rotate vector around point
115
117 newFlarePos[1] = m_Flare.GetOrigin()[1];
119
120 m_ParMainFire.SetPosition(newFlarePos);
121
122 }
vector m_RotationPoint
Definition FlareSimulation.c:18
vector m_FlarePosition
Definition FlareSimulation.c:19
const float FLARE_SPIN_RATE
Definition FlareSimulation.c:15
float m_RotationDegrees
Definition FlareSimulation.c:20
Entity m_Flare
Definition FlareSimulation.c:17
Definition EnMath.c:7
Definition EnConvert.c:106
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float Cos(float angle)
Returns cosinus of angle in radians.
static const float DEG2RAD
Definition EnMath.c:17
static proto float Sin(float angle)
Returns sinus of angle in radians.

Перекрестные ссылки Math::Cos(), Math::DEG2RAD, FLARE_SPIN_RATE, GetGame(), m_Flare, m_FlarePosition, m_ParMainFire, m_RotationDegrees, m_RotationPoint, Math::Sin() и Vector().

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

◆ OnActivation()

void OnActivation ( Entity flare)
inlineprotected
32 {
33 if ( !GetGame().IsServer() || !GetGame().IsMultiplayer() )
34 {
35 m_FlareLight = FlareLight.Cast( ScriptedLightBase.CreateLight( m_ScriptedLight, Vector(0,0,0) ) );
36 if ( m_FlareLight )
37 m_FlareLight.AttachOnObject( flare );
38
39 if (m_ParMainFire)
41
42 m_Flare = flare;
43 m_RotationPoint = m_Flare.GetOrigin();
45
46 m_ParMainFire = ParticleManager.GetInstance().PlayInWorld( m_ParticleId, m_FlarePosition );
47
48 flare.PlaySoundSetLoop( m_BurningSound, "roadflareLoop_SoundSet", 0, 0 );
49 }
50
51 if ( GetGame().IsServer() )
52 {
53 // Create and load noise parameters
54 m_NoisePar = new NoiseParams();
55 m_NoisePar.LoadFromPath("cfgWeapons Flaregun_Base NoiseFlare");
56 }
57 }
class NoiseSystem NoiseParams()
Definition Noise.c:15
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition ParticleManager.c:84
Definition FlareLight.c:46
const float FLARE_SPIN_RADIUS
Definition FlareSimulation.c:16
Definition PointLightBase.c:2

Перекрестные ссылки FLARE_SPIN_RADIUS, GetGame(), m_BurningSound, m_Flare, m_FlareLight, m_FlarePosition, m_NoisePar, m_ParMainFire, m_ParticleId, m_RotationPoint, m_ScriptedLight, NoiseParams(), ParticleManager(), Particle::Stop() и Vector().

◆ OnFire()

void OnFire ( Entity flare)
inlineprotected
65 {
66 //m_ParMainFire = ParticleManager.GetInstance().PlayOnObject( ParticleList.FLAREPROJ_FIRE, flare);
67 //m_ParMainFire.SetWiggle( 7, 0.3);
68 }

◆ OnTermination()

void OnTermination ( Entity flare)
inlineprotected
60 {
61 //MiscGameplayFunctions.GenerateAINoiseAtPosition(flare.GetPosition(), NOISE_DELAY, m_NoisePar);
62 }

◆ Simulate()

void Simulate ( Entity flare)
inlineprotected
71 {
72 DayZPlayer player = GetGame().GetPlayer();
73 if ( player )
74 vector playerPos = player.GetPosition();
75
76 float dist = vector.DistanceSq(flare.GetPosition(), playerPos);
77
80
83
84 //CastFlareAINoise( flare.GetPosition() );
86 }
Definition DayZPlayerImplement.c:111
static const float MIN_FARLIGHT_DIST
Definition FlareSimulation.c:7
void FlareParticleUpdate()
Definition FlareSimulation.c:89
void TurnOffDistantLight()
Definition FlareSimulation.c:142
static const float MAX_FARLIGHT_DIST
Definition FlareSimulation.c:6
void SetParameter(int emitter, int parameter, float value)
Set the value of a parameter of an emitor in the particle.
Definition Particle.c:625
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
EmitorParam
Definition EnVisual.c:114

Перекрестные ссылки vector::DistanceSq(), FlareParticleUpdate(), GetGame(), m_ParMainFire, MAX_FARLIGHT_DIST, MIN_FARLIGHT_DIST, Particle::SetParameter() и TurnOffDistantLight().

◆ TurnOffDistantLight()

void TurnOffDistantLight ( )
inlineprotected
143 {
144 if (m_ParMainFire)
145 {
146 m_ParMainFire.SetParameter(0, EmitorParam.LIFETIME, 0);
147 m_ParMainFire.SetParameter(0, EmitorParam.LIFETIME_RND, 0);
150 }
151 }

Перекрестные ссылки m_ParMainFire и Particle::SetParameter().

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

Поля

◆ FLARE_SPIN_RADIUS

const float FLARE_SPIN_RADIUS = 0.18
protected

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

◆ FLARE_SPIN_RATE

const float FLARE_SPIN_RATE = 1.15
protected

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

◆ m_BurningSound

EffectSound m_BurningSound
protected

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

◆ m_Flare

Entity m_Flare
protected

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

◆ m_FlareLight

FlareLight m_FlareLight
protected

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

◆ m_FlarePosition

vector m_FlarePosition
protected

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

◆ m_LastNoiseTime

float m_LastNoiseTime = -1
protected

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

◆ m_NoisePar

ref NoiseParams m_NoisePar
staticprotected

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

◆ m_NoiseTimer

float m_NoiseTimer = 0
protected

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

◆ m_ParMainFire

Particle m_ParMainFire
protected

◆ m_ParticleId

int m_ParticleId
staticprotected

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

◆ m_RotationDegrees

float m_RotationDegrees
protected

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

◆ m_RotationPoint

vector m_RotationPoint
protected

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

◆ m_ScriptedLight

m_ScriptedLight
staticprotected

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

◆ MAX_FARLIGHT_DIST

const float MAX_FARLIGHT_DIST = 40
staticprotected

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

◆ MIN_FARLIGHT_DIST

const float MIN_FARLIGHT_DIST = 5
staticprotected

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

◆ NOISE_DELAY

const float NOISE_DELAY = 5
protected

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


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