mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Rejoin group after dropping and picking back up radio
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user