Skip to content
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
8 changes: 7 additions & 1 deletion addons/markers/functions/fnc_createMarker.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ if ((_playerUID isEqualTo "_SP_PLAYER_") || {_playerUID isEqualTo "_SP_AI_"} ||
};

private _namePrefix = [_editable, _broadcastChannel, _playerUID] call FUNC(generateUniquePrefix);
[_namePrefix, _broadcastChannel, _pos, _markerParameter, _scale, _alpha] remoteExecCall [QFUNC(createMarkerLocal), ([_broadcastChannel] call FUNC(getBroadcastTargets)), true];
private _jipId = format [QGVAR(createMarker_%1), _namePrefix];

[_namePrefix, _broadcastChannel, _pos, _markerParameter, _scale, _alpha] remoteExecCall [
QFUNC(createMarkerLocal),
([_broadcastChannel] call FUNC(getBroadcastTargets)),
_jipId
];

_namePrefix
19 changes: 18 additions & 1 deletion addons/markers/functions/fnc_deleteMarker.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,24 @@ private _broadcastChannel = [_namePrefix] call FUNC(getBroadcastChannel);

CHECKRET(((_broadcastChannel > 5) || (_broadcastChannel < -1)),ERROR("Invalid marker prefix. No MTS marker"); false);

private _targets = [_broadcastChannel] call FUNC(getBroadcastTargets);

//broadcast marker depending on channel ID
[_namePrefix] remoteExecCall [QFUNC(deleteMarkerLocal), ([_broadcastChannel] call FUNC(getBroadcastTargets)), true];
[_namePrefix] remoteExecCall [
QFUNC(deleteMarkerLocal),
_targets,
_targets isNotEqualTo 0
];

// We can only safely remove global markers from JIP
// Special cases are side markers where we do not remove JIP.
// Example: Create marker in west side -> switch side -> remove marker:
// The marker should still be created if JIP in west.
if (_targets isEqualTo 0) then {
{
private _jipId = format [QGVAR(%1_%2), _x, _namePrefix];
remoteExec ["", _jipId]; // remove the order from the JIP queue
} forEach ["createMarker", "setMarkerAlpha", "setMarkerPos", "setMarkerScale"];
};

true
8 changes: 7 additions & 1 deletion addons/markers/functions/fnc_setMarkerAlpha.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ private _broadcastChannel = [_namePrefix] call FUNC(getBroadcastChannel);

CHECKRET(((_broadcastChannel > 5) || (_broadcastChannel < -1)),ERROR("Invalid marker prefix. No MTS marker"));

private _jipId = format [QGVAR(setMarkerAlpha_%1), _namePrefix];

// Broadcast marker depending on channel ID
[_namePrefix, _alpha] remoteExecCall [QFUNC(setMarkerAlphaLocal), ([_broadcastChannel] call FUNC(getBroadcastTargets)), true];
[_namePrefix, _alpha] remoteExecCall [
QFUNC(setMarkerAlphaLocal),
([_broadcastChannel] call FUNC(getBroadcastTargets)),
_jipId
];

nil
8 changes: 7 additions & 1 deletion addons/markers/functions/fnc_setMarkerPos.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ private _broadcastChannel = [_namePrefix] call FUNC(getBroadcastChannel);

CHECKRET(((_broadcastChannel > 5) || (_broadcastChannel < -1)),ERROR("Invalid marker prefix. No MTS marker"));

private _jipId = format [QGVAR(setMarkerPos_%1), _namePrefix];

//broadcast marker depending on channel ID
[_namePrefix, _newPos] remoteExecCall [QFUNC(setMarkerPosLocal), ([_broadcastChannel] call FUNC(getBroadcastTargets)), true];
[_namePrefix, _newPos] remoteExecCall [
QFUNC(setMarkerPosLocal),
([_broadcastChannel] call FUNC(getBroadcastTargets)),
_jipId
];

nil
8 changes: 7 additions & 1 deletion addons/markers/functions/fnc_setMarkerScale.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ private _broadcastChannel = [_namePrefix] call FUNC(getBroadcastChannel);

CHECKRET(((_broadcastChannel > 5) || (_broadcastChannel < -1)),ERROR("Invalid marker prefix. No MTS marker"));

private _jipId = format [QGVAR(setMarkerScale_%1), _namePrefix];

//broadcast marker depending on channel ID
[_namePrefix, _newScale] remoteExecCall [QFUNC(setMarkerScaleLocal), ([_broadcastChannel] call FUNC(getBroadcastTargets)), true];
[_namePrefix, _newScale] remoteExecCall [
QFUNC(setMarkerScaleLocal),
([_broadcastChannel] call FUNC(getBroadcastTargets)),
_jipId
];

nil
Loading