mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Use joinSilent instead of join
This commit is contained in:
@@ -124,7 +124,7 @@ _switchUnit = {
|
|||||||
{_oldUnit removeMagazine _x;} count magazines _oldUnit;
|
{_oldUnit removeMagazine _x;} count magazines _oldUnit;
|
||||||
if !(isNull _oldUnit) then {deleteVehicle _oldUnit;};
|
if !(isNull _oldUnit) then {deleteVehicle _oldUnit;};
|
||||||
if (!isNil "dayz_groupInit" && count (units _oldGroup) > 1) then {
|
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 _group) == 0) then {deleteGroup _group;};
|
||||||
};
|
};
|
||||||
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
||||||
|
|||||||
@@ -11,6 +11,6 @@ dayz_groupDisbandThread = _group spawn {
|
|||||||
//Wait for response from server to confirm group finished updating in DB
|
//Wait for response from server to confirm group finished updating in DB
|
||||||
waitUntil {!isNil "dayz_groupDisbanded"};
|
waitUntil {!isNil "dayz_groupDisbanded"};
|
||||||
|
|
||||||
{[_x] join grpNull} count (units _this);
|
{[_x] joinSilent grpNull} count (units _this);
|
||||||
deleteGroup _this;
|
deleteGroup _this;
|
||||||
};
|
};
|
||||||
@@ -4,7 +4,7 @@ private ["_count","_found","_group","_hasGPS","_index","_marker","_markBody","_m
|
|||||||
_group = player call dayz_filterGroup;
|
_group = player call dayz_filterGroup;
|
||||||
|
|
||||||
if (dayz_requireRadio && {count _group > 1} && {!("ItemRadio" in items player)}) exitWith {
|
if (dayz_requireRadio && {count _group > 1} && {!("ItemRadio" in items player)}) exitWith {
|
||||||
[player] join grpNull;
|
[player] joinSilent grpNull;
|
||||||
_group = [];
|
_group = [];
|
||||||
if (!isNull findDisplay 80000) then {findDisplay 80000 closeDisplay 2;};
|
if (!isNull findDisplay 80000) then {findDisplay 80000 closeDisplay 2;};
|
||||||
localize "STR_EPOCH_RADIO_CONTACT_LOST" call dayz_rollingMessages;
|
localize "STR_EPOCH_RADIO_CONTACT_LOST" call dayz_rollingMessages;
|
||||||
@@ -43,7 +43,6 @@ if (visibleMap or !isNull findDisplay 88890) then {
|
|||||||
if (_markBody) then {
|
if (_markBody) then {
|
||||||
_found = false;
|
_found = false;
|
||||||
{
|
{
|
||||||
//Only mark closest body to player's current position (allDead is sorted by distance)
|
|
||||||
if (_x getVariable["bodyName",""] == name player) exitWith {
|
if (_x getVariable["bodyName",""] == name player) exitWith {
|
||||||
_found = true;
|
_found = true;
|
||||||
_pos = [_x] call FNC_GetPos;
|
_pos = [_x] call FNC_GetPos;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
private "_oldGroup";
|
private "_oldGroup";
|
||||||
|
|
||||||
if (count (units group player) > 1) then {
|
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 {
|
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
|
//Only auto join player into group if leader is in their savedGroup
|
||||||
if (getPlayerUID leader _x in dayz_myGroup) exitWith {
|
if (getPlayerUID leader _x in dayz_myGroup) exitWith {
|
||||||
_oldGroup = group player;
|
_oldGroup = group player;
|
||||||
[player] join _x;
|
[player] joinSilent _x;
|
||||||
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
||||||
|
|
||||||
// Update saved group in DB
|
// Update saved group in DB
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ _inviter = _inviterUID call dayz_getPlayer;
|
|||||||
|
|
||||||
if (!isNull _inviter) then {
|
if (!isNull _inviter) then {
|
||||||
_oldGroup = group player;
|
_oldGroup = group player;
|
||||||
[player] join (group _inviter);
|
[player] joinSilent (group _inviter);
|
||||||
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
||||||
|
|
||||||
// Update saved group in DB
|
// Update saved group in DB
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ _target = _targetUID call dayz_getPlayer;
|
|||||||
|
|
||||||
if (isNull _target or _target == player or player != leader group player) exitWith {};
|
if (isNull _target or _target == player or player != leader group player) exitWith {};
|
||||||
|
|
||||||
[_target] join grpNull;
|
[_target] joinSilent grpNull;
|
||||||
|
|
||||||
PVDZ_Server_UpdateGroup = [2,player,_targetUID];
|
PVDZ_Server_UpdateGroup = [2,player,_targetUID];
|
||||||
publicVariableServer "PVDZ_Server_UpdateGroup";
|
publicVariableServer "PVDZ_Server_UpdateGroup";
|
||||||
|
|||||||
@@ -10,5 +10,5 @@ publicVariableServer "PVDZ_Server_UpdateGroup";
|
|||||||
dayz_groupLeaveThread = [] spawn {
|
dayz_groupLeaveThread = [] spawn {
|
||||||
//Wait for response from server to confirm group finished updating in DB
|
//Wait for response from server to confirm group finished updating in DB
|
||||||
waitUntil {!isNil "dayz_groupLeft"};
|
waitUntil {!isNil "dayz_groupLeft"};
|
||||||
[player] join grpNull;
|
[player] joinSilent grpNull;
|
||||||
};
|
};
|
||||||
@@ -5,6 +5,11 @@ _player = _this select 1;
|
|||||||
_targetUID = if (count _this > 2) then {_this select 2} else {"0"};
|
_targetUID = if (count _this > 2) then {_this select 2} else {"0"};
|
||||||
_playerUID = getPlayerUID _player;
|
_playerUID = getPlayerUID _player;
|
||||||
|
|
||||||
|
if (_event < 3) then {
|
||||||
|
//Small delay needed for group changes to propagate to server
|
||||||
|
uiSleep 1;
|
||||||
|
};
|
||||||
|
|
||||||
_groupUIDs = [];
|
_groupUIDs = [];
|
||||||
{
|
{
|
||||||
if (alive _x && isPlayer _x) then {
|
if (alive _x && isPlayer _x) then {
|
||||||
|
|||||||
@@ -103,7 +103,6 @@ if (isServer) then {
|
|||||||
"PVDZE_handleSafeGear" addPublicVariableEventHandler {(_this select 1) spawn server_handleSafeGear};
|
"PVDZE_handleSafeGear" addPublicVariableEventHandler {(_this select 1) spawn server_handleSafeGear};
|
||||||
"PVDZE_fullobj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishFullObject}; // PlotForLife take base ownership
|
"PVDZE_fullobj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishFullObject}; // PlotForLife take base ownership
|
||||||
if (dayz_groupSystem) then {
|
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};
|
"PVDZ_Server_UpdateGroup" addPublicVariableEventHandler {(_this select 1) spawn server_updateGroup};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user