Use joinSilent instead of join

This commit is contained in:
ebaydayz
2016-10-30 13:54:55 -04:00
parent 6d8afc9d32
commit abb0475d28
9 changed files with 13 additions and 10 deletions

View File

@@ -124,7 +124,7 @@ _switchUnit = {
{_oldUnit removeMagazine _x;} count magazines _oldUnit;
if !(isNull _oldUnit) then {deleteVehicle _oldUnit;};
if (!isNil "dayz_groupInit" && count (units _oldGroup) > 1) then {
[_newUnit] join _oldGroup;
[_newUnit] joinSilent _oldGroup;
if (count (units _group) == 0) then {deleteGroup _group;};
};
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};

View File

@@ -11,6 +11,6 @@ dayz_groupDisbandThread = _group spawn {
//Wait for response from server to confirm group finished updating in DB
waitUntil {!isNil "dayz_groupDisbanded"};
{[_x] join grpNull} count (units _this);
{[_x] joinSilent grpNull} count (units _this);
deleteGroup _this;
};

View File

@@ -4,7 +4,7 @@ private ["_count","_found","_group","_hasGPS","_index","_marker","_markBody","_m
_group = player call dayz_filterGroup;
if (dayz_requireRadio && {count _group > 1} && {!("ItemRadio" in items player)}) exitWith {
[player] join grpNull;
[player] joinSilent grpNull;
_group = [];
if (!isNull findDisplay 80000) then {findDisplay 80000 closeDisplay 2;};
localize "STR_EPOCH_RADIO_CONTACT_LOST" call dayz_rollingMessages;
@@ -43,7 +43,6 @@ if (visibleMap or !isNull findDisplay 88890) then {
if (_markBody) then {
_found = false;
{
//Only mark closest body to player's current position (allDead is sorted by distance)
if (_x getVariable["bodyName",""] == name player) exitWith {
_found = true;
_pos = [_x] call FNC_GetPos;

View File

@@ -1,7 +1,7 @@
private "_oldGroup";
if (count (units group player) > 1) then {
[player] join grpNull;
[player] joinSilent grpNull;
};
if (count dayz_myGroup > 1 && {!dayz_requireRadio or {dayz_requireRadio && "ItemRadio" in items player}}) then {
@@ -9,7 +9,7 @@ if (count dayz_myGroup > 1 && {!dayz_requireRadio or {dayz_requireRadio && "Item
//Only auto join player into group if leader is in their savedGroup
if (getPlayerUID leader _x in dayz_myGroup) exitWith {
_oldGroup = group player;
[player] join _x;
[player] joinSilent _x;
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
// Update saved group in DB

View File

@@ -25,7 +25,7 @@ _inviter = _inviterUID call dayz_getPlayer;
if (!isNull _inviter) then {
_oldGroup = group player;
[player] join (group _inviter);
[player] joinSilent (group _inviter);
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
// Update saved group in DB

View File

@@ -7,7 +7,7 @@ _target = _targetUID call dayz_getPlayer;
if (isNull _target or _target == player or player != leader group player) exitWith {};
[_target] join grpNull;
[_target] joinSilent grpNull;
PVDZ_Server_UpdateGroup = [2,player,_targetUID];
publicVariableServer "PVDZ_Server_UpdateGroup";

View File

@@ -10,5 +10,5 @@ publicVariableServer "PVDZ_Server_UpdateGroup";
dayz_groupLeaveThread = [] spawn {
//Wait for response from server to confirm group finished updating in DB
waitUntil {!isNil "dayz_groupLeft"};
[player] join grpNull;
[player] joinSilent grpNull;
};

View File

@@ -5,6 +5,11 @@ _player = _this select 1;
_targetUID = if (count _this > 2) then {_this select 2} else {"0"};
_playerUID = getPlayerUID _player;
if (_event < 3) then {
//Small delay needed for group changes to propagate to server
uiSleep 1;
};
_groupUIDs = [];
{
if (alive _x && isPlayer _x) then {

View File

@@ -103,7 +103,6 @@ if (isServer) then {
"PVDZE_handleSafeGear" addPublicVariableEventHandler {(_this select 1) spawn server_handleSafeGear};
"PVDZE_fullobj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishFullObject}; // PlotForLife take base ownership
if (dayz_groupSystem) then {
//Use spawn instead of call because small delay is needed for group changes to propagate to server
"PVDZ_Server_UpdateGroup" addPublicVariableEventHandler {(_this select 1) spawn server_updateGroup};
};