Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TeleportCameraContextAction.c
Go to the documentation of this file.
1// Script File
4{
5 [Attribute("0", desc: "Determines if this action will be available if the current Editor mode is Limited")]
6 bool m_bIsUnlimitedOnly;
7
8 override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
9 {
10 if (m_bIsUnlimitedOnly)
11 {
12 SCR_EditorManagerEntity editorManager = SCR_EditorManagerEntity.GetInstance();
13 if (!editorManager || editorManager.IsLimited())
14 return false;
15 }
16
17 return CanBePerformed(hoveredEntity, selectedEntities, cursorWorldPosition, flags);
18 }
19
20 override bool CanBePerformed(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
21 {
22 if (hoveredEntity)
23 {
24 vector pos;
25 return hoveredEntity.GetPos(pos);
26 }
27 else
28 {
29 return cursorWorldPosition != vector.Zero && SCR_Global.IsPositionWithinTerrainBounds(cursorWorldPosition);
30 }
31 }
32
33 override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,int flags, int param = -1)
34 {
36 if (cameraManager)
37 {
38 SCR_ManualCamera camera = cameraManager.GetCamera();
39 if (camera)
40 {
42 if (teleportComponent)
43 {
44 if (hoveredEntity)
45 hoveredEntity.GetPos(cursorWorldPosition);
46
47 teleportComponent.TeleportCamera(cursorWorldPosition, true, false);
48 }
49 }
50 }
51 }
52};
SCR_EAIThreatSectorFlags flags
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_ArsenalGameModeUIDataHolder SCR_BaseContainerCustomTitleUIInfo("m_UIInfo")
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
static bool IsPositionWithinTerrainBounds(vector pos)
Definition Functions.c:1981
SCR_BaseManualCameraComponent FindCameraComponent(typename type)
Teleport the camera to the cursor's world position.
SCR_FieldOfViewSettings Attribute