DayZ 1.24
Loading...
Searching...
No Matches
UndergroundTrigger.c File Reference

Go to the source code of this file.

Classes

class  UndergroundTriggerCarrierBase
 

Functions

void Init (JsonUndergroundAreaTriggerData data)
 
bool CanAddObjectAsInsider (Object object)
 
override void EOnInit (IEntity other, int extra)
 
void OnEnterClientEvent (TriggerInsider insider)
 
void OnLeaveClientEvent (TriggerInsider insider)
 

Variables

class UndergroundTriggerCarrier extends UndergroundTriggerCarrierBase UNDEFINED
 
class UndergroundTriggerCarrier extends UndergroundTriggerCarrierBase TRANSITIONING
 
class UndergroundTriggerCarrier extends UndergroundTriggerCarrierBase OUTER
 
class UndergroundTriggerCarrier extends UndergroundTriggerCarrierBase m_Data
 
EUndergroundTriggerType m_Type
 
float m_Accommodation
 
float m_InterpolationSpeed
 

Function Documentation

◆ CanAddObjectAsInsider()

bool CanAddObjectAsInsider ( Object object)
protected

Definition at line 110 of file UndergroundTrigger.c.

111 {
112 if (!super.CanAddObjectAsInsider(object))
113 return false;
114
115 PlayerBase player = PlayerBase.Cast(object);
116 return player.IsControlledPlayer();
117 }

◆ EOnInit()

override void EOnInit ( IEntity other,
int extra )
protected

Definition at line 120 of file UndergroundTrigger.c.

121 {
122 //disable parent behaviour
123 }

◆ Init()

Definition at line 85 of file UndergroundTrigger.c.

86 {
87 m_Data = data;
88 //Print("Spawning trigger " + this + "at pos: " + GetPosition());
89 vector extMax = data.GetSize() * 0.5;
92 m_Accommodation = data.EyeAccommodation;
93 m_InterpolationSpeed = data.InterpolationSpeed;
94
95 if (data.Breadcrumbs && data.Breadcrumbs.Count() > 0) //TODO: simpler check
96 {
97 if (data.Breadcrumbs.Count() > 32)
98 ErrorEx("max 'Breadcrumb' count is 32, found: " + data.Breadcrumbs.Count());
99 m_Type = EUndergroundTriggerType.TRANSITIONING;
100 }
101 else
102 {
103 if (m_Accommodation == 1)
105 else
107 }
108 }
void SetExtents(vector mins, vector maxs)
EUndergroundTriggerType m_Type
class UndergroundTriggerCarrier extends UndergroundTriggerCarrierBase m_Data
float m_Accommodation
float m_InterpolationSpeed
enum ShapeType ErrorEx

References ErrorEx, m_Accommodation, m_Data, m_InterpolationSpeed, m_Type, and SetExtents().

◆ OnEnterClientEvent()

void OnEnterClientEvent ( TriggerInsider insider)
protected

Definition at line 141 of file UndergroundTrigger.c.

142 {
143 //Print("OnEnterClientEvent " + this);
144 //return;
145 PlayerBase player = PlayerBase.Cast(insider.GetObject());
146 if (player)
147 {
148 UndergroundHandlerClient handler = player.GetUndergroundHandler();
149 if (handler)
150 handler.OnTriggerEnter(this);
151 }
152 }
void UndergroundHandlerClient(PlayerBase player)
Object GetObject()
Definition Trigger.c:28

References TriggerInsider::GetObject(), and UndergroundHandlerClient().

◆ OnLeaveClientEvent()

void OnLeaveClientEvent ( TriggerInsider insider)
protected

Definition at line 154 of file UndergroundTrigger.c.

155 {
156 //Print("OnLeaveClientEvent " + this);
157 //return;
158 PlayerBase player = PlayerBase.Cast(insider.GetObject());
159 if (player)
160 {
161 UndergroundHandlerClient handler = player.GetUndergroundHandler();
162 if (handler)
163 handler.OnTriggerLeave(this);
164 }
165 }

References TriggerInsider::GetObject(), and UndergroundHandlerClient().

Variable Documentation

◆ m_Accommodation

float m_Accommodation

Definition at line 82 of file UndergroundTrigger.c.

Referenced by Init().

◆ m_Data

class UndergroundTriggerCarrier extends UndergroundTriggerCarrierBase m_Data

◆ m_InterpolationSpeed

float m_InterpolationSpeed

Definition at line 83 of file UndergroundTrigger.c.

Referenced by Init().

◆ m_Type

Definition at line 81 of file UndergroundTrigger.c.

◆ OUTER

class UndergroundTriggerCarrier extends UndergroundTriggerCarrierBase OUTER

◆ TRANSITIONING

class UndergroundTriggerCarrier extends UndergroundTriggerCarrierBase TRANSITIONING

◆ UNDEFINED

class UndergroundTriggerCarrier extends UndergroundTriggerCarrierBase UNDEFINED