diff --git a/addons/common/functions/fnc_createPlayerMarker.sqf b/addons/common/functions/fnc_createPlayerMarker.sqf index ca552f2..4337ff5 100644 --- a/addons/common/functions/fnc_createPlayerMarker.sqf +++ b/addons/common/functions/fnc_createPlayerMarker.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" /* * Author: veteran29 - * Create player owned marker. + * Create player owned marker locally. * * Arguments: * 0: Marker position @@ -43,4 +43,4 @@ GVAR(playerMarkerIdx) = GVAR(playerMarkerIdx) + 1; private _markerId = format ["_USER_DEFINED #%1/%2/%3", getPlayerID _player, _id, _channel]; -createMarker [_markerId, _position, _channel, _player] // return +createMarkerLocal [_markerId, _position, _channel, _player] // return diff --git a/addons/tagging/XEH_postInit.sqf b/addons/tagging/XEH_postInit.sqf index f56adfb..0eae99f 100644 --- a/addons/tagging/XEH_postInit.sqf +++ b/addons/tagging/XEH_postInit.sqf @@ -9,17 +9,16 @@ if (hasInterface) then { // Check if tag created on building by local player if (!(_object isKindOf "Building") || {_unit isNotEqualTo player}) exitWith {}; - private _colorIndex = { - if (_texture find _x != -1) exitWith {_forEachIndex}; - -1 - } forEach TEXTURE_COLORS; + private _colorIndex = TEXTURE_COLORS findIf {toLower _texture find _x != -1}; // no matching color, do not create marker - if (_colorIndex == -1) exitWith {}; + if (_colorIndex == -1) exitWith { + WARNING_1("Unsupported tag color %1",_texture); + }; private _marker = [_object, "side", _unit] call EFUNC(common,createPlayerMarker); - _marker setMarkerShape "ICON"; - _marker setMarkerType "hd_dot"; + _marker setMarkerShapeLocal "ICON"; + _marker setMarkerTypeLocal "hd_dot"; _marker setMarkerColor (MARKER_COLORS select _colorIndex); }] call CBA_fnc_addEventHandler; diff --git a/addons/tagging/script_component.hpp b/addons/tagging/script_component.hpp index e57576d..2dfd1bb 100644 --- a/addons/tagging/script_component.hpp +++ b/addons/tagging/script_component.hpp @@ -13,5 +13,5 @@ #include "\z\afm\addons\main\script_macros.hpp" -#define MARKER_COLORS ["ColorRed", "ColorGreen", "ColorBlue", "ColorBlack"] -#define TEXTURE_COLORS ["red", "green", "blue", "black"] +#define MARKER_COLORS ["ColorRed", "ColorGreen", "ColorBlue", "ColorBlack", "ColorYellow", "ColorWhite"] +#define TEXTURE_COLORS ["red", "green", "blue", "black", "yellow", "white"]