ACE3/addons/spectator/functions/fnc_cam_resetTarget.sqf
SilentSpike d3ce75daef Spectator overhaul (#5171)
- Overhauls the spectator module entirely to share a similar UX to BI's "End Game Spectator" while maintaining some of the extended flexibility of ACE Spectator.
- Simplifies spectator setup by reducing the number of settings. More advanced setup is still possible via the API functions provided.
2017-08-12 14:25:48 +01:00

30 lines
513 B
Plaintext

/*
* Author: Nelson Duarte, SilentSpike
* Removes the current camera interest and detaches dummy target.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call ace_spectator_fnc_cam_resetTarget
*
* Public: No
*/
#include "script_component.hpp"
private _camera = GVAR(camera);
private _dummy = GVAR(camDummy);
if !(isNull _camera || isNull _dummy) then {
_camera camPrepareTarget objNull;
_camera camCommitPrepared 0;
detach _dummy;
GVAR(camHasTarget) = false;
};