![]() |
Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
|
Protected Member Functions | |
| void | ~ScriptedLightBase () |
| override void | EOnInit (IEntity other, int extra) |
| override bool | IsScriptedLight () |
| void | ScriptedLightBase () |
| Constructor. Everything here is executed before the constructor of all children. | |
| void | UpdateMode () |
Protected Attributes | |
| vector | m_DancingShadowsLocalPos |
| ref Timer | m_DeleteTimer |
| int | m_HiddenSelectionID |
| bool | m_IsDebugEnabled = false |
| ref LightDimming | m_LightDimming |
| vector | m_LocalOri |
| vector | m_LocalPos |
| Object | m_Parent |
Static Protected Attributes | |
| static ref set< ScriptedLightBase > | m_NightTimeOnlyLights = new set<ScriptedLightBase>() |
Private Member Functions | |
| void | AddLifetime (float life_in_s) |
| Prolongs the lifetime of the light in seconds. Use negative number to shorten its lifetime. | |
| void | AttachOnMemoryPoint (Object parent, string memory_point_start, string memory_point_target="") |
| Attaches this light on the parent entity's memory point, with optional direction target memory point. | |
| void | AttachOnObject (Object parent, vector local_pos="0 0 0", vector local_ori="0 0 0") |
| Attaches this light on the parent entity, with optional position and orientation offset. | |
| void | CheckFadeOut (int current_time) |
| void | CheckIfParentIsInCargo () |
| bool | CheckLifetime (int current_time) |
| void | CorrectLightPulseDuringDaylight () |
| Call this after using SetBrightness(...) to fix light's intensity during daytime. | |
| void | DeleteLightNow () |
| void | DeleteLightWithDelay () |
| Correct way of deleting light from memory. It is necesarry to have this delay due to hierarchy. | |
| void | Destroy () |
| Switches off the light and deletes it from memory. | |
| void | DetachFromParent () |
| Detaches this light from its parent entity. | |
| void | EnableDebug (bool state) |
| Enables some debug functionality of this light. | |
| void | EnableDimming (float baseBrightness, DimmingConfig dimCfg) |
| override void | EOnFrame (IEntity other, float timeSlice) |
| On frame event. If you want to control your light within your own rules then override the event OnFrameLightSource and put your code there. | |
| void | FadeBrightnessTo (float value, float time_in_s) |
| Fades the brightness of the light to the given value. | |
| void | FadeIn (float time_in_s) |
| Makes the light fade into existence. Works only at the moment the light is created. Consider using FadeBrightnessTo(...) and FadeRadiusTo(...) at anytime later during lifetime. | |
| void | FadeOut (float time_in_s=-1) |
| Starts the fade out process and destroys the light when its done. Optional parameter allows you to set time of this fade out in seconds. If not set, then default value (from SetFadeOutTime(...)) is used. | |
| void | FadeRadiusTo (float value, float time_in_s) |
| Fades the radius of the light to the given value. | |
| Object | GetAttachmentParent () |
| Returns attachment parent. | |
| float | GetBlinkingSpeed () |
| Returns the speed of blinks. | |
| float | GetDancingShadowsAmplitude () |
| Returns max movement range of pointlight within the dancing shadow effect. | |
| float | GetDancingShadowsMovementSpeed () |
| Returns max movement speed of pointlight within the dancing shadow effect. | |
| LightDimming | GetDimming () |
| float | GetDisableShadowsWithinRadius () |
| Returns the range you put inside SetDisableShadowsWithinRadius(...). | |
| float | GetFlickerAmplitudeCoefMax () |
| Returns flicker amplitude maximum. | |
| float | GetFlickerAmplitudeCoefMin () |
| Returns flicker amplitude minimum. | |
| float | GetFlickerSpeed () |
| Returns flicker speed. | |
| void | HandleBlinking (float time) |
| void | HandleBrightnessFadeing (float timeSlice) |
| void | HandleDancingShadows (float time, float timeSlice) |
| void | HandleFlickering (float time, float timeSlice) |
| void | HandleRadiusFadeing (float timeSlice) |
| void | OnFrameLightSource (IEntity other, float timeSlice) |
| Override this for custom functionality. | |
| void | SetBlinkingSpeed (float _speed) |
| Sets blinking speed (no blinking if speed <= 0). | |
| void | SetBrightnessTo (float value) |
| Sets the brightness of the light. | |
| void | SetDancingShadowsAmplitude (float max_deviation_in_meters) |
| Sets the maximum range of the point light within the dancing shadows effect. | |
| void | SetDancingShadowsMovementSpeed (float speed_in_meters_per_frame) |
| Sets the maximum speed of the point light within the dancing shadows effect. | |
| void | SetDisableShadowsWithinRadius (float radius_in_m) |
| When the light source gets within this radius (radius_in_m) around the camera, then it's shadows are disabled. | |
| void | SetFadeOutTime (float time_in_s) |
| Sets the fade out time in seconds. Fade out begins automatically as the light nears the end of its life time, or when method FadeOut() is called. | |
| void | SetFlickerAmplitude (float coef) |
| Sets the change coefficient of flickering light. (0.0 - 1.0 values, result of greater values are period time of light off ). | |
| void | SetFlickerAmplitudeMax (float coef) |
| void | SetFlickerAmplitudeMin (float coef) |
| void | SetFlickerSpeed (float speed) |
| Sets speed of light flickering (random brightness coefficient change per second). | |
| void | SetLifetime (float life_in_s) |
| Makes the light destroy itself after the given time in seconds. The light will fade out if it's set to do so with SetFadeOutTime(...). | |
| void | SetRadiusTo (float value) |
| Sets the radius of the light. | |
| void | SetSelectionID (int id) |
| void | StopDimming () |
| void | TryShadowOptimization () |
| Optimizes shadows by disabling them on this light source while it's within the given radius around the camera. | |
| void | UpdateLightMode (string slotName) |
| void | UpdateLightSourceMaterial (string path) |
Static Private Member Functions | |
| static ScriptedLightBase | CreateLight (typename name, vector global_pos="0 0 0", float fade_in_time_in_s=0) |
| Creates an instance of light on the given position. Optionally, use fade_in_time_in_s parameter to make the light fade into existence. | |
| static ScriptedLightBase | CreateLightAtObjMemoryPoint (typename name, notnull Object target, string memory_point_start, string memory_point_target="", vector global_pos="0 0 0", float fade_in_time_in_s=0) |
Definition at line 10 of file scriptedlightbase.c.
|
inlineprotected |
Definition at line 55 of file scriptedlightbase.c.
References m_NightTimeOnlyLights.
|
inlineprivate |
Prolongs the lifetime of the light in seconds. Use negative number to shorten its lifetime.
Definition at line 376 of file scriptedlightbase.c.
References m_LifetimeEnd.
|
inlineprivate |
Attaches this light on the parent entity's memory point, with optional direction target memory point.
Definition at line 162 of file scriptedlightbase.c.
References AttachOnObject(), vector::Direction(), ErrorEx, m_LocalPos, UpdateMode(), and vector::VectorToAngles().
|
inlineprivate |
Attaches this light on the parent entity, with optional position and orientation offset.
Definition at line 127 of file scriptedlightbase.c.
References m_LocalOri, m_LocalPos, m_Parent, and SetPosition().
Referenced by AttachOnMemoryPoint().
|
inlineprivate |
Definition at line 645 of file scriptedlightbase.c.
References FadeBrightnessTo(), FadeRadiusTo(), m_FadeInTime, m_FadeOutTime, and m_LifetimeEnd.
Referenced by EOnFrame().
|
inlineprivate |
Definition at line 593 of file scriptedlightbase.c.
References GameInventory::IsInCargo(), m_Parent, and SetEnabled().
Referenced by EOnFrame().
Definition at line 633 of file scriptedlightbase.c.
References Destroy(), and m_LifetimeEnd.
Referenced by EOnFrame().
|
inlineprivate |
Call this after using SetBrightness(...) to fix light's intensity during daytime.
Definition at line 264 of file scriptedlightbase.c.
References m_Brightness, and m_BrightnessPulse.
Referenced by HandleBrightnessFadeing(), and SetBrightnessTo().
|
inlinestaticprivate |
Creates an instance of light on the given position. Optionally, use fade_in_time_in_s parameter to make the light fade into existence.
Definition at line 224 of file scriptedlightbase.c.
References Error(), g_Game, name, and ScriptedLightBase().
|
inlinestaticprivate |
Definition at line 212 of file scriptedlightbase.c.
References CreateLight(), name, and ScriptedLightBase().
|
inlineprivate |
|
inlineprivate |
Correct way of deleting light from memory. It is necesarry to have this delay due to hierarchy.
Definition at line 106 of file scriptedlightbase.c.
References CALL_CATEGORY_SYSTEM, DetachFromParent(), g_Game, and m_DeleteTimer.
Referenced by Destroy().
|
inlineprivate |
Switches off the light and deletes it from memory.
Definition at line 323 of file scriptedlightbase.c.
References DeleteLightNow(), DeleteLightWithDelay(), m_Parent, and SetEnabled().
|
inlineprivate |
Detaches this light from its parent entity.
Definition at line 192 of file scriptedlightbase.c.
References GetParent(), m_LocalOri, m_LocalPos, m_Parent, and Vector().
Referenced by DeleteLightWithDelay().
|
inlineprivate |
Enables some debug functionality of this light.
Definition at line 457 of file scriptedlightbase.c.
References m_IsDebugEnabled.
|
inlineprivate |
Definition at line 750 of file scriptedlightbase.c.
References LightDimming(), and m_LightDimming.
On frame event. If you want to control your light within your own rules then override the event OnFrameLightSource and put your code there.
Definition at line 388 of file scriptedlightbase.c.
References CheckFadeOut(), CheckIfParentIsInCargo(), CheckLifetime(), g_Game, HandleBlinking(), HandleBrightnessFadeing(), HandleDancingShadows(), HandleFlickering(), HandleRadiusFadeing(), m_LifetimeStart, m_LightDimming, m_Radius, OnFrameLightSource(), SetRadius(), and TryShadowOptimization().
Definition at line 67 of file scriptedlightbase.c.
References g_Game, and m_NightTimeOnlyLights.
Fades the brightness of the light to the given value.
Definition at line 285 of file scriptedlightbase.c.
References Math::AbsFloat(), m_Brightness, m_BrightnessSpeedOfChange, and m_BrightnessTarget.
Referenced by CheckFadeOut(), FadeIn(), and FadeOut().
|
inlineprivate |
Makes the light fade into existence. Works only at the moment the light is created. Consider using FadeBrightnessTo(...) and FadeRadiusTo(...) at anytime later during lifetime.
Definition at line 368 of file scriptedlightbase.c.
References FadeBrightnessTo(), m_Brightness, and SetBrightnessTo().
|
inlineprivate |
Starts the fade out process and destroys the light when its done. Optional parameter allows you to set time of this fade out in seconds. If not set, then default value (from SetFadeOutTime(...)) is used.
Definition at line 347 of file scriptedlightbase.c.
References FadeBrightnessTo(), FadeRadiusTo(), m_FadeOutTime, and SetLifetime().
Fades the radius of the light to the given value.
Definition at line 308 of file scriptedlightbase.c.
References Math::AbsFloat(), m_Radius, m_RadiusSpeedOfChange, and m_RadiusTarget.
Referenced by CheckFadeOut(), and FadeOut().
|
inlineprivate |
|
inlineprivate |
Returns the speed of blinks.
Definition at line 729 of file scriptedlightbase.c.
References m_BlinkingSpeed.
|
inlineprivate |
Returns max movement range of pointlight within the dancing shadow effect.
Definition at line 431 of file scriptedlightbase.c.
References m_DancingShadowsAmplitude.
|
inlineprivate |
Returns max movement speed of pointlight within the dancing shadow effect.
Definition at line 437 of file scriptedlightbase.c.
References m_DancingShadowsSpeed.
|
inlineprivate |
Definition at line 756 of file scriptedlightbase.c.
References LightDimming(), and m_LightDimming.
|
inlineprivate |
Returns the range you put inside SetDisableShadowsWithinRadius(...).
Definition at line 588 of file scriptedlightbase.c.
References m_OptimizeShadowsRadius.
|
inlineprivate |
Returns flicker amplitude maximum.
Definition at line 552 of file scriptedlightbase.c.
References m_BrightnessPulseAmplitudeMax.
|
inlineprivate |
Returns flicker amplitude minimum.
Definition at line 558 of file scriptedlightbase.c.
References m_BrightnessPulseAmplitudeMin.
|
inlineprivate |
Returns flicker speed.
Definition at line 546 of file scriptedlightbase.c.
References m_BrightnessPulseSpeed.
|
inlineprivate |
Definition at line 735 of file scriptedlightbase.c.
References m_BlinkingSpeed, m_Brightness, Math::Round(), and Math::Sin().
Referenced by EOnFrame().
|
inlineprivate |
Definition at line 659 of file scriptedlightbase.c.
References CorrectLightPulseDuringDaylight(), Destroy(), m_Brightness, m_BrightnessPulse, m_BrightnessSpeedOfChange, and m_BrightnessTarget.
Referenced by EOnFrame().
Definition at line 463 of file scriptedlightbase.c.
References ParticleList::DEBUG_DOT, GetPosition(), m_DancingShadowsAmplitude, m_DancingShadowsLocalPos, m_DancingShadowsSpeed, m_IsDebugEnabled, m_LocalPos, m_Parent, ParticleManager(), Math::RandomFloat(), Particle::SetParticleParam(), SetPosition(), and Vector().
Referenced by EOnFrame().
Definition at line 503 of file scriptedlightbase.c.
References m_BrightnessPulse, m_BrightnessPulseAmplitudeMax, m_BrightnessPulseAmplitudeMin, m_BrightnessPulseSpeed, and Math::RandomFloat().
Referenced by EOnFrame().
|
inlineprivate |
Definition at line 692 of file scriptedlightbase.c.
References Destroy(), m_Radius, m_RadiusSpeedOfChange, m_RadiusTarget, and SetRadius().
Referenced by EOnFrame().
|
inlineprotected |
Definition at line 78 of file scriptedlightbase.c.
Override this for custom functionality.
Definition at line 382 of file scriptedlightbase.c.
Referenced by EOnFrame().
|
inlineprotected |
Constructor. Everything here is executed before the constructor of all children.
Definition at line 47 of file scriptedlightbase.c.
References g_Game, m_LifetimeStart, and SetEnabled().
Referenced by CreateLight(), and CreateLightAtObjMemoryPoint().
|
inlineprivate |
Sets blinking speed (no blinking if speed <= 0).
Definition at line 723 of file scriptedlightbase.c.
References m_BlinkingSpeed.
|
inlineprivate |
Sets the brightness of the light.
Definition at line 255 of file scriptedlightbase.c.
References CorrectLightPulseDuringDaylight(), m_Brightness, m_BrightnessPulse, and m_BrightnessTarget.
Referenced by FadeIn().
|
inlineprivate |
Sets the maximum range of the point light within the dancing shadows effect.
Definition at line 419 of file scriptedlightbase.c.
References Math::AbsFloat(), and m_DancingShadowsAmplitude.
|
inlineprivate |
Sets the maximum speed of the point light within the dancing shadows effect.
Definition at line 425 of file scriptedlightbase.c.
References Math::AbsFloat(), and m_DancingShadowsSpeed.
|
inlineprivate |
When the light source gets within this radius (radius_in_m) around the camera, then it's shadows are disabled.
Definition at line 582 of file scriptedlightbase.c.
References m_OptimizeShadowsRadius.
|
inlineprivate |
Sets the fade out time in seconds. Fade out begins automatically as the light nears the end of its life time, or when method FadeOut() is called.
Definition at line 341 of file scriptedlightbase.c.
References m_FadeOutTime.
|
inlineprivate |
Sets the change coefficient of flickering light. (0.0 - 1.0 values, result of greater values are period time of light off ).
Definition at line 529 of file scriptedlightbase.c.
References Math::AbsFloat(), m_BrightnessPulseAmplitudeMax, and m_BrightnessPulseAmplitudeMin.
|
inlineprivate |
Definition at line 535 of file scriptedlightbase.c.
References m_BrightnessPulseAmplitudeMax.
|
inlineprivate |
Definition at line 540 of file scriptedlightbase.c.
References m_BrightnessPulseAmplitudeMin.
|
inlineprivate |
Sets speed of light flickering (random brightness coefficient change per second).
Definition at line 523 of file scriptedlightbase.c.
References m_BrightnessPulseSpeed.
|
inlineprivate |
Makes the light destroy itself after the given time in seconds. The light will fade out if it's set to do so with SetFadeOutTime(...).
Definition at line 334 of file scriptedlightbase.c.
References g_Game, and m_LifetimeEnd.
Referenced by FadeOut().
|
inlineprivate |
Sets the radius of the light.
Definition at line 300 of file scriptedlightbase.c.
References m_Radius, m_RadiusTarget, and SetRadius().
|
inlineprivate |
Definition at line 443 of file scriptedlightbase.c.
References m_HiddenSelectionID.
|
inlineprivate |
Definition at line 761 of file scriptedlightbase.c.
References m_LightDimming.
|
inlineprivate |
Optimizes shadows by disabling them on this light source while it's within the given radius around the camera.
Definition at line 564 of file scriptedlightbase.c.
References vector::Distance(), g_Game, GetPosition(), and m_OptimizeShadowsRadius.
Referenced by EOnFrame().
|
private |
References slotName.
Referenced by UpdateMode().
|
inlineprivate |
Definition at line 449 of file scriptedlightbase.c.
References m_HiddenSelectionID, m_Parent, and path.
|
inlineprotected |
Definition at line 83 of file scriptedlightbase.c.
References InventoryLocation::GetSlot(), InventorySlots::GetSlotName(), InventoryLocation::GetType(), m_Parent, slotName, and UpdateLightMode().
Referenced by AttachOnMemoryPoint().
|
private |
Definition at line 31 of file scriptedlightbase.c.
Referenced by GetBlinkingSpeed(), HandleBlinking(), and SetBlinkingSpeed().
|
private |
Definition at line 18 of file scriptedlightbase.c.
Referenced by CorrectLightPulseDuringDaylight(), FadeBrightnessTo(), FadeIn(), HandleBlinking(), HandleBrightnessFadeing(), and SetBrightnessTo().
|
private |
Definition at line 19 of file scriptedlightbase.c.
Referenced by CorrectLightPulseDuringDaylight(), HandleBrightnessFadeing(), HandleFlickering(), and SetBrightnessTo().
|
private |
Definition at line 21 of file scriptedlightbase.c.
Referenced by GetFlickerAmplitudeCoefMax(), HandleFlickering(), SetFlickerAmplitude(), and SetFlickerAmplitudeMax().
|
private |
Definition at line 22 of file scriptedlightbase.c.
Referenced by GetFlickerAmplitudeCoefMin(), HandleFlickering(), SetFlickerAmplitude(), and SetFlickerAmplitudeMin().
|
private |
Definition at line 20 of file scriptedlightbase.c.
Referenced by GetFlickerSpeed(), HandleFlickering(), and SetFlickerSpeed().
|
private |
Definition at line 24 of file scriptedlightbase.c.
Referenced by FadeBrightnessTo(), and HandleBrightnessFadeing().
|
private |
Definition at line 23 of file scriptedlightbase.c.
Referenced by FadeBrightnessTo(), HandleBrightnessFadeing(), and SetBrightnessTo().
|
private |
Definition at line 28 of file scriptedlightbase.c.
Referenced by GetDancingShadowsAmplitude(), HandleDancingShadows(), and SetDancingShadowsAmplitude().
|
protected |
Definition at line 39 of file scriptedlightbase.c.
Referenced by HandleDancingShadows().
|
private |
Definition at line 29 of file scriptedlightbase.c.
Referenced by GetDancingShadowsMovementSpeed(), HandleDancingShadows(), and SetDancingShadowsMovementSpeed().
|
protected |
Definition at line 41 of file scriptedlightbase.c.
Referenced by DeleteLightWithDelay().
|
private |
Definition at line 15 of file scriptedlightbase.c.
Referenced by CheckFadeOut().
|
private |
Definition at line 14 of file scriptedlightbase.c.
Referenced by CheckFadeOut(), FadeOut(), and SetFadeOutTime().
|
protected |
Definition at line 32 of file scriptedlightbase.c.
Referenced by SetSelectionID(), and UpdateLightSourceMaterial().
|
protected |
Definition at line 34 of file scriptedlightbase.c.
Referenced by EnableDebug(), and HandleDancingShadows().
|
private |
Definition at line 13 of file scriptedlightbase.c.
Referenced by AddLifetime(), CheckFadeOut(), CheckLifetime(), and SetLifetime().
|
private |
Definition at line 12 of file scriptedlightbase.c.
Referenced by EOnFrame(), and ScriptedLightBase().
|
protected |
Definition at line 42 of file scriptedlightbase.c.
Referenced by EnableDimming(), EOnFrame(), GetDimming(), and StopDimming().
|
protected |
Definition at line 38 of file scriptedlightbase.c.
Referenced by AttachOnObject(), and DetachFromParent().
|
protected |
Definition at line 37 of file scriptedlightbase.c.
Referenced by AttachOnMemoryPoint(), AttachOnObject(), DetachFromParent(), and HandleDancingShadows().
|
staticprotected |
Definition at line 44 of file scriptedlightbase.c.
Referenced by ~ScriptedLightBase(), and EOnInit().
|
private |
Definition at line 26 of file scriptedlightbase.c.
Referenced by GetDisableShadowsWithinRadius(), SetDisableShadowsWithinRadius(), and TryShadowOptimization().
|
protected |
Definition at line 36 of file scriptedlightbase.c.
Referenced by AttachOnObject(), CheckIfParentIsInCargo(), Destroy(), DetachFromParent(), GetAttachmentParent(), HandleDancingShadows(), UpdateLightSourceMaterial(), and UpdateMode().
|
private |
Definition at line 16 of file scriptedlightbase.c.
Referenced by EOnFrame(), FadeRadiusTo(), HandleRadiusFadeing(), and SetRadiusTo().
|
private |
Definition at line 25 of file scriptedlightbase.c.
Referenced by FadeRadiusTo(), and HandleRadiusFadeing().
|
private |
Definition at line 17 of file scriptedlightbase.c.
Referenced by FadeRadiusTo(), HandleRadiusFadeing(), and SetRadiusTo().