From 95aa9f604bf83d29ad51267cc1d62ded6eaf2f18 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Tue, 11 Aug 2015 13:53:55 +0100 Subject: [PATCH] Fix manual pre-setting of spectator camera unit If the spectator camera unit was set before the camera had ever opened then the unit list wouldn't be populated and as such the camera would automatically abort to free mode since the unit wasn't available to spectate. So now I'm running the updateUnits function before opening the camera to pre-populate the list. --- addons/spectator/functions/fnc_handleInterface.sqf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 335b71bbe1..95f05d01ec 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -38,6 +38,9 @@ switch (toLower _mode) do { GVAR(mousePos) = [0.5,0.5]; GVAR(treeSel) = objNull; + // Update units before opening to support pre-set camera unit + [] call FUNC(updateUnits); + // Initalize the camera view GVAR(camera) = "Camera" camCreate (ASLtoATL GVAR(camPos)); [] call FUNC(transitionCamera);