39 m_NVRequester = PPERequester_CameraNV.Cast(PPERequesterBank.GetRequester( PPERequesterBank.REQ_CAMERANV));
58 m_Requester = PPERUndergroundAcco.Cast(PPERequesterBank.GetRequester( PPERequesterBank.REQ_UNDERGROUND));
85 float closestDist =
float.MAX;
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)
224 #ifdef DIAG_DEVELOPER
235 #ifdef DIAG_DEVELOPER
248 float undergrounNVExposureCoef =
m_EyeAcco;
251 undergrounNVExposureCoef = 1.0;
253 m_NVRequester.SetUndergroundExposureCoef(undergrounNVExposureCoef);
280 EUndergroundTriggerType bestType = EUndergroundTriggerType.UNDEFINED;
282 UndergroundTrigger bestTrigger;
288 if (t.m_Type > bestType)
298 if (bestTrigger.m_Type == EUndergroundTriggerType.TRANSITIONING)
303 if (bestTrigger.m_InterpolationSpeed != -1 && bestTrigger.m_InterpolationSpeed != 0)
318 if (trigger.m_Type == EUndergroundTriggerType.OUTER)
322 else if (trigger.m_Type == EUndergroundTriggerType.TRANSITIONING)
326 else if (trigger.m_Type == EUndergroundTriggerType.INNER)
332 if (newPresence != oldPresence)
335 m_Player.SetUnderground(newPresence);
345 light.SetVisibleDuringDaylight(enable);
409 #ifdef DIAG_DEVELOPER
410 protected void DisplayDebugInfo(
float acco,
float lighting)
void UndergroundHandlerClient(PlayerBase player)
const float DEFAULT_INTERPOLATION_SPEED
const float DISTANCE_CUTOFF
private ref set< UndergroundTrigger > m_InsideTriggers
private void CalculateEyeAccoTarget()
private void OnUndergroundPresenceUpdate(EUndergroundPresence newPresence, EUndergroundPresence oldPresence)
void OnTriggerLeave(UndergroundTrigger trigger)
const float ACCO_MODIFIER
private float m_LightingLerpTarget
private EffectSound m_AmbientSound
enum EUndergroundPresence LIGHT_BLEND_SPEED_IN
private bool CalculateEyeAcco(float timeSlice)
private ref AnimationTimer m_AnimTimerLightBlend
private void OnTriggerInsiderUpdate()
private PPERequester_CameraNV m_NVRequester
private UndergroundTrigger m_TransitionalTrigger
private void SetUndergroundPresence(UndergroundTrigger trigger)
private float m_EyeAccoTarget
const float LIGHT_BLEND_SPEED_OUT
void ~UndergroundHandlerClient()
private void ApplyEyeAcco()
void OnTriggerEnter(UndergroundTrigger trigger)
private PPERUndergroundAcco m_Requester
private void EnableLights(bool enable)
const string UNDERGROUND_LIGHTING
private float m_LightingLerp
private PPERUndergroundAcco GetRequester()
private void ProcessLighting(float timeSlice)
private float m_AccoInterpolationSpeed
private void ProcessEyeAcco(float timeSlice)
AnimationTimer class. This timer is for animating float value. usage:
void Run(float targetVal, Managed obj, string updateFunc, string finishedFunc, float startingVal=0, bool loop=false, float speed=1.0, Param params=null, int category=CALL_CATEGORY_SYSTEM)
float GetValue()
Returns actual animated value.
proto native DayZPlayer GetPlayer()
proto native World GetWorld()
proto native Weather GetWeather()
Returns weather controller object.
static proto bool RayCastBullet(vector begPos, vector endPos, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
static Shape DrawLine(vector from, vector to, int color=0xFFFFFFFF, int flags=0)
static Shape DrawSphere(vector pos, float size=1, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE)
Input value between 0 and 1, returns value adjusted by easing, no automatic clamping of input(do your...
static float EaseInQuint(float t)
static float EaseOutCubic(float t)
Wrapper class for managing sound through SEffectManager.
void SetSoundVolume(float volume)
Set the RELATIVE volume for the sound.
override void Stop()
Stops sound.
proto native void SuppressLightningSimulation(bool state)
enables/disables thunderbolt simulation on client (together with sounds)
proto native void SetUserLightingLerp(float val)
proto native void LoadUserLightingCfg(string path, string name)
proto native void SetExplicitVolumeFactor_EnvSounds2D(float factor, float fadeTime)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto native CGame GetGame()
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 "...
static proto float AbsFloat(float f)
Returns absolute value.
int ARGB(int a, int r, int g, int b)