2015-04-03 10:33:12 +00:00
// by commy2
#include "script_component.hpp"
2015-04-03 20:30:29 +00:00
2015-04-04 10:06:20 +00:00
if (!hasInterface) exitWith {};
2015-04-03 20:30:29 +00:00
2015-04-04 10:06:20 +00:00
0 = 0 spawn {
waituntil {!isNull ACE_player};
// PiP technique by BadBenson
GVAR(camera) = "camera" camCreate positioncameratoworld [0,0,0];
GVAR(camera) camSetFov 0.7;
GVAR(camera) camSetTarget ACE_player;
GVAR(camera) camCommit 1;
"ace_optics_rendertarget0" setPiPEffect [2, 1.0, 1.0, 1.0, 0.0, [0.0, 1.0, 0.0, 0.25], [1.0, 0.0, 1.0, 1.0], [0.199, 0.587, 0.114, 0.0]];
GVAR(camera) cameraEffect ["INTERNAL", "BACK", "ace_optics_rendertarget0"];
};
2015-04-04 04:19:19 +00:00
// save control for fired EH
["infoDisplayChanged", {
if (!isNull ((_this select 0) displayCtrl 1713001)) then {
2015-04-04 10:06:20 +00:00
uiNamespace setVariable [QGVAR(RscWeaponInfo2D), _this select 0];
2015-04-04 04:19:19 +00:00
};
}] call EFUNC(common,addEventHandler);
2015-04-18 22:05:54 +00:00
2015-05-21 16:42:44 +00:00
// camera has to be re-created every ACE_time another camera is created. Otherwise r2t is either black or transparent. @todo Add popular custom cameras to the event in ACE_common.
2015-04-18 22:05:54 +00:00
["activeCameraChanged", {
if !(_this select 1) then {
deleteVehicle GVAR(camera);
// PiP technique by BadBenson
GVAR(camera) = "camera" camCreate positioncameratoworld [0,0,0];
GVAR(camera) camSetFov 0.7;
GVAR(camera) camSetTarget ACE_player;
GVAR(camera) camCommit 1;
"ace_optics_rendertarget0" setPiPEffect [2, 1.0, 1.0, 1.0, 0.0, [0.0, 1.0, 0.0, 0.25], [1.0, 0.0, 1.0, 1.0], [0.199, 0.587, 0.114, 0.0]];
GVAR(camera) cameraEffect ["INTERNAL", "BACK", "ace_optics_rendertarget0"];
};
}] call EFUNC(common,addEventHandler);