Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into release-candidate-3-11
Browse files Browse the repository at this point in the history
  • Loading branch information
ViperMaul committed May 1, 2019
2 parents 40bae56 + eb7228f commit 6ec5048
Show file tree
Hide file tree
Showing 15 changed files with 96 additions and 39 deletions.
5 changes: 3 additions & 2 deletions addons/common/fnc_getVolume.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Function: CBA_fnc_getVolume
Description:
Return the volume of the bounding box of an object's model.
The bounding box is retrieved using boundingBoxReal instead of boundingBox for more precise measurements.
The bounding box is retrieved using boundingBoxReal instead of boundingBox
with visual clipping type for more precise measurements.
Parameters:
_object - Object to calculate the volume of <OBJECT>
Expand All @@ -24,6 +25,6 @@ SCRIPT(getVolume);

params [["_object", objNull, [objNull]]];

(boundingBoxReal _object) params ["_leftBackBottom", "_rightFrontTop"];
(0 boundingBoxReal _object) params ["_leftBackBottom", "_rightFrontTop"];
(_rightFrontTop vectorDiff _leftBackBottom) params ["_width", "_length", "_height"];
_width * _length * _height
2 changes: 1 addition & 1 deletion addons/common/fnc_headDir.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if (_unit != call CBA_fnc_currentUnit) then {
} else {
private _camPos = AGLToASL positionCameraToWorld [0, 0, 0];
_isExternalCam = (_camPos vectorDistance getPosASL _unit) > 2;
private _viewPos = AGLToASL positionCameraToWorld [0, 0, 99999999];
private _viewPos = AGLToASL positionCameraToWorld [0, 0, 10000];
private _vector = _viewPos vectorDiff _camPos;
_vector = _vector vectorMultiply (1 / vectorMagnitude _vector);
_azimuth = (_vector select 0) atan2 (_vector select 1);
Expand Down
1 change: 1 addition & 0 deletions addons/common/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<German>CBA Waffen</German>
<Polish>CBA Bronie</Polish>
<Italian>Armi CBA</Italian>
<Japanese>CBA 武器</Japanese>
</Key>
</Package>
</Project>
4 changes: 3 additions & 1 deletion addons/disposable/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ private _cfgMagazines = configFile >> "CfgMagazines";
};
} forEach configProperties [configFile >> "CBA_DisposableLaunchers", "isArray _x"];

["All", "InitPost", FUNC(replaceMagazineCargo)] call CBA_fnc_addClassEventHandler;
["CBA_settingsInitialized", {
["All", "InitPost", FUNC(replaceMagazineCargo), nil, nil, true] call CBA_fnc_addClassEventHandler;
}] call CBA_fnc_addEventHandler;

ADDON = true;
2 changes: 2 additions & 0 deletions addons/disposable/fnc_firedDisposable.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Author:
commy2
---------------------------------------------------------------------------- */

if (!GVAR(replaceDisposableLauncher)) exitWith {};

params ["_unit", "_launcher", "_muzzle", "", "", "", "_projectile"];

private _usedLauncher = GVAR(UsedLaunchers) getVariable _launcher;
Expand Down
3 changes: 1 addition & 2 deletions addons/disposable/fnc_initDisplayInventory.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ private _fnc_update = {
params ["_display"];
private _control = _display displayCtrl IDC_FG_SW_MAGAZINE;

private _unit = call CBA_fnc_currentUnit;
_control ctrlEnable isNil {GVAR(LoadedLaunchers) getVariable secondaryWeapon _unit};
_control ctrlEnable (!GVAR(replaceDisposableLauncher) || {isNil {GVAR(LoadedLaunchers) getVariable secondaryWeapon call CBA_fnc_currentUnit}});
};

_display displayAddEventHandler ["MouseMoving", _fnc_update];
Expand Down
2 changes: 2 additions & 0 deletions addons/disposable/fnc_replaceMagazineCargo.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Author:
commy2
---------------------------------------------------------------------------- */

if (!GVAR(replaceDisposableLauncher)) exitWith {};

params ["_box"];
if (!local _box) exitWith {};
if (missionNamespace getVariable [QGVAR(disableMagazineReplacement), false]) exitWith {};
Expand Down
15 changes: 14 additions & 1 deletion addons/disposable/initSettings.sqf
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
[
QGVAR(replaceDisposableLauncher),
"CHECKBOX",
[LLSTRING(ReplaceDisposableLauncher), LLSTRING(ReplaceDisposableLauncherTooltip)],
ELSTRING(common,WeaponsCategory),
true, // default value
1 // isGlobal
] call EFUNC(settings,init);

[
QGVAR(dropUsedLauncher),
"LIST",
LLSTRING(DropUsedLauncher),
ELSTRING(common,WeaponsCategory),
[
[0,1,2],
[LLSTRING(DropNever), LLSTRING(DropAIOnly), LLSTRING(DropSelectedAnotherWeapon)],
[
[LLSTRING(DropNever), LLSTRING(DropNeverTooltip)],
[LLSTRING(DropAIOnly), LLSTRING(DropAIOnlyTooltip)],
[LLSTRING(DropSelectedAnotherWeapon), LLSTRING(DropSelectedAnotherWeaponTooltip)]
],
2
],
0 // isGlobal
Expand Down
30 changes: 30 additions & 0 deletions addons/disposable/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,52 @@
<Key ID="STR_CBA_disposable_Component">
<English>Community Base Addons - Disposable Weapons</English>
<German>Community Base Addons - Einwegwaffen</German>
<Japanese>Community Base Addons - 使い捨て武器</Japanese>
</Key>
<Key ID="STR_CBA_disposable_DropUsedLauncher">
<English>Drop Used Disposable Launcher</English>
<German>Benutzten Einwegwerfer ablegen</German>
<Japanese>使った使い捨てランチャーを落とす</Japanese>
</Key>
<Key ID="STR_CBA_disposable_DropNever">
<English>Never</English>
<German>Niemals</German>
<Japanese>行わない</Japanese>
</Key>
<Key ID="STR_CBA_disposable_DropNeverTooltip">
<English>Don't automatically drop the used disposable launcher.</English>
<German>Benutzten Einwegwerfer nicht automatisch ablegen.</German>
<Japanese>使った使い捨てランチャーを自動的に落とさないようにします。</Japanese>
</Key>
<Key ID="STR_CBA_disposable_DropAIOnly">
<English>AI Only</English>
<German>Nur KI</German>
<Japanese>AI のみ</Japanese>
</Key>
<Key ID="STR_CBA_disposable_DropAIOnlyTooltip">
<English>Only AI drops the used disposable launcher.</English>
<German>Nur KI legt den benutzten Einwegwerfer ab.</German>
<Japanese>AI のみ使った使い捨てランチャーを落とすようにします。</Japanese>
</Key>
<Key ID="STR_CBA_disposable_DropSelectedAnotherWeapon">
<English>Selected Another Weapon</English>
<German>Andere Waffe ausgewählt</German>
<Japanese>別の武器が選択後</Japanese>
</Key>
<Key ID="STR_CBA_disposable_DropSelectedAnotherWeaponTooltip">
<English>Automatically drop the used disposable launcher as soon as another weapon is selected.</English>
<German>Benutzten Einwegwerfer automatisch ablegen, sobald eine andere Waffe ausgewählt wurde.</German>
<Japanese>他の武器を選択すると即時に使った使い捨てランチャーを自動的に落とすようにします。</Japanese>
</Key>
<Key ID="STR_CBA_disposable_ReplaceDisposableLauncher">
<English>Replace Disposable Launcher</English>
<German>Einwegwerfer ersetzten</German>
<Japanese>使い捨てランチャーを置換</Japanese>
</Key>
<Key ID="STR_CBA_disposable_ReplaceDisposableLauncherTooltip">
<English>If enabled, disposable launchers can only be used once. Ammunition for disposable launchers in containers and vehicles will be replaced with loaded disposable launchers. If disabled, disposable launchers can be reloaded after use.</English>
<German>Wenn aktiviert, dann können Einwegwerfer nur einmal benutzt werden. Munition für Einwegwerfer in Kisten und Fahrzeugen wird durch geladene Einwegwerfer ersetzt. Wenn deaktiviert, dann können Einwegwerfer nach der Benutzung nachgeladen werden.</German>
<Japanese>有効化すると、使い捨てランチャーは一度のみ使用できます。コンテナ内にある使い捨てランチャーは装填された使い捨てランチャーに置き換えられます。無効化すると、使用後に使い捨てランチャーをリロードできます。</Japanese>
</Key>
</Package>
</Project>
16 changes: 10 additions & 6 deletions addons/events/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
"LIST",
[LLSTRING(RepetitionMode), LLSTRING(RepetitionModeTooltip)],
ELSTRING(common,WeaponsCategory),
[[0, 1, 2], [
[LLSTRING(RepetitionModeOptic), LLSTRING(RepetitionModeOpticTooltip)], // Exit optic view
[LLSTRING(RepetitionModeTriggerRelease), LLSTRING(RepetitionModeTriggerReleaseTooltip)], // Stop holding trigger
[LLSTRING(RepetitionModeTriggerPress), LLSTRING(RepetitionModeTriggerPressTooltip)] // Click trigger again
], 1],
2
[
[0, 1, 2],
[
[LLSTRING(RepetitionModeOptic), LLSTRING(RepetitionModeOpticTooltip)], // Exit optic view
[LLSTRING(RepetitionModeTriggerRelease), LLSTRING(RepetitionModeTriggerReleaseTooltip)], // Stop holding trigger
[LLSTRING(RepetitionModeTriggerPress), LLSTRING(RepetitionModeTriggerPressTooltip)] // Click trigger again
],
1
],
2 // client setting
] call CBA_fnc_addSetting;
8 changes: 8 additions & 0 deletions addons/events/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,49 @@
<English>Weapon Repetition Mode</English>
<German>Repetierwaffe laden</German>
<Polish>Tryb powtarzania strzału</Polish>
<Japanese>武器反復モード</Japanese>
</Key>
<Key ID="STR_CBA_Events_RepetitionModeTooltip">
<English>Mode of bolting or pumping weapons.</English>
<German>Art eine Waffe zu repetieren.</German>
<Polish>Tryb przeładowania/ryglowania broni po wystrzale.</Polish>
<Japanese>ボルト、またはポンプ式武器のモードを決定します。</Japanese>
</Key>
<Key ID="STR_CBA_Events_RepetitionModeOptic">
<English>Leave Optics View</English>
<German>Optikansicht verlassen</German>
<Polish>Opuszczenie optyki</Polish>
<Japanese>照準画面を離れる</Japanese>
</Key>
<Key ID="STR_CBA_Events_RepetitionModeOpticTooltip">
<English>Bolt or rack weapon by leaving optics view.</English>
<German>Waffe beim Verlassen der Optikansicht repetieren.</German>
<Polish>Przeładowanie/ryglowanie broni nastąpi po opuszczeniu widoku optyki.</Polish>
<Japanese>ボルトかポンプ動作時は照準画面から離れます</Japanese>
</Key>
<Key ID="STR_CBA_Events_RepetitionModeTriggerRelease">
<English>Release Trigger</English>
<German>Abzug losslassen</German>
<Polish>Puszczenie spustu</Polish>
<Japanese>トリガー解放時</Japanese>
</Key>
<Key ID="STR_CBA_Events_RepetitionModeTriggerReleaseTooltip">
<English>Bolt or rack weapon by releasing trigger (hold trigger to prevent immediate action).</English>
<German>Waffe beim Loslassen des Abzugs repetieren (Abzug halten, um Repetieren zu verzögern).</German>
<Polish>Przeładowanie/ryglowanie nastąpi po puszczeniu spustu (przytrzymaj spust aby nie przełdowywać).</Polish>
<Japanese>トリガーを離してボルトかポンプ動作を行います。(トリガー長押しで即時動作を防止)</Japanese>
</Key>
<Key ID="STR_CBA_Events_RepetitionModeTriggerPress">
<English>Press Trigger</English>
<German>Abzug betätigen</German>
<Polish>Wciśnięcie spustu</Polish>
<Japanese>トリガー引いた時</Japanese>
</Key>
<Key ID="STR_CBA_Events_RepetitionModeTriggerPressTooltip">
<English>Bolt or rack weapon by pressing the trigger again.</English>
<German>Waffe beim erneuten Betätigen des Abzugs repetieren.</German>
<Polish>Przeładowanie/ryglowanie nastąpi po ponownym wciśnięciu spustu.</Polish>
<Japanese>トリガーを再度引いてボルトかポンプ動作を行います。</Japanese>
</Key>
</Package>
</Project>
39 changes: 18 additions & 21 deletions addons/jam/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,76 +6,73 @@ class CfgWeapons {
class Rifle_Short_Base_F;

class mk20_base_F: Rifle_Base_F {
magazineWell[] = {"CBA_556x45_STANAG", "CBA_556x45_STANAG_L", "CBA_556x45_STANAG_XL", "CBA_556x45_STANAG_2D"};
magazineWell[] = {"STANAG_556x45", "CBA_556x45_STANAG", "CBA_556x45_STANAG_L", "CBA_556x45_STANAG_XL", "CBA_556x45_STANAG_2D"};
};
class SDAR_base_F: Rifle_Base_F {
magazineWell[] = {"CBA_556x45_STANAG"};
magazineWell[] = {"STANAG_556x45", "CBA_556x45_STANAG"};
};
class Tavor_base_F: Rifle_Base_F {
magazineWell[] = {"CBA_556x45_STANAG", "CBA_556x45_STANAG_L", "CBA_556x45_STANAG_XL", "CBA_556x45_STANAG_2D"};
magazineWell[] = {"STANAG_556x45", "CBA_556x45_STANAG", "CBA_556x45_STANAG_L", "CBA_556x45_STANAG_XL", "CBA_556x45_STANAG_2D"};
};
class arifle_SPAR_01_base_F: Rifle_Base_F {
magazineWell[] = {"CBA_556x45_STANAG", "CBA_556x45_STANAG_L", "CBA_556x45_STANAG_XL", "CBA_556x45_STANAG_2D", "CBA_556x45_STANAG_2D_XL"};
magazineWell[] = {"STANAG_556x45", "CBA_556x45_STANAG", "CBA_556x45_STANAG_L", "CBA_556x45_STANAG_XL", "CBA_556x45_STANAG_2D", "CBA_556x45_STANAG_2D_XL"};
};
class arifle_SPAR_02_base_F: Rifle_Base_F {
magazineWell[] = {"CBA_556x45_STANAG", "CBA_556x45_STANAG_L", "CBA_556x45_STANAG_XL", "CBA_556x45_STANAG_2D", "CBA_556x45_STANAG_2D_XL"};
magazineWell[] = {"STANAG_556x45_Large", "CBA_556x45_STANAG", "CBA_556x45_STANAG_L", "CBA_556x45_STANAG_XL", "CBA_556x45_STANAG_2D", "CBA_556x45_STANAG_2D_XL"};
};

class UGL_F: GrenadeLauncher {
magazineWell[] = {"CBA_40mm_M203", "CBA_40mm_EGLM"};
};

class arifle_MX_Base_F: Rifle_Base_F {
magazineWell[] = {"CBA_65x39_MX"};
magazineWell[] = {"MX_65x39", "MX_65x39_Large", "CBA_65x39_MX", "CBA_65x39_MX_XL"};
class GL_3GL_F: UGL_F {
magazineWell[] = {"CBA_40mm_3GL", "CBA_40mm_M203", "CBA_40mm_EGLM"};
};
};
class arifle_MX_SW_F: arifle_MX_Base_F {
magazineWell[] = {"CBA_65x39_MX", "CBA_65x39_MX_XL"};
};

class arifle_Katiba_Base_F: Rifle_Base_F {
magazineWell[] = {"CBA_65x39_Katiba"};
magazineWell[] = {"Katiba_65x39", "CBA_65x39_Katiba"};
};

class arifle_ARX_base_F: Rifle_Base_F {
magazineWell[] = {"CBA_65x39_Katiba"};
magazineWell[] = {"Katiba_65x39", "CBA_65x39_Katiba"};
};

class EBR_base_F: Rifle_Long_Base_F {
magazineWell[] = {"CBA_762x51_M14"};
magazineWell[] = {"M14_762x51", "CBA_762x51_M14"};
};
class DMR_03_base_F: Rifle_Long_Base_F {
magazineWell[] = {"CBA_762x51_MkI_EMR"};
magazineWell[] = {"M14_762x51", "CBA_762x51_MkI_EMR"};
};
class DMR_06_base_F: Rifle_Long_Base_F {
magazineWell[] = {"CBA_762x51_M14"};
magazineWell[] = {"M14_762x51", "CBA_762x51_M14"};
};
class arifle_SPAR_03_base_F: Rifle_Base_F {
magazineWell[] = {"CBA_762x51_HK417", "CBA_762x51_HK417_L", "CBA_762x51_HK417_XL"};
};

class DMR_01_base_F: Rifle_Long_Base_F {
magazineWell[] = {"CBA_762x54R_SVD"};
magazineWell[] = {"Rahim_762x54", "CBA_762x54R_SVD"};
};

class arifle_CTAR_base_F: Rifle_Base_F {
magazineWell[] = {"CBA_580x42_TYPE95", "CBA_580x42_TYPE95_XL"};
magazineWell[] = {"CTAR_580x42", "CTAR_580x42_Large", "CBA_580x42_TYPE95", "CBA_580x42_TYPE95_XL"};
};
class arifle_CTARS_base_F: Rifle_Base_F {
magazineWell[] = {"CBA_580x42_TYPE95", "CBA_580x42_TYPE95_XL"};
magazineWell[] = {"CTAR_580x42", "CTAR_580x42_Large", "CBA_580x42_TYPE95", "CBA_580x42_TYPE95_XL"};
};

class arifle_AK12_base_F: Rifle_Base_F {
magazineWell[] = {"CBA_762x39_AK", "CBA_762x39_RPK"};
magazineWell[] = {"AK_762x39", "CBA_762x39_AK", "CBA_762x39_RPK"};
};
class arifle_AKM_base_F: Rifle_Base_F {
magazineWell[] = {"CBA_762x39_AK", "CBA_762x39_RPK"};
magazineWell[] = {"AK_762x39", "CBA_762x39_AK", "CBA_762x39_RPK"};
};

class arifle_AKS_base_F: Rifle_Base_F {
magazineWell[] = {"CBA_545x39_AK", "CBA_545x39_RPK"};
magazineWell[] = {"AK_545x39", "CBA_545x39_AK", "CBA_545x39_RPK"};
};

class LMG_03_base_F: Rifle_Long_Base_F {
Expand All @@ -95,7 +92,7 @@ class CfgWeapons {
};

class launch_RPG7_F: Launcher_Base_F {
magazineWell[] = {"CBA_RPG7"};
magazineWell[] = {"RPG7", "CBA_RPG7"};
};

class MMG_01_base_F: Rifle_Long_Base_F {
Expand Down
3 changes: 0 additions & 3 deletions addons/jr/cfgweapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -920,17 +920,14 @@ class CfgWeapons {
class muzzle_snds_H_MG: muzzle_snds_H { // we were seriously lacking a MG suppressor since BI hid these (1.64)
scope = 2;
displayName = "$STR_CBA_JR_cfgweapons_muzzle_snds_h_mg"; // 7.62 MG, can also be used on 6.5 and 5.56 MGs
picture = "\a3\weapons_f_mark\Data\UI\gear_acca_snds_338_tan_CA.paa";
model = "\a3\weapons_f\acc\acca_snds_338_tan_F";
};
class muzzle_snds_H_MG_blk_F: muzzle_snds_H_MG {
displayName = "$STR_CBA_JR_cfgweapons_muzzle_snds_h_mg"; // 7.62 MG, can also be used on 6.5 and 5.56 MGs
picture = "\a3\weapons_f_mark\Data\UI\gear_acca_snds_338_black_CA.paa";
model = "\a3\weapons_f\acc\acca_snds_338_black_F";
};
class muzzle_snds_H_MG_khk_F: muzzle_snds_H_MG {
displayName = "$STR_CBA_JR_cfgweapons_muzzle_snds_h_mg"; // 7.62 MG, can also be used on 6.5 and 5.56 MGs
picture = "\a3\weapons_f_mark\Data\UI\gear_acca_snds_338_green_CA.paa";
model = "\a3\weapons_f\acc\acca_snds_338_green_F";
};

Expand Down
2 changes: 1 addition & 1 deletion addons/optics/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (!hasInterface) exitWith {};
QGVAR(pauseOpticLayer) cutText ["", "PLAIN"];

GVAR(camera) = objNull;
[QGVAR(camera), {!isNull GVAR(camera)}] call CBA_fnc_registerFeatureCamera;
//[QGVAR(camera), {!isNull GVAR(camera)}] call CBA_fnc_registerFeatureCamera;

// scripted optic data cache
GVAR(currentOptic) = "";
Expand Down
3 changes: 2 additions & 1 deletion addons/optics/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
<German>Community Base Addons - Optiken</German>
<Polish>Community Base Addons - Optyka</Polish>
<Italian>Community Base Addons - Ottiche</Italian>
<Japanese>Community Base Addons - 照準器</Japanese>
</Key>
<Key ID="STR_cba_optics_UsePIP">
<English>Use picture in picture optics</English>
<German>Bild in Bild-Optiken verwenden</German>
<Japanese>Picture in Picture 照準器を使う</Japanese>
<Japanese>ピクチャー イン ピクチャー照準器を使う</Japanese>
<Polish>Używaj optyki typu Obraz w obrazie (PIP)</Polish>
<Italian>Usa ottiche on Picture-in-Picture</Italian>
</Key>
Expand Down

0 comments on commit 6ec5048

Please sign in to comment.