From f143db7fc067133e53e81897ff614297a5a25109 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Fri, 7 Aug 2015 12:07:22 +0100 Subject: [PATCH] Draw player names on spectator map --- addons/spectator/UI/interface.hpp | 6 +++--- addons/spectator/functions/fnc_handleMap.sqf | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index 5dbea22273..51105b216b 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -167,9 +167,9 @@ class GVAR(interface) { colorBorder[] = {COL_FORE}; colorBackground[] = {COL_BACK}; colorSelect[] = { - QUOTE(GETPRVAR(GUI_BCG_RGB_R,0.77)), - QUOTE(GETPRVAR(GUI_BCG_RGB_G,0.51)), - QUOTE(GETPRVAR(GUI_BCG_RGB_B,0.08)), + "profilenamespace getvariable ['GUI_BCG_RGB_R',0.77]", + "profilenamespace getvariable ['GUI_BCG_RGB_G',0.51]", + "profilenamespace getvariable ['GUI_BCG_RGB_B',0.08]", 1 }; multiselectEnabled = 0; diff --git a/addons/spectator/functions/fnc_handleMap.sqf b/addons/spectator/functions/fnc_handleMap.sqf index a0000718bd..4eeb5fd7e1 100644 --- a/addons/spectator/functions/fnc_handleMap.sqf +++ b/addons/spectator/functions/fnc_handleMap.sqf @@ -18,7 +18,7 @@ #include "script_component.hpp" params ["_map"]; -private ["_cachedVehicles","_unit","_color","_icon"]; +private ["_cachedVehicles","_unit","_color","_icon","_txt"]; if (GVAR(camMode) == 0) then { _map drawIcon ["\A3\UI_F\Data\GUI\Rsc\RscDisplayMissionEditor\iconcamera_ca.paa",[0,0,0,1],GVAR(camera),20,20,GVAR(camPan)]; @@ -39,8 +39,9 @@ _cachedVehicles = []; // Function has caching built in _color = [side effectiveCommander _unit] call BIS_fnc_sideColor; _icon = GETVAR(_unit,GVAR(uIcon),""); + _txt = ["", GETVAR(_x,GVAR(uName),"")] select (isPlayer _x); - _map drawIcon [_icon, _color, _unit, 19, 19, getDir _unit]; + _map drawIcon [_icon, _color, _unit, 19, 19, getDir _unit, _txt, 1, 0.03]; }; false } count GVAR(unitList);