2015-07-25 10:32:42 +00:00
|
|
|
/*
|
|
|
|
* Author: SilentSpike
|
2017-08-12 13:25:48 +00:00
|
|
|
* Adds or removes sides from the selection available to spectate. Local effect.
|
2015-07-25 10:32:42 +00:00
|
|
|
*
|
|
|
|
* Default selection is [west,east,resistance,civilian]
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Sides to add <ARRAY>
|
|
|
|
* 1: Sides to remove <ARRAY>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2017-08-12 13:25:48 +00:00
|
|
|
* Sides available <ARRAY>
|
2015-07-25 10:32:42 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2017-08-12 13:25:48 +00:00
|
|
|
* [[west], [east,civilian]] call ace_spectator_fnc_updateSides
|
2015-07-25 10:32:42 +00:00
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
params [["_addSides",[],[[]]], ["_removeSides",[],[[]]]];
|
|
|
|
|
|
|
|
// Add and remove sides
|
|
|
|
_addSides append (GVAR(availableSides) - _removeSides);
|
|
|
|
|
|
|
|
// Only need array of unique sides
|
2015-07-27 17:32:21 +00:00
|
|
|
_addSides = _addSides arrayIntersect _addSides;
|
2015-07-25 10:32:42 +00:00
|
|
|
|
|
|
|
GVAR(availableSides) = _addSides;
|
|
|
|
|
|
|
|
_addSides
|