use netId in dairy entry link for dedicated to work

This commit is contained in:
2024-02-03 13:53:28 -08:00
parent 8d93bb5743
commit b8b8f1de22
2 changed files with 12 additions and 25 deletions

View File

@@ -30,7 +30,7 @@ private _assetMarkerStore = localNamespace getVariable [
///////////////////////////////////////////////////////////////////////////////
// Create base markers if not already present
if (not (count _baseMarkerStore > 0)) then {
{
{ // milsim_baseObjects is accessed directly, so are valid objects
private _base = _x;
// create a circle marker with range as the detection range of assets
@@ -74,9 +74,9 @@ if (not (count _baseMarkerStore > 0)) then {
private _start = (count _assetMarkerStore) + 1;
private _createdAssetMarkers = [];
{
private _asset = _x;
{ // _assetObjects is a serialized parameter, so we pass the netIds (strings)
private _assetNetIdStr = _x;
private _asset = _assetNetIdStr call BIS_fnc_objectFromNetId;
// if asset was removed since last update
if (isNull _asset) then {continue};
// check if a marker is already placed for this asset
@@ -90,34 +90,17 @@ private _createdAssetMarkers = [];
format["milsim_fbcb2_assets_marker_%1", _start],
getPosASL _asset
];
_newMarker setMarkerAlphaLocal 0;
_newMarker setMarkerAlphaLocal 1;
_newMarker setMarkerTypeLocal _markerType;
_newMarker setMarkerColorLocal _markerColor;
// _newMarker setMarkerTextLocal ([configOf _asset] call BIS_fnc_displayName);
_createdAssetMarkers pushBack [
_assetMarkerStore pushBack [
_asset,
_newMarker
];
_start = _start + 1;
} forEach _assetObjects;
// unhide added asset markers sequentially
[_createdAssetMarkers apply {_x#1}] spawn {
params ["_markers"];
for "_alpha" from 0.0 to 1.0 step 0.03 do
{
{
_x setMarkerAlphaLocal _alpha;
} forEach _markers;
Sleep 0.002;
};
};
// add to store
{
_assetMarkerStore pushBack _x;
} forEach _createdAssetMarkers;
// update store var
localNamespace setVariable [_assetMarkerStoreVar, _assetMarkerStore];