From 5200fd6a0298a593fc21d4233de494ff2867a927 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Wed, 5 Aug 2015 14:15:27 +0100 Subject: [PATCH] Add new option to spectator unit filter setting Adds an option to use playableUnits for scenarios where AI playable units are enabled. --- addons/spectator/ACE_Settings.hpp | 4 ++-- addons/spectator/CfgVehicles.hpp | 6 +++++- addons/spectator/functions/fnc_updateUnits.sqf | 2 +- addons/spectator/stringtable.xml | 3 +++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/addons/spectator/ACE_Settings.hpp b/addons/spectator/ACE_Settings.hpp index 539f7cef2d..2889fd2e0f 100644 --- a/addons/spectator/ACE_Settings.hpp +++ b/addons/spectator/ACE_Settings.hpp @@ -1,8 +1,8 @@ class ACE_Settings { class GVAR(filterUnits) { typeName = "SCALAR"; - value = 1; - values[] = {CSTRING(units_none), CSTRING(units_players), CSTRING(units_all)}; + value = 2; + values[] = {CSTRING(units_none), CSTRING(units_players), CSTRING(units_playable), CSTRING(units_all)}; }; class GVAR(filterSides) { typeName = "SCALAR"; diff --git a/addons/spectator/CfgVehicles.hpp b/addons/spectator/CfgVehicles.hpp index 8e685dae07..b63f349b0a 100644 --- a/addons/spectator/CfgVehicles.hpp +++ b/addons/spectator/CfgVehicles.hpp @@ -21,11 +21,15 @@ class CfgVehicles { class players { name = CSTRING(units_players); value = 1; + }; + class playable { + name = CSTRING(units_playable); + value = 2; default = 1; }; class all { name = CSTRING(units_all); - value = 2; + value = 3; }; }; }; diff --git a/addons/spectator/functions/fnc_updateUnits.sqf b/addons/spectator/functions/fnc_updateUnits.sqf index ef8fc3b4f1..75f1402179 100644 --- a/addons/spectator/functions/fnc_updateUnits.sqf +++ b/addons/spectator/functions/fnc_updateUnits.sqf @@ -36,7 +36,7 @@ if !(_newUnits isEqualTo []) exitWith { private ["_sides","_cond","_filteredUnits","_color","_icon"]; // Unit setting filter -_newUnits = [[],allPlayers,allUnits] select GVAR(filterUnits); +_newUnits = [[],allPlayers,playableUnits,allUnits] select GVAR(filterUnits); // Side setting filter _sides = []; diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index 4eb0e25c0a..5219ba7e2d 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -25,6 +25,9 @@ Only players Tylko gracze + + Playable Units + All units Wszystkie jednostki