-
Notifications
You must be signed in to change notification settings - Fork 747
UAVs - Add Pilot Camera/Sane Solo Use Capability #8454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Requesting Review. |
|
Testing looks good but I'm really worried about breaking things with this. |
| class ADDON { | ||
| name = COMPONENT_NAME; | ||
| requiredVersion = REQUIRED_VERSION; | ||
| requiredAddons[] = {"ace_interaction"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ace_interaction? Why not ace_common?
| if (isNull _vehicle) exitWith { | ||
| [_pfID] call CBA_fnc_removePerFrameHandler; | ||
| }; | ||
| if (!alive _vehicle) exitWith { | ||
| [_pfID] call CBA_fnc_removePerFrameHandler; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
objNull is already dead, no need to check twice.
| if (isNull _vehicle) exitWith { | |
| [_pfID] call CBA_fnc_removePerFrameHandler; | |
| }; | |
| if (!alive _vehicle) exitWith { | |
| [_pfID] call CBA_fnc_removePerFrameHandler; | |
| }; | |
| if (!alive _vehicle) exitWith { | |
| [_pfhID] call CBA_fnc_removePerFrameHandler; | |
| }; |
| if ("GUNNER" in (UAVControl _vehicle)) exitWith { | ||
| _vehicle lockCameraTo [objNull, [0]]; | ||
| }; | ||
| if ((getPilotCameraTarget _vehicle) select 0) then { | ||
| _vehicle lockCameraTo [getPilotCameraTarget _vehicle select 1, [0]]; | ||
| } else { | ||
| _vehicle lockCameraTo [objNull, [0]]; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if ("GUNNER" in (UAVControl _vehicle)) exitWith { | |
| _vehicle lockCameraTo [objNull, [0]]; | |
| }; | |
| if ((getPilotCameraTarget _vehicle) select 0) then { | |
| _vehicle lockCameraTo [getPilotCameraTarget _vehicle select 1, [0]]; | |
| } else { | |
| _vehicle lockCameraTo [objNull, [0]]; | |
| }; | |
| private _target = getPilotCameraTarget _vehicle; | |
| if ("GUNNER" in (UAVControl _vehicle) || {!(_target select 0)}) exitWith { | |
| _vehicle lockCameraTo [objNull, [0]]; | |
| }; | |
| _vehicle lockCameraTo [_target select 1, [0]]; |
| params ["_args", "_pfID"]; | ||
| _args params ["_vehicle"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| params ["_args", "_pfID"]; | |
| _args params ["_vehicle"]; | |
| params ["_vehicle", "_pfhID"]; |
| _vehicle lockCameraTo [objNull, [0]]; | ||
| }; | ||
|
|
||
| }, 0.1, [_vehicle]] call CBA_fnc_addPerFrameHandler; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }, 0.1, [_vehicle]] call CBA_fnc_addPerFrameHandler; | |
| }, 0.1, _vehicle] call CBA_fnc_addPerFrameHandler; |
| if (!unitIsUAV _vehicle) exitWith {}; | ||
| if (!hasPilotCamera _vehicle) exitWith {}; | ||
|
|
||
| GVAR(pfehID) = [{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| GVAR(pfehID) = [{ | |
| [{ |
| _vehicle lockCameraTo [objNull, [0]]; | ||
| }; | ||
|
|
||
| }, 0.1, [_vehicle]] call CBA_fnc_addPerFrameHandler; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason as to why you are adding a PFH to every single drone in a mission? Imo you need to find a way of adding it to player-controlled drones only.
| @@ -0,0 +1,28 @@ | |||
| #include "script_component.hpp" | |||
|
|
|||
| ["Air", "init", { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole bit needs comments.
| initAngleX=0; minAngleX=0; maxAngleX=0; | ||
| initAngleY=0; minAngleY=0; maxAngleY=0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| initAngleX=0; minAngleX=0; maxAngleX=0; | |
| initAngleY=0; minAngleY=0; maxAngleY=0; | |
| initAngleX = 0; | |
| minAngleX = 0; | |
| maxAngleX = 0; | |
| initAngleY = 0; | |
| minAngleY = 0; | |
| maxAngleY = 0; |
| showUAVViewInOptics= false; | ||
| showSlingLoadManagerInOptics= false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| showUAVViewInOptics= false; | |
| showSlingLoadManagerInOptics= false; | |
| showUAVViewInOptics = false; | |
| showSlingLoadManagerInOptics = false; |
| x = "6.0 * (0.01875 * SafezoneH)"; | ||
| y = "1.75 * (0.025 * SafezoneH)"; | ||
| w = "41.3 * (0.01875 * SafezoneH)"; | ||
| h = "1 * (0.025 * SafezoneH)"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| x = "6.0 * (0.01875 * SafezoneH)"; | |
| y = "1.75 * (0.025 * SafezoneH)"; | |
| w = "41.3 * (0.01875 * SafezoneH)"; | |
| h = "1 * (0.025 * SafezoneH)"; | |
| x = "6.0 * (0.01875 * SafezoneH)"; | |
| y = "1.75 * (0.025 * SafezoneH)"; | |
| w = "41.3 * (0.01875 * SafezoneH)"; | |
| h = "1 * (0.025 * SafezoneH)"; |
| visionMode[] = {"Normal","NVG","Ti"}; | ||
| thermalMode[] = {0,1}; | ||
| gunnerOpticsModel = "\A3\Drones_F\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_wide_F.p3d"; | ||
| //gunnerOpticsModel = "\A3\Weapons_F\Reticle\Optics_Gunship_wide_F.p3d"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| //gunnerOpticsModel = "\A3\Weapons_F\Reticle\Optics_Gunship_wide_F.p3d"; |
If it's commented out, It doesn't need to be here.
Ultra-lightweight reimagining of #7485.
When merged this pull request will:
Known Issues: