fix cameras breaking pip scope camera r2t texture, reenable PIP scopes in arsenal

This commit is contained in:
commy2 2015-04-19 00:05:54 +02:00
parent 7ac7bc3f29
commit ae80da7492
2 changed files with 21 additions and 5 deletions

View File

@ -98,7 +98,7 @@ class CfgWeapons {
class ACE_optic_Hamr_PIP: ACE_optic_Hamr_2D {
author = "$STR_ACE_Common_ACETeam";
_generalMacro = "ACE_optic_Hamr_PIP";
scopeArsenal = 1;
//scopeArsenal = 1;
displayName = "$STR_ACE_optic_hamr_pip";
class ItemInfo: ItemInfo {
@ -147,7 +147,7 @@ class CfgWeapons {
class ACE_optic_Arco_PIP: ACE_optic_Arco_2D {
author = "$STR_ACE_Common_ACETeam";
_generalMacro = "ACE_optic_Arco_PIP";
scopeArsenal = 1;
//scopeArsenal = 1;
displayName = "$STR_ACE_optic_arco_pip";
class ItemInfo: ItemInfo {
@ -197,7 +197,7 @@ class CfgWeapons {
author = "$STR_ACE_Common_ACETeam";
_generalMacro = "ACE_optic_MRCO_PIP";
scope = 1;
scopeArsenal = 1;
//scopeArsenal = 1;
displayName = "$STR_ACE_optic_valdada_pip";
class ItemInfo: ItemInfo {
@ -239,7 +239,7 @@ class CfgWeapons {
class ACE_optic_SOS_PIP: ACE_optic_SOS_2D {
author = "$STR_ACE_Common_ACETeam";
_generalMacro = "ACE_optic_SOS_PIP";
scopeArsenal = 1;
//scopeArsenal = 1;
displayName = "$STR_ACE_optic_sos_pip";
class ItemInfo: ItemInfo {
@ -290,7 +290,7 @@ class CfgWeapons {
class ACE_optic_LRPS_PIP: ACE_optic_LRPS_2D {
author = "$STR_ACE_Common_ACETeam";
_generalMacro = "ACE_optic_LRPS_PIP";
scopeArsenal = 1;
//scopeArsenal = 1;
displayName = "$STR_ACE_optic_lrps_pip";
class ItemInfo: ItemInfo {

View File

@ -22,3 +22,19 @@ if (!hasInterface) exitWith {};
uiNamespace setVariable [QGVAR(RscWeaponInfo2D), _this select 0];
};
}] call EFUNC(common,addEventHandler);
// camera has to be re-created every time another camera is created. Otherwise r2t is either black or transparent. @todo Add popular custom cameras to the event in ACE_common.
["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);