24 protected ref set<UndergroundTrigger>
m_InsideTriggers =
new set<UndergroundTrigger>();
39 m_NVRequester = PPERequester_CameraNV.Cast(PPERequesterBank.GetRequester( PPERequesterBank.REQ_CAMERANV));
46 GetGame().GetWorld().SetExplicitVolumeFactor_EnvSounds2D(1, 0.5);
47 GetGame().GetWeather().SuppressLightningSimulation(
false);
48 GetGame().GetWorld().SetUserLightingLerp(0);
58 m_Requester = PPERUndergroundAcco.Cast(PPERequesterBank.GetRequester( PPERequesterBank.REQ_UNDERGROUND));
85 float closestDist =
float.MAX;
97 float dist =
vector.Distance(
m_Player.GetPosition(), crumb.GetPosition());
101 if (crumbRadius != -1)
103 maxRadiusAllowed = crumbRadius;
105 if (dist > maxRadiusAllowed)
107 excludeMask = (excludeMask | (1 << indx));
111 int idx =
m_Player.GetBoneIndexByName(
"Head");
113 vector rayEnd = crumb.GetPosition();
120 excludeMask = (excludeMask | (1 << indx));
124 distances.Insert(dist);
126 #ifdef DIAG_DEVELOPER
133 float baseDst = distances[0];
136 foreach (
float dst:distances)
140 float dstInv = (baseDst / dst) * baseDst;
142 distancesInverted.Insert(dstInv);
146 foreach (
int i,
float dstInvert:distancesInverted)
152 if ((1 << i) & excludeMask)
154 float ratio = dstInvert / sum;
159 #ifdef DIAG_DEVELOPER
162 float intensity = (1-ratio) * 255;
180 if(reachedTarget && !
m_Player.m_UndergroundPresence)
199 GetGame().GetWorld().SetUserLightingLerp(0);
229 #ifdef DIAG_DEVELOPER
240 #ifdef DIAG_DEVELOPER
253 float undergrounNVExposureCoef =
m_EyeAcco;
256 undergrounNVExposureCoef = 1.0;
274 if (
Math.AbsFloat(accoDiff) < 0.01)
291 EUndergroundTriggerType bestType = EUndergroundTriggerType.UNDEFINED;
293 UndergroundTrigger bestTrigger;
299 if (t.m_Type > bestType)
309 if (bestTrigger.m_Type == EUndergroundTriggerType.TRANSITIONING)
314 if (bestTrigger.m_InterpolationSpeed != -1 && bestTrigger.m_InterpolationSpeed != 0)
329 if (trigger.m_Type == EUndergroundTriggerType.OUTER)
333 else if (trigger.m_Type == EUndergroundTriggerType.TRANSITIONING)
337 else if (trigger.m_Type == EUndergroundTriggerType.INNER)
343 if (newPresence != oldPresence)
346 m_Player.SetUnderground(newPresence);
356 light.SetVisibleDuringDaylight(enable);
367 float result =
Easing.EaseInQuint(value01);
377 float result =
Easing.EaseOutCubic(value01);
393 GetGame().GetWeather().SuppressLightningSimulation(
true);
409 GetGame().GetWeather().SuppressLightningSimulation(
false);
415 GetGame().GetWorld().SetUserLightingLerp(0);
420 #ifdef DIAG_DEVELOPER
421 protected void DisplayDebugInfo(
float acco,
float lighting)
426 DbgUI.Text(
String(
"Eye Accomodation: " + acco.ToString()));
427 DbgUI.Text(
String(
"Lighting lerp: " + lighting.ToString()));