Skip to content

Commit

Permalink
detaching of terminal refinements again
Browse files Browse the repository at this point in the history
  • Loading branch information
nomisum committed Jun 2, 2019
1 parent 1259c1d commit 81a37c9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
13 changes: 2 additions & 11 deletions BC_setup/functions/client/fn_addInteractions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,9 @@ if (!hasInterface) exitWith {};
{
[4, [_this select 0], {
((_this select 0) select 0) setVariable ["detachableRadio", 2, true];

_terminal = missionNamespace getVariable ["GRAD_tracking_terminalObj", objNull];
_radioVeh = missionNamespace getVariable ["GRAD_tracking_radioVehObj", objNull];

detach _terminal;

// safely put down
_terminal setVehiclePosition [_radioVeh getRelPos [2, 180], [], 6, "NONE"];
private _radioVeh = missionNamespace getVariable ["GRAD_tracking_radioVehObj", objNull];
[] remoteExec ["GRAD_tracking_fnc_terminalDetach", _radioVeh];

GRAD_TERMINAL = true; publicVariable "GRAD_TERMINAL";

[_terminal, true, [0,1.4,0], 270] remoteExec ["ace_dragging_fnc_setDraggable", 0, true];
}, {hint "Cancelled action"}, (localize "str_GRAD_detaching_radio")] call ace_common_fnc_progressBar;
},
{(side player == east) && ((_this select 0) getVariable ["detachableRadio", 0] == 1)}] call ace_interact_menu_fnc_createAction;
Expand Down
1 change: 1 addition & 0 deletions grad_tracking/cfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@ class GRAD_tracking {
class terminalDistanceListenerServer {};
class terminalDistanceToVehCalc {};
class terminalIsSending {};
class terminalDetach;
};
};
12 changes: 12 additions & 0 deletions grad_tracking/functions/player/fn_terminalDetach.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
private _terminal = missionNamespace getVariable ["GRAD_tracking_terminalObj", objNull];
private _radioVeh = missionNamespace getVariable ["GRAD_tracking_radioVehObj", objNull];


detach _terminal;
// safely put down
_terminal setVehiclePosition [_radioVeh getRelPos [3, 180], [], 3, "NONE"];


GRAD_TERMINAL = true; publicVariable "GRAD_TERMINAL";

[_terminal, true, [0,1.4,0], 270] remoteExec ["ace_dragging_fnc_setDraggable", 0, true];

0 comments on commit 81a37c9

Please sign in to comment.