ACE3/addons/spectator/functions/fnc_interrupt.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
742 B
Plaintext

/*
* Author: SilentSpike
* Deprecated. Technically never publically documented, but just in case.
*/
#include "script_component.hpp"
params [["_reason", "", [""]], ["_interrupt", true, [true]]];
ACE_DEPRECATED(QFUNC(interrupt),"3.12.0","just close and reopen spectator");
// Nothing to do when spectator is closed
if !(GVAR(isSet)) exitWith {};
if (_reason == "") exitWith { WARNING("Invalid Reason"); };
if (_interrupt) then {
GVAR(interrupts) pushBack _reason;
} else {
GVAR(interrupts) = GVAR(interrupts) - [_reason];
};
if (GVAR(interrupts) isEqualTo []) then {
if (isNull SPEC_DISPLAY) then {
[true] call FUNC(ui);
};
} else {
if !(isNull SPEC_DISPLAY) then {
[false] call FUNC(ui);
};
};