Skip to content

Commit

Permalink
loop forcespectator
Browse files Browse the repository at this point in the history
  • Loading branch information
nomisum committed Jul 8, 2020
1 parent edcaad0 commit 286a8dd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions BC_setup/functions/client/fn_streamingSpectator.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,15 @@ if (hasInterface) then {
player setVariable ["tf_unable_to_use_radio", true];

diag_log format ["streaming spectator: disabling tfar spectator channel for %1", player];

[] spawn {
waitUntil {(OPFOR_TELEPORT_TARGET select 0 != 0)};
private _truck = missionNameSpace getVariable ["GRAD_tracking_radioVehObj", objNull];
[0, _truck, -2, [0,20,50], getDir _truck] call ace_spectator_fnc_setCameraAttributes;
};
// as we dont have any events we force spectator false here in a cheap local loop
[{
player setVariable ["TFAR_forceSpectator", false];
}, 0, []] call CBA_fnc_addPerFrameHandler;
};
};

0 comments on commit 286a8dd

Please sign in to comment.