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

Use profile name for Ping Zeus keybind #737

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions addons/editor/functions/fnc_pingCurators.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* 0: Curator <OBJECT>
* 1: Ping Target <OBJECT|ARRAY>
* - Positions must be in AGL format.
* 2: Curator's Name <STRING> (default: "")
*
* Return Value:
* None
Expand All @@ -32,7 +33,7 @@

if (isNull curatorCamera) exitWith {};

params ["_curator", "_target"];
params ["_curator", "_target", ["_name", ""]];

GVAR(pingTarget) = _target;

Expand All @@ -41,9 +42,7 @@ if (isNil QGVAR(pingDrawMap)) then {
GVAR(pingDrawMap) = createHashMap;
};

private _hash = hashValue _curator;
private _name = name getAssignedCuratorUnit _curator;
GVAR(pingDrawMap) set [_hash, [_target, _name, CBA_missionTime]];
GVAR(pingDrawMap) set [hashValue _curator, [_target, _name, CBA_missionTime]];

if (isNil QGVAR(pingDraw3D)) then {
GVAR(pingDraw3D) = addMissionEventHandler ["Draw3D", {
Expand Down
2 changes: 1 addition & 1 deletion addons/editor/initKeybinds.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
};

private _curator = getAssignedCuratorLogic player;
[QGVAR(pingCurators), [_curator, _target], allCurators] call CBA_fnc_targetEvent;
[QGVAR(pingCurators), [_curator, _target, profileName], allCurators] call CBA_fnc_targetEvent;

true // handled
};
Expand Down