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.
This commit is contained in:
SilentSpike 2016-05-11 16:01:07 +01:00
parent 9364ae60df
commit 1b1329b350

View File

@ -27,8 +27,11 @@ switch (toLower _mode) do {
// Always show interface and hide map upon opening // Always show interface and hide map upon opening
[_display,nil,nil,!GVAR(showInterface),GVAR(showMap)] call FUNC(toggleInterface); [_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 // 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 // Handle 3D unit icons
GVAR(iconHandler) = addMissionEventHandler ["Draw3D",FUNC(handleIcons)]; GVAR(iconHandler) = addMissionEventHandler ["Draw3D",FUNC(handleIcons)];