ACE3/addons/spectator/functions/fnc_getCameraAttributes.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

30 lines
733 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: kymckay
* 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
*/
if (!isNil QGVAR(camera)) then {
[GVAR(camMode), GVAR(camFocus), GVAR(camVision), getPosATL GVAR(camera), getDirVisual GVAR(camera)]
} else {
// These values could be pre-set by function
[
GETMVAR(GVAR(camMode),0),
GETMVAR(GVAR(camFocus),objNull),
GETMVAR(GVAR(camVision),-2),
GETMVAR(GVAR(camPos),[ARR_3(0,0,0)]),
GETMVAR(GVAR(camDir),0)
]
};