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