From c815a9cae874649e2e9c9a0bbdd551c94ecbb2d9 Mon Sep 17 00:00:00 2001 From: Cuel Date: Sat, 28 Oct 2017 18:23:18 +0200 Subject: [PATCH] (spectator) unhide/unmute unit on exiting (#5699) * unhide/unmute unit on exiting * Update fnc_setSpectator.sqf --- addons/spectator/functions/fnc_setSpectator.sqf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index b995a16648..c7087d6d5b 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -110,8 +110,13 @@ if (alive player) then { [player, _hidden, QGVAR(isSet), side group player] call EFUNC(common,switchToGroupSide); // Ghosts can't talk - [player, QGVAR(isSet)] call EFUNC(common,hideUnit); - [player, QGVAR(isSet)] call EFUNC(common,muteUnit); + if (_hidden) then { + [player, QGVAR(isSet)] call EFUNC(common,hideUnit); + [player, QGVAR(isSet)] call EFUNC(common,muteUnit); + } else { + [player, QGVAR(isSet)] call EFUNC(common,unhideUnit); + [player, QGVAR(isSet)] call EFUNC(common,unmuteUnit); + }; }; // Reset interruptions