mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix UGV Nametag RPT Issue #2873
This commit is contained in:
parent
52a6eddb44
commit
59708ec2f7
@ -30,7 +30,7 @@ private ["_position", "_color", "_name", "_size", "_icon", "_scale"];
|
||||
_icon = "";
|
||||
_size = 0;
|
||||
if (_iconType in [ICON_NAME_SPEAK, ICON_SPEAK]) then {
|
||||
_icon = QUOTE(PATHTOF(UI\soundwave)) + str (floor (random 10)) + ".paa";
|
||||
_icon = format ["%1%2%3",QUOTE(PATHTOF(UI\soundwave)), floor (random 10), ".paa"];
|
||||
_size = 1;
|
||||
_alpha = (_alpha max 0.2) + 0.2;//Boost alpha when speaking
|
||||
} else {
|
||||
@ -50,19 +50,24 @@ _name = if (_iconType in [ICON_NAME, ICON_NAME_RANK, ICON_NAME_SPEAK]) then {
|
||||
};
|
||||
|
||||
//Set Color:
|
||||
if ((group _target) != (group _player)) then {
|
||||
_color = +GVAR(defaultNametagColor); //Make a copy, then multiply both alpha values (allows client to decrease alpha in settings)
|
||||
_color set [3, (_color select 3) * _alpha];
|
||||
_color = if ((group _target) != (group _player)) then {
|
||||
+GVAR(defaultNametagColor); //Make a copy, then multiply both alpha values (allows client to decrease alpha in settings)
|
||||
} else {
|
||||
_color = [[1, 1, 1, _alpha], [1, 0, 0, _alpha], [0, 1, 0, _alpha], [0, 0, 1, _alpha], [1, 1, 0, _alpha]] select ((["MAIN", "RED", "GREEN", "BLUE", "YELLOW"] find (assignedTeam _target)) max 0);
|
||||
[[1, 1, 1, _alpha], [1, 0, 0, _alpha], [0, 1, 0, _alpha], [0, 0, 1, _alpha], [1, 1, 0, _alpha]] select ((["MAIN", "RED", "GREEN", "BLUE", "YELLOW"] find (assignedTeam _target)) max 0);
|
||||
};
|
||||
|
||||
if (isNil "_color") then {
|
||||
_color = [1, 1, 1, _alpha];
|
||||
};
|
||||
|
||||
_color set [3, (_color select 3) * _alpha];
|
||||
|
||||
// Convert position to ASLW (expected by drawIcon3D) and add height offsets
|
||||
_position = _target modelToWorldVisual ((_target selectionPosition "pilot") vectorAdd [0,0,(_heightOffset + .3)]);
|
||||
|
||||
_scale = [0.333, 0.5, 0.666, 0.83333, 1] select GVAR(tagSize);
|
||||
|
||||
drawIcon3D [
|
||||
JK_debugVar = [
|
||||
_icon,
|
||||
_color,
|
||||
_position,
|
||||
@ -74,3 +79,8 @@ _name,
|
||||
(0.05 * _scale),
|
||||
"PuristaMedium"
|
||||
];
|
||||
|
||||
hint str JK_debugVar;
|
||||
diag_log JK_debugVar;
|
||||
|
||||
drawIcon3D JK_debugVar;
|
||||
|
Loading…
Reference in New Issue
Block a user