Skip to content
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

Add EH for UAV control, Add Hellfire support #5305

Merged
merged 5 commits into from
Aug 22, 2017
Merged

Add EH for UAV control, Add Hellfire support #5305

merged 5 commits into from
Aug 22, 2017

Conversation

PabstMirror
Copy link
Contributor

Fix #5301

Needs testing on dedicated, as PlayerViewChanged was unreliable in the past.

@tbeswick96
Copy link
Contributor

tbeswick96 commented Jun 24, 2017

Used this earlier on a dedicated server. I had the display just fine, but had no option to change the hellfire mode. Will test again tomorrow to be sure.
From experience dealing with UAV interactions before, it does not use the UAV as interactions, but whatever vehicle the player is in (as per the bug report). I got around this for my purposes by adding the interactions on the player (self-interactions).

@PabstMirror
Copy link
Contributor Author

@tbeswick96 - Thanks for feedback, I've fixed the cycle guidance keybind for UAVs (Ctrl+Tab)
Interaction menu working directly on UAVs might be possible, but probably won't get to it in this PR

When testing in MP the PlayerViewChanged was broken, but I've written something that uses it to start polling for an actual state change, but only runs for a limited time. Could use a second look on it (common/postInit code)

@@ -317,6 +317,30 @@ GVAR(OldIsCamera) = false;
END_COUNTER(stateChecker);
}, 0.5, []] call CBA_fnc_addPerFrameHandler;

// Add event handler for UAV control change
ACE_controlledUAV = [objnull, objnull, [], ""];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Camel case in objNull.

params ["", "", "", "", "", "_UAV"];

private _position = (UAVControl _UAV) param [1, ""];
private _seatAI = objnull;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

private _UAV = getConnectedUAV player;
if (!alive player) then {_UAV = objNull;};
private _position = (UAVControl _UAV) param [1, ""];
private _seatAI = objnull;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

* Switch ACE_Player to uav AI on valid seat change

* Different approach to UAV interactions

* Forgot to remove a variable

* Changed param to select
Copy link
Member

@jonpas jonpas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some magic, looks good to me.

@PabstMirror PabstMirror merged commit 74fd0f5 into master Aug 22, 2017
@PabstMirror PabstMirror deleted the uavEvent branch August 22, 2017 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants