Skip to content

Commit

Permalink
Add cursor zero hotkey
Browse files Browse the repository at this point in the history
  • Loading branch information
Fratee committed Jun 9, 2024
1 parent b53ad1d commit e42f337
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ class CfgFunctions
{
file = "Turret_Enhanced\functions\h60check.sqf";
};
class cursorZero
{
file="Turret_Enhanced\functions\cursorZero.sqf";
};
/*
class blacklistActions
{
Expand Down
2 changes: 2 additions & 0 deletions functions/MPaddaction.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ _pri = -1000;

#include "\a3\editor_f\Data\Scripts\dikCodes.h"

// Add keybinds
["Turret Enhanced","add_blk_marker", "Mark Target (Blk)",{_this call fatlurch_fnc_addMarkerBlk}, "", [DIK_1, [true, false, false]]] call CBA_fnc_addKeybind;
["Turret Enhanced","add_blu_marker", "Mark Target (Blu)",{_this call fatlurch_fnc_addMarkerBlu}, "", [DIK_2, [true, false, false]]] call CBA_fnc_addKeybind;
["Turret Enhanced","add_red_marker", "Mark Target (Red)",{_this call fatlurch_fnc_addMarkerRed}, "", [DIK_3, [true, false, false]]] call CBA_fnc_addKeybind;
["Turret Enhanced","cursor_zero", "Camera Cursor Zero (center)",{_this call fatlurch_fnc_CursorZero}, "", [DIK_T, [true, true, false]]] call CBA_fnc_addKeybind; // Default keybinding (Ctrl + Shift + T)

_unit addAction ["Mark Target (Blk)", "_this call fatlurch_fnc_addMarkerBlk",nil, _pri,false, true, "","(([_this, _target] call fatlurch_fnc_isViewISR)&&(Fat_Lurch_Markers))"];
_unit addAction ["Mark Target <t color='#0000FF'>(Blu)</t>", "_this call fatlurch_fnc_addMarkerBlu",nil, _pri - 1,false, true, "","(([_this, _target] call fatlurch_fnc_isViewISR)&&(Fat_Lurch_Markers))"];
Expand Down
11 changes: 11 additions & 0 deletions functions/cursorZero.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Perform "Cursor Zero": untrack the TGP and center camera to boresight.

// untrack
turretPath = player call CBA_fnc_turretPath;
_veh = vehicle player;
_veh lockCameraTo [objNull, turretPath];
_veh setPilotCameraTarget objNull;

// center camera
_veh setPilotCameraDirection [0,1,0];
true

0 comments on commit e42f337

Please sign in to comment.