DayZ 1.24
Loading...
Searching...
No Matches
DeveloperFreeCamera Class Reference

Static Protected Member Functions

static void EnableFreeCamera (PlayerBase player)
 
static void DisableFreeCamera (PlayerBase player, bool teleport_player=false)
 
static void OnSetFreeCameraEvent (PlayerBase player, FreeDebugCamera camera)
 

Static Private Member Functions

static void OnInit ()
 
static void FreeCameraToggle (PlayerBase player, bool teleport_player=false)
 Enable / Disable Free camera (Fly mod) - disable of camera will teleport player at current free camera position.
 
static void EnableFreeCameraSceneEditor (PlayerBase player)
 
static bool IsFreeCameraEnabled ()
 

Detailed Description

Definition at line 1 of file DeveloperFreeCamera.c.

Member Function Documentation

◆ DisableFreeCamera()

static void DeveloperFreeCamera::DisableFreeCamera ( PlayerBase player,
bool teleport_player = false )
inlinestaticprotected

Definition at line 38 of file DeveloperFreeCamera.c.

39 {
40 if (player)
41 {
42 if (FreeDebugCamera.GetInstance().IsActive())
43 {
46
47 FreeDebugCamera.GetInstance().SetActive(false);
48
49#ifdef DEVELOPER
50 if (GetGame().GetMission())
51 GetGame().GetMission().RefreshCrosshairVisibility();
52#endif
53 }
54 }
55 else
56 Debug.LogError("DisableFreeCamera( PlayerBase player, bool teleport_player ) -> player is NULL", "DeveloperFreeCamera");
57 }
Definition Debug.c:14
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition Debug.c:341
static void TeleportAtCursorEx()
proto native CGame GetGame()

References GetGame(), Debug::LogError(), and DeveloperTeleport::TeleportAtCursorEx().

Referenced by FreeCameraToggle(), UIScriptedMenu::Play(), and UIScriptedMenu::~CameraToolsMenu().

◆ EnableFreeCamera()

static void DeveloperFreeCamera::EnableFreeCamera ( PlayerBase player)
inlinestaticprotected

Definition at line 24 of file DeveloperFreeCamera.c.

25 {
26 if (player)
27 {
28 FreeDebugCamera.GetInstance().SetActive(true);
29
30#ifdef DEVELOPER
31 GetGame().GetMission().RefreshCrosshairVisibility();
32#endif
33 }
34 else
35 Debug.LogError("EnableFreeCamera( PlayerBase player ) -> player is NULL", "DeveloperFreeCamera");
36 }

References GetGame(), and Debug::LogError().

Referenced by EnableFreeCameraSceneEditor(), and FreeCameraToggle().

◆ EnableFreeCameraSceneEditor()

static void DeveloperFreeCamera::EnableFreeCameraSceneEditor ( PlayerBase player)
inlinestaticprivate

Definition at line 14 of file DeveloperFreeCamera.c.

15 {
17 }
static void EnableFreeCamera(PlayerBase player)

References EnableFreeCamera().

Referenced by UIScriptedMenu::Init(), PluginBase::OnUIEditorOpened(), and UIScriptedMenu::Update().

◆ FreeCameraToggle()

static void DeveloperFreeCamera::FreeCameraToggle ( PlayerBase player,
bool teleport_player = false )
inlinestaticprivate

Enable / Disable Free camera (Fly mod) - disable of camera will teleport player at current free camera position.

Definition at line 6 of file DeveloperFreeCamera.c.

7 {
10 else
12 }
static void DisableFreeCamera(PlayerBase player, bool teleport_player=false)
static bool IsFreeCameraEnabled()

References DisableFreeCamera(), EnableFreeCamera(), and IsFreeCameraEnabled().

Referenced by PluginBase::ToggleFreeCamera(), and PluginBase::ToggleFreeCameraBackPos().

◆ IsFreeCameraEnabled()

◆ OnInit()

static void DeveloperFreeCamera::OnInit ( )
staticprivate

Referenced by PluginBase::OnInit().

◆ OnSetFreeCameraEvent()

static void DeveloperFreeCamera::OnSetFreeCameraEvent ( PlayerBase player,
FreeDebugCamera camera )
inlinestaticprotected

Definition at line 59 of file DeveloperFreeCamera.c.

60 {
61 if (player)
62 {
63#ifdef DEVELOPER
64 if (!GetGame().IsMultiplayer())
65 {
66 PluginSceneManager sceneManager = PluginSceneManager.Cast(GetPlugin(PluginSceneManager));
67
68 if (sceneManager.IsOpened())
69 sceneManager.EditorToggle();
70 }
71
72 GetGame().GetMission().RefreshCrosshairVisibility();
73#endif
74 }
75 }
PluginBase GetPlugin(typename plugin_type)

References GetGame(), and GetPlugin().

Referenced by PluginBase::OnSetFreeCameraEvent().


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