Skip to content

Commit

Permalink
Merge pull request #4616 from acemod/apex-weapon-ballistics
Browse files Browse the repository at this point in the history
Updates the ballistics module to support Apex
  • Loading branch information
ulteq authored Oct 31, 2016
2 parents 2222834 + ace24d0 commit 2e94c40
Show file tree
Hide file tree
Showing 6 changed files with 203 additions and 62 deletions.
11 changes: 8 additions & 3 deletions addons/atragmx/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==

["12.7x99mm AMAX" , 860, 100, 0.0611565, -0.00036645, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" ],
["12.7x99mm" , 900, 100, 0.0582418, -0.00057503, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ],
["12.7x99mm API" , 900, 100, 0.0582418, -0.00057503, 3.81, 0, 2, 10, 120, 0, 0, 41.99, 12.9, 38.10, 0.670, 1, "ASM" ],

["12.7x54mm" , 300, 100, 0.3394630, -0.00019268, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" ],

[".50 Beowulf" , 563, 100, 0.0657485, -0.00202645, 3.81, 0, 2, 10, 120, 0, 0, 21.71, 12.7, 50.80, 0.210, 1, "ASM" ],

[".408 Chey Tac" , 910, 100, 0.0569400, -0.00038944, 3.81, 0, 2, 10, 120, 0, 0, 26.57, 10.4, 33.02, 0.970, 1, "ASM" ],

Expand All @@ -38,11 +39,15 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
["6.5x39mm" , 800, 100, 0.0683482, -0.00075308, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.263, 7, "ICAO"],
["6.5x47mm Lapua" , 800, 100, 0.0682221, -0.00067037, 3.81, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.290, 7, "ICAO"],
["6.5mm Creedmor" , 840, 100, 0.0636501, -0.00060887, 3.81, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.317, 7, "ICAO"],


["5.8x42mm DBP87" , 930, 100, 0.0572574, -0.00117956, 3.81, 0, 2, 10, 120, 0, 0, 4.150, 5.99, 24.40, 0.156, 7, "ICAO" ],

["5.56x45mm M855" , 870, 100, 0.0626386, -0.00126466, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.151, 7, "ASM" ],
["5.56x45mm Mk262" , 820, 100, 0.0671481, -0.00109563, 3.81, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" ],
["5.56x45mm Mk318" , 880, 100, 0.0615937, -0.00123318, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" ],
["5.56x45mm M995" , 869, 100, 0.0626713, -0.00123272, 3.81, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" ]];
["5.56x45mm M995" , 869, 100, 0.0626713, -0.00123272, 3.81, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" ],

["5.45x39mm 7N6M" , 735, 100, 0.0787205, -0.00116278, 3.81, 0, 2, 10, 120, 0, 0, 3.428, 5.59, 16.00, 0.168, 7, "ICAO"]];

[] call FUNC(clear_user_data);
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)];
Expand Down
2 changes: 1 addition & 1 deletion addons/atragmx/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

#include "\z\ace\addons\main\script_macros.hpp"

#define ATRAGMX_PROFILE_NAMESPACE_VERSION 1.7
#define ATRAGMX_PROFILE_NAMESPACE_VERSION 1.8
56 changes: 44 additions & 12 deletions addons/ballistics/CfgAmmo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ class CfgAmmo {
class ACE_B_556x45_Ball_Tracer_Dim: B_556x45_Ball_Tracer_Red {
nvgOnly = 1;
};
class ACE_545x39_Ball_7N6M : B_556x45_Ball {
airFriction=-0.00114744;
class B_545x39_Ball_F : BulletBase {
airFriction=-0.00116278;
caliber=0.6;
deflecting=18;
hit=7;
Expand All @@ -93,12 +93,14 @@ class CfgAmmo {
ACE_velocityBoundaries[]={};
ACE_standardAtmosphere="ICAO";
ACE_dragModel=7;
ACE_muzzleVelocities[]={780, 880, 920};
ACE_barrelLengths[]={254.0, 414.02, 508.0};
ACE_muzzleVelocities[]={735, 883, 892};
ACE_barrelLengths[]={206.5, 414.02, 508.0};
};
class ACE_545x39_Ball_7N6M : B_545x39_Ball_F {
};
class B_556x45_Ball_Tracer_Green;
class ACE_545x39_Ball_7T3M : B_556x45_Ball_Tracer_Green {
airFriction=-0.00114744;
airFriction=-0.00116278;
caliber=0.6;
deflecting=18;
hit=7;
Expand All @@ -113,12 +115,26 @@ class CfgAmmo {
ACE_velocityBoundaries[]={};
ACE_standardAtmosphere="ICAO";
ACE_dragModel=7;
ACE_muzzleVelocities[]={785, 883, 925};
ACE_barrelLengths[]={254.0, 414.02, 508.0};
ACE_muzzleVelocities[]={740, 886, 897};
ACE_barrelLengths[]={206.5, 414.02, 508.0};
};
class B_56x15_dual: BulletBase {
tracerScale = 0.5;
};
class B_580x42_Ball_F: BulletBase {
airFriction=-0.00117956;
typicalSpeed=930;
ACE_caliber=5.9944;
ACE_bulletLength=24.2;
ACE_bulletMass=4.15;
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
ACE_ballisticCoefficients[]={0.156};
ACE_velocityBoundaries[]={};
ACE_standardAtmosphere="ICAO";
ACE_dragModel=7;
ACE_muzzleVelocities[]={790, 930, 970};
ACE_barrelLengths[]={369.0, 463.0, 600.0};
};
class B_65x39_Caseless : BulletBase {
airFriction=-0.00075308;
typicalSpeed=800;
Expand Down Expand Up @@ -439,7 +455,7 @@ class CfgAmmo {
ACE_muzzleVelocities[]={620, 655, 675};
ACE_barrelLengths[]={228.6, 406.4, 508.0};
};
class ACE_762x39_Ball : B_762x51_Ball {
class B_762x39_Ball_F : BulletBase {
airFriction=-0.00151621;
hit=12;
caliber=1.5;
Expand All @@ -455,6 +471,8 @@ class CfgAmmo {
ACE_muzzleVelocities[]={650, 716, 750};
ACE_barrelLengths[]={254.0, 414.02, 508.0};
};
class ACE_762x39_Ball : B_762x39_Ball_F {
};
class ACE_762x39_Ball_57N231P : B_762x54_Tracer_Green {
airFriction=-0.00151621;
hit=12;
Expand All @@ -474,7 +492,7 @@ class CfgAmmo {
ACE_barrelLengths[]={254.0, 414.02, 508.0};
};
class B_9x21_Ball : BulletBase {
airFriction=-0.00226847;
airFriction=-0.00208292;
typicalSpeed=390;
tracerScale = 0.5;
hit=6;
Expand All @@ -486,8 +504,8 @@ class CfgAmmo {
ACE_velocityBoundaries[]={};
ACE_standardAtmosphere="ICAO";
ACE_dragModel=1;
ACE_muzzleVelocities[]={440, 460, 480};
ACE_barrelLengths[]={101.6, 127.0, 228.6};
ACE_muzzleVelocities[]={380, 390, 420, 435};
ACE_barrelLengths[]={93.5, 101.6, 127.0, 228.6};
};
class B_9x21_Ball_Tracer_Green: B_9x21_Ball {
tracerScale = 0.5;
Expand All @@ -508,7 +526,7 @@ class CfgAmmo {
ACE_barrelLengths[]={96.52, 127.0, 228.6};
};
class ACE_9x19_Ball : B_9x21_Ball {
airFriction=-0.0018577;
airFriction=-0.0019835;
typicalSpeed=370;
hit=6;
ACE_caliber=9.017;
Expand Down Expand Up @@ -771,6 +789,20 @@ class CfgAmmo {
ACE_muzzleVelocities[]={230, 250, 285};
ACE_barrelLengths[]={101.6, 127.0, 228.6};
};
class B_50BW_Ball_F : BulletBase {
airFriction=-0.00202645;
typicalSpeed=550;
ACE_caliber=12.7;
ACE_bulletLength=24.13;
ACE_bulletMass=21.7076;
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
ACE_ballisticCoefficients[]={0.21};
ACE_velocityBoundaries[]={};
ACE_standardAtmosphere="ASM";
ACE_dragModel=1;
ACE_muzzleVelocities[]={510, 550, 596};
ACE_barrelLengths[]={304.8, 406.4, 609.6};
};
class B_19mm_HE: BulletBase {
tracerScale = 1;
};
Expand Down
29 changes: 27 additions & 2 deletions addons/ballistics/CfgMagazines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
class CfgMagazines {

class CA_Magazine;
class 30Rnd_580x42_Mag_F: CA_Magazine {
initSpeed = 930;
};
class 100Rnd_580x42_Mag_F: 30Rnd_580x42_Mag_F {
initSpeed = 930;
};
class 30Rnd_65x39_caseless_mag: CA_Magazine {
initSpeed = 760;
};
Expand Down Expand Up @@ -47,6 +53,10 @@ class CfgMagazines {
descriptionShort = CSTRING(30Rnd_65x39_caseless_green_mag_Tracer_DimDescription);
};

class 30Rnd_545x39_Mag_F: CA_Magazine {
initSpeed = 735;
};

class 30Rnd_556x45_Stanag: CA_Magazine {
};
class ACE_30Rnd_556x45_Stanag_M995_AP_mag: 30Rnd_556x45_Stanag {
Expand Down Expand Up @@ -84,6 +94,14 @@ class CfgMagazines {
picture = "\A3\weapons_f\data\ui\m_20stanag_red_ca.paa";
};

class 200Rnd_556x45_Box_F: CA_Magazine {
initSpeed = 872;
};

class 30Rnd_762x39_Mag_F: CA_Magazine {
initSpeed = 715;
};

class 20Rnd_762x51_Mag: CA_Magazine {
initSpeed = 833;
};
Expand Down Expand Up @@ -276,7 +294,7 @@ class CfgMagazines {


class 30Rnd_9x21_Mag: CA_Magazine {
initSpeed = 450;
initSpeed = 390;
};
class ACE_30Rnd_9x19_mag: 30Rnd_9x21_Mag {
author = ECSTRING(common,ACETeam);
Expand All @@ -287,6 +305,10 @@ class CfgMagazines {
initSpeed = 370;
};

class 10Rnd_50BW_Mag_F: CA_Magazine {
initSpeed = 552;
};

class 11Rnd_45ACP_Mag: CA_Magazine {
initSpeed = 250;
};
Expand All @@ -308,7 +330,10 @@ class CfgMagazines {
};

class 16Rnd_9x21_Mag: 30Rnd_9x21_Mag {
initSpeed = 450;
initSpeed = 390;
};
class 10Rnd_9x21_Mag: 16Rnd_9x21_Mag {
initSpeed = 390;
};
class ACE_16Rnd_9x19_mag: 16Rnd_9x21_Mag {
author = ECSTRING(common,ACETeam);
Expand Down
Loading

0 comments on commit 2e94c40

Please sign in to comment.