From 75a12ad9532231b5db547f7f71bf69a5c8187008 Mon Sep 17 00:00:00 2001 From: ebayShopper Date: Mon, 17 Apr 2017 11:49:54 -0400 Subject: [PATCH] Rejoin group after dropping and picking back up radio --- CHANGE LOG 1.0.6.2.txt | 1 + SQF/dayz_code/groups/groupMarkers.sqf | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGE LOG 1.0.6.2.txt b/CHANGE LOG 1.0.6.2.txt index 6f13c8cce..9649b347f 100644 --- a/CHANGE LOG 1.0.6.2.txt +++ b/CHANGE LOG 1.0.6.2.txt @@ -5,6 +5,7 @@ [UPDATED] Zombie pathing. Zeds should now run more direct to players. [UPDATED] The RIS attachment can be removed from the SA58_RIS_DZ now. @LunaCB +[UPDATED] The player now auto rejoins their group after dropping a radio and picking it back up when dayz_requireRadio=true. @SmokeyBR [FIXED] Kamaz refuel trucks no longer allow automatic refueling. #1855 @coresync2k @dreamforceinc [FIXED] Trees at POIs can be chopped down now. Other trees spawned with createVehicle can be added to dayz_treeTypes in variables.sqf to allow chopping them down. diff --git a/SQF/dayz_code/groups/groupMarkers.sqf b/SQF/dayz_code/groups/groupMarkers.sqf index 754eb2d7f..cb4453e17 100644 --- a/SQF/dayz_code/groups/groupMarkers.sqf +++ b/SQF/dayz_code/groups/groupMarkers.sqf @@ -1,10 +1,13 @@ -private ["_bodyCount","_count","_group","_hasGPS","_index","_inGroup","_marker","_markBody","_markGroup","_markSelf","_name","_pos","_self","_vehicle"]; +private ["_bodyCount","_count","_group","_hasGPS","_index","_inGroup","_lastGroup","_marker","_markBody","_markGroup","_markSelf","_name","_oldGroup","_pos","_self","_vehicle"]; + +_lastGroup = grpNull; while {true} do { _group = player call dayz_filterGroup; _inGroup = count _group > 1; if (dayz_requireRadio && {_inGroup} && {!("ItemRadio" in items player)}) then { + _lastGroup = group player; [player] joinSilent grpNull; if (!isNull findDisplay 80000) then {findDisplay 80000 closeDisplay 2;}; terminate dayz_groupTags; @@ -15,6 +18,16 @@ while {true} do { dayz_groupTags = execVM "\z\addons\dayz_code\groups\groupTags.sqf"; }; + if (!isNull _lastGroup && {"ItemRadio" in items player}) then { + _oldGroup = group player; + [player] joinSilent _lastGroup; + if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;}; + format[localize "STR_EPOCH_REJOINED_GROUP",name leader _lastGroup] call dayz_rollingMessages; + PVDZ_Server_UpdateGroup = [1,player]; + publicVariableServer "PVDZ_Server_UpdateGroup"; + _lastGroup = grpNull; + }; + if (visibleMap or !isNull (uiNamespace getVariable["BIS_RscMiniMap",displayNull])) then { _hasGPS = "ItemGPS" in items player; _markBody = (dayz_markBody == 1 or (dayz_markBody == 2 && _hasGPS));