2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2017-08-12 13:25:48 +00:00
|
|
|
/*
|
|
|
|
* Author: SilentSpike
|
|
|
|
* Returns the current spectator camera attributes (see setCameraAttributes for details).
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* [Mode, Focus, Vision, Position, Direction] <ARRAY>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [] call ace_spectator_fnc_getCameraAttributes
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
|
|
|
|
2020-02-11 22:47:18 +00:00
|
|
|
if (!isNil QGVAR(camera)) then {
|
2017-08-30 15:36:53 +00:00
|
|
|
[GVAR(camMode), GVAR(camFocus), GVAR(camVision), getPosATL GVAR(camera), getDirVisual GVAR(camera)]
|
2017-08-12 13:25:48 +00:00
|
|
|
} else {
|
|
|
|
// These values could be pre-set by function
|
|
|
|
[
|
|
|
|
GETMVAR(GVAR(camMode),0),
|
2017-08-30 15:36:53 +00:00
|
|
|
GETMVAR(GVAR(camFocus),objNull),
|
2017-08-12 13:25:48 +00:00
|
|
|
GETMVAR(GVAR(camVision),-2),
|
|
|
|
GETMVAR(GVAR(camPos),[ARR_3(0,0,0)]),
|
|
|
|
GETMVAR(GVAR(camDir),0)
|
|
|
|
]
|
|
|
|
};
|