4 static bool m_PersonalLightEnabledOnCurrentServer =
false;
5 static bool m_PersonalLightDisabledByDebug =
false;
6 static bool m_PersonalLightIsSwitchedOn =
true;
11 if (!m_PersonalLight && (!
GetGame().IsServer() || !
GetGame().IsMultiplayer()))
39 super.OnGameplayDataHandlerSync();
41 UpdatePersonalLight();
42 UpdateHitDirectionValues();
51 m_PersonalLightIsSwitchedOn =
state;
52 UpdatePersonalLight();
61 CreatePersonalLight();
64 if (!
GetCLIParam(
"disablePersonalLight",
param) && !m_PersonalLightDisabledByDebug && m_PersonalLightIsSwitchedOn)
65 m_PersonalLight.SetEnabled(m_PersonalLightEnabledOnCurrentServer);
67 m_PersonalLight.SetEnabled(
false);
static bool GetDisablePersonalLight()
static void CheckValues()
range 0..180, randomized offset of direction to make it less acurate
static void CreatePersonalLight()
Creates PL if it doesn't exist already.
static void UpdateHitDirectionValues()
static void SwitchPersonalLight(bool state)
Controls the ON/OFF switch of the Personal Light. PL will still shine only if the server allows it.
override void OnGameplayDataHandlerSync()
static ScriptedLightBase m_PersonalLight
static void UpdatePersonalLight()
Updates state of PL.
proto native CGame GetGame()
proto bool GetCLIParam(string param, out string val)
Returns command line argument.