mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed initialization, added exclude variable to prevent initialization of individual guns (for e.g. AI mortars)
This commit is contained in:
parent
dfe7c07936
commit
a336707623
@ -1,5 +1,10 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
// if (GVAR(useAmmoHandling)) then {
|
if (!EGVAR(common,settingsInitFinished)) exitWith {
|
||||||
_this call FUNC(mortarInit);
|
EGVAR(common,runAtSettingsInitialized) pushBack [{
|
||||||
// };
|
if (GVAR(useAmmoHandling)) then {
|
||||||
|
_this call FUNC(mortarInit)
|
||||||
|
};
|
||||||
|
}, _this];
|
||||||
|
};
|
||||||
|
_this call FUNC(mortarInit);
|
||||||
|
@ -6,6 +6,7 @@ class cfgMagazines {
|
|||||||
scopeCurator = 2;
|
scopeCurator = 2;
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
displayName = CSTRING(magazine_HE_displayName);
|
displayName = CSTRING(magazine_HE_displayName);
|
||||||
|
displayNameShort = "";
|
||||||
descriptionShort = CSTRING(magazine_HE_descriptionShort);
|
descriptionShort = CSTRING(magazine_HE_descriptionShort);
|
||||||
model = PATHTOF(data\l16_ammo_he.p3d)
|
model = PATHTOF(data\l16_ammo_he.p3d)
|
||||||
picture = PATHTOF(UI\w_l16_ammo_he_ca.paa);
|
picture = PATHTOF(UI\w_l16_ammo_he_ca.paa);
|
||||||
@ -18,6 +19,7 @@ class cfgMagazines {
|
|||||||
scopeCurator = 2;
|
scopeCurator = 2;
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
displayName = CSTRING(magazine_Smoke_displayName);
|
displayName = CSTRING(magazine_Smoke_displayName);
|
||||||
|
displayNameShort = "";
|
||||||
descriptionShort = CSTRING(magazine_Smoke_descriptionShort);
|
descriptionShort = CSTRING(magazine_Smoke_descriptionShort);
|
||||||
model = PATHTOF(data\l16_ammo_smk_white.p3d)
|
model = PATHTOF(data\l16_ammo_smk_white.p3d)
|
||||||
picture = PATHTOF(UI\w_l16_ammo_smk_white_ca.paa);
|
picture = PATHTOF(UI\w_l16_ammo_smk_white_ca.paa);
|
||||||
@ -30,6 +32,7 @@ class cfgMagazines {
|
|||||||
scopeCurator = 2;
|
scopeCurator = 2;
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
displayName = CSTRING(magazine_Illum_displayName);
|
displayName = CSTRING(magazine_Illum_displayName);
|
||||||
|
displayNameShort = "";
|
||||||
descriptionShort = CSTRING(magazine_Illum_descriptionShort);
|
descriptionShort = CSTRING(magazine_Illum_descriptionShort);
|
||||||
model = PATHTOF(data\l16_ammo_illum.p3d)
|
model = PATHTOF(data\l16_ammo_illum.p3d)
|
||||||
picture = PATHTOF(UI\w_l16_ammo_illum_ca.paa);
|
picture = PATHTOF(UI\w_l16_ammo_illum_ca.paa);
|
||||||
@ -42,6 +45,7 @@ class cfgMagazines {
|
|||||||
scopeCurator = 2;
|
scopeCurator = 2;
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
displayName = CSTRING(magazine_HE_Guided_displayName);
|
displayName = CSTRING(magazine_HE_Guided_displayName);
|
||||||
|
displayNameShort = "";
|
||||||
descriptionShort = CSTRING(magazine_HE_Guided_descriptionShort);
|
descriptionShort = CSTRING(magazine_HE_Guided_descriptionShort);
|
||||||
model = PATHTOF(data\l16_ammo_he.p3d)
|
model = PATHTOF(data\l16_ammo_he.p3d)
|
||||||
picture = PATHTOF(UI\w_l16_ammo_he_ca.paa);
|
picture = PATHTOF(UI\w_l16_ammo_he_ca.paa);
|
||||||
@ -54,6 +58,7 @@ class cfgMagazines {
|
|||||||
scopeCurator = 2;
|
scopeCurator = 2;
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
displayName = CSTRING(magazine_HE_LaserGuided_displayName);
|
displayName = CSTRING(magazine_HE_LaserGuided_displayName);
|
||||||
|
displayNameShort = "";
|
||||||
descriptionShort = CSTRING(magazine_HE_LaserGuided_descriptionShort);
|
descriptionShort = CSTRING(magazine_HE_LaserGuided_descriptionShort);
|
||||||
model = PATHTOF(data\l16_ammo_he.p3d)
|
model = PATHTOF(data\l16_ammo_he.p3d)
|
||||||
picture = PATHTOF(UI\w_l16_ammo_he_ca.paa);
|
picture = PATHTOF(UI\w_l16_ammo_he_ca.paa);
|
||||||
|
@ -21,10 +21,17 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if (!GVAR(airResistanceEnabled)) exitWith {};
|
|
||||||
|
|
||||||
PARAMS_7(_vehicle,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
PARAMS_7(_vehicle,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
||||||
|
|
||||||
|
if (GVAR(useAmmoHandling)) then {
|
||||||
|
if !(_vehicle getVariable [QGVAR(exclude),false]) then {
|
||||||
|
_vehicle removeMagazineGlobal (_vehicle magazinesTurret [0] select 0);
|
||||||
|
TRACE_1("",_vehicle magazinesTurret [0]);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!GVAR(airResistanceEnabled)) exitWith {};
|
||||||
|
|
||||||
private ["_shooterMan", "_temperature", "_newMuzzleVelocityCoefficent", "_bulletVelocity", "_bulletSpeed"];
|
private ["_shooterMan", "_temperature", "_newMuzzleVelocityCoefficent", "_bulletVelocity", "_bulletSpeed"];
|
||||||
|
|
||||||
// Large enough distance to not simulate any wind deflection
|
// Large enough distance to not simulate any wind deflection
|
||||||
|
@ -13,12 +13,11 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#define DEBUG_MODE_FULL
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_mortar);
|
params ["_mortar"];
|
||||||
|
|
||||||
if (_mortar getVariable [QGVAR(initialized),false]) exitWith {};
|
if (_mortar getVariable [QGVAR(initialized),false] || _mortar getVariable [QGVAR(exclude),false]) exitWith {};
|
||||||
|
|
||||||
// Remove all magazines
|
// Remove all magazines
|
||||||
if (count magazines _mortar > 0) then {
|
if (count magazines _mortar > 0) then {
|
||||||
|
Loading…
Reference in New Issue
Block a user