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

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

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

enum  EUndergroundPresence { NONE , OUTER , TRANSITIONING , FULL }
 

Функции

void UndergroundHandlerClient (PlayerBase player)
 
void ~UndergroundHandlerClient ()
 
PPERUndergroundAcco GetRequester ()
 
void OnTriggerEnter (UndergroundTrigger trigger)
 
void OnTriggerLeave (UndergroundTrigger trigger)
 
void CalculateEyeAccoTarget ()
 
void CalculateBreadCrumbs ()
 
void CalculateLinePointFade ()
 
void ProcessEyeAcco (float timeSlice)
 
void ProcessLighting (float timeSlice)
 
void ProcessSound (float timeSlice)
 
void Tick (float timeSlice)
 
void ApplyEyeAcco ()
 
void UpdateNVGRequester (float value)
 
bool CalculateEyeAcco (float timeSlice)
 
void OnTriggerInsiderUpdate ()
 
void SetUndergroundPresence (UndergroundTrigger trigger)
 
void EnableLights (bool enable)
 
void OnUpdateTimerEnd ()
 
void OnUpdateTimerIn ()
 
void OnUpdateTimerOut ()
 
void OnUndergroundPresenceUpdate (EUndergroundPresence newPresence, EUndergroundPresence oldPresence)
 

Переменные

enum EUndergroundPresence LIGHT_BLEND_SPEED_IN = 5
 
const float LIGHT_BLEND_SPEED_OUT = 1.75
 
const float MAX_RATIO = 0.9
 
const float RATIO_CUTOFF = 0
 
const float DISTANCE_CUTOFF = 5
 
const float ACCO_MODIFIER = 1
 
const float DEFAULT_INTERPOLATION_SPEED = 7
 
const string UNDERGROUND_LIGHTING = "dz\\data\\lighting\\lighting_underground.txt"
 
ref AnimationTimer m_AnimTimerLightBlend
 
PlayerBase m_Player
 
PPERUndergroundAcco m_Requester
 
PPERequester_CameraNV m_NVRequester
 
ref set< UndergroundTrigger > m_InsideTriggers = new set<UndergroundTrigger>()
 
float m_EyeAccoTarget = 1
 
float m_AccoInterpolationSpeed
 
float m_EyeAcco = 1
 
float m_LightingLerpTarget
 
float m_LightingLerp
 
EffectSound m_AmbientSound
 
UndergroundTrigger m_TransitionalTrigger
 

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

◆ EUndergroundPresence

Элементы перечислений
NONE 
OUTER 
TRANSITIONING 
FULL 
2{
3 NONE,//player is not interacting with underground at any level
4 OUTER,//player is on the outskirts of the underdound, some effects are already in effect, while others might not be
5 TRANSITIONING,//player has entered underground and is in the process of screen darkening transition
6 FULL//the player is now fully entered underground
7}
@ TRANSITIONING
Definition UndergroundHandlerClient.c:5
@ NONE
Definition UndergroundHandlerClient.c:3
@ OUTER
Definition UndergroundHandlerClient.c:4
@ FULL
Definition UndergroundHandlerClient.c:6

Функции

◆ ApplyEyeAcco()

void ApplyEyeAcco ( )
protected
355 {
356 #ifdef DIAG_DEVELOPER
357 if (!DiagMenu.GetBool(DiagMenuIDs.UNDERGROUND_DISABLE_DARKENING) )
358 {
359 GetRequester().SetEyeAccommodation(m_EyeAcco);
360 }
361 else
362 {
363 GetRequester().SetEyeAccommodation(1);
364 }
365 #else
366 GetRequester().SetEyeAccommodation(m_EyeAcco);
367 #endif
368
370 if (m_LightingLerp >= 1.0 || GetDayZGame().GetWorld().IsNight())
371 {
373 }
374 //m_NVRequester.SetUndergroundExposureCoef(undergrounNVExposureCoef);
376 }
DayZGame GetDayZGame()
Definition DayZGame.c:3817
DiagMenuIDs
Definition EDiagMenuIDs.c:2
void UpdateNVGRequester(float value)
Definition UndergroundHandlerClient.c:378
PPERUndergroundAcco GetRequester()
Definition UndergroundHandlerClient.c:54
float m_EyeAcco
Definition UndergroundHandlerClient.c:28
float m_LightingLerp
Definition UndergroundHandlerClient.c:30
Definition EnDebug.c:233
Definition EntityAI.c:95
static proto bool GetBool(int id, bool reverse=false)
Get value as bool from the given script id.

Перекрестные ссылки DiagMenu::GetBool(), GetDayZGame(), GetRequester(), m_EyeAcco, m_LightingLerp и UpdateNVGRequester().

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

◆ CalculateBreadCrumbs()

void CalculateBreadCrumbs ( )
protected
97 {
98 float closestDist = float.MAX;
101
102 int excludeMask = 0;
103 foreach (int indx, auto crumb:m_TransitionalTrigger.m_Data.Breadcrumbs)
104 {
105 if (indx > 32)//error handling for exceeding this limit is handled elsewhere
106 break;
107
108 float dist = vector.Distance(m_Player.GetPosition(), crumb.GetPosition());
109 float crumbRadius = m_TransitionalTrigger.m_Data.Breadcrumbs[indx].Radius;
111
112 if (crumbRadius != -1)
115 excludeMask = (excludeMask | (1 << indx));
116 else if (m_TransitionalTrigger.m_Data.Breadcrumbs[indx].UseRaycast)
117 {
118 int idx = m_Player.GetBoneIndexByName("Head");
119 vector rayStart = m_Player.GetBonePositionWS(idx);
120 vector rayEnd = crumb.GetPosition();
122 float hitFraction;
124
126 {
127 excludeMask = (excludeMask | (1 << indx));
128 }
129 }
130
131 distances.Insert(dist);
132
133 #ifdef DIAG_DEVELOPER
134 if ( DiagMenu.GetBool(DiagMenuIDs.UNDERGROUND_SHOW_BREADCRUMB) )
135 Debug.DrawSphere(crumb.GetPosition(),0.1, COLOR_RED, ShapeFlags.ONCE);
136 #endif
137 }
138
139 float baseDst = distances[0];
140 float sum = 0;
141
142 foreach (float dst:distances)
143 {
144 if (dst == 0)
145 dst = 0.1;
146 float dstInv = (baseDst / dst) * baseDst;
147 sum += dstInv;
149 }
150
151 float sumCheck = 0;
152 float eyeAcco = 0;
153 foreach (int i, float dstInvert:distancesInverted)
154 {
155 if ((1 << i) & excludeMask)
156 continue;
157
158 float ratio = dstInvert / sum;
159 if (ratio > MAX_RATIO)
161
162 if (ratio > RATIO_CUTOFF)
163 {
164 #ifdef DIAG_DEVELOPER
165 if (DiagMenu.GetBool(DiagMenuIDs.UNDERGROUND_SHOW_BREADCRUMB) )
166 {
167 float intensity = (1-ratio) * 255;
168 Debug.DrawLine(GetGame().GetPlayer().GetPosition() + "0 1 0", m_TransitionalTrigger.m_Data.Breadcrumbs[i].GetPosition(),ARGB(0,255,intensity,intensity),ShapeFlags.ONCE);
169 }
170 #endif
171
172 eyeAcco += ratio * m_TransitionalTrigger.m_Data.Breadcrumbs[i].EyeAccommodation;
173 }
174 }
175
177 }
PhxInteractionLayers
Definition DayZPhysics.c:2
const float DISTANCE_CUTOFF
Definition UndergroundHandlerClient.c:15
UndergroundTrigger m_TransitionalTrigger
Definition UndergroundHandlerClient.c:33
const float ACCO_MODIFIER
Definition UndergroundHandlerClient.c:16
PlayerBase m_Player
Definition UndergroundHandlerClient.c:21
const float RATIO_CUTOFF
Definition UndergroundHandlerClient.c:14
float m_EyeAccoTarget
Definition UndergroundHandlerClient.c:26
const float MAX_RATIO
Definition UndergroundHandlerClient.c:13
string m_Data
Definition UniversalTemperatureSource.c:230
Definition DayZPhysics.c:124
static proto bool RayCastBullet(vector begPos, vector endPos, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
Definition Debug.c:14
static Shape DrawLine(vector from, vector to, int color=0xFFFFFFFF, int flags=0)
Definition Debug.c:388
static Shape DrawSphere(vector pos, float size=1, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE)
Definition Debug.c:333
Definition ObjectTyped.c:2
Definition EnConvert.c:106
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto native CGame GetGame()
const int COLOR_RED
Definition constants.c:64
ShapeFlags
Definition EnDebug.c:126
int ARGB(int a, int r, int g, int b)
Definition proto.c:322

Перекрестные ссылки ACCO_MODIFIER, ARGB(), COLOR_RED, vector::Distance(), DISTANCE_CUTOFF, Debug::DrawLine(), Debug::DrawSphere(), DiagMenu::GetBool(), GetGame(), m_EyeAccoTarget, m_Player, m_TransitionalTrigger, MAX_RATIO, RATIO_CUTOFF и DayZPhysics::RayCastBullet().

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

◆ CalculateEyeAcco()

bool CalculateEyeAcco ( float timeSlice)
protected
384 {
385 if (m_TransitionalTrigger || !m_Player.m_UndergroundPresence || (m_EyeAccoTarget == 1))
386 {
390 if (Math.AbsFloat(accoDiff) < 0.01)
391 {
393 return true;
394 }
395 }
396 else
397 {
399 }
400 return false;
401 }
float m_AccoInterpolationSpeed
Definition UndergroundHandlerClient.c:27
Definition EnMath.c:7
static proto float AbsFloat(float f)
Returns absolute value.

Перекрестные ссылки Math::AbsFloat(), m_AccoInterpolationSpeed, m_EyeAcco, m_EyeAccoTarget, m_Player и m_TransitionalTrigger.

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

◆ CalculateEyeAccoTarget()

void CalculateEyeAccoTarget ( )
protected
82 {
84 return;
85
86 if (m_TransitionalTrigger.m_Data.UseLinePointFade && m_TransitionalTrigger.m_Data.Breadcrumbs.Count() >= 2)
87 {
89 }
90 else if (m_TransitionalTrigger.m_Data.Breadcrumbs.Count() >= 2)
91 {
93 }
94 }
void CalculateLinePointFade()
Definition UndergroundHandlerClient.c:179
void CalculateBreadCrumbs()
Definition UndergroundHandlerClient.c:96

Перекрестные ссылки CalculateBreadCrumbs(), CalculateLinePointFade() и m_TransitionalTrigger.

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

◆ CalculateLinePointFade()

void CalculateLinePointFade ( )
protected
180 {
184 vector playerPos = m_Player.GetPosition();
185
186 bool forceAcco;
187 float acco;
188 float accoMax = m_TransitionalTrigger.m_Data.Breadcrumbs[0].EyeAccommodation;
189 float accoMin = endPoint.EyeAccommodation;
192 float distanceToClosest;
195
196 foreach (JsonUndergroundAreaBreadcrumb point : points) //identify closest segment
197 {
198 float dist = vector.DistanceSq(playerPos, point.GetPosition());
200 {
201 if (closestPoint)
202 {
205 }
208 }
209 else if (!secondaryPoint || dist < secondaryPoint)
210 {
213 }
214
215 #ifdef DIAG_DEVELOPER
216 if (DiagMenu.GetBool(DiagMenuIDs.UNDERGROUND_SHOW_BREADCRUMB))
217 Debug.DrawSphere(point.GetPosition(),0.1, COLOR_RED, ShapeFlags.ONCE);
218 #endif
219 }
220
221 distanceBetweenPoints = vector.DistanceSq(closestPoint.GetPosition(), secondaryPoint.GetPosition());
222
223 if (closestPoint == startPoint && secondaryPoint == points[1] && distanceToSecondary > distanceBetweenPoints) // before first point, do nothing
224 acco = accoMax;
225 else if (closestPoint == endPoint && secondaryPoint == points[points.Count() - 2] && distanceToSecondary > distanceBetweenPoints) // past second point, do nothing
226 acco = accoMin;
227 else // between the two points, lerp
228 {
229 if (closestPoint == endPoint)
230 secondaryPoint = points[points.Count() - 2];
231 else if (closestPoint == startPoint)
234 {
236 if (vector.DistanceSq(playerPos, nexPoint.GetPosition()) < vector.DistanceSq(closestPoint.GetPosition(), nexPoint.GetPosition()))
238 else
239 {
240 acco = closestPoint.EyeAccommodation;
241 forceAcco = true;
242 }
243 }
244
245 if (!forceAcco)
246 {
248
250 acco = Math.Lerp(secondaryPoint.EyeAccommodation, closestPoint.EyeAccommodation, acco);
251
252 if (points.Find(closestPoint) > points.Find(secondaryPoint))
254 else
256
257 }
258 }
259
261
263 {
264 if (m_LightingLerpTarget == 1)
265 {
267 m_AnimTimerLightBlend.Run(1, this, "OnUpdateTimerIn", "OnUpdateTimerEnd",0, false, LIGHT_BLEND_SPEED_IN);
268 }
269 else
270 {
272 m_AnimTimerLightBlend.Run(0, this, "OnUpdateTimerOut", "OnUpdateTimerEnd",m_LightingLerp, false, LIGHT_BLEND_SPEED_OUT);
273 }
274 }
275
276 #ifdef DIAG_DEVELOPER
277 if (DiagMenu.GetBool(DiagMenuIDs.UNDERGROUND_SHOW_BREADCRUMB))
278 {
279 Debug.DrawLine(m_Player.GetPosition() + "0 1 0", closestPoint.GetPosition(), COLOR_YELLOW, ShapeFlags.ONCE);
280 if (acco != accoMin && acco != accoMax)
281 Debug.DrawLine(closestPoint.GetPosition(), secondaryPoint.GetPosition(), COLOR_RED, ShapeFlags.ONCE);
282
283 DbgUI.Begin(String("Underground Areas"), 20, 20);
284 DbgUI.Text(String("Closest point id: " + points.Find(closestPoint)));
285 DbgUI.Text(String("Second closest id: " + points.Find(secondaryPoint)));
286 DbgUI.End();
287 }
288 #endif
289 }
ref AnimationTimer m_AnimTimerLightBlend
Definition UndergroundHandlerClient.c:19
enum EUndergroundPresence LIGHT_BLEND_SPEED_IN
float m_LightingLerpTarget
Definition UndergroundHandlerClient.c:29
const float LIGHT_BLEND_SPEED_OUT
Definition UndergroundHandlerClient.c:12
AnimationTimer class. This timer is for animating float value. usage:
Definition tools.c:653
Definition DbgUI.c:60
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
const int COLOR_YELLOW
Definition constants.c:67
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto native void Text(string label)
static proto native void End()
string String(string s)
Helper for passing string expression to functions with void parameter. Example: Print(String("Hello "...
Definition EnScript.c:339
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.

Перекрестные ссылки ACCO_MODIFIER, DbgUI::Begin(), COLOR_RED, COLOR_YELLOW, vector::DistanceSq(), Debug::DrawLine(), Debug::DrawSphere(), DbgUI::End(), DiagMenu::GetBool(), Math::Lerp(), LIGHT_BLEND_SPEED_IN, LIGHT_BLEND_SPEED_OUT, m_AnimTimerLightBlend, m_EyeAccoTarget, m_LightingLerp, m_LightingLerpTarget, m_Player, m_TransitionalTrigger, String() и DbgUI::Text().

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

◆ EnableLights()

void EnableLights ( bool enable)
protected
469 {
470 foreach (ScriptedLightBase light:ScriptedLightBase.m_NightTimeOnlyLights)
471 {
472 light.SetVisibleDuringDaylight(enable);
473 }
474 }
Definition PointLightBase.c:2

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

◆ GetRequester()

PPERUndergroundAcco GetRequester ( )
protected
55 {
56 if (!m_Requester)
57 {
58 m_Requester = PPERUndergroundAcco.Cast(PPERequesterBank.GetRequester( PPERequesterBank.REQ_UNDERGROUND));
59 m_Requester.Start();
60 }
61 return m_Requester;
62 }
PPERUndergroundAcco m_Requester
Definition UndergroundHandlerClient.c:22

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

Используется в ApplyEyeAcco(), ProcessEyeAcco() и Managed::RegisterRequester().

◆ OnTriggerEnter()

void OnTriggerEnter ( UndergroundTrigger trigger)
protected
65 {
68
69 }
ref set< UndergroundTrigger > m_InsideTriggers
Definition UndergroundHandlerClient.c:24
void OnTriggerInsiderUpdate()
Definition UndergroundHandlerClient.c:405

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

◆ OnTriggerInsiderUpdate()

void OnTriggerInsiderUpdate ( )
protected
406 {
409 UndergroundTrigger bestTrigger;
410 m_EyeAccoTarget = 1;
412
413 foreach (auto t:m_InsideTriggers)
414 {
415 if (t.m_Type > bestType)
416 {
417 bestTrigger = t;
418 bestType = t.m_Type;
419 }
420 }
421 //Print(m_InsideTriggers.Count());
422 //Print(bestType);
423 if (bestTrigger)
424 {
425 if (bestTrigger.m_Type == EUndergroundTriggerType.TRANSITIONING)
426 {
428 }
429 m_EyeAccoTarget = bestTrigger.m_Accommodation;
430 if (bestTrigger.m_InterpolationSpeed != -1 && bestTrigger.m_InterpolationSpeed != 0)
431 m_AccoInterpolationSpeed = bestTrigger.m_InterpolationSpeed;
432 }
433
435 }
const float DEFAULT_INTERPOLATION_SPEED
Definition UndergroundHandlerClient.c:17
void SetUndergroundPresence(UndergroundTrigger trigger)
Definition UndergroundHandlerClient.c:438

Перекрестные ссылки DEFAULT_INTERPOLATION_SPEED, m_AccoInterpolationSpeed, m_EyeAccoTarget, m_InsideTriggers, m_TransitionalTrigger и SetUndergroundPresence().

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

◆ OnTriggerLeave()

void OnTriggerLeave ( UndergroundTrigger trigger)
protected
72 {
73 int index = m_InsideTriggers.Find(trigger);
74 if (index != -1)
75 {
76 m_InsideTriggers.Remove(index);
77 }
79 }

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

◆ OnUndergroundPresenceUpdate()

void OnUndergroundPresenceUpdate ( EUndergroundPresence newPresence,
EUndergroundPresence oldPresence )
protected
499 {
500 //Print("-----> On Undeground Presence update " + EnumTools.EnumToString(EUndergroundPresence, newPresence) + " " + EnumTools.EnumToString(EUndergroundPresence, oldPresence));
502 {
504 {
505 EnableLights(true);
506 }
508 {
509 GetGame().GetWeather().SuppressLightningSimulation(true);
510 m_Player.PlaySoundSetLoop(m_AmbientSound, "Underground_SoundSet",3,3);
511 }
513 {
515 m_AnimTimerLightBlend.Run(1, this, "OnUpdateTimerIn", "OnUpdateTimerEnd",0, false, LIGHT_BLEND_SPEED_IN);
516 }
517 }
519 {
521 m_AnimTimerLightBlend.Run(0, this, "OnUpdateTimerOut", "OnUpdateTimerEnd",m_LightingLerp, false, LIGHT_BLEND_SPEED_OUT);
522 }
524 {
525 GetGame().GetWeather().SuppressLightningSimulation(false);
526 if (m_AmbientSound)
527 m_Player.StopSoundSet(m_AmbientSound);
528 }
530 {
531 GetGame().GetWorld().SetUserLightingLerp(0);
532 EnableLights(false);
533 }
534 }
EffectSound m_AmbientSound
Definition UndergroundHandlerClient.c:31
void EnableLights(bool enable)
Definition UndergroundHandlerClient.c:468
EUndergroundPresence
Definition UndergroundHandlerClient.c:2

Перекрестные ссылки EnableLights(), GetGame(), LIGHT_BLEND_SPEED_IN, LIGHT_BLEND_SPEED_OUT, m_AmbientSound, m_AnimTimerLightBlend, m_LightingLerp и m_Player.

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

◆ OnUpdateTimerEnd()

void OnUpdateTimerEnd ( )
protected

◆ OnUpdateTimerIn()

void OnUpdateTimerIn ( )
protected
479 {
481 return;
482 float value01 = m_AnimTimerLightBlend.GetValue();
485
486 }
Input value between 0 and 1, returns value adjusted by easing, no automatic clamping of input(do your...
Definition Easing.c:3
static float EaseInQuint(float t)
Definition Easing.c:78

Перекрестные ссылки Easing::EaseInQuint(), m_AnimTimerLightBlend и m_LightingLerp.

◆ OnUpdateTimerOut()

void OnUpdateTimerOut ( )
protected
489 {
491 return;
492 float value01 = m_AnimTimerLightBlend.GetValue();
495 }
static float EaseOutCubic(float t)
Definition Easing.c:42

Перекрестные ссылки Easing::EaseOutCubic(), m_AnimTimerLightBlend и m_LightingLerp.

◆ ProcessEyeAcco()

void ProcessEyeAcco ( float timeSlice)
protected
292 {
295 ApplyEyeAcco();
296 if(reachedTarget && !m_Player.m_UndergroundPresence)
297 {
298 GetRequester().Stop();
300 //m_NVRequester.SetUndergroundExposureCoef(1.0);
301 m_Player.KillUndergroundHandler();
302 }
303
304 }
bool CalculateEyeAcco(float timeSlice)
Definition UndergroundHandlerClient.c:383
void ApplyEyeAcco()
Definition UndergroundHandlerClient.c:354
void CalculateEyeAccoTarget()
Definition UndergroundHandlerClient.c:81

Перекрестные ссылки ApplyEyeAcco(), CalculateEyeAcco(), CalculateEyeAccoTarget(), GetRequester(), m_Player и UpdateNVGRequester().

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

◆ ProcessLighting()

void ProcessLighting ( float timeSlice)
protected
307 {
308 #ifdef DEVELOPER
309 if (!DiagMenu.GetBool(DiagMenuIDs.UNDERGROUND_DISABLE_DARKENING) )
310 {
311 GetGame().GetWorld().SetUserLightingLerp(m_LightingLerp);
312 }
313 else
314 {
315 GetGame().GetWorld().SetUserLightingLerp(0);
316 }
317 #else
318 GetGame().GetWorld().SetUserLightingLerp(m_LightingLerp);
319 #endif
320 }

Перекрестные ссылки DiagMenu::GetBool(), GetGame() и m_LightingLerp.

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

◆ ProcessSound()

void ProcessSound ( float timeSlice)
protected
323 {
324 GetGame().GetWorld().SetExplicitVolumeFactor_EnvSounds2D(m_EyeAcco, 0);
325 if (m_AmbientSound)
326 {
328 //Print(m_AmbientSound.GetSoundVolume());
329 }
330 else
331 {
332 m_Player.PlaySoundSetLoop(m_AmbientSound, "Underground_SoundSet",3,3);
333 }
334 }
void SetSoundVolume(float volume)
Set the RELATIVE volume for the sound.
Definition EffectSound.c:836

Перекрестные ссылки GetGame(), m_AmbientSound, m_EyeAcco, m_Player и EffectSound::SetSoundVolume().

◆ SetUndergroundPresence()

void SetUndergroundPresence ( UndergroundTrigger trigger)
protected
439 {
441 EUndergroundPresence oldPresence = m_Player.m_UndergroundPresence;
442
443 if (trigger)
444 {
445 if (trigger.m_Type == EUndergroundTriggerType.OUTER)
446 {
448 }
449 else if (trigger.m_Type == EUndergroundTriggerType.TRANSITIONING)
450 {
451 newPresence = EUndergroundPresence.TRANSITIONING;
452 }
453 else if (trigger.m_Type == EUndergroundTriggerType.INNER)
454 {
456 }
457 }
458
459 if (newPresence != oldPresence)//was there a change ?
460 {
462 m_Player.SetUnderground(newPresence);
463 }
464
465
466 }
void OnUndergroundPresenceUpdate(EUndergroundPresence newPresence, EUndergroundPresence oldPresence)
Definition UndergroundHandlerClient.c:498

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

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

◆ Tick()

void Tick ( float timeSlice)
protected
337 {
338 if (!m_Player.IsAlive())
339 return;
340
344
345 #ifdef DIAG_DEVELOPER
346 if ( DiagMenu.GetBool(DiagMenuIDs.UNDERGROUND_SHOW_BREADCRUMB) )
347 {
348 DisplayDebugInfo(GetGame().GetWorld().GetEyeAccom(), m_LightingLerp);
349 }
350 #endif
351
352 }
void ProcessSound()
Definition HungerSoundHandler.c:28
void ProcessLighting(float timeSlice)
Definition UndergroundHandlerClient.c:306
void ProcessEyeAcco(float timeSlice)
Definition UndergroundHandlerClient.c:291

Перекрестные ссылки DiagMenu::GetBool(), GetGame(), m_LightingLerp, m_Player, ProcessEyeAcco(), ProcessLighting() и ProcessSound().

◆ UndergroundHandlerClient()

void UndergroundHandlerClient ( PlayerBase player)
protected
36 {
37 GetGame().GetWorld().LoadUserLightingCfg(UNDERGROUND_LIGHTING, "Underground");
39 m_NVRequester = PPERequester_CameraNV.Cast(PPERequesterBank.GetRequester( PPERequesterBank.REQ_CAMERANV));
40 }
PPERequester_CameraNV m_NVRequester
Definition UndergroundHandlerClient.c:23
const string UNDERGROUND_LIGHTING
Definition UndergroundHandlerClient.c:18

Перекрестные ссылки GetGame(), m_NVRequester, m_Player и UNDERGROUND_LIGHTING.

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

◆ UpdateNVGRequester()

void UpdateNVGRequester ( float value)
protected
379 {
380 m_NVRequester.SetUndergroundExposureCoef(value);
381 }

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

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

◆ ~UndergroundHandlerClient()

43 {
44 if (GetGame())
45 {
46 GetGame().GetWorld().SetExplicitVolumeFactor_EnvSounds2D(1, 0.5);
47 GetGame().GetWeather().SuppressLightningSimulation(false);
48 GetGame().GetWorld().SetUserLightingLerp(0);
51 }
52 }
override void Stop()
Stops sound.
Definition EffectSound.c:244

Перекрестные ссылки GetGame(), m_AmbientSound и EffectSound::Stop().

Переменные

◆ ACCO_MODIFIER

const float ACCO_MODIFIER = 1

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

◆ DEFAULT_INTERPOLATION_SPEED

const float DEFAULT_INTERPOLATION_SPEED = 7

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

◆ DISTANCE_CUTOFF

const float DISTANCE_CUTOFF = 5

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

◆ LIGHT_BLEND_SPEED_IN

enum EUndergroundPresence LIGHT_BLEND_SPEED_IN = 5

◆ LIGHT_BLEND_SPEED_OUT

const float LIGHT_BLEND_SPEED_OUT = 1.75

◆ m_AccoInterpolationSpeed

float m_AccoInterpolationSpeed
protected

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

◆ m_AmbientSound

EffectSound m_AmbientSound
protected

◆ m_AnimTimerLightBlend

ref AnimationTimer m_AnimTimerLightBlend
protected

◆ m_EyeAcco

◆ m_EyeAccoTarget

◆ m_InsideTriggers

ref set<UndergroundTrigger> m_InsideTriggers = new set<UndergroundTrigger>()
protected

◆ m_LightingLerp

◆ m_LightingLerpTarget

float m_LightingLerpTarget
protected

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

◆ m_NVRequester

PPERequester_CameraNV m_NVRequester
protected

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

◆ m_Player

PlayerBase m_Player
protected

◆ m_Requester

◆ m_TransitionalTrigger

◆ MAX_RATIO

const float MAX_RATIO = 0.9

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

◆ RATIO_CUTOFF

const float RATIO_CUTOFF = 0

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

◆ UNDERGROUND_LIGHTING

const string UNDERGROUND_LIGHTING = "dz\\data\\lighting\\lighting_underground.txt"

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