disable pip scopes in arsenal

This commit is contained in:
commy2 2015-04-04 12:06:20 +02:00
parent 5fdd93587c
commit b7fa2bd8b3
5 changed files with 24 additions and 11 deletions

View File

@ -8,7 +8,7 @@ class CfgVehicles {
MACRO_ADDITEM(ACE_optic_Arco_2D,2); MACRO_ADDITEM(ACE_optic_Arco_2D,2);
MACRO_ADDITEM(ACE_optic_Arco_PIP,2); MACRO_ADDITEM(ACE_optic_Arco_PIP,2);
MACRO_ADDITEM(ACE_optic_MRCO_2D,2); MACRO_ADDITEM(ACE_optic_MRCO_2D,2);
MACRO_ADDITEM(ACE_optic_MRCO_PIP,2); //MACRO_ADDITEM(ACE_optic_MRCO_PIP,2);
MACRO_ADDITEM(ACE_optic_SOS_2D,2); MACRO_ADDITEM(ACE_optic_SOS_2D,2);
MACRO_ADDITEM(ACE_optic_SOS_PIP,2); MACRO_ADDITEM(ACE_optic_SOS_PIP,2);
MACRO_ADDITEM(ACE_optic_LRPS_2D,2); MACRO_ADDITEM(ACE_optic_LRPS_2D,2);

View File

@ -16,6 +16,7 @@ class CfgWeapons {
class ACE_optic_DMS: optic_DMS { class ACE_optic_DMS: optic_DMS {
author = "$STR_ACE_Common_ACETeam"; author = "$STR_ACE_Common_ACETeam";
_generalMacro = "ACE_optic_DMS"; _generalMacro = "ACE_optic_DMS";
scope = 1;
displayName = "LOCALIZE ACE DMS"; displayName = "LOCALIZE ACE DMS";
//descriptionShort = "$STR_A3_CFGWEAPONS_ACC_DMS1"; //descriptionShort = "$STR_A3_CFGWEAPONS_ACC_DMS1";
weaponInfoType = "ACE_RscWeaponZeroing"; weaponInfoType = "ACE_RscWeaponZeroing";
@ -75,6 +76,7 @@ class CfgWeapons {
class ACE_optic_Hamr_PIP: ACE_optic_Hamr_2D { class ACE_optic_Hamr_PIP: ACE_optic_Hamr_2D {
author = "$STR_ACE_Common_ACETeam"; author = "$STR_ACE_Common_ACETeam";
_generalMacro = "ACE_optic_Hamr_PIP"; _generalMacro = "ACE_optic_Hamr_PIP";
scopeArsenal = 1;
displayName = "$STR_ACE_optic_hamr_pip"; displayName = "$STR_ACE_optic_hamr_pip";
class ItemInfo: ItemInfo { class ItemInfo: ItemInfo {
@ -118,6 +120,7 @@ class CfgWeapons {
class ACE_optic_Arco_PIP: ACE_optic_Arco_2D { class ACE_optic_Arco_PIP: ACE_optic_Arco_2D {
author = "$STR_ACE_Common_ACETeam"; author = "$STR_ACE_Common_ACETeam";
_generalMacro = "ACE_optic_Arco_PIP"; _generalMacro = "ACE_optic_Arco_PIP";
scopeArsenal = 1;
displayName = "$STR_ACE_optic_arco_pip"; displayName = "$STR_ACE_optic_arco_pip";
class ItemInfo: ItemInfo { class ItemInfo: ItemInfo {
@ -161,6 +164,8 @@ class CfgWeapons {
class ACE_optic_MRCO_PIP: ACE_optic_MRCO_2D { class ACE_optic_MRCO_PIP: ACE_optic_MRCO_2D {
author = "$STR_ACE_Common_ACETeam"; author = "$STR_ACE_Common_ACETeam";
_generalMacro = "ACE_optic_MRCO_PIP"; _generalMacro = "ACE_optic_MRCO_PIP";
scope = 1;
scopeArsenal = 1;
displayName = "$STR_ACE_optic_valdada_pip"; displayName = "$STR_ACE_optic_valdada_pip";
class ItemInfo: ItemInfo { class ItemInfo: ItemInfo {
@ -197,6 +202,7 @@ class CfgWeapons {
class ACE_optic_SOS_PIP: ACE_optic_SOS_2D { class ACE_optic_SOS_PIP: ACE_optic_SOS_2D {
author = "$STR_ACE_Common_ACETeam"; author = "$STR_ACE_Common_ACETeam";
_generalMacro = "ACE_optic_SOS_PIP"; _generalMacro = "ACE_optic_SOS_PIP";
scopeArsenal = 1;
displayName = "$STR_ACE_optic_sos_pip"; displayName = "$STR_ACE_optic_sos_pip";
class ItemInfo: ItemInfo { class ItemInfo: ItemInfo {
@ -241,6 +247,7 @@ class CfgWeapons {
class ACE_optic_LRPS_PIP: ACE_optic_LRPS_2D { class ACE_optic_LRPS_PIP: ACE_optic_LRPS_2D {
author = "$STR_ACE_Common_ACETeam"; author = "$STR_ACE_Common_ACETeam";
_generalMacro = "ACE_optic_LRPS_PIP"; _generalMacro = "ACE_optic_LRPS_PIP";
scopeArsenal = 1;
displayName = "$STR_ACE_optic_lrps_pip"; displayName = "$STR_ACE_optic_lrps_pip";
class ItemInfo: ItemInfo { class ItemInfo: ItemInfo {

View File

@ -1,18 +1,24 @@
// by commy2 // by commy2
#include "script_component.hpp" #include "script_component.hpp"
// PiP technique by BadBenson if (!hasInterface) exitWith {};
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]]; 0 = 0 spawn {
GVAR(camera) cameraEffect ["INTERNAL", "BACK", "ace_optics_rendertarget0"]; 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"];
};
// save control for fired EH // save control for fired EH
["infoDisplayChanged", { ["infoDisplayChanged", {
if (!isNull ((_this select 0) displayCtrl 1713001)) then { if (!isNull ((_this select 0) displayCtrl 1713001)) then {
uiNamespace setVariable [QGVAR(RscWeaponInfoPIP), _this select 0]; uiNamespace setVariable [QGVAR(RscWeaponInfo2D), _this select 0];
}; };
}] call EFUNC(common,addEventHandler); }] call EFUNC(common,addEventHandler);

View File

@ -9,7 +9,7 @@ class CfgPatches {
"ACE_optic_Arco_2D", "ACE_optic_Arco_2D",
"ACE_optic_Arco_PIP", "ACE_optic_Arco_PIP",
"ACE_optic_MRCO_2D", "ACE_optic_MRCO_2D",
"ACE_optic_MRCO_PIP", //"ACE_optic_MRCO_PIP",
"ACE_optic_SOS_2D", "ACE_optic_SOS_2D",
"ACE_optic_SOS_PIP", "ACE_optic_SOS_PIP",
"ACE_optic_LRPS_2D", "ACE_optic_LRPS_2D",

View File

@ -25,7 +25,7 @@ _weapon = _this select 1;
// check if compatible scope is used // check if compatible scope is used
private "_display"; private "_display";
_display = uiNamespace getVariable [QGVAR(RscWeaponInfoPIP), displayNull]; _display = uiNamespace getVariable [QGVAR(RscWeaponInfo2D), displayNull];
if (isNull _display) exitWith {}; if (isNull _display) exitWith {};