DayZ 1.24
Loading...
Searching...
No Matches
PlayerBase Class Reference
Collaboration diagram for PlayerBase:
[legend]

Private Member Functions

override void OnGameplayDataHandlerSync ()
 

Static Private Member Functions

static void CreatePersonalLight ()
 Creates PL if it doesn't exist already.
 
static void SwitchPersonalLight (bool state)
 Controls the ON/OFF switch of the Personal Light. PL will still shine only if the server allows it.
 
static void UpdatePersonalLight ()
 Updates state of PL.
 
static void UpdateHitDirectionValues ()
 

Static Private Attributes

static ScriptedLightBase m_PersonalLight
 
static bool m_PersonalLightEnabledOnCurrentServer = false
 
static bool m_PersonalLightDisabledByDebug = false
 
static bool m_PersonalLightIsSwitchedOn = true
 

Detailed Description

Definition at line 1 of file PlayerBaseClient.c.

Member Function Documentation

◆ CreatePersonalLight()

static void PlayerBase::CreatePersonalLight ( )
inlinestaticprivate

Creates PL if it doesn't exist already.

Definition at line 9 of file PlayerBaseClient.c.

10 {
11 if (!m_PersonalLight && (!GetGame().IsServer() || !GetGame().IsMultiplayer()))
12 m_PersonalLight = ScriptedLightBase.CreateLight(PersonalLight, "0 0 0");
13 }
static ScriptedLightBase m_PersonalLight
proto native CGame GetGame()

References GetGame().

◆ OnGameplayDataHandlerSync()

override void PlayerBase::OnGameplayDataHandlerSync ( )
inlineprivate

Definition at line 37 of file PlayerBaseClient.c.

38 {
39 super.OnGameplayDataHandlerSync();
43 }
static bool GetDisablePersonalLight()
static void UpdateHitDirectionValues()
static bool m_PersonalLightEnabledOnCurrentServer
static void UpdatePersonalLight()
Updates state of PL.

References CfgGameplayHandler::GetDisablePersonalLight().

Referenced by ManBase::OnSelectPlayer().

◆ SwitchPersonalLight()

static void PlayerBase::SwitchPersonalLight ( bool state)
inlinestaticprivate

Controls the ON/OFF switch of the Personal Light. PL will still shine only if the server allows it.

Definition at line 47 of file PlayerBaseClient.c.

48 {
49 if (!GetGame().IsServer() || !GetGame().IsMultiplayer())
50 {
53 }
54 }
static bool m_PersonalLightIsSwitchedOn

References GetGame().

◆ UpdateHitDirectionValues()

static void PlayerBase::UpdateHitDirectionValues ( )
inlinestaticprivate

Definition at line 70 of file PlayerBaseClient.c.

71 {
73 }
static void CheckValues()
range 0..180, randomized offset of direction to make it less acurate

References HitDirectionEffectBase::CheckValues().

◆ UpdatePersonalLight()

static void PlayerBase::UpdatePersonalLight ( )
inlinestaticprivate

Updates state of PL.

Definition at line 57 of file PlayerBaseClient.c.

58 {
59 string param;
60
62
63 // Allow PL unless it's disabled by debug or client-side starting parameter
66 else
67 m_PersonalLight.SetEnabled(false);
68 }
static bool m_PersonalLightDisabledByDebug
static void CreatePersonalLight()
Creates PL if it doesn't exist already.
proto bool GetCLIParam(string param, out string val)
Returns command line argument.

References GetCLIParam().

Member Data Documentation

◆ m_PersonalLight

ScriptedLightBase PlayerBase::m_PersonalLight
staticprivate

Definition at line 3 of file PlayerBaseClient.c.

◆ m_PersonalLightDisabledByDebug

bool PlayerBase::m_PersonalLightDisabledByDebug = false
staticprivate

Definition at line 5 of file PlayerBaseClient.c.

◆ m_PersonalLightEnabledOnCurrentServer

bool PlayerBase::m_PersonalLightEnabledOnCurrentServer = false
staticprivate

Definition at line 4 of file PlayerBaseClient.c.

◆ m_PersonalLightIsSwitchedOn

bool PlayerBase::m_PersonalLightIsSwitchedOn = true
staticprivate

Definition at line 6 of file PlayerBaseClient.c.


The documentation for this class was generated from the following file: