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

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

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

enum  EGeyserState { DORMANT = 0 , ERUPTION_SOON = 1 , ERUPTING_PRIMARY = 2 , ERUPTING_SECONDARY = 4 }
 

Функции

override void EEDelete (EntityAI parent)
 
override void InitZoneServer ()
 
void TickState ()
 
void KillEntitiesInArea ()
 

Переменные

enum EGeyserState UPDATE_RATE = 1000
 
const float PRE_ERUPTION_DURATION = 5
 
int m_TimeElapsed
 
float m_RandomizedInterval
 
float m_RandomizedDuration
 
GeyserTrigger m_GeyserTrigger
 

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

◆ EGeyserState

Элементы перечислений
DORMANT 
ERUPTION_SOON 
ERUPTING_PRIMARY 
ERUPTING_SECONDARY 
2{
3 DORMANT = 0,
4 ERUPTION_SOON = 1, // bubbling
5 ERUPTING_PRIMARY = 2, // main particle
6 ERUPTING_SECONDARY = 4 // secondary tall particle
7}
@ ERUPTION_SOON
Definition GeyserArea.c:4
@ DORMANT
Definition GeyserArea.c:3
@ ERUPTING_SECONDARY
Definition GeyserArea.c:6
@ ERUPTING_PRIMARY
Definition GeyserArea.c:5

Функции

◆ EEDelete()

override void EEDelete ( EntityAI parent)
protected
20 {
21 if (GetGame().IsClient() && m_GeyserTrigger)
23
24 super.EEDelete( parent );
25 }
GeyserTrigger m_GeyserTrigger
Definition GeyserArea.c:17
void StopEffects()
Definition GeyserTrigger.c:155
Definition EntityAI.c:95
proto native CGame GetGame()

Перекрестные ссылки GetGame(), m_GeyserTrigger и GeyserTrigger::StopEffects().

◆ InitZoneServer()

override void InitZoneServer ( )
protected
28 {
29 super.InitZoneServer();
30
31 if ( m_TriggerType != "" )
32 {
34 m_GeyserTrigger = GeyserTrigger.Cast(m_Trigger);
35 }
36
37 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(TickState, UPDATE_RATE, true);
38
40 }
float m_Radius
Definition AIGroupBehaviour.c:10
vector m_Position
Cached world position.
Definition Effect.c:41
float m_RandomizedInterval
Definition GeyserArea.c:15
void TickState()
Definition GeyserArea.c:42
enum EGeyserState UPDATE_RATE
void CreateTrigger()
Definition TrapBase.c:480
Definition GeyserTrigger.c:2
Definition EnMath.c:7
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, CreateTrigger(), GetGame(), m_GeyserTrigger, m_Position, m_Radius, m_RandomizedInterval, Math::RandomInt(), TickState() и UPDATE_RATE.

◆ KillEntitiesInArea()

void KillEntitiesInArea ( )
protected
90 {
92 GetGame().GetObjectsAtPosition(m_Position, m_Radius, nearestObjects, null);
93
94 foreach (Object obj : nearestObjects)
95 {
96 EntityAI entity = EntityAI.Cast(obj);
97 if (entity)
98 entity.ProcessDirectDamage(DamageType.CUSTOM, this, "", "HeatDamage", "0 0 0", 1000);
99 }
100 }
DamageType
exposed from C++ (do not change)
Definition DamageSystem.c:11
Definition Building.c:6
Definition ObjectTyped.c:2

Перекрестные ссылки GetGame(), m_Position и m_Radius.

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

◆ TickState()

void TickState ( )
protected
43 {
44 m_TimeElapsed += UPDATE_RATE * 0.001;
45
47 {
49 {
50 m_TimeElapsed = 0;
51 m_RandomizedDuration = Math.RandomInt(m_EffectDuration * 0.8, m_EffectDuration * 1.2);
53 }
54 }
55 else
56 {
57 if (m_GeyserTrigger.GetGeyserState() & EGeyserState.ERUPTION_SOON)
58 {
60 {
64 return;
65 }
66 }
67
68 if (m_GeyserTrigger.GetGeyserState() & EGeyserState.ERUPTING_PRIMARY)
69 {
71 {
72 m_TimeElapsed = 0;
74 m_GeyserTrigger.RemoveGeyserState(EGeyserState.ERUPTING_PRIMARY | EGeyserState.ERUPTING_SECONDARY);
75 return;
76 }
77
78 if (m_GeyserTrigger.GetGeyserState() & EGeyserState.ERUPTING_SECONDARY)
79 {
80 if (Math.RandomBool()) // 50% chance to end secondary eruption every update
82 }
83 else if (Math.RandomBool()) // 50% chance to start secondary eruption every update
85 }
86 }
87 }
int m_TimeElapsed
Definition GeyserArea.c:14
void KillEntitiesInArea()
Definition GeyserArea.c:89
float m_RandomizedDuration
Definition GeyserArea.c:16
const float PRE_ERUPTION_DURATION
Definition GeyserArea.c:12
EGeyserState
Definition GeyserArea.c:2
EGeyserState GetGeyserState()
Definition GeyserTrigger.c:190
void RemoveGeyserState(EGeyserState state)
Definition GeyserTrigger.c:184
void AddGeyserState(EGeyserState state)
Definition GeyserTrigger.c:178
static bool RandomBool()
Returns a random bool .
Definition EnMath.c:73

Перекрестные ссылки GeyserTrigger::AddGeyserState(), GeyserTrigger::GetGeyserState(), KillEntitiesInArea(), m_GeyserTrigger, m_RandomizedDuration, m_RandomizedInterval, m_TimeElapsed, PRE_ERUPTION_DURATION, Math::RandomBool(), Math::RandomInt(), GeyserTrigger::RemoveGeyserState() и UPDATE_RATE.

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

Переменные

◆ m_GeyserTrigger

GeyserTrigger m_GeyserTrigger
protected

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

◆ m_RandomizedDuration

float m_RandomizedDuration
protected

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

◆ m_RandomizedInterval

float m_RandomizedInterval
protected

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

◆ m_TimeElapsed

int m_TimeElapsed
protected

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

◆ PRE_ERUPTION_DURATION

const float PRE_ERUPTION_DURATION = 5
protected

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

◆ UPDATE_RATE

enum EGeyserState UPDATE_RATE = 1000

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