From 1b1329b3507a8be5e52b7326985def6d624ebd50 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Wed, 11 May 2016 16:01:07 +0100 Subject: [PATCH] Increase spectator unit tree refresh rate Reduce the time between automated refreshing of the unit tree. Also makes an initial call to the tree populating code upon first opening to remove the initial delay. --- addons/spectator/functions/fnc_handleInterface.sqf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index ea20d0fcdd..381f64505c 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -27,8 +27,11 @@ switch (toLower _mode) do { // Always show interface and hide map upon opening [_display,nil,nil,!GVAR(showInterface),GVAR(showMap)] call FUNC(toggleInterface); + // Initalize the unit tree + ["onUnitsUpdate",[(_display displayCtrl IDC_UNIT) controlsGroupCtrl IDC_UNIT_TREE]] call FUNC(handleInterface); + // Keep unit list and tree up to date - [FUNC(handleUnits), 21, _display] call CBA_fnc_addPerFrameHandler; + [FUNC(handleUnits), 9, _display] call CBA_fnc_addPerFrameHandler; // Handle 3D unit icons GVAR(iconHandler) = addMissionEventHandler ["Draw3D",FUNC(handleIcons)];