Only run group tags loop when in a group

This commit is contained in:
ebayShopper
2017-02-13 14:27:40 -05:00
parent e8dd8fac63
commit 6e846847de
6 changed files with 15 additions and 3 deletions

View File

@@ -150,7 +150,7 @@ _myGroup = group _body;
[_body] joinSilent dayz_firstGroup;
deleteGroup _myGroup;
80000 cutText ["","PLAIN"]; //Clear group icons
80000 cutText ["","PLAIN"]; //Clear group tags
3 cutRsc ["default", "PLAIN",3];
4 cutRsc ["default", "PLAIN",3];

View File

@@ -13,4 +13,7 @@ dayz_groupDisbandThread = _group spawn {
{[_x] joinSilent grpNull} count (units _this);
deleteGroup _this;
terminate dayz_groupTags;
80000 cutText ["","PLAIN"];
};

View File

@@ -3,7 +3,7 @@ private ["_display","_distance","_group","_icon","_index","_pos","_scale","_scre
while {true} do {
_group = player call dayz_filterGroup;
if (!visibleMap && count _group > 1 && cameraView in ["INTERNAL","EXTERNAL","GUNNER"]) then {
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";

View File

@@ -41,7 +41,9 @@ dayz_promotePlayer = compile preprocessFileLineNumbers "\z\addons\dayz_code\grou
dayz_rejectGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\reject.sqf";
dayz_groupInit = true;
execVM "\z\addons\dayz_code\groups\groupTags.sqf";
if (count (units group player) > 1) then {
dayz_groupTags = execVM "\z\addons\dayz_code\groups\groupTags.sqf";
};
if (dayz_requireRadio or {dayz_markGroup > 0} or {dayz_markSelf > 0} or {dayz_markBody > 0}) then {
execVM "\z\addons\dayz_code\groups\groupMarkers.sqf";

View File

@@ -27,6 +27,10 @@ if (!isNull _inviter) then {
_oldGroup = group player;
[player] joinSilent (group _inviter);
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
if (isNil "dayz_groupTags" or {scriptDone "dayz_groupTags"}) then {
dayz_groupTags = execVM "\z\addons\dayz_code\groups\groupTags.sqf";
};
// Update saved group in DB
PVDZ_Server_UpdateGroup = [1,player];

View File

@@ -11,4 +11,7 @@ dayz_groupLeaveThread = [] spawn {
//Wait for response from server to confirm group finished updating in DB
waitUntil {!isNil "dayz_groupLeft"};
[player] joinSilent grpNull;
terminate dayz_groupTags;
80000 cutText ["","PLAIN"];
};