diff --git a/.github/workflows/arma.yml b/.github/workflows/arma.yml index 3ddfefd63fa..1af2e7e0602 100644 --- a/.github/workflows/arma.yml +++ b/.github/workflows/arma.yml @@ -43,3 +43,4 @@ jobs: with: name: ace3-${{ github.sha }}-nobin path: .hemttout/@* + include-hidden-files: true # Because .hemttout is a hidden directory diff --git a/.github/workflows/extensions.yml b/.github/workflows/extensions.yml index 8cafd847e26..ce475e5a006 100644 --- a/.github/workflows/extensions.yml +++ b/.github/workflows/extensions.yml @@ -57,7 +57,7 @@ jobs: - name: Build run: cargo build --verbose - name: Upload - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.arrays.os.target }} path: target/debug/ace.dll diff --git a/.github/workflows/hemtt.yml b/.github/workflows/hemtt.yml index 23fad275602..79286fc45c3 100644 --- a/.github/workflows/hemtt.yml +++ b/.github/workflows/hemtt.yml @@ -44,3 +44,4 @@ jobs: with: name: ace3-${{ github.sha }} path: .hemttout/@* + include-hidden-files: true # Because .hemttout is a hidden directory diff --git a/.github/workflows/pboproject.yml b/.github/workflows/pboproject.yml index 71e36eb12bd..5d8120acf31 100644 --- a/.github/workflows/pboproject.yml +++ b/.github/workflows/pboproject.yml @@ -1,85 +1,85 @@ -name: pboProject +# name: pboProject -on: - push: - branches: - - master - pull_request_target: +# on: +# push: +# branches: +# - master +# pull_request_target: -jobs: - pboproject: - runs-on: windows-2022 - steps: - - name: Install Arma 3 Tools - uses: arma-actions/arma3-tools@master - with: - toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }} - - name: Install Mikero Tools - uses: arma-actions/mikero-tools@2023-01-04 - - name: Download game data - run: | - Invoke-WebRequest "$env:ARMA3_DATA_URL" -OutFile arma3.zip - Invoke-WebRequest "$env:RHSAFRF_URL" -OutFile rhsafrf.zip - Invoke-WebRequest "$env:RHSGREF_URL" -OutFile rhsgref.zip - Invoke-WebRequest "$env:RHSSAF_URL" -OutFile rhssaf.zip - Invoke-WebRequest "$env:RHSUSF_URL" -OutFile rhsusf.zip - $files = @("arma3.zip", "rhsafrf.zip", "rhsgref.zip", "rhssaf.zip", "rhsusf.zip") - ForEach ($file in $files) { - Expand-7ZipArchive -Path $file -DestinationPath . - Remove-Item $file - } - env: - ARMA3_DATA_URL: ${{ secrets.ARMA3_DATA_URL }} - RHSAFRF_URL: ${{ secrets.RHSAFRF_URL }} - RHSGREF_URL: ${{ secrets.RHSGREF_URL }} - RHSSAF_URL: ${{ secrets.RHSSAF_URL }} - RHSUSF_URL: ${{ secrets.RHSUSF_URL }} - - name: Checkout CBA A3 - uses: actions/checkout@v4 - with: - path: x\cba - ref: master - repository: CBATeam/CBA_A3.git - - name: Checkout ACE3 - uses: actions/checkout@v4 - with: - path: z\ace - persist-credentials: false - - name: Checkout pull request - uses: actions/checkout@v4 - if: ${{ github.event_name == 'pull_request_target' }} - with: - path: pullrequest - ref: 'refs/pull/${{ github.event.number }}/merge' - - name: Replace addons with pull request addons - if: ${{ github.event_name == 'pull_request_target' }} - run: | - rm -r z\ace\addons\ - rm -r z\ace\optionals\ - rm -r z\ace\tools\pDummies\ - xcopy /e /h /q pullrequest\addons z\ace\addons\ - xcopy /e /h /q pullrequest\optionals z\ace\optionals\ - xcopy /e /h /q pullrequest\tools\pDummies z\ace\tools\pDummies\ - - name: Setup build environment - run: | - subst P: . - pboproject -P - xcopy /e /h /q z\ace\tools\pDummies\gm gm\ - xcopy /e /h /q z\ace\tools\pDummies\vn vn\ - xcopy /e /h /q z\ace\tools\pDummies\WW2 WW2\ - xcopy /e /h /q z\ace\tools\pDummies\CUP CUP\ - - name: Build - run: py P:\z\ace\tools\make.py ci - env: - PYTHONUNBUFFERED: 1 - - name: Archive logs - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: logs - path: temp/*.log - - name: Archive @ace - uses: actions/upload-artifact@v4 - with: - name: '@ace3-${{ github.sha }}' - path: z\ace\release\@ace +# jobs: + # pboproject: + # runs-on: windows-2022 + # steps: + # - name: Install Arma 3 Tools + # uses: arma-actions/arma3-tools@master + # with: + # toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }} + # - name: Install Mikero Tools + # uses: arma-actions/mikero-tools@2024-10-08 + # - name: Download game data + # run: | + # Invoke-WebRequest "$env:ARMA3_DATA_URL" -OutFile arma3.zip + # Invoke-WebRequest "$env:RHSAFRF_URL" -OutFile rhsafrf.zip + # Invoke-WebRequest "$env:RHSGREF_URL" -OutFile rhsgref.zip + # Invoke-WebRequest "$env:RHSSAF_URL" -OutFile rhssaf.zip + # Invoke-WebRequest "$env:RHSUSF_URL" -OutFile rhsusf.zip + # $files = @("arma3.zip", "rhsafrf.zip", "rhsgref.zip", "rhssaf.zip", "rhsusf.zip") + # ForEach ($file in $files) { + # Expand-7ZipArchive -Path $file -DestinationPath . + # Remove-Item $file + # } + # env: + # ARMA3_DATA_URL: ${{ secrets.ARMA3_DATA_URL }} + # RHSAFRF_URL: ${{ secrets.RHSAFRF_URL }} + # RHSGREF_URL: ${{ secrets.RHSGREF_URL }} + # RHSSAF_URL: ${{ secrets.RHSSAF_URL }} + # RHSUSF_URL: ${{ secrets.RHSUSF_URL }} + # - name: Checkout CBA A3 + # uses: actions/checkout@v4 + # with: + # path: x\cba + # ref: master + # repository: CBATeam/CBA_A3.git + # - name: Checkout ACE3 + # uses: actions/checkout@v4 + # with: + # path: z\ace + # persist-credentials: false + # - name: Checkout pull request + # uses: actions/checkout@v4 + # if: ${{ github.event_name == 'pull_request_target' }} + # with: + # path: pullrequest + # ref: 'refs/pull/${{ github.event.number }}/merge' + # - name: Replace addons with pull request addons + # if: ${{ github.event_name == 'pull_request_target' }} + # run: | + # rm -r z\ace\addons\ + # rm -r z\ace\optionals\ + # rm -r z\ace\tools\pDummies\ + # xcopy /e /h /q pullrequest\addons z\ace\addons\ + # xcopy /e /h /q pullrequest\optionals z\ace\optionals\ + # xcopy /e /h /q pullrequest\tools\pDummies z\ace\tools\pDummies\ + # - name: Setup build environment + # run: | + # subst P: . + # pboproject -P + # xcopy /e /h /q z\ace\tools\pDummies\gm gm\ + # xcopy /e /h /q z\ace\tools\pDummies\vn vn\ + # xcopy /e /h /q z\ace\tools\pDummies\WW2 WW2\ + # xcopy /e /h /q z\ace\tools\pDummies\CUP CUP\ + # - name: Build + # run: py P:\z\ace\tools\make.py ci + # env: + # PYTHONUNBUFFERED: 1 + # - name: Archive logs + # uses: actions/upload-artifact@v4 + # if: ${{ always() }} + # with: + # name: logs + # path: temp/*.log + # - name: Archive @ace + # uses: actions/upload-artifact@v4 + # with: + # name: '@ace3-${{ github.sha }}' + # path: z\ace\release\@ace diff --git a/.hemtt/launch.toml b/.hemtt/launch.toml new file mode 100644 index 00000000000..d0726cbdded --- /dev/null +++ b/.hemtt/launch.toml @@ -0,0 +1,31 @@ +[default] +workshop = [ + "450814997", # CBA_A3 +] + +[spe] +extends = "default" +dlc = [ + "Spearhead 1944" +] + +[vn] +extends = "default" +dlc = [ + "S.O.G. Prairie Fire", +] + +[ws] +extends = "default" +dlc = [ + "Western Sahara", +] + +[rhs] +extends = "default" +workshop = [ + "843425103", # RHS AFRF Workshop ID + "843577117", # RHS USAF Workshop ID + "843593391", # RHS GREF Workshop ID + "843632231", # RHS SAF Workshop ID +] diff --git a/.hemtt/lints.toml b/.hemtt/lints.toml new file mode 100644 index 00000000000..b8aeda905d0 --- /dev/null +++ b/.hemtt/lints.toml @@ -0,0 +1,10 @@ +[sqf.banned_commands] +options.ignore = [ + "addPublicVariableEventHandler", # Alt syntax is broken, we are using main syntax + "createSoundSource", # Greatly attenuated when in first person and in a vehicle +] + +[sqf.var_all_caps] +options.ignore = [ + "SLX_*", "ACE_*" +] diff --git a/.hemtt/project.toml b/.hemtt/project.toml index a9535dd2baa..6ab1c3a1afc 100644 --- a/.hemtt/project.toml +++ b/.hemtt/project.toml @@ -27,35 +27,3 @@ exclude = [ "common/functions/fnc_dummy.sqf", "zeus/functions/fnc_zeusAttributes.sqf", ] - -[hemtt.launch.default] -workshop = [ - "450814997", # CBA_A3 -] - -[hemtt.launch.spe] -extends = "default" -dlc = [ - "spe" -] - -[hemtt.launch.vn] -extends = "default" -dlc = [ - "S.O.G. Prairie Fire", -] - -[hemtt.launch.ws] -extends = "default" -dlc = [ - "Western Sahara", -] - -[hemtt.launch.rhs] -extends = "default" -workshop = [ - "843425103", # RHS AFRF Workshop ID - "843577117", # RHS USAF Workshop ID - "843593391", # RHS GREF Workshop ID - "843632231", # RHS SAF Workshop ID -] diff --git a/AUTHORS.txt b/AUTHORS.txt index 27dad9464e5..3cf263bb2a4 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -42,6 +42,7 @@ Walter Pearce 11RDP-LoupVert 654wak654 [BIG]Bull +Abogado "regiregi22" ACCtomeek adam3adam Adanteh @@ -177,6 +178,7 @@ SzwedzikPL Tachi tbeswick96 Tessa Elieff +ThomasAngel Timi007 Toaster Tonic diff --git a/Cargo.lock b/Cargo.lock index f65334dd2a9..9ce88373eeb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -50,9 +50,9 @@ dependencies = [ [[package]] name = "arma-rs" -version = "1.10.5" +version = "1.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdda6c2cf1237405dd57f82875c77b4159d415445471b903a901d8a37a61b30c" +checksum = "e722ed20b6266ceccf4334d32a528fcef9a2dca341b8bbcceb99eb7152081239" dependencies = [ "arma-rs-proc", "crossbeam-channel", @@ -62,14 +62,15 @@ dependencies = [ "seq-macro", "state", "uuid", - "windows 0.51.1", + "winapi", + "windows 0.58.0", ] [[package]] name = "arma-rs-proc" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "517b1a9cc16bc93896216ffeed0c692df4af022ee55ec45e8fc31c90a201dcb4" +checksum = "936ed035ff4e775bd50ff94ccdb44f236d1ca012c376347b048fb6b9861833b7" dependencies = [ "proc-macro2", "quote", @@ -408,9 +409,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.157" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374af5f94e54fa97cf75e945cce8a6b201e88a1a07e688b47dfd2a59c66dbd86" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libgit2-sys" @@ -1169,21 +1170,66 @@ dependencies = [ [[package]] name = "windows" -version = "0.51.1" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ "windows-core", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.51.1" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ - "windows-targets 0.48.5", + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", ] [[package]] diff --git a/README.md b/README.md index feb9194d65a..e5df6556e02 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ The mod is **built modularly**, so almost any included PBO can be easily removed - Carrying and dragging - Realistic names for vehicles and weapons - A fire control system (FCS) for armored vehicles and helicopters -- Realistic ballistics/FCS calculated in C/C++ extensions +- Realistic ballistics/FCS calculated in Rust extensions - Backblast area and overpressure simulation - Disposable launchers - Realistic G-forces diff --git a/ace.dll b/ace.dll index a92360dd4ac..088ffda15ba 100644 Binary files a/ace.dll and b/ace.dll differ diff --git a/ace_x64.dll b/ace_x64.dll index d9d09835f29..98d675bde45 100644 Binary files a/ace_x64.dll and b/ace_x64.dll differ diff --git a/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf b/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf index b197af9d709..b3f4053bdd9 100644 --- a/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf +++ b/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf @@ -108,16 +108,16 @@ for "_i" from 0 to (count _cfgWeapons)-1 do { }; if (_weapons find _weapon == -1) then { _weapons pushBack _weapon; - _magIndex = _magazines find _magazine; - _magSpeed = _magazineInitSpeeds select _magIndex; + private _magIndex = _magazines find _magazine; + private _magSpeed = _magazineInitSpeeds select _magIndex; _weaponInitSpeeds pushBack (_abInitialSpeed / _magSpeed); }; } forEach _data; { _x params ["_magazineIndex", "_abInitialSpeed", "_magazine", "_weapon"]; - _magIndex = _magazines find _magazine; - _magSpeed = _magazineInitSpeeds select _magIndex; - _wepIndex = _weapons find _weapon; + private _magIndex = _magazines find _magazine; + private _magSpeed = _magazineInitSpeeds select _magIndex; + private _wepIndex = _weapons find _weapon; _wepSpeed = _weaponInitSpeeds select _wepIndex; } forEach _data; { diff --git a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf index ceaef17badf..f48715a5d36 100644 --- a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf +++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf @@ -26,7 +26,7 @@ if (GVAR(Protractor)) exitWith { true }; if (weaponLowered ACE_player) exitWith { false }; -if (vehicle ACE_player != ACE_player) exitWith { false }; +if (!isNull objectParent ACE_player) exitWith { false }; if (currentWeapon ACE_player != primaryWeapon ACE_player) exitWith { false }; 2 cutText ["", "PLAIN"]; @@ -50,7 +50,7 @@ GVAR(Protractor) = true; __ctrl1 ctrlSetTextColor [1, 1, 1, 1]; __ctrl2 ctrlSetScale 1; - __ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY - 0.001 - 0.1074 * (-0.86 max ((ACE_player weaponDirection currentWeapon ACE_player) select 2) min 0.86), 0.2, 0.2 * 4/3]; + __ctrl2 ctrlSetPosition [safeZoneX + 0.001, safeZoneY - 0.001 - 0.1074 * (-0.86 max ((ACE_player weaponDirection currentWeapon ACE_player) select 2) min 0.86), 0.2, 0.2 * 4/3]; __ctrl2 ctrlCommit 0; __ctrl2 ctrlSetText QPATHTOF(UI\protractor_marker.paa); __ctrl2 ctrlSetTextColor [1, 1, 1, 1]; diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 7d00168160f..dee04cefeee 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -43,14 +43,11 @@ if (_abort) then { }; if (ACE_player distance _unit > _maxRange && {ACE_player distance ((getPosASL _unit) vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply _maxRange)) > _maxRange}) exitWith {}; - private _ammoCount = (_unit ammo _muzzle) + 1; - private _tracersEvery = getNumber(configFile >> "CfgMagazines" >> _magazine >> "tracersEvery"); - private _lastRoundsTracer = getNumber(configFile >> "CfgMagazines" >> _magazine >> "lastRoundsTracer"); - if (_ammoCount <= _lastRoundsTracer || {_tracersEvery > 0 && {(_ammoCount - _lastRoundsTracer) % _tracersEvery == 0}}) exitWith { _abort = false }; + if (_projectile getShotInfo 4) exitWith { _abort = false }; // 4=shownTracer if (GVAR(bulletTraceEnabled) && {_muzzleVelocity > BULLET_TRACE_MIN_VELOCITY} && {cameraView == "GUNNER"}) then { if (currentWeapon ACE_player == binocular ACE_player) exitWith { _abort = false }; - if (currentWeapon ACE_player == primaryWeapon ACE_player && {count primaryWeaponItems ACE_player > 2}) then { + if (currentWeapon ACE_player == primaryWeapon ACE_player) then { private _opticsName = (primaryWeaponItems ACE_player) select 2; private _opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType"); if (_opticType == 2) exitWith { _abort = false }; @@ -103,7 +100,7 @@ if (GVAR(bulletTraceEnabled) && {_muzzleVelocity > BULLET_TRACE_MIN_VELOCITY} && if (currentWeapon ACE_player == binocular ACE_player) then { _bulletTraceVisible = true; } else { - if (currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then { + if (currentWeapon ACE_player == primaryWeapon ACE_player) then { private _opticsName = (primaryWeaponItems ACE_player) select 2; private _opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType"); _bulletTraceVisible = _opticType == 2; diff --git a/addons/advanced_fatigue/CfgEden.hpp b/addons/advanced_fatigue/CfgEden.hpp index 8307c8a2a57..50147c8e8c6 100644 --- a/addons/advanced_fatigue/CfgEden.hpp +++ b/addons/advanced_fatigue/CfgEden.hpp @@ -2,9 +2,35 @@ class Cfg3DEN { class Attributes { class Slider; class GVAR(slider): Slider { - attributeLoad = "params [""_ctrlGroup""]; private _slider = _ctrlGroup controlsGroupCtrl 100; private _edit = _ctrlGroup controlsGroupCtrl 101; _slider sliderSetPosition _value; _edit ctrlSetText ([_value, 1, 1] call CBA_fnc_formatNumber); "; - attributeSave = "params [""_ctrlGroup""]; sliderPosition (_ctrlGroup controlsGroupCtrl 100); "; - onLoad = "params [""_ctrlGroup""]; private _slider = _ctrlGroup controlsGroupCtrl 100; private _edit = _ctrlGroup controlsGroupCtrl 101; _slider sliderSetRange [0, 2]; _slider ctrlAddEventHandler [""SliderPosChanged"", { params [""_slider""]; private _edit = (ctrlParentControlsGroup _slider) controlsGroupCtrl 101; private _value = sliderPosition _slider; _edit ctrlSetText ([_value, 1, 1] call CBA_fnc_formatNumber); }]; _edit ctrlAddEventHandler [""KillFocus"", { params [""_edit""]; private _slider = (ctrlParentControlsGroup _edit) controlsGroupCtrl 100; private _value = ((parseNumber ctrlText _edit) min 2) max 0; _slider sliderSetPosition _value; _edit ctrlSetText str _value; }];"; + #pragma hemtt suppress pw3_padded_arg + attributeLoad = QUOTE(\ + params ['_ctrlGroup']; \ + private _slider = _ctrlGroup controlsGroupCtrl 100; \ + private _edit = _ctrlGroup controlsGroupCtrl 101; \ + _slider sliderSetPosition _value; \ + _edit ctrlSetText ([ARR_3(_value,1,1)] call CBA_fnc_formatNumber); \ + ); + attributeSave = QUOTE(params ['_ctrlGroup']; sliderPosition (_ctrlGroup controlsGroupCtrl 100)); + #pragma hemtt suppress pw3_padded_arg + onLoad = QUOTE(\ + params ['_ctrlGroup']; \ + private _slider = _ctrlGroup controlsGroupCtrl 100; \ + private _edit = _ctrlGroup controlsGroupCtrl 101; \ + _slider sliderSetRange [ARR_2(0,MAX_PERFORMANCE_FACTOR)]; \ + _slider ctrlAddEventHandler [ARR_2('SliderPosChanged',{ \ + params ['_slider']; \ + private _edit = (ctrlParentControlsGroup _slider) controlsGroupCtrl 101; \ + private _value = sliderPosition _slider; \ + _edit ctrlSetText ([ARR_3(_value,1,1)] call CBA_fnc_formatNumber); \ + })]; \ + _edit ctrlAddEventHandler [ARR_2('KillFocus',{ \ + params ['_edit']; \ + private _slider = (ctrlParentControlsGroup _edit) controlsGroupCtrl 100; \ + private _value = ((parseNumber ctrlText _edit) min MAX_PERFORMANCE_FACTOR) max 0; \ + _slider sliderSetPosition _value; \ + _edit ctrlSetText str _value; \ + })]; \ + ); }; }; class Object { diff --git a/addons/advanced_fatigue/Dialog.hpp b/addons/advanced_fatigue/Dialog.hpp index df019f3800c..7b57e00ced9 100644 --- a/addons/advanced_fatigue/Dialog.hpp +++ b/addons/advanced_fatigue/Dialog.hpp @@ -2,18 +2,18 @@ class RscControlsGroupNoScrollbars; class RscPicture; class GVAR(StaminaBarContainer): RscControlsGroupNoScrollbars { - x = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_X"", ((safezoneX + safezoneW) - (10 * (((safezoneW / safezoneH) min 1.2) / 40)) - 4.3 * (((safezoneW / safezoneH) min 1.2) / 40))])"; - y = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_Y"", (safezoneY + 4.05 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])"; - w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "0.15 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_X"", ((safeZoneX + safeZoneW) - (10 * (((safeZoneW / safeZoneH) min 1.2) / 40)) - 4.3 * (((safeZoneW / safeZoneH) min 1.2) / 40))])"; + y = "(profilenamespace getvariable [""IGUI_GRID_STAMINA_Y"", (safeZoneY + 4.05 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25))])"; + w = "10 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "0.15 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; class Controls { class StaminaBar: RscPicture { idc = 10; x = 0; y = 0; - w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "0.15 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "10 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "0.15 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; text = "\A3\Ui_f\data\IGUI\RscIngameUI\RscUnitInfo\stamina_ca.paa"; }; }; diff --git a/addons/advanced_fatigue/XEH_preInit.sqf b/addons/advanced_fatigue/XEH_preInit.sqf index 643b7b0be00..ed1bd966229 100644 --- a/addons/advanced_fatigue/XEH_preInit.sqf +++ b/addons/advanced_fatigue/XEH_preInit.sqf @@ -8,7 +8,7 @@ PREP_RECOMPILE_END; #include "initSettings.inc.sqf" -GVAR(staminaBarWidth) = 10 * (((safezoneW / safezoneH) min 1.2) / 40); +GVAR(staminaBarWidth) = 10 * (((safeZoneW / safeZoneH) min 1.2) / 40); GVAR(dutyList) = createHashMap; GVAR(setAnimExclusions) = []; GVAR(inertia) = 0; diff --git a/addons/advanced_fatigue/functions/fnc_mainLoop.sqf b/addons/advanced_fatigue/functions/fnc_mainLoop.sqf index 16d355a424d..2955e9d6ee0 100644 --- a/addons/advanced_fatigue/functions/fnc_mainLoop.sqf +++ b/addons/advanced_fatigue/functions/fnc_mainLoop.sqf @@ -27,9 +27,18 @@ if (!alive ACE_player) exitWith { private _velocity = velocity ACE_player; private _normal = surfaceNormal (getPosWorld ACE_player); private _movementVector = vectorNormalized _velocity; -private _sideVector = vectorNormalized (_movementVector vectorCrossProduct _normal); private _fwdAngle = asin (_movementVector select 2); -private _sideAngle = asin (_sideVector select 2); +private _sideAngle = if ((getPosATL ACE_player) select 2 > 0.01) then { + 0 // ignore terrain normal if not touching it +} else { + private _sideVector = vectorNormalized (_movementVector vectorCrossProduct _normal); + asin (_sideVector select 2); +}; +if (GVAR(isSwimming)) then { // ignore when floating + _fwdAngle = 0; + _sideAngle = 0; +}; + private _currentWork = REE; private _currentSpeed = (vectorMagnitude _velocity) min 6; @@ -62,14 +71,15 @@ if (isNull objectParent ACE_player && {_currentSpeed > 0.1} && {isTouchingGround }; // Used to simulate the unevenness/roughness of the terrain - if ((getPosATL ACE_player) select 2 < 0.01) then { + if (_sideAngle != 0) then { private _sideGradient = abs (_sideAngle / 45) min 1; _terrainFactor = 1 + _sideGradient ^ 4; }; }; - _currentWork = [_duty, _gearMass, _terrainGradient * GVAR(terrainGradientFactor), _terrainFactor, _currentSpeed] call FUNC(getMetabolicCosts); + // Add a scaling factor of 0.1 to reduce excessive stamina consumption on default settings (see #10361) + _currentWork = [_duty, _gearMass, _terrainGradient * GVAR(terrainGradientFactor) * 0.1, _terrainFactor, _currentSpeed] call FUNC(getMetabolicCosts); _currentWork = _currentWork max REE; }; diff --git a/addons/advanced_fatigue/initSettings.inc.sqf b/addons/advanced_fatigue/initSettings.inc.sqf index 40d1d08f0d3..bd8bd7d9281 100644 --- a/addons/advanced_fatigue/initSettings.inc.sqf +++ b/addons/advanced_fatigue/initSettings.inc.sqf @@ -43,7 +43,7 @@ "SLIDER", [LSTRING(PerformanceFactor), LSTRING(PerformanceFactor_Description)], LSTRING(DisplayName), - [0, 10, 1, 2], + [0, MAX_PERFORMANCE_FACTOR, 1, 2], 1, { // Recalculate values if the setting is changed mid-mission diff --git a/addons/advanced_fatigue/script_component.hpp b/addons/advanced_fatigue/script_component.hpp index 7e3255439ff..11228ff3f25 100644 --- a/addons/advanced_fatigue/script_component.hpp +++ b/addons/advanced_fatigue/script_component.hpp @@ -41,3 +41,5 @@ #define AE1_MAXRESERVE 4000000 // mmol #define AE2_MAXRESERVE 84000 // mmol #define AN_MAXRESERVE 2300 // mmol + +#define MAX_PERFORMANCE_FACTOR 10 diff --git a/addons/advanced_throwing/XEH_postInit.sqf b/addons/advanced_throwing/XEH_postInit.sqf index d91129b0250..dd7a3f12806 100644 --- a/addons/advanced_throwing/XEH_postInit.sqf +++ b/addons/advanced_throwing/XEH_postInit.sqf @@ -77,7 +77,7 @@ GVAR(tempWindInfo) = false; } else { params ["_interactionType"]; // Ignore self-interaction menu, when in vehicle and when pick up is disabled - if (GVAR(enablePickUp) && {_interactionType == 0} && {vehicle ACE_player == ACE_player}) then { + if (GVAR(enablePickUp) && {_interactionType == 0} && {isNull objectParent ACE_player}) then { // Show pick up actions on CfgAmmo's call FUNC(renderPickUpInteraction); }; diff --git a/addons/advanced_throwing/functions/fnc_drawThrowable.sqf b/addons/advanced_throwing/functions/fnc_drawThrowable.sqf index f85c33dbde2..8623443d036 100644 --- a/addons/advanced_throwing/functions/fnc_drawThrowable.sqf +++ b/addons/advanced_throwing/functions/fnc_drawThrowable.sqf @@ -109,7 +109,7 @@ private _posHeadRel = ACE_player selectionPosition "head"; private _leanCoef = (_posHeadRel select 0) - 0.15; // 0.15 counters the base offset // Don't take leaning into account when weapon is lowered due to jiggling when walking side-ways (bandaid) -if (abs _leanCoef < 0.15 || {vehicle ACE_player != ACE_player} || {weaponLowered ACE_player}) then { +if (abs _leanCoef < 0.15 || {!isNull objectParent ACE_player} || {weaponLowered ACE_player}) then { _leanCoef = 0; }; @@ -144,7 +144,7 @@ if (ACE_player getVariable [QGVAR(dropMode), false]) then { _posFin = _posFin vectorAdd (AGLToASL (positionCameraToWorld _cameraOffset)); - if (vehicle ACE_player != ACE_player) then { + if (!isNull objectParent ACE_player) then { // Counteract vehicle velocity including acceleration private _vectorDiff = (velocity (vehicle ACE_player)) vectorMultiply (time - (ACE_player getVariable [QGVAR(lastTick), time]) + 0.01); _posFin = _posFin vectorAdd _vectorDiff; diff --git a/addons/advanced_throwing/functions/fnc_onMouseButtonDown.sqf b/addons/advanced_throwing/functions/fnc_onMouseButtonDown.sqf index 9e6f57d9e8d..72ecbb1b721 100644 --- a/addons/advanced_throwing/functions/fnc_onMouseButtonDown.sqf +++ b/addons/advanced_throwing/functions/fnc_onMouseButtonDown.sqf @@ -24,7 +24,7 @@ params ["", "_key"]; if (_key == 0) exitWith { if (!isNull (ACE_player getVariable [QGVAR(activeThrowable), objNull])) then { // Look gets automatically pointed at weapon direction on first LMB press when in FFV seat, require weapon to be up if in vehicle - private _inVehicle = vehicle ACE_player != ACE_player; + private _inVehicle = !isNull objectParent ACE_player; if (!_inVehicle || {_inVehicle && {!weaponLowered ACE_player}}) then { [ACE_player] call FUNC(throw); }; diff --git a/addons/advanced_throwing/functions/fnc_onMouseScroll.sqf b/addons/advanced_throwing/functions/fnc_onMouseScroll.sqf index 290f6ca28e1..94f04000b1e 100644 --- a/addons/advanced_throwing/functions/fnc_onMouseScroll.sqf +++ b/addons/advanced_throwing/functions/fnc_onMouseScroll.sqf @@ -30,7 +30,7 @@ if (ACE_player getVariable [QGVAR(dropMode), false]) then { }; // Limit distance in vehicle - if (vehicle ACE_player != ACE_player) then { + if (!isNull objectParent ACE_player) then { ACE_player setVariable [QGVAR(dropDistance), (ACE_player getVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT]) min 0.5]; }; } else { diff --git a/addons/advanced_throwing/functions/fnc_throw.sqf b/addons/advanced_throwing/functions/fnc_throw.sqf index d6b38a6a0c7..d1773373411 100644 --- a/addons/advanced_throwing/functions/fnc_throw.sqf +++ b/addons/advanced_throwing/functions/fnc_throw.sqf @@ -89,7 +89,7 @@ GVAR(flightPath) = []; GVAR(flightRotation) = []; (_unit getVariable QGVAR(activeThrowable)) spawn { while {!isNull _this && {(getPosATL _this) select 2 > 0.05}} do { - GVAR(flightPath) pushBack [ASLtoAGL (getPosASL _this), vectorUp _this]; + GVAR(flightPath) pushBack [ASLToAGL (getPosASL _this), vectorUp _this]; sleep 0.05; }; }; diff --git a/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf b/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf index 561c8748a65..8a312d95cc5 100644 --- a/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf +++ b/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf @@ -16,10 +16,11 @@ */ if (isNull findDisplay 312) exitWith { + //IGNORE_PRIVATE_WARNING ["_thisEventHandler"]; removeMissionEventHandler ["Draw3D", _thisEventHandler]; }; -private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; +private _unitMoveList = missionNamespace getVariable [QGVAR(garrison_unitMoveList), []]; { _x params ["_unit", "_pos"]; @@ -27,9 +28,9 @@ private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveLis switch (true) do { case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : { for "_i" from 0 to 3 do { - drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLtoASL _pos), [1,0,0,1]]; + drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLToASL _pos), [1,0,0,1]]; }; - drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75]; + drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLToASL _pos), 0.75, 0.75, 0.75]; }; case (!surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : { @@ -43,7 +44,7 @@ private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveLis for "_i" from 0 to 3 do { drawLine3D [_unit modelToWorldVisual [0,0,1], (AGLToASL _pos), [1,0,0,1]]; }; - drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75]; + drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLToASL _pos), 0.75, 0.75, 0.75]; }; case (surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : { diff --git a/addons/ai/functions/fnc_garrison.sqf b/addons/ai/functions/fnc_garrison.sqf index 4b8f84fce63..042c4fde3cb 100644 --- a/addons/ai/functions/fnc_garrison.sqf +++ b/addons/ai/functions/fnc_garrison.sqf @@ -26,7 +26,7 @@ params [["_startingPos",[0,0,0], [[]], 3], ["_buildingTypes", ["Building"], [[]] TRACE_6("fnc_garrison: Start",_startingPos,_buldingTypes,count _unitsArray,_fillingRadius,_fillingTYpe,_topDownFilling); _unitsArray = _unitsArray select {alive _x && {!isPlayer _x}}; -private _currentUnitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; +private _currentUnitMoveList = missionNamespace getVariable [QGVAR(garrison_unitMoveList), []]; if (_startingPos isEqualTo [0,0,0]) exitWith { TRACE_1("fnc_garrison: StartingPos error",_startingPos); @@ -57,38 +57,38 @@ if (_topDownFilling) then { // Those reverse are necessary, as dumb as it is there's no better way to sort those subarrays in sqf { reverse _x; - } foreach _buildingPos; + } forEach _buildingPos; _buildingPos sort false; { reverse _x; - } foreach _buildingPos; + } forEach _buildingPos; _buildingsIndex pushBack _buildingPos; - } foreach _buildings; + } forEach _buildings; } else { { _buildingsIndex pushBack (_x buildingPos -1); - } foreach _buildings; + } forEach _buildings; }; // Remove buildings without positions { _buildingsIndex deleteAt (_buildingsIndex find _x); -} foreach (_buildingsIndex select {count _x == 0}); +} forEach (_buildingsIndex select {count _x == 0}); //Remove positions units are already pathing to _buildingsIndex = _buildingsIndex apply { _x select { private _testedPos = _x; - ({(_x select 1) isEqualTo _testedPos} count (missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []])) == 0 + ({(_x select 1) isEqualTo _testedPos} count (missionNamespace getVariable [QGVAR(garrison_unitMoveList), []])) == 0 } }; // Warn the user that there's not enough positions to place all units private _count = 0; -{_count = _count + count _x} foreach _buildingsIndex; +{_count = _count + count _x} forEach _buildingsIndex; if ( (count _unitsArray) - _count > 0) then { TRACE_4("fnc_garrison: Not enough spots to place all units",_unitsArray,count _unitsArray,_count,((count _unitsArray) - _count > 0)); [LSTRING(GarrisonNotEnoughPos)] call EFUNC(common,displayTextStructured); @@ -104,7 +104,7 @@ private _fnc_comparePos = { params ["_nearestUnits", "_pos"]; ({ if (surfaceIsWater getPos _x) then { - floor ((getPosASL _x) select 2) == floor ((AGLtoASL _pos) select 2) + floor ((getPosASL _x) select 2) == floor ((AGLToASL _pos) select 2) } else { floor ((getPosATL _x) select 2) == floor (_pos select 2) }; @@ -141,7 +141,7 @@ switch (_fillingType) do { if (_teleport) then { doStop _unit; if (_posSurface) then { - _unit setPosASL (AGLtoASL _pos); + _unit setPosASL (AGLToASL _pos); } else { _unit setPosATL _pos; }; @@ -190,7 +190,7 @@ switch (_fillingType) do { if (_teleport) then { doStop _unit; if (_posSurface) then { - _unit setPosASL (AGLtoASL _pos); + _unit setPosASL (AGLToASL _pos); } else { _unit setPosATL _pos; }; @@ -237,7 +237,7 @@ switch (_fillingType) do { if (_teleport) then { doStop _unit; if (_posSurface) then { - _unit setPosASL (AGLtoASL _pos); + _unit setPosASL (AGLToASL _pos); } else { _unit setPosATL _pos; }; @@ -261,7 +261,7 @@ switch (_fillingType) do { TRACE_1(format [ARR_2("fnc_garrison: while loop ended | %1 units ready to be treated by PFH",count _unitMoveList)],_teleport); // Update the unit list and remove duplicate positions and units -private _garrison_unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; +private _garrison_unitMoveList = missionNamespace getVariable [QGVAR(garrison_unitMoveList), []]; _garrison_unitMoveList = _garrison_unitMoveList select { _x params ["_testedUnit", "_testedPos"]; @@ -270,7 +270,7 @@ _garrison_unitMoveList = _garrison_unitMoveList select { _garrison_unitMoveList append _unitMoveList; -missionNameSpace setVariable [QGVAR(garrison_unitMoveList), _garrison_unitMoveList, true]; +missionNamespace setVariable [QGVAR(garrison_unitMoveList), _garrison_unitMoveList, true]; if (_teleport) then { [QGVAR(AISection), [_placedUnits, ["PATH"], false], _placedUnits] call CBA_fnc_targetEvent; diff --git a/addons/ai/functions/fnc_garrisonMove.sqf b/addons/ai/functions/fnc_garrisonMove.sqf index 4d1c471a0ea..46313f12e38 100644 --- a/addons/ai/functions/fnc_garrisonMove.sqf +++ b/addons/ai/functions/fnc_garrisonMove.sqf @@ -31,21 +31,21 @@ private _unitMoveListUnits = (_unitMoveList apply {_x select 0}); { _x setVariable [QGVAR(garrisonMove_failSafe), nil, true]; _x setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true]; -} foreach _unitMoveListUnits; +} forEach _unitMoveListUnits; // Avoid duplicate PFHs if (isNil QGVAR(garrison_moveUnitPFH)) then { - missionNameSpace setVariable [QGVAR(garrison_moveUnitPFH), true, true]; + missionNamespace setVariable [QGVAR(garrison_moveUnitPFH), true, true]; // PFH checking if the units have reached their destination [{ params ["_args", "_pfhID"]; - private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; + private _unitMoveList = missionNamespace getVariable [QGVAR(garrison_unitMoveList), []]; // End PFH if all units are placed / unable to reach position if (_unitMoveList isEqualTo []) then { - missionNameSpace setVariable [QGVAR(garrison_moveUnitPFH), nil, true]; + missionNamespace setVariable [QGVAR(garrison_moveUnitPFH), nil, true]; LOG("garrisonMove PFH: PFH finished it's job | deleting PFH"); _pfhID call CBA_fnc_removePerFrameHandler; @@ -91,7 +91,7 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then { } else { private _unitPos = getPos _unit; - if (surfaceisWater _unitPos) then { + if (surfaceIsWater _unitPos) then { _unitPos = getPosASL _unit; } else { _unitPos = getPosATL _unit; @@ -131,9 +131,9 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then { }; }; }; - } foreach _unitMoveList; + } forEach _unitMoveList; - missionNameSpace setVariable [QGVAR(garrison_unitMoveList), _unitMoveList, true]; + missionNamespace setVariable [QGVAR(garrison_unitMoveList), _unitMoveList, true]; }; }, 0.5, []] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/ai/functions/fnc_unGarrison.sqf b/addons/ai/functions/fnc_unGarrison.sqf index 09ebc3e63da..f17d9aa4ab7 100644 --- a/addons/ai/functions/fnc_unGarrison.sqf +++ b/addons/ai/functions/fnc_unGarrison.sqf @@ -32,7 +32,7 @@ _units = _units select {local _x}; _unit setVariable [QGVAR(garrisonned), false, true]; - private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; + private _unitMoveList = missionNamespace getVariable [QGVAR(garrison_unitMoveList), []]; _unitMoveList deleteAt (_unitMoveList findIf {_x select 0 == _unit}); if (_leader != _unit) then { @@ -43,9 +43,9 @@ _units = _units select {local _x}; _unit doMove ((nearestBuilding (getPos _unit)) buildingExit 0); }; - if ((units _unit) findif {(_x getVariable [QGVAR(garrisonned), false]) && !isPlayer _x} == -1) then { + if ((units _unit) findIf {(_x getVariable [QGVAR(garrisonned), false]) && !isPlayer _x} == -1) then { LOG("fnc_ungarrison: enableAttack true"); (group _unit) enableAttack true; }; }; -} foreach _units; +} forEach _units; diff --git a/addons/aircraft/functions/fnc_droneSetWaypoint.sqf b/addons/aircraft/functions/fnc_droneSetWaypoint.sqf index 953b99a357a..45c18c63da2 100644 --- a/addons/aircraft/functions/fnc_droneSetWaypoint.sqf +++ b/addons/aircraft/functions/fnc_droneSetWaypoint.sqf @@ -62,6 +62,8 @@ if (_type == "FOLLOW" && {["CAManBase", "LandVehicle", "Ship"] findIf {_target i _waypoint setWaypointPosition [getPosASL _target, -1]; }; }, 3, [_vehicle, _group, _waypoint, _target]] call CBA_fnc_addPerFrameHandler; +} else { + _waypoint setWaypointType _type; }; TRACE_3("",_currentHeight,_currentLoiterRadius,_currentLoiterType); diff --git a/addons/aircraft/stringtable.xml b/addons/aircraft/stringtable.xml index bcec121106e..9cddd7ec1ad 100644 --- a/addons/aircraft/stringtable.xml +++ b/addons/aircraft/stringtable.xml @@ -184,6 +184,8 @@ 따라가는 거리 Distance de suivi 追跡距離 + Расстояние отслеживания + Distancia de Seguimiento Following unit within %1m @@ -192,6 +194,8 @@ %1m 이내로 유닛을 따라갑니다 Suivre l'unité jusqu'à %1m %1m 間隔で 目標を追跡します + Отслеживание в пределах %1m + Seguir unidad a %1m diff --git a/addons/arsenal/defines.hpp b/addons/arsenal/defines.hpp index cd6d937426a..10a599af0d4 100644 --- a/addons/arsenal/defines.hpp +++ b/addons/arsenal/defines.hpp @@ -3,17 +3,23 @@ #define GRID_W (pixelW * pixelGridNoUIScale * pixelScale) #define GRID_H (pixelH * pixelGridNoUIScale * pixelScale) -#define WIDTH_TOTAL (safezoneW - 2 * (93 * GRID_W)) +#define WIDTH_TOTAL (safeZoneW - 2 * (93 * GRID_W)) #define WIDTH_GAP (WIDTH_TOTAL / 100) #define WIDTH_SINGLE ((WIDTH_TOTAL - 7 * WIDTH_GAP) / 6) // IDDs +#ifndef IDD_MISSION #define IDD_MISSION 46 +#endif #define IDD_RSCDISPLAYCURATOR 312 #define IDD_DISPLAY3DEN 313 +#ifndef IDC_OK #define IDC_OK 1 // emulate "OK" button +#endif +#ifndef IDC_CANCEL #define IDC_CANCEL 2 // emulate "Cancel" button +#endif // Sorting #define ASCENDING 0 @@ -154,6 +160,8 @@ #define IDC_statsPreviousPage 52 #define IDC_statsNextPage 53 #define IDC_statsCurrentPage 54 +#define IDC_statsBoxTitleBackground 55 +#define IDC_statsBoxBackground 56 #define IDC_actionsBox 90 #define IDC_actionsBackground1 90010 #define IDC_actionsBackground2 90011 @@ -360,10 +368,10 @@ _buttonCurrentMag2Ctrl ctrlCommit FADE_DELAY;\ {\ _x = _display displayCtrl _x;\ _x ctrlSetPosition [\ - safezoneX + safezoneW - 93 * GRID_W,\ - safezoneY + 14 * GRID_H,\ + safeZoneX + safeZoneW - 93 * GRID_W,\ + safeZoneY + 14 * GRID_H,\ 80 * GRID_W,\ - safezoneH - 28 * GRID_H\ + safeZoneH - 28 * GRID_H\ ];\ _x ctrlCommit 0;\ } forEach [\ @@ -406,10 +414,10 @@ _buttonCurrentMag2Ctrl ctrlCommit FADE_DELAY;\ {\ _x = _display displayCtrl _x;\ _x ctrlSetPosition [\ - safezoneX + safezoneW - 93 * GRID_W,\ - safezoneY + 14 * GRID_H,\ + safeZoneX + safeZoneW - 93 * GRID_W,\ + safeZoneY + 14 * GRID_H,\ 80 * GRID_W,\ - safezoneH - 34 * GRID_H\ + safeZoneH - 34 * GRID_H\ ];\ _x ctrlCommit 0;\ } forEach [\ @@ -426,16 +434,16 @@ if (!isNil QGVAR(customRightPanelButtons)) then {\ if (isNull (_display displayCtrl (60 + _plusId))) then {\ private _ctrl = _display ctrlCreate [QGVAR(customArsenalButton_Background), 60 + _plusId];\ _ctrl ctrlSetPosition [\ - safezoneW + safezoneX - 13 * GRID_W,\ - safezoneY + (88 + (10 * _forEachIndex)) * GRID_H\ + safeZoneW + safeZoneX - 13 * GRID_W,\ + safeZoneY + (88 + (10 * _forEachIndex)) * GRID_H\ ];\ _ctrl ctrlCommit 0;\ };\ if (isNull (_display displayCtrl (61 + _plusId))) then {\ - _ctrl = _display ctrlCreate [QGVAR(customArsenalButton_Button), 61 + _plusId];\ + private _ctrl = _display ctrlCreate [QGVAR(customArsenalButton_Button), 61 + _plusId];\ _ctrl ctrlSetPosition [\ - safezoneW + safezoneX - 10 * GRID_W,\ - safezoneY + (88 + (10 * _forEachIndex)) * GRID_H\ + safeZoneW + safeZoneX - 10 * GRID_W,\ + safeZoneY + (88 + (10 * _forEachIndex)) * GRID_H\ ];\ _ctrl ctrlSetText _picture;\ _ctrl ctrlSetTooltip _tooltip;\ @@ -446,8 +454,8 @@ if (!isNil QGVAR(customRightPanelButtons)) then {\ {\ _x = _display displayCtrl _x;\ _x ctrlSetPosition [\ - safezoneW + safezoneX - (10 + (3 * _forEachIndex)) * GRID_W,\ - safezoneY + (88 + (10 * _miscOffset)) * GRID_H\ + safeZoneW + safeZoneX - (10 + (3 * _forEachIndex)) * GRID_W,\ + safeZoneY + (88 + (10 * _miscOffset)) * GRID_H\ ];\ _x ctrlCommit 0;\ } forEach [IDC_buttonMisc, IDC_iconBackgroundMisc];\ diff --git a/addons/arsenal/functions/fnc_baseAttachment.sqf b/addons/arsenal/functions/fnc_baseAttachment.sqf index 968fd05d9b8..1d6155c9ee2 100644 --- a/addons/arsenal/functions/fnc_baseAttachment.sqf +++ b/addons/arsenal/functions/fnc_baseAttachment.sqf @@ -22,7 +22,7 @@ TRACE_1("looking up base attachment",_item); private _switchableClasses = []; -private _cfgWeapons = configfile >> "CfgWeapons"; +private _cfgWeapons = configFile >> "CfgWeapons"; private _config = _cfgWeapons >> _item; _item = configName _config; diff --git a/addons/arsenal/functions/fnc_baseWeapon.sqf b/addons/arsenal/functions/fnc_baseWeapon.sqf index abeb0e0ab9b..2b1b219e65c 100644 --- a/addons/arsenal/functions/fnc_baseWeapon.sqf +++ b/addons/arsenal/functions/fnc_baseWeapon.sqf @@ -20,7 +20,7 @@ params [["_weapon", "", [""]]]; // Check if item is cached (uiNamespace getVariable QGVAR(baseWeaponNameCache)) getOrDefaultCall [toLowerANSI _weapon, { - private _cfgWeapons = configfile >> "CfgWeapons"; + private _cfgWeapons = configFile >> "CfgWeapons"; private _config = _cfgWeapons >> _weapon; // If class doesn't exist, exit diff --git a/addons/arsenal/functions/fnc_handleStats.sqf b/addons/arsenal/functions/fnc_handleStats.sqf index b5d435a101e..0511c05a25a 100644 --- a/addons/arsenal/functions/fnc_handleStats.sqf +++ b/addons/arsenal/functions/fnc_handleStats.sqf @@ -19,6 +19,8 @@ params ["_display", "_control", "_curSel", ["_itemCfg", configNull]]; private _statsBoxCtrl = _display displayCtrl IDC_statsBox; +private _statsBoxTitleBackgroundCtrl = _display displayCtrl IDC_statsBoxTitleBackground; +private _statsBoxBackgroundCtrl = _display displayCtrl IDC_statsBoxBackground; private _statsPreviousPageCtrl = _display displayCtrl IDC_statsPreviousPage; private _statsNextPageCtrl = _display displayCtrl IDC_statsNextPage; private _statsCurrentPageCtrl = _display displayCtrl IDC_statsCurrentPage; @@ -53,7 +55,7 @@ private _fnc_hideEverything = { // Hide the stats box _statsBoxCtrl ctrlSetPosition [ (0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP, - safezoneY + 1.8 * GRID_H, + safeZoneY + 1.8 * GRID_H, 0, 0 ]; @@ -62,7 +64,7 @@ private _fnc_hideEverything = { // Move action display private _ctrl = _display displayCtrl IDC_actionsBox; private _pos = ctrlPosition _ctrl; - _pos set [1, safezoneY + 1.8 * GRID_H]; + _pos set [1, safeZoneY + 1.8 * GRID_H]; _ctrl ctrlSetPosition _pos; _ctrl ctrlCommit 0; @@ -111,6 +113,7 @@ private _fnc_handleStats = { private _statsBarCtrl = controlNull; private _statsTextCtrl = controlNull; private _textStatementResult = ""; + private _lastCtrl = _statsBoxTitleBackgroundCtrl; { _x params ["", "_configEntry", "_title", "_bools", "_statements"]; @@ -127,6 +130,17 @@ private _fnc_handleStats = { _statsTitleCtrl ctrlSetText _title; _statsTitleCtrl ctrlSetFade 0; + // Vertical Position + ctrlPosition _lastCtrl params ["", "_lastPosY", "", "_lastPosH"]; + _statsTitleCtrl ctrlSetPositionY (_lastPosY + _lastPosH + GRID_H); + { + _x ctrlSetPositionY (_lastPosY + _lastPosH + GRID_H + (5 * GRID_H)); + } forEach [ + _statsBackgroundCtrl, + _statsBarCtrl, + _statsTextCtrl + ]; + // Handle bars if (_showBar) then { _statsBarCtrl progressSetPosition ([_configEntry, _itemCfg] call _barStatement); @@ -140,18 +154,39 @@ private _fnc_handleStats = { // Handle text entries if (_showText) then { _textStatementResult = [_configEntry, _itemCfg] call _textStatement; - - if !(_textStatementResult isEqualtype "") then { - _textStatementResult = str _textStatementResult; + if (_textStatementResult isEqualType []) then { + _textStatementResult = _textStatementResult joinString endl; + } else { + if !(_textStatementResult isEqualType "") then { + _textStatementResult = str _textStatementResult; + }; }; _statsTextCtrl ctrlSetText _textStatementResult; _statsTextCtrl ctrlSetTextColor ([[1, 1, 1, 1], [0, 0, 0, 1]] select (_showBar)); + + //Height based on Text lines + { + _x ctrlSetPositionH (ctrlTextHeight _statsTextCtrl); + } forEach [ + _statsBackgroundCtrl, + _statsBarCtrl, + _statsTextCtrl + ]; + _statsTextCtrl ctrlSetFade 0; } else { _statsTextCtrl ctrlSetFade 1; + //Ensure default height + { + _x ctrlSetPositionH (5 * GRID_H); + } forEach [ + _statsBackgroundCtrl, + _statsBarCtrl, + _statsTextCtrl + ]; }; - + { _x ctrlCommit 0; } forEach [ @@ -160,24 +195,29 @@ private _fnc_handleStats = { _statsBarCtrl, _statsTextCtrl ]; + + _lastCtrl = _statsTextCtrl; + } forEach _statsToDisplay; // Resize the window (5 - _statsCount) call _fnc_hideUnused; - private _height = 10 * _statsCount + 5; + ctrlPosition _lastCtrl params ["", "_lastPosY", "", "_lastPosH"]; _statsBoxCtrl ctrlSetPosition [ (0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP, - safezoneY + 1.8 * GRID_H, + safeZoneY + 1.8 * GRID_H, 47 * GRID_W, - _height * GRID_H + _lastPosY + _lastPosH + GRID_H ]; + _statsBoxBackgroundCtrl ctrlSetPositionH (_lastPosY + _lastPosH + GRID_H); + _statsBoxBackgroundCtrl ctrlCommit 0; _statsBoxCtrl ctrlCommit 0; // Move the actions box private _ctrl = _display displayCtrl IDC_actionsBox; private _pos = ctrlPosition _ctrl; - _pos set [1, safezoneY + (_height + 3.6) * GRID_H]; + _pos set [1, safeZoneY + (_lastPosY + _lastPosH + GRID_H + (3.6 * GRID_H))]; _ctrl ctrlSetPosition _pos; _ctrl ctrlCommit 0; diff --git a/addons/arsenal/functions/fnc_itemInfo.sqf b/addons/arsenal/functions/fnc_itemInfo.sqf index 676783a8b54..f99de009053 100644 --- a/addons/arsenal/functions/fnc_itemInfo.sqf +++ b/addons/arsenal/functions/fnc_itemInfo.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" -#include "..\defines.hpp" #include "\a3\ui_f\hpp\defineResincl.inc" +#include "..\defines.hpp" /* * Author: Alganthe, johnb43 * Update arsenal's info box. @@ -32,11 +32,11 @@ if (isClass _itemCfg) then { (_display displayCtrl IDC_infoName) ctrlSetText ([_control lbText _curSel, _control lnbText [_curSel, 1]] select (ctrlType _control == CT_LISTNBOX)); private _itemAuthor = getText (_itemCfg >> "author"); - (_display displayctrl IDC_infoAuthor) ctrlSetText ([localize "STR_AUTHOR_UNKNOWN", format [localize "STR_FORMAT_AUTHOR_SCRIPTED", _itemAuthor]] select (_itemAuthor != "")); + (_display displayCtrl IDC_infoAuthor) ctrlSetText ([localize "STR_AUTHOR_UNKNOWN", format [localize "STR_FORMAT_AUTHOR_SCRIPTED", _itemAuthor]] select (_itemAuthor != "")); // DLC / mod icon - private _ctrlDLC = _display displayctrl IDC_DLCIcon; - private _ctrlDLCBackground = _display displayctrl IDC_DLCBackground; + private _ctrlDLC = _display displayCtrl IDC_DLCIcon; + private _ctrlDLCBackground = _display displayCtrl IDC_DLCBackground; private _dlc = _itemCfg call EFUNC(common,getAddon); if (_dlc != "") then { @@ -48,7 +48,7 @@ if (isClass _itemCfg) then { _ctrlDLC ctrlSetFade 0; // If an item is from a DLC, set it so when you press the icon on the bottom right it opens the DLC page - if ((getNumber (configfile >> "CfgMods" >> _dlc >> "appId")) > 0) then { + if ((getNumber (configFile >> "CfgMods" >> _dlc >> "appId")) > 0) then { _ctrlDLC ctrlSetEventHandler ["MouseExit", format ["(_this select 0) ctrlSetText '%1';", _logo]]; _ctrlDLC ctrlSetEventHandler ["MouseEnter", format ["(_this select 0) ctrlSetText '%1';", _logoOver]]; _ctrlDLC ctrlSetEventHandler [ diff --git a/addons/arsenal/functions/fnc_message.sqf b/addons/arsenal/functions/fnc_message.sqf index b20689f6b9c..5d2846bafc6 100644 --- a/addons/arsenal/functions/fnc_message.sqf +++ b/addons/arsenal/functions/fnc_message.sqf @@ -25,6 +25,7 @@ if (!isNil "_handle") then { }; _handle = [_display, _messageBoxCtrl, time + 5, _message, FADE_DELAY] spawn { + //IGNORE_PRIVATE_WARNING ["_thisScript"]; disableSerialization; params ["_display", "_control", "_timer", "_message", "_delay"]; diff --git a/addons/arsenal/functions/fnc_onArsenalOpen.sqf b/addons/arsenal/functions/fnc_onArsenalOpen.sqf index ea05cf1769f..2a2d8716c84 100644 --- a/addons/arsenal/functions/fnc_onArsenalOpen.sqf +++ b/addons/arsenal/functions/fnc_onArsenalOpen.sqf @@ -121,7 +121,7 @@ _mouseBlockCtrl ctrlEnable false; private _statsBoxCtrl = _display displayCtrl IDC_statsBox; _statsBoxCtrl ctrlSetPosition [ (0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP, - safezoneY + 1.8 * GRID_H, + safeZoneY + 1.8 * GRID_H, 47 * GRID_W, 11 * GRID_H ]; @@ -132,7 +132,7 @@ _statsBoxCtrl ctrlCommit 0; private _actionsBoxCtrl = _display displayCtrl IDC_actionsBox; _actionsBoxCtrl ctrlSetPosition [ (0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP, - safezoneY + 58.6 * GRID_H, + safeZoneY + 58.6 * GRID_H, 47 * GRID_W, 11 * GRID_H ]; diff --git a/addons/arsenal/functions/fnc_onPanelDblClick.sqf b/addons/arsenal/functions/fnc_onPanelDblClick.sqf index 07287d74cea..e9e639ecaeb 100644 --- a/addons/arsenal/functions/fnc_onPanelDblClick.sqf +++ b/addons/arsenal/functions/fnc_onPanelDblClick.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" -#include "..\defines.hpp" #include "\a3\ui_f\hpp\defineResincl.inc" +#include "..\defines.hpp" /* * Author: LinkIsGrim * Add or remove item(s) to favorites when LShift is pressed diff --git a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf index e25016b303d..05b86358f80 100644 --- a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" -#include "..\defines.hpp" #include "\a3\ui_f\hpp\defineResincl.inc" +#include "..\defines.hpp" /* * Author: Alganthe, johnb43 * Handles selection changes on the left panel. @@ -17,7 +17,7 @@ params ["_control", "_curSel"]; -if (_curSel < 0) exitwith {}; +if (_curSel < 0) exitWith {}; private _display = ctrlParent _control; private _item = [_control lbData _curSel, _control lnbData [_curSel, 0]] select (ctrlType _control == CT_LISTNBOX); @@ -33,6 +33,7 @@ private _fnc_clearCurrentWeaponMags = { // If nothing was selected, remove all magazines from the current weapon if (_item != "") then { + //IGNORE_PRIVATE_WARNING ["_compatibleMags"]; _compatibleMagsCurrentWeapon = _compatibleMagsCurrentWeapon - _compatibleMags; }; diff --git a/addons/arsenal/functions/fnc_onSelChangedRight.sqf b/addons/arsenal/functions/fnc_onSelChangedRight.sqf index abec68ceeef..66315f7dc79 100644 --- a/addons/arsenal/functions/fnc_onSelChangedRight.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedRight.sqf @@ -16,7 +16,7 @@ params ["_control", "_curSel"]; -if (_curSel < 0) exitwith {}; +if (_curSel < 0) exitWith {}; private _display = ctrlParent _control; private _item = _control lbData _curSel; diff --git a/addons/arsenal/functions/fnc_scanConfig.sqf b/addons/arsenal/functions/fnc_scanConfig.sqf index fef97e8bd85..b5c6627cc7a 100644 --- a/addons/arsenal/functions/fnc_scanConfig.sqf +++ b/addons/arsenal/functions/fnc_scanConfig.sqf @@ -228,10 +228,10 @@ private _faceCategory = ""; _faceCache set [configName _x, [getText (_x >> "displayName"), _modPicture, _faceCategory]]; }; } forEach ("true" configClasses _x); -} forEach ("true" configClasses (configfile >> "CfgFaces")); +} forEach ("true" configClasses (configFile >> "CfgFaces")); // Get all voices -private _voiceCache = (configProperties [configFile >> "CfgVoice", "isClass _x && {getNumber (_x >> 'scope') == 2}", true]) - [configfile >> "CfgVoice" >> "NoVoice"]; +private _voiceCache = (configProperties [configFile >> "CfgVoice", "isClass _x && {getNumber (_x >> 'scope') == 2}", true]) - [configFile >> "CfgVoice" >> "NoVoice"]; _voiceCache = _voiceCache apply {configName _x}; // Get all insignia diff --git a/addons/arsenal/functions/fnc_sortPanel.sqf b/addons/arsenal/functions/fnc_sortPanel.sqf index f9803a429e7..e47ece9d17b 100644 --- a/addons/arsenal/functions/fnc_sortPanel.sqf +++ b/addons/arsenal/functions/fnc_sortPanel.sqf @@ -155,6 +155,7 @@ private _for = if (_right) then { for "_i" from 0 to (lbSize _panel) - 1 }; +//IGNORE_PRIVATE_WARNING ["_i"]; _for do { // Get item _item = if (_right) then { diff --git a/addons/arsenal/functions/fnc_statTextStatement_load.sqf b/addons/arsenal/functions/fnc_statTextStatement_load.sqf index 032019f5825..a7a132b1844 100644 --- a/addons/arsenal/functions/fnc_statTextStatement_load.sqf +++ b/addons/arsenal/functions/fnc_statTextStatement_load.sqf @@ -17,7 +17,7 @@ params ["_stats", "_config"]; TRACE_2("statTextStatement_load",_stats,_config); if (!isNull (_config >> "ItemInfo" >> "containerClass")) then { // Uniform/Vest - _config = configfile >> "CfgVehicles" >> getText (_config >> "ItemInfo" >> "containerClass"); + _config = configFile >> "CfgVehicles" >> getText (_config >> "ItemInfo" >> "containerClass"); }; private _load = getNumber (_config >> (_stats # 0)); diff --git a/addons/arsenal/ui/RscAttributes.hpp b/addons/arsenal/ui/RscAttributes.hpp index dc70caa0c27..b487cffd617 100644 --- a/addons/arsenal/ui/RscAttributes.hpp +++ b/addons/arsenal/ui/RscAttributes.hpp @@ -15,14 +15,14 @@ class GVAR(display) { class ControlsBackground { class blackLeft: ctrlStatic { colorBackground[] = {0,0,0,1}; - x = QUOTE(safezoneXAbs); - y = QUOTE(safezoneY); - w = QUOTE(safezoneXAbs - safezoneX); - h = QUOTE(safezoneH); + x = QUOTE(safeZoneXAbs); + y = QUOTE(safeZoneY); + w = QUOTE(safeZoneXAbs - safeZoneX); + h = QUOTE(safeZoneH); }; class blackRight: blackLeft { - x = QUOTE(safezoneX + safezoneW); + x = QUOTE(safeZoneX + safeZoneW); }; class mouseArea: ctrlStatic { @@ -31,10 +31,10 @@ class GVAR(display) { onMouseMoving = QUOTE([ARR_3('onMouseMoving',_this,GVAR(display))] call FUNC(handleMouse)); onMouseHolding = QUOTE([ARR_3('onMouseHolding',_this,GVAR(display))] call FUNC(handleMouse)); onMouseZChanged = QUOTE([ARR_3('onMouseZChanged',_this,GVAR(display))] call FUNC(handleScrollWheel)); - x = QUOTE(safezoneX); - y = QUOTE(safezoneY); - w = QUOTE(safezoneW); - h = QUOTE(safezoneH); + x = QUOTE(safeZoneX); + y = QUOTE(safeZoneY); + w = QUOTE(safeZoneW); + h = QUOTE(safeZoneH); }; }; class controls { @@ -58,34 +58,34 @@ class GVAR(display) { }; class blockLeftFrame: RscFrame { idc = IDC_blockLeftFrame; - x = QUOTE(safezoneX + 13 * GRID_W); - y = QUOTE(safezoneY + 14 * GRID_H); + x = QUOTE(safeZoneX + 13 * GRID_W); + y = QUOTE(safeZoneY + 14 * GRID_H); w = QUOTE(80 * GRID_W); - h = QUOTE(safezoneH - 24 * GRID_H); + h = QUOTE(safeZoneH - 24 * GRID_H); colorText[] = {0,0,0,1}; }; class blockLeftBackground: ctrlStaticBackground { idc = IDC_blockLeftBackground; - x = QUOTE(safezoneX + 13 * GRID_W); - y = QUOTE(safezoneY + 14 * GRID_H); + x = QUOTE(safeZoneX + 13 * GRID_W); + y = QUOTE(safeZoneY + 14 * GRID_H); w = QUOTE(80 * GRID_W); - h = QUOTE(safezoneH - 24 * GRID_H); + h = QUOTE(safeZoneH - 24 * GRID_H); colorBackground[] = {0,0,0,0.5}; }; class blockRightFrame: blockLeftFrame { idc = IDC_blockRightFrame; - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); - h = QUOTE(safezoneH - 34 * GRID_H); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); + h = QUOTE(safeZoneH - 34 * GRID_H); }; class blockRighttBackground: blockLeftBackground { idc = IDC_blockRighttBackground; - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); - h = QUOTE(safezoneH - 34 * GRID_H); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); + h = QUOTE(safeZoneH - 34 * GRID_H); }; class loadIndicator: RscControlsGroupNoScrollbars { idc = IDC_loadIndicator; - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); - y = QUOTE(safeZoneH + safezoneY - 20 * GRID_H); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); + y = QUOTE(safeZoneH + safeZoneY - 20 * GRID_H); w = QUOTE(80 * GRID_W); h = QUOTE(6 * GRID_H); class controls { @@ -112,8 +112,8 @@ class GVAR(display) { }; class totalWeight: RscControlsGroupNoScrollbars { idc = IDC_totalWeight; - x = QUOTE(safezoneX + 13 * GRID_W); - y = QUOTE(safeZoneH + safezoneY - 10 * GRID_H); + x = QUOTE(safeZoneX + 13 * GRID_W); + y = QUOTE(safeZoneH + safeZoneY - 10 * GRID_H); w = QUOTE(80 * GRID_W); h = QUOTE(8 * GRID_H); class controls { @@ -154,7 +154,7 @@ class GVAR(display) { colorBackground[] = {0,0,0,0.69999999}; text = ""; x = QUOTE(0.5 - WIDTH_TOTAL / 2); - y = QUOTE(safeZoneH + safezoneY - 25 * GRID_H); + y = QUOTE(safeZoneH + safeZoneY - 25 * GRID_H); w = QUOTE(WIDTH_TOTAL); h = QUOTE(10 * GRID_H); sizeEx = QUOTE(5 * GRID_H); @@ -162,7 +162,7 @@ class GVAR(display) { class menuBar: RscControlsGroupNoScrollbars { idc = IDC_menuBar; x = QUOTE(0.5 - WIDTH_TOTAL / 2); - y = QUOTE(safezoneH + safezoneY - 9 * GRID_H); + y = QUOTE(safeZoneH + safeZoneY - 9 * GRID_H); w = QUOTE(WIDTH_TOTAL); h = QUOTE(7 * GRID_H); class controls { @@ -223,8 +223,8 @@ class GVAR(display) { class infoBox: RscControlsGroupNoScrollbars { idc = IDC_infoBox; fade = 1; - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); - y = QUOTE(safeZoneH + safezoneY - 14 * GRID_H); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); + y = QUOTE(safeZoneH + safeZoneY - 14 * GRID_H); w = QUOTE(92 * GRID_W); h = QUOTE(12 * GRID_H); class controls { @@ -278,12 +278,12 @@ class GVAR(display) { class statsBox: RscControlsGroupNoScrollbars { idc = IDC_statsBox; x = QUOTE((0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP); - y = QUOTE(safezoneY + 1.8 * GRID_H); + y = QUOTE(safeZoneY + 1.8 * GRID_H); w = QUOTE(47 * GRID_W); h = QUOTE(55 * GRID_H); class controls { class statsStaticBackground1: ctrlStaticBackground { - idc = -1; + idc = IDC_statsBoxBackground; x = QUOTE(0); y = QUOTE(0); w = QUOTE(47 * GRID_W); @@ -291,7 +291,7 @@ class GVAR(display) { colorBackground[] = {0.1,0.1,0.1,0.5}; }; class statsStaticBackground2: ctrlStaticBackground { - idc = -1; + idc = IDC_statsBoxTitleBackground; x = QUOTE(0); y = QUOTE(0); w = QUOTE(47 * GRID_W); @@ -316,7 +316,7 @@ class GVAR(display) { x = QUOTE(1 * GRID_W); y = QUOTE(10 * GRID_H); w = QUOTE(45 * GRID_W); - h = QUOTE(4 * GRID_H); + h = QUOTE(5 * GRID_H); colorBackground[] = {1,1,1,0.15}; }; class statsBar1: ctrlProgress { @@ -329,9 +329,9 @@ class GVAR(display) { x = QUOTE(1 * GRID_W); y = QUOTE(10 * GRID_H); w = QUOTE(45 * GRID_W); - h = QUOTE(4 * GRID_H); + h = QUOTE(5 * GRID_H); }; - class statsText1: RscText { + class statsText1: RscTextMulti { idc = IDC_statsText1; shadow = 0; fade = 1; @@ -340,7 +340,7 @@ class GVAR(display) { x = QUOTE(0 * GRID_W); y = QUOTE(10 * GRID_H); w = QUOTE(45 * GRID_W); - h = QUOTE(4 * GRID_H); + h = QUOTE(5 * GRID_H); sizeEx = QUOTE(5 * GRID_H); text = ""; }; @@ -419,7 +419,7 @@ class GVAR(display) { colorBackgroundDisabled[] = {0,0,0,0}; onButtonClick = QUOTE([ARR_2(QQGVAR(statsChangePage),[ARR_3(ctrlParent (_this select 0),_this select 0,false)])] call CBA_fnc_localEvent); x = QUOTE((0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP); - y = QUOTE(safezoneY + 1.8 * GRID_H); + y = QUOTE(safeZoneY + 1.8 * GRID_H); w = QUOTE(5 * GRID_W); h = QUOTE(5 * GRID_H); sizeEx = QUOTE(5.5 * GRID_H); @@ -434,7 +434,7 @@ class GVAR(display) { idc = IDC_statsCurrentPage; style = ST_CENTER; x = QUOTE((0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP + 5 * GRID_W); - y = QUOTE(safezoneY + 1.8 * GRID_H); + y = QUOTE(safeZoneY + 1.8 * GRID_H); w = QUOTE(37 * GRID_W); h = QUOTE(5 * GRID_H); colorBackground[] = {0,0,0,0}; @@ -445,7 +445,7 @@ class GVAR(display) { class actionsBox: RscControlsGroupNoScrollbars { idc = IDC_actionsBox; x = QUOTE((0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP); - y = QUOTE(safezoneY + 58.6 * GRID_H); + y = QUOTE(safeZoneY + 58.6 * GRID_H); w = QUOTE(47 * GRID_W); h = QUOTE(55 * GRID_H); class controls { @@ -482,7 +482,7 @@ class GVAR(display) { x = QUOTE(1 * GRID_W); y = QUOTE(6 * GRID_H); w = QUOTE(45 * GRID_W); - h = QUOTE(4 * GRID_H); + h = QUOTE(5 * GRID_H); }; class actionsText2: actionsText1 { idc = IDC_actionsText2; @@ -550,10 +550,10 @@ class GVAR(display) { class mouseBlock: RscText { idc = IDC_mouseBlock; style = 16; - x = QUOTE(safezoneX); - y = QUOTE(safezoneY); - w = QUOTE(safezoneW); - h = QUOTE(safezoneH); + x = QUOTE(safeZoneX); + y = QUOTE(safeZoneY); + w = QUOTE(safeZoneW); + h = QUOTE(safeZoneH); }; class leftTabContent: RscListBox { idc = IDC_leftTabContent; @@ -569,10 +569,10 @@ class GVAR(display) { onLBDblClick = QUOTE(_this call FUNC(onPanelDblClick)); onSetFocus = QUOTE(GVAR(leftTabFocus) = true); onKillFocus = QUOTE(GVAR(leftTabFocus) = false); - x = QUOTE(safezoneX + 13 * GRID_W); - y = QUOTE(safezoneY + 14 * GRID_H); + x = QUOTE(safeZoneX + 13 * GRID_W); + y = QUOTE(safeZoneY + 14 * GRID_H); w = QUOTE(80 * GRID_W); - h = QUOTE(safezoneH - 24.5 * GRID_H); + h = QUOTE(safeZoneH - 24.5 * GRID_H); sizeEx = QUOTE(7 * GRID_H); }; class rightTabContent: leftTabContent { @@ -583,8 +583,8 @@ class GVAR(display) { onLBDblClick = QUOTE(_this call FUNC(onPanelDblClick)); onSetFocus = QUOTE(GVAR(rightTabFocus) = true); onKillFocus = QUOTE(GVAR(rightTabFocus) = false); - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); - h = QUOTE(safezoneH - 28 * GRID_H); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); + h = QUOTE(safeZoneH - 28 * GRID_H); }; class rightTabContentListnBox: RscListNBox { idc = IDC_rightTabContentListnBox; @@ -605,16 +605,16 @@ class GVAR(display) { onLBDblClick = QUOTE(_this call FUNC(onPanelDblClick)); onSetFocus = QUOTE(GVAR(rightTabLnBFocus) = true); onKillFocus = QUOTE(GVAR(rightTabLnBFocus) = false); - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); - y = QUOTE(safezoneY + 14 * GRID_H); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); + y = QUOTE(safeZoneY + 14 * GRID_H); w = QUOTE(80 * GRID_W); - h = QUOTE(safezoneH - 34 * GRID_H); + h = QUOTE(safeZoneH - 34 * GRID_H); sizeEx = QUOTE(7 * GRID_H); }; class sortLeftTab: RscCombo { idc = IDC_sortLeftTab; - x = QUOTE(safezoneX + 13 * GRID_W); - y = QUOTE(safezoneY + 8 * GRID_H); + x = QUOTE(safeZoneX + 13 * GRID_W); + y = QUOTE(safeZoneY + 8 * GRID_H); w = QUOTE(40 * GRID_W); h = QUOTE(6 * GRID_H); onLBSelChanged = QUOTE(_this call FUNC(sortPanel)); @@ -622,16 +622,16 @@ class GVAR(display) { }; class sortLeftTabDirection: sortLeftTab { idc = IDC_sortLeftTabDirection; - x = QUOTE(safezoneX + 53 * GRID_W); + x = QUOTE(safeZoneX + 53 * GRID_W); w = QUOTE(40 * GRID_W); }; class sortRightTab: sortLeftTab { idc = IDC_sortRightTab; - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); }; class sortRightTabDirection: sortLeftTabDirection { idc = IDC_sortRightTabDirection; - x = QUOTE(safezoneX + safezoneW - 53 * GRID_W); + x = QUOTE(safeZoneX + safeZoneW - 53 * GRID_W); }; class leftSearchbar: ctrlEdit { idc = IDC_leftSearchbar; @@ -639,8 +639,8 @@ class GVAR(display) { onKillFocus = QUOTE(GVAR(leftSearchbarFocus) = false); onMouseButtonClick = QUOTE([ARR_3(ctrlParent (_this select 0),_this select 0,_this select 1)] call FUNC(clearSearchbar)); onEditChanged = QUOTE(call FUNC(handleSearchInputChanged)); - x = QUOTE(safezoneX + 13 * GRID_W); - y = QUOTE(safezoneY + 1.8 * GRID_H); + x = QUOTE(safeZoneX + 13 * GRID_W); + y = QUOTE(safeZoneY + 1.8 * GRID_H); w = QUOTE(74 * GRID_W); h = QUOTE(6 * GRID_H); sizeEx = QUOTE(6 * GRID_H); @@ -652,8 +652,8 @@ class GVAR(display) { colorBackground[] = {0,0,0,0.5}; onButtonClick = QUOTE([ARR_2(ctrlParent (_this select 0),ctrlParent (_this select 0) displayCtrl IDC_leftSearchbar)] call FUNC(handleSearchbar)); onMouseButtonDown = QUOTE(call FUNC(handleSearchModeToggle)); - x = QUOTE(safezoneX + 87 * GRID_W); - y = QUOTE(safezoneY + 1.8 * GRID_H); + x = QUOTE(safeZoneX + 87 * GRID_W); + y = QUOTE(safeZoneY + 1.8 * GRID_H); w = QUOTE(6 * GRID_W); h = QUOTE(6 * GRID_H); }; @@ -661,17 +661,17 @@ class GVAR(display) { idc = IDC_rightSearchbar; onSetFocus = QUOTE(GVAR(rightSearchbarFocus) = true); onKillFocus = QUOTE(GVAR(rightSearchbarFocus) = false); - x = QUOTE(safezoneX + safezoneW - 87 * GRID_W); + x = QUOTE(safeZoneX + safeZoneW - 87 * GRID_W); }; class rightSearchbarButton: leftSearchbarButton { idc = IDC_rightSearchbarButton; onButtonClick = QUOTE([ARR_2(ctrlParent (_this select 0),ctrlParent (_this select 0) displayCtrl IDC_rightSearchbar)] call FUNC(handleSearchbar)); - x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); + x = QUOTE(safeZoneX + safeZoneW - 93 * GRID_W); }; class tabLeft: RscControlsGroupNoScrollbars { idc = IDC_tabLeft; - x = QUOTE(safezoneX + 1 * GRID_W); - y = QUOTE(safezoneY + 8 * GRID_H); + x = QUOTE(safeZoneX + 1 * GRID_W); + y = QUOTE(safeZoneY + 8 * GRID_H); w = QUOTE(12 * GRID_W); h = QUOTE(200 * GRID_H); class controls { @@ -873,8 +873,8 @@ class GVAR(display) { colorBackground[] = {0,0,0,1}; fade = 1; enable = 0; - x = QUOTE(safezoneW + safezoneX - 13 * GRID_W); - y = QUOTE(safezoneY + 8 * GRID_H); + x = QUOTE(safeZoneW + safeZoneX - 13 * GRID_W); + y = QUOTE(safeZoneY + 8 * GRID_H); w = QUOTE(12 * GRID_W); h = QUOTE(9 * GRID_H); }; @@ -884,110 +884,110 @@ class GVAR(display) { text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemOptic_ca.paa"; onButtonClick = QUOTE([ARR_2(ctrlParent (_this select 0),_this select 0)] call FUNC(fillRightPanel)); colorBackground[] = {0,0,0,0.5}; - x = QUOTE(safezoneW + safezoneX - 10 * GRID_W); - y = QUOTE(safezoneY + 8 * GRID_H); + x = QUOTE(safeZoneW + safeZoneX - 10 * GRID_W); + y = QUOTE(safeZoneY + 8 * GRID_H); w = QUOTE(9 * GRID_W); h = QUOTE(9 * GRID_H); }; class iconBackgroundItemAcc: iconBackgroundOptic { idc = IDC_iconBackgroundItemAcc; - y = QUOTE(safezoneY + 18 * GRID_H); + y = QUOTE(safeZoneY + 18 * GRID_H); }; class buttonItemAcc: buttonOptic { idc = IDC_buttonItemAcc; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemAcc_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_ItemAcc"; - y = QUOTE(safezoneY + 18 * GRID_H); + y = QUOTE(safeZoneY + 18 * GRID_H); }; class iconBackgroundMuzzle: iconBackgroundOptic { idc = IDC_iconBackgroundMuzzle; - y = QUOTE(safezoneY + 28 * GRID_H); + y = QUOTE(safeZoneY + 28 * GRID_H); }; class buttonMuzzle: buttonOptic { idc = IDC_buttonMuzzle; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemMuzzle_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_ItemMuzzle"; - y = QUOTE(safezoneY + 28 * GRID_H); + y = QUOTE(safeZoneY + 28 * GRID_H); }; class iconBackgroundBipod: iconBackgroundOptic { idc = IDC_iconBackgroundBipod; - y = QUOTE(safezoneY + 38 * GRID_H); + y = QUOTE(safeZoneY + 38 * GRID_H); }; class buttonBipod: buttonOptic { idc = IDC_buttonBipod; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemBipod_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_ItemBipod"; - y = QUOTE(safezoneY + 38 * GRID_H); + y = QUOTE(safeZoneY + 38 * GRID_H); }; class iconBackgroundCurrentMag: iconBackgroundOptic { idc = IDC_iconBackgroundCurrentMag; - y = QUOTE(safezoneY + 48 * GRID_H); + y = QUOTE(safeZoneY + 48 * GRID_H); }; class buttonCurrentMag: buttonOptic { idc = IDC_buttonCurrentMag; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMag_ca.paa"; tooltip = CSTRING(buttonCurrentMagTooltip); - y = QUOTE(safezoneY + 48 * GRID_H); + y = QUOTE(safeZoneY + 48 * GRID_H); }; class iconBackgroundCurrentMag2: iconBackgroundOptic { idc = IDC_iconBackgroundCurrentMag2; - y = QUOTE(safezoneY + 58 * GRID_H); + y = QUOTE(safeZoneY + 58 * GRID_H); }; class buttonCurrentMag2: buttonOptic { idc = IDC_buttonCurrentMag2; text = QPATHTOF(data\iconSecondaryMuzzle); tooltip = CSTRING(buttonCurrentMag2Tooltip); - y = QUOTE(safezoneY + 58 * GRID_H); + y = QUOTE(safeZoneY + 58 * GRID_H); }; class iconBackgroundMag: iconBackgroundOptic { idc = IDC_iconBackgroundMag; - y = QUOTE(safezoneY + 48 * GRID_H); + y = QUOTE(safeZoneY + 48 * GRID_H); }; class buttonMag: buttonOptic { idc = IDC_buttonMag; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMag_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_CargoMag"; - y = QUOTE(safezoneY + 48 * GRID_H); + y = QUOTE(safeZoneY + 48 * GRID_H); }; class iconBackgroundMagALL: iconBackgroundOptic { idc = IDC_iconBackgroundMagALL; - y = QUOTE(safezoneY + 58 * GRID_H); + y = QUOTE(safeZoneY + 58 * GRID_H); }; class buttonMagALL: buttonOptic { idc = IDC_buttonMagALL; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMagAll_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_CargoMagAll"; - y = QUOTE(safezoneY + 58 * GRID_H); + y = QUOTE(safeZoneY + 58 * GRID_H); }; class iconBackgroundThrow: iconBackgroundOptic { idc = IDC_iconBackgroundThrow; - y = QUOTE(safezoneY + 68 * GRID_H); + y = QUOTE(safeZoneY + 68 * GRID_H); }; class buttonThrow: buttonOptic { idc = IDC_buttonThrow; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoThrow_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_CargoThrow"; - y = QUOTE(safezoneY + 68 * GRID_H); + y = QUOTE(safeZoneY + 68 * GRID_H); }; class iconBackgroundPut: iconBackgroundOptic { idc = IDC_iconBackgroundPut; - y = QUOTE(safezoneY + 78 * GRID_H); + y = QUOTE(safeZoneY + 78 * GRID_H); }; class buttonPut: buttonOptic { idc = IDC_buttonPut; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoPut_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_CargoPut"; - y = QUOTE(safezoneY + 78 * GRID_H); + y = QUOTE(safeZoneY + 78 * GRID_H); }; class iconBackgroundMisc: iconBackgroundOptic { idc = IDC_iconBackgroundMisc; - y = QUOTE(safezoneY + 88 * GRID_H); + y = QUOTE(safeZoneY + 88 * GRID_H); }; class buttonMisc: buttonOptic { idc = IDC_buttonMisc; text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMisc_ca.paa"; tooltip = "$STR_A3_RscDisplayArsenal_tab_CargoMisc"; - y = QUOTE(safezoneY + 88 * GRID_H); + y = QUOTE(safeZoneY + 88 * GRID_H); }; class buttonRemoveAll: ctrlButtonPicture { @@ -998,8 +998,8 @@ class GVAR(display) { onButtonClick = QUOTE(ctrlParent (_this select 0) call FUNC(buttonClearAll)); fade = 1; enable = 0; - x = QUOTE(safezoneW + safezoneX - 11 * GRID_W); - y = QUOTE(safeZoneH + safezoneY - 29 * GRID_H); + x = QUOTE(safeZoneW + safeZoneX - 11 * GRID_W); + y = QUOTE(safeZoneH + safeZoneY - 29 * GRID_H); w = QUOTE(9 * GRID_W); h = QUOTE(9 * GRID_H); }; @@ -1013,17 +1013,17 @@ class GVAR(loadoutsDisplay) { class controls { class centerBox: ctrlControlsGroupNoScrollbars { idc = IDC_centerBox; - x = QUOTE(safezoneW + safezoneX - (180 * GRID_W)); - y = QUOTE(safezoneY + (5 * GRID_H)); + x = QUOTE(safeZoneW + safeZoneX - (180 * GRID_W)); + y = QUOTE(safeZoneY + (5 * GRID_H)); w = QUOTE(160 * GRID_W); - h = QUOTE(safezoneH - (34 * GRID_H)); + h = QUOTE(safeZoneH - (34 * GRID_H)); class controls { class centerFrame: RscFrame { idc = -1; x = QUOTE(0 * GRID_W); y = QUOTE(0 * GRID_H); w = QUOTE(160 * GRID_W); - h = QUOTE(safezoneH - (45 * GRID_H)); + h = QUOTE(safeZoneH - (45 * GRID_H)); colorText[] = {0,0,0,1}; }; class centerBackground: ctrlStaticBackground { @@ -1031,7 +1031,7 @@ class GVAR(loadoutsDisplay) { x = QUOTE(0); y = QUOTE(0); w = QUOTE(160 * GRID_W); - h = QUOTE(safezoneH - (45 * GRID_H)); + h = QUOTE(safeZoneH - (45 * GRID_H)); colorBackground[] = {0.13,0.13,0.13,0.9}; }; class centerTitle: ctrlStaticTitle { @@ -1056,14 +1056,14 @@ class GVAR(loadoutsDisplay) { x = QUOTE(0); y = QUOTE(5 * GRID_H); w = QUOTE(160 * GRID_W); - h = QUOTE(safezoneH - (57 * GRID_H)); + h = QUOTE(safeZoneH - (57 * GRID_H)); sizeEx = QUOTE(7 * GRID_H); }; class textTitle: RscText { idc = -1; text = "$STR_DISP_GAME_NAME"; x = QUOTE(0 * GRID_W); - y = QUOTE(safezoneH - (51 * GRID_H)); + y = QUOTE(safeZoneH - (51 * GRID_H)); w = QUOTE(15 * GRID_W); h = QUOTE(5 * GRID_H); sizeEx = QUOTE(5 * GRID_H); @@ -1072,7 +1072,7 @@ class GVAR(loadoutsDisplay) { class textEditBox: ctrlEdit { idc = IDC_textEditBox; x = QUOTE(15 * GRID_W); - y = QUOTE(safezoneH - (51 * GRID_H)); + y = QUOTE(safeZoneH - (51 * GRID_H)); w = QUOTE(65 * GRID_W); h = QUOTE(5 * GRID_H); sizeEx = QUOTE(6 * GRID_H); @@ -1083,7 +1083,7 @@ class GVAR(loadoutsDisplay) { onKillFocus = QUOTE(GVAR(loadoutsSearchbarFocus) = false); onMouseButtonClick = QUOTE([ARR_3(ctrlParent (_this select 0),_this select 0,_this select 1)] call FUNC(clearSearchbar)); x = QUOTE(83 * GRID_W); - y = QUOTE(safezoneH - (51 * GRID_H)); + y = QUOTE(safeZoneH - (51 * GRID_H)); w = QUOTE(72 * GRID_W); h = QUOTE(5 * GRID_H); sizeEx = QUOTE(6 * GRID_H); @@ -1094,14 +1094,14 @@ class GVAR(loadoutsDisplay) { colorBackground[] = {0,0,0,0.5}; onButtonClick = QUOTE([ARR_2(ctrlParent (_this select 0),ctrlParent (_this select 0) displayCtrl IDC_loadoutsSearchbar)] call FUNC(handleLoadoutsSearchbar)); x = QUOTE(155 * GRID_W); - y = QUOTE(safezoneH - (51 * GRID_H)); + y = QUOTE(safeZoneH - (51 * GRID_H)); w = QUOTE(5 * GRID_W); h = QUOTE(5 * GRID_H); }; class buttonSave: ctrlButton { idc = IDC_buttonSave; x = QUOTE(0 * GRID_W); - y = QUOTE(safezoneH - (44 * GRID_H)); + y = QUOTE(safeZoneH - (44 * GRID_H)); w = QUOTE(30 * GRID_W); h = QUOTE(10 * GRID_H); text = CSTRING(buttonSaveText); @@ -1143,8 +1143,8 @@ class GVAR(loadoutsDisplay) { }; class buttonClose: ctrlButton { idc = -1; - x = QUOTE(safezoneW + safezoneX - 32 * GRID_W); - y = QUOTE(safezoneH + safezoneY - 9 * GRID_H); + x = QUOTE(safeZoneW + safeZoneX - 32 * GRID_W); + y = QUOTE(safeZoneH + safeZoneY - 9 * GRID_H); w = QUOTE(30 * GRID_W); h = QUOTE(7 * GRID_H); sizeEx = QUOTE(5 * GRID_H); @@ -1154,8 +1154,8 @@ class GVAR(loadoutsDisplay) { }; class buttonBar: ctrlControlsGroupNoScrollbars { idc = -1; - x = QUOTE((safezoneW * 0.5) + safezoneX - (80.5 * GRID_W)); - y = QUOTE(safezoneH + safezoneY - 9 * GRID_H); + x = QUOTE((safeZoneW * 0.5) + safeZoneX - (80.5 * GRID_W)); + y = QUOTE(safeZoneH + safeZoneY - 9 * GRID_H); w = QUOTE(161 * GRID_W); h = QUOTE(7 * GRID_H); class controls { diff --git a/addons/arsenal/ui/RscCommon.hpp b/addons/arsenal/ui/RscCommon.hpp index f74326bcfb7..cb36a67aed3 100644 --- a/addons/arsenal/ui/RscCommon.hpp +++ b/addons/arsenal/ui/RscCommon.hpp @@ -86,12 +86,12 @@ #define TR_AUTOCOLLAPSE 2 // Default grid -#define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2) +#define GUI_GRID_WAbs ((safeZoneW / safeZoneH) min 1.2) #define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2) #define GUI_GRID_W (GUI_GRID_WAbs / 40) #define GUI_GRID_H (GUI_GRID_HAbs / 25) -#define GUI_GRID_X (safezoneX) -#define GUI_GRID_Y (safezoneY + safezoneH - GUI_GRID_HAbs) +#define GUI_GRID_X (safeZoneX) +#define GUI_GRID_Y (safeZoneY + safeZoneH - GUI_GRID_HAbs) // Default text sizes #define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) diff --git a/addons/arsenal/ui/RscCustomArsenalButton.hpp b/addons/arsenal/ui/RscCustomArsenalButton.hpp index 0aa077f424c..e745203e7ea 100644 --- a/addons/arsenal/ui/RscCustomArsenalButton.hpp +++ b/addons/arsenal/ui/RscCustomArsenalButton.hpp @@ -1,6 +1,6 @@ class GVAR(customArsenalButton_Button): RscButtonArsenal { - x = QUOTE(safezoneW + safezoneX - 10 * GRID_W); - y = QUOTE(safezoneY + 88 * GRID_H); + x = QUOTE(safeZoneW + safeZoneX - 10 * GRID_W); + y = QUOTE(safeZoneY + 88 * GRID_H); w = QUOTE(9 * GRID_W); h = QUOTE(9 * GRID_H); @@ -11,8 +11,8 @@ class GVAR(customArsenalButton_Button): RscButtonArsenal { }; class GVAR(customArsenalButton_Background): ctrlStaticBackground { - x = QUOTE(safezoneW + safezoneX - 13 * GRID_W); - y = QUOTE(safezoneY + 88 * GRID_H); + x = QUOTE(safeZoneW + safeZoneX - 13 * GRID_W); + y = QUOTE(safeZoneY + 88 * GRID_H); w = QUOTE(12 * GRID_W); h = QUOTE(9 * GRID_H); diff --git a/addons/artillerytables/RscRangeTable.hpp b/addons/artillerytables/RscRangeTable.hpp index ef11d7eac82..a24aa503cb5 100644 --- a/addons/artillerytables/RscRangeTable.hpp +++ b/addons/artillerytables/RscRangeTable.hpp @@ -8,16 +8,16 @@ class GVAR(rangeTableDialog) { class TableBackground: RscPicture { idc = -1; text = QPATHTOF(UI\RangeTable_background.paa); - x = "18 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "18 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "1 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "16.2634559672906 * (safeZoneH / 40)"; h = "23 * ((safeZoneH / 1.2) / 25)"; colorBackground[] = {1,1,1,1}; }; class LeftSideBackground: RscText { idc = -1; - x = "13 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "13 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "1 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "5 * (safeZoneH / 40)"; h = "23 * ((safeZoneH / 1.2) / 25)"; colorBackground[] = {0,0,0,0.8}; @@ -26,8 +26,8 @@ class GVAR(rangeTableDialog) { class controls { class TheTable: RscListNBox { idc = IDC_TABLE; - x = "18 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "3.76 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "18 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "3.76 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "16.2634559672906 * (safeZoneH / 40)"; h = "20.24 * ((safeZoneH / 1.2) / 25)"; columns[] = {"10/867", "86/867", "171/867", "238/867", "320/867", "405/867", "485/867", "546/867", "607/867", "668/867", "729/867", "790/867"}; @@ -48,8 +48,8 @@ class GVAR(rangeTableDialog) { }; class ChargeListBox: RscListBox { idc = IDC_CHARGELIST; - x = "13 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "2 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "13 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "2 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "5 * (safeZoneH / 40)"; h = "22 * ((safeZoneH / 1.2) / 25)"; onLBSelChanged = QUOTE([] call FUNC(rangeTableUpdate)); @@ -58,8 +58,8 @@ class GVAR(rangeTableDialog) { idc = IDC_BUTTON_ELEV_HIGH; text = "High"; onButtonClick = QUOTE([true] call FUNC(rangeTableUpdate)); - x = "13.1 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "1.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "13.1 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "1.1 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "2.3 * (safeZoneH / 40)"; h = "0.8 * ((safeZoneH / 1.2) / 25)"; }; @@ -67,12 +67,12 @@ class GVAR(rangeTableDialog) { idc = IDC_BUTTON_ELEV_LOW; text = "Low"; onButtonClick = QUOTE([false] call FUNC(rangeTableUpdate)); - x = "15.6 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; + x = "15.6 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; }; class CloseBackground: RscText { idc = -1; - x = "33.7634559672906 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "33.7634559672906 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "1 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "0.5 * (safeZoneH / 40)"; h = "0.5 * ((safeZoneH / 1.2) / 25)"; colorBackground[] = {0,0,0,0.5}; @@ -82,8 +82,8 @@ class GVAR(rangeTableDialog) { style = 48; color[] = {1,1,1,0.7}; text = "A3\Ui_f\data\GUI\Rsc\RscDisplayArcadeMap\icon_exit_cross_ca.paa"; - x = "33.7634559672906 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH) / 2)"; - y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2)) / 2)"; + x = "33.7634559672906 *(safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH) / 2)"; + y = "1 * ((safeZoneH / 1.2) / 25) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2)) / 2)"; w = "0.5 * (safeZoneH / 40)"; h = "0.5 * ((safeZoneH / 1.2) / 25)"; colorText[] = {1,1,1,0.7}; diff --git a/addons/artillerytables/RscTitles.hpp b/addons/artillerytables/RscTitles.hpp index c26f302a00f..e0c4cc34495 100644 --- a/addons/artillerytables/RscTitles.hpp +++ b/addons/artillerytables/RscTitles.hpp @@ -9,10 +9,10 @@ class RscTitles { class controls { class ModeControlGroup: RscControlsGroupNoScrollbars { idc = IDC_MODECONTROLGROUP; - x = "3.8 * (((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable ['IGUI_GRID_WEAPON_X',((safezoneX + safezoneW) - (10 * (((safezoneW / safezoneH) min 1.2) / 40)) - 4.3 * (((safezoneW / safezoneH) min 1.2) / 40))])"; - y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getVariable ['IGUI_GRID_WEAPON_Y', (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])"; - w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "3.8 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (profilenamespace getvariable ['IGUI_GRID_WEAPON_X',((safeZoneX + safeZoneW) - (10 * (((safeZoneW / safeZoneH) min 1.2) / 40)) - 4.3 * (((safeZoneW / safeZoneH) min 1.2) / 40))])"; + y = "2.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (profilenamespace getVariable ['IGUI_GRID_WEAPON_Y', (safeZoneY + 0.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25))])"; + w = "10 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; class controls { class Charge: RscText { @@ -21,18 +21,18 @@ class RscTitles { colorBackground[] = {0, 0, 0, 0}; x = "0"; y = "0"; - w = "(2) * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "(2) * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + sizeEx = "0.8 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; class Azimuth: Charge { idc = IDC_AZIMUTH; - x = "(2) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "(3) * (((safezoneW / safezoneH) min 1.2) / 40)"; + x = "(2) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + w = "(3) * (((safeZoneW / safeZoneH) min 1.2) / 40)"; }; class Elevation: Azimuth { idc = IDC_ELEVATION; - x = "(5) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "(5) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; }; }; diff --git a/addons/artillerytables/dev/showShotInfo.inc.sqf b/addons/artillerytables/dev/showShotInfo.inc.sqf index ac99acbdc16..6945e95ba0b 100644 --- a/addons/artillerytables/dev/showShotInfo.inc.sqf +++ b/addons/artillerytables/dev/showShotInfo.inc.sqf @@ -35,7 +35,7 @@ INFO("showing shot info"); private _diff = _lastPos vectorDiff _shootPos; _mkrB setMarkerText format ["%1", _diff apply {round _x}]; - private _dist2d = _shootPos distance2d _lastPos; + private _dist2d = _shootPos distance2D _lastPos; private _dir = _shootPos getDir _lastPos; private _height = (_lastPos select 2) - (_shootPos select 2); _mkrB setMarkerText format ["Dist: %1m Az: %2[%3] Height:%4", _dist2d toFixed 0, _dir toFixed 2, ((6400 / 360) * _dir) toFixed 0, _height toFixed 0]; diff --git a/addons/artillerytables/functions/fnc_adjustFire.sqf b/addons/artillerytables/functions/fnc_adjustFire.sqf index 96c884880da..1e07c5ca212 100644 --- a/addons/artillerytables/functions/fnc_adjustFire.sqf +++ b/addons/artillerytables/functions/fnc_adjustFire.sqf @@ -36,6 +36,6 @@ params ["_gunPos", "_targetPos", "_adjustEast", "_adjustNorth", "_adjustUp", "_m private _resultPos = [_adjustEast + _targetPos select 0, _adjustNorth + _targetPos select 1, _adjustUp + _targetPos select 2]; -private _returns = ["_gunPos", "_resultPos", "_muzzleVelocity", "_highAngle", "_airFriction", "_temperature", "_airDensity", "_windDir", "_windSpeed"] call FUNC(calculateSolution); +private _returns = [_gunPos, _resultPos, _muzzleVelocity, _highAngle, _airFriction, _temperature, _airDensity, _windDir, _windSpeed] call FUNC(calculateSolution); _returns diff --git a/addons/artillerytables/functions/fnc_calculateElevation.sqf b/addons/artillerytables/functions/fnc_calculateElevation.sqf index f37ddaad923..977253eff93 100644 --- a/addons/artillerytables/functions/fnc_calculateElevation.sqf +++ b/addons/artillerytables/functions/fnc_calculateElevation.sqf @@ -32,7 +32,7 @@ params ["_targetDistance", "_targetHeight", "_muzzleVelocity", ["_highArc", true //MK6_82mm_AIR_FRICTION == -0.0001 if (_airFriction != 0) then { - _muzzleVelocity = [_muzzleVelocity, _temperature, _atmosphericDensity] call FUNC(calculateMuzzleVelocity); + _muzzleVelocity = [_muzzleVelocity, _temperature, _airDensity] call FUNC(calculateMuzzleVelocity); }; private _maxResults = [_muzzleVelocity, _airFriction] call FUNC(calculateMaxAngle); diff --git a/addons/artillerytables/functions/fnc_calculateMaxAngle.sqf b/addons/artillerytables/functions/fnc_calculateMaxAngle.sqf index 62d3cc91a23..9866ec4b28e 100644 --- a/addons/artillerytables/functions/fnc_calculateMaxAngle.sqf +++ b/addons/artillerytables/functions/fnc_calculateMaxAngle.sqf @@ -24,8 +24,5 @@ TRACE_2("callExtension:artillery:find_max_angle",_muzzleVelocity,_airFriction); "ace" callExtension ["artillery:find_max_angle", [_muzzleVelocity, _airFriction]] ) params ["_data", "_code"]; TRACE_1("",_code); -(parseSimpleArray _data) params ["_bestAngle", "_bestDistance", ""]; -_returns = [deg _bestAngle * 6400 / 360, _bestDistance]; -_returns params ["_bestAngle", "_bestDistance"]; - -_returns +(parseSimpleArray _data) params ["_bestAngle", "_bestDistance"]; +[deg _bestAngle * 6400 / 360, _bestDistance] // return diff --git a/addons/artillerytables/functions/fnc_interactMenuOpened.sqf b/addons/artillerytables/functions/fnc_interactMenuOpened.sqf index 4ba6342fc83..676c8cd8f2f 100644 --- a/addons/artillerytables/functions/fnc_interactMenuOpened.sqf +++ b/addons/artillerytables/functions/fnc_interactMenuOpened.sqf @@ -95,7 +95,6 @@ TRACE_2("searching for new vehicles",_vehicleAdded,_rangeTablesShown); [FUNC(rangeTableOpen), _info] call CBA_fnc_execNextFrame; // delay a frame because of interaction menu closing dialogs }; private _condition = { - //IGNORE_PRIVATE_WARNING ["_player"]; ("ACE_artilleryTable" in (_player call EFUNC(common,uniqueItems))) && {[_player, objNull, ["notOnMap", "isNotSitting", "isNotInside"]] call EFUNC(common,canInteractWith)} }; private _displayName = format ["%1%2", getText (_vehicleCfg >> "displayName"),["","*"] select _advCorrection]; diff --git a/addons/artillerytables/functions/fnc_turretPFEH.sqf b/addons/artillerytables/functions/fnc_turretPFEH.sqf index e1964f7e41a..5e4e6c94657 100644 --- a/addons/artillerytables/functions/fnc_turretPFEH.sqf +++ b/addons/artillerytables/functions/fnc_turretPFEH.sqf @@ -43,7 +43,7 @@ BEGIN_COUNTER(pfeh); private _currentFireMode = (weaponState [_vehicle, _turret]) select 2; private _currentChargeMode = _fireModes find _currentFireMode; -private _lookVector = (AGLtoASL (positionCameraToWorld [0,0,0])) vectorFromTo (AGLtoASL (positionCameraToWorld [0,0,1])); +private _lookVector = (AGLToASL (positionCameraToWorld [0,0,0])) vectorFromTo (AGLToASL (positionCameraToWorld [0,0,1])); private _weaponDir = _vehicle weaponDirection (currentWeapon _vehicle); // Calc real azimuth/elevation @@ -51,7 +51,7 @@ private _weaponDir = _vehicle weaponDirection (currentWeapon _vehicle); private _display = uiNamespace getVariable ["ACE_dlgArtillery", displayNull]; private _useRealWeaponDir = if ((isNull (_display displayCtrl 173)) || {(_vehicle ammo (currentWeapon _vehicle)) == 0}) then { // With no ammo, distance display will be empty, but gun will still fire at wonky angle if aimed at ground - private _testSeekerPosASL = AGLtoASL (positionCameraToWorld [0,0,0]); + private _testSeekerPosASL = AGLToASL (positionCameraToWorld [0,0,0]); private _testPoint = _testSeekerPosASL vectorAdd (_lookVector vectorMultiply viewDistance); !((terrainIntersectASL [_testSeekerPosASL, _testPoint]) || {lineIntersects [_testSeekerPosASL, _testPoint, _vehicle]}); } else { @@ -84,8 +84,8 @@ private _ctrlCharge = (uiNamespace getVariable [QGVAR(display), displayNull]) di private _ctrlAzimuth = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_AZIMUTH; private _ctrlElevation = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_ELEVATION; -_ctrlAzimuth ctrlSetText Format ["AZ: %1", [DEGTOMILS * _realAzimuth, 4, 0] call CBA_fnc_formatNumber]; -_ctrlElevation ctrlSetText Format ["EL: %1", [DEGTOMILS * _realElevation, 4, 0] call CBA_fnc_formatNumber]; +_ctrlAzimuth ctrlSetText format ["AZ: %1", [DEGTOMILS * _realAzimuth, 4, 0] call CBA_fnc_formatNumber]; +_ctrlElevation ctrlSetText format ["EL: %1", [DEGTOMILS * _realElevation, 4, 0] call CBA_fnc_formatNumber]; _ctrlCharge ctrlSetText format ["CH: %1", _currentChargeMode]; // avalible for other addons (mk6) diff --git a/addons/atragmx/RscTitles.hpp b/addons/atragmx/RscTitles.hpp index 6196346c575..33b8c8036a0 100644 --- a/addons/atragmx/RscTitles.hpp +++ b/addons/atragmx/RscTitles.hpp @@ -157,8 +157,8 @@ class ATragMX_Display { SizeEX="0.025"; idc=720000; style=48; - x="0.55*safezoneW+safezoneX-0.256"; - y="0.265*safezoneH+safezoneY-0.1"; + x="0.55*safeZoneW+safeZoneX-0.256"; + y="0.265*safeZoneH+safeZoneY-0.1"; w="1.024"; h="1.024*4/3"; colorBackground[]={1,1,1,1}; @@ -167,8 +167,8 @@ class ATragMX_Display { }; class POWER: ATragMX_RscButton { idc=-1; - x="0.55*safezoneW+safezoneX+0.145"; - y="0.265*safezoneH+safezoneY+0.94"; + x="0.55*safeZoneW+safeZoneX+0.145"; + y="0.265*safeZoneH+safeZoneY+0.94"; w="0.045"; h="0.045*4/3"; colorBackground[]={0,0,0,0.0}; @@ -177,26 +177,26 @@ class ATragMX_Display { class BACK: POWER { idc=-1; w="0.06"; - x="0.55*safezoneW+safezoneX+0.3122"; + x="0.55*safeZoneW+safeZoneX+0.3122"; action=QUOTE(call FUNC(init); call FUNC(update_target_selection)); }; class WINDOWS: ATragMX_RscButton { idc=-1; - x="0.55*safezoneW+safezoneX+0.130"; - y="0.265*safezoneH+safezoneY+0.88"; + x="0.55*safeZoneW+safeZoneX+0.130"; + y="0.265*safeZoneH+safeZoneY+0.88"; w="0.035"; h="0.035*4/3"; colorBackground[]={0,0,0,0.0}; }; class OK: WINDOWS { idc=-1; - x="0.55*safezoneW+safezoneX+0.347"; - y="0.265*safezoneH+safezoneY+0.878"; + x="0.55*safeZoneW+safeZoneX+0.347"; + y="0.265*safeZoneH+safeZoneY+0.878"; }; class TOP: ATragMX_RscButton { idc=-1; - x="0.55*safezoneW+safezoneX+0.242"; - y="0.265*safezoneH+safezoneY+0.85"; + x="0.55*safeZoneW+safeZoneX+0.242"; + y="0.265*safeZoneH+safeZoneY+0.85"; w="0.03"; h="0.03"; colorBackground[]={0,0,0,0.0}; @@ -204,13 +204,13 @@ class ATragMX_Display { }; class BOTTOM: TOP { idc=-1; - y="0.265*safezoneH+safezoneY+0.955"; + y="0.265*safeZoneH+safeZoneY+0.955"; action=QUOTE(+1 call FUNC(cycle_gun_list)); }; class LEFT: ATragMX_RscButton { idc=-1; - x="0.55*safezoneW+safezoneX+0.1925"; - y="0.265*safezoneH+safezoneY+0.9"; + x="0.55*safeZoneW+safeZoneX+0.1925"; + y="0.265*safeZoneH+safeZoneY+0.9"; w="0.05"; h="0.03"; colorBackground[]={0,0,0,0}; @@ -218,50 +218,50 @@ class ATragMX_Display { }; class RIGHT: LEFT { idc=-1; - x="0.55*safezoneW+safezoneX+0.2725"; + x="0.55*safeZoneW+safeZoneX+0.2725"; action=QUOTE(((4 + GVAR(currentTarget) + 1) % 4) call FUNC(change_target_slot)); }; class TOP_LEFT: ATragMX_RscButton { idc=-1; - x="0.55*safezoneW+safezoneX+0.162"; - y="0.265*safezoneH+safezoneY+0.82"; + x="0.55*safeZoneW+safeZoneX+0.162"; + y="0.265*safeZoneH+safeZoneY+0.82"; w="0.031"; h="0.031*4/3"; colorBackground[]={0,0,0,0.0}; }; class TOP_RIGHT: TOP_LEFT { idc=-1; - x="0.55*safezoneW+safezoneX+0.315"; + x="0.55*safeZoneW+safeZoneX+0.315"; }; class TEXT_GUN_FRAME: ATragMX_RscText { idc=1001; style=64; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.25"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.25"; w="0.0925"; h="0.205"; text=""; }; class TEXT_ATMOSPHERE_FRAME: TEXT_GUN_FRAME { idc=1002; - x="0.550*safezoneW+safezoneX+0.205"; + x="0.550*safeZoneW+safeZoneX+0.205"; }; class TEXT_TARGET_FRAME: TEXT_GUN_FRAME { idc=1003; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; }; class TEXT_RESULT_FRAME: TEXT_GUN_FRAME { idc=1004; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.46"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.46"; w="0.2825"; h="0.15"; }; class TEXT_GUN_PROFILE: ATragMX_RscText { idc=1000; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.20"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.20"; w="0.18"; h="0.03"; style=ST_LEFT; @@ -271,8 +271,8 @@ class ATragMX_Display { class TEXT_D: ATragMX_RscButton { idc=600; w="0.0231"; - x="0.550*safezoneW+safezoneX+0.29"; - y="0.265*safezoneH+safezoneY+0.20"; + x="0.550*safeZoneW+safeZoneX+0.29"; + y="0.265*safeZoneH+safeZoneY+0.20"; colorText[]={0,0,0,1}; colorDisabled[]={0.8,0.8,0.8,1}; colorBackgroundDisabled[]={0,0,0,1}; @@ -282,20 +282,20 @@ class ATragMX_Display { }; class TEXT_E: TEXT_D { idc=601; - x="0.550*safezoneW+safezoneX+0.3131"; + x="0.550*safeZoneW+safeZoneX+0.3131"; text="E"; action=QUOTE(GVAR(currentUnit)=1; call FUNC(update_unit_selection)); }; class TEXT_M: TEXT_E { idc=602; - x="0.550*safezoneW+safezoneX+0.3362"; + x="0.550*safeZoneW+safeZoneX+0.3362"; text="M"; action=QUOTE(GVAR(currentUnit)=2; call FUNC(update_unit_selection)); }; class TEXT_RANGE_CARD: TEXT_D { idc=603; w="0.03"; - x="0.550*safezoneW+safezoneX+0.36"; + x="0.550*safeZoneW+safeZoneX+0.36"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="RC"; @@ -305,8 +305,8 @@ class ATragMX_Display { class TEXT_GUN: ATragMX_RscButton { idc=4000; w="0.0925"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.25"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.25"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="Gun"; @@ -315,41 +315,41 @@ class ATragMX_Display { class TEXT_BORE_HEIGHT: TEXT_GUN_PROFILE { idc=10; style=ST_LEFT; - y="0.265*safezoneH+safezoneY+0.285"; + y="0.265*safeZoneH+safeZoneY+0.285"; text="BH"; }; class TEXT_BORE_HEIGHT_OUTPUT: TEXT_BORE_HEIGHT { idc=100; style=ST_RIGHT; w="0.058"; - x="0.550*safezoneW+safezoneX+0.145"; - y="0.265*safezoneH+safezoneY+0.285"; + x="0.550*safeZoneW+safeZoneX+0.145"; + y="0.265*safeZoneH+safeZoneY+0.285"; }; class TEXT_BULLET_MASS: TEXT_BORE_HEIGHT { idc=11; style=ST_LEFT; - y="0.265*safezoneH+safezoneY+0.320"; + y="0.265*safeZoneH+safeZoneY+0.320"; text="BW"; }; class TEXT_BULLET_MASS_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT { idc=110; - y="0.265*safezoneH+safezoneY+0.320"; + y="0.265*safeZoneH+safeZoneY+0.320"; }; class TEXT_AIR_FRICTION: TEXT_BORE_HEIGHT { idc=12; - y="0.265*safezoneH+safezoneY+0.355"; + y="0.265*safeZoneH+safeZoneY+0.355"; text="C1"; }; class TEXT_AIR_FRICTION_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT { idc=120; - y="0.265*safezoneH+safezoneY+0.355"; + y="0.265*safeZoneH+safeZoneY+0.355"; }; class TEXT_MUZZLE_VELOCITY: ATragMX_RscButton { idc=13; style=0; w="0.03"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.390"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.390"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="MV"; @@ -357,69 +357,69 @@ class ATragMX_Display { }; class TEXT_MUZZLE_VELOCITY_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT { idc=130; - y="0.265*safezoneH+safezoneY+0.390"; + y="0.265*safeZoneH+safeZoneY+0.390"; }; class TEXT_ZERO_RANGE: TEXT_BORE_HEIGHT { idc=14; - y="0.265*safezoneH+safezoneY+0.425"; + y="0.265*safeZoneH+safeZoneY+0.425"; text="ZR"; }; class TEXT_ZERO_RANGE_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT { idc=140; - y="0.265*safezoneH+safezoneY+0.425"; + y="0.265*safeZoneH+safeZoneY+0.425"; }; class TEXT_ATMOSPHERE: TEXT_GUN { idc=4001; - x="0.550*safezoneW+safezoneX+0.205"; + x="0.550*safeZoneW+safeZoneX+0.205"; text="Atmsphr"; action=QUOTE(0 call FUNC(toggle_atmo_env_data)); }; class TEXT_TEMPERATURE: TEXT_BULLET_MASS { idc=20; - x="0.550*safezoneW+safezoneX+0.20"; + x="0.550*safeZoneW+safeZoneX+0.20"; text="Tmp"; }; class TEXT_TEMPERATURE_OUTPUT: TEXT_TEMPERATURE { idc=200; style=ST_RIGHT; w="0.050"; - x="0.550*safezoneW+safezoneX+0.245"; - y="0.265*safezoneH+safezoneY+0.320"; + x="0.550*safeZoneW+safeZoneX+0.245"; + y="0.265*safeZoneH+safeZoneY+0.320"; text=""; }; class TEXT_BAROMETRIC_PRESSURE: TEXT_TEMPERATURE { idc=21; - x="0.550*safezoneW+safezoneX+0.20"; - y="0.265*safezoneH+safezoneY+0.355"; + x="0.550*safeZoneW+safeZoneX+0.20"; + y="0.265*safeZoneH+safeZoneY+0.355"; text="BP"; }; class TEXT_BAROMETRIC_PRESSURE_OUTPUT: TEXT_TEMPERATURE_OUTPUT { idc=210; - y="0.265*safezoneH+safezoneY+0.355"; + y="0.265*safeZoneH+safeZoneY+0.355"; }; class TEXT_RELATIVE_HUMIDITY: TEXT_BAROMETRIC_PRESSURE { idc=22; - y="0.265*safezoneH+safezoneY+0.390"; + y="0.265*safeZoneH+safeZoneY+0.390"; text="RH"; }; class TEXT_RELATIVE_HUMIDITY_OUTPUT: TEXT_TEMPERATURE_OUTPUT { idc=220; - y="0.265*safezoneH+safezoneY+0.390"; + y="0.265*safeZoneH+safeZoneY+0.390"; }; class TEXT_ALTITUDE: TEXT_BORE_HEIGHT { idc=23; - x="0.550*safezoneW+safezoneX+0.20"; + x="0.550*safeZoneW+safeZoneX+0.20"; text="Alt"; }; class TEXT_ALTITUDE_OUTPUT: TEXT_TEMPERATURE_OUTPUT { idc=230; - y="0.265*safezoneH+safezoneY+0.285"; + y="0.265*safeZoneH+safeZoneY+0.285"; }; class TEXT_TARGET_A: ATragMX_RscButton { idc=500; w="0.0231"; - x="0.550*safezoneW+safezoneX+0.205"; - y="0.265*safezoneH+safezoneY+0.425"; + x="0.550*safeZoneW+safeZoneX+0.205"; + y="0.265*safeZoneH+safeZoneY+0.425"; colorText[]={0,0,0,1}; colorDisabled[]={0.8,0.8,0.8,1}; colorBackgroundDisabled[]={0,0,0,1}; @@ -429,103 +429,103 @@ class ATragMX_Display { }; class TEXT_TARGET_B: TEXT_TARGET_A { idc=501; - x="0.550*safezoneW+safezoneX+0.2281"; + x="0.550*safeZoneW+safeZoneX+0.2281"; text="B"; action=QUOTE(1 call FUNC(change_target_slot)); }; class TEXT_TARGET_C: TEXT_TARGET_A { idc=502; - x="0.550*safezoneW+safezoneX+0.2512"; + x="0.550*safeZoneW+safeZoneX+0.2512"; text="C"; action=QUOTE(2 call FUNC(change_target_slot)); }; class TEXT_TARGET_D: TEXT_TARGET_A { idc=503; - x="0.550*safezoneW+safezoneX+0.2743"; + x="0.550*safeZoneW+safeZoneX+0.2743"; text="D"; action=QUOTE(3 call FUNC(change_target_slot)); }; class TEXT_TARGET: TEXT_GUN { idc=4002; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; text="Target"; action=QUOTE(0 call FUNC(toggle_target_data)); }; class TEXT_WIND_SPEED: TEXT_BORE_HEIGHT { idc=30; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; text="WS"; }; class TEXT_WIND_SPEED_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT { idc=300; w="0.058"; - x="0.550*safezoneW+safezoneX+0.335"; - y="0.265*safezoneH+safezoneY+0.285"; + x="0.550*safeZoneW+safeZoneX+0.335"; + y="0.265*safeZoneH+safeZoneY+0.285"; text="0"; }; class TEXT_WIND_DIRECTION: TEXT_BULLET_MASS { idc=31; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; text="WD"; }; class TEXT_WIND_DIRECTION_OUTPUT: TEXT_WIND_SPEED_OUTPUT { idc=310; - y="0.265*safezoneH+safezoneY+0.32"; + y="0.265*safeZoneH+safeZoneY+0.32"; }; class TEXT_INCLINATION_ANGLE: TEXT_AIR_FRICTION { idc=32; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; text="IA"; }; class TEXT_INCLINATION_ANGLE_OUTPUT: TEXT_WIND_SPEED_OUTPUT { idc=320; - y="0.265*safezoneH+safezoneY+0.355"; + y="0.265*safeZoneH+safeZoneY+0.355"; }; class TEXT_TARGET_SPEED: TEXT_MUZZLE_VELOCITY { idc=33; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; text="TS"; action=QUOTE(0 call FUNC(toggle_target_speed_assist)); }; class TEXT_TARGET_SPEED_OUTPUT: TEXT_WIND_SPEED_OUTPUT { idc=330; - y="0.265*safezoneH+safezoneY+0.39"; + y="0.265*safeZoneH+safeZoneY+0.39"; }; class TEXT_TARGET_RANGE: TEXT_TARGET_SPEED { idc=34; - y="0.265*safezoneH+safezoneY+0.425"; + y="0.265*safeZoneH+safeZoneY+0.425"; text="TR"; action=QUOTE(0 call FUNC(toggle_target_range_assist)); }; class TEXT_TARGET_RANGE_INPUT: TEXT_WIND_SPEED_OUTPUT { idc=340; - y="0.265*safezoneH+safezoneY+0.425"; + y="0.265*safeZoneH+safeZoneY+0.425"; }; class TEXT_ELEVATION: TEXT_GUN_PROFILE { idc=40; w="0.05"; - x="0.550*safezoneW+safezoneX+0.115"; - y="0.265*safezoneH+safezoneY+0.50"; + x="0.550*safeZoneW+safeZoneX+0.115"; + y="0.265*safeZoneH+safeZoneY+0.50"; text="Elev"; }; class TEXT_ABSOLUTE: TEXT_GUN_PROFILE { idc=4003; w="0.07"; style=ST_CENTER; - x="0.550*safezoneW+safezoneX+0.17"; - y="0.265*safezoneH+safezoneY+0.47"; + x="0.550*safeZoneW+safeZoneX+0.17"; + y="0.265*safeZoneH+safeZoneY+0.47"; text="Abs"; }; class TEXT_RELATIVE: TEXT_ABSOLUTE { idc=4004; - x="0.550*safezoneW+safezoneX+0.245"; + x="0.550*safeZoneW+safeZoneX+0.245"; text="Rel"; }; class TEXT_CURRENT: TEXT_ABSOLUTE { idc=4005; - x="0.550*safezoneW+safezoneX+0.32"; + x="0.550*safeZoneW+safeZoneX+0.32"; text="Cur"; }; class TEXT_ELEVATION_OUTPUT_ABSOLUTE: ATragMX_RscText { @@ -534,67 +534,67 @@ class ATragMX_Display { sizeEx="0.025"; w="0.065"; h="0.032"; - x="0.550*safezoneW+safezoneX+0.17"; - y="0.265*safezoneH+safezoneY+0.50"; + x="0.550*safeZoneW+safeZoneX+0.17"; + y="0.265*safeZoneH+safeZoneY+0.50"; text=""; }; class TEXT_ELEVATION_OUTPUT_RELATIVE: TEXT_ELEVATION_OUTPUT_ABSOLUTE { idc=401; - x="0.550*safezoneW+safezoneX+0.2465"; + x="0.550*safeZoneW+safeZoneX+0.2465"; }; class TEXT_ELEVATION_INPUT_CURRENT: TEXT_ELEVATION_OUTPUT_ABSOLUTE { idc=402; - x="0.550*safezoneW+safezoneX+0.323"; + x="0.550*safeZoneW+safeZoneX+0.323"; }; class TEXT_WINDAGE: TEXT_ELEVATION { idc=41; - y="0.265*safezoneH+safezoneY+0.535"; + y="0.265*safeZoneH+safeZoneY+0.535"; text="Wind"; }; class TEXT_WINDAGE_OUTPUT_ABSOLUTE: TEXT_ELEVATION_OUTPUT_ABSOLUTE { idc=410; - y="0.265*safezoneH+safezoneY+0.535"; + y="0.265*safeZoneH+safeZoneY+0.535"; }; class TEXT_WINDAGE_OUTPUT_RELATIVE: TEXT_WINDAGE_OUTPUT_ABSOLUTE { idc=411; - x="0.550*safezoneW+safezoneX+0.2465"; + x="0.550*safeZoneW+safeZoneX+0.2465"; }; class TEXT_WINDAGE_INPUT_CURRENT: TEXT_WINDAGE_OUTPUT_ABSOLUTE { idc=412; - x="0.550*safezoneW+safezoneX+0.323"; + x="0.550*safeZoneW+safeZoneX+0.323"; }; class TEXT_LEAD: TEXT_GUN { idc=42; w="0.05"; - x="0.550*safezoneW+safezoneX+0.115"; - y="0.265*safezoneH+safezoneY+0.57"; + x="0.550*safeZoneW+safeZoneX+0.115"; + y="0.265*safeZoneH+safeZoneY+0.57"; text="Lead"; action=QUOTE(GVAR(showWind2) = !GVAR(showWind2); call FUNC(update_result); call FUNC(update_target)); }; class TEXT_LEAD_OUTPUT: TEXT_ELEVATION_OUTPUT_ABSOLUTE { idc=420; - y="0.265*safezoneH+safezoneY+0.57"; + y="0.265*safeZoneH+safeZoneY+0.57"; }; class TEXT_RESET_SCOPE_ZERO: TEXT_GUN { idc=4006; w="0.07"; style=ST_CENTER; colorBackground[]={0,0,0,0}; - x="0.550*safezoneW+safezoneX+0.2465"; - y="0.265*safezoneH+safezoneY+0.57"; + x="0.550*safeZoneW+safeZoneX+0.2465"; + y="0.265*safeZoneH+safeZoneY+0.57"; text="Reset"; action=QUOTE(call FUNC(reset_relative_click_memory)); }; class TEXT_UPDATE_SCOPE_ZERO: TEXT_RESET_SCOPE_ZERO { idc=4007; - x="0.550*safezoneW+safezoneX+0.323"; + x="0.550*safeZoneW+safeZoneX+0.323"; text="Update"; action=QUOTE(call FUNC(update_relative_click_memory)); }; class TEXT_GUN_LIST: TEXT_GUN { idc=4008; style=ST_LEFT; - y="0.265*safezoneH+safezoneY+0.65"; + y="0.265*safeZoneH+safeZoneY+0.65"; text="GunList"; action=QUOTE(call FUNC(toggle_gun_list)); }; @@ -602,7 +602,7 @@ class ATragMX_Display { idc=2000; style=ST_CENTER; w="0.06"; - x="0.550*safezoneW+safezoneX+0.205"; + x="0.550*safeZoneW+safeZoneX+0.205"; colorBackground[]={0,0,0,0}; text="TMOA"; action=QUOTE(call FUNC(cycle_scope_unit)); @@ -611,14 +611,14 @@ class ATragMX_Display { idc=2001; style=ST_CENTER; w="0.025"; - x="0.550*safezoneW+safezoneX+0.27"; + x="0.550*safeZoneW+safeZoneX+0.27"; text="4"; action=QUOTE(call FUNC(toggle_solution_setup)); }; class TEXT_OPTIONS: TEXT_GUN_LIST { idc=3000; style=ST_RIGHT; - x="0.550*safezoneW+safezoneX+0.3"; + x="0.550*safeZoneW+safeZoneX+0.3"; text="Options"; action=QUOTE(false call FUNC(toggle_option_menu)); }; @@ -627,8 +627,8 @@ class ATragMX_Display { colorBackground[]={0.15,0.21,0.23,0.2}; colorBackgroundActive[]={0.15,0.21,0.23,0.2}; colorFocused[]={0.15,0.21,0.23,0.2}; - x="0.550*safezoneW+safezoneX+0.105"; - y="0.265*safezoneH+safezoneY+0.17"; + x="0.550*safeZoneW+safeZoneX+0.105"; + y="0.265*safeZoneH+safeZoneY+0.17"; w="0.3"; h="0.535"; offsetPressedX="0.0"; @@ -640,8 +640,8 @@ class ATragMX_Display { style=0; w="0.17"; h="0.28"; - x="0.550*safezoneW+safezoneX+0.225"; - y="0.265*safezoneH+safezoneY+0.355"; + x="0.550*safeZoneW+safeZoneX+0.225"; + y="0.265*safeZoneH+safeZoneY+0.355"; sizeEx="0.025"; onMouseButtonClick=QUOTE(true call FUNC(toggle_option_menu)); }; @@ -653,8 +653,8 @@ class ATragMX_Display { class TEXT_RANGE_CARD_SETUP: ATragMX_RscButton { idc=5001; w="0.055675"; - x="0.550*safezoneW+safezoneX+0.28"; - y="0.265*safezoneH+safezoneY+0.20"; + x="0.550*safeZoneW+safeZoneX+0.28"; + y="0.265*safeZoneH+safeZoneY+0.20"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="Setup"; @@ -662,7 +662,7 @@ class ATragMX_Display { }; class TEXT_RANGE_CARD_DONE: TEXT_RANGE_CARD_SETUP { idc=5002; - x="0.550*safezoneW+safezoneX+0.3362"; + x="0.550*safeZoneW+safeZoneX+0.3362"; text="Done"; action=QUOTE(call FUNC(toggle_range_card)); }; @@ -670,24 +670,24 @@ class ATragMX_Display { idc=5003; style=ST_LEFT; w="0.07"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.24"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.24"; colorBackground[]={0.15,0.21,0.23,0.3}; text="Meters"; }; class TEXT_RANGE_CARD_COLUMN_2_CAPTION: TEXT_RANGE_CARD_COLUMN_1_CAPTION { idc=5004; - x="0.550*safezoneW+safezoneX+0.180625"; + x="0.550*safeZoneW+safeZoneX+0.180625"; text="Elev"; }; class TEXT_RANGE_CARD_COLUMN_3_CAPTION: TEXT_RANGE_CARD_COLUMN_1_CAPTION { idc=5005; - x="0.550*safezoneW+safezoneX+0.25125"; + x="0.550*safeZoneW+safeZoneX+0.25125"; text="Wind"; }; class TEXT_RANGE_CARD_COLUMN_4_CAPTION: TEXT_RANGE_CARD_COLUMN_1_CAPTION { idc=5006; - x="0.550*safezoneW+safezoneX+0.321875"; + x="0.550*safeZoneW+safeZoneX+0.321875"; text="TmFlt"; action=QUOTE(call FUNC(cycle_range_card_columns)); }; @@ -698,8 +698,8 @@ class ATragMX_Display { idcRight=50062; w="0.285"; h="0.42"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.27"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.27"; }; class TEXT_GUN_LIST_OUTPUT: ATragMX_RscListNBox { @@ -707,8 +707,8 @@ class ATragMX_Display { columns[]={-0.05}; w="0.16"; h="0.45"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.24"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.24"; sizeEx="0.018"; colorSelectBackground[]={0.15,0.21,0.23,0.3}; colorSelectBackground2[]={0.15,0.21,0.23,0.3}; @@ -724,8 +724,8 @@ class ATragMX_Display { idc=6002; style=ST_RIGHT; w="0.115"; - x="0.550*safezoneW+safezoneX+0.28"; - y="0.265*safezoneH+safezoneY+0.20"; + x="0.550*safeZoneW+safeZoneX+0.28"; + y="0.265*safeZoneH+safeZoneY+0.20"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; sizeEx="0.024"; @@ -734,30 +734,30 @@ class ATragMX_Display { }; class TEXT_GUN_LIST_SAVE_GUN: TEXT_GUN_LIST_OPEN_GUN { idc=6003; - y="0.265*safezoneH+safezoneY+0.24"; + y="0.265*safeZoneH+safeZoneY+0.24"; text="Save Gun"; action=QUOTE(call FUNC(save_gun)); }; class TEXT_GUN_LIST_ADD_NEW_GUN: TEXT_GUN_LIST_OPEN_GUN { idc=6004; - y="0.265*safezoneH+safezoneY+0.28"; + y="0.265*safeZoneH+safeZoneY+0.28"; text="Add New Gun"; action=QUOTE(false call FUNC(show_gun_list); true call FUNC(show_add_new_gun)); }; class TEXT_GUN_LIST_DELETE_GUN: TEXT_GUN_LIST_OPEN_GUN { idc=6005; - y="0.265*safezoneH+safezoneY+0.34"; + y="0.265*safeZoneH+safeZoneY+0.34"; text="Delete Gun"; action=QUOTE(call FUNC(delete_gun)); }; class TEXT_GUN_LIST_NOTE: TEXT_GUN_LIST_OPEN_GUN { idc=6006; - y="0.265*safezoneH+safezoneY+0.40"; + y="0.265*safeZoneH+safeZoneY+0.40"; text="Note"; }; class TEXT_GUN_LIST_DONE: TEXT_GUN_LIST_OPEN_GUN { idc=6007; - y="0.265*safezoneH+safezoneY+0.65"; + y="0.265*safeZoneH+safeZoneY+0.65"; text="Done"; action=QUOTE(false call FUNC(toggle_gun_list)); }; @@ -766,8 +766,8 @@ class ATragMX_Display { idc=7000; style="16+0x200"; lineSpacing=1.0; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.24"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.24"; w="0.29"; h="0.10"; sizeEx="0.022"; @@ -776,8 +776,8 @@ class ATragMX_Display { class TEXT_TARGET_RANGE_ASSIST_MEASUREMENT_METHOD: TEXT_TARGET_RANGE_ASSIST_CAPTION { idc=7001; style=ST_LEFT; - x="0.550*safezoneW+safezoneX+0.115"; - y="0.265*safezoneH+safezoneY+0.35"; + x="0.550*safeZoneW+safeZoneX+0.115"; + y="0.265*safeZoneH+safeZoneY+0.35"; w="0.12"; h="0.03"; sizeEx="0.027"; @@ -786,8 +786,8 @@ class ATragMX_Display { class TEXT_TARGET_RANGE_ASSIST_WIDTH_HEIGHT: ATragMX_RscToolbox { idc=7002; w="0.14"; - x="0.550*safezoneW+safezoneX+0.24"; - y="0.265*safezoneH+safezoneY+0.35"; + x="0.550*safeZoneW+safeZoneX+0.24"; + y="0.265*safeZoneH+safeZoneY+0.35"; strings[]={"Height","Width"}; values[]={1,0}; onToolBoxSelChanged=QUOTE(GVAR(rangeAssistUseTargetHeight) = ((_this select 1) == 0)); @@ -795,73 +795,73 @@ class ATragMX_Display { class TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE: TEXT_TARGET_RANGE_ASSIST_MEASUREMENT_METHOD { idc=7003; style=ST_RIGHT; - x="0.550*safezoneW+safezoneX+0.092"; - y="0.265*safezoneH+safezoneY+0.4"; + x="0.550*safeZoneW+safeZoneX+0.092"; + y="0.265*safeZoneH+safeZoneY+0.4"; w="0.128"; text="Target Size"; }; class TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { idc=7004; - y="0.265*safezoneH+safezoneY+0.45"; + y="0.265*safeZoneH+safeZoneY+0.45"; text="Image Size"; }; class TEXT_TARGET_RANGE_ASSIST_ANGLE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { idc=7005; - y="0.265*safezoneH+safezoneY+0.5"; + y="0.265*safeZoneH+safeZoneY+0.5"; text="Angle"; }; class TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { idc=7006; - y="0.265*safezoneH+safezoneY+0.55"; + y="0.265*safeZoneH+safeZoneY+0.55"; text="Est Range"; }; class TEXT_TARGET_RANGE_ASSIST_CALC_1: TEXT_MUZZLE_VELOCITY { idc=7007; w="0.0231"; - x="0.550*safezoneW+safezoneX+0.22"; - y="0.265*safezoneH+safezoneY+0.4"; + x="0.550*safeZoneW+safeZoneX+0.22"; + y="0.265*safeZoneH+safeZoneY+0.4"; sizeEx="0.03"; text="!"; action=QUOTE(0 call FUNC(calculate_target_range_assist)); }; class TEXT_TARGET_RANGE_ASSIST_CALC_2: TEXT_TARGET_RANGE_ASSIST_CALC_1 { idc=7008; - y="0.265*safezoneH+safezoneY+0.45"; + y="0.265*safeZoneH+safeZoneY+0.45"; action=QUOTE(1 call FUNC(calculate_target_range_assist)); }; class TEXT_TARGET_RANGE_ASSIST_CALC_3: TEXT_TARGET_RANGE_ASSIST_CALC_1 { idc=7009; - y="0.265*safezoneH+safezoneY+0.55"; + y="0.265*safeZoneH+safeZoneY+0.55"; action=QUOTE(2 call FUNC(calculate_target_range_assist)); }; class TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT: ATragMX_RscEdit { idc=7010; w="0.065"; - x="0.550*safezoneW+safezoneX+0.2475"; - y="0.265*safezoneH+safezoneY+0.4"; + x="0.550*safeZoneW+safeZoneX+0.2475"; + y="0.265*safeZoneH+safeZoneY+0.4"; }; class TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { idc=7011; - y="0.265*safezoneH+safezoneY+0.45"; + y="0.265*safeZoneH+safeZoneY+0.45"; }; class TEXT_TARGET_RANGE_ASSIST_ANGLE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { idc=7012; - y="0.265*safezoneH+safezoneY+0.5"; + y="0.265*safeZoneH+safeZoneY+0.5"; }; class TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { idc=7013; - y="0.265*safezoneH+safezoneY+0.55"; + y="0.265*safeZoneH+safeZoneY+0.55"; }; class TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_UNIT: TEXT_TARGET_RANGE_ASSIST_CALC_1 { idc=7014; w="0.07"; - x="0.550*safezoneW+safezoneX+0.32"; + x="0.550*safeZoneW+safeZoneX+0.32"; text="cm"; action=QUOTE(call FUNC(cycle_target_size_units)); }; class TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_UNIT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_UNIT { idc=7015; - y="0.265*safezoneH+safezoneY+0.45"; + y="0.265*safeZoneH+safeZoneY+0.45"; text="MIL"; action=QUOTE(call FUNC(cycle_image_size_units)); }; @@ -869,15 +869,15 @@ class ATragMX_Display { idc=7016; style=ST_LEFT; w="0.07"; - x="0.550*safezoneW+safezoneX+0.32"; + x="0.550*safeZoneW+safeZoneX+0.32"; text="Meters"; }; class TEXT_TARGET_RANGE_ASSIST_DONE: ATragMX_RscButton { idc=7017; style=ST_CENTER; w="0.07"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.60"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.60"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="Done"; @@ -885,41 +885,41 @@ class ATragMX_Display { }; class TEXT_TARGET_RANGE_ASSIST_CANCEL: TEXT_TARGET_RANGE_ASSIST_DONE { idc=7018; - x="0.550*safezoneW+safezoneX+0.180625"; + x="0.550*safeZoneW+safeZoneX+0.180625"; text="Cancel"; action=QUOTE(0 call FUNC(toggle_target_range_assist)); }; class TEXT_TARGET_RANGE_ASSIST_PREV: TEXT_TARGET_RANGE_ASSIST_DONE { idc=7019; - x="0.550*safezoneW+safezoneX+0.25125"; + x="0.550*safeZoneW+safeZoneX+0.25125"; text="Prev"; action=""; }; class TEXT_TARGET_RANGE_ASSIST_NEXT: TEXT_TARGET_RANGE_ASSIST_DONE { idc=7020; - x="0.550*safezoneW+safezoneX+0.321875"; + x="0.550*safeZoneW+safeZoneX+0.321875"; text="Next"; action=""; }; class TEXT_TARGET_SPEED_ASSIST_TARGET_RANGE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { idc=8000; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="Target Range"; }; class TEXT_TARGET_SPEED_ASSIST_NUM_TICKS: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE { idc=8001; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="Num Ticks"; }; class TEXT_TARGET_SPEED_ASSIST_TIME: TEXT_TARGET_RANGE_ASSIST_ANGLE { idc=8002; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="Time (secs)"; }; class TEXT_TARGET_SPEED_ASSIST_TARGET_ESTIMATED_SPEED: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE { idc=8003; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="Est Speed"; }; class TEXT_TARGET_SPEED_ASSIST_TARGET_RANGE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { @@ -937,14 +937,14 @@ class ATragMX_Display { class TEXT_TARGET_SPEED_ASSIST_TARGET_ESTIMATED_SPEED_OUTPUT: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE { idc=8007; w="0.065"; - x="0.550*safezoneW+safezoneX+0.2475"; - y="0.265*safezoneH+safezoneY+0.55"; + x="0.550*safeZoneW+safeZoneX+0.2475"; + y="0.265*safeZoneH+safeZoneY+0.55"; colorBackground[]={0.15,0.21,0.23,0.3}; text="0"; }; class TEXT_TARGET_SPEED_ASSIST_TARGET_RANGE_UNIT: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE_UNIT { idc=8008; - y="0.265*safezoneH+safezoneY+0.4"; + y="0.265*safeZoneH+safeZoneY+0.4"; text="Meters"; }; class TEXT_TARGET_SPEED_ASSIST_NUM_TICKS_UNIT: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_UNIT { @@ -954,7 +954,7 @@ class ATragMX_Display { }; class TEXT_TARGET_SPEED_ASSIST_TIMER_START: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_UNIT { idc=8010; - y="0.265*safezoneH+safezoneY+0.5"; + y="0.265*safeZoneH+safeZoneY+0.5"; text="Start"; action=QUOTE(call FUNC(target_speed_assist_timer)); }; @@ -981,16 +981,16 @@ class ATragMX_Display { idc=9000; w="0.285"; h="0.49"; - x="0.550*safezoneW+safezoneX+0.11"; - y="0.265*safezoneH+safezoneY+0.2"; + x="0.550*safeZoneW+safeZoneX+0.11"; + y="0.265*safeZoneH+safeZoneY+0.2"; colorBackground[]={0,0,0,0}; colorBackgroundActive[]={0,0,0,0}; action=QUOTE(GVAR(speedAssistTimer)=false); }; class TEXT_TARGET_SPEED_ASSIST_TIME_OUTPUT: ATragMX_RscText { idc=9001; - x="0.550*safezoneW+safezoneX+0.22"; - y="0.265*safezoneH+safezoneY+0.51"; + x="0.550*safeZoneW+safeZoneX+0.22"; + y="0.265*safeZoneH+safeZoneY+0.51"; w="0.08"; h="0.09"; style=ST_CENTER; @@ -1002,8 +1002,8 @@ class ATragMX_Display { style=ST_CENTER; w="0.07"; h="0.04"; - x="0.550*safezoneW+safezoneX+0.225"; - y="0.265*safezoneH+safezoneY+0.60"; + x="0.550*safeZoneW+safeZoneX+0.225"; + y="0.265*safeZoneH+safeZoneY+0.60"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="Stop"; @@ -1012,17 +1012,17 @@ class ATragMX_Display { class TEXT_RANGE_CARD_SETUP_START_RANGE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { idc=10000; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="Start Range"; }; class TEXT_RANGE_CARD_SETUP_END_RANGE: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE { idc=10001; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="End Range"; }; class TEXT_RANGE_CARD_SETUP_INCREMENT: TEXT_TARGET_RANGE_ASSIST_ANGLE { idc=10002; - x="0.550*safezoneW+safezoneX+0.12"; + x="0.550*safeZoneW+safeZoneX+0.12"; text="Increment"; }; class TEXT_RANGE_CARD_SETUP_START_RANGE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { @@ -1057,8 +1057,8 @@ class ATragMX_Display { style=ST_LEFT; w="0.25"; h="0.04"; - x="0.550*safezoneW+safezoneX+0.12"; - y="0.265*safezoneH+safezoneY+0.24"; + x="0.550*safeZoneW+safeZoneX+0.12"; + y="0.265*safeZoneH+safeZoneY+0.24"; sizeEx="0.025"; text="New Gun Name"; }; @@ -1067,8 +1067,8 @@ class ATragMX_Display { style=ST_LEFT; w="0.225"; h="0.04"; - x="0.550*safezoneW+safezoneX+0.12"; - y="0.265*safezoneH+safezoneY+0.28"; + x="0.550*safeZoneW+safeZoneX+0.12"; + y="0.265*safeZoneH+safeZoneY+0.28"; text=""; onKeyDown=QUOTE(call FUNC(trim_gun_name)); onKeyUp=QUOTE(call FUNC(trim_gun_name)); @@ -1078,8 +1078,8 @@ class ATragMX_Display { style=ST_CENTER; w="0.1"; h="0.04"; - x="0.550*safezoneW+safezoneX+0.12"; - y="0.265*safezoneH+safezoneY+0.33"; + x="0.550*safeZoneW+safeZoneX+0.12"; + y="0.265*safeZoneH+safeZoneY+0.33"; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="OK"; @@ -1087,7 +1087,7 @@ class ATragMX_Display { }; class TEXT_ADD_NEW_GUN_CANCEL: TEXT_ADD_NEW_GUN_OK { idc=11003; - x="0.550*safezoneW+safezoneX+0.245"; + x="0.550*safeZoneW+safeZoneX+0.245"; text="Cancel"; action=QUOTE(false call FUNC(show_add_new_gun); true call FUNC(show_gun_list)); }; @@ -1095,74 +1095,74 @@ class ATragMX_Display { class TEXT_GUN_AMMO_DATA_BORE_HEIGHT: TEXT_BORE_HEIGHT { idc=12000; w="0.22"; - y="0.265*safezoneH+safezoneY+0.28"; + y="0.265*safeZoneH+safeZoneY+0.28"; text="Bore (cm)"; }; class TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT: ATragMX_RscEdit { idc=120000; w="0.06"; - x="0.550*safezoneW+safezoneX+0.335"; - y="0.265*safezoneH+safezoneY+0.28"; + x="0.550*safeZoneW+safeZoneX+0.335"; + y="0.265*safeZoneH+safeZoneY+0.28"; }; class TEXT_GUN_AMMO_DATA_BULLET_MASS: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=12001; - y="0.265*safezoneH+safezoneY+0.320"; + y="0.265*safeZoneH+safeZoneY+0.320"; text="Bullet Weight (grams)"; }; class TEXT_GUN_AMMO_DATA_BULLET_MASS_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=120010; - y="0.265*safezoneH+safezoneY+0.320"; + y="0.265*safeZoneH+safeZoneY+0.320"; }; class TEXT_GUN_AMMO_DATA_BULLET_DIAMETER: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=12002; - y="0.265*safezoneH+safezoneY+0.360"; + y="0.265*safeZoneH+safeZoneY+0.360"; text="Bullet Diam (cm)"; }; class TEXT_GUN_AMMO_DATA_BULLET_DIAMETER_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=120020; - y="0.265*safezoneH+safezoneY+0.360"; + y="0.265*safeZoneH+safeZoneY+0.360"; }; class TEXT_GUN_AMMO_DATA_AIR_FRICTION: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=12003; - y="0.265*safezoneH+safezoneY+0.400"; + y="0.265*safeZoneH+safeZoneY+0.400"; text="C1 Coefficient"; }; class TEXT_GUN_AMMO_DATA_AIR_FRICTION_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=120030; - y="0.265*safezoneH+safezoneY+0.400"; + y="0.265*safeZoneH+safeZoneY+0.400"; }; class TEXT_GUN_AMMO_DATA_RIFLE_TWIST: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=12004; - y="0.265*safezoneH+safezoneY+0.440"; + y="0.265*safeZoneH+safeZoneY+0.440"; text="Rifle Twist (cm/trn)"; }; class TEXT_GUN_AMMO_DATA_RIFLE_TWIST_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=120040; - y="0.265*safezoneH+safezoneY+0.440"; + y="0.265*safeZoneH+safeZoneY+0.440"; }; class TEXT_GUN_AMMO_DATA_MUZZLE_VELOCITY: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=12005; - y="0.265*safezoneH+safezoneY+0.480"; + y="0.265*safeZoneH+safeZoneY+0.480"; text="Muzzle Velocity (m/s)"; }; class TEXT_GUN_AMMO_DATA_MUZZLE_VELOCITY_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=120050; - y="0.265*safezoneH+safezoneY+0.480"; + y="0.265*safeZoneH+safeZoneY+0.480"; }; class TEXT_GUN_AMMO_DATA_ZERO_RANGE: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=12006; - y="0.265*safezoneH+safezoneY+0.520"; + y="0.265*safeZoneH+safeZoneY+0.520"; text="Zero Range (meters)"; }; class TEXT_GUN_AMMO_DATA_ZERO_RANGE_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=120060; - y="0.265*safezoneH+safezoneY+0.520"; + y="0.265*safeZoneH+safeZoneY+0.520"; }; class TEXT_GUN_AMMO_DATA_ZERO_RANGE_METER_INDICATOR: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=120061; w="0.05"; - x="0.550*safezoneW+safezoneX+0.315"; - y="0.265*safezoneH+safezoneY+0.520"; + x="0.550*safeZoneW+safeZoneX+0.315"; + y="0.265*safeZoneH+safeZoneY+0.520"; text=""; }; class TEXT_GUN_AMMO_DATA_DONE: TEXT_TARGET_SPEED_ASSIST_DONE { @@ -1183,62 +1183,62 @@ class ATragMX_Display { class TEXT_ATMO_ENV_DATA_DEFAULT: TEXT_LEAD { idc=13000; w="0.08"; - x="0.550*safezoneW+safezoneX+0.15"; - y="0.265*safezoneH+safezoneY+0.320"; + x="0.550*safeZoneW+safeZoneX+0.15"; + y="0.265*safeZoneH+safeZoneY+0.320"; text="Default"; action=QUOTE(call FUNC(restore_atmo_default)); }; class TEXT_ATMO_ENV_DATA_AT: TEXT_TARGET_A { idc=13001; w="0.04"; - x="0.550*safezoneW+safezoneX+0.24"; - y="0.265*safezoneH+safezoneY+0.320"; + x="0.550*safeZoneW+safeZoneX+0.24"; + y="0.265*safeZoneH+safeZoneY+0.320"; text="AT"; action=QUOTE(GVAR(atmosphereModeTBH) = false; call FUNC(update_atmo_selection)); }; class TEXT_ATMO_ENV_DATA_TBH: TEXT_ATMO_ENV_DATA_AT { idc=13002; - x="0.550*safezoneW+safezoneX+0.28"; + x="0.550*safeZoneW+safeZoneX+0.28"; text="TBH"; action=QUOTE(GVAR(atmosphereModeTBH) = true; call FUNC(update_atmo_selection)); }; class TEXT_ATMO_ENV_DATA_ALTITUDE: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=13003; - x="0.550*safezoneW+safezoneX+0.115"; - y="0.265*safezoneH+safezoneY+0.400"; + x="0.550*safeZoneW+safeZoneX+0.115"; + y="0.265*safeZoneH+safeZoneY+0.400"; text="Altitude (ft)"; }; class TEXT_ATMO_ENV_DATA_ALTITUDE_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT { idc=130030; - x="0.550*safezoneW+safezoneX+0.330"; - y="0.265*safezoneH+safezoneY+0.400"; + x="0.550*safeZoneW+safeZoneX+0.330"; + y="0.265*safeZoneH+safeZoneY+0.400"; }; class TEXT_ATMO_ENV_DATA_TEMPERATURE: TEXT_ATMO_ENV_DATA_ALTITUDE { idc=13004; - y="0.265*safezoneH+safezoneY+0.440"; + y="0.265*safeZoneH+safeZoneY+0.440"; text="temperature (F)"; }; class TEXT_ATMO_ENV_DATA_TEMPERATURE_INPUT: TEXT_ATMO_ENV_DATA_ALTITUDE_INPUT { idc=130040; - y="0.265*safezoneH+safezoneY+0.440"; + y="0.265*safeZoneH+safeZoneY+0.440"; }; class TEXT_ATMO_ENV_DATA_BAROMETRIC_PRESSURE: TEXT_ATMO_ENV_DATA_ALTITUDE { idc=13005; - y="0.265*safezoneH+safezoneY+0.480"; + y="0.265*safeZoneH+safeZoneY+0.480"; text="Barom Pres (in.merc.)"; }; class TEXT_ATMO_ENV_DATA_BAROMETRIC_PRESSURE_INPUT: TEXT_ATMO_ENV_DATA_ALTITUDE_INPUT { idc=130050; - y="0.265*safezoneH+safezoneY+0.480"; + y="0.265*safeZoneH+safeZoneY+0.480"; }; class TEXT_ATMO_ENV_DATA_RELATIVE_HUMIDITY: TEXT_ATMO_ENV_DATA_ALTITUDE { idc=13006; - y="0.265*safezoneH+safezoneY+0.520"; + y="0.265*safeZoneH+safeZoneY+0.520"; text="Relative Humidity (%)"; }; class TEXT_ATMO_ENV_DATA_RELATIVE_HUMIDITY_INPUT: TEXT_ATMO_ENV_DATA_ALTITUDE_INPUT { idc=130060; - y="0.265*safezoneH+safezoneY+0.520"; + y="0.265*safeZoneH+safeZoneY+0.520"; }; class TEXT_ATMO_ENV_DATA_DONE: TEXT_TARGET_SPEED_ASSIST_DONE { idc=13007; @@ -1259,36 +1259,36 @@ class ATragMX_Display { style=64; w="0.14"; h="0.07"; - x="0.550*safezoneW+safezoneX+0.235"; - y="0.265*safezoneH+safezoneY+0.29"; + x="0.550*safeZoneW+safeZoneX+0.235"; + y="0.265*safeZoneH+safeZoneY+0.29"; text="Calc Method"; }; class TEXT_TARGET_DATA_LATITUDE: TEXT_BORE_HEIGHT { idc=14000; w="0.22"; - y="0.265*safezoneH+safezoneY+0.28"; + y="0.265*safeZoneH+safeZoneY+0.28"; text="Latitude"; }; class TEXT_TARGET_DATA_LATITUDE_INPUT: ATragMX_RscEdit { idc=140000; w="0.06"; - x="0.550*safezoneW+safezoneX+0.335"; - y="0.265*safezoneH+safezoneY+0.28"; + x="0.550*safeZoneW+safeZoneX+0.335"; + y="0.265*safeZoneH+safeZoneY+0.28"; }; class TEXT_TARGET_DATA_DIR_OF_FIRE: TEXT_TARGET_DATA_LATITUDE { idc=14001; - y="0.265*safezoneH+safezoneY+0.320"; + y="0.265*safeZoneH+safeZoneY+0.320"; text="Dir of Fire (deg from N)"; }; class TEXT_TARGET_DATA_DIR_OF_FIRE_INPUT: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140010; - y="0.265*safezoneH+safezoneY+0.320"; + y="0.265*safeZoneH+safeZoneY+0.320"; }; class TEXT_TARGET_DATA_WIND_SPEED: TEXT_TARGET_DATA_LATITUDE { idc=14002; w="1.2"; - y="0.265*safezoneH+safezoneY+0.360"; + y="0.265*safeZoneH+safeZoneY+0.360"; text="Wind Speed (m/s)"; }; class TEXT_TARGET_DATA_WIND_SPEED_1: TEXT_TARGET_DATA_LATITUDE { @@ -1297,40 +1297,40 @@ class ATragMX_Display { w="0.05"; h="0.03"; sizeEx="0.025"; - x="0.550*safezoneW+safezoneX+0.270"; - y="0.265*safezoneH+safezoneY+0.357"; + x="0.550*safeZoneW+safeZoneX+0.270"; + y="0.265*safeZoneH+safeZoneY+0.357"; text="1"; }; class TEXT_TARGET_DATA_WIND_SPEED_INPUT_1: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140020; w="0.045"; - x="0.550*safezoneW+safezoneX+0.290"; - y="0.265*safezoneH+safezoneY+0.360"; + x="0.550*safeZoneW+safeZoneX+0.290"; + y="0.265*safeZoneH+safeZoneY+0.360"; }; class TEXT_TARGET_DATA_WIND_SPEED_2: TEXT_TARGET_DATA_WIND_SPEED_1 { idc=141021; - x="0.550*safezoneW+safezoneX+0.330"; + x="0.550*safeZoneW+safeZoneX+0.330"; text="2"; }; class TEXT_TARGET_DATA_WIND_SPEED_INPUT_2: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140021; w="0.045"; - x="0.550*safezoneW+safezoneX+0.350"; - y="0.265*safezoneH+safezoneY+0.360"; + x="0.550*safeZoneW+safeZoneX+0.350"; + y="0.265*safeZoneH+safeZoneY+0.360"; }; class TEXT_TARGET_DATA_WIND_DIRECTION: TEXT_TARGET_DATA_LATITUDE { idc=14003; - y="0.265*safezoneH+safezoneY+0.400"; + y="0.265*safeZoneH+safeZoneY+0.400"; text="Wind Direction (clock)"; }; class TEXT_TARGET_DATA_WIND_DIRECTION_INPUT: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140030; - y="0.265*safezoneH+safezoneY+0.400"; + y="0.265*safeZoneH+safeZoneY+0.400"; }; class TEXT_TARGET_DATA_INCLINATION_ANGLE: TEXT_TARGET_DATA_LATITUDE { idc=14004; w="1.2"; - y="0.265*safezoneH+safezoneY+0.440"; + y="0.265*safeZoneH+safeZoneY+0.440"; text="Inclination Angle"; }; class TEXT_TARGET_DATA_INCLINATION_ANGLE_COSINE: TEXT_TARGET_DATA_LATITUDE { @@ -1339,62 +1339,62 @@ class ATragMX_Display { w="0.05"; h="0.03"; sizeEx="0.025"; - x="0.550*safezoneW+safezoneX+0.270"; - y="0.265*safezoneH+safezoneY+0.437"; + x="0.550*safeZoneW+safeZoneX+0.270"; + y="0.265*safeZoneH+safeZoneY+0.437"; text="c"; }; class TEXT_TARGET_DATA_INCLINATION_ANGLE_INPUT_COSINE: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140041; w="0.045"; - x="0.550*safezoneW+safezoneX+0.290"; - y="0.265*safezoneH+safezoneY+0.440"; + x="0.550*safeZoneW+safeZoneX+0.290"; + y="0.265*safeZoneH+safeZoneY+0.440"; onKeyUp=QUOTE(if (_this select 1 == 28) then {0 call FUNC(update_inclination_angle)}); }; class TEXT_TARGET_DATA_INCLINATION_ANGLE_DEGREE: TEXT_TARGET_DATA_INCLINATION_ANGLE_COSINE { idc=141040; - x="0.550*safezoneW+safezoneX+0.330"; + x="0.550*safeZoneW+safeZoneX+0.330"; text="d"; }; class TEXT_TARGET_DATA_INCLINATION_ANGLE_INPUT_DEGREE: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140040; w="0.045"; - x="0.550*safezoneW+safezoneX+0.350"; - y="0.265*safezoneH+safezoneY+0.440"; + x="0.550*safeZoneW+safeZoneX+0.350"; + y="0.265*safeZoneH+safeZoneY+0.440"; onKeyUp=QUOTE(if (_this select 1 == 28) then {1 call FUNC(update_inclination_angle)}); }; class TEXT_TARGET_DATA_TARGET_SPEED: TEXT_TARGET_DATA_LATITUDE { idc=14005; - y="0.265*safezoneH+safezoneY+0.480"; + y="0.265*safeZoneH+safeZoneY+0.480"; text="Target Speed (m/s)"; }; class TEXT_TARGET_DATA_TARGET_SPEED_INPUT: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140050; - y="0.265*safezoneH+safezoneY+0.480"; + y="0.265*safeZoneH+safeZoneY+0.480"; }; class TEXT_TARGET_DATA_TARGET_SPEED_DIRECTION: ATragMX_RscButton { idc=140051; colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; w="0.0231"; - x="0.550*safezoneW+safezoneX+0.305"; - y="0.265*safezoneH+safezoneY+0.480"; + x="0.550*safeZoneW+safeZoneX+0.305"; + y="0.265*safeZoneH+safeZoneY+0.480"; text=">"; action=QUOTE(call FUNC(cycle_target_speed_direction)); }; class TEXT_TARGET_DATA_TARGET_RANGE: TEXT_TARGET_DATA_LATITUDE { idc=14006; - y="0.265*safezoneH+safezoneY+0.520"; + y="0.265*safeZoneH+safeZoneY+0.520"; text="Target Range (meters)"; }; class TEXT_TARGET_DATA_TARGET_RANGE_INPUT: TEXT_TARGET_DATA_LATITUDE_INPUT { idc=140060; - y="0.265*safezoneH+safezoneY+0.520"; + y="0.265*safeZoneH+safeZoneY+0.520"; }; class TEXT_TARGET_DATA_TARGET_RANGE_METER_INDICATOR: TEXT_TARGET_DATA_LATITUDE { idc=140061; w="0.05"; - x="0.550*safezoneW+safezoneX+0.315"; - y="0.265*safezoneH+safezoneY+0.520"; + x="0.550*safeZoneW+safeZoneX+0.315"; + y="0.265*safeZoneH+safeZoneY+0.520"; text=""; }; class TEXT_TARGET_DATA_DONE: TEXT_TARGET_SPEED_ASSIST_DONE { @@ -1417,45 +1417,45 @@ class ATragMX_Display { style=64; w="0.25"; h="0.07"; - x="0.550*safezoneW+safezoneX+0.13"; - y="0.265*safezoneH+safezoneY+0.32"; + x="0.550*safeZoneW+safeZoneX+0.13"; + y="0.265*safeZoneH+safeZoneY+0.32"; text="Show result in"; }; class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1: TEXT_TARGET_A { idc=15001; w="0.04"; - x="0.550*safezoneW+safezoneX+0.14"; - y="0.265*safezoneH+safezoneY+0.35"; + x="0.550*safeZoneW+safeZoneX+0.14"; + y="0.265*safeZoneH+safeZoneY+0.35"; text="1"; action=QUOTE(GVAR(currentScopeClickNumberTemp) = 1; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_2: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 { idc=15002; - x="0.550*safezoneW+safezoneX+0.18"; + x="0.550*safeZoneW+safeZoneX+0.18"; text="2"; action=QUOTE(GVAR(currentScopeClickNumberTemp) = 2; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_3: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 { idc=15003; - x="0.550*safezoneW+safezoneX+0.22"; + x="0.550*safeZoneW+safeZoneX+0.22"; text="3"; action=QUOTE(GVAR(currentScopeClickNumberTemp) = 3; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_4: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 { idc=15004; - x="0.550*safezoneW+safezoneX+0.26"; + x="0.550*safeZoneW+safeZoneX+0.26"; text="4"; action=QUOTE(GVAR(currentScopeClickNumberTemp) = 4; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_8: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 { idc=15005; - x="0.550*safezoneW+safezoneX+0.30"; + x="0.550*safeZoneW+safeZoneX+0.30"; text="8"; action=QUOTE(GVAR(currentScopeClickNumberTemp) = 8; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_10: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 { idc=15006; - x="0.550*safezoneW+safezoneX+0.34"; + x="0.550*safeZoneW+safeZoneX+0.34"; text="10"; action=QUOTE(GVAR(currentScopeClickNumberTemp) = 10; call FUNC(update_solution_setup)); }; @@ -1464,53 +1464,53 @@ class ATragMX_Display { style=64; w="0.25"; h="0.07"; - x="0.550*safezoneW+safezoneX+0.13"; - y="0.265*safezoneH+safezoneY+0.42"; + x="0.550*safeZoneW+safeZoneX+0.13"; + y="0.265*safeZoneH+safeZoneY+0.42"; text="Clicks per"; }; class TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA: TEXT_TARGET_A { idc=15008; w="0.05"; - x="0.550*safezoneW+safezoneX+0.15"; - y="0.265*safezoneH+safezoneY+0.45"; + x="0.550*safeZoneW+safeZoneX+0.15"; + y="0.265*safeZoneH+safeZoneY+0.45"; text="TMOA"; action=QUOTE(GVAR(currentScopeClickUnitTemp) = 0; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_CLICKS_PER_SMOA: TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA { idc=15009; - x="0.550*safezoneW+safezoneX+0.23"; + x="0.550*safeZoneW+safeZoneX+0.23"; text="SMOA"; action=QUOTE(GVAR(currentScopeClickUnitTemp) = 1; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_CLICKS_PER_MILS: TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA { idc=15010; - x="0.550*safezoneW+safezoneX+0.31"; + x="0.550*safeZoneW+safeZoneX+0.31"; text="MILS"; action=QUOTE(GVAR(currentScopeClickUnitTemp) = 2; call FUNC(update_solution_setup)); }; class TEXT_SOLUTION_SETUP_DONE: TEXT_TARGET_SPEED_ASSIST_DONE { idc=15011; - x="0.550*safezoneW+safezoneX+0.18"; - y="0.265*safezoneH+safezoneY+0.55"; + x="0.550*safeZoneW+safeZoneX+0.18"; + y="0.265*safeZoneH+safeZoneY+0.55"; action=QUOTE(1 call FUNC(toggle_solution_setup)); }; class TEXT_SOLUTION_SETUP_CANCEL: TEXT_TARGET_SPEED_ASSIST_CANCEL { idc=15012; - x="0.550*safezoneW+safezoneX+0.26"; - y="0.265*safezoneH+safezoneY+0.55"; + x="0.550*safeZoneW+safeZoneX+0.26"; + y="0.265*safeZoneH+safeZoneY+0.55"; action=QUOTE(0 call FUNC(toggle_solution_setup)); }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE: TEXT_BORE_HEIGHT { idc=16000; w="0.22"; - y="0.265*safezoneH+safezoneY+0.25"; + y="0.265*safeZoneH+safeZoneY+0.25"; sizeEx="0.022"; text="Temperature"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE { idc=16001; - x="0.550*safezoneW+safezoneX+0.215"; + x="0.550*safeZoneW+safeZoneX+0.215"; sizeEx="0.022"; text="Muzzle velocity"; }; @@ -1518,73 +1518,73 @@ class ATragMX_Display { idc=160021; w="0.082"; h="0.035"; - x="0.550*safezoneW+safezoneX+0.128"; - y="0.265*safezoneH+safezoneY+0.29"; + x="0.550*safeZoneW+safeZoneX+0.128"; + y="0.265*safeZoneH+safeZoneY+0.29"; text="0"; }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_2: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160022; - y="0.265*safezoneH+safezoneY+0.325"; + y="0.265*safeZoneH+safeZoneY+0.325"; }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_3: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160023; - y="0.265*safezoneH+safezoneY+0.360"; + y="0.265*safeZoneH+safeZoneY+0.360"; }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_4: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160024; - y="0.265*safezoneH+safezoneY+0.395"; + y="0.265*safeZoneH+safeZoneY+0.395"; }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_5: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160025; - y="0.265*safezoneH+safezoneY+0.430"; + y="0.265*safeZoneH+safeZoneY+0.430"; }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_6: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160026; - y="0.265*safezoneH+safezoneY+0.465"; + y="0.265*safeZoneH+safeZoneY+0.465"; }; class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_7: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160027; - y="0.265*safezoneH+safezoneY+0.500"; + y="0.265*safeZoneH+safeZoneY+0.500"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_1: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { idc=160031; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_2: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_2 { idc=160032; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_3: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_3 { idc=160033; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_4: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_4 { idc=160034; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_5: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_5 { idc=160035; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_6: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_6 { idc=160036; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_MUZZLE_VELOCITY_INPUT_7: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_7 { idc=160037; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_MUZZLE_VELOCITY_DATA_CLEAR: TEXT_TARGET_DATA_NEXT { idc=16004; style=ST_CENTER; h="0.035"; - y="0.265*safezoneH+safezoneY+0.3625"; + y="0.265*safeZoneH+safeZoneY+0.3625"; text="Clear"; action=QUOTE(call FUNC(clear_muzzle_velocity_data)); }; class TEXT_MUZZLE_VELOCITY_DATA_QUESTIONMARK: TEXT_MUZZLE_VELOCITY_DATA_CLEAR { idc=16005; - y="0.265*safezoneH+safezoneY+0.430"; + y="0.265*safeZoneH+safeZoneY+0.430"; text="?"; action=""; }; @@ -1606,14 +1606,14 @@ class ATragMX_Display { class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE: TEXT_BORE_HEIGHT { idc=17000; w="0.22"; - x="0.550*safezoneW+safezoneX+0.15"; - y="0.265*safezoneH+safezoneY+0.25"; + x="0.550*safeZoneW+safeZoneX+0.15"; + y="0.265*safeZoneH+safeZoneY+0.25"; sizeEx="0.022"; text="Meters"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE { idc=17001; - x="0.550*safezoneW+safezoneX+0.235"; + x="0.550*safeZoneW+safeZoneX+0.235"; sizeEx="0.022"; text="BC-Coef"; }; @@ -1621,75 +1621,75 @@ class ATragMX_Display { idc=170021; w="0.082"; h="0.035"; - x="0.550*safezoneW+safezoneX+0.128"; - y="0.265*safezoneH+safezoneY+0.29"; + x="0.550*safeZoneW+safeZoneX+0.128"; + y="0.265*safeZoneH+safeZoneY+0.29"; text="0"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_2: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170022; - y="0.265*safezoneH+safezoneY+0.325"; + y="0.265*safeZoneH+safeZoneY+0.325"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_3: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170023; - y="0.265*safezoneH+safezoneY+0.360"; + y="0.265*safeZoneH+safeZoneY+0.360"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_4: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170024; - y="0.265*safezoneH+safezoneY+0.395"; + y="0.265*safeZoneH+safeZoneY+0.395"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_5: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170025; - y="0.265*safezoneH+safezoneY+0.430"; + y="0.265*safeZoneH+safeZoneY+0.430"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_6: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170026; - y="0.265*safezoneH+safezoneY+0.465"; + y="0.265*safeZoneH+safeZoneY+0.465"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_7: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170027; - y="0.265*safezoneH+safezoneY+0.500"; + y="0.265*safeZoneH+safeZoneY+0.500"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_1: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1 { idc=170031; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_2: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_2 { idc=170032; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_3: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_3 { idc=170033; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_4: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_4 { idc=170034; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_5: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_5 { idc=170035; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_6: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_6 { idc=170036; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_C1_BALLISTIC_COEFFICIENT_INPUT_7: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_7 { idc=170037; - x="0.550*safezoneW+safezoneX+0.225"; + x="0.550*safeZoneW+safeZoneX+0.225"; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_QUESTIONMARK: TEXT_TARGET_DATA_NEXT { idc=17004; style=ST_CENTER; w="0.04"; h="0.035"; - y="0.265*safezoneH+safezoneY+0.35"; + y="0.265*safeZoneH+safeZoneY+0.35"; text="?"; action=""; }; class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_CLEAR: TEXT_C1_BALLISTIC_COEFFICIENT_DATA_QUESTIONMARK { idc=17005; w="0.07"; - y="0.265*safezoneH+safezoneY+0.4175"; + y="0.265*safeZoneH+safeZoneY+0.4175"; text="Clear"; action=QUOTE(call FUNC(clear_c1_ballistic_coefficient_data)); }; @@ -1711,8 +1711,8 @@ class ATragMX_Display { class TEXT_TRUING_DROP_ZERO_RANGE: ATragMX_RscText { idc=18000; style=ST_LEFT; - x="0.550*safezoneW+safezoneX+0.115"; - y="0.265*safezoneH+safezoneY+0.220"; + x="0.550*safeZoneW+safeZoneX+0.115"; + y="0.265*safeZoneH+safeZoneY+0.220"; w="0.135"; h="0.03"; sizeEx="0.025"; @@ -1721,29 +1721,29 @@ class ATragMX_Display { class TEXT_TRUING_DROP_DROP_UNIT: TEXT_TRUING_DROP_ZERO_RANGE { idc=18001; style=ST_LEFT; - x="0.550*safezoneW+safezoneX+0.25"; + x="0.550*safeZoneW+safeZoneX+0.25"; text="Drop=mil"; }; class TEXT_TRUING_DROP_TARGET_RANGE: TEXT_TRUING_DROP_ZERO_RANGE { idc=18002; - y="0.265*safezoneH+safezoneY+0.35"; + y="0.265*safeZoneH+safeZoneY+0.35"; sizeEx="0.027"; text="Target Range"; }; class TEXT_TRUING_DROP_DROP: TEXT_TRUING_DROP_TARGET_RANGE { idc=18003; w="0.07"; - y="0.265*safezoneH+safezoneY+0.40"; + y="0.265*safeZoneH+safeZoneY+0.40"; text="Drop"; }; class TEXT_TRUING_DROP_MUZZLE_VELOCITY: TEXT_TRUING_DROP_DROP { idc=18004; - y="0.265*safezoneH+safezoneY+0.50"; + y="0.265*safeZoneH+safeZoneY+0.50"; text="MV"; }; class TEXT_TRUING_DROP_C1_BALLISTIC_COEFFICIENT: TEXT_TRUING_DROP_DROP { idc=18005; - y="0.265*safezoneH+safezoneY+0.55"; + y="0.265*safeZoneH+safeZoneY+0.55"; text="C1"; }; class TEXT_TRUING_DROP_DROP_OUTPUT: ATragMX_RscEdit { @@ -1752,31 +1752,31 @@ class ATragMX_Display { colorBackground[]={0.15,0.21,0.23,0.3}; colorDisabled[]={0,0,0,1}; w="0.06"; - y="0.265*safezoneH+safezoneY+0.40"; - x="0.550*safezoneW+safezoneX+0.17"; + y="0.265*safeZoneH+safeZoneY+0.40"; + x="0.550*safeZoneW+safeZoneX+0.17"; text=""; }; class TEXT_TRUING_DROP_MUZZLE_VELOCITY_OUTPUT: TEXT_TRUING_DROP_DROP_OUTPUT { idc=18007; - y="0.265*safezoneH+safezoneY+0.50"; + y="0.265*safeZoneH+safeZoneY+0.50"; text=""; }; class TEXT_TRUING_DROP_C1_BALLISTIC_COEFFICIENT_OUTPUT: TEXT_TRUING_DROP_DROP_OUTPUT { idc=18008; - y="0.265*safezoneH+safezoneY+0.55"; + y="0.265*safeZoneH+safeZoneY+0.55"; text=""; }; class TEXT_TRUING_DROP_SUPER: TEXT_TARGET_A { idc=18009; w="0.06"; - x="0.550*safezoneW+safezoneX+0.25"; - y="0.265*safezoneH+safezoneY+0.30"; + x="0.550*safeZoneW+safeZoneX+0.25"; + y="0.265*safeZoneH+safeZoneY+0.30"; text="SUPER"; action=QUOTE(GVAR(truingDropMode) = 0; call FUNC(update_truing_drop_selection)); }; class TEXT_TRUING_DROP_SUB: TEXT_TRUING_DROP_SUPER { idc=18010; - x="0.550*safezoneW+safezoneX+0.32"; + x="0.550*safeZoneW+safeZoneX+0.32"; text="SUB"; action=QUOTE(GVAR(truingDropMode) = 1; call FUNC(update_truing_drop_selection)); }; @@ -1785,56 +1785,56 @@ class ATragMX_Display { style=QUOTE(ST_WITH_RECT+ST_RIGHT); colorDisabled[]={0,0,0,0.6}; w="0.06"; - x="0.550*safezoneW+safezoneX+0.25"; - y="0.265*safezoneH+safezoneY+0.35"; + x="0.550*safeZoneW+safeZoneX+0.25"; + y="0.265*safeZoneH+safeZoneY+0.35"; }; class TEXT_TRUING_DROP_TARGET_RANGE_SUB_INPUT: TEXT_TRUING_DROP_TARGET_RANGE_SUPER_INPUT { idc=18012; - x="0.550*safezoneW+safezoneX+0.32"; + x="0.550*safeZoneW+safeZoneX+0.32"; }; class TEXT_TRUING_DROP_DROP_SUPER_INPUT: TEXT_TRUING_DROP_TARGET_RANGE_SUPER_INPUT { idc=18013; - y="0.265*safezoneH+safezoneY+0.40"; + y="0.265*safeZoneH+safeZoneY+0.40"; }; class TEXT_TRUING_DROP_DROP_SUB_INPUT: TEXT_TRUING_DROP_TARGET_RANGE_SUB_INPUT { idc=18014; - y="0.265*safezoneH+safezoneY+0.40"; + y="0.265*safeZoneH+safeZoneY+0.40"; }; class TEXT_TRUING_DROP_CALC: TEXT_GUN_LIST { idc=18015; style=ST_CENTER; w="0.11"; - x="0.550*safezoneW+safezoneX+0.26"; - y="0.265*safezoneH+safezoneY+0.45"; + x="0.550*safeZoneW+safeZoneX+0.26"; + y="0.265*safeZoneH+safeZoneY+0.45"; text="Calc"; action=QUOTE(true call FUNC(calculate_truing_drop)); }; class TEXT_TRUING_DROP_MV_INPUT: TEXT_TRUING_DROP_TARGET_RANGE_SUPER_INPUT { idc=18016; - y="0.265*safezoneH+safezoneY+0.50"; + y="0.265*safeZoneH+safeZoneY+0.50"; }; class TEXT_TRUING_DROP_C1_BALLISTIC_COEFFICIENT_INPUT: TEXT_TRUING_DROP_TARGET_RANGE_SUB_INPUT { idc=18017; - y="0.265*safezoneH+safezoneY+0.55"; + y="0.265*safeZoneH+safeZoneY+0.55"; }; class TEXT_TRUING_DROP_ACCEPT: TEXT_GUN_LIST { idc=18018; w="0.085"; h="0.04"; - x="0.550*safezoneW+safezoneX+0.125"; - y="0.265*safezoneH+safezoneY+0.60"; + x="0.550*safeZoneW+safeZoneX+0.125"; + y="0.265*safeZoneH+safeZoneY+0.60"; text="Accept"; action=QUOTE(1 call FUNC(toggle_truing_drop)); }; class TEXT_TRUING_DROP_CANCEL: TEXT_TRUING_DROP_ACCEPT { idc=18019; - x="0.550*safezoneW+safezoneX+0.210"; + x="0.550*safeZoneW+safeZoneX+0.210"; text="Cancel"; action=QUOTE(0 call FUNC(toggle_truing_drop)); }; class TEXT_TRUING_DROP_RESTORE: TEXT_TRUING_DROP_CANCEL { idc=18020; - x="0.550*safezoneW+safezoneX+0.29525"; + x="0.550*safeZoneW+safeZoneX+0.29525"; text="Restore"; action=QUOTE(true call FUNC(restore_truing_drop)); }; diff --git a/addons/atragmx/functions/fnc_calculate_solution.sqf b/addons/atragmx/functions/fnc_calculate_solution.sqf index 5f09fb35b1b..e910017f2fc 100644 --- a/addons/atragmx/functions/fnc_calculate_solution.sqf +++ b/addons/atragmx/functions/fnc_calculate_solution.sqf @@ -110,8 +110,8 @@ _bulletPos set [1, 0]; _bulletPos set [2, -(_boreHeight / 100)]; _bulletVelocity set [0, 0]; -_bulletVelocity set [1, Cos(_scopeBaseAngle) * _muzzleVelocity]; -_bulletVelocity set [2, Sin(_scopeBaseAngle) * _muzzleVelocity]; +_bulletVelocity set [1, cos(_scopeBaseAngle) * _muzzleVelocity]; +_bulletVelocity set [2, sin(_scopeBaseAngle) * _muzzleVelocity]; while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do { _bulletSpeed = vectorMagnitude _bulletVelocity; @@ -153,9 +153,9 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do { _windage1 = - atan(_tx / _trueRange); _windDrift = (_wind2 select 0) * (_TOF - _trueRange / _muzzleVelocity); _windage2 = - atan(_windDrift / _trueRange); - _lead = (_targetSpeed * _TOF) / (Tan(MRAD_TO_DEG(1)) * _trueRange); + _lead = (_targetSpeed * _TOF) / (tan(MRAD_TO_DEG(1)) * _trueRange); }; - _kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); + private _kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); _kineticEnergy = _kineticEnergy * 0.737562149; if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (_bulletPos select 1) > 0) then { @@ -188,10 +188,10 @@ if (_targetRange != 0) then { _windage1 = - atan(_tx / _targetRange); _windDrift = (_wind2 select 0) * (_TOF - _targetRange / _muzzleVelocity); _windage2 = - atan(_windDrift / _targetRange); - _lead = (_targetSpeed * _TOF) / (Tan(MRAD_TO_DEG(1)) * _targetRange); + _lead = (_targetSpeed * _TOF) / (tan(MRAD_TO_DEG(1)) * _targetRange); }; -_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); +private _kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); _kineticEnergy = _kineticEnergy * 0.737562149; if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (_bulletPos select 1) > 0) then { diff --git a/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf b/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf index dc9c62c3fc5..5ad543ccc94 100644 --- a/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf @@ -68,7 +68,7 @@ switch (_this) do { }; }; - ctrlSetText [7010, Str(Round(_targetSize * 100) / 100)]; + ctrlSetText [7010, str(round(_targetSize * 100) / 100)]; }; case 1: { if (_estRange > 0) then { @@ -87,13 +87,13 @@ switch (_this) do { }; }; - ctrlSetText [7011, Str(Round(_imageSize * 100) / 100)]; + ctrlSetText [7011, str(round(_imageSize * 100) / 100)]; }; case 2: { if (tan(_imageSize) != 0) then { _estRange = _targetSize / tan(_imageSize); }; - ctrlSetText [7013, Str(Round(_estRange))]; + ctrlSetText [7013, str(round(_estRange))]; }; }; diff --git a/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf b/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf index 69af9eba165..25106c794e9 100644 --- a/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf @@ -44,4 +44,4 @@ if (GVAR(currentUnit) != 2) then { _estSpeed = _estSpeed * 2.23693629; }; -ctrlSetText [8007, Str(Round(_estSpeed * 10) / 10)]; +ctrlSetText [8007, str(round(_estSpeed * 10) / 10)]; diff --git a/addons/atragmx/functions/fnc_calculate_truing_drop.sqf b/addons/atragmx/functions/fnc_calculate_truing_drop.sqf index 5191848d050..5f7adee2838 100644 --- a/addons/atragmx/functions/fnc_calculate_truing_drop.sqf +++ b/addons/atragmx/functions/fnc_calculate_truing_drop.sqf @@ -29,8 +29,8 @@ if (_parseInput) then { _transonicRange = _transonicRange * 0.9144; _subsonicRange = _subsonicRange * 0.9144; }; - _transonicRange = Round(_transonicRange); - _subsonicRange = Round(_subsonicRange); + _transonicRange = round(_transonicRange); + _subsonicRange = round(_subsonicRange); _subsonicRange = _transonicRange max _subsonicRange; @@ -54,8 +54,8 @@ if (_parseInput) then { _subsonicDrop = _subsonicDrop / 1.047; }; }; - _transonicDrop = Round(_transonicDrop * 100) / 100; - _subsonicDrop = Round(_subsonicDrop * 100) / 100; + _transonicDrop = round(_transonicDrop * 100) / 100; + _subsonicDrop = round(_subsonicDrop * 100) / 100; _subsonicDrop = _transonicDrop max _subsonicDrop; }; @@ -67,11 +67,11 @@ if ((GVAR(truingDropDropData) select 0) == 0 || {[_transonicRange, _subsonicRang private _solutionInput = +GVAR(targetSolutionInput); if (_transonicRange == 0) then { - _transonicRange = Round(403 call FUNC(calculate_distance_at_velocity)); + _transonicRange = round(403 call FUNC(calculate_distance_at_velocity)); }; _solutionInput set [13, _transonicRange]; private _result1 = _solutionInput call FUNC(calculate_solution); - _transonicDrop = Round((_result1 select 0) * 100) / 100; + _transonicDrop = round((_result1 select 0) * 100) / 100; GVAR(truingDropRangeData) set [0, _transonicRange]; GVAR(truingDropDropData) set [1, _transonicDrop]; GVAR(truingDropReferenceDropData) set [0, _transonicDrop]; @@ -84,11 +84,11 @@ if ((GVAR(truingDropDropData) select 0) == 0 || {[_transonicRange, _subsonicRang } else { _subsonicRange = _subsonicRange + 200 * 1.0936133; }; - _subsonicRange = Round(_subsonicRange); + _subsonicRange = round(_subsonicRange); }; _solutionInput set [13, _subsonicRange]; private _result2 = _solutionInput call FUNC(calculate_solution); - _subsonicDrop = Round((_result2 select 0) * 100) / 100; + _subsonicDrop = round((_result2 select 0) * 100) / 100; GVAR(truingDropRangeData) set [1, _subsonicRange]; GVAR(truingDropDropData) set [2, _subsonicDrop]; GVAR(truingDropReferenceDropData) set [1, _subsonicDrop]; diff --git a/addons/atragmx/functions/fnc_parse_input.sqf b/addons/atragmx/functions/fnc_parse_input.sqf index 1c3ea3398a5..4f62f301160 100644 --- a/addons/atragmx/functions/fnc_parse_input.sqf +++ b/addons/atragmx/functions/fnc_parse_input.sqf @@ -100,11 +100,11 @@ if (GVAR(currentUnit) == 1) then { _targetRange = 25 max _targetRange min 3700; }; GVAR(targetRangeDirtyFlag) = GVAR(targetRangeDirtyFlag) || {_targetRange != GVAR(targetRange) select GVAR(currentTarget)}; -GVAR(latitude) set [GVAR(currentTarget), -90 max Round(parseNumber(ctrlText 140000)) min 90]; -GVAR(directionOfFire) set [GVAR(currentTarget), 0 max abs(Round(parseNumber(ctrlText 140010))) min 359]; +GVAR(latitude) set [GVAR(currentTarget), -90 max round(parseNumber(ctrlText 140000)) min 90]; +GVAR(directionOfFire) set [GVAR(currentTarget), 0 max abs(round(parseNumber(ctrlText 140010))) min 359]; GVAR(windSpeed1) set [GVAR(currentTarget), _windSpeed1]; GVAR(windSpeed2) set [GVAR(currentTarget), _windSpeed2]; -GVAR(windDirection) set [GVAR(currentTarget), 1 max Round(parseNumber(ctrlText 140030)) min 12]; +GVAR(windDirection) set [GVAR(currentTarget), 1 max round(parseNumber(ctrlText 140030)) min 12]; GVAR(targetSpeed) set [GVAR(currentTarget), _targetSpeed]; GVAR(targetRange) set [GVAR(currentTarget), _targetRange]; private _inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1; @@ -112,7 +112,7 @@ private _inclinationAngleDegree = -60 max round(parseNumber(ctrlText 140040)) mi if (_inclinationAngleDegree != GVAR(inclinationAngle) select GVAR(currentTarget)) then { GVAR(inclinationAngle) set [GVAR(currentTarget), _inclinationAngleDegree]; } else { - if (_inclinationAngleCosine != Round(cos(GVAR(inclinationAngle) select GVAR(currentTarget)) * 100) / 100) then { + if (_inclinationAngleCosine != round(cos(GVAR(inclinationAngle) select GVAR(currentTarget)) * 100) / 100) then { GVAR(inclinationAngle) set [GVAR(currentTarget), round(acos(_inclinationAngleCosine))]; }; }; diff --git a/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf b/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf index f7e4709cc11..0d5c83ae01c 100644 --- a/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf +++ b/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf @@ -45,7 +45,7 @@ for "_index" from 1 to (_lookupTableSize - 1) do { (_lookupTable select _lowerIndex) params ["_lowerDistance", "_lowerMuzzleVelocity"]; (_lookupTable select _upperIndex) params ["_upperDistance", "_upperMuzzleVelocity"]; -_muzzleVelocity = 100 max (linearConversion [_lowerDistance, _upperDistance, GVAR(temperature), _lowerMuzzleVelocity, _upperMuzzleVelocity]) min 1400; +private _muzzleVelocity = 100 max (linearConversion [_lowerDistance, _upperDistance, GVAR(temperature), _lowerMuzzleVelocity, _upperMuzzleVelocity]) min 1400; if (_muzzleVelocity != GVAR(workingMemory) select 1) then { GVAR(workingMemory) set [1, _muzzleVelocity]; diff --git a/addons/atragmx/functions/fnc_show_range_card_setup.sqf b/addons/atragmx/functions/fnc_show_range_card_setup.sqf index 15558ceb983..a4301f5b761 100644 --- a/addons/atragmx/functions/fnc_show_range_card_setup.sqf +++ b/addons/atragmx/functions/fnc_show_range_card_setup.sqf @@ -22,7 +22,7 @@ GVAR(showRangeCardSetup) = _this; if (_this) then { ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 10006); - ctrlSetText [10003, Str(Round(GVAR(rangeCardStartRange)))]; - ctrlSetText [10004, Str(Round(GVAR(rangeCardEndRange)))]; - ctrlSetText [10005, Str(Round(GVAR(rangeCardIncrement)))]; + ctrlSetText [10003, str(round(GVAR(rangeCardStartRange)))]; + ctrlSetText [10004, str(round(GVAR(rangeCardEndRange)))]; + ctrlSetText [10005, str(round(GVAR(rangeCardIncrement)))]; }; diff --git a/addons/atragmx/functions/fnc_show_target_range_assist.sqf b/addons/atragmx/functions/fnc_show_target_range_assist.sqf index 83516ef5c6a..b13352d22f9 100644 --- a/addons/atragmx/functions/fnc_show_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_show_target_range_assist.sqf @@ -21,8 +21,8 @@ GVAR(showTargetRangeAssist) = _this; if (_this) then { ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 7018); - ctrlSetText [7012, Str(parseNumber(ctrlText 320))]; - ctrlSetText [7013, Str(parseNumber(ctrlText 340))]; + ctrlSetText [7012, str(parseNumber(ctrlText 320))]; + ctrlSetText [7013, str(parseNumber(ctrlText 340))]; if (GVAR(currentUnit) == 1) then { ctrlSetText [7016, "Yards"]; diff --git a/addons/atragmx/functions/fnc_show_target_speed_assist.sqf b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf index 3efa6ed6d43..c2b34bd9081 100644 --- a/addons/atragmx/functions/fnc_show_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf @@ -22,7 +22,7 @@ GVAR(showTargetSpeedAssist) = _this; if (_this) then { ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 8012); - ctrlSetText [8004, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))]; + ctrlSetText [8004, str(round((GVAR(targetRange) select GVAR(currentTarget))))]; if (GVAR(currentUnit) == 1) then { ctrlSetText [8008, "Yards"]; diff --git a/addons/atragmx/functions/fnc_show_truing_drop.sqf b/addons/atragmx/functions/fnc_show_truing_drop.sqf index 5e7f60f4d4e..f75d3f7758c 100644 --- a/addons/atragmx/functions/fnc_show_truing_drop.sqf +++ b/addons/atragmx/functions/fnc_show_truing_drop.sqf @@ -21,9 +21,9 @@ GVAR(showTruingDrop) = _this; if (_this) then { if (GVAR(currentUnit) == 2) then { - ctrlSetText [18000, format["ZR=%1meters", Round(GVAR(workingMemory) select 2)]]; + ctrlSetText [18000, format["ZR=%1meters", round(GVAR(workingMemory) select 2)]]; } else { - ctrlSetText [18000, format["ZR=%1yards", Round((GVAR(workingMemory) select 2) * 1.0936133)]]; + ctrlSetText [18000, format["ZR=%1yards", round((GVAR(workingMemory) select 2) * 1.0936133)]]; }; private _dropUnit = GVAR(currentScopeUnit); if (_dropUnit == 3) then { diff --git a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf index 5408edee3af..40c0ac7cd8f 100644 --- a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf +++ b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf @@ -29,7 +29,7 @@ if !(ctrlVisible 9000) then { if !(GVAR(speedAssistTimer)) exitWith { GVAR(speedAssistTimer) = true; - ctrlSetText [8006, Str(Round((CBA_missionTime - _startTime) * 10) / 10)]; + ctrlSetText [8006, str(round((CBA_missionTime - _startTime) * 10) / 10)]; [] call FUNC(calculate_target_speed_assist); @@ -39,7 +39,7 @@ if !(ctrlVisible 9000) then { [_this select 1] call CBA_fnc_removePerFrameHandler; }; - ctrlSetText [9001, Str(Round((CBA_missionTime - _startTime) * 10) / 10)]; + ctrlSetText [9001, str(round((CBA_missionTime - _startTime) * 10) / 10)]; }, 0.1, [CBA_missionTime]] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf index 5c499b8b826..29c856013b4 100644 --- a/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf +++ b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf @@ -20,9 +20,9 @@ if (ctrlVisible 10000) then { true call FUNC(show_range_card); if (_this == 1) then { - GVAR(rangeCardStartRange) = 0 max Round(parseNumber(ctrlText 10003)) min 3000; - GVAR(rangeCardEndRange) = 0 max Round(parseNumber(ctrlText 10004)) min 3000; - GVAR(rangeCardIncrement) = 1 max Round(parseNumber(ctrlText 10005)) min 3000; + GVAR(rangeCardStartRange) = 0 max round(parseNumber(ctrlText 10003)) min 3000; + GVAR(rangeCardEndRange) = 0 max round(parseNumber(ctrlText 10004)) min 3000; + GVAR(rangeCardIncrement) = 1 max round(parseNumber(ctrlText 10005)) min 3000; [] call FUNC(calculate_range_card); [] call FUNC(update_range_card); diff --git a/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf index 1e6c485e995..dd14f2ddcd0 100644 --- a/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf @@ -20,10 +20,10 @@ if (ctrlVisible 7000) then { true call FUNC(show_main_page); if (_this == 1) then { - ctrlSetText [320, Str(parseNumber(ctrlText 7012))]; - ctrlSetText [140040, Str(parseNumber(ctrlText 7012))]; - ctrlSetText [340, Str(parseNumber(ctrlText 7013))]; - ctrlSetText [140060, Str(parseNumber(ctrlText 7013))]; + ctrlSetText [320, str(parseNumber(ctrlText 7012))]; + ctrlSetText [140040, str(parseNumber(ctrlText 7012))]; + ctrlSetText [340, str(parseNumber(ctrlText 7013))]; + ctrlSetText [140060, str(parseNumber(ctrlText 7013))]; [] call FUNC(calculate_target_solution); }; } else { diff --git a/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf index 009074105e8..fec9e528e57 100644 --- a/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf @@ -23,8 +23,8 @@ if (ctrlVisible 8000) then { [] call FUNC(calculate_target_speed_assist); private _targetSpeed = parseNumber(ctrlText 8007); if (_targetSpeed != 0) then { - ctrlSetText [330, Str(_targetSpeed)]; - ctrlSetText [140050, Str(_targetSpeed)]; + ctrlSetText [330, str(_targetSpeed)]; + ctrlSetText [140050, str(_targetSpeed)]; [] call FUNC(calculate_target_solution); }; }; diff --git a/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf b/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf index 84371ca8527..06824cc7a20 100644 --- a/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf +++ b/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf @@ -18,7 +18,7 @@ private _referenceDrop = GVAR(truingDropDropData) select 0; private _actualDrop = GVAR(truingDropDropData) select 2; -if (Round(_actualDrop * 10) / 10 == Round(_referenceDrop * 10) / 10) exitWith {}; +if (round(_actualDrop * 10) / 10 == round(_referenceDrop * 10) / 10) exitWith {}; private _step = 0.01; if (_actualDrop > _referenceDrop) then { diff --git a/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf b/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf index f8fb9e621c4..75e1fbdc78d 100644 --- a/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf +++ b/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf @@ -18,7 +18,7 @@ private _referenceDrop = GVAR(truingDropDropData) select 0; private _actualDrop = GVAR(truingDropDropData) select 1; -if (Round(_actualDrop * 10) / 10 == Round(_referenceDrop * 10) / 10) exitWith {}; +if (round(_actualDrop * 10) / 10 == round(_referenceDrop * 10) / 10) exitWith {}; private _step = 10; if (_actualDrop > _referenceDrop) then { diff --git a/addons/atragmx/functions/fnc_update_atmo_env_data.sqf b/addons/atragmx/functions/fnc_update_atmo_env_data.sqf index 340924b5aa7..3118bee2233 100644 --- a/addons/atragmx/functions/fnc_update_atmo_env_data.sqf +++ b/addons/atragmx/functions/fnc_update_atmo_env_data.sqf @@ -18,20 +18,20 @@ ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 13007); if (GVAR(currentUnit) == 2) then { - ctrlSetText [130040, Str(Round(GVAR(temperature) * 10) / 10)]; + ctrlSetText [130040, str(round(GVAR(temperature) * 10) / 10)]; } else { - ctrlSetText [130040, Str(Round((GVAR(temperature) * 1.8 + 32) * 10) / 10)]; + ctrlSetText [130040, str(round((GVAR(temperature) * 1.8 + 32) * 10) / 10)]; }; if (GVAR(currentUnit) == 2) then { - ctrlSetText [130050, Str(Round(GVAR(barometricPressure)))]; + ctrlSetText [130050, str(round(GVAR(barometricPressure)))]; } else { - ctrlSetText [130050, Str(Round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)]; + ctrlSetText [130050, str(round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)]; }; -ctrlSetText [130060, Str(Round(GVAR(relativeHumidity) * 100 * 10) / 10)]; +ctrlSetText [130060, str(round(GVAR(relativeHumidity) * 100 * 10) / 10)]; if (GVAR(currentUnit) == 2) then { - ctrlSetText [130030, Str(Round(GVAR(altitude)))]; + ctrlSetText [130030, str(round(GVAR(altitude)))]; } else { - ctrlSetText [130030, Str(Round(GVAR(altitude) * 3.2808399))]; + ctrlSetText [130030, str(round(GVAR(altitude) * 3.2808399))]; }; if (GVAR(currentUnit) == 2) then { diff --git a/addons/atragmx/functions/fnc_update_atmosphere.sqf b/addons/atragmx/functions/fnc_update_atmosphere.sqf index 7d523158925..ac04d19ba9a 100644 --- a/addons/atragmx/functions/fnc_update_atmosphere.sqf +++ b/addons/atragmx/functions/fnc_update_atmosphere.sqf @@ -16,18 +16,18 @@ */ if (GVAR(currentUnit) == 2) then { - ctrlSetText [200, Str(Round(GVAR(temperature) * 10) / 10)]; + ctrlSetText [200, str(round(GVAR(temperature) * 10) / 10)]; } else { - ctrlSetText [200, Str(Round((GVAR(temperature) * 1.8 + 32) * 10) / 10)]; + ctrlSetText [200, str(round((GVAR(temperature) * 1.8 + 32) * 10) / 10)]; }; if (GVAR(currentUnit) == 2) then { - ctrlSetText [210, Str(Round(GVAR(barometricPressure)))]; + ctrlSetText [210, str(round(GVAR(barometricPressure)))]; } else { - ctrlSetText [210, Str(Round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)]; + ctrlSetText [210, str(round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)]; }; -ctrlSetText [220, Str(Round(GVAR(relativeHumidity) * 100 * 10) / 10)]; +ctrlSetText [220, str(round(GVAR(relativeHumidity) * 100 * 10) / 10)]; if (GVAR(currentUnit) == 2) then { - ctrlSetText [230, Str(Round(GVAR(altitude)))]; + ctrlSetText [230, str(round(GVAR(altitude)))]; } else { - ctrlSetText [230, Str(Round(GVAR(altitude) * 3.2808399))]; + ctrlSetText [230, str(round(GVAR(altitude) * 3.2808399))]; }; diff --git a/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf index 4c0c6d7175b..886ad33ba97 100644 --- a/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf +++ b/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf @@ -17,9 +17,9 @@ // Distances if (GVAR(currentUnit) != 1) then { - {ctrlSetText [_x, Str(Round(((GVAR(workingMemory) select 19) select _forEachIndex) select 0))]} forEach [170021, 170022, 170023, 170024, 170025, 170026, 170027]; + {ctrlSetText [_x, str(round(((GVAR(workingMemory) select 19) select _forEachIndex) select 0))]} forEach [170021, 170022, 170023, 170024, 170025, 170026, 170027]; } else { - {ctrlSetText [_x, Str(Round((((GVAR(workingMemory) select 19) select _forEachIndex) select 0) * 1.0936133))]} forEach [170021, 170022, 170023, 170024, 170025, 170026, 170027]; + {ctrlSetText [_x, str(round((((GVAR(workingMemory) select 19) select _forEachIndex) select 0) * 1.0936133))]} forEach [170021, 170022, 170023, 170024, 170025, 170026, 170027]; }; // Ballistic coefficients -{ctrlSetText [_x, Str(Round((((GVAR(workingMemory) select 19) select _forEachIndex) select 1) * 1000) / 1000)]} forEach [170031, 170032, 170033, 170034, 170035, 170036, 170037]; +{ctrlSetText [_x, str(round((((GVAR(workingMemory) select 19) select _forEachIndex) select 1) * 1000) / 1000)]} forEach [170031, 170032, 170033, 170034, 170035, 170036, 170037]; diff --git a/addons/atragmx/functions/fnc_update_gun.sqf b/addons/atragmx/functions/fnc_update_gun.sqf index 5a5dab00fa8..67f726e92e6 100644 --- a/addons/atragmx/functions/fnc_update_gun.sqf +++ b/addons/atragmx/functions/fnc_update_gun.sqf @@ -17,34 +17,34 @@ ctrlSetText [1000, GVAR(workingMemory) select 0]; if (GVAR(currentUnit) != 2) then { - ctrlSetText [100, Str(Round((GVAR(workingMemory) select 5) / 2.54 * 100) / 100)]; + ctrlSetText [100, str(round((GVAR(workingMemory) select 5) / 2.54 * 100) / 100)]; } else { - ctrlSetText [100, Str(Round((GVAR(workingMemory) select 5) * 100) / 100)]; + ctrlSetText [100, str(round((GVAR(workingMemory) select 5) * 100) / 100)]; }; if (GVAR(currentUnit) != 2) then { - ctrlSetText [110, Str(Round((GVAR(workingMemory) select 12) * 15.4323584))]; + ctrlSetText [110, str(round((GVAR(workingMemory) select 12) * 15.4323584))]; } else { - ctrlSetText [110, Str(Round((GVAR(workingMemory) select 12) * 10) / 10)]; + ctrlSetText [110, str(round((GVAR(workingMemory) select 12) * 10) / 10)]; }; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - ctrlSetText [120, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)]; + ctrlSetText [120, str(round((GVAR(workingMemory) select 15) * 1000) / 1000)]; } else { - ctrlSetText [120, Str(Round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)]; + ctrlSetText [120, str(round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)]; }; if (GVAR(currentUnit) != 2) then { - ctrlSetText [130, Str(Round((GVAR(workingMemory) select 1) * 3.2808399))]; + ctrlSetText [130, str(round((GVAR(workingMemory) select 1) * 3.2808399))]; } else { - ctrlSetText [130, Str(Round(GVAR(workingMemory) select 1))]; + ctrlSetText [130, str(round(GVAR(workingMemory) select 1))]; }; switch (GVAR(currentUnit)) do { case 0: { - ctrlSetText [140, format["*%1", Round(GVAR(workingMemory) select 2)]]; + ctrlSetText [140, format["*%1", round(GVAR(workingMemory) select 2)]]; }; case 1: { - ctrlSetText [140, Str(Round((GVAR(workingMemory) select 2) * 1.0936133))]; + ctrlSetText [140, str(round((GVAR(workingMemory) select 2) * 1.0936133))]; }; case 2: { - ctrlSetText [140, Str(Round(GVAR(workingMemory) select 2))]; + ctrlSetText [140, str(round(GVAR(workingMemory) select 2))]; }; }; [] call FUNC(update_scope_unit); diff --git a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf index 59bd0149733..56347ac6db6 100644 --- a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf +++ b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf @@ -18,39 +18,39 @@ ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 12008); if (GVAR(currentUnit) != 2) then { - ctrlSetText [120000, Str(Round((GVAR(workingMemory) select 5) / 2.54 * 100) / 100)]; + ctrlSetText [120000, str(round((GVAR(workingMemory) select 5) / 2.54 * 100) / 100)]; } else { - ctrlSetText [120000, Str(Round((GVAR(workingMemory) select 5) * 100) / 100)]; + ctrlSetText [120000, str(round((GVAR(workingMemory) select 5) * 100) / 100)]; }; if (GVAR(currentUnit) != 2) then { - ctrlSetText [120010, Str(Round((GVAR(workingMemory) select 12) * 15.4323584))]; + ctrlSetText [120010, str(round((GVAR(workingMemory) select 12) * 15.4323584))]; } else { - ctrlSetText [120010, Str(Round((GVAR(workingMemory) select 12) * 10) / 10)]; + ctrlSetText [120010, str(round((GVAR(workingMemory) select 12) * 10) / 10)]; }; if (GVAR(currentUnit) != 2) then { - ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) / 10 / 2.54 * 1000) / 1000)]; + ctrlSetText [120020, str(round((GVAR(workingMemory) select 13) / 10 / 2.54 * 1000) / 1000)]; } else { - ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) / 10 * 1000) / 1000)]; + ctrlSetText [120020, str(round((GVAR(workingMemory) select 13) / 10 * 1000) / 1000)]; }; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - ctrlSetText [120030, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)]; + ctrlSetText [120030, str(round((GVAR(workingMemory) select 15) * 1000) / 1000)]; } else { - ctrlSetText [120030, Str(Round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)]; + ctrlSetText [120030, str(round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)]; }; if (GVAR(currentUnit) != 2) then { - ctrlSetText [120040, Str(Round((GVAR(workingMemory) select 14) / 2.54 * 10) / 10)]; + ctrlSetText [120040, str(round((GVAR(workingMemory) select 14) / 2.54 * 10) / 10)]; } else { - ctrlSetText [120040, Str(Round((GVAR(workingMemory) select 14) * 100) / 100)]; + ctrlSetText [120040, str(round((GVAR(workingMemory) select 14) * 100) / 100)]; }; if (GVAR(currentUnit) != 2) then { - ctrlSetText [120050, Str(Round((GVAR(workingMemory) select 1) * 3.2808399))]; + ctrlSetText [120050, str(round((GVAR(workingMemory) select 1) * 3.2808399))]; } else { - ctrlSetText [120050, Str(Round(GVAR(workingMemory) select 1))]; + ctrlSetText [120050, str(round(GVAR(workingMemory) select 1))]; }; if (GVAR(currentUnit) == 1) then { - ctrlSetText [120060, Str(Round((GVAR(workingMemory) select 2) * 1.0936133))]; + ctrlSetText [120060, str(round((GVAR(workingMemory) select 2) * 1.0936133))]; } else { - ctrlSetText [120060, Str(Round(GVAR(workingMemory) select 2))]; + ctrlSetText [120060, str(round(GVAR(workingMemory) select 2))]; }; if (GVAR(currentUnit) == 0) then { ctrlSetText [120061, "*"]; diff --git a/addons/atragmx/functions/fnc_update_inclination_angle.sqf b/addons/atragmx/functions/fnc_update_inclination_angle.sqf index 532b3d94e8f..b7ae40160c6 100644 --- a/addons/atragmx/functions/fnc_update_inclination_angle.sqf +++ b/addons/atragmx/functions/fnc_update_inclination_angle.sqf @@ -19,7 +19,7 @@ private _inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1; private _inclinationAngleDegree = -60 max parseNumber(ctrlText 140040) min 60; if (_this == 0) then { - ctrlSetText [140040, Str(round(acos(_inclinationAngleCosine)))]; + ctrlSetText [140040, str(round(acos(_inclinationAngleCosine)))]; } else { - ctrlSetText [140041, Str(round(cos(_inclinationAngleDegree) * 100) / 100)]; + ctrlSetText [140041, str(round(cos(_inclinationAngleDegree) * 100) / 100)]; }; diff --git a/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf index 23193aa9036..36af09d6427 100644 --- a/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf +++ b/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf @@ -17,12 +17,12 @@ if (GVAR(currentUnit) == 2) then { // Temperatures - {ctrlSetText [_x, Str(Round((((GVAR(workingMemory) select 18) select _forEachIndex) select 0) * 10) / 10)]} forEach [160021, 160022, 160023, 160024, 160025, 160026, 160027]; + {ctrlSetText [_x, str(round((((GVAR(workingMemory) select 18) select _forEachIndex) select 0) * 10) / 10)]} forEach [160021, 160022, 160023, 160024, 160025, 160026, 160027]; // Muzzle velocities - {ctrlSetText [_x, Str(Round(((GVAR(workingMemory) select 18) select _forEachIndex) select 1))]} forEach [160031, 160032, 160033, 160034, 160035, 160036, 160037]; + {ctrlSetText [_x, str(round(((GVAR(workingMemory) select 18) select _forEachIndex) select 1))]} forEach [160031, 160032, 160033, 160034, 160035, 160036, 160037]; } else { // Temperatures - {ctrlSetText [_x, Str(Round(((((GVAR(workingMemory) select 18) select _forEachIndex) select 0) * 1.8 + 32) * 10) / 10)]} forEach [160021, 160022, 160023, 160024, 160025, 160026, 160027]; + {ctrlSetText [_x, str(round(((((GVAR(workingMemory) select 18) select _forEachIndex) select 0) * 1.8 + 32) * 10) / 10)]} forEach [160021, 160022, 160023, 160024, 160025, 160026, 160027]; // Muzzle velocities - {ctrlSetText [_x, Str(Round((((GVAR(workingMemory) select 18) select _forEachIndex) select 1) * 3.2808399))]} forEach [160031, 160032, 160033, 160034, 160035, 160036, 160037]; + {ctrlSetText [_x, str(round((((GVAR(workingMemory) select 18) select _forEachIndex) select 1) * 3.2808399))]} forEach [160031, 160032, 160033, 160034, 160035, 160036, 160037]; }; diff --git a/addons/atragmx/functions/fnc_update_range_card.sqf b/addons/atragmx/functions/fnc_update_range_card.sqf index 066bd651746..e280c7d137a 100644 --- a/addons/atragmx/functions/fnc_update_range_card.sqf +++ b/addons/atragmx/functions/fnc_update_range_card.sqf @@ -59,16 +59,16 @@ private _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSou private _clickNumber = GVAR(workingMemory) select 8; private _clickInterval = _clickSize / _clickNumber; - _elevation = Round(_elevation / _clickInterval); - _windage1 = Round(_windage1 / _clickInterval); - _windage2 = Round(_windage2 / _clickInterval); + _elevation = round(_elevation / _clickInterval); + _windage1 = round(_windage1 / _clickInterval); + _windage2 = round(_windage2 / _clickInterval); }; }; - private _elevationOutput = Str(Round(_elevation * 100) / 100); - private _windageOutput = Str(Round(_windage1 * 100) / 100); + private _elevationOutput = str(round(_elevation * 100) / 100); + private _windageOutput = str(round(_windage1 * 100) / 100); - private _rangeOutput = Str(_range); + private _rangeOutput = str(_range); if (_velocity < _speedOfSound) then { _rangeOutput = _rangeOutput + "*"; }; @@ -80,19 +80,19 @@ private _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSou switch (GVAR(rangeCardCurrentColumn)) do { case 0: { if (GVAR(showWind2)) then { - _lastColumnOutput = Str(Round(_windage2 * 100) / 100); + _lastColumnOutput = str(round(_windage2 * 100) / 100); } else { - _lastColumnOutput = Str(Round(_lead * 100) / 100); + _lastColumnOutput = str(round(_lead * 100) / 100); }; }; case 1: { - _lastColumnOutput = Str(Round(_velocity)); + _lastColumnOutput = str(round(_velocity)); }; case 2: { - _lastColumnOutput = Str(Round(_kineticEnergy)); + _lastColumnOutput = str(round(_kineticEnergy)); }; case 3: { - _lastColumnOutput = Str(Round(_TOF * 100) / 100); + _lastColumnOutput = str(round(_TOF * 100) / 100); } }; diff --git a/addons/atragmx/functions/fnc_update_result.sqf b/addons/atragmx/functions/fnc_update_result.sqf index cfd8f460a93..3e8d4ef9bd3 100644 --- a/addons/atragmx/functions/fnc_update_result.sqf +++ b/addons/atragmx/functions/fnc_update_result.sqf @@ -69,16 +69,16 @@ switch (GVAR(currentScopeUnit)) do { private _clickNumber = GVAR(workingMemory) select 8; private _clickInterval = _clickSize / _clickNumber; - _elevationAbs = Round(_elevationAbs / _clickInterval); - _windageAbs = Round(_windageAbs / _clickInterval); + _elevationAbs = round(_elevationAbs / _clickInterval); + _windageAbs = round(_windageAbs / _clickInterval); - _wind2 = Round(_wind2 / _clickInterval); + _wind2 = round(_wind2 / _clickInterval); - _elevationRel = Round(_elevationRel / _clickInterval); - _windageRel = Round(_windageRel / _clickInterval); + _elevationRel = round(_elevationRel / _clickInterval); + _windageRel = round(_windageRel / _clickInterval); - _elevationCur = Round(_elevationCur / _clickInterval); - _windageCur = Round(_windageCur / _clickInterval); + _elevationCur = round(_elevationCur / _clickInterval); + _windageCur = round(_windageCur / _clickInterval); }; }; @@ -88,7 +88,7 @@ if (GVAR(showWind2)) then { ctrlSetText [42, "Lead"]; }; -_elevationAbs = Round(_elevationAbs * 100) / 100; +_elevationAbs = round(_elevationAbs * 100) / 100; if (_elevationAbs > 0) then { ctrlSetText [400, str abs _elevationAbs]; } else { @@ -98,7 +98,7 @@ if (_elevationAbs > 0) then { ctrlSetText [400, "0.0"]; }; }; -_elevationRel = Round(_elevationRel * 100) / 100; +_elevationRel = round(_elevationRel * 100) / 100; if (_elevationRel > 0) then { ctrlSetText [401, str abs _elevationRel]; } else { @@ -108,7 +108,7 @@ if (_elevationRel > 0) then { ctrlSetText [401, "0.0"]; }; }; -_elevationCur = Round(_elevationCur * 100) / 100; +_elevationCur = round(_elevationCur * 100) / 100; if (_elevationCur > 0) then { ctrlSetText [402, str abs _elevationCur]; } else { @@ -119,7 +119,7 @@ if (_elevationCur > 0) then { }; }; -_windageAbs = Round(_windageAbs * 100) / 100; +_windageAbs = round(_windageAbs * 100) / 100; if (_windageAbs > 0) then { ctrlSetText [410, format["%1R", abs(_windageAbs)]]; } else { @@ -129,7 +129,7 @@ if (_windageAbs > 0) then { ctrlSetText [410, "0.0"]; }; }; -_windageRel = Round(_windageRel * 100) / 100; +_windageRel = round(_windageRel * 100) / 100; if (_windageRel > 0) then { ctrlSetText [411, format["%1R", abs(_windageRel)]]; } else { @@ -139,7 +139,7 @@ if (_windageRel > 0) then { ctrlSetText [411, "0.0"]; }; }; -_windageCur = Round(_windageCur * 100) / 100; +_windageCur = round(_windageCur * 100) / 100; if (_windageCur > 0) then { ctrlSetText [412, format["%1R", abs(_windageCur)]]; } else { @@ -151,7 +151,7 @@ if (_windageCur > 0) then { }; if (GVAR(showWind2)) then { - _wind2 = Round(_wind2 * 100) / 100; + _wind2 = round(_wind2 * 100) / 100; if (_wind2 > 0) then { ctrlSetText [420, format["%1R", abs(_wind2)]]; } else { @@ -162,7 +162,7 @@ if (GVAR(showWind2)) then { }; }; } else { - _lead = Round(_lead * 100) / 100; + _lead = round(_lead * 100) / 100; if (_lead > 0) then { if ((GVAR(targetSpeedDirection) select GVAR(currentTarget)) == 1) then { ctrlSetText [420, format["%1R", abs(_lead)]]; diff --git a/addons/atragmx/functions/fnc_update_scope_unit.sqf b/addons/atragmx/functions/fnc_update_scope_unit.sqf index d1f0e9cf170..e72b490ef03 100644 --- a/addons/atragmx/functions/fnc_update_scope_unit.sqf +++ b/addons/atragmx/functions/fnc_update_scope_unit.sqf @@ -16,7 +16,7 @@ */ ctrlSetText [2000, GVAR(scopeUnits) select GVAR(currentScopeUnit)]; -ctrlSetText [2001, Str(GVAR(currentScopeClickNumber))]; +ctrlSetText [2001, str(GVAR(currentScopeClickNumber))]; if (GVAR(currentScopeUnit) == 3) then { ctrlSetText [5000, format["Clicks=%1", GVAR(currentScopeClickNumber)]]; diff --git a/addons/atragmx/functions/fnc_update_target.sqf b/addons/atragmx/functions/fnc_update_target.sqf index a87ba9ba54f..df37e7848e4 100644 --- a/addons/atragmx/functions/fnc_update_target.sqf +++ b/addons/atragmx/functions/fnc_update_target.sqf @@ -17,32 +17,32 @@ if (GVAR(showWind2)) then { if (GVAR(currentUnit) != 2) then { - ctrlSetText [300, format["%1/%2", Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629), Round((GVAR(windSpeed2) select GVAR(currentTarget)) * 2.23693629)]]; + ctrlSetText [300, format["%1/%2", round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629), round((GVAR(windSpeed2) select GVAR(currentTarget)) * 2.23693629)]]; } else { - ctrlSetText [300, format["%1/%2", Round(GVAR(windSpeed1) select GVAR(currentTarget)), Round(GVAR(windSpeed2) select GVAR(currentTarget))]]; + ctrlSetText [300, format["%1/%2", round(GVAR(windSpeed1) select GVAR(currentTarget)), round(GVAR(windSpeed2) select GVAR(currentTarget))]]; }; } else { if (GVAR(currentUnit) != 2) then { - ctrlSetText [300, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; + ctrlSetText [300, str(round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; } else { - ctrlSetText [300, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 100) / 100)]; + ctrlSetText [300, str(round((GVAR(windSpeed1) select GVAR(currentTarget)) * 100) / 100)]; }; }; -ctrlSetText [310, Str(Round((GVAR(windDirection) select GVAR(currentTarget))))]; -ctrlSetText [320, Str(Round((GVAR(inclinationAngle) select GVAR(currentTarget))))]; +ctrlSetText [310, str(round((GVAR(windDirection) select GVAR(currentTarget))))]; +ctrlSetText [320, str(round((GVAR(inclinationAngle) select GVAR(currentTarget))))]; if (GVAR(currentUnit) != 2) then { - ctrlSetText [330, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; + ctrlSetText [330, str(round((GVAR(targetSpeed) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; } else { - ctrlSetText [330, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)]; + ctrlSetText [330, str(round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)]; }; switch (GVAR(currentUnit)) do { case 0: { - ctrlSetText [340, format["*%1", Round((GVAR(targetRange) select GVAR(currentTarget)))]]; + ctrlSetText [340, format["*%1", round((GVAR(targetRange) select GVAR(currentTarget)))]]; }; case 1: { - ctrlSetText [340, Str(Round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))]; + ctrlSetText [340, str(round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))]; }; case 2: { - ctrlSetText [340, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))]; + ctrlSetText [340, str(round((GVAR(targetRange) select GVAR(currentTarget))))]; }; }; diff --git a/addons/atragmx/functions/fnc_update_target_data.sqf b/addons/atragmx/functions/fnc_update_target_data.sqf index 92b5df50a06..f47d0401ddb 100644 --- a/addons/atragmx/functions/fnc_update_target_data.sqf +++ b/addons/atragmx/functions/fnc_update_target_data.sqf @@ -15,22 +15,22 @@ * Public: No */ -ctrlSetText [140000, Str(Round((GVAR(latitude) select GVAR(currentTarget)) * 100) / 100)]; -ctrlSetText [140010, Str(Round((GVAR(directionOfFire) select GVAR(currentTarget)) * 100) / 100)]; +ctrlSetText [140000, str(round((GVAR(latitude) select GVAR(currentTarget)) * 100) / 100)]; +ctrlSetText [140010, str(round((GVAR(directionOfFire) select GVAR(currentTarget)) * 100) / 100)]; if (GVAR(currentUnit) != 2) then { - ctrlSetText [140020, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; - ctrlSetText [140021, Str(Round((GVAR(windSpeed2) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; + ctrlSetText [140020, str(round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; + ctrlSetText [140021, str(round((GVAR(windSpeed2) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; } else { - ctrlSetText [140020, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 100) / 100)]; - ctrlSetText [140021, Str(Round((GVAR(windSpeed2) select GVAR(currentTarget)) * 100) / 100)]; + ctrlSetText [140020, str(round((GVAR(windSpeed1) select GVAR(currentTarget)) * 100) / 100)]; + ctrlSetText [140021, str(round((GVAR(windSpeed2) select GVAR(currentTarget)) * 100) / 100)]; }; -ctrlSetText [140030, Str(Round((GVAR(windDirection) select GVAR(currentTarget))))]; -ctrlSetText [140040, Str(Round((GVAR(inclinationAngle) select GVAR(currentTarget))))]; -ctrlSetText [140041, Str(Round(cos(GVAR(inclinationAngle) select GVAR(currentTarget)) * 100) / 100)]; +ctrlSetText [140030, str(round((GVAR(windDirection) select GVAR(currentTarget))))]; +ctrlSetText [140040, str(round((GVAR(inclinationAngle) select GVAR(currentTarget))))]; +ctrlSetText [140041, str(round(cos(GVAR(inclinationAngle) select GVAR(currentTarget)) * 100) / 100)]; if (GVAR(currentUnit) != 2) then { - ctrlSetText [140050, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; + ctrlSetText [140050, str(round((GVAR(targetSpeed) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)]; } else { - ctrlSetText [140050, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)]; + ctrlSetText [140050, str(round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)]; }; if ((GVAR(targetSpeedDirection) select GVAR(currentTarget)) == 1) then { ctrlSetText [140051, ">"]; @@ -38,9 +38,9 @@ if ((GVAR(targetSpeedDirection) select GVAR(currentTarget)) == 1) then { ctrlSetText [140051, "<"]; }; if (GVAR(currentUnit) == 1) then { - ctrlSetText [140060, Str(Round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))]; + ctrlSetText [140060, str(round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))]; } else { - ctrlSetText [140060, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))]; + ctrlSetText [140060, str(round((GVAR(targetRange) select GVAR(currentTarget))))]; }; if (GVAR(currentUnit) == 0) then { ctrlSetText [140061, "*"]; diff --git a/addons/atragmx/functions/fnc_update_truing_drop_data.sqf b/addons/atragmx/functions/fnc_update_truing_drop_data.sqf index ad0f0dda0e8..1180b689cd0 100644 --- a/addons/atragmx/functions/fnc_update_truing_drop_data.sqf +++ b/addons/atragmx/functions/fnc_update_truing_drop_data.sqf @@ -16,11 +16,11 @@ */ if (GVAR(currentUnit) == 2) then { - ctrlSetText [18011, Str(Round(GVAR(truingDropRangeData) select 0))]; - ctrlSetText [18012, Str(Round(GVAR(truingDropRangeData) select 1))]; + ctrlSetText [18011, str(round(GVAR(truingDropRangeData) select 0))]; + ctrlSetText [18012, str(round(GVAR(truingDropRangeData) select 1))]; } else { - ctrlSetText [18011, Str(Round((GVAR(truingDropRangeData) select 0) * 1.0936133))]; - ctrlSetText [18012, Str(Round((GVAR(truingDropRangeData) select 1) * 1.0936133))]; + ctrlSetText [18011, str(round((GVAR(truingDropRangeData) select 0) * 1.0936133))]; + ctrlSetText [18012, str(round((GVAR(truingDropRangeData) select 1) * 1.0936133))]; }; if (GVAR(truingDropMode) == 0) then { @@ -53,25 +53,25 @@ switch (_dropUnit) do { }; }; -ctrlSetText [18006, Str(Round((_dropData select 0) * 100) / 100)]; -ctrlSetText [18013, Str(Round((_dropData select 1) * 100) / 100)]; -ctrlSetText [18014, Str(Round((_dropData select 2) * 100) / 100)]; +ctrlSetText [18006, str(round((_dropData select 0) * 100) / 100)]; +ctrlSetText [18013, str(round((_dropData select 1) * 100) / 100)]; +ctrlSetText [18014, str(round((_dropData select 2) * 100) / 100)]; if (GVAR(currentUnit) != 2) then { - ctrlSetText [18007, Str(Round((GVAR(workingMemory) select 1) * 3.2808399))]; - ctrlSetText [18016, Str(Round((GVAR(workingMemory) select 1) * 3.2808399))]; + ctrlSetText [18007, str(round((GVAR(workingMemory) select 1) * 3.2808399))]; + ctrlSetText [18016, str(round((GVAR(workingMemory) select 1) * 3.2808399))]; if (GVAR(truingDropMuzzleVelocity) > 0) then { - ctrlSetText [18016, Str(Round(GVAR(truingDropMuzzleVelocity) * 3.2808399))]; + ctrlSetText [18016, str(round(GVAR(truingDropMuzzleVelocity) * 3.2808399))]; }; } else { - ctrlSetText [18007, Str(Round(GVAR(workingMemory) select 1))]; - ctrlSetText [18016, Str(Round(GVAR(workingMemory) select 1))]; + ctrlSetText [18007, str(round(GVAR(workingMemory) select 1))]; + ctrlSetText [18016, str(round(GVAR(workingMemory) select 1))]; if (GVAR(truingDropMuzzleVelocity) > 0) then { - ctrlSetText [18016, Str(Round(GVAR(truingDropMuzzleVelocity)))]; + ctrlSetText [18016, str(round(GVAR(truingDropMuzzleVelocity)))]; }; }; -ctrlSetText [18008, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)]; -ctrlSetText [18017, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)]; +ctrlSetText [18008, str(round((GVAR(workingMemory) select 15) * 1000) / 1000)]; +ctrlSetText [18017, str(round((GVAR(workingMemory) select 15) * 1000) / 1000)]; if (GVAR(truingDropC1) > 0) then { - ctrlSetText [18017, Str(Round(GVAR(truingDropC1) * 1000) / 1000)]; + ctrlSetText [18017, str(round(GVAR(truingDropC1) * 1000) / 1000)]; }; diff --git a/addons/atragmx/functions/fnc_update_zero_range.sqf b/addons/atragmx/functions/fnc_update_zero_range.sqf index d29ad18b688..e9e3d607878 100644 --- a/addons/atragmx/functions/fnc_update_zero_range.sqf +++ b/addons/atragmx/functions/fnc_update_zero_range.sqf @@ -46,7 +46,6 @@ private _scopeBaseAngle = if !(missionNamespace getVariable [QEGVAR(advanced_bal parseNumber (("ace" callExtension ["ballistics:zero_advanced", [ _zeroRange, _muzzleVelocity, - _airFriction, _boreHeight, _temperature, _barometricPressure, diff --git a/addons/attach/functions/fnc_canDetach.sqf b/addons/attach/functions/fnc_canDetach.sqf index 7202ba410fc..2a6044559d7 100644 --- a/addons/attach/functions/fnc_canDetach.sqf +++ b/addons/attach/functions/fnc_canDetach.sqf @@ -19,7 +19,7 @@ params ["_attachToVehicle", "_unit"]; TRACE_2("params",_attachToVehicle,_unit); -if ((vehicle _unit) != _unit) exitWith {false}; +if (!isNull objectParent _unit) exitWith {false}; private _attachedList = _attachToVehicle getVariable [QGVAR(attached), []]; if ((count _attachedList) == 0) exitWith {false}; @@ -32,7 +32,7 @@ private _inRange = false; _attachedList deleteAt _forEachIndex; _attachToVehicle setVariable [QGVAR(attached), _attachedList, true]; }; - if (((getPos _unit) distance2d (getPos _xObject)) < 4) exitWith {_inRange = true}; + if (((getPos _unit) distance2D (getPos _xObject)) < 4) exitWith {_inRange = true}; } forEach _attachedList; _inRange && diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index d953b02bd16..8eab98e0720 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -31,8 +31,8 @@ private _minDistance = 1000; { _x params ["_xObject", "_xItemName"]; - if (((getPos _unit) distance2d (getPos _xObject)) < _minDistance) then { - _minDistance = ((getPos _unit) distance2d (getPos _xObject)); + if (((getPos _unit) distance2D (getPos _xObject)) < _minDistance) then { + _minDistance = ((getPos _unit) distance2D (getPos _xObject)); _attachedObject = _xObject; _itemName = _xItemName; _attachedIndex = _forEachIndex; diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index 2f0c4d6b751..9e9f8effba4 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -48,10 +48,10 @@ while {(_closeInMax - _closeInMin) > 0.01} do { { if (_doesIntersect) exitWith {}; private _startingPosShifted = _startingPosition vectorAdd _x; - private _startASL = if (surfaceIsWater _startingPosShifted) then {_startingPosShifted} else {ATLtoASL _startingPosShifted}; + private _startASL = if (surfaceIsWater _startingPosShifted) then {_startingPosShifted} else {ATLToASL _startingPosShifted}; { private _endPosShifted = _endPosTest vectorAdd _x; - private _endASL = if (surfaceIsWater _startingPosShifted) then {_endPosShifted} else {ATLtoASL _endPosShifted}; + private _endASL = if (surfaceIsWater _startingPosShifted) then {_endPosShifted} else {ATLToASL _endPosShifted}; #ifdef DRAW_ATTACH_SCAN [{ diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml index 71377352338..58d46f0d4f9 100644 --- a/addons/ballistics/stringtable.xml +++ b/addons/ballistics/stringtable.xml @@ -256,7 +256,7 @@ Chumbo Grosso #0 Calibre Doze 2 Tiros 12 Калибр 2 патр. #0 Картечь 12 kalibre 2 mermi #0 İrisaçma - 12 게이지 2발 #00 벅샷 + 12 게이지 2발 #0 벅샷 12 Gauge 2Rnd #1 Buckshot @@ -479,7 +479,7 @@ Carregador 6.5x47 mm com 20 cartuchos (HPBT Scenar) 6,5x47 mm 20-lövedékes tár (HPBT Scenar) 6.5x47 mm 20Rnd マガジン (HPBT Scenar) - 20발 들이 6.5x47mm (HPBT Scenar) + 6.5x47mm 20발 들이 탄창 (Scenar제 HPBT) 6.5x47毫米 20發 彈匣 (拉普 空尖艇尾狙擊專用彈) 6.5x47 mm 20发 弹匣(HPBT Scenar) 6.5x47 mm 20Rnd Mag (HPBT Scenar) @@ -513,7 +513,7 @@ Calibre: 6.5x47 mm (HPBT Scenar)<br/>Cartuchos: 20<br/>Usado em: QBU-88 Kaliber: 6,5x47 mm (HPBT Scenar)<br />Lövedékek: 20<br />Használható: QBU-88 口径: 6.5x47 mm (HPBT Scenar)<br />装填数: 20<br />次で使用: QBU-88 - 구경: 6.5x47mm (HPBT Scenar)<br/>장탄수: 20<br/>사용처: QBU-88 + 구경: 6.5x47mm (Scenar제 보트 테일 할로우 포인트)<br/>장탄수: 20<br/>사용처: QBU-88 口徑: 6.5x47毫米 (拉普 空尖艇尾狙擊專用彈)<br />發數: 20<br />使用於: QBU-88 口径:6.5x47 mm(HPBT Scenar)<br />发数:20<br />使用于:QBU-88 Kalibre: 6.5x47 mm (HPBT Scenar)<br />Mermi: 20<br />Kullanıyor: QBU-88 @@ -530,7 +530,7 @@ Carregador 6.5 mm com 20 cartuchos Creedmor 6,5 mm Creedmor 20-lövedékes tár 6.5 mm クリードモア 20Rnd マガジン - 20발 들이 6.5mm 크리드무어 탄창 + 6.5mm 크리드무어 20발 들이 탄창 6.5毫米 20發 彈匣 (克里德莫爾(CM) 狙擊專用彈) 6.5 mm 20发 弹匣(Creedmor) 6.5 mm Creedmor 20Rnd Mag @@ -581,7 +581,7 @@ Carregador 5.8 mm com 10 cartuchos DBP88 5,8 mm DBP88 10-lövedékes tár 5.8 mm DBP88 10Rnd マガジン - 10발 들이 5.8mm DBP88 탄창 + 5.8mm 10발 들이 탄창 (DBP88) 5.8毫米 10發 彈匣 (DBP88) 5.8 mm 10发 弹匣(DBP88) 5.8 mm DBP88 10Rnd Mag @@ -633,7 +633,7 @@ Caricatore 6.5 mm 30cp Traccianti IR-DIM Магазин из 30-ти 6,5 мм ИК-трассирующих 6.5 mm 30Rnd IR-DIM トレーサー ケースレスマガジン - 30발 들이 6.5mm IR-DIM 예광탄 탄창 + 6.5mm 30발 들이 탄창 (IR-DIM 예광탄) 6.5毫米 30發 低視度紅外線曳光彈 彈匣 6.5 mm 30发 弹匣(红外曳光) 6.5 mm 30Rnd Tracer IR-DIM Mag @@ -667,7 +667,7 @@ Calibro: 6.5x39 mm Tracciante IR-DIM <br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL Калибр: 6,5x39 мм ИК-трассирующие<br />Патронов: 30<br />Используются с: MX/C/M/SW/3GL 口径: 6.5x39 mm IR-DIM トレーサー<br />装填数: 30<br />次で使用: MX/C/M/SW/3GL - 구경: 6.5x39mm IR-DIM 예광탄<br/>장탄수: 30<br/>사용처: MX/C/M/SW/3GL + 구경: 6.5x39mm IR-DIM 적외선 예광탄<br/>장탄수: 30<br/>사용처: MX/C/M/SW/3GL 口徑: 6.5x39毫米 低視度紅外線曳光彈<br />發數: 30<br />使用於: MX/C/M/SW/3GL 口径:6.5x39 mm 红外曳光<br />发数:30<br />使用于:MX/C/M/SW/3GL Kalibre: 6.5x39 mm Tracer IR-DIM<br />Mermi: 30<br />Kullanıyor: MX/C/M/SW/3GL @@ -684,7 +684,7 @@ Caricatore 6.5 mm 30cp Sil. Магазин из 30-ти 6,5 мм дозвуковых 6.5 mm 30Rnd 亜音速弾 マガジン - 30발 들이 6.5mm 아음속탄 탄창 + 6.5mm 30발 들이 탄창 (아음속탄) 6.5毫米 30發 消音彈 彈匣 6.5 mm 30发 弹匣(亚音速) 6.5 mm 30Rnd SD Mag @@ -735,7 +735,7 @@ Caricatore 6.5 mm 30cp AP Магазин из 30-ти 6,5 мм бронебойных 6.5 mm 30Rnd 徹甲弾 マガジン - 30발 들이 6.5mm 철갑탄 탄창 + 6.5mm 30발 들이 탄창 (철갑탄) 6.5毫米30發 穿甲彈 彈匣 6.5 mm 30发 弹匣(穿甲) 6.5 mm 30Rnd AP Mag @@ -787,7 +787,7 @@ Caricatore 6.5 mm 30cp Traccianti IR-DIM Магазин из 30-ти 6,5 мм ИК-трассирующих 6.5 mm 30Rnd IR-DIM トレーサー マガジン - 30발 들이 6.5mm IR-DIM 예광탄 탄창 + 6.5mm 30발 들이 탄창 (IR-DIM 예광탄) 6.5毫米 30發 低視度紅外線曳光彈 彈匣 6.5 mm 30发 弹匣(红外曳光) 6.5 mm 30Rnd Tracer IR-DIM Mag @@ -821,7 +821,7 @@ Calibro: 6.5x39 mm Tracciant IR-DIM<br />Munizioni: 30<br />In uso su: Katiba Калибр: 6,5x39 мм ИК-трассирующие<br />Патронов: 30<br />Используются с: Katiba 口径: 6.5x39 mm IR-DIM トレーサー<br />装填数: 30<br />次で使用: Katiba - 구경: 6.5x39mm IR-DIM 예광탄<br/>장탄수: 30<br/>사용처: KH-2002 + 구경: 6.5x39mm IR-DIM 적외선 예광탄<br/>장탄수: 30<br/>사용처: KH-2002 口徑: 6.5x39毫米 低視度紅外線曳光彈<br />發數: 30<br />使用於: Katiba 口径:6.5x39 mm 红外曳光<br />发数:30<br />使用于:Katiba Kalibre: 6.5x39 mm Tracer IR-DIM<br />Mermi: 30<br />Kullanıyor: Katiba @@ -838,7 +838,7 @@ Caricatore 6.5 mm 30cp Sil. Магазин из 30-ти 6,5 мм дозвуковых 6.5 mm 30Rnd 亜音速弾 マガジン - 30발 들이 6.5mm 아음속탄 탄창 + 6.5mm 30발 들이 탄창 (아음속탄) 6.5毫米 30發 消音彈 彈匣 6.5 mm 30发 弹匣(亚音速) 6.5 mm 30Rnd SD Mag @@ -889,7 +889,7 @@ Caricatore 6.5 mm 30cp AP Магазин из 30-ти 6,5 мм бронебойных 6.5 mm 30Rnd 徹甲弾 マガジン - 30발 들이 6.5mm 철갑탄 탄창 + 6.5mm 30발 들이 탄창 (철갑탄) 6.5毫米 30發 穿甲彈 彈匣 6.5 mm 30发 弹匣(穿甲) 6.5 mm 30Rnd AP Mag @@ -941,7 +941,7 @@ Caricatore 5.56 mm 30cp Traccianti IR-DIM Магазин из 30-ти 5,56 мм ИК-трассирующих 5.56mm 30Rnd IR-DIM トレーサー マガジン - 30발 들이 5.56mm IR-DIM 예광탄 탄창 + 5.56mm 30발 들이 탄창 (IR-DIM 예광탄) 5.56毫米 30發 低視度紅外線曳光彈 彈匣 5.56 mm 30发 弹匣(红外曳光) 5.56 mm 30rnd Tracer IR-DIM Mag @@ -975,7 +975,7 @@ Calibro: 5.56x45 mm Tracciante IR-DIM<br />Munizioni: 30<br />In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR Калибр: 5,56x45 мм ИК-трассирующие<br />Патронов: 30<br />Используются с: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR 口径: 5.56x45 mm IR-DIM トレーサー<br />装填数: 30<br />次で使用: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - 구경: 5.56x45 mm IR-DIM 예광탄<br/>장탄수: 30<br/>사용처: CTAR-21, TAR-21/GTAR-21 EGLM, F2000/택티컬/EGLM, SDAR + 구경: 5.56x45 mm IR-DIM 적외선 예광탄<br/>장탄수: 30<br/>사용처: CTAR-21, TAR-21/GTAR-21 EGLM, F2000/택티컬/EGLM, SDAR 口徑: 5.56x45毫米 低視度紅外線曳光彈<br />發數: 30<br />使用於: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR 口径:5.56x45 mm 红外曳光<br />发数:30<br />使用于:TRG-20,TRG-21/EGLM, Mk20/C/EGLM, SDAR Kalibre: 5.56x45 mm Tracer IR-DIM<br />Mermi: 30<br />Kullanıyor: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR @@ -993,7 +993,7 @@ Caricatore 7.62 mm 20cp Traccianti Магазин из 20-ти 7,62 мм трассирующих 7.62mm 20Rnd マガジン (トレーサー) - 20발 들이 7.62mm 예광탄 탄창 + 7.62mm 20발 들이 탄창 (예광탄) 7.62毫米 20發 曳光彈 彈匣 7.62 mm 20发 弹匣(曳光) 7.62 mm 20Rnd Mag (Tracer) @@ -1044,7 +1044,7 @@ Caricatore 7.62 mm 20cp Traccianti IR-DIM Магазин из 20-ти 7,62 мм ИК-трассирующих 7.62mm 20Rnd マガジン (IR-DIM) - 20발 들이 7.62mm IR-DIM 예광탄 탄창 + 7.62mm 20발 들이 탄창 (IR-DIM 예광탄) 7.62毫米 20發 低視度紅外線曳光彈 彈匣 7.62 mm 20发 弹匣(红外曳光) 7.62 mm 20Rnd Mag (IR-DIM) @@ -1095,7 +1095,7 @@ Caricatore 7.62 mm 20cp Sil. Магазин из 20-ти 7,62 мм дозвуковых 7.62mm 20Rnd マガジン (亜音速弾) - 20발 들이 7.62mm 아음속탄 탄창 + 7.62mm 20발 들이 탄창 (아음속탄) 7.62毫米 20發 消音彈 彈匣 7.62 mm 20发 弹匣(亚音速) 7.62 mm 20Rnd Mag (SD) @@ -1146,7 +1146,7 @@ Caricatore 7.62 mm 10cp Traccianti Магазин из 10-ти 7,62 мм трассирующих 7.62mm 10Rnd マガジン (トレーサー) - 10발 들이 7.62mm 예광탄 탄창 + 7.62mm 10발 들이 탄창 (예광탄) 7.62毫米 10發 曳光彈 彈匣 7.62 mm 10发 弹匣(曳光) 7.62 mm 10Rnd Mag (Tracer) @@ -1197,7 +1197,7 @@ Caricatore 7.62 mm 10cp Traccianti IR-DIM Магазин из 10-ти 7,62 мм ИК-трассирующих 7.62mm 10Rnd マガジン (IR-DIM) - 10발 들이 7.62mm IR-DIM 예광탄 탄창 + 7.62mm 10발 들이 탄창 (IR-DIM 예광탄) 7.62毫米 10發 低視度紅外線曳光彈 彈匣 7.62 mm 10发 弹匣(红外曳光) 7.62 mm 10Rnd Mag (IR-DIM) @@ -1231,7 +1231,7 @@ Calibro: 7.62x51 mm Tracciante IR-DIM<br />Munizioni: 10<br />In uso su: Mk18 ABR Калибр: 7,62x51 мм ИК-трассирующие<br />Патронов: 10<br />Используются с: Mk18 ABR 口径: 7.62x51 mm IR-DIM トレーサー<br />装填数: 10<br />次で使用: Mk18 ABR - 구경: 7.62x51mm IR-DIM 예광탄<br/>장탄수: 10<br/>사용처: Mk.14 Mod 1 EBR + 구경: 7.62x51mm IR-DIM 적외선 예광탄<br/>장탄수: 10<br/>사용처: Mk.14 Mod 1 EBR 口徑: 7.62x51毫米 低視度紅外線曳光彈<br />發數: 10<br />使用於: Mk18 ABR 口径:7.62x51 mm 红外曳光<br />发数:10<br />使用于:Mk18 ABR Kalibre: 7.62x51 mm Tracer IR-DIM<br />Mermi: 10<br />Kullanıyor: Mk18 ABR @@ -1248,7 +1248,7 @@ Caricatore 7.62 mm 10cp Sil. Магазин из 10-ти 7,62 мм дозвуковых 7.62mm 10Rnd マガジン (亜音速弾) - 10발 들이 7.62mm 아음속탄 탄창 + 7.62mm 10발 들이 탄창 (아음속탄) 7.62毫米 10發 消音彈 彈匣 7.62 mm 10发 弹匣(亚音速) 7.62 mm 10Rnd Mag (SD) @@ -1300,7 +1300,7 @@ Cinto de munição .338 NM com 130 cartuchos .338 NM 130-lövedékes nyomkövető heveder .338 NM 130Rnd トレーサー ベルト - 130발 들이 .338구경 노르마 매그넘 예광탄 벨트 + .338구경 노르마 매그넘 130발 들이 벨트 (예광탄) .338 拉普麥格農(NM) 130發 曳光彈 彈鏈 .338 NM 130发 弹链(曳光) .338 NM 130Rnd Tracer Belt @@ -1351,7 +1351,7 @@ Cinto de munição traçante .338 NM IR-DIM com 130 cartuchos .338 NM 130-lövedékes infravörös nyomkövető heveder .338 NM 130Rnd IR-DIM ベルト - 130발 들이 .338rnrud 노르마 매그넘 IR-DIM 예광탄 벨트 + .338구경 노르마 매그넘 130발 들이 벨트 (IR-DIM 예광탄) .338 拉普麥格農(NM) 130發 低視度紅外線曳光彈 彈鏈 .338 NM 130发 弹链(红外曳光) .338 NM 130Rnd IR-DIM Belt @@ -1385,7 +1385,7 @@ Calibre: .338 Norma Magnum Traçante IR-DIM<br />Cartuchos: 130<br />Usado em: SPMG Kaliber: .338 Norma Magnum infravörös nyomkövető<br />Lövedékek: 130<br />Használható: SPMG 口径: .338 Norma Magnum IR-DIM トレーサー<br />装填数: 130<br />次で使用: SPMG - 구경: .338구경 노르마 매그넘 IR-DIM 예광탄<br/>장탄수: 130<br/>사용처: LWMMG + 구경: .338구경 노르마 매그넘 IR-DIM 적외선 예광탄<br/>장탄수: 130<br/>사용처: LWMMG 口徑: .338 拉普麥格農 低視度紅外線曳光彈<br />發數: 130<br />使用於: SPMG 口径:.338 Norma Magnum 红外曳光<br />发数:130<br />使用于:SPMG Kalibre: .338 Norma Magnum Tracer IR-DIM<br />Mermi: 130<br />Kullanıyor: SPMG @@ -1402,7 +1402,7 @@ Cinto de munição .338 NM com 130 cartuchos AP .338 NM 130-lövedékes páncéltörő heveder .338 NM 130Rnd 徹甲弾 ベルト - 130발 들이 .338구경 노르마 매그넘 철갑탄 벨트 + .338구경 노르마 매그넘 130발 들이 벨트 (철갑탄) .338 拉普麥格農(NM) 130發 穿甲彈 彈鏈 .338 NM 130发 弹链(穿甲) .338 NM 130Rnd AP Belt @@ -1454,7 +1454,7 @@ Carregador de 10 cartuchos 9.3 mm traçantes 9,3 mm 10-lövedékes nyomkövető tár 9.3mm 10Rnd トレーサー マガジン - 10발 들이 9.3 mm 예광탄 탄창 + 9.3mm 10발 들이 탄창 (예광탄) 9.3毫米 10發 曳光彈 彈匣 9.3 mm 10发 弹匣(曳光) 9.3 mm 10Rnd Tracer Mag @@ -1505,7 +1505,7 @@ Carregador de 10 cartuchos 9.3 mm traçantes IR-DIM 9,3 mm 10-lövedékes infravörös nyomkövető tár 9.3mm 10Rnd IR-DIM トレーサー マガジン - 10발 들이 9.3mm IR-DIM 예광탄 탄창 + 9.3mm 10발 들이 탄창 (IR-DIM 예광탄) 9.3毫米 10發 低視度紅外線曳光彈 彈匣 9.3 mm 10发 弹匣(红外曳光) 9.3 mm 10Rnd Tracer IR-DIM Mag @@ -1539,7 +1539,7 @@ Calibre: 9.3x64 mm Traçante IR-DIM<br />Cartuchos: 10<br />Usado em: Cyrus Kaliber: 9,3x64 mm infravörös nyomkövető<br />Lövedékek: 10<br /> Használható: Cyrus 口径: 9.3x64 mm IR-DIM トレーサー<br />装填数: 10<br />次で使用: Cyrus - 구경: 9.3x64mm IR-DIM 예광탄<br/>장탄수: 10<br/>사용처: 사이러스 + 구경: 9.3x64mm IR-DIM 적외선 예광탄<br/>장탄수: 10<br/>사용처: 사이러스 口徑: 9.3x64毫米 低視度紅外線曳光彈<br />發數: 10<br />使用於: Cyrus 口径:9.3x64 mm 红外曳光<br />发数:10<br />使用于:"居鲁士" Kalibre: 9.3x64 mm Tracer IR-DIM<br />Mermi: 10<br />Kullanıyor: Cyrus @@ -1557,7 +1557,7 @@ Cinto de munição traçante 9.3 mm com 150 cartuchos 9,3 mm 150-lövedékes nyomkövető heveder 9.3mm 150Rnd トレーサー ベルト - 150발 들이 9.3mm 예광탄 벨트 + 9.3mm 150발 들이 벨트 (예광탄) 9.3毫米 150發 曳光彈 彈鏈 9.3 mm 150发 弹链(曳光) 9.3 mm 150Rnd Tracer Belt @@ -1608,7 +1608,7 @@ Cinto de munição traçante 9.3 mm IR-DIM com 150 cartuchos 9,3 mm 150-lövedékes infravörös nyomkövető heveder 9.3mm 150Rnd IR-DIM トレーサー ベルト - 150발 들이 9.3mm IR-DIM 예광탄 벨트 + 9.3mm 150발 들이 벨트 (IR-DIM 예광탄) 9.3毫米 150發 低視度紅外線曳光彈 彈鏈 9.3 mm 150发 弹链(红外曳光) 9.3 mm 150Rnd Tracer IR-DIM Belt @@ -1642,7 +1642,7 @@ Calibre: 9.3x64 mm Traçante IR-DIM<br />Cartuchos: 150<br />Usado em: Navid Kaliber: 9,3x64 mm infravörös nyomkövető<br />Lövedékek: 150<br />Használható: Navid 口径: 9.3x64 mm IR-DIM トレーサー<br />装填数: 150<br />次で使用: Navid - 구경: 9.3x64mm IR-DIM 예광탄<br/>장탄수: 150<br/>사용처: HK121 + 구경: 9.3x64mm IR-DIM 적외선 예광탄<br/>장탄수: 150<br/>사용처: HK121 口徑: 9.3x64毫米 低視度紅外線曳光彈<br />發數: 150<br />使用於: Navid 口径:9.3x64 mm 红外曳光<br />发数:150<br />使用于:Navid Kalibre: 9.3x64 mm Tracer IR-DIM<br />Mermi: 150<br />Kullanıyor: Navid @@ -1659,7 +1659,7 @@ Cinto de munição 9.3 mm AP com 150 cartuchos 9,3 mm 150-lövedékes páncéltörő heveder 9.3mm 150Rnd 徹甲弾 ベルト - 150발 들이 9.3mm 철갑탄 벨트 + 9.3mm 150발 들이 벨트 (철갑탄) 9.3毫米 150發 穿甲彈 彈鏈 9.3 mm 150发 弹链(穿甲) 9.3 mm 150Rnd AP Belt @@ -1710,7 +1710,7 @@ Carregador de 16 cartuchos 9x19 mm 9x19 mm 16-lövedékes tár 9x19 mm 16Rnd マガジン - 16발 들이 9x19mm 탄창 + 9x19mm 16발 들이 탄창 9x19毫米 16發 彈匣 9x19 mm 16发 弹匣 9x19 mm 16Rnd Mag @@ -1744,7 +1744,7 @@ Carregador de 16 cartuchos 9x19 mm 9x19 mm 16-lövedékes tár 9x19 mm 30Rnd マガジン - 30발 들이 9x19mm 탄창 + 9x19mm 30발 들이 탄창 9x19毫米 30發 彈匣 9x19 mm 30发 弹匣 9x19 mm 30Rnd Mag @@ -1761,7 +1761,7 @@ Carregador de 30 cartuchos 9x19 mm 9x19 mm 30-lövedékes tár 9x19 mm 30Rnd マガジン - 30발 들이 9x19mm 탄창 + 9x19mm 30발 들이 탄창 9x19毫米 30發 彈匣 9x19 mm 30发 弹匣 9x19 mm 30Rnd Mag @@ -1795,7 +1795,7 @@ Carregador de 30 cartuchos 9x19 mm 9x19 mm 30-lövedékes tár 9x19 mm 30Rnd マガジン - 30발 들이 9x19mm 탄창 + 9x19mm 30발 들이 탄창 9x19毫米 30發 彈匣 9x19 mm 30发 弹匣 9x19 mm 30Rnd Mag @@ -1812,7 +1812,7 @@ Carregador com 10 cartuchos 7.62x54 mm Traçante 7,62x54 mm 10-lövedékes nyomkövető tár 7.62mm 10Rnd マガジン (トレーサー) - 10발 들이 7.62x54mm 예광탄 탄창 + 7.62x54mmR 10발 들이 탄창 (예광탄) 7.62x54毫米 10發 曳光彈 彈匣 7.62x54 mm 10发 弹匣(曳光) 7.62x54 mm 10Rnd Tracer Mag @@ -1846,7 +1846,7 @@ Carregador com 10 cartuchos 7.62x54 mm Traçante 7,62x54 mm 10-lövedékes nyomkövető tár 口径: 7.62x54 mm トレーサー<br />弾薬: 10<br />使用: ラヒム - 10발 들이 7.62x54mm 예광탄 탄창 + 7.62x54mmR 10발 들이 탄창 (예광탄) 7.62x54毫米 10發 曳光彈 彈匣 7.62x54 mm 10发 弹匣(曳光) 7.62x54 mm 10Rnd Tracer Mag @@ -1863,7 +1863,7 @@ Carregador com 100 cartuchos 6.5 mm IR-DIM Traçante 6,5 mm 100-lövedékes infravörös nyomkövető tár 6.5mm 100Rnd IR-DIM トレーサー マガジン - 100발 들이 6.5mm IR-DIM 예광탄 탄창 + 6.5mm 100발 들이 탄창 (IR-DIM 예광탄) 6.5毫米 100發 低視度紅外線曳光彈 彈匣 6.5 mm 100发 弹匣(红外曳光) 6.5 mm 100Rnd Tracer IR-DIM Mag @@ -1897,7 +1897,7 @@ Carregador 6.5 mm 100 Cartuchos Traçantes IR-DIM<br />Cartuchos: 100<br />Usado em: MX LSW 6.5 mm 100-lövedékes infravörös nyomkövető tár<br />Lövedékek: 100<br />Használható: MX LSW 6.5 mm 100Rnd IR-DIM トレーサー マガジン<br />装填数: 100<br />次で使用: MX LSW - 6.5mm IR-DIM 예광탄<br/>장탄수: 100<br/>사용처: MX LSW + 6.5mm IR-DIM 적외선 예광탄<br/>장탄수: 100<br/>사용처: MX LSW 6.5毫米 100發 低視度紅外線曳光彈<br />發數: 100<br />使用於: MX LSW 口径:6.5 mm 100发 红外曳光<br />发数:100<br />使用于:MX LSW 6.5 mm 100Rnd Tracer IR-DIM Mag<br />Mermi: 100<br />Kullanıyor: MX LSW @@ -1914,7 +1914,7 @@ Cinto de munição traçante 6.5 mm IR-DIM com 200 cartuchos 6,5 mm 200-lövedékes infravörös nyomkövető heveder 6.5mm 200Rnd ベルト トレーサー(IR-DIM) - 200발 들이 6.5mm IR-DIM 예광탄 탄창 + 6.5mm 200발 들이 탄창 (IR-DIM 예광탄) 6.5毫米 200發 低視度紅外線曳光彈 彈鏈 6.5 mm 200发 弹链(红外曳光) 6.5 mm 200Rnd Belt Tracer (IR-DIM) @@ -1948,7 +1948,7 @@ Cinto de munição traçante 6.5 mm IR-DIM com 200 cartuchos<br />Cartuchos: 200<br />Usado em: Stoner 99 LMG 6.5 mm 200-lövedékes infravörös nyomkövető heveder<br />Lövedékek: 200<br />Használható: Stoner 99 LMG 6.5 mm 200Rnd ベルト トレーサー (IR-DIM)<br />装填数: 200<br />次で使用: Stoner 99 LMG - 200발 들이 6.5mm IR-DIM 예광탄 벨트<br/>장탄수: 200<br/>사용처: 스토너 99 LMG + 6.5mm IR-DIM 적외선 예광탄 벨트<br/>장탄수: 200<br/>사용처: 스토너 99 LMG 6.5毫米 200發 低視度紅外線曳光彈<br />發數: 200<br />使用於: Stoner 99 重機槍 口径:6.5 mm 200发 红外曳光<br />发数:200<br />使用于:Stoner 99 LMG 6.5 mm 200Rnd Belt Tracer (IR-DIM)<br />Mermi: 200<br />Kullanıyor: Stoner 99 LMG @@ -1965,7 +1965,7 @@ Carregador 5.56 mm com 30 cartuchos (Mk262) 5,56 mm 30-lövedékes tár (Mk262) 5.56mm 30Rnd マガジン (Mk262) - 30발 들이 5.56mm 탄창 (Mk.262) + 5.56mm 30발 들이 탄창 (Mk.262) 5.56毫米 30發 彈匣 (Mk262 狙擊專用彈) 5.56 mm 30发 弹匣(Mk262) 5.56 mm 30Rnd Mag (Mk262) @@ -1999,7 +1999,7 @@ Calibre: 5.56x45 mm NATO (Mk262)<br/>Cartuchos: 30 Kaliber: 5,56x45 mm NATO (Mk262)<br />Lövedékek: 30 口径: 5.56x45 mm NATO (Mk262)<br />装填数: 30 - 구경: 5.56x45mm NATO (Mk.262)<br/>장탄수: 30 + 구경: 5.56x45mm NATO (Mk.262 매치그레이드)<br/>장탄수: 30 口徑: 5.56x45毫米 NATO標準 (Mk262 狙擊專用彈)<br />發數: 30 口径:5.56x45 mm 北约(Mk262 狙击专用弹)<br />发数:30 Kalibre: 5.56x45 mm NATO (Mk262)<br />Mermi: 30 @@ -2016,7 +2016,7 @@ Carregador 5.56 mm com 30 cartuchos (Mk318) 5,56 mm 30-lövedékes tár (Mk318) 5.56mm 30Rnd マガジン (Mk318) - 30발 들이 5.56mm 탄창 (Mk.318) + 5.56mm 30발 들이 탄창 (Mk.318) 5.56毫米 30發 彈匣 (Mk318 特戰專用彈) 5.56 mm 30发 弹匣(Mk318) 5.56 mm 30Rnd Mag (Mk318) @@ -2067,7 +2067,7 @@ Carregador 5.56 mm com 30 cartuchos (M995 AP) 5,56 mm 30-lövedékes tár (M995 páncéltörő) 5.56mm 30Rnd マガジン (M995 徹甲弾) - 30발 들이 5.56mm 탄창 (M995 철갑탄) + 5.56mm 30발 들이 탄창 (M995) 5.56毫米 30發 彈匣 (M995 穿甲彈) 5.56 mm 30发 弹匣(M995 穿甲) 5.56 mm 30Rnd Mag (M995 AP) @@ -2118,7 +2118,7 @@ Carregador 7.62 mm com 10 cartuchos (M118LR) 7,62 mm 10-lövedékes tár (M118LR) 7.62mm 10Rnd マガジン (M118LR) - 10발 들이 7.62mm 탄창 (M118LR) + 7.62mm 10발 들이 탄창 (M118LR) 7.62毫米 10發 彈匣 (M118LR 狙擊專用彈) 7.62 mm 10发 弹匣(M118LR) 7.62 mm 10Rnd Mag (M118LR) @@ -2152,7 +2152,7 @@ Calibre: 7.26x51 mm NATO (M118LR)<br/>Cartuchos: 10 Kaliber: 7,62x51 mm NATO (M118LR)<br />Lövedékek: 10 口径: 7.62x51 mm NATO (M118LR)<br />装填数: 10 - 구경: 7.62x51mm NATO (M118LR)<br/>장탄수: 10 + 구경: 7.62x51mm NATO (M118LR 할로우 포인트 매치그레이드)<br/>장탄수: 10 口徑: 7.62x51毫米 NATO標準 (M118LR 狙擊專用彈)<br />發數: 10 口径:7.62x51 mm 北约(M118LR 狙击专用弹)<br />发数:10 Kalibre: 7.62x51 mm NATO (M118LR)<br />Mermi: 10 @@ -2169,7 +2169,7 @@ Carregador 7.62 mm com 20 cartuchos (M118LR) 7,62 mm 20-lövedékes tár (M118LR) 7.62mm 20Rnd マガジン (M118LR) - 20발 들이 7.62mm 탄창 (M118LR) + 7.62mm 20발 들이 탄창 (M118LR) 7.62毫米 20發 彈匣 (M118LR 狙擊專用彈) 7.62 mm 20发 弹匣(M118LR) 7.62 mm 20Rnd Mag (M118LR) @@ -2203,7 +2203,7 @@ Calibre: 7.26x51 mm NATO (M118LR)<br/>Cartuchos: 20 Kaliber: 7,62x51 mm NATO (M118LR)<br />Lövedékek: 20 口径: 7.62x51 mm NATO (M118LR)<br />装填数: 20 - 구경: 7.62x51mm NATO (M118LR)<br/>장탄수: 20 + 구경: 7.62x51mm NATO (M118LR 할로우 포인트 매치그레이드)<br/>장탄수: 20 口徑: 7.62x51毫米 NATO標準 (M118LR 狙擊專用彈)<br />發數: 20 口径:7.62x51 mm 北约(M118LR 狙击专用弹)<br />发数:20 Kalibre: 7.62x51 mm NATO (M118LR)<br />Mermi: 20 @@ -2220,7 +2220,7 @@ Carregador 7.62 mm com 10 cartuchos (Mk316 Mod 0) 7,62 mm 10-lövedékes tár (Mk316 Mod 0) 7.62mm 10Rnd マガジン (Mk316 Mod 0) - 10발 들이 7.62mm 탄창 (Mk.316 Mod 0) + 7.62mm 10발 들이 탄창 (Mk.316 Mod 0) 7.62毫米 10發 彈匣 (Mk316 Mod 0 狙擊專用彈) 7.62 mm 10发 弹匣(Mk316 Mod 0) 7.62 mm 10Rnd Mag (Mk316 Mod 0) @@ -2271,7 +2271,7 @@ Carregador 7.62 mm com 20 cartuchos (Mk316 Mod 0) 7,62 mm 20-lövedékes tár (Mk316 Mod 0) 7.62mm 20Rnd マガジン (Mk316 Mod 0) - 20발 들이 7.62mm 탄창 (Mk.316 Mod 0) + 7.62mm 20발 들이 탄창 (Mk.316 Mod 0) 7.62毫米 20發 彈匣 (Mk316 Mod 0 狙擊專用彈) 7.62 mm 20发 弹匣(Mk316 Mod 0) 7.62 mm 20Rnd Mag (Mk316 Mod 0) @@ -2305,7 +2305,7 @@ Calibre: 7.26x51 mm NATO (Mk316 Mod 0)<br/>Cartuchos: 20 Kaliber: 7,62x51 mm NATO (Mk316 Mod 0)<br />Lövedékek: 20 口径: 7.62x51 mm NATO (Mk316 Mod 0)<br />装填数: 20 - 구경: 7.62x51mm NATO (Mk.316 Mod 0)<br/>장탄수: 20 + 구경: 7.62x51mm NATO (Mk.316 Mod 0 특수작전용 장거리 저격 탄환)<br/>장탄수: 20 口徑: 7.62x51毫米 NATO標準 (Mk316 Mod 0 狙擊專用彈)<br />發數: 20 口径:7.62x51 mm 北约(Mk316 Mod 0 狙击专用弹)<br />发数:20 Kalibre: 7.62x51 mm NATO (Mk316 Mod 0)<br />Mermi: 20 @@ -2322,7 +2322,7 @@ Carregador 7.62 mm com 10 cartuchos (Mk319 Mod 0) 7,62 mm 10-lövedékes tár (Mk319 Mod 0) 7.62mm 10Rnd マガジン (Mk319 Mod 0) - 10발 들이 7.62mm 탄창 (Mk.319 Mod 0) + 7.62mm 10발 들이 탄창 (Mk.319 Mod 0) 7.62毫米 10發 彈匣 (Mk319 Mod 0 特戰專用彈) 7.62 mm 10发 弹匣(Mk319 Mod 0) 7.62 mm 10Rnd Mag (Mk319 Mod 0) @@ -2356,7 +2356,7 @@ Calibre: 7.26x51 mm NATO (Mk319 Mod 0)<br/>Cartuchos: 10 Kaliber: 7,62x51 mm NATO (Mk319 Mod 0)<br />Lövedékek: 10 口径: 7.62x51 mm NATO (Mk319 Mod 0)<br />装填数: 10 - 구경: 7.62x51mm NATO (Mk.319 Mod 0)<br/>장탄수: 10 + 구경: 7.62x51mm NATO (Mk.319 Mod 0 단총신 카빈 성능향상 탄환)<br/>장탄수: 10 口徑: 7.62x51毫米 NATO標準 (Mk319 Mod 0 特戰專用彈)<br />發數: 10 口径:7.62x51 mm 北约(Mk319 Mod 0 特战专用弹)<br />发数:10 Kalibre: 7.62x51 mm NATO (Mk319 Mod 0)<br />Mermi: 20 @@ -2373,7 +2373,7 @@ Carregador 7.62 mm com 20 cartuchos (Mk319 Mod 0) 7,62 mm 20-lövedékes tár (Mk319 Mod 0) 7.62mm 20Rnd マガジン (Mk319 Mod 0) - 20들이 7.62mm 탄창 (Mk.319 Mod 0) + 7.62mm 20발 들이 탄창 (Mk.319 Mod 0) 7.62毫米 20發 彈匣 (Mk319 Mod 0 特戰專用彈) 7.62 mm 20发 弹匣(Mk319 Mod 0) 7.62 mm 20Rnd Mag (Mk319 Mod 0) @@ -2407,7 +2407,7 @@ Calibre: 7.26x51 mm NATO (Mk319 Mod 0)<br/>Cartuchos: 20 Kaliber: 7,62x51 mm NATO (Mk319 Mod 0)<br />Lövedékek: 20 口径: 7.62x51 mm NATO (Mk319 Mod 0)<br />装填数: 20 - 구경: 7.62x51mm NATO (Mk.319 Mod 0)<br/>장탄수: 20 + 구경: 7.62x51mm NATO (Mk.319 Mod 0 단총신 카빈 성능향상 탄환)<br/>장탄수: 20 口徑: 7.62x51毫米 NATO標準 (Mk319 Mod 0 特戰專用彈)<br />發數: 20 口径:7.62x51 mm 北约(Mk319 Mod 0)<br />发数:20 Kalibre: 7.62x51 mm NATO (Mk319 Mod 0)<br />Mermi: 20 @@ -2424,7 +2424,7 @@ Carregador 7.62 mm com 10 cartuchos (M993 AP) 7,62 mm 10-lövedékes tár (M993 páncéltörő) 7.62mm 10Rnd マガジン (M993 徹甲弾) - 10발 들이 7.62mm 탄창 (M993 철갑탄) + 7.62mm 10발 들이 탄창 (M993) 7.62毫米 10發 彈匣 (M993 穿甲專用彈) 7.62 mm 10发 弹匣(M993 穿甲) 7.62 mm 10Rnd Mag (M993 AP) @@ -2475,7 +2475,7 @@ Carregador 7.62 mm com 20 cartuchos (M993 AP) 7,62 mm 20-lövedékes tár (M993 páncéltörő) 7.62mm 20Rnd マガジン (M993 徹甲弾) - 20발 들이 7.62mm 탄창 (M993 철갑탄) + 7.62mm 20발 들이 탄창 (M993) 7.62毫米 20發 彈匣 (M993 穿甲專用彈) 7.62 mm 20发 弹匣(M993 穿甲) 7.62 mm 20Rnd Mag (M993 AP) @@ -2526,7 +2526,7 @@ Carregador .300 WM com 20 cartuchos (Mk248 Mod 0) .300 WM 20-lövedékes tár (Mk248 Mod 0) .300 WM 20Rnd マガジン (Mk248 Mod 0) - 20발 들이 .300구경 윈체스터 매그넘 탄창 (Mk.248 Mod 0) + .300구경 윈체스터 매그넘 20발 들이 탄창 (Mk.248 Mod 0) .300 萬能(WM) 20發 彈匣 (Mk248 Mod 0 狙擊專用彈) .300 WM 20发 弹匣(Mk248 Mod 0) .300 WM 20Rnd Mag (Mk248 Mod 0) @@ -2560,7 +2560,7 @@ Calibre: .300 WM NATO (Mk248 Mod 0)<br/>Cartuchos: 20 Kaliber: .300 WM NATO (Mk248 Mod 0)<br />Lövedékek: 20 口径: .300 WM NATO (Mk248 Mod 0)<br />装填数: 20 - 구경: .300 윈체스터 매그넘 (Mk.248 Mod 0)<br/>장탄수: 20 + 구경: .300 윈체스터 매그넘 (Mk.248 Mod 0 장거리 저격용 탄환)<br/>장탄수: 20 口徑: .300 西米 NATO標準 (Mk248 Mod 0 狙擊專用彈)<br />發數: 20 口径:.300 WM 北约(Mk248 Mod 0 狙击专用弹)<br />发数:20 Kalibre: .300 WM NATO (Mk248 Mod 0)<br />Mermi: 20 @@ -2577,7 +2577,7 @@ Carregador .300 WM com 20 cartuchos (Mk248 Mod 1) .300 WM 20-lövedékes tár (Mk248 Mod 1) .300 WM 20Rnd マガジン (Mk248 Mod 1) - 20발 들이 .300구경 윈체스터 매그넘 탄창 (Mk.248 Mod 1) + .300구경 윈체스터 매그넘 20발 들이 탄창 (Mk.248 Mod 1) .300 西米 20發 彈匣 (Mk248 Mod 1 狙擊專用彈) .300 WM 20发 弹匣(Mk248 Mod 1) .300 WM 20Rnd Mag (Mk248 Mod 1) @@ -2611,7 +2611,7 @@ Calibre: .300 WM NATO (Mk248 Mod 1)<br/>Cartuchos: 20 Kaliber: .300 WM NATO (Mk248 Mod 1)<br />Lövedékek: 20 口径: .300 WM NATO (Mk248 Mod 1)<br />装填数: 20 - 구경: .300구경 윈체스터 매그넘 (Mk.248 Mod 1)<br/>장탄수: 20 + 구경: .300구경 윈체스터 매그넘 (Mk.248 Mod 1 개선판 장거리 저격용 탄환)<br/>장탄수: 20 口徑: .300 西米 NATO標準 (Mk248 Mod 1 狙擊專用彈)<br />發數: 20 口径:.300 WM 北约(Mk248 Mod 1 狙击专用弹)<br />发数:20 Kalibre: .300 WM NATO (Mk248 Mod 1)<br />Mermi: 20 @@ -2628,7 +2628,7 @@ Carregador .300 WM com 20 cartuchos (Berger Hybrid OTM) .300 WM 20-lövedékes tár (Berger Hybrid OTM) .300 WM 20Rnd マガジン (Berger Hybrid OTM) - 20발 들이 .300구경 윈체스터 매그넘 탄창 (Berger Hybrid OTM) + .300구경 윈체스터 매그넘 20발 들이 탄창 (Berger제 하이브리드 OTM) .300 西米 20發 彈匣 (Berger Hybrid 空尖比賽專用彈) .300 WM 20发 弹匣(Berger Hybrid 空尖) .300 WM 20Rnd Mag (Berger Hybrid OTM) @@ -2662,7 +2662,7 @@ Calibre: .300 WM OTM NATO (Berger Hybrid OTM)<br/>Cartuchos: 20 Kaliber: .300 WM NATO (Berger Hybrid OTM)<br />Lövedékek: 20 口径: .300 WM NATO (Berger Hybrid OTM)<br />装填数: 20 - 구경: .300구경 윈체스터 매그넘 (Berger Hybrid OTM)<br/>장탄수: 20 + 구경: .300구경 윈체스터 매그넘 (Berger제 하이브리드 오픈 팁 매치탄)<br/>장탄수: 20 口徑: .300 西米 NATO標準 (Berger Hybrid 空尖比賽專用彈)<br />發數: 20 口径:.300 WM 北约(Berger Hybrid 空尖)<br />发数:20 Kalibre: .300 WM NATO (Berger Hybrid OTM)<br />Mermi: 20 @@ -2679,7 +2679,7 @@ Carregador .300 WM com 10 cartuchos (Mk248 Mod 0) .300 WM 10-lövedékes tár (Mk248 Mod 0) .300 WM 10Rnd マガジン (Mk248 Mod 0) - 10발 들이 .300구경 윈체스터 매그넘 탄창 (Mk.248 Mod 0) + .300구경 윈체스터 매그넘 10발 들이 탄창 (Mk.248 Mod 0) .300 萬能(WM) 10發 彈匣 (Mk248 Mod 0 狙擊專用彈) .300 WM 10发 弹匣(Mk248 Mod 0) .300 WM 10Rnd Mag (Mk248 Mod 0) @@ -2713,7 +2713,7 @@ Calibre: .300 WM NATO (Mk248 Mod 0)<br/>Cartuchos: 10 Kaliber: .300 WM NATO (Mk248 Mod 0)<br />Lövedékek: 10 口径: .300 WM NATO (Mk248 Mod 0)<br />装填数: 10 - 구경: .300구경 윈체스터 매그넘 (Mk.248 Mod 0)<br/>장탄수: 10 + 구경: .300 윈체스터 매그넘 (Mk.248 Mod 0 장거리 저격용 탄환)<br/>장탄수: 10 口徑: .300 西米 NATO標準 (Mk248 Mod 0 狙擊專用彈)<br />發數: 10 口径:.300 WM 北约(Mk248 Mod 0 狙击专用弹)<br />发数:10 Kalibre: .300 WM NATO (Mk248 Mod 0)<br />Mermi: 10 @@ -2730,7 +2730,7 @@ Carregador .300 WM com 10 cartuchos (Mk248 Mod 1) .300 WM 10-lövedékes tár (Mk248 Mod 1) .300 WM 10Rnd マガジン (Mk248 Mod 1) - 10발 들이 .300구경 윈체스터 매그넘 탄창 (Mk.248 Mod 1) + .300구경 윈체스터 매그넘 10발 들이 탄창 (Mk.248 Mod 1) .300 西米 10發 彈匣 (Mk248 Mod 1 狙擊專用彈) .300 WM 10发 弹匣(Mk248 Mod 1) .300 WM 10Rnd Mag (Mk248 Mod 1) @@ -2764,7 +2764,7 @@ Calibre: .300 WM NATO (Mk248 Mod 1)<br/>Cartuchos: 10 Kaliber: .300 WM NATO (Mk248 Mod 1)<br />Lövedékek: 10 口径: .300 WM NATO (Mk248 Mod 1)<br />装填数: 10 - 구경: .300구경 윈체스터 매그넘 (Mk.248 Mod 1)<br/>장탄수: 10 + 구경: .300구경 윈체스터 매그넘 (Mk.248 Mod 1 개선판 장거리 저격용 탄환)<br/>장탄수: 10 口徑: .300 西米 NATO標準 (Mk248 Mod 1 狙擊專用彈)<br />發數: 10 口径:.300 WM 北约(Mk248 Mod 1 狙击专用弹)<br />发数:10 Kalibre: .300 WM NATO (Mk248 Mod 1)<br />Mermi: 10 @@ -2781,7 +2781,7 @@ Carregador .300 WM com 10 cartuchos (Berger Hybrid OTM) .300 WM 10-lövedékes tár (Berger Hybrid OTM) .300 WM 10Rnd マガジン (Berger Hybrid OTM) - 10발 들이 .300구경 윈체스터 매그넘 탄창 (Berger Hybrid OTM) + .300구경 윈체스터 매그넘 10발 들이 탄창 (Berger제 하이브리드 OTM) .300 西米 10發 彈匣 (Berger Hybrid 空尖比賽專用彈) .300 WM 10发 弹匣(Berger Hybrid 空尖) .300 WM 10Rnd Mag (Berger Hybrid OTM) @@ -2815,7 +2815,7 @@ Calibre: .300 WM OTM NATO (Berger Hybrid OTM)<br/>Cartuchos: 10 Kaliber: .300 WM NATO (Berger Hybrid OTM)<br />Lövedékek: 10 口径: .300 WM NATO (Berger Hybrid OTM)<br />装填数: 10 - 구경: .300구경 윈체스터 매그넘 (Berger Hybrid OTM)<br/>장탄수: 10 + 구경: .300구경 윈체스터 매그넘 (Berger제 하이브리드 오픈 팁 매치탄)<br/>장탄수: 10 口徑: .300 西米 NATO標準 (Berger Hybrid 空尖比賽專用彈)<br />發數: 10 口径:.300 WM 北约(Berger Hybrid 空尖)<br />发数:10 Kalibre: .300 WM NATO (Berger Hybrid OTM)<br />Mermi: 10 @@ -2828,7 +2828,7 @@ 6.5x47 mm 30cp Sabbia (HPBT Scenar) Magazynek 6.5x47 mm 30rd Piaskowy (HPBT Scenar) 6.5x47 mm 30发 沙色弹匣(HPBT Scenar) - 6.5x47mm 30발 사막 탄창 (HPBT Scenar) + 6.5x47mm 30발 들이 탄창/모래 (HPBT Scenar) Магазин из 30-ти 6.5x47 мм Песочный (HPBT Scenar) Cargador de 30 balas de 6.5x47mm Arena (HPBT Scenar) Carregador 6.5x47 mm com 30 cartuchos Areia (HPBT Scenar) @@ -2841,7 +2841,7 @@ 6.5x47 mm 30cp Car Promet (HPBT Scenar) Magazynek 6.5x47 mm 30rd Promet (HPBT Scenar) 6.5x47 mm 30发 Promet 弹匣(HPBT Scenar) - 6.5x47mm 30발 그롯 탄창 (HPBT Scenar) + 6.5x47mm 30발 들이 탄창/프로멧용 (Scenar제 HPBT) Магазин из 30-ти 6.5x47 мм Promet (HPBT Scenar) Cargador de 30 balas de 6.5x47mm Promet (HPBT Scenar) Carregador 6.5x47 mm com 30 cartuchos Promet (HPBT Scenar) @@ -2854,7 +2854,7 @@ 6.5x47 mm 30cp Car Nero (HPBT Scenar) Magazynek 6.5x47 mm 30rd Czarny (HPBT Scenar) 6.5x47 mm 30发 黑色弹匣(HPBT Scenar) - 6.5x47mm 30발 검정 탄창 (HPBT Scenar) + 6.5x47mm 30발 들이 탄창/검정 (Scenar제 HPBT) Магазин из 30-ти 6.5x47 мм Чёрный (HPBT Scenar) Cargador de 30 balas de 6.5x47mm Negro (HPBT Scenar) Carregador 6.5x47 mm com 30 cartuchos Preto (HPBT Scenar) @@ -2867,7 +2867,7 @@ 6.5x47 mm 30cp Car Cachi (HPBT Scenar) Magazynek 6.5x47 mm 30rd Khaki (HPBT Scenar) 6.5x47 mm 30发 卡其色弹匣(HPBT Scenar) - 6.5x47mm 30발 카키 탄창 (HPBT Scenar) + 6.5x47mm 30발 들이 탄창/카키 (Scenar제 HPBT) Магазин из 30-ти 6.5x47 мм Хаки (HPBT Scenar) Cargador de 30 balas de 6.5x47mm Caqui (HPBT Scenar) Carregador 6.5x47 mm com 30 cartuchos Caqui (HPBT Scenar) @@ -2901,7 +2901,7 @@ Calibre: 6.5x47 mm (HPBT Scenar)<br/>Cartuchos: 30<br/>Usado em: MXM Kaliber: 6,5x47 mm (HPBT Scenar)<br />Lövedékek: 30<br />Használható: MXM 口径: 6.5x47 mm (HPBT Scenar)<br />装填数: 30<br />次で使用: MXM - 구경: 6.5x47mm (HPBT Scenar)<br/>장탄수: 30<br/>사용처: MXM + 구경: 6.5x47mm (Scenar제 보트 테일 할로우 포인트)<br/>장탄수: 30<br/>사용처: MXM 口徑: 6.5x47毫米 (拉普 空尖艇尾狙擊專用彈)<br />發數: 30<br />使用於: MXM 口径:6.5x47 mm(HPBT Scenar 狙击专用弹)<br />发数:30<br />使用于:MXM Kalibre: 6.5x47 mm (HPBT Scenar)<br />Mermi: 30<br />Kullanıyor: MXM @@ -2918,7 +2918,7 @@ Calibre: 6.5x47 mm (HPBT Scenar)<br/>Cartuchos: 30<br/>Usado em: Promet MR Kaliber: 6,5x47 mm (HPBT Scenar)<br />Lövedékek: 30<br />Használható: Promet MR 口径: 6.5x47 mm (HPBT Scenar)<br />装填数: 30<br />次で使用: Promet MR - 구경: 6.5x47mm (HPBT Scenar)<br/>장탄수: 30<br/>사용처: MSBS 그롯/GL/MR/SG + 구경: 6.5x47mm (Scenar제 보트 테일 할로우 포인트)<br/>장탄수: 30<br/>사용처: MSBS 그롯/GL/MR/SG 口徑: 6.5x47毫米 (拉普 空尖艇尾狙擊專用彈)<br />發數: 30<br />使用於: Promet MR 口径:6.5x47 mm(HPBT Scenar 狙击专用弹)<br />发数:30<br />使用于:Promet MR Kalibre: 6.5x47 mm (HPBT Scenar)<br />Mermi: 30<br />Kullanıyor: Promet MR @@ -2931,7 +2931,7 @@ 6.5 mm Creedmor 30cp Car Sabbia Magazynek 6.5 mm Creedmor 30Rnd Piaskowy 6.5 mm 30发 沙色弹匣(Creedmor) - 6.5mm 크리드무어 30발 사막 탄창 + 6.5mm 크리드무어 30발 들이 탄창/사막 Магазин из 30-ти 6.5 мм Creedmor Песочный Cargador de 30 balas de 6.5mm Creedmor Arena Carregador 6.5 mm com 30 cartuchos Creedmor Areia @@ -2944,7 +2944,7 @@ 6.5 mm Creedmor 30cp Car Promet Magazynek 6.5 mm Creedmor 30Rnd Promet 6.5 mm 30发 Promet 弹匣(Creedmor) - 6.5mm 크리드무어 30발 프로멧 탄창 + 6.5mm 크리드무어 30발 들이 탄창/프로멧용 Магазин из 30-ти 6.5 мм Creedmor Promet Cargador de 30 balas de 6.5mm Creedmor Promet Carregador 6.5 mm com 30 cartuchos Creedmor Promet @@ -2957,7 +2957,7 @@ 6.5 mm Creedmor 30cp Car Nero Magazynek 6.5 mm Creedmor 30Rnd Czarny 6.5 mm 30发 黑色弹匣(Creedmor) - 6.5mm 크리드무어 30발 검정 탄창 + 6.5mm 크리드무어 30발 들이 탄창/검정 Магазин из 30-ти 6.5 мм Creedmor Чёрный Cargador de 30 balas de 6.5mm Creedmor Negro Carregador 6.5 mm com 30 cartuchos Creedmor Preto @@ -2970,7 +2970,7 @@ 6.5 mm Creedmor 30cp Car Cachi Magazynek 6.5 mm Creedmor 30Rnd Khaki 6.5 mm 30发 卡其色弹匣(Creedmor) - 6.5mm 크리드무어 30발 카키 탄창 + 6.5mm 크리드무어 30발 들이 탄창/카키 Магазин из 30-ти 6.5 мм Creedmor Хаки Cargador de 30 balas de 6.5mm Creedmor Caqui Carregador 6.5 mm com 30 cartuchos Creedmor Caqui @@ -3038,7 +3038,7 @@ Carregador .338 LM (300gr Lapua Scenar) com 10 cartuchos .338 LM 10-lövedékes tár (300gr Lapua Scenar) .338 LM 10Rnd マガジン (300gr Lapua Scenar) - 10발 들이 .338구경 라푸아 매그넘 탄창 (300그레인 Scenar) + .338구경 라푸아 매그넘 10발 들이 탄창 (Scenar제 300그레인) .338 10發 彈匣 (300公克 Lapua Scenar) .338 LM 10发 弹匣(300gr Lapua Scenar) .338 LM 10Rnd Mag (300gr Lapua Scenar) @@ -3072,7 +3072,7 @@ Calibre: 8.6x70mm (300gr Lapua Scenar)<br/>Cartuchos: 10 Kaliber: 8,6x70mm (300gr Lapua Scenar)<br />Lövedékek: 10 口径: 8.6x70mm (300gr Lapua Scenar)<br />装填数: 10 - 구경: 8.6x70mm 라푸아 매그넘 (300그레인 Scenar)<br/>장탄수: 10 + 구경: 8.6x70mm 라푸아 매그넘 (Scenar제 300그레인)<br/>장탄수: 10 口徑: 8.6x70毫米 (300公克 Lapua Scenar)<br />發數: 10 口径:8.6x70 mm(300gr Lapua Scenar)<br />发数:10 Kalibre: 8.6x70mm (300gr Lapua Scenar)<br />Mermi: 10 @@ -3089,7 +3089,7 @@ Carregador .338 LM (API526) com 10 cartuchos .338 LM 10-lövedékes tár (API526) .338 LM 10Rnd マガジン (API526) - 10발 들이 .338구경 라푸아 매그넘 탄창 (API526) + .338구경 라푸아 매그넘 10발 들이 탄창 (API526) .338 10發 彈匣 (API526 穿甲燃燒彈) .338 LM 10发 弹匣(API526 穿燃) .338 LM 10Rnd Mag (API526) @@ -3106,7 +3106,7 @@ .338 AP .338 páncéltörő .338 AP - .338구경 라푸아 매그넘 철갑탄 + .338구경 라푸아 매그넘 철갑소이탄 .338 API526 穿甲燃燒彈 .338 穿燃 .338 AP @@ -3123,7 +3123,7 @@ Calibre: 8.6x70mm (API526)<br/>Cartuchos: 10 Kaliber: 8,6x70mm (API526)<br />Lövedékek: 10 口径: 8.6x70mm (API526)<br />装填数: 10 - 구경: 8.6x70mm 라푸아 매그넘 (API526)<br/>장탄수: 10 + 구경: 8.6x70mm 라푸아 매그넘 (API526 철갑소이탄)<br/>장탄수: 10 口徑: 8.6x70毫米 (API526 穿甲燃燒彈)<br />發數: 10 口径:8.6x70 mm(API526 穿燃)<br />发数:10 Kalibre: 8.6x70mm (API526)<br />Mermi: 10 @@ -3140,7 +3140,7 @@ Carregador .408 (305gr) com 7 cartuchos .408 7-lövedékes tár (305gr) .408 7Rnd マガジン (305gr) - 7발 들이 .408구경 샤이택 탄창 (305그레인) + .408구경 샤이택 7발 들이 탄창 (305그레인) .408 7發 彈匣 (305公克) .408 7发 弹匣(305gr) .408 7Rnd Mag (305gr) @@ -3191,7 +3191,7 @@ Carregador 12.7x99 mm com 5 cartuchos 12,7x99 mm 5-lövedékes tár 12.7x99mm 5Rnd マガジン - 5발 들이 12.7x99mm 탄창 + 12.7x99mm 5발 들이 탄창 12.7x99毫米 5發 彈匣 12.7x99 mm 5发 弹匣 12.7x99 mm 5Rnd Mag @@ -3225,7 +3225,7 @@ Carregador 12.7x99 mm com 10 cartuchos 12,7x99 mm 10-lövedékes tár 12.7x99mm 10Rnd マガジン - 10발 들이 12.7x99mm 탄창 + 12.7x99mm 10발 들이 탄창 12.7x99毫米 10發 彈匣 12.7x99 mm 10发 弹匣 12.7x99 mm 10Rnd Mag @@ -3276,7 +3276,7 @@ Carregador 12.7x99 mm API com 5 cartuchos 12,7x99 mm 5-lövedékes tár (páncéltörő-gyújtó) 12.7x99mm 5Rnd 焼夷徹甲弾 マガジン - 5발 들이 12.7x99mm 철갑소이탄 탄창 + 12.7x99mm 5발 들이 탄창 (철갑소이탄) 12.7x99毫米 穿甲燃燒彈 5發 彈匣 12.7x99 mm 穿燃 5发 弹匣 12.7x99 mm API 5Rnd Mag @@ -3310,7 +3310,7 @@ Carregador 12.7x99 mm API com 10 cartuchos 12,7x99 mm 10-lövedékes tár (páncéltörő-gyújtó) 12.7x99mm 10Rnd 焼夷徹甲弾 マガジン - 10발 들이 12.7x99mm 철갑소이탄 탄창 + 12.7x99mm 10발 들이 탄창 (철갑소이탄) 12.7x99毫米 穿甲燃燒彈 10發 彈匣 12.7x99 mm 穿燃 10发 弹匣 12.7x99 mm API 10Rnd Mag @@ -3344,7 +3344,7 @@ Carregador 12.7x99 mm (AMAX) com 5 cartuchos 12,7x99 mm 5-lövedékes tár (AMAX) 12.7x99mm 5Rnd マガジン (AMAX) - 5발 들이 12.7x99mm 탄창 (AMAX) + 12.7x99mm 5발 들이 탄창 (A-MAX) 12.7x99毫米 5發 彈匣 (AMAX 比賽專用彈) 12.7x99 mm 5发 弹匣(AMAX) 12.7x99 mm 5Rnd Şarjör (AMAX) @@ -3361,7 +3361,7 @@ Calibre: 12.7x99 mm (AMAX)<br/>Cartuchos: 5 Kaliber: 12,7x99 mm (AMAX)<br />Lövedékek: 5 口径: 12.7x99 mm (AMAX)<br />装填数: 5 - 구경: 12.7x99mm (AMAX)<br/>장탄수: 5 + 구경: 12.7x99mm (A-MAX 매치그레이드)<br/>장탄수: 5 口徑: 12.7x99毫米 (AMAX 比賽專用彈)<br />發數: 5 口径:12.7x99 mm(AMAX)<br />发数:5 Kalibre: 12.7x99 mm (AMAX)<br />Mermi: 5 @@ -3378,7 +3378,7 @@ Carregador 12.7x99 mm (AMAX) com 10 cartuchos 12,7x99 mm 10-lövedékes tár (AMAX) 12.7x99mm 10Rnd マガジン (AMAX) - 10발 들이 12.7x99mm 탄창 (AMAX) + 12.7x99mm 10발 들이 탄창 (A-MAX) 12.7x99毫米 10發 彈匣 (AMAX 比賽專用彈) 12.7x99 mm 10发 弹匣(AMAX) 12.7x99 mm 10Rnd Şarjör (AMAX) @@ -3395,7 +3395,7 @@ Calibre: 12.7x99 mm (AMAX)<br/>Cartuchos: 10 Kaliber: 12,7x99 mm (AMAX)<br />Lövedékek: 10 口径: 12.7x99 mm (AMAX)<br />装填数: 10 - 구경: 12.7x99mm (AMAX)<br/>장탄수: 10 + 구경: 12.7x99mm (A-MAX 매치그레이드)<br/>장탄수: 10 口徑: 12.7x99毫米 (AMAX 比賽專用彈)<br />發數: 10 口径:12.7x99 mm(AMAX)<br />发数:10 Kalibre: 12.7x99 mm (AMAX)<br />Mermi: 10 @@ -3412,7 +3412,7 @@ 12.7 mm AMAX 12,7 mm AMAX 12.7 mm AMAX - 12.7mm AMAX + 12.7mm A-MAX 12.7毫米 AMAX 比賽專用彈 12.7 mm AMAX 12.7 mm AMAX diff --git a/addons/captives/functions/fnc_canEscortCaptive.sqf b/addons/captives/functions/fnc_canEscortCaptive.sqf index 204206e5069..c5f87e86d20 100644 --- a/addons/captives/functions/fnc_canEscortCaptive.sqf +++ b/addons/captives/functions/fnc_canEscortCaptive.sqf @@ -22,5 +22,5 @@ params ["_unit", "_target"]; (_target getVariable [QGVAR(isHandcuffed), false]) && {isNull (attachedTo _target)} && {_target call EFUNC(common,isAwake)} && -{(vehicle _unit) == _unit} && -{(vehicle _target) == _target} +{isNull objectParent _unit} && +{isNull objectParent _target} diff --git a/addons/captives/functions/fnc_canLoadCaptive.sqf b/addons/captives/functions/fnc_canLoadCaptive.sqf index 46da188238f..59a66b9e628 100644 --- a/addons/captives/functions/fnc_canLoadCaptive.sqf +++ b/addons/captives/functions/fnc_canLoadCaptive.sqf @@ -30,7 +30,7 @@ if ((isNull _target) && {_unit getVariable [QGVAR(isEscorting), false]}) then { }; } forEach (attachedObjects _unit); }; -if (isNull _target || {(vehicle _target) != _target} || {!(_target getVariable [QGVAR(isHandcuffed), false])}) exitWith {false}; +if (isNull _target || {!isNull objectParent _target} || {!(_target getVariable [QGVAR(isHandcuffed), false])}) exitWith {false}; if (isNull _vehicle) then { // Looking at a captive unit, get nearest vehicle with valid seat: diff --git a/addons/captives/functions/fnc_canRemoveHandcuffs.sqf b/addons/captives/functions/fnc_canRemoveHandcuffs.sqf index 0ff4ab0f5dc..5cbf66edb73 100644 --- a/addons/captives/functions/fnc_canRemoveHandcuffs.sqf +++ b/addons/captives/functions/fnc_canRemoveHandcuffs.sqf @@ -21,4 +21,4 @@ params ["_unit", "_target"]; //Unit is handcuffed and not currently being escorted _target getVariable [QGVAR(isHandcuffed), false] && {isNull (attachedTo _target)} && -{(vehicle _target) == _target} +{isNull objectParent _target} diff --git a/addons/captives/functions/fnc_doLoadCaptive.sqf b/addons/captives/functions/fnc_doLoadCaptive.sqf index 34bc46b1f50..740acc691aa 100644 --- a/addons/captives/functions/fnc_doLoadCaptive.sqf +++ b/addons/captives/functions/fnc_doLoadCaptive.sqf @@ -27,7 +27,7 @@ if (isNull _target && {_unit getVariable [QGVAR(isEscorting), false]}) then { }; } forEach (attachedObjects _unit); }; -if (isNull _target || {(vehicle _target) != _target} || {!(_target getVariable [QGVAR(isHandcuffed), false])}) exitWith {WARNING("");}; +if (isNull _target || {!isNull objectParent _target} || {!(_target getVariable [QGVAR(isHandcuffed), false])}) exitWith {WARNING("");}; if (isNull _vehicle) then { // Looking at a captive unit, get nearest vehicle with valid seat: diff --git a/addons/captives/functions/fnc_handleAnimChangedHandcuffed.sqf b/addons/captives/functions/fnc_handleAnimChangedHandcuffed.sqf index 8ce4391783a..6f2f4f149e8 100644 --- a/addons/captives/functions/fnc_handleAnimChangedHandcuffed.sqf +++ b/addons/captives/functions/fnc_handleAnimChangedHandcuffed.sqf @@ -18,7 +18,7 @@ params ["_unit", "_newAnimation"]; TRACE_2("AnimChanged",_unit,_newAnimation); -if (_unit == (vehicle _unit)) then { +if (isNull objectParent _unit) then { if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {_unit call EFUNC(common,isAwake)}) then { TRACE_1("Handcuff animation interrupted",_newAnimation); [_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation); diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index 2ccd36493c8..53d28cccdb0 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -60,7 +60,7 @@ if (_state) then { params ["_unit"]; if !(_unit getVariable [QGVAR(isHandcuffed), false]) exitWith {}; - if ((vehicle _unit) == _unit) then { + if (isNull objectParent _unit) then { [_unit] call EFUNC(common,fixLoweredRifleAnimation); [_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation); } else { @@ -91,7 +91,7 @@ if (_state) then { _unit removeEventHandler ["AnimChanged", _animChangedEHID]; _unit setVariable [QGVAR(handcuffAnimEHID), -1]; - if (((vehicle _unit) == _unit) && {_unit call EFUNC(common,isAwake)}) then { + if ((isNull objectParent _unit) && {_unit call EFUNC(common,isAwake)}) then { //Break out of hands up animation loop [_unit, "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation); }; diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index 3a3724c94d2..22a07ee1c5b 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -39,7 +39,7 @@ if ((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _state) exitWit }; if (_state) then { - if ((vehicle _unit) != _unit) exitWith {WARNING("Cannot surrender while mounted");}; + if (!isNull objectParent _unit) exitWith {WARNING("Cannot surrender while mounted");}; if (_unit getVariable [QGVAR(isHandcuffed), false]) exitWith {WARNING("Cannot surrender while handcuffed");}; _unit setVariable [QGVAR(isSurrendering), true, true]; @@ -57,7 +57,7 @@ if (_state) then { // fix anim on mission start (should work on dedicated servers) [{ params ["_unit"]; - if (_unit getVariable [QGVAR(isSurrendering), false] && {(vehicle _unit) == _unit}) then { + if (_unit getVariable [QGVAR(isSurrendering), false] && {isNull objectParent _unit}) then { //Adds an animation changed eh //If we get a change in animation then redo the animation (handles people vaulting to break the animation chain) private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; @@ -89,7 +89,7 @@ if (_state) then { if !(_unit call EFUNC(common,isAwake)) exitWith {}; //don't touch animations if unconscious //if we are in "hands up" animationState, crack it now - if (((vehicle _unit) == _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) then { + if ((isNull objectParent _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) then { [_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation); } else { //spin up a PFEH, to watching animationState for the next 20 seconds to make sure we don't enter "hands up" @@ -102,7 +102,7 @@ if (_state) then { [_pfID] call CBA_fnc_removePerFrameHandler; }; //Only break animation if they are actualy the "hands up" animation (because we are using switchmove there won't be an transition) - if (((vehicle _unit) == _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) exitWith { + if ((isNull objectParent _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) exitWith { [_pfID] call CBA_fnc_removePerFrameHandler; //Break out of hands up animation loop [_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation); diff --git a/addons/cargo/XEH_PREP.hpp b/addons/cargo/XEH_PREP.hpp index 10281e29674..4632a401f17 100644 --- a/addons/cargo/XEH_PREP.hpp +++ b/addons/cargo/XEH_PREP.hpp @@ -5,6 +5,7 @@ PREP(canUnloadItem); PREP(deployCancel); PREP(deployConfirm); PREP(getCargoSpaceLeft); +PREP(getDelayItem); PREP(getNameItem); PREP(getSelectedItem); PREP(getSizeItem); diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index f48849b50bc..833acf4a7b1 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -51,7 +51,7 @@ params ["_item", "_emptyPosAGL"]; _item hideObjectGlobal false; - _item setPosASL (AGLtoASL _emptyPosAGL); + _item setPosASL (AGLToASL _emptyPosAGL); // Let objects remain invulernable for a short while after placement [EFUNC(common,statusEffect_set), [_item, "blockDamage", QUOTE(ADDON), false], 2] call CBA_fnc_waitAndExecute; @@ -76,13 +76,11 @@ GVAR(vehicleAction) = [ QGVAR(openMenu), LLSTRING(openMenu), "", { - //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(interactionVehicle) = _target; GVAR(interactionParadrop) = false; createDialog QGVAR(menu); }, { - //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(enable) && {alive _target} && {locked _target < 2} && @@ -96,12 +94,10 @@ GVAR(vehicleAction) = [ GVAR(objectActions) = [ [QGVAR(renameObject), LELSTRING(common,rename), "\a3\Modules_F_Curator\Data\iconMissionName_ca.paa", { - //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(interactionVehicle) = _target; createDialog QGVAR(renameMenu); }, { - //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(enable) && {GVAR(enableRename)} && {alive _target} && @@ -111,13 +107,26 @@ GVAR(objectActions) = [ {[_player, _target] call EFUNC(interaction,canInteractWithVehicleCrew)} } ] call EFUNC(interact_menu,createAction), - [QGVAR(load), LLSTRING(loadObject), "a3\ui_f\data\IGUI\Cfg\Actions\loadVehicle_ca.paa", + [QGVAR(checkSize), LLSTRING(checkSize), "\a3\ui_f\data\igui\cfg\simpletasks\types\box_ca.paa", { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; - [_player, _target] call FUNC(startLoadIn); + [format [LLSTRING(SizeMenu), _target call FUNC(getSizeItem)], 3] call EFUNC(common,displayTextStructured); }, { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; + (GVAR(enable) && GVAR(checkSizeInteraction)) && { + {alive _target} && + {_target getVariable [QGVAR(canLoad), getNumber (configOf _target >> QGVAR(canLoad)) == 1]} && + {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} && + {[_player, _target] call EFUNC(interaction,canInteractWithVehicleCrew)} + } + } + ] call EFUNC(interact_menu,createAction), + [QGVAR(load), LLSTRING(loadObject), "a3\ui_f\data\IGUI\Cfg\Actions\loadVehicle_ca.paa", + { + [_player, _target] call FUNC(startLoadIn); + }, + { GVAR(enable) && {alive _target} && {locked _target < 2} && diff --git a/addons/cargo/functions/fnc_deployConfirm.sqf b/addons/cargo/functions/fnc_deployConfirm.sqf index 27674b0515b..e4c87342f04 100644 --- a/addons/cargo/functions/fnc_deployConfirm.sqf +++ b/addons/cargo/functions/fnc_deployConfirm.sqf @@ -24,7 +24,7 @@ if (!isNull GVAR(itemPreviewObject) && {[GVAR(selectedItem), GVAR(interactionVeh // Position is AGL for unloading event private _position = ASLToAGL getPosASL GVAR(itemPreviewObject); private _direction = getDir GVAR(itemPreviewObject); - private _duration = GVAR(loadTimeCoefficient) * (GVAR(selectedItem) call FUNC(getSizeItem)); + private _duration = [GVAR(selectedItem), false] call FUNC(getDelayItem); // If unload time is 0, don't show a progress bar if (_duration <= 0) exitWith { diff --git a/addons/cargo/functions/fnc_getDelayItem.sqf b/addons/cargo/functions/fnc_getDelayItem.sqf new file mode 100644 index 00000000000..7f1d6b4d401 --- /dev/null +++ b/addons/cargo/functions/fnc_getDelayItem.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" +/* + * Author: tcvm + * Gets the delay duration an item should take to load/unload. + * + * Arguments: + * 0: Item or + * 1: If delay is for paradrop context + * + * Return Value: + * Item load/unload duration + * + * Example: + * [cursorObject, false] call ace_cargo_fnc_getDelayItem + * + * Public: No + */ + +params ["_item", "_isParadrop"]; + +if ((_item isEqualType objNull) && {_item getVariable [QGVAR(delay), -1] >= 0}) exitWith { + _item getVariable QGVAR(delay) // return +}; + +([GVAR(loadTimeCoefficient), GVAR(paradropTimeCoefficent)] select _isParadrop) * (_item call FUNC(getSizeItem)) // return + diff --git a/addons/cargo/functions/fnc_handleScrollWheel.sqf b/addons/cargo/functions/fnc_handleScrollWheel.sqf index 9ec2c498e64..e6f3b23e76f 100644 --- a/addons/cargo/functions/fnc_handleScrollWheel.sqf +++ b/addons/cargo/functions/fnc_handleScrollWheel.sqf @@ -38,7 +38,7 @@ if (!CBA_events_control) then { // Uses this method of selecting position because setPosATL did not have immediate effect private _positionChange = _position vectorDiff (getPosASL _deployedItem); - private _selectionPosition = _unit worldToModel (ASLtoAGL getPosWorld _deployedItem); + private _selectionPosition = _unit worldToModel (ASLToAGL getPosWorld _deployedItem); _selectionPosition = _selectionPosition vectorAdd _positionChange; _deployedItem attachTo [_unit, _selectionPosition]; diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf index 25cebe5b130..32747a990c1 100644 --- a/addons/cargo/functions/fnc_initVehicle.sqf +++ b/addons/cargo/functions/fnc_initVehicle.sqf @@ -95,7 +95,6 @@ if (_hasCargoConfig) then { // Add the paradrop self interaction for planes and helicopters if (_vehicle isKindOf "Air") then { private _condition = { - //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(enable) && {[_player, _target, []] call EFUNC(common,canInteractWith)} && { private _turretPath = _target unitTurret _player; @@ -107,7 +106,6 @@ if (_vehicle isKindOf "Air") then { }; private _statement = { - //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(interactionVehicle) = _target; GVAR(interactionParadrop) = true; createDialog QGVAR(menu); diff --git a/addons/cargo/functions/fnc_onMenuOpen.sqf b/addons/cargo/functions/fnc_onMenuOpen.sqf index f99999aabf9..17c6ef0ae16 100644 --- a/addons/cargo/functions/fnc_onMenuOpen.sqf +++ b/addons/cargo/functions/fnc_onMenuOpen.sqf @@ -80,6 +80,7 @@ if (GVAR(interactionParadrop)) then { _damageStr = ((_damage * 100) toFixed 0) + "%"; if (_itemSize >= 0) then { + //IGNORE_PRIVATE_WARNING ["ace_cargo_interactionParadrop"]; _index = if (GVAR(interactionParadrop)) then { _ctrl lbAdd format ["%1. %2 (%3s)", _forEachIndex + 1, _displayName, GVAR(paradropTimeCoefficent) * _itemSize] } else { diff --git a/addons/cargo/functions/fnc_paradropItem.sqf b/addons/cargo/functions/fnc_paradropItem.sqf index 6a84a20799c..934beb2aad2 100644 --- a/addons/cargo/functions/fnc_paradropItem.sqf +++ b/addons/cargo/functions/fnc_paradropItem.sqf @@ -63,7 +63,7 @@ if (_item isEqualType objNull) then { [QGVAR(serverUnload), [_object, _posBehindVehicleAGL]] call CBA_fnc_serverEvent; } else { _object = createVehicle [_item, _posBehindVehicleAGL, [], 0, "NONE"]; - _object setPosASL (AGLtoASL _posBehindVehicleAGL); + _object setPosASL (AGLToASL _posBehindVehicleAGL); }; [QEGVAR(common,setVelocity), [_object, (velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply -5)], _object] call CBA_fnc_targetEvent; diff --git a/addons/cargo/functions/fnc_setSpace.sqf b/addons/cargo/functions/fnc_setSpace.sqf index 01c078496c2..514b84ea176 100644 --- a/addons/cargo/functions/fnc_setSpace.sqf +++ b/addons/cargo/functions/fnc_setSpace.sqf @@ -35,7 +35,7 @@ private _cargoSpace = _space; } forEach _loaded; // If the new value is the same as the old, do nothing -if (_cargoSpace == (_vehicle call FUNC(getCargoSpaceLeft))) exitwith {}; +if (_cargoSpace == (_vehicle call FUNC(getCargoSpaceLeft))) exitWith {}; // Apply new space globally // Necessary to update value, even if no space, as API could be used again diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index 7212d89c229..23d62c7c01b 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -36,7 +36,7 @@ if (isNull _vehicle) exitWith { // Start progress bar if ([_item, _vehicle] call FUNC(canLoadItemIn)) then { - private _duration = GVAR(loadTimeCoefficient) * (_item call FUNC(getSizeItem)); + private _duration = [_item, false] call FUNC(getDelayItem); // If load time is 0, don't show a progress bar if (_duration <= 0) exitWith { diff --git a/addons/cargo/functions/fnc_startUnload.sqf b/addons/cargo/functions/fnc_startUnload.sqf index 39dbf59f48a..e5eaab76dc7 100644 --- a/addons/cargo/functions/fnc_startUnload.sqf +++ b/addons/cargo/functions/fnc_startUnload.sqf @@ -26,7 +26,7 @@ if (GVAR(interactionParadrop)) exitWith { // Close the cargo menu closeDialog 0; - private _duration = GVAR(paradropTimeCoefficent) * (_item call FUNC(getSizeItem)); + private _duration = [_item, true] call FUNC(getDelayItem); // If drop time is 0, don't show a progress bar if (_duration <= 0) exitWith { @@ -81,7 +81,7 @@ if ([_item, GVAR(interactionVehicle), _unit] call FUNC(canUnloadItem)) then { // Close the cargo menu closeDialog 0; - private _duration = GVAR(loadTimeCoefficient) * (_item call FUNC(getSizeItem)); + private _duration = [_item, false] call FUNC(getDelayItem); // If unload time is 0, don't show a progress bar if (_duration <= 0) exitWith { diff --git a/addons/cargo/functions/fnc_unloadItem.sqf b/addons/cargo/functions/fnc_unloadItem.sqf index 7580de8488a..e22d87a098b 100644 --- a/addons/cargo/functions/fnc_unloadItem.sqf +++ b/addons/cargo/functions/fnc_unloadItem.sqf @@ -116,7 +116,7 @@ if (_object isEqualType objNull) then { _object setDir _direction; }; - _object setPosASL (AGLtoASL _emptyPosAGL); + _object setPosASL (AGLToASL _emptyPosAGL); [QEGVAR(common,fixCollision), _object] call CBA_fnc_localEvent; [QEGVAR(common,fixPosition), _object] call CBA_fnc_localEvent; diff --git a/addons/cargo/initSettings.inc.sqf b/addons/cargo/initSettings.inc.sqf index 4f92934d46a..7e482670272 100644 --- a/addons/cargo/initSettings.inc.sqf +++ b/addons/cargo/initSettings.inc.sqf @@ -59,3 +59,10 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)]; _category, true ] call CBA_fnc_addSetting; + +[ + QGVAR(checkSizeInteraction), + "CHECKBOX", + LSTRING(checkSizeInteraction), + _category +] call CBA_fnc_addSetting; diff --git a/addons/cargo/menu.hpp b/addons/cargo/menu.hpp index 1811369d7d5..51020335d45 100644 --- a/addons/cargo/menu.hpp +++ b/addons/cargo/menu.hpp @@ -8,16 +8,16 @@ class GVAR(menu) { class controlsBackground { class HeaderBackground: ACE_gui_backgroundBase { idc = -1; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; + x = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; text = "#(argb,8,8,3)color(0,0,0,0)"; }; class CenterBackground: HeaderBackground { - y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - h = "14.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + y = "2.1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + h = "14.2 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; text = "#(argb,8,8,3)color(0,0,0,0.8)"; colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; colorBackground[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; @@ -28,36 +28,36 @@ class GVAR(menu) { class HeaderName { idc = 1; type = CT_STATIC; - x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; style = QUOTE(ST_LEFT + ST_SHADOW); font = "RobotoCondensed"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {0.95, 0.95, 0.95, 0.75}; colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; text = CSTRING(cargoMenu); }; class SubHeader: HeaderName { idc = 2; - x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "2.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; style = ST_CENTER; colorText[] = {1, 1, 1, 0.9}; colorBackground[] = {0, 0, 0, 0}; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1.2)"; text = ""; }; class cargoList: ACE_gui_listBoxBase { idc = 100; - x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "12.8 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + x = "13.1 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "4 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "12.8 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "10 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.7)"; rowHeight = 0.03; colorBackground[] = {0, 0, 0, 0.2}; colorText[] = {1, 1, 1, 1.0}; @@ -70,12 +70,12 @@ class GVAR(menu) { class btnCancel: ACE_gui_buttonBase { text = "$STR_DISP_CANCEL"; idc = 11; - x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "14.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "6 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + x = "13.1 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "14.1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "6 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + size = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.7)"; animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)"; animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; @@ -96,13 +96,13 @@ class GVAR(menu) { class btnUnload: btnCancel { text = CSTRING(unloadObject); idc = 12; - x = "19.9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + x = "19.9 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; action = QUOTE(ACE_player call FUNC(startUnload)); }; class btnPlace: btnUnload { text = CSTRING(deployObject); idc = 13; - y = "15.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + y = "15.2 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; action = QUOTE(ACE_player call FUNC(startDeploy)); colorDisabled[] = {0.25, 0.25, 0.25, 1}; }; diff --git a/addons/cargo/renameMenu.hpp b/addons/cargo/renameMenu.hpp index b6acc9ad4e3..a3cb845c6b7 100644 --- a/addons/cargo/renameMenu.hpp +++ b/addons/cargo/renameMenu.hpp @@ -8,16 +8,16 @@ class GVAR(renameMenu) { class controlsBackground { class HeaderBackground: ACE_gui_backgroundBase { idc = -1; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; + x = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; text = "#(argb,8,8,3)color(0,0,0,0)"; }; class CenterBackground: HeaderBackground { - y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - h = "2.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + y = "2.1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + h = "2.9 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; text = "#(argb,8,8,3)color(0,0,0,0.8)"; colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; colorBackground[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; @@ -28,13 +28,13 @@ class GVAR(renameMenu) { class HeaderName { idc = 1; type = CT_STATIC; - x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; style = QUOTE(ST_LEFT + ST_SHADOW); font = "RobotoCondensed"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {0.95, 0.95, 0.95, 0.75}; colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])", "(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])", "(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; text = CSTRING(renameObjectUI); @@ -43,21 +43,21 @@ class GVAR(renameMenu) { onLoad = QUOTE((_this select 0) ctrlSetText (GVAR(interactionVehicle) getVariable [ARR_2(QQGVAR(customName),'')])); idc = 100; canModify = 1; - x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "2.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "12.8 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - SizeEx = "1.5 * (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + x = "13.1 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "2.3 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "12.8 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "1.5 * (((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.7)"; }; class btnCancel: ACE_gui_buttonBase { text = "$STR_DISP_CANCEL"; idc = 11; - x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "3.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "5 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + x = "13.1 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "3.9 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "5 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + size = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.7)"; animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)"; animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; @@ -78,7 +78,7 @@ class GVAR(renameMenu) { class btnSave: btnCancel { text = ECSTRING(Common,Save); idc = 12; - x = "20.9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + x = "20.9 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; action = QUOTE(closeDialog 1; call FUNC(renameObject)); }; }; diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 8e16f500901..1ee1d4d1cc3 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -343,12 +343,18 @@ Не может быть выгружен No puede ser descargado + + Check Cargo Size + 화물 크기 확인 + 貨物としての大きさを確認 + Проверить размер груза + Cargo Size: %1 Frachtgröße: %1 Dimensione Carico: %1 Encombrement fret: %1 - 貨物のサイズ: %1 + 貨物の大きさ: %1 화물 크기: %1 Размер груза: %1 Tamaño de carga: %1 @@ -414,7 +420,7 @@ Cargo Size Frachtgröße Dimensioni nel Carico - 貨物のサイズ + 貨物の大きさ 貨物的大小 货物的大小 Wielkość ładunku @@ -519,7 +525,7 @@ Modifies how long it takes to load/unload items.\nTime, in seconds, is the size of the item multiplied by this value. Gibt an, wie lange das Laden / Entladen von Gegenständen dauern soll.\nZeit in Sekunden, die mit der Größe des Gegenstandes multipliziert wird. - 貨物の積み込み/積み下ろしに掛かる時間を変更します。\n時間 (秒単位) は、貨物のサイズにこの値を掛けたものです。 + 貨物の積み込み/積み下ろしに掛かる時間を変更します。\n時間 (秒単位) は、貨物の大きさにこの値を掛けたものです。 Modyfikuje, jak długo zajmuje załadowywanie/wyładowywanie przedmiotów. \nCzasem, w sekundach, jest wielkość przedmiotu razy jego wartość. Modifica il tempo impiegato per caricare o scaricare gli oggetti.\nIl tempo, in secondi, equivale alla dimensione dell'oggetto moltiplicata per questo valore Изменяет время для загрузки/выгрузки предметов. \nВремя (сек) - это размер предмета, умноженный на это значение. @@ -603,5 +609,8 @@ Steuert, ob Frachtgegenstände über die Aufbaumethode entladen werden können. Controla si los objetos de la carga pueden ser descargados mediante el método de despliegue. + + Show Check Cargo Size Interaction + diff --git a/addons/casings/functions/fnc_createCasing.sqf b/addons/casings/functions/fnc_createCasing.sqf index fe35ad5945c..428d940414a 100644 --- a/addons/casings/functions/fnc_createCasing.sqf +++ b/addons/casings/functions/fnc_createCasing.sqf @@ -47,7 +47,7 @@ private _modelPath = GVAR(cachedCasings) getOrDefaultCall [_ammo, { if (_modelPath isEqualTo "") exitWith {}; -private _unitPos = getposASL _unit; +private _unitPos = getPosASL _unit; // Distant shooters don't produce as many cases if ((AGLToASL positionCameraToWorld [0,0,0]) vectorDistance _unitPos > 100 && {random 1 < 0.9}) exitWith {}; diff --git a/addons/common/CfgUIGrids.hpp b/addons/common/CfgUIGrids.hpp index 1e8963e03e1..7c48886bafd 100644 --- a/addons/common/CfgUIGrids.hpp +++ b/addons/common/CfgUIGrids.hpp @@ -5,13 +5,13 @@ class CfgUIGrids { class Variables { grid_ACE_displayText[] = { { - "((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))", - "safeZoneY + 0.175 * safezoneH", - "(10 *(((safezoneW / safezoneH) min 1.2) / 40))", - "(3 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))" + "((safeZoneX + safeZoneW) - (10 *(((safeZoneW / safeZoneH) min 1.2) / 40)) - 2.9 *(((safeZoneW / safeZoneH) min 1.2) / 40))", + "safeZoneY + 0.175 * safeZoneH", + "(10 *(((safeZoneW / safeZoneH) min 1.2) / 40))", + "(3 *((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25))" }, - "(((safezoneW / safezoneH) min 1.2) / 40)", - "((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)" + "(((safeZoneW / safeZoneH) min 1.2) / 40)", + "((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)" }; }; }; diff --git a/addons/common/CompassControl.hpp b/addons/common/CompassControl.hpp index 627e18d2f8d..16b1b3cf43d 100644 --- a/addons/common/CompassControl.hpp +++ b/addons/common/CompassControl.hpp @@ -10,7 +10,7 @@ #define POINTER_WIDTH_FACTOR (1/128) #define LEFT (0.5 - 8 * GUI_GRID_W) -#define TOP (safezoneY + 1.6 * GUI_GRID_H) +#define TOP (safeZoneY + 1.6 * GUI_GRID_H) #define WIDTH (16 * GUI_GRID_W) #define HEIGHT (0.5 * GUI_GRID_H) diff --git a/addons/common/DisableMouseDialog.hpp b/addons/common/DisableMouseDialog.hpp index 75689cf6526..1d1d6cfaa74 100644 --- a/addons/common/DisableMouseDialog.hpp +++ b/addons/common/DisableMouseDialog.hpp @@ -8,10 +8,10 @@ class GVAR(DisableMouse_Dialog) { class Background: ctrlMapEmpty { idc = 101; fade = 1; - x = "safezoneXAbs"; - y = "safezoneY"; - w = "safezoneWAbs"; - h = "safezoneH"; + x = "safeZoneXAbs"; + y = "safeZoneY"; + w = "safeZoneWAbs"; + h = "safeZoneH"; }; }; }; diff --git a/addons/common/HintConfig.hpp b/addons/common/HintConfig.hpp index c299bee8dfb..c3eda57d6bb 100644 --- a/addons/common/HintConfig.hpp +++ b/addons/common/HintConfig.hpp @@ -39,11 +39,11 @@ class RscTitles { idc = 1; text = ""; //size = "1 / 40 / (getResolution select 5)"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {1, 1, 1, 1}; colorBackground[] = {0, 0, 0, 0.5}; - x = "safeZoneW + safeZoneX - 0 * safezoneW"; //safeZoneW + safeZoneX - 0.2 * safezoneW; - y = "safeZoneY + 0.2 * safezoneH"; + x = "safeZoneW + safeZoneX - 0 * safeZoneW"; //safeZoneW + safeZoneX - 0.2 * safeZoneW; + y = "safeZoneY + 0.2 * safeZoneH"; w = "0.2 * safeZoneW"; h = "0.1 * SafeZoneH"; font = "RobotoCondensed"; @@ -63,11 +63,11 @@ class RscTitles { idc = 1; text = ""; //size = "1 / 40 / (getResolution select 5)"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {1, 1, 1, 1}; colorBackground[] = {0.8, 0, 0, 0.5}; x = "0.3 * safeZoneW + safeZoneX"; - y = "0.4 * safezoneH + safeZoneY"; + y = "0.4 * safeZoneH + safeZoneY"; w = "0.4 * safeZoneW"; h = "0.2 * SafeZoneH"; }; diff --git a/addons/common/ProgressScreen.hpp b/addons/common/ProgressScreen.hpp index bef2994e7d9..c3026a9fe4f 100644 --- a/addons/common/ProgressScreen.hpp +++ b/addons/common/ProgressScreen.hpp @@ -18,28 +18,28 @@ class GVAR(ProgressBar_Dialog) { size = 1; colorBackground[] = {0, 0, 0, 0.0}; colorText[] = {0, 0, 0, 0}; - x = "safezoneX"; - y = "safezoneY"; - w = "safezoneW"; - h = "safezoneH"; + x = "safeZoneX"; + y = "safeZoneY"; + w = "safeZoneW"; + h = "safeZoneH"; }; class TitleBackground: ACE_gui_staticBase { idc = 1; style = ST_CENTER; - sizeEx = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + sizeEx = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; colorBackground[] = {0, 0, 0, 0.5}; colorText[] = {1, 1, 1, 1}; - x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "0 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "1 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "0 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "38 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; class Progress: ACE_gui_RscProgress { idc = 2; - x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "0.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "1.2 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "0.1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "38 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; colorFrame[] = {1,1,1,0.5}; colorBar[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getVariable ['GUI_BCG_RGB_A',0.8])"}; texture = "#(argb,8,8,3)color(1,1,1,0.7)"; diff --git a/addons/common/RscInfoType.hpp b/addons/common/RscInfoType.hpp index 672d043276c..89d3c02ec1d 100644 --- a/addons/common/RscInfoType.hpp +++ b/addons/common/RscInfoType.hpp @@ -6,19 +6,19 @@ class RscInGameUI { }; class RscUnitInfoSoldier: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSoldier',_this select 0)]; [ARR_2('ace_infoDisplayChanged',[ARR_2(_this select 0,'Soldier')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSoldier',_this select 0)]; [ARR_2('ace_infoDisplayChanged',[ARR_2(_this select 0,'Soldier')])] call CBA_fnc_localEvent;); }; class RscUnitInfoTank: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle',_this select 0)];); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle',_this select 0)];); }; class RscUnitInfoAirNoWeapon: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft',_this select 0)];); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft',_this select 0)];); }; class RscUnitInfoAir: RscUnitInfoAirNoWeapon { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft',_this select 0)];); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft',_this select 0)];); }; class RscUnitInfo_AH64D_gunner { @@ -30,11 +30,11 @@ class RscInGameUI { }; class RscUnitInfoSubmarine: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSubmarine',_this select 0)];); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSubmarine',_this select 0)];); }; class RscUnitInfoShip: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgShip',_this select 0)];); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgShip',_this select 0)];); }; class RscWeaponEmpty { @@ -94,7 +94,7 @@ class RscInGameUI { }; class RscUnitInfoParachute: RscUnitInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgParachute',_this select 0)]; [ARR_2('ace_infoDisplayChanged',[ARR_2(_this select 0,'Parachute')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgParachute',_this select 0)]; [ARR_2('ace_infoDisplayChanged',[ARR_2(_this select 0,'Parachute')])] call CBA_fnc_localEvent;); }; class RscUnitVehicle { @@ -106,10 +106,10 @@ class RscInGameUI { }; class RscStaminaBar { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStaminaBar"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgStaminaBar)),_this select 0)]); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStaminaBar"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgStaminaBar)),_this select 0)]); }; class RscStanceInfo { - onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStanceInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('ace_infoDisplayChanged',[ARR_2(_this select 0,'Stance')])] call CBA_fnc_localEvent;); + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStanceInfo"",'IGUI')] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('ace_infoDisplayChanged',[ARR_2(_this select 0,'Stance')])] call CBA_fnc_localEvent;); }; }; diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index 36147753459..e6a2a042c09 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -78,6 +78,7 @@ PREP(getFirstObjectIntersection); PREP(getFirstTerrainIntersection); PREP(getGunner); PREP(getInPosition); +PREP(getItemReplacements); PREP(getLocalUnits); PREP(getMapData); PREP(getMapGridData); @@ -269,8 +270,8 @@ PREP(_handleRequestAllSyncedEvents); // other eventhandlers PREP(addActionEventHandler); PREP(addActionMenuEventHandler); +PREP(addExplosionEventHandler); PREP(addMapMarkerCreatedEventHandler); -PREP(addPlayerEH); PREP(removeActionEventHandler); PREP(removeActionMenuEventHandler); diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 460389b5065..f5bea2958f8 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -137,7 +137,7 @@ params ["_unit", "_disable"]; if (_disable) then { - private _features = ["AUTOTARGET", "TARGET", "WEAPONAIM"/*, "FIREWEAPON"*/, "RADIOPROTOCOL"]; // TODO: Uncomment in 2.18 + private _features = ["AUTOTARGET", "TARGET", "WEAPONAIM", "FIREWEAPON", "RADIOPROTOCOL"]; // Save current status _unit setVariable [QGVAR(featuresAiUAV), _features apply {[_x, _unit checkAIFeature _x]}]; @@ -165,7 +165,7 @@ if (isServer) then { private _zeusLogic = getAssignedCuratorLogic _dcPlayer; if ((!isNil "_zeusLogic") && {!isNull _zeusLogic}) then { { - if ((_x getvariable ["bis_fnc_moduleRemoteControl_owner", objnull]) isEqualTo _dcPlayer) exitWith { + if ((_x getVariable ["bis_fnc_moduleRemoteControl_owner", objNull]) isEqualTo _dcPlayer) exitWith { INFO_3("[%1] DC - Was Zeus [%2] while controlling unit [%3] - manually clearing `bis_fnc_moduleRemoteControl_owner`",[_x] call FUNC(getName),_dcPlayer,_x); _x setVariable ["bis_fnc_moduleRemoteControl_owner", nil, true]; }; @@ -197,7 +197,7 @@ if (isServer) then { [QGVAR(unlockVehicle), { _this lock (_this getVariable [QGVAR(lockStatus), locked _this]); - if ([] isNotEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) then { + if ([] isNotEqualTo getArray (configOf _this >> "assembleInfo" >> "dissasembleTo")) then { [_this, "disableWeaponAssembly", QGVAR(lockVehicle), false] call FUNC(statusEffect_set); }; }] call CBA_fnc_addEventHandler; @@ -296,7 +296,7 @@ call FUNC(checkFiles); ////////////////////////////////////////////////// -// Set up ace_settingsInitialized eventhandler +// Set up CBA_settingsInitialized eventhandler ////////////////////////////////////////////////// ["CBA_settingsInitialized", { @@ -498,10 +498,10 @@ GVAR(reloadMutex_lastMagazines) = []; private _isLauncher = _weapon isKindOf ["Launcher", configFile >> "CfgWeapons"]; private _duration = 0; if (_isLauncher) then { - _duration = getNumber (configfile >> "CfgMovesMaleSdr" >> "States" >> _gesture >> "speed"); + _duration = getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> _gesture >> "speed"); }; if (_duration == 0) then { - _duration = getNumber (configfile >> "CfgGesturesMale" >> "States" >> _gesture >> "speed"); + _duration = getNumber (configFile >> "CfgGesturesMale" >> "States" >> _gesture >> "speed"); }; if (_duration != 0) then { @@ -564,7 +564,7 @@ GVAR(reloadMutex_lastMagazines) = []; // Lastly, do JIP events // JIP Detection and event trigger. Run this at the very end, just in case anything uses it // Note: usage of player is most likely on purpose -if (didJip) then { +if (didJIP) then { // We are jipping! Get ready and wait, and throw the event [{ if(!isNull player && GVAR(settingsInitFinished)) then { diff --git a/addons/common/XEH_preStart.sqf b/addons/common/XEH_preStart.sqf index 3168243c067..5e02fb26f17 100644 --- a/addons/common/XEH_preStart.sqf +++ b/addons/common/XEH_preStart.sqf @@ -3,7 +3,7 @@ #include "XEH_PREP.hpp" if (isFilePatchingEnabled) then { - private _notLoaded = configProperties [configfile >> "ace_notLoaded", "isText _x"]; + private _notLoaded = configProperties [configFile >> "ace_notLoaded", "isText _x"]; { INFO_2("%1 not loaded because %2",configName _x,getText _x); } forEach _notLoaded; diff --git a/addons/common/define.hpp b/addons/common/define.hpp index ce8765ec9f4..e27c369146b 100644 --- a/addons/common/define.hpp +++ b/addons/common/define.hpp @@ -107,7 +107,7 @@ class ACE_gui_editBase { style = "0x00 + 0x40"; font = "RobotoCondensed"; shadow = 2; - sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + sizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1)"; colorDisabled[] = {1, 1, 1, 0.25}; }; @@ -187,10 +187,10 @@ class ACE_gui_RscProgress { colorFrame[] = {1, 1, 1, 0.7}; colorBar[] = {1, 1, 1, 0.7}; texture = "#(argb,8,8,3)color(1,1,1,0.7)"; - x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "1 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)"; + y = "10 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)"; + w = "38 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "0.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; class ACE_gui_staticBase { @@ -384,9 +384,9 @@ class ACE_gui_comboBoxBase: RscCombo { class ACE_gui_mapBase { moveOnEdges = 1; x = "SafeZoneXAbs"; - y = "SafeZoneY + 1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + y = "SafeZoneY + 1.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; w = "SafeZoneWAbs"; - h = "SafeZoneH - 1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + h = "SafeZoneH - 1.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; type = 100; // Use 100 to hide markers style = 48; shadow = 0; @@ -440,15 +440,15 @@ class ACE_gui_mapBase { onMouseButtonDblClick = ""; fontLabel = "RobotoCondensed"; - sizeExLabel = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; + sizeExLabel = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.8)"; fontGrid = "TahomaB"; sizeExGrid = 0.02; fontUnits = "TahomaB"; - sizeExUnits = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; + sizeExUnits = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.8)"; fontNames = "RobotoCondensed"; - sizeExNames = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8) * 2"; + sizeExNames = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.8) * 2"; fontInfo = "RobotoCondensed"; - sizeExInfo = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; + sizeExInfo = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.8)"; fontLevel = "TahomaB"; sizeExLevel = 0.02; text = "#(argb,8,8,3)color(1,1,1,1)"; @@ -458,12 +458,12 @@ class ACE_gui_mapBase { size = 50; }; class Legend { - x = "SafeZoneX + (((safezoneW / safezoneH) min 1.2) / 40)"; - y = "SafeZoneY + safezoneH - 4.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "3.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "SafeZoneX + (((safeZoneW / safeZoneH) min 1.2) / 40)"; + y = "SafeZoneY + safeZoneH - 4.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + w = "10 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "3.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; font = "RobotoCondensed"; - sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; + sizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.8)"; colorBackground[] = {1, 1, 1, 0.5}; color[] = {0, 0, 0, 1}; }; diff --git a/addons/common/dev/test_mapConfigs.sqf b/addons/common/dev/test_mapConfigs.sqf index 369b2b18089..261dc0a9abd 100644 --- a/addons/common/dev/test_mapConfigs.sqf +++ b/addons/common/dev/test_mapConfigs.sqf @@ -28,7 +28,7 @@ private _maps = configProperties [configFile >> "CfgWorldList", "(isClass _x)", private _stepX = 1e10; private _stepY = 1e10; { - private _zoom = getnumber (_x >> "zoomMax"); + private _zoom = getNumber (_x >> "zoomMax"); if (_zoom < _zoomMax) then { _zoomMax = _zoom; _formatX = getText (_x >> "formatX"); diff --git a/addons/common/functions/fnc_ASLToPosition.sqf b/addons/common/functions/fnc_ASLToPosition.sqf index b99e9fb88a3..991e79c4331 100644 --- a/addons/common/functions/fnc_ASLToPosition.sqf +++ b/addons/common/functions/fnc_ASLToPosition.sqf @@ -20,5 +20,5 @@ if (surfaceIsWater _this) then { _this } else { - ASLtoATL _this + ASLToATL _this }; diff --git a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf index 2d8f8be2597..4d016ddaba7 100644 --- a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf +++ b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf @@ -18,7 +18,6 @@ params ["_client"]; { - //IGNORE_PRIVATE_WARNING ["_x", "_y"]; _y params ["", "_eventlog"]; ["ACEs", [_x, _eventLog], _client] call CBA_fnc_targetEvent; false diff --git a/addons/common/functions/fnc_addExplosionEventHandler.sqf b/addons/common/functions/fnc_addExplosionEventHandler.sqf new file mode 100644 index 00000000000..9fb5ef80f24 --- /dev/null +++ b/addons/common/functions/fnc_addExplosionEventHandler.sqf @@ -0,0 +1,48 @@ +#include "..\script_component.hpp" +/* + * Author: johnb432, PabstMirror + * Adds event hander for explosions (for local projectiles) + * Warning: For shots that are tracers and explosive the event will trigger on all machines in range + * This function may be changed after 2.18! + * + * Arguments: + * 0: Code to execute + * + * Return Value: + * The CBA Event Handler Index + * + * Example: + * [{systemChat "boom"}] call ace_common_fnc_addExplosionEventHandler + * + * Public: No (maybe after 2.18) + */ + +params [["_code", {}, [{}]]]; + +if !(missionNamespace getVariable [QGVAR(addExplosionEventHandlerActive), false]) then { + GVAR(addExplosionEventHandlerActive) = true; + + // Add EH to existing projectiles and mines + { + TRACE_2("existing",typeOf _x,local _x); + // Rockets only explode on local clients + _x addEventHandler ["Explode", { + TRACE_1("exp (existing)",_this); + [QGVAR(explosion), _this] call CBA_fnc_localEvent; + }]; + } forEach ((8 allObjects 2) select {local _x}); + + addMissionEventHandler ["ProjectileCreated", { + params ["_projectile"]; + TRACE_2("pc",typeOf _projectile,local _projectile); + + if (!local _projectile) exitWith {}; // Rockets only explode on local clients + + _projectile addEventHandler ["Explode", { + TRACE_1("exp",_this); + [QGVAR(explosion), _this] call CBA_fnc_localEvent; + }]; + }]; +}; + +[QGVAR(explosion), _code] call CBA_fnc_addEventHandler diff --git a/addons/common/functions/fnc_addLineToDebugDraw.sqf b/addons/common/functions/fnc_addLineToDebugDraw.sqf index 016c99ddf48..3d6309fdd43 100644 --- a/addons/common/functions/fnc_addLineToDebugDraw.sqf +++ b/addons/common/functions/fnc_addLineToDebugDraw.sqf @@ -25,10 +25,10 @@ if (isNil QGVAR(debugLines)) then { }; if (count GVAR(debugLines) < 100) then { - GVAR(debugLines) pushBack [ASLtoAGL _startASL, ASLtoAGL _endASL, _color]; + GVAR(debugLines) pushBack [ASLToAGL _startASL, ASLToAGL _endASL, _color]; GVAR(debugLinesIndex) = 0; } else { - GVAR(debugLines) set [GVAR(debugLinesIndex), [ASLtoAGL _startASL, ASLtoAGL _endASL, _color]]; + GVAR(debugLines) set [GVAR(debugLinesIndex), [ASLToAGL _startASL, ASLToAGL _endASL, _color]]; GVAR(debugLinesIndex) = (GVAR(debugLinesIndex) + 1) mod 100; }; diff --git a/addons/common/functions/fnc_addPlayerEH.sqf b/addons/common/functions/fnc_addPlayerEH.sqf deleted file mode 100644 index c20fde9da17..00000000000 --- a/addons/common/functions/fnc_addPlayerEH.sqf +++ /dev/null @@ -1,63 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: PabstMirror - * Adds event handler just to ACE_player - * Can be removed after cba 3.18 is released for CBA_fnc_addBISPlayerEventHandler - * This never was public in a release - * - * Arguments: - * 0: Key - * 1: Event Type - * 2: Event Code - * 3: Ignore Virtual Units (spectators, virtual zeus, uav RC) (default: true) - * - * Return Value: - * None - * - * Example: - * ["example", "FiredNear", {systemChat str _this}] call ace_common_fnc_addPlayerEH - * - * Public: No -*/ -params [["_key", "", [""]], ["_type", "", [""]], ["_code", {}, [{}]], ["_ignoreVirtual", true, [true]]]; -TRACE_3("addPlayerEH",_key,_type,_ignoreVirtual); - -if (isNil QGVAR(playerEventsHash)) then { // first-run init - GVAR(playerEventsHash) = createHashMap; - ["unit", { - params ["_newPlayer", "_oldPlayer"]; - // uav check only applies to direct controlling UAVs from zeus, no effect on normal UAV operation - private _isVirutal = (unitIsUAV _newPlayer) || {getNumber (configOf _newPlayer >> "isPlayableLogic") == 1}; - - TRACE_4("",_newPlayer,_oldPlayer,_isVirutal,count GVAR(playerEventsHash)); - { - _y params ["_type", "_code", "_ignoreVirtual"]; - - private _oldEH = _oldPlayer getVariable [_x, -1]; - if (_oldEH != -1) then { - _oldPlayer removeEventHandler [_type, _oldEH]; - _oldPlayer setVariable [_x, nil]; - }; - - _oldEH = _newPlayer getVariable [_x, -1]; - if (_oldEH != -1) then { continue }; // if respawned then var and EH already exists - if (_ignoreVirtual && _isVirutal) then { continue }; - - private _newEH = _newPlayer addEventHandler [_type, _code]; - _newPlayer setVariable [_x, _newEH]; - } forEach GVAR(playerEventsHash); - }, false] call CBA_fnc_addPlayerEventHandler; -}; - - -_key = format [QGVAR(playerEvents_%1), toLower _key]; -if (_key in GVAR(playerEventsHash)) exitWith { ERROR_1("bad key %1",_this); }; - -GVAR(playerEventsHash) set [_key, [_type, _code, _ignoreVirtual]]; - -if (isNull ACE_player) exitWith {}; -if (_ignoreVirtual && {(unitIsUAV ACE_player) || {getNumber (configOf ACE_player >> "isPlayableLogic") == 1}}) exitWith {}; - -// Add event now -private _newEH = ACE_player addEventHandler [_type, _code]; -ACE_player setVariable [_key, _newEH]; diff --git a/addons/common/functions/fnc_addToInventory.sqf b/addons/common/functions/fnc_addToInventory.sqf index 38476ad5fc1..a6ab4e17136 100644 --- a/addons/common/functions/fnc_addToInventory.sqf +++ b/addons/common/functions/fnc_addToInventory.sqf @@ -30,16 +30,16 @@ private _weaponHolder = _unit; switch (_container) do { case "vest": { - _canAdd = [_unit, _classname, 1, false, true, false] call CBA_fnc_canAddItem; + _canAdd = (vestContainer _unit) canAdd _classname; }; case "backpack": { - _canAdd = [_unit, _classname, 1, false, false, true] call CBA_fnc_canAddItem; + _canAdd = (backpackContainer _unit) canAdd _classname; }; case "uniform": { - _canAdd = [_unit, _classname, 1, true, false, false] call CBA_fnc_canAddItem; + _canAdd = (uniformContainer _unit) canAdd _classname; }; default { - _canAdd = [_unit, _classname] call CBA_fnc_canAddItem; + _canAdd = _unit canAdd [_classname, 1, true]; if (_canAdd) then { switch (_type select 1) do { case "primary": { @@ -59,21 +59,6 @@ switch (_container) do { }; }; -if (_type select 0 == "magazine") then { - private _configAmmoCount = getNumber (configFile >> "CfgMagazines" >> _classname >> "count"); - - // https://feedback.bistudio.com/T74244 - // When adding throwables with the addXXXCargo(Global) commands, they don't show up in the throwables list - // If a throwable has more than 1 ammo count, adding it with addItem(XXX) commands also renders the throwable unusable - if (_configAmmoCount == 1 && {_ammoCount in [-1, 1]} && {_classname call BIS_fnc_isThrowable}) then { // TODO: replace with https://community.bistudio.com/wiki/isThrowable in 2.18 - _type set [0, "item"]; - }; - - if (_ammoCount == -1) then { - _ammoCount = _configAmmoCount; - }; -}; - switch (_type select 0) do { case "weapon": { if (_canAdd || {_canFitWeaponSlot}) then { @@ -94,16 +79,10 @@ switch (_type select 0) do { _unit addWeaponGlobal _classname; } else { { - _x params ["_parameters", "_container"]; - - if (_parameters call CBA_fnc_canAddItem) exitWith { - _container addWeaponCargoGlobal [_classname, 1]; // addWeaponGlobal will replace the weapon currently in a slot + if (_x canAdd _classname) exitWith { + _x addWeaponCargoGlobal [_classname, 1]; }; - } forEach [ - [[_unit, _classname, 1, false, false, true], backpackContainer _unit], - [[_unit, _classname, 1, false, true, false], vestContainer _unit], - [[_unit, _classname, 1, true, false, false], uniformContainer _unit] - ]; + } forEach [backpackContainer _unit, vestContainer _unit, uniformContainer _unit]; }; }; }; @@ -121,6 +100,10 @@ switch (_type select 0) do { }; case "magazine": { + if (_ammoCount == -1) then { + _ammoCount = getNumber (configFile >> "CfgMagazines" >> _classname >> "count"); + }; + if (_canAdd) then { _addedToUnit = true; diff --git a/addons/common/functions/fnc_adjustMagazineAmmo.sqf b/addons/common/functions/fnc_adjustMagazineAmmo.sqf index 87d5b9e899c..062ee3dea90 100644 --- a/addons/common/functions/fnc_adjustMagazineAmmo.sqf +++ b/addons/common/functions/fnc_adjustMagazineAmmo.sqf @@ -92,7 +92,7 @@ private _maxMagazineAmmo = getNumber (configFile >> "CfgMagazines" >> _magazine // If there is still remaining ammo to add, try add it after having iterated through all containers if (!_removeAmmo && _count > 0) then { { - while {_count > 0 && {_x canAdd [_magazine, 1/* 2.18 , true*/]}} do { + while {_count > 0 && {_x canAdd _magazine}} do { _x addMagazineAmmoCargo [_magazine, 1, _count]; _count = _count - _maxMagazineAmmo; diff --git a/addons/common/functions/fnc_cbaSettings.sqf b/addons/common/functions/fnc_cbaSettings.sqf index 29e4d532b1f..fbba25b579b 100644 --- a/addons/common/functions/fnc_cbaSettings.sqf +++ b/addons/common/functions/fnc_cbaSettings.sqf @@ -58,7 +58,7 @@ GVAR(settingsMovedToSQF) = []; if !(SLX_XEH_MACHINE select 8) then {WARNING("PostInit not finished");}; INFO("Settings initialized."); - //Event that settings are safe to use: + //Event that settings are safe to use, kept for BWC ["ace_settingsInitialized", []] call CBA_fnc_localEvent; //Set init finished and run all delayed functions: @@ -88,7 +88,7 @@ for "_index" from 0 to (_countOptions - 1) do { if (isNil (configName _optionEntry)) then { [_optionEntry] call FUNC(cbaSettings_loadFromConfig); } else { - WARNING_1("Setting [%1] - Already defined from somewhere else??",_varName); + WARNING_1("Setting [%1] - Already defined from somewhere else??",configName _optionEntry); }; #ifdef DEBUG_MODE_FULL } else { @@ -104,7 +104,7 @@ for "_index" from 0 to (_countOptions - 1) do { private _optionEntry = _missionSettingsConfig select _index; private _settingName = configName _optionEntry; if ((toLowerANSI _settingName) in GVAR(cbaSettings_forcedSettings)) then { - WARNING_1("Setting [%1] - Already Forced - ignoring missionConfig",_varName); + WARNING_1("Setting [%1] - Already Forced - ignoring missionConfig",configName _optionEntry); } else { if ((isNil _settingName) && {(getNumber (_settingsConfig >> _settingName >> "movedToSQF")) == 0}) then { // New setting, that was first defined in missionConfigFile diff --git a/addons/common/functions/fnc_cbaSettings_settingChanged.sqf b/addons/common/functions/fnc_cbaSettings_settingChanged.sqf index cf9f18166ab..d819aa05bc0 100644 --- a/addons/common/functions/fnc_cbaSettings_settingChanged.sqf +++ b/addons/common/functions/fnc_cbaSettings_settingChanged.sqf @@ -2,7 +2,7 @@ /* * Author: PabstMirror * Function for handling a cba setting being changed. - * Adds warning if global setting is changed after ace_settingsInitialized. + * Adds warning if global setting is changed after CBA_settingsInitialized. * * Arguments: * 0: Setting Name diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index 27623454ed8..185ec7e5d1a 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -144,7 +144,7 @@ if (isMultiplayer) then { publicVariable QGVAR(serverAddons); publicVariable QGVAR(serverSource); } else { - GVAR(clientVersion) = _version; + GVAR(clientVersion) = _mainVersion; GVAR(clientAddons) = _addons; private _fnc_check = { diff --git a/addons/common/functions/fnc_checkFiles_diagnoseACE.sqf b/addons/common/functions/fnc_checkFiles_diagnoseACE.sqf index f9271ca2137..82241c45274 100644 --- a/addons/common/functions/fnc_checkFiles_diagnoseACE.sqf +++ b/addons/common/functions/fnc_checkFiles_diagnoseACE.sqf @@ -16,7 +16,7 @@ */ // Only run once -if (missionNameSpace getVariable [QGVAR(checkFiles_diagnoseACE), false]) exitWith { +if (missionNamespace getVariable [QGVAR(checkFiles_diagnoseACE), false]) exitWith { createHashMap // return }; diff --git a/addons/common/functions/fnc_checkPBOs.sqf b/addons/common/functions/fnc_checkPBOs.sqf index 4f2e3f4fa6b..d54fda78ba8 100644 --- a/addons/common/functions/fnc_checkPBOs.sqf +++ b/addons/common/functions/fnc_checkPBOs.sqf @@ -38,6 +38,7 @@ if (!_checkAll) exitWith {}; if (!isServer) then { ["ace_versioning_clientCheckDone", { // Don't let this event get triggered again + //IGNORE_PRIVATE_WARNING ["_thisType", "_thisId", "_thisArgs"]; [_thisType, _thisId] call CBA_fnc_removeEventHandler; params ["_clientErrors"]; diff --git a/addons/common/functions/fnc_checkVersionNumber.sqf b/addons/common/functions/fnc_checkVersionNumber.sqf index a2861299174..61ed7f62313 100644 --- a/addons/common/functions/fnc_checkVersionNumber.sqf +++ b/addons/common/functions/fnc_checkVersionNumber.sqf @@ -155,7 +155,7 @@ private _fnc_check = { // Wait for server to send the servers files and version numbers if (isNil "ACE_Version_ServerVersions") then { - ACE_Version_ServerVersions addPublicVariableEventHandler _fnc_check; + "ACE_Version_ServerVersions" addPublicVariableEventHandler _fnc_check; } else { call _fnc_check; }; diff --git a/addons/common/functions/fnc_claim.sqf b/addons/common/functions/fnc_claim.sqf index 997d54f33b8..170c2c6a8f3 100644 --- a/addons/common/functions/fnc_claim.sqf +++ b/addons/common/functions/fnc_claim.sqf @@ -30,10 +30,10 @@ _target setVariable [QGVAR(owner), _unit, true]; // lock target object if (_lockTarget) then { - if (!isNull _unit) then { - [QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent; - } else { + if (isNull _unit) then { [QGVAR(unlockVehicle), _target, _target] call CBA_fnc_targetEvent; + } else { + [QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent; }; }; diff --git a/addons/common/functions/fnc_defineVariable.sqf b/addons/common/functions/fnc_defineVariable.sqf index 85eb7b447f2..e0e7c49e4de 100644 --- a/addons/common/functions/fnc_defineVariable.sqf +++ b/addons/common/functions/fnc_defineVariable.sqf @@ -24,7 +24,7 @@ params ["_name", "_value", "_defaultGlobal", "_category", ["_code", 0], ["_persi if (isNil "_defaultGlobal") exitWith {}; -if !(_name isEqualType "") exitwith { +if !(_name isEqualType "") exitWith { [format ["Tried to the deinfe a variable with an invalid name: %1 Arguments: %2", _name, _this]] call FUNC(debug); }; diff --git a/addons/common/functions/fnc_deprecateComponent.sqf b/addons/common/functions/fnc_deprecateComponent.sqf index d979c043efa..1ed85de2336 100644 --- a/addons/common/functions/fnc_deprecateComponent.sqf +++ b/addons/common/functions/fnc_deprecateComponent.sqf @@ -23,8 +23,8 @@ _oldComponent params ["_oldComponentName", "_oldSettingName"]; _newComponent params ["_newComponentName", "_newSettingName"]; private _isReplacementAvailable = [_newComponentName] call FUNC(isModLoaded); -private _isDeprecatedLoaded = missionNamespace getvariable [_oldSettingName, false]; -private _isReplacementLoaded = missionNamespace getvariable [_newSettingName, false]; +private _isDeprecatedLoaded = missionNamespace getVariable [_oldSettingName, false]; +private _isReplacementLoaded = missionNamespace getVariable [_newSettingName, false]; if (_isDeprecatedLoaded && {_isReplacementAvailable} && {!_isReplacementLoaded}) then { [_newSettingName, true, true, true] call FUNC(setSetting); diff --git a/addons/common/functions/fnc_displayIcon.sqf b/addons/common/functions/fnc_displayIcon.sqf index da08fa832a4..db01bedb043 100644 --- a/addons/common/functions/fnc_displayIcon.sqf +++ b/addons/common/functions/fnc_displayIcon.sqf @@ -21,11 +21,11 @@ */ // positions for the icon UI -#define RIGHT_SIDE (safezoneW + safezoneX) -#define LEFT_SIDE safezoneX +#define RIGHT_SIDE (safeZoneW + safeZoneX) +#define LEFT_SIDE safeZoneX #define TOP_SIDE safeZoneY -#define BOTTOM_SIDE (safeZoneH + safezoneY) -#define ICON_WIDTH (2 * (((safezoneW / safezoneH) min 1.2) / 40)) +#define BOTTOM_SIDE (safeZoneH + safeZoneY) +#define ICON_WIDTH (2 * (((safeZoneW / safeZoneH) min 1.2) / 40)) #define X_POS_ICONS (RIGHT_SIDE - (1.5 * ICON_WIDTH)) #define Y_POS_ICONS (TOP_SIDE + (2.5 * ICON_WIDTH)) #define DIFFERENCE_ICONS (1.1 * ICON_WIDTH) diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index a9376552a95..ed494627702 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -30,7 +30,7 @@ if (typeName _text != "TEXT") then { if (_x isEqualType "" && {isLocalized _x}) then { _text set [_foreachIndex, localize _x]; }; - }foreach _text; + } forEach _text; _text = format _text; }; }; @@ -51,18 +51,18 @@ _ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor); _ctrlHint ctrlSetTextColor GVAR(displayTextFontColor); // Use profile settings from CfgUIGrids.hpp -private _xPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))]; -private _yPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH]; -private _wPos = (_width *(((safezoneW / safezoneH) min 1.2) / 40)); -private _hPos = _size * (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)); +private _xPos = profileNamespace getVariable ["IGUI_GRID_ACE_displayText_X", ((safeZoneX + safeZoneW) - (10 *(((safeZoneW / safeZoneH) min 1.2) / 40)) - 2.9 *(((safeZoneW / safeZoneH) min 1.2) / 40))]; +private _yPos = profileNamespace getVariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safeZoneH]; +private _wPos = (_width *(((safeZoneW / safeZoneH) min 1.2) / 40)); +private _hPos = _size * (2 *((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)); // Ensure still in bounds for large width/height -_xPos = safezoneX max (_xPos min (safezoneX + safezoneW - _wPos)); -_yPos = safeZoneY max (_yPos min (safeZoneY + safezoneH - _hPos)); +_xPos = safeZoneX max (_xPos min (safeZoneX + safeZoneW - _wPos)); +_yPos = safeZoneY max (_yPos min (safeZoneY + safeZoneH - _hPos)); // Zeus Interface Open and Display would be under the "CREATE" list if (!isNull curatorCamera) then { - _xPos = _xPos min ((safezoneX + safezoneW - 12.5 * (((safezoneW / safezoneH) min 1.2) / 40)) - _wPos); + _xPos = _xPos min ((safeZoneX + safeZoneW - 12.5 * (((safeZoneW / safeZoneH) min 1.2) / 40)) - _wPos); }; private _position = [_xPos, _yPos, _wPos, _hPos]; diff --git a/addons/common/functions/fnc_doAnimation.sqf b/addons/common/functions/fnc_doAnimation.sqf index 9e85c30dce3..2f0614ef923 100644 --- a/addons/common/functions/fnc_doAnimation.sqf +++ b/addons/common/functions/fnc_doAnimation.sqf @@ -33,7 +33,7 @@ if (_animation == "") then { TRACE_2("",local _unit,vehicle _unit); switch (_priority) do { case 0: { - if (_unit == vehicle _unit) then { + if (isNull objectParent _unit) then { [QGVAR(playMove), [_unit, _animation], _unit] call CBA_fnc_targetEvent; } else { // Execute on all machines. PlayMove and PlayMoveNow are bugged: They have local effects when executed on remote machines inside vehicles. @@ -41,7 +41,7 @@ switch (_priority) do { }; }; case 1: { - if (_unit == vehicle _unit) then { + if (isNull objectParent _unit) then { [QGVAR(playMoveNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent; } else { // Execute on all machines. PlayMove and PlayMoveNow are bugged: They have local effects when executed on remote machines inside vehicles. @@ -50,7 +50,7 @@ switch (_priority) do { }; case 2: { // try playMoveNow first - if (_unit == vehicle _unit) then { + if (isNull objectParent _unit) then { [QGVAR(playMoveNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent; } else { // Execute on all machines. PlayMove and PlayMoveNow are bugged: They have local effects when executed on remote machines inside vehicles. diff --git a/addons/common/functions/fnc_findUnloadPosition.sqf b/addons/common/functions/fnc_findUnloadPosition.sqf index 2047f7349d8..7fb4e41a73c 100644 --- a/addons/common/functions/fnc_findUnloadPosition.sqf +++ b/addons/common/functions/fnc_findUnloadPosition.sqf @@ -61,7 +61,7 @@ if (isNull _unloader || {_unloader in _vehicle}) then { // Ideal unload pos is halfway between unloader and vehicle (at the unloader's height) private _originASL = ((getPosASL _unloader) vectorAdd (getPosASL _vehicle)) vectorMultiply 0.5; _originASL set [2, (getPosASL _unloader) select 2]; -private _originAGL = ASLtoAGL _originASL; +private _originAGL = ASLToAGL _originASL; // Do a manual search for empty pos (handles underwater, buildings or piers) TRACE_2("Checking for unload",_originAGL,_radiusOfItem); @@ -74,9 +74,9 @@ while {_rangeToCheck < _maxDistance} do { private _roundPointIsValid = false; - if (((AGLtoASL _roundAGL) select 2) > 0) then { + if (((AGLToASL _roundAGL) select 2) > 0) then { // Shoot a ray down, and make sure we hit something solid like a building or the ground - private _belowRoundArray = lineIntersectsSurfaces [(AGLtoASL _roundAGL) vectorAdd [0, 0, 0.5], (AGLtoASL _roundAGL) vectorAdd [0, 0, -1]]; + private _belowRoundArray = lineIntersectsSurfaces [(AGLToASL _roundAGL) vectorAdd [0, 0, 0.5], (AGLToASL _roundAGL) vectorAdd [0, 0, -1]]; TRACE_4("Testing for solid",_roundDistance,_roundAngle,_roundAGL,_belowRoundArray); if (_belowRoundArray isNotEqualTo []) then { @@ -85,7 +85,7 @@ while {_rangeToCheck < _maxDistance} do { // Point is above something: Terrain (null) or Building if ((isNull _aboveBuilding) || {_aboveBuilding isKindOf "Building"}) then { // Get the real intersection point - _roundAGL = ASLtoAGL ((_belowRoundArray select 0) select 0); + _roundAGL = ASLToAGL ((_belowRoundArray select 0) select 0); _roundPointIsValid = true; }; @@ -102,13 +102,13 @@ while {_rangeToCheck < _maxDistance} do { for "_index" from 0 to (COL_TEST_COUNT -1) do { // Scan for collisions with objects with lineIntersectsSurfaces private _angle = _index * (360 / COL_TEST_COUNT); - private _point1ASL = (AGLtoASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.1]; - private _point2ASL = (AGLtoASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, _radiusOfItem + 0.5]; + private _point1ASL = (AGLToASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.1]; + private _point2ASL = (AGLToASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, _radiusOfItem + 0.5]; private _testIntersections = lineIntersectsSurfaces [_point1ASL, _point2ASL]; if (((count _testIntersections) == 1) && {isNull ((_testIntersections select 0) select 2)}) then { private _hitGroundASL = (_testIntersections select 0) select 0; - private _hitHeightOffset = ((AGLtoASL _roundAGL) select 2) - (_hitGroundASL select 2); + private _hitHeightOffset = ((AGLToASL _roundAGL) select 2) - (_hitGroundASL select 2); private _hit2dOffset = _roundAGL distance2D _hitGroundASL; private _slope = _hitHeightOffset atan2 _hit2dOffset; @@ -124,8 +124,8 @@ while {_rangeToCheck < _maxDistance} do { _roundPointIsValid = false; }; - _point1ASL = (AGLtoASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.5]; - _point2ASL = (AGLtoASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, 1]; + _point1ASL = (AGLToASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.5]; + _point2ASL = (AGLToASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, 1]; _testIntersections = lineIntersectsSurfaces [_point1ASL, _point2ASL]; if (_testIntersections isNotEqualTo []) exitWith { diff --git a/addons/common/functions/fnc_getAddon.sqf b/addons/common/functions/fnc_getAddon.sqf index b1a6f7cf995..ab3ad1c2173 100644 --- a/addons/common/functions/fnc_getAddon.sqf +++ b/addons/common/functions/fnc_getAddon.sqf @@ -22,7 +22,7 @@ params ["_config"]; // Return first addon if (_addons isNotEqualTo []) then { - (configSourceModList (configfile >> "CfgPatches" >> _addons select 0)) param [0, ""] + (configSourceModList (configFile >> "CfgPatches" >> _addons select 0)) param [0, ""] } else { // If nothing found at all, return "" "" diff --git a/addons/common/functions/fnc_getDeathAnim.sqf b/addons/common/functions/fnc_getDeathAnim.sqf index 18c6c93c074..4e0b0578729 100644 --- a/addons/common/functions/fnc_getDeathAnim.sqf +++ b/addons/common/functions/fnc_getDeathAnim.sqf @@ -29,7 +29,9 @@ private _unitActionsCfg = configFile >> "CfgMovesBasic" >> "Actions" >> getText TRACE_2("Animation/Action",configName _unitAnimationCfg,configName _unitActionsCfg); -if (!isNull objectParent _unit) then { +if (isNull objectParent _unit) then { + _returnAnimation = getText (_unitActionsCfg >> "die"); +} else { private _interpolateArray = getArray (_unitAnimationCfg >> "interpolateTo"); for "_index" from 0 to (count _interpolateArray - 1) step 2 do { @@ -42,8 +44,6 @@ if (!isNull objectParent _unit) then { _returnAnimation = _indexAnimation; }; }; -} else { - _returnAnimation = getText (_unitActionsCfg >> "die"); }; //Fallback if nothing valid found: diff --git a/addons/common/functions/fnc_getInPosition.sqf b/addons/common/functions/fnc_getInPosition.sqf index 076fd7a23cf..eca21b125a9 100644 --- a/addons/common/functions/fnc_getInPosition.sqf +++ b/addons/common/functions/fnc_getInPosition.sqf @@ -40,6 +40,7 @@ private _enemiesInVehicle = false; //Possible Side Restriction if (side _unit getFriend side _x < 0.6) exitWith {_enemiesInVehicle = true}; } forEach crew _vehicle; +//IGNORE_PRIVATE_WARNING ["_unit", "_isInside", "_vehicle", "_turret", "_index", "_fnc_getInEH", "_position"]; switch (_position) do { case "driver" : { if (CANGETINDRIVER) then { diff --git a/addons/common/functions/fnc_getItemReplacements.sqf b/addons/common/functions/fnc_getItemReplacements.sqf new file mode 100644 index 00000000000..02e4fea9fe6 --- /dev/null +++ b/addons/common/functions/fnc_getItemReplacements.sqf @@ -0,0 +1,42 @@ +#include "..\script_component.hpp" +/* + * Author: LinkIsGrim + * Returns item replacements for a given type and/or item. + * + * Arguments: + * 0: Item or item type ID to check + * 1: Include type replacements for items (default: true) + * + * Return Value: + * Item replacements if replacements exist, nil if not + * + * Example: + * ["FirstAidKit", false] call ace_common_fnc_getItemReplacements + * + * Public: Yes + */ + +params [["_item", "", [0, ""]], ["_includeType", true, [true]]]; + +// If no item replacements exist or item is empty then we don't have any +if (isNil QGVAR(itemReplacements) || _item isEqualTo "") exitWith {}; + +if (_item isEqualType 0) exitWith { + GVAR(itemReplacements) get ("$" + str _item) +}; + +_item = _item call FUNC(getConfigName); +private _replacements = GVAR(itemReplacements) get _item; + +if (_includeType) then { + // If replaceRegisteredItems ever supports replacing magazines this'll need to be more robust + private _itemType = getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type"); + private _typeReplacements = GVAR(itemReplacements) get ("$" + str _itemType); + if (!isNil "_replacements") then { + _replacements append _typeReplacements; + } else { + _replacements = _typeReplacements; + }; +}; + +_replacements // return diff --git a/addons/common/functions/fnc_getMapGridData.sqf b/addons/common/functions/fnc_getMapGridData.sqf index daa4bd86cdf..c6817b5d5b5 100644 --- a/addons/common/functions/fnc_getMapGridData.sqf +++ b/addons/common/functions/fnc_getMapGridData.sqf @@ -30,7 +30,7 @@ private _stepX = 1e10; private _stepY = 1e10; { - private _zoom = getnumber (_x >> "zoomMax"); + private _zoom = getNumber (_x >> "zoomMax"); if (_zoom < _zoomMax) then { _zoomMax = _zoom; _formatX = getText (_x >> "formatX"); diff --git a/addons/common/functions/fnc_getVehicleIcon.sqf b/addons/common/functions/fnc_getVehicleIcon.sqf index a18765567cc..6bda8f63108 100644 --- a/addons/common/functions/fnc_getVehicleIcon.sqf +++ b/addons/common/functions/fnc_getVehicleIcon.sqf @@ -28,8 +28,8 @@ private _objectType = if (_object isEqualType objNull) then { private _cachedValue = GVAR(vehicleIconCache) get _objectType; if (isNil "_cachedValue") then { - private _vehicleValue = getText (configfile >> "CfgVehicles" >> _objectType >> "icon"); - private _vehicleIconValue = getText (configfile >> "CfgVehicleIcons" >> _vehicleValue); + private _vehicleValue = getText (configFile >> "CfgVehicles" >> _objectType >> "icon"); + private _vehicleIconValue = getText (configFile >> "CfgVehicleIcons" >> _vehicleValue); if (_vehicleIconValue == "") then { if (_vehicleValue != "" && {((toLowerANSI _vehicleValue) find ".paa") > -1}) then { diff --git a/addons/common/functions/fnc_headBugFix.sqf b/addons/common/functions/fnc_headBugFix.sqf index 838f48c89e4..51887842e4d 100644 --- a/addons/common/functions/fnc_headBugFix.sqf +++ b/addons/common/functions/fnc_headBugFix.sqf @@ -23,7 +23,7 @@ private _anim = animationState _unit; [QGVAR(headbugFixUsed), [profileName, _anim]] call CBA_fnc_serverEvent; [QGVAR(headbugFixUsed), [profileName, _anim]] call CBA_fnc_localEvent; -if (_unit != vehicle _unit || {!([_unit, objNull, ["isNotSitting"]] call FUNC(canInteractWith))}) exitWith {false}; +if (!isNull objectParent _unit || {!([_unit, objNull, ["isNotSitting"]] call FUNC(canInteractWith))}) exitWith {false}; ["ace_headBugFix", true] call FUNC(setDisableUserInputStatus); diff --git a/addons/common/functions/fnc_moduleLSDVehicles.sqf b/addons/common/functions/fnc_moduleLSDVehicles.sqf index 35e1f07eba6..16a6235ee1a 100644 --- a/addons/common/functions/fnc_moduleLSDVehicles.sqf +++ b/addons/common/functions/fnc_moduleLSDVehicles.sqf @@ -24,7 +24,7 @@ if (isNil QGVAR(LSD_Vehicles)) then { }; { - _hSCount = count (getArray (configOf _x >> "hiddenSelections")); + private _hSCount = count (getArray (configOf _x >> "hiddenSelections")); if (_hSCount > 0) then { GVAR(LSD_Vehicles) pushBack [_x, _hSCount]; }; diff --git a/addons/common/functions/fnc_positionToASL.sqf b/addons/common/functions/fnc_positionToASL.sqf index b286d2f7ab6..808bfe35636 100644 --- a/addons/common/functions/fnc_positionToASL.sqf +++ b/addons/common/functions/fnc_positionToASL.sqf @@ -20,5 +20,5 @@ if (surfaceIsWater _this) then { _this } else { - ATLtoASL _this + ATLToASL _this }; diff --git a/addons/common/functions/fnc_progressBar.sqf b/addons/common/functions/fnc_progressBar.sqf index 9b5519c232f..36f04b18f8c 100644 --- a/addons/common/functions/fnc_progressBar.sqf +++ b/addons/common/functions/fnc_progressBar.sqf @@ -57,7 +57,7 @@ if (_dialog) then { //Adjust position based on user setting: private _ctrlPos = ctrlPosition (uiNamespace getVariable QGVAR(ctrlProgressBarTitle)); -_ctrlPos set [1, ((0 + 29 * GVAR(settingProgressBarLocation)) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))]; +_ctrlPos set [1, ((0 + 29 * GVAR(settingProgressBarLocation)) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2))]; (uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlSetPosition _ctrlPos; (uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlCommit 0; diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index 7273fc61caf..0134bc210c2 100644 --- a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -17,7 +17,7 @@ */ //paramsArray is a normal variable not a command -private _paramsArray = missionnamespace getVariable ["paramsArray", []]; +private _paramsArray = missionNamespace getVariable ["paramsArray", []]; TRACE_1("Reading missionConfigFile params",_paramsArray); diff --git a/addons/common/functions/fnc_runTests.sqf b/addons/common/functions/fnc_runTests.sqf index 4a449fb7eb8..a430cadabaa 100644 --- a/addons/common/functions/fnc_runTests.sqf +++ b/addons/common/functions/fnc_runTests.sqf @@ -30,7 +30,7 @@ INFO_1("ace_common_fnc_runTests starting for [%1]",_specificTest); _total = _total + 1; private _testFile = getText _x; diag_log text format ["----- Starting Testing %1 [%2] -----", _testName, _testFile]; - private _return = ([nil] apply (compile preProcessFileLineNumbers _testFile)) select 0; + private _return = ([nil] apply (compile preprocessFileLineNumbers _testFile)) select 0; if ((isNil "_return") || {_return isNotEqualTo true}) then { systemChat format ["Test [%1] Failed", _testName]; diag_log text format ["----- Finished Testing %1 [Failed] -----", _testName]; diff --git a/addons/common/functions/fnc_setPlayerOwner.sqf b/addons/common/functions/fnc_setPlayerOwner.sqf index 2b37349f9af..010f0b9b462 100644 --- a/addons/common/functions/fnc_setPlayerOwner.sqf +++ b/addons/common/functions/fnc_setPlayerOwner.sqf @@ -17,7 +17,7 @@ * Public: No */ -if (missionNameSpace getVariable [QGVAR(setPlayerOwnerRunning), false]) exitWith {}; +if (missionNamespace getVariable [QGVAR(setPlayerOwnerRunning), false]) exitWith {}; GVAR(setPlayerOwnerRunning) = true; if (isServer) then { diff --git a/addons/common/functions/fnc_setSetting.sqf b/addons/common/functions/fnc_setSetting.sqf index 93c6045a6cf..9135c12ea52 100644 --- a/addons/common/functions/fnc_setSetting.sqf +++ b/addons/common/functions/fnc_setSetting.sqf @@ -29,8 +29,8 @@ if (!_broadcastChanges) exitWith { ERROR_1("Setting [%1] - SetSetting no longer supports non-global settings",_name); }; -if ([_settingName, "mission"] call CBA_settings_fnc_isForced) then { - WARNING_1("Setting [%1] - Already mission forced - Ignoring",_settingName); +if ([_name, "mission"] call CBA_settings_fnc_isForced) then { + WARNING_1("Setting [%1] - Already mission forced - Ignoring",_name); }; [QGVAR(setSetting), [_name, _value], (format [QGVAR(setSetting_%1), _name])] call CBA_fnc_globalEventJIP; diff --git a/addons/common/functions/fnc_showHud.sqf b/addons/common/functions/fnc_showHud.sqf index d74bed9cbde..45020bad84a 100644 --- a/addons/common/functions/fnc_showHud.sqf +++ b/addons/common/functions/fnc_showHud.sqf @@ -52,7 +52,7 @@ if (_reason != "") then { }; private _masks = values GVAR(showHudHash); -private _resultMask = []; +private _resultMask = []; //IGNORE_PRIVATE_WARNING ["_resultMask"]; for "_index" from 0 to 9 do { private _set = true; //Default to true @@ -65,6 +65,6 @@ for "_index" from 0 to 9 do { }; TRACE_2("showHud",_resultMask,keys GVAR(showHudHash)); -showHud _resultMask; +showHUD _resultMask; _resultMask diff --git a/addons/common/functions/fnc_switchAttachmentMode.sqf b/addons/common/functions/fnc_switchAttachmentMode.sqf index f721428a531..ab1dac6c1c7 100644 --- a/addons/common/functions/fnc_switchAttachmentMode.sqf +++ b/addons/common/functions/fnc_switchAttachmentMode.sqf @@ -63,7 +63,7 @@ switch (_weapon) do { }; if (_exit) exitWith {}; // Don't notify if the unit isn't the local player or if an invalid weapon was passed -private _configSwitchItem = configfile >> "CfgWeapons" >> _switchItem; +private _configSwitchItem = configFile >> "CfgWeapons" >> _switchItem; private _switchItemHintText = getText (_configSwitchItem >> "MRT_SwitchItemHintText"); private _switchItemHintImage = getText (_configSwitchItem >> "picture"); diff --git a/addons/common/functions/fnc_switchPersistentLaser.sqf b/addons/common/functions/fnc_switchPersistentLaser.sqf index 79c0e91f727..5c61693c54f 100644 --- a/addons/common/functions/fnc_switchPersistentLaser.sqf +++ b/addons/common/functions/fnc_switchPersistentLaser.sqf @@ -17,7 +17,7 @@ params ["_enabled"]; -if (!hasInterface) exitwith {}; +if (!hasInterface) exitWith {}; // Reset state { diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf index 0378c6a4b86..24e44fc6797 100644 --- a/addons/common/functions/fnc_unloadPersonLocal.sqf +++ b/addons/common/functions/fnc_unloadPersonLocal.sqf @@ -34,7 +34,7 @@ if (_emptyPos isEqualTo []) then { }; }; -if (count _emptyPos != 3) exitwith { +if (count _emptyPos != 3) exitWith { WARNING_4("Could not find unload pos %1-ASL: %2 isTouchingGround: %3 Speed: %4",_vehicle,getPosASL _vehicle,isTouchingGround _vehicle,speed _vehicle); if ((!isNull _unloader) && {[_unloader] call FUNC(isPlayer)}) then { //display text saying there are no safe places to exit the vehicle diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 4593805846b..edc47ccbdf2 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -658,7 +658,7 @@ Az ACE-súgók hátterének színe. A cor de fundo das hints do ACE. ACE によるヒントの背景色を指定します。 - ACE힌트의 배경색을 정합니다. + ACE 힌트의 배경색을 정합니다. 設定ACE提示的背景顏色. 设定 ACE 提示的背景颜色。 @@ -1932,5 +1932,22 @@ Влияет на величину колебания прицела оружия при его развертывании. Afecta la cantidad de oscilación del arma cuando se está desplegado. + + Release + Отпустить + Soltar + Puść + Položit + Lâcher + Loslassen + Soltar + Lascia + Elengedés + 離す + 놓기 + 放開 + 放开 + Bırak + diff --git a/addons/compat_aegis/compat_aegis_realisticnames/CfgWeapons.hpp b/addons/compat_aegis/compat_aegis_realisticnames/CfgWeapons.hpp new file mode 100644 index 00000000000..56e58f11f37 --- /dev/null +++ b/addons/compat_aegis/compat_aegis_realisticnames/CfgWeapons.hpp @@ -0,0 +1,139 @@ +class CfgWeapons { + class arifle_CTAR_base_F; + class Aegis_arifle_CTAR_tan_f: arifle_CTAR_base_F { + displayName = SUBCSTRING(Aegis_arifle_CTAR_tan_f); + }; + + class arifle_CTAR_GL_base_F; + class Aegis_arifle_CTAR_GL_tan_f: arifle_CTAR_GL_base_F { + displayName = SUBCSTRING(Aegis_arifle_CTAR_GL_tan_f); + }; + + class arifle_CTARS_base_F; + class Aegis_arifle_CTARS_tan_f: arifle_CTARS_base_F { + displayName = SUBCSTRING(Aegis_arifle_CTARS_tan_f); + }; + + class LMG_03_base_F; + class LMG_03_snd_F: LMG_03_base_F { + displayName = SUBCSTRING(LMG_03_snd_F); + }; + class LMG_03_khk_F: LMG_03_base_F { + displayName = SUBCSTRING(LMG_03_khk_F); + }; + + class LMG_Mk200_F; + class LMG_Mk200_khk_F: LMG_Mk200_F { + displayName = SUBCSTRING(LMG_Mk200_khk_F); + }; + class LMG_Mk200_plain_F: LMG_Mk200_F { + displayName = SUBCSTRING(LMG_Mk200_plain_F); + }; + + class srifle_DMR_02_F; + class srifle_DMR_02_tna_F: srifle_DMR_02_F { + displayName = SUBCSTRING(srifle_DMR_02_tna_F); + }; + + class srifle_DMR_05_blk_F; + class srifle_DMR_05_ghex_F: srifle_DMR_05_blk_F { + displayName = SUBCSTRING(srifle_DMR_05_ghex_F); + }; + + class srifle_DMR_06_camo_F; + class srifle_DMR_06_black_F: srifle_DMR_06_camo_F { + displayName = SUBCSTRING(srifle_DMR_06_black_F); + }; + + class srifle_EBR_F; + class srifle_EBR_blk_F: srifle_EBR_F { + displayName = SUBCSTRING(srifle_EBR_blk_F); + }; + class srifle_EBR_khk_F: srifle_EBR_F { + displayName = SUBCSTRING(srifle_EBR_khk_F); + }; + + class arifle_Mk20_plain_F; + class arifle_Mk20_black_F: arifle_Mk20_plain_F { + displayName = SUBCSTRING(arifle_Mk20_black_F); + }; + class arifle_Mk20_hex_F: arifle_Mk20_plain_F { + displayName = SUBCSTRING(arifle_Mk20_hex_F); + }; + + class arifle_Mk20C_plain_F; + class arifle_Mk20C_black_F: arifle_Mk20C_plain_F { + displayName = SUBCSTRING(arifle_Mk20C_black_F); + }; + class arifle_Mk20C_hex_F: arifle_Mk20C_plain_F { + displayName = SUBCSTRING(arifle_Mk20C_hex_F); + }; + + class arifle_Mk20_GL_plain_F; + class arifle_Mk20_GL_black_F: arifle_Mk20_GL_plain_F { + displayName = SUBCSTRING(arifle_Mk20_GL_black_F); + }; + class arifle_Mk20_GL_hex_F: arifle_Mk20_GL_plain_F { + displayName = SUBCSTRING(arifle_Mk20_GL_hex_F); + }; + + class MMG_01_hex_F; + class MMG_01_black_F: MMG_01_hex_F { + displayName = SUBCSTRING(MMG_01_black_F); + }; + class MMG_01_ghex_F: MMG_01_hex_F { + displayName = SUBCSTRING(MMG_01_ghex_F); + }; + + class srifle_DMR_01_F; + class srifle_DMR_01_black_F: srifle_DMR_01_F { + displayName = SUBCSTRING(srifle_DMR_01_black_F); + }; + + class Aegis_arifle_SPAR_02_Inf_base_F; + class Aegis_arifle_SPAR_02_inf_blk_F: Aegis_arifle_SPAR_02_Inf_base_F { + displayName = ECSTRING(realisticnames,arifle_SPAR_02_blk); + }; + class Aegis_arifle_SPAR_02_inf_khk_F: Aegis_arifle_SPAR_02_Inf_base_F { + displayName = ECSTRING(realisticnames,arifle_SPAR_02_khk); + }; + class Aegis_arifle_SPAR_02_inf_snd_F: Aegis_arifle_SPAR_02_Inf_base_F { + displayName = ECSTRING(realisticnames,arifle_SPAR_02_snd); + }; + + class MMG_02_black_F; + class MMG_02_khaki_F: MMG_02_black_F { + displayName = SUBCSTRING(MMG_02_khaki_F); + }; + + class arifle_TRG21_F; + class arifle_TRG21_black_F: arifle_TRG21_F { + displayName = SUBCSTRING(arifle_TRG21_black_F); + }; + + class arifle_TRG20_F; + class arifle_TRG20_black_F: arifle_TRG20_F { + displayName = SUBCSTRING(arifle_TRG20_black_F); + }; + + class arifle_TRG21_GL_F; + class arifle_TRG21_GL_black_F: arifle_TRG21_GL_F { + displayName = SUBCSTRING(arifle_TRG21_GL_black_F); + }; + + class SMG_01_F; + class SMG_01_black_F: SMG_01_F { + displayName = SUBCSTRING(SMG_01_black_F); + }; + class SMG_01_khk_F: SMG_01_F { + displayName = SUBCSTRING(SMG_01_khk_F); + }; + + class LMG_Zafir_F; + class LMG_Zafir_black_F: LMG_Zafir_F { + displayName = SUBCSTRING(LMG_Zafir_black_F); + }; + class LMG_Zafir_ghex_F: LMG_Zafir_F { + displayName = SUBCSTRING(LMG_Zafir_ghex_F); + }; +}; diff --git a/addons/compat_aegis/compat_aegis_realisticnames/config.cpp b/addons/compat_aegis/compat_aegis_realisticnames/config.cpp index add9f50a3a4..427b43ef56d 100644 --- a/addons/compat_aegis/compat_aegis_realisticnames/config.cpp +++ b/addons/compat_aegis/compat_aegis_realisticnames/config.cpp @@ -10,6 +10,10 @@ class CfgPatches { "A3_Aegis_Armor_F_Aegis_APC_Wheeled_01", "A3_Aegis_Armor_F_Aegis_APC_Tracked_02", "A3_Aegis_Armor_F_Aegis_APC_Tracked_03", + "A3_Aegis_Weapons_F_Aegis", + "A3_Aegis_Weapons_F_Aegis_Rifles_CTAR", + "A3_Aegis_Weapons_F_Aegis_Machineguns_LMG_03", + "A3_Aegis_Weapons_F_Aegis_Rifles_SPAR_02", "ace_realisticnames" }; skipWhenMissingDependencies = 1; @@ -24,3 +28,4 @@ class CfgPatches { }; #include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" diff --git a/addons/compat_aegis/compat_aegis_realisticnames/stringtable.xml b/addons/compat_aegis/compat_aegis_realisticnames/stringtable.xml index 6d7dfa47a12..f507df18f24 100644 --- a/addons/compat_aegis/compat_aegis_realisticnames/stringtable.xml +++ b/addons/compat_aegis/compat_aegis_realisticnames/stringtable.xml @@ -33,5 +33,496 @@ BM-2T "潜行者"(医疗) BM-2T Stalker (Sıhhiye) + + QBZ-95-1 (Sand) + QBZ-95-1 (Písková) + QBZ-95-1 (Sable) + QBZ-95-1 (Arena) + QBZ-95-1 (Песочный) + QBZ-95-1 (Piaskowy) + QBZ-95-1 (Sandfarben) + QBZ-95-1 (Sabbia) + QBZ-95-1 (Homok) + QBZ-95-1 (Deserto) + QBZ-95-1 (サンド) + QBZ-95-1 (모래) + QBZ-95-1式自動步槍 (沙色) + 95-1式自动步枪(沙色) + QBZ-95-1 (Kum) + + + QBZ-95-1 GL (Sand) + QBZ-95-1 GL (Písková) + QBZ-95-1 GL (Sable) + QBZ-95-1 GL (Arena) + QBZ-95-1 GL (Песочный) + QBZ-95-1 GL (Piaskowy) + QBZ-95-1 GL (Sandfarben) + QBZ-95-1 GL (Sabbia) + QBZ-95-1 GL (Homok) + QBZ-95-1 GL (Deserto) + QBZ-95-1 GL (サンド) + QBZ-95-1 GL (모래) + QBZ-95-1榴弹发射器 (沙色) + 95-1榴弹发射器(沙色) + QBZ-95-1 GL (Kum) + + + QBZ-95-1 LSW (Sand) + QBZ-95-1 LSW (Písková) + QBZ-95-1 LSW (Sable) + QBZ-95-1 LSW (Arena) + QBZ-95-1 LSW (Песочный) + QBZ-95-1 LSW (Piaskowy) + QBZ-95-1 LSW (Sandfarben) + QBZ-95-1 LSW (Sabbia) + QBZ-95-1 LSW (Homok) + QBZ-95-1 LSW (Deserto) + QBZ-95-1 LSW (サンド) + QBZ-95-1 LSW (모래) + QBZ-95-1式輕機槍 (沙色) + 95-1式班用机枪(沙色) + QBZ-95-1 LSW (Kum) + + + FN Minimi SPW (Khaki) + FN Minimi SPW (Khaki) + FN Minimi SPW (Caqui) + FN Minimi SPW (Khaki) + FN Minimi SPW (Khaki) + FN Minimi SPW (Kaki) + FN Minimi SPW (хаки) + FN Minimi SPW (Cáqui) + FN Minimi SPW (Khaki) + FN Minimi SPW (Cachi) + FN ミニミ SPW (カーキ) + FN 미니미 SPW (카키) + FN Minimi班用自動機槍(卡其) + FN Minimi 班用自动机枪(卡其色) + FN Minimi SPW (Haki) + + + FN Minimi SPW (Sand) + FN Minimi SPW (Sandfarben) + FN Minimi SPW (Arena) + FN Minimi SPW (Piaskowy) + FN Minimi SPW (Písková) + FN Minimi SPW (Sable) + FN Minimi SPW (Песочный) + FN Minimi SPW (Deserto) + FN Minimi SPW (Homok) + FN Minimi SPW (Sabbia) + FN ミニミ SPW (サンド) + FN 미니미 SPW (모래) + FN Minimi班用自動機槍 (沙色) + FN Minimi 班用自动机枪(沙色) + FN Minimi SPW (Kum) + + + Stoner 99 LMG (Khaki) + Stoner 99 LMG (Khaki) + Stoner 99 LMG (Caqui) + Stoner 99 LMG (Khaki) + Stoner 99 LMG (Khaki) + Stoner 99 LMG (Kaki) + Stoner 99 LMG (хаки) + Stoner 99 LMG (Cáqui) + Stoner 99 Könnyűgéppuska (Khaki) + Stoner 99 LMG (Cachi) + ストーナー99 LMG (カーキ) + 스토너 99 LMG (카키) + 斯通納99輕機槍(卡其) + 斯通纳99轻机枪(卡其色) + Stoner 99 LMG (Haki) + + + Stoner 99 LMG (Sand) + Stoner 99 LMG (Sandfarben) + Stoner 99 LMG (Arena) + Stoner 99 LMG (Piaskowy) + Stoner 99 LMG (Písková) + Stoner 99 LMG (Sable) + Stoner 99 LMG (Песочный) + Stoner 99 LMG (Deserto) + Stoner 99 Könnyűgéppuska (Homok) + Stoner 99 LMG (Sabbia) + ストーナー99 LMG (サンド) + 스토너 99 LMG (모래) + 斯通納99輕機槍 (沙色) + 斯通纳99轻机枪(沙色) + Stoner 99 LMG (Kum) + + + Noreen "Bad News" ULR (Tropic) + Noreen "Bad News" ULR (Tropisch) + Noreen "Bad News" ULR (Tropická kamufláž) + Noreen "Bad News" ULR (zwrotnik) + Noreen "Bad News" ULR (Tropique) + Noreen "Bad News" ULR (Tropikus) + Noreen "Bad News" ULR (Trópico) + Noreen "Bad News" ULR (тропик) + Noreen "Bad News" ULR (Trópico) + Noreen "Bad News" ULR (Tropico) + ノレーン "バッド ニュース" ULR (熱帯ジャングル迷彩) + 노린 "배드뉴스" ULR (열대) + 諾琳"壞消息"極距狙擊步槍 (熱帶迷彩) + 诺琳 "坏消息" 极距狙击步枪(热带迷彩) + Noreen "Bad News" ULR (Tropic) + + + Cyrus (Green Hex) + Cyrus (Zelený Hex) + Cyrus (Hex Vert) + Cyrus (Hex Verde) + Cyrus (зелёный гекс) + Cyrus (Hex Grün) + Cyrus (Zielony hex) + Cyrus (Hex Verde) + Cyrus (Zöld Hex) + Cyrus (Verde Hex) + サイラス (緑六角形迷彩) + 사이러스 (초록육각) + "居鲁士"狙擊步槍 (綠色數位蜂巢迷彩) + "居鲁士"(绿色蜂巢迷彩) + Cyrus (Yeşil Hex) + + + M14 (Black) + M14 (Černá) + M14 (Noir) + M14 (Negro) + M14 (чёрный) + M14 (czarny) + M14 (Schwarz) + M14 (Nero) + M14 (Fekete) + M14 (Preto) + M14 (ブラック) + M14 (검정) + M14 (黑色) + M14(黑色) + M14 (Siyah) + + + Mk14 Mod 1 EBR (Black) + Mk14 Mod 1 EBR (Schwarz) + Mk14 Mod 1 EBR (Černá) + Mk14 Mod 1 EBR (czarny) + Mk14 Mod 1 EBR (Noir) + Mk14 Mod 1 EBR (Fekete) + Mk14 Mod 1 EBR (Negro) + Mk14 Mod 1 EBR (чёрный) + Mk14 Mod 1 EBR (Preto) + Mk14 Mod 1 EBR (Nero) + Mk14 Mod 1 EBR (ブラック) + Mk.14 Mod 1 EBR (검정) + Mk14一型增強型戰鬥步槍 (黑色) + Mk14 Mod 1 EBR(黑色) + Mk14 Mod 1 EBR (Siyah) + + + Mk14 Mod 1 EBR (Khaki) + Mk14 Mod 1 EBR (Khaki) + Mk14 Mod 1 EBR (Khaki) + Mk14 Mod 1 EBR (Khaki) + Mk14 Mod 1 EBR (Kaki) + Mk14 Mod 1 EBR (Khaki) + Mk14 Mod 1 EBR (Caqui) + Mk14 Mod 1 EBR (хаки) + Mk14 Mod 1 EBR (Cáqui) + Mk14 Mod 1 EBR (Cachi) + Mk14 Mod 1 EBR (カーキ) + Mk.14 Mod 1 EBR (카키) + Mk14一型增強型戰鬥步槍(卡其) + Mk14 Mod 1 EBR(卡其色) + Mk14 Mod 1 EBR (Haki) + + + F2000 (Black) + F2000 (Schwarz) + F2000 (Černá) + F2000 (czarny) + F2000 (Noir) + F2000 (Fekete) + F2000 (Negro) + F2000 (чёрный) + F2000 (Preto) + F2000 (Nero) + F2000 (ブラック) + F2000 (검정) + F2000突擊步槍 (黑色) + F2000(黑色) + F2000 (Siyah) + + + F2000 (Hex) + F2000 (Hex) + F2000 (Hex) + F2000 (Hex) + F2000 (гекс) + F2000 (Hex) + F2000 (hex) + F2000 (Hex) + F2000 (Hex) + F2000 (Hex) + F2000 (六角形迷彩) + F2000 (육각) + F2000突擊步槍 (數位蜂巢迷彩) + F2000(蜂巢迷彩) + F2000 (Hex) + + + F2000 Tactical (Black) + F2000 Tactical (Schwarz) + F2000 Tactical (Černá) + F2000 Tactical (czarny) + F2000 Tactical (Noir) + F2000 Tactical (Fekete) + F2000 Tactical (Negro) + F2000 Tactical (чёрный) + F2000 Tactical (Preto) + F2000 Tactical (Nero) + F2000 タクティカル (ブラック) + F2000 택티컬 (검정) + F2000戰術型突擊步槍 (黑色) + F2000 战术型(黑色) + F2000 Tactical (Siyah) + + + F2000 Tactical (Hex) + F2000 Tactical (Hex) + F2000 Tactical (Hex) + F2000 Tactical (Hex) + F2000 Tactical (гекс) + F2000 Tactical (Hex) + F2000 Tactical (hex) + F2000 Tactical (Hex) + F2000 Tactical (Hex) + F2000 Tactical (Hex) + F2000 タクティカル (六角形迷彩) + F2000 택티컬 (육각) + F2000戰術型突擊步槍 (數位蜂巢迷彩) + F2000 战术型(蜂巢迷彩) + F2000 Tactical (Hex) + + + F2000 EGLM (Black) + F2000 EGLM (Schwarz) + F2000 EGLM (Černá) + F2000 EGLM (czarny) + F2000 EGLM (Noir) + F2000 EGLM (Fekete) + F2000 EGLM (Negro) + F2000 EGLM (чёрный) + F2000 EGLM (Preto) + F2000 EGLM (Nero) + F2000 EGLM (ブラック) + F2000 EGLM (검정) + F2000突擊步槍 (黑色) + F2000 EGLM(黑色) + F2000 EGLM (Siyah) + + + F2000 EGLM (Hex) + F2000 EGLM (Hex) + F2000 EGLM (Hex) + F2000 EGLM (Hex) + F2000 EGLM (гекс) + F2000 EGLM (Hex) + F2000 EGLM (hex) + F2000 EGLM (Hex) + F2000 EGLM (Hex) + F2000 EGLM (Hex) + F2000 EGLM (六角形迷彩) + F2000 EGLM (육각) + F2000突擊步槍 (數位蜂巢迷彩) + F2000 EGLM(蜂巢迷彩) + F2000 EGLM (Hex) + + + HK121 (Black) + HK121 (Schwarz) + HK121 (Černá) + HK121 (czarny) + HK121 (Noir) + HK121 (Fekete) + HK121 (Negro) + HK121 (чёрный) + HK121 (Preto) + HK121 (Nero) + HK121 (ブラック) + HK121 (검정) + HK121中型機槍 (黑色) + HK121(黑色) + HK121 (Siyah) + + + HK121 (Green Hex) + HK121中型機槍 (綠色數位蜂巢迷彩) + HK121(绿色蜂巢迷彩) + HK121 (緑六角形迷彩) + HK121 (Hex Verde) + HK121 (Zielony Hex) + HK121 (зелёный гекс) + HK121 (Verde Hex) + HK121 (Hex Verte) + HK121 (Zelený Hex) + HK121 (Yeşil Hex) + HK121 (Verde Hex) + HK121 (Hex Grün) + HK121 (초록육각) + + + VS-121 (Black) + VS-121 (Schwarz) + VS-121 (Černá) + VS-121 (czarny) + VS-121 (Noir) + VS-121 (Fekete) + VS-121 (Negro) + VS-121 (чёрный) + VS-121 (Preto) + VS-121 (Nero) + VS-121 (ブラック) + VS-121 (검정) + VS-121狙擊步槍 (黑色) + VS-121(黑色) + VS-121 (Siyah) + + + LWMMG (Khaki) + LWMMG (Khaki) + LWMMG (Khaki) + LWMMG (Khaki) + LWMMG (Kaki) + LWMMG (Khaki) + LWMMG (Caqui) + LWMMG (хаки) + LWMMG (Cáqui) + LWMMG (Cachi) + LWMMG (カーキ) + LWMMG (카키) + 輕量化中型機槍(卡其) + LWMMG(卡其色) + LWMMG (Haki) + + + TAR-21 (Black) + TAR-21 (Schwarz) + TAR-21 (Černá) + TAR-21 (czarny) + TAR-21 (Noir) + TAR-21 (Fekete) + TAR-21 (Negro) + TAR-21 (чёрный) + TAR-21 (Preto) + TAR-21 (Nero) + TAR-21 (ブラック) + TAR-21 (검정) + TAR-21突擊步槍 (黑色) + TAR-21(黑色) + TAR-21 (Siyah) + + + CTAR-21 (Black) + CTAR-21 (Schwarz) + CTAR-21 (Černá) + CTAR-21 (czarny) + CTAR-21 (Noir) + CTAR-21 (Fekete) + CTAR-21 (Negro) + CTAR-21 (чёрный) + CTAR-21 (Preto) + CTAR-21 (Nero) + CTAR-21 (ブラック) + CTAR-21 (검정) + CTAR-21突擊步槍 (黑色) + CTAR-21(黑色) + CTAR-21 (Siyah) + + + GTAR-21 EGLM (Black) + GTAR-21 EGLM (Schwarz) + GTAR-21 EGLM (Černá) + GTAR-21 EGLM (czarny) + GTAR-21 EGLM (Noir) + GTAR-21 EGLM (Fekete) + GTAR-21 EGLM (Negro) + GTAR-21 EGLM (чёрный) + GTAR-21 EGLM (Preto) + GTAR-21 EGLM (Nero) + GTAR-21 EGLM (ブラック) + GTAR-21 EGLM (검정) + GTAR-21突擊步槍 (黑色) + GTAR-21 EGLM(黑色) + GTAR-21 EGLM (Siyah) + + + Vector SMG (Black) + Vector SMG (Schwarz) + Vector SMG (Černá) + Vector SMG (czarny) + Vector SMG (Noir) + Vector SMG (Fekete) + Vector SMG (Negro) + Vector SMG (чёрный) + Vector SMG (Preto) + Vector SMG (Nero) + ベクター SMG (ブラック) + 벡터 SMG (검정) + "維克特"衝鋒槍 (黑色) + Vector 冲锋枪(黑色) + Vector SMG (Siyah) + + + Vector SMG (Khaki) + Vector SMG (Khaki) + Vector SMG (Khaki) + Vector SMG (Khaki) + Vector SMG (Kaki) + Vector SMG (Khaki) + Vector SMG (Caqui) + Vector SMG (хаки) + Vector SMG (Cáqui) + Vector SMG (Cachi) + ベクター SMG (カーキ) + 벡터 SMG (카키) + "維克特"衝鋒槍(卡其) + Vector 冲锋枪(卡其色) + Vector SMG (Haki) + + + Negev NG7 (Black) + Negev NG7 (Schwarz) + Negev NG7 (Černá) + Negev NG7 (czarny) + Negev NG7 (Noir) + Negev NG7 (Fekete) + Negev NG7 (Negro) + Negev NG7 (чёрный) + Negev NG7 (Preto) + Negev NG7 (Nero) + ネゲフ NG7 (ブラック) + 네게브 NG7 (검정) + 內蓋夫NG7機槍 (黑色) + 内格夫 NG7(黑色) + Negev NG7 (Siyah) + + + Negev NG7 (Green Hex) + 內蓋夫NG7機槍 (綠色數位蜂巢迷彩) + 内格夫 NG7(绿色蜂巢迷彩) + ネゲフ NG7 (緑六角形迷彩) + Negev NG7 (Hex Verde) + Negev NG7 (Zielony Hex) + Negev NG7 (зелёный гекс) + Negev NG7 (Verde Hex) + Negev NG7 (Hex Verte) + Negev NG7 (Zelený Hex) + Negev NG7 (Yeşil Hex) + Negev NG7 (Verde Hex) + Negev NG7 (Hex Grün) + 네게브 NG7 (초록육각) + diff --git a/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp index 752745fb35e..c96253ec51c 100644 --- a/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp +++ b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp @@ -19,7 +19,7 @@ class CfgVehicles { magazineLocation = "_target selectionPosition 'otochlaven'"; proxyWeapon = "CUP_proxy_mortar_82mm"; disassembleWeapon = "CUP_2b14_carry"; - disassembleTurret = "ace_csw_mortarBaseplate"; + disassembleTurret = QEGVAR(csw,mortarBaseplate); desiredAmmo = 1; ammoLoadTime = 3; ammoUnloadTime = 3; @@ -29,14 +29,14 @@ class CfgVehicles { class CUP_M252_base: CUP_2b14_82mm_Base { class ace_csw: ace_csw { disassembleWeapon = "CUP_m252_carry"; - disassembleTurret = "ace_csw_mortarBaseplate"; + disassembleTurret = QEGVAR(csw,mortarBaseplate); }; }; class CUP_L16A2_base: CUP_M252_base { class ace_csw: ace_csw { disassembleWeapon = "CUP_l16a2_carry"; - disassembleTurret = "ace_csw_mortarBaseplate"; + disassembleTurret = QEGVAR(csw,mortarBaseplate); }; }; @@ -47,7 +47,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_m2"; magazineLocation = "_target selectionPosition 'magazine'"; disassembleWeapon = "CUP_m2_carry"; - disassembleTurret = "ace_csw_m3Tripod"; + disassembleTurret = QEGVAR(csw,m3Tripod); desiredAmmo = 100; ammoLoadTime = 10; ammoUnloadTime = 8; @@ -57,7 +57,7 @@ class CfgVehicles { class CUP_M2StaticMG_MiniTripod_base: CUP_M2StaticMG_base { class ace_csw: ace_csw { enabled = 1; - disassembleTurret = "ace_csw_m3TripodLow"; + disassembleTurret = QEGVAR(csw,m3TripodLow); }; }; @@ -67,7 +67,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_DSHKM"; magazineLocation = "_target selectionPosition 'otocvez'"; disassembleWeapon = "CUP_DSHKM_carry"; - disassembleTurret = "ace_csw_kordTripod"; + disassembleTurret = QEGVAR(csw,kordTripod); desiredAmmo = 100; ammoLoadTime = 10; ammoUnloadTime = 8; @@ -87,7 +87,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_KORD"; magazineLocation = "_target selectionPosition 'magazine'"; disassembleWeapon = "CUP_KORD_carry"; - disassembleTurret = "ace_csw_kordTripod"; + disassembleTurret = QEGVAR(csw,kordTripod); desiredAmmo = 100; ammoLoadTime = 10; ammoUnloadTime = 8; @@ -97,7 +97,7 @@ class CfgVehicles { class CUP_KORD_MiniTripod_Base: CUP_KORD_Base { class ace_csw: ace_csw { enabled = 1; - disassembleTurret = "ace_csw_kordTripodLow"; + disassembleTurret = QEGVAR(csw,kordTripodLow); }; }; @@ -108,7 +108,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_AGS30"; magazineLocation = "_target selectionPosition 'otochlaven'"; disassembleWeapon = "CUP_AGS30_carry"; - disassembleTurret = "ace_csw_sag30Tripod"; + disassembleTurret = QEGVAR(csw,sag30Tripod); desiredAmmo = 29; ammoLoadTime = 10; ammoUnloadTime = 8; @@ -121,7 +121,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_MK19"; magazineLocation = "_target selectionPosition 'otochlaven'"; disassembleWeapon = "CUP_MK19_carry"; - disassembleTurret = "ace_csw_m3TripodLow"; + disassembleTurret = QEGVAR(csw,m3TripodLow); desiredAmmo = 48; ammoLoadTime = 10; ammoUnloadTime = 8; @@ -148,7 +148,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_TOW"; magazineLocation = "_target selectionPosition 'otochlaven'"; disassembleWeapon = "CUP_TOW_carry"; - disassembleTurret = "ace_csw_m220Tripod"; + disassembleTurret = QEGVAR(csw,m220Tripod); desiredAmmo = 1; ammoLoadTime = 8; ammoUnloadTime = 5; @@ -167,7 +167,7 @@ class CfgVehicles { proxyWeapon = "CUP_proxy_SPG9"; magazineLocation = "_target selectionPosition 'handle'"; disassembleWeapon = "CUP_SPG9_carry"; - disassembleTurret = "ace_csw_spg9Tripod"; + disassembleTurret = QEGVAR(csw,spg9Tripod); desiredAmmo = 1; ammoLoadTime = 5; ammoUnloadTime = 3; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgWeapons.hpp b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgWeapons.hpp index 9ff8519ce11..56213219040 100644 --- a/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgWeapons.hpp +++ b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgWeapons.hpp @@ -60,6 +60,7 @@ class CfgWeapons { class assembleTo { ace_csw_m3Tripod = "CUP_I_M2StaticMG_AAF"; ace_csw_m3TripodLow = "CUP_I_M2StaticMG_MiniTripod_AAF"; + EGVAR(compat_spe,m3Tripod) = "CUP_I_M2StaticMG_MiniTripod_AAF"; }; }; class WeaponSlotsInfo: WeaponSlotsInfo { diff --git a/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgAmmo.hpp b/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgAmmo.hpp index 2632a43e61e..220af016575 100644 --- a/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgAmmo.hpp +++ b/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgAmmo.hpp @@ -7,20 +7,51 @@ class CfgAmmo { class ace_missileguidance { enabled = 1; - minDeflection = 0.00005; - maxDeflection = 0.025; - incDeflection = 0.00005; + + pitchRate = 120; // degrees per second + yawRate = 120; + stabilityCoefficient = 0.2; + bangBangGuidance = 0; + canVanillaLock = 0; + + // Guidance type for munitions defaultSeekerType = "Optic"; - seekerTypes[] = {"Optic"}; + seekerTypes[] = { "Optic" }; + defaultSeekerLockMode = "LOBL"; - seekerLockModes[] = {"LOBL"}; - seekerAngle = 180; - seekerAccuracy = 1; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "Direct"; + navigationTypes[] = { "Direct", "ZeroEffortMiss" }; + + navigationGain = 3; + + seekerAngle = 180; // Angle in front of the missile which can be searched + seekerAccuracy = 1; // seeker accuracy multiplier + seekerMinRange = 0; - seekerMaxRange = 2500; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + seekLastTargetPos = 1; // seek last target position [if seeker loses LOS of target, continue to last known pos] + + // Attack profile type selection defaultAttackProfile = "JAV_TOP"; - attackProfiles[] = {"JAV_TOP", "JAV_DIR"}; + attackProfiles[] = { "JAV_TOP", "JAV_DIR" }; + useModeForAttackProfile = 1; + + class navigationStates { + class initial { + transitionCondition = QEFUNC(missileguidance,javelin_midCourseTransition); + navigationType = "Direct"; + }; + class terminal { + transitionCondition = ""; + navigationType = "ZeroEffortMiss"; + }; + // transitions from initial -> termimal + states[] = {"initial", "terminal"}; + }; }; }; }; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_nightvision/CfgWeapons.hpp b/addons/compat_cup_weapons/compat_cup_weapons_nightvision/CfgWeapons.hpp index 04d26b8ead8..5a8e1ca4e33 100644 --- a/addons/compat_cup_weapons/compat_cup_weapons_nightvision/CfgWeapons.hpp +++ b/addons/compat_cup_weapons/compat_cup_weapons_nightvision/CfgWeapons.hpp @@ -34,7 +34,7 @@ class CfgWeapons { // Binocular class CUP_NVG_PVS14: NVGoggles { - NVG_BINO_PRESET; + NVG_MONO_PRESET(3); NVG_GREEN_PRESET; }; class CUP_NVG_PVS15_black: NVGoggles { diff --git a/addons/compat_rf/CfgVehicles.hpp b/addons/compat_rf/CfgVehicles.hpp new file mode 100644 index 00000000000..fa0343908a9 --- /dev/null +++ b/addons/compat_rf/CfgVehicles.hpp @@ -0,0 +1,25 @@ +class CfgVehicles { + // Applies the offset to all RF Offroads which can have the optional tank in the back + class Offroad_01_unarmed_base_F; + class Pickup_01_base_rf: Offroad_01_unarmed_base_F { + EXGVAR(field_rations,offset)[] = {-0.04, -2.45, -0.9}; + }; + + // Enable Water Source by Default + class C_IDAP_Pickup_rf; + class C_IDAP_Pickup_water_rf: C_IDAP_Pickup_rf { + EXGVAR(field_rations,waterSupply) = 500; + }; + + class O_Truck_03_fuel_F; + class C_Truck_03_water_rf: O_Truck_03_fuel_F { + EXGVAR(field_rations,waterSupply) = 10000; + EXGVAR(field_rations,offset)[] = {0, -5.05, -0.3}; + }; + + class B_Truck_01_fuel_F; + class C_Truck_01_water_rf: B_Truck_01_fuel_F { + EXGVAR(field_rations,waterSupply) = 10000; + EXGVAR(field_rations,offset)[] = {-0.41, -5.15, -0.3}; + }; +}; diff --git a/addons/compat_rf/compat_rf_realisticnames/stringtable.xml b/addons/compat_rf/compat_rf_realisticnames/stringtable.xml index 16a6e927897..732e03df0d5 100644 --- a/addons/compat_rf/compat_rf_realisticnames/stringtable.xml +++ b/addons/compat_rf/compat_rf_realisticnames/stringtable.xml @@ -8,6 +8,7 @@ EOTech MRDS (Khaki) EOTech MRDS (Cachi) EOTech MRDS (Khaki) + EOTech MRDS (Caqui) EOTech MRDS (Tan) @@ -16,6 +17,7 @@ EOTech MRDS (Hellbraun) EOTech MRDS (Marroncino) EOTech MRDS (Marron) + EOTech MRDS (Tan) C-More Railway (Green, Desert) @@ -24,6 +26,7 @@ C-More Railway (Grün, Wüste) C-More Railway (Verde, Deserto) C-More Railway (Vert, Désert) + C-More Railway (Verde, Desierto) C-More Railway (Green, Woodland) @@ -32,6 +35,7 @@ C-More Railway (Grün, Grünes Tarnmuster) C-More Railway (Verde, Boschivo) C-More Railway (Vert, Woodland) + C-More Railway (Verde, Boscoso) C-More Railway (Red, Desert) @@ -40,6 +44,7 @@ C-More Railway (Rot, Wüste) C-More Railway (Rosso, Desert) C-More Railway (Rouge, Désert) + C-More Railway (Rojo, Desierto) C-More Railway (Red, Woodland) @@ -48,6 +53,7 @@ C-More Railway (Rot, Grünes Tarnmuster) C-More Railway (Rosso, Boschivo) C-More Railway (Rouge, Woodland) + C-More Railway (Rojo, Boscoso) Aimpoint Micro R-1 @@ -56,6 +62,7 @@ Aimpoint Micro R-1 Aimpoint Micro R-1 Aimpoint Micro R-1 + Aimpoint Micro R-1 Vortex Spitfire Prism @@ -64,6 +71,7 @@ Vortex Spitfire Prism Vortex Spitfire Prism Vortex Spitfire Prism + Vortex Spitfire Prism Vortex Spitfire Prism (Tan) @@ -72,6 +80,7 @@ Vortex Spitfire Prism (Hellbraun) Vortex Spitfire Prism (Marroncino) Vortex Spitfire Prism (Marron) + Vortex Spitfire Prism (Tan) Vortex Spitfire Prism (Khaki) @@ -80,6 +89,7 @@ Vortex Spitfire Prism (Khaki) Vortex Spitfire Prism (Cachi) Vortex Spitfire Prism (Khaki) + Vortex Spitfire Prism (Caqui) Vortex Spitfire Prism (Pistol) @@ -88,6 +98,7 @@ Vortex Spitfire Prism (Pistole) Vortex Spitfire Prism (Pistola) Vortex Spitfire Prism (Pistol) + Vortex Spitfire Prism (Pistola) Glock 19X @@ -96,6 +107,7 @@ Glock 19X Glock 19X Glock 19X + Glock 19X Glock 19X (Khaki) @@ -104,6 +116,7 @@ Glock 19X (Khaki) Glock 19X (Cachi) Glock 19X (Khaki) + Glock 19X (Caqui) Glock 19X (Tan) @@ -112,6 +125,7 @@ Glock 19X (Hellbraun) Glock 19X (Marroncino) Glock 19X (Marron) + Glock 19X (Tan) Glock 19X Auto @@ -120,6 +134,7 @@ Glock 19X Auto Glock 19X Auto Glock 19X Auto + Glock 19X Auto Glock 19X Auto (Khaki) @@ -128,6 +143,7 @@ Glock 19X Auto (Khaki) Glock 19X Auto (Cachi) Glock 19X Auto (Khaki) + Glock 19X Auto (Caqui) Glock 19X Auto (Tan) @@ -136,6 +152,7 @@ Glock 19X Auto (Hellbraun) Glock 19X Auto (Marroncino) Glock 19X Auto (Marron) + Glock 19X Auto (Tan) Desert Eagle Mark XIX L5 @@ -144,6 +161,7 @@ Desert Eagle Mark XIX L5 Desert Eagle Mark XIX L5 Desert Eagle Mark XIX L5 + Desert Eagle Mark XIX L5 Desert Eagle Mark XIX L5 (Classic) @@ -152,6 +170,7 @@ Desert Eagle Mark XIX L5 (Klassisch) Desert Eagle Mark XIX L5 (Classico) Desert Eagle Mark XIX L5 (Classique) + Desert Eagle Mark XIX L5 (Clasica) Desert Eagle Mark XIX L5 (Bronze) @@ -160,6 +179,7 @@ Desert Eagle Mark XIX L5 (Bronze) Desert Eagle Mark XIX L5 (Bronzo) Desert Eagle Mark XIX L5 (Bronze) + Desert Eagle Mark XIX L5 (Bronce) Desert Eagle Mark XIX L5 (Copper) @@ -168,6 +188,7 @@ Desert Eagle Mark XIX L5 (Kupfer) Desert Eagle Mark XIX L5 (Rame) Desert Eagle Mark XIX L5 (Cuivre) + Desert Eagle Mark XIX L5 (Cobre) Desert Eagle Mark XIX L5 (Gold) @@ -176,6 +197,7 @@ Desert Eagle Mark XIX L5 (Gold) Desert Eagle Mark XIX L5 (Oro) Desert Eagle Mark XIX L5 (Or) + Desert Eagle Mark XIX L5 (Oro) HERA H6 (Tan) @@ -184,6 +206,7 @@ HERA H6 (Hellbraun) HERA H6 (Marroncino) HERA H6 (Marron) + HERA H6 (Tan) HERA H6 (Olive) @@ -192,6 +215,7 @@ HERA H6 (Olivgrün) HERA H6 (Oliva) HERA H6 (Olive) + HERA H6 (Oliva) HERA H6 (Black) @@ -200,6 +224,7 @@ HERA H6 (Schwarz) HERA H6 (Nero) HERA H6 (Noir) + HERA H6 (Negro) HERA H6 (Digital) @@ -208,6 +233,7 @@ HERA H6 (Digital) HERA H6 (Digitale) HERA H6 (Digital) + HERA H6 (Digital) HERA H6 (Gold) @@ -216,6 +242,7 @@ HERA H6 (Gold) HERA H6 (Oro) HERA H6 (Or) + HERA H6 (Oro) VS-121 (Black) @@ -224,6 +251,7 @@ VS-121 (Schwarz) VS-121 (Nero) VS-121 (Noir) + VS-121 (Negro) VS-121 (Tan) @@ -232,6 +260,7 @@ VS-121 (Hellbraun) VS-121 (Marroncino) VS-121 (Marron) + VS-121 (Tan) Vector SMG (Black) @@ -240,6 +269,7 @@ Vector SMG (Schwarz) Vector SMG (Nero) Vector SMG (Noir) + Vector SMG (Negro) ASh-12 (Black) @@ -248,6 +278,7 @@ ASh-12 (Schwarz) ASh-12 (Nero) ASh-12 (Noir) + ASh-12 (Negro) ASh-12 (Desert) @@ -256,6 +287,7 @@ ASh-12 (Wüste) ASh-12 (Deserto) ASh-12 (Désert ) + ASh-12 (Desierto) ASh-12 (Urban) @@ -264,6 +296,7 @@ ASh-12 (Urban) ASh-12 (Urbano) ASh-12 (Urbain) + ASh-12 (Urbano) ASh-12 (Woodland) @@ -272,6 +305,7 @@ ASh-12 (Grünes Tarnmuster) ASh-12 (Boschivo) ASh-12 (Woodland) + ASh-12 (Boscoso) ASh-12 GL (Black) @@ -280,6 +314,7 @@ ASh-12 GL (Schwarz) ASh-12 GL (Nero) ASh-12 GL (Noir) + ASh-12 GL (Negro) ASh-12 GL (Desert) @@ -288,6 +323,7 @@ ASh-12 GL (Wüste) ASh-12 GL (Deserto) ASh-12 GL (Désert) + ASh-12 GL (Desierto) ASh-12 GL (Urban) @@ -296,6 +332,7 @@ ASh-12 GL (Urban) ASh-12 GL (Urbano) ASh-12 GL (Urbain) + ASh-12 GL (Urbano) ASh-12 GL (Woodland) @@ -304,6 +341,7 @@ ASh-12 GL (Grünes Tarnmuster) ASh-12 GL (Boschivo) ASh-12 GL (Woodland) + ASh-12 GL (Boscoso) ASh-12 LR (Black) @@ -312,6 +350,7 @@ ASh-12 LR (Schwarz) ASh-12 LR (Nero) ASh-12 LR (Noir) + ASh-12 LR (Negro) ASh-12 LR (Desert) @@ -320,6 +359,7 @@ ASh-12 LR (Wüste) ASh-12 LR (Deserto) ASh-12 LR (Désert) + ASh-12 LR (Desierto) ASh-12 LR (Urban) @@ -328,6 +368,7 @@ ASh-12 LR (Urban) ASh-12 LR (Urbano) ASh-12 LR (Urbain) + ASh-12 LR (Urbano) ASh-12 LR (Woodland) @@ -336,6 +377,7 @@ ASh-12 LR (Grünes Tarnmuster) ASh-12 LR (Boschivo) ASh-12 LR (Woodland) + ASh-12 LR (Boscoso) AW159 Wildcat ASW @@ -344,6 +386,7 @@ AW159 Wildcat ASW AW159 Wildcat ASW AW159 Wildcat ASW + AW159 Wildcat ASW AW159 Wildcat ASW (Unarmed) @@ -352,6 +395,7 @@ AW159 Wildcat ASW (Unbewaffnet) AW159 Wildcat ASW (Disarmato) AW159 Wildcat ASW (non armé) + AW159 Wildcat ASW (Desarmado) H225 Super Puma (Transport) @@ -360,6 +404,7 @@ H225 Super Puma (Transport) H225 Super Puma (Trasporto) H225 Super Puma (Transport ) + H225 Super Puma (Transporte) H225 Super Puma (Civilian) @@ -368,6 +413,7 @@ H225 Super Puma (Zivil) H225 Super Puma (Civile) H225 Super Puma (Civil) + H225 Super Puma (Civil) H215 Super Puma (Transport) @@ -376,6 +422,7 @@ H215 Super Puma (Transport) H215 Super Puma (Trasporto) H215 Super Puma (Transport) + H215 Super Puma (Transporte) H215 Super Puma (Civilian) @@ -384,6 +431,7 @@ H215 Super Puma (Zivil) H215 Super Puma (Civile) H215 Super Puma (Civil) + H215 Super Puma (Civil) H215 Super Puma (Unarmed) @@ -392,6 +440,7 @@ H215 Super Puma (Unbewaffnet) H215 Super Puma (Disarmato) H215 Super Puma (non armé) + H215 Super Puma (Desarmado) H225M Super Cougar SOCAT @@ -400,6 +449,7 @@ H225M Super Cougar SOCAT H225M Super Cougar SOCAT H225M Super Cougar SOCAT + H225M Super Cougar SOCAT H225M Super Cougar SOCAT @@ -408,6 +458,7 @@ H225M Super Cougar SOCAT H225M Super Cougar SOCAT H225M Super Cougar SOCAT + H225M Super Cougar SOCAT H225M Super Cougar @@ -416,6 +467,7 @@ H225M Super Cougar H225M Super Cougar H225M Super Cougar + H225M Super Cougar H225 Super Puma SAR @@ -424,6 +476,7 @@ H225 Super Puma SAR H225 Super Puma SAR H225 Super Puma SAR + H225 Super Puma SAR H225M Super Cougar (Unarmed) @@ -432,6 +485,7 @@ H225M Super Cougar (Disarmato) H225M 슈퍼 쿠거 (비무장) H225M Super Cougar (Non armé) + H225M Super Cougar (Desarmado) HEMTT Fire Truck @@ -453,6 +507,7 @@ Typhoon Water Typhoon Acqua Typhoon Water + Typhoon Water Ram 1500 @@ -461,6 +516,7 @@ Ram 1500 Ram 1500 Ram 1500 + Ram 1500 Ram 1500 (Fuel) @@ -469,6 +525,7 @@ Ram 1500 (Treibstoff) Ram 1500 (Carburante) Ram 1500 (Carburant) + Ram 1500 (Combustible) Ram 1500 (Services) @@ -477,6 +534,7 @@ Ram 1500 (Pannenhilfe) Ram 1500 (Servizi) Ram 1500 (Dépannage) + Ram 1500 (Servicios) Ram 1500 (Repair) @@ -485,6 +543,7 @@ Ram 1500 (Instandsetzung) Ram 1500 (Riparazioni) Ram 1500 (Réparation) + Ram 1500 (Reparaciones) Ram 1500 (Comms) @@ -493,6 +552,7 @@ Ram 1500 (Kommunikation) Ram 1500 (Comunicazioni) Ram 1500 (Communication) + Ram 1500 (Comunicaciones) Ram 1500 (HMG) @@ -501,6 +561,7 @@ Ram 1500 (HMG) Ram 1500 (HMG) Ram 1500 (HMG) + Ram 1500 (HMG) Ram 1500 (MMG) @@ -509,6 +570,7 @@ Ram 1500 (MMG) Ram 1500 (MMG) Ram 1500 (MMG) + Ram 1500 (MMG) Ram 1500 (MRL) @@ -517,6 +579,7 @@ Ram 1500 (MRL) Ram 1500 (MRL) Ram 1500 (MRL) + Ram 1500 (MRL) Ram 1500 (AA) @@ -525,6 +588,7 @@ Ram 1500 (AA) Ram 1500 (AA) Ram 1500 (AA) + Ram 1500 (AA) Ram 1500 (Covered) @@ -533,6 +597,7 @@ Ram 1500 (Abgedeckt) Ram 1500 (Coperto) Ram 1500 (couvert) + Ram 1500 (Cubierto) Ram 1500 (Water) @@ -541,6 +606,7 @@ Ram 1500 (Wasser) Ram 1500 (Acqua) Ram 1500 (eau) + Ram 1500 (Agua) RSG60 @@ -549,6 +615,7 @@ RSG60 RSG60 RSG60 + RSG60 AMOS Container @@ -557,6 +624,7 @@ AMOS Container AMOS Container AMOS Container + Contenedor AMOS Drone40 @@ -565,6 +633,7 @@ Drone40 Drone40 Drone40 + Drone40 Drone40 Scout @@ -573,6 +642,7 @@ Drone40 Scout Drone40 Scout Drone40 Scout + Drone40 Scout Drone40 HE @@ -581,6 +651,7 @@ Drone40 HE Drone40 HE Drone40 HE + Drone40 HE Drone40 Smoke (White) @@ -589,6 +660,7 @@ Drone40 Smoke (Weiß) Drone40 Smoke (Bianco) Drone40 Fumée (Blanc) + Drone40 Humo (Blanco) Drone40 Smoke (Blue) @@ -597,6 +669,7 @@ Drone40 Smoke (Blau) Drone40 Smoke (Blu) Drone40 Fumée (Bleu) + Drone40 Humo (Azul) Drone40 Smoke (Red) @@ -605,6 +678,7 @@ Drone40 Smoke (Rot) Drone40 Smoke (Rosso) Drone40 Fumée (Rouge) + Drone40 Humo (Rojo) Drone40 Smoke (Green) @@ -613,6 +687,7 @@ Drone40 Smoke (Grün) Drone40 Smoke (Verde) Drone40 Fumée (Vert) + Drone40 Humo (Verde) Drone40 Smoke (Orange) @@ -621,6 +696,7 @@ Drone40 Smoke (Orange) Drone40 Smoke (Arancione) Drone40 Fumée (Orange) + Drone40 Humo (Naranja) diff --git a/addons/compat_rf/config.cpp b/addons/compat_rf/config.cpp index ab6fb942751..52ef83c1b74 100644 --- a/addons/compat_rf/config.cpp +++ b/addons/compat_rf/config.cpp @@ -9,10 +9,11 @@ class CfgPatches { requiredAddons[] = {"RF_Data_Loadorder"}; skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); - authors[] = {"Mike"}; + authors[] = {"Mike", "OverlordZorn[CVO]"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; }; #include "CfgWeapons.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgVehicles.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgVehicles.hpp index 6a3bb0a083e..fb52cc6373c 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgVehicles.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { class StaticGrenadeLauncher; class rhs_SPG9_base: AT_01_base_F { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_SPG9); magazineLocation = "_target selectionPosition 'breach'"; @@ -18,14 +18,14 @@ class CfgVehicles { }; class rhs_SPG9M_base: rhs_SPG9_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; disassembleWeapon = QGVAR(spg9m_carry); }; }; class rhs_Kornet_Base: AT_01_base_F { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_9K133_launcher); magazineLocation = "_target selectionPosition 'gun'"; @@ -38,7 +38,7 @@ class CfgVehicles { }; class rhs_Metis_Base: AT_01_base_F { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_9K115_2_launcher); magazineLocation = "_target selectionPosition 'gun'"; @@ -51,7 +51,7 @@ class CfgVehicles { }; class rhs_2b14_82mm_Base: StaticMortar { - class ACE_CSW { + class ace_csw { enabled = 1; magazineLocation = ""; proxyWeapon = QGVAR(rhs_weap_2b14); @@ -64,7 +64,7 @@ class CfgVehicles { }; class rhs_nsv_tripod_base: StaticMGWeapon { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_nsvt_effects); magazineLocation = "_target selectionPosition 'magazine'"; @@ -77,7 +77,7 @@ class CfgVehicles { }; class RHS_KORD_Base: rhs_nsv_tripod_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_KORD); disassembleWeapon = QGVAR(kord_carry); @@ -86,7 +86,7 @@ class CfgVehicles { }; class RHS_KORD_high_base: RHS_KORD_Base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_KORD); disassembleWeapon = QGVAR(kord_carry); @@ -95,7 +95,7 @@ class CfgVehicles { }; class RHS_AGS30_TriPod_base: StaticGrenadeLauncher { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_AGS30); magazineLocation = "_target selectionPosition 'magazine'"; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgWeapons.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgWeapons.hpp index 1e8f4dbdfd1..e444a2aa32f 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgWeapons.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgWeapons.hpp @@ -14,7 +14,7 @@ class CfgWeapons { class GVAR(2b14_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 20; pickupTime = 25; @@ -40,7 +40,7 @@ class CfgWeapons { class GVAR(nsv_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -64,7 +64,7 @@ class CfgWeapons { class GVAR(kord_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -89,7 +89,7 @@ class CfgWeapons { class GVAR(ags30_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -113,7 +113,7 @@ class CfgWeapons { class GVAR(spg9_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -136,7 +136,7 @@ class CfgWeapons { }; class GVAR(spg9m_carry): GVAR(spg9_carry) { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { class assembleTo { EGVAR(csw,spg9Tripod) = "rhs_SPG9M_MSV"; }; @@ -147,7 +147,7 @@ class CfgWeapons { class GVAR(metis_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "mount"; deployTime = 4; pickupTime = 4; @@ -169,7 +169,7 @@ class CfgWeapons { class GVAR(kornet_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "mount"; deployTime = 4; pickupTime = 4; diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgVehicles.hpp b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgVehicles.hpp index 7e58387dabc..1a15fc03f40 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgVehicles.hpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgVehicles.hpp @@ -1,7 +1,7 @@ class CfgVehicles { class StaticMGWeapon; class rhs_DSHKM_base: StaticMGWeapon { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_DSHKM); magazineLocation = "_target selectionPosition 'otocvez'"; @@ -13,7 +13,7 @@ class CfgVehicles { }; }; class rhs_DSHkM_Mini_TriPod_base: rhs_DSHKM_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; disassembleTurret = QEGVAR(csw,kordTripodLow); }; diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgWeapons.hpp b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgWeapons.hpp index 15ff9488cad..279ec98eaa4 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgWeapons.hpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgWeapons.hpp @@ -7,7 +7,7 @@ class CfgWeapons { }; class GVAR(dshkm_carry): Launcher_Base_F { - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgVehicles.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgVehicles.hpp index cbca20cce76..bfe157c6099 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgVehicles.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgVehicles.hpp @@ -14,7 +14,7 @@ class CfgVehicles { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; magazineLocation = ""; proxyWeapon = QGVAR(rhs_mortar_81mm); @@ -28,7 +28,7 @@ class CfgVehicles { class StaticMGWeapon; class rhs_m2staticmg_base: StaticMGWeapon { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_M2); magazineLocation = "_target selectionPosition 'magazine'"; @@ -41,7 +41,7 @@ class CfgVehicles { }; class RHS_M2StaticMG_MiniTripod_base: rhs_m2staticmg_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; disassembleTurret = QEGVAR(csw,m3TripodLow); }; @@ -49,7 +49,7 @@ class CfgVehicles { class StaticGrenadeLauncher; class RHS_MK19_TriPod_base: StaticGrenadeLauncher { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_MK19); magazineLocation = "_target selectionPosition 'magazine'"; @@ -63,7 +63,7 @@ class CfgVehicles { class StaticATWeapon; class RHS_TOW_TriPod_base: StaticATWeapon { - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(rhs_weap_TOW_Launcher_static); magazineLocation = "_target selectionPosition 'tube'"; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgWeapons.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgWeapons.hpp index d373e7fe673..b1a8bd88593 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgWeapons.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgWeapons.hpp @@ -11,7 +11,7 @@ class CfgWeapons { class GVAR(m252_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 20; pickupTime = 25; @@ -37,13 +37,14 @@ class CfgWeapons { class GVAR(m2_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; class assembleTo { EGVAR(csw,m3Tripod) = "RHS_M2StaticMG_WD"; EGVAR(csw,m3TripodLow) = "RHS_M2StaticMG_MiniTripod_WD"; + EGVAR(compat_spe,m3Tripod) = "RHS_M2StaticMG_MiniTripod_WD"; }; }; class WeaponSlotsInfo: WeaponSlotsInfo { @@ -62,7 +63,7 @@ class CfgWeapons { class GVAR(mk19_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -86,7 +87,7 @@ class CfgWeapons { class GVAR(tow_carry): Launcher_Base_F { dlc = "ace"; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/CfgAmmo.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/CfgAmmo.hpp index 65ca880587f..b0df767e3a0 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/CfgAmmo.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_javelin/CfgAmmo.hpp @@ -9,9 +9,10 @@ class CfgAmmo { class ace_missileguidance { enabled = 1; - minDeflection = 0.00005; // Minium flap deflection for guidance - maxDeflection = 0.025; // Maximum flap deflection for guidance - incDeflection = 0.00005; // The incrmeent in which deflection adjusts. + pitchRate = 120; // degrees per second + yawRate = 120; + stabilityCoefficient = 0.2; + bangBangGuidance = 0; canVanillaLock = 0; @@ -22,6 +23,11 @@ class CfgAmmo { defaultSeekerLockMode = "LOBL"; seekerLockModes[] = { "LOBL" }; + defaultNavigationType = "Direct"; + navigationTypes[] = { "Direct", "ZeroEffortMiss" }; + + navigationGain = 3; + seekerAngle = 180; // Angle in front of the missile which can be searched seekerAccuracy = 1; // seeker accuracy multiplier @@ -34,6 +40,19 @@ class CfgAmmo { defaultAttackProfile = "JAV_TOP"; attackProfiles[] = { "JAV_TOP", "JAV_DIR" }; useModeForAttackProfile = 1; + + class navigationStates { + class initial { + transitionCondition = QEFUNC(missileguidance,javelin_midCourseTransition); + navigationType = "Direct"; + }; + class terminal { + transitionCondition = ""; + navigationType = "ZeroEffortMiss"; + }; + // transitions from initial -> termimal + states[] = {"initial", "terminal"}; + }; }; }; }; diff --git a/addons/compat_sog/CfgVehicles/turrets.hpp b/addons/compat_sog/CfgVehicles/turrets.hpp index 6142a018e81..928b80716a4 100644 --- a/addons/compat_sog/CfgVehicles/turrets.hpp +++ b/addons/compat_sog/CfgVehicles/turrets.hpp @@ -17,7 +17,7 @@ class vn_static_m2_high_base: StaticMGWeapon { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = "vn_m2_v_01"; magazineLocation = "_target selectionPosition 'mg1_magazine'"; @@ -31,7 +31,7 @@ class vn_static_m2_high_base: StaticMGWeapon { // M2 Browning - Low class vn_static_m2_low_base: vn_static_m2_high_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleTurret = QEGVAR(csw,m3TripodLow); }; }; @@ -45,7 +45,7 @@ class vn_static_m1919a6_base: vn_static_m2_low_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = "vn_m1919_v_01"; magazineLocation = "_target selectionPosition 'mg1_magazine' vectorAdd [-0.3, 0, 0]"; @@ -66,7 +66,7 @@ class vn_static_m1919a4_high_base: vn_static_m1919a6_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = "vn_m1919_v_01"; magazineLocation = "_target selectionPosition 'mg1_magazine'"; @@ -80,7 +80,7 @@ class vn_static_m1919a4_high_base: vn_static_m1919a6_base { // M1919A4 - Low class vn_static_m1919a4_low_base: vn_static_m1919a4_high_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleTurret = QEGVAR(csw,m3TripodLow); }; }; @@ -93,7 +93,7 @@ class vn_static_m60_high_base: vn_static_m2_low_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = "vn_m60_v_01"; magazineLocation = "_target selectionPosition 'mg1_trigger'"; @@ -113,7 +113,7 @@ class vn_static_m60_low_base: vn_static_m60_high_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'"; disassembleTurret = QEGVAR(csw,m3TripodLow); }; @@ -131,7 +131,7 @@ class vn_static_tow_base: vn_static_at3_base { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = "vn_missile_tow_launcher"; magazineLocation = "_target selectionPosition 'magazine'"; @@ -145,7 +145,7 @@ class vn_static_tow_base: vn_static_at3_base { // DShKM - High class vn_static_dp28_high_base: vn_static_m2_high_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 0; }; }; @@ -156,7 +156,7 @@ class vn_static_dshkm_high_01_base: vn_static_dp28_high_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = "vn_dshkm_v_01"; magazineLocation = "_target selectionPosition 'mg1_boxmag'"; @@ -170,7 +170,7 @@ class vn_static_dshkm_high_01_base: vn_static_dp28_high_base { // DShKM - High, with AA sight class vn_static_dshkm_high_02_base: vn_static_dshkm_high_01_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(dshkm_AA_carry); }; }; @@ -185,7 +185,7 @@ class vn_static_dshkm_low_01_base: vn_static_dshkm_high_01_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(dshkm_shield_carry); disassembleTurret = QEGVAR(csw,kordTripodLow); }; @@ -193,7 +193,7 @@ class vn_static_dshkm_low_01_base: vn_static_dshkm_high_01_base { // DShKM - Low class vn_static_dshkm_low_02_base: vn_static_dshkm_low_01_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(dshkm_carry); }; }; @@ -206,7 +206,7 @@ class vn_static_rpd_high_base: vn_static_dp28_high_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = "vn_rpd_v_01"; magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'"; @@ -226,7 +226,7 @@ class vn_static_pk_high_base: vn_static_rpd_high_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = "vn_pk_v_01"; magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'"; @@ -246,7 +246,7 @@ class vn_static_pk_low_base: vn_static_pk_high_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleTurret = QEGVAR(csw,kordTripodLow); }; }; @@ -259,7 +259,7 @@ class vn_static_mg42_high_base: vn_static_rpd_high_base { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = "vn_mg42_v_01"; magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'"; @@ -278,7 +278,7 @@ class vn_static_mg42_low_base: vn_static_mg42_high_base { }; }; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleTurret = ""; }; }; @@ -294,7 +294,7 @@ class vn_static_sgm_high_base: vn_static_sgm_base { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = "vn_sgm_v_01"; magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'"; @@ -308,7 +308,7 @@ class vn_static_sgm_high_base: vn_static_sgm_base { // SGM - Low class vn_static_sgm_low_base: vn_static_sgm_high_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(sgm_carry); disassembleTurret = QEGVAR(csw,kordTripodLow); }; @@ -316,25 +316,25 @@ class vn_static_sgm_low_base: vn_static_sgm_high_base { // SGM - Shield class vn_o_pl_static_sgm_low_01: vn_static_sgm_low_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(sgm_shield_carry); disassembleTurret = QEGVAR(csw,kordTripodLow); }; }; class vn_o_nva_65_static_sgm_low_01: vn_static_sgm_low_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(sgm_shield_carry); disassembleTurret = QEGVAR(csw,kordTripodLow); }; }; class vn_o_nva_static_sgm_low_01: vn_static_sgm_low_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(sgm_shield_carry); disassembleTurret = QEGVAR(csw,kordTripodLow); }; }; class vn_o_nva_navy_static_sgm_low_01: vn_static_sgm_low_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { disassembleWeapon = QGVAR(sgm_shield_carry); disassembleTurret = QEGVAR(csw,kordTripodLow); }; @@ -351,7 +351,7 @@ class vn_static_mk18_base: StaticCannon { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = "vn_mk18_v_01"; magazineLocation = "_target selectionPosition 'mg1_magazine'"; @@ -378,7 +378,7 @@ class vn_static_mortar_m29_base: Mortar_01_base_F { }; }; - class ACE_CSW { + class ace_csw { enabled = 1; proxyWeapon = QGVAR(vn_mortar_m29); magazineLocation = "_target selectionPosition 'pohon'"; @@ -392,7 +392,7 @@ class vn_static_mortar_m29_base: Mortar_01_base_F { // M2 / Type 63 Mortar class vn_static_mortar_m2_base: vn_static_mortar_m29_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = QGVAR(vn_mortar_m2); magazineLocation = "_target selectionPosition 'pohon'"; @@ -406,7 +406,7 @@ class vn_static_mortar_m2_base: vn_static_mortar_m29_base { // Type 53 Mortar class vn_static_mortar_type53_base: vn_static_mortar_m29_base { - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 1; proxyWeapon = QGVAR(vn_mortar_type53); magazineLocation = "_target selectionPosition 'pohon'"; @@ -430,7 +430,7 @@ class vn_static_h12_base: Mortar_01_base_F { }; }; - class ACE_CSW { + class ace_csw { enabled = 0; }; }; @@ -441,7 +441,7 @@ class vn_static_m45_base: vn_static_m2_high_base { EGVAR(dragging,canCarry) = 0; EGVAR(dragging,canDrag) = 0; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 0; }; }; @@ -450,7 +450,7 @@ class vn_static_zpu4_base: vn_static_m2_high_base { EGVAR(dragging,canCarry) = 0; EGVAR(dragging,canDrag) = 0; - class ACE_CSW: ACE_CSW { + class ace_csw: ace_csw { enabled = 0; }; }; @@ -466,7 +466,7 @@ class vn_o_static_rsna75: StaticMGWeapon { }; }; - class ACE_CSW { + class ace_csw { enabled = 0; }; }; diff --git a/addons/compat_sog/CfgWeapons/csw.hpp b/addons/compat_sog/CfgWeapons/csw.hpp index 87b1b16c5ec..b5ca942f6e8 100644 --- a/addons/compat_sog/CfgWeapons/csw.hpp +++ b/addons/compat_sog/CfgWeapons/csw.hpp @@ -20,7 +20,7 @@ class GVAR(m2_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_m2b_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -48,7 +48,7 @@ class GVAR(m1919a4_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_m1919a4_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -76,7 +76,7 @@ class GVAR(m1919a6_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_m1919a6_ca.paa); - class ACE_CSW { + class ace_csw { type = "mount"; deployTime = 2; pickupTime = 2; @@ -100,7 +100,7 @@ class GVAR(m60_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_m60_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -128,7 +128,7 @@ class GVAR(tow_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_tow_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -155,7 +155,7 @@ class GVAR(dshkm_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_dshkm_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -183,7 +183,7 @@ class GVAR(dshkm_shield_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_dshkm_shield_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -210,7 +210,7 @@ class GVAR(dshkm_AA_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_dshkm_aa_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -237,7 +237,7 @@ class GVAR(rpd_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_rpd_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -264,7 +264,7 @@ class GVAR(pk_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_pk_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -292,7 +292,7 @@ class GVAR(mortar_m29_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_m29_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 20; pickupTime = 25; @@ -319,7 +319,7 @@ class GVAR(mg42_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_mg42_ca.paa); - class ACE_CSW { + class ace_csw { type = "mount"; deployTime = 4; pickupTime = 4; @@ -347,7 +347,7 @@ class GVAR(sgm_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_sgm_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -374,7 +374,7 @@ class GVAR(sgm_shield_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_sgm_shield_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -401,7 +401,7 @@ class GVAR(mk18_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_mk18_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 4; pickupTime = 4; @@ -430,7 +430,7 @@ class GVAR(mortar_m2_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_m2_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 20; pickupTime = 25; @@ -457,7 +457,7 @@ class GVAR(mortar_type53_carry): Launcher_Base_F { modes[] = {}; picture = QPATHTOF(UI\csw_type53_ca.paa); - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 20; pickupTime = 25; diff --git a/addons/compat_spe/CfgGlasses.hpp b/addons/compat_spe/CfgGlasses.hpp index 12f47c40994..70d26492527 100644 --- a/addons/compat_spe/CfgGlasses.hpp +++ b/addons/compat_spe/CfgGlasses.hpp @@ -1,24 +1,25 @@ -#define COMBAT_GOGGLES ACE_Overlay = QPATHTOEF(goggles,textures\HUD\CombatGoggles.paa); \ - ACE_OverlayCracked = QPATHTOEF(goggles,textures\HUD\CombatGogglesCracked.paa); \ - ACE_Resistance = 2; \ - ACE_Protection = 1; +#define COMBAT_GOGGLES \ + ACE_Overlay = QPATHTOEF(goggles,textures\HUD\CombatGoggles.paa); \ + ACE_OverlayCracked = QPATHTOEF(goggles,textures\HUD\CombatGogglesCracked.paa); \ + ACE_Resistance = 2; \ + ACE_Protection = 1 class CfgGlasses { class SPE_GER_Glasses; class G_SPE_Dust_Goggles_2: SPE_GER_Glasses { ACE_TintAmount = 16; - COMBAT_GOGGLES + COMBAT_GOGGLES; }; class G_SPE_Dust_Goggles: SPE_GER_Glasses { ACE_TintAmount = 8; - COMBAT_GOGGLES + COMBAT_GOGGLES; }; class SPE_US_Glasses; class G_SPE_SWDG_Goggles: SPE_US_Glasses { - COMBAT_GOGGLES + COMBAT_GOGGLES; }; class G_SPE_Polar_Goggles: SPE_US_Glasses { - COMBAT_GOGGLES + COMBAT_GOGGLES; }; class G_SPE_Sunglasses_GER_Brown: SPE_GER_Glasses { ACE_TintAmount = 16; diff --git a/addons/compat_spe/CfgMagazines/csw.hpp b/addons/compat_spe/CfgMagazines/csw.hpp index 404156bd8f8..6b4c385a42a 100644 --- a/addons/compat_spe/CfgMagazines/csw.hpp +++ b/addons/compat_spe/CfgMagazines/csw.hpp @@ -2,43 +2,16 @@ class CA_Magazine; // M1919A4/A6 class SPE_50Rnd_762x63: CA_Magazine { - ACE_isBelt = 0; -}; - -class SPE_100Rnd_762x63: SPE_50Rnd_762x63 { - ACE_isBelt = 1; -}; - -class SPE_100Rnd_762x63_M1: SPE_100Rnd_762x63 { ACE_isBelt = 1; }; -class SPE_100Rnd_762x63_M2_AP: SPE_100Rnd_762x63 { +// M2 +class VehicleMagazine; +class SPE_100Rnd_127x99_M2: VehicleMagazine { ACE_isBelt = 1; }; -//MG34/42 - +// MG34/42 class SPE_50Rnd_792x57: CA_Magazine { - ACE_isBelt = 0; -}; - -class SPE_50Rnd_792x57_sS: SPE_50Rnd_792x57 { - ACE_isBelt = 0; -}; - -class SPE_50Rnd_792x57_SMK: SPE_50Rnd_792x57_sS { - ACE_isBelt = 0; -}; - -class SPE_100Rnd_792x57: SPE_50Rnd_792x57 { - ACE_isBelt = 1; -}; - -class SPE_100Rnd_792x57_sS: SPE_50Rnd_792x57_sS { - ACE_isBelt = 1; -}; - -class SPE_100Rnd_792x57_SMK: SPE_50Rnd_792x57_SMK { ACE_isBelt = 1; }; diff --git a/addons/compat_spe/compat_spe_csw/ACE_CSW_Groups.hpp b/addons/compat_spe/compat_spe_csw/ACE_CSW_Groups.hpp deleted file mode 100644 index 35758ed5333..00000000000 --- a/addons/compat_spe/compat_spe_csw/ACE_CSW_Groups.hpp +++ /dev/null @@ -1,50 +0,0 @@ -class ACE_CSW_Groups { - - // --- Gun Turrets ------------------------------------------------------------- - - class SPE_100Rnd_762x63 { - SPE_100Rnd_762x63 = 1; - }; - - class SPE_100Rnd_762x63_M1 { - SPE_100Rnd_762x63_M1 = 1; - }; - - class SPE_100Rnd_762x63_M2_AP { - SPE_100Rnd_762x63_M2_AP = 1; - }; - - class SPE_100Rnd_792x57 { - SPE_100Rnd_792x57 = 1; - }; - - class SPE_100Rnd_792x57_sS { - SPE_100Rnd_792x57_sS = 1; - }; - - class SPE_100Rnd_792x57_SMK { - SPE_100Rnd_792x57_SMK = 1; - }; - - // --- Mortars ------------------------------------------------------------- - - class SPE_1Rnd_81mmHE_M1_M43A1 { - SPE_1Rnd_81mmHE_M1_M43A1 = 1; - }; - class SPE_1Rnd_81mmWP_M1_M57 { - SPE_1Rnd_81mmWP_M1_M57 = 1; - }; - class SPE_81mm_M1_M57_SmokeShell { - SPE_81mm_M1_M57_SmokeShell = 1; - }; - - class SPE_1Rnd_81mm_FA_Mle_1932_HE { - SPE_1Rnd_81mm_FA_Mle_1932_HE = 1; - }; - class SPE_81mm_FA_Mle_1932_Smoke { - SPE_81mm_FA_Mle_1932_Smoke = 1; - }; - class SPE_81mm_FA_Mle_1932_Illu { - SPE_81mm_FA_Mle_1932_Illu = 1; - }; -}; diff --git a/addons/compat_spe/compat_spe_csw/CfgMagazineGroups.hpp b/addons/compat_spe/compat_spe_csw/CfgMagazineGroups.hpp new file mode 100644 index 00000000000..78f6d0629dd --- /dev/null +++ b/addons/compat_spe/compat_spe_csw/CfgMagazineGroups.hpp @@ -0,0 +1,94 @@ +class EGVAR(csw,groups) { + // --- Gun Turrets ------------------------------------------------------------- + class SPE_50Rnd_762x63 { + SPE_50Rnd_762x63 = 1; + }; + class SPE_100Rnd_762x63 { + SPE_100Rnd_762x63 = 1; + }; + + class SPE_50Rnd_762x63_M1 { + SPE_50Rnd_762x63_M1 = 1; + }; + class SPE_100Rnd_762x63_M1 { + SPE_100Rnd_762x63_M1 = 1; + }; + + class SPE_50Rnd_762x63_M2_AP { + SPE_50Rnd_762x63_M2_AP = 1; + }; + class SPE_100Rnd_762x63_M2_AP { + SPE_100Rnd_762x63_M2_AP = 1; + }; + + class SPE_50Rnd_762x63_Tracer { + SPE_50Rnd_762x63_Tracer = 1; + }; + class SPE_100Rnd_762x63_Tracer { + SPE_100Rnd_762x63_Tracer = 1; + }; + + class SPE_50Rnd_792x57 { + SPE_50Rnd_792x57 = 1; + }; + class SPE_100Rnd_792x57 { + SPE_100Rnd_792x57 = 1; + SPE_250Rnd_792x57 = 1; + }; + + class SPE_50Rnd_792x57_sS { + SPE_50Rnd_792x57_sS = 1; + }; + class SPE_100Rnd_792x57_sS { + SPE_100Rnd_792x57_sS = 1; + SPE_250Rnd_792x57_sS = 1; + }; + + class SPE_50Rnd_792x57_SMK { + SPE_50Rnd_792x57_SMK = 1; + }; + class SPE_100Rnd_792x57_SMK { + SPE_100Rnd_792x57_SMK = 1; + SPE_250Rnd_792x57_SMK = 1; + }; + + class SPE_50Rnd_792x57_Tracer { + SPE_50Rnd_792x57_Tracer = 1; + }; + class SPE_100Rnd_792x57_Tracer { + SPE_100Rnd_792x57_Tracer = 1; + }; + + // Makes it compatible with other mods' .50 BMG + class EGVAR(csw,100Rnd_127x99_mag) { + SPE_100Rnd_127x99_M2 = 1; + }; + class SPE_100Rnd_127x99_M2: EGVAR(csw,100Rnd_127x99_mag) {}; + + // --- Mortars ------------------------------------------------------------- + class SPE_1Rnd_81mmHE_M1_M43A1 { + SPE_8Rnd_81mmHE_M1_M43A1 = 1; + SPE_1Rnd_81mmHE_M1_M43A1 = 1; + }; + class SPE_1Rnd_81mmWP_M1_M57 { + SPE_8Rnd_81mmWP_M1_M57 = 1; + SPE_1Rnd_81mmWP_M1_M57 = 1; + }; + class SPE_81mm_M1_M57_SmokeShell { + SPE_8rnd_81mm_M1_M57_SmokeShell = 1; + SPE_81mm_M1_M57_SmokeShell = 1; + }; + + class SPE_1Rnd_81mm_FA_Mle_1932_HE { + SPE_8Rnd_81mm_FA_Mle_1932_HE = 1; + SPE_1Rnd_81mm_FA_Mle_1932_HE = 1; + }; + class SPE_81mm_FA_Mle_1932_Smoke { + SPE_8Rnd_81mm_FA_Mle_1932_Smoke = 1; + SPE_81mm_FA_Mle_1932_Smoke = 1; + }; + class SPE_81mm_FA_Mle_1932_Illu { + SPE_8Rnd_81mm_FA_Mle_1932_Illu = 1; + SPE_81mm_FA_Mle_1932_Illu = 1; + }; +}; diff --git a/addons/compat_spe/compat_spe_csw/CfgMagazines.hpp b/addons/compat_spe/compat_spe_csw/CfgMagazines.hpp new file mode 100644 index 00000000000..9c255c28008 --- /dev/null +++ b/addons/compat_spe/compat_spe_csw/CfgMagazines.hpp @@ -0,0 +1,26 @@ +// In SPE 1.1.1, the tracer magazines don't have proper names +class CfgMagazines { + class SPE_50Rnd_762x63; + class SPE_50Rnd_762x63_Tracer: SPE_50Rnd_762x63 { + displayName = SUBCSTRING(50Rnd_762x63_Tracer); + displayNameShort = "$STR_A3_tracer_dns"; + }; + + class SPE_100Rnd_762x63; + class SPE_100Rnd_762x63_Tracer: SPE_100Rnd_762x63 { + displayName = SUBCSTRING(100Rnd_762x63_Tracer); + displayNameShort = "$STR_A3_tracer_dns"; + }; + + class SPE_50Rnd_792x57; + class SPE_50Rnd_792x57_Tracer: SPE_50Rnd_792x57 { + displayName = SUBCSTRING(50Rnd_792x57_Tracer); + displayNameShort = "$STR_A3_tracer_dns"; + }; + + class SPE_100Rnd_792x57; + class SPE_100Rnd_792x57_Tracer: SPE_100Rnd_792x57 { + displayName = SUBCSTRING(100Rnd_792x57_Tracer); + displayNameShort = "$STR_A3_tracer_dns"; + }; +}; diff --git a/addons/compat_spe/compat_spe_csw/CfgVehicles.hpp b/addons/compat_spe/compat_spe_csw/CfgVehicles.hpp index e0a38aa341c..30d39301f38 100644 --- a/addons/compat_spe/compat_spe_csw/CfgVehicles.hpp +++ b/addons/compat_spe/compat_spe_csw/CfgVehicles.hpp @@ -9,90 +9,267 @@ class CfgVehicles { class ACE_Actions { class ACE_MainActions; }; - class Turrets { - class MainTurret; + }; + + // --- Gun Turrets ------------------------------------------------------------- + class StaticMGWeapon: StaticWeapon {}; + class SPE_StaticMGWeapon_base: StaticMGWeapon {}; + class SPE_M2_M3: SPE_StaticMGWeapon_base { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = ""; + selection = "zamerny"; + }; + }; + class ace_csw { + enabled = 1; + proxyWeapon = QGVAR(M2_proxy); + magazineLocation = ""; + disassembleWeapon = "SPE_M2_50"; + disassembleTurret = QGVAR(m3Tripod); + ammoLoadTime = 10; + ammoUnloadTime = 8; + desiredAmmo = 100; + }; + }; + class SPE_M2_M3_Trench: SPE_M2_M3 { + class ace_csw: ace_csw { + disassembleWeapon = ""; + disassembleTurret = ""; }; - class UserActions; }; - // --- Mortars ----------------------------------------------------------------- - class StaticMortar: StaticWeapon { - class Turrets: Turrets { - class MainTurret: MainTurret {}; + + class SPE_M1919_M2: SPE_StaticMGWeapon_base { + class ace_csw { + enabled = 1; + proxyWeapon = QGVAR(M1919A4_proxy); + magazineLocation = "_target selectionPosition ['magazine', 'FireGeometry', 'AveragePoint']"; + disassembleWeapon = "SPE_M1919A4"; + disassembleTurret = QGVAR(m2Tripod); + ammoLoadTime = 8; + ammoUnloadTime = 6; + desiredAmmo = 100; }; }; - class SPE_StaticMortar_base: StaticMortar { - class Turrets: Turrets { - class MainTurret: MainTurret {}; + class SPE_M1919_M2_Trench_Deployed: SPE_M1919_M2 { + class ace_csw: ace_csw { + disassembleWeapon = ""; + disassembleTurret = ""; }; - class EventHandlers: EventHandlers { - class SPE_StaticWeaponsHandler { - init = ""; + }; + + + class SPE_MG42_Lafette: SPE_StaticMGWeapon_base { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + class GVAR(alterHeight) { + condition = "getText (configOf _target >> 'SPE_AltHeight_Tripod_Name') != '' && {[_target, true] call SPE_WEAPONS_STATIC_fnc_can_alter_height}"; + displayName = "$STR_SPE_DN_ASSETS_VEHICLES_ADJUST_TRIPOD_HEIGHT"; + statement = "[_target, getText (configOf _target >> 'SPE_AltHeight_Tripod_Name'), true] call SPE_Weapons_Static_fnc_alter_height"; + icon = "\A3\Ui_f\data\IGUI\Cfg\Actions\repair_ca.paa"; + modifierFunction = "(_this select 3) set [1, format [localize 'STR_SPE_DN_ASSETS_VEHICLES_ADJUST_TRIPOD_HEIGHT', getText (configOf _target >> 'displayName')]]"; + }; }; }; }; + class SPE_MG42_Lafette_Deployed: SPE_MG42_Lafette { + class ace_csw { + enabled = 1; + proxyWeapon = QGVAR(MG42_proxy); + magazineLocation = ""; + disassembleWeapon = "SPE_MG42"; + disassembleTurret = QGVAR(LafetteTripod); + ammoLoadTime = 7; + ammoUnloadTime = 5; + desiredAmmo = 100; + }; + }; + class SPE_MG34_Lafette_Deployed: SPE_MG42_Lafette { + class ace_csw { + enabled = 1; + proxyWeapon = QGVAR(MG34_proxy); + magazineLocation = ""; + disassembleWeapon = "SPE_MG34"; + disassembleTurret = QGVAR(LafetteTripod); + ammoLoadTime = 7; + ammoUnloadTime = 5; + desiredAmmo = 100; + }; + }; - class SPE_US_Mortar_base: SPE_StaticMortar_base {}; - class SPE_M1_81: SPE_US_Mortar_base { - class Turrets: Turrets { - class MainTurret: MainTurret { - magazines[] = {}; + class SPE_MG42_Lafette_low; + class SPE_MG42_Lafette_low_Deployed: SPE_MG42_Lafette_low { + class ace_csw { + enabled = 1; + proxyWeapon = QGVAR(MG42_proxy); + magazineLocation = ""; + disassembleWeapon = "SPE_MG42"; + disassembleTurret = QGVAR(LafetteTripodLow); + ammoLoadTime = 7; + ammoUnloadTime = 5; + desiredAmmo = 100; + }; + }; + class SPE_MG42_Lafette_trench_Deployed: SPE_MG42_Lafette_low_Deployed { + class ace_csw: ace_csw { + disassembleWeapon = ""; + disassembleTurret = ""; + }; + }; + + class SPE_MG34_Lafette_low_Deployed: SPE_MG42_Lafette_low { + class ace_csw { + enabled = 1; + proxyWeapon = QGVAR(MG34_proxy); + magazineLocation = ""; + disassembleWeapon = "SPE_MG34"; + disassembleTurret = QGVAR(LafetteTripodLow); + ammoLoadTime = 7; + ammoUnloadTime = 5; + desiredAmmo = 100; + }; + }; + class SPE_MG34_Lafette_Trench_Deployed: SPE_MG34_Lafette_low_Deployed { + class ace_csw: ace_csw { + disassembleWeapon = ""; + disassembleTurret = ""; + }; + }; + + + class SPE_MG_Bipod_base; + class SPE_M1919A6_Bipod: SPE_MG_Bipod_base { + class ace_csw { + enabled = 1; + proxyWeapon = QGVAR(M1919A6_proxy); + magazineLocation = ""; + disassembleWeapon = ""; + disassembleTurret = ""; + ammoLoadTime = 8; + ammoUnloadTime = 6; + desiredAmmo = 100; + }; + }; + + + class SPE_MG42_Bipod: SPE_MG_Bipod_base { + class ace_csw { + enabled = 1; + proxyWeapon = QGVAR(MG42_proxy); + magazineLocation = ""; + disassembleWeapon = ""; + disassembleTurret = ""; + ammoLoadTime = 7; + ammoUnloadTime = 5; + desiredAmmo = 100; + }; + }; + class SPE_MG34_Bipod: SPE_MG_Bipod_base { + class ace_csw { + enabled = 1; + proxyWeapon = QGVAR(MG34_proxy); + magazineLocation = ""; + disassembleWeapon = ""; + disassembleTurret = ""; + ammoLoadTime = 7; + ammoUnloadTime = 5; + desiredAmmo = 100; + }; + }; + + + class ThingX; + class EGVAR(csw,baseTripod): ThingX { + class ACE_Actions { + class ACE_MainActions; + }; + }; + class GVAR(m3Tripod): EGVAR(csw,baseTripod) { + scope = 2; + displayName = "$STR_DN_SPE_M3_Tripod"; + model = "\WW2\SPE_Assets_m\Vehicles\StaticWeapons_U1_m\SPE_M3_Tripod.p3d"; + picture = "\WW2\SPE_Assets_t\Weapons\Equipment_U1_t\Weapons\Launchers\Gear_M3_Tripod_X_ca.paa"; + class ace_csw { + disassembleTo = "SPE_M3_Tripod"; + }; + }; + + class GVAR(m2Tripod): EGVAR(csw,baseTripod) { + scope = 2; + displayName = "$STR_DN_SPE_M2_Tripod"; + model = "\WW2\SPE_Assets_m\Vehicles\StaticWeapons_m\SPE_M2_Tripod_Low.p3d"; + picture = "\WW2\SPE_Assets_t\Weapons\Equipment_t\Weapons\Launchers\Gear_M2_Tripod_X_ca.paa"; + class ace_csw { + disassembleTo = "SPE_M2_Tripod"; + }; + }; + + class GVAR(LafetteTripodLow): EGVAR(csw,baseTripod) { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + class GVAR(alterHeight) { + condition = "getText (configOf _target >> 'SPE_AltHeight_Tripod_Name') != '' && {[_target, true] call SPE_WEAPONS_STATIC_fnc_can_alter_height}"; + displayName = "$STR_SPE_DN_ASSETS_VEHICLES_ADJUST_TRIPOD_HEIGHT"; + statement = "[_target, getText (configOf _target >> 'SPE_AltHeight_Tripod_Name'), true] call SPE_Weapons_Static_fnc_alter_height"; + icon = "\A3\Ui_f\data\IGUI\Cfg\Actions\repair_ca.paa"; + modifierFunction = "(_this select 3) set [1, format [localize 'STR_SPE_DN_ASSETS_VEHICLES_ADJUST_TRIPOD_HEIGHT', getText (configOf _target >> 'displayName')]]"; + }; }; }; + scope = 2; + displayName = "$STR_DN_SPE_Lafette_Tripod"; + model = "\WW2\SPE_Assets_m\Vehicles\StaticWeapons_m\SPE_Lafette_Tripod_Low.p3d"; + picture = "\WW2\SPE_Assets_t\Weapons\Equipment_t\Weapons\Launchers\Gear_Lafette_Tripod_X_ca.paa"; + SPE_AltHeight_Tripod_Name = QGVAR(LafetteTripod); + class ace_csw { + disassembleTo = "SPE_Lafette_Tripod"; + }; + }; + + class GVAR(LafetteTripod): GVAR(LafetteTripodLow) { + model = "\WW2\SPE_Assets_m\Vehicles\StaticWeapons_m\SPE_Lafette_Tripod_High.p3d"; + SPE_AltHeight_Tripod_Name = QGVAR(LafetteTripodLow); + class ace_csw { + disassembleTo = "SPE_Lafette_Tripod"; + }; + }; + + // --- Mortars ----------------------------------------------------------------- + class StaticMortar: StaticWeapon {}; + class SPE_StaticMortar_base: StaticMortar {}; + class SPE_US_Mortar_base: SPE_StaticMortar_base {}; + class SPE_M1_81: SPE_US_Mortar_base { class ACE_Actions: ACE_Actions { class ACE_MainActions: ACE_MainActions { position = ""; selection = "zamerny"; }; }; - class UserActions { - delete Prepare_WP_Selected; - delete Prepare_WP; - delete Prepare_Smoke_Selected; - delete Prepare_Smoke; - delete Prepare_HE_Selected; - delete Prepare_HE; - delete Reload; - delete Unload; - }; - class ACE_CSW { + class ace_csw { enabled = 1; - proxyWeapon = "SPE_M1_81_proxy"; + proxyWeapon = QGVAR(M1_proxy); magazineLocation = "_target selectionPosition 'usti hlavne'"; disassembleWeapon = "SPE_M1_81_Barrel"; - disassembleTurret = QGVAR(M1_81_baseplate); + disassembleTurret = QGVAR(m1Baseplate); ammoLoadTime = 3; ammoUnloadTime = 3; desiredAmmo = 1; }; }; + class SPE_FR_Mortar_base: SPE_StaticMortar_base {}; class SPE_MLE_27_31: SPE_FR_Mortar_base { - class Turrets: Turrets { - class MainTurret: MainTurret { - magazines[] = {}; - }; - }; class ACE_Actions: ACE_Actions { class ACE_MainActions: ACE_MainActions { position = ""; selection = "zamerny"; }; }; - class UserActions { - delete Prepare_Illu_Selected; - delete Prepare_Illu; - delete Prepare_Smoke_Selected; - delete Prepare_Smoke; - delete Prepare_HE_Selected; - delete Prepare_HE; - delete Reload; - delete Unload; - }; - class ACE_CSW { + class ace_csw { enabled = 1; - proxyWeapon = "SPE_MLE_27_31_proxy"; + proxyWeapon = QGVAR(MLE_27_31_proxy); magazineLocation = "_target selectionPosition 'usti hlavne'"; disassembleWeapon = "SPE_MLE_27_31_Barrel"; disassembleTurret = QGVAR(MLE_27_31_baseplate); @@ -103,30 +280,9 @@ class CfgVehicles { }; class SPE_GrW278_1: SPE_MLE_27_31 { - class Turrets: Turrets { - class MainTurret: MainTurret { - magazines[] = {}; - }; - }; - class ACE_Actions: ACE_Actions { - class ACE_MainActions: ACE_MainActions { - position = ""; - selection = "zamerny"; - }; - }; - class UserActions { - delete Prepare_Illu_Selected; - delete Prepare_Illu; - delete Prepare_Smoke_Selected; - delete Prepare_Smoke; - delete Prepare_HE_Selected; - delete Prepare_HE; - delete Reload; - delete Unload; - }; - class ACE_CSW { + class ace_csw { enabled = 1; - proxyWeapon = "SPE_GrW278_1_proxy"; + proxyWeapon = QGVAR(GrW278_1_proxy); magazineLocation = "_target selectionPosition 'usti hlavne'"; disassembleWeapon = "SPE_GrW278_1_Barrel"; disassembleTurret = QGVAR(GrW278_baseplate); @@ -137,7 +293,15 @@ class CfgVehicles { }; - class EGVAR(csw,baseTripod); + class GVAR(m1Baseplate): EGVAR(csw,baseTripod) { + scope = 2; + displayName = "$STR_DN_SPE_M1_81_STAND"; + model = "\WW2\SPE_Assets_m\Weapons\Mortars_m\SPE_M1_Mortar_Stand_Deployed.p3d"; + picture = "\WW2\SPE_Assets_t\Weapons\Equipment_t\Weapons\Launchers\Gear_M1_81_Stand_X_ca.paa"; + class ace_csw { + disassembleTo = "SPE_M1_81_Stand"; + }; + }; class GVAR(MLE_27_31_baseplate): EGVAR(csw,baseTripod) { scope = 2; @@ -146,7 +310,7 @@ class CfgVehicles { picture = "\WW2\SPE_Assets_t\Weapons\Equipment_t\Weapons\Launchers\Gear_MLE_27_31_Stand_X_ca.paa"; hiddenSelections[] = {"camo_0","camo_1"}; hiddenSelectionsTextures[] = {"ww2\spe_assets_t\weapons\mortars_t\m1_mortar\Brandt_81mm_Mortar_French_co.paa","WW2\SPE_Assets_t\Weapons\Mortars_t\M1_Mortar\Brandt_81mm_Sight_French_co.paa"}; - class ACE_CSW { + class ace_csw { disassembleTo = "SPE_MLE_27_31_Stand"; }; }; @@ -158,83 +322,8 @@ class CfgVehicles { picture = "\WW2\SPE_Assets_t\Weapons\Equipment_t\Weapons\Launchers\Gear_GrW278_1_Stand_X_ca.paa"; hiddenSelections[] = {"camo_0"}; hiddenSelectionsTextures[] = {"ww2\spe_assets_t\weapons\mortars_t\m1_mortar\Brandt_81mm_Mortar_Gelb_co.paa"}; - class ACE_CSW { + class ace_csw { disassembleTo = "SPE_GrW278_1_Stand"; }; }; - - class GVAR(M1_81_baseplate): EGVAR(csw,baseTripod) { - scope = 2; - displayName = "$STR_DN_SPE_M1_81_STAND"; - model = "\WW2\SPE_Assets_m\Weapons\Mortars_m\SPE_M1_Mortar_Stand_Deployed.p3d"; - picture = "\WW2\SPE_Assets_t\Weapons\Equipment_t\Weapons\Launchers\Gear_M1_81_Stand_X_ca.paa"; - class ACE_CSW { - disassembleTo = "SPE_M1_81_Stand"; - }; - }; - - - class ACE_SPE_M1_81_Stand_Deployed: EGVAR(csw,baseTripod) { - author = "SPE"; - scope = 2; - displayName = "$STR_DN_SPE_M1_81_STAND"; - model = "\WW2\SPE_Assets_m\Weapons\Mortars_m\SPE_M1_Mortar_Stand_Deployed.p3d"; - picture = "\WW2\SPE_Assets_t\Weapons\Equipment_t\Weapons\Launchers\Gear_M1_81_Stand_X_ca.paa"; - class assembleInfo { - base = ""; - primary = 0; - displayName = ""; - assembleTo = ""; - class SPE_M1_81_Barrel { - deployTime = 0; - assembleTo = ""; - }; - }; - class ACE_CSW { - disassembleTo = "SPE_M1_81_Stand"; - }; - }; - class ACE_SPE_GrW278_1_Stand_Deployed: EGVAR(csw,baseTripod) { - author = "SPE"; - scope = 2; - displayName = "$STR_DN_SPE_GrW278_1_STAND"; - model = "\WW2\SPE_Assets_m\Weapons\Mortars_m\SPE_M1_Mortar_Stand_Deployed.p3d"; - picture = "\WW2\SPE_Assets_t\Weapons\Equipment_t\Weapons\Launchers\Gear_GrW278_1_Stand_X_ca.paa"; - hiddenSelectionsTextures[] = {"ww2\spe_assets_t\weapons\mortars_t\m1_mortar\Brandt_81mm_Mortar_Gelb_co.paa","WW2\SPE_Assets_t\Weapons\Mortars_t\M1_Mortar\Brandt_81mm_Sight_Gelb_co.paa"}; - class assembleInfo { - base = ""; - primary = 0; - displayName = ""; - assembleTo = ""; - class SPE_GrW278_1_Barrel { - deployTime = 0; - assembleTo = ""; - }; - }; - class ACE_CSW { - disassembleTo = "SPE_GrW278_1_Stand"; - }; - }; - class ACE_SPE_MLE_27_31_Stand_Deployed: EGVAR(csw,baseTripod) { - author = "SPE"; - scope = 2; - displayName = "$STR_DN_SPE_MLE_27_31_STAND"; - model = "\WW2\SPE_Assets_m\Weapons\Mortars_m\SPE_M1_Mortar_Stand_Deployed.p3d"; - picture = "\WW2\SPE_Assets_t\Weapons\Equipment_t\Weapons\Launchers\Gear_MLE_27_31_Stand_X_ca.paa"; - hiddenSelections[] = {"camo_0","camo_1"}; - hiddenSelectionsTextures[] = {"ww2\spe_assets_t\weapons\mortars_t\m1_mortar\Brandt_81mm_Mortar_French_co.paa","WW2\SPE_Assets_t\Weapons\Mortars_t\M1_Mortar\Brandt_81mm_Sight_French_co.paa"}; - class assembleInfo { - base = ""; - primary = 0; - displayName = ""; - assembleTo = ""; - class SPE_MLE_27_31_Barrel { - deployTime = 0; - assembleTo = ""; - }; - }; - class ACE_CSW { - disassembleTo = "SPE_MLE_27_31_Stand"; - }; - }; }; diff --git a/addons/compat_spe/compat_spe_csw/CfgWeapons.hpp b/addons/compat_spe/compat_spe_csw/CfgWeapons.hpp index db090c77080..b6e71dcb6a9 100644 --- a/addons/compat_spe/compat_spe_csw/CfgWeapons.hpp +++ b/addons/compat_spe/compat_spe_csw/CfgWeapons.hpp @@ -1,43 +1,162 @@ class CfgWeapons { - class Launcher; - class Launcher_Base_F: Launcher { - class WeaponSlotsInfo; + class Launcher_Base_F; + class SPE_Slung_Static_Weapon_Base: Launcher_Base_F {}; + + // --- Vanilla Compat ------------------------------------------------------------- + class EGVAR(csw,staticHMGCarry): Launcher_Base_F { + class ace_csw { + class assembleTo { + GVAR(m3Tripod) = "B_HMG_01_F"; + }; + }; + }; + class EGVAR(csw,staticM2ShieldCarry): EGVAR(csw,staticHMGCarry) { + class ace_csw: ace_csw { + class assembleTo { + GVAR(m3Tripod) = "B_HMG_02_F"; + }; + }; }; - class SPE_Slung_Static_Weapon_Base: Launcher_Base_F {}; + class EGVAR(csw,staticGMGCarry): Launcher_Base_F { + class ace_csw { + class assembleTo { + GVAR(m3Tripod) = "B_GMG_01_F"; + }; + }; + }; + + // --- Gun Turrets ------------------------------------------------------------- + class SPE_M2_M3_Tripod; + class GVAR(M2_proxy): SPE_M2_M3_Tripod { + magazineReloadTime = 0.5; + }; + class SPE_M3_Tripod: SPE_Slung_Static_Weapon_Base { + class ace_csw { + type = "mount"; + deployTime = 4; + pickupTime = 4; + deploy = QGVAR(m3Tripod); + }; + }; + class SPE_M2_50: SPE_Slung_Static_Weapon_Base { + class ace_csw { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + class assembleTo { + GVAR(m3Tripod) = "SPE_M2_M3"; + EGVAR(csw,m3TripodLow) = "SPE_M2_M3"; + }; + }; + }; + + class SPE_M1919A4_tripod; + class GVAR(M1919A4_proxy): SPE_M1919A4_tripod { + magazineReloadTime = 0.5; + }; + + class SPE_M2_Tripod: SPE_Slung_Static_Weapon_Base { + class ace_csw { + type = "mount"; + deployTime = 4; + pickupTime = 4; + deploy = QGVAR(m2Tripod); + }; + }; + + class SPE_LMG; + class SPE_M1919A4: SPE_LMG { + class ace_csw { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + class assembleTo { + GVAR(m2Tripod) = "SPE_M1919_M2"; + }; + }; + }; + + class SPE_M1919A6_StaticBipod; + class GVAR(M1919A6_proxy): SPE_M1919A6_StaticBipod { + magazineReloadTime = 0.5; + }; + + class SPE_MG42_Tripod; + class GVAR(MG42_proxy): SPE_MG42_Tripod { + magazineReloadTime = 0.5; + }; + + class SPE_MG34_Tripod; + class GVAR(MG34_proxy): SPE_MG34_Tripod { + magazineReloadTime = 0.5; + }; + + class SPE_Lafette_Tripod: SPE_Slung_Static_Weapon_Base { + class ace_csw { + type = "mount"; + deployTime = 4; + pickupTime = 4; + deploy = QGVAR(LafetteTripodLow); + }; + }; + class SPE_MG42: SPE_LMG { + class ace_csw { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + class assembleTo { + GVAR(LafetteTripodLow) = "SPE_MG42_Lafette_low_Deployed"; + GVAR(LafetteTripod) = "SPE_MG42_Lafette_Deployed"; + }; + }; + }; + class SPE_MG34: SPE_LMG { + class ace_csw { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + class assembleTo { + GVAR(LafetteTripodLow) = "SPE_MG34_Lafette_low_Deployed"; + GVAR(LafetteTripod) = "SPE_MG34_Lafette_Deployed"; + }; + }; + }; + + // --- Mortars ----------------------------------------------------------------- class SPE_M1_81; - class SPE_M1_81_proxy: SPE_M1_81 { + class GVAR(M1_proxy): SPE_M1_81 { magazineReloadTime = 0.5; }; class SPE_M1_81_Stand: SPE_Slung_Static_Weapon_Base { - class ACE_CSW { + class ace_csw { type = "mount"; deployTime = 4; pickupTime = 4; - deploy = QGVAR(M1_81_baseplate); + deploy = QGVAR(m1Baseplate); }; }; class SPE_M1_81_Barrel: SPE_Slung_Static_Weapon_Base { - class ACE_CSW { + class ace_csw { type = "weapon"; - deployTime = 4; - pickupTime = 4; + deployTime = 20; + pickupTime = 25; class assembleTo { - GVAR(M1_81_baseplate) = "SPE_M1_81"; + GVAR(m1Baseplate) = "SPE_M1_81"; EGVAR(csw,mortarBaseplate) = "SPE_M1_81"; }; }; }; class SPE_MLE_27_31; - class SPE_MLE_27_31_proxy: SPE_MLE_27_31 { + class GVAR(MLE_27_31_proxy): SPE_MLE_27_31 { magazineReloadTime = 0.5; }; class SPE_MLE_27_31_Stand: SPE_Slung_Static_Weapon_Base { - class ACE_CSW { + class ace_csw { type = "mount"; deployTime = 4; pickupTime = 4; @@ -45,7 +164,7 @@ class CfgWeapons { }; }; class SPE_MLE_27_31_Barrel: SPE_Slung_Static_Weapon_Base { - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 20; pickupTime = 25; @@ -57,21 +176,20 @@ class CfgWeapons { }; class SPE_GrW278_1; - class SPE_GrW278_1_proxy: SPE_GrW278_1 { + class GVAR(GrW278_1_proxy): SPE_GrW278_1 { magazineReloadTime = 0.5; }; class SPE_GrW278_1_Stand: SPE_MLE_27_31_Stand { - class ACE_CSW { + class ace_csw { type = "mount"; deployTime = 4; pickupTime = 4; deploy = QGVAR(GrW278_baseplate); }; }; - class SPE_GrW278_1_Barrel: SPE_MLE_27_31_Barrel { - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 20; pickupTime = 25; diff --git a/addons/compat_spe/compat_spe_csw/config.cpp b/addons/compat_spe/compat_spe_csw/config.cpp index 6ff669629bf..05627a8f6db 100644 --- a/addons/compat_spe/compat_spe_csw/config.cpp +++ b/addons/compat_spe/compat_spe_csw/config.cpp @@ -23,7 +23,22 @@ class CfgPatches { }; }; -#include "ACE_CSW_Groups.hpp" -// Todo: https://github.com/acemod/ACE3/pull/9292#discussion_r1327738181 -// #include "CfgVehicles.hpp" -// #include "CfgWeapons.hpp" +#include "CfgMagazines.hpp" +#include "CfgMagazineGroups.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" + +class CfgFunctions { + class SPE_WEAPONS_STATIC { + class SPE_Weapons_Static { + OVERWRITE_FUNC(alter_height); + OVERWRITE_FUNC(can_alter_height); + OVERWRITE_FUNC(can_assemble_weapon); + OVERWRITE_FUNC(can_disassemble_weapon); + OVERWRITE_FUNC(can_prepare_ammo); + OVERWRITE_FUNC(can_Reload); + OVERWRITE_FUNC(can_resupply_ammo); + OVERWRITE_FUNC(can_unload_ammo); + }; + }; +}; diff --git a/addons/compat_spe/compat_spe_csw/functions/fnc_alter_height.sqf b/addons/compat_spe/compat_spe_csw/functions/fnc_alter_height.sqf new file mode 100644 index 00000000000..0179c881537 --- /dev/null +++ b/addons/compat_spe/compat_spe_csw/functions/fnc_alter_height.sqf @@ -0,0 +1,107 @@ +#include "..\script_component.hpp" +/* + * Author: Kerc (SPE), original by www.3commandobrigade.com, edited by johnb43 to be made CSW compatible + * Alters the static weapon's height. + * + * Arguments: + * 0: Static Weapon + * 1: New static weapon (i.e. the weapon to replace the current weapon) + * 2: Use ACE's progress bar (default: false) + * + * Return Value: + * None + * + * Example: + * cursorObject call SPE_Weapons_Static_fnc_can_alter_height + * + * Public: No + */ + +private _unit = call SPE_fnc_findPlayer; + +if !(alive _unit) exitWith {}; + +params ["_weaponPlatform", "_newStaticWeapon", ["_playProgressBar", false, [false]]]; + +if (_playProgressBar) exitWith { + [10 * EGVAR(csw,progressBarTimeCoefficent), [_weaponPlatform, _newStaticWeapon], { + (_this select 0) params ["_weaponPlatform", "_newStaticWeapon"]; + + [_weaponPlatform, _newStaticWeapon] call SPE_Weapons_Static_fnc_alter_height; + }, {}, LSUBLSTRING(alteringHeight), { + //IGNORE_PRIVATE_WARNING ["_player"]; + (_this select 0) params ["_weaponPlatform"]; + + _player distance _weaponPlatform <= 4 && {[_weaponPlatform, true] call SPE_Weapons_Static_fnc_can_alter_height} + }] call EFUNC(common,progressBar); +}; + +private _dir = vectorDir _weaponPlatform; +private _pos = (getPosATL _weaponPlatform) vectorAdd [0, 0, 0.1]; // 10 cm above terrain surface + +// Save state +private _magazines = magazinesAmmoFull _weaponPlatform; +private _assemblyModeIndex = _weaponPlatform getVariable QEGVAR(csw,assemblyMode); + +// Delete weapon and create new one +deleteVehicle _weaponPlatform; + +[{ + params ["_unit", "_newStaticWeapon", "_magazines", "_pos", "_dir", "_assemblyModeIndex"]; + + private _weaponPlatform = createVehicle [_newStaticWeapon, _pos, [], 0, "CAN_COLLIDE"]; + + if (!isNil "_assemblyModeIndex") then { + // Don't empty the weapon of its existing mags + _weaponPlatform setVariable [QEGVAR(csw,assemblyMode), 0, true]; + + if (_assemblyModeIndex == 0) exitWith {}; + + // Reset variable to original after initVehicle has run + [{ + (_this select 0) setVariable [QEGVAR(csw,assemblyMode), _this select 1, true]; + }, [_weaponPlatform, _assemblyModeIndex], 1.5] call CBA_fnc_waitAndExecute; + }; + + _weaponPlatform disableCollisionWith _unit; + _weaponPlatform setVectorDir _dir; + + [{ + _this remoteExecCall ["enableCollisionWith", _this]; + }, [_weaponPlatform, _unit], 0.5] call CBA_fnc_waitAndExecute; + + // Restore state + // First remove magazines that were spawned in with new weapon + { + _weaponPlatform removeMagazineTurret [_x, [0]]; + } forEach (_weaponPlatform magazinesTurret [0]); + + // Remove weapon temporarily and readd it to instantly load previous magazine + private _weapon = (_weaponPlatform weaponsTurret [0]) param [0, ""]; + + if (_weapon != "") then { + _weaponPlatform removeWeaponTurret [_weapon, [0]]; + }; + + if (_magazines isEqualTo []) exitWith {}; + + // Find loaded magazine + private _loadedIndex = _magazines findIf {_x select 2}; + + // If there was a loaded magazine, add that one first + if (_loadedIndex != -1) then { + (_magazines deleteAt _loadedIndex) params ["_magClass", "_ammoCount"]; + _weaponPlatform addMagazineTurret [_magClass, [0], _ammoCount]; + }; + + _weaponPlatform addWeaponTurret [_weapon, [0]]; + + { + _x params ["_magClass", "_ammoCount", "_loaded"]; + + // In some instances the loaded magazine is listed twice, so we skip it. + if (!_loaded) then { + _weaponPlatform addMagazineTurret [_magClass, [0], _ammoCount]; + }; + } forEach _magazines; +}, [_unit, _newStaticWeapon, _magazines, _pos, _dir, _assemblyModeIndex]] call CBA_fnc_execNextFrame; diff --git a/addons/compat_spe/compat_spe_csw/functions/fnc_can_Reload.sqf b/addons/compat_spe/compat_spe_csw/functions/fnc_can_Reload.sqf new file mode 100644 index 00000000000..c8a666753a1 --- /dev/null +++ b/addons/compat_spe/compat_spe_csw/functions/fnc_can_Reload.sqf @@ -0,0 +1,42 @@ +#include "..\script_component.hpp" +/* + * Author: Kerc (SPE), edited by johnb43 to be made CSW compatible + * Checks if the prepped magazine for the static weapon can be loaded. + * + * Arguments: + * 0: Static Weapon + * 1: Default magazine to load (unused) (default: "") + * + * Return Value: + * If the player can load the selected ammo for the static weapon's + * + * Example: + * cursorObject call SPE_Weapons_Static_fnc_can_Reload + * + * Public: No + */ + +params ["_weaponPlatform"]; + +private _unit = call SPE_fnc_findPlayer; + +alive _unit && +{alive _weaponPlatform} && +{vehicle _unit in [_unit, _weaponPlatform]} && +{(magazines _weaponPlatform) isEqualTo []} && +{ + private _selectedMagazine = _unit getVariable ["SPE_Static_Weapon_Magazine", ""]; + + if (_selectedMagazine == "") exitWith { + false + }; + + _selectedMagazine = _selectedMagazine call EFUNC(common,getConfigName); + + if (_selectedMagazine == "") exitWith { + false + }; + + _selectedMagazine in compatibleMagazines ((_weaponPlatform weaponsTurret [0]) select 0) +} && +{CONDITION_NO_CSW(_weaponPlatform)} // CSW check diff --git a/addons/compat_spe/compat_spe_csw/functions/fnc_can_alter_height.sqf b/addons/compat_spe/compat_spe_csw/functions/fnc_can_alter_height.sqf new file mode 100644 index 00000000000..7c3f8c1f84b --- /dev/null +++ b/addons/compat_spe/compat_spe_csw/functions/fnc_can_alter_height.sqf @@ -0,0 +1,31 @@ +#include "..\script_component.hpp" +/* + * Author: Kerc (SPE), original by www.3commandobrigade.com, edited by johnb43 to be made CSW compatible + * Checks if the static weapon's height can be adjusted. + * + * Arguments: + * 0: Static Weapon + * 1: Check for ACE CSW (default: false) + * + * Return Value: + * If the player can alter the static weapon's height + * + * Example: + * cursorObject call SPE_Weapons_Static_fnc_can_alter_height + * + * Public: No + */ + +params ["_weaponPlatform", ["_checkForCSW", false, [false]]]; + +private _unit = call SPE_fnc_findPlayer; + +alive _unit && +{alive _weaponPlatform} && +{isNull objectParent _unit} && +{crew _weaponPlatform isEqualTo []} && +{!(_weaponPlatform lockedTurret [0])} && { + // CSW check + (!_checkForCSW && {CONDITION_NO_CSW(_weaponPlatform)}) || + {_checkForCSW && {!(CONDITION_NO_CSW(_weaponPlatform))}} +} diff --git a/addons/compat_spe/compat_spe_csw/functions/fnc_can_assemble_weapon.sqf b/addons/compat_spe/compat_spe_csw/functions/fnc_can_assemble_weapon.sqf new file mode 100644 index 00000000000..60911d49fe1 --- /dev/null +++ b/addons/compat_spe/compat_spe_csw/functions/fnc_can_assemble_weapon.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: Kerc (SPE), original by www.3commandobrigade.com, edited by johnb43 to be made CSW compatible + * Determines whether the player can assemble the static weapon. + * + * Arguments: + * 0: Tripod + * 1: Weapon + * + * Return Value: + * If the player can assemble the static weapon + * + * Example: + * cursorObject call SPE_Weapons_Static_fnc_can_assemble_weapon + * + * Public: No + */ + +params ["_tripod", "_weaponComponent"]; + +private _unit = call SPE_fnc_findPlayer; + +alive _unit && +{alive _tripod} && +{isNull objectParent _unit} && +{_weaponComponent in (weapons _unit)} && +{CONDITION_NO_CSW(_tripod)} // CSW check diff --git a/addons/compat_spe/compat_spe_csw/functions/fnc_can_disassemble_weapon.sqf b/addons/compat_spe/compat_spe_csw/functions/fnc_can_disassemble_weapon.sqf new file mode 100644 index 00000000000..66a54829537 --- /dev/null +++ b/addons/compat_spe/compat_spe_csw/functions/fnc_can_disassemble_weapon.sqf @@ -0,0 +1,29 @@ +#include "..\script_component.hpp" +/* + * Author: Kerc (SPE), original by www.3commandobrigade.com, edited by johnb43 to be made CSW compatible + * Checks if the static weapon can be disassembled. + * + * Arguments: + * 0: Static Weapon + * + * Return Value: + * If the player can disassemble the static weapon + * + * Example: + * cursorObject call SPE_Weapons_Static_fnc_can_Reload + * + * Public: No + */ + +params ["_weaponPlatform"]; + +private _unit = call SPE_fnc_findPlayer; + +alive _unit && +{alive _weaponPlatform} && +{isNull objectParent _unit} && +{crew _weaponPlatform isEqualTo []} && +{weaponDisassemblyEnabled _unit} && +{weaponDisassemblyEnabled _weaponPlatform} && +{!(_weaponPlatform lockedTurret [0])} && +{CONDITION_NO_CSW(_weaponPlatform)} // CSW check diff --git a/addons/compat_spe/compat_spe_csw/functions/fnc_can_prepare_ammo.sqf b/addons/compat_spe/compat_spe_csw/functions/fnc_can_prepare_ammo.sqf new file mode 100644 index 00000000000..e310b2a63cb --- /dev/null +++ b/addons/compat_spe/compat_spe_csw/functions/fnc_can_prepare_ammo.sqf @@ -0,0 +1,38 @@ +#include "..\script_component.hpp" +/* + * Author: ? (SPE), edited by johnb43 to be made CSW compatible + * Checks if the player can prepare the static weapon's ammo. + * + * Arguments: + * 0: Static Weapon + * 1: Magazine to load + * 2: If the magazine has been selected to be prepped for loading (default: false) + * + * Return Value: + * If the player can prepare the static weapon's ammo + * + * Example: + * cursorObject call SPE_Weapons_Static_fnc_can_prepare_ammo + * + * Public: No + */ + +params ["_weaponPlatform", "_ammo", ["_isSelected", false]]; + +private _unit = call SPE_fnc_findPlayer; + +alive _unit && +{alive _weaponPlatform} && +{vehicle _unit in [_unit, _weaponPlatform]} && +{ + private _defaultMags = getArray (configOf _weaponPlatform >> "Turrets" >> "MainTurret" >> "magazines"); + + if (({_x in _defaultMags} count (magazines _weaponPlatform)) > 1) exitWith { + false + }; + + private _selectedMagazine = _unit getVariable ["SPE_Static_Weapon_Magazine", ""]; + + _isSelected == (_selectedMagazine == _ammo) +} && +{CONDITION_NO_CSW(_weaponPlatform)} // CSW check diff --git a/addons/compat_spe/compat_spe_csw/functions/fnc_can_resupply_ammo.sqf b/addons/compat_spe/compat_spe_csw/functions/fnc_can_resupply_ammo.sqf new file mode 100644 index 00000000000..283c11d98d9 --- /dev/null +++ b/addons/compat_spe/compat_spe_csw/functions/fnc_can_resupply_ammo.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: Kerc (SPE), original by www.3commandobrigade.com, edited by johnb43 to be made CSW compatible + * Checks if resupply of ammo to a static weapon is available. + * + * Arguments: + * 0: Static Weapon + * 1: Default magazine to load (unused) (default: "") + * + * Return Value: + * If the player can load the static weapon's ammo + * + * Example: + * cursorObject call SPE_Weapons_Static_fnc_can_resupply_ammo + * + * Public: No + */ + +params ["_weaponPlatform"]; + +private _unit = call SPE_fnc_findPlayer; + +alive _unit && +{alive _weaponPlatform} && +{vehicle _unit in [_unit, _weaponPlatform]} && +{(_weaponPlatform magazinesTurret [[0], false]) isEqualTo []} && // Limit the reload capacity of a static weapon to 1 magazines +{CONDITION_NO_CSW(_weaponPlatform)} // CSW check diff --git a/addons/compat_spe/compat_spe_csw/functions/fnc_can_unload_ammo.sqf b/addons/compat_spe/compat_spe_csw/functions/fnc_can_unload_ammo.sqf new file mode 100644 index 00000000000..23384d29733 --- /dev/null +++ b/addons/compat_spe/compat_spe_csw/functions/fnc_can_unload_ammo.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: Kerc (SPE), original by www.3commandobrigade.com, edited by johnb43 to be made CSW compatible + * Checks if the player can unload a static weapon's magazines. + * + * Arguments: + * 0: Static Weapon + * + * Return Value: + * If the player can unload the static weapon's ammo + * + * Example: + * cursorObject call SPE_Weapons_Static_fnc_can_unload_ammo + * + * Public: No + */ + +params ["_weaponPlatform"]; + +private _unit = call SPE_fnc_findPlayer; + +alive _unit && +{alive _weaponPlatform} && +{_unit in _weaponPlatform || {isNull objectParent _unit && {(crew _weaponPlatform) isEqualTo []}}} && +{!(_weaponPlatform lockedTurret [0])} && +{(_weaponPlatform magazinesTurret [[0], false]) isNotEqualTo []} && +{CONDITION_NO_CSW(_weaponPlatform)} // CSW check diff --git a/addons/compat_spe/compat_spe_csw/script_component.hpp b/addons/compat_spe/compat_spe_csw/script_component.hpp index 1f7ace46a9e..8803d6fd261 100644 --- a/addons/compat_spe/compat_spe_csw/script_component.hpp +++ b/addons/compat_spe/compat_spe_csw/script_component.hpp @@ -1,3 +1,10 @@ #define SUBCOMPONENT csw #define SUBCOMPONENT_BEAUTIFIED Crew-Served Weapons #include "..\script_component.hpp" + +#define CONDITION_NO_CSW(var) (EGVAR(csw,ammoHandling) == 0) && {!([false, true, true, EGVAR(csw,defaultAssemblyMode)] select (var getVariable [ARR_2('EGVAR(csw,assemblyMode)',3)]))} + +#define OVERWRITE_FUNC(funcName)\ +class funcName {\ + file = QPATHTOF(DOUBLES(COMPONENT,SUBCOMPONENT)\functions\DOUBLES(fnc,funcName).sqf);\ +} diff --git a/addons/compat_spe/compat_spe_csw/stringtable.xml b/addons/compat_spe/compat_spe_csw/stringtable.xml new file mode 100644 index 00000000000..19bd37ea3c4 --- /dev/null +++ b/addons/compat_spe/compat_spe_csw/stringtable.xml @@ -0,0 +1,35 @@ + + + + + Altering Height... + 높이 변경 중... + 高さを変更・・・ + Cambiando Altura... + + + .30-06 50Rnd Belt (M2/Tracer) + .30-06구경 스프링필드 50발 들이 벨트 (M2 훈련용/예광탄) + .30-06 50Rnd Belt (M2/Tracer) + Cinta de .30-06 50Rnd (M2/Trazadora) + + + .30-06 100Rnd Belt (M2/Tracer) + .30-06구경 스프링필드 100발 들이 벨트 (M2 훈련용/예광탄) + .30-06 100Rnd Belt (M2/Tracer) + Cinta de .30-06 100Rnd (M2/Trazadora) + + + 7.92x57 50Rnd Gurttrommel (L.S./Tracer) + 7.92x57mm 50발 들이 벨트 (L.S. 훈련용/예광탄) + 7.92x57 50Rnd Gurttrommel (L.S./Tracer) + Tambor de 7.92x57 50Rnd (L.S./Trazadora) + + + 7.92x57 100Rnd Belt (L.S./Tracer) + 7.92x57mm 100발 들이 벨트 (L.S. 훈련용/예광탄) + 7.92x57 100Rnd Belt (L.S./Tracer) + Cinta de 7.92x57 100Rnd (L.S./Trazadora) + + + diff --git a/addons/compat_ws/compat_ws_realisticnames/stringtable.xml b/addons/compat_ws/compat_ws_realisticnames/stringtable.xml index 66c1791f9c8..df75c9bad8f 100644 --- a/addons/compat_ws/compat_ws_realisticnames/stringtable.xml +++ b/addons/compat_ws/compat_ws_realisticnames/stringtable.xml @@ -267,6 +267,7 @@ FN FAL OSW Fallschirmjäger FN FAL OSW Para FN FAL OSW Para + FN FAL OSW Paracaidista FN FAL OSW Para (Snake) @@ -275,6 +276,7 @@ FN FAL OSW Fallschirmjäger (Schlange) FN FAL OSW Para (Serpe) FN FAL OSW Para (Serpent) + FN FAL OSW Paracaidista (Serpiente) Vektor R4 @@ -477,6 +479,7 @@ GM6 Lynx (Schlange) GM6 Lynx (Serpe) GM6 Lynx (Serpent) + GM6 Lynx (Serpiente) RPG-32 (Sand) @@ -485,6 +488,7 @@ RPG-32 (Sand) RPG-32 (Sabbia) RPG-32 (Sable) + RPG-32 (Arena) ELCAN SpecterOS (Hex) @@ -493,6 +497,7 @@ ELCAN SpecterOS (Hex) ELCAN SpecterOS (Hex) ELCAN SpecterOS (Hex) + ELCAN SpecterOS (Hex) EOTech XPS3 (Snake) @@ -501,6 +506,7 @@ EOTech XPS3 (Schlange) EOTech XPS3 (Serpe) EOTech XPS3 (Serpent) + EOTech XPS3 (Serpiente) EOTech XPS3 SMG (Snake) @@ -509,6 +515,7 @@ EOTech XPS3 SMG (Schlange) EOTech XPS3 SMG (Serpe) EOTech XPS3 SMG (Serpent) + EOTech XPS3 SMG (Serpiente) Leupold Mark 4 HAMR (Arid) @@ -517,6 +524,7 @@ Leupold Mark 4 HAMR (Trocken) Leupold Mark 4 HAMR (Arido) Leupold Mark 4 HAMR (Aride) + Leupold Mark 4 HAMR (Árida) Leupold Mark 4 HAMR (Lush) @@ -525,6 +533,7 @@ Leupold Mark 4 HAMR (Grün) Leupold Mark 4 HAMR (Verdeggiante) Leupold Mark 4 HAMR (Vert) + Leupold Mark 4 HAMR (Exuberante) Leupold Mark 4 HAMR (Sand) @@ -533,6 +542,7 @@ Leupold Mark 4 HAMR (Sand) Leupold Mark 4 HAMR (Sabbia) Leupold Mark 4 HAMR (Sable) + Leupold Mark 4 HAMR (Arena) Leupold Mark 4 HAMR (Snake) @@ -541,6 +551,7 @@ Leupold Mark 4 HAMR (Schlange) Leupold Mark 4 HAMR (Serpe) Leupold Mark 4 HAMR (Serpent) + Leupold Mark 4 HAMR (Serpiente) Aimpoint Micro R-1 (High, Black) @@ -549,6 +560,7 @@ Aimpoint Micro R-1 (Hoch, Schwarz) Aimpoint Micro R-1 (Alto, Nero) Aimpoint Micro R-1 (Haut, Noir) + Aimpoint Micro R-1 (Alto, Negro) Aimpoint Micro R-1 (High, Khaki) @@ -557,6 +569,7 @@ Aimpoint Micro R-1 (Hoch, Khaki) Aimpoint Micro R-1 (Alto, Cachi) Aimpoint Micro R-1 (Haut, Kaki) + Aimpoint Micro R-1 (Alto, Caqui) Aimpoint Micro R-1 (High, Sand) @@ -565,6 +578,7 @@ Aimpoint Micro R-1 (Hoch, Sand) Aimpoint Micro R-1 (Alto, Sabbia) Aimpoint Micro R-1 (Haut, Sable) + Aimpoint Micro R-1 (Alto, Arena) Aimpoint Micro R-1 (High, Snake) @@ -573,6 +587,7 @@ Aimpoint Micro R-1 (Hoch, Schlange) Aimpoint Micro R-1 (Alto, Serpe) Aimpoint Micro R-1 (Haut, Serpent) + Aimpoint Micro R-1 (Alto, Serpiente) Aimpoint Micro R-1 (High, Arid) @@ -581,6 +596,7 @@ Aimpoint Micro R-1 (Hoch, Trocken) Aimpoint Micro R-1 (Alto, Arido) Aimpoint Micro R-1 (Hoch, Arid + Aimpoint Micro R-1 (Alto, Árido) Aimpoint Micro R-1 (High, Lush) @@ -589,6 +605,7 @@ Aimpoint Micro R-1 (Hoch, Grün) Aimpoint Micro R-1 (Alto, Verdeggiante) Aimpoint Micro R-1 (Haute, Vert) + Aimpoint Micro R-1 (Alto, Exuberante) Aimpoint Micro R-1 (High, Black/Sand) @@ -597,6 +614,7 @@ Aimpoint Micro R-1 (Hoch, Schwarz/Sand) Aimpoint Micro R-1 (Alto, Nero/Sabbia) Aimpoint Micro R-1 (Haut, Noir/Sable) + Aimpoint Micro R-1 (Alto, Negro/Arena) Aimpoint Micro R-1 (Low, Black) @@ -605,6 +623,7 @@ Aimpoint Micro R-1 (Tief, Schwarz) Aimpoint Micro R-1 (Basso, Nero) Aimpoint Micro R-1 (Bas, Noir) + Aimpoint Micro R-1 (Bajo, Negro) Aimpoint Micro R-1 (Low, Khaki) @@ -613,6 +632,7 @@ Aimpoint Micro R-1 (Tief, Khaki) Aimpoint Micro R-1 (Basso, Cachi) Aimpoint Micro R-1 (Bas, Kaki) + Aimpoint Micro R-1 (Bajo, Caqui) Aimpoint Micro R-1 (Low, Sand) @@ -621,6 +641,7 @@ Aimpoint Micro R-1 (Tief, Sand) Aimpoint Micro R-1 (Basso, Sabbia) Aimpoint Micro R-1 ( Bas, Sable ) + Aimpoint Micro R-1 (Bajo, Arena) Aimpoint Micro R-1 (Low, Snake) @@ -629,6 +650,7 @@ Aimpoint Micro R-1 (Tief, Schlange) Aimpoint Micro R-1 (Basso, Serpe) Aimpoint Micro R-1 (Bas, Serpent) + Aimpoint Micro R-1 (Bajo, Serpiente) Aimpoint Micro R-1 (Low, Arid) @@ -637,6 +659,7 @@ Aimpoint Micro R-1 (Tief, Trocken) Aimpoint Micro R-1 (Basso, Arido) Aimpoint Micro R-1 (Bas, Arid) + Aimpoint Micro R-1 (Bajo, Árido) Aimpoint Micro R-1 (Low, Lush) @@ -645,6 +668,7 @@ Aimpoint Micro R-1 (Tief, Grün) Aimpoint Micro R-1 (Basso, Verdeggiante) Aimpoint Micro R-1 (Bas, Vert) + Aimpoint Micro R-1 (Low, Lush) Burris XTR II (Snake) @@ -653,6 +677,7 @@ Burris XTR II (Schlange) Burris XTR II (Serpe) Burris XTR II (Serpent) + Burris XTR II (Serpiente) Badger IFV (ATGM) @@ -661,6 +686,7 @@ Badger IFV (PzAbw) Badger IFV (ATGM) Badger IFV (ATGM) + Badger IFV (ATGM) Badger IFV (Command) @@ -669,6 +695,7 @@ Badger IFV (Kommando) Badger IFV (Comando) Badger IFV (Commandement) + Badger IFV (Comandancia) Badger IFV (Mortar) @@ -677,6 +704,7 @@ Badger IFV (Mörser) Badger IFV (Mortaio) Badger IFV (mortier) + Badger IFV (Mortero) KamAZ (Zu-23-2) @@ -685,6 +713,7 @@ KamAZ (Zu-23-2) KamAZ (Zu-23-2) KamAZ (Zu-23-2) + KamAZ (Zu-23-2) KamAZ Cargo @@ -693,6 +722,7 @@ KamAZ Fracht KamAZ Carico KamAZ Cargo + KamAZ Carga KamAZ Repair @@ -701,6 +731,7 @@ KamAZ Instandsetzung KamAZ Riparazione KamAZ Réparation + KamAZ Reparaciones KamAZ Racing @@ -709,6 +740,7 @@ KamAZ Rennlaster KamAZ da corsa KamAZ de course + KamAZ Carreras KamAZ Ammo @@ -717,6 +749,7 @@ KamAZ Munition KamAZ Munizioni KamAZ Munitions + KamAZ Municiones KamAZ Flatbed @@ -725,6 +758,7 @@ KamAZ Flachbett KamAZ Pianale KamAZ Flatbed + KamAZ Flatbed AW101 Merlin @@ -733,6 +767,7 @@ AW101 Merlin AW101 Merlin AW101 Merlin + AW101 Merlin BM-2T Stalker (Bumerang-BM) @@ -741,22 +776,25 @@ BM-2T Stalker (Bumerang-BM) BM-2T Stalker (Bumerang-BM) BM-2T Stalker (Boomerang-BM) + BM-2T Stalker (Bumerang-BM) Otokar ARMA (HMG) オトカ アルマ (HMG) - 오토카르 아르마 APC (중기관총) + 오토카 아르마 APC (중기관총) Otokar ARMA (HMG) Otokar ARMA (HMG) Otokar ARMA (HMG) + Otokar ARMA (HMG) Otokar ARMA (Unarmed) オトカ アルマ (非武装) - 오토카르 아르마 APC (비무장) + 오토카 아르마 APC (비무장) Otokar ARMA (Unbewaffnet) Otokar ARMA (Disarmato) Otokar ARMA (non armé) + Otokar ARMA (Desarmado) Ka-60 Kasatka (UP) @@ -765,6 +803,7 @@ Ka-60 Kasatka (UP) Ka-60 Kasatka (UP) Ka-60 Kasatka (UP) + Ka-60 Kasatka (UP) Ka-60 Kasatka (UP, Unarmed) @@ -773,6 +812,7 @@ Ka-60 Kasatka (UP, Unbewaffnet) Ka-60 Kasatka (UP, Disarmato) Ka-60 Kasatka (UP, non armé) + Ka-60 Kasatka (UP, Desarmado) diff --git a/addons/concertina_wire/functions/fnc_deploy.sqf b/addons/concertina_wire/functions/fnc_deploy.sqf index c915109e1b0..b1699ffc857 100644 --- a/addons/concertina_wire/functions/fnc_deploy.sqf +++ b/addons/concertina_wire/functions/fnc_deploy.sqf @@ -48,7 +48,7 @@ GVAR(deployPFH) = [{ private _anim = 0 max (1 - (_range / 12)); if (!(alive _unit) || _range >= 12 || (_unit getVariable [QGVAR(wireDeployed), false])) exitWith { - private _wire = "ACE_ConcertinaWire" createvehicle [0, 0, 0]; + private _wire = "ACE_ConcertinaWire" createVehicle [0, 0, 0]; { _wire animate [_x, _anim]; } forEach WIRE_FAST; diff --git a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf index 86aac9e8bf5..d90d3931dab 100644 --- a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf +++ b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf @@ -31,7 +31,7 @@ params ["_wire"]; private _dir = getDir _wire; private _pos = getPosASL _wire; - private _wirecoil = "ACE_ConcertinaWireCoil" createvehicle [0, 0, 0]; + private _wirecoil = "ACE_ConcertinaWireCoil" createVehicle [0, 0, 0]; deleteVehicle _wire; diff --git a/addons/cookoff/functions/fnc_cookOffLocal.sqf b/addons/cookoff/functions/fnc_cookOffLocal.sqf index cbd160bba1d..4c61a4e5a63 100644 --- a/addons/cookoff/functions/fnc_cookOffLocal.sqf +++ b/addons/cookoff/functions/fnc_cookOffLocal.sqf @@ -7,7 +7,7 @@ * 0: Vehicle * 1: Spawn fire jet * 2: Spawn fire ring - * 3: What selection fire will originate from + * 3: What selection fire will originate from * 4: Cookoff intensity value * 5: Start time * 6: Duration of effect (max 20 seconds) @@ -127,12 +127,13 @@ if (isServer) then { if (_ring) then { private _ringOrigin = (_vehicle selectionPosition _fireSelection) vectorAdd [-0.1 + random 0.2, -0.1 + random 0.2, -1]; + private _dir = 20 * (_factor / 2); drop [ - ["\A3\data_f\ParticleEffects\Universal\Universal",16,2,32], + ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], "", "Billboard", 1, (0.1 + random 0.2) * _factor, _ringOrigin, - [0, 20 * (_factor / 2), 0], + [0, _dir, 0], 0, 10, 7.9, 0.075, [1.25 * _factor, FLAME_SIZE * _factor], [[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], @@ -142,7 +143,7 @@ if (isServer) then { ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], "", "Billboard", 1, (0.1 + random 0.2) * _factor, _ringOrigin, - [0, -20 * (_factor / 2), 0], + [0, -_dir, 0], 0, 10, 7.9, 0.075, [1.25 * _factor, FLAME_SIZE * _factor], [[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], @@ -152,7 +153,7 @@ if (isServer) then { ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], "", "Billboard", 1, (0.1 + random 0.2) * _factor, _ringOrigin, - [20 * (_factor / 2), 0, 0], + [_dir, 0, 0], 0, 10, 7.9, 0.075, [1.25 * _factor, FLAME_SIZE * _factor], [[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], @@ -161,15 +162,14 @@ if (isServer) then { drop [ ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], "", "Billboard", 1, (0.1 + random 0.2) * _factor, - [-0.1 + random 0.2, -0.1 + random 0.2, -1], - [-20 * (_factor / 2), 0, 0], + _ringOrigin, + [-_dir, 0, 0], 0, 10, 7.9, 0.075, [1.25 * _factor, FLAME_SIZE * _factor], [[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], [2 + random 1], 1, 0, "", "", _vehicle ]; - private _dir = 20 * (_factor / 2); drop [ ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], "", "Billboard", 1, (0.1 + random 0.2) * _factor, @@ -181,21 +181,19 @@ if (isServer) then { [2 + random 1], 1, 0, "", "", _vehicle ]; - _dir = -20 * (_factor / 2); drop [ ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], "", "Billboard", 1, (0.1 + (random 0.2)) * _factor, _ringOrigin, - [_dir, _dir, 0], + [-_dir, -_dir, 0], 0, 10, 7.9, 0.075, [1.25 * _factor, FLAME_SIZE * _factor], [[1, 1, 1, -2],[1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], [2 + random 1], 1, 0, "", "", _vehicle ]; - _dir = 20 * (_factor / 2); drop [ - ["\A3\data_f\ParticleEffects\Universal\Universal",16,2,32], + ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], "", "Billboard", 1, (0.1 + (random 0.2)) * _factor, _ringOrigin, [_dir, -_dir, 0], @@ -205,7 +203,6 @@ if (isServer) then { [2 + random 1], 1, 0, "", "", _vehicle ]; - _dir = 20 * (_factor / 2); drop [ ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], "", "Billboard", 1, (0.1 + random 0.2) * _factor, diff --git a/addons/cookoff/functions/fnc_cookOffServer.sqf b/addons/cookoff/functions/fnc_cookOffServer.sqf index 05111d7e694..d1e5347be5e 100644 --- a/addons/cookoff/functions/fnc_cookOffServer.sqf +++ b/addons/cookoff/functions/fnc_cookOffServer.sqf @@ -12,7 +12,7 @@ * 4: Delay between smoke and fire enabled (default: true) * 5: Ammo detonation chance (default: 0) * 6: Detonate after cook-off (default: false) - * 7: Selection for fire source (default: "") + * 7: Selection for fire source (default: "") * 8: Can spawn fire ring (default: true) * 9: Can spawn fire jet (default: true) * 10: Maximum intensity (default: MAX_COOKOFF_INTENSITY) @@ -199,4 +199,4 @@ if (_delayBetweenSmokeAndFire) then { }, [_vehicle, _selections, _ammoDetonationChance, _detonateAfterCookoff, _source, _instigator, _fireSelection, _canRing, _canJet, _smokeJipID, _fireJipID], _delay] call CBA_fnc_waitAndExecute; // API -[QGVAR(cookoff), [_vehicle, _intensity, _instigator, _smokeDelayEnabled, _ammoDetonationChance, _detonateAfterCookoff, _fireSelection, _canRing, _maxIntensity, _canJet]] call CBA_fnc_globalEvent; +[QGVAR(cookoff), [_vehicle, _intensity, _instigator, _delayBetweenSmokeAndFire, _ammoDetonationChance, _detonateAfterCookoff, _fireSelection, _canRing, _maxIntensity, _canJet]] call CBA_fnc_globalEvent; diff --git a/addons/cookoff/functions/fnc_engineFireLocal.sqf b/addons/cookoff/functions/fnc_engineFireLocal.sqf index afd6827d6b1..5960a518ce7 100644 --- a/addons/cookoff/functions/fnc_engineFireLocal.sqf +++ b/addons/cookoff/functions/fnc_engineFireLocal.sqf @@ -27,7 +27,11 @@ if (hasInterface) then { private _hitPoints = getAllHitPointsDamage _vehicle; // Get hitpoint for engine - private _index = (_hitPoints select 0) findIf {_x == "hitengine"}; + private _index = if (_hitPoints isNotEqualTo []) then { + (_hitPoints select 0) findIf {_x == "hitengine"} + } else { + -1 + }; // Get corresponding selection private _position = if (_index != -1) then { diff --git a/addons/cookoff/stringtable.xml b/addons/cookoff/stringtable.xml index 838b3490bba..5cfd4d738c4 100644 --- a/addons/cookoff/stringtable.xml +++ b/addons/cookoff/stringtable.xml @@ -24,6 +24,7 @@ Abilita incendio dei veicoli Aktiviert Fahrzeug Munitionsbrand Permettre l'incendie du véhicule + Habilitar incendio en vehículos a causa de la detonación inducida por calor Enables vehicle cook-off fire effects.\nThis doesn't include ammunition detonations. @@ -33,6 +34,7 @@ Abilita effetti di incendio del veicolo dovuto all'esplosione delle munizioni.\nQuesto non include gli effetti di esplosione. Aktiviert Fahrzeug Brandeffekte durch Durchzündung.\nExplosionseffekte sind nicht mit einbegriffen. Permet d'obtenir des effets de feu de véhicule à partir de munitions qui explosent.\nCela n'inclut pas les effets d'explosion. + Habilita los efectos del incendio en vehículos por la detonación inducida por calor.\nEsto no incluye las detonaciones de munición. Vehicle cook-off fire duration multiplier @@ -42,6 +44,7 @@ Coefficiente di durata incendio dei veicoli Fahrzeugbrand Dauer-Multiplikator Coefficient de durée d'incendie du véhicule + Multiplicador de la duración del incendio en vehículos por la detonación inducida por calor Multiplier for how long vehicle cook-off fire lasts.\nSetting to 0 will disable vehicle cook-off fire. @@ -51,6 +54,7 @@ Coefficiente di durata degli incendi dei veicoli.\nImpostarlo su 0 disabilita incendi dei veicoli. Multiplikator der Fahrzeugbrand Dauer.\nIhn auf 0 zu setzen wird Munitionsbrände deaktivieren. Coefficient de durée des feux de véhicules.\nLa valeur 0 désactive les feux de véhicules. + Multiplicador de la duración del incendio en vehículos por la detonación inducida por calor.\nEstablecerlo a 0 deshabilita el incendio a causa de la detonación inducida por calor. Vehicle cook-off fire probability multiplier @@ -60,15 +64,17 @@ Probabilità di incendio dei veicoli Fahrzeug Munitionsbrand Wahrscheinlichkeit-Multiplikator Probabilité d'incendies de véhicules + Multiplicador de la probabilidad de incendio a causa de la detonación inducida por calor - Multiplier for vehicle cook-off fire probability. Higher value results in higher cook-off probability.\nSetting to 0 will disable vehicle cook-off fire. + Multiplier for vehicle cook-off fire probability. Higher value results in higher cook-off fire probability.\nSetting to 0 will disable vehicle cook-off fire. 車両の誘爆火災がどのくらいの可能性で発生するかの倍率。高い数値は高い誘爆の可能性につながります。\n0に設定すると車両の誘爆火災が無効化されます。 Увел. вероятности возникновения возгорания техники. Большое значение указывает на высокую вероятность детонации. \nУстановка значения 0 предотвращает возгорание техники. 차량 유폭 화재 확률에 대한 계수입니다. 값이 높을 수록 유폭 확률이 높아집니다.\n0으로 설정하면 차량 유폭 화재가 비활성화됩니다. Coefficiente di probabilità degli incendi dei veicoli.\nValori maggiori aumentano la probabilità di incendi.\nImpostarlo su 0 disabilita incendi dei veicoli. Multiplikator der Fahrzeugbrand Wahrscheinlichkeit.\nHöhere Werte erhöhen die Wahrscheinlichkeit.\nEin Null-Wert wird Munitionsbrände deaktivieren. Coefficient de probabilité des incendies de véhicules.\nLes valeurs élevées augmentent la probabilité des incendies.\nLa valeur 0 désactive les incendies de véhicules. + Multiplicador de la probabilidad de incendio a causa de la detonación inducida por calor. Valores más altos resultan en mayor probabilidad de incendio a causa de la detonación inducida por calor.\nEstablecerlo a 0 deshabilita el incendio a causa de la detonación inducida por calor. Destroy vehicles after cook-off @@ -103,6 +109,7 @@ Abilita esplosioni delle munizioni dei veicoli Aktiviert Fahrzeug Munitionsdurchzündung Permet l'explosion des munitions des véhicules + Habilitar detonación inducida por calor de la munición del vehículo Enables cooking off of vehicle ammunition. Fires ammunition projectiles while vehicle has ammunition remaining.\nThis doesn't include fire effects. @@ -112,6 +119,7 @@ Abilita l'esplosione delle munizioni dei veicoli. Spara via pezzi di munizioni se il veicolo ha ancora munizioni rimanenti.\nNon include gli effetti di fuoco. Aktiviert Durchzündung von Fahrzeugmunition. Schleudert Munitionsfragmente umher wenn das Fahrzeug noch Munition an Bord hat.\nBrandeffekte sind nicht mit einbegriffen. Permet l'explosion des munitions du véhicule. Tire des morceaux de munitions si le véhicule a encore des munitions restantes.\nIl n'y a pas d'effets de feu. + Habilita la detonación inducida por calor de la munición del vehículo. Dispara la munición del vehículo mientras el vehículo disponga de munición restante.\nEsto no incluye los efectos a causa de incendio. Enable ammo box cook-off @@ -136,6 +144,7 @@ Abilita esplosioni delle casse di munizioni.\nNon include effetti di fuoco. Aktiviert Munitionskisten Durchzündung.\nBrandeffekte sind nicht mit einbegriffen. Permet l'explosion des caisses de munitions.\nN'inclut pas les effets de feu. + Habilita la detonación inducida por calor de las cajas de munición.\nEsto no incluye los efectos a causa de incendio. Ammo cook-off duration multiplier @@ -145,6 +154,7 @@ Coefficiente di durata esplisioni di munizioni Fahrzeug Munitionsdurchzündung Dauer-Multiplikator Coefficient de durée d'explosion des munitions + Multiplicador de la duración de la detonación inducida por calor de la munición Multiplier for how long ammunition cook-off lasts, for both vehicles and ammo boxes.\nSetting to 0 will disable ammo cook-off for both vehicles and ammo boxes. @@ -154,6 +164,7 @@ Coefficiente della durata di esplosioni delle munizioni, sia per veicoli che casse.\nImpostarlo su 0 disabilita esplosioni di veicoli e casse. Multiplikator der Munitionsdurchzündungs-Dauer, gilt für Fahrzeuge und Munitionskisten.\nIhn auf 0 zu setzen wird Durchzünden deaktivieren. Coefficient de durée d'explosion des munitions pour les véhicules et les caisses.\nLa valeur 0 désactive les explosions des véhicules et des caisses. + Multiplicador de la duración de la detonación inducida por calor de la munición, tanto para los vehículos como para las cajas de munición.\nEstablecerlo a 0 deshabilita la detonación inducida por calor tanto para los vehículos como para las cajas de munición. Enable ammo removal during cook-off @@ -175,6 +186,7 @@ Все боеприпасы уничтожаются путем подрыва. 유폭 중 모든 탄약을 제거합니다. Rimuovi le munizioni dal veicolo durante le esplosioni. + Elimina la munición cuando se produce la detonación inducida por calor. diff --git a/addons/csw/XEH_postInit.sqf b/addons/csw/XEH_postInit.sqf index 87196f33772..419e7013809 100644 --- a/addons/csw/XEH_postInit.sqf +++ b/addons/csw/XEH_postInit.sqf @@ -8,18 +8,32 @@ GVAR(vehicleMagCache) = createHashMap; // needs a small delay for network syncing, or we end up with duplicate mags with ammo handling [LINKFUNC(initVehicle), _this, 1] call CBA_fnc_waitAndExecute; }, true, [], true] call CBA_fnc_addClassEventHandler; - - GVAR(quickmountEnabled) = ( - missionNamespace getVariable [QEGVAR(quickmount,enabled), false] && - {(missionNamespace getVariable [QEGVAR(quickmount,enableMenu), -1]) in [1,3]} - ); }] call CBA_fnc_addEventHandler; +// Also triggered at mission start ["CBA_SettingChanged", { GVAR(quickmountEnabled) = ( missionNamespace getVariable [QEGVAR(quickmount,enabled), false] && {(missionNamespace getVariable [QEGVAR(quickmount,enableMenu), -1]) in [1,3]} ); + + // Do not allow no ammo handling when advanced assembly is enabled + // Reason: When using advanced assembly, the amount of ammo is not stored anywhere, so when you reassemble a static, it will spawn full ammo + if (GVAR(defaultAssemblyMode) && GVAR(ammoHandling) == 0) then { + if (isServer) then { + [QGVAR(ammoHandling), 2, 2, "server"] call CBA_settings_fnc_set; + }; + + // Notify everyone about change + [QEGVAR(common,displayTextStructured), [composeText [ + lineBreak, + parseText format [ + "%1", format ["%1 requires %2 to be set higher than 0.", QGVAR(defaultAssemblyMode), QGVAR(ammoHandling)] + ], + lineBreak, + parseText format ["%1", "No mission restart is required."] + ], 4]] call CBA_fnc_localEvent; + }; }] call CBA_fnc_addEventHandler; // Event handlers: diff --git a/addons/csw/dev/checkStaticWeapons.sqf b/addons/csw/dev/checkStaticWeapons.sqf index 137dc953341..1d798eb9f3e 100644 --- a/addons/csw/dev/checkStaticWeapons.sqf +++ b/addons/csw/dev/checkStaticWeapons.sqf @@ -68,7 +68,6 @@ private _logAll = false; // logs all possible weapon magazines (even if not used } forEach _staticWeaponConfigs; { - //IGNORE_PRIVATE_WARNING ["_x", "_y"]; INFO_2("[%1] has no carry variant - Used in %2",_x,_y); } forEach _hash; diff --git a/addons/csw/functions/fnc_ai_handleFired.sqf b/addons/csw/functions/fnc_ai_handleFired.sqf index 6f7a6452579..4a6615f4043 100644 --- a/addons/csw/functions/fnc_ai_handleFired.sqf +++ b/addons/csw/functions/fnc_ai_handleFired.sqf @@ -12,6 +12,8 @@ * Public: No */ +if (GVAR(ammoHandling) != 2) exitWith {}; + params ["_vehicle", "_weapon", "", "", "", "_magazine", "", "_gunner"]; TRACE_4("firedEH:",_vehicle,_weapon,_magazine,_gunner); diff --git a/addons/csw/functions/fnc_ai_handleGetIn.sqf b/addons/csw/functions/fnc_ai_handleGetIn.sqf index 14b4453f530..bbbddaf537f 100644 --- a/addons/csw/functions/fnc_ai_handleGetIn.sqf +++ b/addons/csw/functions/fnc_ai_handleGetIn.sqf @@ -12,6 +12,8 @@ * Public: No */ +if (GVAR(ammoHandling) != 2) exitWith {}; + params ["_vehicle", "", "_gunner"]; TRACE_2("getInEH:",_vehicle,_gunner); diff --git a/addons/csw/functions/fnc_assemble_canDeployWeapon.sqf b/addons/csw/functions/fnc_assemble_canDeployWeapon.sqf index 6dd58fe4fba..12d00ca44e9 100644 --- a/addons/csw/functions/fnc_assemble_canDeployWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_canDeployWeapon.sqf @@ -20,4 +20,7 @@ params ["_target", "_player"]; // If the current launcher has a config-value that defines the tripod, it is a CSW (alive _target) && -{(getText (configFile >> "CfgWeapons" >> secondaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> typeOf _target)) != ""} +{ + (getText (configFile >> "CfgWeapons" >> secondaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> typeOf _target)) != "" || + {(getText (configFile >> "CfgWeapons" >> primaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> typeOf _target)) != ""} +} diff --git a/addons/csw/functions/fnc_assemble_deployWeapon.sqf b/addons/csw/functions/fnc_assemble_deployWeapon.sqf index 22ad49aef29..a0cdc102ca8 100644 --- a/addons/csw/functions/fnc_assemble_deployWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_deployWeapon.sqf @@ -21,8 +21,19 @@ [{ params ["_tripod", "_player"]; + private _tripodClassname = typeOf _tripod; + private _assembledClassname = getText (configFile >> "CfgWeapons" >> secondaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> _tripodClassname); + private _index = 1; + + if (_assembledClassname == "") then { + _assembledClassname = getText (configFile >> "CfgWeapons" >> primaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> _tripodClassname); + _index = 0; + }; + + if (!isClass (configFile >> "CfgVehicles" >> _assembledClassname)) exitWith {ERROR_1("bad static classname [%1]",_assembledClassname);}; + // Save magazines and attachments (handle loaded launchers which can become csw like CUP Metis) - private _carryWeaponInfo = (getUnitLoadout _player) select 1; + private _carryWeaponInfo = (getUnitLoadout _player) select _index; private _carryWeaponClassname = _carryWeaponInfo deleteAt 0; // Remove empty entries @@ -30,21 +41,15 @@ TRACE_3("assemble_deployWeapon_carryWeaponClassname",_tripod,_player,_carryWeaponClassname); - private _tripodClassname = typeOf _tripod; - private _weaponConfig = configfile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON); - private _assembledClassname = getText (_weaponConfig >> "assembleTo" >> _tripodClassname); - - if (!isClass (configFile >> "CfgVehicles" >> _assembledClassname)) exitWith {ERROR_1("bad static classname [%1]",_assembledClassname);}; - _player removeWeaponGlobal _carryWeaponClassname; - private _deployTime = getNumber (_weaponConfig >> "deployTime"); + private _deployTime = getNumber (configFile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON) >> "deployTime"); TRACE_4("",_carryWeaponClassname,_tripodClassname,_assembledClassname,_deployTime); private _onFinish = { params ["_args"]; - _args params ["_tripod", "_player", "_assembledClassname", "", "_carryWeaponInfo"]; + _args params ["_tripod", "_player", "_assembledClassname", "_tripodClassname", "_carryWeaponClassname", "_carryWeaponInfo"]; TRACE_3("deployWeapon finish",_tripod,_player,_assembledClassname); private _secondaryWeaponMagazines = _tripod getVariable [QGVAR(secondaryWeaponMagazines), []]; @@ -56,10 +61,11 @@ _tripodPos set [2, (_tripodPos select 2) + 0.1]; // Delay a frame so tripod has a chance to be deleted [{ - params ["_assembledClassname", "_tripodDir", "_tripodPos", "_player", "_carryWeaponInfo", "_secondaryWeaponMagazines"]; + params ["_assembledClassname", "_componentClasses", "_tripodDir", "_tripodPos", "_player", "_carryWeaponInfo", "_secondaryWeaponMagazines"]; private _csw = createVehicle [_assembledClassname, [0, 0, 0], [], 0, "NONE"]; // Assembly mode: [0=disabled, 1=enabled, 2=enabled&unload, 3=default] _csw setVariable [QGVAR(assemblyMode), 2, true]; // Explicitly set advanced assembly mode + unload, and broadcast + _csw setVariable [QGVAR(componentClasses), _componentClasses, true]; { // Magazines @@ -86,12 +92,12 @@ }; [QGVAR(deployWeaponSucceeded), [_csw]] call CBA_fnc_localEvent; TRACE_2("csw placed",_csw,_assembledClassname); - }, [_assembledClassname, _tripodDir, _tripodPos, _player, _carryWeaponInfo, _secondaryWeaponMagazines]] call CBA_fnc_execNextFrame; + }, [_assembledClassname, [_tripodClassname, _carryWeaponClassname], _tripodDir, _tripodPos, _player, _carryWeaponInfo, _secondaryWeaponMagazines]] call CBA_fnc_execNextFrame; }; private _onFailure = { params ["_args"]; - _args params ["", "_player", "", "_carryWeaponClassname", "_carryWeaponInfo"]; + _args params ["", "_player", "", "", "_carryWeaponClassname", "_carryWeaponInfo"]; TRACE_2("deployWeapon failure",_player,_carryWeaponClassname); // Add weapon back @@ -110,5 +116,5 @@ alive _tripod }; - [TIME_PROGRESSBAR(_deployTime), [_tripod, _player, _assembledClassname, _carryWeaponClassname, _carryWeaponInfo], _onFinish, _onFailure, LLSTRING(AssembleCSW_progressBar), _condition] call EFUNC(common,progressBar); + [TIME_PROGRESSBAR(_deployTime), [_tripod, _player, _assembledClassname, _tripodClassname, _carryWeaponClassname, _carryWeaponInfo], _onFinish, _onFailure, LLSTRING(AssembleCSW_progressBar), _condition] call EFUNC(common,progressBar); }, _this] call CBA_fnc_execNextFrame; diff --git a/addons/csw/functions/fnc_assemble_deployWeaponModifier.sqf b/addons/csw/functions/fnc_assemble_deployWeaponModifier.sqf index f98978195d9..f3f1fd7bfcb 100644 --- a/addons/csw/functions/fnc_assemble_deployWeaponModifier.sqf +++ b/addons/csw/functions/fnc_assemble_deployWeaponModifier.sqf @@ -20,9 +20,14 @@ params ["_target", "_player", "", "_actionData"]; -private _carryWeaponClassname = secondaryWeapon _player; -private _assembleTo = getText (configFile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON) >> "assembleTo" >> typeOf _target); -private _icon = getText (configFile >> "CfgVehicles" >> _assembleTo >> "picture"); -TRACE_2("",_assembleTo,_icon); +private _tripodClassname = typeOf _target; +private _assembledClassname = getText (configFile >> "CfgWeapons" >> secondaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> _tripodClassname); + +if (_assembledClassname == "") then { + _assembledClassname = getText (configFile >> "CfgWeapons" >> primaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> _tripodClassname); +}; + +private _icon = getText (configFile >> "CfgVehicles" >> _assembledClassname >> "picture"); +TRACE_2("",_assembledClassname,_icon); _actionData set [2, _icon]; diff --git a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf index 65dc5fa7403..023143710b6 100644 --- a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf @@ -21,14 +21,18 @@ TRACE_2("assemble_pickupWeapon",_vehicle,_player); private _weaponConfig = configOf _vehicle >> QUOTE(ADDON); - private _carryWeaponClassname = getText (_weaponConfig >> "disassembleWeapon"); + private _componentClasses = _vehicle getVariable QGVAR(componentClasses); + + (if (!isNil "_componentClasses") then { + _componentClasses + } else { + [getText (_weaponConfig >> "disassembleTurret"), getText (_weaponConfig >> "disassembleWeapon")] + }) params ["_turretClassname", "_carryWeaponClassname"]; if (!isClass (configFile >> "CfgWeapons" >> _carryWeaponClassname)) exitWith { ERROR_1("bad weapon classname [%1]",_carryWeaponClassname); }; - private _turretClassname = getText (_weaponConfig >> "disassembleTurret"); - // Turret classname can equal nothing if the deploy bag is the "whole" weapon. e.g Kornet, Metis, other ATGMs if ((_turretClassname != "") && {!isClass (configFile >> "CfgVehicles" >> _turretClassname)}) exitWith { ERROR_1("bad turret classname [%1]",_turretClassname); @@ -58,7 +62,9 @@ if (_carryWeaponMag isEqualTo [] && {_carryMag in _carryWeaponMags}) then { TRACE_3("Adding mag to secondary weapon",_xMag,_xAmmo,_carryMag); _carryWeaponMag = [_carryMag, _xAmmo]; - DEC(_xAmmo); + + // Do not return this magazine, as it will be put into the weapon + continue; }; if ((_xAmmo > 0) && {_carryMag != ""}) then { TRACE_2("Removing ammo",_xMag,_carryMag); @@ -82,8 +88,19 @@ [{ params ["_player", "_weaponPos", "_carryWeaponClassname", "_carryWeaponMag", "_turretClassname"]; + private _carryWeaponType = _carryWeaponClassname call EFUNC(common,getWeaponType); + + if !(_carryWeaponType in [1, 2]) exitWith { + ERROR_1("bad carry weapon type [%1]",_carryWeaponClassname); + + if (_carryWeaponMag isEqualTo []) exitWith {}; + + // Return the ammo, so it doesn't vanish + [_player, _carryWeaponMag select 0, _carryWeaponMag select 1] call FUNC(reload_handleReturnAmmo); + }; + // Give the weapon to the player if possible - if ((alive _player) && {(secondaryWeapon _player) == ""}) exitWith { + if ((alive _player) && {([primaryWeapon _player, secondaryWeapon _player] select (_carryWeaponType - 1)) == ""}) exitWith { [_player, _carryWeaponClassname] call CBA_fnc_addWeaponWithoutItems; if (_carryWeaponMag isNotEqualTo []) then { diff --git a/addons/csw/functions/fnc_initVehicle.sqf b/addons/csw/functions/fnc_initVehicle.sqf index bde31b41d06..3b8d2524ef8 100644 --- a/addons/csw/functions/fnc_initVehicle.sqf +++ b/addons/csw/functions/fnc_initVehicle.sqf @@ -76,7 +76,7 @@ if (hasInterface && {!(_typeOf in GVAR(initializedStaticTypes))}) then { private _ammoActionPath = []; private _magazineLocation = getText (_configOf >> QUOTE(ADDON) >> "magazineLocation"); - private _condition = { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; + private _condition = { // If magazine handling is enabled or weapon assembly/disassembly is enabled we enable ammo handling if ((GVAR(ammoHandling) == 0) && {!([false, true, true, GVAR(defaultAssemblyMode)] select (_target getVariable [QGVAR(assemblyMode), 3]))}) exitWith { false }; [_player, _target, ["isNotSwimming", "isNotSitting"]] call EFUNC(common,canInteractWith) @@ -97,9 +97,17 @@ if (hasInterface && {!(_typeOf in GVAR(initializedStaticTypes))}) then { }; if (["ace_reload"] call EFUNC(common,isModLoaded)) then { - // move reload's check ammo action to the ammo handling point (remove and re-add) [_typeOf, 0, ["ACE_MainActions", QEGVAR(reload,CheckAmmo)]] call EFUNC(interact_menu,removeActionFromClass); - private _checkAmmoAction = [QGVAR(checkAmmo), LELSTRING(reload,checkAmmo), "", EFUNC(reload,checkAmmo), EFUNC(reload,canCheckAmmo)] call EFUNC(interact_menu,createAction); + + // Replace existing check ammo interaction with one that takes into account if the magazine actions are available + private _checkAmmoAction = [QEGVAR(reload,CheckAmmo), LELSTRING(reload,checkAmmo), "", EFUNC(reload,checkAmmo), { + if !((GVAR(ammoHandling) == 0) && {!([false, true, true, GVAR(defaultAssemblyMode)] select (_target getVariable [QGVAR(assemblyMode), 3]))}) exitWith { false }; + _this call EFUNC(reload,canCheckAmmo) + }] call EFUNC(interact_menu,createAction); + [_typeOf, 0, ["ACE_MainActions"], _checkAmmoAction] call EFUNC(interact_menu,addActionToClass); + + // Add another check ammo action to the ammo handling point + _checkAmmoAction = [QGVAR(checkAmmo), LELSTRING(reload,checkAmmo), "", EFUNC(reload,checkAmmo), EFUNC(reload,canCheckAmmo)] call EFUNC(interact_menu,createAction); [_typeOf, 0, _ammoActionPath, _checkAmmoAction] call EFUNC(interact_menu,addActionToClass); }; }; diff --git a/addons/csw/functions/fnc_reload_getLoadableMagazines.sqf b/addons/csw/functions/fnc_reload_getLoadableMagazines.sqf index 861f70350d1..aa49d0284b5 100644 --- a/addons/csw/functions/fnc_reload_getLoadableMagazines.sqf +++ b/addons/csw/functions/fnc_reload_getLoadableMagazines.sqf @@ -59,7 +59,6 @@ private _return = []; { private _weapon = _x; { - //IGNORE_PRIVATE_WARNING ["_x", "_y"]; private _carryMag = _x; private _magSource = _y; private _carryGroup = _magGroupsConfig >> _carryMag; diff --git a/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf b/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf index 3682651aac6..24d21534ee2 100644 --- a/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf +++ b/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf @@ -37,7 +37,7 @@ private _bestMagCount = -1; _bestMagCount = _xAmmo; }; }; - } forEach (getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines")); + } forEach (compatibleMagazines _weapon); } forEach (_vehicle weaponsTurret _turret); TRACE_3("best fit",_desiredAmmo,_bestMag,_bestMagCount); diff --git a/addons/csw/functions/fnc_reload_handleAddTurretMag.sqf b/addons/csw/functions/fnc_reload_handleAddTurretMag.sqf index 389ae699a4a..881398cb95b 100644 --- a/addons/csw/functions/fnc_reload_handleAddTurretMag.sqf +++ b/addons/csw/functions/fnc_reload_handleAddTurretMag.sqf @@ -40,14 +40,7 @@ if (_canAdd) then { private _currentAmmo = _vehicle magazineTurretAmmo [_loadedMag, _turret]; _currentAmmo = _currentAmmo + _ammoUsed; TRACE_2("Setting mag ammo",_loadedMag,_currentAmmo); - // _vehicle setMagazineTurretAmmo [_loadedMag, _currentAmmo, _turret]; - - // setMagazineTurretAmmo is broken on split locality, use setAmmo for now (this may not work for multi turret vehicles) - private _weapon = (_vehicle weaponsTurret _turret) param [0, ""]; - TRACE_3("setAmmo",_vehicle,_weapon,_currentAmmo); - _vehicle setAmmo [_weapon, _currentAmmo]; - private _currentAmmo = _vehicle magazineTurretAmmo [_loadedMag, _turret]; - if ((_weapon == "") || {_currentAmmo != _currentAmmo}) then { ERROR_1("failed to setAmmo - %1",_this); }; + _vehicle setMagazineTurretAmmo [_loadedMag, _currentAmmo, _turret]; } else { if (_loadedMag != "") then { TRACE_1("Removing emtpy mag",_loadedMag); diff --git a/addons/csw/functions/fnc_reload_handleRemoveTurretMag.sqf b/addons/csw/functions/fnc_reload_handleRemoveTurretMag.sqf index dccc9b16d4c..bab5f777ee4 100644 --- a/addons/csw/functions/fnc_reload_handleRemoveTurretMag.sqf +++ b/addons/csw/functions/fnc_reload_handleRemoveTurretMag.sqf @@ -51,16 +51,7 @@ private _ammoLeft = _ammoInFirstMag - _ammoRemoved; if ((_magsInWeapon isEqualTo []) && {_ammoInFirstMag > _ammoRemoved}) then { // Only one mag in gun, and we're just taking out a partial ammount (unlinking) TRACE_2("Setting mag ammo",_ammoRemoved,_ammoLeft); - // _vehicle setMagazineTurretAmmo [_vehMag, _ammoLeft, _turretPath]; - - // setMagazineTurretAmmo is broken on split locality, use setAmmo for now - private _weapon = (_vehicle weaponsTurret _turretPath) param [0, ""]; - TRACE_3("setAmmo",_vehicle,_weapon,_ammoLeft); - _vehicle setAmmo [_weapon, _ammoLeft]; - private _currentAmmo = _vehicle magazineTurretAmmo [_vehMag, _turretPath]; - if ((_weapon == "") || {_currentAmmo != _ammoLeft}) then { ERROR_1("failed to setAmmo - %1",_this); }; - - + _vehicle setMagazineTurretAmmo [_vehMag, _ammoLeft, _turretPath]; } else { // Because of command limitations, we need to remove mags to change their ammo // This will cause the gun to need to be reloaded if more than one is loaded (only a problem for non-assembly mode guns) diff --git a/addons/csw/functions/fnc_reload_loadMagazine.sqf b/addons/csw/functions/fnc_reload_loadMagazine.sqf index ac6e992fb86..4ceb042b818 100644 --- a/addons/csw/functions/fnc_reload_loadMagazine.sqf +++ b/addons/csw/functions/fnc_reload_loadMagazine.sqf @@ -48,23 +48,21 @@ private _onFinish = { }; } forEach (if (_magSource isKindOf "CAManBase") then {magazinesAmmo _magSource} else {magazinesAmmoCargo _magSource}); - if (_bestAmmoToSend == -1) exitWith {ERROR_2("No ammo [%1 - %2]?",_xMag,_bestAmmoToSend);}; + if (_bestAmmoToSend == -1) exitWith {ERROR_2("No ammo [%1 - %2]?",_carryMag,_bestAmmoToSend);}; [_magSource, _carryMag, _bestAmmoToSend] call EFUNC(common,removeSpecificMagazine); if (_bestAmmoToSend == 0) exitWith {}; // Workaround for removeSpecificMagazine and WeaponHolders being deleted when empty, give back to the unit if the weapon holder was deleted // TODO: Pass type and position of deleted object to create a new one - // TODO: Use '_magSource getEntityInfo 14' in 2.18 and the isSetForDeletion flag to execute in same frame - [{ - params ["_magSource", "_unit", "_args"]; + private _args = [_vehicle, _turret, _magSource, _carryMag, _bestAmmoToSend]; - if (isNull _magSource) then { - _args pushBack _unit; - }; + // If the source is set for deletion, give mag back to unit + if (_magSource getEntityInfo 14) then { + _args pushBack _unit; + }; - TRACE_1("calling addTurretMag event",_args); - [QGVAR(addTurretMag), _args] call CBA_fnc_globalEvent; - }, [_magSource, _unit, [_vehicle, _turret, _magSource, _carryMag, _bestAmmoToSend]]] call CBA_fnc_execNextFrame; + TRACE_1("calling addTurretMag event",_args); + [QGVAR(addTurretMag), _args] call CBA_fnc_globalEvent; }; diff --git a/addons/csw/initSettings.inc.sqf b/addons/csw/initSettings.inc.sqf index bc157e1164b..4a58ed80b03 100644 --- a/addons/csw/initSettings.inc.sqf +++ b/addons/csw/initSettings.inc.sqf @@ -1,56 +1,53 @@ -private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]]; +private _categoryArray = [format ["ACE %1", LLSTRING(DisplayName)]]; [ - QGVAR(defaultAssemblyMode), "CHECKBOX", + QGVAR(defaultAssemblyMode), + "CHECKBOX", [LSTRING(defaultAssemblyMode_displayName), LSTRING(defaultAssemblyMode_description)], _categoryArray, false, // default value - true, // isGlobal - {[QGVAR(defaultAssemblyMode), _this] call EFUNC(common,cbaSettings_settingChanged)}, - true // Needs mission restart + 1 // isGlobal ] call CBA_fnc_addSetting; [ - QGVAR(handleExtraMagazines), "CHECKBOX", + QGVAR(handleExtraMagazines), + "CHECKBOX", [LSTRING(handleExtraMagazines_displayName), LSTRING(handleExtraMagazines_description)], _categoryArray, true, // default value - true, // isGlobal - {[QGVAR(handleExtraMagazines), _this] call EFUNC(common,cbaSettings_settingChanged)}, - true // Needs mission restart + 1 // isGlobal ] call CBA_fnc_addSetting; [ - QGVAR(handleExtraMagazinesType), "LIST", + QGVAR(handleExtraMagazinesType), + "LIST", [LSTRING(handleExtraMagazinesType_displayName), LSTRING(handleExtraMagazinesType_description)], _categoryArray, [[0, 1], [LSTRING(handleExtraMagazinesType_weaponHolder), LSTRING(handleExtraMagazinesType_ammoBox)], 0], - true, // isGlobal - {[QGVAR(handleExtraMagazinesType), _this] call EFUNC(common,cbaSettings_settingChanged)}, - true // Needs mission restart + 1 // isGlobal ] call CBA_fnc_addSetting; [ - QGVAR(ammoHandling), "LIST", + QGVAR(ammoHandling), + "LIST", [LSTRING(ammoHandling_displayName), LSTRING(ammoHandling_description)], _categoryArray, [[0, 1, 2], [LELSTRING(common,Disabled), LELSTRING(common,playerOnly), LELSTRING(common,playersAndAI)], 2], // [_values, _valueTitles, _defaultIndex] - true, // isGlobal - {[QGVAR(ammoHandling), _this] call EFUNC(common,cbaSettings_settingChanged)}, - true // Needs mission restart + 1 // isGlobal ] call CBA_fnc_addSetting; [ - QGVAR(progressBarTimeCoefficent), "SLIDER", + QGVAR(progressBarTimeCoefficent), + "SLIDER", [LSTRING(progressBarTimeCoefficent_displayName), LSTRING(progressBarTimeCoefficent_description)], _categoryArray, - [0,2,1,2], // [min, max, default value, trailing decimals (-1 for whole numbers only)] - true // isGlobal + [0, 2, 1, 2], // [min, max, default value, trailing decimals (-1 for whole numbers only)] + 1 // isGlobal ] call CBA_fnc_addSetting; [ - QGVAR(dragAfterDeploy), "CHECKBOX", + QGVAR(dragAfterDeploy), + "CHECKBOX", [LSTRING(dragAfterDeploy_displayName), LSTRING(dragAfterDeploy_description)], - _categoryArray, - false // default value + _categoryArray ] call CBA_fnc_addSetting; diff --git a/addons/dagr/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf index fc05185638f..2f958ad2a7b 100644 --- a/addons/dagr/functions/fnc_menuInit.sqf +++ b/addons/dagr/functions/fnc_menuInit.sqf @@ -198,11 +198,11 @@ GVAR(menuRun) = true; GVAR(vectorConnected) = false; GVAR(displaySelection) = "WP"; switch (GVAR(selection)) do { - case 0: { DAGR_WP_INFO = GVAR(wp0); }; - case 1: { DAGR_WP_INFO = GVAR(wp1); }; - case 2: { DAGR_WP_INFO = GVAR(wp2); }; - case 3: { DAGR_WP_INFO = GVAR(wp3); }; - case 4: { DAGR_WP_INFO = GVAR(wp4); }; + case 0: { GVAR(wp_info) = GVAR(wp0); }; + case 1: { GVAR(wp_info) = GVAR(wp1); }; + case 2: { GVAR(wp_info) = GVAR(wp2); }; + case 3: { GVAR(wp_info) = GVAR(wp3); }; + case 4: { GVAR(wp_info) = GVAR(wp4); }; }; if (!GVAR(busy)) then { GVAR(showInfoUpdating) = true; @@ -382,6 +382,7 @@ GVAR(menuRun) = true; GVAR(digit8) = floor (GVAR(wp3) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000); }; case 4: { + //IGNORE_PRIVATE_WARNING ["ace_dagr_wp4"]; GVAR(digit1) = floor (GVAR(wp4) / 10000000); GVAR(digit2) = floor (GVAR(wp4) / 1000000 - GVAR(digit1) *10); GVAR(digit3) = floor (GVAR(wp4) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100); @@ -584,7 +585,7 @@ GVAR(menuRun) = true; }; GVAR(tmpUpdateRate) = 0.1 max GVAR(tmpUpdateRate) min 2.0; if (!GVAR(busy)) then { - (__dsp displayCtrl __mainText) ctrlSetText (Str(GVAR(tmpUpdateRate) * 1000) + "ms"); + (__dsp displayCtrl __mainText) ctrlSetText (str(GVAR(tmpUpdateRate) * 1000) + "ms"); (__dsp displayCtrl __F1) ctrlSetText "Save"; (__dsp displayCtrl __F3) ctrlSetText "Cancel"; }; diff --git a/addons/dagr/functions/fnc_outputData.sqf b/addons/dagr/functions/fnc_outputData.sqf index b7064ce248a..646f56d1c88 100644 --- a/addons/dagr/functions/fnc_outputData.sqf +++ b/addons/dagr/functions/fnc_outputData.sqf @@ -17,7 +17,7 @@ 135471 cutRsc ["DAGR_DISPLAY", "plain down"]; -#define __display (uiNameSpace getVariable "DAGR_DISPLAY") +#define __display (uiNamespace getVariable "DAGR_DISPLAY") #define __gridControl (__display displayCtrl 266851) #define __speedControl (__display displayCtrl 266852) @@ -62,7 +62,7 @@ GVAR(outputPFH) = [{ }; // Time - private _dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString; + private _dagrTime = [dayTime, "HH:MM"] call bis_fnc_timeToString; // Output __gridControl ctrlSetText _dagrGrid; diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf index e9bd0ea6c38..816ed2e4b23 100644 --- a/addons/dagr/functions/fnc_outputVector.sqf +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -17,7 +17,7 @@ 135471 cutRsc ["DAGR_DISPLAY", "plain down"]; -#define __display (uiNameSpace getVariable "DAGR_DISPLAY") +#define __display (uiNamespace getVariable "DAGR_DISPLAY") #define __gridControl (__display displayCtrl 266851) #define __speedControl (__display displayCtrl 266858) @@ -36,7 +36,7 @@ if (_lazPosX < 0) then { _lazPosX = _lazPosX + 99999;}; if (_lazPosY < 0) then {_lazPosY = _lazPosY + 99999;}; // Find laser position -private _xGrid = toArray Str(round _lazPosX); +private _xGrid = toArray str(round _lazPosX); while {count _xGrid < 5} do { _xGrid = [48] + _xGrid; @@ -45,7 +45,7 @@ _xGrid resize 4; _xGrid = toString _xGrid; _xGrid = parseNumber _xGrid; -private _yGrid = toArray Str(round _lazPosY); +private _yGrid = toArray str(round _lazPosY); while {count _yGrid < 5} do { _yGrid = [48] + _yGrid; }; @@ -54,17 +54,17 @@ _yGrid = toString _yGrid; _yGrid = parseNumber _yGrid; private _xCoord = switch true do { - case (_xGrid >= 1000): { "" + Str(_xGrid) }; - case (_xGrid >= 100): { "0" + Str(_xGrid) }; - case (_xGrid >= 10): { "00" + Str(_xGrid) }; - default { "000" + Str(_xGrid) }; + case (_xGrid >= 1000): { "" + str(_xGrid) }; + case (_xGrid >= 100): { "0" + str(_xGrid) }; + case (_xGrid >= 10): { "00" + str(_xGrid) }; + default { "000" + str(_xGrid) }; }; private _yCoord = switch true do { - case (_yGrid >= 1000): { "" + Str(_yGrid) }; - case (_yGrid >= 100): { "0" + Str(_yGrid) }; - case (_yGrid >= 10): { "00" + Str(_yGrid) }; - default { "000" + Str(_yGrid) }; + case (_yGrid >= 1000): { "" + str(_yGrid) }; + case (_yGrid >= 100): { "0" + str(_yGrid) }; + case (_yGrid >= 10): { "00" + str(_yGrid) }; + default { "000" + str(_yGrid) }; }; private _dagrGrid = _xCoord + " " + _yCoord; @@ -74,7 +74,7 @@ private _elevation = floor ((_lazPosZ) + EGVAR(common,mapAltitude)); private _dagrElevation = str _elevation + "m"; // Time -private _dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString; +private _dagrTime = [dayTime, "HH:MM"] call bis_fnc_timeToString; // Bearing private _bearing = GVAR(LAZHEADING); diff --git a/addons/dagr/functions/fnc_outputWP.sqf b/addons/dagr/functions/fnc_outputWP.sqf index 27944f0bb91..b9101e994ca 100644 --- a/addons/dagr/functions/fnc_outputWP.sqf +++ b/addons/dagr/functions/fnc_outputWP.sqf @@ -17,7 +17,7 @@ 135471 cutRsc ["DAGR_DISPLAY", "plain down"]; -#define __display (uiNameSpace getVariable "DAGR_DISPLAY") +#define __display (uiNamespace getVariable "DAGR_DISPLAY") #define __gridControl (__display displayCtrl 266851) #define __speedControl (__display displayCtrl 266858) @@ -44,21 +44,21 @@ GVAR(outputPFH) = [{ private _dagrGrid = format ["%1 %2", (_gridArrayX select [0,4]), (_gridArrayY select [0,4])]; // WP Grid - private _xGrid2 = floor (DAGR_WP_INFO / 10000); - private _yGrid2 = DAGR_WP_INFO - _xGrid2 * 10000; - - _xCoord2 = switch true do { - case (_xGrid2 >= 1000): { "" + Str(_xGrid2) }; - case (_xGrid2 >= 100): { "0" + Str(_xGrid2) }; - case (_xGrid2 >= 10): { "00" + Str(_xGrid2) }; - default { "000" + Str(_xGrid2) }; + private _xGrid2 = floor (GVAR(wp_info) / 10000); + private _yGrid2 = GVAR(wp_info) - _xGrid2 * 10000; + + private _xCoord2 = switch true do { + case (_xGrid2 >= 1000): { "" + str(_xGrid2) }; + case (_xGrid2 >= 100): { "0" + str(_xGrid2) }; + case (_xGrid2 >= 10): { "00" + str(_xGrid2) }; + default { "000" + str(_xGrid2) }; }; - _yCoord2 = switch true do { - case (_yGrid2 >= 1000): { "" + Str(_yGrid2) }; - case (_yGrid2 >= 100): { "0" + Str(_yGrid2) }; - case (_yGrid2 >= 10): { "00" + Str(_yGrid2) }; - default { "000" + Str(_yGrid2) }; + private _yCoord2 = switch true do { + case (_yGrid2 >= 1000): { "" + str(_yGrid2) }; + case (_yGrid2 >= 100): { "0" + str(_yGrid2) }; + case (_yGrid2 >= 10): { "00" + str(_yGrid2) }; + default { "000" + str(_yGrid2) }; }; _dagrGrid2 = _xCoord2 + " " + _yCoord2; diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index 6e842e739a4..c95647b82ab 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -50,7 +50,7 @@ if (!_doNotDropAmmo) then { if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith { _holder = _x; }; - } forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); + } forEach ((getPos _target) nearObjects [DISARM_CONTAINER, 3]); }; //Create a new weapon holder @@ -101,7 +101,7 @@ if !([_targetMagazinesStart, _targetMagazinesEnd, _holderMagazinesStart, _holder }; //Remove Items, Assigned Items and NVG -private _holderItemsStart = getitemCargo _holder; +private _holderItemsStart = getItemCargo _holder; private _targetItemsStart = (assignedItems _target) + (items _target) - (weapons _target); if ((headgear _target) != "") then {_targetItemsStart pushBack (headgear _target);}; if ((goggles _target) != "") then {_targetItemsStart pushBack (goggles _target);}; @@ -131,7 +131,7 @@ private _addToCrateCount = []; _holder addItemCargoGlobal [(_addToCrateClassnames select _forEachIndex), (_addToCrateCount select _forEachIndex)]; } forEach _addToCrateClassnames; -private _holderItemsEnd = getitemCargo _holder; +private _holderItemsEnd = getItemCargo _holder; private _targetItemsEnd = (assignedItems _target) + (items _target) - (weapons _target); if ((headgear _target) != "") then {_targetItemsEnd pushBack (headgear _target);}; if ((goggles _target) != "") then {_targetItemsEnd pushBack (goggles _target);}; @@ -172,7 +172,7 @@ if (_holderIsEmpty) then { private _needToRemoveWeapon = ({_x in _listOfItemsToRemove} count (weapons _target)) > 0; private _needToRemoveMagazines = ({_x in _listOfItemsToRemove} count (magazines _target)) > 0; - private _needToRemoveBackpack = ((backPack _target) != "") && {(backPack _target) in _listOfItemsToRemove}; + private _needToRemoveBackpack = ((backpack _target) != "") && {(backpack _target) in _listOfItemsToRemove}; private _needToRemoveVest = ((vest _target) != "") && {(vest _target) in _listOfItemsToRemove}; private _needToRemoveUniform = ((uniform _target) != "") && {(uniform _target) in _listOfItemsToRemove}; @@ -192,7 +192,7 @@ if (_holderIsEmpty) then { } forEach (magazines _target); //Drop backpack (Keeps variables for ACRE/TFR) - if (_needToRemoveBackpack) then {_target action ["DropBag", _holder, (backPack _target)];}; + if (_needToRemoveBackpack) then {_target action ["DropBag", _holder, (backpack _target)];}; } else { [_pfID] call CBA_fnc_removePerFrameHandler; diff --git a/addons/disarming/functions/fnc_openDisarmDialog.sqf b/addons/disarming/functions/fnc_openDisarmDialog.sqf index 6cf15f4cad1..0054cc09fde 100644 --- a/addons/disarming/functions/fnc_openDisarmDialog.sqf +++ b/addons/disarming/functions/fnc_openDisarmDialog.sqf @@ -23,7 +23,7 @@ params ["_caller", "_target"]; //Sanity Checks if (_caller != ACE_player) exitWith {ERROR("Player isn't caller?");}; -if !([_player, _target] call FUNC(canPlayerDisarmUnit)) exitWith {ERROR("Can't Disarm Unit");}; +if !([_caller, _target] call FUNC(canPlayerDisarmUnit)) exitWith {ERROR("Can't Disarm Unit");}; if (dialog) then {ERROR("Dialog open when trying to open disarm dialog"); closeDialog 0;}; disableSerialization; @@ -96,7 +96,7 @@ GVAR(disarmTarget) = _target; if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith { _holder = _x; }; - } forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); + } forEach ((getPos _target) nearObjects [DISARM_CONTAINER, 3]); //If a holder exists, show it's inventory if (!isNull _holder) then { diff --git a/addons/disarming/gui_disarm.hpp b/addons/disarming/gui_disarm.hpp index 4c8ce53e6c0..b6afa26551d 100644 --- a/addons/disarming/gui_disarm.hpp +++ b/addons/disarming/gui_disarm.hpp @@ -7,13 +7,13 @@ class RscActiveText; class RscListBox; //Use the definese from -#define X_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)) -#define Y_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)) -#define W_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40)) -#define H_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)) +#define X_BIS(num) (num * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)) +#define Y_BIS(num) (num * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)) +#define W_BIS(num) (num * (((safeZoneW / safeZoneH) min 1.2) / 40)) +#define H_BIS(num) (num * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)) -#define X_MAKEITBIGGA(num) (num * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)) -#define Y_MAKEITBIGGA(num) (num * (safeZoneH / 30) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)) +#define X_MAKEITBIGGA(num) (num * (safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH)/2)) +#define Y_MAKEITBIGGA(num) (num * (safeZoneH / 30) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2))/2)) #define W_MAKEITBIGGA(num) (num * (safeZoneH / 40)) #define H_MAKEITBIGGA(num) (num * (safeZoneH / 30)) @@ -140,9 +140,9 @@ class GVAR(remoteInventory) { }; class GroundContainer: RscListBox { idc = 632; - sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - sizeEx2 = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - rowHeight = "1.75 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + sizeEx = "0.8 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + sizeEx2 = "0.8 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + rowHeight = "1.75 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; canDrag = 0; colorText[] = {1,1,1,1}; colorBackground[] = {0,0,0,0}; diff --git a/addons/dogtags/functions/fnc_canTakeDogtag.sqf b/addons/dogtags/functions/fnc_canTakeDogtag.sqf index c56db0b8933..c39eb85a490 100644 --- a/addons/dogtags/functions/fnc_canTakeDogtag.sqf +++ b/addons/dogtags/functions/fnc_canTakeDogtag.sqf @@ -23,7 +23,4 @@ if (isNull _target) exitWith {false}; // Check if disabled for faction if ((faction _target) in GVAR(disabledFactions)) exitWith {false}; -// CBA_fnc_canAddItem doesn't account for mass 0 items and unit not having any containers -!(_target call EFUNC(common,isAwake)) && {(uniform _player + vest _player + backpack _player) != ""} && {[_player, "ACE_dogtag_1"] call CBA_fnc_canAddItem} -// Todo: Use code below in 2.18 -// _player canAdd ["ACE_dogtag_1", 1, true] +!(_target call EFUNC(common,isAwake)) && {_player canAdd ["ACE_dogtag_1", 1, true]} diff --git a/addons/dragging/CfgVehicles.hpp b/addons/dragging/CfgVehicles.hpp index 395133e9464..bd9758447bf 100644 --- a/addons/dragging/CfgVehicles.hpp +++ b/addons/dragging/CfgVehicles.hpp @@ -3,6 +3,9 @@ class CBA_Extended_EventHandlers; class CfgVehicles { + class C_man_1; + class GVAR(clone): C_man_1 {}; + // Static weapons class LandVehicle; class StaticWeapon: LandVehicle { diff --git a/addons/dragging/XEH_PREP.hpp b/addons/dragging/XEH_PREP.hpp index 0861c9533d2..aeba3135ab5 100644 --- a/addons/dragging/XEH_PREP.hpp +++ b/addons/dragging/XEH_PREP.hpp @@ -5,6 +5,8 @@ PREP(canDrop_carry); PREP(canRun_carry); PREP(carryObject); PREP(carryObjectPFH); +PREP(createClone); +PREP(deleteClone); PREP(dragObject); PREP(dragObjectPFH); PREP(dropObject); diff --git a/addons/dragging/XEH_postInit.sqf b/addons/dragging/XEH_postInit.sqf index 5c66fe692c8..48655c5833a 100644 --- a/addons/dragging/XEH_postInit.sqf +++ b/addons/dragging/XEH_postInit.sqf @@ -1,9 +1,62 @@ // by PabstMirror, commy2 #include "script_component.hpp" +[QGVAR(moveCorpse), { + params ["_corpse", "_dir", "_posATL"]; + + if (isNull _corpse) exitWith {}; + + // Check if the corpse is already close to the target + // If so, don't teleport + if ((getPosATL _corpse) distance _posATL > 0.25) then { + // Set direction before position + _corpse setDir _dir; + + // Bring corpse back to clone's position + _corpse setPosATL _posATL; + }; + + // Sync the corpse with its position + [{ + _this awake true; + + [{ + _this awake false; + }, _this] call CBA_fnc_execNextFrame; + }, _corpse] call CBA_fnc_execNextFrame; + + // Allow the corpse to be synced for JIP players + if (isServer) exitWith { + GVAR(movedCorpses) pushBackUnique _corpse; + }; +}] call CBA_fnc_addEventHandler; + if (isServer) then { // Release object on disconnection. Function is identical to killed addMissionEventHandler ["HandleDisconnect", LINKFUNC(handleKilled)]; + + GVAR(movedCorpses) = []; + + ["CAManBase", "Deleted", { + GVAR(movedCorpses) deleteAt (GVAR(movedCorpses) find (_this select 0)); + }, true, [], true] call CBA_fnc_addClassEventHandler; + + [QGVAR(disableSyncMovedCorpseOnJIP), { + params ["_corpse"]; + + GVAR(movedCorpses) deleteAt (GVAR(movedCorpses) find _corpse); + }] call CBA_fnc_addEventHandler; + + // Sync position of dead corpse for JIP unit (prevents weird invisible hitboxes on corpses) + [QGVAR(requestSyncMovedCorpsesJIP), { + params ["_clientOwner"]; + + { + [QGVAR(moveCorpse), [_x, getDir _x, getPosATL _x], _clientOwner] call CBA_fnc_ownerEvent; + } forEach GVAR(movedCorpses); + }] call CBA_fnc_addEventHandler; +} else { + [QGVAR(requestSyncMovedCorpsesJIP), clientOwner] call CBA_fnc_serverEvent; }; if (!hasInterface) exitWith {}; @@ -20,6 +73,11 @@ if (isNil QGVAR(maxWeightCarryRun)) then { GVAR(maxWeightCarryRun) = 50; }; +// Extended EH doesn't fire for dead units, so add interactions manually +{ + _x call FUNC(initPerson); +} forEach allDeadMen; + ["isNotDragging", {!((_this select 0) getVariable [QGVAR(isDragging), false])}] call EFUNC(common,addCanInteractWithCondition); ["isNotCarrying", {!((_this select 0) getVariable [QGVAR(isCarrying), false])}] call EFUNC(common,addCanInteractWithCondition); @@ -57,6 +115,14 @@ if (isNil QGVAR(maxWeightCarryRun)) then { // Display event handler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}] call CBA_fnc_addDisplayHandler; +// Handle local effect commands for clones +[QGVAR(setCloneFace), { + params ["_clone", "_corpse"]; + + _clone setFace face _corpse; + _clone setMimic "unconscious"; +}] call CBA_fnc_addEventHandler; + // Handle surrendering and handcuffing ["ace_captiveStatusChanged", { params ["_unit", "_state"]; diff --git a/addons/dragging/functions/fnc_canCarry.sqf b/addons/dragging/functions/fnc_canCarry.sqf index be3015868b5..a38f37a02ee 100644 --- a/addons/dragging/functions/fnc_canCarry.sqf +++ b/addons/dragging/functions/fnc_canCarry.sqf @@ -18,7 +18,10 @@ params ["_unit", "_target"]; -if !(alive _target && {_target getVariable [QGVAR(canCarry), false]} && {isNull objectParent _target}) exitWith {false}; +private _alive = alive _target; +private _isPerson = _target isKindOf "CAManBase"; + +if !((_alive || _isPerson) && {_target getVariable [QGVAR(canCarry), false]} && {isNull objectParent _target}) exitWith {false}; if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; @@ -26,18 +29,19 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; // The fireman carry animation does not slow down for injured legs, so you could carry and run if ((_unit getHitPointDamage "HitLegs") >= 0.5) exitWith {false}; +// Units need to be unconscious or limping; Units also need to not be in ragdoll if alive, as that causes desync issues +if (_isPerson) exitWith { + ((!_alive) && {missionNamespace getVariable [QGVAR(canMoveDead), true]}) || + {(isAwake _target) && // not ragdolled if alive + {!(_target call EFUNC(common,isAwake)) || + {_target getHitPointDamage "HitLegs" >= 0.5}}} +}; + // Static weapons need to be empty for carrying (ignore UAV AI) if (_target isKindOf "StaticWeapon") exitWith { (crew _target) findIf {!unitIsUAV _x} == -1 }; -// Units need to be unconscious or limping; Units also need to not be in ragdoll, as that causes desync issues -if (_target isKindOf "CAManBase") exitWith { - isAwake _target && // not ragdolled - {lifeState _target == "INCAPACITATED" || - {_target getHitPointDamage "HitLegs" >= 0.5}} -}; - // Check max items for WeaponHolders if (["WeaponHolder", "WeaponHolderSimulated"] findIf {_target isKindOf _x} != -1) exitWith { (count (weaponCargo _target + magazineCargo _target + itemCargo _target)) <= MAX_DRAGGED_ITEMS diff --git a/addons/dragging/functions/fnc_canDrag.sqf b/addons/dragging/functions/fnc_canDrag.sqf index 586e23feaf8..2616d6d1447 100644 --- a/addons/dragging/functions/fnc_canDrag.sqf +++ b/addons/dragging/functions/fnc_canDrag.sqf @@ -18,22 +18,26 @@ params ["_unit", "_target"]; -if !(alive _target && {_target getVariable [QGVAR(canDrag), false]} && {isNull objectParent _target}) exitWith {false}; +private _alive = alive _target; +private _isPerson = _target isKindOf "CAManBase"; + +if !((_alive || _isPerson) && {_target getVariable [QGVAR(canDrag), false]} && {isNull objectParent _target}) exitWith {false}; if !([_unit, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false}; +// Units need to be unconscious or limping; Units also need to not be in ragdoll if alive, as that causes desync issues +if (_isPerson) exitWith { + ((!_alive) && {missionNamespace getVariable [QGVAR(canMoveDead), true]}) || + {(isAwake _target) && // not ragdolled if alive + {!(_target call EFUNC(common,isAwake)) || + {_target getHitPointDamage "HitLegs" >= 0.5}}} +}; + // Static weapons need to be empty for dragging (ignore UAV AI) if (_target isKindOf "StaticWeapon") exitWith { (crew _target) findIf {!unitIsUAV _x} == -1 }; -// Units need to be unconscious or limping; Units also need to not be in ragdoll, as that causes desync issues -if (_target isKindOf "CAManBase") exitWith { - isAwake _target && // not ragdolled - {lifeState _target == "INCAPACITATED" || - {_target getHitPointDamage "HitLegs" >= 0.5}} -}; - // Check max items for WeaponHolders if (["WeaponHolder", "WeaponHolderSimulated"] findIf {_target isKindOf _x} != -1) exitWith { (count (weaponCargo _target + magazineCargo _target + itemCargo _target)) <= MAX_DRAGGED_ITEMS diff --git a/addons/dragging/functions/fnc_carryObject.sqf b/addons/dragging/functions/fnc_carryObject.sqf index 7b2b4faa6b0..d765020f96e 100644 --- a/addons/dragging/functions/fnc_carryObject.sqf +++ b/addons/dragging/functions/fnc_carryObject.sqf @@ -71,3 +71,6 @@ if (_UAVCrew isNotEqualTo []) then { // Check everything [LINKFUNC(carryObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler; + +// API +[QGVAR(startedCarry), [_unit, _target]] call CBA_fnc_localEvent; diff --git a/addons/dragging/functions/fnc_carryObjectPFH.sqf b/addons/dragging/functions/fnc_carryObjectPFH.sqf index e0a58a26eb8..a615d282521 100644 --- a/addons/dragging/functions/fnc_carryObjectPFH.sqf +++ b/addons/dragging/functions/fnc_carryObjectPFH.sqf @@ -91,7 +91,7 @@ private _previousHint = _unit getVariable [QGVAR(hint), []]; if (_previousHint isEqualType "") exitWith {}; // Mouse hint -private _hintLMB = LLSTRING(Drop); +private _hintLMB = LELSTRING(common,Drop); private _cursorObject = cursorObject; if ( diff --git a/addons/dragging/functions/fnc_createClone.sqf b/addons/dragging/functions/fnc_createClone.sqf new file mode 100644 index 00000000000..6cb4aa0ec69 --- /dev/null +++ b/addons/dragging/functions/fnc_createClone.sqf @@ -0,0 +1,101 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut, johnb43 + * Creates a draggable / carryable clone of a dead unit. + * + * Arguments: + * 0: Unit dragging/carrying + * 1: Dead unit + * + * Return Value: + * Cloned unit + * + * Example: + * [player, cursorObject] call ace_dragging_fnc_createClone; + * + * Public: No + */ + +params ["_unit", "_target"]; + +// Don't sync corpse when a player joins in progress until the corpse is in its proper position +[QGVAR(disableSyncMovedCorpseOnJIP), _target] call CBA_fnc_serverEvent; + +private _posATL = getPosATL _target; + +// Create clone +private _clone = createVehicle [[configOf _target >> QGVAR(cloneClass), "TEXT", QGVAR(clone)] call CBA_fnc_getConfigEntry, _posATL, [], 0, "CAN_COLLIDE"]; + +// Claim the clone +[_unit, _clone] call EFUNC(common,claim); + +// Move unit -10 m below terrain in order to hide it and remove its inventory access +_posATL set [2, -10]; + +// Corpse is desynced, but it doesn't matter here +_target setPosATL _posATL; + +// Hide unit until it can be moved below terrain +private _isObjectHidden = isObjectHidden _target; + +if (!_isObjectHidden) then { + [QEGVAR(common,hideObjectGlobal), [_target, true]] call CBA_fnc_serverEvent; +}; + +// Prevents unit from falling when below terrain +private _simulationEnabled = simulationEnabled _target; + +if (_simulationEnabled) then { + [QEGVAR(common,enableSimulationGlobal), [_target, false]] call CBA_fnc_serverEvent; +}; + +private _isInRemainsCollector = isInRemainsCollector _target; + +// Make sure corpse isn't deleted by engine's garbage collector +if (_isInRemainsCollector) then { + removeFromRemainsCollector [_target]; +}; + +// Make sure clone has the same wound textures as the corpse +_clone setDamage ((damage _target) min 0.99); // Don't kill the clone + +{ + _clone setHitPointDamage [_x, (_target getHitPointDamage _x) min 0.99]; +} forEach ["HitHead", "HitBody", "HitHands", "HitLegs"]; // Relevant hitpoints + +// Disable all damage +_clone allowDamage false; +_clone setVariable [QGVAR(original), [_target, _isInRemainsCollector, _isObjectHidden, _simulationEnabled], true]; + +[_clone, _target call CBA_fnc_getLoadout] call CBA_fnc_setLoadout; + +// Sets the facial expression +[[QGVAR(setCloneFace), [_clone, _target]] call CBA_fnc_globalEventJIP, _clone] call CBA_fnc_removeGlobalEventJIP; + +// API +[QGVAR(cloneCreated), [_clone, _target]] call CBA_fnc_localEvent; + +[{ + params ["_clone", "_target"]; + + // Remove clone from all zeuses + if (["ace_zeus"] call EFUNC(common,isModLoaded)) then { + [QEGVAR(zeus,removeObjects), [[_clone]]] call CBA_fnc_serverEvent; + }; + + // Release claim on corpse + [objNull, _target] call EFUNC(common,claim); +}, [_clone, _target], 0.25] call CBA_fnc_waitAndExecute; + +// Save which curators had this object as editable +if (["ace_zeus"] call EFUNC(common,isModLoaded)) then { + private _objectCurators = objectCurators _target; + + _target setVariable [QGVAR(objectCurators), _objectCurators, true]; + + if (_objectCurators isEqualTo []) exitWith {}; + + [QEGVAR(zeus,removeObjects), [[_target], _objectCurators]] call CBA_fnc_serverEvent; +}; + +_clone diff --git a/addons/dragging/functions/fnc_deleteClone.sqf b/addons/dragging/functions/fnc_deleteClone.sqf new file mode 100644 index 00000000000..148b88a3a31 --- /dev/null +++ b/addons/dragging/functions/fnc_deleteClone.sqf @@ -0,0 +1,80 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut, johnb43 + * Drops a draggable / carryable clone of a dead unit. + * + * Arguments: + * 0: Unit dragging / carrying + * 1: Clone + * 2: If unit is in building + * + * Return Value: + * Original unit + * + * Example: + * [player, cursorObject, false] call ace_dragging_fnc_deleteClone; + * + * Public: No + */ + +params ["_unit", "_clone", "_inBuilding"]; + +(_clone getVariable [QGVAR(original), []]) params [ + ["_target", objNull], + ["_isInRemainsCollector", true], + ["_isObjectHidden", false], + ["_simulationEnabled", true] +]; + +// API +[QGVAR(cloneDeleted), [_clone, _target]] call CBA_fnc_localEvent; + +// Check if unit was deleted +if (!isNull _target) then { + private _posATL = getPosATL _clone; + + if (_inBuilding) then { + _posATL = _posATL vectorAdd [0, 0, 0.05]; + }; + + // Make sure position isn't underground + if (_posATL select 2 < 0.05) then { + _posATL set [2, 0.05]; + }; + + // Move the unit globally (important, as it desyncs the corpse position otherwise) + [QGVAR(moveCorpse), [_target, getDir _unit + 180, _posATL]] call CBA_fnc_globalEvent; + + // Unhide unit + if (!_isObjectHidden) then { + [QEGVAR(common,hideObjectGlobal), [_target, false]] call CBA_fnc_serverEvent; + }; + + // Enable simulation again + if (_simulationEnabled) then { + [QEGVAR(common,enableSimulationGlobal), [_target, true]] call CBA_fnc_serverEvent; + }; + + // Detach first to prevent objNull in attachedObjects + detach _clone; + deleteVehicle _clone; + + // Get which curators had this object as editable + if (["ace_zeus"] call EFUNC(common,isModLoaded)) then { + private _objectCurators = _target getVariable [QGVAR(objectCurators), []]; + + if (_objectCurators isEqualTo []) exitWith {}; + + [QEGVAR(zeus,addObjects), [[_target], _objectCurators]] call CBA_fnc_serverEvent; + }; + + if (_isInRemainsCollector) then { + addToRemainsCollector [_target]; + }; +} else { + // Detach first to prevent objNull in attachedObjects + detach _clone; + deleteVehicle _clone; +}; + +_target diff --git a/addons/dragging/functions/fnc_dragObject.sqf b/addons/dragging/functions/fnc_dragObject.sqf index e7bf706f9f9..3169db26795 100644 --- a/addons/dragging/functions/fnc_dragObject.sqf +++ b/addons/dragging/functions/fnc_dragObject.sqf @@ -57,7 +57,7 @@ GVAR(releaseActionID) = [0xF1, [false, false, false], { }, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; // Show mouse hint -["", LLSTRING(Drop)] call EFUNC(interaction,showMouseHint); +["", LELSTRING(common,Drop)] call EFUNC(interaction,showMouseHint); // Block firing if (!GVAR(dragAndFire)) then { @@ -87,3 +87,6 @@ if (_UAVCrew isNotEqualTo []) then { // Fixes not being able to move when in combat pace [_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); + +// API +[QGVAR(startedDrag), [_unit, _target]] call CBA_fnc_localEvent; diff --git a/addons/dragging/functions/fnc_dragObjectPFH.sqf b/addons/dragging/functions/fnc_dragObjectPFH.sqf index 249f3866bb5..13400aa349f 100644 --- a/addons/dragging/functions/fnc_dragObjectPFH.sqf +++ b/addons/dragging/functions/fnc_dragObjectPFH.sqf @@ -62,3 +62,8 @@ if (_target isKindOf "StaticWeapon" && {((crew _target) - (_target getVariable [ _idPFH call CBA_fnc_removePerFrameHandler; }; + +// Clones can die of drowning if oxygen is under 0.5, so refill their oxygen from time to time +if (_target isKindOf QGVAR(clone) && {getOxygenRemaining _target < 0.8}) then { + _target setOxygenRemaining 1; +}; diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index 119eaf415af..049f8228168 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -31,6 +31,12 @@ if (!GVAR(dragAndFire)) then { }; private _inBuilding = _unit call FUNC(isObjectOnObject); +private _isClone = _target isKindOf QGVAR(clone); + +// Drop cloned dead units +if (_isClone) then { + _target = [_unit, _target, _inBuilding] call FUNC(deleteClone); +}; // Play release animation if (_unit call EFUNC(common,isAwake)) then { @@ -57,7 +63,7 @@ _unit removeWeapon "ACE_FakePrimaryWeapon"; [_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); // Prevent object from flipping inside buildings -if (_inBuilding) then { +if (_inBuilding && {!_isClone}) then { _target setPosASL (getPosASL _target vectorAdd [0, 0, 0.05]); TRACE_2("setPos",getPosASL _unit,getPosASL _target); }; @@ -101,3 +107,6 @@ private _mass = _target getVariable [QGVAR(originalMass), 0]; if (_mass != 0) then { [QEGVAR(common,setMass), [_target, _mass]] call CBA_fnc_globalEvent; // Force global sync }; + +// API +[QGVAR(stoppedDrag), [_unit, _target]] call CBA_fnc_localEvent; diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index d244d93a2ee..525a150bcff 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -25,6 +25,12 @@ TRACE_1("params",_this); _unit setVariable [QGVAR(releaseActionID), nil]; private _inBuilding = _unit call FUNC(isObjectOnObject); +private _isClone = _target isKindOf QGVAR(clone); + +// Drop cloned dead units +if (_isClone) then { + _target = [_unit, _target, _inBuilding] call FUNC(deleteClone); +}; // Prevent collision damage [QEGVAR(common,fixCollision), _unit] call CBA_fnc_localEvent; @@ -72,8 +78,9 @@ if (!isNil "_previousWeaponState") then { [_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); // Prevent object from flipping inside buildings -if (_inBuilding) then { +if (_inBuilding && {!_isClone}) then { _target setPosASL (getPosASL _target vectorAdd [0, 0, 0.05]); + TRACE_2("setPos",getPosASL _unit,getPosASL _target); }; _unit setVariable [QGVAR(isCarrying), false, true]; @@ -122,6 +129,12 @@ if (_loadCargo) then { } else { [_unit, _target, _cursorObject] call EFUNC(common,loadPerson); }; + + // Repurpose variable for flag used in event below + _loadCargo = true; }; }; }; + +// API +[QGVAR(stoppedCarry), [_unit, _target, _loadCargo]] call CBA_fnc_localEvent; diff --git a/addons/dragging/functions/fnc_getWeight.sqf b/addons/dragging/functions/fnc_getWeight.sqf index f6cb4661659..0f4e8b2b1eb 100644 --- a/addons/dragging/functions/fnc_getWeight.sqf +++ b/addons/dragging/functions/fnc_getWeight.sqf @@ -30,14 +30,6 @@ if (!GVAR(skipContainerWeight)) then { _weight = _weight + (_object getVariable [QGVAR(originalMass), getMass _object]); }; -// Fixed in https://feedback.bistudio.com/T167469 on 2.16 profiling branch and for 2.18 stable -if ((productVersion select 3) < 152017) then { - { - _x params ["", "_container"]; - _weight = _weight - (loadAbs _container); - } forEach (everyContainer _object); -}; - // Mass in Arma isn't an exact amount but rather a volume/weight value // This attempts to work around that by making it a usable value (sort of) GVAR(weightCoefficient) * _weight * 0.5 // return diff --git a/addons/dragging/functions/fnc_handleAnimChanged.sqf b/addons/dragging/functions/fnc_handleAnimChanged.sqf index 24b8f582057..49ccc18d3f1 100644 --- a/addons/dragging/functions/fnc_handleAnimChanged.sqf +++ b/addons/dragging/functions/fnc_handleAnimChanged.sqf @@ -5,7 +5,7 @@ * * Arguments: * 0: Unit - * 1: Animaion + * 1: Animation * * Return Value: * None @@ -17,6 +17,7 @@ */ params ["_unit", "_anim"]; +//IGNORE_PRIVATE_WARNING ["_thisArgs", "_thisID"]; _thisArgs params ["_realUnit"]; TRACE_4("params",_unit,_anim,_realUnit,_thisID); diff --git a/addons/dragging/functions/fnc_handleScrollWheel.sqf b/addons/dragging/functions/fnc_handleScrollWheel.sqf index c7641a8ffa7..065701bbd44 100644 --- a/addons/dragging/functions/fnc_handleScrollWheel.sqf +++ b/addons/dragging/functions/fnc_handleScrollWheel.sqf @@ -42,7 +42,7 @@ if (!CBA_events_control) then { // Uses this method of selecting position because setPosATL did not have immediate effect private _positionChange = _position vectorDiff (getPosASL _carriedItem); - private _selectionPosition = _unit worldToModel (ASLtoAGL getPosWorld _carriedItem); + private _selectionPosition = _unit worldToModel (ASLToAGL getPosWorld _carriedItem); _selectionPosition = _selectionPosition vectorAdd _positionChange; _carriedItem attachTo [_unit, _selectionPosition]; diff --git a/addons/dragging/functions/fnc_resumeDrag.sqf b/addons/dragging/functions/fnc_resumeDrag.sqf index d0fea988fb8..7ae7c1a8f3c 100644 --- a/addons/dragging/functions/fnc_resumeDrag.sqf +++ b/addons/dragging/functions/fnc_resumeDrag.sqf @@ -29,4 +29,4 @@ GVAR(releaseActionID) = [0xF1, [false, false, false], { }, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; // Show mouse hint -["", LLSTRING(Drop)] call EFUNC(interaction,showMouseHint); +["", LELSTRING(common,Drop)] call EFUNC(interaction,showMouseHint); diff --git a/addons/dragging/functions/fnc_setCarryable.sqf b/addons/dragging/functions/fnc_setCarryable.sqf index c9850d6f579..977d88aff88 100644 --- a/addons/dragging/functions/fnc_setCarryable.sqf +++ b/addons/dragging/functions/fnc_setCarryable.sqf @@ -99,7 +99,7 @@ private _carryAction = [ private _dropAction = [ QGVAR(drop_carry), - LLSTRING(Drop), + LELSTRING(common,Drop), "", { [_player, _target] call FUNC(dropObject_carry) diff --git a/addons/dragging/functions/fnc_setDraggable.sqf b/addons/dragging/functions/fnc_setDraggable.sqf index 8ff6cecf35e..a568543958e 100644 --- a/addons/dragging/functions/fnc_setDraggable.sqf +++ b/addons/dragging/functions/fnc_setDraggable.sqf @@ -99,7 +99,7 @@ private _dragAction = [ private _dropAction = [ QGVAR(drop), - LLSTRING(Drop), + LELSTRING(common,Drop), "", { [_player, _target] call FUNC(dropObject); diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf index 3e2cc17efde..99652fc263d 100644 --- a/addons/dragging/functions/fnc_startCarry.sqf +++ b/addons/dragging/functions/fnc_startCarry.sqf @@ -15,6 +15,7 @@ * * Public: No */ + params ["_unit", "_target"]; // Try to claim the object diff --git a/addons/dragging/functions/fnc_startCarryLocal.sqf b/addons/dragging/functions/fnc_startCarryLocal.sqf index 0f679f2d499..cf17dfb311d 100644 --- a/addons/dragging/functions/fnc_startCarryLocal.sqf +++ b/addons/dragging/functions/fnc_startCarryLocal.sqf @@ -41,6 +41,11 @@ private _timer = CBA_missionTime + 5; // Handle objects vs. persons if (_target isKindOf "CAManBase") then { + // Create clone for dead units + if (!alive _target) then { + _target = [_unit, _target] call FUNC(createClone); + }; + private _primaryWeapon = primaryWeapon _unit; // Add a primary weapon if the unit has none @@ -94,3 +99,6 @@ if (_mass > 1) then { _target setVariable [QGVAR(originalMass), _mass, true]; [QEGVAR(common,setMass), [_target, 1e-12]] call CBA_fnc_globalEvent; // Force global sync }; + +// API +[QGVAR(setupCarry), [_unit, _target]] call CBA_fnc_localEvent; diff --git a/addons/dragging/functions/fnc_startDrag.sqf b/addons/dragging/functions/fnc_startDrag.sqf index 8dd6db6dee5..d65f218acd7 100644 --- a/addons/dragging/functions/fnc_startDrag.sqf +++ b/addons/dragging/functions/fnc_startDrag.sqf @@ -15,6 +15,7 @@ * * Public: No */ + params ["_unit", "_target"]; // Try to claim the object diff --git a/addons/dragging/functions/fnc_startDragLocal.sqf b/addons/dragging/functions/fnc_startDragLocal.sqf index 20d5e007dbe..f0468f133ba 100644 --- a/addons/dragging/functions/fnc_startDragLocal.sqf +++ b/addons/dragging/functions/fnc_startDragLocal.sqf @@ -90,6 +90,11 @@ if !(_unit call EFUNC(common,isSwimming)) then { // Move a bit closer and adjust direction when trying to pick up a person if (_target isKindOf "CAManBase") then { + // Create clone for dead units + if (!alive _target) then { + _target = [_unit, _target] call FUNC(createClone); + }; + [QEGVAR(common,setDir), [_target, getDir _unit + 180], _target] call CBA_fnc_targetEvent; _target setPosASL (getPosASL _unit vectorAdd (vectorDir _unit vectorMultiply 1.5)); @@ -111,3 +116,6 @@ if (_mass > 1) then { _target setVariable [QGVAR(originalMass), _mass, true]; [QEGVAR(common,setMass), [_target, 1e-12]] call CBA_fnc_globalEvent; // Force global sync }; + +// API +[QGVAR(setupDrag), [_unit, _target]] call CBA_fnc_localEvent; diff --git a/addons/dragon/CfgAmmo.hpp b/addons/dragon/CfgAmmo.hpp index 22630e03b00..3a5a4a1ed6d 100644 --- a/addons/dragon/CfgAmmo.hpp +++ b/addons/dragon/CfgAmmo.hpp @@ -1,3 +1,4 @@ +class ace_missileguidance_type_Dragon; class CfgAmmo { class ammo_Penetrator_Base; class M_Scalpel_AT; @@ -37,41 +38,7 @@ class CfgAmmo { EGVAR(vehicle_damage,incendiary) = 1.0; - class ace_missileguidance { - pitchRate = 0; - yawRate = 0; - - canVanillaLock = 0; - - // Guidance type for munitions - defaultSeekerType = "SACLOS"; - seekerTypes[] = { "SACLOS" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - defaultNavigationType = "LineOfSight"; - navigationTypes[] = { "LineOfSight" }; - - seekLastTargetPos = 0; - seekerAngle = 30; - seekerAccuracy = 1; - - seekerMinRange = 65; - seekerMaxRange = 1000; - - correctionDistance = 30; - missileLeadDistance = 0; - offsetFromCrosshair[] = { 0, 0, 0 }; - - serviceInterval = 0.33; // how many seconds between pops - serviceCharges = 32; // how many charges are in this missile - serviceChargeAcceleration = 6.5; - dragonSpeed = 100; // meters per second - - defaultAttackProfile = "DRAGON"; - attackProfiles[] = {"DRAGON"}; - }; + class ace_missileguidance: ace_missileguidance_type_Dragon {}; }; class GVAR(super): GVAR(dragonBase) { @@ -81,36 +48,11 @@ class CfgAmmo { submunitionParentSpeedCoef = 0; submunitionInitialOffset[] = { 0, 0, -0.2 }; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance { enabled = 1; - - pitchRate = 0; - yawRate = 0; - - // Guidance type for munitions - defaultSeekerType = "SACLOS"; - seekerTypes[] = { "SACLOS" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - seekLastTargetPos = 0; - seekerAngle = 30; - seekerAccuracy = 1; - seekerMinRange = 30; seekerMaxRange = 1500; - - correctionDistance = 30; - missileLeadDistance = 0; - - serviceInterval = 0.33; // how many seconds between pops serviceCharges = 60; // how many charges are in this missile - serviceChargeAcceleration = 6.5; - dragonSpeed = 100; // meters per second - - defaultAttackProfile = "DRAGON"; - attackProfiles[] = {"DRAGON"}; }; }; diff --git a/addons/dragon/CfgVehicles.hpp b/addons/dragon/CfgVehicles.hpp index 13441c6c26a..9cc60771b51 100644 --- a/addons/dragon/CfgVehicles.hpp +++ b/addons/dragon/CfgVehicles.hpp @@ -107,7 +107,7 @@ class CfgVehicles { soundGetIn[] = {"A3\sounds_f\dummysound",0.00031622776,1,5}; armorStructural = 10.0; - class ACE_CSW { + class ace_csw { disassembleTo = QGVAR(super); }; diff --git a/addons/dragon/CfgWeapons.hpp b/addons/dragon/CfgWeapons.hpp index 9cb58e2c1f4..0bdd53e34f2 100644 --- a/addons/dragon/CfgWeapons.hpp +++ b/addons/dragon/CfgWeapons.hpp @@ -19,7 +19,7 @@ class CfgWeapons { descriptionShort = CSTRING(dragonDescription); scope = 2; - class ACE_CSW { + class ace_csw { type = "mount"; deployTime = 2; pickupTime = 2; @@ -75,7 +75,7 @@ class CfgWeapons { opticsZoomMin = 0.055; opticsZoomMax = 0.055; scope = 2; - class ACE_CSW { + class ace_csw { type = "weapon"; deployTime = 2; pickupTime = 1; diff --git a/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf b/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf index 58e3844c882..6642d7d7de0 100644 --- a/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf +++ b/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf @@ -23,7 +23,7 @@ _attackProfileStateParams params ["_maxCorrectableDistance", "_wireCut", "_seeke private _projectilePos = getPosASL _projectile; private _distanceToProjectile = (getPosASL _shooter) vectorDistanceSqr _projectilePos; -private _retPos = _projectilePos vectorAdd (AGLtoASL (_projectile vectorModelToWorld [0, 50, 0])); +private _retPos = _projectilePos vectorAdd (AGLToASL (_projectile vectorModelToWorld [0, 50, 0])); // _shooter returns the vehicle that shot it. If the launcher dies, the wire would probably be cut so assume it if ((_distanceToProjectile > _seekerMaxRangeSqr) || _wireCut || { !alive _shooter }) exitWith { diff --git a/addons/dragon/functions/fnc_onFired.sqf b/addons/dragon/functions/fnc_onFired.sqf index 4228f5dff0e..5e56a045081 100644 --- a/addons/dragon/functions/fnc_onFired.sqf +++ b/addons/dragon/functions/fnc_onFired.sqf @@ -15,6 +15,8 @@ * * Public: No */ +#define DEFAULT_CORRECTION_DISTANCE 2 + params ["_firedEH", "", "", "_seekerParams", "_stateParams"]; _firedEH params ["_shooter","_weapon","","","","","_projectile"]; _stateParams params ["", "", "_attackProfileStateParams"]; diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index cee1cf99c33..bfe48d8fa9e 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -8,20 +8,33 @@ class CfgAmmo { // GVAR(size) = 0; is small size // GVAR(size) = 1; is large size - class DirectionalBombBase; - class ClaymoreDirectionalMine_Remote_Ammo: DirectionalBombBase { + class ClaymoreDirectionalMine_Remote_Ammo; + class ACE_ClaymoreDirectionalMine_Remote_Ammo: ClaymoreDirectionalMine_Remote_Ammo { // Wrapper class to avoid unintentional changes to third-party mods. Ref #10105 GVAR(magazine) = "ClaymoreDirectionalMine_Remote_Mag"; GVAR(size) = 0; GVAR(defuseObjectPosition)[] = {0, 0, 0.038}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; + + // Reduce vanilla damage, so that it doesn't destroy buildings + hit = 10; + indirectHit = 10; }; + class DirectionalBombBase; class APERSTripMine_Wire_Ammo: DirectionalBombBase { GVAR(defuseObjectPosition)[] = {-1.415, 0, 0.12}; GVAR(size) = 0; }; + class APERSBoundingMine_Range_Ammo; + class ACE_APERSBoundingMine_Range_Ammo: APERSBoundingMine_Range_Ammo { + // Reduce vanilla damage, so that it doesn't destroy buildings + hit = 10; + indirectHit = 10; + CraterEffects = "MineCrater"; + }; + class ACE_FlareTripMine_Wire_Ammo: APERSTripMine_Wire_Ammo { SoundSetExplosion[] = {}; defaultMagazine = "ACE_FlareTripMine_Mag"; // Mag that gets dropped after defuse @@ -46,9 +59,16 @@ class CfgAmmo { GVAR(size) = 0; }; + // More sensitive pressure-fuze for the Vanilla AT Mine. + class MineBase; + class ATMine_Range_Ammo: MineBase { + mineTrigger = "ACE_TankTriggerLight"; + }; + // "The SLAM has an anti-tamper feature that is only active in the bottom- and side-attack modes." class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase { indirectHitRange = 20; + explosionAngle = 60; GVAR(explodeOnDefuseChance) = 1; GVAR(magazine) = "SLAMDirectionalMine_Wire_Mag"; GVAR(size) = 0; @@ -64,14 +84,16 @@ class CfgAmmo { class ACE_SLAMDirectionalMine_Magnetic_Ammo: SLAMDirectionalMine_Wire_Ammo { mineTrigger = "ACE_MagneticTrigger"; GVAR(explodeOnDefuseChance) = 1; - explosionAngle = 360; - indirectHitRange = 1; + explosionAngle = 60; + hit = 3000; + indirectHit = 3000; + indirectHitRange = 10; mineInconspicuousness = 25; icon = "iconExplosiveGP"; }; - class PipeBombBase; - class DemoCharge_Remote_Ammo: PipeBombBase { + class DemoCharge_Remote_Ammo; + class ACE_DemoCharge_Remote_Ammo: DemoCharge_Remote_Ammo { GVAR(magazine) = "DemoCharge_Remote_Mag"; GVAR(size) = 0; GVAR(defuseObjectPosition)[] = {0.07, 0, 0.055}; @@ -81,6 +103,7 @@ class CfgAmmo { indirectHit = 500; indirectHitRange = 7; }; + class PipeBombBase; class SatchelCharge_Remote_Ammo: PipeBombBase { GVAR(magazine) = "SatchelCharge_Remote_Mag"; GVAR(size) = 0; @@ -157,7 +180,6 @@ class CfgAmmo { GVAR(size) = 0; GVAR(defuseObjectPosition)[] = {0, 0, 0.15}; }; - class MineBase; class UnderwaterMine_Range_Ammo: MineBase { GVAR(size) = 1; }; diff --git a/addons/explosives/CfgEventHandlers.hpp b/addons/explosives/CfgEventHandlers.hpp index 3b9e7077284..fe3119a580b 100644 --- a/addons/explosives/CfgEventHandlers.hpp +++ b/addons/explosives/CfgEventHandlers.hpp @@ -44,4 +44,9 @@ class Extended_Init_EventHandlers { class ACE_Explosives_Place_SLAM { ADDON = QUOTE(params ['_mine']; if (local _mine) then {_mine setCenterOfMass [ARR_3(0,-0.035,0.05)]; _mine setMass 5}); }; + class ACE_ModuleMine_SLAMBottomMine { + class ADDON { + init = QUOTE(params ['_mine']; if (local _mine) then { [ARR_2({_this call CALLSTACK(BIS_fnc_setPitchBank)},[ARR_3(_mine,MINE_PITCH_UP,0)])] call CBA_fnc_execNextFrame }); + }; + }; }; diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index 89591f2bd69..71e374be1d5 100644 --- a/addons/explosives/CfgMagazines.hpp +++ b/addons/explosives/CfgMagazines.hpp @@ -87,7 +87,7 @@ class CfgMagazines { displayName = CSTRING(SLAME_Magnetic); digDistance = 0; ammo = "ACE_SLAMDirectionalMine_Magnetic_Ammo"; - pitch = 90; + pitch = MINE_PITCH_UP; }; class IRSensor { displayName = CSTRING(SLAME_IRSensor); diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 0a67a9a608d..bf3eb1b12bd 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -364,7 +364,6 @@ class CfgVehicles { author = ECSTRING(common,aceteam); ammo = "ACE_SLAMDirectionalMine_Magnetic_Ammo"; displayName = CSTRING(Module_SLAMBottomAttack_DisplayName); - // TODO: Find a way to place the mine laying down instead of standing up }; class APERSTripMine: MineBase {}; @@ -374,6 +373,18 @@ class CfgVehicles { displayName = CSTRING(TripFlare_Name); }; + class Claymore_F: MineBase { + ammo = "ACE_ClaymoreDirectionalMine_Remote_Ammo"; + }; + + class APERSBoundingMine: MineBase { + ammo = "ACE_APERSBoundingMine_Range_Ammo"; + }; + + class DemoCharge_F: MineBase { + ammo = "ACE_DemoCharge_Remote_Ammo"; + }; + class IEDUrbanBig_F; class ACE_IEDUrbanBig_Range: IEDUrbanBig_F { author = ECSTRING(common,aceteam); diff --git a/addons/explosives/ExplosivesUI.hpp b/addons/explosives/ExplosivesUI.hpp index ef32c0c04b6..1b14ba5e887 100644 --- a/addons/explosives/ExplosivesUI.hpp +++ b/addons/explosives/ExplosivesUI.hpp @@ -12,10 +12,10 @@ class Rsc_ACE_CallScreen_Edit: RscEdit { text = ""; style = "0x00 + 0x40 + 0x200"; shadow = 1; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) * 1)"; - x = "0.288594 * safezoneW + safezoneX"; - w = "0.0825 * safezoneW"; - h = "0.044 * safezoneH"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 20) * 1)"; + x = "0.288594 * safeZoneW + safeZoneX"; + w = "0.0825 * safeZoneW"; + h = "0.044 * safeZoneH"; }; class Rsc_ACE_HiddenButton: RscButton { colorText[] = {0, 0, 0, 0}; @@ -40,175 +40,175 @@ class Rsc_ACE_PhoneInterface { class RscPicture_1200: RscPicture { idc = 1200; text = QPATHTOF(Data\UI\Cellphone_Background.paa); - x = "0.231875 * safezoneW + safezoneX"; - y = "0.104 * safezoneH + safezoneY"; - w = "0.195937 * safezoneW"; - h = "0.704 * safezoneH"; + x = "0.231875 * safeZoneW + safeZoneX"; + y = "0.104 * safeZoneH + safeZoneY"; + w = "0.195937 * safeZoneW"; + h = "0.704 * safeZoneH"; }; class numkey_1: Rsc_ACE_NumKeyButton { idc = 1600; - x = "0.278281 * safezoneW + safezoneX"; - y = "0.533 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.278281 * safeZoneW + safeZoneX"; + y = "0.533 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "1"; action = "ctrlSetText [1400,((ctrlText 1400) + '1')];"; }; class numkey_2: Rsc_ACE_NumKeyButton { idc = 1601; - x = "0.314375 * safezoneW + safezoneX"; - y = "0.533 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.314375 * safeZoneW + safeZoneX"; + y = "0.533 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "2"; action = "ctrlSetText [1400,((ctrlText 1400) + '2')];"; }; class numkey_3: Rsc_ACE_NumKeyButton { idc = 1602; - x = "0.350469 * safezoneW + safezoneX"; - y = "0.533 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.350469 * safeZoneW + safeZoneX"; + y = "0.533 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "3"; action = "ctrlSetText [1400,((ctrlText 1400) + '3')];"; }; class numkey_4: Rsc_ACE_NumKeyButton { idc = 1603; - x = "0.278281 * safezoneW + safezoneX"; - y = "0.577 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.278281 * safeZoneW + safeZoneX"; + y = "0.577 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "4"; action = "ctrlSetText [1400,((ctrlText 1400) + '4')];"; }; class numkey_5: Rsc_ACE_NumKeyButton { idc = 1604; - x = "0.314375 * safezoneW + safezoneX"; - y = "0.577 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.314375 * safeZoneW + safeZoneX"; + y = "0.577 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "5"; action = "ctrlSetText [1400,((ctrlText 1400) + '5')];"; }; class numkey_6: Rsc_ACE_NumKeyButton { idc = 1605; - x = "0.350469 * safezoneW + safezoneX"; - y = "0.577 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.350469 * safeZoneW + safeZoneX"; + y = "0.577 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "6"; action = "ctrlSetText [1400,((ctrlText 1400) + '6')];"; }; class numkey_7: Rsc_ACE_NumKeyButton { idc = 1606; - x = "0.278281 * safezoneW + safezoneX"; - y = "0.621 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.278281 * safeZoneW + safeZoneX"; + y = "0.621 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "7"; action = "ctrlSetText [1400,((ctrlText 1400) + '7')];"; }; class numkey_8: Rsc_ACE_NumKeyButton { idc = 1607; - x = "0.314375 * safezoneW + safezoneX"; - y = "0.621 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.314375 * safeZoneW + safeZoneX"; + y = "0.621 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "8"; action = "ctrlSetText [1400,((ctrlText 1400) + '8')];"; }; class numkey_9: Rsc_ACE_NumKeyButton { idc = 1608; - x = "0.350469 * safezoneW + safezoneX"; - y = "0.621 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.350469 * safeZoneW + safeZoneX"; + y = "0.621 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "9"; action = "ctrlSetText [1400,((ctrlText 1400) + '9')];"; }; class numkey_0: Rsc_ACE_NumKeyButton { idc = 1609; - x = "0.314375 * safezoneW + safezoneX"; - y = "0.676 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.314375 * safeZoneW + safeZoneX"; + y = "0.676 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = "0"; action = "ctrlSetText [1400,((ctrlText 1400) + '0')];"; }; class speedDialAdd: Rsc_ACE_NumKeyButton { idc = 1610; - x = "0.278281 * safezoneW + safezoneX"; - y = "0.676 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.278281 * safeZoneW + safeZoneX"; + y = "0.676 * safeZoneH + safeZoneY"; + w = "0.0309375 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = CSTRING(Phone_AddToSpeedDial); action = QUOTE([ARR_2(ctrlText 1401,ctrlText 1400)] call FUNC(addToSpeedDial)); }; class clear: Rsc_ACE_HiddenButton { idc = 1610; - x = "0.278281 * safezoneW + safezoneX"; - y = "0.445 * safezoneH + safezoneY"; - w = "0.020625 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.278281 * safeZoneW + safeZoneX"; + y = "0.445 * safeZoneH + safeZoneY"; + w = "0.020625 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = CSTRING(Clear); action = QUOTE(ctrlSetText [ARR_2(1400,'')];[ctrlText 1401] call FUNC(removeFromSpeedDial);ctrlSetText [ARR_2(1401,'')];); }; class dial: Rsc_ACE_HiddenButton { idc = 1611; - x = "0.309219 * safezoneW + safezoneX"; - y = "0.445 * safezoneH + safezoneY"; - w = "0.04125 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.309219 * safeZoneW + safeZoneX"; + y = "0.445 * safeZoneH + safeZoneY"; + w = "0.04125 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = CSTRING(Phone_Dial); action = QUOTE([ARR_2(ace_player,ctrlText 1400)] call FUNC(dialPhone)); }; class up: Rsc_ACE_HiddenButton { idc = 1612; - x = "0.360781 * safezoneW + safezoneX"; - y = "0.445 * safezoneH + safezoneY"; - w = "0.020625 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.360781 * safeZoneW + safeZoneX"; + y = "0.445 * safeZoneH + safeZoneY"; + w = "0.020625 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = CSTRING(Phone_Up); action = QUOTE([true] call FUNC(setSpeedDial)); }; class down: Rsc_ACE_HiddenButton { idc = 1613; - x = "0.345312 * safezoneW + safezoneX"; - y = "0.485 * safezoneH + safezoneY"; - w = "0.020625 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.345312 * safeZoneW + safeZoneX"; + y = "0.485 * safeZoneH + safeZoneY"; + w = "0.020625 * safeZoneW"; + h = "0.033 * safeZoneH"; tooltip = CSTRING(Phone_Down); action = QUOTE([false] call FUNC(setSpeedDial)); }; class speedDial_Text: RscText { idc = 1405; - y = "0.302 * safezoneH + safezoneY"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 22) * 1)"; - x = "0.288594 * safezoneW + safezoneX"; - w = "0.0825 * safezoneW"; - h = "0.044 * safezoneH"; + y = "0.302 * safeZoneH + safeZoneY"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 22) * 1)"; + x = "0.288594 * safeZoneW + safeZoneX"; + w = "0.0825 * safeZoneW"; + h = "0.044 * safeZoneH"; text = "Name"; }; class speedDial_edit: Rsc_ACE_CallScreen_Edit { idc = 1401; - y = "0.302 * safezoneH + safezoneY"; - x = "0.318 * safezoneW + safezoneX"; + y = "0.302 * safeZoneH + safeZoneY"; + x = "0.318 * safeZoneW + safeZoneX"; w = "0.1"; }; class numberEdit_Text: RscText { idc = 1406; - y = "0.348 * safezoneH + safezoneY"; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 22) * 1)"; - x = "0.288594 * safezoneW + safezoneX"; - w = "0.0825 * safezoneW"; - h = "0.044 * safezoneH"; + y = "0.348 * safeZoneH + safeZoneY"; + SizeEx = "(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 22) * 1)"; + x = "0.288594 * safeZoneW + safeZoneX"; + w = "0.0825 * safeZoneW"; + h = "0.044 * safeZoneH"; text = "#"; }; class number_edit: Rsc_ACE_CallScreen_Edit { canModify = 0; idc = 1400; - y = "0.348 * safezoneH + safezoneY"; - x = "0.3 * safezoneW + safezoneX"; + y = "0.348 * safeZoneH + safeZoneY"; + x = "0.3 * safeZoneW + safeZoneX"; }; }; }; diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index f47dbbe5bd2..4331ba3596c 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -22,9 +22,8 @@ _this call FUNC(setPosition); if (isServer) then { - if (missionNamespace getVariable [QGVAR(setShotParents), true]) then { - _explosive setShotParents [_unit, _unit]; - }; + private _owner = [objNull, _unit] select (missionNamespace getVariable [QGVAR(setShotParents), false]); + _explosive setShotParents [_owner, _unit]; }; }] call CBA_fnc_addEventHandler; [QGVAR(startDefuse), LINKFUNC(startDefuse)] call CBA_fnc_addEventHandler; @@ -35,9 +34,8 @@ if (isServer) then { [QGVAR(detonate), { params ["_unit", "_explosive", "_delay"]; TRACE_3("server detonate EH",_unit,_explosive,_delay); - if (missionNamespace getVariable [QGVAR(setShotParents), true]) then { - _explosive setShotParents [_unit, _unit]; - }; + private _owner = [objNull, _unit] select (missionNamespace getVariable [QGVAR(setShotParents), false]); + _explosive setShotParents [_owner, _unit]; [{ params ["_explosive"]; TRACE_1("exploding",_explosive); @@ -53,6 +51,14 @@ if (isServer) then { TRACE_1("Knocked Out, Doing Deadman",_unit); [_unit] call FUNC(onIncapacitated); }] call CBA_fnc_addEventHandler; + + // Orient all Editor-placed SLAM (Bottom attack) mines facing upward + { + private _mine = _x; + if (typeOf _mine == "ACE_SLAMDirectionalMine_Magnetic_Ammo") then { + [_mine, MINE_PITCH_UP, 0] call CALLSTACK(BIS_fnc_setPitchBank); + }; + } forEach allMines; }; if (!hasInterface) exitWith {}; diff --git a/addons/explosives/config.cpp b/addons/explosives/config.cpp index db2e48fa8da..00909533ac9 100644 --- a/addons/explosives/config.cpp +++ b/addons/explosives/config.cpp @@ -54,9 +54,15 @@ class CfgActions { }; class CfgMineTriggers { - class RangeTrigger; - class ACE_MagneticTrigger: RangeTrigger { - mineMagnetic = 1; - mineTriggerRange = 1; + class IRTrigger; + class ACE_MagneticTrigger: IRTrigger { + mineWireEnd[] = {0,0.1,0.5}; + }; + + class TankTriggerMagnetic; + class ACE_TankTriggerLight: TankTriggerMagnetic { + // Reduce mass needed to trigger vanilla AT Mine to realistic levels (https://en.wikipedia.org/wiki/M15_mine#Specifications). + // Will now trigger for any vehicle heavier than the Vanilla ATV (280kg) + mineTriggerMass = 300; // Default: 7000 }; }; diff --git a/addons/explosives/functions/fnc_addClacker.sqf b/addons/explosives/functions/fnc_addClacker.sqf index 794aec0a107..ace01a15265 100644 --- a/addons/explosives/functions/fnc_addClacker.sqf +++ b/addons/explosives/functions/fnc_addClacker.sqf @@ -34,7 +34,7 @@ private _detonators = [_unit] call FUNC(getDetonators); } forEach _requiredItems; if !(_hasRequired) exitWith {}; -private _config = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> configName _config; +private _config = configFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> configName _config; private _clacker = _unit getVariable [QGVAR(Clackers), []]; GVAR(PlacedCount) = GVAR(PlacedCount) + 1; diff --git a/addons/explosives/functions/fnc_addDetonateActions.sqf b/addons/explosives/functions/fnc_addDetonateActions.sqf index 0001edffcb0..ddda60e4abd 100644 --- a/addons/explosives/functions/fnc_addDetonateActions.sqf +++ b/addons/explosives/functions/fnc_addDetonateActions.sqf @@ -19,33 +19,44 @@ params ["_unit", "_detonator"]; TRACE_2("params",_unit,_detonator); -private _range = getNumber (ConfigFile >> "CfgWeapons" >> _detonator >> QGVAR(Range)); +private _detonatorConfig = configFile >> "CfgWeapons" >> _detonator; +private _range = getNumber (_detonatorConfig >> QGVAR(Range)); private _result = [_unit] call FUNC(getPlacedExplosives); private _children = []; private _explosivesList = []; { if (!isNull(_x select 0)) then { - private _required = getArray (ConfigFile >> "ACE_Triggers" >> (_x select 4) >> "requires"); + private _required = getArray (configFile >> "ACE_Triggers" >> (_x select 4) >> "requires"); if (_detonator in _required) then { - private _item = ConfigFile >> "CfgMagazines" >> (_x select 3); + private _item = configFile >> "CfgMagazines" >> (_x select 3); _explosivesList pushBack _x; - _children pushBack + // Prevent consolidated detonate actions from having the same icon as consolidated place actions of the same explosive type + private _icon = if ( + EGVAR(interact_menu,consolidateSingleChild) && + {_detonator == GVAR(activeTrigger)} && + {count (_result select {(_x select 4) == getText (_detonatorConfig >> QGVAR(triggerType))}) < 2} + ) then { + getText (_detonatorConfig >> "picture") + } else { + getText (_item >> "picture") + }; + + _children pushBack [ [ - [ - format ["Explosive_%1", _forEachIndex], - _x select 2, - getText(_item >> "picture"), - {(_this select 2) call FUNC(detonateExplosive);}, - {true}, - {}, - [_unit,_range,_x,_detonator] - ] call EFUNC(interact_menu,createAction), - [], - _unit - ]; + format ["Explosive_%1", _forEachIndex], + _x select 2, + _icon, + {(_this select 2) call FUNC(detonateExplosive);}, + {true}, + {}, + [_unit,_range,_x,_detonator] + ] call EFUNC(interact_menu,createAction), + [], + _unit + ]; }; }; } forEach _result; @@ -81,7 +92,7 @@ if (_detonator != "ACE_DeadManSwitch") then { [ "Explosive_All", LLSTRING(DetonateAll), - getText (configFile >> "CfgWeapons" >> _detonator >> "picture"), + getText (_detonatorConfig >> "picture"), {(_this select 2) call FUNC(detonateExplosiveAll);}, {true}, {}, @@ -107,7 +118,7 @@ if (_detonator != "ACE_DeadManSwitch") then { [ "Explosive_All_Deadman", LLSTRING(DetonateAll), - getText (configFile >> "CfgWeapons" >> _detonator >> "picture"), + getText (_detonatorConfig >> "picture"), {[_player] call FUNC(onIncapacitated)}, {true} ] call EFUNC(interact_menu,createAction), diff --git a/addons/explosives/functions/fnc_addTransmitterActions.sqf b/addons/explosives/functions/fnc_addTransmitterActions.sqf index 043c9db661f..d225aeda056 100644 --- a/addons/explosives/functions/fnc_addTransmitterActions.sqf +++ b/addons/explosives/functions/fnc_addTransmitterActions.sqf @@ -21,7 +21,7 @@ TRACE_1("params",_unit); private _detonators = [_unit] call FUNC(getDetonators); private _children = []; { - private _config = ConfigFile >> "CfgWeapons" >> _x; + private _config = configFile >> "CfgWeapons" >> _x; _children pushBack [ [ diff --git a/addons/explosives/functions/fnc_addTriggerActions.sqf b/addons/explosives/functions/fnc_addTriggerActions.sqf index b6b6e0ce415..8be63fbc4f9 100644 --- a/addons/explosives/functions/fnc_addTriggerActions.sqf +++ b/addons/explosives/functions/fnc_addTriggerActions.sqf @@ -22,7 +22,7 @@ TRACE_2("params",_magazine,_explosive); private _isAttached = !isNull (attachedTo _explosive); private _detonators = [ACE_player] call FUNC(getDetonators); private _triggerTypes = [_magazine] call FUNC(triggerType); -private _magTriggers = ConfigFile >> "CfgMagazines" >> _magazine >> "ACE_Triggers"; +private _magTriggers = configFile >> "CfgMagazines" >> _magazine >> "ACE_Triggers"; private _children = []; { private _required = getArray (_x >> "requires"); diff --git a/addons/explosives/functions/fnc_defuseExplosive.sqf b/addons/explosives/functions/fnc_defuseExplosive.sqf index 049fff88469..1c8b687c8f3 100644 --- a/addons/explosives/functions/fnc_defuseExplosive.sqf +++ b/addons/explosives/functions/fnc_defuseExplosive.sqf @@ -19,7 +19,7 @@ params ["_unit", "_explosive"]; TRACE_2("params",_unit,_explosive); -if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo" >> typeOf _explosive >> QGVAR(explodeOnDefuseChance)))}) exitWith { +if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (configFile >> "CfgAmmo" >> typeOf _explosive >> QGVAR(explodeOnDefuseChance)))}) exitWith { TRACE_1("exploding on defuse",_explosive); [_unit, -1, [_explosive, 1], "#ExplodeOnDefuse"] call FUNC(detonateExplosive); [QGVAR(explodeOnDefuse), [_explosive, _unit]] call CBA_fnc_globalEvent; diff --git a/addons/explosives/functions/fnc_getPlacedExplosives.sqf b/addons/explosives/functions/fnc_getPlacedExplosives.sqf index 867bae2275f..5b64512439f 100644 --- a/addons/explosives/functions/fnc_getPlacedExplosives.sqf +++ b/addons/explosives/functions/fnc_getPlacedExplosives.sqf @@ -16,14 +16,13 @@ * * Public: Yes */ -// IGNORE_PRIVATE_WARNING(_allExplosives,_deadmanExplosives); params ["_unit"]; TRACE_1("params",_unit); private _filter = nil; if (count _this > 1) then { - _filter = ConfigFile >> "ACE_Triggers" >> (_this select 1); + _filter = configFile >> "ACE_Triggers" >> (_this select 1); }; private _clackerList = []; private _adjustedList = false; @@ -34,7 +33,7 @@ private _list = []; _clackerList set [_forEachIndex, "X"]; _adjustedList = true; } else { - if (isNil "_filter" || {(ConfigFile >> "ACE_Triggers" >> (_x select 4)) == _filter}) then { + if (isNil "_filter" || {(configFile >> "ACE_Triggers" >> (_x select 4)) == _filter}) then { _list pushBack _x; }; }; diff --git a/addons/explosives/functions/fnc_hasPlacedExplosives.sqf b/addons/explosives/functions/fnc_hasPlacedExplosives.sqf index c697afb371a..43dbb38b85f 100644 --- a/addons/explosives/functions/fnc_hasPlacedExplosives.sqf +++ b/addons/explosives/functions/fnc_hasPlacedExplosives.sqf @@ -14,6 +14,5 @@ * * Public: Yes */ -// IGNORE_PRIVATE_WARNING(_hasPlacedExplosives); (count (_this call FUNC(getPlacedExplosives)) > 0) diff --git a/addons/explosives/functions/fnc_interactEH.sqf b/addons/explosives/functions/fnc_interactEH.sqf index 194dc7414bb..a557bea8c00 100644 --- a/addons/explosives/functions/fnc_interactEH.sqf +++ b/addons/explosives/functions/fnc_interactEH.sqf @@ -24,7 +24,7 @@ TRACE_1("Explosives interactEH",_interactionType); // If player somehow gets a defusal kit during keyDown, they will just have to reopen menu if ( _interactionType != 0 - || {vehicle ACE_player != ACE_player} + || {!isNull objectParent ACE_player} || {(ACE_player call EFUNC(common,uniqueItems)) findAny GVAR(defusalKits) == -1} ) exitWith {}; diff --git a/addons/explosives/functions/fnc_onInventoryChanged.sqf b/addons/explosives/functions/fnc_onInventoryChanged.sqf index 7cf01c2a142..d5f1077dc2d 100644 --- a/addons/explosives/functions/fnc_onInventoryChanged.sqf +++ b/addons/explosives/functions/fnc_onInventoryChanged.sqf @@ -23,7 +23,7 @@ TRACE_3("params",_receiver,_giver,_item); if ((_receiver != ace_player) && {_giver != ace_player}) exitWith {}; -private _config = ConfigFile >> "CfgWeapons" >> _item; +private _config = configFile >> "CfgWeapons" >> _item; if (isClass _config && {getNumber(_config >> QGVAR(Detonator)) == 1}) then { private _clackerItems = _giver getVariable [QGVAR(Clackers), []]; _receiver setVariable [QGVAR(Clackers), (_receiver getVariable [QGVAR(Clackers), []]) + _clackerItems, true]; diff --git a/addons/explosives/functions/fnc_openTimerUI.sqf b/addons/explosives/functions/fnc_openTimerUI.sqf index c8d3707ed19..391c71b3b24 100644 --- a/addons/explosives/functions/fnc_openTimerUI.sqf +++ b/addons/explosives/functions/fnc_openTimerUI.sqf @@ -64,14 +64,14 @@ _display displayAddEventHandler ["MouseZChanged", { [{ params ["_display", "_pfhID"]; - // Make sure explosive still exists and is near player - if ((!isNull _display) && {!alive ACE_player} || {!alive GVAR(explosive)} || {(ACE_player distance GVAR(explosive)) > 5}) exitWith { - INFO_2("%1's explosive %2 became invalid",ACE_player,GVAR(explosive)); - closeDialog 0; + if (isNull _display || {!alive ACE_player}) exitWith { _pfhID call CBA_fnc_removePerFrameHandler; }; - if (isNull _display) exitWith { + // Make sure explosive still exists and is near player + if (!alive GVAR(explosive) || {(ACE_player distance GVAR(explosive)) > 5}) exitWith { + INFO_2("%1's explosive %2 became invalid",ACE_player,GVAR(explosive)); + closeDialog 0; _pfhID call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/explosives/functions/fnc_placeExplosive.sqf b/addons/explosives/functions/fnc_placeExplosive.sqf index ec19a6f6fd9..bb6fcea6ab3 100644 --- a/addons/explosives/functions/fnc_placeExplosive.sqf +++ b/addons/explosives/functions/fnc_placeExplosive.sqf @@ -37,15 +37,15 @@ if (isNil "_triggerConfig") exitWith { objNull }; -private _magazineTrigger = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> _triggerConfig; -_triggerConfig = ConfigFile >> "ACE_Triggers" >> _triggerConfig; +private _magazineTrigger = configFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> _triggerConfig; +_triggerConfig = configFile >> "ACE_Triggers" >> _triggerConfig; if (isNil "_triggerConfig") exitWith { ERROR_1("Config not found in PlaceExplosive: %1",_this); objNull }; -private _ammo = getText(ConfigFile >> "CfgMagazines" >> _magazineClass >> "ammo"); +private _ammo = getText(configFile >> "CfgMagazines" >> _magazineClass >> "ammo"); if (isText(_magazineTrigger >> "ammo")) then { _ammo = getText (_magazineTrigger >> "ammo"); }; diff --git a/addons/explosives/functions/fnc_selectTrigger.sqf b/addons/explosives/functions/fnc_selectTrigger.sqf index 7c7d5e58d46..0a864a77c48 100644 --- a/addons/explosives/functions/fnc_selectTrigger.sqf +++ b/addons/explosives/functions/fnc_selectTrigger.sqf @@ -20,7 +20,7 @@ params ["_explosive", "_magazine", "_trigger"]; TRACE_3("params",_explosive,_magazine,_trigger); -private _config = ConfigFile >> "ACE_Triggers" >> _trigger; +private _config = configFile >> "ACE_Triggers" >> _trigger; // Make selected trigger the active one (for keybind) if it's the first to be connected private _activeTrigger = GVAR(activeTrigger); diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index d25e5d3276a..9214b999146 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -78,7 +78,7 @@ GVAR(TweakedAngle) = 0; { private _testPos = _testBase vectorAdd [0.1 * (_x select 0) * (cos _cameraAngle), 0.1 * (_x select 0) * (sin _cameraAngle), 0.1 * (_x select 1)]; #ifdef DEBUG_MODE_FULL - drawLine3d [(eyePos _unit) call EFUNC(common,ASLToPosition), (_testPos) call EFUNC(common,ASLToPosition), [1,0,0,1]]; + drawLine3D [(eyePos _unit) call EFUNC(common,ASLToPosition), (_testPos) call EFUNC(common,ASLToPosition), [1,0,0,1]]; #endif if ((lineIntersectsSurfaces [eyePos _unit, _testPos, _unit]) isNotEqualTo []) exitWith {_return = false;}; } forEach [[0,0], [-1,-1], [1,-1], [-1,1], [1,1]]; @@ -167,7 +167,7 @@ GVAR(TweakedAngle) = 0; if (isNull _attachVehicle) then { _placeAngle = _cameraAngle - GVAR(TweakedAngle) + 180; - _expSetupVehicle setPosAsl _virtualPosASL; + _expSetupVehicle setPosASL _virtualPosASL; _expSetupVehicle setDir _placeAngle; _placeAngle = _placeAngle + 180; //CfgAmmos seem to be 180 for some reason } else { diff --git a/addons/explosives/functions/fnc_startDefuse.sqf b/addons/explosives/functions/fnc_startDefuse.sqf index e023592547c..ef3efac885f 100644 --- a/addons/explosives/functions/fnc_startDefuse.sqf +++ b/addons/explosives/functions/fnc_startDefuse.sqf @@ -25,8 +25,8 @@ private _fnc_DefuseTime = { params ["_specialist", "_target"]; TRACE_2("defuseTime",_specialist,_target); private _defuseTime = 5; - if (isNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime))) then { - _defuseTime = getNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime)); + if (isNumber(configFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime))) then { + _defuseTime = getNumber(configFile >> "CfgAmmo" >> typeOf (_target) >> QGVAR(DefuseTime)); }; if (!_specialist && {GVAR(PunishNonSpecialists)}) then { _defuseTime = _defuseTime * 1.5; @@ -34,7 +34,7 @@ private _fnc_DefuseTime = { _defuseTime }; private _actionToPlay = "MedicOther"; -if (STANCE _unit == "Prone") then { +if (stance _unit == "Prone") then { _actionToPlay = "PutDown"; }; diff --git a/addons/explosives/functions/fnc_triggerType.sqf b/addons/explosives/functions/fnc_triggerType.sqf index 0fba459491b..aa890c049f2 100644 --- a/addons/explosives/functions/fnc_triggerType.sqf +++ b/addons/explosives/functions/fnc_triggerType.sqf @@ -19,10 +19,10 @@ params ["_magazineClassname"]; TRACE_1("params",_magazineClassname); private _result = []; -private _config = getArray (ConfigFile >> "CfgMagazines" >> _magazineClassname >> "ACE_Triggers" >> "SupportedTriggers"); +private _config = getArray (configFile >> "CfgMagazines" >> _magazineClassname >> "ACE_Triggers" >> "SupportedTriggers"); private _count = count _config; for "_index" from 0 to (_count - 1) do { - _result set [_index, ConfigFile >> "ACE_Triggers" >> (_config select _index)]; + _result set [_index, configFile >> "ACE_Triggers" >> (_config select _index)]; }; _result diff --git a/addons/explosives/script_component.hpp b/addons/explosives/script_component.hpp index 77ca89d32e5..de27ff45c03 100644 --- a/addons/explosives/script_component.hpp +++ b/addons/explosives/script_component.hpp @@ -34,3 +34,5 @@ #define PLACE_WAITING -1 #define PLACE_CANCEL 0 #define PLACE_APPROVE 1 + +#define MINE_PITCH_UP 90 diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 168a8302542..d8397320b88 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -221,7 +221,7 @@ Ativar Thor III Активировать Thor III Thor III を使う - Thor III 켜기 + 토르 III 켜기 开启索尔三型 開啟索爾三型 Thor III ü aç @@ -238,7 +238,7 @@ Desativar Thor III Деактивировать Thor III Thor III を止める - Thor III 끄기 + 토르 III 끄기 关闭索尔三型 關閉索爾三型 Thor III ü kapat @@ -847,7 +847,7 @@ Требуется ли специалист по минному делу для обезвреживания взрывчатки? По умолчанию: Нет Richiedi specialisti esplosivi per disabilitare esplosivi? Predefinito: No 爆発物を無効にするために爆発物専門兵の特性を必要としますか? デフォルト: 不要 - 폭발물을 해제하기 위해서는 전문가가 필요합니까? 기본설정: 아니요 + 폭발물을 해체하기 위해서는 전문가가 필요합니까? 기본설정: 아니요 需要爆破专业兵才能拆除爆炸物? 预设:否 需要炸彈專家才能拆除炸彈? 預設: 否 Patlayıcı uzmanlarının patlayıcıları etkisiz hale getirmesini ister misiniz? Varsayılan: Hayır @@ -880,7 +880,7 @@ Увеличивать время завершения действий для не-специалистов? По умолчанию: Нет Aumenta il tempo richiesto per completare azioni per non-specialisti? Predefinito: Si 専門兵以外がアクション完了するのに必要な時間を増加しますか? デフォルト: 有効 - 비전문가가 폭발물을 해제 시 더욱 많은 시간을 소요합니까? 기본설정: 예 + 비전문가가 폭발물을 해체 시 더욱 많은 시간을 소요합니까? 기본설정: 예 增加非专业人员相关操作的时间? 预设:是 增加非專業人員相關操作的時間? 預設: 是 @@ -896,7 +896,7 @@ Взрыв при разминировании? Detona se disarmati? 解除中に爆発するか? - 해제 시 폭발합니까? + 해체 시 폭발합니까? 拆除时引爆? 拆除時引爆? @@ -912,7 +912,7 @@ Разрешить определенным взрывным устройствам взрываться при разминировании? По умолчанию: Да Permettere ad alcuni esplosivi di esplodere quando si tenta il disinnesco? Predefinito: Si 特定の爆発物を解除中に爆発可能にしますか? デフォルト: 有効 - 특정 폭발물이 해제 시 폭발하게 합니까? 기본설정: 예 + 특정 폭발물이 해체 시 폭발하게 합니까? 기본설정: 예 启用后,某些爆炸物会在拆除时引爆? 预设:是 啟用後, 某些炸彈會在拆除時引爆? 預設: 是 diff --git a/addons/fastroping/XEH_postInit.sqf b/addons/fastroping/XEH_postInit.sqf index 1daecbb715b..c28fb065179 100644 --- a/addons/fastroping/XEH_postInit.sqf +++ b/addons/fastroping/XEH_postInit.sqf @@ -8,7 +8,7 @@ // Keybinds ["ACE3 Vehicles", QGVAR(fastRope), localize LSTRING(Interaction_fastRope), { - if ((vehicle ACE_player) == ACE_player) exitWith {false}; + if (isNull objectParent ACE_player) exitWith {false}; if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; if ([ACE_player, vehicle ACE_player] call FUNC(canFastRope)) then { [ACE_player, vehicle ACE_player] call FUNC(fastRope); @@ -19,7 +19,7 @@ }, ""] call CBA_fnc_addKeybind; ["ACE3 Vehicles", QGVAR(cutRopes), localize LSTRING(Interaction_cutRopes), { - if ((vehicle ACE_player) == ACE_player) exitWith {false}; + if (isNull objectParent ACE_player) exitWith {false}; if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; if ([vehicle ACE_player] call FUNC(canCutRopes)) then { [vehicle ACE_player] call FUNC(cutRopes); @@ -54,7 +54,7 @@ addMissionEventHandler ["Draw3D", { if !(cursorObject isKindOf "Helicopter") exitWith {}; private _config = configOf cursorObject; private _enabled = getNumber (_config >> QGVAR(enabled)); - drawIcon3D ["", [.5,.5,1,1], (ASLtoAGL getPosASL cursorObject), 0.5, 0.5, 0, format ["%1 = %2", typeOf cursorObject, _enabled], 0.5, 0.025, "TahomaB"]; + drawIcon3D ["", [.5,.5,1,1], (ASLToAGL getPosASL cursorObject), 0.5, 0.5, 0, format ["%1 = %2", typeOf cursorObject, _enabled], 0.5, 0.025, "TahomaB"]; if (_enabled > 0) then { { private _hookAttachment = cursorObject getVariable [QGVAR(FRIES), cursorObject]; diff --git a/addons/fastroping/functions/fnc_deployRopes.sqf b/addons/fastroping/functions/fnc_deployRopes.sqf index eea81a77461..c4e999db17c 100644 --- a/addons/fastroping/functions/fnc_deployRopes.sqf +++ b/addons/fastroping/functions/fnc_deployRopes.sqf @@ -26,7 +26,7 @@ private _ropeOrigins = getArray (_config >> QGVAR(ropeOrigins)); private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; private _hookAttachment = _vehicle getVariable [QGVAR(FRIES), _vehicle]; -private _ropeLength = getNumber (configfile >> "CfgWeapons" >> _ropeClass >> QEGVAR(logistics_rope,length)); +private _ropeLength = getNumber (configFile >> "CfgWeapons" >> _ropeClass >> QEGVAR(logistics_rope,length)); if (_ropeLength <= 0) then { _ropeLength = DEFAULT_ROPE_LENGTH; diff --git a/addons/fastroping/stringtable.xml b/addons/fastroping/stringtable.xml index 89418c0f99b..b8245c77829 100644 --- a/addons/fastroping/stringtable.xml +++ b/addons/fastroping/stringtable.xml @@ -137,7 +137,7 @@ Equipa o helicóptero selecionado com um Sistema de Inserção/Extração Rápida por Corda Снаряжает выбранный вертолет оборудованием для спуска десанта по канатам 選択されたヘリコプターで Fast Rope Insertion Extraction System を使えるようにします。 - 선택된 헬리콥터에 패스트로프 투입 및 탈출 시스템을 장착합니다. + 선택된 헬리콥터에 패스트로프 투입 및 탈출 시스템(FRIES)을 장착합니다. 使指定的直升机启用快速绳降及撤离系统 使指定的直升機啟用快速繩降及撤離系統 @@ -322,7 +322,7 @@ FRIESの自動装備 FRIES automatisch ausrüsten Auto-Aggiungi FRIES - FRIES 로프 자동 장착 + 패스트로프 자동 장착 Equipement automatique FRIES Auto-equipar FRIES Авто-подготовка канатов @@ -334,7 +334,7 @@ FRIESをサポートするヘリコプターに自動的にFRIESを追加します。 FRIES automatisch Helikoptern hinzufügen, die es unterstützen Aggiunge il sistema FRIES in automatico su elicotteri compatibili. - 로프를 지원하는 헬기에 자동으로 FRIES 로프를 추가합니다. + 로프를 지원하는 헬기에 자동으로 패스트로프를 추가합니다. Ajoute automatiquement des FRIES aux hélicoptères qui les supportent. Adiciona automaticamente FRIES a helicópteros que os suportam. Автоматически добавляйте канаты в вертолеты, которые их поддерживают. diff --git a/addons/fcs/CfgOptics.hpp b/addons/fcs/CfgOptics.hpp index f8770d7327d..551a965a60d 100644 --- a/addons/fcs/CfgOptics.hpp +++ b/addons/fcs/CfgOptics.hpp @@ -26,7 +26,7 @@ class RscInGameUI { }; }; class Rsc_ACE_Helo_UI_Turret: RscUnitInfo { // RscOptics_Heli_Attack_01_gunner - onLoad = "[""onLoad"",_this,""RscUnitInfo"",'IGUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];"; + onLoad = "[""onLoad"",_this,""RscUnitInfo"",'IGUI'] call (uiNamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];"; class CA_IGUI_elements_group: RscControlsGroup { class controls { MACRO_RANGEFINDER diff --git a/addons/fcs/functions/fnc_calculateSolution.sqf b/addons/fcs/functions/fnc_calculateSolution.sqf index de9462848d7..7f4fb9b43b0 100644 --- a/addons/fcs/functions/fnc_calculateSolution.sqf +++ b/addons/fcs/functions/fnc_calculateSolution.sqf @@ -30,7 +30,7 @@ private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurret private _ammo = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo"); private _bulletSimulation = getText (configFile >> "CfgAmmo" >> _ammo >> "simulation"); - if !(_bulletSimulation == "shotMissile") then { + if (_bulletSimulation != "shotMissile") then { private _maxElev = getNumber (_turretConfig >> "maxElev"); private _initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); private _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammo >> "airFriction"); diff --git a/addons/fcs/functions/fnc_getAngle.sqf b/addons/fcs/functions/fnc_getAngle.sqf index 9a856d46c97..03e8b4fdc8e 100644 --- a/addons/fcs/functions/fnc_getAngle.sqf +++ b/addons/fcs/functions/fnc_getAngle.sqf @@ -21,7 +21,7 @@ * Public: No */ -#define PRECISION 0.1 +#define VAR_PRECISION 0.1 params ["_distance", "_angleTarget", "_maxElev", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep"]; @@ -69,9 +69,9 @@ private _it2 = 0; _data set [7, _maxElev]; private _f1 = _data call _fnc_traceBullet; -if (abs _f1 <= PRECISION) exitWith {0}; +if (abs _f1 <= VAR_PRECISION) exitWith {0}; -while {abs _f1 > PRECISION} do { +while {abs _f1 > VAR_PRECISION} do { _data set [7, _angle2]; private _f2 = _data call _fnc_traceBullet; diff --git a/addons/field_rations/XEH_postInit.sqf b/addons/field_rations/XEH_postInit.sqf index 9fc8406abaf..54feeef659f 100644 --- a/addons/field_rations/XEH_postInit.sqf +++ b/addons/field_rations/XEH_postInit.sqf @@ -2,7 +2,7 @@ if !(hasInterface) exitWith {}; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { // Exit if not enabled if (!XGVAR(enabled)) exitWith {}; diff --git a/addons/field_rations/functions/fnc_addWaterSourceInteractions.sqf b/addons/field_rations/functions/fnc_addWaterSourceInteractions.sqf index d45ea877ca0..1154adc68fe 100644 --- a/addons/field_rations/functions/fnc_addWaterSourceInteractions.sqf +++ b/addons/field_rations/functions/fnc_addWaterSourceInteractions.sqf @@ -21,7 +21,7 @@ params ["_interactionType"]; // Ignore when self-interaction, mounted vehicle interaction, or water source actions are disabled if ( _interactionType != 0 - || {vehicle ACE_player != ACE_player} + || {!isNull objectParent ACE_player} || {XGVAR(waterSourceActions) == 0} ) exitWith {}; diff --git a/addons/field_rations/functions/fnc_consumeItem.sqf b/addons/field_rations/functions/fnc_consumeItem.sqf index 2c3b6f815ad..ac619d7e07e 100644 --- a/addons/field_rations/functions/fnc_consumeItem.sqf +++ b/addons/field_rations/functions/fnc_consumeItem.sqf @@ -52,12 +52,12 @@ _consumeText = format [_consumeText, _displayName]; private _stanceIndex = ["STAND", "CROUCH", "PRONE"] find stance _player; // Handle in vehicle when stance is UNDEFINED -if (vehicle _player != _player) then {_stanceIndex = 0}; +if (!isNull objectParent _player) then {_stanceIndex = 0}; private _consumeAnim = getArray (_config >> QXGVAR(consumeAnims)) param [_stanceIndex, "", [""]]; private _consumeSound = getArray (_config >> QXGVAR(consumeSounds)) param [_stanceIndex, "", [""]]; -private _soundPlayed = if (_consumeAnim != "" && {vehicle _player == _player && {!(_player call EFUNC(common,isSwimming))}}) then { +private _soundPlayed = if (_consumeAnim != "" && {isNull objectParent _player && {!(_player call EFUNC(common,isSwimming))}}) then { // Store current animation for resetting _player setVariable [QGVAR(previousAnim), animationState _player]; [_player, _consumeAnim, 1] call EFUNC(common,doAnimation); @@ -109,7 +109,7 @@ private _fnc_onFailure = { TRACE_1("Consume item failed",_args); // Reset animation if needed - if (vehicle _player == _player && {!(_player call EFUNC(common,isSwimming))}) then { + if (isNull objectParent _player && {!(_player call EFUNC(common,isSwimming))}) then { private _previousAnim = _player getVariable [QGVAR(previousAnim), ""]; if (_previousAnim != "") then { [_player, _previousAnim, 2] call EFUNC(common,doAnimation); diff --git a/addons/field_rations/functions/fnc_drinkFromSource.sqf b/addons/field_rations/functions/fnc_drinkFromSource.sqf index cf0d18018b1..74e9905eba7 100644 --- a/addons/field_rations/functions/fnc_drinkFromSource.sqf +++ b/addons/field_rations/functions/fnc_drinkFromSource.sqf @@ -46,7 +46,7 @@ private _fnc_onFailure = { _args params ["_player"]; // Reset animation if needed - if (vehicle _player == _player && {!(_player call EFUNC(common,isSwimming))}) then { + if (isNull objectParent _player && {!(_player call EFUNC(common,isSwimming))}) then { private _previousAnim = _player getVariable [QGVAR(previousAnim), ""]; if (_previousAnim != "") then { [_player, _previousAnim, 2] call EFUNC(common,doAnimation); diff --git a/addons/field_rations/functions/fnc_getActionOffset.sqf b/addons/field_rations/functions/fnc_getActionOffset.sqf index dd7658dfda1..763654c6559 100644 --- a/addons/field_rations/functions/fnc_getActionOffset.sqf +++ b/addons/field_rations/functions/fnc_getActionOffset.sqf @@ -18,11 +18,11 @@ params ["_object"]; private _configOf = configOf _object; -if !(isNull _configOf) then { +if (isNull _configOf) then { + // Check for offset corresponding to p3d list + GVAR(waterSourceOffsets) param [GVAR(waterSourceP3ds) find (getModelInfo _object select 0), [0, 0, 0], [[]]]; +} else { // Check for offset in config since we have valid typeOf private _offset = getArray (_configOf >> QXGVAR(offset)); if (_offset isEqualTo []) then {[0, 0, 0]} else {_offset}; -} else { - // Check for offset corresponding to p3d list - GVAR(waterSourceOffsets) param [GVAR(waterSourceP3ds) find (getModelInfo _object select 0), [0, 0, 0], [[]]]; }; diff --git a/addons/field_rations/functions/fnc_getRemainingWater.sqf b/addons/field_rations/functions/fnc_getRemainingWater.sqf index 253fd62285d..1011136e0ce 100644 --- a/addons/field_rations/functions/fnc_getRemainingWater.sqf +++ b/addons/field_rations/functions/fnc_getRemainingWater.sqf @@ -23,7 +23,10 @@ private _water = _source getVariable QGVAR(currentWaterSupply); if (isNil "_water") then { private _configOf = configOf _source; - if !(isNull _configOf) then { + if (isNull _configOf) then { + // Check the p3d name against list + _water = if ((getModelInfo _source select 0) in GVAR(waterSourceP3ds)) then {REFILL_WATER_INFINITE} else {REFILL_WATER_DISABLED}; + } else { // Check for waterSupply entry since we have valid typeOf _water = getNumber (_configOf >> QXGVAR(waterSupply)); if (_water == 0) then {_water = REFILL_WATER_DISABLED}; @@ -35,9 +38,6 @@ if (isNil "_water") then { _source setVariable [QGVAR(currentWaterSupply), _water, true]; }; }; - } else { - // Check the p3d name against list - _water = if ((getModelInfo _source select 0) in GVAR(waterSourceP3ds)) then {REFILL_WATER_INFINITE} else {REFILL_WATER_DISABLED}; }; }; diff --git a/addons/field_rations/functions/fnc_update.sqf b/addons/field_rations/functions/fnc_update.sqf index f66573824b8..762af12d883 100644 --- a/addons/field_rations/functions/fnc_update.sqf +++ b/addons/field_rations/functions/fnc_update.sqf @@ -35,7 +35,7 @@ private _hunger = _player getVariable [QXGVAR(hunger), 0]; // Determine base change based on work multiplier private _currentWork = 1; -if (vehicle _player == _player && {isTouchingGround _player}) then { +if (isNull objectParent _player && {isTouchingGround _player}) then { private _speed = vectorMagnitude velocity _player; _currentWork = linearConversion [2, 7, _speed, 1, 2, true]; }; diff --git a/addons/field_rations/stringtable.xml b/addons/field_rations/stringtable.xml index 1cb38164494..50fece7cfb1 100644 --- a/addons/field_rations/stringtable.xml +++ b/addons/field_rations/stringtable.xml @@ -870,7 +870,7 @@ A vízzel töltött kantin Una borraccia riempita per metà di acqua 半分入っている水筒 - 반이 차 있는 수통입니다 + 물이 반 정도 차 있는 수통입니다 Manierka w połowie wypełniona wodą Uma meia cantina cheia de água Наполовину заполненая водой фляга diff --git a/addons/finger/functions/fnc_keyPress.sqf b/addons/finger/functions/fnc_keyPress.sqf index 2445986d15b..5ffd91500d7 100644 --- a/addons/finger/functions/fnc_keyPress.sqf +++ b/addons/finger/functions/fnc_keyPress.sqf @@ -20,7 +20,7 @@ if (!alive ACE_player) exitWith {false}; // Conditions: canInteract if !([ACE_player, ACE_player, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false}; //make sure player is dismounted or in a static weapon: -if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) exitWith {false}; +if ((!isNull objectParent ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) exitWith {false}; //Check camera view (not in GUNNER) if !(cameraView in ["INTERNAL", "EXTERNAL"]) exitWith {false}; //Exit if run recently (run every 1 seconds) @@ -29,8 +29,8 @@ if (diag_tickTime < (GVAR(lastFPTime) + FP_ACTION_TIMEOUT)) exitWith {true}; GVAR(lastFPTime) = diag_tickTime; // Find where is the finger pointing -private _originASL = AGLtoASL positionCameraToWorld [0, 0, 0]; -private _fingerPosASL = AGLtoASL positionCameraToWorld [0, 0, FP_DISTANCE]; +private _originASL = AGLToASL positionCameraToWorld [0, 0, 0]; +private _fingerPosASL = AGLToASL positionCameraToWorld [0, 0, FP_DISTANCE]; private _intersections = lineIntersectsSurfaces [_originASL, _fingerPosASL, ACE_player, vehicle ACE_player, true, 1]; if (_intersections isNotEqualTo []) then { _fingerPosASL = _intersections select 0 select 0; @@ -46,7 +46,7 @@ private _nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)] { if ((((eyePos _x) vectorDistance _playerEyePosASL) < GVAR(maxRange)) && {alive _x} && - {(_x == (vehicle _x)) || {(vehicle _x) isKindOf "StaticWeapon"}} && + {(isNull objectParent _x) || {(vehicle _x) isKindOf "StaticWeapon"}} && {GVAR(indicatorForSelf) || {_x != ACE_player}} && {((lineIntersectsSurfaces [(eyePos _x), _playerEyePosASL, vehicle ACE_player, vehicle _x]) isEqualTo [])} && {[_x] call EFUNC(common,isPlayer)}) then { diff --git a/addons/finger/functions/fnc_perFrameEH.sqf b/addons/finger/functions/fnc_perFrameEH.sqf index 4af4f6b643e..1a17cdcadd1 100644 --- a/addons/finger/functions/fnc_perFrameEH.sqf +++ b/addons/finger/functions/fnc_perFrameEH.sqf @@ -19,12 +19,11 @@ if (!alive ACE_player) then {GVAR(fingersHash) = createHashMap}; // Conditions: canInteract if !([ACE_player, ACE_player, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) then {GVAR(fingersHash) = createHashMap}; // Make sure player is dismounted or in a static weapon: -if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) then {GVAR(fingersHash) = createHashMap}; +if ((!isNull objectParent ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) then {GVAR(fingersHash) = createHashMap}; private _iconBaseSize = GVAR(sizeCoef) * BASE_SIZE * 0.10713 * (call EFUNC(common,getZoom)); { - //IGNORE_PRIVATE_WARNING ["_x", "_y"]; _y params ["_lastTime", "_pos", "_name", "_sourceUnit"]; private _timeLeftToShow = _lastTime + FP_TIMEOUT - diag_tickTime; if (_timeLeftToShow <= 0) then { @@ -39,7 +38,7 @@ private _iconBaseSize = GVAR(sizeCoef) * BASE_SIZE * 0.10713 * (call EFUNC(commo _iconSize = _iconSize * linearConversion [0, GVAR(maxRange), (getPosASL ACE_player) vectorDistance (getPosASL _sourceUnit), 0.25, 2, true]; }; - drawIcon3D [QPATHTOF(UI\fp_icon2.paa), _drawColor, ASLtoAGL _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "RobotoCondensed"]; + drawIcon3D [QPATHTOF(UI\fp_icon2.paa), _drawColor, ASLToAGL _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "RobotoCondensed"]; }; } forEach GVAR(fingersHash); diff --git a/addons/fire/RscTitles.hpp b/addons/fire/RscTitles.hpp index 02ecd250e4e..fc246b84030 100644 --- a/addons/fire/RscTitles.hpp +++ b/addons/fire/RscTitles.hpp @@ -1,5 +1,6 @@ +class RscPicture; + class RscTitles { - class RscPicture; class GVAR(onFire1) { idd = -1; movingEnable = "true"; diff --git a/addons/fortify/CfgWeapons.hpp b/addons/fortify/CfgWeapons.hpp index 66ff7f52d88..82396288721 100644 --- a/addons/fortify/CfgWeapons.hpp +++ b/addons/fortify/CfgWeapons.hpp @@ -10,6 +10,7 @@ class CfgWeapons { picture = QPATHTOF(UI\hammer_ca.paa); scope = 2; ACE_isTool = 1; + GVAR(fortifyTool) = 1; class ItemInfo: CBA_MiscItem_ItemInfo { mass = 0; }; diff --git a/addons/fortify/XEH_preInit.sqf b/addons/fortify/XEH_preInit.sqf index 382fc805660..50f641f9cf7 100644 --- a/addons/fortify/XEH_preInit.sqf +++ b/addons/fortify/XEH_preInit.sqf @@ -13,6 +13,8 @@ GVAR(locations) = []; // Custom deploy handlers GVAR(deployHandlers) = []; +GVAR(fortifyTools) = keys (uiNamespace getVariable QGVAR(fortifyTools)); + #include "initSettings.inc.sqf" ADDON = true; diff --git a/addons/fortify/XEH_preStart.sqf b/addons/fortify/XEH_preStart.sqf index 022888575ed..4da9eeb40da 100644 --- a/addons/fortify/XEH_preStart.sqf +++ b/addons/fortify/XEH_preStart.sqf @@ -1,3 +1,9 @@ #include "script_component.hpp" #include "XEH_PREP.hpp" + +private _fortifyTools = (QUOTE(getNumber (_x >> QQGVAR(fortifyTool)) > 0) configClasses (configFile >> "CfgWeapons") apply {configName _x}); +_fortifyTools append (QUOTE(getNumber (_x >> QQGVAR(fortifyTool)) > 0) configClasses (configFile >> "CfgVehicles") apply {configName _x}); +TRACE_1("",_fortifyTools); + +uiNamespace setVariable [QGVAR(fortifyTools), compileFinal (_fortifyTools createHashMapFromArray [])]; diff --git a/addons/fortify/functions/fnc_addActions.sqf b/addons/fortify/functions/fnc_addActions.sqf index 4802effa01d..7ac07d1693a 100644 --- a/addons/fortify/functions/fnc_addActions.sqf +++ b/addons/fortify/functions/fnc_addActions.sqf @@ -21,7 +21,7 @@ private _side = side group _player; private _objects = missionNamespace getVariable [format [QGVAR(Objects_%1), _side], []]; private _actions = []; private _infiniteBudget = ([side group _player] call FUNC(getBudget)) == -1; -private _subActions = createHashmap; +private _subActions = createHashMap; { _x params ["_classname", "_cost", ["_category", ""]]; diff --git a/addons/fortify/functions/fnc_buildLocationModule.sqf b/addons/fortify/functions/fnc_buildLocationModule.sqf index c777b80d4e4..497af641f41 100644 --- a/addons/fortify/functions/fnc_buildLocationModule.sqf +++ b/addons/fortify/functions/fnc_buildLocationModule.sqf @@ -18,7 +18,7 @@ params ["_logic"]; TRACE_1("buildLocations",_logic); -private _area = _logic getvariable ["objectArea",[0,0,0,false,0]]; // seems to be set via the canSetArea config +private _area = _logic getVariable ["objectArea",[0,0,0,false,0]]; // seems to be set via the canSetArea config if ((_area param [0, 0]) == 0) exitWith {WARNING_1("Bad size? %1",_area);}; private _locationArray = [_logic]; _locationArray append _area; diff --git a/addons/fortify/functions/fnc_canFortify.sqf b/addons/fortify/functions/fnc_canFortify.sqf index 3a382bc98c9..ad676a91031 100644 --- a/addons/fortify/functions/fnc_canFortify.sqf +++ b/addons/fortify/functions/fnc_canFortify.sqf @@ -19,8 +19,12 @@ params ["_player", ["_cost", 0]]; (missionNamespace getVariable [QGVAR(fortifyAllowed), true]) && -{"ACE_Fortify" in (_player call EFUNC(common,uniqueItems))} && { + private _items = _player call EFUNC(common,uniqueItems); + _items append weapons _player; + _items pushBack backpack _player; + GVAR(fortifyTools) findAny _items != -1 +} && { private _budget = [side group _player] call FUNC(getBudget); ((_budget == -1) || {_budget >= _cost}) } && { diff --git a/addons/fortify/functions/fnc_getPlaceableSet.sqf b/addons/fortify/functions/fnc_getPlaceableSet.sqf index d5e610d0475..dfe5a01a1b8 100644 --- a/addons/fortify/functions/fnc_getPlaceableSet.sqf +++ b/addons/fortify/functions/fnc_getPlaceableSet.sqf @@ -20,7 +20,7 @@ TRACE_1("getPlaceableSet",_preset); private _config = missionConfigFile >> "ACEX_Fortify_Presets" >> _preset; if (!isClass _config) then { - _config = configfile >> "ACEX_Fortify_Presets" >> _preset; + _config = configFile >> "ACEX_Fortify_Presets" >> _preset; }; if (!isClass _config) exitWith { private _msg = format ["Could not find [%1]", _preset]; diff --git a/addons/frag/CfgAmmo.hpp b/addons/frag/CfgAmmo.hpp index 7a124833b3c..ac3605499d8 100644 --- a/addons/frag/CfgAmmo.hpp +++ b/addons/frag/CfgAmmo.hpp @@ -4,272 +4,16 @@ class CfgAmmo { - // ~~~~ Bombs: - class ammo_Bomb_LaserGuidedBase; - class Bo_GBU12_LGB: ammo_Bomb_LaserGuidedBase { - GVAR(enabled) = 1; + #include "CfgAmmoBaseClasses.hpp" - GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large), QGVAR(huge), QGVAR(huge_HD), QGVAR(huge)}; - GVAR(metal) = 140000; - GVAR(charge) = 87000; - GVAR(gurney_c) = 2320; - GVAR(gurney_k) = "1/2"; - }; - class Bomb_04_F: ammo_Bomb_LaserGuidedBase { - GVAR(enabled) = 1; - - GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large), QGVAR(huge), QGVAR(huge_HD), QGVAR(huge)}; - GVAR(metal) = 140000; - GVAR(charge) = 87000; - GVAR(gurney_c) = 2320; - GVAR(gurney_k) = "1/2"; - }; - class BombCore; - class Bo_Mk82: BombCore { - GVAR(enabled) = 1; - - GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large), QGVAR(huge), QGVAR(huge_HD), QGVAR(huge)}; - GVAR(metal) = 140000; - GVAR(charge) = 87000; - GVAR(gurney_c) = 2320; - GVAR(gurney_k) = "1/2"; - }; - - // ~~~~ Grenades: - class GrenadeBase; - class Grenade; - class GrenadeHand: Grenade { - GVAR(enabled) = 1; - - GVAR(skip) = 0; - GVAR(force) = 1; - // This is a good high-drag frag type for grenades. - GVAR(classes)[] = {QGVAR(tiny_HD)}; - /* - These values are based on the M67 Grenade, should be tweaked for - individual grenades. - */ - GVAR(metal) = 210; // metal in grams - GVAR(charge) = 185; // explosive in grams - GVAR(gurney_c) = 2843; // Gurney velocity constant for explosive type. See: http://en.wikipedia.org/wiki/Gurney_equations - GVAR(gurney_k) = "3/5"; // Gurney shape factor, in this case a sphere. See: http://en.wikipedia.org/wiki/Gurney_equations - }; - class GrenadeHand_stone: GrenadeHand { - GVAR(skip) = 1; - }; - class SmokeShell: GrenadeHand { - GVAR(skip) = 1; - }; - class G_40mm_HE: GrenadeBase { - // Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M441 - GVAR(enabled) = 1; - GVAR(force) = 1; - - GVAR(classes)[] = {QGVAR(tiny_HD)}; - GVAR(metal) = 200; - GVAR(charge) = 32; - GVAR(gurney_c) = 2700; - GVAR(gurney_k) = "1/2"; - }; - class G_40mm_HEDP: G_40mm_HE { - // Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M433 - GVAR(enabled) = 1; - - GVAR(classes)[] = {QGVAR(tiny_HD)}; - GVAR(metal) = 200; - GVAR(charge) = 45; - GVAR(gurney_c) = 2830; - GVAR(gurney_k) = "1/2"; - }; - - class ACE_G_40mm_HEDP: G_40mm_HEDP {}; - class ACE_G_40mm_HE: G_40mm_HE {}; - class ACE_G_40mm_Practice: ACE_G_40mm_HE { - GVAR(skip) = 1; - GVAR(force) = 0; - EGVAR(vehicle_damage,incendiary) = 0; - }; - class ACE_G40mm_HE_VOG25P: G_40mm_HE { - GVAR(skip) = 0; - GVAR(force) = 1; - }; - - - // ~~~~ RPGs: - class MissileBase; - class R_PG32V_F; - class R_TBG32V_F: R_PG32V_F { // HE - GVAR(enabled) = 1; - GVAR(metal) = 400; - GVAR(charge) = 210; - GVAR(gurney_c) = 2800; - GVAR(gurney_k) = "3/5"; - GVAR(classes)[] = {"ACE_frag_medium_HD"}; - }; - class M_Titan_AA: MissileBase { - GVAR(skip) = 1; - }; - class M_Titan_AT: MissileBase { - GVAR(skip) = 1; - }; - class M_Titan_AP: M_Titan_AT { // "anti personnel" - GVAR(skip) = 0; - GVAR(enabled) = 1; - GVAR(metal) = 400; - GVAR(charge) = 210; - GVAR(gurney_c) = 2800; - GVAR(gurney_k) = "3/5"; - GVAR(classes)[] = {"ACE_frag_medium_HD"}; - }; - - // https://ofb.gov.in/product/products/product-details/84-mm-he-round-ffv-441-b - // https://armypubs.army.mil/epubs/DR_pubs/DR_a/pdf/web/ARN18072_TC%203-22x84%20FINAL%20WEB.pdf (page 99, Table A-6. HE 441D RS, 84-mm projectile) - class R_MRAAWS_HEAT_F; - class R_MRAAWS_HE_F: R_MRAAWS_HEAT_F { - GVAR(enabled) = 1; - GVAR(metal) = 2300; - GVAR(charge) = 590; - GVAR(gurney_c) = 2800; - GVAR(gurney_k) = "1/2"; - GVAR(classes)[] = {"ACE_frag_small"}; - }; - - - // ~~~~ Missiles: - class M_PG_AT; - class M_AT: M_PG_AT { // DAR (Hydra 70) - // Source: http://fas.org/man/dod-101/sys/missile/hydra-70.htm - GVAR(enabled) = 1; - - GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; - GVAR(metal) = 3850; - GVAR(charge) = 1040; - GVAR(gurney_c) = 2700; - GVAR(gurney_k) = "1/2"; - }; - class RocketBase; - class R_80mm_HE: RocketBase { - GVAR(skip) = 1; - }; - class Missile_AGM_02_F: MissileBase { - // Source: http://fas.org/man/dod-101/sys/smart/agm-65.htm - GVAR(enabled) = 1; - - GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; - GVAR(metal) = 56250; - GVAR(charge) = 39000; - GVAR(gurney_c) = 2700; - GVAR(gurney_k) = "1/2"; - }; - class Rocket_04_HE_F: MissileBase { // Shrieker (Hydra 70) - GVAR(enabled) = 1; - GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; - GVAR(metal) = 3850; - GVAR(charge) = 1040; - GVAR(gurney_c) = 2700; - GVAR(gurney_k) = "1/2"; - }; - class M_Scalpel_AT: MissileBase { // 9K121 Vikhr - GVAR(enabled) = 1; - GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; - GVAR(metal) = 10000; - GVAR(charge) = 3000; - GVAR(gurney_c) = 2700; - GVAR(gurney_k) = "1/2"; - }; - class ACE_Hellfire_AGM114K: M_Scalpel_AT { - // Source: http://www.designation-systems.net/dusrm/m-114.html - GVAR(enabled) = 1; - - GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; - GVAR(metal) = 8000; - GVAR(charge) = 2400; - GVAR(gurney_c) = 2700; - GVAR(gurney_k) = "1/2"; - }; - class M_Air_AA: MissileBase { - GVAR(skip) = 1; - }; - class Missile_AA_04_F: MissileBase { - GVAR(skip) = 1; - }; - - // curator ammo entries - class ShellBase; - class Sh_125mm_HEAT; - class Sh_155mm_AMOS: ShellBase { - // Source: http://www.globalsecurity.org/military/systems/munitions/m795.htm - GVAR(enabled) = 1; - - GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large), QGVAR(huge), QGVAR(huge_HD), QGVAR(huge)}; - GVAR(metal) = 36000; - GVAR(charge) = 9979; - GVAR(gurney_c) = 2440; - GVAR(gurney_k) = "1/2"; - }; - class Sh_82mm_AMOS: Sh_155mm_AMOS { - // Source: http://www.arsenal-bg.com/defense_police/mortar_bombs_82mm.htm - GVAR(enabled) = 1; - - GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; - GVAR(metal) = 3200; - GVAR(charge) = 420; - GVAR(gurney_c) = 2440; - GVAR(gurney_k) = "1/2"; - }; - class ModuleOrdnanceMortar_F_Ammo: Sh_82mm_AMOS { - GVAR(enabled) = 1; - - GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; - GVAR(metal) = 800; - GVAR(charge) = 4200; - GVAR(gurney_c) = 2320; - GVAR(gurney_k) = "1/2"; - }; - class Sh_105mm_HEAT_MP: Sh_125mm_HEAT { - GVAR(enabled) = 1; - - GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; - GVAR(metal) = 11400; - GVAR(charge) = 7100; - GVAR(gurney_c) = 2800; - GVAR(gurney_k) = "1/2"; - }; - class Sh_120mm_HE: ShellBase { - GVAR(enabled) = 1; - - GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; - GVAR(metal) = 23000; - GVAR(charge) = 3148; - GVAR(gurney_c) = 2830; - GVAR(gurney_k) = "1/2"; - }; - class Sh_125mm_HE: Sh_120mm_HE { - GVAR(enabled) = 1; - - GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; - GVAR(metal) = 16000; - GVAR(charge) = 3200; - GVAR(gurney_c) = 2440; - GVAR(gurney_k) = "1/2"; - }; - class ModuleOrdnanceHowitzer_F_ammo: Sh_155mm_AMOS { - GVAR(enabled) = 1; - - GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large), QGVAR(huge), QGVAR(huge_HD), QGVAR(huge)}; - GVAR(metal) = 1950; - GVAR(charge) = 15800; - GVAR(gurney_c) = 2320; - GVAR(gurney_k) = "1/2"; - }; - - - class B_65x39_Caseless; + class B_65x39_Caseless: BulletBase {}; class GVAR(base): B_65x39_Caseless { ACE_damageType = "grenade"; // compatibility with medical_damage, shrapnel should produce grenade wounds - timeToLive = 12; + timeToLive = 4; typicalSpeed = 1500; + maxSpeed = 1500; deflecting = 65; + GVAR(skip) = 1; }; class GVAR(tiny): GVAR(base) { @@ -317,7 +61,7 @@ class CfgAmmo { }; class GVAR(large_HD): GVAR(large) { - hit = 28; + hit = 28; indirectHit = 2; indirectHitRange = 0.25; airFriction = QUOTE(BASE_DRAG_HD*0.65); @@ -340,21 +84,6 @@ class CfgAmmo { caliber = 2.8; }; - class GVAR(spall_small): GVAR(small) { - timeToLive = 0.1; - }; - - class GVAR(spall_medium): GVAR(medium) { - timeToLive = 0.15; - }; - - class GVAR(spall_large): GVAR(large) { - timeToLive = 0.25; - }; - - class GVAR(spall_huge): GVAR(huge) { - timeToLive = 0.3; - }; - - #include "CfgAmmoReflections.hpp" + #include "CfgAmmoSpall.hpp" + #include "CfgAmmoFragParameters.hpp" }; diff --git a/addons/frag/CfgAmmoBaseClasses.hpp b/addons/frag/CfgAmmoBaseClasses.hpp new file mode 100644 index 00000000000..413dfe3dd93 --- /dev/null +++ b/addons/frag/CfgAmmoBaseClasses.hpp @@ -0,0 +1,47 @@ +// We need this since autocannons generally inherit from BulletBase +class BulletCore; +class BulletBase: BulletCore {}; + +class GrenadeCore; +class GrenadeBase: GrenadeCore {}; + +class LaserBombCore; +class ammo_Bomb_LaserGuidedBase: LaserBombCore {}; + +class MissileCore; +class MissileBase: MissileCore {}; + +class RocketCore; +class RocketBase: RocketCore { + GVAR(skip) = 1; +}; + +class ArtilleryRocketCore: RocketCore {}; + +class ShellCore; +class ShellBase: ShellCore {}; + +class ShotDeployCore; +class ShotDeployBase: ShotDeployCore { + GVAR(skip) = 1; +}; + +class ShotgunCore; +class ShotgunBase: ShotgunCore {}; + +class SubmunitionCore; +class SubmunitionBase: SubmunitionCore { + GVAR(skip) = 1; +}; + +class BoundingMineCore; +class BoundingMineBase: BoundingMineCore {}; + +class PipeBombCore; +class PipeBombBase: PipeBombCore {}; + +class DirectionalBombCore; +class DirectionalBombBase: DirectionalBombCore {}; + +class MineCore; +class MineBase: MineCore {}; diff --git a/addons/frag/CfgAmmoFragParameters.hpp b/addons/frag/CfgAmmoFragParameters.hpp new file mode 100644 index 00000000000..588032673d2 --- /dev/null +++ b/addons/frag/CfgAmmoFragParameters.hpp @@ -0,0 +1,803 @@ +// ~~~~ Autocannons +class B_19mm_HE: BulletBase { + GVAR(skip) = 1; +}; + +class B_20mm: BulletBase { + // Used in Weisel/AWC Nyx, which makes it a Rheinmetall Mk 20 Rh-202 + // Based on jane's ammunition handbook ~2002 (archive.org) + GVAR(skip) = 1; + GVAR(charge) = 6; + GVAR(metal) = 114; + GVAR(gurney_c) = 2830; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(tiny_HD)}; +}; + +class B_20mm_AP: BulletBase { + GVAR(skip) = 1; +}; + +class ammo_Gun20mmAABase: BulletBase { // 20x139mm + GVAR(skip) = 1; + GVAR(charge) = 6; + GVAR(metal) = 114; + GVAR(gurney_c) = 2830; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(tiny_HD)}; +}; + +class ammo_Gun30mmAABase: BulletBase { // 30x210mm HEI + GVAR(skip) = 0; + GVAR(charge) = 40; + GVAR(metal) = 410; + GVAR(gurney_k) = "1/2"; + GVAR(gurney_c) = 2901; + GVAR(classes)[] = {QGVAR(tiny_HD), QGVAR(tiny_HD), QGVAR(small_HD)}; + +}; + +class B_30mm_HE: B_19mm_HE { + // Used in Gorgon (Pandur II), assuming it's a L21A1 RARDEN, specifically HEI-T due to tracers + // https://ordtech-industries.com/30x170-mm-ammunition-for-cannons-oerlikon-kcb-hispano-hs831l-l21-rarden/ + GVAR(skip) = 0; + GVAR(charge) = 25; + GVAR(metal) = 320; + GVAR(gurney_c) = 2552; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(tiny_HD), QGVAR(tiny_HD), QGVAR(small_HD)}; +}; +class B_30mm_MP: B_30mm_HE { + // Used in Mora (FV510 Warrior), assuming it's a Mk44 Bushmaster II, specifically HEI-T due to tracers + // http://www.navweaps.com/Weapons/WNUS_30mm_BushmasterII.php + GVAR(metal) = 388; + GVAR(charge) = 56; + GVAR(gurney_c) = 2600; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(tiny_HD), QGVAR(tiny_HD), QGVAR(small_HD)}; +}; + +class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase { + GVAR(skip) = 0; + GVAR(classes)[] = {QGVAR(tiny_HD), QGVAR(small_HD)}; + GVAR(metal) = 388; + GVAR(charge) = 56; + GVAR(gurney_c) = 2600; // guessed + GVAR(gurney_k) = "1/2"; +}; + +class ammo_Gun35mmAABase: BulletBase { + // Gepard uses an Oerlikon GDF and the AA vehicles mimics it like it + // https://en.wikipedia.org/wiki/Oerlikon_GDF#Ammunition + // https://www.nammo.com/product/our-products/ammunition/medium-caliber-ammunition/35-mm-series/35-mm-x-228-hei-sd-and-hei-t-sd/ + GVAR(skip) = 0; + GVAR(charge) = 98; + GVAR(metal) = 400; + GVAR(gurney_k) = "1/2"; + GVAR(gurney_c) = 2700; + GVAR(classes)[] = {QGVAR(tiny_HD), QGVAR(tiny_HD), QGVAR(small_HD)}; +}; + +class B_35mm_AA: BulletBase { + // Gepard uses an Oerlikon GDF and the AA vehicles mimics it like it + // https://en.wikipedia.org/wiki/Oerlikon_GDF#Ammunition + // https://www.nammo.com/product/our-products/ammunition/medium-caliber-ammunition/35-mm-series/35-mm-x-228-hei-sd-and-hei-t-sd/ + GVAR(skip) = 0; + GVAR(charge) = 98; + GVAR(metal) = 400; + GVAR(gurney_k) = "1/2"; + GVAR(gurney_c) = 2700; + GVAR(classes)[] = {QGVAR(tiny_HD), QGVAR(tiny_HD), QGVAR(small_HD)}; +}; + +class B_40mm_GPR: B_30mm_HE { + // Based on noted 40mm Autocannons, base ROF, and ammo names, looks to be a CTAS40, specifically GPR-PD-T + // https://www.cta-international.com/ammunition/ + // https://ndiastorage.blob.core.usgovcloudapi.net/ndia/2002/gun/leslie.pdf + GVAR(classes)[] = {QGVAR(tiny_HD), QGVAR(small_HD)}; + GVAR(metal) = 750; + GVAR(charge) = 120; + GVAR(gurney_c) = 2700; // guessed + GVAR(gurney_k) = "1/2"; +}; +class UnderwaterMine_Range_Ammo: MineBase { + GVAR(skip) = 1; +}; + +// ~~~~ Bombs: +class Bo_GBU12_LGB: ammo_Bomb_LaserGuidedBase { + GVAR(skip) = 0; + GVAR(charge) = 87000; + GVAR(metal) = 140000; + GVAR(gurney_c) = 2320; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large_HD), QGVAR(huge_HD), QGVAR(huge_HD), QGVAR(huge_HD)}; +}; +class Bomb_03_F: ammo_Bomb_LaserGuidedBase { + GVAR(skip) = 0; + GVAR(charge) = 100000; + GVAR(metal) = 150000; + GVAR(gurney_c) = 2320; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large_HD), QGVAR(huge_HD), QGVAR(huge_HD), QGVAR(huge_HD)}; +}; +class Bomb_04_F: ammo_Bomb_LaserGuidedBase { + GVAR(skip) = 0; + GVAR(charge) = 87000; + GVAR(metal) = 140000; + GVAR(gurney_c) = 2320; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large_HD), QGVAR(huge_HD), QGVAR(huge_HD), QGVAR(huge_HD)}; +}; +class BombCluster_01_Ammo_F: Bomb_04_F { + GVAR(skip) = 1; +}; +class ammo_Bomb_SmallDiameterBase: ammo_Bomb_LaserGuidedBase { + GVAR(skip) = 0; + GVAR(charge) = 160; // kg + GVAR(metal) = 113; // kg + GVAR(gurney_c) = 2830; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD), QGVAR(large), QGVAR(large_HD), QGVAR(huge_HD), QGVAR(huge_HD)}; +}; + +class BombCore; +class Bo_Mk82: BombCore { + GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large_HD), QGVAR(huge_HD), QGVAR(huge_HD), QGVAR(huge_HD)}; + GVAR(metal) = 140000; + GVAR(charge) = 87000; + GVAR(gurney_c) = 2320; + GVAR(gurney_k) = "1/2"; +}; + +class Mo_cluster_AP: ShellBase { + GVAR(skip) = 1; + GVAR(force) = 0; +}; +class Mo_cluster_Bomb_01_F: Mo_cluster_AP { // Mk 118 Rockeye + GVAR(skip) = 0; + GVAR(classes)[] = {QGVAR(small_HD)}; + GVAR(metal) = 400; + GVAR(charge) = 180; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "1/2"; +}; +class Mo_cluster_Bomb_02_F: Mo_cluster_Bomb_01_F { // ShOAB-0.5 + GVAR(classes)[] = {QGVAR(small_HD)}; + GVAR(metal) = 400; + GVAR(charge) = 100; + GVAR(gurney_c) = 2700; +}; +class Mo_cluster_Bomb_03_F: Mo_cluster_Bomb_01_F { // idk, @lambda.tiger on the ace discord if you find out + GVAR(classes)[] = {QGVAR(small_HD)}; + GVAR(metal) = 400; + GVAR(charge) = 140; + GVAR(gurney_c) = 2400; +}; + +// ~~~~ Grenades: +class Grenade; +class GrenadeHand: Grenade { + GVAR(skip) = 0; + GVAR(force) = 1; + /* + These values are based on the M67 Grenade, should be tweaked for + individual grenades. + */ + GVAR(classes)[] = {QGVAR(tiny_HD)}; + GVAR(metal) = 210; // metal in grams + GVAR(charge) = 185; // explosive in grams + GVAR(gurney_c) = 2843; // Gurney velocity constant for explosive type. See: http://en.wikipedia.org/wiki/Gurney_equations + GVAR(gurney_k) = "3/5"; // Gurney shape factor, in this case a sphere. See: http://en.wikipedia.org/wiki/Gurney_equations +}; +class mini_Grenade: GrenadeHand { + GVAR(classes)[] = {QGVAR(tiny_HD)}; + GVAR(metal) = 104; + GVAR(charge) = 36; +}; +class GrenadeHand_stone: GrenadeHand { + GVAR(skip) = 1; +}; +class SmokeShell: GrenadeHand { + GVAR(skip) = 1; +}; +class G_40mm_HE: GrenadeBase { + // Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M441 + GVAR(skip) = 0; + GVAR(force) = 1; + GVAR(classes)[] = {QGVAR(small_HD), QGVAR(tiny_HD), QGVAR(small_HD)}; + GVAR(metal) = 200; + GVAR(charge) = 32; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "3/5"; // interior fragmenter/charge is a sphere +}; +class G_20mm_HE: G_40mm_HE { + GVAR(classes)[] = {QGVAR(tiny_HD)}; + GVAR(metal) = 50; + GVAR(charge) = 8; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "3/5"; // interior fragmenter/charge is a sphere +}; +class G_40mm_HEDP: G_40mm_HE { + // Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M433 + GVAR(classes)[] = {QGVAR(tiny_HD), QGVAR(small_HD), QGVAR(small_HD)}; + GVAR(metal) = 200; + GVAR(charge) = 45; + GVAR(gurney_c) = 2830; + GVAR(gurney_k) = "1/2"; +}; + +class ACE_G_40mm_HEDP: G_40mm_HEDP {}; +class ACE_G_40mm_HE: G_40mm_HE {}; +class ACE_G_40mm_Practice: ACE_G_40mm_HE { + GVAR(skip) = 1; + GVAR(force) = 0; + EGVAR(vehicle_damage,incendiary) = 0; +}; + +// ~~~~ Mines & UXO +class ATMine_Range_Ammo: MineBase { + GVAR(skip) = 1; +}; + +class APERSMine_Range_Ammo: MineBase { // VS-50 + GVAR(skip) = 0; + GVAR(force) = 1; + GVAR(classes)[] = {QGVAR(tiny_HD), QGVAR(tiny_HD), QGVAR(small_HD)}; + GVAR(metal) = 100; + GVAR(charge) = 50; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "1/3"; +}; + +class APERSBoundingMine_Range_Ammo: BoundingMineBase { + GVAR(skip) = 0; + GVAR(force) = 0; + GVAR(classes)[] = {QGVAR(tiny_HD)}; + GVAR(metal) = 80; + GVAR(charge) = 170; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "3/5"; +}; + +class TrainingMine_Ammo: APERSMine_Range_Ammo { + GVAR(skip) = 1; +}; + +class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase { + GVAR(skip) = 1; +}; + +class APERSTripMine_Wire_Ammo: DirectionalBombBase { + GVAR(skip) = 0; + GVAR(force) = 0; + GVAR(classes)[] = {QGVAR(tiny_HD)}; + GVAR(metal) = 210; + GVAR(charge) = 185; + GVAR(gurney_c) = 2843; + GVAR(gurney_k) = "3/5"; +}; + +class IEDUrbanBig_Remote_Ammo: PipeBombBase { + GVAR(skip) = 0; + GVAR(classes)[] = {QGVAR(large), QGVAR(large_HD), QGVAR(large_HD), QGVAR(large_HD), QGVAR(huge_HD), QGVAR(huge_HD), QGVAR(huge_HD)}; + GVAR(metal) = 36000; + GVAR(charge) = 9979; + GVAR(gurney_c) = 2440; + GVAR(gurney_k) = "3/5"; +}; +class IEDLandBig_Remote_Ammo: PipeBombBase { + GVAR(skip) = 0; + GVAR(classes)[] = {QGVAR(large), QGVAR(large_HD), QGVAR(large_HD), QGVAR(large_HD), QGVAR(huge_HD), QGVAR(huge_HD), QGVAR(huge_HD)}; + GVAR(metal) = 36000; + GVAR(charge) = 9979; + GVAR(gurney_c) = 2440; + GVAR(gurney_k) = "3/5"; +}; +class IEDUrbanSmall_Remote_Ammo: PipeBombBase { + GVAR(skip) = 0; + GVAR(metal) = 23000; + GVAR(charge) = 3148; + GVAR(gurney_c) = 2830; + GVAR(gurney_k) = "3/5"; + GVAR(classes)[] = {QGVAR(small), QGVAR(medium_HD), QGVAR(medium_HD)}; +}; +class IEDLandSmall_Remote_Ammo: PipeBombBase { + GVAR(skip) = 0; + GVAR(metal) = 23000; + GVAR(charge) = 3148; + GVAR(gurney_c) = 2830; + GVAR(gurney_k) = "3/5"; + GVAR(classes)[] = {QGVAR(small), QGVAR(medium_HD), QGVAR(medium_HD)}; +}; + +class APERSMineDispenser_Ammo: PipeBombBase { + GVAR(skip) = 1; +}; + +class UXO1_Ammo_Base_F: APERSMine_Range_Ammo { // Mk 118 Rockeye + GVAR(skip) = 0; + GVAR(charge) = 180; + GVAR(metal) = 400; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(small_HD)}; +}; + +class UXO2_Ammo_Base_F: UXO1_Ammo_Base_F { + GVAR(charge) = 100; + GVAR(classes)[] = {QGVAR(small_HD), QGVAR(tiny_HD)}; +}; + +class APERSMineDispenser_Mine_Ammo: APERSMine_Range_Ammo { + GVAR(skip) = 1; +}; + +class UXO_deploy_base_f: SubmunitionBase {}; + +class ClaymoreDirectionalMine_Remote_Ammo: DirectionalBombBase { + GVAR(skip) = 0; + GVAR(force) = 0; + GVAR(classes)[] = {QGVAR(tiny), QGVAR(small)}; + GVAR(fragCount) = 700; + GVAR(metal) = 700; + GVAR(charge) = 680; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "3/5"; +}; + +class SatchelCharge_Remote_Ammo: PipeBombBase { + GVAR(skip) = 1; +}; + +class DemoCharge_Remote_Ammo: PipeBombBase { + GVAR(skip) = 1; +}; + +class Drone_explosive_ammo: MineBase { + GVAR(skip) = 1; +}; + +class BombDemine_01_Ammo_F: BombCore { + GVAR(skip) = 1; +}; + +class BombDemine_01_SubAmmo_F: ShellBase { + GVAR(skip) = 1; +}; + +// ~~~~ Rockets: +class R_PG7_F: RocketBase { + GVAR(skip) = 0; + GVAR(force) = 0; + GVAR(classes)[] = {QGVAR(tiny), QGVAR(small_HD)}; + GVAR(metal) = 100; + GVAR(charge) = 560; + GVAR(gurney_c) = 2730; + GVAR(gurney_k) = "1/2"; +}; + +class R_PG32V_F: RocketBase { + GVAR(skip) = 1; +}; +class R_TBG32V_F: R_PG32V_F { // Thermobaric + GVAR(skip) = 0; + GVAR(metal) = 400; + GVAR(charge) = 210; + GVAR(gurney_c) = 2800; + GVAR(gurney_k) = "3/5"; + GVAR(classes)[] = {QGVAR(medium_HD)}; +}; + +class M_SPG9_HEAT: RocketBase { + GVAR(skip) = 0; + GVAR(metal) = 4150; + GVAR(charge) = 340; + GVAR(gurney_c) = 2970; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(small_HD), QGVAR(medium_HD)}; +}; +class M_SPG9_HE: M_SPG9_HEAT { + GVAR(metal) = 4695; + GVAR(charge) = 655; + GVAR(gurney_c) = 2800; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(small_HD), QGVAR(tiny), QGVAR(medium_HD), QGVAR(medium_HD)}; +}; + +// https://armypubs.army.mil/epubs/DR_pubs/DR_a/pdf/web/ARN18072_TC%203-22x84%20FINAL%20WEB.pdf +class R_MRAAWS_HEAT_F: RocketBase { // Table A-20. HEAT 751 + GVAR(skip) = 0; + GVAR(metal) = 2265; + GVAR(charge) = 635; + GVAR(gurney_c) = 2970; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(small_HD)}; + +}; +class R_MRAAWS_HEAT55_F: R_MRAAWS_HEAT_F { // Table A-16. HEAT 551C + GVAR(metal) = 1940; + GVAR(charge) = 460; +}; +class R_MRAAWS_HE_F: R_MRAAWS_HEAT_F { // Table A-6. HE 441D RS + GVAR(metal) = 2300; + GVAR(charge) = 590; + GVAR(gurney_c) = 2800; + GVAR(gurney_k) = "3/5"; + GVAR(classes)[] = {QGVAR(small_HD)}; +}; + +class R_80mm_HE: RocketBase { // S-8D + GVAR(skip) = 0; + GVAR(charge) = 2150; + GVAR(metal) = 1650; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(small_HD), QGVAR(tiny_HD), QGVAR(tiny)}; +}; +class R_60mm_HE: R_80mm_HE { // no idea but looks like a FFAR so made it weaker + GVAR(metal) = 1040; + GVAR(charge) = 3850; +}; + +class m_70mm_saami: MissileBase { + GVAR(skip) = 0; + GVAR(charge) = 2150; + GVAR(metal) = 1650; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(small_HD), QGVAR(tiny_HD), QGVAR(tiny)}; +}; + +class Rocket_04_HE_F: MissileBase { // Shrieker (Hydra 70) + GVAR(skip) = 0; + GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; + GVAR(metal) = 3850; + GVAR(charge) = 1040; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "1/2"; +}; +class Rocket_03_HE_F: Rocket_04_HE_F { // S-8DM makes the most sense + GVAR(metal) = 1800; + GVAR(charge) = 2000; + GVAR(gurney_c) = 2300; +}; +class Rocket_04_AP_F: Rocket_04_HE_F { + GVAR(skip) = 1; +}; + +class ammo_Missile_CannonLaunchedBase: MissileBase { + GVAR(skip) = 1; +}; + +class R_230mm_fly: ShellBase { + GVAR(skip) = 0; + GVAR(charge) = 100; // kg + GVAR(metal) = 150; // kg + GVAR(gurney_c) = 2320; + GVAR(gurney_k) = "3/5"; + GVAR(classes)[] = {QGVAR(large_HD), QGVAR(large), QGVAR(large), QGVAR(large), QGVAR(huge_HD), QGVAR(huge_HD), QGVAR(huge)}; +}; + +class M_PG_AT: MissileBase { // DAGR M247 warhead + GVAR(skip) = 0; + GVAR(classes)[] = {QGVAR(tiny_HD), QGVAR(small_HD), QGVAR(small), QGVAR(medium)}; + GVAR(charge) = 910; + GVAR(metal) = 3085; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "1/2"; +}; +class M_AT: M_PG_AT { // DAR (Hydra 70) M151 warhead + GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; + GVAR(charge) = 1040; + GVAR(metal) = 3850; + GVAR(gurney_c) = 2700; +}; + +// ~~~~ Missiles: +class Missile_AGM_02_F: MissileBase { + // Source: http://fas.org/man/dod-101/sys/smart/agm-65.htm + GVAR(skip) = 0; + GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; + GVAR(metal) = 56250; + GVAR(charge) = 39000; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "1/2"; +}; +class Missile_AGM_01_F: Missile_AGM_02_F { // Kh-25MTP !!! fix me +}; +class M_Jian_AT: Missile_AGM_01_F { // imaginary missile? Not simiklar to any modern HJ-x or otherwise +}; + +class M_Titan_AA: MissileBase { + GVAR(skip) = 0; + GVAR(metal) = 1980; + GVAR(charge) = 1020; + GVAR(gurney_c) = 2501; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(tiny), QGVAR(tiny_HD), QGVAR(small_HD)}; +}; +class M_Titan_AT: MissileBase { + GVAR(skip) = 1; +}; +class M_Titan_AP: M_Titan_AT { + GVAR(skip) = 0; + GVAR(metal) = 400; + GVAR(charge) = 210; + GVAR(gurney_c) = 2800; + GVAR(gurney_k) = "3/5"; + GVAR(classes)[] = {QGVAR(medium_HD)}; +}; + +class M_Scalpel_AT: MissileBase { // 9K121 Vikhr + GVAR(skip) = 0; + GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; + GVAR(metal) = 10000; + GVAR(charge) = 3000; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "1/2"; +}; +class ACE_Hellfire_AGM114K: M_Scalpel_AT { + // Source: http://www.designation-systems.net/dusrm/m-114.html + GVAR(skip) = 0; + + GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; + GVAR(metal) = 8000; + GVAR(charge) = 2400; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "1/2"; +}; + +class ammo_Missile_CruiseBase: MissileBase {}; +class ammo_missile_cruise_01: ammo_Missile_CruiseBase { + GVAR(skip) = 0; + GVAR(classes)[] = {QGVAR(small), QGVAR(medium_HD), QGVAR(large_HD)}; + GVAR(metal) = 700000; + GVAR(charge) = 110000; + GVAR(gurney_c) = 2600; + GVAR(gurney_k) = "3/5"; +}; +class ammo_Missile_Cruise_01_Cluster: ammo_missile_cruise_01 {}; + +class ammo_Missile_AntiRadiationBase: MissileBase { + GVAR(gurney_k) = "1/2"; + GVAR(gurney_c) = 2400; +}; +class ammo_Missile_HARM: ammo_Missile_AntiRadiationBase { + GVAR(skip) = 0; + GVAR(classes)[] = {QGVAR(small), QGVAR(medium_HD), QGVAR(large_HD)}; + GVAR(charge) = 10000; + GVAR(metal) = 58000; +}; +class ammo_Missile_KH58: ammo_Missile_AntiRadiationBase { + GVAR(skip) = 0; + GVAR(classes)[] = {QGVAR(small), QGVAR(medium_HD), QGVAR(large_HD)}; + GVAR(charge) = 20000; + GVAR(metal) = 129000; +}; + +class M_Zephyr: M_Titan_AA { // model is an AMRAAM- WDU-41/B warhead + GVAR(skip) = 0; + GVAR(metal) = 12800; + GVAR(charge) = 4000; + GVAR(gurney_c) = 2900; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(tiny), QGVAR(medium_HD), QGVAR(small), QGVAR(small_HD)}; +}; + +class M_Air_AA: MissileBase { // Looks not real, maybe r-73 inspired? + GVAR(skip) = 0; + GVAR(charge) = 2450; + GVAR(metal) = 4950; + GVAR(gurney_c) = 2700; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(tiny), QGVAR(medium_HD), QGVAR(small_HD), QGVAR(small_HD)}; +}; + +class Missile_AA_04_F: MissileBase { + GVAR(skip) = 0; + GVAR(charge) = 4400; + GVAR(metal) = 5000; + GVAR(gurney_c) = 2830; + GVAR(gurney_k) = "1/2"; +}; +class Missile_AA_03_F: Missile_AA_04_F { + GVAR(charge) = 2450; + GVAR(metal) = 4950; + GVAR(gurney_c) = 2700; +}; + +class ammo_Missile_ShortRangeAABase: MissileBase { + GVAR(gurney_k) = "1/2"; +}; +class ammo_Missile_rim116: ammo_Missile_ShortRangeAABase { + GVAR(skip) = 0; + GVAR(charge) = 400; + GVAR(metal) = 730; + GVAR(gurney_c) = 2400; + GVAR(classes)[] = {QGVAR(tiny), QGVAR(small_HD)}; +}; +class ammo_Missile_BIM9X: ammo_Missile_ShortRangeAABase { + GVAR(skip) = 0; + GVAR(charge) = 440; + GVAR(metal) = 500; + GVAR(gurney_c) = 2900; + GVAR(classes)[] = {QGVAR(small), QGVAR(tiny)}; +}; +class ammo_Missile_AA_R73: ammo_Missile_ShortRangeAABase { + GVAR(skip) = 0; + GVAR(charge) = 2450; + GVAR(metal) = 4950; + GVAR(gurney_c) = 2700; + GVAR(classes)[] = {QGVAR(small), QGVAR(small), QGVAR(tiny)}; +}; + +class ammo_Missile_MediumRangeAABase: MissileBase { + GVAR(gurney_c) = 2900; + GVAR(gurney_k) = "1/2"; +}; +class ammo_Missile_rim162: ammo_Missile_MediumRangeAABase { + GVAR(skip) = 0; + GVAR(charge) = 138; // dg + GVAR(metal) = 252; // dg + GVAR(gurney_c) = 2400; + GVAR(classes)[] = {QGVAR(small), QGVAR(medium), QGVAR(medium), QGVAR(large)}; +}; +class ammo_Missile_AMRAAM_C: ammo_Missile_MediumRangeAABase { + GVAR(skip) = 0; + GVAR(charge) = 70; // dg + GVAR(metal) = 128; // dg + GVAR(classes)[] = {QGVAR(small), QGVAR(medium), QGVAR(medium)}; +}; +class ammo_Missile_AMRAAM_D: ammo_Missile_MediumRangeAABase { + GVAR(skip) = 0; + GVAR(charge) = 70; // dg + GVAR(metal) = 128; // dg + GVAR(classes)[] = {QGVAR(small), QGVAR(medium), QGVAR(medium)}; +}; +class ammo_Missile_AA_R77: ammo_Missile_MediumRangeAABase { + GVAR(skip) = 0; + GVAR(charge) = 80; // dg + GVAR(metal) = 145; // dg + GVAR(gurney_c) = 2700; + GVAR(classes)[] = {QGVAR(small), QGVAR(medium), QGVAR(large), QGVAR(large)}; +}; + +class M_Vorona_HEAT: MissileBase { + // tandem shaped charges + GVAR(skip) = 1; +}; +class M_Vorona_HE: M_Vorona_HEAT { + // All signs point to this being a thermobaric round so low frag count + GVAR(skip) = 0; + GVAR(metal) = 13800; + GVAR(charge) = 4950; + GVAR(gurney_c) = 2800; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(tiny)}; +}; + +class M_127mm_Firefist_AT: MissileBase { // HOT missile + GVAR(skip) = 1; +}; + +class M_NLAW_AT_F: MissileBase { + GVAR(skip) = 1; +}; + +// ~~~~ Shell +class Sh_75mm_Railgun_APFSDS: ShellBase { + GVAR(skip) = 1; +}; +class Sh_120mm_APFSDS: ShellBase { + GVAR(skip) = 1; +}; +class Sh_125mm_APFSDS: Sh_120mm_APFSDS { + GVAR(skip) = 1; +}; + +class Sh_155mm_AMOS: ShellBase { + // Source: http://www.globalsecurity.org/military/systems/munitions/m795.htm + GVAR(skip) = 0; + GVAR(charge) = 9979; + GVAR(metal) = 36000; + GVAR(gurney_c) = 2440; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large), QGVAR(huge), QGVAR(huge_HD), QGVAR(huge)}; +}; + +class Sh_82mm_AMOS: Sh_155mm_AMOS { // VO-832DU + GVAR(charge) = 420; + GVAR(metal) = 2680; + GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; +}; + +class Sh_120mm_HE: ShellBase { + GVAR(skip) = 0; + GVAR(charge) = 3148; + GVAR(metal) = 23000; + GVAR(gurney_c) = 2830; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; +}; +class Sh_120mm_HEAT_MP: ShellBase { + GVAR(skip) = 0; + GVAR(charge) = 2500; + GVAR(metal) = 5000; + GVAR(gurney_c) = 2500; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(small), QGVAR(medium), QGVAR(medium_HD), QGVAR(medium_HD)}; +}; + +class ammo_ShipCannon_120mm_HE: Sh_155mm_AMOS { + GVAR(charge) = 3148; + GVAR(metal) = 23000; + GVAR(gurney_c) = 2830; + GVAR(classes)[] = {QGVAR(small), QGVAR(small), QGVAR(medium_HD), QGVAR(large_HD)}; +}; + +class Sh_125mm_HE: Sh_120mm_HE { + GVAR(metal) = 19900; + GVAR(charge) = 3400; + GVAR(gurney_c) = 2901; +}; + +class Sh_125mm_HEAT: Sh_125mm_HE { + GVAR(skip) = 1; + GVAR(metal) = 16760; + GVAR(charge) = 1640; + GVAR(gurney_c) = 2901; +}; + +class Sh_105mm_HEAT_MP: Sh_125mm_HEAT { + GVAR(skip) = 0; + GVAR(classes)[] = {QGVAR(small), QGVAR(medium_HD), QGVAR(medium_HD), QGVAR(medium_HD)}; + GVAR(metal) = 11400; + GVAR(charge) = 7100; + GVAR(gurney_c) = 2800; +}; + +class ModuleOrdnanceHowitzer_F_ammo: Sh_155mm_AMOS { + GVAR(skip) = 0; + GVAR(metal) = 1950; + GVAR(charge) = 15800; + GVAR(gurney_c) = 2320; + GVAR(gurney_k) = "1/2"; + GVAR(classes)[] = {QGVAR(large), QGVAR(large_HD), QGVAR(large_HD), QGVAR(large_HD), QGVAR(huge_HD), QGVAR(huge_HD), QGVAR(huge_HD)}; +}; +class ammo_Penetrator_Base: ShellBase { + GVAR(skip) = 1; +}; + +// ~~~~ Special +class ProbingBeam_01_F: BulletBase { + GVAR(skip) = 1; +}; + +class IRStrobeBase: GrenadeCore { + GVAR(skip) = 1; +}; +class FlareCore: GrenadeCore { // flares shouldn't have EH, but in case + GVAR(skip) = 1; +}; + +class Default; +class Laserbeam: Default { + GVAR(skip) = 1; +}; + +class FuelExplosion: Default { + GVAR(skip) = 1; +}; + +class HelicopterExploSmall: ShellBase { + GVAR(skip) = 1; +}; + +class LightningBolt: ShellBase { + GVAR(skip) = 1; +}; + +class M_Mo_82mm_AT: MissileBase { + GVAR(skip) = 1; +}; diff --git a/addons/frag/CfgAmmoSpall.hpp b/addons/frag/CfgAmmoSpall.hpp new file mode 100644 index 00000000000..c53ce4db4a8 --- /dev/null +++ b/addons/frag/CfgAmmoSpall.hpp @@ -0,0 +1,158 @@ +class GVAR(spallBase): B_65x39_Caseless { + GVAR(skip) = 1; + submunitionAmmo[] = {QGVAR(small), 4, QGVAR(medium), 3, QGVAR(large), 2, QGVAR(huge), 1}; + submunitionConeType[] = {"random", 20}; + submunitionConeAngle = 40; + submunitionDirectionType = "SubmunitionModelDirection"; + triggerTime = 0; + submunitionInitialOffset[] = {0, 0, 0}; + submunitionInitSpeed = 0; + triggerSpeedCoef[] = {0.75, 1.25}; + deleteParentWhenTriggered = 1; + submunitionParentSpeedCoef = 1; +}; + + +/* + * ground + */ +class GVAR(ground_spall_tiny): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 9, QGVAR(small), 1}; + submunitionConeType[] = {"poissondisccenter", 4}; +}; + +class GVAR(ground_spall_small): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(small), 4, QGVAR(medium), 1}; + submunitionConeType[] = {"poissondisccenter", 6}; +}; + +class GVAR(ground_spall_medium): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(small), 2, QGVAR(small_HD), 1, QGVAR(medium), 3, QGVAR(medium_HD), 1, QGVAR(large), 2}; + submunitionConeType[] = {"poissondisccenter", 15}; +}; + +class GVAR(ground_spall_large): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 3, QGVAR(tiny_HD), 3, QGVAR(small), 4, QGVAR(small_HD), 4, QGVAR(medium_HD), 5, QGVAR(large), 1, QGVAR(large_HD), 2}; + submunitionConeType[] = {"poissondisccenter", 15}; +}; + +class GVAR(ground_spall_huge): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 3, QGVAR(tiny_HD), 3, QGVAR(small), 4, QGVAR(small_HD), 4, QGVAR(medium), 5, QGVAR(large), 1, QGVAR(large_HD), 2}; + submunitionConeType[] = {"poissondisccenter", 20}; +}; + + +/* + * rock + */ +class GVAR(rock_spall_tiny): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(small), 4, QGVAR(medium_HD), 1}; + submunitionConeType[] = {"poissondisccenter", 4}; +}; + +class GVAR(rock_spall_small): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(small), 4, QGVAR(medium), 1}; + submunitionConeType[] = {"poissondisccenter", 5}; +}; + +class GVAR(rock_spall_medium): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(small), 4, QGVAR(medium), 1, QGVAR(medium_HD), 2, QGVAR(large_HD), 1}; + submunitionConeType[] = {"poissondisccenter", 7}; +}; + +class GVAR(rock_spall_large): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(small), 5, QGVAR(medium), 2, QGVAR(large), 1}; + submunitionConeType[] = {"poissondisccenter", 10}; +}; + +class GVAR(rock_spall_huge): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(small), 5, QGVAR(medium), 2, QGVAR(large), 1, QGVAR(huge_HD), 1}; + submunitionConeType[] = {"poissondisccenter", 13}; +}; + + +/* + * wood + */ +class GVAR(wood_spall_tiny): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 2, QGVAR(small), 4}; + submunitionConeType[] = {"poissondisccenter", 4}; +}; + +class GVAR(wood_spall_small): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 2, QGVAR(small), 4, QGVAR(medium), 1}; + submunitionConeType[] = {"poissondisccenter", 6}; +}; + +class GVAR(wood_spall_medium): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 2, QGVAR(small), 2, QGVAR(medium), 2, QGVAR(medium_HD), 1, QGVAR(large_HD), 1}; + submunitionConeType[] = {"poissondisccenter", 8}; +}; + +class GVAR(wood_spall_large): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 1, QGVAR(small), 3, QGVAR(medium), 2, QGVAR(large_HD), 2, QGVAR(huge_HD), 1}; + submunitionConeType[] = {"poissondisccenter", 10}; +}; + +class GVAR(wood_spall_huge): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 1, QGVAR(small), 3, QGVAR(medium), 2, QGVAR(large_HD), 2, QGVAR(huge_HD), 1}; + submunitionConeType[] = {"poissondisccenter", 12}; +}; + + +/* + * concrete + */ +class GVAR(concrete_spall_tiny): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 6, QGVAR(tiny_HD), 3, QGVAR(small), 1}; + submunitionConeType[] = {"poissondisccenter", 4}; +}; + +class GVAR(concrete_spall_small): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 4, QGVAR(tiny_HD), 2, QGVAR(small), 2, QGVAR(medium), 1}; + submunitionConeType[] = {"poissondisccenter", 6}; +}; + +class GVAR(concrete_spall_medium): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 6, QGVAR(tiny_HD), 1, QGVAR(small), 4, QGVAR(medium), 5, QGVAR(large_HD), 1}; + submunitionConeType[] = {"poissondisccenter", 9}; +}; + +class GVAR(concrete_spall_large): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 6, QGVAR(small), 4, QGVAR(medium), 3, QGVAR(large), 1, QGVAR(large_HD), 2}; + submunitionConeType[] = {"poissondisccenter", 12}; +}; + +class GVAR(concrete_spall_huge): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 8, QGVAR(small), 4, QGVAR(medium), 3, QGVAR(large), 1, QGVAR(large_HD), 1, QGVAR(huge_HD), 1}; + submunitionConeType[] = {"poissondisccenter", 18}; +}; + + +/* + * metal + */ +class GVAR(metal_spall_tiny): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 9, QGVAR(small), 1}; + submunitionConeType[] = {"poissondisccenter", 4}; +}; + +class GVAR(metal_spall_small): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 4, QGVAR(small), 2, QGVAR(medium), 1}; + submunitionConeType[] = {"poissondisccenter", 6}; +}; + +class GVAR(metal_spall_medium): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 5, QGVAR(small), 4, QGVAR(medium), 2, QGVAR(large), 1}; + submunitionConeType[] = {"poissondisccenter", 8}; +}; + +class GVAR(metal_spall_large): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 4, QGVAR(small), 3, QGVAR(medium), 2, QGVAR(large), 1, QGVAR(huge), 1}; + submunitionConeType[] = {"poissondisccenter", 12}; +}; + +class GVAR(metal_spall_huge): GVAR(spallBase) { + submunitionAmmo[] = {QGVAR(tiny), 8, QGVAR(small), 3, QGVAR(medium), 2, QGVAR(large), 3, QGVAR(huge), 1}; + submunitionConeType[] = {"poissondisccenter", 18}; +}; diff --git a/addons/frag/README.md b/addons/frag/README.md index ca62771f00e..797e652b207 100644 --- a/addons/frag/README.md +++ b/addons/frag/README.md @@ -1,4 +1,4 @@ ace_frag ======== -Shrapnel system for explosives. +Explosive fragmentation, round spalling, and explosive reflection diff --git a/addons/frag/XEH_PREP.hpp b/addons/frag/XEH_PREP.hpp index a7fb8ff8c34..127f027f98e 100644 --- a/addons/frag/XEH_PREP.hpp +++ b/addons/frag/XEH_PREP.hpp @@ -1,25 +1,22 @@ -PREP(dev_debugAmmo); - -PREP(doSpall); -PREP(fired); -PREP(frago); -PREP(spallTrack); - -// * Other */ PREP(addBlackList); -PREP(dev_addTrack); -PREP(dev_drawTraces); -PREP(spallHP); -PREP(dev_startTracing); -PREP(dev_stopTracing); -PREP(dev_trackTrace); - -// New tracking mechanisms -PREP(masterPFH); -PREP(pfhRound); -PREP(addPfhRound); - -// Explosive Reflection -PREP(findReflections); +PREP(dev_clearTraces); +PREP(dev_debugAmmo); +PREP(dev_drawTrace); +PREP(dev_fragCalcDump); +PREP(dev_sphereDraw); +PREP(dev_trackHitBox); +PREP(dev_trackObj); PREP(doExplosions); PREP(doReflections); +PREP(doSpallHitPart); +PREP(doSpallPenetrate); +PREP(findReflections); +PREP(fired); +PREP(frago); +PREP(getFragInfo); +PREP(getMaterialInfo); +PREP(getSpallInfo); +PREP(initMaterialCache); +PREP(setClassBlacklisted); +PREP(shouldFrag); +PREP(shouldSpall); diff --git a/addons/frag/XEH_postInit.sqf b/addons/frag/XEH_postInit.sqf index cc58e1d15b2..b4c307749b8 100644 --- a/addons/frag/XEH_postInit.sqf +++ b/addons/frag/XEH_postInit.sqf @@ -1,32 +1,54 @@ #include "script_component.hpp" -if (isServer) then { - GVAR(lastFragTime) = -1; - [QGVAR(frag_eh), LINKFUNC(frago)] call CBA_fnc_addEventHandler; -}; - ["CBA_settingsInitialized", { - if (!GVAR(enabled)) exitWith {}; - - // Register fire event handler - ["ace_firedPlayer", LINKFUNC(fired)] call CBA_fnc_addEventHandler; - ["ace_firedNonPlayer", LINKFUNC(fired)] call CBA_fnc_addEventHandler; - ["ace_firedPlayerVehicle", LINKFUNC(fired)] call CBA_fnc_addEventHandler; - ["ace_firedNonPlayerVehicle", LINKFUNC(fired)] call CBA_fnc_addEventHandler; + [{ + params ["_projectile", "_posASL"]; - addMissionEventHandler ["EachFrame", {call FUNC(masterPFH)}]; -}] call CBA_fnc_addEventHandler; + if (_projectile getVariable [QGVAR(blacklisted), false]) exitWith {}; -// Cache for ammo type configs -GVAR(cacheRoundsTypesToTrack) = createHashMap; + private _ammo = typeOf _projectile; + if (GVAR(reflectionsEnabled)) then { + [_posASL, _ammo] call FUNC(doReflections); + }; + if (GVAR(enabled) && _ammo call FUNC(shouldFrag)) then { + // only let a unit make a frag event once per second + private _instigator = _shotParents select !isNull ((getShotParents _projectile)#1); + if (CBA_missionTime < (_instigator getVariable [QGVAR(nextFragEvent), -1])) exitWith {}; + _instigator setVariable [QGVAR(nextFragEvent), CBA_missionTime + ACE_FRAG_FRAG_UNIT_HOLDOFF]; -// Debug stuff: + // Wait a frame to make sure it doesn't target the dead + [{ + [QGVAR(frag_eh), _this] call CBA_fnc_serverEvent + }, [_posASL, _ammo]] call CBA_fnc_execNextFrame; + }; + }] call EFUNC(common,addExplosionEventHandler); -#ifdef DRAW_FRAG_INFO -[] call FUNC(dev_startTracing); + ["ace_firedPlayer", LINKFUNC(fired)] call CBA_fnc_addEventHandler; + ["ace_firedNonPlayer", LINKFUNC(fired)] call CBA_fnc_addEventHandler; + ["ace_firedPlayerVehicle", LINKFUNC(fired)] call CBA_fnc_addEventHandler; + ["ace_firedNonPlayerVehicle", LINKFUNC(fired)] call CBA_fnc_addEventHandler; +#ifdef DEBUG_MODE_DRAW + [QGVAR(dev_clearTraces), LINKFUNC(dev_clearTraces)] call CBA_fnc_addEventHandler; + + if (!hasInterface) exitWith {}; + GVAR(dev_drawPFEH) = [LINKFUNC(dev_drawTrace), 0] call CBA_fnc_addPerFrameHandler; + ["ace_interact_menu_newControllableObject", { + params ["_type"]; + + private _action = [ + QGVAR(debugReset), + "Reset ACE Frag traces", + "", + {[QGVAR(dev_clearTraces), []] call CBA_fnc_globalEvent;}, + {GVAR(dev_trackLines) isNotEqualTo createHashMap} + ] call EFUNC(interact_menu,createAction); + + [_type, 1, ["ACE_SelfActions"], _action, true] call EFUNC(interact_menu,addActionToClass); + }] call CBA_fnc_addEventHandler; #endif +}] call CBA_fnc_addEventHandler; -#ifdef DEBUG_MODE_FULL +#ifdef LOG_FRAG_INFO [true, true, 30] call FUNC(dev_debugAmmo); #endif diff --git a/addons/frag/XEH_preInit.sqf b/addons/frag/XEH_preInit.sqf index dc616917b88..2cb4a8e368d 100644 --- a/addons/frag/XEH_preInit.sqf +++ b/addons/frag/XEH_preInit.sqf @@ -6,20 +6,32 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; -GVAR(blackList) = []; -GVAR(traceFrags) = false; +GVAR(spallMaterialCache) = uiNamespace getVariable QGVAR(spallMaterialCache); +GVAR(spallInfoCache) = createHashMap; +GVAR(shouldSpallCache) = createHashMap; +GVAR(nextSpallAllowTime) = -1; -GVAR(spallHPData) = []; -GVAR(spallIsTrackingCount) = 0; - -GVAR(traceID) = -1; -GVAR(traces) = []; -GVAR(tracesStarted) = false; - -GVAR(lastIterationIndex) = 0; -GVAR(objects) = []; -GVAR(arguments) = []; +GVAR(shouldFragCache) = createHashMap; +GVAR(fragInfoCache) = createHashMap; +GVAR(lastFragTime) = -1; #include "initSettings.inc.sqf" +GVAR(dev_trackLines) = createHashMap; +GVAR(dev_hitBoxes) = createHashMap; +GVAR(dev_eventSpheres) = []; +GVAR(dev_drawPFEH) = -1; + +#ifdef DEBUG_MODE_DRAW +#include "initSettingsDebug.inc.sqf" +#else +GVAR(debugOptions) = false; +GVAR(dbgSphere) = false; +GVAR(drawHitBox) = false; +#endif + +if (isServer) then { + [QGVAR(frag_eh), LINKFUNC(frago)] call CBA_fnc_addEventHandler; +}; + ADDON = true; diff --git a/addons/frag/XEH_preStart.sqf b/addons/frag/XEH_preStart.sqf index 022888575ed..d3e2573e07e 100644 --- a/addons/frag/XEH_preStart.sqf +++ b/addons/frag/XEH_preStart.sqf @@ -1,3 +1,4 @@ #include "script_component.hpp" #include "XEH_PREP.hpp" +call FUNC(initMaterialCache); diff --git a/addons/frag/config.cpp b/addons/frag/config.cpp index f3b409dbd03..488b72c5070 100644 --- a/addons/frag/config.cpp +++ b/addons/frag/config.cpp @@ -8,7 +8,7 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; author = ECSTRING(common,ACETeam); - authors[] = {"Nou"}; + authors[] = {"Nou", "johnb43", "Lambda.Tiger"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; diff --git a/addons/frag/functions/fnc_addBlackList.sqf b/addons/frag/functions/fnc_addBlackList.sqf deleted file mode 100644 index d0cc127d059..00000000000 --- a/addons/frag/functions/fnc_addBlackList.sqf +++ /dev/null @@ -1,21 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Jaynus, NouberNou - * Adds a round to the blacklist (will be ignored). - * - * Arguments: - * 0: Projectile - * - * Return Value: - * None - * - * Example: - * [bullet] call ace_frag_fnc_addBlackList - * - * Public: No - */ - -params ["_round"]; -TRACE_1("addBlackList",_round); - -GVAR(blackList) pushBack _round; diff --git a/addons/frag/functions/fnc_addBlacklist.sqf b/addons/frag/functions/fnc_addBlacklist.sqf new file mode 100644 index 00000000000..a835dc33702 --- /dev/null +++ b/addons/frag/functions/fnc_addBlacklist.sqf @@ -0,0 +1,32 @@ +#include "..\script_component.hpp" +/* + * Author: Jaynus, NouberNou, Lambda.Tiger + * Adds a round to the blacklist (will be ignored) and removes any ace_frag event handlers added to it. + * Once blacklisted a projectile can not be "unblacklisted." + * + * Arguments: + * 0: Projectile to be blacklisted + * + * Return Value: + * Was the projectile blacklisted + * + * Example: + * [_projectile] call ace_frag_fnc_addBlackList + * + * Public: Yes + */ + +params [["_projectile", objNull, [objNull]]]; +TRACE_2("addBlackList",_projectile,typeOf projectile); + +if (isNull _projectile || {!isClass (configFile >> "CfgAmmo" >> (typeOf _projectile))}) exitWith { + TRACE_1("Invalid projectile",_this); + false +}; + +_projectile setVariable [QGVAR(blacklisted), true]; +(_projectile getVariable [QGVAR(spallEH), [-1, -1]]) params ["_hitPartEH", "_penetratedEH"]; +_projectile removeEventHandler ["HitPart", _hitPartEH]; +_projectile removeEventHandler ["Penetrated", _penetratedEH]; + +true diff --git a/addons/frag/functions/fnc_addPfhRound.sqf b/addons/frag/functions/fnc_addPfhRound.sqf deleted file mode 100644 index 358a9ee71ea..00000000000 --- a/addons/frag/functions/fnc_addPfhRound.sqf +++ /dev/null @@ -1,77 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Jaynus, NouberNou - * Starts tracking a round that will frag. - * Should only be called once per round. - * - * Arguments: - * 0: Shooter - * 1: Ammo classname - * 2: Projectile - * - * Return Value: - * None - * - * Example: - * [player, "handGrenade", bullet] call ace_frag_fnc_addPfhRound - * - * Public: No - */ - -params ["_gun", "_type", "_round"]; -TRACE_3("addPfhRound",_gun,_type,_round); - -if (!GVAR(enabled)) exitWith {TRACE_1("setting disabled",_this);}; - -if (!alive _round) exitWith {TRACE_1("round dead?",_this);}; - -if (_round in GVAR(blackList)) exitWith { - TRACE_1("round in blackList",_this); - REM(GVAR(blackList),_round); -}; - -// Exit on max track -if ((count GVAR(objects)) >= GVAR(maxTrack)) exitWith {TRACE_1("maxTrack limit",count GVAR(objects));}; - -private _doSpall = false; -if (GVAR(SpallEnabled)) then { - if (GVAR(spallIsTrackingCount) <= 0) then { - GVAR(spallHPData) = []; - }; - if (GVAR(spallIsTrackingCount) > 5) then { - TRACE_1("At Spall Limit",GVAR(spallIsTrackingCount)); - } else { - _doSpall = true; - INC(GVAR(spallIsTrackingCount)); - }; - TRACE_2("",_doSpall,GVAR(spallIsTrackingCount)); -}; - -#ifdef DRAW_FRAG_INFO -[ACE_player, _round, [0, 1, 0, 1]] call FUNC(dev_addTrack); -#endif - -// We only do the single track object check here. -// We should do an {!(_round in GVAR(objects))} -// But we leave that out here for optimization. So this cannot be a framework function -// Otherwise, it should only be added once and from the FiredEH -if (alive _round) then { - private _spallTrack = []; - private _spallTrackID = []; - - private _args = [ - _round, getPosASL _round, velocity _round, _type, diag_frameno, getPosASL _round, _doSpall, _spallTrack, _spallTrackID, - getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip)), - getNumber (configFile >> "CfgAmmo" >> _type >> "explosive"), - getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange"), - getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force)), - getNumber (configFile >> "CfgAmmo" >> _type >> "indirecthit") * (sqrt (getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange"))) - ]; - TRACE_1("Initializing track",_round); - GVAR(objects) pushBack _round; - GVAR(arguments) pushBack _args; - - if (_doSpall) then { - [_round, 1, _spallTrack, _spallTrackID] call FUNC(spallTrack); - }; -}; diff --git a/addons/frag/functions/fnc_dev_addTrack.sqf b/addons/frag/functions/fnc_dev_addTrack.sqf deleted file mode 100644 index 0e75a9fb994..00000000000 --- a/addons/frag/functions/fnc_dev_addTrack.sqf +++ /dev/null @@ -1,26 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_dev_addTrack - * - * Public: No - */ - -params ["_origin", "_obj", ["_color", [1, 0, 0, 1]]]; - -private _positions = []; -private _objSpd = vectorMagnitude (velocity _obj); -_positions pushBack [getPos _obj, _objSpd]; -private _data = [_origin, typeOf _origin, typeOf _obj, _objSpd, _positions, _color]; - -private _index = GVAR(traces) pushBack _data; -[DFUNC(dev_trackTrace), 0, [_obj, _index, CBA_missionTime]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/frag/functions/fnc_dev_clearTraces.sqf b/addons/frag/functions/fnc_dev_clearTraces.sqf new file mode 100644 index 00000000000..6e2b820bacb --- /dev/null +++ b/addons/frag/functions/fnc_dev_clearTraces.sqf @@ -0,0 +1,25 @@ +#include "..\script_component.hpp" +/* + * Author: Lambda.Tiger + * Clears all dev spheres and traces. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * call ace_frag_fnc_dev_clearTraces + * + * Public: No + */ + +{ + deleteVehicle _x; +} forEach GVAR(dev_eventSpheres); + +GVAR(dev_eventSpheres) = []; + +GVAR(dev_trackLines) = createHashMap; +GVAR(dev_hitBoxes) = createHashMap; diff --git a/addons/frag/functions/fnc_dev_debugAmmo.sqf b/addons/frag/functions/fnc_dev_debugAmmo.sqf index 4484edbdc43..fe868df3428 100644 --- a/addons/frag/functions/fnc_dev_debugAmmo.sqf +++ b/addons/frag/functions/fnc_dev_debugAmmo.sqf @@ -1,11 +1,15 @@ -#define DEBUG_MODE_FULL #include "..\script_component.hpp" /* - * Author: ACE-Team - * + * Author: ACE-Team, Lambda.Tiger + * This function will dump every ammo config that would generate ace_frag + * fragments that could be fired from a weapon. * * Arguments: - * None + * 0: Log ammo types that wouldn't normally frag (default: false) + * 1: Only print ammo without ACE_frag entries, inherited or otherwise (default: true) + * 2: Only export ammo classes of classes referenced in CfgMagazines and their + * submunitions (default: false) + * 3: Force a CSV format on debug print. (default: false) * * Return Value: * None @@ -17,65 +21,90 @@ */ params [ - ["_debugMissing", true, [false]], - ["_debugForce", false, [false]], - ["_debugSkippedFragPower", 30, [0]] + ["_logAll", false, [false]], + ["_printOnlyIncomplete", true, [true]], + ["_onlyShotAmmoTypes", false, [false]], + ["_csvFormat", false, [false]] ]; diag_log text format ["~~~~~~~~~~~~~Start [%1]~~~~~~~~~~~~~", _this]; +if (_csvFormat) then { + diag_log text format ["ammo,gurney_c,gurney_m,gurney_k,gurney_gC,skip,Inheritance"]; +}; -private _allMagsConfigs = configProperties [configFile >> "CfgMagazines", "isClass _x", true]; -private _processedCfgAmmos = []; - -{ - private _ammo = toLowerANSI getText (_x >> "ammo"); - if (_ammo != "" && {!(_ammo in _processedCfgAmmos)}) then { - _processedCfgAmmos pushBack _ammo; - - //Ignore mines/bombs - if (_ammo isKindOf "TimeBombCore") exitWith {}; - - _ammoConfig = configFile >> "CfgAmmo" >> _ammo; - - //Read configs and test if it would actually cause a frag, using same logic as FUNC(pfhRound) - private _skip = getNumber (_ammoConfig >> QGVAR(skip)); - private _explosive = getNumber (_ammoConfig >> "explosive"); - private _indirectRange = getNumber (_ammoConfig >> "indirectHitRange"); - private _force = getNumber (_ammoConfig >> QGVAR(force)); - private _fragPower = getNumber (_ammoConfig >> "indirecthit") * (sqrt ((getNumber (_ammoConfig >> "indirectHitRange")))); +// Gather all configs, either those that could be created from firing or all classes +private _allAmmoConfigs = createHashMap; +if (_onlyShotAmmoTypes) then { + private _configSearchFunction = { + params [ + ["_ammo", "", [""]] + ]; + if (_ammo isEqualTo "" || {_ammo in _allAmmoConfigs}) exitWith {}; + _allAmmoConfigs set [_ammo, 1]; + private _cfgAmmoRoot = configFile >> "CfgAmmo"; + private _submunitionConfig = _cfgAmmoRoot >> _ammo >> "submunitionAmmo"; + if (isArray _submunitionConfig) then { + private _subMunition = getArray _submunitionConfig; + for "_i" from 0 to count _subMunition - 1 do { + if (_i mod 2 == 0) then { + configName (_cfgAmmoRoot >> (_subMunition#_i)) call _configSearchFunction; + }; + }; + } else { + private _subMunition = getText _submunitionConfig; + if (_subMunition isNotEqualTo "") then { + configName (_cfgAmmoRoot >> _subMunition) call _configSearchFunction; + }; + }; + }; + private _allMagazineConfigs = configProperties [configFile >> "CfgMagazines", "isClass _x", true]; + private _cfgAmmoCfgPath = configFile >> "CfgAmmo"; + { + private _magAmmo = getText (_x >> "ammo"); + configName (_cfgAmmoCfgPath >> _magAmmo) call _configSearchFunction; + } forEach _allMagazineConfigs; + _allAmmoConfigs = keys _allAmmoConfigs; +} else { + _allAmmoConfigs = configProperties [configFile >> "CfgAmmo", "isClass _x && !('ace_frag' in configName _x)", true] apply {configName _x}; +}; - private _shouldAdd = (_skip == 0) && {(_force == 1) || {_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}}}; +private _processedCfgAmmos = 0; +private _printCount = 0; +{ // Begin forEach to check each ammo type + private _ammo = _x; + if (_ammo isNotEqualTo "") then { + INC(_processedCfgAmmos); - if (_shouldAdd) then { - if (_debugForce && {((getNumber(_ammoConfig >> "hit")) < 5) || {_fragPower < 10}}) then { - diag_log text format ["Ammo [%1] from Mag [%2] - Weak but will still frag!", _ammo, configName _x]; - diag_log text format [" - _force=%1,_fragPower=%2", _force, _fragPower]; - }; + private _ammoConfig = configFile >> "CfgAmmo" >> _ammo; + _ammo call FUNC(shouldFrag) params ["_shouldFrag"]; - private _warn = false; + if (_shouldFrag || _logAll) then { - _fragTypes = getArray (_ammoConfig >> QGVAR(CLASSES)); - if (_fragTypes isEqualTo []) then {_warn = true;}; - _c = getNumber(_ammoConfig >> QGVAR(CHARGE)); - if (_c == 0) then {_warn = true;}; - _m = getNumber(_ammoConfig >> QGVAR(METAL)); - if (_m == 0) then {_warn = true;}; - _k = getNumber(_ammoConfig >> QGVAR(GURNEY_K)); - if (_k == 0) then {_warn = true;}; - _gC = getNumber(_ammoConfig >> QGVAR(GURNEY_C)); - if (_gC == 0) then {_warn = true;}; + private _print = false; + private _skip = getNumber (_ammoConfig >> QGVAR(skip)); + private _fragTypes = getArray (_ammoConfig >> QGVAR(classes)); + if (_fragTypes isEqualTo []) then {_print = true;}; + private _c = getNumber (_ammoConfig >> QGVAR(charge)); + if (_c == 0) then {_print = true;}; + private _m = getNumber (_ammoConfig >> QGVAR(metal)); + if (_m == 0) then {_print = true;}; + private _k = getNumber (_ammoConfig >> QGVAR(gurney_k)); + if (_k == 0) then {_print = true;}; + private _gC = getNumber (_ammoConfig >> QGVAR(gurney_c)); + if (_gC == 0) then {_print = true;}; - if (_debugMissing && {_warn}) then { - diag_log text format ["Ammo [%1] from Mag [%2] MISSING frag configs:", _ammo, configName _x]; - diag_log text format [" - _c=%1,_m=%2,_k=%3,_gC=%4,_fragTypes=%5", _c, _m, _k, _gC, _fragTypes]; - }; - } else { - if ((_fragPower > _debugSkippedFragPower) && {isArray (_ammoConfig >> QGVAR(CLASSES))}) then { - diag_log text format ["Ammo [%1] from Mag [%2] has frag configs but will NOT frag:", _ammo, configName _x]; - diag_log text format ["- skip=%1,explosive=%2,indirectHitRange=%3,force=%4,fragPower=%5", _skip, _explosive, _indirectRange, _force, _fragPower]; + if (!_printOnlyIncomplete || {_print && _skip != 0}) then { + INC(_printCount); + if (_csvFormat) then { + diag_log text format ["%6,%1,%2,%3,%4,%5,%8,%7", _c, _m, _k, _gC, _skip, _ammo, [_ammoConfig, true] call BIS_fnc_returnParents, _shouldFrag]; + } else { + diag_log text format ["Ammo [%1] MISSING frag configs:", _ammo]; + diag_log text format ["_c=%1,_m=%2,_k=%3,_gC=%4,_skip=%5,_fragTypes=%6", _c, _m, _k, _gC, _skip, _fragTypes]; + }; }; }; }; -} forEach _allMagsConfigs; +} forEach _allAmmoConfigs; -diag_log text format ["~~~~~~~~~~~~~End [%1-%2]~~~~~~~~~~~~~", count _allMagsConfigs, count _processedCfgAmmos]; +diag_log text format ["~~~~~~~~~~~~~~End [%1-%2]~~~~~~~~~~~~~~", count _allAmmoConfigs, _processedCfgAmmos]; +diag_log text format ["~~~~~~~~~~~~~~Printed: %1~~~~~~~~~~~", _printCount]; diff --git a/addons/frag/functions/fnc_dev_drawTrace.sqf b/addons/frag/functions/fnc_dev_drawTrace.sqf new file mode 100644 index 00000000000..8b027e1f3ca --- /dev/null +++ b/addons/frag/functions/fnc_dev_drawTrace.sqf @@ -0,0 +1,45 @@ +#include "..\script_component.hpp" +/* + * Author: Lambda.Tiger + * This function draws all development traces and is intended to be called on each frame. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * call ace_frag_fnc_dev_drawTrace + * + * Public: No + */ + +#define HITBOX_DRAW_PATH [[3, 2, 1, 5, 6, 7, 3, 0, 4, 5], [0, 1], [2, 6], [7, 4]] + +if (!GVAR(debugOptions)) exitWith {}; + +{ + _y params ["_posArray", "_color"]; + if (count _posArray > 1) then { + for "_j" from 1 to count _posArray - 1 do { + drawLine3D [_posArray#(_j - 1), _posArray#_j, _color]; + }; + }; +} forEach GVAR(dev_trackLines); + +if (GVAR(drawHitBox)) then { + { + _y params ["_object", "_boxPoints", "_color"]; + if (!alive _object) then { + GVAR(dev_hitBoxes) deleteAt _x; + continue; + }; + + { + for "_i" from 1 to count _x - 1 do { + drawLine3D [_object modelToWorld (_boxPoints#(_x#_i)), _object modelToWorld (_boxPoints#(_x#(_i - 1))), _color]; + }; + } forEach HITBOX_DRAW_PATH; + } forEach GVAR(dev_hitBoxes); +}; diff --git a/addons/frag/functions/fnc_dev_drawTraces.sqf b/addons/frag/functions/fnc_dev_drawTraces.sqf deleted file mode 100644 index 7fcca3c48fe..00000000000 --- a/addons/frag/functions/fnc_dev_drawTraces.sqf +++ /dev/null @@ -1,37 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_dev_drawTraces - * - * Public: No - */ - -{ - _x params ["", "", "", "", "_positions", "_color"]; - private _index = 0; - private _max = count _positions; - // private _lastSpd = []; - private _lastPos = []; - while {_index < _max} do { - _data1 = _positions select _index; - _data2 = _positions select ([_index + ACE_TRACE_DRAW_INC, _max - 1] select (_index + ACE_TRACE_DRAW_INC >= _max)); - - _pos1 = _data1 select 0; - _pos2 = _data2 select 0; - ADD(_index,ACE_TRACE_DRAW_INC); - - drawLine3D [_pos1, _pos2, _color]; - _lastPos = _pos2; - // _lastSpd = _data1 select 1; - }; - // drawIcon3D ["", [1,0,0,1], _lastPos, 0, 0, 0, format ["%1m/s", _lastSpd], 1, 0.05, "RobotoCondensed"]; -} forEach GVAR(traces); diff --git a/addons/frag/functions/fnc_dev_fragCalcDump.sqf b/addons/frag/functions/fnc_dev_fragCalcDump.sqf new file mode 100644 index 00000000000..88be643c258 --- /dev/null +++ b/addons/frag/functions/fnc_dev_fragCalcDump.sqf @@ -0,0 +1,56 @@ +#include "..\script_component.hpp" +/* + * Author: Lambda.Tiger, based on fnc_dev_debugAmmo by "ACE-Team" + * Dumps all ammo types to see if there's any reason to spawn fragments given hit power and distance. + * Good for grasping the values used in shouldFrag to cull non-fragmenting rounds. + * + * Arguments: + * 0: Display rounds that will never frag (default: false) + * + * Return Value: + * None + * + * Example: + * false call ace_frag_fnc_dev_fragCalcDump + * + * Public: No + */ + +params [["_logAll", false, [false]]]; + +private _allAmmoConfigs = configProperties [configFile >> "CfgAmmo", "isClass _x && !('ace_frag' in configName _x)", true]; +private _processedCfgAmmos = createHashMap; + +private _numberPrinted = 0; + +diag_log text "//****************** fragCalcDump Beg ******************//"; +{ // Begin _allAmmoConfigs forEach + private _ammo = configName _x; + + if (_ammo isEqualTo "" || {_ammo in _processedCfgAmmos}) then { + continue; + }; + + _ammo call FUNC(shouldFrag) params ["_shouldFrag"]; + if (_shouldFrag || _logAll) then { + private _fragInfo = _ammo call FUNC(getFragInfo); + _fragInfo params ["_fragRange", "_fragMaxSpeed"]; + private _ammoConfig = configFile >> "CfgAmmo" >> _ammo; + private _indirectHitRange = getNumber (_ammoConfig >> "indirectHitRange"); + private _indirectHit = getNumber (_ammoConfig >> "indirectHit"); + private _fragPowerSpeedRange = [0.5, 1] vectorMultiply _fragMaxSpeed; + + diag_log text format ["Ammo type: %1 | Should frag: %2", _ammo, _shouldFrag]; + diag_log text format [" Indirect hit range: %1", _indirectHitRange]; + diag_log text format [" Indirect hit: %1", _indirectHit]; + diag_log text format [" Max frag speed: %1", _fragMaxSpeed]; + diag_log text format [" Frag range: %1", _fragRange]; + diag_log text format [" Frag speed range: %1", _fragPowerSpeedRange]; + INC(_numberPrinted); + }; + + _processedCfgAmmos set [_ammo, 1]; +} forEach _allAmmoConfigs; + +diag_log text "//****************** fragCalcDump End ******************//"; +diag_log text format ["//********************** printed %1 *********************//", _numberPrinted]; diff --git a/addons/frag/functions/fnc_dev_sphereDraw.sqf b/addons/frag/functions/fnc_dev_sphereDraw.sqf new file mode 100644 index 00000000000..31a1393991e --- /dev/null +++ b/addons/frag/functions/fnc_dev_sphereDraw.sqf @@ -0,0 +1,41 @@ +#include "..\script_component.hpp" +/* + * Author: Lambda.Tiger + * Add a colored sphere at a specified point. + * + * Arguments: + * 0: Position (posASL) to add sphere + * 1: Color of sphere (default: "blue") + * + * Return Value: + * The created sphere object + * + * Example: + * [getPosASL player, "red"] call ace_frag_fnc_dev_sphereDraw + * + * Public: No + */ + +params ["_posASL", ["_color", "blue"]]; + +if (!isServer) exitWith {}; + +if (_color select [0,1] != "(") then { + _color = switch (toLowerANSI _color) do { + case "blue": {"(0,0,0.8,0.5)"}; + case "black": {"(1,1,1,0.5)"}; + case "white": {"(0,0,0,0.5)"}; + case "red": {"(0.8,0,0,0.5)"}; + case "green": {"(0,0.8,0,0.5)"}; + case "yellow": {"(0.8,0.8,0,0.5)"}; + case "orange": {"(0.8,0.518,0,0.5)"}; + default {"(0.8,0.8,0,0.5)"}; + }; +}; +private _colorString = "#(argb,8,8,3)color" + _color; + +private _sphere = createVehicle ["Sign_Sphere10cm_F", ASLToATL _posASL, [], 0, "CAN_COLLIDE"]; +_sphere setObjectTextureGlobal [0, _colorString]; +GVAR(dev_eventSpheres) pushBack _sphere; + +_sphere // return diff --git a/addons/frag/functions/fnc_dev_startTracing.sqf b/addons/frag/functions/fnc_dev_startTracing.sqf deleted file mode 100644 index 897dde3011e..00000000000 --- a/addons/frag/functions/fnc_dev_startTracing.sqf +++ /dev/null @@ -1,23 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_dev_startTracing - * - * Public: No - */ - -if (GVAR(tracesStarted)) exitWith {}; - -INFO("Starting Trace Drawing"); - -GVAR(tracesStarted) = true; -GVAR(traceID) = [LINKFUNC(dev_drawTraces), 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/frag/functions/fnc_dev_stopTracing.sqf b/addons/frag/functions/fnc_dev_stopTracing.sqf deleted file mode 100644 index 949d3cd55d6..00000000000 --- a/addons/frag/functions/fnc_dev_stopTracing.sqf +++ /dev/null @@ -1,23 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: ACE-Team - * Dev things - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * None - * - * Public: No - */ - -if (!GVAR(tracesStarted)) exitWith {}; - -INFO("Ending Trace Drawing"); - -GVAR(tracesStarted) = false; -[GVAR(traceID)] call CBA_fnc_removePerFrameHandler; diff --git a/addons/frag/functions/fnc_dev_trackHitBox.sqf b/addons/frag/functions/fnc_dev_trackHitBox.sqf new file mode 100644 index 00000000000..327e45cf0d3 --- /dev/null +++ b/addons/frag/functions/fnc_dev_trackHitBox.sqf @@ -0,0 +1,75 @@ +#include "..\script_component.hpp" +/* + * Author: Lambda.Tiger + * Add a hit box outline to an object. + * + * Arguments: + * 0: Object that should have it's hit box drawn (default: objNull) + * 1: Add sphere at object origin (default: true) + * + * Return Value: + * None + * + * Example: + * player call ace_frag_fnc_dev_trackHitBox + * + * Public: No + */ + +params [ + ["_object", objNull], + ["_addSphere", true] +]; +TRACE_2("Adding hitbox",_object,_addSphere); + +if (isNull _object) exitWith {}; + +// Grab the right hitBox +private _boundingBox = []; +if (_object isKindOf "CAManBase") then { + if (isNull objectParent _object) then { + _boundingBox = 0 boundingBox _object; + } else { + _boundingBox = boundingBoxReal [_object, "Geometry"]; + }; +} else { + _boundingBox = boundingBoxReal [_object, "FireGeometry"]; +}; +_boundingBox params ["_lowerPoint", "_upperPoint"]; + +// adjust with stance +switch (stance _object) do { + case "STAND": {_upperPoint set [2, 1.9];}; + case "CROUCH": {_upperPoint set [2, 1.3];}; + case "PRONE": {_upperPoint set [2, 0.8];}; +}; +private _centerPoint = ASLToAGL getPosASL _object; + +if (GVAR(dbgSphere) && _addSphere && {isNull objectParent _object}) then { + private _centerSphere = [getPosASL _object, "yellow"] call FUNC(dev_sphereDraw); + _centerSphere attachTo [_object, _object worldToModel _centerPoint]; +}; + +// create an optimized outline +_upperPoint params ["_x1","_y1","_z1"]; +_lowerPoint params ["_x2","_y2","_z2"]; +private _p1 = _upperPoint; +private _p7 = _lowerPoint; +private _points = [ + _upperPoint, + [_x1, _y2, _z1], + [_x2, _y2, _z1], + [_x2, _y1, _z1], + [_x1, _y1, _z2], + [_x1, _y2, _z2], + _lowerPoint, + [_x2, _y1, _z2] +]; + +private _color = switch (side _object) do { + case east: {[0.8, 0, 0, 1]}; + case resistance: {[0, 0.8, 0, 1]}; + default {[0, 0, 0.8, 1]}; +}; + +GVAR(dev_hitBoxes) set [getObjectID _object, [_object, _points, _color]]; diff --git a/addons/frag/functions/fnc_dev_trackObj.sqf b/addons/frag/functions/fnc_dev_trackObj.sqf new file mode 100644 index 00000000000..88b298fa0b8 --- /dev/null +++ b/addons/frag/functions/fnc_dev_trackObj.sqf @@ -0,0 +1,87 @@ +#include "..\script_component.hpp" +/* + * Author: Lambda.Tiger + * This function adds an object to have its course tracked (every frame). + * + * Arguments: + * 0: Object to draw track (default: objNull) + * 1: Color of trace (default: "blue") + * 2: Whether the object is a projectile or whether to add projectile EHs (default: false) + * + * Return Value: + * None + * + * Example: + * player call ace_frag_fnc_dev_trackObj + * + * Public: No + */ + +params [ + ["_object", objNull], + ["_color", "blue"], + ["_isProj", false] +]; +TRACE_3("devDraw",_object,_color,_isProj); + +// pick color and add it to the array +private _colorArray = switch (toLowerANSI _color) do { + case "purple": {[0.8, 0, 0.8, 1]}; + case "blue": {[0, 0, 0.8, 1]}; + case "green": {[0, 0.8, 0, 1]}; + case "orange": {[0.8, 0.518, 0, 1]}; + case "yellow": {[0.8, 0.8, 0, 1]}; + case "red": {[0.8, 0, 0, 1]}; + case "black": {[1, 1, 1, 1]}; + case "white": {[0, 0, 0, 1]}; + default {[0, 0.8, 0.8, 1]}; +}; +GVAR(dev_trackLines) set [getObjectID _object, [[getPosATL _object], _colorArray]]; + +// event handler to track round and cleanup when round is "dead" +[{ + if (isGamePaused || accTime == 0) exitWith {}; + params ["_object", "_handle"]; + + if (!alive _object) exitWith { + _handle call CBA_fnc_removePerFrameHandler; + }; + + private _objectArray = GVAR(dev_trackLines) get (getObjectID _object); + + if (isNil "_objectArray") exitWith { + _handle call CBA_fnc_removePerFrameHandler; + }; + + (_objectArray#0) pushBack getPosATL _object; +}, 0, _object] call CBA_fnc_addPerFrameHandler; + +// Projectile event handlers that add spheres and points for more accurate round tracking +if (!_isProj) exitWith {}; + +_object addEventHandler ["HitPart", { + params ["_projectile", "", "", "_posASL"]; + private _posArr = (GVAR(dev_trackLines) get (getObjectID _projectile))#0; + _posArr pushBack ASLToATL _posASL; + if (GVAR(dbgSphere)) then { + [_posASL, "green"] call FUNC(dev_sphereDraw); + }; +}]; + +_object addEventHandler ["Explode", { + params ["_projectile", "_posASL"]; + private _posArr = (GVAR(dev_trackLines) get (getObjectID _projectile))#0; + _posArr pushBack ASLToATL _posASL; + if (GVAR(dbgSphere)) then { + [_posASL, "red"] call FUNC(dev_sphereDraw); + }; +}]; + +_object addEventHandler ["Deflected", { + params ["_projectile", "_posASL"]; + private _posArr = (GVAR(dev_trackLines) get (getObjectID _projectile))#0; + _posArr pushBack ASLToATL _posASL; + if (GVAR(dbgSphere)) then { + [_posASL, "blue"] call FUNC(dev_sphereDraw); + }; +}]; diff --git a/addons/frag/functions/fnc_dev_trackTrace.sqf b/addons/frag/functions/fnc_dev_trackTrace.sqf deleted file mode 100644 index 6c010bdb631..00000000000 --- a/addons/frag/functions/fnc_dev_trackTrace.sqf +++ /dev/null @@ -1,27 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: ACE-Team - * Dev things - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_dev_trackTrace - * - * Public: No - */ - -params ["_args", "_pfhID"]; -_args params ["_tracerObj", "_index"]; - -if (alive _tracerObj && {GVAR(traces) isNotEqualTo []}) then { - private _data = GVAR(traces) select _index; - private _positions = _data select 4; - _positions pushBack [getPos _tracerObj, vectorMagnitude (velocity _tracerObj)]; -} else { - [_pfhID] call CBA_fnc_removePerFrameHandler; -}; diff --git a/addons/frag/functions/fnc_doExplosions.sqf b/addons/frag/functions/fnc_doExplosions.sqf index a5a687aa538..74e191532a5 100644 --- a/addons/frag/functions/fnc_doExplosions.sqf +++ b/addons/frag/functions/fnc_doExplosions.sqf @@ -21,7 +21,7 @@ _args params ["_explosions", "_index"]; for "_i" from _index to ((_index + 2) min (count _explosions)) do { private _exp = _explosions select _i; _exp params ["_refExp", "_bpos", "_hit", "_distance", "_indirectHitRange", "_depth"]; - _refExp createVehicle (ASLtoATL _bpos); + _refExp createVehicle (ASLToATL _bpos); // if (_hit >= 150 && _distance > _indirectHitRange) then { // [_bpos, _refExp, _depth] call FUNC(doReflections); // }; diff --git a/addons/frag/functions/fnc_doSpall.sqf b/addons/frag/functions/fnc_doSpall.sqf deleted file mode 100644 index b206c701b21..00000000000 --- a/addons/frag/functions/fnc_doSpall.sqf +++ /dev/null @@ -1,139 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: ACE-Team - * Dev things - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_doSpall - * - * Public: No - */ - -#define WEIGHTED_SIZE [QGVAR(spall_small), 4, QGVAR(spall_medium), 3, QGVAR(spall_large), 2, QGVAR(spall_huge), 1] - -params ["_hitData", "_hitPartDataIndex"]; -private _initialData = GVAR(spallHPData) select (_hitData select 0); -_initialData params ["_hpId", "_object", "_roundType", "_round", "_curPos", "_velocity"]; - -private _hpData = (_hitData select 1) select _hitPartDataIndex; -private _objectHit = _hpData param [0, objNull]; -TRACE_1("",_objectHit); -if ((isNil "_objectHit") || {isNull _objectHit}) exitWith {WARNING_1("Problem with hitPart data - bad object [%1]",_objectHit);}; -_objectHit removeEventHandler ["HitPart", _hpId]; - -private _caliber = getNumber (configFile >> "CfgAmmo" >> _roundType >> "caliber"); -private _explosive = getNumber (configFile >> "CfgAmmo" >> _roundType >> "explosive"); -private _idh = getNumber (configFile >> "CfgAmmo" >> _roundType >> "indirectHitRange"); - -if !(_caliber >= 2.5 || {(_explosive > 0 && {_idh >= 1})}) exitWith {}; -// ACE_player sideChat format ["BBBB"]; -private _exit = false; -private _vm = 1; - -private _oldVelocity = vectorMagnitude _velocity; -private _curVelocity = vectorMagnitude (velocity _round); - -if (alive _round) then { - private _diff = _velocity vectorDiff (velocity _round); - private _polar = _diff call CBA_fnc_vect2polar; - // ACE_player sideChat format ["polar: %1", _polar]; - if (abs (_polar select 1) > 45 || {abs (_polar select 2) > 45}) then { - if (_caliber < 2.5) then { - // ACE_player sideChat format ["exit!"]; - _exit = true; - } else { - SUB(_vm,_curVelocity / _oldVelocity); - }; - }; -}; -if (_exit) exitWith {}; - -private _unitDir = vectorNormalized _velocity; -private _pos = _hpData select 3; -private _spallPos = []; -if ((isNil "_pos") || {!(_pos isEqualTypeArray [0,0,0])}) exitWith {WARNING_1("Problem with hitPart data - bad pos [%1]",_pos);}; -for "_i" from 0 to 100 do { - private _pos1 = _pos vectorAdd (_unitDir vectorMultiply (0.01 * _i)); - private _pos2 = _pos vectorAdd (_unitDir vectorMultiply (0.01 * (_i + 1))); - // _data = [nil, nil, nil, 1, [[ASLtoATL _pos1, 1], [ASLtoATL _pos2, 1]]]; - // NOU_TRACES pushBack _data; - - if (!lineIntersects [_pos1, _pos2]) exitWith { - // ACE_player sideChat format ["FOUND!"]; - _spallPos = _pos2; - }; -}; -if (_spallPos isEqualTo []) exitWith {}; -private _spallPolar = _velocity call CBA_fnc_vect2polar; - -if (_explosive > 0) then { - // ACE_player sideChat format ["EXPLOSIVE!"]; - private _warn = false; - private _c = getNumber (configFile >> "CfgAmmo" >> _roundType >> QGVAR(CHARGE)); - if (_c == 0) then {_c = 1; _warn = true;}; - private _m = getNumber (configFile >> "CfgAmmo" >> _roundType >> QGVAR(METAL)); - if (_m == 0) then {_m = 2; _warn = true;}; - private _k = getNumber (configFile >> "CfgAmmo" >> _roundType >> QGVAR(GURNEY_K)); - if (_k == 0) then {_k = 1 / 2; _warn = true;}; - private _gC = getNumber (configFile >> "CfgAmmo" >> _roundType >> QGVAR(GURNEY_C)); - if (_gC == 0) then {_gC = 2440; _warn = true;}; - - // if (_warn) then { - // WARNING_1("Ammo class %1 lacks proper explosive properties definitions for frag!",_roundType); //TODO: turn this off when we get closer to release - // }; - - private _fragPower = (((_m / _c) + _k) ^ - (1 / 2)) * _gC; - _spallPolar set [0, _fragPower * 0.66]; -}; - -// diag_log text format ["SPALL POWER: %1", _spallPolar select 0]; -private _spread = 15 + (random 25); -private _spallCount = 5 + (random 10); -TRACE_1("",_spallCount); -for "_i" from 1 to _spallCount do { - private _elev = ((_spallPolar select 2) - _spread) + (random (_spread * 2)); - private _dir = ((_spallPolar select 1) - _spread) + (random (_spread * 2)); - if (abs _elev > 90) then { - ADD(_dir,180); - }; - _dir = _dir % 360; - private _vel = (_spallPolar select 0) * 0.33 * _vm; - _vel = (_vel - (_vel * 0.25)) + (random (_vel * 0.5)); - - private _spallFragVect = [_vel, _dir, _elev] call CBA_fnc_polar2vect; - private _fragment = (selectRandomWeighted WEIGHTED_SIZE) createVehicleLocal [0,0,10000]; - _fragment setPosASL _spallPos; - _fragment setVelocity _spallFragVect; - - #ifdef DRAW_FRAG_INFO - [ACE_player, _fragment, [1, 0.5, 0, 1]] call FUNC(dev_addTrack); - #endif -}; - -_spread = 5 + (random 5); -_spallCount = 3 + (random 5); -for "_i" from 1 to _spallCount do { - private _elev = ((_spallPolar select 2) - _spread) + (random (_spread * 2)); - private _dir = ((_spallPolar select 1) - _spread) + (random (_spread * 2)); - if (abs _elev > 90) then { - ADD(_dir,180); - }; - _dir = _dir % 360; - private _vel = (_spallPolar select 0) * 0.55 * _vm; - _vel = (_vel - (_vel * 0.25)) + (random (_vel * 0.5)); - - private _spallFragVect = [_vel, _dir, _elev] call CBA_fnc_polar2vect; - private _fragment = (selectRandomWeighted WEIGHTED_SIZE) createVehicleLocal [0, 0, 10000]; - _fragment setPosASL _spallPos; - _fragment setVelocity _spallFragVect; - - #ifdef DRAW_FRAG_INFO - [ACE_player, _fragment, [1, 0, 0, 1]] call FUNC(dev_addTrack); - #endif -}; diff --git a/addons/frag/functions/fnc_doSpallHitPart.sqf b/addons/frag/functions/fnc_doSpallHitPart.sqf new file mode 100644 index 00000000000..dc22c66a63c --- /dev/null +++ b/addons/frag/functions/fnc_doSpallHitPart.sqf @@ -0,0 +1,133 @@ +#include "..\script_component.hpp" +/* + * Author: Jaynus, NouberNou, Lambda.Tiger, + * This function creates spalling when a projectile hits a object and comes to a stop. + * + * Arguments: + * 0: The projectile that may generate spalling + * 1: The object the projectile hit + * 2: The position (ASL) of the projectile hit + * 3: The velocity of the projectile before it hit the surface + * 4: The surface normal of the surface hit + * 5: The name of the config name or path to bisurf of the surface hit + * 6: The projectiles ammo config + * 7: The projectiles shot parent + * 8: The "up" vector of the projectile when it hit the object + * + * Return Value: + * None + * + * Example: + * [BIS_HITPART_EH_ARGS] call ace_frag_fnc_doSpallHitPart; + * + * Public: No + */ +TRACE_1("doSpallHitPart",_this); +if (CBA_missionTime < GVAR(nextSpallAllowTime)) exitWith { + TRACE_2("timeExit",CBA_missionTime,GVAR(nextSpallAllowTime)); +}; +params ["_projectile", "_objectHit", "_lastPosASL", "_lastVelocity", "_surfaceNorm", "_surfaceType", "_ammo", "_vectorUp"]; + +// Find spall speed / fragment info +_ammo call FUNC(getSpallInfo) params ["_caliber", "_explosive", "_indirectHit"]; +// Add in v2.18 `getShotInfo`'s `fuseDistanceLeft <= 0` to _explosive +if ((alive _projectile && _explosive < 0.5) || + _ammo == "" || + _lastPosASL isEqualTo [0,0,0] || + {_objectHit isKindOf "CAManBase"}) exitWith { + TRACE_3("exitEarly",alive _projectile,_lastPosASL,_objectHit); +}; + +private _material = _surfaceType call FUNC(getMaterialInfo); +if (_material == "ground") exitWith { + TRACE_1("hitGround",_surfaceType); +}; + +private _speedChange = vectorMagnitude _lastVelocity; +/* + * This is all fudge factor since real spalling is too complex for calculation. + * There are two terms. The first is from round impact, taking a quasi scale + * of caliber coefficient * round caliber * srqt(change in speed). The second term is + * explosive * indirect hit, for any explosive contribution + */ +private _spallPower = (ACE_FRAG_SPALL_CALIBER_COEF * _caliber * sqrt _speedChange + _explosive * _indirectHit) * GVAR(spallIntensity); +TRACE_3("found speed",_speedChange,_caliber,_spallPower); + +if (_spallPower < ACE_FRAG_SPALL_POWER_MIN) exitWith { + TRACE_1("lowImpulse",_ammo); +}; + +private _lastVelocityNorm = vectorNormalized _lastVelocity; +private _deltaStep = _lastVelocityNorm vectorMultiply 0.05; + +if (terrainIntersectASL [_lastPosASL vectorAdd _deltaStep, _lastPosASL]) exitWith { + TRACE_2("terrainIntersect",_lastPosASL,_deltaStep); +}; + +#ifdef DEBUG_MODE_DRAW +if GVAR(dbgSphere) then { + [_lastPosASL vectorAdd _lastVelocityNorm, "orange"] call FUNC(dev_sphereDraw); + [_lastPosASL, "yellow"] call FUNC(dev_sphereDraw); +}; +#endif + +/* + * Improve performance of finding otherside of object on shallow angle + * impacts. 120 degrees due to 90 degree offset with _lastVelocityNorm into object. + */ +private _spallPosASL = _lastPosASL vectorAdd _deltaStep; +if (120 > acos (_lastVelocityNorm vectorDotProduct _surfaceNorm)) then { + _spallPosASL = _spallPosASL vectorAdd (_deltaStep vectorMultiply 5); +}; +private _lastSpallPos = _spallPosASL; +// we need to check 1.05 m in the direction of last velocity incrementing by delta step +// Our initial check is from 0m to 5 cm, so we only need to iterate from 2 to 21 to get +// to the full 1.05m +for "_stepNumber" from 2 to 21 do +{ + _spallPosASL = _lastSpallPos vectorAdd _deltaStep; + if (!lineIntersects [_lastSpallPos, _spallPosASL]) exitWith { + _spallPosASL = _lastSpallPos vectorAdd _deltaStep; + }; + _lastSpallPos = _spallPosASL; +}; + +if (_spallPosASL isEqualTo _lastSpallPos) exitWith { + TRACE_2("insideObj",_lastPosASL,_spallPosASL); +}; + +#ifdef DEBUG_MODE_DRAW +if GVAR(dbgSphere) then { + [_spallPosASL, "green"] call FUNC(dev_sphereDraw); +}; +#endif + +private _spawnSize = switch (true) do { + case (_spallPower < ACE_FRAG_SPALL_POWER_TINY_MAX): {"_spall_tiny"}; + case (_spallPower < ACE_FRAG_SPALL_POWER_SMALL_MAX): {"_spall_small"}; + case (_spallPower < ACE_FRAG_SPALL_POWER_MEDIUM_MAX): {"_spall_medium"}; + case (_spallPower < ACE_FRAG_SPALL_POWER_LARGE_MAX): {"_spall_large"}; + default {"_spall_huge"}; +}; +GVAR(nextSpallAllowTime) = CBA_missionTime + ACE_FRAG_SPALL_HOLDOFF; + +private _spallSpawner = createVehicleLocal [ + QUOTE(GLUE(ADDON,_)) + _material + _spawnSize, + ASLToAGL _spallPosASL, + [], + 0, + "CAN_COLLIDE" +]; +_spallSpawner setVectorDirAndUp [_lastVelocityNorm, _vectorUp]; +_spallSpawner setVelocityModelSpace [0, _speedChange * ACE_FRAG_SPALL_VELOCITY_INHERIT_COEFF, 0]; + +TRACE_3("createSpallSpawner",speed _spallSpawner,_material + _spawnSize,_spallPower); +#ifdef DEBUG_MODE_DRAW +_spallSpawner addEventHandler [ + "SubmunitionCreated", + { + params ["", "_subProj"]; + [_subProj, "purple", true] call FUNC(dev_trackObj); + } +]; +#endif diff --git a/addons/frag/functions/fnc_doSpallPenetrate.sqf b/addons/frag/functions/fnc_doSpallPenetrate.sqf new file mode 100644 index 00000000000..6c8feda7a9d --- /dev/null +++ b/addons/frag/functions/fnc_doSpallPenetrate.sqf @@ -0,0 +1,98 @@ +#include "..\script_component.hpp" +/* + * Author: Jaynus, NouberNou, Lambda.Tiger, + * This function creates spalling if a projectile penetrated a surface and was slowed down enough proportional to the caliber. + * It is dissimilar in function from fnc_doSpallHitPart, but leveraging the "Penetrated" projectile EH to process faster. + * + * Arguments: + * Arguments are the same as BI's "Penetratred" EH: + * https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Penetrated + * + * Return Value: + * None + * + * Example: + * [BIS_PENETRATED_EH_ARGS] call ace_frag_fnc_doSpallPenetrate; + * + * Public: No + */ +#define EPSILON 0.1 + +TRACE_1("doSpallPenetration",_this); +if (CBA_missionTime < GVAR(nextSpallAllowTime)) exitWith { + TRACE_1("timeExit",_this); +}; +params ["_projectile", "_hitObject", "_surfaceType", "", "_spallPosASL", "_newVelocity"]; + +private _ammo = typeOf _projectile; +if (_spallPosASL isEqualTo [0,0,0] || + {_ammo isEqualTo ""} || + {_hitObject isKindOf "CAManBase"}) exitWith { + TRACE_4("time/invalidHit",CBA_missionTime,GVAR(nextSpallAllowTime),_hitObject,_spallPosASL); +}; + +private _material = _surfaceType call FUNC(getMaterialInfo); +if (_material == "ground") exitWith { + #ifdef DEBUG_MODE_FULL + systemChat "ground spall"; + #endif +}; + +_ammo call FUNC(getSpallInfo) params ["_caliber", "_explosive", "_indirectHit"]; +private _velocityChange = velocity _projectile vectorDiff _newVelocity; +private _speedChange = vectorMagnitude _velocityChange; +/* + * This is all fudge factor since real spalling is too complex for calculation. + * The equation takes taking a quasi scale of energy using caliber and change in speed. + */ +private _spallPower = ACE_FRAG_SPALL_CALIBER_COEF * _caliber * sqrt _speedChange * GVAR(spallIntensity); +TRACE_5("found speed",_velocityChange,_speedChange,_caliber,_spallPower,_material); + +if (_spallPower < ACE_FRAG_SPALL_POWER_MIN) exitWith { + TRACE_1("lowImpulse",_ammo); +}; +private _spallDirection = vectorNormalized _velocityChange; + +#ifdef DEBUG_MODE_DRAW +if GVAR(dbgSphere) then { + [_spallPosASL, "green"] call FUNC(dev_sphereDraw); +}; +#endif + +private _spawnSize = switch (true) do { + case (_spallPower < ACE_FRAG_SPALL_POWER_TINY_MAX): {"_spall_tiny"}; + case (_spallPower < ACE_FRAG_SPALL_POWER_SMALL_MAX): {"_spall_small"}; + case (_spallPower < ACE_FRAG_SPALL_POWER_MEDIUM_MAX): {"_spall_medium"}; + case (_spallPower < ACE_FRAG_SPALL_POWER_LARGE_MAX): {"_spall_large"}; + default {"_spall_huge"}; +}; +GVAR(nextSpallAllowTime) = CBA_missionTime + ACE_FRAG_SPALL_HOLDOFF; + +// Solve for one of the vectors normal to _spallDirection on y = 0 plane +private _spallVectorUp = [0, 0, 1]; +if (_spallDirection#2 > EPSILON) then { + private _newZ = _spallDirection#0 / _spallDirection#2; + _spallVectorUp = vectorNormalized [1, 0, -_newZ]; +}; + +private _spallSpawner = createVehicleLocal [ + QUOTE(GLUE(ADDON,_)) + _material + _spawnSize, + ASLToAGL _spallPosASL, + [], + 0, + "CAN_COLLIDE" +]; +_spallSpawner setVectorDirAndUp [_spallDirection, _spallVectorUp]; +_spallSpawner setVelocityModelSpace [0, _speedChange * ACE_FRAG_SPALL_VELOCITY_INHERIT_COEFF, 0]; +TRACE_4("dir&up",_spallDirection,vectorDir _spallSpawner,_spallVectorUp,vectorUp _spallSpawner); + +TRACE_3("createSpallSpawner",speed _spallSpawner,_material + _spawnSize,_spallPower); +#ifdef DEBUG_MODE_DRAW +_spallSpawner addEventHandler [ + "SubmunitionCreated", + { + params ["", "_subProj"]; + [_subProj, "purple", true] call FUNC(dev_trackObj); + } +]; +#endif diff --git a/addons/frag/functions/fnc_findReflections.sqf b/addons/frag/functions/fnc_findReflections.sqf index a753934fe85..00a26022e2b 100644 --- a/addons/frag/functions/fnc_findReflections.sqf +++ b/addons/frag/functions/fnc_findReflections.sqf @@ -75,7 +75,7 @@ if (_zIndex < 5) then { } forEach _nlos; { if !(_forEachIndex in _excludes) then { - _testPos = _x; + private _testPos = _x; if (_testPos vectorDistanceSqr _bucketPos <= 30) then { _bucketList pushBack _x; _excludes pushBack _forEachIndex; diff --git a/addons/frag/functions/fnc_fired.sqf b/addons/frag/functions/fnc_fired.sqf index 03d2fab6096..1cc72af2af6 100644 --- a/addons/frag/functions/fnc_fired.sqf +++ b/addons/frag/functions/fnc_fired.sqf @@ -1,14 +1,14 @@ #include "..\script_component.hpp" /* - * Author: nou, jaynus, PabstMirror - * Called from the unified fired EH for all. - * If spall is not enabled (default), then cache and only track those that will actually trigger fragmentation. + * Author: nou, jaynus, Lambda.Tiger, PabstMirror + * Add "Exploded" eventhandler to a projectile if it will produce fragments + * and a "HitPart" eventhandler if it will produce spall. * * Arguments: - * None. Parameters inherited from EFUNC(common,firedEH) + * Parameters inherited from EFUNC(common,firedEH) * * Return Value: - * None + * Nothing Useful * * Example: * [clientFiredBIS-XEH] call ace_frag_fnc_fired @@ -19,40 +19,33 @@ //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret); -private _shouldAdd = GVAR(cacheRoundsTypesToTrack) get _ammo; -if (isNil "_shouldAdd") then { - TRACE_1("no cache for round",_ammo); - - //Read configs and test if it would actually cause a frag, using same logic as FUNC(pfhRound) - private _skip = getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(skip)); - private _explosive = getNumber (configFile >> "CfgAmmo" >> _ammo >> "explosive"); - private _indirectRange = getNumber (configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange"); - private _force = getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(force)); - private _fragPower = getNumber (configFile >> "CfgAmmo" >> _ammo >> "indirecthit") * (sqrt (getNumber (configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange"))); - - _shouldAdd = (_skip == 0) && {(_force == 1) || {_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}}}; +if (_ammo isEqualTo "" || {isNull _projectile} || + !(if (isNil "_gunner") then {local _unit} else {local _gunner}) || + {_projectile getVariable [QGVAR(blacklisted), false]}) exitWith { + TRACE_2("bad ammo or projectile, or blackList",_ammo,_projectile); +}; - if (GVAR(spallEnabled) && {!_shouldAdd}) then { - private _caliber = getNumber (configFile >> "CfgAmmo" >> _ammo >> "caliber"); - if !(_caliber >= 2.5 || {(_explosive > 0 && {_indirectRange >= 1})}) exitWith {}; // from check in doSpall: line 34 - TRACE_1("Won't frag, but will spall",_caliber); - _shouldAdd = true; - }; +#ifdef DEBUG_MODE_DRAW +if (GVAR(debugOptions) && {_ammo call FUNC(shouldFrag) || {_ammo call FUNC(shouldSpall)}}) then { + [_projectile, "red", true] call FUNC(dev_trackObj); +}; +#endif - TRACE_6("Setting Cache",_skip,_explosive,_indirectRange,_force,_fragPower,_shouldAdd); - GVAR(cacheRoundsTypesToTrack) set [_ammo, _shouldAdd]; +if (!GVAR(spallEnabled) || {!(_ammo call FUNC(shouldSpall))}) exitWith { + TRACE_2("No spall",GVAR(spallEnabled),_ammo call FUNC(shouldSpall)); }; -if (_shouldAdd) then { - // firedMan will have nil "_gunner", so just check _unit; for firedVehicle we want to check _gunner - private _localShooter = if (isNil "_gunner") then {local _unit} else {local _gunner}; - TRACE_4("",_localShooter,_unit,_ammo,_projectile); - if (!_localShooter) exitWith {}; - if (_weapon == "Put") exitWith {}; // Ignore explosives placed without ace_explosives +private _hitPartEventHandler = _projectile addEventHandler ["HitPart", { + params ["_projectile", "_objectHit", "", "_posASL", "_velocity", "_surfNorm", "", "" ,"_surfType"]; + private _ammo = typeOf _projectile; + private _vectorUp = vectorUp _projectile; - // Skip if less than 0.5 second from last shot - if ((CBA_missionTime - (_unit getVariable [QGVAR(lastTrack), -1])) < 0.5) exitWith {}; - _unit setVariable [QGVAR(lastTrack), CBA_missionTime]; + /* + * Wait a frame to see what happens to the round + */ + [LINKFUNC(doSpallHitPart), [_projectile, _objectHit, _posASL, _velocity, _surfNorm, _surfType, _ammo, _vectorUp]] call CBA_fnc_execNextFrame; +}]; +private _penetratedEventHandler = _projectile addEventHandler ["Penetrated",LINKFUNC(doSpallPenetrate)]; +_projectile setVariable [QGVAR(hitPartEventHandler), [_hitPartEventHandler, _penetratedEventHandler]]; - [_unit, _ammo, _projectile] call FUNC(addPfhRound); -}; +TRACE_1("firedExit",_ammo); diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf index 8fd77dbc739..b6d20883d2d 100644 --- a/addons/frag/functions/fnc_frago.sqf +++ b/addons/frag/functions/fnc_frago.sqf @@ -1,15 +1,14 @@ #include "..\script_component.hpp" /* - * Author: Jaynus, NouberNou + * Author: Jaynus, NouberNou, Lambda.Tiger * Server func to create the fragmentation for a round. * * Arguments: - * 0: Last Position (ASL) - * 1: Velocity - * 2: Ammo Classname + * 0: ASL position projetile is fragmenting at + * 1: Projectile ammo classname * * Return Value: - * None + * The number of fragments created * * Example: * [[], [], "handGrenade"] call ace_frag_fnc_frago @@ -17,139 +16,108 @@ * Public: No */ -#define FRAG_VEC_VAR 0.004 -#define MAX_FRAG_COUNT 50 +#define FRAG_VEC_VAR 0.008 BEGIN_COUNTER(frago); -params ["_lastPos", "_lastVel", "_shellType"]; -TRACE_3("frago",_lastPos,_lastVel,_shellType); +params ["_fragPosASL", "_shellType"]; +TRACE_2("frago",_fragPosASL,_shellType); // Limit max frag count if there was a recent frag -private _maxFrags = round (MAX_FRAG_COUNT * linearConversion [0.1, 1.5, (CBA_missionTime - GVAR(lastFragTime)), 0.1, 1, true]); +private _maxFrags = round linearConversion [ + ACE_FRAG_COUNT_MIN_TIME, + ACE_FRAG_COUNT_MAX_TIME, + (CBA_missionTime - GVAR(lastFragTime)), + ACE_FRAG_COUNT_MIN, + ACE_FRAG_COUNT_MAX, + true +]; TRACE_2("",_maxFrags,CBA_missionTime - GVAR(lastFragTime)); GVAR(lastFragTime) = CBA_missionTime; -private _fragTypes = [ - QGVAR(tiny), QGVAR(tiny), QGVAR(tiny), - QGVAR(tiny_HD), QGVAR(tiny_HD), QGVAR(tiny_HD), - QGVAR(small), QGVAR(small), QGVAR(small), QGVAR(small), - QGVAR(small_HD), QGVAR(small_HD), QGVAR(small_HD), QGVAR(small_HD), - QGVAR(medium_HD), QGVAR(medium_HD), QGVAR(medium_HD), QGVAR(medium_HD), QGVAR(medium_HD) -]; - -private _warn = false; -if (isArray (configFile >> "CfgAmmo" >> _shellType >> QGVAR(CLASSES))) then { - _fragTypes = getArray (configFile >> "CfgAmmo" >> _shellType >> QGVAR(CLASSES)); -} else { - _warn = true; -}; - -private _indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _shellType >> "indirecthitrange"); -private _fragRange = 20 * _indirectHitRange * 4; -// _c = 185; // grams of comp-b -// _m = 210; // grams of fragmentating metal -// _k = 3/5; // spherical K factor -// _gC = 2843; // Gurney constant of comp-b in /ms - -// _c = 429; // grams of tritonal -// _m = 496; // grams of fragmentating metal -// _k = 1/2; // spherical K factor -// _gC = 2320; // Gurney constant of tritonal in /ms - -private _c = getNumber (configFile >> "CfgAmmo" >> _shellType >> QGVAR(CHARGE)); -if (_c == 0) then {_c = 1; _warn = true;}; -private _m = getNumber (configFile >> "CfgAmmo" >> _shellType >> QGVAR(METAL)); -if (_m == 0) then {_m = 2; _warn = true;}; -private _k = getNumber (configFile >> "CfgAmmo" >> _shellType >> QGVAR(GURNEY_K)); -if (_k == 0) then {_k = 0.5; _warn = true;}; -private _gC = getNumber (configFile >> "CfgAmmo" >> _shellType >> QGVAR(GURNEY_C)); -if (_gC == 0) then {_gC = 2440; _warn = true;}; - -if (_warn) then { - INFO_1("Ammo class %1 lacks proper explosive properties definitions for frag!",_shellType); -}; - -// Gunery equation is for a non-fragmenting metal, imperical value of 80% represents fragmentation -private _fragPower = 0.8 * (((_m / _c) + _k) ^ - (1 / 2)) * _gC; - -private _atlPos = ASLtoATL _lastPos; +_shellType call FUNC(getFragInfo) params ["_fragRange", "_fragVelocity", "_fragTypes", "_metalMassModifier"]; -private _fragPowerRandom = _fragPower * 0.5; -if ((_atlPos select 2) < 0.5) then { - _lastPos vectorAdd [0, 0, 0.5]; +private _fragPosAGL = ASLToAGL _fragPosASL; +TRACE_5("fragValues",_fragPosASL,_fragPosAGL,_fragRange,_fragVelocity,_metalMassModifier); +// Post 2.18 change - uncomment line 43, modify lines 45, and remove lines 44, 51-57, 64-66 +// private _targets = [ASLToAGL _fragPosAGL, _fragRange, _fragRange, 0, false, _fragRange] nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], false, true, true]; +private _objects = _fragPosAGL nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], _fragRange]; +if (_objects isEqualTo []) exitWith { + TRACE_2("No nearby targets",_fragPosAGL,_fragRange); + 0 }; -private _objects = _atlPos nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], _fragRange]; -// Add unique crews in faster way +// grab crews and add them in so that targets stay approx. sorted by distance +TRACE_1("",_objects); +private _targets = []; { - { - _objects pushBackUnique _x; - } forEach (crew _x); + private _crew = crew _x; + _crew pushBackUnique _x; + _targets append _crew; } forEach _objects; -TRACE_2("",_fragRange,count _objects); +TRACE_2("",_fragRange,count _targets); private _fragCount = 0; private _fragArcs = []; _fragArcs set [360, 0]; -private _doRandom = true; -if (_objects isNotEqualTo []) then { +if (_targets isNotEqualTo []) then { if (GVAR(reflectionsEnabled)) then { - [_lastPos, _shellType] call FUNC(doReflections); + [_fragPosASL, _shellType] call FUNC(doReflections); }; { private _target = _x; - if (alive _target) then { + if (alive _target && {getNumber ((configOf _target) >> "isPlayableLogic") == 0}) then { (boundingBox _target) params ["_boundingBoxA", "_boundingBoxB"]; private _cubic = ((abs (_boundingBoxA select 0)) + (_boundingBoxB select 0)) * ((abs (_boundingBoxA select 1)) + (_boundingBoxB select 1)) * ((abs (_boundingBoxA select 2)) + (_boundingBoxB select 2)); if (_cubic <= 1) exitWith {}; - // _doRandom = true; private _targetVel = velocity _target; private _targetPos = getPosASL _target; - private _distance = _targetPos vectorDistance _lastPos; - private _add = ((_boundingBoxB select 2) / 2) + ((((_distance - (_fragpower / 8)) max 0) / _fragPower) * 10); + private _distance = _target distance _fragPosAGL; + private _add = ((_boundingBoxB select 2) / 2) + ((((_distance - (_fragVelocity / 8)) max 0) / _fragVelocity) * 10); _targetPos = _targetPos vectorAdd [ - (_targetVel select 0) * (_distance / _fragPower), - (_targetVel select 1) * (_distance / _fragPower), - _add + (_targetVel select 0) * (_distance / _fragVelocity), + (_targetVel select 1) * (_distance / _fragVelocity), + _add ]; - private _baseVec = _lastPos vectorFromTo _targetPos; + private _baseVec = _fragPosASL vectorFromTo _targetPos; private _dir = floor (_baseVec call CBA_fnc_vectDir); private _currentCount = RETDEF(_fragArcs select _dir,0); if (_currentCount < 10) then { - private _count = ceil (random (sqrt (_m / 1000))); + private _count = ceil (random _metalMassModifier); private _vecVar = FRAG_VEC_VAR; - if !(_target isKindOf "Man") then { + if !(_target isKindOf "CAManBase") then { ADD(_vecVar,(sqrt _cubic) / 2000); if ((crew _target) isEqualTo [] && {_count > 0}) then { _count = 0 max (_count / 2); }; }; + private _vecVarHalf = _vecVar / 2; for "_i" from 1 to _count do { - private _vec = _baseVec vectorDiff [ - (_vecVar / 2) + (random _vecVar), - (_vecVar / 2) + (random _vecVar), - (_vecVar / 2) + (random _vecVar) + private _vectorDir = _baseVec vectorDiff [ + _vecVarHalf - (random _vecVar), + _vecVarHalf - (random _vecVar), + _vecVarHalf - (random _vecVar) ]; - private _fp = _fragPower - (random (_fragPowerRandom)); - private _vel = _vec vectorMultiply _fp; + private _fragObjSpeed = _fragVelocity * (1 - random 0.5); + private _fragObjVelocity = _vectorDir vectorMultiply _fragObjSpeed; - private _fragObj = (selectRandom _fragTypes) createVehicleLocal [0,0,10000]; - // TRACE_4("targeted",_fp,typeOf _fragObj,_lastPos vectorDistance _targetPos,typeOf _x); - _fragObj setPosASL _lastPos; - _fragObj setVectorDir _vec; - _fragObj setVelocity _vel; - #ifdef DRAW_FRAG_INFO - [ACE_player, _fragObj, [1,0,0,1]] call FUNC(dev_addTrack); + private _fragObj = createVehicleLocal [selectRandom _fragTypes, _fragPosAGL, [], 0, "CAN_COLLIDE"]; + _fragObj setVectorDir _vectorDir; + _fragObj setVelocity _fragObjVelocity; + #ifdef DEBUG_MODE_DRAW + [_fragObj, "green", true] call FUNC(dev_trackObj); + if (GVAR(dbgSphere)) then { + [_targetPos, "(0.88,0.36,0.92,0.8)"] call FUNC(dev_sphereDraw); + }; #endif INC(_fragCount); INC(_currentCount); @@ -158,34 +126,30 @@ if (_objects isNotEqualTo []) then { }; }; if (_fragCount > _maxFrags) exitWith {}; - } forEach _objects; + } forEach _targets; TRACE_1("targeted",_fragCount); if (_fragCount > _maxFrags) exitWith {}; private _randomCount = ceil ((_maxFrags - _fragCount) * 0.35); TRACE_1("",_randomCount); private _sectorSize = 360 / (_randomCount max 1); - if (_doRandom) then { - for "_i" from 1 to _randomCount do { - // Distribute evenly - private _sectorOffset = 360 * (_i - 1) / (_randomCount max 1); - private _randomDir = random (_sectorSize); - _vec = [cos (_sectorOffset + _randomDir), sin (_sectorOffset + _randomDir), sin (30 - (random 45))]; - - _fp = (_fragPower - (random (_fragPowerRandom))); + for "_i" from 1 to _randomCount do { + // Distribute evenly + private _sectorOffset = 360 * (_i - 1) / (_randomCount max 1); + private _randomDir = random (_sectorSize); + private _vectorDir = [cos (_sectorOffset + _randomDir), sin (_sectorOffset + _randomDir), sin (30 - (random 45))]; - _vel = _vec vectorMultiply _fp; + private _fragObjSpeed = _fragVelocity * (1 - random 0.5); + private _fragObjVelocity = _vectorDir vectorMultiply _fragObjSpeed; - _fragObj = (selectRandom _fragTypes) createVehicleLocal [0, 0, 10000]; - _fragObj setPosASL _lastPos; - _fragObj setVectorDir _vec; - _fragObj setVelocity _vel; + private _fragObj = createVehicleLocal [selectRandom _fragTypes, _fragPosAGL, [], 0, "CAN_COLLIDE"]; + _fragObj setVectorDir _vectorDir; + _fragObj setVelocity _fragObjVelocity; - #ifdef DRAW_FRAG_INFO - [ACE_player, _fragObj, [1,0.5,0,1]] call FUNC(dev_addTrack); - #endif - INC(_fragCount); - }; + #ifdef DEBUG_MODE_DRAW + [_fragObj, "blue", true] call FUNC(dev_trackObj); + #endif + INC(_fragCount); }; }; diff --git a/addons/frag/functions/fnc_getFragInfo.sqf b/addons/frag/functions/fnc_getFragInfo.sqf new file mode 100644 index 00000000000..77222234235 --- /dev/null +++ b/addons/frag/functions/fnc_getFragInfo.sqf @@ -0,0 +1,96 @@ +#include "..\script_component.hpp" +/* + * Author: Jaynus, NouberNou, Lambda.Tiger + * This function returns fragmentation parameters for a specific ammo type. + * + * Arguments: + * 0: Ammo classname + * + * Return Value: + * _ammoInfo + * 0: Search range for fragments in meters + * 1: Gurney equation calculated speed + * 2: Array of fragment types + * 3: Mass of fragmenting metal modified for frag count + * + * Example: + * "B_556x45_Ball" call ace_frag_fnc_getFragInfo + * + * Public: No + */ + +params ["_ammo"]; + +GVAR(fragInfoCache) getOrDefaultCall [_ammo, { + private _ammoConfig = configFile >> "CfgAmmo" >> _ammo; + private _fragTypes = ACE_FRAG_DEFAULT_FRAG_TYPES; + private _notifyMissingEntries = false; + if (isArray (_ammoConfig >> QGVAR(classes))) then { + _fragTypes = getArray (_ammoConfig >> QGVAR(classes)); + } else { + _notifyMissingEntries = true; + }; + + /************ Gurney equation notes *****************//* + * see https://en.wikipedia.org/wiki/Gurney_equations + * + * gurney_k is the geometry constant added to _metalMass/_chargeMass + * gurney_c = sqrt(2E) + * + * _chargeMass = 185; - grams of comp-b + * _metalMass = 210; - grams of metal are accelerated by explosion + * _geometryCoefficient = 3/5; - spherical K factor + * _gurneyConstant = 2843; - Gurney constant of comp-b in /ms + * + * _chargeMass = 429; - grams of tritonal + * _metalMass = 496; - grams of metal are accelerated by explosion + * _geometryCoefficient = 1/2; - cylindrical K factor + * _gurneyConstant = 2320; - Gurney constant of tritonal in m/s + * Equation - 0.8 for empirical 80% speed + * 0.8 * (((_metalMass / _chargeMass) + _geometryCoefficient) ^ - (1 / 2)) * _gurneyConstant; + * or 0.8 * _gurneyConstant * sqrt (_chargeMass /(_metalMass + _chargeMass * _geometryCoefficient)); (slightly faster to compute) + */ + + private _chargeMass = getNumber (_ammoConfig >> QGVAR(charge)); + if (_chargeMass == 0) then { + _chargeMass = 1; + _notifyMissingEntries = true; + }; + + private _metalMass = getNumber (_ammoConfig >> QGVAR(metal)); + if (_metalMass == 0) then { + _metalMass = 2; + _notifyMissingEntries = true; + }; + + private _geometryCoefficient = getNumber (_ammoConfig >> QGVAR(gurney_k)); + if (_geometryCoefficient == 0) then { + _geometryCoefficient = 0.5; + _notifyMissingEntries = true; + }; + + private _gurneyConstant = getNumber (_ammoConfig >> QGVAR(gurney_c)); + if (_gurneyConstant == 0) then { + _gurneyConstant = 2440; + _notifyMissingEntries = true; + }; + + if (_notifyMissingEntries) then { + INFO_1("Ammo class %1 lacks proper explosive properties definitions for frag!",_ammo); + }; + + private _indirectHitRange = getNumber (_ammoConfig >> "indirecthitrange"); + + /********************** _ammoInfo format *************************//* + * 0: _fragRange - search range for fragments + * 1: _fragVelocity - gurney equation calculated velocity + * 2: _fragTypes - array of fragment types + * 3: _metalMassModified - mass of fragmenting metal modified for frag count + */ + [ + 80 * _indirectHitRange, + ACE_FRAG_IMPERIC_VELOCITY_CONSTANT * _gurneyConstant * sqrt (_chargeMass / (_metalMass + _chargeMass * _geometryCoefficient)), + _fragTypes, + sqrt (_metalMass / 1000) + ] // return +}, true] diff --git a/addons/frag/functions/fnc_getMaterialInfo.sqf b/addons/frag/functions/fnc_getMaterialInfo.sqf new file mode 100644 index 00000000000..199953b237b --- /dev/null +++ b/addons/frag/functions/fnc_getMaterialInfo.sqf @@ -0,0 +1,62 @@ +#include "..\script_component.hpp" +/* + * Author: Lambda.Tiger + * This function returns a classification of material type based on the surface hit. + * + * Arguments: + * 0: Surface type given as either a CfgSurfaces path or .bisurf filepath, same format as "HitPart" projectile parameter + * + * Return Value: + * Material categories as expanded on in line 44 below + * + * Example: + * "a3\data_f\penetration\concrete.bisurf" call ace_frag_fnc_getMaterialInfo + * + * Public: No + */ + +#define ACE_FRAG_SOUNDENVIRON_STR_LEN 12 +#define ACE_FRAG_SOUNDHIT_STR_LEN 8 +#define ACE_FRAG_MATERIAL_SEARCH_LEN 10 + +params ["_surfType"]; + +private _material = GVAR(spallMaterialCache) get _surfType; + +TRACE_2("materialCache",_surfType,_material); +if (!isNil "_material") exitWith {_material}; +// Use 'soundEnviron' or 'soundHit' to extract approx material +private _surfaceConfig = configFile >> "CfgSurfaces" >> _surfType; +if (isClass _surfaceConfig) then { + _material = getText (_surfaceConfig >> "soundEnviron"); + if (_material == "" || {_material == "empty"}) then { + _material = getText (_surfaceConfig >> "soundhit"); + }; +} else { // Messy way when a surface isn't added to CfgSurfaces + private _surfFileText = toLowerANSI preprocessFile _surfType; + _surfFileText = _surfFileText regexReplace ["[^a-z0-9]", ""]; + private _idx = ACE_FRAG_SOUNDENVIRON_STR_LEN + (_surfFileText find "soundenviron"); + if (_surfFileText select [_idx, 5] isEqualTo "empty") then { + _idx = ACE_FRAG_SOUNDHIT_STR_LEN + (_surfFileText find "soundhit"); + }; + _material = _surfFileText select [_idx, ACE_FRAG_MATERIAL_SEARCH_LEN]; +}; +TRACE_1("materialSubString",_material); + +_material = switch (true) do { + case ("dirt" in _material); + case ("grass" in _material): { "ground" }; + case ("gravel" in _material); + case ("rock" in _material): { "rock" }; + case ("wood" in _material): { "wood" }; + case ("lino" in _material); + case ("building" in _material); + case ("concrete" in _material): { "concrete" }; + case ("metal" in _material): { "metal" }; + default { "ground" }; +}; + +GVAR(spallMaterialCache) set [_surfType, _material]; +TRACE_2("materialCacheSet",_surfType,_material); + +_material diff --git a/addons/frag/functions/fnc_getSpallInfo.sqf b/addons/frag/functions/fnc_getSpallInfo.sqf new file mode 100644 index 00000000000..7bb566064ba --- /dev/null +++ b/addons/frag/functions/fnc_getSpallInfo.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" +/* + * Author: Lambda.Tiger + * This function returns spalling parameters for a specific ammo type. + * + * Arguments: + * 0: Ammo classname + * + * Return Value: + * _ammoInfo + * 0: Caliber config value + * 1: What part of the hit damage is from ballistic vs explosive energy (1 for all explosive) + * 2: Indirect hit damage + * + * Example: + * "B_556x45_Ball" call ace_frag_fnc_getSpallInfo + * + * Public: No + */ + +params ["_ammo"]; + +GVAR(spallInfoCache) getOrDefaultCall [_ammo, { + private _ammoConfig = configFile >> "CfgAmmo" >> _ammo; + private _caliber = getNumber (_ammoConfig >> "caliber"); + private _explosive = getNumber (_ammoConfig >> "explosive"); + private _indirectHit = getNumber (_ammoConfig >> "indirectHitRange"); + + [_caliber, _explosive, _indirectHit] // return +}, true] diff --git a/addons/frag/functions/fnc_initMaterialCache.sqf b/addons/frag/functions/fnc_initMaterialCache.sqf new file mode 100644 index 00000000000..820133cae0a --- /dev/null +++ b/addons/frag/functions/fnc_initMaterialCache.sqf @@ -0,0 +1,96 @@ +#include "..\script_component.hpp" +/* + * Author: Lambda.Tiger + * For performance, we load a bunch of vanilla materials preemptively into the spall material cache. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * call ace_frag_fnc_initMaterialCache + * + * Public: No + */ + +uiNamespace setVariable [QGVAR(spallMaterialCache), createHashMapFromArray [ + ["a3\data_f\penetration\armour.bisurf","metal"], + ["a3\data_f\penetration\armour_plate.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_100mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_12mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_16mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_1mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_20mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_23mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_250mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_30mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_3mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_40mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_5mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_60mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_7mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_80mm.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_heavy.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_medium.bisurf","metal"], + ["a3\data_f\penetration\armour_plate_thin.bisurf","metal"], + ["a3\data_f\penetration\bell.bisurf","ground"], + ["a3\data_f\penetration\body.bisurf","ground"], + ["a3\data_f\penetration\building.bisurf","concrete"], + ["a3\data_f\penetration\building_dust_particle.bisurf","concrete"], + ["a3\data_f\penetration\building_dust_soft.bisurf","concrete"], + ["a3\data_f\penetration\building_plate.bisurf","concrete"], + ["a3\data_f\penetration\building_wood_particle.bisurf","wood"], + ["a3\data_f\penetration\cactus.bisurf","ground"], + ["a3\data_f\penetration\cloth.bisurf","ground"], + ["a3\data_f\penetration\cloth_plate.bisurf","ground"], + ["a3\data_f\penetration\concrete.bisurf","concrete"], + ["a3\data_f\penetration\concrete_plate.bisurf","concrete"], + ["a3\data_f\penetration\default.bisurf","ground"], + ["a3\data_f\penetration\engine.bisurf","metal"], + ["a3\data_f\penetration\foliage.bisurf","ground"], + ["a3\data_f\penetration\foliage_dead.bisurf","ground"], + ["a3\data_f\penetration\foliage_dead_plate.bisurf","ground"], + ["a3\data_f\penetration\foliage_green.bisurf","ground"], + ["a3\data_f\penetration\foliage_green_big.bisurf","ground"], + ["a3\data_f\penetration\foliage_green_big_plate.bisurf","ground"], + ["a3\data_f\penetration\foliage_green_plate.bisurf","ground"], + ["a3\data_f\penetration\foliage_palm.bisurf","ground"], + ["a3\data_f\penetration\foliage_palm_plate.bisurf","ground"], + ["a3\data_f\penetration\foliage_pine.bisurf","ground"], + ["a3\data_f\penetration\foliage_pine_plate.bisurf","ground"], + ["a3\data_f\penetration\foliage_plate.bisurf","ground"], + ["a3\data_f\penetration\fueltank.bisurf","metal"], + ["a3\data_f\penetration\glass.bisurf","ground"], + ["a3\data_f\penetration\glass_armored.bisurf","ground"], + ["a3\data_f\penetration\glass_armored_plate.bisurf","ground"], + ["a3\data_f\penetration\glass_plate.bisurf","ground"], + ["a3\data_f\penetration\granite.bisurf","ground"], + ["a3\data_f\penetration\granite_plate.bisurf","ground"], + ["a3\data_f\penetration\hard_ground.bisurf","ground"], + ["a3\data_f\penetration\hay.bisurf","ground"], + ["a3\data_f\penetration\iron_cast.bisurf","metal"], + ["a3\data_f\penetration\iron_cast_plate.bisurf","metal"], + ["a3\data_f\penetration\leather.bisurf","ground"], + ["a3\data_f\penetration\meat.bisurf","ground"], + ["a3\data_f\penetration\meatbones.bisurf","ground"], + ["a3\data_f\penetration\medium_ground.bisurf","ground"], + ["a3\data_f\penetration\metal.bisurf","metal"], + ["a3\data_f\penetration\metal_plate.bisurf","metal"], + ["a3\data_f\penetration\metal_plate_thin.bisurf","metal"], + ["a3\data_f\penetration\plastic.bisurf","ground"], + ["a3\data_f\penetration\plastic_plate.bisurf","ground"], + ["a3\data_f\penetration\plexiglass.bisurf","ground"], + ["a3\data_f\penetration\plexiglass_plate.bisurf","ground"], + ["a3\data_f\penetration\rubber.bisurf","ground"], + ["a3\data_f\penetration\soft_ground.bisurf","ground"], + ["a3\data_f\penetration\tyre.bisurf","ground"], + ["a3\data_f\penetration\tyre_armored.bisurf","ground"], + ["a3\data_f\penetration\vehicle_interior.bisurf","metal"], + ["a3\data_f\penetration\void.bisurf","ground"], + ["a3\data_f\penetration\water.bisurf","ground"], + ["a3\data_f\penetration\weapon_plate.bisurf","metal"], + ["a3\data_f\penetration\wood.bisurf","wood"], + ["a3\data_f\penetration\wood_plate.bisurf","wood"] +]]; diff --git a/addons/frag/functions/fnc_masterPFH.sqf b/addons/frag/functions/fnc_masterPFH.sqf deleted file mode 100644 index 004af9a9ce5..00000000000 --- a/addons/frag/functions/fnc_masterPFH.sqf +++ /dev/null @@ -1,56 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: jaynus - * Master single PFH abstraction for all rounds being tracked by frag/spall. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_masterPFH - * - * Public: No - */ - -BEGIN_COUNTER(PFH); - -// Fast exit if nothing to do -if (GVAR(objects) isEqualTo []) exitWith {END_COUNTER(PFH);}; - -private _gcIndex = []; - -private _iter = 0; -private _objectCount = count GVAR(objects); -while {_objectCount > 0 && {_iter < (GVAR(maxTrackPerFrame) min _objectCount)}} do { - - if (GVAR(lastIterationIndex) >= _objectCount) then { - GVAR(lastIterationIndex) = 0; - }; - private _object = GVAR(objects) select GVAR(lastIterationIndex); - - if (!isNil "_object") then { - private _args = GVAR(arguments) select GVAR(lastIterationIndex); - - if !(_args call FUNC(pfhRound)) then { - _gcIndex pushBack GVAR(lastIterationIndex); // Add it to the GC if it returns false - }; - }; - INC(_iter); - INC(GVAR(lastIterationIndex)); -}; - -// Clean up dead object references -private _deletionCount = 0; -{ - TRACE_1("GC Projectile",_x); - private _deleteIndex = _x - _deletionCount; - GVAR(objects) deleteAt _deleteIndex; - GVAR(arguments) deleteAt _deleteIndex; - - INC(_deletionCount); -} forEach _gcIndex; - -END_COUNTER(PFH); diff --git a/addons/frag/functions/fnc_pfhRound.sqf b/addons/frag/functions/fnc_pfhRound.sqf deleted file mode 100644 index 0c261dcffba..00000000000 --- a/addons/frag/functions/fnc_pfhRound.sqf +++ /dev/null @@ -1,59 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_pfhRound - * - * Public: No - */ - -params ["_round", "_lastPos", "_lastVel", "_shellType", "_firedFrame", "_firedPos", "_doSpall", "_spallTrack", "_foundObjectHPIds", "_skip", "_explosive", "_indirectRange", "_force", "_fragPower"]; - -if (_round in GVAR(blackList)) exitWith { - false -}; - -if (!alive _round) exitWith { - if ((diag_frameno - _firedFrame) > 1) then { //skip if deleted within a single frame - if (_skip == 0) then { - if ((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1}) then { - // shotbullet, shotShell don't seem to explode when touching water, so don't create frags - if ((surfaceIsWater _lastPos) && {(toLowerANSI getText (configFile >> "CfgAmmo" >> _shellType >> "simulation")) in ["shotbullet", "shotshell"]}) exitWith {}; - private _fuseDist = getNumber(configFile >> "CfgAmmo" >> _shellType >> "fuseDistance"); - private _isArmed = _firedPos vectorDistance _lastPos >= _fuseDist; // rounds explode at exactly fuseDistance, so check inclusive - TRACE_2("",_fuseDist,_isArmed); - if (!_isArmed) exitWith {TRACE_1("round not armed",_this);}; - TRACE_3("Sending frag event to server",_lastPos,_lastVel,_shellType); - [QGVAR(frag_eh), [_lastPos,_lastVel,_shellType]] call CBA_fnc_serverEvent; - }; - }; - }; - if (_doSpall) then { - DEC(GVAR(spallIsTrackingCount)); - TRACE_1("doSpall",_foundObjectHPIds); - { - if (!isNil "_x") then { - _x removeEventHandler ["HitPart", _foundObjectHPIds select _forEachIndex]; - }; - } forEach _spallTrack; - }; - false -}; - -_this set [1, getPosASL _round]; -_this set [2, velocity _round]; - -if (_doSpall) then { - private _scale = ((count GVAR(objects)) / GVAR(maxTrackPerFrame)) max 0.1; - [_round, _scale, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack); -}; - -true diff --git a/addons/frag/functions/fnc_setClassBlacklisted.sqf b/addons/frag/functions/fnc_setClassBlacklisted.sqf new file mode 100644 index 00000000000..03a13500258 --- /dev/null +++ b/addons/frag/functions/fnc_setClassBlacklisted.sqf @@ -0,0 +1,49 @@ +#include "..\script_component.hpp" +/* + * Author: Lambda.Tiger + * Blacklist an ammo class preventing it from producing fragments and/or spall. + * This function will not allow you to force a projectile to produce fragments or spall. + * Once an ammo class has been blacklisted, it can be removed from the blacklist using this function without restarting the mission. + * + * Arguments: + * 0: Class name of the ammo to be blacklisted + * 1: Should a projectile be blacklisted from producing fragments (default: true) + * 2: Should a projectile be blacklisted from producing spall (default: true) + * + * Return Value: + * Were the changes properly applied + * + * Example: + * // Stop "ACE_20mm_HE" from producing spall + * ["ACE_20mm_HE", false, true] call ace_frag_fnc_setClassBlacklisted; + * + * Public: Yes + */ +params [ + ["_ammo", "", [""]], + ["_blacklistFrag", true, [true]], + ["_blacklistSpall", true, [true]] +]; +TRACE_3("addBlackListClass",_ammo,_blacklistFrag,_blacklistSpall); + +if (_ammo isEqualTo "" || {!isClass (configFile >> "CfgAmmo" >> _ammo)}) exitWith { + INFO_1("Invalid ammo class [%1]",_ammo); + false +}; + +if (_blacklistFrag) then { + GVAR(shouldFragCache) set [_ammo, false]; +} else { + GVAR(shouldFragCache) deleteAt _ammo; + _ammo call FUNC(shouldFrag); +}; + + +if (_blacklistSpall) then { + GVAR(shouldSpallCache) set [_ammo, false]; +} else { + GVAR(shouldSpallCache) deleteAt _ammo; + _ammo call FUNC(shouldSpall); +}; + +true diff --git a/addons/frag/functions/fnc_shouldFrag.sqf b/addons/frag/functions/fnc_shouldFrag.sqf new file mode 100644 index 00000000000..8cc62f3dac0 --- /dev/null +++ b/addons/frag/functions/fnc_shouldFrag.sqf @@ -0,0 +1,46 @@ +#include "..\script_component.hpp" +/* + * Author: Lambda.Tiger + * This function checks whether an ammunition type should create fragments. + * + * Arguments: + * 0: Ammo classname + * + * Return Value: + * Could the ammo class generate fragments + * + * Example: + * "B_556x45_Ball" call ace_frag_fnc_shouldFrag + * + * Public: No + */ + +params ["_ammo"]; + +GVAR(shouldFragCache) getOrDefaultCall [_ammo, { + private _shouldFrag = true; + + private _ammoConfig = configFile >> "CfgAmmo" >> _ammo; + private _skip = getNumber (_ammoConfig >> QGVAR(skip)); + if (_skip == 1) then { + _shouldFrag = false; + TRACE_1("No frag: skip",_skip); + }; + + private _force = getNumber (_ammoConfig >> QGVAR(force)); + if (_shouldFrag && _force == 0) then { + private _explosive = getNumber (_ammoConfig >> "explosive"); + if (_explosive < 0.5) exitWith { + _shouldFrag = false; + TRACE_3("No frag: _explosive",_skip,_force,_explosive); + }; + private _indirectHit = getNumber (_ammoConfig >> "indirectHit"); + private _indirectRange = getNumber (_ammoConfig >> "indirectHitRange"); + if (_indirectRange < 4.5 || {_indirectHit * sqrt(_indirectRange) < 35}) then { + _shouldFrag = false; + TRACE_5("No frag",_ammo,_skip,_explosive,_indirectRange,_indirectHit); + }; + }; + + _shouldFrag +}, true] diff --git a/addons/frag/functions/fnc_shouldSpall.sqf b/addons/frag/functions/fnc_shouldSpall.sqf new file mode 100644 index 00000000000..430a4da8229 --- /dev/null +++ b/addons/frag/functions/fnc_shouldSpall.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" +/* + * Author: Lambda.Tiger + * This function checks whether an ammunition type should cause spalling. + * + * Arguments: + * 0: Ammo classname + * + * Return Value: + * Whether the round type could spall when hitting an object + * + * Example: + * "B_556x45_Ball" call ace_frag_fnc_shouldSpall + * + * Public: No + */ + +params ["_ammo"]; + +GVAR(shouldSpallCache) getOrDefaultCall [_ammo, { + (_ammo call FUNC(getSpallInfo)) params ["_caliber", "_explosive", "_indirectHit"]; + + _caliber >= 2.5 || (_explosive > 0 && _indirectHit >= 1) // return +}, true] diff --git a/addons/frag/functions/fnc_spallHP.sqf b/addons/frag/functions/fnc_spallHP.sqf deleted file mode 100644 index 367bea76449..00000000000 --- a/addons/frag/functions/fnc_spallHP.sqf +++ /dev/null @@ -1,42 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: ACE-Team - * Handles the HitPart event - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_spallHP - * - * Public: No - */ - -//player sideChat format ["f: %1 c: %2", (_this select 0), (count GVAR(spallHPData))]; - -params ["_index", "_hitPartData"]; - -private _initialData = GVAR(spallHPData) param [_index, []]; -if (_initialData isEqualTo []) exitWith {}; - -private _hpRound = (_hitPartData select 0) select 2; -private _round = _initialData select 3; -private _hpDirect = (_hitPartData select 0) select 10; - -if (_hpDirect && {_round == _hpRound}) then { - { - // diag_log text format ["HPDUMP-------------------------------------"]; - // { - // _hp = _x; - // diag_log text format ["%1 --", _forEachIndex]; - // { - // diag_log text format ["%1: %2", _forEachIndex, _x]; - // } forEach _hp; - // } forEach (_this select 1); - [DFUNC(doSpall), [_this, _forEachIndex]] call CBA_fnc_execNextFrame; - // player sideChat "WEEE"; - } forEach _hitPartData; -}; diff --git a/addons/frag/functions/fnc_spallTrack.sqf b/addons/frag/functions/fnc_spallTrack.sqf deleted file mode 100644 index 50ca64b6ec4..00000000000 --- a/addons/frag/functions/fnc_spallTrack.sqf +++ /dev/null @@ -1,39 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: ACE-Team - * Add HitPart EventHandler to objects in the projectile's path - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_spallTrack - * - * Public: No - */ - -params ["_round", "_multiplier", "_foundObjects", "_foundObjectHPIds"]; - -private _delta = (1 / diag_fps) * _multiplier; -private _curPos = getPosASL _round; -private _velocity = velocity _round; - -private _velocityStep = _velocity vectorMultiply _delta; -private _forwardPos = _curPos vectorAdd _velocityStep; - - -private _intersectsWith = lineIntersectsWith [_curPos, _forwardPos]; - -if (_intersectsWith isEqualTo []) exitWith {}; -{ - // diag_log text format ["Adding HP: %1", _x]; - private _index = count GVAR(spallHPData); - private _hpId = _x addEventHandler ["HitPart", compile format ["[%1, _this] call " + QFUNC(spallHP), _index]]; - _foundObjects pushBack _x; - _foundObjectHPIds pushBack _hpId; - private _data = [_hpId, _x, typeOf _round, _round, _curPos, _velocity, 0, _foundObjects, _foundObjectHPIds]; - GVAR(spallHPData) pushBack _data; -} forEach (_intersectsWith select {!(_x in _foundObjects)}); diff --git a/addons/frag/initSettings.inc.sqf b/addons/frag/initSettings.inc.sqf index 421d5d45664..c4730a3dd0c 100644 --- a/addons/frag/initSettings.inc.sqf +++ b/addons/frag/initSettings.inc.sqf @@ -8,13 +8,6 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)]; 1 ] call CBA_fnc_addSetting; -[ - QGVAR(spallEnabled), "CHECKBOX", - [LSTRING(EnableSpall), LSTRING(EnableSpall_Desc)], - _category, - false, - 1 -] call CBA_fnc_addSetting; [ QGVAR(reflectionsEnabled), "CHECKBOX", [LSTRING(EnableReflections), LSTRING(EnableReflections_Desc)], @@ -24,17 +17,20 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)]; ] call CBA_fnc_addSetting; [ - QGVAR(maxTrack), "SLIDER", - [LSTRING(MaxTrack), LSTRING(MaxTrack_Desc)], + QGVAR(spallEnabled), "CHECKBOX", + [LSTRING(EnableSpall), LSTRING(EnableSpall_Desc)], _category, - [0, 50, 10, -1], + false, 1 ] call CBA_fnc_addSetting; [ - QGVAR(maxTrackPerFrame), "SLIDER", - [LSTRING(MaxTrackPerFrame), LSTRING(MaxTrackPerFrame_Desc)], + QGVAR(spallIntensity), "SLIDER", + [LSTRING(SpallIntensity), LSTRING(SpallIntensity_Desc)], _category, - [0, 50, 10, -1], - 1 + [0.1, 2, 1, 1], + 1, + { + GVAR(shouldSpallCache) = createHashMap; + } ] call CBA_fnc_addSetting; diff --git a/addons/frag/initSettingsDebug.inc.sqf b/addons/frag/initSettingsDebug.inc.sqf new file mode 100644 index 00000000000..a1528a446cf --- /dev/null +++ b/addons/frag/initSettingsDebug.inc.sqf @@ -0,0 +1,25 @@ +private _category = format ["ACE %1", LLSTRING(Module_DisplayName)]; + +[ + QGVAR(debugOptions), + "CHECKBOX", + [LSTRING(EnableDebugTrace), LSTRING(EnableDebugTrace_Desc)], + [_category, LSTRING(Debug)], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(dbgSphere), + "CHECKBOX", + [LSTRING(HitSphereEnable), LSTRING(HitSphereEnable_Desc)], + [_category, LSTRING(Debug)], + false +] call CBA_fnc_addSetting; + +[ + QGVAR(drawHitBox), + "CHECKBOX", + [LSTRING(DrawHitBox), LSTRING(DrawHitBox_Desc)], + [_category, LSTRING(Debug)], + true +] call CBA_fnc_addSetting; diff --git a/addons/frag/script_component.hpp b/addons/frag/script_component.hpp index 0215e9f4d74..bc69597a16b 100644 --- a/addons/frag/script_component.hpp +++ b/addons/frag/script_component.hpp @@ -2,13 +2,15 @@ #define COMPONENT_BEAUTIFIED Frag #include "\z\ace\addons\main\script_mod.hpp" -// #define DRAW_FRAG_INFO +// #define LOG_FRAG_INFO // #define DEBUG_MODE_FULL +// #define DEBUG_MODE_DRAW // #define DISABLE_COMPILE_CACHE // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_FRAG #define DEBUG_MODE_FULL + #define DEBUG_MODE_DRAW #endif #ifdef DEBUG_SETTINGS_FRAG @@ -17,4 +19,32 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define ACE_TRACE_DRAW_INC 1 +#define GLUE(g1,g2) g1##g2 + +// Mimimum hold-off time between frag events per unit +#define ACE_FRAG_FRAG_UNIT_HOLDOFF 0.5 +#define ACE_FRAG_SPALL_UNIT_HOLDOFF 0.5 +// Scaling for the min/max # of fragments since last frag event +#define ACE_FRAG_COUNT_MIN_TIME 0.1 +#define ACE_FRAG_COUNT_MIN 5 +#define ACE_FRAG_COUNT_MAX_TIME 1.5 +#define ACE_FRAG_COUNT_MAX 50 +#define ACE_FRAG_IMPERIC_VELOCITY_CONSTANT 0.8 +#define ACE_FRAG_DEFAULT_FRAG_TYPES [\ + QGVAR(tiny), QGVAR(tiny), QGVAR(tiny),\ + QGVAR(tiny_HD), QGVAR(tiny_HD), QGVAR(tiny_HD),\ + QGVAR(small), QGVAR(small), QGVAR(small), QGVAR(small),\ + QGVAR(small_HD), QGVAR(small_HD), QGVAR(small_HD), QGVAR(small_HD),\ + QGVAR(medium_HD), QGVAR(medium_HD), QGVAR(medium_HD), QGVAR(medium_HD), QGVAR(medium_HD)\ +] + +// Spall values +#define ACE_FRAG_SPALL_HOLDOFF 0.2 +#define ACE_FRAG_SPALL_VELOCITY_INHERIT_COEFF 0.8 +// sqrt(2)/50 +#define ACE_FRAG_SPALL_CALIBER_COEF 0.02828427 +#define ACE_FRAG_SPALL_POWER_MIN 2 +#define ACE_FRAG_SPALL_POWER_TINY_MAX 5 +#define ACE_FRAG_SPALL_POWER_SMALL_MAX 8 +#define ACE_FRAG_SPALL_POWER_MEDIUM_MAX 11 +#define ACE_FRAG_SPALL_POWER_LARGE_MAX 15 diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml index f88877448d8..71bda49dfc4 100644 --- a/addons/frag/stringtable.xml +++ b/addons/frag/stringtable.xml @@ -13,7 +13,7 @@ Симуляция осколков Simulazione Frammentazione 破片シミュレーション - 파편화 시뮬레이션 + 파열 시뮬레이션 破片模拟 模擬碎片 @@ -28,8 +28,8 @@ Repesz-szimuláció Симуляция осколков Simulazione Frammentazione - 破片シミュレーション - 파편화 시뮬레이션 + フラグメンテーション シミュレーション + 파열 시뮬레이션 破片模拟 模擬碎片 @@ -44,8 +44,8 @@ Az ACE repesz-szimuláció engedélyezése Включить симуляцию осколков ACE Abilita la Simulazione Frammentazione di ACE - ACE 破片シミュレーションを有効化 - ACE 파편화 시뮬레이션을 적용합니다. + ACE フラグメンテーション シミュレーションを有効化 + ACE 파열 시뮬레이션을 적용합니다. 启用 ACE 破片模拟 啟用ACE模擬碎片 @@ -60,8 +60,8 @@ Pattogzás-szimuláció Симуляция обломков Simulazione Spalling - 剥離シミュレーション - 탄환파편 시뮬레이션 + スポーリング シミュレーション + 파편 시뮬레이션 模拟剥落 模擬剝落 @@ -76,8 +76,8 @@ Az ACE pattogzás-szimuláció engedélyezése Включить симуляцию обломков ACE Abilita la Simulazione Spalling di ACE - ACE 剥離シミュレーションを有効化 - ACE 탄환파편 시뮬레이션을 적용합니다. + ACE スポーリング シミュレーションを有効化 + ACE 파편 시뮬레이션을 적용합니다. 启用 ACE 模拟剥落 啟用ACE模擬剝落 @@ -90,7 +90,7 @@ Simulation de la réflexion des explosions Simulação de reflexo de explosão Cимуляция отражения взрывов ACE - 爆発反射シミュレーション + 爆風反射シミュレーション 폭발 반사 시뮬레이션 模拟爆炸反射 模擬爆炸反射 @@ -105,107 +105,86 @@ Active la simulation de la réflexion des explosions ACE. Ativa a simulação de reflexo de explosão do ACE Включить симуляцию отражения взрывов ACE - ACE 爆発反射シミュレーションを有効化 + ACE 爆風反射シミュレーションを有効化 ACE 폭발 반사 시뮬레이션을 적용합니다. 启用 ACE 模拟爆炸反射 啟用ACE模擬爆炸反射 Povolit ACE simulaci odrazu exploze - - Maximum Projectiles Tracked - Máximos proyectiles rastreados - Maks. liczba śledzonych pocisków - Maximalzahl der verfolgten Projektile - Maximální počet sledovaných projektilů - Máximo de projéteis rastreados - Nombre maximum de projectiles suivis - Maximum követett repeszek - Макс. количество отслеживаемых снарядов - Numero massimo di Proiettili Tracciati - 飛翔体最大追跡数 - 최대 발사체 추적수 - 最大破片粒子追踪数量 - 最大碎片/剝落粒子追蹤數量 - - - This setting controls the maximum amount of projectiles the fragmentation and spalling system will track at any given time. If more projectiles are fired, they will not be tracked. Lower this setting if you do not want FPS drops at high-count projectile scenarios ( >200 rounds in the air at once) - Este ajuste controla la cantidad máxima de proyectiles del sistema de fragmentación y astillamiento de los que se hará un seguimiento en cualquier momento dado. Si se disparan más proyectiles, no serán rastreados. Baja esta opción si no deseas una bajada de FPS en escenarios con muchos proyectiles (>200 proyectiles en el aire a la vez) - To ustawienie kontroluje maksymalną ilość pocisków, jakie fragmentacja i odpryski symulują w danym momencie. Jeżeli więcej pocisków będzie wystrzelonych, wtedy nie będą one śledzone. Zmniejsz tą opcję jeżeli nie chcesz odczuwać spadków FPS podczas ciężkiej wymiany ognia (więcej niż 200 pocisków w powietrzu na raz). - Diese Einstellung steuert die maximale Anzahl an Projektilen, die das Splitter- und Explosionssystem gleichzeitig verfolgen wird. Wenn mehr Projektile abgefeuert werden, werden sie nicht verfolgt werden. Diese Einstellung zu verringern, kann FPS-Einbrüche bei Szenarien mit vielen Projektilen verhindern (>200 Objekte gleichzeitig in der Luft) - Toto nastavení kontroluje maximální množství projektilů z fragmentace a úlomků, která jsou sledována v dané době. Pokud je vystřeleno více projektilů, tak nebudou sledovány. Snižte toto nastavení pokud si nepřejete propady FPS v situacích, kde je velké množství projektilů ( >200 nábojů najednou ve vzduchu) - Esta definição controla a quantidade máxima de projéteis que o sistema de fragmentação e estilhaçamento irá acompanhar em qualquer momento. Se mais projéteis são disparados, eles não serão rastreados. Diminua essa configuração se você não quiser que o FPS caia em cenários com alta contagem de projéteis (> 200 projéteis no ar ao mesmo tempo) - Ce paramètre contrôle le nombre maximum de projectiles et d'éclats résultant de la fragmentation, que le système peut suivre à chaque instant.\nSi plus de projectiles sont générés, ils ne seront pas pris en compte. Baissez ce réglage si vous ne voulez pas de chute de FPS en cas de nombre important de projectiles (>200 éclats en même temps). - Ez a beállítás szabályozza a repeszeződés és pattogzás által kilőtt objektumok követett számát. Ha több ez a szám, ezek az objektumok nem lesznek követve. Csökkentsd ezt a beállítást, ha nem akarsz lassulásokat magas-törmelékmennyiségű helyzetekben (200+ repesz a levegőben egyszerre) - Эта настройка контролирует максимальное количество снарядов, которок отслеживает система осколков и обломков в каждый момент времени. /nСнаряды, выстреленные сверх этого числа, отслеживаться не будут. Уменьшите это значение, если вы не хотите падения FPS при большом количестве снарядов в одной перестрелке (> 200 одновременно летящих снарядов) - Questo parametro controlla il numero massimo di proiettili che la frammentazione e il sistema di spalling tracciano in ogni momento. Se vengono sparati ulteriori proiettili, non verranno tracciati. Abbassa questo parametro se non vuoi cali di FPS in scenari con molti proiettili (>200 proiettili in aria contemporaneamente) - この設定では、断片化および剥離システムが常に追跡する飛翔体の最大量を制御します。 この値より多くの飛翔体が発射された場合、それらは追跡されません。 弾数が多いシナリオでFPSを低下させたくない場合は、この設定を下げてください。 (一度に200発以上が空中に発射されます) - 이 설정은 탄환파편 및 파편 시스템으로 인해 생긴 발사체의 수를 결정합니다. 만약 더 많은 발사체가 나올 경우 정해진 수 이외에는 추적하지 않습니다. 이 설정을 낮춤으로써 파편이 많은 시나리오를 실행할때 더욱 원활히 진행할 수 있습니다 (한 번에 200개 이하) - 设定在指定时间内,系统最大可追踪的破片粒子数量。如有更多的碎片在这之后产生,这些粒子将不会被追踪。如果你想要维持好的帧数,此设定勿调的过高。( >一次200颗粒子) - 設定在指定時間內,系統最大可追蹤的碎片/剝落粒子數量。如有更多的碎片在這之後產生,這些粒子將不會被追蹤。如果你想要維持好的幀數,此設定勿調的過高。( >一次200顆粒子) - - - Maximum Projectiles Per Frame - Máximos proyectiles por cuadro - Maximale Anzahl an Projektilen pro Frame - Maks. liczba pocisków na klatkę - Maximální počet projektilů za jeden snímek - Projéteis máximos por quadro - Nombre maximal de projectiles par image - Maximum repesz/képkocka - Макс. количество снарядов за кадр - Numero massimo di proiettili per Frame - フレームごとの飛翔体最大数 - 프레임 당 최대 발사체 수 - 每帧最大破片粒子数量 - 每一幀數(FPS)最大碎片/剝落粒子數量 - - - The number of spall track calculations to perform in any given frame. This helps spread the FPS impact of tracking spall rounds across multiple frames, limiting its impact even further. - Ilość obliczeń wykonywanych przez symulację odprysków w danej klatce. Ta opcja pomaga rozprzestrzenić obliczenia odprysków na więcej klatek, zmniejszając spadek FPS jeszcze bardziej. - Gibt die Anzahl der Explosionverfolgungsberechnungen an, die gleichzeitig ausgeführt werden. Das kann dabei helfen den FPS-Einfluss abzuschwächen, wenn Teile über mehrere Frames hinweg verfolgt werden. - El número de cálculos de esquirlas que se hará en cualquier cuadro. Esto ayuda a dispersar el impacto en FPS del seguimiento de esquirlas de balas a través de múltiples cuadros, lo que limita aún más su impacto. - Počet úlomků v daném snímku. Toto pomáhá rozšířit FPS dopad sledovaného úlomku napříč více snímky, omezuje jeho vliv ještě více. - O número de cálculos por estilhaço rastreado para executar em qualquer quadro. Isso ajuda a distribuir o impacto no FPS do rastreamento de estilhaço em vários quadros, o que limita o seu impacto ainda mais. - Le nombre de calculs de suivi à effectuer pour chaque image. Cela aide à répartir l'impact des calculs sur plusieurs images, limitant ainsi encore davantage l'impact sur les FPS. - A lepattogzási útvonalak számításának darabjai képkockánként. Ez eloszlatja az FPS-megszakadást több képkockára, ezzel csökkentve a súlyosságát. - Число обрабатываемых осколков за кадр. Это позволяет распределить нагрузку по отслеживанию осколков между несколькими кадрами, чтобы предотвратить падение FPS. - Il numero di calcoli per tracciamento di spalling ad ogni frame. Questo aiuta a distribuire l'impatto del tracciamento dello spalling su più frame, riducendolo ulteriormente. - 任意のフレームごとに追跡される剥離飛翔体の数。剥離による飛翔体を追跡することによるFPSへの影響を複数フレームに分散させ抑えることが出来ます。 - 가능한 프레임마다 파편을 추적 및 계산합니다. 여러 프레임에 걸쳐 파편난 발사체를 추적하여 FPS에 도움을 줍니다. 이를 제한함으로써 더욱 큰 효과를 볼 수 있습니다. - 设定在每一帧数内,系统最大可追踪的破片粒子数量。此设定可有效帮助系统减低计算压力。 - 設定在每一幀數內,系統最大可追蹤的碎片/剝落粒子數量。此設定可有效幫助系統減低計算壓力 + + Debug + 디버그 + デバッグ + Отладка + Debug + Debug + + + Spalling Intensity + 파편 강도 + スポーリング強度 + Интенсивность обрушения + Intensità dello spalling + Intensidad del astillamiento + + + Modifier to increase or decrease the number and intensity of spalling events. Increasing this value may cause performance degradation. + 파편 이벤트 수와 강도를 늘리거나 줄입니다. 이 값을 늘리면 성능이 저하될 수 있습니다. + スポーリング現象が発生する数と強度を増減することが出来ます。この値を大きくすることはパフォーマンスの低下につながる可能性があります。 + Модификатор для увеличения или уменьшения количества и интенсивности событий обрушения. Увеличение этого значения может привести к ухудшению производительности. + Modificatore per il numero e intensità di spalling simulato, ovvero la frammentazione interna ad un veicolo colpito. Valori alti possono causare una degradazione della performance. + Modificador para aumentar o disminuir el número y la intensidad de los eventos de astillamiento. Aumentar este valor puede producir una degradación en el rendimiento. - (SP Only) Frag/Spall Debug Tracing - (Solo SP) Seguimiento de depuración de Fragmentación/Astillamiento - (Tylko SP) Wizualny debug odł./odpr. - (Pouze SP) Debug sledování Frag/Úlomků - (nur SP) Splitter-/Explosions-Debug-Verfolgung - (Somente SP) Depuração de fragmentação e estilhaços traçantes - (SP uniquement) Fragmentation/éclat debug - (Csak SP) Repesz/Pattogzás debug követés - (Только для одиночной игры) Отслеживаение/отладка осколков - (Solo SP) Debug Tracciamento Frag/Spall - (SP のみ) 破片/剥離のデバッグ用表示 - (싱글플레이 전용) 탄환파편/파편 디버그 추적화 - (仅单人)追踪显示破片粒子 - (僅在單人模式) 碎片/剝落除錯追蹤 + Frag/Spall Debug Tracing + Splitter-/Explosions-Debug-Verfolgung + フラグとスポールの追跡デバッグ + 파열/파편 디버그 추적 + Отладка трассировки фрагментации/осколков + Traccia Frag/Spall per Debug + Trazado Debug de Fragmentación/Astillamiento - (SP Only) Requires a mission/editor restart. Enables visual tracing of fragmentation and spalling rounds in SP game mode only. - (Solo SP) Requiere un reinicio misión/editor. Permite el seguimiento visual de la fragmentación y astillamientos de los proyectiles en modo SP. - (Tylko SP) Wymaga restartu misji/edytora. Aktywuje wizualne śledzenie odłamków oraz odprysków w trybie gry Single Player. - (nur SP) Splitter-/Explosions-Debugging - (Pouze SP) Vyžaduje restart mise/editoru. Aktivuje vizuální stopování fragmentace a úlomů pouze v režimu jednoho hráče. - (Somente SP) Requer um reinício de missão / editor. Habilita o rastreamento visual de projéteis de fragmentação e estilhaçamento apenas no modo de jogo SP. - (SP seulement) Requiert un redémarrage de mission ou de l'éditeur. Active les traceurs visuels de fragmentation et d'éclats en mode solo seulement. - (Csak SP) Küldetés/Editor újraindítás szükséges. Engedélyezi a repeszek és pattogzó lövedékek vizuális nyomkövetését, csak egyjátékos módok alatt. - (Только для одиночной игры) Требует перезапуска миссии/редактора. Включает визуальные следы от осколков и обломков в режиме одиночной игры. - (Solo SP) Richiede un restart editor/missione. Abilita il tracciamento visivo di schegge da frammentazione/spalling in modalità Giocatore Singolo. - (SP のみ) ミッションとエディタの再起動が必要です。有効化すると、シングルプレイでのみ破片と剥離の飛翔体が見えるようになります。 - (仅单人)激活后,只有在单人模式下才可观察到破片粒子的移动轨迹。 - (僅在單人模式) 讓你在單人模式下可觀察到碎片/剝落粒子的移動軌跡 - (SP 전용) 임무 / 편집자가 다시 시작해야합니다. SP 게임 모드에서만 파편화 및 탄환파편의 시각적 추적을 가능하게 합니다. + Enables visual tracing of fragmentation and spalling rounds. + Splitter-/Explosions-Debugging + 파열과 파편의 시각적 추적을 활성화합니다. + フラグメンテーションとスポーリングによって発生した破片飛翔体の動きを視覚的に追跡できる機能を有効化します。 + Включает визуальную трассировку фрагментации и осколочных снарядов. + Abilita il tracciamento visivo di effetti di frammentazione e spalling. + Habilitar trazado visual de los proyectiles generados por la fragmentación y el astillamiento. + + + Draw Event Spheres + 이벤트 구체 그리기 + イベントを球体として描画 + Изобразить сферы событий + Visualizza sfere eventi + Dibujar Esferas de Eventos + + + Draw color coded spheres at any event for tracked rounds. + 모든 이벤트에서 추적된 파편을 위한 색상으로 구분하는 구체를 그립니다. + 追跡中の飛翔体に発生した全てのイベントを色付けた球体として描画します。 + Изобразить цветные сферы на любом событии для отслеживаемых раундов. + Visualizza sfere colorate su ogni evento di un frammento tracciato. + Dibujar esferas codificadas por color en cualquier evento para proyectiles seguidos. + + + Draw Hitboxes + 히트박스 그리기 + ヒットボックスを描画 + Изобразить хитбоксы + Visualizza hitbox + Dibujar hitboxes + + + Draw hitboxes on objects that were targeted. + Splitter-/Explosions-Debugging + 被弾した物体のヒットボックスを描画します。 + 타겟팅된 오브젝트에 히트박스를 그립니다. + Изобразить хитбоксы на объектах, которые были нацелены. + Visualizza hitbox su potenziali bersagli della frammentazione. + Dibuja hitboxes en objetos que son seguidos. diff --git a/addons/goggles/CfgCloudlets.hpp b/addons/goggles/CfgCloudlets.hpp new file mode 100644 index 00000000000..141acd0b5b6 --- /dev/null +++ b/addons/goggles/CfgCloudlets.hpp @@ -0,0 +1,27 @@ +class CfgCloudlets { + class Default; + class ACERainEffect: Default { + interval = 0.001; + particleShape = "\A3\data_f\ParticleEffects\Universal\Refract"; + particleFSNtieth = 1; + particleFSIndex = 0; + particleFSFrameCount = 1; + particleFSLoop = 1; + + particleType = "Billboard"; + lifeTime = 0.5; + rotationVelocity = 1; + weight = 100; + volume = 0.000; + rubbing = 1.7; + size[] = {0.1}; + color[] = {{1,1,1,1}}; + animationSpeed[] = {0,1}; + randomDirectionPeriod = 0.2; + randomDirectionIntensity = 1.2; + positionVar[] = {2, 2, 2.5}; + sizeVar = 0.01; + colorVar[] = {0, 0, 0, 0.1}; + destroyOnWaterSurface = 1; + }; +}; diff --git a/addons/goggles/CfgGesturesMale.hpp b/addons/goggles/CfgGesturesMale.hpp new file mode 100644 index 00000000000..e30c87b6f7a --- /dev/null +++ b/addons/goggles/CfgGesturesMale.hpp @@ -0,0 +1,9 @@ +class CfgGesturesMale { + class States { + class GestureFreezeStand; + class GestureWipeFace: GestureFreezeStand { + file = QPATHTOF(anim\WipeGlasses.rtm); + canPullTrigger = 0; + }; + }; +}; diff --git a/addons/goggles/CfgGlasses.hpp b/addons/goggles/CfgGlasses.hpp new file mode 100644 index 00000000000..f50e96fde8d --- /dev/null +++ b/addons/goggles/CfgGlasses.hpp @@ -0,0 +1,223 @@ +class CfgGlasses { + class None { + ACE_Color[] = {0, 0, 0}; + ACE_TintAmount = 0; + ACE_Overlay = ""; + ACE_OverlayDirt = "A3\Ui_f\data\igui\rsctitles\HealthTextures\dust_upper_ca.paa"; + ACE_OverlayCracked = QPATHTOF(textures\HUD\Cracked.paa); + ACE_Resistance = 0; + ACE_Protection = 0; + ACE_DustPath = QPATHTOF(textures\fx\dust\%1.paa); + }; + + class G_Blindfold_01_base_F: None { + ACE_Overlay = QPATHTOF(textures\HUD\blindfold_ca.paa); + ACE_OverlayCracked = ""; + ACE_Resistance = 2; + ACE_Protection = 1; + }; + + class G_Combat: None { + COMBAT_GOGGLES; + }; + + class G_Combat_Goggles_tna_F: None { + COMBAT_GOGGLES; + }; + + class G_Diving { + ACE_Overlay = QPATHTOF(textures\HUD\DivingGoggles.paa); + ACE_OverlayCracked = QPATHTOF(textures\HUD\DivingGogglesCracked.paa); + ACE_Resistance = 2; + ACE_Protection = 1; + }; + + class G_Lowprofile: None { + ACE_TintAmount = QUOTE(COLOUR*2); + ACE_Resistance = 2; + ACE_Protection = 1; + }; + + class G_Shades_Black: None { + ACE_TintAmount = QUOTE(COLOUR*2); + ACE_Resistance = 1; + }; + + class G_Shades_Blue: None { + ACE_Color[] = {0, 0, 1}; + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + }; + + class G_Shades_Green: None { + ACE_Color[] = {0, 1, 0}; + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + }; + + class G_Shades_Red: None { + ACE_Color[] = {1, 0, 0}; + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + }; + + class G_Spectacles: None { + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + }; + + class G_Spectacles_Tinted: None { + ACE_TintAmount = QUOTE(COLOUR*2); + ACE_Resistance = 1; + }; + + class G_Sport_Blackred: None { + ACE_Color[] = {1, 0, 0}; + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + }; + + class G_Sport_BlackWhite: None { + ACE_Color[] = {0, 0, 1}; + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + }; + + class G_Sport_Blackyellow: None { + ACE_TintAmount = QUOTE(COLOUR*2); + ACE_Resistance = 1; + }; + + class G_Sport_Checkered: None { + ACE_TintAmount = QUOTE(COLOUR*2); + ACE_Resistance = 1; + }; + + class G_Sport_Greenblack: None { + ACE_TintAmount = QUOTE(COLOUR*2); + ACE_Resistance = 1; + }; + + class G_Sport_Red: None { + ACE_TintAmount = QUOTE(COLOUR*2); + ACE_Color[] = {0, 0, 0}; + ACE_Resistance = 1; + }; + + class G_Squares: None { + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + }; + + class G_Squares_Tinted: None { + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + }; + + class G_Tactical_Black: None { + ACE_TintAmount = COLOUR; + ACE_Color[] = {0, 0, -1.5}; + ACE_Resistance = 1; + }; + + class G_Tactical_Clear: None { + ACE_TintAmount = COLOUR; + ACE_Color[] = {0, 0, -1}; + ACE_Resistance = 1; + }; + + class G_Aviator: None { + ACE_Color[] = {0, 0, -1}; + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + }; + + class G_Lady_Blue: None { + ACE_Color[] = {0, 0, 1}; + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + }; + + class G_Lady_Red: None { + ACE_Color[] = {1, 0, 0}; + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + }; + + class G_Lady_Dark: None { + ACE_TintAmount = QUOTE(COLOUR*2); + ACE_Resistance = 1; + }; + + class G_Lady_Mirror: None { + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + }; + + class G_Balaclava_blk; + + class G_Balaclava_combat: G_Balaclava_blk { + COMBAT_GOGGLES; + }; + + class G_Balaclava_lowprofile: G_Balaclava_blk { + ACE_TintAmount = QUOTE(COLOUR*2); + ACE_Resistance = 2; + ACE_Protection = 1; + }; + + class G_Balaclava_TI_blk_F; + class G_Balaclava_TI_G_blk_F: G_Balaclava_TI_blk_F { + COMBAT_GOGGLES; + }; + + class G_Balaclava_TI_tna_F; + class G_Balaclava_TI_G_tna_F: G_Balaclava_TI_tna_F { + COMBAT_GOGGLES; + }; + + class G_Bandanna_blk; + class G_Bandanna_shades: G_Bandanna_blk { + ACE_TintAmount = QUOTE(COLOUR*2); + ACE_Resistance = 1; + ACE_Protection = 1; + }; + class G_Bandanna_sport: G_Bandanna_shades { + ACE_Color[] = {1, 0, 0}; + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + ACE_Protection = 1; + }; + class G_Bandanna_aviator: G_Bandanna_shades { + ACE_Color[] = {0, 0, -1}; + ACE_TintAmount = COLOUR; + ACE_Resistance = 1; + ACE_Protection = 1; + }; + + class G_EyeProtectors_base_F; + class G_EyeProtectors_F: G_EyeProtectors_base_F { + ACE_Resistance = 1; + ACE_Protection = 1; + }; + class G_EyeProtectors_Earpiece_F: G_EyeProtectors_base_F { + ACE_Resistance = 1; + ACE_Protection = 1; + }; + + class G_AirPurifyingRespirator_01_base_F: None { + ACE_Overlay = "a3\ui_f_enoch\data\objects\data\optics_apr_ca.paa"; + ACE_OverlayCracked = ""; + ACE_Resistance = 2; + ACE_Protection = 1; + ACE_Overlay_Angle = 180; + }; + class G_AirPurifyingRespirator_02_base_F: G_AirPurifyingRespirator_01_base_F { + ACE_Overlay = "a3\ui_f_enoch\data\objects\data\optics_APR_02_CA.paa"; + }; + class G_RegulatorMask_base_F: None { + ACE_Overlay = "a3\ui_f_enoch\data\objects\data\optics_regulator_ca.paa"; + ACE_OverlayCracked = ""; + ACE_Overlay_Angle = 180; + }; +}; diff --git a/addons/goggles/CfgMovesBasic.hpp b/addons/goggles/CfgMovesBasic.hpp new file mode 100644 index 00000000000..e7071cbe094 --- /dev/null +++ b/addons/goggles/CfgMovesBasic.hpp @@ -0,0 +1,5 @@ +class CfgMovesBasic { + class ManActions { + GestureWipeFace[] = {"GestureWipeFace", "gesture"}; + }; +}; diff --git a/addons/goggles/CfgWeapons.hpp b/addons/goggles/CfgWeapons.hpp new file mode 100644 index 00000000000..d56e530693a --- /dev/null +++ b/addons/goggles/CfgWeapons.hpp @@ -0,0 +1,13 @@ +class CfgWeapons { + class H_HelmetB; + + class H_CrewHelmetHeli_B: H_HelmetB { + ACE_Protection = 1; + }; + class H_PilotHelmetHeli_B: H_HelmetB { + ACE_Protection = 1; + }; + class H_PilotHelmetFighter_B: H_HelmetB { + ACE_Protection = 1; + }; +}; diff --git a/addons/goggles/ComplexEffects.hpp b/addons/goggles/ComplexEffects.hpp new file mode 100644 index 00000000000..2b08c195152 --- /dev/null +++ b/addons/goggles/ComplexEffects.hpp @@ -0,0 +1,9 @@ +class RifleAssaultCloud { + ACE_Goggles_BulletCount = 4; +}; +class MachineGunCloud { + ACE_Goggles_BulletCount = 3; +}; +class SniperCloud { + ACE_Goggles_BulletCount = 1; +}; diff --git a/addons/goggles/RscTitles.hpp b/addons/goggles/RscTitles.hpp index 0716892312d..318da7ed439 100644 --- a/addons/goggles/RscTitles.hpp +++ b/addons/goggles/RscTitles.hpp @@ -1,12 +1,12 @@ -class RscTitles { - #include "define.hpp" +class RscPicture; +class RscTitles { class RscACE_Goggles_BaseTitle { idd = -1; onLoad = "uiNamespace setVariable ['ACE_Goggles_Display', _this select 0]"; onUnload = "uiNamespace setVariable ['ACE_Goggles_Display', displayNull]"; - fadeIn=0.5; - fadeOut=0.5; + fadeIn = 0.5; + fadeOut = 0.5; movingEnable = 0; duration = 10e10; name = "RscACE_Goggles_BaseTitle"; @@ -14,28 +14,40 @@ class RscTitles { }; class RscACE_Goggles: RscACE_Goggles_BaseTitle { - idd = 1044; + idd = IDD_GOGGLES; name = "RscACE_Goggles"; class controls { class gogglesImage: RscPicture { - idc = 10650; + idc = IDC_GOGGLES_OVERLAY; + x = "safeZoneX"; + y = "safeZoneY"; + w = "safeZoneW"; + h = "safeZoneH"; }; }; }; class RscACE_GogglesEffects: RscACE_Goggles_BaseTitle { - idd = 1045; + idd = IDD_GOGGLESEFFECTS; onLoad = "uiNamespace setVariable ['ACE_Goggles_DisplayEffects', _this select 0]"; onUnload = "uiNamespace setVariable ['ACE_Goggles_DisplayEffects', displayNull]"; name = "RscACE_GogglesEffects"; - fadeIn=0; - fadeOut=0.5; + fadeIn = 0; + fadeOut = 0.5; class controls { class dirtImage: RscPicture { - idc = 10660; + idc = IDC_GOGGLESEFFECTS_DIRT; + x = "safeZoneX"; + y = "safeZoneY"; + w = "safeZoneW"; + h = "safeZoneH"; }; class dustImage: RscPicture { - idc = 10662; + idc = IDC_GOGGLESEFFECTS_DUST; + x = "safeZoneX"; + y = "safeZoneY"; + w = "safeZoneW"; + h = "safeZoneH"; }; }; }; diff --git a/addons/goggles/config.cpp b/addons/goggles/config.cpp index f39ab4d458d..4fdf79db50c 100644 --- a/addons/goggles/config.cpp +++ b/addons/goggles/config.cpp @@ -1,6 +1,5 @@ #include "script_component.hpp" -#define COLOUR 8.0 class CfgPatches { class ADDON { name = COMPONENT_NAME; @@ -16,305 +15,13 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" +#include "CfgWeapons.hpp" #include "CfgVehicles.hpp" - -#define COMBAT_GOGGLES ACE_Overlay = QPATHTOF(textures\HUD\CombatGoggles.paa); \ - ACE_OverlayCracked = QPATHTOF(textures\HUD\CombatGogglesCracked.paa); \ - ACE_Resistance = 2; \ - ACE_Protection = 1; - -class CfgGlasses { - class None { - ACE_Color[] = {0,0,0}; - ACE_TintAmount=0; - ACE_Overlay = ""; - ACE_OverlayDirt = "A3\Ui_f\data\igui\rsctitles\HealthTextures\dust_upper_ca.paa"; - ACE_OverlayCracked = QPATHTOF(textures\HUD\Cracked.paa); - ACE_Resistance = 0; - ACE_Protection = 0; - ACE_DustPath = QPATHTOF(textures\fx\dust\%1.paa); - }; - - class G_Blindfold_01_base_F: None { - ACE_Overlay = QPATHTOF(textures\HUD\blindfold_ca.paa); - ACE_OverlayCracked = ""; - ACE_Resistance = 2; - ACE_Protection = 1; - }; - - class G_Combat: None { - COMBAT_GOGGLES - }; - - class G_Combat_Goggles_tna_F: None { - COMBAT_GOGGLES - }; - - class G_Diving { - ACE_Overlay = QPATHTOF(textures\HUD\DivingGoggles.paa); - ACE_OverlayCracked = QPATHTOF(textures\HUD\DivingGogglesCracked.paa); - ACE_Resistance = 2; - ACE_Protection = 1; - }; - - class G_Lowprofile: None { - ACE_TintAmount=QUOTE(COLOUR*2); - ACE_Resistance = 2; - ACE_Protection = 1; - }; - - class G_Shades_Black: None { - ACE_TintAmount=QUOTE(COLOUR*2); - ACE_Resistance = 1; - }; - - class G_Shades_Blue: None { - ACE_Color[] = {0,0,1}; - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - }; - - class G_Shades_Green: None { - ACE_Color[] = {0,1,0}; - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - }; - - class G_Shades_Red: None { - ACE_Color[] = {1,0,0}; - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - }; - - class G_Spectacles: None { - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - }; - - class G_Spectacles_Tinted: None { - ACE_TintAmount=QUOTE(COLOUR*2); - ACE_Resistance = 1; - }; - - class G_Sport_Blackred: None { - ACE_Color[] = {1,0,0}; - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - }; - - class G_Sport_BlackWhite: None { - ACE_Color[] = {0,0,1}; - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - }; - - class G_Sport_Blackyellow: None { - ACE_TintAmount=QUOTE(COLOUR*2); - ACE_Resistance = 1; - }; - - class G_Sport_Checkered: None { - ACE_TintAmount=QUOTE(COLOUR*2); - ACE_Resistance = 1; - }; - - class G_Sport_Greenblack: None { - ACE_TintAmount=QUOTE(COLOUR*2); - ACE_Resistance = 1; - }; - - class G_Sport_Red: None { - ACE_TintAmount=QUOTE(COLOUR*2); - ACE_Color[] = {0,0,0}; - ACE_Resistance = 1; - }; - - class G_Squares: None { - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - }; - - class G_Squares_Tinted: None { - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - }; - - class G_Tactical_Black: None { - ACE_TintAmount=COLOUR; - ACE_Color[] = {0,0,-1.5}; - ACE_Resistance = 1; - }; - - class G_Tactical_Clear: None { - ACE_TintAmount=COLOUR; - ACE_Color[] = {0,0,-1}; - ACE_Resistance = 1; - }; - - class G_Aviator: None { - ACE_Color[] = {0,0,-1}; - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - }; - - class G_Lady_Blue: None { - ACE_Color[] = {0,0,1}; - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - }; - - class G_Lady_Red: None { - ACE_Color[] = {1,0,0}; - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - }; - - class G_Lady_Dark: None { - ACE_TintAmount=QUOTE(COLOUR*2); - ACE_Resistance = 1; - }; - - class G_Lady_Mirror: None { - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - }; - - class G_Balaclava_blk; - - class G_Balaclava_combat: G_Balaclava_blk { - COMBAT_GOGGLES - }; - - class G_Balaclava_lowprofile: G_Balaclava_blk { - ACE_TintAmount=QUOTE(COLOUR*2); - ACE_Resistance = 2; - ACE_Protection = 1; - }; - - class G_Balaclava_TI_blk_F; - class G_Balaclava_TI_G_blk_F: G_Balaclava_TI_blk_F { - COMBAT_GOGGLES - }; - - class G_Balaclava_TI_tna_F; - class G_Balaclava_TI_G_tna_F: G_Balaclava_TI_tna_F { - COMBAT_GOGGLES - }; - - class G_Bandanna_blk; - class G_Bandanna_shades: G_Bandanna_blk { - ACE_TintAmount=QUOTE(COLOUR*2); - ACE_Resistance = 1; - ACE_Protection = 1; - }; - class G_Bandanna_sport: G_Bandanna_shades { - ACE_Color[] = {1,0,0}; - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - ACE_Protection = 1; - }; - class G_Bandanna_aviator: G_Bandanna_shades { - ACE_Color[] = {0,0,-1}; - ACE_TintAmount=COLOUR; - ACE_Resistance = 1; - ACE_Protection = 1; - }; - - class G_EyeProtectors_base_F; - class G_EyeProtectors_F: G_EyeProtectors_base_F { - ACE_Resistance = 1; - ACE_Protection = 1; - }; - class G_EyeProtectors_Earpiece_F: G_EyeProtectors_base_F { - ACE_Resistance = 1; - ACE_Protection = 1; - }; - - class G_AirPurifyingRespirator_01_base_F: None { - ACE_Overlay = "a3\ui_f_enoch\data\objects\data\optics_apr_ca.paa"; - ACE_OverlayCracked = ""; - ACE_Resistance = 2; - ACE_Protection = 1; - ACE_Overlay_Angle = 180; - }; - class G_AirPurifyingRespirator_02_base_F: G_AirPurifyingRespirator_01_base_F { - ACE_Overlay = "a3\ui_f_enoch\data\objects\data\optics_APR_02_CA.paa"; - }; - class G_RegulatorMask_base_F: None { - ACE_Overlay = "a3\ui_f_enoch\data\objects\data\optics_regulator_ca.paa"; - ACE_OverlayCracked = ""; - ACE_Overlay_Angle = 180; - }; -}; - +#include "CfgGlasses.hpp" #include "RscTitles.hpp" - -class CfgMovesBasic { - class ManActions { - GestureWipeFace[] = {"GestureWipeFace", "gesture"}; - }; -}; - -class CfgGesturesMale { - class States { - class GestureFreezeStand; - class GestureWipeFace: GestureFreezeStand { - file = QPATHTOF(anim\WipeGlasses.rtm); - canPullTrigger = 0; - }; - }; -}; - -class CfgWeapons { - class H_HelmetB; - - class H_CrewHelmetHeli_B: H_HelmetB { - ACE_Protection = 1; - }; - class H_PilotHelmetHeli_B: H_HelmetB { - ACE_Protection = 1; - }; - class H_PilotHelmetFighter_B: H_HelmetB { - ACE_Protection = 1; - }; -}; - -class RifleAssaultCloud { - ACE_Goggles_BulletCount = 4; -}; -class MachineGunCloud { - ACE_Goggles_BulletCount = 3; -}; -class SniperCloud { - ACE_Goggles_BulletCount = 1; -}; +#include "CfgMovesBasic.hpp" +#include "CfgGesturesMale.hpp" +#include "CfgCloudlets.hpp" +#include "ComplexEffects.hpp" #include "ACE_Settings.hpp" - -class CfgCloudlets { - class Default; - class ACERainEffect: Default { - interval = 0.001; - particleShape = "\A3\data_f\ParticleEffects\Universal\Refract"; - particleFSNtieth = 1; - particleFSIndex = 0; - particleFSFrameCount = 1; - particleFSLoop = 1; - - particleType = "Billboard"; - lifeTime = 0.5; - rotationVelocity = 1; - weight = 100; - volume = 0.000; - rubbing = 1.7; - size[] = {0.1}; - color[] = {{1,1,1,1}}; - animationSpeed[] = {0,1}; - randomDirectionPeriod = 0.2; - randomDirectionIntensity = 1.2; - positionVar[] = {2, 2, 2.5}; - sizeVar = 0.01; - colorVar[] = {0, 0, 0, 0.1}; - destroyOnWaterSurface = 1; - }; -}; diff --git a/addons/goggles/define.hpp b/addons/goggles/define.hpp deleted file mode 100644 index 81d3fcb6896..00000000000 --- a/addons/goggles/define.hpp +++ /dev/null @@ -1,25 +0,0 @@ -// Control types -#define CT_STATIC 0 -#define ST_PICTURE 0x30 - -//////////////// -//Base Classes// -//////////////// - -class RscPicture { - idc = -1; - type = CT_STATIC; - style = ST_PICTURE; - colorBackground[] = {0,0,0,0}; - colorText[] = {1,1,1,1}; - font = "RobotoCondensed"; - sizeEx = 0; - lineSpacing = 0; - fixedWidth = 0; - shadow = 0; - text = ""; - x = "safezoneX"; - y = "safezoneY"; - w = "safezoneW"; - h = "safezoneH"; -}; diff --git a/addons/goggles/functions/fnc_applyDirtEffect.sqf b/addons/goggles/functions/fnc_applyDirtEffect.sqf index 38fc57f0ce6..aa4de7a298a 100644 --- a/addons/goggles/functions/fnc_applyDirtEffect.sqf +++ b/addons/goggles/functions/fnc_applyDirtEffect.sqf @@ -29,10 +29,11 @@ if ([_unit] call FUNC(isGogglesVisible)) then { if (_dirtImage != "") then { GVAR(GogglesEffectsLayer) cutRsc ["RscACE_GogglesEffects", "PLAIN", 0.1, false, false]; - (GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetText _dirtImage; + (GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl IDC_GOGGLESEFFECTS_DIRT) ctrlSetText _dirtImage; private _effectBrightness = linearConversion [0,1,([] call EFUNC(common,ambientBrightness)),0.25,1]; - (GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetTextColor [_effectBrightness, _effectBrightness, _effectBrightness, 1]; + (GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl IDC_GOGGLESEFFECTS_DIRT) ctrlSetTextColor [_effectBrightness, _effectBrightness, _effectBrightness, 1]; + [QGVAR(effect), [_unit, "dirt"]] call CBA_fnc_localEvent; TRACE_1("dirt",_effectBrightness); }; }; diff --git a/addons/goggles/functions/fnc_applyDustEffect.sqf b/addons/goggles/functions/fnc_applyDustEffect.sqf index 93bcbad1d6b..23ebbb2d0e5 100644 --- a/addons/goggles/functions/fnc_applyDustEffect.sqf +++ b/addons/goggles/functions/fnc_applyDustEffect.sqf @@ -22,10 +22,10 @@ private _unit = ACE_player; if ([_unit] call FUNC(isGogglesVisible)) exitWith { GVAR(GogglesEffectsLayer) cutRsc ["RscACE_GogglesEffects", "PLAIN", 2, false, false]; - ((GETUVAR(GVAR(DisplayEffects),displayNull)) displayCtrl 10662) ctrlSetText format [getText (configFile >> "CfgGlasses" >> goggles _unit >> "ACE_DustPath"), GETDUSTT(DAMOUNT) + 1]; + ((GETUVAR(GVAR(DisplayEffects),displayNull)) displayCtrl IDC_GOGGLESEFFECTS_DUST) ctrlSetText format [getText (configFile >> "CfgGlasses" >> goggles _unit >> "ACE_DustPath"), GETDUSTT(DAMOUNT) + 1]; private _effectBrightness = linearConversion [0,1,([] call EFUNC(common,ambientBrightness)),0.25,1]; - ((GETUVAR(GVAR(DisplayEffects),displayNull)) displayCtrl 10662) ctrlSetTextColor [_effectBrightness, _effectBrightness, _effectBrightness, 1]; + ((GETUVAR(GVAR(DisplayEffects),displayNull)) displayCtrl IDC_GOGGLESEFFECTS_DUST) ctrlSetTextColor [_effectBrightness, _effectBrightness, _effectBrightness, 1]; TRACE_1("dust",_effectBrightness); SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT) + 1,0,1)); @@ -57,7 +57,7 @@ GVAR(DustHandler) = [{ private _amount = 1 - (GETDUSTT(DAMOUNT) * 0.125); - if !(_unit getVariable ["ACE_EyesDamaged", false]) then { + if !(ACE_player getVariable ["ACE_EyesDamaged", false]) then { GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [_amount, _amount, _amount, _amount], [1, 1, 1, 0]]; GVAR(PostProcessEyes) ppEffectCommit 0.5; }; @@ -68,6 +68,7 @@ GVAR(DustHandler) = [{ GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [1, 1, 1, 1], [1, 1, 1, 0]]; GVAR(PostProcessEyes) ppEffectCommit 2; + [QGVAR(effect), [ACE_player, "dust"]] call CBA_fnc_localEvent; [{ if (GVAR(DustHandler) == -1) then { diff --git a/addons/goggles/functions/fnc_applyGlassesEffect.sqf b/addons/goggles/functions/fnc_applyGlassesEffect.sqf index 9df47ec4d2a..23c22352218 100644 --- a/addons/goggles/functions/fnc_applyGlassesEffect.sqf +++ b/addons/goggles/functions/fnc_applyGlassesEffect.sqf @@ -48,7 +48,7 @@ private _angle = getNumber (_config >> "ACE_Overlay_Angle"); if (_imagePath != "") then { GVAR(GogglesLayer) cutRsc ["RscACE_Goggles", "PLAIN", 1, false, false]; - private _overlay = (GLASSDISPLAY displayCtrl 10650); + private _overlay = (GLASSDISPLAY displayCtrl IDC_GOGGLES_OVERLAY); _overlay ctrlSetText _imagePath; if ((_angle != 0) && {((ctrlAngle _overlay) # 0) != _angle}) then { diff --git a/addons/goggles/functions/fnc_applyRainEffect.sqf b/addons/goggles/functions/fnc_applyRainEffect.sqf index 0058209acd6..bf1d6fd04aa 100644 --- a/addons/goggles/functions/fnc_applyRainEffect.sqf +++ b/addons/goggles/functions/fnc_applyRainEffect.sqf @@ -52,6 +52,7 @@ if (GVAR(RainLastLevel) != rain) then { GVAR(RainDrops) setParticleClass "ACERainEffect"; GVAR(RainDrops) setDropInterval (0.07 * (1.1 - GVAR(RainLastLevel))); GVAR(RainDrops) attachTo [vehicle _unit, [0,0,0]]; + [QGVAR(effect), [_unit, "rain"]] call CBA_fnc_localEvent; }; } else { if (GVAR(RainLastLevel) > 0.05) then { diff --git a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf index 85b7e60934d..b2369d15107 100644 --- a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf +++ b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf @@ -64,18 +64,18 @@ if !(_safe) then { if !([_unit] call FUNC(isGogglesVisible)) exitWith {}; if (GETDUSTT(DAMOUNT) < 2) then { - if !(GETDUSTT(DACTIVE)) then { - SETDUST(DACTIVE,true); - - call FUNC(applyDustEffect); - } else { + if (GETDUSTT(DACTIVE)) then { if (_rotorWash select 1 > 0.5) then { call FUNC(applyDustEffect); }; + } else { + SETDUST(DACTIVE,true); + + call FUNC(applyDustEffect); }; }; - _safe = getNumber (ConfigFile >> "CfgGlasses" >> goggles _unit >> "ACE_Protection") == 1; + _safe = getNumber (configFile >> "CfgGlasses" >> goggles _unit >> "ACE_Protection") == 1; }; // quit if protected by goggles or helmet @@ -101,5 +101,6 @@ if (_rotorWash select 1 > 0) then { GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [_scale, _scale, _scale, _scale], [1, 1, 1, 0]]; GVAR(PostProcessEyes) ppEffectCommit 0.5; GVAR(PostProcessEyes) ppEffectEnable true; + [QGVAR(effect), [_unit, "rotorWash"]] call CBA_fnc_localEvent; }; }; diff --git a/addons/goggles/functions/fnc_handleExplosion.sqf b/addons/goggles/functions/fnc_handleExplosion.sqf index 8b6027cb363..b7340a44cb1 100644 --- a/addons/goggles/functions/fnc_handleExplosion.sqf +++ b/addons/goggles/functions/fnc_handleExplosion.sqf @@ -44,7 +44,7 @@ if (getText (_config >> "ACE_OverlayCracked") != "") then { GVAR(GogglesLayer) cutRsc ["RscACE_Goggles", "PLAIN", 1, false, false]; }; - (GLASSDISPLAY displayCtrl 10650) ctrlSetText getText (_config >> "ACE_OverlayCracked"); + (GLASSDISPLAY displayCtrl IDC_GOGGLES_OVERLAY) ctrlSetText getText (_config >> "ACE_OverlayCracked"); }; ["ace_glassesCracked", [_unit]] call CBA_fnc_localEvent; diff --git a/addons/goggles/functions/fnc_removeDirtEffect.sqf b/addons/goggles/functions/fnc_removeDirtEffect.sqf index eff8e102ab2..d8718e4a64b 100644 --- a/addons/goggles/functions/fnc_removeDirtEffect.sqf +++ b/addons/goggles/functions/fnc_removeDirtEffect.sqf @@ -16,5 +16,5 @@ */ if (!isNull (GETUVAR(GVAR(DisplayEffects),displayNull))) then { - (GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetText ""; + (GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl IDC_GOGGLESEFFECTS_DIRT) ctrlSetText ""; }; diff --git a/addons/goggles/functions/fnc_removeDustEffect.sqf b/addons/goggles/functions/fnc_removeDustEffect.sqf index 8d424662d9c..6903fd5fc23 100644 --- a/addons/goggles/functions/fnc_removeDustEffect.sqf +++ b/addons/goggles/functions/fnc_removeDustEffect.sqf @@ -16,5 +16,5 @@ */ if (!isNull (GETUVAR(GVAR(DisplayEffects),displayNull))) then { - (GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10662) ctrlSetText ""; + (GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl IDC_GOGGLESEFFECTS_DUST) ctrlSetText ""; }; diff --git a/addons/goggles/initSettings.inc.sqf b/addons/goggles/initSettings.inc.sqf index 9b2fba6ef77..63a5684af17 100644 --- a/addons/goggles/initSettings.inc.sqf +++ b/addons/goggles/initSettings.inc.sqf @@ -3,7 +3,9 @@ LSTRING(effects_displayName), localize LSTRING(SettingsName), [[0, 1, 2, 3], [ELSTRING(common,Disabled), LSTRING(effects_tintOnly), LSTRING(enabled_tintAndEffects), LSTRING(effects_effectsOnly)], 2], - 0 + 0, + {[QGVAR(effects), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_fnc_addSetting; [ diff --git a/addons/goggles/script_component.hpp b/addons/goggles/script_component.hpp index 854e27fab39..50cd872e7b3 100644 --- a/addons/goggles/script_component.hpp +++ b/addons/goggles/script_component.hpp @@ -15,28 +15,4 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" - -// MACROS -#define GLASSESDEFAULT [false,[false,0,0,0],false] -#define GETGLASSES(unit) GETVAR(unit,GVAR(Condition),GLASSESDEFAULT) -#define SETGLASSES(unit,value) SETVAR(unit,GVAR(Condition),value) - -#define DIRT 0 -#define DUST 1 -#define BROKEN 2 - -#define GETDIRT (GETGLASSES(ace_player) select DIRT) -#define GETDUST (GETGLASSES(ace_player) select DUST) -#define GETBROKEN (GETGLASSES(ace_player) select BROKEN) -#define GETDUSTT(type) ((GETGLASSES(ace_player) select DUST) select type) - -#define SETDUST(type,value) (GETGLASSES(ace_player) select DUST) set [type,value] - -#define DACTIVE 0 -#define DTIME 1 -#define DBULLETS 2 -#define DAMOUNT 3 - -#define GLASSDISPLAY GETUVAR(GVAR(Display),displayNull) - -#define CLAMP(x,low,high) (if(x > high)then{high}else{if(x < low)then{low}else{x}}) +#include "script_macros.hpp" diff --git a/addons/goggles/script_macros.hpp b/addons/goggles/script_macros.hpp new file mode 100644 index 00000000000..ea09528c2a0 --- /dev/null +++ b/addons/goggles/script_macros.hpp @@ -0,0 +1,37 @@ +#define COMBAT_GOGGLES \ + ACE_Overlay = QPATHTOF(textures\HUD\CombatGoggles.paa); \ + ACE_OverlayCracked = QPATHTOF(textures\HUD\CombatGogglesCracked.paa); \ + ACE_Resistance = 2; \ + ACE_Protection = 1 + +#define GLASSESDEFAULT [false,[false,0,0,0],false] +#define GETGLASSES(unit) GETVAR(unit,GVAR(Condition),GLASSESDEFAULT) +#define SETGLASSES(unit,value) SETVAR(unit,GVAR(Condition),value) + +#define COLOUR 8.0 + +#define DIRT 0 +#define DUST 1 +#define BROKEN 2 + +#define GETDIRT (GETGLASSES(ace_player) select DIRT) +#define GETDUST (GETGLASSES(ace_player) select DUST) +#define GETBROKEN (GETGLASSES(ace_player) select BROKEN) +#define GETDUSTT(type) ((GETGLASSES(ace_player) select DUST) select type) +#define SETDUST(type,value) (GETGLASSES(ace_player) select DUST) set [type,value] + +#define DACTIVE 0 +#define DTIME 1 +#define DBULLETS 2 +#define DAMOUNT 3 + +#define GLASSDISPLAY GETUVAR(GVAR(Display),displayNull) + +#define CLAMP(x,low,high) (if(x > high)then{high}else{if(x < low)then{low}else{x}}) + +#define IDD_GOGGLES 1044 +#define IDC_GOGGLES_OVERLAY 10650 + +#define IDD_GOGGLESEFFECTS 1045 +#define IDC_GOGGLESEFFECTS_DIRT 10660 +#define IDC_GOGGLESEFFECTS_DUST 10662 diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index 33c4bdffc21..a1be243b4fa 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -20,7 +20,7 @@ TRACE_1("params",_grenadePosASL); // Affect local AI (players are not local, except for ACE_player) // @todo: Affect units in static weapons, turned out, etc -private _affected = ((ASLtoAGL _grenadePosASL) nearEntities ["CAManBase", 20]) - [ACE_player]; +private _affected = ((ASLToAGL _grenadePosASL) nearEntities ["CAManBase", 20]) - [ACE_player]; { private _unit = _x; @@ -69,7 +69,7 @@ private _affected = ((ASLtoAGL _grenadePosASL) nearEntities ["CAManBase", 20]) - if (!hasInterface) exitWith {}; // Create flash to illuminate environment -private _light = "#lightpoint" createVehicleLocal ASLtoAGL _grenadePosASL; +private _light = "#lightpoint" createVehicleLocal ASLToAGL _grenadePosASL; _light setPosASL _grenadePosASL; _light setLightBrightness 20; @@ -113,7 +113,7 @@ if (["ace_hearing"] call EFUNC(common,isModLoaded) && {_strength > 0} && {EGVAR( }; // Add ace_medical pain effect -if (GETEGVAR(medical,enabled,false) && {_strength > 0.1} && {isDamageAllowed _unit} && {_unit getVariable [QEGVAR(medical,allowDamage), true]}) then { +if (GETEGVAR(medical,enabled,false) && {_strength > 0.1} && {isDamageAllowed ACE_player} && {ACE_player getVariable [QEGVAR(medical,allowDamage), true]}) then { [ACE_player, _strength / 2] call EFUNC(medical,adjustPainLevel); }; @@ -122,7 +122,7 @@ _strength = 1 - (((_eyePos vectorDistance _grenadePosASL) min 25) / 25) ^ 0.4; _strength = _strength * _losCoefficient; // Account for people looking away by slightly reducing the effect for visual effects. -private _eyeDir = ((AGLtoASL positionCameraToWorld [0, 0, 1]) vectorDiff (AGLtoASL positionCameraToWorld [0, 0, 0])); +private _eyeDir = ((AGLToASL positionCameraToWorld [0, 0, 1]) vectorDiff (AGLToASL positionCameraToWorld [0, 0, 0])); private _dirToUnitVector = _eyePos vectorFromTo _grenadePosASL; private _angleDiff = acos (_eyeDir vectorDotProduct _dirToUnitVector); TRACE_2("",_angleDiff,((1 - (_angleDiff - 45) / (120 - 45)) max 0)); diff --git a/addons/grenades/functions/fnc_incendiary.sqf b/addons/grenades/functions/fnc_incendiary.sqf index f0caf82ed8e..3976d1b5ff5 100644 --- a/addons/grenades/functions/fnc_incendiary.sqf +++ b/addons/grenades/functions/fnc_incendiary.sqf @@ -44,21 +44,11 @@ if (isNull _projectile) exitWith {TRACE_1("null",_projectile);}; private _position = position _projectile; // Alert nearby hostile AI -private _nearLocalEnemies = []; - -{ - { - if (local _x && {[_center, side group _x] call BIS_fnc_sideIsEnemy}) then { // WE WANT THE OBJECT'S SIDE HERE! - _nearLocalEnemies pushBackUnique _x; - }; - } forEach crew _x; -} forEach (_position nearObjects ALERT_NEAR_ENEMY_RANGE); //@todo replace with nearEntities in 2.18 - { - if (behaviour _x in ["SAFE", "AWARE"]) then { + if (local _x && {[_center, side group _x] call BIS_fnc_sideIsEnemy} && {behaviour _x in ["SAFE", "AWARE"]}) then { // WE WANT THE OBJECT'S SIDE HERE! _x setBehaviour "COMBAT"; }; -} forEach _nearLocalEnemies; +} forEach ([_position, ALERT_NEAR_ENEMY_RANGE, ALERT_NEAR_ENEMY_RANGE, 0, false] nearEntities [["CAManBase"], false, true, true]); // Fire particles private _fire = "#particlesource" createVehicleLocal _position; @@ -202,7 +192,7 @@ if (isServer) then { {EGVAR(cookoff,ammoCookoffDuration) != 0} && {_x getVariable [QEGVAR(cookoff,enableAmmoCookoff), true]} ) then { - [QEGVAR(cookOff,cookOffBoxServer), _box] call CBA_fnc_serverEvent; + [QEGVAR(cookOff,cookOffBoxServer), _x] call CBA_fnc_serverEvent; } else { _x setDamage 1; }; diff --git a/addons/grenades/stringtable.xml b/addons/grenades/stringtable.xml index 1a6243464fa..3e08275cbf1 100644 --- a/addons/grenades/stringtable.xml +++ b/addons/grenades/stringtable.xml @@ -111,6 +111,7 @@ Granate kann nicht rollen, zu %1 gewechselt Granata non può rotolare, cambiato a %1 Grenade ne peut pas rouler, passé à %1 + No se puede rodar esta granada, cambiando a %1 M84 Stun Grenade diff --git a/addons/gunbag/functions/fnc_calculateMass.sqf b/addons/gunbag/functions/fnc_calculateMass.sqf index 6dd6a5a660d..b614d95f587 100644 --- a/addons/gunbag/functions/fnc_calculateMass.sqf +++ b/addons/gunbag/functions/fnc_calculateMass.sqf @@ -23,7 +23,7 @@ private _mass = getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlots { _mass = _mass + getNumber (configFile >> "CfgWeapons" >> _x >> "ItemInfo" >> "mass"); -} foreach _items; +} forEach _items; { _mass = _mass + getNumber (configFile >> "CfgMagazines" >> _x >> "mass"); diff --git a/addons/headless/stringtable.xml b/addons/headless/stringtable.xml index 35dcb118620..063f72d1404 100644 --- a/addons/headless/stringtable.xml +++ b/addons/headless/stringtable.xml @@ -88,7 +88,7 @@ End mission when there are no players connected (same as 'persistent = 0' in server configuration but with Headless Client support). Beende die Mission, wenn keine Spieler mehr verbunden sind (das gleiche wie 'persitent = 0' in den Serverkonfigurationen aber mit Headless Client Unterstützung). - 연결된 플레이어가 없을 때 임무 종료. (서버 구성에서는 'persistent = 0'과 같지만 Headless Client는 지원함) + 연결된 플레이어가 없으면 미션을 종료합니다(서버 설정의 'persistent = 0'과 같지만 헤드리스 클라이언트는 지원합니다). プレイヤーが接続していない場合はミッション終了します。(サーバ設定の'presistent =0'と同じですが、ヘッドレスクライアントをサポートします) Termine la mission lorsqu'il n'y a plus de joueur connecté (idem que 'persistent = 0' dans la config serveur mais avec la gestion du Headless Client). 当服务器里没有任何玩家还连线时自动结束任务(效果同于伺服器设定的'persistent = 0',但支援 Headless 客户端)。 @@ -145,7 +145,7 @@ Log transfer statistics and Headless Client (dis)connections to RPT. (Default: No) Zeichnet Transferstatistiken, Verbindungen und Verbindungsabbrüche in einer RPT-Datei auf. (Standard: Nein) Zapisz statystyki transferu i status połączenia Headless Clienta do RPT. (Domyślnie: Tak) - 전송 통계 및 헤드리스 클라이언트 연결(해제)를 RPT파일에 로그함. (기본값: No) + 전송 통계 및 헤드리스 클라이언트 연결(해제)를 RPT파일에 기록합니다. (기본값: No) 統計とヘッドレスクライアントの接続有無を PRT へ記録します。 (デフォルト: 無効) Archive les statistiques de transfert et de (dé)connections du Headless Client dans le RPT. (Défaut: Non) 记录 Headless 客户端间的转换数量与连线/断线等记录到 RPT 报告档中。(预设:关闭) diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index 93a86f73497..0ced6cad9c2 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -16,16 +16,24 @@ if (isServer) then { // Only install event handler if combat deafness is enabled if (!GVAR(enableCombatDeafness)) exitWith {}; - addMissionEventHandler ["ProjectileCreated", { - params ["_projectile"]; - - if (!local _projectile) exitWith {}; - - // Rockets only explode on local clients - _projectile addEventHandler ["Explode", { - [QGVAR(explosion), _this] call CBA_fnc_globalEvent; - }]; - }]; + if (isMultiplayer) then { + [{ // Convert ace_common's local explosion to a hearing global explosion event + params ["_projectile", "_pos"]; + TRACE_1("Explode",_this); + + // If projectile is local only, don't raise event globally + if ((netId _projectile) == "0:0") then { + [QGVAR(explosion), [_projectile, _pos]] call CBA_fnc_localEvent; + } else { + [QGVAR(explosion), [_projectile, _pos]] call CBA_fnc_globalEvent; + }; + }] call EFUNC(common,addExplosionEventHandler); + } else { + [{ + TRACE_1("Explode",_this); + [QGVAR(explosion), _this] call CBA_fnc_localEvent; + }] call EFUNC(common,addExplosionEventHandler); + }; }] call CBA_fnc_addEventHandler; if (!hasInterface) exitWith {}; @@ -71,7 +79,7 @@ GVAR(lastPlayerVehicle) = objNull; }; if ((!isNull _vehicle) && {_player != _vehicle}) then { - private _firedEH = _vehicle addEventHandler ["FiredNear", {call FUNC(firedNear)}]; + private _firedEH = _vehicle addEventHandler ["FiredNear", LINKFUNC(firedNear)]; _vehicle setVariable [QGVAR(firedEH), _firedEH]; GVAR(lastPlayerVehicle) = _vehicle; TRACE_2("added veh eh",_firedEH,GVAR(lastPlayerVehicle)); @@ -80,35 +88,15 @@ GVAR(lastPlayerVehicle) = objNull; ["turret", LINKFUNC(updatePlayerVehAttenuation), false] call CBA_fnc_addPlayerEventHandler; + [QGVAR(firedNear), "FiredNear", LINKFUNC(firedNear), true] call CBA_fnc_addBISPlayerEventHandler; + [QGVAR(slotItemChanged), "SlotItemChanged", {(_this select 2) call FUNC(updateHearingProtection)}, true] call CBA_fnc_addBISPlayerEventHandler; + // Reset deafness on respawn (or remote control player switch) ["unit", { - params ["_player", "_oldPlayer"]; - TRACE_2("unit change",_player,_oldPlayer); - - if (!isNull _oldPlayer) then { - private _firedEH = _oldPlayer getVariable [QGVAR(firedEH), -1]; - _oldPlayer removeEventHandler ["FiredNear", _firedEH]; - _oldPlayer setVariable [QGVAR(firedEH), nil]; - TRACE_2("removed unit eh",_oldPlayer,_firedEH); - }; - // Don't add a new EH if the unit respawned - if ((_player getVariable [QGVAR(firedEH), -1]) == -1) then { - if ((getNumber (configOf _player >> "isPlayableLogic")) == 1) exitWith { - TRACE_1("skipping playable logic",typeOf _player); // VirtualMan_F (placeable logic zeus / spectator) - }; - - private _firedEH = _player addEventHandler ["FiredNear", {call FUNC(firedNear)}]; - _player setVariable [QGVAR(firedEH), _firedEH]; - TRACE_2("added unit eh",_player,_firedEH); - }; - GVAR(deafnessDV) = 0; GVAR(deafnessPrior) = 0; GVAR(time3) = 0; - call FUNC(updateHearingProtection); + UPDATE_HEARING_EARPLUGS call FUNC(updateHearingProtection); }, true] call CBA_fnc_addPlayerEventHandler; - - // Update protection on possible helmet change - ["loadout", LINKFUNC(updateHearingProtection), false] call CBA_fnc_addPlayerEventHandler; }] call CBA_fnc_addEventHandler; diff --git a/addons/hearing/functions/fnc_explosion.sqf b/addons/hearing/functions/fnc_explosion.sqf index 159f6660114..2d3d5929895 100644 --- a/addons/hearing/functions/fnc_explosion.sqf +++ b/addons/hearing/functions/fnc_explosion.sqf @@ -6,13 +6,12 @@ * Arguments: * 0: Projectile * 1: Explosion position ASL - * 2: Velocity (unused) * * Return Value: * None * * Example: - * [_projectile, [0, 0, 0], [0, 0, 0]] call ace_hearing_fnc_explosion + * [_projectile, [0, 0, 0]] call ace_hearing_fnc_explosion * * Public: No */ @@ -31,11 +30,13 @@ if (_distance > 100) exitWith { }; private _ammoConfig = configOf _projectile; +private _hit = getNumber (_ammoConfig >> "hit"); +if (_hit < 0.5) exitWith { TRACE_1("ignore smoke/flare",_hit) }; private _explosive = getNumber (_ammoConfig >> "explosive"); private _vehAttenuation = [GVAR(playerVehAttenuation), 1] select (isNull objectParent ACE_player || {isTurnedOut ACE_player}); -TRACE_5("",typeOf _projectile,_distance,_explosive,_audibleFire,_vehAttenuation); +TRACE_4("",typeOf _projectile,_distance,_explosive,_vehAttenuation); (if (isArray (_ammoConfig >> "soundHit1")) then { getArray (_ammoConfig >> "soundHit1") @@ -47,9 +48,9 @@ if (_distance > _maxDistance) exitWith { TRACE_2("too far away",_distance,_maxDistance); }; -private _strength = _vehAttenuation * _explosive * _volume * _maxDistance / _distance^2; - -TRACE_2("strength",_volume,_strength); +// Tone down _maxDistance to bring strength back to similar levels as a large burst of a loud weapon +private _strength = _vehAttenuation * _explosive * _volume * (_maxDistance / 2) / _distance^2; +TRACE_6("strength",_vehAttenuation,_explosive,_volume,_maxDistance,_distance,_strength); // Call immediately, as it will get picked up later by the update thread anyway -_strength call FUNC(earRinging); +(_strength * GVAR(explosionDeafnessCoefficient)) call FUNC(earRinging); diff --git a/addons/hearing/functions/fnc_putInEarplugs.sqf b/addons/hearing/functions/fnc_putInEarplugs.sqf index aa2166a112f..535ad7af01d 100644 --- a/addons/hearing/functions/fnc_putInEarplugs.sqf +++ b/addons/hearing/functions/fnc_putInEarplugs.sqf @@ -32,4 +32,4 @@ if (_displayHint) then { // Force an immediate volume update true call FUNC(updateVolume); -call FUNC(updateHearingProtection); +UPDATE_HEARING_EARPLUGS call FUNC(updateHearingProtection); diff --git a/addons/hearing/functions/fnc_removeEarplugs.sqf b/addons/hearing/functions/fnc_removeEarplugs.sqf index 743e89ef531..2d6cffb02e9 100644 --- a/addons/hearing/functions/fnc_removeEarplugs.sqf +++ b/addons/hearing/functions/fnc_removeEarplugs.sqf @@ -37,4 +37,4 @@ if (_displayHint) then { // Force an immediate volume update true call FUNC(updateVolume); -call FUNC(updateHearingProtection); +UPDATE_HEARING_EARPLUGS call FUNC(updateHearingProtection); diff --git a/addons/hearing/functions/fnc_updateHearingProtection.sqf b/addons/hearing/functions/fnc_updateHearingProtection.sqf index b9d7f1f9a0b..b4584a567a8 100644 --- a/addons/hearing/functions/fnc_updateHearingProtection.sqf +++ b/addons/hearing/functions/fnc_updateHearingProtection.sqf @@ -4,13 +4,13 @@ * Updates the hearing protection and volume attenuation for player on earbuds/helmet change. * * Arguments: - * None + * 0: Slot * * Return Value: * None * * Example: - * call ace_hearing_fnc_updateHearingProtection + * UPDATE_HEARING_EARPLUGS call ace_hearing_fnc_updateHearingProtection * * Public: No */ @@ -22,6 +22,11 @@ if (isNull ACE_player) exitWith { GVAR(volumeAttenuation) = 1; }; +params ["_slot"]; +TRACE_1("",_slot); + +if !(_slot in [UPDATE_HEARING_EARPLUGS, TYPE_GOGGLE, TYPE_HEADGEAR]) exitWith {}; + // Handle Earplugs private _hasEarPlugsIn = ACE_player call FUNC(hasEarPlugsIn); GVAR(damageCoefficent) = [1, 0.25] select _hasEarPlugsIn; diff --git a/addons/hearing/initSettings.inc.sqf b/addons/hearing/initSettings.inc.sqf index adc6c6def75..9a9a07dc07f 100644 --- a/addons/hearing/initSettings.inc.sqf +++ b/addons/hearing/initSettings.inc.sqf @@ -11,6 +11,15 @@ private _category = format ["ACE %1", LLSTRING(Module_DisplayName)]; true // Needs mission restart ] call CBA_fnc_addSetting; +[ + QGVAR(explosionDeafnessCoefficient), + "SLIDER", + [LSTRING(explosionDeafnessCoefficient_DisplayName), LSTRING(explosionDeafnessCoefficient_Description)], + _category, + [0, 5, 1, 2], + 1 +] call CBA_fnc_addSetting; + [ QGVAR(earplugsVolume), "SLIDER", diff --git a/addons/hearing/script_component.hpp b/addons/hearing/script_component.hpp index 178310cd209..a211922087d 100644 --- a/addons/hearing/script_component.hpp +++ b/addons/hearing/script_component.hpp @@ -16,3 +16,5 @@ #include "\z\ace\addons\main\script_macros.hpp" #include "\z\ace\addons\hearing\script_macros_hearingProtection.hpp" + +#define UPDATE_HEARING_EARPLUGS -1 diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index 08419d4e42b..92041f1fccf 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -197,6 +197,16 @@ 当玩家听力受损时降低听力能力? 當玩家聽力受損時降低聽力能力? + + Explosion Deafness Coefficient + 爆発による難聴発生係数 + 폭발 난청 계수 + + + Changes how much deafness explosions cause.\nSetting to 0 will disable explosion hearing damage. + 爆発による聴力低下の程度を変更します。\n0に設定することで爆発による聴力低下を無効化できます。 + 폭발로 인한 청력 상실 정도를 변경합니다.\n0으로 설정하면 폭발에도 청력을 온전히 유지할 수 있습니다. + Controls combat deafness and ear ringing. When activated, players can be deafened when a gun is fired in their vicinity or an explosion takes place without hearing protection Harci süketség engedélyezése? diff --git a/addons/hellfire/CfgAmmo.hpp b/addons/hellfire/CfgAmmo.hpp index 02346deac3d..8789be711ce 100644 --- a/addons/hellfire/CfgAmmo.hpp +++ b/addons/hellfire/CfgAmmo.hpp @@ -1,3 +1,4 @@ +class ace_missileguidance_type_Hellfire; class CfgAmmo { class M_Scalpel_AT; @@ -23,47 +24,8 @@ class CfgAmmo { EGVAR(rearm,caliber) = 178; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Hellfire { enabled = 1; - - pitchRate = 30; // degrees per second - yawRate = 30; - - canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode - - // Guidance type for munitions - defaultSeekerType = "SALH"; - seekerTypes[] = { "SALH", "LIDAR", "SARH", "Optic", "Thermal", "GPS", "SACLOS", "MCLOS" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - defaultNavigationType = "Direct"; - navigationTypes[] = { "Direct", "ZeroEffortMiss" }; - - seekLastTargetPos = 1; // seek last target position [if seeker loses LOS of target, continue to last known pos] - seekerAngle = 70; // Angle in front of the missile which can be searched - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 1; - seekerMaxRange = 8000; // Range from the missile which the seeker can visually search - - // Attack profile type selection - defaultAttackProfile = "hellfire"; - attackProfiles[] = {"hellfire", "hellfire_hi", "hellfire_lo"}; - - class navigationStates { - class initial { - transitionCondition = QFUNC(midCourseTransition); - navigationType = "Direct"; - }; - class terminal { - transitionCondition = ""; - navigationType = "ZeroEffortMiss"; - }; - // transitions from initial -> termimal - states[] = {"initial", "terminal"}; - }; }; }; class ACE_Hellfire_AGM114N: ACE_Hellfire_AGM114K { diff --git a/addons/hellfire/functions/fnc_attackProfile.sqf b/addons/hellfire/functions/fnc_attackProfile.sqf index 221d99e7ae2..aa457d02fa5 100644 --- a/addons/hellfire/functions/fnc_attackProfile.sqf +++ b/addons/hellfire/functions/fnc_attackProfile.sqf @@ -32,7 +32,7 @@ if (_attackProfileStateParams isEqualTo []) then { _attackProfileStateParams params ["_attackStage", "_configLaunchHeightClear", "_missileStateData"]; private _projectilePos = getPosASL _projectile; -private _distanceFromLaunch2d = _launchPos distance2d _projectilePos; +private _distanceFromLaunch2d = _launchPos distance2D _projectilePos; private _heightAboveLaunch = (_projectilePos select 2) - (_launchPos select 2); // Add height depending on distance for compensate @@ -45,7 +45,7 @@ if (_returnTargetPos isEqualTo [0, 0, 0]) then { private _closingRate = vectorMagnitude velocity _projectile; // subtract 500 meters to account for the fact that we don't want to be at the perfect pitch exactly when we cross the target // 500 seemed good in testing -private _timeToGo = ((_projectilePos distance2d _seekerTargetPos) - 500) / _closingRate; +private _timeToGo = ((_projectilePos distance2D _seekerTargetPos) - 500) / _closingRate; // we could do stuff like desired attack angle, but I'm not going that far today private _los = _projectilePos vectorFromTo _seekerTargetPos; @@ -64,14 +64,14 @@ switch (_attackStage) do { if (_heightAboveLaunch > _configLaunchHeightClear) then { _attackProfileStateParams set [0, STAGE_SEEK_CRUISE]; - _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2d _projectilePos]]; + _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2D _projectilePos]]; TRACE_2("New Stage: STAGE_SEEK_CRUISE",_distanceFromLaunch2d,_heightAboveLaunch); }; if (_atMinRotationAngle) then { _attackProfileStateParams set [0, STAGE_ATTACK_TERMINAL]; - _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2d _projectilePos]]; + _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2D _projectilePos]]; TRACE_2("New Stage: STAGE_ATTACK_TERMINAL",_distanceToTarget2d,_currentHeightOverTarget); }; }; @@ -84,7 +84,7 @@ switch (_attackStage) do { if (_seekerTargetPos isNotEqualTo [0,0,0]) then { _attackProfileStateParams set [0, STAGE_ATTACK_CRUISE]; - _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2d _projectilePos]]; + _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2D _projectilePos]]; TRACE_1("New Stage: STAGE_ATTACK_CRUISE",_distanceFromLaunch2d); }; }; @@ -92,7 +92,7 @@ switch (_attackStage) do { _missileStateData params ["_heightBeforeStateSwitch", "_initialDistanceToTarget"]; private _currentHeightOverTarget = (_projectilePos select 2) - (_seekerTargetPos select 2); - private _distanceToTarget2d = _seekerTargetPos distance2d _projectilePos; + private _distanceToTarget2d = _seekerTargetPos distance2D _projectilePos; _returnTargetPos set [2, _heightBeforeStateSwitch + (_initialDistanceToTarget * sin 7)]; @@ -100,7 +100,7 @@ switch (_attackStage) do { if (_atMinRotationAngle || {(_currentHeightOverTarget atan2 _distanceToTarget2d) > 15}) then { // Wait until we can come down at a sharp angle _attackProfileStateParams set [0, STAGE_ATTACK_TERMINAL]; - _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2d _projectilePos]]; + _attackProfileStateParams set [2, [_projectilePos select 2, _seekerTargetPos distance2D _projectilePos]]; TRACE_2("New Stage: STAGE_ATTACK_TERMINAL",_distanceToTarget2d,_currentHeightOverTarget); }; }; diff --git a/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf b/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf index b032c44d233..d9e1c23b205 100644 --- a/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf +++ b/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf @@ -44,7 +44,7 @@ _attackProfileStateParams set [0, _startingStage]; _attackProfileStateParams set [1, _configLaunchHeightClear]; _attackProfileStateParams set [2, [ _projectilePos select 2, - _seekerTargetPos distance2d _projectilePos + _seekerTargetPos distance2D _projectilePos ]]; TRACE_1("new shot settings",_attackProfileStateParams); diff --git a/addons/hellfire/functions/fnc_midCourseTransition.sqf b/addons/hellfire/functions/fnc_midCourseTransition.sqf index ee567734103..034bd25d61a 100644 --- a/addons/hellfire/functions/fnc_midCourseTransition.sqf +++ b/addons/hellfire/functions/fnc_midCourseTransition.sqf @@ -15,6 +15,7 @@ * Public: No */ +params ["_args", "_timestep"]; _args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams", "_targetData", "_navigationStateData"]; _firedEH params ["_shooter","","","","_ammo","","_projectile"]; _launchParams params ["_shooter","_targetLaunchParams","_seekerType","_attackProfile","_lockMode","_laserInfo","_navigationType"]; diff --git a/addons/hitreactions/functions/fnc_fallDown.sqf b/addons/hitreactions/functions/fnc_fallDown.sqf index 38f3152c7cd..3ab2bdbedda 100644 --- a/addons/hitreactions/functions/fnc_fallDown.sqf +++ b/addons/hitreactions/functions/fnc_fallDown.sqf @@ -20,7 +20,7 @@ params ["_unit", "_firer", "_damage"]; // exit if system is disabled -if (GVAR(minDamageToTrigger) == -1) exitWith {}; +if (GVAR(minDamageToTrigger) < -0.5) exitWith {}; // exit if damage is disabled on unit if !(isDamageAllowed _unit && {_unit getVariable [QEGVAR(medical,allowDamage), true]}) exitWith {}; diff --git a/addons/hitreactions/functions/fnc_getRandomAnimation.sqf b/addons/hitreactions/functions/fnc_getRandomAnimation.sqf index 8b26bf70efd..a52f2958dca 100644 --- a/addons/hitreactions/functions/fnc_getRandomAnimation.sqf +++ b/addons/hitreactions/functions/fnc_getRandomAnimation.sqf @@ -25,6 +25,7 @@ if (_weapon == "") exitWith { if (_weapon == primaryWeapon _unit) exitWith { if (_unit call EFUNC(common,isPlayer)) then { + //IGNORE_PRIVATE_WARNING ["_velocity"]; // from upper scope private _isRunning = _velocity > 4; [ diff --git a/addons/hitreactions/initSettings.inc.sqf b/addons/hitreactions/initSettings.inc.sqf index 820f6647670..457aa83e2aa 100644 --- a/addons/hitreactions/initSettings.inc.sqf +++ b/addons/hitreactions/initSettings.inc.sqf @@ -3,7 +3,7 @@ private _category = [LELSTRING(common,categoryUncategorized), QUOTE(COMPONENT_BE [ QGVAR(minDamageToTrigger), "SLIDER", - LSTRING(minDamageToTrigger_displayName), + [LSTRING(minDamageToTrigger_displayName), LSTRING(minDamageToTrigger_Description)], _category, [-1, 1, 0.1, 1], 1 diff --git a/addons/hitreactions/stringtable.xml b/addons/hitreactions/stringtable.xml index e60be5b353a..2d0592946b0 100644 --- a/addons/hitreactions/stringtable.xml +++ b/addons/hitreactions/stringtable.xml @@ -7,7 +7,7 @@ 觸發倒下前最低需受到多少傷害 触发倒下前最低需受到多少伤害 転倒が発生するダメージの最低値 - 넘어질 때 발생하는 최소 피해량 + 넘어지는 최소 대미지 Mindestschaden, um Sturz auszulösen Minimalne obrażenie, żeby aktywować spadanie Мин. урон для активации падения @@ -17,6 +17,11 @@ Düşmeyi tetikleyen min hasar Daño mínimo para provocar la caída + + If a unit takes more damage than this setting's value whilst moving on foot, they will fall over.\nIf set to -1 the mechanic is turned off. + 徒歩で移動中のユニットが設定値を超えるダメージを受けると転倒します。\n-1に設定することでこの機能を無効化できます。 + 유닛이 도보로 이동하는 동안 이 설정 값보다 많은 대미지를 입으면 넘어집니다.\n-1로 설정하면 이 기능은 꺼집니다. + Player Weapon Drop Chance (Arm Hit) プレイヤーが武器を落とす確率 (腕部への被弾) @@ -26,6 +31,7 @@ Probabilità dei giocatori di far cadere l'arma (colpo al braccio) Probabilité de lâcher l'arme (coup au bras) Probabilidade do jogador de largar a arma após tiro no braço + Probabilidad del Jugador de Soltar el Arma (Impacto en Brazo) AI Weapon Drop Chance (Arm Hit) @@ -36,6 +42,7 @@ Probabilità dell'IA di far cadere l'arma (colpo al braccio) Probabilité de l'IA de lâcher l'arme (coup au bras) Probabilidade da IA de largar a arma após tiro no braço + Probabilidad de IA de Soltar el Arma (Impacto en Brazo) diff --git a/addons/hot/CfgAmmo.hpp b/addons/hot/CfgAmmo.hpp index c5978b6d923..6f91d241fb9 100644 --- a/addons/hot/CfgAmmo.hpp +++ b/addons/hot/CfgAmmo.hpp @@ -1,3 +1,4 @@ +class ace_missileguidance_type_Hot; class CfgAmmo { class M_Scalpel_AT; class ammo_Penetrator_Base; @@ -55,43 +56,8 @@ class CfgAmmo { EGVAR(rearm,caliber) = 178; EGVAR(vehicle_damage,incendiary) = 1.0; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Hot { enabled = 1; - - pitchRate = 45; // Minium flap deflection for guidance - yawRate = 45; // Maximum flap deflection for guidance - - canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode - - showTrail = 1; - - // Guidance type for munitions - defaultSeekerType = "SACLOS"; - seekerTypes[] = { "SACLOS" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - defaultNavigationType = "Line"; - navigationTypes[] = { "Line" }; - - lineGainP = 7; - lineGainD = 6; - - initialPitch = 2; - - seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] - seekerAngle = 30; // Angle from the shooter's view that can track the missile - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 75; - seekerMaxRange = 4000; // Range from the missile which the seeker can visually search - - offsetFromCrosshair[] = { 0, 0, 0.5 }; // where the missile wants to stay in relation to the center of the crosshair. - - // Attack profile type selection - defaultAttackProfile = "WIRE"; - attackProfiles[] = {"WIRE"}; }; }; @@ -143,6 +109,7 @@ class CfgAmmo { class ace_missileguidance: ace_missileguidance { enabled = 1; seekerMaxRange = 4300; + offsetFromCrosshair[] = { 0, 0, 0.5 }; // where the missile wants to stay in relation to the center of the crosshair. }; }; }; diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index 65542c66e87..4a80a4819e9 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -31,10 +31,10 @@ GVAR(ELEVAT) = 0.01; HUNTIR_BACKGROUND_LAYER_ID cutText["","PLAIN"]; -closedialog 0; +closeDialog 0; createDialog QGVAR(cam_dialog); -uiNameSpace setVariable [QGVAR(monitor), findDisplay 18880]; -(uiNameSpace getVariable QGVAR(monitor)) displaySetEventHandler ["Keydown", QUOTE(_this call FUNC(keyPressed))]; +uiNamespace setVariable [QGVAR(monitor), findDisplay 18880]; +(uiNamespace getVariable QGVAR(monitor)) displaySetEventHandler ["Keydown", QUOTE(_this call FUNC(keyPressed))]; ctrlSetText [4, "0X"]; @@ -68,7 +68,7 @@ GVAR(no_cams) sort true; } forEach GVAR(no_cams); [{ //Close monitor if we no longer have the item: - if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNameSpace getVariable [QGVAR(monitor), displayNull])}) then { + if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNamespace getVariable [QGVAR(monitor), displayNull])}) then { closeDialog 0; [QGVAR(monitorClosed), [ACE_player]] call CBA_fnc_localEvent; }; @@ -105,11 +105,11 @@ GVAR(no_cams) sort true; GVAR(NV) = 0; setAperture -1; - closedialog 0; - titletext [" ", "BLACK IN", 4]; + closeDialog 0; + titleText [" ", "BLACK IN", 4]; ACE_player switchCamera "INTERNAL"; - GVAR(cam) CameraEffect ["Terminate", "Back"]; - CamDestroy GVAR(cam); + GVAR(cam) cameraEffect ["Terminate", "Back"]; + camDestroy GVAR(cam); deleteVehicle GVAR(logic); if (player != ACE_player) then { player remoteControl ACE_player; @@ -119,19 +119,19 @@ GVAR(no_cams) sort true; switch (GVAR(ZOOM)) do { case 0: { - GVAR(cam) camsetFOV 0.7; + GVAR(cam) camSetFov 0.7; GVAR(cam) camSetFocus [GVAR(pos) select 2, 1]; }; case 1: { - GVAR(cam) camsetFOV 0.35; + GVAR(cam) camSetFov 0.35; GVAR(cam) camSetFocus [(GVAR(pos) select 2)/2, 1]; }; case 2: { - GVAR(cam) camsetFOV 0.17; + GVAR(cam) camSetFov 0.17; GVAR(cam) camSetFocus [(GVAR(pos) select 2)/4, 1]; }; case 3: { - GVAR(cam) camsetFOV 0.1; + GVAR(cam) camSetFov 0.1; GVAR(cam) camSetFocus [(GVAR(pos) select 2)/8, 1]; }; }; @@ -139,7 +139,7 @@ GVAR(no_cams) sort true; GVAR(logic) setPosATL (GVAR(pos) vectorAdd [0, 0, -5]); GVAR(logic) setDir GVAR(ROTATE); GVAR(logic) setVectorUp [0.0001, 0.0001, 1]; - GVAR(cam) CameraEffect ["internal", "BACK"]; + GVAR(cam) cameraEffect ["internal", "BACK"]; private _cam_coord_y = GVAR(ELEVAT) * cos(GVAR(ROTATE)); private _cam_coord_x = GVAR(ELEVAT) * sin(GVAR(ROTATE)); GVAR(cam) camSetRelPos [_cam_coord_x, _cam_coord_y, 2]; diff --git a/addons/huntir/functions/fnc_huntir.sqf b/addons/huntir/functions/fnc_huntir.sqf index efb9e139d12..c54d193d9e3 100644 --- a/addons/huntir/functions/fnc_huntir.sqf +++ b/addons/huntir/functions/fnc_huntir.sqf @@ -34,7 +34,7 @@ createDialog QGVAR(cam_dialog_off); }; closeDialog 0; createDialog QGVAR(cam_dialog_inactive); - uiNameSpace setVariable [QGVAR(monitor), findDisplay 18881]; + uiNamespace setVariable [QGVAR(monitor), findDisplay 18881]; [{ GVAR(startTime) = CBA_missionTime; GVAR(done) = false; @@ -46,7 +46,7 @@ createDialog QGVAR(cam_dialog_off); [QGVAR(monitorStarted), [ACE_player]] call CBA_fnc_localEvent; [{ //Close monitor if we no longer have item: - if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNameSpace getVariable [QGVAR(monitor), displayNull])}) then { + if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNamespace getVariable [QGVAR(monitor), displayNull])}) then { closeDialog 0; [QGVAR(monitorClosed), [ACE_player]] call CBA_fnc_localEvent; }; @@ -108,7 +108,7 @@ createDialog QGVAR(cam_dialog_off); ctrlSetText [1, "No GDS System detected"]; [{ GVAR(done) = true; - closedialog 0; + closeDialog 0; HUNTIR_BACKGROUND_LAYER_ID cutText ["", "PLAIN"]; [QGVAR(monitorClosed), [ACE_player]] call CBA_fnc_localEvent; }, [], 3, 0] call CBA_fnc_waitAndExecute; diff --git a/addons/interact_menu/CursorMenus.hpp b/addons/interact_menu/CursorMenus.hpp index 79f1109598c..82cb9e79e66 100644 --- a/addons/interact_menu/CursorMenus.hpp +++ b/addons/interact_menu/CursorMenus.hpp @@ -28,10 +28,10 @@ class RscTitles { size = 1; colorBackground[] = {0, 0, 0, 0.65}; colorText[] = {0, 0, 0, 0}; - x = "safezoneX"; - y = "safezoneY"; - w = "safezoneW"; - h = "safezoneH"; + x = "safeZoneX"; + y = "safeZoneY"; + w = "safeZoneW"; + h = "safeZoneH"; }; }; }; diff --git a/addons/interact_menu/functions/fnc_addActionToClass.sqf b/addons/interact_menu/functions/fnc_addActionToClass.sqf index 91197d02d92..d2167c8079c 100644 --- a/addons/interact_menu/functions/fnc_addActionToClass.sqf +++ b/addons/interact_menu/functions/fnc_addActionToClass.sqf @@ -30,7 +30,7 @@ private _useInheritance = _this param [4, false, [false]]; private _excludedClasses = _this param [5, [], [[]]]; TRACE_6("addActionToClass",_objectType,_typeNum,_parentPath,_action,_useInheritance,_excludedClasses); -if (_useInheritance) exitwith { +if (_useInheritance) exitWith { BEGIN_COUNTER(addAction); private _cfgVehicles = configFile >> "CfgVehicles"; // store this so we don't resolve for every element _excludedClasses = (_excludedClasses apply {configName (_cfgVehicles >> _x)}) - [""]; // ends up being faster than toLower'ing everything else diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index c2230efc4f2..a7fe168a5d9 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -109,6 +109,7 @@ if (_objectType isKindOf "CAManBase") then { TRACE_1("Building ACE_SelfActions",_objectType); // Create a master action to base on self action +//IGNORE_PRIVATE_WARNING ["_target"]; private _actions = [ [ [ diff --git a/addons/interact_menu/functions/fnc_createAction.sqf b/addons/interact_menu/functions/fnc_createAction.sqf index ae00f4fb820..75383950f13 100644 --- a/addons/interact_menu/functions/fnc_createAction.sqf +++ b/addons/interact_menu/functions/fnc_createAction.sqf @@ -26,8 +26,6 @@ * Public: Yes */ -// IGNORE_PRIVATE_WARNING(_actionName,_displayName,_icon,_statement,_condition,_insertChildren,_customParams,_position,_distance,_params,_modifierFunction); - if (!hasInterface) exitWith { [] }; params [ "_actionName", diff --git a/addons/interact_menu/functions/fnc_isSubPath.sqf b/addons/interact_menu/functions/fnc_isSubPath.sqf index 5b58b1b1f0b..a967f85f2cd 100644 --- a/addons/interact_menu/functions/fnc_isSubPath.sqf +++ b/addons/interact_menu/functions/fnc_isSubPath.sqf @@ -22,7 +22,6 @@ private _isSubPath = true; if (count _shortPath > count _longPath) exitWith {false}; -//IGNORE_PRIVATE_WARNING ["_i"]; for [{private _i = 0},{_i < count _shortPath},{_i = _i + 1}] do { if ((_longPath select _i) isNotEqualTo (_shortPath select _i)) exitWith { _isSubPath = false; diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index 2ae39bff26b..1ed969b04a7 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -62,7 +62,7 @@ GVAR(openedMenuType) = _menuType; GVAR(lastTimeSearchedActions) = -1000; GVAR(ParsedTextCached) = []; -GVAR(useCursorMenu) = (vehicle ACE_player != ACE_player) || +GVAR(useCursorMenu) = (!isNull objectParent ACE_player) || (!(isNull (ACE_controlledUAV select 0))) || visibleMap || (!isNull curatorCamera) || @@ -84,8 +84,8 @@ if (GVAR(useCursorMenu)) then { } else { createDialog QGVAR(cursorMenu); }; - (finddisplay 91919) displayAddEventHandler ["KeyUp", {[_this,'keyup'] call CBA_events_fnc_keyHandler}]; - (finddisplay 91919) displayAddEventHandler ["KeyDown", { + (findDisplay 91919) displayAddEventHandler ["KeyUp", {[_this,'keyup'] call CBA_events_fnc_keyHandler}]; + (findDisplay 91919) displayAddEventHandler ["KeyDown", { // Handle the escape key being pressed with menu open: if ((_this select [1,4]) isEqualTo [1,false,false,false]) exitWith { // escape key with no modifiers [displayNull] call FUNC(handleEscapeMenu); @@ -102,8 +102,8 @@ if (GVAR(useCursorMenu)) then { _ctrl ctrlCommit 0; // handles Mouse moving and LMB in cursor mode when action on keyrelease is disabled - ((finddisplay 91919) displayctrl 9922) ctrlAddEventHandler ["MouseMoving", DFUNC(handleMouseMovement)]; - ((finddisplay 91919) displayctrl 9922) ctrlAddEventHandler ["MouseButtonDown", DFUNC(handleMouseButtonDown)]; + ((findDisplay 91919) displayCtrl 9922) ctrlAddEventHandler ["MouseMoving", DFUNC(handleMouseMovement)]; + ((findDisplay 91919) displayCtrl 9922) ctrlAddEventHandler ["MouseButtonDown", DFUNC(handleMouseButtonDown)]; setMousePosition [0.5, 0.5]; } else { if (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]) then { @@ -111,25 +111,25 @@ if (GVAR(useCursorMenu)) then { }; }; -GVAR(selfMenuOffset) = (AGLtoASL (positionCameraToWorld [0, 0, 2])) vectorDiff (AGLtoASL (positionCameraToWorld [0, 0, 0])); +GVAR(selfMenuOffset) = (AGLToASL (positionCameraToWorld [0, 0, 2])) vectorDiff (AGLToASL (positionCameraToWorld [0, 0, 0])); //Auto expand the first level when self, mounted vehicle or zeus (skips the first animation as there is only one choice) if (GVAR(openedMenuType) == 0) then { if (isNull curatorCamera) then { - if !(isNull (ACE_controlledUAV select 0)) then { - GVAR(menuDepthPath) = [["ACE_SelfActions", (ACE_controlledUAV select 0)]]; - GVAR(expanded) = true; - GVAR(expandedTime) = diag_tickTime; - GVAR(lastPath) = +GVAR(menuDepthPath); - GVAR(startHoverTime) = -1000; - } else { - if (vehicle ACE_player != ACE_player) then { + if (isNull (ACE_controlledUAV select 0)) then { + if (!isNull objectParent ACE_player) then { GVAR(menuDepthPath) = [["ACE_SelfActions", (vehicle ACE_player)]]; GVAR(expanded) = true; GVAR(expandedTime) = diag_tickTime; GVAR(lastPath) = +GVAR(menuDepthPath); GVAR(startHoverTime) = -1000; }; + } else { + GVAR(menuDepthPath) = [["ACE_SelfActions", (ACE_controlledUAV select 0)]]; + GVAR(expanded) = true; + GVAR(expandedTime) = diag_tickTime; + GVAR(lastPath) = +GVAR(menuDepthPath); + GVAR(startHoverTime) = -1000; }; } else { GVAR(menuDepthPath) = [["ACE_ZeusActions", (getAssignedCuratorLogic player)]]; diff --git a/addons/interact_menu/functions/fnc_render.sqf b/addons/interact_menu/functions/fnc_render.sqf index e4ee0d63575..2089f6b1060 100644 --- a/addons/interact_menu/functions/fnc_render.sqf +++ b/addons/interact_menu/functions/fnc_render.sqf @@ -38,7 +38,7 @@ if (GVAR(openedMenuType) >= 0) then { private _closestSelection = -1; { _x params ["", "_sPos"]; - private _distanceFromCursor = _cursorScreenPos distance2d _sPos; + private _distanceFromCursor = _cursorScreenPos distance2D _sPos; if ((_distanceFromCursor < 0.1118) && {_distanceFromCursor < _closestDistance}) then { _closestDistance = _distanceFromCursor; _closestSelection = _forEachIndex; diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 62d29be91f4..a44d37522b9 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -19,8 +19,8 @@ GVAR(currentOptions) = []; private _player = ACE_player; -GVAR(cameraPosASL) = AGLtoASL (positionCameraToWorld [0, 0, 0]); -GVAR(cameraDir) = (AGLtoASL (positionCameraToWorld [0, 0, 1])) vectorDiff GVAR(cameraPosASL); +GVAR(cameraPosASL) = AGLToASL (positionCameraToWorld [0, 0, 0]); +GVAR(cameraDir) = (AGLToASL (positionCameraToWorld [0, 0, 1])) vectorDiff GVAR(cameraPosASL); private _fnc_renderNearbyActions = { // Render all nearby interaction menus @@ -97,15 +97,15 @@ private _fnc_renderSelfActions = { // Iterate through base level class actions and render them if appropiate private _classActions = GVAR(ActSelfNamespace) get typeOf _target; - private _pos = if !(GVAR(useCursorMenu)) then { - //Convert to ASL, add offset and then convert back to AGL (handles waves when over water) - ASLtoAGL ((AGLtoASL (positionCameraToWorld [0, 0, 0])) vectorAdd GVAR(selfMenuOffset)); - } else { + private _pos = if (GVAR(useCursorMenu)) then { [0.5, 0.5] + } else { + //Convert to ASL, add offset and then convert back to AGL (handles waves when over water) + ASLToAGL ((AGLToASL (positionCameraToWorld [0, 0, 0])) vectorAdd GVAR(selfMenuOffset)); }; { - _action = _x; + private _action = _x; [_target, _action, _pos] call FUNC(renderBaseMenu); } forEach _classActions; }; @@ -123,11 +123,8 @@ GVAR(collectedActionPoints) resize 0; // Render nearby actions, unit self actions or vehicle self actions as appropiate if (GVAR(openedMenuType) == 0) then { if (isNull curatorCamera) then { - if !(isNull (ACE_controlledUAV select 0)) then { - // Render UAV self actions when in control of UAV AI - (ACE_controlledUAV select 0) call _fnc_renderSelfActions; - } else { - if (vehicle ACE_player == ACE_player) then { + if (isNull (ACE_controlledUAV select 0)) then { + if (isNull objectParent ACE_player) then { if (diag_tickTime > GVAR(lastTimeSearchedActions) + 0.20) then { // Once every 0.2 secs, collect nearby objects active and visible action points and render them call _fnc_renderNearbyActions; @@ -139,6 +136,10 @@ if (GVAR(openedMenuType) == 0) then { // Render vehicle self actions when in vehicle (vehicle ACE_player) call _fnc_renderSelfActions; }; + } else { + // Render UAV self actions when in control of UAV AI + (ACE_controlledUAV select 0) call _fnc_renderSelfActions; + }; } else { // Render zeus actions when zeus open @@ -160,7 +161,7 @@ if (count GVAR(collectedActionPoints) > 1) then { private _delta = vectorNormalized ((GVAR(collectedActionPoints) select _i select 1) vectorDiff (GVAR(collectedActionPoints) select _j select 1)); // If _i is inside a cone with 20º half angle with origin on _j - if ((_delta select 2 > 0.94) && {((GVAR(collectedActionPoints) select _i select 1) distance2d (GVAR(collectedActionPoints) select _j select 1)) < 0.1}) exitWith { + if ((_delta select 2 > 0.94) && {((GVAR(collectedActionPoints) select _i select 1) distance2D (GVAR(collectedActionPoints) select _j select 1)) < 0.1}) exitWith { GVAR(collectedActionPoints) deleteAt _i; }; }; diff --git a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf index 9e3aaa53a92..7711c812f02 100644 --- a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf @@ -37,7 +37,7 @@ private _pos = if((count _this) > 2) then { // For non-self actions, exit if the action is too far away or ocluded private _distanceToBasePoint = 0; //This will be 0 for self/zeus/in-vehicle (used later to check sub action distance) -if ((GVAR(openedMenuType) == 0) && {isNull (ACE_controlledUAV select 0)} && {vehicle ACE_player == ACE_player} && {isNull curatorCamera} && +if ((GVAR(openedMenuType) == 0) && {isNull (ACE_controlledUAV select 0)} && {isNull objectParent ACE_player} && {isNull curatorCamera} && { private _headPos = ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot"); _distanceToBasePoint = _headPos distance _pos; @@ -46,7 +46,7 @@ if ((GVAR(openedMenuType) == 0) && {isNull (ACE_controlledUAV select 0)} && {veh if ((_distanceToBasePoint > 1.2) && {!(_params select 4)}) exitWith { // If distance to action is greater than 1.2 m and check isn't disabled in params, check LOS - lineIntersects [AGLtoASL _headPos, AGLtoASL _pos, _object, ACE_player] + lineIntersects [AGLToASL _headPos, AGLToASL _pos, _object, ACE_player] }; false }) exitWith {false}; @@ -91,7 +91,7 @@ if (_activeActionTree isEqualTo []) exitWith {false}; BEGIN_COUNTER(fnc_renderMenus); if (count _pos > 2) then { - _sPos pushBack (((AGLtoASL _pos) vectorDiff GVAR(cameraPosASL)) vectorDotProduct GVAR(cameraDir)); + _sPos pushBack (((AGLToASL _pos) vectorDiff GVAR(cameraPosASL)) vectorDotProduct GVAR(cameraDir)); } else { _sPos pushBack 0; }; diff --git a/addons/interact_menu/functions/fnc_renderIcon.sqf b/addons/interact_menu/functions/fnc_renderIcon.sqf index 78b709472a3..a1118b77b0c 100644 --- a/addons/interact_menu/functions/fnc_renderIcon.sqf +++ b/addons/interact_menu/functions/fnc_renderIcon.sqf @@ -27,8 +27,8 @@ if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then { private _displayNum = [[46, 12] select visibleMap, 91919] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]); GVAR(iconCtrls) pushBack ((findDisplay _displayNum) ctrlCreate ["RscStructuredText", 54021 + GVAR(iconCount)]); if (GVAR(useCursorMenu)) then { - ((finddisplay _displayNum) displayctrl (54021 + GVAR(iconCount))) ctrlAddEventHandler ["MouseMoving", DFUNC(handleMouseMovement)]; - ((finddisplay _displayNum) displayctrl (54021 + GVAR(iconCount))) ctrlAddEventHandler ["MouseButtonDown", DFUNC(handleMouseButtonDown)]; + ((findDisplay _displayNum) displayCtrl (54021 + GVAR(iconCount))) ctrlAddEventHandler ["MouseMoving", DFUNC(handleMouseMovement)]; + ((findDisplay _displayNum) displayCtrl (54021 + GVAR(iconCount))) ctrlAddEventHandler ["MouseButtonDown", DFUNC(handleMouseButtonDown)]; }; }; private _ctrl = GVAR(iconCtrls) select GVAR(iconCount); @@ -48,9 +48,9 @@ _text = if ([GVAR(useListMenu), GVAR(useListMenuSelf)] select GVAR(keyDownSelfAc GVAR(iconCount) = GVAR(iconCount) + 1; private _pos = if ([GVAR(useListMenu), GVAR(useListMenuSelf)] select GVAR(keyDownSelfAction)) then { - [(_sPos select 0) - (0.0095 * SafeZoneW), (_sPos select 1) - (0.0095 * SafeZoneW), 0.20 * SafeZoneW, 0.035 * SafeZoneW] + [(_sPos select 0) - (0.0095 * safeZoneW), (_sPos select 1) - (0.0095 * safeZoneW), 0.20 * safeZoneW, 0.035 * safeZoneW] } else { - [(_sPos select 0) - (0.0750 * SafeZoneW), (_sPos select 1) - (0.0095 * SafeZoneW), 0.15 * SafeZoneW, 0.100 * SafeZoneW] + [(_sPos select 0) - (0.0750 * safeZoneW), (_sPos select 1) - (0.0095 * safeZoneW), 0.15 * safeZoneW, 0.100 * safeZoneW] }; diff --git a/addons/interact_menu/functions/fnc_renderSelector.sqf b/addons/interact_menu/functions/fnc_renderSelector.sqf index bf719299244..27170d9fa83 100644 --- a/addons/interact_menu/functions/fnc_renderSelector.sqf +++ b/addons/interact_menu/functions/fnc_renderSelector.sqf @@ -22,8 +22,8 @@ if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then { private _displayNum = [[46, 12] select visibleMap,91919] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]); GVAR(iconCtrls) pushBack ((findDisplay _displayNum) ctrlCreate ["RscStructuredText", 54021+GVAR(iconCount)]); if (GVAR(useCursorMenu)) then { - ((finddisplay _displayNum) displayctrl (54021+GVAR(iconCount))) ctrlAddEventHandler ["MouseMoving", DFUNC(handleMouseMovement)]; - ((finddisplay _displayNum) displayctrl (54021+GVAR(iconCount))) ctrlAddEventHandler ["MouseButtonDown", DFUNC(handleMouseButtonDown)]; + ((findDisplay _displayNum) displayCtrl (54021+GVAR(iconCount))) ctrlAddEventHandler ["MouseMoving", DFUNC(handleMouseMovement)]; + ((findDisplay _displayNum) displayCtrl (54021+GVAR(iconCount))) ctrlAddEventHandler ["MouseButtonDown", DFUNC(handleMouseButtonDown)]; }; }; @@ -31,10 +31,10 @@ private _ctrl = GVAR(iconCtrls) select GVAR(iconCount); private _pos = if (GVAR(UseListMenu)) then { [_ctrl, GVAR(iconCount), format ["", _icon, GVAR(selectorColorHex)]] call FUNC(ctrlSetParsedTextCached); - [(_sPos select 0)-(0.014*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.05*SafeZoneW, 0.035*SafeZoneW] + [(_sPos select 0)-(0.014*safeZoneW), (_sPos select 1)-(0.014*safeZoneW), 0.05*safeZoneW, 0.035*safeZoneW] } else { [_ctrl, GVAR(iconCount), format ["", _icon, GVAR(selectorColorHex)]] call FUNC(ctrlSetParsedTextCached); - [(_sPos select 0)-(0.050*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.1*SafeZoneW, 0.035*SafeZoneW] + [(_sPos select 0)-(0.050*safeZoneW), (_sPos select 1)-(0.014*safeZoneW), 0.1*safeZoneW, 0.035*safeZoneW] }; GVAR(iconCount) = GVAR(iconCount) + 1; diff --git a/addons/interact_menu/functions/fnc_splitPath.sqf b/addons/interact_menu/functions/fnc_splitPath.sqf index 8fabaca5a56..ae90f38dbe8 100644 --- a/addons/interact_menu/functions/fnc_splitPath.sqf +++ b/addons/interact_menu/functions/fnc_splitPath.sqf @@ -11,7 +11,7 @@ * 1: Action name * * Example: - * [[path]] call ACE_interact_menu_fnc_splitPath + * ["ACE_TapShoulderRight", "VulcanPinch"] call ace_interact_menu_fnc_splitPath * * Public: No */ @@ -20,12 +20,6 @@ private _parentPath = []; _parentPath append _this; -private _count = count _this; - -private _actionName = if (_count > 0) then { - _parentPath deleteAt (_count - 1) // TODO: replace with _parentPath deleteAt [-1] and drop _count in 2.18 -} else { - "" -}; +private _actionName = (_parentPath deleteAt [-1]) param [0, ""]; [_parentPath, _actionName] diff --git a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf index b87f6133f35..f0b503437d5 100644 --- a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf @@ -23,7 +23,7 @@ if (!GVAR(addBuildingActions)) exitWith {}; //Ignore self-interaction menu: if (_interactionType != 0) exitWith {}; //Ignore when mounted: -if ((vehicle ACE_player) != ACE_player) exitWith {}; +if (!isNull objectParent ACE_player) exitWith {}; [{ params ["_args", "_pfID"]; diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 643b5448955..614cd3e0e06 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -109,7 +109,7 @@ class CfgVehicles { modifierFunction = QUOTE([ARR_3('YELLOW','PATHTOF(UI\team\team_white_ca.paa)',_this select 3)] call FUNC(modifyTeamManagementAction)); }; class ACE_AssignTeamMain { - displayName = "$str_assign_main"; + displayName = "$STR_assign_main"; condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam) && {assignedTeam _target != 'MAIN'}); statement = QUOTE([ARR_3(_target,'MAIN',true)] call DFUNC(joinTeam)); exceptions[] = {"isNotSwimming"}; @@ -164,7 +164,7 @@ class CfgVehicles { }; class GVAR(Gear) { displayName = "$STR_ACTION_GEAR"; - condition = QUOTE(!(lifeState _target in [ARR_2('HEALTHY','INJURED')]) && {isNull objectParent _target}); + condition = QUOTE(!(_target call EFUNC(common,isAwake)) && {isNull objectParent _target}); statement = QUOTE(_player action [ARR_2(QUOTE(QUOTE(Gear)),_target)]); icon = "\A3\ui_f\data\igui\cfg\actions\gear_ca.paa"; }; @@ -256,7 +256,7 @@ class CfgVehicles { class ACE_remoteTeamManagement { displayName = CSTRING(Squad); icon = QPATHTOF(UI\team\team_management_ca.paa); - condition = QUOTE(GVAR(remoteTeamManagement)); + condition = QUOTE(GVAR(remoteTeamManagement) && {_player == leader _player}); exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"}; insertChildren = QUOTE(call FUNC(addSquadChildren)); }; diff --git a/addons/interaction/RscTitles.hpp b/addons/interaction/RscTitles.hpp index ec7856c62cb..4d445ad9cd4 100644 --- a/addons/interaction/RscTitles.hpp +++ b/addons/interaction/RscTitles.hpp @@ -13,8 +13,8 @@ class ACE_Interaction_Button_Base { style = 2; x = 0; y = 0; - w = "2.0 / 16 * safezoneW"; - h = "0.3 / 9 * safezoneH"; + w = "2.0 / 16 * safeZoneW"; + h = "0.3 / 9 * safeZoneH"; offsetX = 0.003; offsetY = 0.003; @@ -43,92 +43,6 @@ class RscText; class RscPicture; class RscControlsGroupNoScrollbars; -#define X_OFFSET 0.2 - -class RscACE_SelectAnItem { - idd = 8854; - movingEnable = 0; - - class controls { - class back: IGUIBack { - x = X_OFFSET; - y = 0; - w = 0.6; - h = 0.71; - colorBackground[] = {0, 0, 0, 0.2}; - }; - class header: RscText { - idc = 8870; - x = QUOTE(X_OFFSET + 0.005); - y = 0.005; - w = 0.59; - h = 0.05; - style = 0x02; - text = ""; - }; - class itemList: RscListBox { - onMouseButtonDblClick = QUOTE(_this call DFUNC(onSelectMenuDblClick)); - idc = 8866; - x = QUOTE(X_OFFSET + 0.005); - w = 0.59; - h = 0.54; - y = 0.06; - }; - - class cancelBtnBackground: ACE_Interaction_Button_Base { - type = 0; - style = 2; - idc = -1; - colorBackground[] = {0,0,0,0.5}; - colorBackgroundDisabled[] = {0,0,0,0.5}; - x = QUOTE(X_OFFSET + 0.005); - w = 0.15; - h = 0.1; - y = 0.605; - }; - class approveBtnBackground: ACE_Interaction_Button_Base { - type = 0; - style = 2; - idc = -1; - colorBackground[] = {0,0,0,0.5}; - colorBackgroundDisabled[] = {0,0,0,0.5}; - x = QUOTE(X_OFFSET + 0.445); - y = 0.605; - h = 0.1; - w = 0.15; - }; - - class cancelBtn: ACE_Interaction_Button_Base { - idc = 8855; - x = QUOTE(X_OFFSET + 0.005); - w = 0.15; - h = 0.1; - y = 0.605; - style = 2; - text = CSTRING(Back); - action = QUOTE(call DFUNC(hideMenu)); //'Default' call DFUNC(openMenu); 'Default' call DFUNC(openMenuSelf); - colorBackground[] = {0,0,0,0}; - colorBackgroundDisabled[] = {0,0,0,0}; - colorBackgroundActive[] = {1,1,1,0.2}; - colorFocused[] = {0,0,0,0}; - }; - class approveBtn: ACE_Interaction_Button_Base { - idc = 8860; - x = QUOTE(X_OFFSET + 0.445); - y = 0.605; - h = 0.1; - w = 0.15; - style = 2; - text = CSTRING(MakeSelection); - action = QUOTE(call DFUNC(hideMenu)); - colorBackground[] = {0,0,0,0}; - colorBackgroundDisabled[] = {0,0,0,0}; - colorBackgroundActive[] = {1,1,1,0.2}; - colorFocused[] = {0,0,0,0}; - }; - }; -}; - class RscTitles { class GVAR(RscMouseHint) { idd = IDD_MOUSEHINT; diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index dc1c167d7c1..2bf3546f591 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -180,7 +180,7 @@ private _action = [ nil, nil, nil, nil, nil, { params ["_target", "", "", "_actionData"]; - _actionData set [1, format [localize "STR_ACTION_TAKE_BAG", getText (configfile >> "CfgWeapons" >> weaponCargo _target select 0 >> "displayName")]]; + _actionData set [1, format [localize "STR_ACTION_TAKE_BAG", getText (configFile >> "CfgWeapons" >> weaponCargo _target select 0 >> "displayName")]]; } ] call EFUNC(interact_menu,createAction); diff --git a/addons/interaction/dev/initReplaceTerrainCursorObject.sqf b/addons/interaction/dev/initReplaceTerrainCursorObject.sqf index 3f71954acb5..6dadf678b7c 100644 --- a/addons/interaction/dev/initReplaceTerrainCursorObject.sqf +++ b/addons/interaction/dev/initReplaceTerrainCursorObject.sqf @@ -49,7 +49,7 @@ DFUNC(replaceTerrainModelsAdd) = { [{ private _object = cursorObject; - if (isNull _object) exitwith {}; + if (isNull _object) exitWith {}; [_object, true, nil, nil, nil, true] call EFUNC(dragging,setCarryable); [_object, true, nil, nil, nil, true] call EFUNC(dragging,setDraggable); diff --git a/addons/interaction/functions/fnc_canPassMagazine.sqf b/addons/interaction/functions/fnc_canPassMagazine.sqf index 97478bffa7c..9964cdaed9c 100644 --- a/addons/interaction/functions/fnc_canPassMagazine.sqf +++ b/addons/interaction/functions/fnc_canPassMagazine.sqf @@ -20,7 +20,7 @@ params ["_player", "_target", "_weapon"]; if (!GVAR(enableMagazinePassing)) exitWith {false}; if (_weapon isEqualTo "" || {!(_target call EFUNC(common,isAwake))}) exitWith {false}; -if (((vehicle _target) != _target) && {(vehicle _target) != (vehicle _player)}) exitWith {false}; +if ((!isNull objectParent _target) && {(vehicle _target) != (vehicle _player)}) exitWith {false}; private _compatibleMags = [_weapon] call CBA_fnc_compatibleMagazines; diff --git a/addons/interaction/functions/fnc_doRemoteControl.sqf b/addons/interaction/functions/fnc_doRemoteControl.sqf index a2ec19b1801..d728190b3e3 100644 --- a/addons/interaction/functions/fnc_doRemoteControl.sqf +++ b/addons/interaction/functions/fnc_doRemoteControl.sqf @@ -13,6 +13,7 @@ * * Public: No */ +//IGNORE_PRIVATE_WARNING ["_target"]; private _units = curatorSelected select 0; private _index = _units findIf { diff --git a/addons/interaction/functions/fnc_getVehiclePos.sqf b/addons/interaction/functions/fnc_getVehiclePos.sqf index ce2ce9377b7..d90bc228d2d 100644 --- a/addons/interaction/functions/fnc_getVehiclePos.sqf +++ b/addons/interaction/functions/fnc_getVehiclePos.sqf @@ -14,7 +14,7 @@ * * Public: No */ -// IGNORE_PRIVATE_WARNING(_target); +//IGNORE_PRIVATE_WARNING ["_target"]; private _bb = boundingBoxReal _target; (_bb select 0) params ["_bbX", "_bbY", "_bbZ"]; diff --git a/addons/interaction/functions/fnc_getWeaponPos.sqf b/addons/interaction/functions/fnc_getWeaponPos.sqf index 85cb3dc0076..429a012ec4d 100644 --- a/addons/interaction/functions/fnc_getWeaponPos.sqf +++ b/addons/interaction/functions/fnc_getWeaponPos.sqf @@ -14,7 +14,7 @@ * * Public: No */ -// IGNORE_PRIVATE_WARNING(_target); +//IGNORE_PRIVATE_WARNING ["_target"]; private _weaponDir = _target weaponDirection currentWeapon _target; private _refSystem = _weaponDir call EFUNC(common,createOrthonormalReference); diff --git a/addons/interaction/functions/fnc_initAnimActions.sqf b/addons/interaction/functions/fnc_initAnimActions.sqf index 7f3cde8d9ec..e47f80008b8 100644 --- a/addons/interaction/functions/fnc_initAnimActions.sqf +++ b/addons/interaction/functions/fnc_initAnimActions.sqf @@ -125,7 +125,7 @@ private _statement = { if (!_success) exitWith {}; - _target animateSource [_anim, _phase, true]; + _target animate [_anim, _phase, true]; }, {}, _text, diff --git a/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf b/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf index eef77dfd37d..9eeda7ee3c4 100644 --- a/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf +++ b/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf @@ -20,7 +20,7 @@ params ["_target", "_player", "", "_actionData"]; -private _actionText = format ["%1: %2", localize LSTRING(JoinGroup), groupID group _target]; +private _actionText = format ["%1: %2", localize LSTRING(JoinGroup), groupId group _target]; TRACE_3("",_target,group _target,_actionText); _actionData set [1, _actionText]; diff --git a/addons/interaction/functions/fnc_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf index 11b9c67c918..f83cc88b1ec 100644 --- a/addons/interaction/functions/fnc_openDoor.sqf +++ b/addons/interaction/functions/fnc_openDoor.sqf @@ -89,9 +89,9 @@ GVAR(usedScrollWheel) = false; }; // this allows for holding the door in it's current state. - if (CBA_missionTime > _time && {diag_frameno > _frame}) then { + if (CBA_missionTime > _time && {diag_frameNo > _frame}) then { GVAR(usedScrollWheel) = true; }; // do incremental door opening {_house animate [_x, GVAR(doorTargetPhase)]} forEach _animations; -}, 0.1, [_house, _animations, getPosASL ACE_player, CBA_missionTime + 0.2, diag_frameno + 2, _door]] call CBA_fnc_addPerFrameHandler; +}, 0.1, [_house, _animations, getPosASL ACE_player, CBA_missionTime + 0.2, diag_frameNo + 2, _door]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/interaction/functions/fnc_passMagazine.sqf b/addons/interaction/functions/fnc_passMagazine.sqf index 87500785026..757700ce8ba 100644 --- a/addons/interaction/functions/fnc_passMagazine.sqf +++ b/addons/interaction/functions/fnc_passMagazine.sqf @@ -34,7 +34,7 @@ private _magToPassIndex = 0; _magToPass = _x; _magToPassIndex = _forEachIndex; }; -} foreach _filteredMags; +} forEach _filteredMags; //remove the magazine from _player and add it to _target _magToPass params ["_magToPassClassName", "_magToPassAmmoCount"]; diff --git a/addons/interaction/functions/fnc_renameGroup.sqf b/addons/interaction/functions/fnc_renameGroup.sqf index 4ffff5771a1..8ad606a1eb1 100644 --- a/addons/interaction/functions/fnc_renameGroup.sqf +++ b/addons/interaction/functions/fnc_renameGroup.sqf @@ -20,12 +20,12 @@ params [ ["_group", grpNull, [grpNull]], ["_newName", "", [""]] ]; -if (_newName isEqualTo (groupID _group)) exitWith {true}; +if (_newName isEqualTo (groupId _group)) exitWith {true}; private _lowerName = toLower _newName; // Case insensitive name search private _nameAlreadyTaken = allGroups findIf { side _x isEqualTo side _group - && {_lowerName isEqualTo toLower (groupID _x)} + && {_lowerName isEqualTo toLower (groupId _x)} && {_group != _x} } != -1; diff --git a/addons/interaction/functions/fnc_renameGroupUI.sqf b/addons/interaction/functions/fnc_renameGroupUI.sqf index 5d891b0cf8e..9e0973327da 100644 --- a/addons/interaction/functions/fnc_renameGroupUI.sqf +++ b/addons/interaction/functions/fnc_renameGroupUI.sqf @@ -21,7 +21,7 @@ private _display = findDisplay 46 createDisplay QGVAR(groupNameDisplay); private _textCtrl = _display displayCtrl 451; - _textCtrl ctrlSetText (groupID group _unit); + _textCtrl ctrlSetText (groupId group _unit); _display setVariable [QGVAR(renamedGroup), group _unit]; _display displayAddEventHandler ["Unload", { params ["_display", "_exitCode"]; diff --git a/addons/interaction/groupRename_GUI.hpp b/addons/interaction/groupRename_GUI.hpp index 20684b0e463..977b9b3efda 100644 --- a/addons/interaction/groupRename_GUI.hpp +++ b/addons/interaction/groupRename_GUI.hpp @@ -1,4 +1,4 @@ -#define FONT_H (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) +#define FONT_H (((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 1) #define FONT_W (FONT_H / pixelH * pixelW) #define GAP_W (pixelW * 2) #define GAP_H (pixelH * 2) diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 4fa6a8b36f2..35633463593 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -283,7 +283,7 @@ Csatlakozás a csoporthoz Unir-se ao grupo Unisciti alla squadra - グループに入る + グループに参加 그룹 참여 加入小队 加入小隊 @@ -373,7 +373,7 @@ TÁNC! DANCE! DANZA! - おどれ! + 踊ろう! 춤추기! 跳舞 跳舞 @@ -585,10 +585,20 @@ Remote Squad Management Gestion à distance de l'escouade + Дистанционное управление отрядом + 遠隔分隊管理 + 분대 원격 관리 + Gestione squadra da remoto + Gestión Remota de Escuadra Allow dropping and changing team colors of any unit in player's squad Permettre d'abandonner et de changer les couleurs de n'importe quelle unité de l'escouade du joueur + Позволяет сбрасывать и менять командные цвета любого подразделения в отряде игрока + プレイヤー分隊内の任意のユニットにチームからの脱退と色の変更を許可します + 플레이어 분대의 모든 유닛을 삭제하고 팀 색상 변경하는 것을 허용합니다. + Permetti di cambiare il colore o rimuovere una qualsiasi unità della propria squadra + Permite abandonar y cambiar el color del equipo de cualquier unidad en la escuadra del jugador Squad @@ -753,7 +763,7 @@ Присоединиться к Красной группе Rejoindre rouge Unirsi al team rosso - レッドに入る + レッドに参加 빨강에 참여 加入红组 加入紅組 @@ -770,7 +780,7 @@ Присоединиться к Зеленой группе Rejoindre vert Unirsi al team verde - グリーンに入る + グリーンに参加 초록에 참여 加入绿组 加入綠組 @@ -787,7 +797,7 @@ Присоединиться к Синей группе Rejoindre bleu Unirsi al team blu - ブルーに入る + ブルーに参加 파랑에 참여 加入蓝组 加入藍組 @@ -804,7 +814,7 @@ Присоединиться к Жёлтой группе Rejoindre jaune Unirsi al team giallo - イエローに入る + イエローに参加 노랑에 참여 加入黄组 加入黃組 @@ -821,6 +831,7 @@ Rejoindre Blanc Unirsi al team Bianco 백팀 참여 + ホワイトに参加 You joined Team %1 @@ -833,7 +844,7 @@ Você uniu-se à Equipe %1 Sei entrato nel team %1 Csatlakoztál a %1 csapathoz - チーム %1 に入りました + チーム %1 に参加しました 당신은 %1팀에 참여했습니다 你已加入%1组 你已加入%1組 @@ -1096,7 +1107,7 @@ Disable negative rating Negative Bewertung deaktivieren - 否定評価を無効化 + ネガティブな評価を無効化 Impedisci Valutazione Negativa 關閉負面評價 关闭负面评价 @@ -1111,7 +1122,7 @@ Should players receive negative rating? When enabled players are only receiving positive ratings which prevents friendly AI fire when destroying friendly equipment or killing team members. Sollen Spieler negative Bewertungen erhalten dürfen? Wenn diese Option aktiviert ist, erhalten Spieler nur positive Bewertungen, was Freundbeschuss durch KI verhindert, wenn befreundete Ausrüstung zerstört oder befreundete Einheiten von Spielern des selben Teams getötet werden. - 否定評価を受けますか?有効化した場合プレイヤーは肯定評価のみを受け、友軍の装備を壊したり殺害をしてもAIからの攻撃を防ぎます。 + プレイヤーはネガティブな評価を受けるべきですか? これを有効化すると、プレイヤーはポジティブな評価のみ受けるようになり、仮に味方の兵器を破壊したり、友軍兵士を殺害したとしても、友軍AI兵がプレイヤーに対して発砲するのを防ぐことができます。 I giocatori possono ricevere valutazioni negative? Se abilitato i giocatori riceveranno esclusivamente valutazioni positive, impedendo l'ingaggio da parte di IA alleate quando distruggono equipaggiamenti o uccidono alleati/civili. 玩家是否會收到負面評價? 當本功能開啟時玩家只會接收到正面評價,所以當玩家做出擊殺友軍AI、毀壞友軍裝備或殺害小隊夥伴都不會收到負面評價 玩家是否会收到负面评价? 当本功能开启时玩家只会接收到正面评价,所以当玩家做出击杀友军 AI、毁坏友军装备或杀害小队伙伴都不会收到负面评价。 @@ -1244,7 +1255,7 @@ Mostra l'interazione "passa caricatore" Mostrar "Pasar cargador" en el menú de interacción Montrer l'interaction "Passer un chargeur" - "弾倉を渡す"をインタラクションに表示 + 弾倉を渡すをインタラクションに表示 '탄창 건네기'를 상호작용에서 보여줌 显示"给予弹匣"互动动作 顯示"給予彈匣"互動動作 @@ -1273,7 +1284,7 @@ Выбить лобовое стекло Wyłam szybę Szélvédő széttörése - フロントガラスを破る + 風防を破る Sfonda il parabrezza Quebrar pára-brisa 踹開擋風玻璃 @@ -1365,21 +1376,36 @@ Взаимодействие с анимациями Interaction avec les animations 車両アニメーションベースのインタラクション + 애니메이션 있는 상호작용 + Interazione con animazioni + Interacción con animaciones Interact With Enemy Crew 敵乗員がいる状態でのインタラクト Interagir avec l'équipage ennemi + Взаимодействие с вражеским экипажем + 적 승무원과의 상호작용 + Interazioni con equipaggio nemico + Interactuar Con Tripulación Enemiga Limit some interactions on vehicles crewed by enemy factions. 敵性力の乗員が乗っている車両へのインタラクションを一部制限します。 Limiter certaines interactions sur les véhicules dont l'équipage appartient à des factions ennemies. + Ограничьте некоторые взаимодействия на транспортных средствах, управляемых вражеской стороной. + 적 진영이 탑승한 차량과의 일부 상호작용을 제한합니다. + Limita alcune interazioni su veicoli con nemici a bordo. + Limita algunas interacciones en vehículos tripulador por facciones enemigas. Allow for Static Weapons - 固定火器への許可 + 固定火器での許可 Autoriser les armes statiques + Разрешить использование статического оружия + 고정화기 허용 + Permetti con armi statiche + Permitir para Armas Estáticas diff --git a/addons/inventory/RscDisplayInventory.hpp b/addons/inventory/RscDisplayInventory.hpp index 91e68f5fb1c..06752dcfec5 100644 --- a/addons/inventory/RscDisplayInventory.hpp +++ b/addons/inventory/RscDisplayInventory.hpp @@ -17,13 +17,13 @@ class RscStructuredText; class RscActiveText; class RscCombo; -#define X_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)) -#define Y_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)) -#define W_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40)) -#define H_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)) +#define X_BIS(num) (num * (((safeZoneW / safeZoneH) min 1.2) / 40) + (safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2))/2)) +#define Y_BIS(num) (num * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2))/2)) +#define W_BIS(num) (num * (((safeZoneW / safeZoneH) min 1.2) / 40)) +#define H_BIS(num) (num * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)) -#define X_MAKEITBIGGA(num) (num * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)) -#define Y_MAKEITBIGGA(num) (num * (safeZoneH / 30) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)) +#define X_MAKEITBIGGA(num) (num * (safeZoneH / 40) + (safeZoneX + (safeZoneW - safeZoneH)/2)) +#define Y_MAKEITBIGGA(num) (num * (safeZoneH / 30) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2))/2)) #define W_MAKEITBIGGA(num) (num * (safeZoneH / 40)) #define H_MAKEITBIGGA(num) (num * (safeZoneH / 30)) diff --git a/addons/inventory/functions/fnc_forceItemListUpdate.sqf b/addons/inventory/functions/fnc_forceItemListUpdate.sqf index fb8f09b5c84..ede73b01519 100644 --- a/addons/inventory/functions/fnc_forceItemListUpdate.sqf +++ b/addons/inventory/functions/fnc_forceItemListUpdate.sqf @@ -29,9 +29,9 @@ private _itemKeyCache = uiNamespace getVariable QGVAR(itemKeyCache); private _backpackKeyCache = uiNamespace getVariable QGVAR(backpackKeyCache); private _config = configNull; -for "_i" from (lbSize _itemList) to 0 step -1 do { +for "_i" from (lbSize _itemList) - 1 to 0 step -1 do { // All items have their classnames in lbData, except backpacks - _className = _itemList lbData _i; + private _className = _itemList lbData _i; _config = if (_className != "") then { _itemKeyCache get _className diff --git a/addons/javelin/functions/fnc_getTarget.sqf b/addons/javelin/functions/fnc_getTarget.sqf index 6fd4686eb8d..926e400a18b 100644 --- a/addons/javelin/functions/fnc_getTarget.sqf +++ b/addons/javelin/functions/fnc_getTarget.sqf @@ -20,8 +20,8 @@ params ["_lastTarget", "_maxRange"]; scopeName "main"; -private _viewASL = AGLtoASL positionCameraToWorld [0,0,0]; -private _viewDir = _viewASL vectorFromTo (AGLtoASL positionCameraToWorld [0,0,1]); +private _viewASL = AGLToASL positionCameraToWorld [0,0,0]; +private _viewDir = _viewASL vectorFromTo (AGLToASL positionCameraToWorld [0,0,1]); // Attempt to lock onto current target if it is still valid if (!isNull _lastTarget) then { @@ -65,7 +65,7 @@ if ((cursorTarget isKindOf "AllVehicles") && {(cursorObject distance ace_player) // Attempt to scan using multiple rayscasts - This is expensive (n^2) and care should be given to balance accuracy vs speed for "_xOffset" from -14 to 14 step 2 do { for "_yOffset" from -12 to 12 step 4 do { - private _testPosASL = AGLtoASL (positionCameraToWorld [_xOffset, _yOffset, _maxRange]); + private _testPosASL = AGLToASL (positionCameraToWorld [_xOffset, _yOffset, _maxRange]); private _intersectionsToCursorTarget = lineIntersectsSurfaces [_viewASL, _testPosASL, ace_player, vehicle ace_player, true, 1]; // drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [[0,1,0,1], [1,0,0,1]] select (count _intersectionsToCursorTarget), (ASLtoAGL _testPosASL), 0.25, 0.25, 0, "", 0.5, 0.025, "TahomaB"]; if (_intersectionsToCursorTarget isNotEqualTo []) then { diff --git a/addons/javelin/functions/fnc_mapHelperDraw.sqf b/addons/javelin/functions/fnc_mapHelperDraw.sqf index 4f7ac84b4a6..e8b917a933e 100644 --- a/addons/javelin/functions/fnc_mapHelperDraw.sqf +++ b/addons/javelin/functions/fnc_mapHelperDraw.sqf @@ -25,7 +25,7 @@ if (isNil QGVAR(arguments)) then { _currentShooter setVariable ["ace_missileguidance_target", nil, false]; GVAR(arguments) = [ - diag_frameno, // Last run frame + diag_frameNo, // Last run frame objNull, // currentTargetObject 0, // Lock Start Time 0, // Next Sound timer @@ -37,7 +37,7 @@ if (isNil QGVAR(arguments)) then { [{ if (isNull (uiNamespace getVariable ["ACE_RscOptics_javelin", displayNull])) exitWith {true}; GVAR(arguments) params ["_lastRunFrame"]; - (diag_frameno < _lastRunFrame) || {diag_frameno > (_lastRunFrame + 1)} + (diag_frameNo < _lastRunFrame) || {diag_frameNo > (_lastRunFrame + 1)} }, { TRACE_1("old/null display - ending optic draw",_this); private _fireDisabledEH = GVAR(arguments) param [4, -1]; diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf index aacc4f5fa1f..9dfb7d2e484 100644 --- a/addons/javelin/functions/fnc_onOpticDraw.sqf +++ b/addons/javelin/functions/fnc_onOpticDraw.sqf @@ -53,7 +53,7 @@ if ((_ammoCount == 0) || // No ammo loaded __JavelinIGUISeek ctrlSetTextColor __ColorGray; _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire); - _this set [0, diag_frameno]; + _this set [0, diag_frameNo]; _this set [4, _fireDisabledEH]; // Fix weapon being in top-attack when loading AP magazine (https://feedback.bistudio.com/T171012) @@ -194,7 +194,7 @@ if (isNull _newTarget) then { }; // Save arguments for next run -_this set [0, diag_frameno]; +_this set [0, diag_frameNo]; _this set [1, _currentTarget]; _this set [2, _lockStartTime]; _this set [3, _soundNextPlayTime]; diff --git a/addons/javelin/functions/fnc_showFireMode.sqf b/addons/javelin/functions/fnc_showFireMode.sqf index 85ed9837185..89d55f98a38 100644 --- a/addons/javelin/functions/fnc_showFireMode.sqf +++ b/addons/javelin/functions/fnc_showFireMode.sqf @@ -14,11 +14,12 @@ * * Public: No */ +//IGNORE_PRIVATE_WARNING ["_currentShooter"]; // from upper scope -(if (((vehicle ACE_player) == ACE_player) || {ACE_player call CBA_fnc_canUseWeapon}) then { +(if ((isNull objectParent ACE_player) || {ACE_player call CBA_fnc_canUseWeapon}) then { weaponState ACE_player } else { - _turretPath = if (ACE_player == (driver _currentShooter)) then {[-1]} else {ACE_player call CBA_fnc_turretPath}; + private _turretPath = if (ACE_player == (driver _currentShooter)) then {[-1]} else {ACE_player call CBA_fnc_turretPath}; weaponState [vehicle ACE_player, _turretPath] }) params ["_weapon", "", "_mode"]; diff --git a/addons/javelin/script_component.hpp b/addons/javelin/script_component.hpp index 3e9ad4ebfc1..b5cf7bea3ce 100644 --- a/addons/javelin/script_component.hpp +++ b/addons/javelin/script_component.hpp @@ -18,7 +18,7 @@ // Javelin IGUI defines -#define __JavelinIGUI (uinamespace getVariable "ACE_RscOptics_javelin") +#define __JavelinIGUI (uiNamespace getVariable "ACE_RscOptics_javelin") // Custom controls #define __JavelinIGUITargeting (__JavelinIGUI displayCtrl 6999) diff --git a/addons/kestrel4500/RscTitles.hpp b/addons/kestrel4500/RscTitles.hpp index faae6a8f32b..ffb44de9132 100644 --- a/addons/kestrel4500/RscTitles.hpp +++ b/addons/kestrel4500/RscTitles.hpp @@ -64,7 +64,7 @@ class Kestrel4500_Display { SizeEX=0.025; idc=74000; style=48; - x="safezoneX"; + x="safeZoneX"; y = DIALOG_SAFE_Y(0); w="1.024"; h="1.024*4/3"; @@ -74,7 +74,7 @@ class Kestrel4500_Display { }; class POWER: Kestrel4500_RscButton { idc=-1; - x="safezoneX+0.385"; + x="safeZoneX+0.385"; y = DIALOG_SAFE_Y(1.125); w="0.042"; h="0.042*4/3"; @@ -83,7 +83,7 @@ class Kestrel4500_Display { }; class ENTER: POWER { idc=-1; - x="safezoneX+0.46"; + x="safeZoneX+0.46"; y = DIALOG_SAFE_Y(1.0); w=0.1; action=QUOTE(0 call FUNC(buttonPressed)); @@ -91,7 +91,7 @@ class Kestrel4500_Display { }; class TOP: Kestrel4500_RscButton { idc=-1; - x="safezoneX+0.46"; + x="safeZoneX+0.46"; y = DIALOG_SAFE_Y(0.93); w=0.1; h=0.03; @@ -106,7 +106,7 @@ class Kestrel4500_Display { }; class LEFT: Kestrel4500_RscButton { idc=-1; - x="safezoneX+0.4"; + x="safeZoneX+0.4"; y = DIALOG_SAFE_Y(0.97); w=0.046; h=0.11; @@ -115,13 +115,13 @@ class Kestrel4500_Display { }; class RIGHT: LEFT { idc=-1; - x="safezoneX+0.58"; + x="safeZoneX+0.58"; action=QUOTE(4 call FUNC(buttonPressed)); onMouseButtonDown = "playSound 'kestrel4500_right_button_click'"; }; class MEMORY: Kestrel4500_RscButton { idc=-1; - x="safezoneX+0.395"; + x="safeZoneX+0.395"; y = DIALOG_SAFE_Y(0.87); w=0.05; h="0.045*4/3"; @@ -129,13 +129,13 @@ class Kestrel4500_Display { }; class BACKLIGHT: MEMORY { idc=-1; - x="safezoneX+0.585"; + x="safeZoneX+0.585"; action=QUOTE(6 call FUNC(buttonPressed)); }; class TEXT_TOP: Kestrel4500_RscText { idc=74100; - x="safezoneX+0.40"; + x="safeZoneX+0.40"; y = DIALOG_SAFE_Y(0.58); w=0.22; h=0.04; @@ -236,7 +236,7 @@ class RscTitles { font="TahomaB"; SizeEX=".025*0.75"; style=48; - x="safezoneX+0.14"; + x="safeZoneX+0.14"; y = DISPLAY_SAFE_Y(0); w="0.512*0.75"; h="1.024*4/3*0.75"; @@ -246,7 +246,7 @@ class RscTitles { }; class RscTextTop: Kestrel4500_RscText { idc=75100; - x="safezoneX-0.05+0.40*0.75"; + x="safeZoneX-0.05+0.40*0.75"; y = DISPLAY_SAFE_Y(0.58*0.75); w="0.22*0.75"; h="0.04*0.75"; diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index 59bb3056dd1..1aeac9a182a 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -89,7 +89,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { private _monthString = localize (["str_january","str_february","str_march","str_april","str_may","str_june","str_july","str_august","str_september","str_october","str_november","str_december"] select (_month - 1)); _textTop = _dayString; _textCenter = format["%1 %2 %3", _day, _monthString, _year]; - _textBottomBig = [daytime, "HH:MM:SS"] call bis_fnc_timeToString; + _textBottomBig = [dayTime, "HH:MM:SS"] call bis_fnc_timeToString; }; case 1: { // Direction if (!GVAR(MinAvgMax)) then { @@ -105,7 +105,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 2: { // Wind SPD if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_windSpeed * 10) / 10); + _textCenterBig = str(round(_windSpeed * 10) / 10); } else { _textCenterLine1Left = "Max"; _textCenterLine2Left = "Avg"; @@ -116,13 +116,13 @@ if (GVAR(referenceHeadingMenu) == 0) then { _textInfoLine2 = "- average"; }; case 1: { - _textCenterLine1Right = Str(round((GVAR(Max) select 2) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 2) / (GVAR(Entries) select 2) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Max) select 2) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 2) / (GVAR(Entries) select 2) * 10) / 10); _textInfoLine2 = "- stop"; }; case 2: { - _textCenterLine1Right = Str(round((GVAR(Max) select 2) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 2) / (GVAR(Entries) select 2) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Max) select 2) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 2) / (GVAR(Entries) select 2) * 10) / 10); _textInfoLine2 = "- clear"; }; }; @@ -131,10 +131,10 @@ if (GVAR(referenceHeadingMenu) == 0) then { case 3: { // CROSSWIND if (!GVAR(MinAvgMax)) then { if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - _textCenterBig = Str(round(abs(sin(GVAR(RefHeading) - _playerDir) * _windSpeed) * 10) / 10); + _textCenterBig = str(round(abs(sin(GVAR(RefHeading) - _playerDir) * _windSpeed) * 10) / 10); _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_playerDir)]; } else { - _textCenterBig = Str(round(abs(sin(GVAR(RefHeading) - _windDir) * _windSpeed) * 10) / 10); + _textCenterBig = str(round(abs(sin(GVAR(RefHeading) - _windDir) * _windSpeed) * 10) / 10); _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(180 + _windDir)]; }; _textInfoLine2 = "- set heading"; @@ -148,13 +148,13 @@ if (GVAR(referenceHeadingMenu) == 0) then { _textInfoLine2 = "- average"; }; case 1: { - _textCenterLine1Right = Str(round((GVAR(Max) select 3) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 3) / (GVAR(Entries) select 3) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Max) select 3) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 3) / (GVAR(Entries) select 3) * 10) / 10); _textInfoLine2 = "- stop"; }; case 2: { - _textCenterLine1Right = Str(round((GVAR(Max) select 3) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 3) / (GVAR(Entries) select 3) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Max) select 3) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 3) / (GVAR(Entries) select 3) * 10) / 10); _textInfoLine2 = "- clear"; }; }; @@ -163,10 +163,10 @@ if (GVAR(referenceHeadingMenu) == 0) then { case 4: { // HEADWIND if (!GVAR(MinAvgMax)) then { if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - _textCenterBig = Str(round(cos(GVAR(RefHeading) - _playerDir) * _windSpeed * 10) / 10); + _textCenterBig = str(round(cos(GVAR(RefHeading) - _playerDir) * _windSpeed * 10) / 10); _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_playerDir)]; } else { - _textCenterBig = Str(round(-cos(GVAR(RefHeading) - _windDir) * _windSpeed * 10) / 10); + _textCenterBig = str(round(-cos(GVAR(RefHeading) - _windDir) * _windSpeed * 10) / 10); _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(180 + _windDir)]; }; _textInfoLine2 = "- set heading"; @@ -180,13 +180,13 @@ if (GVAR(referenceHeadingMenu) == 0) then { _textInfoLine2 = "- average"; }; case 1: { - _textCenterLine1Right = Str(round((GVAR(Max) select 4) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 4) / (GVAR(Entries) select 4) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Max) select 4) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 4) / (GVAR(Entries) select 4) * 10) / 10); _textInfoLine2 = "- stop"; }; case 2: { - _textCenterLine1Right = Str(round((GVAR(Max) select 4) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 4) / (GVAR(Entries) select 4) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Max) select 4) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 4) / (GVAR(Entries) select 4) * 10) / 10); _textInfoLine2 = "- clear"; }; }; @@ -194,124 +194,124 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 5: { // TEMP if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_temperature * 10) / 10); + _textCenterBig = str(round(_temperature * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 5) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 5) / (GVAR(Entries) select 5) * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 5) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 5) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 5) / (GVAR(Entries) select 5) * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 5) * 10) / 10); }; }; case 6: { // CHILL if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_chill * 10) / 10); + _textCenterBig = str(round(_chill * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 6) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 6) / (GVAR(Entries) select 6) * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 6) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 6) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 6) / (GVAR(Entries) select 6) * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 6) * 10) / 10); }; }; case 7: { // HUMIDITY if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_humidity * 100 * 10) / 10); + _textCenterBig = str(round(_humidity * 100 * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 7) * 100 * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 7) / (GVAR(Entries) select 7) * 100 * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 7) * 100 * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 7) * 100 * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 7) / (GVAR(Entries) select 7) * 100 * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 7) * 100 * 10) / 10); }; }; case 8: { // HEAT INDEX if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_heatIndex * 10) / 10); + _textCenterBig = str(round(_heatIndex * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 8) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 8) / (GVAR(Entries) select 8) * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 8) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 8) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 8) / (GVAR(Entries) select 8) * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 8) * 10) / 10); }; }; case 9: { // DEW POINT if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_dewPoint * 10) / 10); + _textCenterBig = str(round(_dewPoint * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 9) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 9) / (GVAR(Entries) select 9) * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 9) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 9) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 9) / (GVAR(Entries) select 9) * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 9) * 10) / 10); }; }; case 10: { // WET BULB if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_wetBulb * 10) / 10); + _textCenterBig = str(round(_wetBulb * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 10) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 10) / (GVAR(Entries) select 10) * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 10) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 10) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 10) / (GVAR(Entries) select 10) * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 10) * 10) / 10); }; }; case 11: { // BARO if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_barometricPressure * 10) / 10); + _textCenterBig = str(round(_barometricPressure * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round((GVAR(Min) select 11) * 10) / 10); - _textCenterLine2Right = Str(round((GVAR(Total) select 11) / (GVAR(Entries) select 11) * 10) / 10); - _textCenterLine3Right = Str(round((GVAR(Max) select 11) * 10) / 10); + _textCenterLine1Right = str(round((GVAR(Min) select 11) * 10) / 10); + _textCenterLine2Right = str(round((GVAR(Total) select 11) / (GVAR(Entries) select 11) * 10) / 10); + _textCenterLine3Right = str(round((GVAR(Max) select 11) * 10) / 10); }; }; case 12: { // ALTITUDE if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(EGVAR(common,mapAltitude) + _playerAltitude)); + _textCenterBig = str(round(EGVAR(common,mapAltitude) + _playerAltitude)); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round(GVAR(Min) select 12)); - _textCenterLine2Right = Str(round((GVAR(Total) select 12) / (GVAR(Entries) select 12))); - _textCenterLine3Right = Str(round(GVAR(Max) select 12)); + _textCenterLine1Right = str(round(GVAR(Min) select 12)); + _textCenterLine2Right = str(round((GVAR(Total) select 12) / (GVAR(Entries) select 12))); + _textCenterLine3Right = str(round(GVAR(Max) select 12)); }; }; case 13: { // DENSITY ALTITUDE if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_densityAltitude)); + _textCenterBig = str(round(_densityAltitude)); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; _textCenterLine3Left = "Max"; - _textCenterLine1Right = Str(round(GVAR(Min) select 13)); - _textCenterLine2Right = Str(round((GVAR(Total) select 13) / (GVAR(Entries) select 13))); - _textCenterLine3Right = Str(round(GVAR(Max) select 13)); + _textCenterLine1Right = str(round(GVAR(Min) select 13)); + _textCenterLine2Right = str(round((GVAR(Total) select 13) / (GVAR(Entries) select 13))); + _textCenterLine3Right = str(round(GVAR(Max) select 13)); }; }; case 14: { // User Screen 1 - _textCenterLine1Left = Str(round(_playerDir)); - _textCenterLine2Left = Str(round(EGVAR(common,mapAltitude) + _playerAltitude)); - _textCenterLine3Left = Str(round(abs(_windSpeed) * 10) / 10); + _textCenterLine1Left = str(round(_playerDir)); + _textCenterLine2Left = str(round(EGVAR(common,mapAltitude) + _playerAltitude)); + _textCenterLine3Left = str(round(abs(_windSpeed) * 10) / 10); _textCenterLine1Right = GVAR(Directions) select GVAR(Direction); _textCenterLine2Right = "m"; _textCenterLine3Right = "m/s"; }; case 15: { // User Screen 2 - _textCenterLine1Left = Str(round(_temperature * 10) / 10); - _textCenterLine2Left = Str(round(_humidity * 100 * 10) / 10); - _textCenterLine3Left = Str(round((_playerAltitude call EFUNC(weather,calculateBarometricPressure)) * 10) / 10); + _textCenterLine1Left = str(round(_temperature * 10) / 10); + _textCenterLine2Left = str(round(_humidity * 100 * 10) / 10); + _textCenterLine3Left = str(round((_playerAltitude call EFUNC(weather,calculateBarometricPressure)) * 10) / 10); _textCenterLine1Right = "C"; _textCenterLine2Right = "%"; _textCenterLine3Right = "hPA"; @@ -322,7 +322,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { switch (GVAR(referenceHeadingMenu)) do { case 1: { _textCenterLine1 = "MAGNETIC HEADING"; - _textCenterLine2 = Str(round(GVAR(RefHeading))); + _textCenterLine2 = str(round(GVAR(RefHeading))); _textCenterLine3 = "Auto Set "; _textCenterLine4 = "Manual Set "; _textCenterLine5 = "================"; @@ -330,7 +330,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 2: { _textCenterLine1 = "MAGNETIC HEADING"; - _textCenterLine2 = Str(round(_playerDir)); + _textCenterLine2 = str(round(_playerDir)); _textCenterLine3 = "Point Down the"; _textCenterLine4 = "Runway or Range"; _textCenterLine5 = "================"; @@ -338,7 +338,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 3: { _textCenterLine1 = "MAGNETIC HEADING"; - _textCenterLine2 = Str(round(GVAR(TmpHeading))); + _textCenterLine2 = str(round(GVAR(TmpHeading))); _textCenterLine3 = "Press < and >"; _textCenterLine4 = "to Adjust"; _textCenterLine5 = "================"; diff --git a/addons/killtracker/XEH_postInit.sqf b/addons/killtracker/XEH_postInit.sqf index 35050d1dc30..bf944c930e0 100644 --- a/addons/killtracker/XEH_postInit.sqf +++ b/addons/killtracker/XEH_postInit.sqf @@ -16,7 +16,7 @@ * Public: No */ -if ((getText (missionconfigfile >> "CfgDebriefingSections" >> QUOTE(XADDON) >> "variable")) != QXGVAR(outputText)) exitWith { +if ((getText (missionConfigFile >> "CfgDebriefingSections" >> QUOTE(XADDON) >> "variable")) != QXGVAR(outputText)) exitWith { TRACE_1("no mission debriefing config",_this); }; @@ -65,7 +65,7 @@ GVAR(killCount) = 0; private _killInfo = []; if (!isNull _killer) then { - if !(_killer isKindof "CAManBase") then { // If killer is a vehicle log the vehicle type + if !(_killer isKindOf "CAManBase") then { // If killer is a vehicle log the vehicle type _killInfo pushBack format [LLSTRING(Vehicle), getText ((configOf _killer) >> "displayName")]; }; if (isNull _instigator) then { diff --git a/addons/killtracker/stringtable.xml b/addons/killtracker/stringtable.xml index 9ab1423f1f5..fe3fae44863 100644 --- a/addons/killtracker/stringtable.xml +++ b/addons/killtracker/stringtable.xml @@ -127,6 +127,7 @@ 車両でのキルを乗員全員に表示する 다른 승무원에게 차량 처치 표시 Montrer les véhicules tués aux membres de l'équipage + Mostrar bajas provocadas por el vehículo a otros miembros de la tripulación Show kills from a vehicle to driver, gunner and commander @@ -136,6 +137,7 @@ 車両でのキルを操縦手、砲手、車長で共有して表示する 차량 처치를 운전수, 사수, 지휘관에게 보여줍니다 Montrer les véhicules tués au pilote, à l'artilleur et au commandant. + Muestra las bajas de un vehículo al conductor, artillero y comandante diff --git a/addons/laser/RscTitles.hpp b/addons/laser/RscTitles.hpp index 7421246181b..c63b601ab77 100644 --- a/addons/laser/RscTitles.hpp +++ b/addons/laser/RscTitles.hpp @@ -9,10 +9,10 @@ class RscTitles { class controls { class ModeControlGroup: RscControlsGroupNoScrollbars { idc = IDC_MODECONTROLGROUP; - x = "3.8 * (((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable ['IGUI_GRID_WEAPON_X',((safezoneX + safezoneW) - (10 * (((safezoneW / safezoneH) min 1.2) / 40)) - 4.3 * (((safezoneW / safezoneH) min 1.2) / 40))])"; - y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getVariable ['IGUI_GRID_WEAPON_Y', (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])"; - w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "3.8 * (((safeZoneW / safeZoneH) min 1.2) / 40) + (profilenamespace getvariable ['IGUI_GRID_WEAPON_X',((safeZoneX + safeZoneW) - (10 * (((safeZoneW / safeZoneH) min 1.2) / 40)) - 4.3 * (((safeZoneW / safeZoneH) min 1.2) / 40))])"; + y = "2.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) + (profilenamespace getVariable ['IGUI_GRID_WEAPON_Y', (safeZoneY + 0.5 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25))])"; + w = "10 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; class controls { class AttackMode: RscText { @@ -21,29 +21,29 @@ class RscTitles { colorBackground[] = {0, 0, 0, 0}; x = "0"; y = "0"; - w = "(2.6) * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "(2.6) * (((safeZoneW / safeZoneH) min 1.2) / 40)"; + h = "1 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + sizeEx = "0.8 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; class LaserCode: RscText { idc = IDC_LASERCODE; colorText[] = {1, 1, 1, 1}; colorBackground[] = {0, 0, 0, 0}; - x = "(3.6) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "(3.6) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; y = "0"; - w = "(2.5) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - h = "(1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "(2.5) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + h = "(1) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + sizeEx = "0.8 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; class LaserIcon: RscPictureKeepAspect { idc = IDC_LASERICON; colorText[] = {1, 0, 0, 1}; colorBackground[] = {0, 0, 0, 0}; text = "\a3\Ui_F_Curator\Data\CfgCurator\laser_ca.paa"; - x = "(6.1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + x = "(6.1) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; y = "0"; - w = "(1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - h = "(1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "(1) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; + h = "(1) * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; }; }; }; diff --git a/addons/laser/XEH_postInit.sqf b/addons/laser/XEH_postInit.sqf index 768752bee2e..3e9274f5fb7 100644 --- a/addons/laser/XEH_postInit.sqf +++ b/addons/laser/XEH_postInit.sqf @@ -21,10 +21,10 @@ if (hasInterface) then { ["ACE_controlledUAV", { params ["_UAV", "_seatAI", "_turret", "_position"]; TRACE_4("ACE_controlledUAV EH",_UAV,_seatAI,_turret,_position); - if (!isNull _seatAI) then { - [_seatAI] call FUNC(showVehicleHud); - } else { + if (isNull _seatAI) then { [ace_player] call FUNC(showVehicleHud); + } else { + [_seatAI] call FUNC(showVehicleHud); }; }] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler; @@ -69,7 +69,6 @@ if (hasInterface) then { _unit setVariable [QGVAR(laserSpotTrackerOn), false]; private _condition = { - //IGNORE_PRIVATE_WARNING ["_target", "_player"]; (_player == driver _target) && {(_target getVariable [QGVAR(laserSpotTrackerOn), false])} && {[_player, _target, []] call EFUNC(common,canInteractWith)} @@ -78,7 +77,6 @@ if (hasInterface) then { [_unit, 1, ["ACE_SelfActions"], _actionOff] call EFUNC(interact_menu,addActionToObject); private _condition = { - //IGNORE_PRIVATE_WARNING ["_target", "_player"]; (_player == driver _target) && {!(_target getVariable [QGVAR(laserSpotTrackerOn), false])} && {[_player, _target, []] call EFUNC(common,canInteractWith)} diff --git a/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf b/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf index 4c57a613252..29598710a89 100644 --- a/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf +++ b/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf @@ -35,15 +35,14 @@ private _testSeekerDir = vectorDirVisual _seekerVehicle; private _resultPos = _results select 0; if (!isNil "_resultPos") then { // Draw lock results - drawLine3D [ASLtoAGL _testSeekerPosASL, ASLtoAGL _resultPos, [0,0,1,1]]; - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [0,0,1,1], (ASLtoAGL _resultPos), 1.5, 1.5, 45, format ["%1 from %2", _code, _results select 1], 0.5, 0.025, "TahomaB"]; + drawLine3D [ASLToAGL _testSeekerPosASL, ASLToAGL _resultPos, [0,0,1,1]]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [0,0,1,1], (ASLToAGL _resultPos), 1.5, 1.5, 45, format ["%1 from %2", _code, _results select 1], 0.5, 0.025, "TahomaB"]; }; } forEach [ACE_DEFAULT_LASER_CODE, 1688]; // Scan at codes 1111 and 1688 // Draw all lasers { - //IGNORE_PRIVATE_WARNING ["_x", "_y]; // TRACE_2("",_x,_y); _y params ["_obj", "_owner", "_laserMethod", "_waveLength", "_laserCode", "_beamSpread"]; @@ -51,29 +50,29 @@ private _testSeekerDir = vectorDirVisual _seekerVehicle; if (_laserMethod isEqualTo QFUNC(findLaserSource)) then { // Normal vanilla laserTarget func private _targetObject = _obj getVariable [QGVAR(targetObject), objNull]; private _targetPosASL = getPosASL _targetObject; - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLtoAGL _targetPosASL), 0.5, 0.5, 0, "", 0.5, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLToAGL _targetPosASL), 0.5, 0.5, 0, "", 0.5, 0.025, "TahomaB"]; (_y call FUNC(findLaserSource)) params ["_laserPosASL", "_laserDir"]; private _resultsRay = [_laserPosASL, _laserDir, _obj] call FUNC(shootRay); private _rayPos = _resultsRay select 0; if (isNil "_rayPos") then { - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLtoAGL _targetPosASL), 2, 2, 0, "Nil Ray", 0.5, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLToAGL _targetPosASL), 2, 2, 0, "Nil Ray", 0.5, 0.025, "TahomaB"]; } else { private _diff = _rayPos vectorDistance (getPosASL _targetObject); // Diff from ray position compared to actual - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLtoAGL _rayPos), 2, 2, 0, format ["Diff %1",_diff], 0.5, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLToAGL _rayPos), 2, 2, 0, format ["Diff %1",_diff], 0.5, 0.025, "TahomaB"]; }; }; // Draw array weapon lasers [YELLOW] if ((_laserMethod isEqualType []) && {(count _laserMethod) == 2}) then { _laserMethod params ["_modelPosition", "_weaponName"]; private _laserPosASL = _obj modelToWorldVisualWorld _modelPosition; - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,1,0,1], (ASLtoAGL _laserPosASL), 0.5, 0.5, 0, _weaponName, 0.5, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,1,0,1], (ASLToAGL _laserPosASL), 0.5, 0.5, 0, _weaponName, 0.5, 0.025, "TahomaB"]; private _laserDir = _obj weaponDirection _weaponName; private _resultsRay = [_laserPosASL, _laserDir, _obj] call FUNC(shootRay); private _rayPos = _resultsRay select 0; if (!isNil "_rayPos") then { - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,1,0,1], (ASLtoAGL _rayPos), 2, 2, 0, _weaponName, 0.5, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,1,0,1], (ASLToAGL _rayPos), 2, 2, 0, _weaponName, 0.5, 0.025, "TahomaB"]; }; }; } forEach GVAR(laserEmitters); diff --git a/addons/laser/functions/fnc_handleLaserTargetCreation.sqf b/addons/laser/functions/fnc_handleLaserTargetCreation.sqf index f7db74793fb..4d5a7164b75 100644 --- a/addons/laser/functions/fnc_handleLaserTargetCreation.sqf +++ b/addons/laser/functions/fnc_handleLaserTargetCreation.sqf @@ -22,13 +22,13 @@ TRACE_1("params",_this); // Only handle locally created lasers if(!(local _targetObject)) exitWith {TRACE_1("not local",_targetObject);}; - private _owners = allUnits select {(lasertarget _x) == _targetObject}; + private _owners = allUnits select {(laserTarget _x) == _targetObject}; if (count _owners == 1) exitWith { TRACE_2("Laser target owner [allUnits]",_targetObject,_owners select 0); [_targetObject, _owners select 0] call FUNC(addLaserTarget); }; - _owners = vehicles select {(lasertarget _x) == _targetObject}; + _owners = vehicles select {(laserTarget _x) == _targetObject}; if (count _owners == 1) exitWith { TRACE_2("Laser target owner [vehicles]",_targetObject,_owners select 0); [_targetObject, _owners select 0] call FUNC(addLaserTarget); diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf index a14b3a8b183..fc6241a451b 100644 --- a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf +++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf @@ -178,7 +178,6 @@ if (_spots isNotEqualTo []) then { private _maxOwnerCount = -1; { - //IGNORE_PRIVATE_WARNING ["_x", "_y"]; _y params ["_count", "_owner"]; if (_count > _maxOwnerCount) then { _maxOwnerCount = _count; @@ -192,10 +191,10 @@ END_COUNTER(seekerFindLaserSpot); #ifdef DRAW_LASER_INFO if (isNil "_finalPos") then { - drawIcon3D ["\A3\ui_f\data\map\vehicleicons\iconMan_ca.paa", [0.9,1,0,1], (ASLtoAGL _posASL), 1, 1, 0, format ["Seeker: %1", _seekerCode], 0.5, 0.025, "TahomaB"]; + drawIcon3D ["\A3\ui_f\data\map\vehicleicons\iconMan_ca.paa", [0.9,1,0,1], (ASLToAGL _posASL), 1, 1, 0, format ["Seeker: %1", _seekerCode], 0.5, 0.025, "TahomaB"]; } else { - drawIcon3D ["\A3\ui_f\data\map\vehicleicons\iconManAT_ca.paa", [0.5,1,0,1], (ASLtoAGL _posASL), 1, 1, 0, format ["Seeker: %1", _seekerCode], 0.5, 0.025, "TahomaB"]; - drawLine3D [ASLtoAGL _posASL, ASLtoAGL _finalPos, [0.5,1,0,1]]; + drawIcon3D ["\A3\ui_f\data\map\vehicleicons\iconManAT_ca.paa", [0.5,1,0,1], (ASLToAGL _posASL), 1, 1, 0, format ["Seeker: %1", _seekerCode], 0.5, 0.025, "TahomaB"]; + drawLine3D [ASLToAGL _posASL, ASLToAGL _finalPos, [0.5,1,0,1]]; }; #endif diff --git a/addons/laser/functions/fnc_shootRay.sqf b/addons/laser/functions/fnc_shootRay.sqf index 862e972dd1b..9b8341909c3 100644 --- a/addons/laser/functions/fnc_shootRay.sqf +++ b/addons/laser/functions/fnc_shootRay.sqf @@ -48,8 +48,8 @@ TRACE_3("",_resultPos,_distance,_intersects); #ifdef DRAW_LASER_INFO if (!isNil "_resultPos") then { private _text = [_distance, 4, 0] call CBA_fnc_formatNumber; - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0, 1, 0, 1], ASLtoAGL _resultPos, 0.5, 0.5, 0, _text, 0.4, 0.025, "TahomaB"]; - drawLine3D [ASLtoAGL _posASL, ASLtoAGL _resultPos, [0,1,0,1]]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0, 1, 0, 1], ASLToAGL _resultPos, 0.5, 0.5, 0, _text, 0.4, 0.025, "TahomaB"]; + drawLine3D [ASLToAGL _posASL, ASLToAGL _resultPos, [0,1,0,1]]; }; #endif diff --git a/addons/laser/functions/fnc_showVehicleHud.sqf b/addons/laser/functions/fnc_showVehicleHud.sqf index 35120a294d6..856030bf8cb 100644 --- a/addons/laser/functions/fnc_showVehicleHud.sqf +++ b/addons/laser/functions/fnc_showVehicleHud.sqf @@ -68,7 +68,7 @@ GVAR(pfID) = [{ if (_adjustDown) then { private _ctrl = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_MODECONTROLGROUP; private _pos = ctrlPosition _ctrl; - _pos set [1, (_pos select 1) + ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)]; + _pos set [1, (_pos select 1) + ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)]; _ctrl ctrlSetPosition _pos; _ctrl ctrlCommit 0; }; diff --git a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf index 2176793aed5..8b44f7be5a6 100644 --- a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf @@ -63,7 +63,7 @@ if !(_unit call EFUNC(common,isSwimming)) then { !isNull _fence && {damage _fence < 1} - && {HAS_WIRECUTTER(_player)} + && {HAS_WIRECUTTER(_unit)} }, ["isNotSwimming"] ] call EFUNC(common,progressBar); diff --git a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf index 6f5b3218b01..2e33601ccea 100644 --- a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf +++ b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf @@ -23,7 +23,7 @@ params ["_interactionType"]; // If player somehow gets a wirecutter during keyDown, they will just have to reopen menu if ( _interactionType != 0 - || {vehicle ACE_player != ACE_player} + || {!isNull objectParent ACE_player} || {!HAS_WIRECUTTER(ACE_player)} ) exitWith {}; diff --git a/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf b/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf index 4782aba8406..6864726e1ef 100644 --- a/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf +++ b/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf @@ -26,7 +26,6 @@ _arrayOfAmmoCounts = +_arrayOfAmmoCounts; _arrayOfAmmoCounts sort true; private _fnc_newMag = { - //IGNORE_PRIVATE_WARNING ["_time", "_events"]; _time = _time + GVAR(TimePerMagazine); _events pushBack [_time, false, +_arrayOfAmmoCounts]; }; diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 12faeb07c07..42d110f1338 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -10,8 +10,8 @@ #define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD // MINIMAL required version for the Mod. Components can specify others.. -#define REQUIRED_VERSION 2.14 -#define REQUIRED_CBA_VERSION {3,16,0} +#define REQUIRED_VERSION 2.18 +#define REQUIRED_CBA_VERSION {3,18,0} #ifndef COMPONENT_BEAUTIFIED #define COMPONENT_BEAUTIFIED COMPONENT diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index 75b323ede34..6917de82b96 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,4 +1,4 @@ #define MAJOR 3 -#define MINOR 17 +#define MINOR 18 #define PATCHLVL 1 -#define BUILD 86 +#define BUILD 91 diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index 534b37da8bd..d04ddc738af 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -65,15 +65,22 @@ GVAR(flashlights) = createHashMap; // hide clock on map if player has no watch GVAR(hasWatch) = true; -["loadout", { - params ["_unit"]; - if (isNull _unit) exitWith { +[QGVAR(slotItemChanged), "SlotItemChanged", { + params ["", "_item", "_slot", "_assign"]; + + if (_slot != TYPE_WATCH) exitWith {}; + + GVAR(hasWatch) = _assign && {_item isKindOf ["ItemWatch", configFile >> "CfgWeapons"]}; +}] call CBA_fnc_addBISPlayerEventHandler; + +["unit", { + params ["_newPlayer"]; + + if (isNull _newPlayer) exitWith { GVAR(hasWatch) = true; }; - GVAR(hasWatch) = false; - { - if (_x isKindOf ["ItemWatch", configFile >> "CfgWeapons"]) exitWith {GVAR(hasWatch) = true;}; - } forEach (assignedItems _unit); + + GVAR(hasWatch) = (_newPlayer getSlotItemName TYPE_WATCH) isKindOf ["ItemWatch", configFile >> "CfgWeapons"]; }, true] call CBA_fnc_addPlayerEventHandler; @@ -109,6 +116,7 @@ GVAR(vehicleLightColor) = [1,1,1,0]; compile _vehicleLightCondition }; } else { + //IGNORE_PRIVATE_WARNING ["_vehicle", "_unit"]; switch (true) do { case (_vehicle isKindOf "Tank"); case (_vehicle isKindOf "Wheeled_APC_F"): { {true} }; diff --git a/addons/map/config.cpp b/addons/map/config.cpp index 943a63c228e..a4d086d6029 100644 --- a/addons/map/config.cpp +++ b/addons/map/config.cpp @@ -119,16 +119,16 @@ class RscDisplayDiary { onButtonClick = ""; }; class CA_PlayerName: RscText { - x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + x = "2 * ( ((safeZoneW / safeZoneH) min 1.2) / 40)"; }; class ProfilePicture: RscPicture { - x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + x = "13.5 * ( ((safeZoneW / safeZoneH) min 1.2) / 40)"; }; class ProfileBackground: RscText { - x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + x = "13.3 * ( ((safeZoneW / safeZoneH) min 1.2) / 40)"; }; class Separator1: RscPicture { - x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + x = "14.5 * ( ((safeZoneW / safeZoneH) min 1.2) / 40)"; }; }; }; diff --git a/addons/map/functions/fnc_compileFlashlightMenu.sqf b/addons/map/functions/fnc_compileFlashlightMenu.sqf index 4dc24a23f64..b0778981a7e 100644 --- a/addons/map/functions/fnc_compileFlashlightMenu.sqf +++ b/addons/map/functions/fnc_compileFlashlightMenu.sqf @@ -30,6 +30,7 @@ _unitLight params ["_flashlight", ""]; private _displayName = getText (_cfg >> "displayName"); private _icon = getText (_cfg >> "picture"); + //IGNORE_PRIVATE_WARNING ["_player"]; private _statement = if (_flashlight == _x) then { _displayName = format [localize LSTRING(turnLightOff), _displayName]; {[_player, ""] call FUNC(switchFlashlight)} diff --git a/addons/map/functions/fnc_updateMapEffects.sqf b/addons/map/functions/fnc_updateMapEffects.sqf index cf6e01bf212..0a6efdd1f71 100644 --- a/addons/map/functions/fnc_updateMapEffects.sqf +++ b/addons/map/functions/fnc_updateMapEffects.sqf @@ -34,7 +34,7 @@ if (GVAR(mapShake)) then { // Only shake map while moving on foot private _speed = 0; - if ((alive ACE_player) && {vehicle ACE_player == ACE_player}) then { + if ((alive ACE_player) && {isNull objectParent ACE_player}) then { _speed = vectorMagnitude (velocity ACE_player); }; diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 5d91167639b..13ee042d1f0 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -492,7 +492,7 @@ Setear canal al comenzar Définir un canal par défaut 開始時のチャンネルを指定 - 시작시 채널 + 시작 시 채널 설정 设定游戏开始时的聊天频道 設定遊戲開始時的聊天頻道 @@ -507,7 +507,7 @@ Cambiar el canal de marcadores inicial al comenzar la misión Change le canal de communication par défaut au début de la mission. ミッション開始時に使用されるマーカーチャンネルの指定を変更します - 미션 시작시 마커채널을 변경합니다 + 미션 시작 시 마커채널을 변경합니다 更改任务启动时的聊天频道 更改任務啟動時的聊天頻道 diff --git a/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf b/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf index f533f9df345..c5577fb7e88 100644 --- a/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf +++ b/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf @@ -22,7 +22,7 @@ if (!params [["_group", "", [grpNull, ""]], ["_leadColor", [1,1,1,1], [[]], 4], }; TRACE_3("params",_group,_leadColor,_unitColor); -if (_group isEqualType grpNull) then {_group = groupID _group}; +if (_group isEqualType grpNull) then {_group = groupId _group}; if (_group == "") exitWith {ERROR("Group ID is blank, which is not valid.")}; if !([_leadColor] call FUNC(isValidColorArray)) exitWith {ERROR("leadColor is not a valid color array.")}; diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index 0a69c1924b8..35b462910a8 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -41,7 +41,7 @@ private _players = [_positions, FUNC(getProximityPlayers), missionNamespace, QGV }; // If color settings for the group exist, then use those, otherwise fall back to the default colors - private _colorMap = GVAR(GroupColorCfgMappingNew) getOrDefault [toLower groupID (group _x), [GVAR(defaultLeadColor), GVAR(defaultColor)]]; + private _colorMap = GVAR(GroupColorCfgMappingNew) getOrDefault [toLower groupId (group _x), [GVAR(defaultLeadColor), GVAR(defaultColor)]]; private _color = _colorMap select (_x != leader _x); TRACE_2("",_colorMap,_color); diff --git a/addons/map_gestures/functions/fnc_initDisplaySpectator.sqf b/addons/map_gestures/functions/fnc_initDisplaySpectator.sqf index dbbd31ae65c..7c1f09bbf53 100644 --- a/addons/map_gestures/functions/fnc_initDisplaySpectator.sqf +++ b/addons/map_gestures/functions/fnc_initDisplaySpectator.sqf @@ -23,11 +23,11 @@ _mapCtrl ctrlAddEventHandler ["Draw", { private _aceSpectatorFocus = missionNamespace getVariable [QEGVAR(spectator,camFocus), objNull]; if (!isNull _aceSpectatorFocus) then { - _targets pushback [_aceSpectatorFocus, GVAR(maxRange)]; + _targets pushBack [_aceSpectatorFocus, GVAR(maxRange)]; }; private _vanillaSpectatorFocus = uiNamespace getVariable ["RscEGSpectator_focus", objNull]; if (!isNull _vanillaSpectatorFocus) then { - _targets pushback [_vanillaSpectatorFocus, GVAR(maxRange)]; + _targets pushBack [_vanillaSpectatorFocus, GVAR(maxRange)]; }; [_this select 0, _targets] call FUNC(drawMapGestures); }]; diff --git a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf index 782d8762a07..652edf8768b 100644 --- a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf +++ b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf @@ -73,11 +73,11 @@ switch (true) do { GVAR(freeDrawingData) = ["left", _currentMousePos, _currentMousePos]; } else { if ((GVAR(freeDrawingData) select 0) == "left") then { // We are already drawing on this line, find best spot - if ((_currentMousePos distance2d _posTopLeft) < ((GVAR(freeDrawingData) select 1) distance2d _posTopLeft)) then { + if ((_currentMousePos distance2D _posTopLeft) < ((GVAR(freeDrawingData) select 1) distance2D _posTopLeft)) then { GVAR(freeDrawingData) set [1, _currentMousePos]; }; - if ((_currentMousePos distance2d _posBottomLeft) < ((GVAR(freeDrawingData) select 2) distance2d _posBottomLeft)) then { + if ((_currentMousePos distance2D _posBottomLeft) < ((GVAR(freeDrawingData) select 2) distance2D _posBottomLeft)) then { GVAR(freeDrawingData) set [2, _currentMousePos]; }; }; @@ -95,11 +95,11 @@ switch (true) do { GVAR(freeDrawingData) = ["top", _currentMousePos, _currentMousePos]; } else { if ((GVAR(freeDrawingData) select 0) == "top") then { // We are already drawing on this line, find best spot - if ((_currentMousePos distance2d _posTopLeft) < ((GVAR(freeDrawingData) select 1) distance2d _posTopLeft)) then { + if ((_currentMousePos distance2D _posTopLeft) < ((GVAR(freeDrawingData) select 1) distance2D _posTopLeft)) then { GVAR(freeDrawingData) set [1, _currentMousePos]; }; - if ((_currentMousePos distance2d _posTopRight) < ((GVAR(freeDrawingData) select 2) distance2d _posTopRight)) then { + if ((_currentMousePos distance2D _posTopRight) < ((GVAR(freeDrawingData) select 2) distance2D _posTopRight)) then { GVAR(freeDrawingData) set [2, _currentMousePos]; }; }; @@ -117,11 +117,11 @@ switch (true) do { GVAR(freeDrawingData) = ["right", _currentMousePos, _currentMousePos]; } else { if ((GVAR(freeDrawingData) select 0) == "right") then { // We are already drawing on this line, find best spot - if ((_currentMousePos distance2d _posTopRight) < ((GVAR(freeDrawingData) select 1) distance2d _posTopRight)) then { + if ((_currentMousePos distance2D _posTopRight) < ((GVAR(freeDrawingData) select 1) distance2D _posTopRight)) then { GVAR(freeDrawingData) set [1, _currentMousePos]; }; - if ((_currentMousePos distance2d _posBottomRight) < ((GVAR(freeDrawingData) select 2) distance2d _posBottomRight)) then { + if ((_currentMousePos distance2D _posBottomRight) < ((GVAR(freeDrawingData) select 2) distance2D _posBottomRight)) then { GVAR(freeDrawingData) set [2, _currentMousePos]; }; }; @@ -139,11 +139,11 @@ switch (true) do { GVAR(freeDrawingData) = ["bottom", _currentMousePos, _currentMousePos]; } else { if ((GVAR(freeDrawingData) select 0) == "bottom") then { // We are already drawing on this line, find best spot - if ((_currentMousePos distance2d _posBottomLeft) < ((GVAR(freeDrawingData) select 1) distance2d _posBottomLeft)) then { + if ((_currentMousePos distance2D _posBottomLeft) < ((GVAR(freeDrawingData) select 1) distance2D _posBottomLeft)) then { GVAR(freeDrawingData) set [1, _currentMousePos]; }; - if ((_currentMousePos distance2d _posBottomRight) < ((GVAR(freeDrawingData) select 2) distance2d _posBottomRight)) then { + if ((_currentMousePos distance2D _posBottomRight) < ((GVAR(freeDrawingData) select 2) distance2D _posBottomRight)) then { GVAR(freeDrawingData) set [2, _currentMousePos]; }; }; diff --git a/addons/maptools/functions/fnc_isInsidePlottingBoard.sqf b/addons/maptools/functions/fnc_isInsidePlottingBoard.sqf index e3e64675080..6dc0d844fff 100644 --- a/addons/maptools/functions/fnc_isInsidePlottingBoard.sqf +++ b/addons/maptools/functions/fnc_isInsidePlottingBoard.sqf @@ -27,12 +27,11 @@ private _isRuler = if (GVAR(plottingBoard_Shown) == 2) then { if (_dist <= PLOTTINGBOARD_RULERCENTER) exitWith {true}; private _rulerVector = [sin GVAR(plottingBoard_rulerAngle), cos GVAR(plottingBoard_rulerAngle)]; - private _dirRightVector = [_dirVector select 1, -(_dirVector select 0)]; private _rulerAng = acos (_rulerVector vectorCos _relPos); if (cos _rulerAng > 0 && {(tan _rulerAng) * _dist < PLOTTINGBOARD_RULERHALFWIDTH}) exitWith {true}; - _dist > PLOTTINGBOARD_RULERINNERCIRCLE && {_dist < PLOTTINGBOARD_RULEROUTERCIRCLE && {abs (_rulerAng * DEGTOMILS) < PLOTTINGBOAR_RULEROUTERHALFANGLE}} + _dist > PLOTTINGBOARD_RULERINNERCIRCLE && {_dist < PLOTTINGBOARD_RULEROUTERCIRCLE && {abs (_rulerAng * DEGTOMILS) < PLOTTINGBOARD_RULEROUTERHALFANGLE}} } else { false }; diff --git a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf index 1a6d83b6985..f26c831b7e8 100644 --- a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf +++ b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf @@ -71,7 +71,7 @@ if (GVAR(plottingBoard_Shown) == 0) then { // Rotate all points of polyline if (_count >= 4) then { // polylines need at least 2 points (2 components per point) - _rotatedPolyline = []; + private _rotatedPolyline = []; for "_i" from 0 to _count - 1 step 2 do { _rotatedPolyPos = [[0, 0], [_polyline select _i, _polyline select (_i + 1)], -_angle] call CBA_fnc_vectRotate2D; diff --git a/addons/marker_flags/XEH_preStart.sqf b/addons/marker_flags/XEH_preStart.sqf index 2a2bc521616..e671b522a4c 100644 --- a/addons/marker_flags/XEH_preStart.sqf +++ b/addons/marker_flags/XEH_preStart.sqf @@ -2,5 +2,5 @@ #include "XEH_PREP.hpp" -private _weapons = (configProperties [configfile >> "CfgWeapons", QUOTE(isClass _x && {isText (_x >> QQGVAR(vehicle))}), true]) apply {configName _x}; +private _weapons = (configProperties [configFile >> "CfgWeapons", QUOTE(isClass _x && {isText (_x >> QQGVAR(vehicle))}), true]) apply {configName _x}; uiNamespace setVariable [QGVAR(flagItems), compileFinal str _weapons]; diff --git a/addons/markers/XEH_preInit.sqf b/addons/markers/XEH_preInit.sqf index 142dedb89a1..605920b7770 100644 --- a/addons/markers/XEH_preInit.sqf +++ b/addons/markers/XEH_preInit.sqf @@ -12,7 +12,7 @@ PREP_RECOMPILE_END; if (isNil QGVAR(MarkersCache)) then { GVAR(MarkersCache) = []; - private _config = configfile >> "CfgMarkers"; + private _config = configFile >> "CfgMarkers"; for "_a" from 0 to (count _config - 1) do { private _marker = _config select _a; @@ -31,7 +31,7 @@ if (isNil QGVAR(MarkersCache)) then { if (isNil QGVAR(MarkerColorsCache)) then { GVAR(MarkerColorsCache) = []; - private _config = configfile >> "CfgMarkerColors"; + private _config = configFile >> "CfgMarkerColors"; for "_a" from 0 to (count _config - 1) do { private _marker = _config select _a; diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf index a102502b24c..2a3804959f2 100644 --- a/addons/markers/functions/fnc_initInsertMarker.sqf +++ b/addons/markers/functions/fnc_initInsertMarker.sqf @@ -19,7 +19,7 @@ #define BORDER 0.005 [{ - disableserialization; + disableSerialization; params ["_display"]; TRACE_1("params",_display); @@ -29,24 +29,24 @@ }; //BIS Controls: - private _text = _display displayctrl IDC_INSERT_MARKER; - private _picture = _display displayctrl IDC_INSERT_MARKER_PICTURE; - private _channel = _display displayctrl IDC_INSERT_MARKER_CHANNELS; - private _buttonOK = _display displayctrl IDC_OK; - private _buttonCancel = _display displayctrl IDC_CANCEL; - private _description = _display displayctrl 1100; - private _title = _display displayctrl 1001; - private _descriptionChannel = _display displayctrl 1101; + private _text = _display displayCtrl IDC_INSERT_MARKER; + private _picture = _display displayCtrl IDC_INSERT_MARKER_PICTURE; + private _channel = _display displayCtrl IDC_INSERT_MARKER_CHANNELS; + private _buttonOK = _display displayCtrl IDC_OK; + private _buttonCancel = _display displayCtrl IDC_CANCEL; + private _description = _display displayCtrl 1100; + private _title = _display displayCtrl 1001; + private _descriptionChannel = _display displayCtrl 1101; //ACE Controls: private _ctrlTimestamp = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP; private _ctrlTimestampText = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP_TEXT; - private _aceShapeLB = _display displayctrl IDC_ACE_INSERT_MARKER_SHAPE; - private _aceColorLB = _display displayctrl IDC_ACE_INSERT_MARKER_COLOR; - private _aceAngleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE; - private _aceAngleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE_TEXT; - private _aceScaleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_SCALE; - private _aceScaleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_SCALE_TEXT; + private _aceShapeLB = _display displayCtrl IDC_ACE_INSERT_MARKER_SHAPE; + private _aceColorLB = _display displayCtrl IDC_ACE_INSERT_MARKER_COLOR; + private _aceAngleSlider = _display displayCtrl IDC_ACE_INSERT_MARKER_ANGLE; + private _aceAngleSliderText = _display displayCtrl IDC_ACE_INSERT_MARKER_ANGLE_TEXT; + private _aceScaleSlider = _display displayCtrl IDC_ACE_INSERT_MARKER_SCALE; + private _aceScaleSliderText = _display displayCtrl IDC_ACE_INSERT_MARKER_SCALE_TEXT; private _mapDisplay = displayParent _display; if (isNull _mapDisplay) exitWith {ERROR("No Map");}; @@ -102,7 +102,7 @@ ctrlSetFocus _text; //--- Background - private _pos = ctrlposition _text; + private _pos = ctrlPosition _text; _pos params ["_posX", "_posY", "_posW", "_posH"]; _posX = _posX + 0.01; _posY = _posY min ((safeZoneH + safeZoneY) - (11 * _posH + 11 * BORDER)); //prevent buttons being placed below bottom edge of screen diff --git a/addons/markers/functions/fnc_mapDisplayInitEH.sqf b/addons/markers/functions/fnc_mapDisplayInitEH.sqf index e5242b9067c..6d26d3dab81 100644 --- a/addons/markers/functions/fnc_mapDisplayInitEH.sqf +++ b/addons/markers/functions/fnc_mapDisplayInitEH.sqf @@ -18,14 +18,14 @@ params ["_display"]; TRACE_1("params",_display); -private _bisShapeLB = _display displayctrl 1091; +private _bisShapeLB = _display displayCtrl 1091; private _curSelShape = missionNamespace getVariable [QGVAR(curSelMarkerShape), 0]; TRACE_2("shape",_bisShapeLB,_curSelShape); _bisShapeLB ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedShape)}]; _bisShapeLB lbSetCurSel _curSelShape; -private _bisColorLB = _display displayctrl 1090; +private _bisColorLB = _display displayCtrl 1090; private _curSelColor = missionNamespace getVariable [QGVAR(curSelMarkerColor), 0]; TRACE_2("color",_bisColorLB,_curSelColor); _bisColorLB ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedColor)}]; diff --git a/addons/markers/functions/fnc_placeMarker.sqf b/addons/markers/functions/fnc_placeMarker.sqf index fdd758be5e1..1899dff5fd5 100644 --- a/addons/markers/functions/fnc_placeMarker.sqf +++ b/addons/markers/functions/fnc_placeMarker.sqf @@ -35,7 +35,7 @@ if (_closeNum isEqualTo 1) then { private _newestMarkerDist = 1e10; { - private _distX = GVAR(currentMarkerPosition) distance2d (getMarkerPos _x); + private _distX = GVAR(currentMarkerPosition) distance2D (getMarkerPos _x); if (_distX < _newestMarkerDist) then { _newestMarker = _x; _newestMarkerDist = _distX; diff --git a/addons/markers/functions/fnc_removeTimestamp.sqf b/addons/markers/functions/fnc_removeTimestamp.sqf index 5d2c7c3c1f3..75afabad459 100644 --- a/addons/markers/functions/fnc_removeTimestamp.sqf +++ b/addons/markers/functions/fnc_removeTimestamp.sqf @@ -22,20 +22,14 @@ params ["_original"]; -// @todo, 2.02 reverse command will support STRING types -private _string = toArray _original; -reverse _string; -_string = toString _string; +private _string = reverse _original; if (_string select [0, 1] != "]") exitWith {_original}; private _timestampLength = (_string find "[") + 1; _string = _string select [0, _timestampLength]; -// @todo -_string = toArray _string; -reverse _string; -_string = toString _string; +_string = reverse _string; if (_string select [0, 1] != "[") exitWith {_original}; @@ -64,7 +58,7 @@ while {_keepCheckingDigits} do { }; if (_validTimestamp) then { - [_original select [0, count _original - _timestampLength], " "] call CBA_fnc_rightTrim // return + (_original select [0, count _original - _timestampLength]) trim [" ", 2] // return } else { _original // return } diff --git a/addons/markers/functions/fnc_setMarkerJIP.sqf b/addons/markers/functions/fnc_setMarkerJIP.sqf index 12dfe5de77d..fe4a1b68ae5 100644 --- a/addons/markers/functions/fnc_setMarkerJIP.sqf +++ b/addons/markers/functions/fnc_setMarkerJIP.sqf @@ -27,7 +27,7 @@ TRACE_2("params",_allMapMarkers,_allMapMarkersProperties); private _data = _allMapMarkersProperties select _index; _data params ["_markerClassname", "_colorClassname", "_pos", "_dir", "_scale"]; - private _config = (configfile >> "CfgMarkers") >> _markerClassname; + private _config = (configFile >> "CfgMarkers") >> _markerClassname; if (!isClass _config) then { WARNING("CfgMarker not found, changed to milDot"); @@ -36,7 +36,7 @@ TRACE_2("params",_allMapMarkers,_allMapMarkersProperties); _x setMarkerTypeLocal configName _config; - _config = configfile >> "CfgMarkerColors" >> _colorClassname; + _config = configFile >> "CfgMarkerColors" >> _colorClassname; if (!isClass _config) then { WARNING("CfgMarkerColors not found, changed to Default"); diff --git a/addons/markers/functions/fnc_setMarkerNetwork.sqf b/addons/markers/functions/fnc_setMarkerNetwork.sqf index 7d0cc0e8271..94c66f40789 100644 --- a/addons/markers/functions/fnc_setMarkerNetwork.sqf +++ b/addons/markers/functions/fnc_setMarkerNetwork.sqf @@ -21,7 +21,7 @@ params ["_marker", "_data"]; TRACE_2("params",_marker,_data); _data params ["_markerClassname", "_colorClassname", "_pos", "_dir", "_scale"]; -private _config = configfile >> "CfgMarkers" >> _markerClassname; +private _config = configFile >> "CfgMarkers" >> _markerClassname; if (!isClass _config) then { WARNING("CfgMarker not found, changed to milDot"); @@ -30,7 +30,7 @@ if (!isClass _config) then { _marker setMarkerTypeLocal configName _config; -_config = configfile >> "CfgMarkerColors" >> _colorClassname; +_config = configFile >> "CfgMarkerColors" >> _colorClassname; if (!isClass _config) then { WARNING("CfgMarkerColors not found, changed to Default"); diff --git a/addons/maverick/CfgAmmo.hpp b/addons/maverick/CfgAmmo.hpp index 7e66e2edee0..dbf847b10d6 100644 --- a/addons/maverick/CfgAmmo.hpp +++ b/addons/maverick/CfgAmmo.hpp @@ -1,3 +1,4 @@ +class ace_missileguidance_type_Maverick; class CfgAmmo { class MissileCore; class MissileBase: MissileCore { @@ -9,32 +10,8 @@ class CfgAmmo { author = "Dani (TCVM)"; missileLockMaxDistance = 14000; maneuvrability = 0; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Maverick { enabled = 1; - - pitchRate = 15; - yawRate = 15; - - canVanillaLock = 1; - - defaultSeekerType = "Optic"; - seekerTypes[] = {"Optic"}; - - defaultSeekerLockMode = "LOBL"; - seekerLockModes[] = {"LOBL"}; - - defaultNavigationType = "AugmentedProportionalNavigation"; - navigationTypes[] = { "AugmentedProportionalNavigation" }; - - seekLastTargetPos = 1; - seekerAngle = 60; - seekerAccuracy = 1; - - seekerMinRange = 1; - seekerMaxRange = 14000; - - defaultAttackProfile = "maverick"; - attackProfiles[] = {"maverick"}; }; }; @@ -52,32 +29,15 @@ class CfgAmmo { manualControl = 0; missileLockMaxDistance = 16000; weaponLockSystem = 4; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Maverick { enabled = 1; - - pitchRate = 15; - yawRate = 15; - - canVanillaLock = 0; - defaultSeekerType = "SALH"; seekerTypes[] = {"SALH"}; defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = {"LOAL","LOBL"}; - - defaultNavigationType = "AugmentedProportionalNavigation"; - navigationTypes[] = { "AugmentedProportionalNavigation" }; - - seekLastTargetPos = 1; - seekerAngle = 60; - seekerAccuracy = 1; + seekerLockModes[] = {"LOAL"}; - seekerMinRange = 1; seekerMaxRange = 16000; - - defaultAttackProfile = "maverick"; - attackProfiles[] = {"maverick"}; }; }; @@ -87,32 +47,19 @@ class CfgAmmo { irLock = 0; missileLockMaxDistance = 10000; weaponLockSystem = 4; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Maverick { enabled = 1; - pitchRate = 20; yawRate = 20; - canVanillaLock = 0; - defaultSeekerType = "SALH"; seekerTypes[] = {"SALH"}; defaultSeekerLockMode = "LOAL"; seekerLockModes[] = {"LOAL"}; - defaultNavigationType = "AugmentedProportionalNavigation"; - navigationTypes[] = { "AugmentedProportionalNavigation" }; - - seekLastTargetPos = 1; seekerAngle = 40; - seekerAccuracy = 1; - - seekerMinRange = 1; seekerMaxRange = 10000; - - defaultAttackProfile = "maverick"; - attackProfiles[] = {"maverick"}; }; }; }; diff --git a/addons/maverick/stringtable.xml b/addons/maverick/stringtable.xml index 394ba64f5d4..88fa026a275 100644 --- a/addons/maverick/stringtable.xml +++ b/addons/maverick/stringtable.xml @@ -6,7 +6,7 @@ AGM-65 Maverick L, Laser Guided Anti-Ground-Missile AGM-65 Maverick L, lasergelenkte Luft-Boden-Rakete AGM-65 Maverick L, Missile Aria-Terra Laserguidato - AGM-65 マーベリック L、レーザー誘導対地ミサイル + AGM-65 マーベリック L、 レーザー誘導対地ミサイル AGM-65"小牛"飛彈L型,雷射導引對地導彈 AGM-65"小牛"L型激光制导对地导弹 AGM-65 매버릭 L, 레이저 유도 대지 미사일 @@ -82,10 +82,10 @@ Kh-25ML, Laser Guided Air-to-Ground-Missile Ch-25ML, Lasergelenkte Luft-Boden-Rakete - Kh-25ML, 레이저 유도 대공 미사일 + Kh-25ML, 레이저 유도 공대지 미사일 Kh-25ML,雷射導引對地導彈 Kh-25ML,激光制导空地导弹 - Kh-25ML、レーザー誘導対地ミサイル + Kh-25ML、 レーザー誘導対地ミサイル Kh-25ML, Missile Aria-Terra Laserguidato Kh-25ML, Kierowany laserowo pocisk powietrze-ziemia Х-25МЛ, ракета Воздух-Земля с лазерным наведением @@ -114,30 +114,65 @@ AGM-65 Maverick D AGM-65 Maverick D + AGM-65 Maverick D + AGM-65 マーベリック D + AGM-65 매버릭 D + AGM-65 Maverick D + AGM-65 Maverick D AGM-65 Maverick G AGM-65 Maverick G + AGM-65 Maverick G + AGM-65 マーベリック G + AGM-65 매버릭 G + AGM-65 Maverick G + AGM-65 Maverick G AGM-65 Maverick D [ACE] AGM-65 Maverick D [ACE] + AGM-65 Maverick D [ACE] + AGM-65 マーベリック D [ACE] + AGM-65 매버릭 D [ACE] + AGM-65 Maverick D [ACE] + AGM-65 Maverick D [ACE] 3x AGM-65 Maverick D [ACE] 3x AGM-65 Maverick D [ACE] + 3x AGM-65 Maverick D [ACE] + 3x AGM-65 マーベリック D [ACE] + 3x AGM-65 매버릭 D [ACE] + 3x AGM-65 Maverick D [ACE] + 3x AGM-65 Maverick D [ACE] AGM-65 Maverick G [ACE] AGM-65 Maverick G [ACE] + AGM-65 Maverick G [ACE] + AGM-65 マーベリック G [ACE] + AGM-65 매버릭 G [ACE] + AGM-65 Maverick G [ACE] + AGM-65 Maverick G [ACE] 2x AGM-65 Maverick G [ACE] 2x AGM-65 Maverick G [ACE] + 2x AGM-65 Maverick G [ACE] + 2x AGM-65 マーベリック G [ACE] + 2x AGM-65 매버릭 G [ACE] + 2x AGM-65 Maverick G [ACE] + 2x AGM-65 Maverick G [ACE] 3x AGM-65 Maverick G [ACE] 3x AGM-65 Maverick G [ACE] + 3x AGM-65 Maverick G [ACE] + 3x AGM-65 マーベリック G [ACE] + 3x AGM-65 매버릭 G [ACE] + 3x AGM-65 Maverick G [ACE] + 3x AGM-65 Maverick G [ACE] diff --git a/addons/medical/functions/fnc_deserializeState.sqf b/addons/medical/functions/fnc_deserializeState.sqf index b7846bf9015..6fbb00985db 100644 --- a/addons/medical/functions/fnc_deserializeState.sqf +++ b/addons/medical/functions/fnc_deserializeState.sqf @@ -29,6 +29,7 @@ if (!local _unit) exitWith { ERROR_1("unit [%1] is not local",_unit) }; if !(_unit getVariable [QGVAR(initialized), false]) exitWith { [QEGVAR(medical_status,initialized), { params ["_unit"]; + //IGNORE_PRIVATE_WARNING ["_thisArgs", "_thisId", "_thisType"]; _thisArgs params ["_target"]; if (_unit == _target) then { diff --git a/addons/medical/initSettings.inc.sqf b/addons/medical/initSettings.inc.sqf index 3c54f47cee1..adc53c2ea83 100644 --- a/addons/medical/initSettings.inc.sqf +++ b/addons/medical/initSettings.inc.sqf @@ -34,7 +34,7 @@ "SLIDER", [LSTRING(SpontaneousWakeUpChance_DisplayName), LSTRING(SpontaneousWakeUpChance_Description)], LSTRING(Category), - [0, 1, 0.05, 2, true], + [0, 1, 0.1, 2, true], true ] call CBA_fnc_addSetting; @@ -43,6 +43,6 @@ "SLIDER", [LSTRING(spontaneousWakeUpEpinephrineBoost_DisplayName), LSTRING(spontaneousWakeUpEpinephrineBoost_Description)], LSTRING(Category), - [1, 30, 1, 1], + [1, 30, 1.5, 1], true ] call CBA_fnc_addSetting; diff --git a/addons/medical_ai/XEH_postInit.sqf b/addons/medical_ai/XEH_postInit.sqf index 9ddd8273fdf..22f2fa5f23f 100644 --- a/addons/medical_ai/XEH_postInit.sqf +++ b/addons/medical_ai/XEH_postInit.sqf @@ -7,6 +7,7 @@ if ((GVAR(enabledFor) == 1) && {!isServer} && {hasInterface}) exitWith {}; // 1: Don't Run on non-hc Clients ["ace_firedNonPlayer", { + //IGNORE_PRIVATE_WARNING ["_unit"]; _unit setVariable [QGVAR(lastFired), CBA_missionTime]; }] call CBA_fnc_addEventHandler; diff --git a/addons/medical_ai/XEH_preStart.sqf b/addons/medical_ai/XEH_preStart.sqf index ccb92538b74..3782a3eab78 100644 --- a/addons/medical_ai/XEH_preStart.sqf +++ b/addons/medical_ai/XEH_preStart.sqf @@ -25,4 +25,4 @@ private _itemHash = createHashMap; ["morphine", ["morphine"]], ["epinephrine", ["epinephrine"]] ]; -uinamespace setVariable [QGVAR(itemHash), compileFinal _itemHash]; +uiNamespace setVariable [QGVAR(itemHash), compileFinal _itemHash]; diff --git a/addons/medical_ai/functions/fnc_addHealingCommandActions.sqf b/addons/medical_ai/functions/fnc_addHealingCommandActions.sqf index cc91ca7eb3c..9228cd3ad51 100644 --- a/addons/medical_ai/functions/fnc_addHealingCommandActions.sqf +++ b/addons/medical_ai/functions/fnc_addHealingCommandActions.sqf @@ -30,7 +30,7 @@ private _action = [ [ [ QGVAR(medicHeal_) + str _x, - format ["%1: (%2)", [_x, false, true] call EFUNC(common,getName), groupID _x], + format ["%1: (%2)", [_x, false, true] call EFUNC(common,getName), groupId _x], "", {}, {true}, @@ -41,7 +41,7 @@ private _action = [ [ [ QGVAR(healUnit_) + str _x, - format [localize "str_action_heal_soldier", ([_x, false, true] call EFUNC(common,getName)) + " (" + str groupID _x + ")"], + format [localize "str_action_heal_soldier", ([_x, false, true] call EFUNC(common,getName)) + " (" + str groupId _x + ")"], "", { (_this select 2) params ["_healer", "_target"]; diff --git a/addons/medical_ai/functions/fnc_canRequestMedic.sqf b/addons/medical_ai/functions/fnc_canRequestMedic.sqf index 5064e1a7321..d020d02e1dc 100644 --- a/addons/medical_ai/functions/fnc_canRequestMedic.sqf +++ b/addons/medical_ai/functions/fnc_canRequestMedic.sqf @@ -20,7 +20,7 @@ // treat other units, or else he won't do anything on his own. private _isMedic = [_this] call EFUNC(medical_treatment,isMedic); -if (_isMedic && {!IS_UNCONSCIOUS(_this)} || {vehicle _this != _this}) exitWith {false}; +if (_isMedic && {!IS_UNCONSCIOUS(_this)} || {!isNull objectParent _this}) exitWith {false}; // Search for a medic, prioritize unitReady private _medic = objNull; diff --git a/addons/medical_ai/functions/fnc_healingLogic.sqf b/addons/medical_ai/functions/fnc_healingLogic.sqf index 9c7ce1c847f..10e0549e767 100644 --- a/addons/medical_ai/functions/fnc_healingLogic.sqf +++ b/addons/medical_ai/functions/fnc_healingLogic.sqf @@ -262,7 +262,7 @@ if (true) then { if (_canGiveIV) exitWith { _treatmentEvent = QEGVAR(medical_treatment,ivBagLocal); _treatmentTime = 5; - _treatmentArgs = [_target, _bodyPart, "SalineIV"]; + _treatmentArgs = [_target, _bodyPart, "SalineIV", _healer]; _treatmentItem = "@iv"; }; diff --git a/addons/medical_damage/functions/fnc_debug_explosiveTest.sqf b/addons/medical_damage/functions/fnc_debug_explosiveTest.sqf index d17b268c157..a867a654707 100644 --- a/addons/medical_damage/functions/fnc_debug_explosiveTest.sqf +++ b/addons/medical_damage/functions/fnc_debug_explosiveTest.sqf @@ -34,7 +34,7 @@ params [ _distances params [["_min", 1], ["_max", 10], ["_step", 1]]; -if (isNil "_center") exitwith {}; +if (isNil "_center") exitWith {}; _max = _max max _min; private _nSteps = 0 max ceil ((_max - _min) / _step); diff --git a/addons/medical_damage/functions/fnc_woundsHandlerBurning.sqf b/addons/medical_damage/functions/fnc_woundsHandlerBurning.sqf index 47c625684ac..1130c8d3f53 100644 --- a/addons/medical_damage/functions/fnc_woundsHandlerBurning.sqf +++ b/addons/medical_damage/functions/fnc_woundsHandlerBurning.sqf @@ -37,7 +37,7 @@ TRACE_3("woundsHandlerBurning",_unit,_allDamages,_typeOfDamage); [{ params ["_unit"]; - _bodyPart = selectRandom ["body", "leftleg", "rightleg"]; + private _bodyPart = selectRandom ["body", "leftleg", "rightleg"]; private _storedDamage = _unit getVariable [QGVAR(storedBurnDamage), 0]; [QEGVAR(medical,woundReceived), [_unit, [[_storedDamage, _bodyPart, _storedDamage]], _unit, "burn"]] call CBA_fnc_localEvent; _unit setVariable [QGVAR(storedBurnDamage), 0, true]; diff --git a/addons/medical_engine/functions/fnc_handleDamage.sqf b/addons/medical_engine/functions/fnc_handleDamage.sqf index 168203366c2..cf891f5e532 100644 --- a/addons/medical_engine/functions/fnc_handleDamage.sqf +++ b/addons/medical_engine/functions/fnc_handleDamage.sqf @@ -32,7 +32,11 @@ if (_structuralDamage) then { // Damage can be disabled with old variable or via sqf command allowDamage if !(isDamageAllowed _unit && {_unit getVariable [QEGVAR(medical,allowDamage), true]}) exitWith {_oldDamage}; +// Killing units via End key is an edge case (#10375) +// This didn't matter pre-Arma 3 2.18 but now this goes through the event handler +// TODO: Structural fire damage >= 1 in a single damage event could still be caught here and we don't want that, but we haven't found a better way to catch this, fire damage should be small most of the time anyway private _newDamage = _damage - _oldDamage; +if (_structuralDamage && {(abs (_newDamage - 1)) < 0.001 && _ammo == "" && isNull _shooter && isNull _instigator}) exitWith {_damage}; // _newDamage == 0 happens occasionally for vehiclehit events (see line 80 onwards), just exit early to save some frametime // context 4 is engine "bleeding". For us, it's just a duplicate event for #structural which we can ignore without any issues @@ -94,7 +98,7 @@ if ( GET_NUMBER(_ammoCfg >> "explosive",0) > 0 || {GET_NUMBER(_ammoCfg >> "indirectHit",0) > 0} } -) exitwith { +) exitWith { TRACE_5("Vehicle hit",_unit,_shooter,_instigator,_damage,_newDamage); _unit setVariable [QEGVAR(medical,lastDamageSource), _shooter]; @@ -165,7 +169,11 @@ if (_context == 2) then { if (_environmentDamage) then { // Any collision with terrain/vehicle/object has a shooter // Check this first because burning can happen at any velocity - if !(isNull _shooter) then { + if (isNull _shooter) then { + // Anything else is almost guaranteed to be fire damage + _ammo = "fire"; + TRACE_5("Fire Damage",_unit,_shooter,_instigator,_damage,_allDamages); + } else { /* If shooter != unit then they hit unit, otherwise it could be: - Unit hitting anything at speed @@ -180,10 +188,6 @@ if (_context == 2) then { _ammo = "collision"; TRACE_5("Collision",_unit,_shooter,_instigator,_damage,_allDamages); }; - } else { - // Anything else is almost guaranteed to be fire damage - _ammo = "fire"; - TRACE_5("Fire Damage",_unit,_shooter,_instigator,_damage,_allDamages); }; }; diff --git a/addons/medical_engine/functions/fnc_updateDamageEffects.sqf b/addons/medical_engine/functions/fnc_updateDamageEffects.sqf index 7dc73e04f47..f4a18094a60 100644 --- a/addons/medical_engine/functions/fnc_updateDamageEffects.sqf +++ b/addons/medical_engine/functions/fnc_updateDamageEffects.sqf @@ -67,7 +67,7 @@ if (!_isLimping && {EGVAR(medical,limping) > 0}) then { (_xAmountOf > 0) && {_xDamage > LIMPING_DAMAGE_THRESHOLD} // select _causeLimping from woundDetails - && {(EGVAR(medical_damage,woundDetails) get (_xClassID / 10)) select 3} + && {(EGVAR(medical_damage,woundDetails) get (floor (_xClassID / 10))) select 3} ) exitWith { TRACE_1("limping because of wound",_x); _isLimping = true; diff --git a/addons/medical_feedback/XEH_postInit.sqf b/addons/medical_feedback/XEH_postInit.sqf index f01394e9199..731fd1f8859 100644 --- a/addons/medical_feedback/XEH_postInit.sqf +++ b/addons/medical_feedback/XEH_postInit.sqf @@ -38,7 +38,7 @@ GVAR(bloodTickCounter) = 0; if (_unit != ACE_player) exitWith {}; TRACE_1("player unconscious eh",_unconscious); - if (_unconscious && {cameraView == "GUNNER"} && {(vehicle _unit) != _unit} && {cameraOn == vehicle _unit}) then { + if (_unconscious && {cameraView == "GUNNER"} && {!isNull objectParent _unit} && {cameraOn == vehicle _unit}) then { TRACE_2("exiting gunner view",cameraOn,cameraView); ACE_player switchCamera "INTERNAL"; }; diff --git a/addons/medical_gui/functions/fnc_canOpenMenu.sqf b/addons/medical_gui/functions/fnc_canOpenMenu.sqf index fc2ac3879e7..d8344a4012a 100644 --- a/addons/medical_gui/functions/fnc_canOpenMenu.sqf +++ b/addons/medical_gui/functions/fnc_canOpenMenu.sqf @@ -28,4 +28,4 @@ if (!isNull findDisplay 312) exitWith { _player call EFUNC(common,isAwake) && {!isNull _target} && {_player distance _target < GVAR(maxDistance) || {vehicle _player == vehicle _target}} && -{GVAR(enableMedicalMenu) == 1 || {GVAR(enableMedicalMenu) == 2 && {vehicle _player != _player || {vehicle _target != _target}}}} +{GVAR(enableMedicalMenu) == 1 || {GVAR(enableMedicalMenu) == 2 && {!isNull objectParent _player || {!isNull objectParent _target}}}} diff --git a/addons/medical_gui/functions/fnc_displayPatientInformation.sqf b/addons/medical_gui/functions/fnc_displayPatientInformation.sqf index 65660eec798..abea0ec07bb 100644 --- a/addons/medical_gui/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical_gui/functions/fnc_displayPatientInformation.sqf @@ -40,6 +40,7 @@ if (isNull _display) then { if (ACE_player distance _target > MAX_DISTANCE && {vehicle _target != vehicle ACE_player}) exitWith { [_pfhID] call CBA_fnc_removePerFrameHandler; QGVAR(RscPatientInfo) cutFadeOut 0.3; + if (((getPosATL _target) # 2) < -9) exitWith {}; // handle dragging corpse/clone [[ELSTRING(medical,DistanceToFar), _target call EFUNC(common,getName)], 2] call EFUNC(common,displayTextStructured); }; diff --git a/addons/medical_gui/functions/fnc_menuPFH.sqf b/addons/medical_gui/functions/fnc_menuPFH.sqf index b3d51c2dc9c..0e213eaf5ec 100644 --- a/addons/medical_gui/functions/fnc_menuPFH.sqf +++ b/addons/medical_gui/functions/fnc_menuPFH.sqf @@ -23,6 +23,8 @@ if !( closeDialog 0; // Show hint if distance condition failed if ((ACE_player distance GVAR(target) > GVAR(maxDistance)) && {vehicle ACE_player != vehicle GVAR(target)}) then { + if (((getPosATL GVAR(target)) # 2) < -9) exitWith {}; // handle dragging corpse/clone + [[ELSTRING(medical,DistanceToFar), GVAR(target) call EFUNC(common,getName)], 2] call EFUNC(common,displayTextStructured); }; }; diff --git a/addons/medical_status/functions/fnc_addInventoryActions.sqf b/addons/medical_status/functions/fnc_addInventoryActions.sqf index 8041eb06135..e4e65a31649 100644 --- a/addons/medical_status/functions/fnc_addInventoryActions.sqf +++ b/addons/medical_status/functions/fnc_addInventoryActions.sqf @@ -46,5 +46,6 @@ _unit addAction ["OpenBag", { {!lockedInventory _backpackContainer} && {maxLoad _backpackContainer > 0} && {getNumber (_backpackConfig >> "disableInventory") != 1} && + {!(_target isKindOf QEGVAR(dragging,clone))} && {_target setUserActionText [_actionId, format [localize "STR_ACTION_OPEN_BAG", getText (_backpackConfig >> "displayName")]]; true} }, 2]; diff --git a/addons/medical_treatment/XEH_postInit.sqf b/addons/medical_treatment/XEH_postInit.sqf index 0752e67ddf4..63d2f7d0967 100644 --- a/addons/medical_treatment/XEH_postInit.sqf +++ b/addons/medical_treatment/XEH_postInit.sqf @@ -80,7 +80,7 @@ if (["ace_trenches"] call EFUNC(common,isModLoaded)) then { {!isNil {_target getVariable QGVAR(headstoneData)}} ] call EFUNC(interact_menu,createAction); - [missionNameSpace getVariable [QGVAR(graveClassname), "ACE_Grave"], 0, [], _checkHeadstoneAction] call EFUNC(interact_menu,addActionToClass); + [missionNamespace getVariable [QGVAR(graveClassname), "ACE_Grave"], 0, [], _checkHeadstoneAction] call EFUNC(interact_menu,addActionToClass); }; if (isServer) then { diff --git a/addons/medical_treatment/functions/fnc_canTreat_holsterCheck.sqf b/addons/medical_treatment/functions/fnc_canTreat_holsterCheck.sqf index c903fc88d7b..94c0e63fffe 100644 --- a/addons/medical_treatment/functions/fnc_canTreat_holsterCheck.sqf +++ b/addons/medical_treatment/functions/fnc_canTreat_holsterCheck.sqf @@ -20,8 +20,8 @@ params ["_medic", "_patient", "_config"]; GVAR(holsterRequired) == 0 -|| {vehicle _medic != _medic} // medic is in a vehicle, so weapon is considered holstered -|| {vehicle _patient != _patient} // patient is in a vehicle, ^ +|| {!isNull objectParent _medic} // medic is in a vehicle, so weapon is considered holstered +|| {!isNull objectParent _patient} // patient is in a vehicle, ^ || {(GVAR(holsterRequired) in [2,4]) && {getText (_config >> "category") == "examine"}} // if examine bypass is on || {currentWeapon _medic isEqualTo ""} // weapon is holstered || {(GVAR(holsterRequired) <= 2) && {weaponLowered _medic}} // if just lowered is allowed diff --git a/addons/medical_treatment/functions/fnc_createLitter.sqf b/addons/medical_treatment/functions/fnc_createLitter.sqf index df9c2e7f4de..4a873272aa8 100644 --- a/addons/medical_treatment/functions/fnc_createLitter.sqf +++ b/addons/medical_treatment/functions/fnc_createLitter.sqf @@ -24,7 +24,7 @@ if (!GVAR(allowLitterCreation)) exitWith {}; params ["_medic", "_patient", "_bodyPart", "_classname"]; // Don't create litter if medic or patient are inside a vehicle -if (vehicle _medic != _medic || {vehicle _patient != _patient}) exitWith {}; +if (!isNull objectParent _medic || {!isNull objectParent _patient}) exitWith {}; // Determine if treated body part is bleeding private _index = ALL_BODY_PARTS find toLowerANSI _bodyPart; diff --git a/addons/medical_treatment/functions/fnc_diagnose.sqf b/addons/medical_treatment/functions/fnc_diagnose.sqf index 5605cd27941..258f14617e8 100644 --- a/addons/medical_treatment/functions/fnc_diagnose.sqf +++ b/addons/medical_treatment/functions/fnc_diagnose.sqf @@ -44,6 +44,8 @@ if (alive _patient) then { } else { _messages pushBack LSTRING(noPain); }; +} else { + _messages pushBack ""; }; [_messages, 3] call EFUNC(common,displayTextStructured); diff --git a/addons/medical_treatment/functions/fnc_hasItem.sqf b/addons/medical_treatment/functions/fnc_hasItem.sqf index e0ef4c8a4fe..8faea65652f 100644 --- a/addons/medical_treatment/functions/fnc_hasItem.sqf +++ b/addons/medical_treatment/functions/fnc_hasItem.sqf @@ -31,7 +31,7 @@ private _fnc_checkItems = { _unitItems append (itemCargo _unitVehicle); _unitItems append (magazineCargo _unitVehicle); }; - _items findIf {_x in _unitItems} != -1 + _items findAny _unitItems != -1 }; _medic call _fnc_checkItems || {GVAR(allowSharedEquipment) != 2 && {_patient call _fnc_checkItems}} diff --git a/addons/medical_treatment/functions/fnc_ivBag.sqf b/addons/medical_treatment/functions/fnc_ivBag.sqf index 7f56f332b30..a856afec32a 100644 --- a/addons/medical_treatment/functions/fnc_ivBag.sqf +++ b/addons/medical_treatment/functions/fnc_ivBag.sqf @@ -25,4 +25,4 @@ params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"]; [_patient, _usedItem] call FUNC(addToTriageCard); [_patient, "activity", LSTRING(Activity_gaveIV), [[_medic, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); -[QGVAR(ivBagLocal), [_patient, _bodyPart, _classname], _patient] call CBA_fnc_targetEvent; +[QGVAR(ivBagLocal), [_patient, _bodyPart, _classname, _medic], _patient] call CBA_fnc_targetEvent; diff --git a/addons/medical_treatment/functions/fnc_ivBagLocal.sqf b/addons/medical_treatment/functions/fnc_ivBagLocal.sqf index 80f06fc11e0..91a1db54a3f 100644 --- a/addons/medical_treatment/functions/fnc_ivBagLocal.sqf +++ b/addons/medical_treatment/functions/fnc_ivBagLocal.sqf @@ -1,29 +1,41 @@ #include "..\script_component.hpp" /* - * Author: Glowbal, mharis001 + * Author: Glowbal, mharis001, Cplhardcore * Local callback for administering an IV bag to a patient. * * Arguments: * 0: Patient * 1: Body Part * 2: Treatment + * 3: Medic * * Return Value: * None * * Example: - * [player, "RightArm", "BloodIV"] call ace_medical_treatment_fnc_ivBagLocal + * [player, "RightArm", "BloodIV", player] call ace_medical_treatment_fnc_ivBagLocal * * Public: No */ -params ["_patient", "_bodyPart", "_classname"]; +params ["_patient", "_bodyPart", "_classname", "_medic"]; // Exit if patient has max blood volume private _bloodVolume = GET_BLOOD_VOLUME(_patient); -if (_bloodVolume >= DEFAULT_BLOOD_VOLUME) exitWith {}; +if (_bloodVolume >= DEFAULT_BLOOD_VOLUME) exitWith { + // Return the bag if patient is topped up on blood + if (_medic call EFUNC(common,isPlayer)) then { + private _receiver = [_patient, _medic, _medic] select GVAR(allowSharedEquipment); + [_receiver, _classname] call EFUNC(common,addToInventory); + } else { + // If the medic is AI, only return bag if enabled + if (missionNamespace getVariable [QEGVAR(medical_ai,requireItems), 0] > 0) then { + [_medic, _classname] call EFUNC(common,addToInventory); + }; + }; +}; -private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; // Get attributes for the used IV private _defaultConfig = configFile >> QUOTE(ADDON) >> "IV"; diff --git a/addons/medical_treatment/functions/fnc_medicationLocal.sqf b/addons/medical_treatment/functions/fnc_medicationLocal.sqf index 0b23b365e84..18ef4e4d680 100644 --- a/addons/medical_treatment/functions/fnc_medicationLocal.sqf +++ b/addons/medical_treatment/functions/fnc_medicationLocal.sqf @@ -49,7 +49,7 @@ TRACE_1("Running treatmentMedicationLocal with Advanced configuration for",_pati // Handle tourniquet on body part blocking blood flow at injection site -private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; if (HAS_TOURNIQUET_APPLIED_ON(_patient,_partIndex)) exitWith { TRACE_1("unit has tourniquets blocking blood flow on injection site",_tourniquets); diff --git a/addons/medical_treatment/functions/fnc_placeBodyBagInGrave.sqf b/addons/medical_treatment/functions/fnc_placeBodyBagInGrave.sqf index 82cd2bc080b..55908b1e17d 100644 --- a/addons/medical_treatment/functions/fnc_placeBodyBagInGrave.sqf +++ b/addons/medical_treatment/functions/fnc_placeBodyBagInGrave.sqf @@ -29,7 +29,7 @@ TRACE_2("placeBodyBagInGrave",_bodybag,_medic); if (GVAR(graveDiggingMarker)) then { _graveClassname = missionNamespace getVariable [QGVAR(graveClassname), "ACE_Grave"]; }; - private _graveRotation = missionNameSpace getVariable [QGVAR(graveRotation), 0]; + private _graveRotation = missionNamespace getVariable [QGVAR(graveRotation), 0]; [[_medic, _bodybag], _graveClassname, [0,0,0], _graveRotation, true] call FUNC(placeInBodyBagOrGrave); }, diff --git a/addons/medical_treatment/functions/fnc_placeInBodyBagOrGrave.sqf b/addons/medical_treatment/functions/fnc_placeInBodyBagOrGrave.sqf index b72d0ddda47..fb0536db54f 100644 --- a/addons/medical_treatment/functions/fnc_placeInBodyBagOrGrave.sqf +++ b/addons/medical_treatment/functions/fnc_placeInBodyBagOrGrave.sqf @@ -69,7 +69,7 @@ if (_restingPlaceClass != "") then { // Server will handle hiding and deleting the body // Keep event name as body bag only to avoid breaking things for others -["ace_placedInBodyBag", [_patient, _restingPlace, _isGrave]] call CBA_fnc_globalEvent; +["ace_placedInBodyBag", [_patient, _restingPlace, _isGrave, _medic]] call CBA_fnc_globalEvent; if (_isGrave) then { - ["ace_placedInGrave", [_patient, _restingPlace]] call CBA_fnc_globalEvent; + ["ace_placedInGrave", [_patient, _restingPlace, _medic]] call CBA_fnc_globalEvent; }; diff --git a/addons/medical_treatment/functions/fnc_placeInGrave.sqf b/addons/medical_treatment/functions/fnc_placeInGrave.sqf index 6bea5c6db96..afc6a1fe4a2 100644 --- a/addons/medical_treatment/functions/fnc_placeInGrave.sqf +++ b/addons/medical_treatment/functions/fnc_placeInGrave.sqf @@ -27,7 +27,7 @@ private _graveClassname = ""; if (GVAR(graveDiggingMarker)) then { _graveClassname = missionNamespace getVariable [QGVAR(graveClassname), "ACE_Grave"]; }; -private _graveRotation = missionNameSpace getVariable [QGVAR(graveRotation), 0]; +private _graveRotation = missionNamespace getVariable [QGVAR(graveRotation), 0]; [_this, _graveClassname, [0,0,0], _graveRotation, true] call FUNC(placeInBodyBagOrGrave) diff --git a/addons/medical_treatment/functions/fnc_splintLocal.sqf b/addons/medical_treatment/functions/fnc_splintLocal.sqf index ee15a63bf0c..4861f428cdd 100644 --- a/addons/medical_treatment/functions/fnc_splintLocal.sqf +++ b/addons/medical_treatment/functions/fnc_splintLocal.sqf @@ -20,7 +20,7 @@ params ["_medic", "_patient", "_bodyPart"]; TRACE_3("splintLocal",_medic,_patient,_bodyPart); -private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; private _fractures = GET_FRACTURES(_patient); _fractures set [_partIndex, -1]; diff --git a/addons/medical_treatment/functions/fnc_tourniquetLocal.sqf b/addons/medical_treatment/functions/fnc_tourniquetLocal.sqf index 9a0480bcb01..0ed8afd37c9 100644 --- a/addons/medical_treatment/functions/fnc_tourniquetLocal.sqf +++ b/addons/medical_treatment/functions/fnc_tourniquetLocal.sqf @@ -19,7 +19,7 @@ params ["_patient", "_bodyPart"]; TRACE_2("tourniquetLocal",_patient,_bodyPart); -private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; private _tourniquets = GET_TOURNIQUETS(_patient); _tourniquets set [_partIndex, CBA_missionTime]; diff --git a/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf b/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf index 97680353e45..80dab5094cf 100644 --- a/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf +++ b/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf @@ -22,7 +22,7 @@ params ["_medic", "_patient", "_bodyPart"]; TRACE_3("tourniquetRemove",_medic,_patient,_bodyPart); // Remove tourniquet from body part, exit if no tourniquet applied -private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; private _tourniquets = GET_TOURNIQUETS(_patient); if (_tourniquets select _partIndex == 0) exitWith { diff --git a/addons/medical_treatment/functions/fnc_treatment.sqf b/addons/medical_treatment/functions/fnc_treatment.sqf index 5f6df40e31c..4a28212966d 100644 --- a/addons/medical_treatment/functions/fnc_treatment.sqf +++ b/addons/medical_treatment/functions/fnc_treatment.sqf @@ -97,7 +97,7 @@ if (_medic isNotEqualTo player || {!_isInZeus}) then { }; // Play treatment animation for medic and determine the ending animation - if (vehicle _medic == _medic && {_medicAnim != ""}) then { + if (isNull objectParent _medic && {_medicAnim != ""}) then { // Speed up animation based on treatment time (but cap max to prevent odd animiations/cam shake) private _animRatio = _animDuration / _treatmentTime; TRACE_3("setAnimSpeedCoef",_animRatio,_animDuration,_treatmentTime); diff --git a/addons/medical_treatment/stringtable.xml b/addons/medical_treatment/stringtable.xml index cbe76041a0c..b0d140d8255 100644 --- a/addons/medical_treatment/stringtable.xml +++ b/addons/medical_treatment/stringtable.xml @@ -86,6 +86,7 @@ Aktiviert & kann Tod/Herzstillstand diagnostizieren [Direkt] Abilitato e può diagnosticare Morte/Arresto Cardiaco [Esplicito] Activé & peut diagnostiquer la mort/l'arrêt cardiaque [Direct]. + Habilitado y poder diagnosticar Muerte/Parada cardíaca [Directamente] Advanced Medication @@ -4220,6 +4221,7 @@ %1 ist bewusstlos %1 è privo di sensi %1 est inconscient + %1 está inconsciente %1 is not responsive, taking shallow gasps and convulsing @@ -4242,6 +4244,7 @@ %1 ist im Herzstillstand %1 è in arresto cardiaco %1 est en arrêt cardiaque + %1 en parada cardíaca %1 is not responsive, motionless and cold @@ -4264,6 +4267,7 @@ %1 ist tod %1 è morto %1 est mort + %1 está muerto You checked %1 diff --git a/addons/metis/CfgAmmo.hpp b/addons/metis/CfgAmmo.hpp index c070343253a..4a6fe513d23 100644 --- a/addons/metis/CfgAmmo.hpp +++ b/addons/metis/CfgAmmo.hpp @@ -1,3 +1,4 @@ +class ace_missileguidance_type_Metis; class CfgAmmo { class M_Vorona_HEAT; class GVAR(HEAT): M_Vorona_HEAT { @@ -7,42 +8,8 @@ class CfgAmmo { airLock = 0; lockType = 0; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Metis { enabled = 1; - - pitchRate = 50; // Minium flap deflection for guidance - yawRate = 50; // Maximum flap deflection for guidance - initialPitch = 2; - - canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode - - showTrail = 1; - - // Guidance type for munitions - defaultSeekerType = "SACLOS"; - seekerTypes[] = { "SACLOS" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - defaultNavigationType = "Line"; - navigationTypes[] = { "Line" }; - - lineGainP = 10; - lineGainD = 9; - - seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] - seekerAngle = 15; // Angle from the shooter's view that can track the missile - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 80; - seekerMaxRange = 2000; // Range from the missile which the seeker can visually search - - offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. - - // Attack profile type selection - defaultAttackProfile = "WIRE"; - attackProfiles[] = {"WIRE"}; }; }; @@ -54,40 +21,8 @@ class CfgAmmo { airLock = 0; lockType = 0; - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Metis { enabled = 1; - - pitchRate = 25; // Minium flap deflection for guidance - yawRate = 25; // Maximum flap deflection for guidance - - canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode - - // Guidance type for munitions - defaultSeekerType = "SACLOS"; - seekerTypes[] = { "SACLOS" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - defaultNavigationType = "Line"; - navigationTypes[] = { "Line" }; - - lineGainP = 21; - lineGainD = 18; - - seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] - seekerAngle = 15; // Angle from the shooter's view that can track the missile - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 80; - seekerMaxRange = 2000; // Range from the missile which the seeker can visually search - - correctionDistance = 1; // distance from center of crosshair where missile slows down - offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. - - // Attack profile type selection - defaultAttackProfile = "WIRE"; - attackProfiles[] = {"WIRE"}; }; }; }; diff --git a/addons/microdagr/CfgUIGrids.hpp b/addons/microdagr/CfgUIGrids.hpp index 5d7b921800a..3c5379f879d 100644 --- a/addons/microdagr/CfgUIGrids.hpp +++ b/addons/microdagr/CfgUIGrids.hpp @@ -3,7 +3,7 @@ class CfgUIGrids { class Presets { class Arma3 { class Variables { - grid_ACE_microDagr[] = {{"(safezoneX + safezoneW - 11 * (((safezoneW / safezoneH) min 1.2) / 40))","(safezoneY + safezoneH - 15 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))","(10 * (((safezoneW / safezoneH) min 1.2) / 40))","(10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))"},"(((safezoneW / safezoneH) min 1.2) / 40)","((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"}; + grid_ACE_microDagr[] = {{"(safeZoneX + safeZoneW - 11 * (((safeZoneW / safeZoneH) min 1.2) / 40))","(safeZoneY + safeZoneH - 15 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25))","(10 * (((safeZoneW / safeZoneH) min 1.2) / 40))","(10 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25))"},"(((safeZoneW / safeZoneH) min 1.2) / 40)","((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"}; }; }; }; diff --git a/addons/microdagr/functions/fnc_canShow.sqf b/addons/microdagr/functions/fnc_canShow.sqf index 141fad9ed01..fcc99f6dbf2 100644 --- a/addons/microdagr/functions/fnc_canShow.sqf +++ b/addons/microdagr/functions/fnc_canShow.sqf @@ -26,7 +26,7 @@ _returnValue = switch (_showType) do { }; case (DISPLAY_MODE_DISPLAY): { //Can't have minimap up while zoomed in on foot, but allow drivers to use while in "Gunner" to handle non-3d vehicles like most tanks - ((cameraView != "GUNNER") || {(vehicle ACE_player != ACE_player) && {driver vehicle ACE_player == ACE_player}}) && + ((cameraView != "GUNNER") || {(!isNull objectParent ACE_player) && {driver vehicle ACE_player == ACE_player}}) && {"ACE_microDAGR" in (ACE_player call EFUNC(common,uniqueItems))} && {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)} }; diff --git a/addons/microdagr/functions/fnc_showApplicationPage.sqf b/addons/microdagr/functions/fnc_showApplicationPage.sqf index 75f817ad3f3..daa5edd28a5 100644 --- a/addons/microdagr/functions/fnc_showApplicationPage.sqf +++ b/addons/microdagr/functions/fnc_showApplicationPage.sqf @@ -57,8 +57,8 @@ if (GVAR(currentApplicationPage) == APP_MODE_INFODISPLAY) then { (_display displayCtrl IDC_MAPDETAILS) ctrlShow ((GVAR(currentApplicationPage) == APP_MODE_MAP) && {GVAR(mapShowTexture)}); if (GVAR(currentApplicationPage) == APP_MODE_MAP) then { - _theMap = if (!GVAR(mapShowTexture)) then {_display displayCtrl IDC_MAPPLAIN} else {_display displayCtrl IDC_MAPDETAILS}; - _mapSize = (ctrlPosition _theMap) select 3; + private _theMap = if (GVAR(mapShowTexture)) then {_display displayCtrl IDC_MAPDETAILS} else {_display displayCtrl IDC_MAPPLAIN}; + private _mapSize = (ctrlPosition _theMap) select 3; _theMap ctrlMapAnimAdd [0, (GVAR(mapZoom) / _mapSize), GVAR(mapPosition)]; ctrlMapAnimCommit _theMap; if (GVAR(mapAutoTrackPosition)) then { diff --git a/addons/microdagr/functions/fnc_updateDisplay.sqf b/addons/microdagr/functions/fnc_updateDisplay.sqf index 3e5775b86dc..e5de2b2fe49 100644 --- a/addons/microdagr/functions/fnc_updateDisplay.sqf +++ b/addons/microdagr/functions/fnc_updateDisplay.sqf @@ -24,7 +24,7 @@ if (isNull _display) exitWith {ERROR("No Display");}; private _daylight = [] call EFUNC(common,ambientBrightness); (_display displayCtrl IDC_MICRODAGRSHELL) ctrlSetTextColor [_daylight, _daylight, _daylight, 1]; -(_display displayCtrl IDC_CLOCKTEXT) ctrlSetText ([daytime, "HH:MM"] call bis_fnc_timeToString); +(_display displayCtrl IDC_CLOCKTEXT) ctrlSetText ([dayTime, "HH:MM"] call bis_fnc_timeToString); private _waypoints = [] call FUNC(deviceGetWaypoints); @@ -61,7 +61,7 @@ case (APP_MODE_INFODISPLAY): { private _dayString = if ((date select 2) < 10) then {"0" + str (date select 2)} else {str (date select 2)}; (_display displayCtrl IDC_MODEDISPLAY_TIMEDISPLAYGREEN1) ctrlSetText format ["%1-%2-%3", _yearString, _monthSring, _dayString]; //"18-Feb-2010"; - (_display displayCtrl IDC_MODEDISPLAY_TIMEDISPLAYGREEN2) ctrlSetText ([daytime, "HH:MM:SS"] call bis_fnc_timeToString); + (_display displayCtrl IDC_MODEDISPLAY_TIMEDISPLAYGREEN2) ctrlSetText ([dayTime, "HH:MM:SS"] call bis_fnc_timeToString); } else { private _targetPosName = ""; private _targetPosLocationASL = []; diff --git a/addons/microdagr/gui.hpp b/addons/microdagr/gui.hpp index 1404f6b81db..2a3f52deb43 100644 --- a/addons/microdagr/gui.hpp +++ b/addons/microdagr/gui.hpp @@ -40,8 +40,8 @@ class GVAR(RscText): RscText { }; //Redfine Scaling for the Dialog -#define X_PART(num) QUOTE((((60 - 25)/2) + (num)) * (safeZoneH / 64) + (safezoneX + (safezoneW - safeZoneH)/2)) -#define Y_PART(num) QUOTE((0 + (num)) * (safeZoneH / 36) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)) +#define X_PART(num) QUOTE((((60 - 25)/2) + (num)) * (safeZoneH / 64) + (safeZoneX + (safeZoneW - safeZoneH)/2)) +#define Y_PART(num) QUOTE((0 + (num)) * (safeZoneH / 36) + (safeZoneY + (safeZoneH - (safeZoneH / 1.2))/2)) #define W_PART(num) QUOTE((num) * (safeZoneH / 64)) #define H_PART(num) QUOTE((num) * (safeZoneH / 36)) diff --git a/addons/minedetector/XEH_postInit.sqf b/addons/minedetector/XEH_postInit.sqf index f5f5de0ca8a..0671699f9e8 100644 --- a/addons/minedetector/XEH_postInit.sqf +++ b/addons/minedetector/XEH_postInit.sqf @@ -16,9 +16,9 @@ addMissionEventHandler ["Draw3D", { { private _name = format ["%1@%2", typeOf _x, (floor ((_x distance _detectorPointAGL) * 10)) / 10]; if ((getNumber (configOf _x >> QGVAR(detectable))) == 1) then { - drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,0,0,1], (ASLtoAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; + drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,0,0,1], (ASLToAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; } else { - drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,1,0,1], (ASLtoAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; + drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,1,0,1], (ASLToAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; }; } forEach _mines; }]; diff --git a/addons/minedetector/XEH_preInit.sqf b/addons/minedetector/XEH_preInit.sqf index b47cf6628db..3641c78b702 100644 --- a/addons/minedetector/XEH_preInit.sqf +++ b/addons/minedetector/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +GVAR(detectableClasses) = +(uiNamespace getVariable QGVAR(detectableClasses)); + ADDON = true; diff --git a/addons/minedetector/functions/fnc_getDetectedObject.sqf b/addons/minedetector/functions/fnc_getDetectedObject.sqf index 7811b3eaaa8..8cc95ac4226 100644 --- a/addons/minedetector/functions/fnc_getDetectedObject.sqf +++ b/addons/minedetector/functions/fnc_getDetectedObject.sqf @@ -43,7 +43,7 @@ private _distance = -1; }; // If an object was detected, exit the search - if ((typeOf _x) in (uiNamespace getVariable QGVAR(detectableClasses))) exitWith { + if ((typeOf _x) in GVAR(detectableClasses)) exitWith { _isDetectable = true; _distance = _detectorPointAGL distance _x; _mine = _x; diff --git a/addons/missile_gbu/$PBOPREFIX$ b/addons/missile_gbu/$PBOPREFIX$ new file mode 100644 index 00000000000..3249d48864f --- /dev/null +++ b/addons/missile_gbu/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\missile_gbu \ No newline at end of file diff --git a/addons/missile_gbu/CfgAmmo.hpp b/addons/missile_gbu/CfgAmmo.hpp new file mode 100644 index 00000000000..9521c8566d1 --- /dev/null +++ b/addons/missile_gbu/CfgAmmo.hpp @@ -0,0 +1,22 @@ +class EGVAR(missileguidance,type_Paveway); +class EGVAR(missileguidance,type_KAB); +class CfgAmmo { + class Bo_GBU12_LGB; + class GVAR(12): Bo_GBU12_LGB { + maneuvrability = 0; // no maneuvrability so that default guidance doesnt work + airFriction = 0.25; // bombs have high drag who woulda thunk + class ace_missileguidance: EGVAR(missileguidance,type_Paveway) { + enabled = 1; + }; + }; + + class Bomb_03_F; + class GVAR(FAB250): Bomb_03_F { + maneuvrability = 0; // no maneuvrability so that default guidance doesnt work + airFriction = 0.25; // bombs have high drag who woulda thunk + class ace_missileguidance: EGVAR(missileguidance,type_KAB) { + enabled = 1; + }; + }; +}; + diff --git a/addons/missile_gbu/CfgMagazines.hpp b/addons/missile_gbu/CfgMagazines.hpp new file mode 100644 index 00000000000..2841a3006eb --- /dev/null +++ b/addons/missile_gbu/CfgMagazines.hpp @@ -0,0 +1,87 @@ +class CfgMagazines { + class 2Rnd_GBU12_LGB; + // GBU + class GVAR(2Rnd_12): 2Rnd_GBU12_LGB { + displayName = CSTRING(12_2x); + author = "Dani (TCVM)"; + ammo = QGVAR(12); + }; + + class 4Rnd_Bomb_04_F; + class GVAR(4Rnd_GBU12): 4Rnd_Bomb_04_F { + displayName = CSTRING(12_4x); + author = "Dani (TCVM)"; + ammo = QGVAR(12); + }; + + class magazine_Bomb_GBU12_x1; + class GVAR(gbu12): magazine_Bomb_GBU12_x1 { + displayName = CSTRING(12_1x); + author = "Dani (TCVM)"; + ammo = QGVAR(12); + }; + + class PylonMissile_1Rnd_Bomb_04_F; + class GVAR(1_PylonMissile_1Rnd_12): PylonMissile_1Rnd_Bomb_04_F { + displayName = CSTRING(12_1x); + author = "Dani (TCVM)"; + ammo = QGVAR(12); + pylonWeapon = QGVAR(12); + }; + + class 2Rnd_GBU12_LGB_MI10; + class GVAR(2Rnd_GBU12_LGB_MI10): 2Rnd_GBU12_LGB_MI10 { + displayName = CSTRING(12_2x); + author = "Dani (TCVM)"; + ammo = QGVAR(12); + pylonWeapon = QGVAR(12); + }; + + class PylonMissile_Bomb_GBU12_x1; + class GVAR(PylonMissile_Bomb_GBU12_x1): PylonMissile_Bomb_GBU12_x1 { + displayName = CSTRING(12_1x); + author = "Dani (TCVM)"; + ammo = QGVAR(12); + pylonWeapon = QGVAR(12); + }; + + class PylonRack_Bomb_GBU12_x2; + class GVAR(PylonRack_Bomb_GBU12_x2): PylonRack_Bomb_GBU12_x2 { + displayName = CSTRING(12_2x); + author = "Dani (TCVM)"; + ammo = QGVAR(12); + pylonWeapon = QGVAR(12); + }; + + // KAB + class magazine_Bomb_KAB250_x1; + class GVAR(1Rnd_FAB250): magazine_Bomb_KAB250_x1 { + displayName = CSTRING(fab250_1x); + author = "Dani (TCVM)"; + ammo = QGVAR(FAB250); + }; + + class PylonMissile_Bomb_KAB250_x1; + class GVAR(1_PylonMissile_1Rnd_FAB250): PylonMissile_Bomb_KAB250_x1 { + displayName = CSTRING(fab250_1x); + author = "Dani (TCVM)"; + ammo = QGVAR(FAB250); + pylonWeapon = QGVAR(FAB250); + }; + + class 2Rnd_Bomb_03_F; + class GVAR(2Rnd_FAB250): 2Rnd_Bomb_03_F { + displayName = CSTRING(fab250_2x); + author = "Dani (TCVM)"; + ammo = QGVAR(FAB250); + }; + + class PylonMissile_1Rnd_Bomb_03_F; + class GVAR(PylonMissile_1Rnd_FAB250): PylonMissile_1Rnd_Bomb_03_F { + displayName = CSTRING(fab250_1x); + author = "Dani (TCVM)"; + ammo = QGVAR(FAB250); + pylonWeapon = QGVAR(FAB250); + }; +}; + diff --git a/addons/missile_gbu/CfgWeapons.hpp b/addons/missile_gbu/CfgWeapons.hpp new file mode 100644 index 00000000000..0728f93f7c2 --- /dev/null +++ b/addons/missile_gbu/CfgWeapons.hpp @@ -0,0 +1,32 @@ +class CfgWeapons { + class weapon_LGBLauncherBase; + class GVAR(12): weapon_LGBLauncherBase { + displayName = CSTRING(12); + magazines[] = { + QGVAR(2Rnd_12), + QGVAR(2Rnd_GBU12_LGB_MI10), + QGVAR(4Rnd_GBU12), + QGVAR(gbu12), + QGVAR(1_PylonMissile_1Rnd_12), + QGVAR(PylonMissile_Bomb_GBU12_x1), + QGVAR(PylonRack_Bomb_GBU12_x2) + }; + + EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code) + EGVAR(laser,showHud) = 1; // show attack profile / lock on hud + }; + + class GVAR(FAB250): weapon_LGBLauncherBase { + displayName = CSTRING(fab250); + magazines[] = { + QGVAR(1Rnd_FAB250), + QGVAR(2Rnd_FAB250), + QGVAR(1_PylonMissile_1Rnd_FAB250), + QGVAR(PylonMissile_1Rnd_FAB250) + }; + + EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code) + EGVAR(laser,showHud) = 1; // show attack profile / lock on hud + }; +}; + diff --git a/addons/missile_gbu/README.md b/addons/missile_gbu/README.md new file mode 100644 index 00000000000..07eb5ca8e95 --- /dev/null +++ b/addons/missile_gbu/README.md @@ -0,0 +1,4 @@ +ace_missile_gbu +=================== + +Adds GBU-12 LGB diff --git a/addons/missile_gbu/config.cpp b/addons/missile_gbu/config.cpp new file mode 100644 index 00000000000..6b84b38bb70 --- /dev/null +++ b/addons/missile_gbu/config.cpp @@ -0,0 +1,20 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common","ace_missileguidance"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Dani (TCVM)"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgAmmo.hpp" +#include "CfgMagazines.hpp" +#include "CfgWeapons.hpp" + diff --git a/addons/missile_gbu/script_component.hpp b/addons/missile_gbu/script_component.hpp new file mode 100644 index 00000000000..707200109d0 --- /dev/null +++ b/addons/missile_gbu/script_component.hpp @@ -0,0 +1,18 @@ +#define COMPONENT missile_gbu +#define COMPONENT_BEAUTIFIED Guided Bomb Unit +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_MISSILE_GBU + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MISSILE_GBU + #define DEBUG_SETTINGS DEBUG_SETTINGS_MISSILE_GBU +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + diff --git a/addons/missile_gbu/stringtable.xml b/addons/missile_gbu/stringtable.xml new file mode 100644 index 00000000000..cee2b448c60 --- /dev/null +++ b/addons/missile_gbu/stringtable.xml @@ -0,0 +1,61 @@ + + + + + GBU-12 [ACE] + GBU-12 [ACE] + GBU-12 [ACE] + GBU-12 [ACE] + GBU-12 [ACE] + GBU-12 [ACE] + + + FAB-250M-54 [ACE] + FAB-250M-54 [ACE] + FAB-250M-54 [ACE] + FAB-250M-54 [ACE] + FAB-250M-54 [ACE] + ФАБ-250M-54 [ACE] + + + 1x GBU-12 [ACE] + 1x GBU-12 [ACE] + 1x GBU-12 [ACE] + 1x GBU-12 [ACE] + 1x GBU-12 [ACE] + 1x GBU-12 [ACE] + + + 2x GBU-12 [ACE] + 2x GBU-12 [ACE] + 2x GBU-12 [ACE] + 2x GBU-12 [ACE] + 2x GBU-12 [ACE] + 2x GBU-12 [ACE] + + + 4x GBU-12 [ACE] + 4x GBU-12 [ACE] + 4x GBU-12 [ACE] + 4x GBU-12 [ACE] + 4x GBU-12 [ACE] + 4x GBU-12 [ACE] + + + 1x FAB-250M-54 [ACE] + 1x FAB-250M-54 [ACE] + 1x FAB-250M-54 [ACE] + 1x FAB-250M-54 [ACE] + 1x FAB-250M-54 [ACE] + 1x ФАБ-250M-54 [ACE] + + + 2x FAB-250M-54 [ACE] + 2x FAB-250M-54 [ACE] + 2x FAB-250M-54 [ACE] + 2x FAB-250M-54 [ACE] + 2x FAB-250M-54 [ACE] + 2x ФАБ-250M-54 [ACE] + + + diff --git a/addons/missile_vikhr/$PBOPREFIX$ b/addons/missile_vikhr/$PBOPREFIX$ new file mode 100644 index 00000000000..4522cea1660 --- /dev/null +++ b/addons/missile_vikhr/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\missile_vikhr \ No newline at end of file diff --git a/addons/missile_vikhr/CfgAmmo.hpp b/addons/missile_vikhr/CfgAmmo.hpp new file mode 100644 index 00000000000..544b9d53a5d --- /dev/null +++ b/addons/missile_vikhr/CfgAmmo.hpp @@ -0,0 +1,17 @@ +class EGVAR(missileguidance,type_Vikhr); +class CfgAmmo { + class M_Scalpel_AT; + class GVAR(9k121): M_Scalpel_AT { + author = "Dani (TCVM)"; + maneuvrability = 0; + + irLock = 0; + laserLock = 0; + manualControl = 0; + + class ace_missileguidance: EGVAR(missileguidance,type_Vikhr) { + enabled = 1; + }; + }; +}; + diff --git a/addons/missile_vikhr/CfgMagazines.hpp b/addons/missile_vikhr/CfgMagazines.hpp new file mode 100644 index 00000000000..93084a98737 --- /dev/null +++ b/addons/missile_vikhr/CfgMagazines.hpp @@ -0,0 +1,53 @@ +class CfgMagazines { + class 2Rnd_LG_scalpel; + class 6Rnd_LG_scalpel; + class 8Rnd_LG_scalpel; + class PylonRack_1Rnd_LG_scalpel; + class PylonMissile_1Rnd_LG_scalpel; + class PylonRack_3Rnd_LG_scalpel; + class PylonRack_4Rnd_LG_scalpel; + + class GVAR(2Rnd): 2Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(2x); + ammo = QGVAR(9k121); + }; + + class GVAR(6Rnd): 6Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(6x); + ammo = QGVAR(9k121); + }; + + class GVAR(8Rnd): 8Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(8x); + ammo = QGVAR(9k121); + }; + + class GVAR(PylonRack_1Rnd): PylonRack_1Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(1x); + ammo = QGVAR(9k121); + pylonWeapon = QGVAR(9k121); + }; + class GVAR(PylonMissile_1Rnd): PylonMissile_1Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(1x); + ammo = QGVAR(9k121); + pylonWeapon = QGVAR(9k121); + }; + class GVAR(PylonRack_3Rnd): PylonRack_3Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(3x); + ammo = QGVAR(9k121); + pylonWeapon = QGVAR(9k121); + }; + class GVAR(PylonRack_4Rnd): PylonRack_4Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(4x); + ammo = QGVAR(9k121); + pylonWeapon = QGVAR(9k121); + }; +}; + diff --git a/addons/missile_vikhr/CfgWeapons.hpp b/addons/missile_vikhr/CfgWeapons.hpp new file mode 100644 index 00000000000..3db46a69ab0 --- /dev/null +++ b/addons/missile_vikhr/CfgWeapons.hpp @@ -0,0 +1,17 @@ +class CfgWeapons { + class missiles_SCALPEL; + class GVAR(9k121): missiles_SCALPEL { + author = "Dani (TCVM)"; + displayName = CSTRING(9k121); + magazines[] = { + QGVAR(2Rnd), + QGVAR(6Rnd), + QGVAR(8Rnd), + QGVAR(PylonRack_1Rnd), + QGVAR(PylonMissile_1Rnd), + QGVAR(PylonRack_3Rnd), + QGVAR(PylonRack_4Rnd) + }; + }; +}; + diff --git a/addons/missile_vikhr/README.md b/addons/missile_vikhr/README.md new file mode 100644 index 00000000000..104d449fd9c --- /dev/null +++ b/addons/missile_vikhr/README.md @@ -0,0 +1,4 @@ +ace_missile_vikhr +=================== + +Adds Vikhr beam-riding ATGM diff --git a/addons/missile_vikhr/config.cpp b/addons/missile_vikhr/config.cpp new file mode 100644 index 00000000000..6b84b38bb70 --- /dev/null +++ b/addons/missile_vikhr/config.cpp @@ -0,0 +1,20 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common","ace_missileguidance"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Dani (TCVM)"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgAmmo.hpp" +#include "CfgMagazines.hpp" +#include "CfgWeapons.hpp" + diff --git a/addons/missile_vikhr/script_component.hpp b/addons/missile_vikhr/script_component.hpp new file mode 100644 index 00000000000..41f554e77f9 --- /dev/null +++ b/addons/missile_vikhr/script_component.hpp @@ -0,0 +1,18 @@ +#define COMPONENT missile_vikhr +#define COMPONENT_BEAUTIFIED Vikhr +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_MISSILE_VIKHR + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MISSILE_VIKHR + #define DEBUG_SETTINGS DEBUG_SETTINGS_MISSILE_VIKHR +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + diff --git a/addons/missile_vikhr/stringtable.xml b/addons/missile_vikhr/stringtable.xml new file mode 100644 index 00000000000..622bb3af757 --- /dev/null +++ b/addons/missile_vikhr/stringtable.xml @@ -0,0 +1,61 @@ + + + + + 9k121 Vikhr [ACE] + 9k121 Vikhr [ACE] + 9k121 Vikhr [ACE] + 9k121 ヴィーフリ [ACE] + 9K121 비흐르 [ACE] + 9k121 Вихрь [ACE] + + + 1x 9k121 Vikhr [ACE] + 1x 9k121 Vikhr [ACE] + 1x 9k121 Vikhr [ACE] + 1x 9k121 ヴィーフリ [ACE] + 1x 9K121 비흐르 [ACE] + 1x 9k121 Вихрь [ACE] + + + 2x 9k121 Vikhr [ACE] + 2x 9k121 Vikhr [ACE] + 2x 9k121 Vikhr [ACE] + 2x 9k121 ヴィーフリ [ACE] + 2x 9K121 비흐르 [ACE] + 2x 9k121 Вихрь [ACE] + + + 3x 9k121 Vikhr [ACE] + 3x 9k121 Vikhr [ACE] + 3x 9k121 Vikhr [ACE] + 3x 9k121 ヴィーフリ [ACE] + 3x 9K121 비흐르 [ACE] + 3x 9k121 Вихрь [ACE] + + + 4x 9k121 Vikhr [ACE] + 4x 9k121 Vikhr [ACE] + 4x 9k121 Vikhr [ACE] + 4x 9k121 ヴィーフリ [ACE] + 4x 9K121 비흐르 [ACE] + 4x 9k121 Вихрь [ACE] + + + 6x 9k121 Vikhr [ACE] + 6x 9k121 Vikhr [ACE] + 6x 9k121 Vikhr [ACE] + 6x 9k121 ヴィーフリ [ACE] + 6x 9K121 비흐르 [ACE] + 6x 9k121 Вихрь [ACE] + + + 8x 9k121 Vikhr [ACE] + 8x 9k121 Vikhr [ACE] + 8x 9k121 Vikhr [ACE] + 8x 9k121 ヴィーフリ [ACE] + 8x 9K121 비흐르 [ACE] + 8x 9k121 Вихрь [ACE] + + + diff --git a/addons/missileguidance/CfgAmmo.hpp b/addons/missileguidance/CfgAmmo.hpp index d9813fdf772..44e35d40811 100644 --- a/addons/missileguidance/CfgAmmo.hpp +++ b/addons/missileguidance/CfgAmmo.hpp @@ -17,33 +17,8 @@ class CfgAmmo { EGVAR(rearm,caliber) = 70; - class ADDON { + class ADDON: GVAR(type_Dagr) { enabled = 1; - - pitchRate = 40; // degrees per second - yawRate = 40; - - canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode - - // Guidance type for munitions - defaultSeekerType = "SALH"; - seekerTypes[] = { "SALH" }; - - defaultSeekerLockMode = "LOAL"; - seekerLockModes[] = { "LOAL", "LOBL" }; - - defaultNavigationType = "AugmentedProportionalNavigation"; - navigationTypes[] = { "AugmentedProportionalNavigation" }; - - seekerAngle = 90; // Angle in front of the missile which can be searched - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 1; - seekerMaxRange = 2500; // Range from the missile which the seeker can visually search - - // Attack profile type selection - defaultAttackProfile = "LIN"; - attackProfiles[] = { "LIN", "DIR", "MID", "HI" }; }; }; @@ -68,53 +43,8 @@ class CfgAmmo { initTime = 0.5; // Begin ACE guidance Configs - class ADDON { + class ADDON: GVAR(type_Javelin) { enabled = 1; - - pitchRate = 100; // degrees per second - yawRate = 100; - stabilityCoefficient = 0.2; - bangBangGuidance = 0; - - canVanillaLock = 0; - - // Guidance type for munitions - defaultSeekerType = "Optic"; - seekerTypes[] = { "Optic" }; - - defaultSeekerLockMode = "LOBL"; - seekerLockModes[] = { "LOBL" }; - - defaultNavigationType = "Direct"; - navigationTypes[] = { "Direct", "ZeroEffortMiss" }; - - navigationGain = 3; - - seekerAngle = 180; // Angle in front of the missile which can be searched - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 0; - seekerMaxRange = 2500; // Range from the missile which the seeker can visually search - - seekLastTargetPos = 1; // seek last target position [if seeker loses LOS of target, continue to last known pos] - - // Attack profile type selection - defaultAttackProfile = "JAV_TOP"; - attackProfiles[] = { "JAV_TOP", "JAV_DIR" }; - useModeForAttackProfile = 1; - - class navigationStates { - class initial { - transitionCondition = QFUNC(javelin_midCourseTransition); - navigationType = "Direct"; - }; - class terminal { - transitionCondition = ""; - navigationType = "ZeroEffortMiss"; - }; - // transitions from initial -> termimal - states[] = {"initial", "terminal"}; - }; }; }; class ACE_Javelin_FGM148_static: ACE_Javelin_FGM148 { @@ -123,6 +53,8 @@ class CfgAmmo { effectsMissileInit = "RocketBackEffectsStaticRPG"; //Explicity add guidance config - class ADDON: ADDON {}; + class ADDON: ADDON { + enabled = 1; + }; }; }; diff --git a/addons/missileguidance/CfgMissileTypesNato.hpp b/addons/missileguidance/CfgMissileTypesNato.hpp new file mode 100644 index 00000000000..87730b5ed0c --- /dev/null +++ b/addons/missileguidance/CfgMissileTypesNato.hpp @@ -0,0 +1,716 @@ +class GVAR(type_AMRAAM) { + enabled = 0; + + pitchRate = 30; // Minium flap deflection for guidance + yawRate = 30; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "DopplerRadar"; + seekerTypes[] = { "DopplerRadar" }; + lockableTypes[] = {"Air"}; + + minimumSpeedFilter = 25; // filter out targets that have a closing velocity less than this + minimumTimeFilter = 0.0001; // filter out targets that are this close to the ground (speed of light) + maxTerrainCheck = 16000; // How far we should check for terrain + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 50; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR", "LOFT"}; + useModeForAttackProfile = 1; +}; + +class GVAR(type_ASRAAM) { + enabled = 0; + + pitchRate = 100; // Minium flap deflection for guidance + yawRate = 100; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 50; + flareAngleFilter = 0.8; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 120; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.98; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 8000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Dagr) { + enabled = 0; + + pitchRate = 40; // degrees per second + yawRate = 40; + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "SALH"; + seekerTypes[] = { "SALH" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekerAngle = 90; // Angle in front of the missile which can be searched + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 1; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "LIN"; + attackProfiles[] = { "LIN", "DIR", "MID", "HI" }; +}; + +class GVAR(type_Dragon) { + enabled = 0; + + pitchRate = 0; + yawRate = 0; + + canVanillaLock = 0; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "LineOfSight"; + navigationTypes[] = { "LineOfSight" }; + + seekLastTargetPos = 0; + seekerAngle = 30; + seekerAccuracy = 1; + + seekerMinRange = 65; + seekerMaxRange = 1000; + + correctionDistance = 30; + missileLeadDistance = 0; + offsetFromCrosshair[] = { 0, 0, 0 }; + + serviceInterval = 0.33; // how many seconds between pops + serviceCharges = 32; // how many charges are in this missile + serviceChargeAcceleration = 6.5; + dragonSpeed = 100; // meters per second + + defaultAttackProfile = "DRAGON"; + attackProfiles[] = {"DRAGON"}; +}; + +class GVAR(type_ESSM) { + enabled = 0; + + pitchRate = 15; // Minium flap deflection for guidance + yawRate = 15; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "DopplerRadar"; + seekerTypes[] = { "DopplerRadar" }; + lockableTypes[] = {"Air"}; + + minimumSpeedFilter = 20; // filter out targets that have a closing velocity less than this + minimumTimeFilter = 0.00001; // filter out targets that are this close to the ground (speed of light) + maxTerrainCheck = 16000; // How far we should check for terrain + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 50; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Hellfire) { + enabled = 0; + + pitchRate = 30; // degrees per second + yawRate = 30; + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "SALH"; + seekerTypes[] = { "SALH" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Direct"; + navigationTypes[] = { "Direct", "ZeroEffortMiss" }; + + seekLastTargetPos = 1; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 70; // Angle in front of the missile which can be searched + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 1; + seekerMaxRange = 8000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "hellfire"; + attackProfiles[] = {"hellfire", "hellfire_hi", "hellfire_lo"}; + + class navigationStates { + class initial { + transitionCondition = QEFUNC(hellfire,midCourseTransition); + navigationType = "Direct"; + }; + class terminal { + transitionCondition = ""; + navigationType = "ZeroEffortMiss"; + }; + // transitions from initial -> termimal + states[] = {"initial", "terminal"}; + }; +}; + +class GVAR(type_Hot) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 7; + lineGainD = 6; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 4000; // Range from the missile which the seeker can visually search + + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Javelin) { + enabled = 0; + + pitchRate = 120; // degrees per second + yawRate = 120; + stabilityCoefficient = 0.2; + bangBangGuidance = 0; + + canVanillaLock = 0; + + // Guidance type for munitions + defaultSeekerType = "Optic"; + seekerTypes[] = { "Optic" }; + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "Direct"; + navigationTypes[] = { "Direct", "ZeroEffortMiss" }; + + navigationGain = 3; + + seekerAngle = 180; // Angle in front of the missile which can be searched + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 0; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + seekLastTargetPos = 1; // seek last target position [if seeker loses LOS of target, continue to last known pos] + + // Attack profile type selection + defaultAttackProfile = "JAV_TOP"; + attackProfiles[] = { "JAV_TOP", "JAV_DIR" }; + useModeForAttackProfile = 1; + + class navigationStates { + class initial { + transitionCondition = QFUNC(javelin_midCourseTransition); + navigationType = "Direct"; + }; + class terminal { + transitionCondition = ""; + navigationType = "ZeroEffortMiss"; + }; + // transitions from initial -> termimal + states[] = {"initial", "terminal"}; + }; +}; + +class GVAR(type_Jdam) { + enabled = 0; + + pitchRate = 15; + yawRate = 20; + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "GPS"; + seekerTypes[] = { "GPS" }; + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "LINE"; + navigationTypes[] = { "LINE" }; + + lineGainP = 50; + lineGainD = 0; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 60; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 5; + seekerMaxRange = 4000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "JDAM"; + attackProfiles[] = {"JDAM"}; +}; + +class GVAR(type_Maverick) { + enabled = 0; + + pitchRate = 15; + yawRate = 15; + + canVanillaLock = 1; + + defaultSeekerType = "Optic"; + seekerTypes[] = {"Optic"}; + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = {"LOBL"}; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 1; + seekerAngle = 60; + seekerAccuracy = 1; + + seekerMinRange = 1; + seekerMaxRange = 14000; + + defaultAttackProfile = "maverick"; + attackProfiles[] = {"maverick"}; +}; + +class GVAR(type_Milan) { + enabled = 0; + + pitchRate = 60; // Minium flap deflection for guidance + yawRate = 60; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 0; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 25; + lineGainD = 12; + + initialPitch = -0.4; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 5; // Angle from the shooter's view that can track the missile, implemented + seekerAccuracy = 1; // seeker accuracy multiplier, not implemented? + + seekerMinRange = 100; + seekerMaxRange = 2000; // Range from the missile which the seeker can visually search + + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Nlaw) { + enabled = 0; + + pitchRate = 5; // Minium flap deflection for guidance + yawRate = 10; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = QEGVAR(nlaw,seeker); + seekerTypes[] = {QEGVAR(nlaw,seeker)}; + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = {"LOBL"}; + + defaultNavigationType = QEGVAR(nlaw,PLOS); + navigationTypes[] = { QEGVAR(nlaw,PLOS) }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle in front of the missile which can be searched + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 0; + seekerMaxRange = 10; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = QEGVAR(nlaw,directAttack); + attackProfiles[] = {QEGVAR(nlaw,directAttack), QEGVAR(nlaw,overflyTopAttack)}; + useModeForAttackProfile = 1; + showHintOnCycle = 1; + + // Run once at fired event + onFired = QEFUNC(nlaw,onFired); +}; + +class GVAR(type_Patriot) { + enabled = 0; + + pitchRate = 30; // Minium flap deflection for guidance + yawRate = 30; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "DopplerRadar"; + seekerTypes[] = { "DopplerRadar" }; + lockableTypes[] = {"Air"}; + + minimumSpeedFilter = 10; // filter out targets that have a closing velocity less than this + minimumTimeFilter = 0.00001; // filter out targets that are this close to the ground (speed of light) + maxTerrainCheck = 16000; // How far we should check for terrain + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 50; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Paveway) { + enabled = 0; + + pitchRate = 5; + yawRate = 5; + + bangBangGuidance = 1; + stabilityCoefficient = 0.4; // how much this projectile likes to "weathervane" (keep direction toward velocity) + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "SALH"; + seekerTypes[] = { "SALH" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL" }; + + defaultNavigationType = "Direct"; + navigationTypes[] = { "Direct" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 60; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 5; + seekerMaxRange = 4000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_RAM) { + enabled = 0; + + pitchRate = 50; // Minium flap deflection for guidance + yawRate = 50; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 100; + flareAngleFilter = 0.5; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.8; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_RBS70) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 20; + lineGainD = 16; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Redeye) { + enabled = 0; + + pitchRate = 27; // Minium flap deflection for guidance + yawRate = 27; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 100; + flareAngleFilter = 2.0; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "ProportionalNavigation"; + navigationTypes[] = { "ProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.4; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 4500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Sidewinder) { + enabled = 0; + + pitchRate = 25; // Minium flap deflection for guidance + yawRate = 25; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 100; + flareAngleFilter = 1.6; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.8; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Stinger) { + enabled = 0; + + pitchRate = 42; // Minium flap deflection for guidance + yawRate = 42; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 100; + flareAngleFilter = 1.3; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.8; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_TOW) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 20; + lineGainD = 7; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 65; + seekerMaxRange = 3750; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; \ No newline at end of file diff --git a/addons/missileguidance/CfgMissileTypesWarsaw.hpp b/addons/missileguidance/CfgMissileTypesWarsaw.hpp new file mode 100644 index 00000000000..180d8a98954 --- /dev/null +++ b/addons/missileguidance/CfgMissileTypesWarsaw.hpp @@ -0,0 +1,901 @@ +class GVAR(type_Ataka) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 6000; // Range from the missile which the seeker can visually search + + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Bastion) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 6000; // Range from the missile which the seeker can visually search + + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Drakon) { + enabled = 0; + + pitchRate = 25; // Minium flap deflection for guidance + yawRate = 25; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 9.5; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 3300; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Fagot) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 2000; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Falanga) { + enabled = 0; + + pitchRate = 15; // Minium flap deflection for guidance + yawRate = 15; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "MCLOS"; + seekerTypes[] = { "MCLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 5; + lineGainD = 0; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 0; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + correctionDistance = 0; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Fleyta) { + enabled = 0; + + pitchRate = 15; // Minium flap deflection for guidance + yawRate = 15; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "MCLOS"; + seekerTypes[] = { "MCLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 5; + lineGainD = 0; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 0; + seekerMaxRange = 3000; // Range from the missile which the seeker can visually search + + correctionDistance = 0; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Igla) { + enabled = 0; + + pitchRate = 30; // Minium flap deflection for guidance + yawRate = 43; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 100; + flareAngleFilter = 1.1; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.76; // seeker accuracy multiplier + + seekerMinRange = 5; + seekerMaxRange = 5200; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_KAB) { + enabled = 0; + + pitchRate = 8; + yawRate = 8; + + bangBangGuidance = 1; + stabilityCoefficient = 0.4; // how much this projectile likes to "weathervane" (keep direction toward velocity) + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "SALH"; + seekerTypes[] = { "SALH" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL" }; + + defaultNavigationType = "Direct"; + navigationTypes[] = { "Direct" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 60; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 5; + seekerMaxRange = 4000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_KH25) { + enabled = 0; + + pitchRate = 20; + yawRate = 20; + + canVanillaLock = 0; + + defaultSeekerType = "SALH"; + seekerTypes[] = {"SALH"}; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = {"LOAL"}; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 1; + seekerAngle = 40; + seekerAccuracy = 1; + + seekerMinRange = 1; + seekerMaxRange = 10000; + + defaultAttackProfile = "maverick"; + attackProfiles[] = {"maverick"}; +}; + +class GVAR(type_KH29) { + enabled = 0; + + pitchRate = 20; + yawRate = 20; + + canVanillaLock = 0; + + defaultSeekerType = "SALH"; + seekerTypes[] = {"SALH"}; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = {"LOAL"}; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 1; + seekerAngle = 40; + seekerAccuracy = 1; + + seekerMinRange = 1; + seekerMaxRange = 10000; + + defaultAttackProfile = "maverick"; + attackProfiles[] = {"maverick"}; +}; + +class GVAR(type_Kobra) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 9.5; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Konkurs) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 10; + lineGainD = 8.5; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 4000; // Range from the missile which the seeker can visually search + + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Kornet) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Malyutka) { + enabled = 0; + + pitchRate = 15; // Minium flap deflection for guidance + yawRate = 15; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "MCLOS"; + seekerTypes[] = { "MCLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 5; + lineGainD = 0; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 0; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + correctionDistance = 0; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Metis) { + enabled = 0; + + pitchRate = 50; // Minium flap deflection for guidance + yawRate = 50; // Maximum flap deflection for guidance + initialPitch = 2; + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 15; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 80; + seekerMaxRange = 1000; // Range from the missile which the seeker can visually search + + correctionDistance = 3; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "WIRE"; + attackProfiles[] = {"WIRE"}; +}; + +class GVAR(type_Molniya) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 50; + flareAngleFilter = 0.8; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 40; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.85; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_R73) { + enabled = 0; + + pitchRate = 35; // Minium flap deflection for guidance + yawRate = 35; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 50; + flareAngleFilter = 0.8; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 40; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.85; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_R74) { + enabled = 1; + + pitchRate = 50; // Minium flap deflection for guidance + yawRate = 50; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 50; + flareAngleFilter = 0.8; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 75; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.95; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 8000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_R77) { + enabled = 0; + + pitchRate = 40; // Minium flap deflection for guidance + yawRate = 40; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "DopplerRadar"; + seekerTypes[] = { "DopplerRadar" }; + lockableTypes[] = {"Air"}; + + minimumSpeedFilter = 15; // filter out targets that have a closing velocity less than this + minimumTimeFilter = 0.00005; // filter out targets that are this close to the ground (speed of light) + maxTerrainCheck = 16000; // How far we should check for terrain + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 50; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR", "LOFT"}; + useModeForAttackProfile = 1; +}; + +class GVAR(type_Refleks) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + correctionDistance = 30; // distance from center of crosshair where missile slows down + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_S400) { + enabled = 0; + + pitchRate = 25; // Minium flap deflection for guidance + yawRate = 25; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "DopplerRadar"; + seekerTypes[] = { "DopplerRadar" }; + lockableTypes[] = {"Air"}; + + minimumSpeedFilter = 5; // filter out targets that have a closing velocity less than this + minimumTimeFilter = 0.000001; // filter out targets that are this close to the ground (speed of light) + maxTerrainCheck = 16000; // How far we should check for terrain + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "ZeroEffortMiss"; + navigationTypes[] = { "ZeroEffortMiss" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 50; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 2500; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Shturm) { + enabled = 0; + + pitchRate = 45; // Minium flap deflection for guidance + yawRate = 45; // Maximum flap deflection for guidance + + canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode + + showTrail = 1; + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = { "LOAL", "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 16; + lineGainD = 10.44; + + initialPitch = 2; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 30; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 4000; // Range from the missile which the seeker can visually search + + offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair. + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Strela) { + enabled = 0; + + pitchRate = 30; // Minium flap deflection for guidance + yawRate = 30; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 100; + flareAngleFilter = 1.6; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "ProportionalNavigation"; + navigationTypes[] = { "ProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 45; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.6; // seeker accuracy multiplier + + seekerMinRange = 10; + seekerMaxRange = 3700; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; + +class GVAR(type_Vikhr) { + enabled = 0; + showTrail = 1; + + pitchRate = 60; // Minium flap deflection for guidance + yawRate = 60; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 20; + lineGainD = 16; + correctionDistance = 5; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 15; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 30; + seekerMaxRange = 12000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; +}; + +class GVAR(type_Vympel) { + enabled = 0; + + pitchRate = 35; // Minium flap deflection for guidance + yawRate = 35; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "IR"; + seekerTypes[] = { "IR" }; + + flareDistanceFilter = 50; + flareAngleFilter = 0.8; // can filter out flares that are >= flareAngleFilter to known target velocity + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "AugmentedProportionalNavigation"; + navigationTypes[] = { "AugmentedProportionalNavigation" }; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 40; // Angle from the shooter's view that can track the missile + seekerAccuracy = 0.85; // seeker accuracy multiplier + + seekerMinRange = 75; + seekerMaxRange = 5000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "DIR"; + attackProfiles[] = {"DIR"}; +}; \ No newline at end of file diff --git a/addons/missileguidance/config.cpp b/addons/missileguidance/config.cpp index e98d99ebcbb..4e1f2e3e1f1 100644 --- a/addons/missileguidance/config.cpp +++ b/addons/missileguidance/config.cpp @@ -15,6 +15,8 @@ class CfgPatches { #include "ACE_GuidanceConfig.hpp" +#include "CfgMissileTypesNato.hpp" +#include "CfgMissileTypesWarsaw.hpp" #include "CfgEventhandlers.hpp" #include "CfgAmmo.hpp" #include "CfgMagazines.hpp" diff --git a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf index 6b06c0dd915..64895a3e54a 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf @@ -22,6 +22,9 @@ #define STAGE_COAST 3 #define STAGE_TERMINAL 4 +#define CLIMB_ANGLE 12 +#define ATTACK_ANGLE 2 + params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; _args params ["_firedEH"]; _firedEH params ["_shooter","","","","","","_projectile"]; @@ -30,6 +33,7 @@ if (_seekerTargetPos isEqualTo [0,0,0]) exitWith {_seekerTargetPos}; if (_attackProfileStateParams isEqualTo []) then { _attackProfileStateParams set [0, STAGE_LAUNCH]; + _attackProfileStateParams set [1, 0]; }; private _shooterPos = getPosASL _shooter; @@ -44,24 +48,28 @@ TRACE_2("",_distanceToTarget,_distanceToShooter); // Add height depending on distance for compensate private _returnTargetPos = _seekerTargetPos; +private _attackDirection = _seekerTargetPos vectorDiff _projectilePos; +private _horizon = velocity _projectile; +_horizon set [2, 0]; +_horizon = vectorNormalized _horizon; +private _attackAngle = acos (_horizon vectorCos _attackDirection); + switch (_attackProfileStateParams select 0) do { case STAGE_LAUNCH: { TRACE_1("STAGE_LAUNCH",""); if (_distanceToShooter < 6) then { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2]; + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,5]; } else { _attackProfileStateParams set [0, STAGE_CLIMB]; }; }; case STAGE_CLIMB: { TRACE_1("STAGE_CLIMB",""); - // 65 is min range - private _cruisAlt = 60 * ((0 max (_distanceShooterToTarget - 65))/2000); - - if ( ((ASLToAGL _projectilePos) select 2) - ((ASLToAGL _seekerTargetPos) select 2) >= _cruisAlt) then { + if (_attackAngle >= ATTACK_ANGLE) then { _attackProfileStateParams set [0, STAGE_TERMINAL]; } else { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*1.5]; + private _height = _distanceShooterToTarget * tan CLIMB_ANGLE; + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_height]; }; }; case STAGE_TERMINAL: { @@ -70,5 +78,7 @@ switch (_attackProfileStateParams select 0) do { }; }; +_attackProfileStateParams set [2, _returnTargetPos]; + TRACE_1("Adjusted target position",_returnTargetPos); _returnTargetPos; diff --git a/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf index 347d1449140..a3ae233eba0 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf @@ -22,6 +22,10 @@ #define STAGE_COAST 3 #define STAGE_TERMINAL 4 +#define CRUISE_ALT 160 +#define CLIMB_ANGLE 22 +#define ATTACK_ANGLE 12 + params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; _args params ["_firedEH"]; _firedEH params ["_shooter","","","","","","_projectile"]; @@ -30,6 +34,7 @@ if (_seekerTargetPos isEqualTo [0,0,0]) exitWith {_seekerTargetPos}; if (_attackProfileStateParams isEqualTo []) then { _attackProfileStateParams set [0, STAGE_LAUNCH]; + _attackProfileStateParams set [1, 0]; }; private _shooterPos = getPosASL _shooter; @@ -44,39 +49,44 @@ TRACE_2("",_distanceToTarget,_distanceToShooter); // Add height depending on distance for compensate private _returnTargetPos = _seekerTargetPos; +private _attackDirection = _seekerTargetPos vectorDiff _projectilePos; +private _horizon = velocity _projectile; +_horizon set [2, 0]; +_horizon = vectorNormalized _horizon; +private _attackAngle = acos (_horizon vectorCos _attackDirection); + switch( (_attackProfileStateParams select 0) ) do { case STAGE_LAUNCH: { TRACE_1("STAGE_LAUNCH",""); if (_distanceToShooter < 10) then { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2]; + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,5]; } else { _attackProfileStateParams set [0, STAGE_CLIMB]; }; }; case STAGE_CLIMB: { TRACE_1("STAGE_CLIMB",""); - private _cruisAlt = 140; - if (_distanceShooterToTarget < 1250) then { - _cruisAlt = 140 * ((0 max (_distanceShooterToTarget - 150))/1250); - TRACE_1("_cruisAlt",_cruisAlt); - }; - if ( ((ASLToAGL _projectilePos) select 2) - ((ASLToAGL _seekerTargetPos) select 2) >= _cruisAlt) then { - if (_cruisAlt < 140) then { - _attackProfileStateParams set [0, STAGE_TERMINAL]; - } else { + private _altitude = (ASLToAGL _projectilePos) select 2; + switch (true) do { + case (_altitude >= CRUISE_ALT): { _attackProfileStateParams set [0, STAGE_COAST]; }; - } else { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*1.5]; - }; + case (_attackAngle >= ATTACK_ANGLE): { + _attackProfileStateParams set [0, STAGE_TERMINAL]; + }; + default { + private _height = _distanceShooterToTarget * tan CLIMB_ANGLE; + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_height]; + } + } }; case STAGE_COAST: { TRACE_1("STAGE_COAST",""); - TRACE_1("",((ASLToAGL _projectilePos) select 2) - (( ASLToAGL _seekerTargetPos) select 2)); - if (_distanceToTarget < ( ((ASLToAGL _projectilePos) select 2) - (( ASLToAGL _seekerTargetPos) select 2) ) * 2) then { + TRACE_1("",_attackAngle); + if (_attackAngle >= ATTACK_ANGLE) then { _attackProfileStateParams set [0, STAGE_TERMINAL]; } else { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,(_projectilePos select 2)]; + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,(_projectilePos select 2) min CRUISE_ALT]; }; }; case STAGE_TERMINAL: { @@ -86,5 +96,7 @@ switch( (_attackProfileStateParams select 0) ) do { }; }; +_attackProfileStateParams set [2, _returnTargetPos]; + TRACE_1("Adjusted target position",_returnTargetPos); _returnTargetPos; diff --git a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf index 5462a80a75b..cc823b1e8c3 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf @@ -45,7 +45,7 @@ if (_2dDistance <= 1) then { _addHeight = [0, 0, (_projectilePos#2) + 8]; } else { // Always climb an arc on initial launch if we are close to the round - if ((((ASLtoAGL _projectilePos) select 2) < 5) && {_distanceToShooter < 15}) then { + if ((((ASLToAGL _projectilePos) select 2) < 5) && {_distanceToShooter < 15}) then { _addHeight = _addHeight vectorAdd [0,0,_distanceToTarget]; TRACE_1("climb - near shooter",_addHeight); } else { diff --git a/addons/missileguidance/functions/fnc_attackProfile_LOFT.sqf b/addons/missileguidance/functions/fnc_attackProfile_LOFT.sqf index 1fff2ef8c51..934ac04123a 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_LOFT.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_LOFT.sqf @@ -32,7 +32,7 @@ if (_seekerTargetPos isEqualTo [0, 0, 0]) exitWith { }; private _projectilePos = getPosASLVisual _projectile; -private _distanceToTarget2d = _projectilePos distance2d _seekerTargetPos; +private _distanceToTarget2d = _projectilePos distance2D _seekerTargetPos; private _closingRate = vectorMagnitude velocity _projectile; private _timeToGo = (_projectilePos distance _seekerTargetPos) / _closingRate; diff --git a/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf b/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf index 361b0d8fcf5..1733ad10153 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf @@ -30,7 +30,7 @@ if ((_distanceToProjectile > _seekerMaxRangeSqr) || { _wireCut }) exitWith { // wire snap, random direction if !(_wireCut) then { _attackProfileStateParams set [1, true]; - playSound3D ["a3\sounds_f\air\sfx\SL_rope_break.wss", objNull, false, AGLtoASL (_shooter modelToWorld _wireCutSource), 5, 1, 150]; + playSound3D ["a3\sounds_f\air\sfx\SL_rope_break.wss", objNull, false, AGLToASL (_shooter modelToWorld _wireCutSource), 5, 1, 150]; }; _lastInput }; diff --git a/addons/missileguidance/functions/fnc_checkLos.sqf b/addons/missileguidance/functions/fnc_checkLos.sqf index 242b595ab8f..152c7c24074 100644 --- a/addons/missileguidance/functions/fnc_checkLos.sqf +++ b/addons/missileguidance/functions/fnc_checkLos.sqf @@ -34,12 +34,12 @@ private _targetAimPos = aimPos _target; private _seekerPos = getPosASL _seeker; private _return = true; -if (!((terrainIntersectASL [_seekerPos, _targetPos]) && {terrainIntersectASL [_seekerPos, _targetAimPos]})) then { +if ((terrainIntersectASL [_seekerPos, _targetPos]) && {terrainIntersectASL [_seekerPos, _targetAimPos]}) then { + _return = false; +} else { if (lineIntersects [_seekerPos, _targetPos, _seeker, _target]) then { _return = false; }; -} else { - _return = false; }; _return diff --git a/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf b/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf index f8494e474c5..684ad8be76b 100644 --- a/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf +++ b/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf @@ -25,7 +25,7 @@ private _currentShooter = objNull; private _currentMagazine = ""; private _turretPath = []; if (isNull (ACE_controlledUAV param [0, objNull])) then { - if (((vehicle ACE_player) == ACE_player) || {ACE_player call CBA_fnc_canUseWeapon}) then { + if ((isNull objectParent ACE_player) || {ACE_player call CBA_fnc_canUseWeapon}) then { _currentShooter = ACE_player; _currentMagazine = currentMagazine ACE_player; } else { diff --git a/addons/missileguidance/functions/fnc_dev_ProjectileCamera.sqf b/addons/missileguidance/functions/fnc_dev_ProjectileCamera.sqf index 5073709a27e..bf3a5af67c5 100644 --- a/addons/missileguidance/functions/fnc_dev_ProjectileCamera.sqf +++ b/addons/missileguidance/functions/fnc_dev_ProjectileCamera.sqf @@ -14,7 +14,7 @@ params ["_projectile"]; private _camera = "camera" camCreate getPosATL _projectile; -_camera camPrepareFOV 0.7; +_camera camPrepareFov 0.7; _camera cameraEffect ["internal", "back"]; _camera camCommitPrepared 0; diff --git a/addons/missileguidance/functions/fnc_doAttackProfile.sqf b/addons/missileguidance/functions/fnc_doAttackProfile.sqf index 3c74ab87c6d..d6dde00f91b 100644 --- a/addons/missileguidance/functions/fnc_doAttackProfile.sqf +++ b/addons/missileguidance/functions/fnc_doAttackProfile.sqf @@ -25,13 +25,13 @@ private _attackProfileFunction = getText (configFile >> QGVAR(AttackProfiles) >> private _attackProfilePos = _this call (missionNamespace getVariable _attackProfileFunction); if ((isNil "_attackProfilePos") || {_attackProfilePos isEqualTo [0,0,0]}) exitWith { - ERROR_2("attack profile [%1] returned bad pos %2",_attackProfileName,_attackProfilePos); + // ERROR_2("attack profile [%1] returned bad pos %2",_attackProfileName,_attackProfilePos); [0,0,0] }; if (GVAR(debug_drawGuidanceInfo)) then { - drawLine3D [(ASLtoAGL _attackProfilePos), (ASLtoAGL _seekerTargetPos), [0,1,1,1]]; - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,0,1,1], ASLtoAGL _attackProfilePos, 0.5, 0.5, 0, _attackProfileName, 1, 0.025, "TahomaB"]; + drawLine3D [(ASLToAGL _attackProfilePos), (ASLToAGL _seekerTargetPos), [0,1,1,1]]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,0,1,1], ASLToAGL _attackProfilePos, 0.5, 0.5, 0, _attackProfileName, 1, 0.025, "TahomaB"]; }; TRACE_2("return",_attackProfilePos,_attackProfileName); diff --git a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf index b6fd158ce04..fe915d1bb4f 100644 --- a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf +++ b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf @@ -31,7 +31,7 @@ if ((isNil "_seekerTargetPos") || {_seekerTargetPos isEqualTo [0,0,0]}) then { / TRACE_2("seeker returned bad pos - using last known",_seekLastTargetPos,_lastKnownPos); _seekerTargetPos = _lastKnownPos; if (GVAR(debug_drawGuidanceInfo)) then { - drawIcon3D ["\A3\ui_f\data\map\markers\military\unknown_CA.paa", [1,1,0,1], ASLtoAGL _lastKnownPos, 0.25, 0.25, 0, "LastKnownPos", 1, 0.02, "TahomaB"]; + drawIcon3D ["\A3\ui_f\data\map\markers\military\unknown_CA.paa", [1,1,0,1], ASLToAGL _lastKnownPos, 0.25, 0.25, 0, "LastKnownPos", 1, 0.02, "TahomaB"]; }; } else { TRACE_1("seeker returned no pos",_seekerTargetPos); @@ -45,7 +45,7 @@ if ((isNil "_seekerTargetPos") || {_seekerTargetPos isEqualTo [0,0,0]}) then { / }; if (GVAR(debug_drawGuidanceInfo)) then { - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,1,0,1], ASLtoAGL _seekerTargetPos, 0.5, 0.5, 0, _seekerTypeName, 1, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,1,0,1], ASLToAGL _seekerTargetPos, 0.5, 0.5, 0, _seekerTypeName, 1, 0.025, "TahomaB"]; }; TRACE_2("return",_seekerTargetPos,_seekerTypeName); diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index 28f677bbdde..82d3d57a35f 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -42,7 +42,7 @@ private _timestep = diag_deltaTime * accTime; // Run seeker function: private _seekerTargetPos = [[0,0,0], _args, _seekerStateParams, _lastKnownPosState, _timestep] call FUNC(doSeekerSearch); // Run attack profile function: -_seekerTargetPos = AGLtoASL ASLToAGL _seekerTargetPos; +_seekerTargetPos = AGLToASL ASLToAGL _seekerTargetPos; private _profileAdjustedTargetPos = [_seekerTargetPos, _args, _attackProfileStateParams, _timestep] call FUNC(doAttackProfile); private _projectilePos = getPosASLVisual _projectile; @@ -50,11 +50,11 @@ _targetData set [1, _projectilePos vectorFromTo _profileAdjustedTargetPos]; // If we have no seeker target, then do not change anything // If there is no deflection on the missile, this cannot change and therefore is redundant. Avoid calculations for missiles without any deflection -if ((_pitchRate != 0 || {_yawRate != 0})) then { +if ((_pitchRate != 0 || {_yawRate != 0}) && {_profileAdjustedTargetPos isNotEqualTo [0,0,0]}) then { private _navigationFunction = getText (configFile >> QGVAR(NavigationTypes) >> _navigationType >> "functionName"); if (_navigationStateData isNotEqualTo []) then { (_navigationStateData select _currentState) params ["_transitionCondition"]; - private _transition = (_args call (missionNamespace getVariable [_transitionCondition, { false }])); + private _transition = ([_args, _timestep] call (missionNamespace getVariable [_transitionCondition, { false }])); if (_transition) then { _currentState = _currentState + 1; _navigationStateParams set [0, _currentState]; @@ -190,15 +190,15 @@ if ((_pitchRate != 0 || {_yawRate != 0})) then { if (GVAR(debug_drawGuidanceInfo)) then { TRACE_3("",_projectilePos,_seekerTargetPos,_profileAdjustedTargetPos); - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLtoAGL _projectilePos, 0.75, 0.75, 0, _ammo, 1, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLToAGL _projectilePos, 0.75, 0.75, 0, _ammo, 1, 0.025, "TahomaB"]; if (!isGamePaused && accTime > 0) then { - private _ps = "#particlesource" createVehicleLocal (ASLtoAGL _projectilePos); + private _ps = "#particlesource" createVehicleLocal (ASLToAGL _projectilePos); _PS setParticleParams [["\A3\Data_f\cl_basic", 8, 3, 1], "", "Billboard", 1, 3.0141, [0, 0, 0], [0, 0, 0], 1, 1.275, 1, 0, [1, 1], [[1, 0, 0, 1], [1, 0, 0, 1], [1, 0, 0, 1]], [1], 1, 0, "", "", nil]; _PS setDropInterval 1.0; }; - drawLine3D [ASLtoAGL _projectilePos, (ASLtoAGL _projectilePos) vectorAdd velocity _projectile, [1, 1, 1, 1]]; + drawLine3D [ASLToAGL _projectilePos, (ASLToAGL _projectilePos) vectorAdd velocity _projectile, [1, 1, 1, 1]]; }; _stateParams set [0, diag_tickTime]; diff --git a/addons/missileguidance/functions/fnc_javelin_midCourseTransition.sqf b/addons/missileguidance/functions/fnc_javelin_midCourseTransition.sqf index ad0eca65cba..58995dee31d 100644 --- a/addons/missileguidance/functions/fnc_javelin_midCourseTransition.sqf +++ b/addons/missileguidance/functions/fnc_javelin_midCourseTransition.sqf @@ -19,6 +19,10 @@ #define STAGE_COAST 3 #define STAGE_TERMINAL 4 +#define REQUIRED_STABLE_TIME 0.2 +#define REQUIRED_ANGLE 1 + +params ["_args", "_timestep"]; _args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams", "_targetData", "_navigationStateData"]; _firedEH params ["_shooter","","","","_ammo","","_projectile"]; _launchParams params ["_shooter","_targetLaunchParams","_seekerType","_attackProfile","_lockMode","_laserInfo","_navigationType"]; @@ -28,6 +32,17 @@ _stateParams params ["_lastRunTime", "_seekerStateParams", "_attackProfileStateP _seekerParams params ["_seekerAngle", "_seekerAccuracy", "_seekerMaxRange", "_seekerMinRange"]; _targetData params ["_targetDirection", "_attackProfileDirection", "_targetRange", "_targetVelocity", "_targetAcceleration"]; -_attackProfileStateParams params ["_state"]; -_state isEqualTo STAGE_TERMINAL +_attackProfileStateParams params ["_state", "_stableTime", "_target"]; +private _projectileDirection = vectorNormalized velocity _projectile; +private _targetDistance = _target vectorDistance getPosASLVisual _projectile; +private _targetDirection = (getPosASLVisual _projectile) vectorFromTo _target; +private _angle = _projectileDirection vectorCos _targetDirection; +if (_angle > cos REQUIRED_ANGLE) then { + _stableTime = _stableTime + _timestep; +} else { + _stableTime = 0; +}; + +_attackProfileStateParams set [1, _stableTime]; +_state isEqualTo STAGE_TERMINAL && _stableTime > REQUIRED_STABLE_TIME diff --git a/addons/missileguidance/functions/fnc_navigationType_direct.sqf b/addons/missileguidance/functions/fnc_navigationType_direct.sqf index 7b4763b44ef..5681c85b9ae 100644 --- a/addons/missileguidance/functions/fnc_navigationType_direct.sqf +++ b/addons/missileguidance/functions/fnc_navigationType_direct.sqf @@ -14,8 +14,23 @@ * * Public: No */ -params ["_args", "", "", "_profileAdjustedTargetPos"]; -_args params ["_firedEH"]; +params ["_args", "_timestep", "", "_profileAdjustedTargetPos"]; +_args params ["_firedEH", "", "_flightParams"]; +_flightParams params ["_pitchRate", "_yawRate"]; _firedEH params ["","","","","","","_projectile"]; -_profileAdjustedTargetPos vectorDiff getPosASLVisual _projectile +private _projectilePos = getPosASLVisual _projectile; + +private _targetDirection = _projectilePos vectorFromTo _profileAdjustedTargetPos; +private _projectileDirection = vectorNormalized velocity _projectile; + +private _deltaDirection = _targetDirection vectorDiff _projectileDirection; +_deltaDirection = _projectile vectorWorldToModelVisual _deltaDirection; +_deltaDirection = _deltaDirection vectorMultiply [_yawRate, 0, _pitchRate]; +_deltaDirection = _projectile vectorModelToWorldVisual _deltaDirection; + +private _iTimestep = 0; +if (_timestep != 0) then { + _iTimestep = 1 / _timestep; +}; +_deltaDirection vectorMultiply _iTimestep // return diff --git a/addons/missileguidance/functions/fnc_navigationType_line.sqf b/addons/missileguidance/functions/fnc_navigationType_line.sqf index c9a3870c58b..b3e9cffe00d 100644 --- a/addons/missileguidance/functions/fnc_navigationType_line.sqf +++ b/addons/missileguidance/functions/fnc_navigationType_line.sqf @@ -15,7 +15,8 @@ * Public: No */ params ["_args", "_timestep", "_seekerTargetPos", "_profileAdjustedTargetPos", "_targetData", "_navigationParams"]; -_args params ["", "", "_flightParams"]; +_args params ["_firedEH", "", "_flightParams"]; +_firedEH params ["","","","","","","_projectile"]; _targetData params ["", "_targetDir", "_distance"]; _flightParams params ["_pitchRate", "_yawRate"]; diff --git a/addons/missileguidance/functions/fnc_proNav_onFired.sqf b/addons/missileguidance/functions/fnc_proNav_onFired.sqf index c297d3ce59a..f89584c7df0 100644 --- a/addons/missileguidance/functions/fnc_proNav_onFired.sqf +++ b/addons/missileguidance/functions/fnc_proNav_onFired.sqf @@ -14,12 +14,8 @@ * * Public: No */ -params ["_firedEH", "", "", "", "_stateParams"]; -_firedEH params ["_shooter","","","","_ammo","","_projectile"]; -_launchParams params ["_shooter","_targetLaunchParams","_seekerType","_attackProfile","_lockMode","_laserInfo","_navigationType"]; -_targetLaunchParams params ["_target", "_targetPos", "_launchPos"]; -_stateParams params ["_lastRunTime", "_seekerStateParams", "_attackProfileStateParams", "_lastKnownPosState"]; -_seekerParams params ["_seekerAngle", "_seekerAccuracy", "_seekerMaxRange", "_seekerMinRange"]; +params ["_firedEH"]; +_firedEH params ["","","","","","","_projectile"]; private _ammoConfig = configOf _projectile; private _navigationGain = getNumber (_ammoConfig >> QUOTE(ADDON) >> "navigationGain"); diff --git a/addons/missileguidance/functions/fnc_seekerType_MWR.sqf b/addons/missileguidance/functions/fnc_seekerType_MWR.sqf index df51acdd8c0..1b7eef07ee7 100644 --- a/addons/missileguidance/functions/fnc_seekerType_MWR.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_MWR.sqf @@ -60,7 +60,7 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then { _seekerBaseRadiusAdjusted = _seekerBaseRadiusAtGround; }; // Look in front of seeker for any targets - private _nearestObjects = nearestObjects [ASLtoAGL _searchPos, _lockTypes, _seekerBaseRadiusAdjusted, false]; + private _nearestObjects = nearestObjects [ASLToAGL _searchPos, _lockTypes, _seekerBaseRadiusAdjusted, false]; _nearestObjects = _nearestObjects apply { // I check both Line of Sight versions to make sure that a single bush doesnt make the target lock dissapear but at the same time ensure that this can see through smoke. Should work 80% of the time if ([_projectile, getPosASL _x, _seekerAngle] call FUNC(checkSeekerAngle) && { ([_projectile, _x, true] call FUNC(checkLOS)) || { ([_projectile, _x, false] call FUNC(checkLOS)) } }) then { @@ -78,8 +78,8 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then { }; private _closestDistance = _seekerBaseRadiusAtGround; { - if ((_x distance2d _searchPos) < _closestDistance) then { - _closestDistance = _x distance2d _searchPos; + if ((_x distance2D _searchPos) < _closestDistance) then { + _closestDistance = _x distance2D _searchPos; _target = _x; }; } forEach _nearestObjects; @@ -105,7 +105,7 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then { }; if (GVAR(debug_drawGuidanceInfo)) then { - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLtoAGL _expectedTargetPos, 0.75, 0.75, 0, "expected target pos", 1, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLToAGL _expectedTargetPos, 0.75, 0.75, 0, "expected target pos", 1, 0.025, "TahomaB"]; }; if !(isNull _target) then { diff --git a/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf b/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf index 1641ff4a7df..d9fd444043f 100644 --- a/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf @@ -25,7 +25,10 @@ _seekerStateParams params ["_memoryPointGunnerOptics", "_animationSourceBody", " private _shooterPos = AGLToASL (_shooter modelToWorldVisual (_shooter selectionPosition _memoryPointGunnerOptics)); private _projPos = getPosASL _projectile; -private _lookDirection = if !(_shooter isKindOf "CAManBase" || {_shooter isKindOf "StaticWeapon"}) then { +private _lookDirection = if (_shooter isKindOf "CAManBase" || {_shooter isKindOf "StaticWeapon"}) then { + _shooterPos = eyePos _shooter; + _shooter weaponDirection _weapon +} else { private _finalLookDirection = if (_usePilotCamera) then { _shooterPos = _shooter modelToWorldVisualWorld getPilotCameraPosition _shooter; private _trackingTarget = getPilotCameraTarget _shooter; @@ -43,9 +46,6 @@ private _lookDirection = if !(_shooter isKindOf "CAManBase" || {_shooter isKindO _shooter vectorModelToWorldVisual ([1, _gBody, _gGun] call CBA_fnc_polar2vect); }; _finalLookDirection -} else { - _shooterPos = eyePos _shooter; - _shooter weaponDirection _weapon }; private _distanceToProj = _shooterPos vectorDistance _projPos; diff --git a/addons/missileguidance/functions/fnc_wire_onFired.sqf b/addons/missileguidance/functions/fnc_wire_onFired.sqf index 870754c5091..55874e00c69 100644 --- a/addons/missileguidance/functions/fnc_wire_onFired.sqf +++ b/addons/missileguidance/functions/fnc_wire_onFired.sqf @@ -26,7 +26,7 @@ private _maxDistanceSqr = _seekerMaxRange * _seekerMaxRange; private _minDistanceSqr = _seekerMinRange * _seekerMinRange; // AI don't know how to use the crosshair offset becauze they dum dum -private _crosshairOffset = if ((_gunner != ACE_PLAYER) && {_gunner != (ACE_controlledUAV select 1)}) then { +private _crosshairOffset = if ((_gunner != ACE_player) && {_gunner != (ACE_controlledUAV select 1)}) then { [0, 0, 0]; } else { [_config >> "offsetFromCrosshair", "ARRAY", [0, 0, 0]] call CBA_fnc_getConfigEntry diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml index 384caf332c9..6b758810831 100644 --- a/addons/missileguidance/stringtable.xml +++ b/addons/missileguidance/stringtable.xml @@ -208,14 +208,29 @@ 6x DAGR [ACE] 6x DAGR [ACE] + 6x DAGR [ACE] + 6x DAGR [ACE] + 6x DAGR [ACE] + 6x DAGR [ACE] + 6x DAGR [ACE] 12x DAGR [ACE] 12x DAGR [ACE] + 12x DAGR [ACE] + 12x DAGR [ACE] + 12x DAGR [ACE] + 12x DAGR [ACE] + 12x DAGR [ACE] 24x DAGR [ACE] 24x DAGR [ACE] + 24x DAGR [ACE] + 24x DAGR [ACE] + 24x DAGR [ACE] + 24x DAGR [ACE] + 24x DAGR [ACE] diff --git a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf index 88e2ba02d56..86a14a8c8d0 100644 --- a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf +++ b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf @@ -48,7 +48,7 @@ private _missionRoot = str missionConfigFile select [0, count str missionConfigF }; } else { if (isClass (configFile >> "CfgSounds" >> _x)) then { - _soundPath = (getArray(configFile >> "CfgSounds" >> _x >> "sound")) param [0, ""]; + private _soundPath = (getArray(configFile >> "CfgSounds" >> _x >> "sound")) param [0, ""]; if ((_soundPath select [0, 1]) == "\") then {_soundPath = _soundPath select [1];}; _ambianceSounds pushBack _soundPath; } else { @@ -85,9 +85,9 @@ TRACE_1("",_ambianceSounds); private _newPosASL = if (_followPlayers) then { // Select a target unit at random. private _targetUnit = selectRandom _allUnits; - AGLtoASL (_targetUnit getPos [_minimalDistance + random (_maximalDistance - _minimalDistance), random 360]); + AGLToASL (_targetUnit getPos [_minimalDistance + random (_maximalDistance - _minimalDistance), random 360]); } else { - AGLtoASL (_logic getPos [_minimalDistance + random (_maximalDistance - _minimalDistance), random 360]); + AGLToASL (_logic getPos [_minimalDistance + random (_maximalDistance - _minimalDistance), random 360]); }; TRACE_1("",_newPosASL); diff --git a/addons/movement/XEH_postInit.sqf b/addons/movement/XEH_postInit.sqf index 4d7cc5ba120..4fa7e066c0b 100644 --- a/addons/movement/XEH_postInit.sqf +++ b/addons/movement/XEH_postInit.sqf @@ -10,7 +10,7 @@ if (!hasInterface) exitWith {}; // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if (ACE_player != (vehicle ACE_player)) exitWith {false}; + if (!isNull objectParent ACE_player) exitWith {false}; // Statement [ACE_player] call FUNC(climb); diff --git a/addons/movement/functions/fnc_handleClimb.sqf b/addons/movement/functions/fnc_handleClimb.sqf index 1325f2f021e..a54007862e3 100644 --- a/addons/movement/functions/fnc_handleClimb.sqf +++ b/addons/movement/functions/fnc_handleClimb.sqf @@ -24,5 +24,5 @@ private _pos = _unit modelToWorldVisual (_unit selectionPosition "camera"); _pos = _pos vectorDiff (_unit selectionPosition "camera"); -_unit setPosASL (AGLtoASL _pos); -TRACE_2("",AGLtoASL _pos,getPosASL _unit); +_unit setPosASL (AGLToASL _pos); +TRACE_2("",AGLToASL _pos,getPosASL _unit); diff --git a/addons/nametags/functions/fnc_drawNameTagIcon.sqf b/addons/nametags/functions/fnc_drawNameTagIcon.sqf index efe0c6bf157..ea6f16ebc39 100644 --- a/addons/nametags/functions/fnc_drawNameTagIcon.sqf +++ b/addons/nametags/functions/fnc_drawNameTagIcon.sqf @@ -25,7 +25,7 @@ TRACE_1("drawName:",_this); params ["", "_target", "", "_heightOffset"]; -_fnc_parameters = { +private _fnc_parameters = { params ["_player", "_target", "_alpha", "_heightOffset", "_drawName", "_drawRank", "_drawSoundwave"]; //Set Icon: @@ -44,11 +44,11 @@ _fnc_parameters = { private _targetFaction = _target getVariable [QGVAR(faction), faction _target]; private _customRankIcons = GVAR(factionRanks) get _targetFaction; - if (!isNil "_customRankIcons") then { - _customRankIcons param [ALL_RANKS find rank _target, ""] // return - } else { + if (isNil "_customRankIcons") then { // default rank icons format ["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa", rank _target] // return + } else { + _customRankIcons param [ALL_RANKS find rank _target, ""] // return }; }; }; diff --git a/addons/nametags/functions/fnc_onDraw3d.sqf b/addons/nametags/functions/fnc_onDraw3d.sqf index f831a3209fc..4ff73bc561c 100644 --- a/addons/nametags/functions/fnc_onDraw3d.sqf +++ b/addons/nametags/functions/fnc_onDraw3d.sqf @@ -37,17 +37,17 @@ if (GVAR(showPlayerNames) == 4) then { private _camPosAGL = positionCameraToWorld [0, 0, 0]; if !((_camPosAGL select 0) isEqualType 0) exitWith {}; // handle RHS / bugged vehicle slots -private _camPosASL = AGLtoASL _camPosAGL; +private _camPosASL = AGLToASL _camPosAGL; // Show nametag for the unit behind the cursor or its commander if (_enabledTagsCursor) then { private _target = cursorTarget; if !(_target isKindOf "CAManBase") then { // When cursorTarget is on a vehicle show the nametag for the commander. - if !(_target in allUnitsUAV) then { - _target = effectiveCommander _target; - } else { + if (_target in allUnitsUAV) then { _target = objNull; + } else { + _target = effectiveCommander _target; }; }; if (isNull _target) exitWith {}; @@ -87,7 +87,7 @@ if (_enabledTagsNearby) then { {!isObjectHidden _x} }; private _crewMen = []; - if (vehicle ACE_player != ACE_player) then { + if (!isNull objectParent ACE_player) then { _crewMen = (crew vehicle ACE_player) select { _x != ACE_player && {(side group _x) == (side group ACE_player)} && @@ -115,7 +115,7 @@ if (_enabledTagsNearby) then { private _screenPos = worldToScreen (_target modelToWorld (_target selectionPosition "head")); if (_screenPos isNotEqualTo []) then { // Distance from center / half of screen width - _centerOffsetFactor = 1 - ((_screenPos distance2D [0.5, 0.5]) / (safezoneW / 3)); + _centerOffsetFactor = 1 - ((_screenPos distance2D [0.5, 0.5]) / (safeZoneW / 3)); } else { _centerOffsetFactor = 0; }; diff --git a/addons/nightvision/RscTitles.hpp b/addons/nightvision/RscTitles.hpp index 1a4d030e015..f3b1d1870f6 100644 --- a/addons/nightvision/RscTitles.hpp +++ b/addons/nightvision/RscTitles.hpp @@ -28,13 +28,13 @@ class RscTitles { idc = 1002; text = "#(argb,8,8,3)color(0,0,0,1)"; x = "safeZoneXAbs"; - Y = "safezoneY"; - W = "(safezoneX - safeZoneXAbs) * ((getResolution select 4)/(16/3))"; + Y = "safeZoneY"; + W = "(safeZoneX - safeZoneXAbs) * ((getResolution select 4)/(16/3))"; H = "safeZoneH"; }; class trippleHeadRight: trippleHeadLeft { idc = 1003; - x = "safeZoneXAbs + safeZoneWAbs - (safezoneX - safeZoneXABS) * ((getResolution select 4)/(16/3))"; + x = "safeZoneXAbs + safeZoneWAbs - (safeZoneX - safeZoneXABS) * ((getResolution select 4)/(16/3))"; }; }; }; diff --git a/addons/nightvision/XEH_PREP.hpp b/addons/nightvision/XEH_PREP.hpp index 988cfaa623e..793ae63b9ec 100644 --- a/addons/nightvision/XEH_PREP.hpp +++ b/addons/nightvision/XEH_PREP.hpp @@ -4,7 +4,7 @@ PREP(initModule); PREP(nonDedicatedFix); PREP(onCameraViewChanged); PREP(onFiredPlayer); -PREP(onLoadoutChanged); +PREP(onSlotItemChanged); PREP(onVisionModeChanged); PREP(pfeh); PREP(refreshGoggleType); diff --git a/addons/nightvision/XEH_postInit.sqf b/addons/nightvision/XEH_postInit.sqf index 2933877771c..8979f3f9ab9 100644 --- a/addons/nightvision/XEH_postInit.sqf +++ b/addons/nightvision/XEH_postInit.sqf @@ -30,12 +30,18 @@ GVAR(isUsingMagnification) = false; TRACE_4("settingsInitialized",GVAR(disableNVGsWithSights),GVAR(fogScaling),GVAR(noiseScaling),GVAR(effectScaling)); ["visionMode", LINKFUNC(onVisionModeChanged), false] call CBA_fnc_addPlayerEventHandler; - ["loadout", LINKFUNC(onLoadoutChanged), true] call CBA_fnc_addPlayerEventHandler; ["cameraView", LINKFUNC(onCameraViewChanged), true] call CBA_fnc_addPlayerEventHandler; ["vehicle", LINKFUNC(refreshGoggleType), false] call CBA_fnc_addPlayerEventHandler; ["turret", LINKFUNC(refreshGoggleType), true] call CBA_fnc_addPlayerEventHandler; ["ACE_controlledUAV", LINKFUNC(refreshGoggleType)] call CBA_fnc_addEventHandler; + ["unit", { + // Call manually to update existing value + [] call FUNC(refreshGoggleType); + }, true] call CBA_fnc_addPlayerEventHandler; + + [QGVAR(slotItemChanged), "SlotItemChanged", LINKFUNC(onSlotItemChanged)] call CBA_fnc_addBISPlayerEventHandler; + // handle only brightness if effects are disabled GVAR(ppEffectNVGBrightness) = ppEffectCreate ["ColorCorrections", 1236]; GVAR(ppEffectNVGBrightness) ppEffectForceInNVG true; @@ -97,4 +103,3 @@ WARNING("Debug mouse wheel action enabled, this should NOT be in a final release }; }] call CBA_fnc_addDisplayHandler; #endif - diff --git a/addons/nightvision/functions/fnc_onFiredPlayer.sqf b/addons/nightvision/functions/fnc_onFiredPlayer.sqf index 5bc7ff621e1..add6bc8be59 100644 --- a/addons/nightvision/functions/fnc_onFiredPlayer.sqf +++ b/addons/nightvision/functions/fnc_onFiredPlayer.sqf @@ -38,16 +38,11 @@ private _visibleFire = getNumber (configFile >> "CfgAmmo" >> _ammo >> "visibleFi private _isTracer = call { if (getNumber (configFile >> "CfgAmmo" >> _ammo >> "nvgOnly") > 0) exitWith {false}; - private _indexShot = (_unit ammo _weapon) + 1; - private _lastRoundsTracer = getNumber (configFile >> "CfgMagazines" >> _magazine >> "lastRoundsTracer"); - if (_indexShot <= _lastRoundsTracer) exitWith {true}; - private _tracersEvery = getNumber (configFile >> "CfgMagazines" >> _magazine >> "tracersEvery"); - if (_tracersEvery == 0) exitWith {false}; - (_indexShot - _lastRoundsTracer) % _tracersEvery == 0 + _projectile getShotInfo 4 // 4=shownTracer }; TRACE_3("",_ammo,_visibleFire,_isTracer); -if ( _isTracer) then { +if (_isTracer) then { _visibleFire = _visibleFire + 2; }; diff --git a/addons/nightvision/functions/fnc_onLoadoutChanged.sqf b/addons/nightvision/functions/fnc_onLoadoutChanged.sqf deleted file mode 100644 index ff4baadd4b2..00000000000 --- a/addons/nightvision/functions/fnc_onLoadoutChanged.sqf +++ /dev/null @@ -1,25 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Dslyecxi, PabstMirror - * Refreshes nvg effect if switching NVG goggles. - * - * Arguments: - * 0: Player - * - * Return Value: - * None - * - * Example: - * [player] call ace_nightvision_fnc_onLoadoutChanged - * - * Public: No - */ - -params ["_player"]; -TRACE_1("onLoadoutChange",_player); - -private _newHMD = hmd _player; -if (_newHMD != GVAR(playerHMD)) then { - GVAR(playerHMD) = _newHMD; - [] call FUNC(refreshGoggleType); -}; diff --git a/addons/nightvision/functions/fnc_onSlotItemChanged.sqf b/addons/nightvision/functions/fnc_onSlotItemChanged.sqf new file mode 100644 index 00000000000..3a11c1ea3fd --- /dev/null +++ b/addons/nightvision/functions/fnc_onSlotItemChanged.sqf @@ -0,0 +1,33 @@ +#include "..\script_component.hpp" +/* + * Author: Dslyecxi, PabstMirror, LinkIsGrim + * Refreshes nvg effect if switching NVG goggles. + * + * Arguments: + * 0: Unit + * 1: Slot item + * 2: Slot number + * 3: Item assigned + * + * Return Value: + * None + * + * Example: + * [player, "ACE_NVG_Wide", 616, true] call ace_nightvision_fnc_onSlotItemChanged + * + * Public: No + */ + +params ["_unit", "_item", "_slot", "_assign"]; +TRACE_4("onSlotItemChanged",_unit,_item,_slot,_assign); + +if (_slot != TYPE_HMD) exitWith {}; + +if (!_assign) exitWith { + GVAR(playerHMD) = ""; +}; + +if (_item != GVAR(playerHMD)) then { + GVAR(playerHMD) = _item; + [] call FUNC(refreshGoggleType); +}; diff --git a/addons/nightvision/functions/fnc_pfeh.sqf b/addons/nightvision/functions/fnc_pfeh.sqf index dbd101631cd..9d5f6e93bb8 100644 --- a/addons/nightvision/functions/fnc_pfeh.sqf +++ b/addons/nightvision/functions/fnc_pfeh.sqf @@ -163,7 +163,9 @@ if (CBA_missionTime < GVAR(nextEffectsUpdate)) then { }; _fogApply = linearConversion [0, 1, GVAR(priorFog) select 0, (GVAR(fogScaling) * _fogApply), 1]; // mix in old fog if present - GVAR(nvgFog) = [_fogApply, 0, 0]; + GVAR(nvgFog) = fogParams; + GVAR(nvgFog) set [0, _fogApply]; + 0 setFog GVAR(nvgFog) }; diff --git a/addons/nightvision/functions/fnc_refreshGoggleType.sqf b/addons/nightvision/functions/fnc_refreshGoggleType.sqf index ccfbd017b6f..6ed6aa1d687 100644 --- a/addons/nightvision/functions/fnc_refreshGoggleType.sqf +++ b/addons/nightvision/functions/fnc_refreshGoggleType.sqf @@ -30,7 +30,7 @@ private _blurRadius = -1; private _preset = getArray (configFile >> "CfgWeapons" >> "NVGoggles" >> QGVAR(colorPreset)); if ((alive ACE_player) && {isNull (ACE_controlledUAV select 0)}) then { - if (((vehicle ACE_player) == ACE_player) || { + if ((isNull objectParent ACE_player) || { // Test if we are using player's nvg or if sourced from vehicle: private _currentVehicle = vehicle ACE_player; @@ -106,7 +106,7 @@ if (_borderImage == "") then { _borderImageCtrl ctrlSetFade ([.15, 0] select _eyeCups); #define BORDER_SIZE 3 - GVAR(defaultPositionBorder) = [safezoneX - (((BORDER_SIZE * 0.75) * safezoneH) - safezoneW) / 2, safezoneY - ((BORDER_SIZE - 1) / 2) * safezoneH, (BORDER_SIZE * 0.75) * safezoneH, BORDER_SIZE * safezoneH]; + GVAR(defaultPositionBorder) = [safeZoneX - (((BORDER_SIZE * 0.75) * safeZoneH) - safeZoneW) / 2, safeZoneY - ((BORDER_SIZE - 1) / 2) * safeZoneH, (BORDER_SIZE * 0.75) * safeZoneH, BORDER_SIZE * safeZoneH]; [_borderImageCtrl, GVAR(defaultPositionBorder), _scale] call FUNC(scaleCtrl); }; @@ -119,7 +119,7 @@ if (_hideHex) then { _hexCtrl ctrlSetText QPATHTOF(data\nvg_mask_hexes_thin.paa); #define HEX_SIZE 1.5 - GVAR(defaultPositionHex) = [safezoneX - (((HEX_SIZE * 0.75) * safezoneH) - safezoneW) / 2, safezoneY - ((HEX_SIZE - 1) / 2) * safezoneH, (HEX_SIZE * 0.75) * safezoneH, HEX_SIZE * safezoneH]; + GVAR(defaultPositionHex) = [safeZoneX - (((HEX_SIZE * 0.75) * safeZoneH) - safeZoneW) / 2, safeZoneY - ((HEX_SIZE - 1) / 2) * safeZoneH, (HEX_SIZE * 0.75) * safeZoneH, HEX_SIZE * safeZoneH]; [_hexCtrl, GVAR(defaultPositionHex), _scale] call FUNC(scaleCtrl); }; diff --git a/addons/nlaw/CfgAmmo.hpp b/addons/nlaw/CfgAmmo.hpp index f572678d20b..650fa148873 100644 --- a/addons/nlaw/CfgAmmo.hpp +++ b/addons/nlaw/CfgAmmo.hpp @@ -1,41 +1,11 @@ +class ace_missileguidance_type_Nlaw; class CfgAmmo { class M_NLAW_AT_F; class ACE_NLAW: M_NLAW_AT_F { hit = 400; // Default was 500 indirectHit = 20; // Default was 15 - class ace_missileguidance { + class ace_missileguidance: ace_missileguidance_type_Nlaw { enabled = 1; - - pitchRate = 5; // Minium flap deflection for guidance - yawRate = 10; // Maximum flap deflection for guidance - - canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode - - // Guidance type for munitions - defaultSeekerType = QGVAR(seeker); - seekerTypes[] = {QGVAR(seeker)}; - - defaultSeekerLockMode = "LOBL"; - seekerLockModes[] = {"LOBL"}; - - defaultNavigationType = QGVAR(PLOS); - navigationTypes[] = { QGVAR(PLOS) }; - - seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] - seekerAngle = 45; // Angle in front of the missile which can be searched - seekerAccuracy = 1; // seeker accuracy multiplier - - seekerMinRange = 0; - seekerMaxRange = 10; // Range from the missile which the seeker can visually search - - // Attack profile type selection - defaultAttackProfile = QGVAR(directAttack); - attackProfiles[] = {QGVAR(directAttack), QGVAR(overflyTopAttack)}; - useModeForAttackProfile = 1; - showHintOnCycle = 1; - - // Run once at fired event - onFired = QFUNC(onFired); }; }; diff --git a/addons/nlaw/XEH_postInit.sqf b/addons/nlaw/XEH_postInit.sqf index 16be48ce26c..5e3f35572c8 100644 --- a/addons/nlaw/XEH_postInit.sqf +++ b/addons/nlaw/XEH_postInit.sqf @@ -30,20 +30,20 @@ addMissionEventHandler ["Draw3d", { // GREEN - Draw an object called "testTarget"'s aim pos and 1 sec aimpos predicted by velocity if ((!isNil "testTarget") && {!isNull testTarget}) then { { - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,1,0,1], ASLtoAGL ((aimPos testTarget) vectorAdd ((velocity testTarget) vectorMultiply _x)), 0.75, 0.75, 0, format ["%1", _x], 1, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,1,0,1], ASLToAGL ((aimPos testTarget) vectorAdd ((velocity testTarget) vectorMultiply _x)), 0.75, 0.75, 0, format ["%1", _x], 1, 0.025, "TahomaB"]; } forEach [0, 1, 2, 3]; }; // RED - If lock key is down, draw weapon dir and predicted path at various times if (GVAR(yawChange) != 0) then { { - private _viewASL = AGLtoASL positionCameraToWorld [0,0,0]; + private _viewASL = AGLToASL positionCameraToWorld [0,0,0]; private _viewDir = ACE_player weaponDirection (currentWeapon ACE_player); (_viewDir call CBA_fnc_vect2Polar) params ["", "_yaw", "_pitch"]; private _realYaw = _yaw + GVAR(yawChange) * _x; private _realPitch = _pitch + GVAR(pitchChange) * _x; private _returnTargetPos = _viewASL vectorAdd ([1000, _realYaw, _realPitch] call CBA_fnc_polar2vect); - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLtoAGL _returnTargetPos, 0.75, 0.75, 0, format ["%1", _x], 1, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLToAGL _returnTargetPos, 0.75, 0.75, 0, format ["%1", _x], 1, 0.025, "TahomaB"]; } forEach [0, 1, 2, 3]; }; }]; diff --git a/addons/nlaw/functions/fnc_attackProfile.sqf b/addons/nlaw/functions/fnc_attackProfile.sqf index f5277808357..8f06e26f9c4 100644 --- a/addons/nlaw/functions/fnc_attackProfile.sqf +++ b/addons/nlaw/functions/fnc_attackProfile.sqf @@ -35,14 +35,14 @@ private _flightTime = CBA_missionTime - _startTime; private _realYaw = _yaw + _yawChange * _flightTime; private _realPitch = _pitch + _pitchChange * _flightTime; -drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], ASLtoAGL _launchPos, 0.75, 0.75, 0, "LAUNCH", 1, 0.025, "TahomaB"]; -drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,1,1,1], ASLtoAGL (_launchPos vectorAdd (_startLOS vectorMultiply (_distanceFromLaunch + 50))), 0.75, 0.75, 0, "Original LOS", 1, 0.025, "TahomaB"]; -drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,1,0,1], ASLtoAGL (_launchPos vectorAdd ([_distanceFromLaunch + 50, _realYaw, _realPitch] call CBA_fnc_polar2vect)), 0.75, 0.75, 0, format ["Predicted @%1sec",(floor(_flightTime * 10)/10)], 1, 0.025, "TahomaB"]; -drawLine3D [ASLtoAGL _launchPos, ASLtoAGL (_launchPos vectorAdd (_startLOS vectorMultiply (_distanceFromLaunch + 50))), [1,0,0,1]]; -drawLine3D [ASLtoAGL _launchPos, ASLtoAGL (_launchPos vectorAdd ([_distanceFromLaunch + 50, _realYaw, _realPitch] call CBA_fnc_polar2vect)), [1,1,0,1]]; +drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], ASLToAGL _launchPos, 0.75, 0.75, 0, "LAUNCH", 1, 0.025, "TahomaB"]; +drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,1,1,1], ASLToAGL (_launchPos vectorAdd (_startLOS vectorMultiply (_distanceFromLaunch + 50))), 0.75, 0.75, 0, "Original LOS", 1, 0.025, "TahomaB"]; +drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,1,0,1], ASLToAGL (_launchPos vectorAdd ([_distanceFromLaunch + 50, _realYaw, _realPitch] call CBA_fnc_polar2vect)), 0.75, 0.75, 0, format ["Predicted @%1sec",(floor(_flightTime * 10)/10)], 1, 0.025, "TahomaB"]; +drawLine3D [ASLToAGL _launchPos, ASLToAGL (_launchPos vectorAdd (_startLOS vectorMultiply (_distanceFromLaunch + 50))), [1,0,0,1]]; +drawLine3D [ASLToAGL _launchPos, ASLToAGL (_launchPos vectorAdd ([_distanceFromLaunch + 50, _realYaw, _realPitch] call CBA_fnc_polar2vect)), [1,1,0,1]]; private _test = lineIntersectsSurfaces [_launchPos, _launchPos vectorAdd (_startLOS vectorMultiply 3000), player, _projectile]; if ((count _test) > 0) then { - private _posAGL = ASLtoAGL ((_test select 0) select 0); + private _posAGL = ASLToAGL ((_test select 0) select 0); drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], _posAGL, 0.75, 0.75, 0, "Original Impact", 1, 0.025, "TahomaB"]; }; #endif diff --git a/addons/nlaw/functions/fnc_navigation.sqf b/addons/nlaw/functions/fnc_navigation.sqf index 1cfd8f91d56..7572b44d6f3 100644 --- a/addons/nlaw/functions/fnc_navigation.sqf +++ b/addons/nlaw/functions/fnc_navigation.sqf @@ -67,8 +67,8 @@ _navigationParams set [6, _yawRateDifference]; private _desiredYawChange = _yawRateDifference * PROPORTIONALITY_CONSTANT + _yawRateDifference * 2; #ifdef DRAW_NLAW_INFO -drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], ASLtoAGL getPosASLVisual _projectile, 0.75, 0.75, 0, format ["dP [%1] dY: [%2]", _desiredPitchChange, _desiredYawChange], 1, 0.025, "TahomaB"]; -drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], [0, 0, 1] vectorAdd ASLtoAGL getPosASLVisual _projectile, 0.75, 0.75, 0, format ["pitch proportional [%1] yaw proportional [%2]", _pitchModifier, _yawModifier], 1, 0.025, "TahomaB"]; +drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], ASLToAGL getPosASLVisual _projectile, 0.75, 0.75, 0, format ["dP [%1] dY: [%2]", _desiredPitchChange, _desiredYawChange], 1, 0.025, "TahomaB"]; +drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], [0, 0, 1] vectorAdd ASLToAGL getPosASLVisual _projectile, 0.75, 0.75, 0, format ["pitch proportional [%1] yaw proportional [%2]", _pitchModifier, _yawModifier], 1, 0.025, "TahomaB"]; #endif TRACE_4("nlaw pitch/yaw info",_currentPitch,_lastPitch,_currentYaw,_lastYaw); diff --git a/addons/nlaw/functions/fnc_onFired.sqf b/addons/nlaw/functions/fnc_onFired.sqf index e8332b8caf9..cbaa2cfc0a4 100644 --- a/addons/nlaw/functions/fnc_onFired.sqf +++ b/addons/nlaw/functions/fnc_onFired.sqf @@ -50,7 +50,7 @@ if (_shooter == ACE_player) then { private _debugYaw = _debugYaw + _yawChange * _x; private _debugPitch = _debugPitch + _pitchChange * _x; private _debugPos = _debugPos vectorAdd ([_distance, _debugYaw, _debugPitch] call CBA_fnc_polar2vect); - GVAR(debug_firedPrediction) pushBack ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,0,0,1], ASLtoAGL _debugPos, 0.5, 0.5, 0, format ["%1", _x], 1, 0.025, "TahomaB"]; + GVAR(debug_firedPrediction) pushBack ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0,0,0,1], ASLToAGL _debugPos, 0.5, 0.5, 0, format ["%1", _x], 1, 0.025, "TahomaB"]; }; #endif } else { diff --git a/addons/nlaw/functions/fnc_seeker.sqf b/addons/nlaw/functions/fnc_seeker.sqf index a3a60e94a1f..a77b7ecb3b6 100644 --- a/addons/nlaw/functions/fnc_seeker.sqf +++ b/addons/nlaw/functions/fnc_seeker.sqf @@ -62,7 +62,7 @@ if ((_projPos distance _launchPos) >= 20) then { // This represents a position that the missile was at between the last frame and now private _virtualPos = _lastPos vectorAdd (_vectorDir vectorMultiply _stepSize); #ifdef DRAW_NLAW_INFO - drawLine3D [ASLtoAGL _virtualPos, ASLtoAGL (_virtualPos vectorAdd [0,0,-5]), [1,0,_stepSize/(_frameDistance max 0.1),1]]; + drawLine3D [ASLToAGL _virtualPos, ASLToAGL (_virtualPos vectorAdd [0,0,-5]), [1,0,_stepSize/(_frameDistance max 0.1),1]]; #endif // Limit scan to 5 meters directly down (shaped charge jet has a very limited range) @@ -71,7 +71,7 @@ if ((_projPos distance _launchPos) >= 20) then { (_res select 0) params ["_targetPos", "", "_target"]; if ((_target isKindOf "Tank") || {_target isKindOf "Car"} || {_target isKindOf "Air"}) exitWith { TRACE_3("Firing shaped charge down",_target,_targetPos distance _virtualPos,_frameDistance); - TRACE_2("",_target worldToModel (ASLtoAGL _virtualPos),boundingBoxReal _target); + TRACE_2("",_target worldToModel (ASLToAGL _virtualPos),boundingBoxReal _target); _virtualPos = _virtualPos vectorAdd (_vectorDir vectorMultiply 1.25); deleteVehicle _projectile; diff --git a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf index 74d18a66d90..00d97d20082 100644 --- a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf +++ b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf @@ -75,8 +75,8 @@ _text = format [" { - _var = missionNamespace getVariable [_x, nil]; - if(!isnil "_var" && {_var isEqualType []} && {(count _var) > MIN_ARRAY_SIZE}) then { + private _var = missionNamespace getVariable [_x, nil]; + if(!isNil "_var" && {_var isEqualType []} && {(count _var) > MIN_ARRAY_SIZE}) then { _text = format ["%1 - ARRAY SIZE: %2", _x, (count _var)]; [_text] call _outputText; }; @@ -86,7 +86,7 @@ _text = format [" private _unit = _x; { private _var = _unit getVariable [_x, nil]; - if(!isnil "_var" && {_var isEqualType []} && {(count _var) > MIN_ARRAY_SIZE}) then { + if(!isNil "_var" && {_var isEqualType []} && {(count _var) > MIN_ARRAY_SIZE}) then { _text = format ["%1 on [%2] - ARRAY SIZE: %3", _x, _unit, (count _var)]; [_text] call _outputText; }; diff --git a/addons/optionsmenu/gui/mainMenu.hpp b/addons/optionsmenu/gui/mainMenu.hpp index 0b26df7017a..9df21dbeb5f 100644 --- a/addons/optionsmenu/gui/mainMenu.hpp +++ b/addons/optionsmenu/gui/mainMenu.hpp @@ -22,7 +22,7 @@ class RscDisplayMain: RscStandardDisplay { class ACE_news_apex: InfoNews { idc = IDC_MAIN_INFO; - y = "safezoneY + safezoneH - (3 * 2 + 1) * (pixelH * pixelGrid * 2) - 4 * (4 * pixelH)"; + y = "safeZoneY + safeZoneH - (3 * 2 + 1) * (pixelH * pixelGrid * 2) - 4 * (4 * pixelH)"; class Controls: Controls { class Background: Background {}; diff --git a/addons/overheating/XEH_postInit.sqf b/addons/overheating/XEH_postInit.sqf index a49030b1adb..4abe8d93ee5 100644 --- a/addons/overheating/XEH_postInit.sqf +++ b/addons/overheating/XEH_postInit.sqf @@ -71,7 +71,7 @@ if (hasInterface) then { ["CAManBase", "Reloaded", { params ["_unit", "_weapon", "_muzzle"]; if (_muzzle == _weapon) then { - _unit setVariable [format [QGVAR(%1_ammoTemp), _weapon], 0]; + _unit setVariable [format [QGVAR(%1_ammoTemp), _weapon], ambientTemperature select 0]; }; }] call CBA_fnc_addClassEventHandler; }; diff --git a/addons/overheating/functions/fnc_coolWeaponWithWaterSource.sqf b/addons/overheating/functions/fnc_coolWeaponWithWaterSource.sqf index 67f22a3cc08..18f8b0f31a3 100644 --- a/addons/overheating/functions/fnc_coolWeaponWithWaterSource.sqf +++ b/addons/overheating/functions/fnc_coolWeaponWithWaterSource.sqf @@ -37,7 +37,7 @@ private _fnc_onFinish = { ] call CBA_fnc_notify; }; - [_player, _player, currentWeapon _player] call ace_overheating_fnc_checkTemperature; + [_player, _player, currentWeapon _player] call FUNC(checkTemperature); GVAR(coolingWeaponWithWaterSource) = false; }; diff --git a/addons/overheating/functions/fnc_getWeaponData.sqf b/addons/overheating/functions/fnc_getWeaponData.sqf index 8edd86bb1aa..ec68cf67b9d 100644 --- a/addons/overheating/functions/fnc_getWeaponData.sqf +++ b/addons/overheating/functions/fnc_getWeaponData.sqf @@ -77,7 +77,7 @@ if (_muzzle == "this") then { _muzzle = _weapon; }; -private _reloadTime = getNumber (configfile >> "CfgWeapons" >> _weapon >> (_modes select 0) >> "reloadTime"); +private _reloadTime = getNumber (configFile >> "CfgWeapons" >> _weapon >> (_modes select 0) >> "reloadTime"); private _closedBolt = getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(closedBolt)); diff --git a/addons/overpressure/functions/fnc_firedEHBB.sqf b/addons/overpressure/functions/fnc_firedEHBB.sqf index 98147fc7df3..59b51f28629 100644 --- a/addons/overpressure/functions/fnc_firedEHBB.sqf +++ b/addons/overpressure/functions/fnc_firedEHBB.sqf @@ -32,7 +32,7 @@ private _direction = (vectorDir _projectile) vectorMultiply -1; private _position = (getPosASL _projectile) vectorAdd (_direction vectorMultiply _offset); // Damage to others -private _affected = (ASLtoAGL _position) nearEntities ["CAManBase", _backblastRange]; +private _affected = (ASLToAGL _position) nearEntities ["CAManBase", _backblastRange]; // Let each client handle their own affected units ["ace_overpressure", [_unit, _position, _direction, _weapon, _magazine, _ammo], _affected] call CBA_fnc_targetEvent; diff --git a/addons/overpressure/functions/fnc_firedEHOP.sqf b/addons/overpressure/functions/fnc_firedEHOP.sqf index b4b7763eae6..eb51a055076 100644 --- a/addons/overpressure/functions/fnc_firedEHOP.sqf +++ b/addons/overpressure/functions/fnc_firedEHOP.sqf @@ -33,7 +33,7 @@ private _position = getPosASL _projectile; private _direction = vectorDir _projectile; // Damage to others -private _affected = (ASLtoAGL _position) nearEntities ["CAManBase", _dangerZoneRange]; +private _affected = (ASLToAGL _position) nearEntities ["CAManBase", _dangerZoneRange]; // Let each client handle their own affected units ["ace_overpressure", [_unit, _position, _direction, _weapon, _magazine, _ammo], _affected] call CBA_fnc_targetEvent; diff --git a/addons/overpressure/functions/fnc_overpressureDamage.sqf b/addons/overpressure/functions/fnc_overpressureDamage.sqf index 12b7a820cab..ee4c588f3e1 100644 --- a/addons/overpressure/functions/fnc_overpressureDamage.sqf +++ b/addons/overpressure/functions/fnc_overpressureDamage.sqf @@ -30,7 +30,7 @@ _opValues params ["_overpressureAngle", "_overpressureRange", "_overpressureDama TRACE_3("cache",_overpressureAngle,_overpressureRange,_overpressureDamage); { - if (local _x && {_x != _firer} && {vehicle _x == _x}) then { + if (local _x && {_x != _firer} && {isNull objectParent _x}) then { private _targetPositionASL = eyePos _x; private _relativePosition = _targetPositionASL vectorDiff _posASL; private _axisDistance = _relativePosition vectorDotProduct _direction; @@ -73,4 +73,4 @@ TRACE_3("cache",_overpressureAngle,_overpressureRange,_overpressureDamage); #endif }; }; -} forEach ((ASLtoAGL _posASL) nearEntities ["CAManBase", _overpressureRange]); +} forEach ((ASLToAGL _posASL) nearEntities ["CAManBase", _overpressureRange]); diff --git a/addons/overpressure/stringtable.xml b/addons/overpressure/stringtable.xml index c8a0aa895d5..2199a4d63ba 100644 --- a/addons/overpressure/stringtable.xml +++ b/addons/overpressure/stringtable.xml @@ -53,6 +53,7 @@ 後方噴射の距離係数 후폭풍 거리 계수 Multiplicateur de distance de réflexion + Coeficiente de Distancia de Fogonazo Scales the backblast effect @@ -62,6 +63,7 @@ 無反動砲による後方噴射の影響範囲の大きさ 후폭풍 효과의 스케일을 조정합니다 Multiplicateur de distance de réflexion + Escala el efecto del fogonazo Backblast range diff --git a/addons/parachute/RscTitles.hpp b/addons/parachute/RscTitles.hpp index 48cf11bee4d..388115a2a88 100644 --- a/addons/parachute/RscTitles.hpp +++ b/addons/parachute/RscTitles.hpp @@ -13,37 +13,37 @@ class RscTitles { class AltimeterImage: RscPicture { idc = 1200; text = QPATHTOF(UI\watch_altimeter.paa); - x = "0.118437 * safezoneW + safezoneX"; - y = "0.621 * safezoneH + safezoneY"; - w = "0.20625 * safezoneW"; - h = "0.341 * safezoneH"; + x = "0.118437 * safeZoneW + safeZoneX"; + y = "0.621 * safeZoneH + safeZoneY"; + w = "0.20625 * safeZoneW"; + h = "0.341 * safeZoneH"; }; class HeightText: RscText { idc = 1100; text = "----"; - x = "0.200937 * safezoneW + safezoneX"; - y = "0.764 * safezoneH + safezoneY"; - w = "0.04125 * safezoneW"; - h = "0.033 * safezoneH"; + x = "0.200937 * safeZoneW + safeZoneX"; + y = "0.764 * safeZoneH + safeZoneY"; + w = "0.04125 * safeZoneW"; + h = "0.033 * safeZoneH"; colorBackground[] = {0,0,0,0}; colorText[] = {0,0,0,1}; }; class DecendRate: RscText { idc = 1000; text = "--"; - x = "0.21125 * safezoneW + safezoneX"; - y = "0.742 * safezoneH + safezoneY"; - w = "0.020625 * safezoneW"; - h = "0.022 * safezoneH"; + x = "0.21125 * safeZoneW + safeZoneX"; + y = "0.742 * safeZoneH + safeZoneY"; + w = "0.020625 * safeZoneW"; + h = "0.022 * safeZoneH"; colorText[] = {0,0,0,1}; }; class TimeText: RscText { idc = 1001; text = "00:00:00"; - x = "0.202094 * safezoneW + safezoneX"; - y = "0.819 * safezoneH + safezoneY"; - w = "0.0380375 * safezoneW"; - h = "0.022 * safezoneH"; + x = "0.202094 * safeZoneW + safeZoneX"; + y = "0.819 * safeZoneH + safeZoneY"; + w = "0.0380375 * safeZoneW"; + h = "0.022 * safeZoneH"; colorText[] = {0,0,0,1}; }; }; diff --git a/addons/parachute/functions/fnc_cutParachute.sqf b/addons/parachute/functions/fnc_cutParachute.sqf index c66d9ff0504..604fb201076 100644 --- a/addons/parachute/functions/fnc_cutParachute.sqf +++ b/addons/parachute/functions/fnc_cutParachute.sqf @@ -18,6 +18,6 @@ params ["_unit", "_parachute"]; TRACE_2("cutParachute",_unit,_parachute); -playSound3d ["A3\Sounds_F\characters\parachute\parachute_landing.wss", _unit]; +playSound3D ["A3\Sounds_F\characters\parachute\parachute_landing.wss", _unit]; _unit action ["GetOut", _parachute]; deleteVehicle _parachute; diff --git a/addons/pylons/XEH_postInit.sqf b/addons/pylons/XEH_postInit.sqf index 3167c0a838a..3acbfe71571 100644 --- a/addons/pylons/XEH_postInit.sqf +++ b/addons/pylons/XEH_postInit.sqf @@ -36,7 +36,7 @@ GVAR(loadoutAction) = [ // create action [QGVAR(setPylonLoadOutEvent), { params ["_aircraft", "_pylonIndex", "_pylon", "_turret", "_weaponToRemove"]; TRACE_5("setPylonLoadOutEvent",_aircraft,_pylonIndex,_pylon,_turret,_weaponToRemove); - _aircraft setPylonLoadOut [_pylonIndex, _pylon, false, _turret]; + _aircraft setPylonLoadout [_pylonIndex, _pylon, false, _turret]; if (_weaponToRemove != "") then { { if (_aircraft turretLocal _x) then { diff --git a/addons/pylons/functions/fnc_showDialog.sqf b/addons/pylons/functions/fnc_showDialog.sqf index 9c0faab52d0..7df50c6b2aa 100644 --- a/addons/pylons/functions/fnc_showDialog.sqf +++ b/addons/pylons/functions/fnc_showDialog.sqf @@ -73,8 +73,8 @@ GVAR(comboBoxes) = []; _combo ctrlSetPosition [ (_picturePos select 0) + (_uiPos select 0), (_picturePos select 1) + (_uiPos select 1), - 0.1 * safezoneW, - 0.028 * safezoneH + 0.1 * safeZoneW, + 0.028 * safeZoneH ]; _combo ctrlCommit 0; @@ -113,10 +113,10 @@ GVAR(comboBoxes) = []; [_button, false, _turret] call FUNC(onButtonTurret); _button ctrlAddEventHandler ["ButtonClick", {[_this select 0, true, []] call FUNC(onButtonTurret)}]; _button ctrlSetPosition [ - (_picturePos select 0) + (_uiPos select 0) - (0.0165 * safezoneW), + (_picturePos select 0) + (_uiPos select 0) - (0.0165 * safeZoneW), (_picturePos select 1) + (_uiPos select 1), - 0.0165 * safezoneW, - 0.028 * safezoneH + 0.0165 * safeZoneW, + 0.028 * safeZoneH ]; _button ctrlCommit 0; }; diff --git a/addons/pylons/menu.hpp b/addons/pylons/menu.hpp index 143792e566e..3f238a9da1c 100644 --- a/addons/pylons/menu.hpp +++ b/addons/pylons/menu.hpp @@ -23,143 +23,143 @@ class GVAR(DialogLoadout) { class TextTitlebar: RscText { idc = ID_TEXT_TITLEBAR; text = CSTRING(AircraftLoadoutTitle); - x = "0.15835 * safezoneW + safezoneX"; - y = "0.262 * safezoneH + safezoneY"; - w = "0.68304 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.15835 * safeZoneW + safeZoneX"; + y = "0.262 * safeZoneH + safeZoneY"; + w = "0.68304 * safeZoneW"; + h = "0.028 * safeZoneH"; colorBackground[] = {"(profileNamespace getVariable ['GUI_BCG_RGB_R', 0.13])","(profileNamespace getVariable ['GUI_BCG_RGB_G', 0.54])","(profileNamespace getVariable ['GUI_BCG_RGB_B', 0.21])",1}; }; class BackgroundDialog: IGUIBack { idc = ID_BACKGROUND_DIALOG; - x = "0.15835 * safezoneW + safezoneX"; - y = "0.29 * safezoneH + safezoneY"; - w = "0.68304 * safezoneW"; - h = "0.448 * safezoneH"; + x = "0.15835 * safeZoneW + safeZoneX"; + y = "0.29 * safeZoneH + safeZoneY"; + w = "0.68304 * safeZoneW"; + h = "0.448 * safeZoneH"; colorBackground[] = {0,0,0,0.3}; }; class BackgroundPicture: IGUIBack { idc = ID_BACKGROUND_PICTURE; - x = "0.171616 * safezoneW + safezoneX"; - y = "0.318 * safezoneH + safezoneY"; - w = "0.440035 * safezoneW"; - h = "0.392 * safezoneH"; + x = "0.171616 * safeZoneW + safeZoneX"; + y = "0.318 * safeZoneH + safeZoneY"; + w = "0.440035 * safeZoneW"; + h = "0.392 * safeZoneH"; colorBackground[] = {0.3,0.3,0.3,1}; }; class PictureAircraft: RscPictureKeepAspect { idc = ID_PICTURE_AIRCRAFT; - x = "0.171616 * safezoneW + safezoneX"; - y = "0.318 * safezoneH + safezoneY"; - w = "0.440035 * safezoneW"; - h = "0.392 * safezoneH"; + x = "0.171616 * safeZoneW + safeZoneX"; + y = "0.318 * safeZoneH + safeZoneY"; + w = "0.440035 * safeZoneW"; + h = "0.392 * safeZoneH"; }; class CheckboxMirror: RscCheckBox { idc = ID_CHECKBOX_MIRROR; - x = "0.171616 * safezoneW + safezoneX"; - y = "0.318 * safezoneH + safezoneY"; - w = "0.0165 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.171616 * safeZoneW + safeZoneX"; + y = "0.318 * safeZoneH + safeZoneY"; + w = "0.0165 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class TextMirror: RscText { idc = ID_TEXT_MIRROR; text = "$STR_3DEN_Object_Attribute_PylonsMirror_displayName"; tooltip="$STR_3DEN_Object_Attribute_PylonsMirror_tooltip"; - x = "0.188116 * safezoneW + safezoneX"; - y = "0.318 * safezoneH + safezoneY"; - w = "0.0656768 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.188116 * safeZoneW + safeZoneX"; + y = "0.318 * safeZoneH + safeZoneY"; + w = "0.0656768 * safeZoneW"; + h = "0.028 * safeZoneH"; colorBackground[] = {0,0,0,0.5}; }; class CheckboxFRIES: RscCheckBox { idc = ID_CHECKBOX_FRIES; - x = "0.171616 * safezoneW + safezoneX"; - y = "0.346 * safezoneH + safezoneY"; - w = "0.0165 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.171616 * safeZoneW + safeZoneX"; + y = "0.346 * safeZoneH + safeZoneY"; + w = "0.0165 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class TextFRIES: RscText { idc = ID_TEXT_FRIES; text = "FRIES"; - x = "0.188116 * safezoneW + safezoneX"; - y = "0.346 * safezoneH + safezoneY"; - w = "0.0656768 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.188116 * safeZoneW + safeZoneX"; + y = "0.346 * safeZoneH + safeZoneY"; + w = "0.0656768 * safeZoneW"; + h = "0.028 * safeZoneH"; colorBackground[] = {0,0,0,0.5}; }; class TextListTitle: RscText { idc = ID_TEXT_LISTTITLE; - x = "0.624786 * safezoneW + safezoneX"; - y = "0.318 * safezoneH + safezoneY"; - w = "0.203437 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.624786 * safeZoneW + safeZoneX"; + y = "0.318 * safeZoneH + safeZoneY"; + w = "0.203437 * safeZoneW"; + h = "0.028 * safeZoneH"; colorBackground[] = {0,0,0,0.5}; }; class ListLoadouts: RscListBox { idc = ID_LIST_LOADOUTS; - x = "0.624786 * safezoneW + safezoneX"; - y = "0.346 * safezoneH + safezoneY"; - w = "0.203437 * safezoneW"; - h = "0.294 * safezoneH"; + x = "0.624786 * safeZoneW + safeZoneX"; + y = "0.346 * safeZoneH + safeZoneY"; + w = "0.203437 * safeZoneW"; + h = "0.294 * safeZoneH"; }; class EditLoadoutName: RscEdit { idc = ID_EDIT_LOADOUTNAME; - x = "0.624786 * safezoneW + safezoneX"; - y = "0.64 * safezoneH + safezoneY"; - w = "0.203437 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.624786 * safeZoneW + safeZoneX"; + y = "0.64 * safeZoneH + safeZoneY"; + w = "0.203437 * safeZoneW"; + h = "0.028 * safeZoneH"; colorBackground[] = {0,0,0,0.7}; }; class ButtonSave: RscButtonMenu { idc = ID_BUTTON_SAVE; action = QUOTE(call FUNC(onButtonSave)); text = "$STR_disp_int_save"; - x = "0.624786 * safezoneW + safezoneX"; - y = "0.682 * safezoneH + safezoneY"; - w = "0.0590625 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.624786 * safeZoneW + safeZoneX"; + y = "0.682 * safeZoneH + safeZoneY"; + w = "0.0590625 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class ButtonLoad: RscButtonMenu { idc = ID_BUTTON_LOAD; action = QUOTE(call FUNC(onButtonLoad)); text = "$STR_disp_int_load"; - x = "0.69703 * safezoneW + safezoneX"; - y = "0.682 * safezoneH + safezoneY"; - w = "0.0590625 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.69703 * safeZoneW + safeZoneX"; + y = "0.682 * safeZoneH + safeZoneY"; + w = "0.0590625 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class ButtonDelete: RscButtonMenu { idc = ID_BUTTON_DELETE; action = QUOTE(call FUNC(onButtonDelete)); text = "$STR_disp_delete"; - x = "0.769275 * safezoneW + safezoneX"; - y = "0.682 * safezoneH + safezoneY"; - w = "0.0590625 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.769275 * safeZoneW + safeZoneX"; + y = "0.682 * safeZoneH + safeZoneY"; + w = "0.0590625 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class ButtonApply: RscButtonMenu { idc = ID_BUTTON_APPLY; action = QUOTE(call FUNC(onButtonApply)); text = "$STR_ui_debug_but_apply"; - x = "0.683895 * safezoneW + safezoneX"; - y = "0.738 * safezoneH + safezoneY"; - w = "0.0721875 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.683895 * safeZoneW + safeZoneX"; + y = "0.738 * safeZoneH + safeZoneY"; + w = "0.0721875 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class ButtonClose: RscButtonMenu { idc = ID_BUTTON_CLOSE; text = "$STR_disp_cancel"; action = QUOTE(call FUNC(onButtonClose)); - x = "0.769275 * safezoneW + safezoneX"; - y = "0.738 * safezoneH + safezoneY"; - w = "0.0721875 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.769275 * safeZoneW + safeZoneX"; + y = "0.738 * safeZoneH + safeZoneY"; + w = "0.0721875 * safeZoneW"; + h = "0.028 * safeZoneH"; }; class TextBanner: RscText { idc = ID_TEXT_BANNER; text = CSTRING(BannerText); - x = "0.171616 * safezoneW + safezoneX"; - y = "0.738 * safezoneH + safezoneY"; - w = "0.440035 * safezoneW"; - h = "0.028 * safezoneH"; + x = "0.171616 * safeZoneW + safeZoneX"; + y = "0.738 * safeZoneH + safeZoneY"; + w = "0.440035 * safeZoneW"; + h = "0.028 * safeZoneH"; colorBackground[] = {0.5,0,0,0.5}; }; }; diff --git a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf index c1318e3f747..efb40d2ac1a 100644 --- a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf +++ b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf @@ -34,14 +34,14 @@ [ARR_5( \ {!isNull objectParent (_this select 0)}, \ { \ - LOG_1("moved in after %1 frames",diag_frameno-GVAR(frame)); \ + LOG_1("moved in after %1 frames",diag_frameNo-GVAR(frame)); \ (_this select 0) enableSimulation true; \ }, \ [ARR_3(_player,_moveBackCode,_moveBackParams)], \ TAKEN_SEAT_TIMEOUT, \ { \ params [ARR_3("_player","_moveBackCode","_moveBackParams")]; \ - WARNING_1("failed move in after %1 frames",diag_frameno-GVAR(frame)); \ + WARNING_1("failed move in after %1 frames",diag_frameNo-GVAR(frame)); \ [ARR_2(_player,_moveBackParams)] call _moveBackCode; \ localize "str_mis_state_failed" call EFUNC(common,displayTextStructured); \ _player enableSimulation true; \ @@ -61,7 +61,7 @@ private _fnc_move = { (_this select 2) params ["_moveInCode", "_moveInParams", "_currentTurret", "_moveBackCode", "_moveBackParams"]; - TRACE_6("fnc_move params",_moveInCode,_moveInParams,_currentTurret,_moveBackCode,_moveBackParams,call {GVAR(frame)=diag_frameno}); + TRACE_6("fnc_move params",_moveInCode,_moveInParams,_currentTurret,_moveBackCode,_moveBackParams,call {GVAR(frame)=diag_frameNo}); // workaround getting damage when moveOut while vehicle is moving // also this helps with arma bug when unit is stuck in wrong anim when move in turret with configured enabledByAnimationSource @@ -83,7 +83,7 @@ private _fnc_move = { {params ["_target", "_player", "_currentTurret"]; IS_MOVED_OUT}, { params ["", "_player", "", "_moveInCode", "_moveInParams", "_moveBackCode", "_moveBackParams"]; - LOG_2("moved out after %1 frames",diag_frameno-GVAR(frame),call {GVAR(frame)=diag_frameno; 0}); + LOG_2("moved out after %1 frames",diag_frameNo-GVAR(frame),call {GVAR(frame)=diag_frameNo; 0}); [_player, _moveInParams] call _moveInCode; WAIT_IN_OR_MOVE_BACK; }, @@ -202,15 +202,15 @@ private _cargoNumber = -1; if (_vehicle lockedTurret _turretPath) then {breakTo "crewLoop"}; if (_role == "gunner" && {unitIsUAV _vehicle}) then {breakTo "crewLoop"}; private _turretConfig = [_vehicleConfig, _turretPath] call CBA_fnc_getTurret; - if (!_isInVehicle) then { - _params = ["GetInTurret", _vehicle, _turretPath]; - _statement = {_player action (_this select 2)}; - } else { + if (_isInVehicle) then { private _gunnerCompartments = (_turretConfig >> "gunnerCompartments") call BIS_fnc_getCfgData; TO_COMPARTMENT_STRING(_gunnerCompartments); if (_compartment != _gunnerCompartments) then {breakTo "crewLoop"}; _params = [{MOVE_IN_CODE(moveInTurret)}, [_vehicle, _turretPath], _currentTurret, _moveBackCode, _moveBackParams]; _statement = _fnc_move; + } else { + _params = ["GetInTurret", _vehicle, _turretPath]; + _statement = {_player action (_this select 2)}; }; _name = getText (_turretConfig >> "gunnerName"); _icon = switch true do { diff --git a/addons/rangecard/RscTitles.hpp b/addons/rangecard/RscTitles.hpp index 720f724be4d..6b8af599752 100644 --- a/addons/rangecard/RscTitles.hpp +++ b/addons/rangecard/RscTitles.hpp @@ -73,8 +73,8 @@ class ACE_RangeCard_Dialog { SizeEX=0.025; idc=-1; style=48; - x="safezoneX"; - y="safezoneY+0.181889"; + x="safeZoneX"; + y="safeZoneY+0.181889"; w="1.62727*3/4"; h="1.62727"; colorBackground[]={1,1,1,1}; @@ -84,67 +84,67 @@ class ACE_RangeCard_Dialog { class CAPTION_TEXT_1: RangeCard_RscText { idc=770000; style=ST_LEFT; - x="safezoneX+0.18"; - y="safezoneY+0.181889+0.0"; + x="safeZoneX+0.18"; + y="safeZoneY+0.181889+0.0"; w="0.56*1.62727*3/4"; text=".408 CheyTac - 410 gr Predator Projectiles"; }; class CAPTION_TEXT_2: CAPTION_TEXT_1 { idc=770001; SizeEx=0.022; - y="safezoneY+0.181889+0.03"; + y="safeZoneY+0.181889+0.03"; text="Drop Tables for B.P.: 1013.25mb; Corrected for MVV at Air/Ammo Temperatures -15-35 °C"; }; class CAPTION_TEXT_3: CAPTION_TEXT_2 { idc=770002; - y="safezoneY+0.181889+0.06"; + y="safeZoneY+0.181889+0.06"; text="CheyTac Intervention - 29'' 1:13'' twist (M-200)"; }; class ZERO_RANGE_TEXT: RangeCard_RscText { idc=77003; style=ST_LEFT; SizeEx=0.028; - x="safezoneX+0.885"; - y="safezoneY+0.181889+0.01"; + x="safeZoneX+0.885"; + y="safeZoneY+0.181889+0.01"; w="0.125*1.62727*3/4"; text="100m ZERO"; }; class BAROMETRIC_PRESSURE_TEXT: ZERO_RANGE_TEXT { idc=77004; colorText[]={1,0,0,0.8}; - y="safezoneY+0.181889+0.05"; + y="safeZoneY+0.181889+0.05"; text="B.P.: 1013.25mb"; }; class TARGET_RANGE_TEXT_1: RangeCard_RscText { idc=770010; colorText[]={1,1,1,1}; - x="safezoneX+0.185"; - y="safezoneY+0.181889+0.098"; + x="safeZoneX+0.185"; + y="safeZoneY+0.181889+0.098"; text="Target"; }; class TARGET_RANGE_TEXT_2: TARGET_RANGE_TEXT_1 { idc=770011; SizeEx=0.03; - y="safezoneY+0.181889+0.125"; + y="safeZoneY+0.181889+0.125"; text="Range"; }; class TARGET_RANGE_TEXT_3: TARGET_RANGE_TEXT_1 { idc=770012; - y="safezoneY+0.181889+0.152"; + y="safeZoneY+0.181889+0.152"; text="(m)"; }; class BULLET_DROP_TEXT_1: RangeCard_RscText { idc=770013; - x="safezoneX+0.25"; - y="safezoneY+0.181889+0.095"; + x="safeZoneX+0.25"; + y="safeZoneY+0.181889+0.095"; w="0.405*1.62727*3/4"; text="Bullet Drop (MRADs)"; }; class WIND_LEAD_CAPTION_LIST: RangeCard_RscListNBox { idc=770100; sizeEx=0.021; - x="safezoneX+0.728"; - y="safezoneY+0.181889+0.091"; + x="safeZoneX+0.728"; + y="safeZoneY+0.181889+0.091"; w="0.25*1.62727*3/4"; h="0.0909445"; columns[]={"0.03/2", "0.985/2"}; @@ -153,8 +153,8 @@ class ACE_RangeCard_Dialog { }; class TEMPERATURE_CAPTION_LIST_1: RangeCard_RscListNBox { idc=770200; - x="safezoneX+0.24"; - y="safezoneY+0.181889+0.125"; + x="safeZoneX+0.24"; + y="safeZoneY+0.181889+0.125"; w="0.405*1.62727*3/4"; h="0.0909445"; columns[]={"0/9", "1/9", "2/9", "3/9", "4/9", "5/9", "5.9/9", "6.9/9", "7.8/9"}; @@ -163,8 +163,8 @@ class ACE_RangeCard_Dialog { }; class TEMPERATURE_CAPTION_LIST_2: RangeCard_RscListNBox { idc=770300; - x="safezoneX+0.728"; - y="safezoneY+0.181889+0.15"; + x="safeZoneX+0.728"; + y="safeZoneY+0.181889+0.15"; w="0.25*1.62727*3/4"; h="0.0909445"; columns[]={"0/6", "0.9/6", "1.8/6", "2.9/6", "3.8/6", "4.8/6"}; @@ -173,8 +173,8 @@ class ACE_RangeCard_Dialog { }; class RANGE_CARD_DATA: RangeCard_RscListNBox { idc=770400; - x="safezoneX+0.182"; - y="safezoneY+0.181889+0.194"; + x="safeZoneX+0.182"; + y="safeZoneY+0.181889+0.194"; w="0.72*1.62727*3/4"; h="1.62727"; columns[]={"0/16", "1.2/16", "2.2/16", "3.2/16", "4.2/16", "5.1/16", "6.1/16", "7.1/16", "8.1/16", @@ -185,13 +185,13 @@ class ACE_RangeCard_Dialog { class FOOTNOTE_TEXT_1: CAPTION_TEXT_1 { idc=770020; SizeEx=0.022; - y="safezoneY+1.72431"; + y="safeZoneY+1.72431"; w="0.705*1.62727*3/4"; text="For best results keep ammunition at ambient air temperature. Tables calculated for the above listed barrel"; }; class FOOTNOTE_TEXT_2: FOOTNOTE_TEXT_1 { idc=770021; - y="safezoneY+1.72431+0.024"; + y="safeZoneY+1.72431+0.024"; text="and load with optic mounted 1.5'' above line of bore."; }; }; diff --git a/addons/rangecard/functions/fnc_calculateRangeCard.sqf b/addons/rangecard/functions/fnc_calculateRangeCard.sqf index 0663fcfd531..c16b202539e 100644 --- a/addons/rangecard/functions/fnc_calculateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_calculateRangeCard.sqf @@ -83,8 +83,8 @@ _bulletPos set [1, 0]; _bulletPos set [2, -(_boreHeight / 100)]; _bulletVelocity set [0, 0]; -_bulletVelocity set [1, Cos(_scopeBaseAngle) * _muzzleVelocity]; -_bulletVelocity set [2, Sin(_scopeBaseAngle) * _muzzleVelocity]; +_bulletVelocity set [1, cos(_scopeBaseAngle) * _muzzleVelocity]; +_bulletVelocity set [2, sin(_scopeBaseAngle) * _muzzleVelocity]; while {_TOF < 6 && (_bulletPos select 1) < _targetRange} do { _bulletSpeed = vectorMagnitude _bulletVelocity; @@ -123,21 +123,21 @@ while {_TOF < 6 && (_bulletPos select 1) < _targetRange} do { _tz = (_lastBulletPos select 2) + (_range - (_lastBulletPos select 1)) * ((_bulletPos select 2) - (_lastBulletPos select 2)) / ((_bulletPos select 1) - (_lastBulletPos select 1)); _elevation = - atan(_tz / _range); _windage = - atan(_tx / _range); - _lead = (_targetSpeed * _TOF) / (Tan(MRAD_TO_DEG(1)) * _range); + _lead = (_targetSpeed * _TOF) / (tan(MRAD_TO_DEG(1)) * _range); }; - private _elevationString = Str(round(-DEG_TO_MRAD(_elevation) * 10) / 10); + private _elevationString = str(round(-DEG_TO_MRAD(_elevation) * 10) / 10); if (_elevationString == "0") then { _elevationString = "-0.0"; }; if (_elevationString find "." == -1) then { _elevationString = _elevationString + ".0"; }; - private _windageString = Str(round(DEG_TO_MRAD(_windage) * 10) / 10); + private _windageString = str(round(DEG_TO_MRAD(_windage) * 10) / 10); if (_windageString find "." == -1) then { _windageString = _windageString + ".0"; }; - private _leadString = Str(round(_lead * 10) / 10); + private _leadString = str(round(_lead * 10) / 10); if (_leadString find "." == -1) then { _leadString = _leadString + ".0"; }; diff --git a/addons/rangecard/functions/fnc_updateRangeCard.sqf b/addons/rangecard/functions/fnc_updateRangeCard.sqf index ba44d7e41cc..76b679accf5 100644 --- a/addons/rangecard/functions/fnc_updateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_updateRangeCard.sqf @@ -42,7 +42,7 @@ for "_row" from 0 to 49 do { _control ctrlSetTextColor [0, 0, 0, 1]; }; _control ctrlCommit 0; - _control ctrlSetText Str(100 + _row * 50); + _control ctrlSetText str(100 + _row * 50); GVAR(controls) pushBack _control; }; for "_column" from 0 to 8 do { diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index bf5110de7a9..6ce1f7ec098 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -30,7 +30,7 @@ XM312A XM312A XM312A - XM312A 무인중기관총 + XM312A 무인 중기관총 XM312A重機槍 XM312A XM312A @@ -166,7 +166,7 @@ YABHON-R3 (CAS) YABHON-R3 (CAS) YABHON-R3 (CAS) - YABHON-R3 무인기 (근접지원) + YABHON-R3 무인기 (근접항공지원) "亞伯罕-R3型"空中無人載具 (近空支援) "联合"-R3(近空支援) YABHON-R3 (CAS) @@ -361,7 +361,7 @@ HEMTT Transport HEMTT Transport - HEMTT de transporte + HEMTT de Transporte HEMTT Transportowy HEMTT (valník) HEMTT Transport @@ -378,7 +378,7 @@ HEMTT Transport (covered) HEMTT Transport (bedeckt) - HEMTT de transporte (cubierto) + HEMTT de Transporte (cubierto) HEMTT Transportowy (zakryty) HEMTT (valník-krytý) HEMTT Transport (bâché) @@ -412,7 +412,7 @@ HEMTT Container HEMTT Container - HEMTT con contenedor + HEMTT con Contenedor HEMTT Kontener HEMTT (skříňový) HEMTT Conteneur @@ -429,7 +429,7 @@ HEMTT Medical HEMTT Sanitäter - HEMTT médico + HEMTT Médico HEMTT Medyczny HEMTT (zdravotnický) HEMTT Médical @@ -446,7 +446,7 @@ HEMTT Ammo HEMTT Munition - HEMTT de munición + HEMTT de Munición HEMTT Amunicyjny HEMTT (muniční) HEMTT Munitions @@ -463,7 +463,7 @@ HEMTT Fuel HEMTT Treibstoff - HEMTT de combustible + HEMTT de Combustible HEMTT Cysterna HEMTT (cisterna) HEMTT Citerne @@ -480,7 +480,7 @@ HEMTT Repair HEMTT Instandsetzung - HEMTT de reparación + HEMTT de Reparación HEMTT Naprawczy HEMTT (opravárenský) HEMTT Réparation @@ -599,7 +599,7 @@ KamAZ Transport KamAS Transport - KamAZ de transporte + KamAZ de Transporte KamAZ transportowy KamAZ (valník) KamAZ Transport @@ -616,7 +616,7 @@ KamAZ Transport (covered) KamAS Transport (bedeckt) - KamAZ de transporte (cubierto) + KamAZ de Transporte (cubierto) KamAZ Transportowy (zakryty) KamAZ (valník-krytý) KamAZ Transport (bâché) @@ -633,7 +633,7 @@ KamAZ Ammo KamAS Munition - KamAZ de munición + KamAZ de Munición KamAZ Amunicyjny KamAZ (muniční) KamAZ Munitions @@ -650,7 +650,7 @@ KamAZ Fuel KamAS Treibstoff - KamAZ de combustible + KamAZ de Combustible KamAZ cysterna KamAZ (cisterna) KamAZ Citerne @@ -667,7 +667,7 @@ KamAZ Repair KamAS Instandsetzung - KamAZ de reparación + KamAZ de Reparación KamAZ Naprawczy KamAZ (opravárenský) KamAZ Réparation @@ -684,7 +684,7 @@ KamAZ Medical KamAS Sanitäter - KamAZ médico + KamAZ Médico KamAZ Medyczny KamAZ (zdravotnický) KamAZ Médical @@ -707,6 +707,7 @@ KamAS Wasser KamAZ Acqua KamAZ Eau + KamAZ de Agua KamAZ MRL @@ -855,7 +856,7 @@ Otokar ARMA Otokar ARMA オトカ アルマ - 오토카르 아르마 APC + 오토카 아르마 APC "奧托卡—阿爾默"裝甲運兵車 奥托卡尔 "阿玛" Otokar ARMA @@ -1161,7 +1162,7 @@ L-159 ALCA (Légitámogató) L-159 ALCA (CAS) L-159 ALCA (CAS) - L-159 ALCA (근접지원) + L-159 ALCA (근접항공지원) L-159先進輕型戰鬥機 (近空支援) L-159 ALCA(近空支援) L-159 ALCA (CAS) @@ -1676,6 +1677,7 @@ CZ 581 CZ 581 CZ 581 + CZ 581 CZ 581 (Sawed-Off) @@ -1686,6 +1688,7 @@ CZ 581 (Abgesägt) CZ 581 (Canne mozze) CZ 581 (canon scié) + CZ 581 (Recortada) FNX-45 Tactical (Green) @@ -1694,7 +1697,7 @@ FNX-45 Tactical (Zielony) FNX-45 Tactical (Vert) FNX-45 Tactical (Zöld) - FNX-45 Tactical (Verde) + HEMTT de transporte (cubierto) FNX-45 Tactical (зелёный) FNX-45 Tactical (Verde) FNX-45 Tactical (Verde) @@ -3097,6 +3100,7 @@ Type 115 (Schwarz) Type 115 (Nero) Type 115 (Noir) + Type 115 (Negro) Type 115 (Green Hex) @@ -3107,6 +3111,7 @@ Type 115 (Hex Grün) Type 115 (Hex Verde) Type 115 (Hew Vert) + Type 115 (Verde Hex) Type 115 (Hex) @@ -3117,6 +3122,7 @@ Type 115 (Hex) Type 115 (Hex) Type 115 (Hex) + Type 115 (Hex) QBZ-95-1 (Black) @@ -3911,6 +3917,7 @@ UTG Defender 126 UTG Defender 126 UTG Defender 126 + UTG Defender 126 EOTech MRDS @@ -3921,6 +3928,7 @@ EOTech MRDS EOTech MRDS EOTech MRDS + EOTech MRDS EOTech MRDS (Black) @@ -3931,6 +3939,7 @@ EOTech MRDS (Schwarz) EOTech MRDS (Nero) EOTech MRDS (Noir) + EOTech MRDS (Negro) Leupold Mark 4 HAMR diff --git a/addons/rearm/functions/fnc_addRearmActions.sqf b/addons/rearm/functions/fnc_addRearmActions.sqf index 200dd2f2b44..ccce8736adf 100644 --- a/addons/rearm/functions/fnc_addRearmActions.sqf +++ b/addons/rearm/functions/fnc_addRearmActions.sqf @@ -52,7 +52,7 @@ private _vehicleActions = []; if (_magazineHelper isNotEqualTo []) then { private _icon = getText(configOf _vehicle >> "Icon"); - if !((_icon select [0, 1]) == "\") then { + if ((_icon select [0, 1]) != "\") then { _icon = ""; }; if (GVAR(level) == 0) then { diff --git a/addons/rearm/functions/fnc_canRearm.sqf b/addons/rearm/functions/fnc_canRearm.sqf index 8d2b0b58e50..34bb3727536 100644 --- a/addons/rearm/functions/fnc_canRearm.sqf +++ b/addons/rearm/functions/fnc_canRearm.sqf @@ -22,7 +22,7 @@ if (!alive _vehicle) exitWith {false}; if (GVAR(level) == 0 || {isNull _unit} || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {_vehicle distance _unit > REARM_ACTION_DISTANCE} || {_vehicle getVariable [QGVAR(disabled), false]}) exitWith {false}; private _dummy = _unit getVariable [QGVAR(dummy), objNull]; -if (isNull _dummy) exitwith {false}; +if (isNull _dummy) exitWith {false}; private _magazineClass = _dummy getVariable QGVAR(magazineClass); if (isNil "_magazineClass") exitWith {false}; diff --git a/addons/rearm/functions/fnc_createDummy.sqf b/addons/rearm/functions/fnc_createDummy.sqf index 45318cd13fe..ccb1aeacbb9 100644 --- a/addons/rearm/functions/fnc_createDummy.sqf +++ b/addons/rearm/functions/fnc_createDummy.sqf @@ -21,7 +21,7 @@ params ["_unit", "_magazineClass"]; private _ammo = getText (configFile >> "CfgMagazines" >> _magazineClass >> "ammo"); private _dummyName = getText (configFile >> "CfgAmmo" >> _ammo >> QGVAR(dummy)); private _dummy = objNull; -if !(_dummyName == "") then { +if (_dummyName != "") then { _dummy = _dummyName createVehicle (position _unit); } else { _dummy = QGVAR(defaultCarriedObject) createVehicle (position _unit); diff --git a/addons/rearm/functions/fnc_grabAmmo.sqf b/addons/rearm/functions/fnc_grabAmmo.sqf index b8c53371d8d..b7f87a69ba4 100644 --- a/addons/rearm/functions/fnc_grabAmmo.sqf +++ b/addons/rearm/functions/fnc_grabAmmo.sqf @@ -35,7 +35,7 @@ REARM_HOLSTER_WEAPON; _unit removeAction _actionID; }; _actionID = _unit addAction [ - format ["%1", localize ELSTRING(dragging,Drop)], + format ["%1", LELSTRING(common,Drop)], '(_this select 0) call FUNC(dropAmmo)', nil, 20, diff --git a/addons/rearm/functions/fnc_rearm.sqf b/addons/rearm/functions/fnc_rearm.sqf index 8ef09c8f76b..52c00a54c0e 100644 --- a/addons/rearm/functions/fnc_rearm.sqf +++ b/addons/rearm/functions/fnc_rearm.sqf @@ -20,7 +20,7 @@ params ["_target", "_unit"]; TRACE_2("rearm",_target,_unit); private _attachedDummy = _unit getVariable [QGVAR(dummy), objNull]; -if (isNull _attachedDummy) exitwith {ERROR_1("attachedDummy null %1",_attachedDummy);}; +if (isNull _attachedDummy) exitWith {ERROR_1("attachedDummy null %1",_attachedDummy);}; private _magazineClass = _attachedDummy getVariable QGVAR(magazineClass); if (isNil "_magazineClass") exitWith {ERROR_1("magazineClass nil %1",_attachedDummy);}; @@ -45,6 +45,7 @@ private _magazineDisplayName = _magazineClass call FUNC(getMagazineName); "", format [localize LSTRING(RearmAction), getText(configOf _target >> "displayName"), _magazineDisplayName], { + //IGNORE_PRIVATE_WARNING ["_player"]; param [0] params ["_target", "_unit"]; _player distance _target <= GVAR(distance); }, diff --git a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf index f41dff6ea9c..ace43baf8f9 100644 --- a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf +++ b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf @@ -31,7 +31,7 @@ if (_pylon > 0) exitWith { // Fill magazine completely if (_turretPath isEqualTo [-1]) then {_turretPath = [];}; // Convert back to pylon turret format TRACE_3("",_pylon,_magazineClass,_rounds); - _vehicle setPylonLoadOut [_pylon, _magazineClass, true, _turretPath]; + _vehicle setPylonLoadout [_pylon, _magazineClass, true, _turretPath]; [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _rounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), getText(configOf _vehicle >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; @@ -41,7 +41,7 @@ if (_pylon > 0) exitWith { private _currentCount = _vehicle ammoOnPylon _pylon; private _newCount = ((_currentCount max 0) + _numRounds) min _rounds; TRACE_3("",_pylon,_magazineClass,_newCount); - _vehicle setPylonLoadOut [_pylon, _magazineClass, true, _turretPath]; + _vehicle setPylonLoadout [_pylon, _magazineClass, true, _turretPath]; _vehicle setAmmoOnPylon [_pylon, _newCount]; [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _numRounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), diff --git a/addons/rearm/functions/fnc_storeAmmo.sqf b/addons/rearm/functions/fnc_storeAmmo.sqf index e9f57369f3d..1d08d289be4 100644 --- a/addons/rearm/functions/fnc_storeAmmo.sqf +++ b/addons/rearm/functions/fnc_storeAmmo.sqf @@ -19,7 +19,7 @@ params ["_truck", "_unit"]; private _attachedDummy = _unit getVariable [QGVAR(dummy), objNull]; -if (isNull _attachedDummy) exitwith {}; +if (isNull _attachedDummy) exitWith {}; private _magazineClass = _attachedDummy getVariable [QGVAR(magazineClass), "#noVar"]; diff --git a/addons/rearm/functions/fnc_takeSuccess.sqf b/addons/rearm/functions/fnc_takeSuccess.sqf index 1d112f26459..214713c80d6 100644 --- a/addons/rearm/functions/fnc_takeSuccess.sqf +++ b/addons/rearm/functions/fnc_takeSuccess.sqf @@ -42,7 +42,7 @@ private _dummy = [_unit, _magazineClass] call FUNC(createDummy); [_dummy, _unit] call FUNC(pickUpAmmo); private _actionID = _unit addAction [ - format ["%1", localize ELSTRING(dragging,Drop)], + format ["%1", LELSTRING(common,Drop)], '(_this select 0) call FUNC(dropAmmo)', nil, 20, diff --git a/addons/rearm/script_component.hpp b/addons/rearm/script_component.hpp index 1cc6379ff7b..4bcff331d68 100644 --- a/addons/rearm/script_component.hpp +++ b/addons/rearm/script_component.hpp @@ -35,7 +35,7 @@ _unit action ["SwitchWeapon", _unit, _unit, 299]; #define REARM_UNHOLSTER_WEAPON \ - _weaponSelect = _unit getVariable QGVAR(selectedWeaponOnRearm); \ + private _weaponSelect = _unit getVariable QGVAR(selectedWeaponOnRearm); \ if (!isNil "_weaponSelect") then { \ TRACE_2("REARM_UNHOLSTER_WEAPON",_unit,_weaponSelect); \ _unit selectWeapon _weaponSelect; \ diff --git a/addons/refuel/ACE_Refuel_Positions.hpp b/addons/refuel/ACE_Refuel_Positions.hpp index 78af5b6d48d..0db8667751f 100644 --- a/addons/refuel/ACE_Refuel_Positions.hpp +++ b/addons/refuel/ACE_Refuel_Positions.hpp @@ -57,22 +57,37 @@ class GVAR(positions) { {"Land_Benzina_schnell", {{592,7505,0},{804,1445,0},{3132,3129,0}}}, {"Land_fs_feed_F", {{1920,4960,0},{5052,4703,1},{9456,9277,0}}}, {"Land_FuelStation_01_pump_F", {{2378,6248,0},{7092,534,0}}}, - {"Land_Ind_FuelStation_Feed_EP1", {{4788,5525,0}}} + {"Land_Ind_FuelStation_Feed_EP1", {{3920,4105,0},{4788,5525,0}}} + }; + go_map_fjord[] = { /* Fjord */ + {"Land_fs_feed_F", {{26,14296,0},{121,14298,0},{7480,1812,0}}}, + {"Land_FuelStation_01_pump_F", {{66,14293,0}}}, + {"Land_FuelStation_Feed_F", {{37,14301,0}}} }; IslaPera[] = { /* Isla Pera */ {"Land_fs_feed_F", {{1855,2866,0}}}, {"Land_FuelStation_01_pump_malevil_F", {{3981,2065,0},{5306,8796,0},{9236,4287,0}}} }; + egl_laghisola[] = { /* Laghisola */ + {"Land_fs_feed_F", {{281,595,0},{1926,5751,0},{4904,6278,0}}}, + {"Land_FuelStation_01_pump_F", {{1347,8907,0},{6478,2391,0}}} + }; VTF_Lybor[] = { /* Lybor */ {"Land_FuelStation_03_pump_F", {{3879,3823,0}}}, {"Land_FuelStation_Feed_F", {{1831,2694,0},{2175,3323,0},{3304,2981,0},{4271,3024,0}}} }; + mehland[] = { /* Mehland */ + {"Land_fs_feed_F", {{13469,9984,0},{16773,16454,0},{17389,14420,0},{17785,10415,0},{19155,15564,0},{19373,13170,0}}}, + {"Land_FuelStation_01_pump_F", {{2122,15875,0},{2238,8505,0},{15134,19009,0},{17909,9856,1},{18595,8701,0},{18691,8629,1},{18947,15114,0}}}, + {"Land_FuelStation_03_pump_F", {{4136,13875,0},{6356,12183,0},{7677,10989,2},{8880,17775,0},{13881,19437,1}}} + }; rof_mok[] = { /* Mull of Kintyre, Scotland */ {"Land_A_FuelStation_Feed", {{12837,5124,1},{15271,17533,0},{19453,21896,0}}}, {"Land_fs_feed_F", {{7492,17369,0}}}, {"Land_Fuelstation", {{10284,18679,0}}}, {"Land_Ind_FuelStation_Feed_EP1", {{9762,16325,0}}} }; + FDF_Isle1_a[] = { /* Podagorsk */ {"Land_A_FuelStation_Feed", {{7980,10293,0},{8356,7555,0},{10930,6878,0},{11999,10476,0},{12692,6317,0}}}}; pulau[] = { /* Pulau */ {"Land_fs_feed_F", {{2368,3128,0},{4891,7168,0},{7358,7368,0}}}, {"Land_FuelStation_Feed_F", {{5994,5789,0}}} @@ -93,4 +108,9 @@ class GVAR(positions) { {"Land_FuelStation_01_pump_malevil_F", {{7072,3676,0}}}, {"Land_FuelStation_Feed_F", {{4678,3971,0},{6391,5174,0}}} }; + yulakia[] = { /* Yulakia v1.0beta6 */ + {"Land_fs_feed_F", {{10424,6328,0}}}, + {"Land_FuelStation_03_pump_F", {{5964,8016,0}}}, + {"Land_Fuelstation_army", {{410,10339,0},{1892,2501,0},{4157,9653,0},{9629,2467,0},{10018,4642,0},{10696,7289,0},{11325,8200,0},{11647,7639,0}}} + }; }; diff --git a/addons/refuel/dev/exportTerrainRefuelPositions.sqf b/addons/refuel/dev/exportTerrainRefuelPositions.sqf index c7f9abfb2fd..e096af47b89 100644 --- a/addons/refuel/dev/exportTerrainRefuelPositions.sqf +++ b/addons/refuel/dev/exportTerrainRefuelPositions.sqf @@ -1,7 +1,14 @@ +#include "\z\ace\addons\refuel\script_component.hpp" + // call compileScript ["z\ace\addons\refuel\dev\exportTerrainRefuelPositions.sqf"] -// can be run in Eden Editor console +// copies to clipboard header and positions +// returns total found feed and position count, messages and output +// can run in Eden Editor console -#include "\z\ace\addons\refuel\script_component.hpp" +// use this command to move player to needed position: +// player setPos [15121,19011]; +// use this command to view fuel feeds around player position +// ["f", {count (getPos player nearObjects ["Land_fs_feed_F", 30])}] call ace_common_fnc_watchVariable; { if (!isArray (configFile >> QGVAR(positions) >> configName _x)) then { @@ -38,7 +45,7 @@ private _pos = []; _object = _x; _pos = ASLToAGL getPosASL _object; if (-1 < _positions findIf {60 > _x distance _pos && {20 < _x distance _pos}}) then { - _message = "INCREASE DISTANCE " + str _pos; + _message = "INCREASE SEARCH DISTANCE " + str _pos; }; if (-1 == _positions findIf {20 > _x distance _pos}) then { _positions pushBack (_pos apply {round _x}); @@ -66,10 +73,24 @@ if (_checkCount != _totalCount) then { _message = "WRONG COUNT " + str _checkCount; }; +private _cfgPositions = configFile >> QGVAR(positions) >> worldName; +if (isArray _cfgPositions) then { + private _currentPositionsPumps = []; + { + _x params ["_class", "_positions"]; + { + _currentPositionsPumps insert [-1, _x nearObjects [_class, 30], true]; + } forEach _positions; + } forEach getArray _cfgPositions; + if (_checkCount != count _currentPositionsPumps) then { + _message = "WRONG CURRENT " + str count _currentPositionsPumps; + }; +}; + // export text private _nl = toString [10]; private _multipleBasePumps = 1 < count _basePumps; -private _output = [format [" %1[] = { /* %2 */", worldName, getText (configfile >> "CfgWorlds" >> worldName >> "description")]]; +private _output = [format [" %1[] = { /* %2 */", worldName, getText (configFile >> "CfgWorlds" >> worldName >> "description")]]; { if (_forEachIndex > 0) then {_output pushBack ","}; _x params ["_class", "_positions"]; diff --git a/addons/refuel/functions/fnc_connectNozzleAction.sqf b/addons/refuel/functions/fnc_connectNozzleAction.sqf index 502e1dc3a41..1a022b6e768 100644 --- a/addons/refuel/functions/fnc_connectNozzleAction.sqf +++ b/addons/refuel/functions/fnc_connectNozzleAction.sqf @@ -62,7 +62,7 @@ if (_bestPosASL isEqualTo []) exitWith { //Move it out slightly, for visibility sake (better to look a little funny than be embedded//sunk in the hull and be useless) _bestPosASL = _bestPosASL vectorAdd ((_bestPosASL vectorFromTo _startingPosASL) vectorMultiply 0.05); -private _attachPosModel = _sink worldToModel (ASLtoAGL _bestPosASL); +private _attachPosModel = _sink worldToModel (ASLToAGL _bestPosASL); [ GVAR(progressDuration), diff --git a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf index 3e4dc23afbb..62b413c71d7 100644 --- a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf +++ b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf @@ -69,7 +69,7 @@ TRACE_2("start",_unit,_nozzle); END_PFH }; - if (_unit == vehicle _unit && {_unit isNotEqualTo ACE_player}) exitWith { + if (isNull objectParent _unit && {_unit isNotEqualTo ACE_player}) exitWith { TRACE_2("stop vehicle/player",_unit,vehicle _unit); DROP_NOZZLE UNHOLSTER_WEAPON @@ -89,7 +89,7 @@ TRACE_2("start",_unit,_nozzle); }; private _hintLMB = ""; - private _hintRMB = localize ELSTRING(dragging,Drop); + private _hintRMB = LELSTRING(common,Drop); getCursorObjectParams params ["_cursorObject", "", "_distance"]; if (!isNull _cursorObject && {_distance < REFUEL_NOZZLE_ACTION_DISTANCE}) then { diff --git a/addons/reload/functions/fnc_checkAmmo.sqf b/addons/reload/functions/fnc_checkAmmo.sqf index f558d917699..8039c9527ca 100644 --- a/addons/reload/functions/fnc_checkAmmo.sqf +++ b/addons/reload/functions/fnc_checkAmmo.sqf @@ -23,7 +23,7 @@ if (_unit == _target) then { _target = vehicle _target; }; - [_unit, "Gear", 1] call EFUNC(common,doGesture); + [_unit, "reloadMagazine", 0] call EFUNC(common,doGesture); }; [FUNC(displayAmmo), _target, 1] call CBA_fnc_waitAndExecute; diff --git a/addons/reload/functions/fnc_displayAmmo.sqf b/addons/reload/functions/fnc_displayAmmo.sqf index 68e176587ad..7e38ee65f87 100644 --- a/addons/reload/functions/fnc_displayAmmo.sqf +++ b/addons/reload/functions/fnc_displayAmmo.sqf @@ -122,7 +122,7 @@ if (_isStaticWeapon) then { _loadedName = parseText format ["%1", _loadedName]; - private _text = composeText [_loadedName, linebreak, _ammoBarsStructuredText]; + private _text = composeText [_loadedName, lineBreak, _ammoBarsStructuredText]; [_text] call EFUNC(common,displayTextStructured); } else { if (_magazine != "") then { diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf index 2e9a9178ffd..012ddb9f09a 100644 --- a/addons/repair/XEH_postInit.sqf +++ b/addons/repair/XEH_postInit.sqf @@ -39,12 +39,27 @@ ["CAManBase", "InitPost", { params ["_unit"]; - if !(local _unit && {_unit getUnitTrait "engineer"}) exitWith {}; - _unit setUnitTrait ["engineer", false]; - if (_unit getVariable ["ACE_IsEngineer", -1] isEqualTo -1) then { - _unit setVariable ["ACE_IsEngineer", true, true]; + private _isEngineer = _unit getUnitTrait "engineer"; + if (isNil "_isEngineer" || {_isEngineer isNotEqualTo true}) exitWith {}; + TRACE_4("setUnitTrait 1",_unit,typeOf _unit,local _unit,ACE_player); + + if (local _unit) exitWith { + _unit setUnitTrait ["engineer", false]; + + if (_unit getVariable ["ACE_IsEngineer", -1] isEqualTo -1) then { + _unit setVariable ["ACE_IsEngineer", true, true]; + }; }; - TRACE_3("setUnitTrait",_unit,typeOf _unit,_unit getUnitTrait "engineer"); + + // Handle player locality delay, can be anywhere from instant to 10+ seconds (#10337) + if (_unit isNotEqualTo ACE_player) exitWith {}; + _unit addEventHandler ["Local", { + params ["_unit", "_isLocal"]; + if (!_isLocal) exitWith {}; + TRACE_3("setUnitTrait 2",_unit,typeOf _unit,_unit getUnitTrait "engineer"); + _unit setUnitTrait ["engineer", false]; + _unit removeEventHandler ["Local", _thisEventHandler]; + }]; }, true, [], true] call CBA_fnc_addClassEventHandler; diff --git a/addons/repair/functions/fnc_addRepairActions.sqf b/addons/repair/functions/fnc_addRepairActions.sqf index 16711d7b8a1..095df261aaa 100644 --- a/addons/repair/functions/fnc_addRepairActions.sqf +++ b/addons/repair/functions/fnc_addRepairActions.sqf @@ -66,11 +66,11 @@ private _turretPaths = ((fullCrew [_vehicle, "gunner", true]) + (fullCrew [_vehi TRACE_3("Adding Wheel Actions",_hitpoint,_forEachIndex,_selection); // An action to replace the wheel is required - _name = format ["Replace_%1_%2", _forEachIndex, _hitpoint]; - _text = localize LSTRING(ReplaceWheel); - _condition = {[_this select 1, _this select 0, _this select 2 select 0, "ReplaceWheel"] call DFUNC(canRepair)}; - _statement = {[_this select 1, _this select 0, _this select 2 select 0, "ReplaceWheel"] call DFUNC(repair)}; - _action = [_name, _text, _icon, _statement, _condition, {}, [_hitpoint], _position, 2] call EFUNC(interact_menu,createAction); + private _name = format ["Replace_%1_%2", _forEachIndex, _hitpoint]; + private _text = localize LSTRING(ReplaceWheel); + private _condition = {[_this select 1, _this select 0, _this select 2 select 0, "ReplaceWheel"] call DFUNC(canRepair)}; + private _statement = {[_this select 1, _this select 0, _this select 2 select 0, "ReplaceWheel"] call DFUNC(repair)}; + private _action = [_name, _text, _icon, _statement, _condition, {}, [_hitpoint], _position, 2] call EFUNC(interact_menu,createAction); [_type, 0, [], _action] call EFUNC(interact_menu,addActionToClass); // Create a wheel interaction @@ -118,6 +118,7 @@ private _turretPaths = ((fullCrew [_vehicle, "gunner", true]) + (fullCrew [_vehi }; // Find the action position + //IGNORE_PRIVATE_WARNING ["_target"]; private _position = compile format ["_target selectionPosition ['%1', 'HitPoints'];", _selection]; { _x params ["_hit", "_pos"]; diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index ff61450b12b..4a77383c288 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -21,7 +21,7 @@ params ["_caller", "_target", "_hitPoint", "_className"]; TRACE_4("params",_caller,_target,_hitPoint,_className); -private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); +private _config = (configFile >> "ACE_Repair" >> "Actions" >> _className); if !(isClass _config) exitWith {false}; // or go for a default? // if(isEngineOn _target) exitWith {false}; // Ignore here so action shows, then exit and show warning when selected #3348 diff --git a/addons/repair/functions/fnc_patchRemovedWheel.sqf b/addons/repair/functions/fnc_patchRemovedWheel.sqf index b0978013d55..1f1d8e32c68 100644 --- a/addons/repair/functions/fnc_patchRemovedWheel.sqf +++ b/addons/repair/functions/fnc_patchRemovedWheel.sqf @@ -23,7 +23,7 @@ params ["_unit", "_target"]; private _wheelDamage = (damage _target) - GVAR(patchWheelMaximumRepair); [ceil (_wheelDamage / 0.05) * GVAR(patchWheelTime), [_target], {}, {}, LLSTRING(PatchingWheel), { - params ["_args"]; + params ["_args", "_elapsedTime", "_totalTime"]; _args params ["_target"]; private _damage = damage _target; @@ -35,5 +35,4 @@ private _wheelDamage = (damage _target) - GVAR(patchWheelMaximumRepair); _target setDamage _damage; _damage > GVAR(patchWheelMaximumRepair) -}] call ace_common_fnc_progressBar; - +}] call EFUNC(common,progressBar); diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index ccb2e42dfd0..c8f00812998 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -21,7 +21,7 @@ params ["_caller", "_target", "_hitPoint", "_className"]; TRACE_4("params",_caller,_target,_hitPoint,_className); -private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); +private _config = (configFile >> "ACE_Repair" >> "Actions" >> _className); if !(isClass _config) exitWith {false}; // or go for a default? private _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then { @@ -163,7 +163,7 @@ if (_currentWeapon == secondaryWeapon _caller) then { private _wpn = ["non", "rfl", "pst"] select (1 + ([primaryWeapon _caller, handgunWeapon _caller] find (currentWeapon _caller))); _callerAnim = [_callerAnim, "[wpn]", _wpn] call CBA_fnc_replace; -if (vehicle _caller == _caller && {_callerAnim != ""}) then { +if (isNull objectParent _caller && {_callerAnim != ""}) then { if (primaryWeapon _caller == "") then { _caller addWeapon "ACE_FakePrimaryWeapon"; }; diff --git a/addons/repair/functions/fnc_repair_failure.sqf b/addons/repair/functions/fnc_repair_failure.sqf index 37b2c50447c..9d49bd46b06 100644 --- a/addons/repair/functions/fnc_repair_failure.sqf +++ b/addons/repair/functions/fnc_repair_failure.sqf @@ -32,7 +32,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { _caller removeEventHandler ["AnimDone", _caller getVariable [QGVAR(repairLoopAnimEh), -1]]; _caller setVariable [QGVAR(repairLoopAnimEh), nil]; -if (vehicle _caller == _caller && {!(_caller call EFUNC(common,isSwimming))}) then { +if (isNull objectParent _caller && {!(_caller call EFUNC(common,isSwimming))}) then { [_caller, _caller getVariable [QGVAR(repairPrevAnimCaller), ""], 2] call EFUNC(common,doAnimation); }; _caller setVariable [QGVAR(repairCurrentAnimCaller), nil]; @@ -59,7 +59,7 @@ if (!isNil "_weaponSelect") then { // Record specific callback -private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); +private _config = (configFile >> "ACE_Repair" >> "Actions" >> _className); private _callback = getText (_config >> "callbackFailure"); if (isNil _callback) then { diff --git a/addons/repair/functions/fnc_repair_success.sqf b/addons/repair/functions/fnc_repair_success.sqf index 9da2b0c4039..2f729330966 100644 --- a/addons/repair/functions/fnc_repair_success.sqf +++ b/addons/repair/functions/fnc_repair_success.sqf @@ -32,7 +32,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { _caller removeEventHandler ["AnimDone", _caller getVariable [QGVAR(repairLoopAnimEh), -1]]; _caller setVariable [QGVAR(repairLoopAnimEh), nil]; -if (vehicle _caller == _caller && {!(_caller call EFUNC(common,isSwimming))}) then { +if (isNull objectParent _caller && {!(_caller call EFUNC(common,isSwimming))}) then { [_caller, _caller getVariable [QGVAR(repairPrevAnimCaller), ""], 2] call EFUNC(common,doAnimation); }; _caller setVariable [QGVAR(repairCurrentAnimCaller), nil]; @@ -54,7 +54,7 @@ if (!isNil "_weaponSelect") then { } forEach _claimedObjects; // Record specific callback -private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); +private _config = (configFile >> "ACE_Repair" >> "Actions" >> _className); private _callback = getText (_config >> "callbackSuccess"); if (isNil _callback) then { diff --git a/addons/repair/functions/fnc_useItems.sqf b/addons/repair/functions/fnc_useItems.sqf index edc18bcb16f..784c4a5da2a 100644 --- a/addons/repair/functions/fnc_useItems.sqf +++ b/addons/repair/functions/fnc_useItems.sqf @@ -25,14 +25,14 @@ private _itemsUsedBy = []; if (_x isEqualType []) then { { private _itemUsedInfo = [_unit, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushBack [(_itemUsedInfo select 1), _x]}; } forEach _x; }; // handle required item if (_x isEqualType "") then { private _itemUsedInfo = [_unit, _x] call FUNC(useItem); - if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushBack [(_itemUsedInfo select 1), _x]}; }; } forEach _items; diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml index 6f16e91e099..eae73fa671c 100644 --- a/addons/repair/stringtable.xml +++ b/addons/repair/stringtable.xml @@ -1009,7 +1009,7 @@ Jobb középső kerék Правое среднее колесо 右中央輪 - 오른족 가운데 바퀴 + 오른쪽 가운데 바퀴 右中轮 右中輪 diff --git a/addons/respawn/functions/fnc_moveRallypoint.sqf b/addons/respawn/functions/fnc_moveRallypoint.sqf index 3c4d8b6441c..03c29624735 100644 --- a/addons/respawn/functions/fnc_moveRallypoint.sqf +++ b/addons/respawn/functions/fnc_moveRallypoint.sqf @@ -39,7 +39,7 @@ _position set [2, 0]; [localize LSTRING(Deploy)] call EFUNC(common,displayTextStructured); [{ - params ["_rallypoint", "_unit", "_position"]; + params ["_rallypoint", "_unit", "_position", "_side"]; _rallypoint setPosATL _position; _unit reveal _rallypoint; @@ -49,4 +49,4 @@ _position set [2, 0]; ["ace_rallypointMoved", [_rallypoint, _side, _position]] call CBA_fnc_globalEvent; [localize LSTRING(Deployed)] call EFUNC(common,displayTextStructured); -}, [_rallypoint, _unit, _position], 5] call CBA_fnc_waitAndExecute; +}, [_rallypoint, _unit, _position, _side], 5] call CBA_fnc_waitAndExecute; diff --git a/addons/respawn/functions/fnc_updateRallypoint.sqf b/addons/respawn/functions/fnc_updateRallypoint.sqf index a0e14a4ed29..bedc887b3c2 100644 --- a/addons/respawn/functions/fnc_updateRallypoint.sqf +++ b/addons/respawn/functions/fnc_updateRallypoint.sqf @@ -18,7 +18,7 @@ */ params ["_rallypoint", "_side"]; -private _position = param [2, getpos _rallypoint]; +private _position = param [2, getPos _rallypoint]; if (!hasInterface) exitWith {}; diff --git a/addons/safemode/XEH_postInit.sqf b/addons/safemode/XEH_postInit.sqf index fa6649aa9f1..16ae37c6565 100644 --- a/addons/safemode/XEH_postInit.sqf +++ b/addons/safemode/XEH_postInit.sqf @@ -42,4 +42,4 @@ if (!hasInterface) exitWith {}; [_unit, "DefaultAction", _ehID] call EFUNC(common,removeActionEventHandler); _unit setVariable [QGVAR(actionID), nil]; -}] call EFUNC(common,addPlayerEH); +}] call CBA_fnc_addBISPlayerEventHandler; diff --git a/addons/safemode/functions/fnc_lockSafety.sqf b/addons/safemode/functions/fnc_lockSafety.sqf index 28adb42df91..798a66cbf77 100644 --- a/addons/safemode/functions/fnc_lockSafety.sqf +++ b/addons/safemode/functions/fnc_lockSafety.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* * Author: commy2, johnb43 - * Puts weapon on safety, or take it off safety if safety is already put on. + * Puts weapon on safety, or takes it off safety if safety is already put on. * * Arguments: * 0: Unit @@ -36,10 +36,13 @@ if (_muzzle in _safedWeaponMuzzles) exitWith { [_unit, _weapon, _muzzle, _hint] call FUNC(unlockSafety); }; +private _weaponSelected = currentWeapon _unit == _weapon; private _firemode = (_unit weaponState _muzzle) select 2; // This syntax of selectWeapon doesn't mess with gun lights and lasers -_unit selectWeapon [_weapon, _muzzle, _firemode]; +if (_weaponSelected) then { + _unit selectWeapon [_weapon, _muzzle, _firemode]; +}; // Store new muzzle & firemode _safedWeaponMuzzles set [_muzzle, _firemode]; @@ -83,7 +86,9 @@ if (isNil {_unit getVariable QGVAR(actionID)}) then { }; // Play fire mode selector sound -[_unit, _weapon, _muzzle] call FUNC(playChangeFiremodeSound); +if (_weaponSelected) then { + [_unit, _weapon, _muzzle] call FUNC(playChangeFiremodeSound); +}; // Show info box unless disabled if (_hint) then { diff --git a/addons/safemode/functions/fnc_unlockSafety.sqf b/addons/safemode/functions/fnc_unlockSafety.sqf index 97716025dc6..9d4897f9a52 100644 --- a/addons/safemode/functions/fnc_unlockSafety.sqf +++ b/addons/safemode/functions/fnc_unlockSafety.sqf @@ -36,8 +36,10 @@ if (_safedWeaponMuzzles isEqualTo createHashMap) then { }; }; +private _weaponSelected = currentWeapon _unit == _weapon; + // Let engine handle switching to next firemode/muzzle -if (inputAction "nextWeapon" == 0 && {inputAction "prevWeapon" == 0}) then { +if (_weaponSelected && {inputAction "nextWeapon" == 0} && {inputAction "prevWeapon" == 0}) then { // This syntax of selectWeapon doesn't mess with gun lights and lasers _unit selectWeapon [_weapon, _muzzle, _firemode]; @@ -46,7 +48,9 @@ if (inputAction "nextWeapon" == 0 && {inputAction "prevWeapon" == 0}) then { }; // Player HUD -true call FUNC(setSafeModeVisual); +if (_weaponSelected) then { + true call FUNC(setSafeModeVisual); +}; // Show info box unless disabled if (_hint) then { diff --git a/addons/sandbag/functions/fnc_pickup.sqf b/addons/sandbag/functions/fnc_pickup.sqf index 2bcc418f4ca..07a6285e685 100644 --- a/addons/sandbag/functions/fnc_pickup.sqf +++ b/addons/sandbag/functions/fnc_pickup.sqf @@ -29,7 +29,7 @@ _unit setVariable [QGVAR(isUsingSandbag), true]; if (isNull _sandbag) exitWith {}; - deletevehicle _sandbag; + deleteVehicle _sandbag; // Force physx update { diff --git a/addons/scopes/RscTitles.hpp b/addons/scopes/RscTitles.hpp index c108caaf4d8..5b3002599ea 100644 --- a/addons/scopes/RscTitles.hpp +++ b/addons/scopes/RscTitles.hpp @@ -26,10 +26,10 @@ class RscTitles { colorBackground[] = { 1, 1, 1, 1 }; shadow = 1; - x = "(0.5 - 0.4 / 2) * safezoneW + safezoneX"; - y = "0 * safezoneH + safezoneY"; - w = "0.4 * safezoneW"; - h = "0.3 * safezoneH"; + x = "(0.5 - 0.4 / 2) * safeZoneW + safeZoneX"; + y = "0 * safeZoneH + safeZoneY"; + w = "0.4 * safeZoneW"; + h = "0.3 * safeZoneH"; }; class ACE_Scopes_Zeroing_Vertical: RscText { idc = 12; @@ -43,10 +43,10 @@ class RscTitles { colorBackground[] = { 1, 0, 0, 0 }; shadow = 0; - x = "(0.5 - 0.4 / 2 + 0.45*0.4) * safezoneW + safezoneX"; - y = "(0 + 0.19*0.3) * safezoneH + safezoneY"; - w = "0.04 * safezoneW"; - h = "0.025 * safezoneH"; + x = "(0.5 - 0.4 / 2 + 0.45*0.4) * safeZoneW + safeZoneX"; + y = "(0 + 0.19*0.3) * safeZoneH + safeZoneY"; + w = "0.04 * safeZoneW"; + h = "0.025 * safeZoneH"; }; class ACE_Scopes_Zeroing_Horizontal: RscText { idc = 13; @@ -60,10 +60,10 @@ class RscTitles { colorBackground[] = { 1, 0, 0, 0 }; shadow = 0; - x = "(0.5 - 0.4 / 2 + 0.6*0.4) * safezoneW + safezoneX"; - y = "(0 + 0.47*0.3) * safezoneH + safezoneY"; - w = "0.019 * safezoneW"; - h = "0.025 * safezoneH"; + x = "(0.5 - 0.4 / 2 + 0.6*0.4) * safeZoneW + safeZoneX"; + y = "(0 + 0.47*0.3) * safeZoneH + safeZoneY"; + w = "0.019 * safeZoneW"; + h = "0.025 * safeZoneH"; }; }; }; diff --git a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf index b813dde9ef8..d356343099d 100644 --- a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf +++ b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf @@ -43,6 +43,10 @@ if (cameraView == "GUNNER") then { _yaw = _yaw + _windageDifference; [_unit, _pitch, _bank, _yaw] call EFUNC(common,setPitchBankYaw); }; + + if (GVAR(inScopeAdjustment)) then { + [] call FUNC(showZeroing); + }; } else { [] call FUNC(showZeroing); }; diff --git a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf b/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf index ed1222e3bbc..670a119f839 100644 --- a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf +++ b/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf @@ -42,9 +42,7 @@ private _vanillaZero = parseNumber (("ace" callExtension ["ballistics:replicate_ _vanillaZero = 0; #endif -private _trueZero = if (!_advancedBallistics) then { - parseNumber (("ace" callExtension ["ballistics:zero_vanilla", [_newZeroRange, _initSpeed, _airFriction, _boreHeight]]) select 0) -} else { +private _trueZero = if (_advancedBallistics) then { // Get Weapon and Ammo Configurations private _AmmoCacheEntry = uiNamespace getVariable format[QEGVAR(advanced_ballistics,%1), _ammo]; if (isNil "_AmmoCacheEntry") then { @@ -81,6 +79,8 @@ private _trueZero = if (!_advancedBallistics) then { _atmosphereModel ]]) select 0 ) +} else { + parseNumber (("ace" callExtension ["ballistics:zero_vanilla", [_newZeroRange, _initSpeed, _airFriction, _boreHeight]]) select 0) }; private _zeroAngleCorrection = _trueZero - _vanillaZero; diff --git a/addons/scopes/functions/fnc_getOptics.sqf b/addons/scopes/functions/fnc_getOptics.sqf index d419d8d7f05..c52b032008c 100644 --- a/addons/scopes/functions/fnc_getOptics.sqf +++ b/addons/scopes/functions/fnc_getOptics.sqf @@ -19,14 +19,4 @@ params ["_unit"]; -private _optics = ["", "", ""]; - -if !(_unit isKindOf "CAManBase") exitWith {_optics}; - -{ - if (count _x >= 2) then { - _optics set [_forEachIndex, _x select 2]; - }; -} forEach [primaryWeaponItems _unit, secondaryWeaponItems _unit, handgunItems _unit]; - -_optics +[primaryWeaponItems _unit, secondaryWeaponItems _unit, handgunItems _unit] apply {_x select 2} // return diff --git a/addons/scopes/initSettings.inc.sqf b/addons/scopes/initSettings.inc.sqf index 40ed62cbcc2..e74bcb4c073 100644 --- a/addons/scopes/initSettings.inc.sqf +++ b/addons/scopes/initSettings.inc.sqf @@ -76,18 +76,26 @@ private _category = format ["ACE %1", localize LSTRING(DisplayName)]; true // Needs mission restart ] call CBA_fnc_addSetting; +[ + QGVAR(simplifiedZeroing), "CHECKBOX", + [LSTRING(simplifiedZeroing_displayName), LSTRING(simplifiedZeroing_description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + [ QGVAR(useLegacyUI), "CHECKBOX", [LSTRING(useLegacyUI_displayName), LSTRING(useLegacyUI_description)], _category, false, - 0 + 2 ] call CBA_fnc_addSetting; [ - QGVAR(simplifiedZeroing), "CHECKBOX", - [LSTRING(simplifiedZeroing_displayName), LSTRING(simplifiedZeroing_description)], + QGVAR(inScopeAdjustment), "CHECKBOX", + LSTRING(inScopeAdjustment_displayName), _category, false, - 1 + 0 ] call CBA_fnc_addSetting; diff --git a/addons/scopes/stringtable.xml b/addons/scopes/stringtable.xml index 9a47f657cc0..947447d379c 100644 --- a/addons/scopes/stringtable.xml +++ b/addons/scopes/stringtable.xml @@ -21,7 +21,7 @@ Enable ACE Scope adjustment Aktiviere das Nullen von Zielfernrohren ACE スコープ調節を有効化 - ACE 조준경 영점조작 활성화 + ACE 조준경 영점조절 활성화 Włącz ustawienia celowników optycznych ACE Activer le réglage ACE des lunettes Abilita Regolazione Mirino ACE @@ -337,7 +337,7 @@ Repliziert das Vanilla-Zeroing-System für Zielfernrohre. バニラ(ゲーム標準)のライフルスコープ用ゼロイン調整システムを再現します。 Replica il sistema di azzeramento vanilla per le ottiche. - 라이플 스코프용 바닐라 영점조정 시스템을 복제합니다. + 라이플 스코프용 바닐라 영점조절 시스템을 복제합니다. 使用原版的歸零系統來取代ACE複雜的歸零模擬。 使用原版的归零系统来取代 ACE 复杂的归零模拟。 Replikuje system zerowania, dla celowników karabinowych, z domyślnej gry. @@ -347,6 +347,15 @@ Replikuje systém naměřování puškohledů ze základní hry. Replica en los visores el sistema de homogeneizado de vanilla + + Show adjustment UI in scope + Zeige Absehenverstellungs-UI im Zielfernrohr + Mostra UI delle manopole nel mirino + 調整UIをスコープ内に表示 + 스코프에 조절 UI 보이기 + Показать интерфейс настройки в области видимости. + Mostrar IU de ajuste en el visor + Minor adjustment up Kleine Korrektur hoch @@ -496,7 +505,7 @@ Nullung zurücksetzen ゼロイン調節を初期化 Resetta l'azzeramento - 영점 조정 재설정 + 영점 조절 재설정 重設歸零 重设归零 Zresetuj wyzerowanie diff --git a/addons/sitting/XEH_clientInit.sqf b/addons/sitting/XEH_clientInit.sqf index 5495ef0e978..bb2b1e2e681 100644 --- a/addons/sitting/XEH_clientInit.sqf +++ b/addons/sitting/XEH_clientInit.sqf @@ -3,7 +3,7 @@ // Exit on Headless if (!hasInterface) exitWith {}; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { TRACE_1("SettingInit",XGVAR(enable)); // If not enabled, then do not add CanInteractWith Condition or event handlers diff --git a/addons/sitting/functions/fnc_canSit.sqf b/addons/sitting/functions/fnc_canSit.sqf index 4328234bd90..609bcea6828 100644 --- a/addons/sitting/functions/fnc_canSit.sqf +++ b/addons/sitting/functions/fnc_canSit.sqf @@ -21,6 +21,7 @@ params ["_seat", "_player", ["_seatPos", 0]]; // Sitting enabled, not occupied and standing up (or not on a big slope) XGVAR(enable) && +{[_player, _seat] call EFUNC(common,canInteractWith)} && {isNil {_player getVariable QGVAR(sittingStatus)}} && { private _seatsClaimed = _seat getVariable [QGVAR(seatsClaimed), []]; diff --git a/addons/sitting/functions/fnc_sit.sqf b/addons/sitting/functions/fnc_sit.sqf index 033a1f4d2ca..d359083c44a 100644 --- a/addons/sitting/functions/fnc_sit.sqf +++ b/addons/sitting/functions/fnc_sit.sqf @@ -56,7 +56,7 @@ TRACE_2("Sit pos and dir",_sitPosition,_sitDirection); // Set direction and position _player setDir _sitDirection; //modelToWorld returns AGL -_player setPosASL (AGLtoASL (_seat modelToWorld _sitPosition)); +_player setPosASL (AGLToASL (_seat modelToWorld _sitPosition)); // Set variables, save seat object on player _player setVariable [QGVAR(sittingStatus), [_seat, _actionID, _seatPos]]; diff --git a/addons/smallarms/stringtable.xml b/addons/smallarms/stringtable.xml index ebb387113ab..c31dad8f3eb 100644 --- a/addons/smallarms/stringtable.xml +++ b/addons/smallarms/stringtable.xml @@ -12,7 +12,7 @@ 17-Schuss-9mm-Magazin 9 mm, 17ks zásobník Carregador 17Mun. 9 mm - 9mm 17발 탄창 + 9mm 17발 들이 탄창 9 mm 17发 弹匣 9mm 17Rnd マガジン 9 mm 17 Merm. Şarjör @@ -29,7 +29,7 @@ .45 ACP 25 Merm. Şarjör .45 ACP 25Rnd マガジン .45 ACP 25发 弹匣 - .45 ACP 25발 탄창 + .45구경 ACP 25발 들이 탄창 Carregador 25Mun. .45 ACP @@ -44,7 +44,7 @@ .45 ACP 25 Merm. İzli (Yeşil) Şarjör .45 ACP 25Rnd トレーサー (緑) マガジン .45 ACP 25发 弹匣(曳光,绿) - .45 ACP 25발 예광탄 (초록) 탄창 + .45구경 ACP 25발 들이 탄창 (녹색 예광탄) Carregador 25Mun. .45 ACP Traçante (Verde) @@ -59,7 +59,7 @@ .45 ACP 25 Merm. İzli (Kırmızı) Şarjör .45 ACP 25Rnd トレーサー (赤) マガジン .45 ACP 25发 弹匣(曳光,红) - .45 ACP 25발 예광탄 (빨강) 탄창 + .45구경 ACP 25발 들이 탄창 (적색 예광탄) Carregador 25Mun. .45 ACP Traçante (Vermelha) @@ -74,7 +74,7 @@ .45 ACP 25 Merm. İzli (Sarı) Şarjör .45 ACP 25Rnd トレーサー (黄) マガジン .45 ACP 25发 弹匣(曳光,黄) - .45 ACP 25발 예광탄 (노랑) 탄창 + .45구경 ACP 25발 들이 탄창 (황색 예광탄) Carregador 25Mun. .45 ACP Traçante (Amarela) @@ -89,7 +89,7 @@ .45 ACP 8 Merm. Şarjör .45 ACP 8Rnd マガジン .45 ACP 8发 弹匣 - .45 ACP 8발 탄창 + .45구경 ACP 8발 들이 탄창 Carregador 8Mun. .45 ACP @@ -104,7 +104,7 @@ .45 ACP 15 Merm. Şarjör .45 ACP 15Rnd マガジン .45 ACP 15发 弹匣 - .45 ACP 15발 탄창 + .45구경 ACP 15발 들이 탄창 Carregador 15Mun. .45 ACP diff --git a/addons/spectator/functions/fnc_cam_setVisionMode.sqf b/addons/spectator/functions/fnc_cam_setVisionMode.sqf index 5bcf8710b6b..eaec12a86d3 100644 --- a/addons/spectator/functions/fnc_cam_setVisionMode.sqf +++ b/addons/spectator/functions/fnc_cam_setVisionMode.sqf @@ -29,10 +29,10 @@ if !(_newVision in _visions) then { if (GVAR(camMode) != MODE_FPS) then { // 0+ are all thermal vision types if (_newVision < 0) then { - false setCamUseTi 0; + false setCamUseTI 0; camUseNVG (_newVision >= VISION_NVG); } else { - true setCamUseTi _newVision; + true setCamUseTI _newVision; }; // Give user feedback that vision mode changed diff --git a/addons/spectator/functions/fnc_cam_tick.sqf b/addons/spectator/functions/fnc_cam_tick.sqf index 1e7e1b99137..273aa69ecfc 100644 --- a/addons/spectator/functions/fnc_cam_tick.sqf +++ b/addons/spectator/functions/fnc_cam_tick.sqf @@ -58,22 +58,22 @@ if (_cameraMode != MODE_FREE) then { _camTarget = GVAR(camFocus); // Focus get in / out of vehicle state -if !(isNull _camTarget) then { +if (isNull _camTarget) then { + GVAR(camTargetInVehicle) = false; +} else { private _targetInVeh = GVAR(camTargetInVehicle); if (GVAR(camHasTarget)) then { - if (!_targetInVeh && { vehicle _camTarget != _camTarget }) then { + if (!_targetInVeh && { !isNull objectParent _camTarget }) then { [_camTarget] call FUNC(cam_setTarget); GVAR(camTargetInVehicle) = true; }; - if (_targetInVeh && { vehicle _camTarget == _camTarget }) then { + if (_targetInVeh && { isNull objectParent _camTarget }) then { [_camTarget] call FUNC(cam_setTarget); GVAR(camTargetInVehicle) = false; }; }; -} else { - GVAR(camTargetInVehicle) = false; }; // Camera lights diff --git a/addons/spectator/functions/fnc_getGroupIcon.sqf b/addons/spectator/functions/fnc_getGroupIcon.sqf index 64db9e72974..2c464c5b664 100644 --- a/addons/spectator/functions/fnc_getGroupIcon.sqf +++ b/addons/spectator/functions/fnc_getGroupIcon.sqf @@ -51,7 +51,7 @@ if (isNull _leader) exitWith { [ICON_UNKNOWN, CIV_ICON_UNKNOWN] select (side _gr // Civilians are easy, just check leader's vehicle (unlikely group is large) if (side _group == civilian) exitWith { - if (_leader != vehicle _leader) then { + if (!isNull objectParent _leader) then { // More common cases should be checked first (vehicle _leader) call { if (_this isKindOf "Car") exitWith { diff --git a/addons/spectator/functions/fnc_handleFired.sqf b/addons/spectator/functions/fnc_handleFired.sqf index f8683af947e..9817452386e 100644 --- a/addons/spectator/functions/fnc_handleFired.sqf +++ b/addons/spectator/functions/fnc_handleFired.sqf @@ -27,7 +27,7 @@ params [ // Remove the EH when spectator is no longer active or unit is removed if (isNil QGVAR(entitiesToDraw) || {!(_unit in GVAR(entitiesToDraw))}) exitWith { - //USES_VARIABLES ["_thisEventHandler"] + //IGNORE_PRIVATE_WARNING ["_thisEventHandler"]; _unit removeEventHandler ["Fired", _thisEventHandler]; SETVAR(_unit,GVAR(firedEH),nil); }; diff --git a/addons/spectator/functions/fnc_setCameraAttributes.sqf b/addons/spectator/functions/fnc_setCameraAttributes.sqf index f33f23c09a4..48cc4fb0c58 100644 --- a/addons/spectator/functions/fnc_setCameraAttributes.sqf +++ b/addons/spectator/functions/fnc_setCameraAttributes.sqf @@ -88,7 +88,7 @@ if (!isNil QGVAR(camera)) then { // GVARs exits purely for pre-setting of these attributes if (!isNil "_position") then { - GVAR(camPos) = ATLtoASL _position; + GVAR(camPos) = ATLToASL _position; }; if (!isNil "_direction") then { diff --git a/addons/spectator/functions/fnc_ui_handleKeyDown.sqf b/addons/spectator/functions/fnc_ui_handleKeyDown.sqf index c26a06786d7..59dd418782a 100644 --- a/addons/spectator/functions/fnc_ui_handleKeyDown.sqf +++ b/addons/spectator/functions/fnc_ui_handleKeyDown.sqf @@ -108,13 +108,13 @@ if (_key == DIK_L) exitWith { { deleteVehicle _x; } forEach GVAR(camLights); GVAR(camLights) = []; } else { - private _cameraLight = "#lightpoint" createvehicleLocal getPosASL GVAR(camera); + private _cameraLight = "#lightpoint" createVehicleLocal getPosASL GVAR(camera); _cameraLight setLightBrightness 2; _cameraLight setLightAmbient [1,1,1]; _cameraLight setLightColor [0,0,0]; _cameraLight lightAttachObject [GVAR(camera), [0,0,0]]; - private _pointerLight = "#lightpoint" createvehicleLocal getPosASL GVAR(camera); + private _pointerLight = "#lightpoint" createVehicleLocal getPosASL GVAR(camera); _pointerLight setLightBrightness 1; _pointerLight setLightAmbient [1,1,1]; _pointerLight setLightColor [0,0,0]; diff --git a/addons/spectator/functions/fnc_ui_handleListClick.sqf b/addons/spectator/functions/fnc_ui_handleListClick.sqf index 600b7e711ce..f81a73f4fd1 100644 --- a/addons/spectator/functions/fnc_ui_handleListClick.sqf +++ b/addons/spectator/functions/fnc_ui_handleListClick.sqf @@ -33,7 +33,7 @@ if !(isNull _object) then { if (_dblClick) then { // Place camera within ~10m of the object and above ground level private _pos = getPosASLVisual _object; - GVAR(camera) setPosASL (AGLtoASL (_pos getPos [1 + random 10, random 360]) vectorAdd [0,0,2 + random 10]); + GVAR(camera) setPosASL (AGLToASL (_pos getPos [1 + random 10, random 360]) vectorAdd [0,0,2 + random 10]); // Reset the focus [objNull] call FUNC(setFocus); diff --git a/addons/spectator/functions/fnc_ui_updateHelp.sqf b/addons/spectator/functions/fnc_ui_updateHelp.sqf index 1ddbbacad91..4a226bf3613 100644 --- a/addons/spectator/functions/fnc_ui_updateHelp.sqf +++ b/addons/spectator/functions/fnc_ui_updateHelp.sqf @@ -31,7 +31,7 @@ private _controls = []; // When not in first person, camera rotation applies if (_cameraMode != MODE_FPS) then { - _controls pushback ["[RMB]", localize "STR_A3_Spectator_Helper_CameraRotation"]; + _controls pushBack ["[RMB]", localize "STR_A3_Spectator_Helper_CameraRotation"]; }; // When in free camera, focus/un-focus with LMB @@ -52,31 +52,31 @@ if (_hasTarget && {count _availableModes > 1}) then { }; if (_cameraMode == MODE_FREE) then { - _controls pushback [ + _controls pushBack [ format ["[%1/%2]", [DIK_W] call CBA_fnc_localizeKey, [DIK_S] call CBA_fnc_localizeKey], localize "STR_A3_Spectator_Helper_Movement" ]; - _controls pushback [ + _controls pushBack [ format ["[%1/%2]", [DIK_A] call CBA_fnc_localizeKey, [DIK_D] call CBA_fnc_localizeKey], localize "STR_A3_Spectator_Helper_Strafing" ]; - _controls pushback [ + _controls pushBack [ format ["[%1/%2]", [DIK_Q] call CBA_fnc_localizeKey, [DIK_Z] call CBA_fnc_localizeKey], localize "STR_A3_Spectator_Helper_Height" ]; } else { - _controls pushback [ + _controls pushBack [ format ["[%1]", toUpper ([DIK_RIGHT] call CBA_fnc_localizeKey)], localize LSTRING(nextUnit) ]; - _controls pushback [ + _controls pushBack [ format ["[%1]", toUpper ([DIK_LEFT] call CBA_fnc_localizeKey)], localize LSTRING(prevUnit) ]; }; if (_cameraMode != MODE_FPS) then { - _controls pushback [ + _controls pushBack [ format ["[%1]", ([DIK_N] call CBA_fnc_localizeKey)], localize LSTRING(nextVis) ]; @@ -128,7 +128,7 @@ lnbClear _help; // Set height based on number of rows private _newH = (GVAR(uiHelpH) / MAX_CONTROLS_HELP_ENTRIES) * count _controls; -private _newY = safezoneY + safezoneH - _newH; +private _newY = safeZoneY + safeZoneH - _newH; (ctrlPosition _help) params ["_newX","","_newW"]; diff --git a/addons/spectator/functions/fnc_ui_updateIconsToDraw.sqf b/addons/spectator/functions/fnc_ui_updateIconsToDraw.sqf index 6093467d639..e5a736a7754 100644 --- a/addons/spectator/functions/fnc_ui_updateIconsToDraw.sqf +++ b/addons/spectator/functions/fnc_ui_updateIconsToDraw.sqf @@ -89,7 +89,7 @@ private _camPos = AGLToASL positionCameraToWorld [0,0,0]; 0, _heightByDistance, 0, - groupID _group, + groupId _group, 2, _fontSizeByDistance, "PuristaMedium", diff --git a/addons/spectator/functions/fnc_ui_updateListEntities.sqf b/addons/spectator/functions/fnc_ui_updateListEntities.sqf index 000f9a4b226..969460329c9 100644 --- a/addons/spectator/functions/fnc_ui_updateListEntities.sqf +++ b/addons/spectator/functions/fnc_ui_updateListEntities.sqf @@ -54,7 +54,7 @@ private _entities = [true] call FUNC(getTargetEntities); // Cache the info of the group itself private _groupTexture = [_group] call FUNC(getGroupIcon); - private _groupInfo = [_group, str _group, _groupTexture, groupID _group]; + private _groupInfo = [_group, str _group, _groupTexture, groupId _group]; // Add the group to the correct side private _side = side _group; diff --git a/addons/spectator/functions/fnc_ui_updateWidget.sqf b/addons/spectator/functions/fnc_ui_updateWidget.sqf index 78128d3b000..22858458f15 100644 --- a/addons/spectator/functions/fnc_ui_updateWidget.sqf +++ b/addons/spectator/functions/fnc_ui_updateWidget.sqf @@ -31,7 +31,7 @@ if !(isPlayer _focus) then { _name = format ["%1: %2", localize "str_player_ai", private _unitTypePicture = ""; private _vehicleTypePicture = ""; private _vehiclePositionPicture = ""; -if (_focus != vehicle _focus) then { +if (!isNull objectParent _focus) then { _vehicleTypePicture = getText (configOf vehicle _focus >> "Picture"); _vehiclePositionPicture = switch (_focus) do { diff --git a/addons/spectator/script_component.hpp b/addons/spectator/script_component.hpp index b4e7c82ac88..c29c60bdefc 100644 --- a/addons/spectator/script_component.hpp +++ b/addons/spectator/script_component.hpp @@ -17,12 +17,12 @@ #include "\z\ace\addons\main\script_macros.hpp" // UI grid -#define SIZEX ((safezoneW / safezoneH) min 1.2) +#define SIZEX ((safeZoneW / safeZoneH) min 1.2) #define SIZEY (SIZEX / 1.2) #define W_PART(num) (num * (SIZEX / 40)) #define H_PART(num) (num * (SIZEY / 25)) -#define X_PART(num) (W_PART(num) + (safezoneX + (safezoneW - SIZEX)/2)) -#define Y_PART(num) (H_PART(num) + (safezoneY + (safezoneH - SIZEY)/2)) +#define X_PART(num) (W_PART(num) + (safeZoneX + (safeZoneW - SIZEX)/2)) +#define Y_PART(num) (H_PART(num) + (safeZoneY + (safeZoneH - SIZEY)/2)) // UI/Camera related values #define SPEED_SLOW 0.1 diff --git a/addons/spectator/ui.hpp b/addons/spectator/ui.hpp index f61e7749eea..d81887db760 100644 --- a/addons/spectator/ui.hpp +++ b/addons/spectator/ui.hpp @@ -82,7 +82,7 @@ class GVAR(display) { onMouseExit = QUOTE([true] call FUNC(ui_fadeList)); x = "safeZoneX"; - y = "safezoneY"; + y = "safeZoneY"; w = QUOTE(W_PART(13.5)); h = QUOTE(H_PART(1.5)); @@ -98,7 +98,7 @@ class GVAR(display) { class CameraTypesGroup: RscControlsGroupNoScrollbars { idc = IDC_CAM_TYPES; x = QUOTE(X_PART(15.5)); - y = QUOTE(safezoneY + safezoneH - H_PART(2.38)); + y = QUOTE(safeZoneY + safeZoneH - H_PART(2.38)); w = QUOTE(W_PART(8.6)); h = 2.6; class controls { @@ -245,8 +245,8 @@ class GVAR(display) { }; class HelpBackground: RscText { idc = IDC_HELP_BACK; - x = QUOTE(safezoneX + safezoneW - W_PART(12)); - y = QUOTE(safezoneY + safezoneH - H_PART(8)); + x = QUOTE(safeZoneX + safeZoneW - W_PART(12)); + y = QUOTE(safeZoneY + safeZoneH - H_PART(8)); w = QUOTE(W_PART(12)); h = QUOTE(H_PART(8)); colorBackground[] = {0,0,0,0.75}; @@ -256,8 +256,8 @@ class GVAR(display) { disableOverflow = 0; rowHeight = QUOTE(H_PART(1)); idc = IDC_HELP; - x = QUOTE(safezoneX + safezoneW - W_PART(12)); - y = QUOTE(safezoneY + safezoneH - H_PART(12)); + x = QUOTE(safeZoneX + safeZoneW - W_PART(12)); + y = QUOTE(safeZoneY + safeZoneH - H_PART(12)); w = QUOTE(W_PART(12)); h = QUOTE(H_PART(12)); }; diff --git a/addons/spottingscope/script_component.hpp b/addons/spottingscope/script_component.hpp index 6b2d95abbd5..cf7b8a835f7 100644 --- a/addons/spottingscope/script_component.hpp +++ b/addons/spottingscope/script_component.hpp @@ -16,8 +16,8 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define POS_X_BASE(size) safezoneX + 0.5 * safezoneW - 0.5 * (size) / (getResolution select 5) -#define POS_Y_BASE(size) safezoneY + 0.5 * safezoneH - 0.5 * (size) / (getResolution select 5) * 4/3 +#define POS_X_BASE(size) safeZoneX + 0.5 * safeZoneW - 0.5 * (size) / (getResolution select 5) +#define POS_Y_BASE(size) safeZoneY + 0.5 * safeZoneH - 0.5 * (size) / (getResolution select 5) * 4/3 #define POS_W_BASE(size) (size) / (getResolution select 5) #define POS_H_BASE(size) (size) / (getResolution select 5) * 4/3 diff --git a/addons/switchunits/functions/fnc_initPlayer.sqf b/addons/switchunits/functions/fnc_initPlayer.sqf index ba9c3f77b30..49990959b7a 100644 --- a/addons/switchunits/functions/fnc_initPlayer.sqf +++ b/addons/switchunits/functions/fnc_initPlayer.sqf @@ -18,7 +18,7 @@ params ["_playerUnit"]; -if (vehicle _playerUnit == _playerUnit) then { +if (isNull objectParent _playerUnit) then { [GVAR(switchableSides)] call FUNC(markAiOnMap); _playerUnit setVariable [QGVAR(IsPlayerUnit), true, true]; diff --git a/addons/tacticalladder/stringtable.xml b/addons/tacticalladder/stringtable.xml index a7d33865f96..298c0e3c442 100644 --- a/addons/tacticalladder/stringtable.xml +++ b/addons/tacticalladder/stringtable.xml @@ -79,7 +79,7 @@ +Ctrl incliner +Ctrl per inclinare +Ctrl で傾ける - +컨트롤 키 기울이기 + +컨트롤 키로 기울이기 +Ctrl 倾斜 +Ctrl 傾斜 diff --git a/addons/tagging/functions/fnc_createTag.sqf b/addons/tagging/functions/fnc_createTag.sqf index 90923cc8034..134e37bcc0a 100644 --- a/addons/tagging/functions/fnc_createTag.sqf +++ b/addons/tagging/functions/fnc_createTag.sqf @@ -68,7 +68,7 @@ if (_object getVariable [QGVAR(testVar), false]) then { if (_selection == "" && _damage >= 1) then { { deleteVehicle _x; - } foreach (_object getVariable [QGVAR(attachedTags), []]); + } forEach (_object getVariable [QGVAR(attachedTags), []]); _object setVariable [QGVAR(attachedTags), []]; }; }]; diff --git a/addons/towing/config.cpp b/addons/towing/config.cpp index d4d1b5e8540..7c98be1756c 100644 --- a/addons/towing/config.cpp +++ b/addons/towing/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common", "ace_logistics_rope"}; + requiredAddons[] = {"ace_interaction", "ace_logistics_rope"}; author = ECSTRING(common,ACETeam); authors[] = {"tcvm"}; url = ECSTRING(main,URL); @@ -16,4 +16,3 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" - diff --git a/addons/towing/functions/fnc_attachRopePFH.sqf b/addons/towing/functions/fnc_attachRopePFH.sqf index 37f626e0a92..31def8dcb83 100644 --- a/addons/towing/functions/fnc_attachRopePFH.sqf +++ b/addons/towing/functions/fnc_attachRopePFH.sqf @@ -21,7 +21,7 @@ private _viewDirection = getCameraViewDirection _unit; GVAR(attachHelper) setPosASL (_unit modelToWorldVisualWorld [0, 1, 1.5]); private _hintLMB = ""; -private _hintRMB = localize ELSTRING(dragging,Drop); +private _hintRMB = LELSTRING(common,Drop); private _startPos = eyePos _unit; private _endPos = _startPos vectorAdd (_viewDirection vectorMultiply TOW_ACTION_DISTANCE); diff --git a/addons/towing/functions/fnc_towStateMachinePFH.sqf b/addons/towing/functions/fnc_towStateMachinePFH.sqf index 7b295754fad..ad516f211b6 100644 --- a/addons/towing/functions/fnc_towStateMachinePFH.sqf +++ b/addons/towing/functions/fnc_towStateMachinePFH.sqf @@ -70,7 +70,7 @@ switch (_state) do { // can't use createVehicleLocal because rope can be non-local (like parent) and it must be attached to global vehicle GVAR(helper) = createVehicle [QGVAR(helper), [0, 0, 0], [], 0, "CAN_COLLIDE"]; GVAR(helper) attachTo [_unit, [0, 0, 0], "LeftHand", true]; - _rope = ropeCreate [_parent, _parent worldToModelVisual ASLtoAGL getPosASLVisual GVAR(attachHelper), GVAR(helper), [0, 0, 0], _length]; + _rope = ropeCreate [_parent, _parent worldToModelVisual ASLToAGL getPosASLVisual GVAR(attachHelper), GVAR(helper), [0, 0, 0], _length]; _args set [3, _rope]; }; @@ -95,7 +95,7 @@ switch (_state) do { case TOW_STATE_ATTACH: { TRACE_3("state attach",GVAR(attachHelper),_parent,_rope); private _child = GVAR(attachHelper) getVariable [QGVAR(object), objNull]; - private _relativeAttachPos = _child worldToModelVisual ASLtoAGL getPosASLVisual GVAR(attachHelper); + private _relativeAttachPos = _child worldToModelVisual ASLToAGL getPosASLVisual GVAR(attachHelper); TRACE_3("child&pos",_parent,_child,_relativeAttachPos); @@ -118,7 +118,7 @@ switch (_state) do { }; private _hookParent = createVehicle [QGVAR(hook), [0, 0, 0], [], 0, "CAN_COLLIDE"]; - _hookParent attachTo [_parent, _parent worldToModelVisual ASLtoAGL getPosASLVisual _rope]; + _hookParent attachTo [_parent, _parent worldToModelVisual ASLToAGL getPosASLVisual _rope]; private _hook = createVehicle [QGVAR(hook), [0, 0, 0], [], 0, "CAN_COLLIDE"]; _hook attachTo [_child, _relativeAttachPos]; diff --git a/addons/trenches/XEH_preInit.sqf b/addons/trenches/XEH_preInit.sqf index 94decd550af..c8c9a3451f9 100644 --- a/addons/trenches/XEH_preInit.sqf +++ b/addons/trenches/XEH_preInit.sqf @@ -8,6 +8,6 @@ PREP_RECOMPILE_END; #include "initSettings.inc.sqf" -GVAR(entrenchingTools) = call (uiNamespace getVariable QGVAR(entrenchingTools)); +GVAR(entrenchingTools) = keys (uiNamespace getVariable QGVAR(entrenchingTools)); ADDON = true; diff --git a/addons/trenches/XEH_preStart.sqf b/addons/trenches/XEH_preStart.sqf index c966b2c9b6d..05065910397 100644 --- a/addons/trenches/XEH_preStart.sqf +++ b/addons/trenches/XEH_preStart.sqf @@ -6,4 +6,4 @@ private _entrenchingTools = (QUOTE(getNumber (_x >> QQGVAR(entrenchingTool)) > 0 _entrenchingTools append (QUOTE(getNumber (_x >> QQGVAR(entrenchingTool)) > 0) configClasses (configFile >> "CfgVehicles") apply {configName _x}); TRACE_1("",_entrenchingTools); -uiNamespace setVariable [QGVAR(entrenchingTools), compileFinal str _entrenchingTools]; +uiNamespace setVariable [QGVAR(entrenchingTools), compileFinal (_entrenchingTools createHashMapFromArray [])]; diff --git a/addons/trenches/functions/fnc_continueDiggingTrench.sqf b/addons/trenches/functions/fnc_continueDiggingTrench.sqf index 78047c189e4..e3aadcfd51c 100644 --- a/addons/trenches/functions/fnc_continueDiggingTrench.sqf +++ b/addons/trenches/functions/fnc_continueDiggingTrench.sqf @@ -81,7 +81,7 @@ if(_actualProgress == 0) then { _cutterPos set [2, getTerrainHeightASL _cutterPos]; _trenchGrassCutter setPosASL _cutterPos; deleteVehicle _trenchGrassCutter; - } foreach getArray (configOf _trench >> QGVAR(grassCuttingPoints)); + } forEach getArray (configOf _trench >> QGVAR(grassCuttingPoints)); }; private _progressLeft = (_actualProgress * 10) + 1; diff --git a/addons/trenches/functions/fnc_hasEntrenchingTool.sqf b/addons/trenches/functions/fnc_hasEntrenchingTool.sqf index 5a1127d0072..1568801fdb8 100644 --- a/addons/trenches/functions/fnc_hasEntrenchingTool.sqf +++ b/addons/trenches/functions/fnc_hasEntrenchingTool.sqf @@ -23,4 +23,4 @@ private _uniqueItems = _unit call EFUNC(common,uniqueItems); _uniqueItems append weapons _unit; _uniqueItems pushBack backpack _unit; -GVAR(entrenchingTools) findIf {_x in _uniqueItems} != -1 // return +GVAR(entrenchingTools) findAny _uniqueItems != -1 // return diff --git a/addons/trenches/functions/fnc_placeConfirm.sqf b/addons/trenches/functions/fnc_placeConfirm.sqf index 9a49df86e79..2cfdaf8891e 100644 --- a/addons/trenches/functions/fnc_placeConfirm.sqf +++ b/addons/trenches/functions/fnc_placeConfirm.sqf @@ -64,7 +64,7 @@ for [{private _ix = -_dx/2},{_ix <= _dx/2},{_ix = _ix + _dx/3}] do { _pos set [2, getTerrainHeightASL _pos]; _pos2 = +_pos; _pos2 set [2, getTerrainHeightASL _pos + 1]; - drawLine3D [ASLtoAGL _pos, ASLtoAGL _pos2, [1,1,0,1]]; + drawLine3D [ASLToAGL _pos, ASLToAGL _pos2, [1,1,0,1]]; #endif }; }; diff --git a/addons/trenches/functions/fnc_placeTrench.sqf b/addons/trenches/functions/fnc_placeTrench.sqf index e6e03e0b579..285fe278e94 100644 --- a/addons/trenches/functions/fnc_placeTrench.sqf +++ b/addons/trenches/functions/fnc_placeTrench.sqf @@ -77,7 +77,7 @@ GVAR(digPFH) = [{ _pos set [2, getTerrainHeightASL _pos]; _pos2 = +_pos; _pos2 set [2, getTerrainHeightASL _pos + 1]; - drawLine3D [ASLtoAGL _pos, ASLtoAGL _pos2, [1,1,0,1]]; + drawLine3D [ASLToAGL _pos, ASLToAGL _pos2, [1,1,0,1]]; #endif }; }; diff --git a/addons/ui/CfgInGameUI.hpp b/addons/ui/CfgInGameUI.hpp index 8f39984b03c..3e1f28ba204 100644 --- a/addons/ui/CfgInGameUI.hpp +++ b/addons/ui/CfgInGameUI.hpp @@ -1,5 +1,5 @@ class CfgInGameUI { class DefaultAction { - size = QUOTE(profileNamespace getVariable [ARR_2('GVAR(hideDefaultActionIcon)',(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8))]); + size = QUOTE(profileNamespace getVariable [ARR_2('GVAR(hideDefaultActionIcon)',(((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25) * 0.8))]); }; }; diff --git a/addons/ui/XEH_clientInit.sqf b/addons/ui/XEH_clientInit.sqf index 5bf28bc58d4..80815290bf1 100644 --- a/addons/ui/XEH_clientInit.sqf +++ b/addons/ui/XEH_clientInit.sqf @@ -48,8 +48,7 @@ GVAR(elementsSet) = createHashMap; }] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler; -[QUOTE(ADDON), "AnimChanged", LINKFUNC(onAnimChanged), true] call EFUNC(common,addPlayerEH); - +[QUOTE(ADDON), "AnimChanged", LINKFUNC(onAnimChanged), true] call CBA_fnc_addBISPlayerEventHandler; ["ACE3 Common", QGVAR(hideHud), localize LSTRING(hideHud), { GVAR(hideHud) = !(missionNamespace getVariable [QGVAR(hideHud), false]); diff --git a/addons/ui/stringtable.xml b/addons/ui/stringtable.xml index b1ffce9c1c1..2245d88b026 100644 --- a/addons/ui/stringtable.xml +++ b/addons/ui/stringtable.xml @@ -726,6 +726,10 @@ Hide all UI 全てのUIを隠す Cacher toute l'interface utilisateur. + Скрыть весь интерфейс + 모든 UI 숨기기 + Nascondi tutta l'IU + Ocultar toda la IU diff --git a/addons/vector/RscInGameUI.hpp b/addons/vector/RscInGameUI.hpp index 7e2f7057650..b7a6f25022b 100644 --- a/addons/vector/RscInGameUI.hpp +++ b/addons/vector/RscInGameUI.hpp @@ -51,88 +51,88 @@ class RscInGameUI { class ACE_ScriptedDisplayControlsGroup: RscControlsGroupNoScrollbars { onLoad = "uiNamespace setVariable ['ACE_dlgVector', ctrlParent (_this select 0)];"; idc = 170; - x = "safezoneX"; - y = "safezoneY"; - w = "safezoneW"; - h = "safezoneH"; + x = "safeZoneX"; + y = "safeZoneY"; + w = "safeZoneW"; + h = "safeZoneH"; class controls { class Center: RscPicture { idc = IDC_CENTER; colorText[] = {1,0,0,0.5}; - x = "0.5 - (0.8 / 16 * safezoneW)/2 - safezoneX"; - y = "0.5 - (0.8 / 9 * safezoneH)/2 - safezoneY"; - w = "0.8 / 16 * safezoneW"; - h = "0.8 / 9 * safezoneH"; + x = "0.5 - (0.8 / 16 * safeZoneW)/2 - safeZoneX"; + y = "0.5 - (0.8 / 9 * safeZoneH)/2 - safeZoneY"; + w = "0.8 / 16 * safeZoneW"; + h = "0.8 / 9 * safeZoneH"; }; class Crosshair: Center { idc = IDC_CROSSHAIR; - x = "0.5 - (0.7 / 16 * safezoneW)/2 - safezoneX"; - y = "0.5 - (0.7 / 9 * safezoneH)/2 - safezoneY"; - w = "0.7 / 16 * safezoneW"; - h = "0.7 / 9 * safezoneH"; + x = "0.5 - (0.7 / 16 * safeZoneW)/2 - safeZoneX"; + y = "0.5 - (0.7 / 9 * safeZoneH)/2 - safeZoneY"; + w = "0.7 / 16 * safeZoneW"; + h = "0.7 / 9 * safeZoneH"; }; class Digit0: Center { idc = IDC_DIGIT_0; - x = "(0.54 + 0 * 0.02) * safezoneW"; - y = "0.54 * safezoneH"; - w = "0.5 / 16 * safezoneW"; - h = "0.5 / 9 * safezoneH"; + x = "(0.54 + 0 * 0.02) * safeZoneW"; + y = "0.54 * safeZoneH"; + w = "0.5 / 16 * safeZoneW"; + h = "0.5 / 9 * safeZoneH"; }; class Digit1: Digit0 { idc = IDC_DIGIT_1; - x = "(0.54 + 1 * 0.02) * safezoneW"; + x = "(0.54 + 1 * 0.02) * safeZoneW"; }; class Digit2: Digit0 { idc = IDC_DIGIT_2; - x = "(0.54 + 2 * 0.02) * safezoneW"; + x = "(0.54 + 2 * 0.02) * safeZoneW"; }; class Digit3: Digit0 { idc = IDC_DIGIT_3; - x = "(0.54 + 3 * 0.02) * safezoneW"; + x = "(0.54 + 3 * 0.02) * safeZoneW"; }; class Digit4: Digit0 { idc = IDC_DIGIT_4; - x = "(0.54 + 4 * 0.02) * safezoneW"; + x = "(0.54 + 4 * 0.02) * safeZoneW"; }; class Digit5: Digit0 { idc = IDC_DIGIT_5; - x = "(0.35 + 0 * 0.02) * safezoneW"; + x = "(0.35 + 0 * 0.02) * safeZoneW"; }; class Digit6: Digit0 { idc = IDC_DIGIT_6; - x = "(0.35 + 1 * 0.02) * safezoneW"; + x = "(0.35 + 1 * 0.02) * safeZoneW"; }; class Digit7: Digit0 { idc = IDC_DIGIT_7; - x = "(0.35 + 2 * 0.02) * safezoneW"; + x = "(0.35 + 2 * 0.02) * safeZoneW"; }; class Digit8: Digit0 { idc = IDC_DIGIT_8; - x = "(0.35 + 3 * 0.02) * safezoneW"; + x = "(0.35 + 3 * 0.02) * safeZoneW"; }; class Digit9: Digit0 { idc = IDC_DIGIT_9; - x = "(0.35 + 4 * 0.02) * safezoneW"; + x = "(0.35 + 4 * 0.02) * safeZoneW"; }; class DigitE1: Digit0 { idc = IDC_DIGIT_E1; - x = "(0.39 + 0 * 0.02) * safezoneW"; - y = "0.42 * safezoneH"; + x = "(0.39 + 0 * 0.02) * safeZoneW"; + y = "0.42 * safeZoneH"; }; class DigitE2: DigitE1 { idc = IDC_DIGIT_E2; - x = "(0.39 + 1 * 0.02) * safezoneW"; + x = "(0.39 + 1 * 0.02) * safeZoneW"; }; class DigitE3: DigitE1 { idc = IDC_DIGIT_E3; - x = "(0.39 + 2 * 0.02) * safezoneW"; + x = "(0.39 + 2 * 0.02) * safeZoneW"; }; class DigitE4: DigitE1 { idc = IDC_DIGIT_E4; - x = "(0.39 + 3 * 0.02) * safezoneW"; + x = "(0.39 + 3 * 0.02) * safeZoneW"; }; }; }; diff --git a/addons/vector/functions/fnc_nextMode.sqf b/addons/vector/functions/fnc_nextMode.sqf index f55bbe765bd..7512d8c8928 100644 --- a/addons/vector/functions/fnc_nextMode.sqf +++ b/addons/vector/functions/fnc_nextMode.sqf @@ -37,6 +37,7 @@ switch (_this select 0) do { }; case ("config"): { + //IGNORE_PRIVATE_WARNING ["ace_vector_configTemp"]; GVAR(configTemp) = GVAR(configTemp) + 1; if (GVAR(configTemp) > 2) then {GVAR(configTemp) = 0}; diff --git a/addons/vehicle_damage/functions/fnc_handleCookoff.sqf b/addons/vehicle_damage/functions/fnc_handleCookoff.sqf index 4558359695e..4b84e9a76e9 100644 --- a/addons/vehicle_damage/functions/fnc_handleCookoff.sqf +++ b/addons/vehicle_damage/functions/fnc_handleCookoff.sqf @@ -56,13 +56,24 @@ if (_canJet) then { private _delaySmoke = _chanceOfFire < random 1; private _detonateAfterCookoff = (_fireDetonateChance / 4) > random 1; -private _source = ""; +private _sourceHitpoint = ""; +// Passed to the selectionPosition command in cookoff if (_hitPart == "engine") then { - _source = ["hit_engine_point", "HitPoints"]; + private _hitPoints = getAllHitPointsDamage _vehicle; + + if (_hitPoints isEqualTo []) exitWith {}; + + // Get hitpoint for engine + private _index = (_hitPoints select 0) findIf {_x == "hitengine"}; + + if (_index == -1) exitWith {}; + + // Get corresponding selection + _sourceHitpoint = [(_hitPoints select 1) select _index, "HitPoints", "AveragePoint"]; }; -[QEGVAR(cookOff,cookOffServer), [_vehicle, _intensity, _injurer, _injurer, _delayWithSmoke, _fireDetonateChance, _detonateAfterCookoff, _source, _canRing, _canJet]] call CBA_fnc_serverEvent; +[QEGVAR(cookOff,cookOffServer), [_vehicle, _intensity, _source, _instigator, _delaySmoke, _fireDetonateChance, _detonateAfterCookoff, _sourceHitpoint, _canRing, _canJet]] call CBA_fnc_serverEvent; TRACE_4("cooking-off",_vehicle,_chanceOfFire,_delaySmoke,_detonateAfterCookoff); // Abandon vehicle diff --git a/addons/vehicle_damage/functions/fnc_handleDamage.sqf b/addons/vehicle_damage/functions/fnc_handleDamage.sqf index 733d4f23214..11d06f454fd 100644 --- a/addons/vehicle_damage/functions/fnc_handleDamage.sqf +++ b/addons/vehicle_damage/functions/fnc_handleDamage.sqf @@ -22,8 +22,8 @@ * Public: No */ -params ["_vehicle", "_selection", "_newDamage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"]; -TRACE_8("handleDamage",_vehicle,_selection,_newDamage,_source,_projectile,_hitIndex,_instigator,_hitPoint); +params ["_vehicle", "_selection", "_newDamage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint", "", "_context"]; +TRACE_9("handleDamage",_vehicle,_selection,_newDamage,_source,_projectile,_hitIndex,_instigator,_hitPoint,_context); if (!local _vehicle) exitWith {}; @@ -33,6 +33,11 @@ private _currentDamage = if (_selection != "") then { damage _vehicle }; +// Killing units via End key is an edge case (#10375) +// This didn't matter pre-Arma 3 2.18 but now this goes through the event handler +// TODO: Structural fire damage >= 1 in a single damage event could still be caught here and we don't want that, but we haven't found a better way to catch this, fire damage should be small most of the time anyway +if (_context == 0 && {(abs (_newDamage - _currentDamage - 1)) < 0.001 && _projectile == "" && isNull _source && isNull _instigator}) exitWith {_newDamage}; + if !(_projectile in ["ace_ammoExplosion", "ACE_ammoExplosionLarge"]) then { // If an invalid hit, don't process it if (_newDamage <= 0 || {"#light" in _hitPoint}) exitWith {}; diff --git a/addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf b/addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf index 10485d5ce96..8169e140e2c 100644 --- a/addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf +++ b/addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf @@ -30,4 +30,5 @@ if (!IS_EXPLOSIVE_AMMO(_ammo)) then { } forEach crew _vehicle; }; +//IGNORE_PRIVATE_WARNING ["_thisEventHandler"]; _vehicle removeEventHandler ["HandleDamage", _thisEventHandler]; diff --git a/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf b/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf index 4654b616d06..b0540de484f 100644 --- a/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf +++ b/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf @@ -75,14 +75,14 @@ if (isNil "_multHit") then { _ignoreHit = true; } else { // If the hitpoint isnt in the old array then that means that the time expired and a new array should be generated - if (!_hitPointInOldArray) then { + if (_hitPointInOldArray) then { + _vehicle setVariable [QGVAR(hitTime), [CBA_missionTime, _source, [_hitPoint]]]; + } else { private _oldHitPoints = _multHit select 2; _oldHitPoints pushBack _hitPoint; _vehicle setVariable [QGVAR(hitTime), [CBA_missionTime, _source, _oldHitPoints]]; _ignoreBailCheck = true; - } else { - _vehicle setVariable [QGVAR(hitTime), [CBA_missionTime, _source, [_hitPoint]]]; }; }; }; diff --git a/addons/vehicle_damage/stringtable.xml b/addons/vehicle_damage/stringtable.xml index 7053cc6d3c2..90203b6bf9e 100644 --- a/addons/vehicle_damage/stringtable.xml +++ b/addons/vehicle_damage/stringtable.xml @@ -24,6 +24,7 @@ Habilitar el daño avanzado de vehículos Ativar dano avançado de veículo 乗り物(Vehicle)に対しての高度なダメージ計算を有効化します + 고급 차량 피해 활성화 Enable advanced car damage @@ -34,6 +35,8 @@ Habilitar daño avanzado de coche Habilitar dano avançado para carros 高度な車ダメージを有効化 + Включить продвинутое повреждение автомобиля + 고급 자동차 피해 활성화 Enable advanced car damage (Experimental) @@ -45,6 +48,7 @@ Habilitar daño avanzado de coche (Experimental) Habilitar dano avançado para carros (Experimental) 車(Car)に対しての高度なダメージ計算を有効化します (試験的機能) + 고급 자동차 피해 활성화 (실험용) Wreck (Turret) diff --git a/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf b/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf index c5f7e0e35a0..ec58a6fa2c5 100644 --- a/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf +++ b/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf @@ -34,4 +34,4 @@ if (_sideKeyName in _items) exitWith {true}; private _customKeys = _veh getVariable [QGVAR(customKeys), []]; private _magazines = magazinesDetail _unit; -(_customKeys findIf {_x in _magazines}) != -1 +_customKeys findAny _magazines != -1 diff --git a/addons/vehiclelock/functions/fnc_onOpenInventory.sqf b/addons/vehiclelock/functions/fnc_onOpenInventory.sqf index f8ccc59a0fd..2c355fa3b37 100644 --- a/addons/vehiclelock/functions/fnc_onOpenInventory.sqf +++ b/addons/vehiclelock/functions/fnc_onOpenInventory.sqf @@ -23,7 +23,7 @@ TRACE_2("params",_unit,_container); if (_unit != ACE_player) exitWith {}; if (GVAR(LockVehicleInventory) && //if setting not enabled - {(vehicle ACE_player) == ACE_player} && //Player dismounted + {isNull objectParent ACE_player} && //Player dismounted {(_container isKindOf "Car") || {(_container isKindOf "Tank") || {_container isKindOf "Helicopter"}}} && //container is a lockable veh {(locked _container) in [2,3]} && //Vehicle is locked {!([ACE_player, _container] call FUNC(hasKeyForVehicle))} //player doesn't have key diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml index 7f89ec49505..7c501f74c54 100644 --- a/addons/vehiclelock/stringtable.xml +++ b/addons/vehiclelock/stringtable.xml @@ -80,7 +80,7 @@ Scassinando il veicolo... Usando Mixa... 鍵をこじ開けています・・・ - 문따는 중... + 문 따는 중... 正在开锁... 解鎖中... Maymuncuklanıyor... diff --git a/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf b/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf index c08545ca7c8..db5849d6947 100644 --- a/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf +++ b/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf @@ -17,6 +17,7 @@ */ params ["", "_idPFH"]; +// IGNORE_PRIVATE_WARNING["ace_viewdistance_fovBasedPFHminimalViewDistance"]; // Remove PFH and set Object View Distance back to what it was before if (GVAR(objectViewDistanceCoeff) < 6) exitWith { diff --git a/addons/viewdistance/stringtable.xml b/addons/viewdistance/stringtable.xml index 2c2e92d24e6..5012e905e2d 100644 --- a/addons/viewdistance/stringtable.xml +++ b/addons/viewdistance/stringtable.xml @@ -97,7 +97,7 @@ Устанавливает предел дальности, насколько клиенты могут увеличить свою дальность видимости (до 10000) Imposta il limite massimo a cui i client possono alzare la propria distanza visiva (massimo 10000) 各クライアントが設定できる視界距離の上限 (最大 10000) - 클라이언트가 최대 얼마나 멀리 볼 수 있는지 제한을 둡니다 (10000 까지 가능) + 클라이언트가 최대 얼마나 멀리 볼 수 있는지 제한을 둡니다 (10000까지 가능) 设定客户端最高可显示的视距(最高至10000) 設定客戶端最高可顯示的視野距離 (最高至10000) Kişilerin görüş mesafelerini ne kadar yükseltebileceğine ilişkin sınırı belirler (En Fazla 10000) diff --git a/addons/viewports/dev/debugPoints.sqf b/addons/viewports/dev/debugPoints.sqf index 53fe016b628..2ffc81f512a 100644 --- a/addons/viewports/dev/debugPoints.sqf +++ b/addons/viewports/dev/debugPoints.sqf @@ -22,8 +22,8 @@ #define IDD_3DEN 313 [] spawn { - INFO_2("Pre-Init [is3den %1][3den display: %2]",is3den,!isNull findDisplay IDD_3DEN); - if (!is3den) exitWith {}; + INFO_2("Pre-Init [is3den %1][3den display: %2]",is3DEN,!isNull findDisplay IDD_3DEN); + if (!is3DEN) exitWith {}; GVAR(3denIndex) = 0; GVAR(3denViewports) = []; @@ -99,7 +99,7 @@ private _pointASL = _intersections # 0 # 0; if (isNil "_pointASL") exitWith {}; _pointASL = _pointASL vectorAdd [0,0,0.09]; // Add a little bit up because it always sinks into the model - private _pointMS = _vehicle worldToModel ASLtoAGL _pointASL; + private _pointMS = _vehicle worldToModel ASLToAGL _pointASL; private _name = format ["view_%1",GVAR(3denIndex)]; // [_name, _type, _camLocation, _camAttach, _screenLocation, _maxDistance, _compartments, _roles] @@ -114,7 +114,7 @@ addMissionEventHandler ["Draw3D", { private _vehicle = vehicle player; private _viewports = _vehicle getVariable [QGVAR(viewports), []]; - if (is3den) then { + if (is3DEN) then { _vehicle = (get3DENSelected "object") param [0, objNull]; if (isNull _vehicle) exitWith {}; _viewports = [_vehicle] call FUNC(getViewports); @@ -127,7 +127,7 @@ addMissionEventHandler ["Draw3D", { drawIcon3D ["#(argb,8,8,3)color(1,1,1,1)", [1,1,0,1], _vehicle modelToWorldVisual [0,0,0], 0.1, 0.1, 0, "", 1, 0.02, "TahomaB"]; if (alive player) then { // not using ace_player so this works in 3den - drawIcon3D ["#(argb,8,8,3)color(1,1,1,1)", [0,1,0,1], aslToAGL eyepos player, 0.1, 0.1, 0, "eye", 1, 0.02, "TahomaB"]; + drawIcon3D ["#(argb,8,8,3)color(1,1,1,1)", [0,1,0,1], ASLToAGL eyePos player, 0.1, 0.1, 0, "eye", 1, 0.02, "TahomaB"]; drawIcon3D ["#(argb,8,8,3)color(1,1,1,1)", [0,1,0,1], player modelToWorldVisual (player selectionPosition "pilot"), 0.1, 0.1, 0, "pilot", 1, 0.02, "TahomaB"]; }; // { diff --git a/addons/viewports/functions/fnc_eachFrame.sqf b/addons/viewports/functions/fnc_eachFrame.sqf index 21f2f09dc8d..55971172945 100644 --- a/addons/viewports/functions/fnc_eachFrame.sqf +++ b/addons/viewports/functions/fnc_eachFrame.sqf @@ -39,12 +39,12 @@ if (cba_events_control) then { ([_player] call FUNC(getSeatInfo)) params ["_role", "", "", "_compartment"]; private _newIndexAngle = 45; // Controls the max angle - private _eyesPosASL = AGLtoASL (positionCameraToWorld [0, 0, 0]); - private _eyesDir = (AGLtoASL (positionCameraToWorld [0, 0, 1])) vectorDiff _eyesPosASL; + private _eyesPosASL = AGLToASL (positionCameraToWorld [0, 0, 0]); + private _eyesDir = (AGLToASL (positionCameraToWorld [0, 0, 1])) vectorDiff _eyesPosASL; { _x params ["", "", "_camLocation", "", "_screenLocation", "_maxDistance", "_compartments", "_roles"]; - private _viewASL = AGLtoASL (_vehicle modelToWorldVisual _screenLocation); + private _viewASL = AGLToASL (_vehicle modelToWorldVisual _screenLocation); private _viewDiff = _viewASL vectorDiff _eyesPosASL; private _viewAngle = acos (_viewDiff vectorCos _eyesDir); #ifdef DEBUG_MODE_FULL diff --git a/addons/viewports/functions/fnc_viewCreate.sqf b/addons/viewports/functions/fnc_viewCreate.sqf index 8b08da95756..7d9e45864b0 100644 --- a/addons/viewports/functions/fnc_viewCreate.sqf +++ b/addons/viewports/functions/fnc_viewCreate.sqf @@ -68,12 +68,12 @@ switch (true) do { private _ctrlRender = _display ctrlCreate ["RscPicture", -1]; _ctrlRender ctrlSetText _renderTexture; - _ctrlRender ctrlSetPosition [safezoneX + 0.5 * safezoneW - 0.5 * _viewWidth, safezoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; + _ctrlRender ctrlSetPosition [safeZoneX + 0.5 * safeZoneW - 0.5 * _viewWidth, safeZoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; _ctrlRender ctrlCommit 0; private _ctrlOverlay = _display ctrlCreate ["RscPicture", -1]; _ctrlOverlay ctrlSetText "\a3\weapons_f\reticle\data\optika_tv_ca.paa"; - _ctrlOverlay ctrlSetPosition [safezoneX + 0.5 * safezoneW - 0.5 * _viewWidth, safezoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; + _ctrlOverlay ctrlSetPosition [safeZoneX + 0.5 * safeZoneW - 0.5 * _viewWidth, safeZoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; _ctrlOverlay ctrlCommit 0; if (_usingGoggles) then { @@ -82,7 +82,7 @@ switch (true) do { private _ctrlNVG = _display ctrlCreate ["RscPicture", -1]; _ctrlNVG ctrlSetText "#(argb,8,8,3)color(1,1,0.6,0.9)"; - _ctrlNVG ctrlSetPosition [safezoneX + 0.5 * safezoneW - 0.5 * _viewWidth, safezoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; + _ctrlNVG ctrlSetPosition [safeZoneX + 0.5 * safeZoneW - 0.5 * _viewWidth, safeZoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; _ctrlNVG ctrlCommit 0; } else { _camEffect = [0]; // 2.08's currentVisionMode change could allow matching real turret's vision mode @@ -106,20 +106,20 @@ switch (true) do { private _ctrlRender = _display ctrlCreate ["RscPicture", -1]; _ctrlRender ctrlSetText _renderTexture; - _ctrlRender ctrlSetPosition [safezoneX + 0.5 * safezoneW - 0.5 * _viewWidth, safezoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; + _ctrlRender ctrlSetPosition [safeZoneX + 0.5 * safeZoneW - 0.5 * _viewWidth, safeZoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; _ctrlRender ctrlCommit 0; if (_usingGoggles) then { // Roughly try to color match ace_nvg, and make it semi-opaque private _ctrlNVG = _display ctrlCreate ["RscPicture", -1]; _ctrlNVG ctrlSetText "#(argb,8,8,3)color(0.25,0.2,0.05,0.75)"; - _ctrlNVG ctrlSetPosition [safezoneX + 0.5 * safezoneW - 0.5 * _viewWidth, safezoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; + _ctrlNVG ctrlSetPosition [safeZoneX + 0.5 * safeZoneW - 0.5 * _viewWidth, safeZoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; _ctrlNVG ctrlCommit 0; }; private _ctrlOverlay = _display ctrlCreate ["RscPicture", -1]; _ctrlOverlay ctrlSetText QPATHTOF(data\optic_window_ca.paa); - _ctrlOverlay ctrlSetPosition [safezoneX + 0.5 * safezoneW - 0.5 * _viewWidth, safezoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; + _ctrlOverlay ctrlSetPosition [safeZoneX + 0.5 * safeZoneW - 0.5 * _viewWidth, safeZoneY + 0.5 * safeZoneH - 0.5 * _viewHeight, _viewWidth, _viewHeight]; _ctrlOverlay ctrlCommit 0; }; }; diff --git a/addons/viewrestriction/XEH_clientInit.sqf b/addons/viewrestriction/XEH_clientInit.sqf index 1ed4f008dad..08cc520fd70 100644 --- a/addons/viewrestriction/XEH_clientInit.sqf +++ b/addons/viewrestriction/XEH_clientInit.sqf @@ -3,7 +3,7 @@ // Exit on Headless Client if !(hasInterface) exitWith {}; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { // Exit if module is disabled if (XGVAR(mode) == 0) exitWith {}; diff --git a/addons/volume/XEH_postInitClient.sqf b/addons/volume/XEH_postInitClient.sqf index 896bb718f8d..ae774f2f51d 100644 --- a/addons/volume/XEH_postInitClient.sqf +++ b/addons/volume/XEH_postInitClient.sqf @@ -23,10 +23,10 @@ if (!hasInterface) exitWith {}; if (!XGVAR(lowerInVehicles)) exitWith {}; - if (!isNull objectParent _unit) then { - call FUNC(lowerVolume); - } else { + if (isNull objectParent _unit) then { call FUNC(restoreVolume); + } else { + call FUNC(lowerVolume); }; }] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/weaponselect/XEH_postInit.sqf b/addons/weaponselect/XEH_postInit.sqf index e9f05de8bbd..abb3da3e10d 100644 --- a/addons/weaponselect/XEH_postInit.sqf +++ b/addons/weaponselect/XEH_postInit.sqf @@ -122,7 +122,7 @@ if (!hasInterface) exitWith {}; // Conditions: canInteract if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !((ACE_player != vehicle ACE_player) && {ACE_player == driver vehicle ACE_player} && {!isEngineOn vehicle ACE_player}) exitWith {false}; + if !(!isNull objectParent ACE_player && {ACE_player == driver vehicle ACE_player} && {!isEngineOn vehicle ACE_player}) exitWith {false}; // Statement vehicle ACE_player engineOn true; @@ -135,7 +135,7 @@ if (!hasInterface) exitWith {}; // Conditions: canInteract if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !(ACE_player != vehicle ACE_player && {ACE_player == driver vehicle ACE_player} && {isEngineOn vehicle ACE_player}) exitWith {false}; + if !(!isNull objectParent ACE_player && {ACE_player == driver vehicle ACE_player} && {isEngineOn vehicle ACE_player}) exitWith {false}; // Statement vehicle ACE_player engineOn false; @@ -148,7 +148,7 @@ if (!hasInterface) exitWith {}; // Conditions: canInteract if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !(ACE_player != vehicle ACE_player) exitWith {false}; + if (isNull objectParent ACE_player) exitWith {false}; // Statement [ACE_player, vehicle ACE_player, 0] call FUNC(selectWeaponVehicle); @@ -161,7 +161,7 @@ if (!hasInterface) exitWith {}; // Conditions: canInteract if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !(ACE_player != vehicle ACE_player) exitWith {false}; + if (isNull objectParent ACE_player) exitWith {false}; // Statement [ACE_player, vehicle ACE_player, 1] call FUNC(selectWeaponVehicle); @@ -174,7 +174,7 @@ if (!hasInterface) exitWith {}; // Conditions: canInteract if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !(ACE_player != vehicle ACE_player) exitWith {false}; + if (isNull objectParent ACE_player) exitWith {false}; // Statement [ACE_player, vehicle ACE_player, 2] call FUNC(selectWeaponVehicle); diff --git a/addons/weaponselect/functions/fnc_selectNextGrenade.sqf b/addons/weaponselect/functions/fnc_selectNextGrenade.sqf index ad17c7f18d9..03840de2013 100644 --- a/addons/weaponselect/functions/fnc_selectNextGrenade.sqf +++ b/addons/weaponselect/functions/fnc_selectNextGrenade.sqf @@ -28,16 +28,10 @@ if (_currentGrenade isEqualTo []) then { _currentGrenade = _currentGrenade select 0; -// get available magazines for that unit -private _magazines = magazines _unit; +private _grenadeType = [GVAR(GrenadesAll), GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select _type; -private _grenades = []; - -{ - if (_x in _magazines) then { - _grenades pushBack _x; - }; -} forEach ([GVAR(GrenadesAll), GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select _type); +// This is faster than checking magazines +private _grenades = (throwables _unit) apply {_x select 0} select {_x in _grenadeType}; // abort if no grenades are available if (_grenades isEqualTo []) exitWith {false}; @@ -52,24 +46,6 @@ if (_nextGrenadeIndex >= count _grenades) then { private _nextGrenade = _grenades select _nextGrenadeIndex; -// abort if the same grenade would be selected -if (_currentGrenade == _nextGrenade) exitWith {false}; - -// current best method to select a grenade: remove all grenades except the one you want to select, then add them back -private _uniformGrenades = uniformItems _unit select {_x in GVAR(GrenadesAll) && {_x != _nextGrenade}}; -private _vestGrenades = vestItems _unit select {_x in GVAR(GrenadesAll) && {_x != _nextGrenade}}; -private _backpackGrenades = backpackItems _unit select {_x in GVAR(GrenadesAll) && {_x != _nextGrenade}}; - -// remove all grenades except those we are switching to --> this breaks the selector -{_unit removeItemFromUniform _x} forEach _uniformGrenades; -{_unit removeItemFromVest _x} forEach _vestGrenades; -{_unit removeItemFromBackpack _x} forEach _backpackGrenades; - -// readd grenades -{_unit addItemToUniform _x} forEach _uniformGrenades; -{_unit addItemToVest _x} forEach _vestGrenades; -{_unit addItemToBackpack _x} forEach _backpackGrenades; - -[_nextGrenade, {_x == _nextGrenade} count _magazines] call FUNC(displayGrenadeTypeAndNumber); +[_nextGrenade, {_x == _nextGrenade} count (magazines _unit)] call FUNC(displayGrenadeTypeAndNumber); -true +_unit selectThrowable _nextGrenade // return diff --git a/addons/weather/functions/fnc_updateTemperature.sqf b/addons/weather/functions/fnc_updateTemperature.sqf index 3036171145d..34338f9d79e 100644 --- a/addons/weather/functions/fnc_updateTemperature.sqf +++ b/addons/weather/functions/fnc_updateTemperature.sqf @@ -16,7 +16,7 @@ */ private _month = date select 1; -private _timeRatio = abs(daytime - 12) / 12; +private _timeRatio = abs(dayTime - 12) / 12; GVAR(currentTemperature) = (GVAR(TempDay) select (_month - 1)) * (1 - _timeRatio) + (GVAR(TempNight) select (_month - 1)) * _timeRatio; GVAR(currentTemperature) = GVAR(currentTemperature) + GVAR(temperatureShift) - GVAR(badWeatherShift) * GVAR(currentOvercast); diff --git a/addons/winddeflection/functions/fnc_handleFired.sqf b/addons/winddeflection/functions/fnc_handleFired.sqf index c1b93818f0e..5463fd0ef63 100644 --- a/addons/winddeflection/functions/fnc_handleFired.sqf +++ b/addons/winddeflection/functions/fnc_handleFired.sqf @@ -18,18 +18,11 @@ //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret); -if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false] && {_projectile isKindOf "BulletBase" && {_unit isKindOf "Man"}}) exitWith {false}; +if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false] && {_projectile isKindOf "BulletBase" && {_unit isKindOf "Man"}}) exitWith {}; -if (!((_projectile isKindOf "BulletBase") || {_projectile isKindOf "GrenadeBase"})) exitWith {false}; -if (_unit distance ACE_player > 2000) exitWith {false}; +if (!((_projectile isKindOf "BulletBase") || {_projectile isKindOf "GrenadeBase"})) exitWith {}; +if (_unit distance ACE_player > 2000) exitWith {}; -private _abort = false; -if (!local _unit && {_projectile isKindOf "BulletBase"}) then { - private _ammoCount = (_unit ammo _muzzle) + 1; - private _tracersEvery = getNumber(configFile >> "CfgMagazines" >> _magazine >> "tracersEvery"); - private _lastRoundsTracer = getNumber(configFile >> "CfgMagazines" >> _magazine >> "lastRoundsTracer"); - _abort = _ammoCount > _lastRoundsTracer && {_tracersEvery == 0 || {(_ammoCount - _lastRoundsTracer) % _tracersEvery != 0}}; -}; -if (_abort) exitWith {false}; +if (!local _unit && {_projectile isKindOf "BulletBase"} && {!(_projectile getShotInfo 4)}) exitWith {}; // 4=shownTracer GVAR(trackedBullets) pushBack [_projectile, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; diff --git a/addons/xm157/functions/fnc_ballistics_calculator.sqf b/addons/xm157/functions/fnc_ballistics_calculator.sqf index 1bf6fb86ad7..46b09170e3b 100644 --- a/addons/xm157/functions/fnc_ballistics_calculator.sqf +++ b/addons/xm157/functions/fnc_ballistics_calculator.sqf @@ -41,7 +41,7 @@ private _barometricPressure = _altitude call EFUNC(weather,calculateBarometricPr private _bulletPos = [0,0,-(_boreHeight / 100)]; private _lastBulletPos = +_bulletPos; -private _bulletVelocity = [0,Cos(_scopeBaseAngle) * _muzzleVelocity,Sin(_scopeBaseAngle) * _muzzleVelocity]; +private _bulletVelocity = [0,cos(_scopeBaseAngle) * _muzzleVelocity,sin(_scopeBaseAngle) * _muzzleVelocity]; private _gravity = [-sin (_bank) * cos(_scopeBaseAngle + _inclinationAngle) * -GRAVITY, sin(_scopeBaseAngle + _inclinationAngle) * -GRAVITY, cos (_bank) * cos(_scopeBaseAngle + _inclinationAngle) * -GRAVITY]; diff --git a/addons/xm157/functions/fnc_keyPress.sqf b/addons/xm157/functions/fnc_keyPress.sqf index 3a9dd53a269..684fdedefd2 100644 --- a/addons/xm157/functions/fnc_keyPress.sqf +++ b/addons/xm157/functions/fnc_keyPress.sqf @@ -23,7 +23,7 @@ if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) if !(ACE_player call CBA_fnc_canUseWeapon) exitWith { false }; if (currentMuzzle ACE_player != currentWeapon ACE_player) exitWith { false }; -private _display = uinamespace getVariable [QGVAR(display), displayNull]; +private _display = uiNamespace getVariable [QGVAR(display), displayNull]; if (isNull _display) exitWith { ERROR("keyPress-no display"); false }; if (_keyDown) then { playSound QGVAR(click); }; diff --git a/addons/xm157/functions/fnc_weaponInfo_onLoad.sqf b/addons/xm157/functions/fnc_weaponInfo_onLoad.sqf index dfefca30d43..e490c6e14d0 100644 --- a/addons/xm157/functions/fnc_weaponInfo_onLoad.sqf +++ b/addons/xm157/functions/fnc_weaponInfo_onLoad.sqf @@ -18,7 +18,7 @@ params ["_display"]; TRACE_1("weaponInfo_onLoad",_display); -uinamespace setVariable [QGVAR(display), _display]; +uiNamespace setVariable [QGVAR(display), _display]; [_display, true] call cba_optics_fnc_loadScriptedOptic; // pass thru to cba diff --git a/addons/yardage450/functions/fnc_acquireTarget.sqf b/addons/yardage450/functions/fnc_acquireTarget.sqf index d5aea3a800f..88f85f29cc3 100644 --- a/addons/yardage450/functions/fnc_acquireTarget.sqf +++ b/addons/yardage450/functions/fnc_acquireTarget.sqf @@ -45,7 +45,7 @@ GVAR(distanceIndex) = -1; private _range = (_min + _max) / 2; if (_range >= MIN_DISTANCE && _range <= MAX_DISTANCE) then { GVAR(targetAcquired) = true; - GVAR(targetRangeText) = Str(round(_range)); + GVAR(targetRangeText) = str(round(_range)); }; }; }; diff --git a/addons/zeus/functions/fnc_bi_moduleArsenal.sqf b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf index 8dd5f269296..22b7c37db88 100644 --- a/addons/zeus/functions/fnc_bi_moduleArsenal.sqf +++ b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf @@ -19,17 +19,18 @@ */ params ["_logic", "", "_activated"]; +// IGNORE_PRIVATE_WARNING["_error", "_unit"]; if (_activated && local _logic) then { - _unit = _logic getvariable ["bis_fnc_curatorAttachObject_object",objnull]; + _unit = _logic getVariable ["bis_fnc_curatorAttachObject_object",objNull]; //--- Check if the unit is suitable _error = ""; switch true do { - case (isnull _unit): {_error = localize "str_a3_BIS_fnc_showCuratorFeedbackMessage_506";}; + case (isNull _unit): {_error = localize "str_a3_BIS_fnc_showCuratorFeedbackMessage_506";}; case !(alive _unit): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorDead";}; - case (isnull group _unit || !(side group _unit in [east,west,resistance,civilian])): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorBrain";}; - case (!isNull objectParent _unit || effectivecommander _unit != _unit): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorVehicle";}; + case (isNull group _unit || !(side group _unit in [east,west,resistance,civilian])): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorBrain";}; + case (!isNull objectParent _unit || effectiveCommander _unit != _unit): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorVehicle";}; }; if (_error == "") then { @@ -51,10 +52,10 @@ if (_activated && local _logic) then { } else { if !(isPlayer _unit) then { - ([] call bis_fnc_rscLayer) cuttext ["","black out",0.5]; + ([] call bis_fnc_rscLayer) cutText ["","black out",0.5]; ["#(argb,8,8,3)color(0,0,0,1)",false,nil,0,[0.5,0]] call bis_fnc_textTiles; ["Open",[true,nil,_unit]] call bis_fnc_arsenal; - ([] call bis_fnc_rscLayer) cuttext ["","plain"]; + ([] call bis_fnc_rscLayer) cutText ["","plain"]; } else { [objNull, localize "str_a3_BIS_fnc_moduleArsenal_errorDead"] call bis_fnc_showCuratorFeedbackMessage; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index cdc4d35b648..69852fe71ff 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -20,37 +20,40 @@ */ params ["_logic", "_units", "_activated"]; +// IGNORE_PRIVATE_WARNING["_logic", "_ownerVarArray", "_player", "_addonsList", "_serverCommand", "_isAdmin", "_addons"]; +// IGNORE_PRIVATE_WARNING["_adminVar", "_forced", "_addonsType", "_name", "_forced", "_addonsType", "_letters", "_isCurator"]; +// IGNORE_PRIVATE_WARNING["_ownerUID", "_birdType", "_bird", "_cfgPatches", "_ownerVar", "_paramAddons", "_respawn", "_class"]; if (_activated) then { // Terminate when not created on the server - if (!isServer && local _logic && isnull (getassignedcuratorunit _logic)) exitwith { - [format ["%1 is trying to create curator logic ModuleCurator_F",profilename],"bis_fnc_error",false] call bis_fnc_mp; - deletevehicle _logic; + if (!isServer && local _logic && isNull (getAssignedCuratorUnit _logic)) exitWith { + [format ["%1 is trying to create curator logic ModuleCurator_F",profileName],"bis_fnc_error",false] call bis_fnc_mp; + deleteVehicle _logic; }; // Get curator owner - _ownerVar = _logic getvariable ["owner",""]; - _ownerUID = parsenumber _ownerVar; - if (cheatsenabled) then { - _ownerVarArray = toarray _ownerVar; + _ownerVar = _logic getVariable ["owner",""]; + _ownerUID = parseNumber _ownerVar; + if (cheatsEnabled) then { + _ownerVarArray = toArray _ownerVar; _ownerVarArray resize 3; - if (tostring _ownerVarArray == "DEV") then {_ownerUID = 1;}; + if (toString _ownerVarArray == "DEV") then {_ownerUID = 1;}; }; - if (_ownerVar == "" && !ismultiplayer) then { + if (_ownerVar == "" && !isMultiplayer) then { ["Curator owner not defined, player used instead in singleplayer."] call bis_fnc_error; _ownerVar = player call bis_fnc_objectvar; }; - if (_ownerUID > 0 && !ismultiplayer) then { + if (_ownerUID > 0 && !isMultiplayer) then { _ownerVar = player call bis_fnc_objectvar; }; _isAdmin = _ownerVar == "#adminLogged" || _ownerVar == "#adminVoted"; // Wipe out the variable so clients can't access it - _logic setvariable ["owner",nil]; + _logic setVariable ["owner",nil]; // Server - if (isserver) then { + if (isServer) then { // Prepare admin variable _adminVar = ""; @@ -58,25 +61,25 @@ if (_activated) then { _letters = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]; _adminVar = "admin_"; for "_i" from 0 to 9 do {_adminVar = _adminVar + selectRandom _letters}; - _logic setvariable ["adminVar",_adminVar,true]; + _logic setVariable ["adminVar",_adminVar,true]; }; // Get allowed addons - _addonsType = _logic getvariable ["Addons",2]; + _addonsType = _logic getVariable ["Addons",2]; _addons = []; switch _addonsType do { // All (including unofficial ones) case 3: { - _cfgPatches = configfile >> "cfgpatches"; + _cfgPatches = configFile >> "cfgpatches"; for "_i" from 0 to (count _cfgPatches - 1) do { _class = _cfgPatches select _i; - if (isclass _class) then {_addons set [count _addons,configname _class];}; + if (isClass _class) then {_addons set [count _addons,configName _class];}; }; // Modified by ace_zeus - bis_fnc_activateaddons will error if time > 0 so only call if at start if (time <= 0) then { _addons call bis_fnc_activateaddons; }; - removeallcuratoraddons _logic; - _logic addcuratoraddons _addons; + removeAllCuratorAddons _logic; + _logic addCuratorAddons _addons; }; // All active @@ -86,74 +89,74 @@ if (_activated) then { case 1: { _addonsList = []; { - _addonsList = _addonsList + (unitaddons typeof _x); - } foreach (entities "all"); - removeallcuratoraddons _logic; - _logic addcuratoraddons _addonsList; + _addonsList = _addonsList + (unitAddons typeOf _x); + } forEach (entities "all"); + removeAllCuratorAddons _logic; + _logic addCuratorAddons _addonsList; }; // None case 0: { - removeallcuratoraddons _logic; + removeAllCuratorAddons _logic; }; }; // Handle ownership [_logic,_ownerVar,_ownerUID,_adminVar] spawn { - scriptname "BIS_fnc_moduleCurator: Owner"; + scriptName "BIS_fnc_moduleCurator: Owner"; params ["_logic", "_ownerVar", "_ownerUID", "_adminVar"]; if (_adminVar != "") then {_ownerVar = _adminVar;}; - _forced = _logic getvariable ["forced",0] > 0; - _name = _logic getvariable ["name",""]; + _forced = _logic getVariable ["forced",0] > 0; + _name = _logic getVariable ["name",""]; if (_name == "") then {_name = localize "STR_A3_curator";}; // Wait until mission starts waitUntil {time > 0}; // NOTE: DO NOT CHANGE TO CBA_missionTime, IT BREAKS THE MODULE // Refresh addon list, so it's broadcasted to clients - _addons = curatoraddons _logic; + _addons = curatorAddons _logic; removeAllCuratorAddons _logic; - _logic addcuratoraddons _addons; + _logic addCuratorAddons _addons; while {true} do { // Wait for player to become Zeus switch true do { case (_ownerUID > 0): { - waituntil { + waitUntil { sleep 0.01; - {getplayeruid _x == _ownerVar} count playableunits > 0 || isnull _logic + {getPlayerUID _x == _ownerVar} count playableUnits > 0 || isNull _logic }; }; default { - waituntil {isplayer (missionnamespace getvariable [_ownerVar,objnull]) || isnull _logic}; + waitUntil {isPlayer (missionNamespace getVariable [_ownerVar,objNull]) || isNull _logic}; }; }; - if (isnull _logic) exitwith {}; + if (isNull _logic) exitWith {}; // Assign - _player = objnull; + _player = objNull; switch true do { case (_ownerUID > 0): { { - if (getplayeruid _x == _ownerVar) exitwith {_player = _x;}; - } foreach playableunits; + if (getPlayerUID _x == _ownerVar) exitWith {_player = _x;}; + } forEach playableUnits; }; default { - _player = missionnamespace getvariable [_ownerVar,objnull]; + _player = missionNamespace getVariable [_ownerVar,objNull]; }; }; - waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; - waituntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic}; - if (isnull _logic) exitwith {}; + waitUntil {unassignCurator _logic; isNull (getAssignedCuratorUnit _logic) || isNull _logic}; + waitUntil {_player assignCurator _logic; getAssignedCuratorUnit _logic == _player || isNull _logic}; + if (isNull _logic) exitWith {}; // Add radio channels { - _x radiochanneladd [_player]; - } foreach (_logic getvariable ["channels",[]]); + _x radioChannelAdd [_player]; + } forEach (_logic getVariable ["channels",[]]); // Added by ace_zeus to delay ascension message code private _msgCode = { @@ -162,10 +165,10 @@ if (_activated) then { // Sent notification to all assigned players if ((_logic getVariable ["showNotification",true]) && GVAR(zeusAscension)) then { { - if (isplayer _x) then { + if (isPlayer _x) then { [["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp; }; - } forEach (curatoreditableobjects _logic); + } forEach (curatorEditableObjects _logic); }; }; @@ -184,25 +187,25 @@ if (_activated) then { // Wait for player to stop being Zeus switch true do { case (_ownerUID > 0): { - waituntil { + waitUntil { sleep 0.01; - {getplayeruid _x == _ownerVar} count playableunits == 0 || isnull _logic + {getPlayerUID _x == _ownerVar} count playableUnits == 0 || isNull _logic }; }; default { - waituntil {_player != missionnamespace getvariable [_ownerVar,objnull] || isnull _logic}; + waitUntil {_player != missionNamespace getVariable [_ownerVar,objNull] || isNull _logic}; }; }; - if (isnull _logic) exitwith {}; + if (isNull _logic) exitWith {}; // Add radio channels { - _x radiochannelremove [_player]; - } foreach (_logic getvariable ["channels",[]]); + _x radioChannelRemove [_player]; + } forEach (_logic getVariable ["channels",[]]); // Unassign - waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; - if (isnull _logic) exitwith {}; + waitUntil {unassignCurator _logic; isNull (getAssignedCuratorUnit _logic) || isNull _logic}; + if (isNull _logic) exitWith {}; }; }; @@ -214,17 +217,17 @@ if (_activated) then { // Create bird _birdType = _logic getVariable ["birdType","eagle_f"]; if (_birdType != "") then { - _bird = createvehicle [_birdType,[100,100,100],[],0,"none"]; + _bird = createVehicle [_birdType,[100,100,100],[],0,"none"]; _logic setVariable ["bird",_bird,true]; }; // Locality changed - _logic addeventhandler [ - "local", + _logic addEventHandler [ + "Local", { _logic = _this select 0; - _bird = _logic getVariable ["bird",objnull]; - _bird setowner owner _logic; + _bird = _logic getVariable ["bird",objNull]; + _bird setOwner owner _logic; } ]; }; @@ -240,70 +243,70 @@ if (_activated) then { // Activated all future addons _addons = []; { - if (typeof _x == "ModuleCuratorAddAddons_F") then { - _paramAddons = call compile ("[" + (_x getvariable ["addons",""]) + "]"); + if (typeOf _x == "ModuleCuratorAddAddons_F") then { + _paramAddons = call compile ("[" + (_x getVariable ["addons",""]) + "]"); { if !(_x in _addons) then {_addons set [count _addons,_x];}; { if !(_x in _addons) then {_addons set [count _addons,_x];}; - } foreach (unitaddons _x); - } foreach _paramAddons; + } forEach (unitAddons _x); + } forEach _paramAddons; }; - } foreach (synchronizedobjects _logic); + } forEach (synchronizedObjects _logic); // Modified by ace_zeus - bis_fnc_activateaddons will error if time > 0 so only call if at start if (time <= 0) then { _addons call bis_fnc_activateaddons; }; }; // Player - if (hasinterface) then { - waituntil {local player}; + if (hasInterface) then { + waitUntil {local player}; _serverCommand = ["#kick", "#shutdown"] select (_ownerVar == "#adminLogged"); // Black effect until the interface is open - _forced = _logic getvariable ["forced",0] > 0; + _forced = _logic getVariable ["forced",0] > 0; if (_forced) then { _isCurator = switch true do { case (_ownerUID > 0): { - getplayeruid player == _ownerVar + getPlayerUID player == _ownerVar }; case (_isAdmin): { - isserver || servercommandavailable _serverCommand + isServer || serverCommandAvailable _serverCommand }; default { - player == missionnamespace getvariable [_ownerVar,objnull] + player == missionNamespace getVariable [_ownerVar,objNull] }; }; if (_isCurator) then { [true,true] spawn bis_fnc_forceCuratorInterface; - ("RscDisplayCurator" call bis_fnc_rscLayer) cuttext ["","black in",1e10]; + ("RscDisplayCurator" call bis_fnc_rscLayer) cutText ["","black in",1e10]; }; }; // Check if player is server admin if (_isAdmin) then { - _adminVar = _logic getvariable ["adminVar",""]; - _logic setvariable ["adminVar",nil]; - if (isserver) then { + _adminVar = _logic getVariable ["adminVar",""]; + _logic setVariable ["adminVar",nil]; + if (isServer) then { // Host - missionnamespace setvariable [_adminVar,player]; + missionNamespace setVariable [_adminVar,player]; } else { // Client [_logic,_adminVar,_serverCommand] spawn { - scriptname "BIS_fnc_moduleCurator: Admin check"; + scriptName "BIS_fnc_moduleCurator: Admin check"; _logic = _this select 0; _adminVar = _this select 1; _serverCommand = _this select 2; while {true} do { - waituntil {sleep 0.1; servercommandavailable _serverCommand}; - missionnamespace setvariable [_adminVar,player]; - publicvariable _adminVar; - _respawn = player addeventhandler ["respawn",format ["%1 = _this select 0; publicvariable '%1';",_adminVar]]; - - waituntil {sleep 0.1; !servercommandavailable _serverCommand}; - missionnamespace setvariable [_adminVar,objnull]; - publicvariable _adminVar; - player removeeventhandler ["respawn",_respawn]; + waitUntil {sleep 0.1; serverCommandAvailable _serverCommand}; + missionNamespace setVariable [_adminVar,player]; + publicVariable _adminVar; + _respawn = player addEventHandler ["Respawn",format ["%1 = _this select 0; publicvariable '%1';",_adminVar]]; + + waitUntil {sleep 0.1; !serverCommandAvailable _serverCommand}; + missionNamespace setVariable [_adminVar,objNull]; + publicVariable _adminVar; + player removeEventHandler ["Respawn",_respawn]; }; }; }; @@ -312,10 +315,10 @@ if (_activated) then { [_logic] spawn { _logic = _this select 0; sleep 1; - waituntil {alive player}; + waitUntil {alive player}; // Show warning when Zeus key is not assigned - if (count (actionkeys "curatorInterface") == 0) then { + if (count (actionKeys "curatorInterface") == 0) then { [ format [ localize "str_a3_cfgvehicles_modulecurator_f_keyNotAssigned", @@ -326,13 +329,13 @@ if (_activated) then { // Show hint about pinging for players if ( - isnil {profilenamespace getvariable "bis_fnc_curatorPinged_done"} + isNil {profileNamespace getVariable "bis_fnc_curatorPinged_done"} && {isTutHintsEnabled} && - {isnull getassignedcuratorlogic player} + {isNull getAssignedCuratorLogic player} && - {player in curatoreditableobjects _logic} + {player in curatorEditableObjects _logic} ) then { sleep 0.5; [["Curator","Ping"]] call bis_fnc_advHint; @@ -340,16 +343,16 @@ if (_activated) then { }; // Add local event handlers - _logic addeventhandler ["curatorFeedbackMessage",{_this call bis_fnc_showCuratorFeedbackMessage;}]; - _logic addeventhandler ["curatorPinged",{_this call bis_fnc_curatorPinged;}]; - _logic addeventhandler ["curatorObjectPlaced",{_this call bis_fnc_curatorObjectPlaced;}]; - _logic addeventhandler ["curatorObjectEdited",{_this call bis_fnc_curatorObjectEdited;}]; - _logic addeventhandler ["curatorWaypointPlaced",{_this call bis_fnc_curatorWaypointPlaced;}]; - - _logic addeventhandler ["curatorObjectDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; - _logic addeventhandler ["curatorGroupDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; - _logic addeventhandler ["curatorWaypointDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; - _logic addeventhandler ["curatorMarkerDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; + _logic addEventHandler ["CuratorFeedbackMessage",{_this call bis_fnc_showCuratorFeedbackMessage;}]; + _logic addEventHandler ["CuratorPinged",{_this call bis_fnc_curatorPinged;}]; + _logic addEventHandler ["CuratorObjectPlaced",{_this call bis_fnc_curatorObjectPlaced;}]; + _logic addEventHandler ["CuratorObjectEdited",{_this call bis_fnc_curatorObjectEdited;}]; + _logic addEventHandler ["CuratorWaypointPlaced",{_this call bis_fnc_curatorWaypointPlaced;}]; + + _logic addEventHandler ["CuratorObjectDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; + _logic addEventHandler ["CuratorGroupDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; + _logic addEventHandler ["CuratorWaypointDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; + _logic addEventHandler ["CuratorMarkerDoubleClicked",{(_this select 1) call bis_fnc_showCuratorAttributes;}]; player call bis_fnc_curatorRespawn; }; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 0bd8ba574ff..7abbbc4cb6b 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -19,20 +19,21 @@ */ params ["_logic", "_units", "_activated"]; +// IGNORE_PRIVATE_WARNING["_explosive", "_side"]; if (_activated) then { - _explosive = gettext (configOf _logic >> "explosive"); + _explosive = getText (configOf _logic >> "explosive"); if (_explosive != "") then { - _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; - _explosive attachto [_logic]; + _explosive = createVehicle [_explosive,position _logic,[],0,"none"]; + _explosive attachTo [_logic]; // Added by ace_zeus to control if mines are revealed if (GVAR(revealMines) > MINE_REVEAL_NONE) then { //--- Reveal the mine to curator's side { - _side = (getassignedcuratorunit _x) call bis_fnc_objectSide; - _side revealmine _explosive; - } forEach (objectcurators _logic); + _side = (getAssignedCuratorUnit _x) call bis_fnc_objectSide; + _side revealMine _explosive; + } forEach (objectCurators _logic); if (GVAR(revealMines) == MINE_REVEAL_FULL) then { //--- Mark minefields in the map @@ -43,8 +44,8 @@ if (_activated) then { //--- Show hint to curator who placed the object [[["Curator","PlaceMines"],nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",_logic] call bis_fnc_mp; - waituntil {sleep 0.1; isnull _explosive || isnull _logic || !alive _logic}; - if (isnull _logic) then {deletevehicle _explosive;} else {_explosive setdamage 1;}; - deletevehicle _logic; + waitUntil {sleep 0.1; isNull _explosive || isNull _logic || !alive _logic}; + if (isNull _logic) then {deleteVehicle _explosive;} else {_explosive setDamage 1;}; + deleteVehicle _logic; }; }; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index ba30a2eaf44..87c9dbdf431 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -19,30 +19,35 @@ * Public: No */ +// IGNORE_PRIVATE_WARNING["_dir", "_altitude", "_velocity", "_ammo", "_sounds", "_projectile", "_soundSource", "_attach", "_posAmmo"]; +// IGNORE_PRIVATE_WARNING["_shakeStrength", "_sound", "_dirDiff", "_repeat", "_soundSourceClass", "_hint", "_posNew", "_activated"]; +// IGNORE_PRIVATE_WARNING["_side", "_fnc_playRadio", "_delay", "_logic", "_radio", "_pos", "_cfgAmmo", "_shakeRadius"]; +// IGNORE_PRIVATE_WARNING["_units", "_sides", "_simulation"]; + _logic = _this select 0; _units = _this select 1; _activated = _this select 2; -if ({local _x} count (objectcurators _logic) > 0) then { +if ({local _x} count (objectCurators _logic) > 0) then { //--- Reveal the circle to curators - _logic hideobject false; - _logic setpos position _logic; + _logic hideObject false; + _logic setPos position _logic; }; -if !(isserver) exitwith {}; +if !(isServer) exitWith {}; if (_activated) then { - _ammo = _logic getvariable ["type",gettext (configOf _logic >> "ammo")]; + _ammo = _logic getVariable ["type",getText (configOf _logic >> "ammo")]; if (_ammo != "") then { - _cfgAmmo = configfile >> "cfgammo" >> _ammo; + _cfgAmmo = configFile >> "cfgammo" >> _ammo; //if !(isclass _cfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; // It seems BI broke this part... // _dirVar = _fnc_scriptname + typeof _logic; // _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction - _pos = getposatl _logic; + _pos = getPosATL _logic; _posAmmo = +_pos; _posAmmo set [2,0]; _dir = direction _logic; - _simulation = toLowerANSI gettext (configfile >> "cfgammo" >> _ammo >> "simulation"); + _simulation = toLowerANSI getText (configFile >> "cfgammo" >> _ammo >> "simulation"); _altitude = 0; _velocity = []; _attach = false; @@ -58,7 +63,7 @@ if (_activated) then { _altitude = 1000; _velocity = [0,0,-100]; _radio = "SentGenIncoming"; - _sounds = if (getnumber (_cfgAmmo >> "hit") < 200) then {["mortar1","mortar2"]} else {["shell1","shell2","shell3","shell4"]}; + _sounds = if (getNumber (_cfgAmmo >> "hit") < 200) then {["mortar1","mortar2"]} else {["shell1","shell2","shell3","shell4"]}; _sound = selectRandom _sounds; _hint = ["Curator","PlaceOrdnance"]; _shakeStrength = 0.01; @@ -66,7 +71,7 @@ if (_activated) then { }; case "shotsubmunitions": { _posAmmo = [_posAmmo,500,_dir + 180] call bis_fnc_relpos; - _altitude = 1000 - ((getterrainheightasl _posAmmo) - (getterrainheightasl _pos)); + _altitude = 1000 - ((getTerrainHeightASL _posAmmo) - (getTerrainHeightASL _pos)); _posAmmo set [2,_altitude]; _velocity = [sin _dir * 68,cos _dir * 68,-100]; _radio = "SentGenIncoming"; @@ -102,33 +107,28 @@ if (_activated) then { }; }; }; - } foreach allPlayers; + } forEach allPlayers; }; }; - if (count _hint > 0 && {count objectcurators _logic > 0}) then { - [[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectcurators _logic] call bis_fnc_mp; + if (count _hint > 0 && {count objectCurators _logic > 0}) then { + [[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectCurators _logic] call bis_fnc_mp; }; if (count _velocity == 3) then { - _altitude = (_logic getvariable ["altitude",_altitude]) call BIS_fnc_parseNumberSafe; - _radio = _logic getvariable ["radio",_radio]; + _altitude = (_logic getVariable ["altitude",_altitude]) call BIS_fnc_parseNumberSafe; + _radio = _logic getVariable ["radio",_radio]; //--- Create projectile _posAmmo set [2,_altitude]; - _projectile = createvehicle [_ammo,_posAmmo,[],0,"none"]; - _projectile setpos _posAmmo; - _projectile setvelocity _velocity; - if (_attach) then {_projectile attachto [_logic,[0,0,_altitude]];}; - - // Added by ace_zeus for ace_frag compatibility - if (!isNil QEFUNC(frag,addPfhRound)) then { - [objNull, _ammo, _projectile, true] call EFUNC(frag,addPfhRound); - }; + _projectile = createVehicle [_ammo,_posAmmo,[],0,"none"]; + _projectile setPos _posAmmo; + _projectile setVelocity _velocity; + if (_attach) then {_projectile attachTo [_logic,[0,0,_altitude]];}; //--- Play sound if (_sound != "") then {[[_logic,_sound,"say3D"],"bis_fnc_sayMessage"] call bis_fnc_mp;}; //--- Create sound source - _soundSource = if (_soundSourceClass != "") then {createSoundSource [_soundSourceClass,_pos,[],0]} else {objnull}; + _soundSource = if (_soundSourceClass != "") then {createSoundSource [_soundSourceClass,_pos,[],0]} else {objNull}; // Added by ace_zeus to toggle ordnance radio message if (GVAR(radioOrdnance)) then { @@ -138,54 +138,54 @@ if (_activated) then { //--- Update if (_attach) then { - waituntil { - _soundSource setposatl getposatl _projectile; + waitUntil { + _soundSource setPosATL getPosATL _projectile; sleep 1; - isnull _projectile || isnull _logic + isNull _projectile || isNull _logic }; } else { - waituntil { - _soundSource setposatl getposatl _projectile; + waitUntil { + _soundSource setPosATL getPosATL _projectile; - if (getposatl _logic distance _pos > 0 || direction _logic != _dir) then { - _posNew = getposasl _logic; + if (getPosATL _logic distance _pos > 0 || direction _logic != _dir) then { + _posNew = getPosASL _logic; _dirDiff = direction _logic - _dir; - _posNew = [_posNew,[getposasl _projectile,_pos] call bis_fnc_distance2d,direction _logic + 180] call bis_fnc_relpos; - _posNew set [2,getposasl _projectile select 2]; - _projectile setvelocity ([velocity _projectile,-_dirDiff] call bis_fnc_rotatevector2d); - _projectile setposasl _posNew; - _pos = getposatl _logic; + _posNew = [_posNew,[getPosASL _projectile,_pos] call bis_fnc_distance2d,direction _logic + 180] call bis_fnc_relpos; + _posNew set [2,getPosASL _projectile select 2]; + _projectile setVelocity ([velocity _projectile,-_dirDiff] call bis_fnc_rotatevector2d); + _projectile setPosASL _posNew; + _pos = getPosATL _logic; _dir = direction _logic; //missionnamespace setvariable [_dirVar,_dir]; See L37 }; sleep 0.1; - isnull _projectile || isnull _logic + isNull _projectile || isNull _logic }; }; - deletevehicle _projectile; - deletevehicle _soundSource; - if (count objectcurators _logic > 0) then { + deleteVehicle _projectile; + deleteVehicle _soundSource; + if (count objectCurators _logic > 0) then { //--- Delete curator spawned logic if (_shakeStrength > 0) then { if (_simulation == "shotsubmunitions") then {sleep 0.5;}; [[_shakeStrength,0.7,[position _logic,_shakeRadius]],"bis_fnc_shakeCuratorCamera"] call bis_fnc_mp; }; - deletevehicle _logic; + deleteVehicle _logic; } else { //--- Repeat to achieve permanent effect - _repeat = _logic getvariable ["repeat",0] > 0; + _repeat = _logic getVariable ["repeat",0] > 0; if (_repeat) then { [_logic,_units,_activated] call bis_fnc_moduleprojectile; } else { - deletevehicle _logic; + deleteVehicle _logic; }; }; } else { - deletevehicle _logic; + deleteVehicle _logic; }; } else { - ["Cannot create projectile, 'ammo' config attribute is missing in %1",typeof _logic] call bis_fnc_error; + ["Cannot create projectile, 'ammo' config attribute is missing in %1",typeOf _logic] call bis_fnc_error; }; }; diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index 2aa438be532..89a5ddaaf57 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -18,42 +18,45 @@ * Public: No */ +// IGNORE_PRIVATE_WARNING["_logic", "_units", "_activated", "_mouseOver", "_error", "_unit", "_color"]; +// IGNORE_PRIVATE_WARNING["_curator", "_blur", "_vehicle", "_cam", "_camPos", "_rating", "_unitPos", "_vehicleRole"]; + _logic = _this select 0; _units = _this select 1; _activated = _this select 2; -if (_activated && local _logic && !isnull curatorcamera) then { +if (_activated && local _logic && !isNull curatorCamera) then { //--- Terminate when remote control is already in progress - if !(isnull (missionnamespace getvariable ["bis_fnc_moduleRemoteControl_unit",objnull])) exitwith {}; + if !(isNull (missionNamespace getVariable ["bis_fnc_moduleRemoteControl_unit",objNull])) exitWith {}; //--- Get unit under cursor - _unit = objnull; - _mouseOver = missionnamespace getvariable ["bis_fnc_curatorObjectPlaced_mouseOver",[""]]; + _unit = objNull; + _mouseOver = missionNamespace getVariable ["bis_fnc_curatorObjectPlaced_mouseOver",[""]]; if ((_mouseOver select 0) == "OBJECT") then {_unit = _mouseOver select 1;}; - _unit = effectivecommander _unit; + _unit = effectiveCommander _unit; //--- Temp owner - private _tempOwner = _unit getvariable ["bis_fnc_moduleRemoteControl_owner", objnull]; + private _tempOwner = _unit getVariable ["bis_fnc_moduleRemoteControl_owner", objNull]; //--- Check if the unit is suitable _error = ""; if !(side group _unit in [east,west,resistance,civilian]) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorEmpty";}; - if (isplayer _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer";}; + if (isPlayer _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer";}; if !(alive _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorDestroyed";}; - if (isnull _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorNull";}; - if (!isnull _tempOwner && {_tempOwner in allPlayers}) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; - if (isuavconnected vehicle _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; + if (isNull _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorNull";}; + if (!isNull _tempOwner && {_tempOwner in allPlayers}) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; + if (isUAVConnected vehicle _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; if (_error == "") then { _unit spawn { - scriptname "bis_fnc_moduleRemoteControl: Loop"; + scriptName "bis_fnc_moduleRemoteControl: Loop"; _unit = _this; _vehicle = vehicle _unit; - _vehicleRole = str assignedvehiclerole _unit; + _vehicleRole = str assignedVehicleRole _unit; bis_fnc_moduleRemoteControl_unit = _unit; - _unit setvariable ["bis_fnc_moduleRemoteControl_owner",player,true]; + _unit setVariable ["bis_fnc_moduleRemoteControl_owner",player,true]; // Added by ace_zeus to toggle remote control wind sound if (GVAR(remoteWind)) then { @@ -61,125 +64,125 @@ if (_activated && local _logic && !isnull curatorcamera) then { [format ["wind%1",ceil random 5],"bis_fnc_playsound"] call bis_fnc_mp; }; - _blur = ppeffectcreate ["RadialBlur",144]; - _blur ppeffectenable true; - _blur ppeffectadjust [0,0,0.3,0.3]; - _blur ppeffectcommit 0; - _blur ppeffectadjust [0.03,0.03,0.1,0.1]; - _blur ppeffectcommit 1; - - _cam = "camera" camcreate getposatl curatorcamera; - _cam cameraeffect ["internal","back"]; - _cam campreparetarget (screentoworld [0.5,0.5]); - _cam camcommitprepared 0; - _cam campreparetarget _unit; - _cam campreparefov 0.1; - _cam camcommitprepared 1; + _blur = ppEffectCreate ["RadialBlur",144]; + _blur ppEffectEnable true; + _blur ppEffectAdjust [0,0,0.3,0.3]; + _blur ppEffectCommit 0; + _blur ppEffectAdjust [0.03,0.03,0.1,0.1]; + _blur ppEffectCommit 1; + + _cam = "camera" camCreate getPosATL curatorCamera; + _cam cameraEffect ["internal","back"]; + _cam camPrepareTarget (screenToWorld [0.5,0.5]); + _cam camCommitPrepared 0; + _cam camPrepareTarget _unit; + _cam camPrepareFov 0.1; + _cam camCommitPrepared 1; sleep 0.75; - ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black out",0.25]; + ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cutText ["","black out",0.25]; sleep 0.25; //--- Wait for interface to close - (finddisplay 312) closedisplay 2; - waituntil {isnull curatorcamera}; + (findDisplay 312) closeDisplay 2; + waitUntil {isNull curatorCamera}; //--- Switch - player remotecontrol _unit; - if (cameraon != _vehicle) then { - _vehicle switchcamera cameraview; + player remoteControl _unit; + if (cameraOn != _vehicle) then { + _vehicle switchCamera cameraView; }; - ppeffectdestroy _blur; - _cam cameraeffect ["terminate","back"]; - camdestroy _cam; + ppEffectDestroy _blur; + _cam cameraEffect ["terminate","back"]; + camDestroy _cam; - _color = ppeffectcreate ["colorCorrections",1896]; - _color ppeffectenable true; - _color ppeffectadjust [1,1,0,[0,0,0,1],[1,1,1,1],[0,0,0,0],[0.9,0.0,0,0,0,0.5,1]]; - _color ppeffectcommit 0; + _color = ppEffectCreate ["colorCorrections",1896]; + _color ppEffectEnable true; + _color ppEffectAdjust [1,1,0,[0,0,0,1],[1,1,1,1],[0,0,0,0],[0.9,0.0,0,0,0,0.5,1]]; + _color ppEffectCommit 0; - _curator = getassignedcuratorlogic player; + _curator = getAssignedCuratorLogic player; [_curator,"curatorObjectRemoteControlled",[_curator,player,_unit,true]] call bis_fnc_callScriptedEventHandler; [["Curator","RemoteControl"],nil,nil,nil,nil,nil,nil,true] call bis_fnc_advHint; sleep 0.3; - _color ppeffectadjust [1,1,0,[0,0,0,1],[1,1,1,1],[0,0,0,0],[0.9,0.85,0,0,0,0.5,1]]; - _color ppeffectcommit 0.3; - ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black in",0.5]; + _color ppEffectAdjust [1,1,0,[0,0,0,1],[1,1,1,1],[0,0,0,0],[0.9,0.85,0,0,0,0.5,1]]; + _color ppEffectCommit 0.3; + ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cutText ["","black in",0.5]; //--- Back to player _vehicle = vehicle _unit; - _vehicleRole = str assignedvehiclerole _unit; + _vehicleRole = str assignedVehicleRole _unit; _rating = rating player; - waituntil { + waitUntil { //--- Refresh when vehicle or vehicle role changes - if ((vehicle _unit != _vehicle || str assignedvehiclerole _unit != _vehicleRole) && {alive _unit}) then { - player remotecontrol _unit; + if ((vehicle _unit != _vehicle || str assignedVehicleRole _unit != _vehicleRole) && {alive _unit}) then { + player remoteControl _unit; _vehicle = vehicle _unit; - _vehicleRole = str assignedvehiclerole _unit; + _vehicleRole = str assignedVehicleRole _unit; }; if (rating player < _rating) then { - player addrating (-rating player + _rating); + player addRating (-rating player + _rating); }; sleep 0.01; - !isnull curatorcamera + !isNull curatorCamera || - {cameraon == vehicle player} + {cameraOn == vehicle player} || {!alive _unit} //--- Also isnull check, objNull is not alive || {!alive player} || - {isnull getassignedcuratorlogic player} + {isNull getAssignedCuratorLogic player} }; - player addrating (-rating player + _rating); - objnull remotecontrol _unit; - _unit setvariable ["bis_fnc_moduleRemoteControl_owner",nil,true]; + player addRating (-rating player + _rating); + objNull remoteControl _unit; + _unit setVariable ["bis_fnc_moduleRemoteControl_owner",nil,true]; if (alive player) then { //--- Death screen if ( - isnull curatorcamera + isNull curatorCamera && - {cameraon != vehicle player} + {cameraOn != vehicle player} && - {!isnull _unit} + {!isNull _unit} && - {!isnull getassignedcuratorlogic player} + {!isNull getAssignedCuratorLogic player} //&& //{(_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull] == player)} ) then { sleep 2; - ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black out",1]; + ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cutText ["","black out",1]; sleep 1; }; - if !(isnull _unit) then { - _unitPos = getposatl _unit; + if !(isNull _unit) then { + _unitPos = getPosATL _unit; _camPos = [_unitPos,10,direction _unit + 180] call bis_fnc_relpos; - _camPos set [2,(_unitPos select 2) + (getterrainheightasl _unitPos) - (getterrainheightasl _camPos) + 10]; + _camPos set [2,(_unitPos select 2) + (getTerrainHeightASL _unitPos) - (getTerrainHeightASL _camPos) + 10]; //[_camPos,_unit] call bis_fnc_setcuratorcamera; - (getassignedcuratorlogic player) setvariable ["bis_fnc_modulecuratorsetcamera_params",[_camPos,_unit]]; + (getAssignedCuratorLogic player) setVariable ["bis_fnc_modulecuratorsetcamera_params",[_camPos,_unit]]; }; sleep 0.1; //--- Engine needs a delay in case controlled unit was deleted - ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black in",1e10]; - opencuratorinterface; - ppeffectdestroy _color; + ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cutText ["","black in",1e10]; + openCuratorInterface; + ppEffectDestroy _color; - waituntil {!isnull curatorcamera}; + waitUntil {!isNull curatorCamera}; } else { - ppeffectdestroy _color; + ppEffectDestroy _color; }; - player switchcamera cameraview; + player switchCamera cameraView; bis_fnc_moduleRemoteControl_unit = nil; - ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cuttext ["","black in",1]; + ("bis_fnc_moduleRemoteCurator" call bis_fnc_rscLayer) cutText ["","black in",1]; [_curator,"curatorObjectRemoteControlled",[_curator,player,_unit,false]] call bis_fnc_callScriptedEventHandler; sleep 0.01; }; } else { - [objnull,_error] call bis_fnc_showCuratorFeedbackMessage; + [objNull,_error] call bis_fnc_showCuratorFeedbackMessage; }; - deletevehicle _logic; + deleteVehicle _logic; }; diff --git a/addons/zeus/functions/fnc_getModuleDestination.sqf b/addons/zeus/functions/fnc_getModuleDestination.sqf index 10d7acae9e0..e18daa2732d 100644 --- a/addons/zeus/functions/fnc_getModuleDestination.sqf +++ b/addons/zeus/functions/fnc_getModuleDestination.sqf @@ -44,7 +44,6 @@ GVAR(moduleDestination_displayEHMouse) = [findDisplay 312, "mouseButtonDown", { if (_mouseButton != 0) exitWith {}; // Only watch for LMB - //IGNORE_PRIVATE_WARNING ["_thisArgs"] _thisArgs params ["_object", "_code"]; // Get mouse position on 2D map or 3D world @@ -67,7 +66,6 @@ GVAR(moduleDestination_displayEHKeyboard) = [findDisplay 312, "KeyDown", { if (_keyCode != 1) exitWith {}; // Only watch for ESC - //IGNORE_PRIVATE_WARNING ["_thisArgs"] _thisArgs params ["_object", "_code"]; // Get mouse position on 2D map or 3D world @@ -88,7 +86,6 @@ GVAR(moduleDestination_displayEHKeyboard) = [findDisplay 312, "KeyDown", { // Add draw EH for the zeus map - draws the 2D icon and line GVAR(moduleDestination_mapDrawEH) = [((findDisplay 312) displayCtrl 50), "draw", { params ["_mapCtrl"]; - //IGNORE_PRIVATE_WARNING ["_thisArgs"] _thisArgs params ["_object", "_text", "_icon", "_color", "_angle"]; private _pos2d = (((findDisplay 312) displayCtrl 50) ctrlMapScreenToWorld getMousePosition); @@ -109,7 +106,7 @@ GVAR(moduleDestination_mapDrawEH) = [((findDisplay 312) displayCtrl 50), "draw", private _mousePosAGL = screenToWorld getMousePosition; [_object, AGLToASL _mousePosAGL] call _drawCode; drawIcon3D [_icon, _color, _mousePosAGL, 1.5, 1.5, _angle, _text]; - drawLine3D [_mousePosAGL, ASLtoAGL (getPosASL _object), _color];; + drawLine3D [_mousePosAGL, ASLToAGL (getPosASL _object), _color];; } else { TRACE_4("cleaning up",_this select 1,GVAR(moduleDestination_displayEHMouse),GVAR(moduleDestination_displayEHKeyboard),GVAR(moduleDestination_mapDrawEH)); (_this select 1) call CBA_fnc_removePerFrameHandler; diff --git a/addons/zeus/functions/fnc_moduleCaptive.sqf b/addons/zeus/functions/fnc_moduleCaptive.sqf index ad359575e96..e16a701f055 100644 --- a/addons/zeus/functions/fnc_moduleCaptive.sqf +++ b/addons/zeus/functions/fnc_moduleCaptive.sqf @@ -29,7 +29,7 @@ if (isNil QEFUNC(captives,setHandcuffed)) then { if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call FUNC(showMessage); } else { - private _unit = effectivecommander (_mouseOver select 1); + private _unit = effectiveCommander (_mouseOver select 1); if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleCargoParadrop.sqf b/addons/zeus/functions/fnc_moduleCargoParadrop.sqf index 2aaffb37964..ed009832756 100644 --- a/addons/zeus/functions/fnc_moduleCargoParadrop.sqf +++ b/addons/zeus/functions/fnc_moduleCargoParadrop.sqf @@ -62,7 +62,7 @@ if ((_vehicle getVariable [QEGVAR(cargo,loaded), []]) isEqualTo []) exitWith { [_group] call CBA_fnc_clearWaypoints; - private _wp = _group addWaypoint [ASLtoAGL _mousePosASL, 0]; + private _wp = _group addWaypoint [ASLToAGL _mousePosASL, 0]; _wp setWaypointType "SCRIPTED"; _wp setWaypointScript QPATHTOF(functions\DOUBLES(fnc,moduleCargoParadropWaypoint).sqf); diff --git a/addons/zeus/functions/fnc_moduleGarrison.sqf b/addons/zeus/functions/fnc_moduleGarrison.sqf index dcebd5f1fbb..50716401f7c 100644 --- a/addons/zeus/functions/fnc_moduleGarrison.sqf +++ b/addons/zeus/functions/fnc_moduleGarrison.sqf @@ -51,7 +51,7 @@ switch (false) do { private _units = units _unit; // Make sure all units are disembarked { - if (vehicle _x != _x && {!isPlayer _x}) then { + if (!isNull objectParent _x && {!isPlayer _x}) then { moveOut _x; }; } forEach _units; diff --git a/addons/zeus/functions/fnc_moduleSetMedic.sqf b/addons/zeus/functions/fnc_moduleSetMedic.sqf index d44dd56e593..2393de0ebfa 100644 --- a/addons/zeus/functions/fnc_moduleSetMedic.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedic.sqf @@ -29,7 +29,7 @@ if !(GETEGVAR(medical,enabled,false)) then { if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call FUNC(showMessage); } else { - private _unit = effectivecommander (_mouseOver select 1); + private _unit = effectiveCommander (_mouseOver select 1); if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleSuicideBomber.sqf b/addons/zeus/functions/fnc_moduleSuicideBomber.sqf index 8425ff15485..6db261da534 100644 --- a/addons/zeus/functions/fnc_moduleSuicideBomber.sqf +++ b/addons/zeus/functions/fnc_moduleSuicideBomber.sqf @@ -30,8 +30,9 @@ #endif TRACE_1("params",_this); +params ["_unit", "", "", "", "_autoSeek"]; -if (isNull (_this select 0)) exitWith {}; +if (isNull _unit) exitWith {}; // Prevent another suicide bomber module being attached _unit setVariable [QGVAR(suicideBomber), true, true]; diff --git a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf index a624b7dded6..2860f624f22 100644 --- a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf +++ b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf @@ -59,7 +59,7 @@ if ([_unit] call EFUNC(common,isPlayer)) exitWith { } forEach getArtilleryAmmo [_vehicle]; TRACE_1("getArtilleryAmmo",_artilleryMag); if (_artilleryMag == "") exitWith {_targetASL = [];}; - private _eta = _vehicle getArtilleryETA [ASLtoAGL _targetASL, _artilleryMag]; + private _eta = _vehicle getArtilleryETA [ASLToAGL _targetASL, _artilleryMag]; TRACE_1("getArtilleryETA",_eta); if (_eta < 0) exitWith { [ELSTRING(Interaction,NotInRange)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf b/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf index f09211b034b..39efec6d921 100644 --- a/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf +++ b/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf @@ -21,7 +21,7 @@ params ["_unit", "_targetASL", "_artilleryMag"]; TRACE_4("moduleSuppressiveFireLocal",_unit,local _unit,_targetASL,_artilleryMag); if (_artilleryMag != "") exitWith { - (vehicle _unit) doArtilleryFire [ASLtoAGL _targetASL, _artilleryMag, 4]; + (vehicle _unit) doArtilleryFire [ASLToAGL _targetASL, _artilleryMag, 4]; TRACE_3("doArtilleryFire",_unit,_targetASL,_artilleryMag); }; diff --git a/addons/zeus/functions/fnc_moduleSurrender.sqf b/addons/zeus/functions/fnc_moduleSurrender.sqf index 07517d7e710..b8071a8cd52 100644 --- a/addons/zeus/functions/fnc_moduleSurrender.sqf +++ b/addons/zeus/functions/fnc_moduleSurrender.sqf @@ -29,7 +29,7 @@ if (isNil QEFUNC(captives,setSurrendered)) then { if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call FUNC(showMessage); } else { - private _unit = effectivecommander (_mouseOver select 1); + private _unit = effectiveCommander (_mouseOver select 1); if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index 7eede3cdece..7ca0a824c2d 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -29,7 +29,7 @@ if (isNil QEFUNC(medical,setUnconscious)) then { if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call FUNC(showMessage); } else { - private _unit = effectivecommander (_mouseOver select 1); + private _unit = effectiveCommander (_mouseOver select 1); if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_ui_globalSetSkill.sqf b/addons/zeus/functions/fnc_ui_globalSetSkill.sqf index 5a7c5fc5e03..1586ce2f460 100644 --- a/addons/zeus/functions/fnc_ui_globalSetSkill.sqf +++ b/addons/zeus/functions/fnc_ui_globalSetSkill.sqf @@ -47,7 +47,7 @@ private _fnc_sliderMove = { (_display displayCtrl 16189) cbSetChecked (GVAR(GlobalSkillAI) select 5); private _fnc_onUnload = { - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; deleteVehicle _logic; @@ -57,7 +57,7 @@ private _fnc_onConfirm = { params [["_ctrlButtonOK", controlNull, [controlNull]]]; TRACE_1("_fnc_onConfirm params",_this); - private _display = ctrlparent _ctrlButtonOK; + private _display = ctrlParent _ctrlButtonOK; if (isNull _display) exitWith {}; GVAR(GlobalSkillAI) = [ diff --git a/addons/zeus/functions/fnc_ui_groupSide.sqf b/addons/zeus/functions/fnc_ui_groupSide.sqf index 110e2e302da..9c243d5642a 100644 --- a/addons/zeus/functions/fnc_ui_groupSide.sqf +++ b/addons/zeus/functions/fnc_ui_groupSide.sqf @@ -105,7 +105,7 @@ private _fnc_onSelection = { } forEach IDCs; private _fnc_onUnload = { - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; if (_this select 1 == 2) then { @@ -116,10 +116,10 @@ private _fnc_onUnload = { private _fnc_onConfirm = { params ["_ctrlButtonOK"]; - private _display = ctrlparent _ctrlButtonOK; + private _display = ctrlParent _ctrlButtonOK; if (isNull _display) exitWith {}; - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; private _unit = effectiveCommander (attachedTo _logic); diff --git a/addons/zeus/functions/fnc_ui_setEngineer.sqf b/addons/zeus/functions/fnc_ui_setEngineer.sqf index 3f008403cc7..e19b04c04c0 100644 --- a/addons/zeus/functions/fnc_ui_setEngineer.sqf +++ b/addons/zeus/functions/fnc_ui_setEngineer.sqf @@ -64,7 +64,7 @@ private _fnc_onConfirm = { private _display = ctrlParent _ctrlButtonOK; if (isNull _display) exitWith {}; - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; private _value = lbCurSel (_display displayCtrl 86947); diff --git a/addons/zeus/functions/fnc_ui_spectator.sqf b/addons/zeus/functions/fnc_ui_spectator.sqf index fe9b4a36687..04d2a067630 100644 --- a/addons/zeus/functions/fnc_ui_spectator.sqf +++ b/addons/zeus/functions/fnc_ui_spectator.sqf @@ -164,7 +164,7 @@ private _fnc_onVisionSelection = { params ["_ctrl", "_state"]; private _display = ctrlParent _ctrl; - if (isNull _display) exitwith {}; + if (isNull _display) exitWith {}; // Convert to boolean since EH returns state as 0 or 1 private _state = [false, true] select _state; diff --git a/addons/zeus/functions/fnc_ui_suicideBomber.sqf b/addons/zeus/functions/fnc_ui_suicideBomber.sqf index 26184518710..ab74b398745 100644 --- a/addons/zeus/functions/fnc_ui_suicideBomber.sqf +++ b/addons/zeus/functions/fnc_ui_suicideBomber.sqf @@ -65,7 +65,7 @@ private _fnc_onSelection = { params [["_activeCtrl", controlNull, [controlNull]]]; private _display = ctrlParent _activeCtrl; - if (isNUll _display) exitWith {}; + if (isNull _display) exitWith {}; // Update button colours and scales { diff --git a/addons/zeus/functions/fnc_ui_teleportPlayers.sqf b/addons/zeus/functions/fnc_ui_teleportPlayers.sqf index b7aab411268..9d32d8cfc02 100644 --- a/addons/zeus/functions/fnc_ui_teleportPlayers.sqf +++ b/addons/zeus/functions/fnc_ui_teleportPlayers.sqf @@ -66,7 +66,7 @@ private _fnc_onKeyUp = { private _fnc_onUnload = { params ["_display"]; - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; // Store checkbox value for reopening @@ -76,10 +76,10 @@ private _fnc_onUnload = { private _fnc_onConfirm = { params [["_ctrlButtonOK", controlNull, [controlNull]]]; - private _display = ctrlparent _ctrlButtonOK; + private _display = ctrlParent _ctrlButtonOK; if (isNull _display) exitWith {}; - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; private _lb = _display displayCtrl 16189; diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 7a285f2d6a8..b970d75b64b 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -1779,7 +1779,7 @@ Explosionsgröße Robbanásméret Dimensione dell'Esplosione - 爆発サイズ + 爆発の大きさ 폭발 크기 Rozmiar wybuchu Tamanho da Explosão @@ -2017,6 +2017,7 @@ Erzwingt die Zuschauer-Ansicht und verhindert dass der Spieler sie mit der Esc-Taste schließen kann Forza l'interfaccia di spettatore, impedendo al giocatore di chiuderla con il tasto Esc Force le mode spectateur en empêchant le joueur de la fermer avec la touche Echap. + Fuerza la interfaz del espectador a prevenir al jugador de cerrarla pulsando la tecla de Escape Hide player @@ -2026,6 +2027,7 @@ Spieler ausblenden Nascondi giocatore Cacher le joueur + Ocultar jugador Hides the player by making them invisible, invulnerable, muted, and removing them from their group @@ -2035,6 +2037,7 @@ Blendet den Spieler aus, macht ihn unsichtbar, unverwundbar, stumm und entfernt ihn von seiner Gruppe Nasconde il giocatore, rendendolo invisibile, invulnerabile, muto e lo rimuove dal proprio gruppo Cache le joueur en le rendant invisible, invulnérable, muet et en le retirant de son groupe. + Oculta al jugador haciéndolo invisible, invulnerable, silenciado, y eliminándole del grupo Sets the sides that are available to spectate @@ -2044,6 +2047,7 @@ Bestimmt die Seiten denen man zuschauen kann Imposta le fazioni che lo spettatore può osservare Définit les côtés disponibles pour le mode spectateur + Establece los bandos que tienen disponible ser espectador White Hot @@ -2053,6 +2057,7 @@ Weiß-Schwarz Bianco-caldo Blanc-noir + Blanco Caliente Black Hot @@ -2062,6 +2067,7 @@ Schwarz-Weiß Nero-caldo Noir et blanc + Negro Caliente Toggle All @@ -2071,6 +2077,7 @@ Alle wechseln Cambia tutti Tout afficher + Alternar todo diff --git a/docs/README_DE.md b/docs/README_DE.md index 160fb111b23..beb9467ab9e 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -48,7 +48,7 @@ Die Mod ist **modular aufgebaut**. Beinahe jede PBO kann entfernt werden, sodass - Tragen und Ziehen - Waffen und Fahrzeuge tragen die Namen ihrer Vorbilder aus der echten Welt - Ein Feuerleitsystem (FLS) für Hubschrauber und Panzer -- Viele Funktionen werden in C/C++ Erweiterungen berechnet +- Viele Funktionen werden in Rust Erweiterungen berechnet - Rückstrahlzonen- und Überdrucksimulation - Einwegwaffen - Realistische G-Kräfte diff --git a/docs/README_PL.md b/docs/README_PL.md index b1917f4080e..717ea01a0fe 100644 --- a/docs/README_PL.md +++ b/docs/README_PL.md @@ -43,7 +43,7 @@ Modyfikacja ta jest **budowana modułowo**, dzięki temu prawie każdy dostarczo - Przeciąganie i przenoszenie - Realistyczne nazwy pojazdów i broni - System kontroli ognia (SKO) dla pojazdów opancerzonych oraz śmigłowców -- Realistyczna balistyka/SKO obliczana w rozszerzeniach C/C++ +- Realistyczna balistyka/SKO obliczana w rozszerzeniach Rust - Symulacja strefy backblastu i podciśnienia - Jednorazowe wyrzutnie - Realistyczne siły G diff --git a/docs/_config.yml b/docs/_config.yml index ee7822969d6..8e9cdbf50bf 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -8,9 +8,9 @@ ace: githubUrl: https://github.com/acemod/ACE3 version: major: 3 - minor: 17 + minor: 18 patch: 1 - build: 86 + build: 91 markdown: kramdown diff --git a/docs/_config_dev.yml b/docs/_config_dev.yml index 348e1aee441..01d25c96c1c 100644 --- a/docs/_config_dev.yml +++ b/docs/_config_dev.yml @@ -8,9 +8,9 @@ ace: githubUrl: https://github.com/acemod/ACE3 version: major: 3 - minor: 17 + minor: 18 patch: 1 - build: 86 + build: 91 markdown: kramdown diff --git a/docs/wiki/class-names.md b/docs/wiki/class-names.md index 4a4f9b032f6..0dcf014da16 100644 --- a/docs/wiki/class-names.md +++ b/docs/wiki/class-names.md @@ -232,6 +232,7 @@ ACE_bodyBag | Bodybag | ACE_ItemCore | ACE_bodyBagObject | Bodybag (packed) | | ACE_epinephrine | Epinephrine auto injector | ACE_ItemCore | ACE_morphine | Morphine auto injector | ACE_ItemCore | +ACE_painkillers | Painkillers | ACE_ItemCore | ACE_packingBandage | Packing Bandage | ACE_ItemCore | ACE_personalAidKit | Personal Aid Kit | ACE_ItemCore | ACE_plasmaIV | Plasma IV (1000ml) | ACE_ItemCore | diff --git a/docs/wiki/feature/dragging.md b/docs/wiki/feature/dragging.md index 0d42240a238..aa462d2e64d 100644 --- a/docs/wiki/feature/dragging.md +++ b/docs/wiki/feature/dragging.md @@ -20,7 +20,9 @@ This adds the option to drag or carry units or objects. ## 2. Usage ### 2.1 Dragging / Carrying units and objects -- You can only drag or carry an unconscious unit. +- You can drag or carry dead or unconscious units. These units can't be in a ragdoll state. +- You can drag or carry units whose legs are broken. +- You can't carry if you have broken legs. - Interact with the unit or object ⊞ Win (ACE3 default key bind `Interact Key`). - Select `Drag` or `Carry`. - To release, use the mouse wheel and select `Release` or use Self Interaction Ctrl+⊞ Win and select `Release`. diff --git a/docs/wiki/framework/arsenal-framework.md b/docs/wiki/framework/arsenal-framework.md index a02dcdf646a..330e7fa99b1 100644 --- a/docs/wiki/framework/arsenal-framework.md +++ b/docs/wiki/framework/arsenal-framework.md @@ -214,7 +214,7 @@ class ace_arsenal_stats { showBar = 1; // 0 disabled; 1 enabled; showText = 1; // 0 disabled; 1 enabled; barStatement = "1"; // Statement evaluated to set the bar progress, needs to return a NUMBER. - textStatement = "test entry"; // statement evaluated to set the text entry, can return anything. + textStatement = "test entry"; // statement evaluated to set the text entry, can return anything. Arrays will have a linebreak added after each element. condition = "true"; // Condition for the stats to be displayed, default is true if not defined, needs to return a BOOL. tabs[] = { {0,1,2}, { } }; // Arrays of tabs, left array is left tabs, right array is right tabs. }; diff --git a/docs/wiki/framework/cargo-framework.md b/docs/wiki/framework/cargo-framework.md index a1d810ce9c4..2e3e695e688 100644 --- a/docs/wiki/framework/cargo-framework.md +++ b/docs/wiki/framework/cargo-framework.md @@ -114,7 +114,17 @@ Note that this function can be used to make objects loadable/unloadable (set to * [object, 3] call ace_cargo_fnc_setSize ``` -### 4.3 Adjusting cargo space of a vehicle +### 4.3 Setting Custom Load/Unload Time + +```sqf +object setVariable ["ace_cargo_delay",