diff --git a/CHANGE LOG 1.0.6.2.txt b/CHANGE LOG 1.0.6.2.txt index 5f382fe08..1950ab556 100644 --- a/CHANGE LOG 1.0.6.2.txt +++ b/CHANGE LOG 1.0.6.2.txt @@ -2,5 +2,6 @@ [FIXED] Kamaz refuel trucks no longer allow automatic refueling. #1855 @coresync2k @dreamforceinc [FIXED] Fixed food and drink going down 10x faster from melee and other "working" actions. +[FIXED] Glitch where group icons scaled very large momentarily while moving off screen. [INFO] See Documents\CHANGE LOG 1.0.6.txt for the full list of 1.0.5.1 --> 1.0.6 changes. \ No newline at end of file diff --git a/SQF/dayz_code/groups/groupTags.sqf b/SQF/dayz_code/groups/groupTags.sqf index 1e622ecbb..0e9d72539 100644 --- a/SQF/dayz_code/groups/groupTags.sqf +++ b/SQF/dayz_code/groups/groupTags.sqf @@ -1,47 +1,52 @@ +#define DRAW_TAGS (!visibleMap && count units group player > 1) //Use && cameraView != "GROUP" if tactical view is allowed (blocked by default) private ["_display","_distance","_group","_icon","_index","_pos","_scale","_screen","_text"]; disableSerialization; -while {true} do { +_refresh = { _group = player call dayz_filterGroup; - if (!visibleMap && count _group > 1) then { //Use (&& cameraView != "GROUP") if tactical view is allowed (blocked by default) - 80000 cutRsc ["DZ_GroupTags","PLAIN"]; - - _display = uiNamespace getVariable "DZ_GroupTags"; - _index = 0; - { - _pos = [_x] call FNC_GetPos; - _distance = _pos distance player; - _icon = _display displayCtrl (100 + _index); - if (_distance > 1 && _distance < 2500 && vehicle _x != vehicle player) then { - _pos set [2,(_pos select 2) + 1.5]; - _screen = worldToScreen _pos; - _text = composeText [image "\ca\ui\data\igui_side_unknown_ca.paa"," ",if (dayz_groupNameTags) then {name _x} else {""}]; - if (count _screen > 1) then { - _scale = if (_distance < 200) then {.3} else {1 min ((1 - (_distance - 3) / 15) max .3)}; - _icon ctrlSetStructuredText _text; - _icon ctrlSetPosition [(_screen select 0),(_screen select 1),.99,.65]; - _icon ctrlSetScale _scale; - _icon ctrlSetFade ((1 - _scale) / 2); - _icon ctrlCommit 0; - _icon ctrlShow true; - } else { - _icon ctrlShow false; - }; + _display = uiNamespace getVariable "DZ_GroupTags"; + _index = 0; + { + _pos = [_x] call FNC_GetPos; + _distance = _pos distance player; + _icon = _display displayCtrl (100 + _index); + if (_distance > 1 && _distance < 2500 && vehicle _x != vehicle player) then { + _pos set [2,(_pos select 2) + 1.5]; + _screen = worldToScreen _pos; + _text = composeText [image "\ca\ui\data\igui_side_unknown_ca.paa"," ",if (dayz_groupNameTags) then {name _x} else {""}]; + if (count _screen > 1) then { + _scale = if (_distance < 200) then {.3} else {1 min ((1 - (_distance - 3) / 15) max .3)}; + _icon ctrlSetStructuredText _text; + _icon ctrlSetPosition [(_screen select 0),(_screen select 1),.99,.65]; + _icon ctrlSetScale _scale; + _icon ctrlSetFade ((1 - _scale) / 2); + _icon ctrlCommit 0; + _icon ctrlShow true; } else { _icon ctrlShow false; }; - _index = _index + 1; - } count _group; - - if (dayz_oldGroupCount > count _group) then { - _display displayCtrl (100 + _index) ctrlShow false; + } else { + _icon ctrlShow false; }; - - dayz_oldGroupCount = count _group; - } else { - 80000 cutText ["","PLAIN"]; + _index = _index + 1; + } count _group; + + if (dayz_oldGroupCount > count _group) then { + _display displayCtrl (100 + _index) ctrlShow false; }; - uiSleep 0.01; + dayz_oldGroupCount = count _group; +}; + +while {true} do { + waitUntil {uiSleep 1; DRAW_TAGS}; + 80000 cutRsc ["DZ_GroupTags","PLAIN"]; + + while {DRAW_TAGS} do { + call _refresh; //Must be called to finish in current frame + uiSleep 0.01; + }; + + 80000 cutText ["","PLAIN"]; }; \ No newline at end of file