Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TeleportCameraToPlayerContextAction.c
Go to the documentation of this file.
3 {
4  override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
5  {
6  return true;
7  }
8 
9  override bool CanBePerformed(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
10  {
11  return SCR_PlayerController.GetLocalControlledEntity() != null;
12  }
13 
14  override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,int flags, int param = -1)
15  {
16  IEntity playerEntity = SCR_PlayerController.GetLocalControlledEntity();
17  if (!playerEntity)
18  return;
19 
20  vector teleportPosition = playerEntity.GetOrigin();
21 
23  if (cameraManager)
24  {
25  SCR_ManualCamera camera = cameraManager.GetCamera();
26  if (camera)
27  {
29  if (teleportComponent)
30  {
31  teleportComponent.TeleportCamera(teleportPosition, true, true, true);
32  }
33  }
34  }
35  }
36 };
SCR_ManualCamera
Definition: SCR_ManualCamera.c:16
SCR_PlayerController
Definition: SCR_PlayerController.c:31
SCR_CameraEditorComponent
Definition: SCR_CameraEditorComponent.c:13
SCR_TeleportCameraToPlayerContextAction
Definition: SCR_TeleportCameraToPlayerContextAction.c:2
SCR_BaseContextAction
Definition: SCR_BaseContextAction.c:7
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_TeleportToCursorManualCameraComponent
Teleport the camera to the cursor's world position.
Definition: SCR_TeleportToCursorManualCameraComponent.c:5
SCR_BaseContainerCustomTitleUIInfo
void SCR_BaseContainerCustomTitleUIInfo(string propertyName, string format="%1")
Definition: Attributes.c:788
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468