From 2dbc4993d8a58eec13162e9bd66cd78fc96b11f8 Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 15 Mar 2019 00:37:04 +0100 Subject: [PATCH 01/13] add setting to hide Eject action from action menu --- addons/vehicles/CfgActions.hpp | 7 +++++++ addons/vehicles/XEH_preInit.sqf | 12 ++++++++++++ addons/vehicles/config.cpp | 1 + addons/vehicles/stringtable.xml | 8 ++++++++ 4 files changed, 28 insertions(+) create mode 100644 addons/vehicles/CfgActions.hpp diff --git a/addons/vehicles/CfgActions.hpp b/addons/vehicles/CfgActions.hpp new file mode 100644 index 0000000000..2742689a60 --- /dev/null +++ b/addons/vehicles/CfgActions.hpp @@ -0,0 +1,7 @@ +class CfgActions { + class None; + class Eject: None { + show = QUOTE(call compile getText (configFile >> 'CfgActions' >> 'Eject' >> 'GVAR(setting)')); + GVAR(setting) = QUOTE(profileNamespace getVariable [ARR_2('GVAR(showEjectAction)',1)]); + }; +}; diff --git a/addons/vehicles/XEH_preInit.sqf b/addons/vehicles/XEH_preInit.sqf index b47cf6628d..172045093c 100644 --- a/addons/vehicles/XEH_preInit.sqf +++ b/addons/vehicles/XEH_preInit.sqf @@ -6,4 +6,16 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +[ + QGVAR(hideEjectAction), + "CHECKBOX", + [LSTRING(HideEjectAction), LSTRING(HideEjectActionTooltip)], + ELSTRING(common,ACEKeybindCategoryVehicles), + false, + 2, { + profileNamespace setVariable [QGVAR(showEjectAction), parseNumber !_this]; + saveProfileNamespace; + } +] call cba_settings_fnc_init; + ADDON = true; diff --git a/addons/vehicles/config.cpp b/addons/vehicles/config.cpp index 9b0d595fc8..9ec0d73aef 100644 --- a/addons/vehicles/config.cpp +++ b/addons/vehicles/config.cpp @@ -21,3 +21,4 @@ class CfgPatches { #include "CfgAmmo.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" +#include "CfgActions.hpp" diff --git a/addons/vehicles/stringtable.xml b/addons/vehicles/stringtable.xml index b2d282b305..29b974ee2a 100644 --- a/addons/vehicles/stringtable.xml +++ b/addons/vehicles/stringtable.xml @@ -67,5 +67,13 @@ 速度制限を減らす Zmniejsz ograniczenie prędkości + + Hide Eject Action + Abspringen-Aktion verstecken + + + Hides the Eject entry from the action menu. Requires a game restart. + Versteckt den Abspringen-Eintrag aus dem Aktionsmenü. Benötigt Neustart des Spiels. + From aef3073ee8e2b5f22e9fb0c3b791633d9231bfda Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 15 Mar 2019 00:56:09 +0100 Subject: [PATCH 02/13] hide by default --- addons/vehicles/CfgActions.hpp | 2 +- addons/vehicles/XEH_preInit.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/vehicles/CfgActions.hpp b/addons/vehicles/CfgActions.hpp index 2742689a60..a15b9e9a18 100644 --- a/addons/vehicles/CfgActions.hpp +++ b/addons/vehicles/CfgActions.hpp @@ -2,6 +2,6 @@ class CfgActions { class None; class Eject: None { show = QUOTE(call compile getText (configFile >> 'CfgActions' >> 'Eject' >> 'GVAR(setting)')); - GVAR(setting) = QUOTE(profileNamespace getVariable [ARR_2('GVAR(showEjectAction)',1)]); + GVAR(setting) = QUOTE(profileNamespace getVariable [ARR_2('GVAR(showEjectAction)',0)]); }; }; diff --git a/addons/vehicles/XEH_preInit.sqf b/addons/vehicles/XEH_preInit.sqf index 172045093c..b30a0cf38d 100644 --- a/addons/vehicles/XEH_preInit.sqf +++ b/addons/vehicles/XEH_preInit.sqf @@ -11,7 +11,7 @@ PREP_RECOMPILE_END; "CHECKBOX", [LSTRING(HideEjectAction), LSTRING(HideEjectActionTooltip)], ELSTRING(common,ACEKeybindCategoryVehicles), - false, + true, 2, { profileNamespace setVariable [QGVAR(showEjectAction), parseNumber !_this]; saveProfileNamespace; From 69b9f1e33819dfa9d6378a13557ffed165527fc3 Mon Sep 17 00:00:00 2001 From: Filip Maciejewski Date: Fri, 15 Mar 2019 00:58:12 +0100 Subject: [PATCH 03/13] hideEjectAction - Polish translation --- addons/vehicles/stringtable.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/vehicles/stringtable.xml b/addons/vehicles/stringtable.xml index 29b974ee2a..685897cbbc 100644 --- a/addons/vehicles/stringtable.xml +++ b/addons/vehicles/stringtable.xml @@ -70,10 +70,12 @@ Hide Eject Action Abspringen-Aktion verstecken + Ukryj akcję Wyskocz Hides the Eject entry from the action menu. Requires a game restart. Versteckt den Abspringen-Eintrag aus dem Aktionsmenü. Benötigt Neustart des Spiels. + Usuwa akcję Wyskocz z menu akcji. Wymaga restartu gry. From b4d2eaae6e4ab205860a63cad831d0ba9e449f1a Mon Sep 17 00:00:00 2001 From: commy2 Date: Sun, 24 Mar 2019 10:15:56 +0100 Subject: [PATCH 04/13] Use needsRestart flag --- addons/vehicles/XEH_preInit.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/vehicles/XEH_preInit.sqf b/addons/vehicles/XEH_preInit.sqf index b30a0cf38d..9f067a8125 100644 --- a/addons/vehicles/XEH_preInit.sqf +++ b/addons/vehicles/XEH_preInit.sqf @@ -15,7 +15,8 @@ PREP_RECOMPILE_END; 2, { profileNamespace setVariable [QGVAR(showEjectAction), parseNumber !_this]; saveProfileNamespace; - } + }, + true // needs restart ] call cba_settings_fnc_init; ADDON = true; From 0e09879528e99a8fa7a0bc78329af773cec867c8 Mon Sep 17 00:00:00 2001 From: ace3mod Date: Sat, 27 Apr 2019 21:14:30 +0200 Subject: [PATCH 05/13] [Docs] Update component dependencies Automatically committed through Travis CI. [ci skip] --- docs/_includes/dependencies_list.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/dependencies_list.md b/docs/_includes/dependencies_list.md index a19a72b0a1..fab8376ccd 100644 --- a/docs/_includes/dependencies_list.md +++ b/docs/_includes/dependencies_list.md @@ -219,7 +219,7 @@ {% endif %} {% if include.component == "medical" %} -`ace_common` +`ace_medical_engine` {% endif %} {% if include.component == "medical_ai" %} From fba39bebd00774f7f1339ef5f5ea00bdbbfb2cf4 Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 3 May 2019 13:07:04 +0200 Subject: [PATCH 06/13] += for magwells --- addons/ballistics/CfgWeapons.hpp | 2 -- addons/hellfire/CfgWeapons.hpp | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/ballistics/CfgWeapons.hpp b/addons/ballistics/CfgWeapons.hpp index a4b3218a93..e81e6bbc85 100644 --- a/addons/ballistics/CfgWeapons.hpp +++ b/addons/ballistics/CfgWeapons.hpp @@ -28,8 +28,6 @@ class CfgWeapons { // MX class arifle_MX_Base_F: Rifle_Base_F { - magazineWell[] = {"CBA_65x39_MX", "CBA_65x39_MX_XL"}; - class Single: Mode_SemiAuto { dispersion = MOA_TO_RAD(0.90); }; diff --git a/addons/hellfire/CfgWeapons.hpp b/addons/hellfire/CfgWeapons.hpp index b040f67d1d..5806ab5fbe 100644 --- a/addons/hellfire/CfgWeapons.hpp +++ b/addons/hellfire/CfgWeapons.hpp @@ -6,7 +6,7 @@ class CfgWeapons { EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code) EGVAR(laser,showHud) = 1; // show attack profile / lock on hud magazines[] = {"6Rnd_ACE_Hellfire_AGM114K", "PylonMissile_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_3Rnd_ACE_Hellfire_AGM114K", "PylonRack_4Rnd_ACE_Hellfire_AGM114K"}; - magazineWell[] = {QGVAR(K)}; + magazineWell[] += {QGVAR(K)}; autoFire = 0; canLock = 0; weaponLockSystem = 0; @@ -27,6 +27,6 @@ class CfgWeapons { class GVAR(launcher_N): GVAR(launcher) { displayName = "AGM-114N Hellfire II"; magazines[] = {"6Rnd_ACE_Hellfire_AGM114N", "PylonMissile_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_3Rnd_ACE_Hellfire_AGM114N", "PylonRack_4Rnd_ACE_Hellfire_AGM114N"}; - magazineWell[] = {QGVAR(N)}; + magazineWell[] += {QGVAR(N)}; }; }; From 050cd0a1f900b316f3e08d01cecbb175b7e9e9e6 Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 3 May 2019 16:56:56 +0200 Subject: [PATCH 07/13] remove weather dependancy from winddeflection (#6975) --- addons/winddeflection/config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/winddeflection/config.cpp b/addons/winddeflection/config.cpp index 0e193dace5..2d224d066e 100644 --- a/addons/winddeflection/config.cpp +++ b/addons/winddeflection/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_weather"}; + requiredAddons[] = {"ace_common"}; author = ECSTRING(common,ACETeam); authors[] = {ECSTRING(common,ACETeam), "Glowbal", "Ruthberg"}; url = ECSTRING(main,URL); From f8b9429e70a04fe72af0e1ffbdafb63db1ee6c5c Mon Sep 17 00:00:00 2001 From: ace3mod Date: Fri, 3 May 2019 16:58:44 +0200 Subject: [PATCH 08/13] [Docs] Update component dependencies Automatically committed through Travis CI. [ci skip] --- docs/_includes/dependencies_list.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/dependencies_list.md b/docs/_includes/dependencies_list.md index fab8376ccd..c3ce51ec82 100644 --- a/docs/_includes/dependencies_list.md +++ b/docs/_includes/dependencies_list.md @@ -467,7 +467,7 @@ {% endif %} {% if include.component == "winddeflection" %} -`ace_weather` +`ace_common` {% endif %} {% if include.component == "yardage450" %} From 585e919b357b9d47c00a1623c698f06c2d1e2b3a Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 3 May 2019 17:47:40 +0200 Subject: [PATCH 09/13] grey out scripted eject action if eject actions are hidden --- addons/aircraft/CfgEventHandlers.hpp | 6 ----- addons/aircraft/XEH_postInitClient.sqf | 29 -------------------- addons/aircraft/XEH_preInit.sqf | 37 ++++++++++++++++++++++++++ addons/vehicles/initSettings.sqf | 3 +-- 4 files changed, 38 insertions(+), 37 deletions(-) delete mode 100644 addons/aircraft/XEH_postInitClient.sqf diff --git a/addons/aircraft/CfgEventHandlers.hpp b/addons/aircraft/CfgEventHandlers.hpp index 9426fa861e..93e3311cf2 100644 --- a/addons/aircraft/CfgEventHandlers.hpp +++ b/addons/aircraft/CfgEventHandlers.hpp @@ -9,9 +9,3 @@ class Extended_PreInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_preInit)); }; }; - -class Extended_PostInit_EventHandlers { - class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient)); - }; -}; diff --git a/addons/aircraft/XEH_postInitClient.sqf b/addons/aircraft/XEH_postInitClient.sqf deleted file mode 100644 index e468602dbc..0000000000 --- a/addons/aircraft/XEH_postInitClient.sqf +++ /dev/null @@ -1,29 +0,0 @@ -#include "script_component.hpp" - -if (!hasInterface) exitWith {}; - -private _cfgAction = configFile >> "CfgActions" >> "Eject"; -GVAR(ejectActionParams) = [ - [ - "", // will be set with setUserActionText - { - params ["_vehicle", "_unit"]; - private _preserveEngineOn = (_unit == driver _vehicle) && {isEngineOn _vehicle}; - moveOut _unit; - if (_preserveEngineOn) then { - // vehicle is local to last driver, no need to care - _vehicle engineOn true; - }; - }, - nil, - getNumber (_cfgAction >> "priority"), - false, - true, - getText (_cfgAction >> "shortcut"), - '[_this, _target] call DFUNC(canShowEject)' - ], - getText (_cfgAction >> "text"), - getText (_cfgAction >> "textDefault") -]; - -["Helicopter", "initPost", LINKFUNC(initEjectAction)] call CBA_fnc_addClassEventHandler; diff --git a/addons/aircraft/XEH_preInit.sqf b/addons/aircraft/XEH_preInit.sqf index b47cf6628d..d3cdb33dc4 100644 --- a/addons/aircraft/XEH_preInit.sqf +++ b/addons/aircraft/XEH_preInit.sqf @@ -6,4 +6,41 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +if (hasInterface) exitWith { + ["CBA_settingsInitialized", { + private _ejectAction = configFile >> "CfgActions" >> "Eject"; + private _hideEjectAction = missionNamespace getVariable [QEGVAR(vehicles,hideEjectAction), false]; + + private _text = getText (_ejectAction >> "text"); + if (_hideEjectAction) then { + _text = format ["%1", _text]; + }; + + GVAR(ejectActionParams) = [ + [ + "", // will be set with setUserActionText + { + params ["_vehicle", "_unit"]; + private _preserveEngineOn = (_unit == driver _vehicle) && {isEngineOn _vehicle}; + moveOut _unit; + if (_preserveEngineOn) then { + // vehicle is local to last driver, no need to care + _vehicle engineOn true; + }; + }, + nil, + [getNumber (_ejectAction >> "priority"), -999] select _hideEjectAction, + false, + true, + getText (_ejectAction >> "shortcut"), + '[_this, _target] call DFUNC(canShowEject)' + ], + _text, + getText (_ejectAction >> "textDefault") + ]; + + ["Helicopter", "InitPost", LINKFUNC(initEjectAction), nil, nil, true] call CBA_fnc_addClassEventHandler; + }] call CBA_fnc_addEventHandler; +}; + ADDON = true; diff --git a/addons/vehicles/initSettings.sqf b/addons/vehicles/initSettings.sqf index 8355be5751..926a95ea4c 100644 --- a/addons/vehicles/initSettings.sqf +++ b/addons/vehicles/initSettings.sqf @@ -1,9 +1,8 @@ - [ QGVAR(keepEngineRunning), "CHECKBOX", [LSTRING(SettingKeepEngineRunningName), LSTRING(SettingKeepEngineRunningDesc)], - localize ELSTRING(common,ACEKeybindCategoryVehicles), + ELSTRING(common,ACEKeybindCategoryVehicles), false, // default value true // isGlobal ] call CBA_fnc_addSetting; From e4c9440c3408b60dba86af4aa574afd746caecb1 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 3 May 2019 19:13:54 +0200 Subject: [PATCH 10/13] Update addons/aircraft/XEH_preInit.sqf Co-Authored-By: commy2 --- addons/aircraft/XEH_preInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/aircraft/XEH_preInit.sqf b/addons/aircraft/XEH_preInit.sqf index d3cdb33dc4..ef3f9f52bf 100644 --- a/addons/aircraft/XEH_preInit.sqf +++ b/addons/aircraft/XEH_preInit.sqf @@ -6,7 +6,7 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; -if (hasInterface) exitWith { +if (hasInterface) then { ["CBA_settingsInitialized", { private _ejectAction = configFile >> "CfgActions" >> "Eject"; private _hideEjectAction = missionNamespace getVariable [QEGVAR(vehicles,hideEjectAction), false]; From 3cfdae899c122feddae1e50d34eecef85f63a780 Mon Sep 17 00:00:00 2001 From: BaerMitUmlaut Date: Mon, 6 May 2019 02:03:57 +0200 Subject: [PATCH 11/13] Add berlin wall compatibility (#6982) --- addons/logistics_wirecutter/script_component.hpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/addons/logistics_wirecutter/script_component.hpp b/addons/logistics_wirecutter/script_component.hpp index 84dcabe258..69b2c5cdab 100644 --- a/addons/logistics_wirecutter/script_component.hpp +++ b/addons/logistics_wirecutter/script_component.hpp @@ -56,7 +56,19 @@ "dd_pletivo.p3d",\ "plot_green_draty.p3d",\ "plot_rust_draty.p3d",\ - "wall_fen1_5_2.p3d"\ + "wall_fen1_5_2.p3d",\ + "gm_fence_border_gssz_70_600.p3d",\ + "gm_fence_border_gssz_70_gate_350_r.p3d",\ + "gm_fence_border_gssz_70_gate_350_w.p3d",\ + "gm_fence_border_gz1_600.p3d",\ + "gm_fence_border_gz1_gate_350_r.p3d",\ + "gm_fence_border_gz1_gate_350_w.p3d",\ + "gm_fence_wirefence_01_01.p3d",\ + "gm_fence_wirefence_01_02.p3d",\ + "gm_fence_wirefence_01_03.p3d",\ + "gm_gc_g501_sm70_01.p3d",\ + "gm_gc_g501_sm70_02.p3d",\ + "gm_gc_g501_sm70_03.p3d"\ ] #define SOUND_CLIP_TIME_SPACING 1.5 From 5da130815186188df648fa9756f7849ec7b54319 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 6 May 2019 10:05:04 -0500 Subject: [PATCH 12/13] Disposable - Add warning for addons using ace_disposable (#6963) * Disposable - Add warning for addons using ace_disposable * update arsenal code and cba version --- addons/arsenal/functions/fnc_onSelChangedRight.sqf | 3 ++- addons/disposable/XEH_preStart.sqf | 11 +++++++++++ addons/main/script_mod.hpp | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/addons/arsenal/functions/fnc_onSelChangedRight.sqf b/addons/arsenal/functions/fnc_onSelChangedRight.sqf index a2d83dceba..38e051b4e2 100644 --- a/addons/arsenal/functions/fnc_onSelChangedRight.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedRight.sqf @@ -42,6 +42,7 @@ private _fnc_selectItem = { case 19: { if (_item == "") then { + if (cba_disposable_replaceDisposableLauncher && !isNil {cba_disposable_LoadedLaunchers getVariable secondaryWeapon GVAR(center)}) exitWith { TRACE_1("ignoring unload of disposable",secondaryWeapon GVAR(center)); }; GVAR(center) removeSecondaryWeaponItem ((GVAR(currentItems) select 19) select _itemIndex); private _secondaryMags = secondaryWeaponMagazine GVAR(center); GVAR(currentItems) set [19, (secondaryWeaponItems GVAR(center)) + ([_secondaryMags + [""], _secondaryMags] select (count _secondaryMags > 1))]; @@ -70,7 +71,7 @@ private _fnc_selectItem = { [ _item, - 18 + ([IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find GVAR(currentLeftPanel)), + 18 + ([IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find GVAR(currentLeftPanel)), [IDC_buttonMuzzle, IDC_buttonItemAcc, IDC_buttonOptic, IDC_buttonBipod, IDC_buttonCurrentMag, IDC_buttonCurrentMag2] find GVAR(currentRightPanel) ] call _fnc_selectItem; diff --git a/addons/disposable/XEH_preStart.sqf b/addons/disposable/XEH_preStart.sqf index 022888575e..414ffaea97 100644 --- a/addons/disposable/XEH_preStart.sqf +++ b/addons/disposable/XEH_preStart.sqf @@ -1,3 +1,14 @@ #include "script_component.hpp" #include "XEH_PREP.hpp" + +// Show warning for launchers still using disposables +{ + private _nonInheritedCfg = configProperties [_x, "configName _x == 'ACE_UsedTube'", false]; + if ((count _nonInheritedCfg) == 1) then { + private _weapon = configName _x; + if (_weapon != "launch_NLAW_F") then { // ignore the one we modifiy ourselves + WARNING_1("[%1] ACE_disposables functionality will be removed in a future version - switch to CBA Disposables",_weapon); + }; + }; +} forEach ("isText (_x >> 'ACE_UsedTube')" configClasses (configFile >> "CfgWeapons")); diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 9960fcda08..c368490e8d 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -10,7 +10,7 @@ // MINIMAL required version for the Mod. Components can specify others.. #define REQUIRED_VERSION 1.88 -#define REQUIRED_CBA_VERSION {3,9,0} +#define REQUIRED_CBA_VERSION {3,11,1} #ifdef COMPONENT_BEAUTIFIED #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) From 709548c1ef4e6e7d79fc486c49974334e218f251 Mon Sep 17 00:00:00 2001 From: Brandon Danyluk Date: Mon, 6 May 2019 09:23:07 -0600 Subject: [PATCH 13/13] Cookoff - Fix shell detonation (#6979) * abc * Revert "abc" This reverts commit bcb4214bd99bba3fec692efa4dca950323da582d. * Update to current commit * ShotShell requires velocity to simulate itself, so always spawn it with velocity --- addons/cookoff/functions/fnc_detonateAmmunition.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/cookoff/functions/fnc_detonateAmmunition.sqf b/addons/cookoff/functions/fnc_detonateAmmunition.sqf index f77a2755fd..0d944958d2 100644 --- a/addons/cookoff/functions/fnc_detonateAmmunition.sqf +++ b/addons/cookoff/functions/fnc_detonateAmmunition.sqf @@ -87,7 +87,7 @@ if (_amountOfMagazines > 0) exitWith { playSound3D [_sound, objNull, false, (getPosASL _vehicle), 2, 1, 1300]; if (random 1 < 0.15) then { - [_vehicle, _ammo, _speed, random 1 < 0.15] call _spawnProjectile; + [_vehicle, _ammo, _speed, true] call _spawnProjectile; }; }; if (toLower _simType == "shotgrenade") then {