From 47d96835c6c7cb4a785e02a2d9975d689711f977 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Mon, 27 Jul 2015 18:32:21 +0100 Subject: [PATCH] Fix arrayIntersect oversight --- addons/spectator/functions/fnc_updateCameraModes.sqf | 2 +- addons/spectator/functions/fnc_updateSpectatableSides.sqf | 2 +- addons/spectator/functions/fnc_updateVisionModes.sqf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/spectator/functions/fnc_updateCameraModes.sqf b/addons/spectator/functions/fnc_updateCameraModes.sqf index ec2837ffb8..aef51b56c6 100644 --- a/addons/spectator/functions/fnc_updateCameraModes.sqf +++ b/addons/spectator/functions/fnc_updateCameraModes.sqf @@ -30,7 +30,7 @@ _currentModes = GVAR(availableModes); _newModes = _addModes arrayIntersect [0,1,2]; _newModes append (_currentModes - _removeModes); -_newModes arrayIntersect _newModes; +_newModes = _newModes arrayIntersect _newModes; _newModes sort true; // Can't become an empty array diff --git a/addons/spectator/functions/fnc_updateSpectatableSides.sqf b/addons/spectator/functions/fnc_updateSpectatableSides.sqf index e4f359b4d1..57f7756d54 100644 --- a/addons/spectator/functions/fnc_updateSpectatableSides.sqf +++ b/addons/spectator/functions/fnc_updateSpectatableSides.sqf @@ -26,7 +26,7 @@ params [["_addSides",[],[[]]], ["_removeSides",[],[[]]]]; _addSides append (GVAR(availableSides) - _removeSides); // Only need array of unique sides -_addSides arrayIntersect _addSides; +_addSides = _addSides arrayIntersect _addSides; GVAR(availableSides) = _addSides; diff --git a/addons/spectator/functions/fnc_updateVisionModes.sqf b/addons/spectator/functions/fnc_updateVisionModes.sqf index b2b2cd75d6..2a1e500f3f 100644 --- a/addons/spectator/functions/fnc_updateVisionModes.sqf +++ b/addons/spectator/functions/fnc_updateVisionModes.sqf @@ -38,7 +38,7 @@ _currentModes = GVAR(availableVisions); _newModes = _addModes arrayIntersect [-2,-1,0,1,2,3,4,5,6,7]; _newModes append (_currentModes - _removeModes); -_newModes arrayIntersect _newModes; +_newModes = _newModes arrayIntersect _newModes; _newModes sort true; // Can't become an empty array