From 615f21165ad1dfa781c7eeaf8fc96dc2bd536495 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Sat, 5 Nov 2016 17:48:07 -0400 Subject: [PATCH] Fix rejoin group after change clothes Also removed redundant delete and remove for _oldUnit since it is already done in call _switchUnit --- SQF/dayz_code/compile/player_switchModel.sqf | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/SQF/dayz_code/compile/player_switchModel.sqf b/SQF/dayz_code/compile/player_switchModel.sqf index 4c2d2be50..f460dcb2c 100644 --- a/SQF/dayz_code/compile/player_switchModel.sqf +++ b/SQF/dayz_code/compile/player_switchModel.sqf @@ -124,7 +124,7 @@ _switchUnit = { removeAllWeapons _oldUnit; {_oldUnit removeMagazine _x;} count magazines _oldUnit; if !(isNull _oldUnit) then {deleteVehicle _oldUnit;}; - if (!isNil "dayz_groupInit" && count (units _oldGroup) > 1) then { + if (!isNil "dayz_groupInit" && count (units _oldGroup) > 0) then { [_newUnit] joinSilent _oldGroup; if (count (units _group) == 0) then {deleteGroup _group;}; if (_leader) then { @@ -190,12 +190,6 @@ if (gear_done) then {disableUserInput false;disableUserInput false;disableUserIn //diag_log format["Backpack weapons: %1",getWeaponCargo unitBackpack _newUnit]; //diag_log format["Backpack magazines: %1",getMagazineCargo unitBackpack _newUnit]; -//Clear and delete old Unit -removeAllWeapons _oldUnit; -{_oldUnit removeMagazine _x;} count magazines _oldUnit; -if !(isNull _oldUnit) then {deleteVehicle _oldUnit;}; -deleteGroup _oldGroup; - // player switchCamera = _currentCamera; if (_currentWpn != "") then {_newUnit selectWeapon _currentWpn;}; [objNull, player, rSwitchMove, _currentAnim] call RE;