mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Elevation and windage can now have different adjustment increments:
* ACE_ScopeAdjust_VerticalIncrement * ACE_ScopeAdjust_HorizontalIncrement
This commit is contained in:
parent
ac04ee1a43
commit
458daad5bb
@ -5,7 +5,7 @@ class CfgWeapons {
|
||||
class optic_LRPS : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Snip {
|
||||
@ -19,7 +19,7 @@ class CfgWeapons {
|
||||
class optic_SOS : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Snip {
|
||||
@ -33,7 +33,7 @@ class CfgWeapons {
|
||||
class optic_DMS : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 20 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Snip {
|
||||
@ -47,7 +47,7 @@ class CfgWeapons {
|
||||
class optic_AMS_base : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class AMS {
|
||||
@ -61,7 +61,7 @@ class CfgWeapons {
|
||||
class optic_KHS_base : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class KHS {
|
||||
@ -75,7 +75,7 @@ class CfgWeapons {
|
||||
class optic_KHS_old : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class KHS {
|
||||
|
@ -19,7 +19,7 @@ PARAMS_3(_unit,_turretAndDirection,_majorStep);
|
||||
if (!(_unit isKindOf "Man")) exitWith {false};
|
||||
if (currentMuzzle _unit != currentWeapon _unit) exitWith {false};
|
||||
|
||||
private ["_weaponIndex", "_zeroing", "_optic", "_increment", "_maxVertical", "_maxHorizontal", "_elevation", "_windage", "_zero", "_adjustment"];
|
||||
private ["_weaponIndex", "_zeroing", "_optic", "_verticalIncrement", "_horizontalIncrement", "_maxVertical", "_maxHorizontal", "_elevation", "_windage", "_zero", "_adjustment"];
|
||||
|
||||
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
||||
if (_weaponIndex < 0) exitWith {false};
|
||||
@ -34,28 +34,28 @@ if (isNil QGVAR(Optics)) then {
|
||||
};
|
||||
|
||||
_optic = GVAR(Optics) select _weaponIndex;
|
||||
_increment = getNumber (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_Increment");
|
||||
_verticalIncrement = getNumber (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_VerticalIncrement");
|
||||
_horizontalIncrement = getNumber (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_HorizontalIncrement");
|
||||
_maxVertical = getArray (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_Vertical");
|
||||
_maxHorizontal = getArray (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_Horizontal");
|
||||
|
||||
if ((_increment == 0) or (count _maxHorizontal < 2) or (count _maxVertical < 2)) exitWith {false};
|
||||
if ((count _maxHorizontal < 2) || (count _maxVertical < 2)) exitWith {false};
|
||||
if ((_verticalIncrement == 0) && (_horizontalIncrement == 0)) exitWith {false};
|
||||
|
||||
_zeroing = _adjustment select _weaponIndex;
|
||||
_elevation = _zeroing select 0;
|
||||
_windage = _zeroing select 1;
|
||||
_zero = _zeroing select 2;
|
||||
|
||||
switch (_turretAndDirection) do
|
||||
{
|
||||
case ELEVATION_UP: { _elevation = _elevation + _increment };
|
||||
case ELEVATION_DOWN: { _elevation = _elevation - _increment };
|
||||
case WINDAGE_LEFT: { _windage = _windage - _increment };
|
||||
case WINDAGE_RIGHT: { _windage = _windage + _increment };
|
||||
switch (_turretAndDirection) do {
|
||||
case ELEVATION_UP: { _elevation = _elevation + _verticalIncrement };
|
||||
case ELEVATION_DOWN: { _elevation = _elevation - _verticalIncrement };
|
||||
case WINDAGE_LEFT: { _windage = _windage - _horizontalIncrement };
|
||||
case WINDAGE_RIGHT: { _windage = _windage + _horizontalIncrement };
|
||||
};
|
||||
|
||||
if (_majorStep) then {
|
||||
switch (_turretAndDirection) do
|
||||
{
|
||||
switch (_turretAndDirection) do {
|
||||
case ELEVATION_UP: { _elevation = ceil(_elevation) };
|
||||
case ELEVATION_DOWN: { _elevation = floor(_elevation) };
|
||||
case WINDAGE_LEFT: { _windage = floor(_windage) };
|
||||
|
@ -51,7 +51,8 @@ ace_gforcecoef
|
||||
ace_protection
|
||||
ace_scopeadjust_horizontal
|
||||
ace_scopeadjust_vertical
|
||||
ace_scopeadjust_increment
|
||||
ace_scopeadjust_verticalincrement
|
||||
ace_scopeadjust_horizontalincrement
|
||||
ace_isusedlauncher
|
||||
ace_attachable
|
||||
ace_range
|
||||
|
@ -49,7 +49,7 @@ class CfgWeapons {
|
||||
class BWA3_optic_ZO4x30 : optic_Hamr {
|
||||
ACE_ScopeAdjust_Vertical[] = { -10, 10 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -10, 10 };
|
||||
ACE_ScopeAdjust_Increment = 0.2;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.2;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Scope {
|
||||
@ -62,7 +62,7 @@ class CfgWeapons {
|
||||
class BWA3_optic_ZO4x30_NSV : optic_Hamr {
|
||||
ACE_ScopeAdjust_Vertical[] = { -10, 10 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -10, 10 };
|
||||
ACE_ScopeAdjust_Increment = 0.2;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.2;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Scope {
|
||||
@ -75,7 +75,7 @@ class CfgWeapons {
|
||||
class BWA3_optic_ZO4x30_IRV : optic_Hamr {
|
||||
ACE_ScopeAdjust_Vertical[] = { -10, 10 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -10, 10 };
|
||||
ACE_ScopeAdjust_Increment = 0.2;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.2;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Scope {
|
||||
@ -88,7 +88,7 @@ class CfgWeapons {
|
||||
class BWA3_optic_Shortdot : optic_Hamr {
|
||||
ACE_ScopeAdjust_Vertical[] = { -0.1, 10.1 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -5.1, 5.1 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Scope {
|
||||
@ -101,7 +101,7 @@ class CfgWeapons {
|
||||
class BWA3_optic_20x50 : optic_Hamr {
|
||||
ACE_ScopeAdjust_Vertical[] = { 0, 26 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Scope {
|
||||
@ -114,7 +114,7 @@ class CfgWeapons {
|
||||
class BWA3_optic_20x50_NSV : BWA3_optic_20x50 {
|
||||
ACE_ScopeAdjust_Vertical[] = { 0, 26 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Scope {
|
||||
@ -127,7 +127,7 @@ class CfgWeapons {
|
||||
class BWA3_optic_24x72 : optic_Hamr {
|
||||
ACE_ScopeAdjust_Vertical[] = { 0, 16 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -7, 7 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Scope {
|
||||
@ -140,7 +140,7 @@ class CfgWeapons {
|
||||
class BWA3_optic_24x72_NSV : BWA3_optic_20x50 {
|
||||
ACE_ScopeAdjust_Vertical[] = { 0, 16 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -7, 7 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Scope {
|
||||
|
@ -58,7 +58,7 @@ class CfgWeapons
|
||||
class HLC_Optic_PSO1 : optic_dms {
|
||||
ACE_ScopeAdjust_Vertical[] = { 0, 0 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -10, 10 };
|
||||
ACE_ScopeAdjust_Increment = 0.5;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.5;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Snip {
|
||||
@ -71,6 +71,6 @@ class CfgWeapons
|
||||
class HLC_Optic_1p29 : HLC_Optic_PSO1 {
|
||||
ACE_ScopeAdjust_Vertical[] = {};
|
||||
ACE_ScopeAdjust_Horizontal[] = {};
|
||||
ACE_ScopeAdjust_Increment = 0;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0;
|
||||
};
|
||||
};
|
@ -8,7 +8,7 @@ class CfgWeapons {
|
||||
class RH_shortdot : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -1, 25 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -13, 13 };
|
||||
ACE_ScopeAdjust_Increment = 0.5;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.5;
|
||||
ACE_ScopeAdjust_Unit = "MOA";
|
||||
};
|
||||
*/
|
||||
@ -16,7 +16,7 @@ class CfgWeapons {
|
||||
class RH_accupoint : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Accupoint {
|
||||
@ -30,7 +30,7 @@ class CfgWeapons {
|
||||
class RH_m3lr : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class m3lr {
|
||||
@ -44,7 +44,7 @@ class CfgWeapons {
|
||||
class RH_leu_mk4 : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class mk4 {
|
||||
@ -58,7 +58,7 @@ class CfgWeapons {
|
||||
class RH_c79 : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class c79scope {
|
||||
@ -72,7 +72,7 @@ class CfgWeapons {
|
||||
class RH_c79_2d : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class c79scope {
|
||||
@ -86,7 +86,7 @@ class CfgWeapons {
|
||||
class RH_anpvs10 : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class pvs10 {
|
||||
@ -100,7 +100,7 @@ class CfgWeapons {
|
||||
class RH_pas13cm : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class MTWS {
|
||||
@ -114,7 +114,7 @@ class CfgWeapons {
|
||||
class RH_pas13cmg : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class MTWSmg {
|
||||
@ -128,7 +128,7 @@ class CfgWeapons {
|
||||
class RH_pas13ch : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class HTWS {
|
||||
|
@ -62,6 +62,6 @@ class CfgWeapons
|
||||
class rhs_acc_pso1m2: rhs_acc_sniper_base {
|
||||
ACE_ScopeAdjust_Vertical[] = { 0, 0 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -10, 10 };
|
||||
ACE_ScopeAdjust_Increment = 0.5;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.5;
|
||||
};
|
||||
};
|
@ -78,12 +78,12 @@ class CfgWeapons
|
||||
class rhsusf_acc_LEUPOLDMK4: rhsusf_acc_sniper_base {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
};
|
||||
class rhsusf_acc_LEUPOLDMK4_2: rhsusf_acc_sniper_base {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
};
|
||||
|
||||
class rhs_weap_fgm148 : launch_O_Titan_F {
|
||||
|
@ -6,7 +6,7 @@ class CfgWeapons {
|
||||
class RKSL_optic_PMII_312 : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Snip {
|
||||
@ -20,7 +20,7 @@ class CfgWeapons {
|
||||
class RKSL_optic_PMII_312_sunshade : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||
ACE_ScopeAdjust_Increment = 0.1;
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Snip {
|
||||
|
@ -6,7 +6,8 @@ class CfgWeapons {
|
||||
class iansky_nfbeast : ItemCore {
|
||||
ACE_ScopeAdjust_Vertical[] = { -0.9, 34 };
|
||||
ACE_ScopeAdjust_Horizontal[] = { -11, 11 };
|
||||
ACE_ScopeAdjust_Increment = 0.1; // Should be 0.2 mrad for elevation
|
||||
ACE_ScopeAdjust_VerticalIncrement = 0.2;
|
||||
ACE_ScopeAdjust_HorizontalIncrement = 0.1;
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class NF25_MILDOT {
|
||||
|
Loading…
Reference in New Issue
Block a user