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.
This commit is contained in:
SilentSpike 2015-08-11 13:53:55 +01:00
parent c30cb45bd6
commit 95aa9f604b

View File

@ -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);