diff --git a/.gibot.yml b/.gibot.yml deleted file mode 100644 index 194d376713..0000000000 --- a/.gibot.yml +++ /dev/null @@ -1,55 +0,0 @@ -stages: - mark_for_closing: - days: 30 - labels: - - need more info - - invalid - - can't reproduce - - wontfix - - information required - exclude: - - marked for cleanup - comment: - - 'Hello @{author}! There has been no activity on this ticket for over a period of {days} days. I am automatically replying to let you know we will close this ticket within 1 week due to inactivity and consider this resolved.' - - 'If you believe this is in error, please reply with the requested information.' - - 'Thank you. :robot:' - action: - close: false - comment: true - assign_label: - - marked for cleanup - clean_up: - days: 7 - labels: - - marked for cleanup - comment: - - 'Hello @{author}! We have detected no activity for {days} days on this ticket. We therefore assume that the original reporter has lost interest or the issue has been resolved.' - - 'Since we have marked this ticket for deletion, we will be closing it.' - - 'If this has been closed in error, please create a comment below and we can reopen this issue. Note that you may need to provide additional information that was requested.' - - 'Thank you. :robot:' - action: - close: true - comment: true - assign_label: - - closed by bot - remove_label: - - marked for cleanup - remind_about_old_ticket: - days: 160 - labels: - - bug - - critical bug - exclude: - - need more info - - invalid - - can't reproduce - - wontfix - - information required - - marked for cleanup - - inactive - comment: - - 'Hello @acemod/maintainers. This ticket has been open for over {days} days without any activity.' - action: - comment: true - assign_label: - - inactive diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index a333dc08fe..28549dd503 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -3,10 +3,8 @@ **ACE3 Version:** `3.x.x` (stable / dev + commit hash) **Mods:** -``` -- CBA_A3 -- ace -``` +- `@CBA_A3` +- `@ace` **Description:** - Add a detailed description of the error. This makes it easier for us to fix the issue. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 69565c700e..2dbbc268af 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,4 +2,4 @@ - Describe what this pull request will do - Each change in a separate line - Include documentation if applicable -- Respect the [Development Guidelines](https://ace3mod.com/wiki/development/) +- Respect the [Development Guidelines](http://ace3mod.com/wiki/development/) diff --git a/.github_changelog_generator b/.github_changelog_generator deleted file mode 100644 index 6d1d741bbd..0000000000 --- a/.github_changelog_generator +++ /dev/null @@ -1,20 +0,0 @@ -# No issues and PRs without labels -issues=false -pr-wo-labels=false - -# Issues are disabled, don't fetch them -max-issues=0 - -# Label filters -exclude-labels=by design,can't reproduce,duplicate,question,invalid,wontfix,ignore changelog - -# Tag is created before generating changelog for release candidates -unreleased=false - -# No section labels, we only want a list of merged PRs (label separation only works for Issues) -simple-list=true - -# Misc -author=false -compare-link=false -header-label=## Change Log Summary diff --git a/.gitignore b/.gitignore index 1d60d27088..5aebbbd408 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ texHeaders.bin *.swo *.biprivatekey Thumbs.db -CHANGELOG.md diff --git a/.lgtm b/.lgtm new file mode 100644 index 0000000000..6bcc0cd7b8 --- /dev/null +++ b/.lgtm @@ -0,0 +1,3 @@ +approvals = 1 +pattern = "(?i)LGTM|(?i):\\+1:|(?i):shipit:" +self_approval_off = true diff --git a/AUTHORS.txt b/AUTHORS.txt index 07e0300f03..d389f9dade 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -1,4 +1,4 @@ -# ACE3 CONTRIBUTOR LIST +# ACE3 CONTRIBUTOR LIST # If you contributed, but are not listed here, contact me: # koffeinflummi@gmail.com # @@ -29,7 +29,6 @@ Walter Pearce # CONTRIBUTORS [BIG]Bull 11RDP-LoupVert -654wak654 ACCtomeek adam3adam Adanteh @@ -38,7 +37,6 @@ Aggr094 alef Aleksey EpMAK Yermakov Alganthe -Andrea "AtixNeon" Verano Anthariel Arkhir Asgar Serran @@ -85,7 +83,6 @@ Harakhti havena Hawkins Head -Hybrid V Karneck Kavinsky Kllrt @@ -93,7 +90,6 @@ legman Legolasindar "Viper" licht-im-Norden87 looter -Luigi "Luigium" Myrini Macusercom MarcBook meat @@ -105,7 +101,6 @@ nomisum OnkelDisMaster oscarmolinadev PaxJaromeMalues -Phyma pokertour Professor rakowozz diff --git a/README.md b/README.md index 2c0c22de37..4af32fd2a2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

- ACE3 Version + ACE3 Version ACE3 Issues diff --git a/ace_advanced_ballistics.dll b/ace_advanced_ballistics.dll index 7b1d952b12..705a90b2ef 100644 Binary files a/ace_advanced_ballistics.dll and b/ace_advanced_ballistics.dll differ diff --git a/ace_advanced_ballistics_x64.dll b/ace_advanced_ballistics_x64.dll deleted file mode 100644 index d50c374fc7..0000000000 Binary files a/ace_advanced_ballistics_x64.dll and /dev/null differ diff --git a/ace_break_line_x64.dll b/ace_break_line_x64.dll deleted file mode 100644 index d021bf25d2..0000000000 Binary files a/ace_break_line_x64.dll and /dev/null differ diff --git a/ace_clipboard_x64.dll b/ace_clipboard_x64.dll deleted file mode 100644 index db7730f0fe..0000000000 Binary files a/ace_clipboard_x64.dll and /dev/null differ diff --git a/ace_fcs_x64.dll b/ace_fcs_x64.dll deleted file mode 100644 index 4ee8dc1d89..0000000000 Binary files a/ace_fcs_x64.dll and /dev/null differ diff --git a/ace_medical_x64.dll b/ace_medical_x64.dll deleted file mode 100644 index a903cddfe9..0000000000 Binary files a/ace_medical_x64.dll and /dev/null differ diff --git a/ace_parse_imagepath_x64.dll b/ace_parse_imagepath_x64.dll deleted file mode 100644 index 8d154117c5..0000000000 Binary files a/ace_parse_imagepath_x64.dll and /dev/null differ diff --git a/addons/advanced_ballistics/ACE_Settings.hpp b/addons/advanced_ballistics/ACE_Settings.hpp index 0c2265619a..9815cc8491 100644 --- a/addons/advanced_ballistics/ACE_Settings.hpp +++ b/addons/advanced_ballistics/ACE_Settings.hpp @@ -69,7 +69,7 @@ class ACE_Settings { displayName = CSTRING(simulationInterval_DisplayName); description = CSTRING(simulationInterval_Description); typeName = "SCALAR"; - value = 0.05; + value = 0.0; }; class GVAR(simulationRadius) { category = CSTRING(DisplayName); diff --git a/addons/advanced_ballistics/CfgVehicles.hpp b/addons/advanced_ballistics/CfgVehicles.hpp index 151972ea02..804a6e9236 100644 --- a/addons/advanced_ballistics/CfgVehicles.hpp +++ b/addons/advanced_ballistics/CfgVehicles.hpp @@ -71,7 +71,7 @@ class CfgVehicles { displayName = CSTRING(simulationInterval_DisplayName); description = CSTRING(simulationInterval_Description); typeName = "NUMBER"; - defaultValue = 0.05; + defaultValue = 0.0; }; class simulationRadius { displayName = CSTRING(simulationRadius_DisplayName); diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf index d60feb8311..96aef4a93d 100644 --- a/addons/advanced_ballistics/XEH_postInit.sqf +++ b/addons/advanced_ballistics/XEH_postInit.sqf @@ -39,7 +39,7 @@ if (!hasInterface) exitWith {}; { _x params ["_modPBO", "_compatPBO"]; if ((isClass (configFile >> "CfgPatches" >> _modPBO)) && {!isClass (configFile >> "CfgPatches" >> _compatPBO)}) then { - WARNING_2("Weapon Mod [%1] missing ace compat pbo [%2] (from @ace\optionals)",_modPBO,_compatPBO); + ACE_LOGWARNING_2("Weapon Mod [%1] missing ace compat pbo [%2] (from @ace\optionals)",_modPBO,_compatPBO); }; } forEach [ ["RH_acc","ace_compat_rh_acc"], diff --git a/addons/advanced_ballistics/XEH_preInit.sqf b/addons/advanced_ballistics/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/advanced_ballistics/XEH_preInit.sqf +++ b/addons/advanced_ballistics/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf index fd086d65d1..19cd55c98e 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf @@ -10,9 +10,6 @@ * Return Value: * muzzle velocity shift - m/s * - * Example: - * [[], 5] call ace_advanced_ballistics_fnc_calcilateAmmoTemperatureVelocityShift - * * Public: No */ #include "script_component.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf b/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf index 326de5478e..2b90767a4f 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf @@ -13,9 +13,6 @@ * Return Value: * corrected ballistic coefficient * - * Example: - * [2, 5, 5, 0.5, "ASM"] call ace_advanced_ballistics_fnc_calculateAtmosphericCorrection - * * Public: No */ #include "script_component.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf index 98912b96e7..1f8a7e6eb9 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf @@ -4,7 +4,7 @@ * Calculates the muzzle velocity shift caused by different barrel lengths * * Arguments: - * 0: barrel length - mm + * 0: barrel length - mm * 1: muzzle velocity lookup table - m/s * 2: barrel length lookup table - mm * 3: muzzle velocity - m/s @@ -12,9 +12,6 @@ * Return Value: * muzzle velocity shift - m/s * - * Example: - * [5, [0,5], [0,5], 5] call ace_advanced_ballistics_fnc_calculateBarrelLengthVelocityShift - * * Public: No */ #include "script_component.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf index 1c7cadd3f0..0bd801c6b9 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf @@ -11,9 +11,6 @@ * Return Value: * retardation - m/(s^2) * - * Example: - * [5, 20, 10] call ace_advanced_ballistics_fnc_calculateRetardation - * * Public: No */ #include "script_component.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf b/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf index 8af9f77930..07fc7c67c9 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf @@ -15,9 +15,6 @@ * Return Value: * stability factor * - * Example: - * [1, 2, 3, 4, 5, 6, 7] call ace_advanced_ballistics_fnc_calculateStabilityFactor - * * Public: No */ #include "script_component.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf b/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf index 40d065198c..4d344e8bfe 100644 --- a/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf +++ b/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [] call ace_advanced_ballistics_fnc_diagnoseWeapons - * * Public: No */ #define DEBUG_MODE_FULL diff --git a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf index f50dcc6887..528b3e2e97 100644 --- a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf +++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [] call ace_advanced_ballistics_fnc_displayProtractor - * * Public: No */ #include "script_component.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf index db85efe137..6a9c7ce243 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [] call ace_advanced_ballistics_fnc_handleFirePFH - * * Public: No */ #include "script_component.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index a4f55adc3d..7085224771 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [] call ace_advanced_ballistics_fnc_handleFired - * * Public: No */ #include "script_component.hpp" @@ -45,6 +42,12 @@ if (!GVAR(simulateForEveryone) && !(local _unit)) then { //if (!GVAR(vehicleGunnerEnabled) && !(_unit isKindOf "Man")) then { _abort = true; }; // We currently do not have firedEHs on vehicles if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; }; +if (_abort || !(GVAR(extensionAvailable))) exitWith { + if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then { + EGVAR(windDeflection,trackedBullets) pushBack [_projectile, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; + }; +}; + // Get Weapon and Ammo Configurations _AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo]; if (isNil "_AmmoCacheEntry") then { @@ -83,12 +86,6 @@ if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then { }; }; -if (_abort || !(GVAR(extensionAvailable))) exitWith { - if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then { - EGVAR(windDeflection,trackedBullets) pushBack [_projectile, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; - }; -}; - _bulletTraceVisible = false; if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then { if (currentWeapon ACE_player == binocular ACE_player) then { diff --git a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf index ced2ffbf4e..4898c51c10 100644 --- a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf +++ b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ace_advanced_ballistics_fnc_initModuleSettings - * * Public: No */ #include "script_component.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf index 04be6a77db..9fed872a6b 100644 --- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [] call ace_advanced_ballistics_fnc_initializeTerrainExtension - * * Public: No */ #include "script_component.hpp" @@ -25,7 +22,6 @@ _initStartTime = CBA_missionTime; _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize"); if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith { - INFO_1("Terrain already initialized [world: %1]", worldName); #ifdef DEBUG_MODE_FULL systemChat "AdvancedBallistics: Terrain already initialized"; #endif @@ -36,14 +32,11 @@ _gridCells = _mapGrids * _mapGrids; GVAR(currentGrid) = 0; -INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldName); - [{ params ["_args","_idPFH"]; _args params ["_mapGrids", "_gridCells", "_initStartTime"]; if (GVAR(currentGrid) >= _gridCells) exitWith { - INFO_2("Finished terrain initialization in %1 seconds [world: %2]", ceil(CBA_missionTime - _initStartTime), worldName); #ifdef DEBUG_MODE_FULL systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(CBA_missionTime - _initStartTime)]; #endif diff --git a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf index 9971c99d85..646096683a 100644 --- a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf @@ -7,21 +7,18 @@ * ammo - classname * * Return Value: - * 0: _airFriction - * 1: _caliber - * 2: _bulletLength - * 3: _bulletMass - * 4: _transonicStabilityCoef - * 5: _dragModel - * 6: _ballisticCoefficients - * 7: _velocityBoundaries - * 8: _atmosphereModel - * 9: _ammoTempMuzzleVelocityShifts - * 10: _muzzleVelocityTable - * 11: _barrelLengthTable - * - * Example: - * ["ammo"] call ace_advanced_ballistics_fnc_readAmmoDataFromConfig + * 0: _airFriction + * 1: _caliber + * 2: _bulletLength + * 3: _bulletMass + * 4: _transonicStabilityCoef + * 5: _dragModel + * 6: _ballisticCoefficients + * 7: _velocityBoundaries + * 8: _atmosphereModel + * 9: _ammoTempMuzzleVelocityShifts + * 10: _muzzleVelocityTable + * 11: _barrelLengthTable * * Public: No */ @@ -29,7 +26,7 @@ TRACE_1("Reading Ammo Config",_this); private ["_ammo", "_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable", "_result"]; -private _ammoConfig = configFile >> "CfgAmmo" >> _this; +_ammoConfig = configFile >> "CfgAmmo" >> _this; _airFriction = getNumber(_ammoConfig >> "airFriction"); _caliber = getNumber(_ammoConfig >> "ACE_caliber"); @@ -62,7 +59,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then { if (_inheritedBarrelConfig || _inheritedTempConfig) then { private _parentConfig = inheritsFrom _ammoConfig; private _parentSpeed = getNumber (_parentConfig >> "typicalSpeed"); - WARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig, _parentSpeed); + ACE_LOGWARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig, _parentSpeed); if (_parentSpeed <= 0) exitWith {//Handle weird or null parent _muzzleVelocityTable = []; _ammoTempMuzzleVelocityShifts = []; diff --git a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf index af31a67fca..7c97e10bda 100644 --- a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf @@ -7,12 +7,9 @@ * weapon - classname * * Return Value: - * 0: _barrelTwist - * 1: _twistDirection - * 2: _barrelLength - * - * Example: - * ["weapon"] call ace_advanced_ballistics_fnc_readWeaponDataFromConfig + * 0: _barrelTwist + * 1: _twistDirection + * 2: _barrelLength * * Public: No */ @@ -33,6 +30,6 @@ private _barrelLength = getNumber(_weaponConfig >> "ACE_barrelLength"); private _result = [_barrelTwist, _twistDirection, _barrelLength]; -uiNamespace setVariable [format[QGVAR(%1), _this], _result]; +uiNamespace setVariable [format[QGVAR(%1), _weapon], _result]; _result diff --git a/addons/advanced_ballistics/script_component.hpp b/addons/advanced_ballistics/script_component.hpp index 48344f8ca3..bc8baa3121 100644 --- a/addons/advanced_ballistics/script_component.hpp +++ b/addons/advanced_ballistics/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_ADVANCEDBALLISTICS diff --git a/addons/advanced_ballistics/stringtable.xml b/addons/advanced_ballistics/stringtable.xml index 631acc92c7..b3399357c3 100644 --- a/addons/advanced_ballistics/stringtable.xml +++ b/addons/advanced_ballistics/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Széladatok mutatása Zobrazit údaje o větru Mostrar Informação do Vento - 風の情報を表示 - 바람의 정보를 표시 - 顯示風況 - 显示风况 Show Protractor @@ -28,10 +24,6 @@ Szögmérő mutatása Zobrazit úhloměr Mostrar Transferidor - 分度器を表示 - 각도기 표시 - 顯示量角器 - 显示量角器 Advanced Ballistics @@ -44,10 +36,6 @@ Fejlett ballisztika Продвинутая баллистика Balistica Avanzata - アドバンスド バリスティックス - 고급 탄도학 - 先進彈道系統 - 先进弹道系统 Advanced Ballistics @@ -60,10 +48,6 @@ Fejlett ballisztika Продвинутая баллистика Balistica Avanzata - アドバンスド バリスティックス - 고급 탄도학 - 先進彈道系統 - 先进弹道系统 Enables advanced ballistics @@ -76,10 +60,6 @@ Engedélyezi a fejlett ballisztikát Включает продвинутую баллистику Abilita Balistica Avanzata - アドバンスド バリスティックスを有効化 - 고급 탄도학을 적용합니다 - 啟用先進彈道系統 - 启用先进弹道系统 Enabled For Snipers @@ -92,10 +72,6 @@ Mesterlövészeknek engedélyezve Включена для снайперов Abilita per Tiratori Scelti - 狙撃手へ有効化 - 저격수만 적용 - 啟用給狙擊手 - 启用给狙击手 Enables advanced ballistics for non local snipers (when using high power optics) @@ -108,10 +84,6 @@ Engedélyezi a fejlett ballisztikát nem-helyi mesterlövészeknek (nagy-teljesítményű optika használatakor) Включает продвинутую баллистику для нелокальных снайперов (при использовании мощной оптики) Abilita Balistica Avanzata per Tiratori Scelti non locali (con ottiche ad alto potenziale) - 非ローカルの狙撃手 (高倍率スコープを使っている場合)へアドバンスド バリスティックスを有効化します - 고급 탄도학을 비-저격수 인원에게도 적용합니다(고성능 조준경을 사용시) - 啟用先進彈道系統給非本地狙擊手(當使用高倍率光學瞄鏡時) - 启用先进弹道系统给非本地狙击手(当使用高倍率光学瞄镜时) Enabled For Group Members @@ -124,10 +96,6 @@ Csoporttagoknak engedélyezve Включена для группы Abilita per Membri del Gruppo - グループ メンバーへ有効化 - 그룹 멤버도 적용 - 啟用給小隊成員 - 启用给小队成员 Enables advanced ballistics for non local group members @@ -140,10 +108,6 @@ Engedélyezi a fejlett ballisztikát nem-helyi csoporttagoknak Включает продвинутую баллистику для нелокальных членов группы Abilita Balistica Avanzata per Membri non locali del Gruppo - 非ローカルのグループ メンバーへアドバンスド バリスティックスを有効化します - 고급 탄도학을 비-그룹멤버에게도 적용합니다 - 啟用先進彈道系統給非本地小隊成員 - 启用先进弹道系统给非本地小队成员 Enabled For Everyone @@ -156,10 +120,6 @@ Mindenkinek engedélyezve Включена для всех Abilita per tutti - 全員に有効化 - 모두에게 적용 - 啟用給所有人 - 启用给所有人 Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer) @@ -171,11 +131,7 @@ Active la balistique avancée pour tous les joueurs non locaux (activer cette option peut avoir un impact sur les performance en multi durant les grands échanges de tirs) Engedélyezi a fejlett ballisztikát az összes nem-helyi játékosnak (ez a funkció leronthatja a teljesítményt intenzív többjátékos tűzharcok alatt) Включает продвинутую баллистику для всех нелокальных игроков (включение этой опции может снизить производительность при массовых перестрелках в мультиплеере) - Abilita Balistica Avanzata per tutti i giocatori non locali (abilitare questo parametro potrebbe ridurre le prestazioni durante scontri intensi in multiplayer) - 非ローカルの全プレイヤーへアドバンスド バリスティックスを有効化します (マルチプレイで大規模な銃撃戦がおこなわれると、動作の低下を招きます) - 고급 탄도학을 모든 비-로컬그룹에게도 적용합니다(적용 후 대규모 전투시 성능하락을 유발할 수 있습니다) - 啟用先進彈道系統給所有非本地玩家 (啟用此功能後,在多人連線大量交火時可能會降低效能) - 启用先进弹道系统给所有非本地玩家 (启用此功能后,在多人连线大量交火时可能会降低效能) + Abilita Balistica Avanzata per tutti i giocatori non locali (abilitare questo parametro potrebbe degradare le prestazioni durante scontri intensi in multiplayer) Always Enabled For Group Members @@ -188,10 +144,6 @@ Mindig engedélyezve csoporttagoknak Всегда включена для членов группы Sempre abilitato per Membri del Gruppo - 常にグループ メンバーへ有効化 - 그룹 멤버에게 항상 적용 - 永遠啟用給小隊成員 - 永远启用给小队成员 Always enables advanced ballistics when a group member fires @@ -203,11 +155,7 @@ Active tout le temps la balistique avancée quand un membre du groupe ouvre le feu Mindig engedélyezi a fejlett ballisztikát, ha egy csoporttag tüzel Всегда включает продвинутую баллистику когда стреляет член группы - Abilita sempre Balistica Avanzata quando un membro del gruppo spara - グループ メンバーが射撃した時、常にアドバンスド バリスティックスを有効化します - 그룹 멤버가 발사시 항상 고급 탄도학을 적용합니다 - 當小隊成員開火時,永遠啟用先進彈道系統 - 当小队成员开火时,永远启用先进弹道系统 + Abilita sempre Balistica Avanzata quando un Membro del Gruppo spara Disabled In FullAuto Mode @@ -220,10 +168,6 @@ Automata módban letiltva Выкл. для автомат. режима Disabilita in modalità di fuoco automatico - フルオートでは無効化 - 조정간 자동시 비활성화 - 在全自動模式時關閉 - 在全自动模式时关闭 Disables the advanced ballistics during full auto fire @@ -236,10 +180,6 @@ Letiltja a fejlett ballisztikát automata tüzelés folyamán Выключает продвинутую баллистику при стрельбе в полностью автоматическом режиме Disabilita Balistica Avanzata durante fuoco automatico - フルオートで射撃中ではアドバンスド バリスティックスを無効化します - 조정간 자동시 고급 탄도학을 비활성화 합니다 - 在全自動模式開火時,關閉先進彈道系統 - 在全自动模式开火时,关闭先进弹道系统 Enable Ammo Temperature Simulation @@ -252,10 +192,6 @@ Lőszer-hő szimuláció engedélyezése Симуляция температуры для боеприпасов Abilita simulazione della temperatura delle munizioni - 弾薬の温度シミュレーションを有効化 - 탄약 온도 구현 적용 - 啟用彈藥溫度模擬系統 - 启用弹药温度模拟系统 Muzzle velocity varies with ammo temperature @@ -267,11 +203,7 @@ La température de la munition influe sur la vélocité intiale A kezdősebesség a lőszer hőmérsékletétől függően változó Начальная скорость пули зависит от температуры - La velocità dello sparo varia a seconda della temperatura delle munizioni - 弾薬の温度により初速値を変化させます - 탄약 온도에 비례해 총구 속도가 달라집니다 - 子彈初速將隨彈藥溫度而有所變化 - 子弹初速将随弹药温度而有所变化 + Velocità alla volata varia con la temperatura delle munizioni Enable Barrel Length Simulation @@ -284,10 +216,6 @@ Csőhossz-szimuláció engedélyezése Симуляция длины ствола Abilita simulazione della lunghezza della canna - 銃身長のシミュレーションを有効化 - 총열 길이 구현 적용 - 啟用槍管長度模擬系統 - 启用枪管长度模拟系统 Muzzle velocity varies with barrel length @@ -299,11 +227,7 @@ La longueur du canon influe sur la vélocité initale A kezdősebesség a cső hosszától függően változó Начальная скорость пули зависит от длины ствола - La velocità di sparo varia a seconda della lunghezza della canna - 銃身長により初速値を変化させます - 총구 속도가 총열에 비례해 달라집니다 - 子彈初速將隨槍管長度而有所變化 - 子弹初速将随枪管长度而有所变化 + Velocità alla volata varia con la lunghezza della canna Enable Bullet Trace Effect @@ -315,11 +239,7 @@ Activer l'effet balle traçante Nyomkövető-effekt engedélyezése Следы пуль - Abilita effetto dei Proiettili Traccianti - 弾丸の痕跡表示を有効化 - 예광탄 효과 적용 - 啟用曳光彈效果 - 启用曳光弹效果 + Abilita effetto di tracciatura dei proiettili Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics) @@ -331,11 +251,7 @@ Active une tracante pour les munitions de gros calibre (seulement visible en utilisant des optiques avancées) Engedélyezi a nagy kaliberű lövedékek nyomának vizuális követését (csak nagy teljesítményű optikán keresztül látható) Включает эффект следов пуль для больших калибров (видны только через мощную оптику) - Abilita effetto dei proiettili traccianti di alto calibro (visibile solo attraverso ottiche ad alto potenziale) - 大口径の銃弾による弾丸の痕跡表示を有効化します (高倍率スコープを介してでしか見れません) - 대구경 탄환에 예광탄 효과를 적용합니다(오직 고성능 조준경 사용시에만 보입니다) - 啟用曳光彈效果給大口徑子彈 (只有透過高倍率光學瞄鏡才能看到) - 启用曳光弹效果给大口径子弹 (只有透过高倍率光学瞄镜才能看到) + Abilita effetto di tracciatura per proiettili di alto calibro (visibile solo attraverso ottiche ad alto potenziale) Simulation Interval @@ -348,10 +264,6 @@ Szimuláció intervalluma Интервал симуляции Intervallo Simulazione - シミュレーション間隔 - 구현 간격 - 模擬間隔 - 模拟间隔 Defines the interval between every calculation step @@ -364,10 +276,6 @@ Meghatározza a számítási lépések közötti időintervallumot Определяет временной интервал между вычислениями Definisce l'intervallo tra ogni step di calcolo - 各計算ごとの間隔を定義します - 각 계산 단위의 간격을 정의합니다 - 定義每個模擬計算之間的時間間隔 - 定义每个模拟计算之间的时间间隔 Simulation Radius @@ -380,10 +288,6 @@ Szimuláció hatóköre Радиус симуляции Raggio Simulazione - シミュレーションの適用範囲 - 구현 범위 - 模擬半徑 - 模拟半径 Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles @@ -396,10 +300,6 @@ Meghatározza a játékos körüli hatókört (méterben), ahol a lövedékek fejlett ballisztikát használnak Определяет радиус вокруг игрока (в метрах), в котором продвинутая баллистика применяется к снарядам Definisce il raggio attorno al giocatore (in metri) per cui la Balistica Avanzata è applicata ai proiettili - プレイヤーの周囲にアドバンスド バリスティックスによる弾道を適用させる範囲を半径で定義します (メートル) - 플레이어 주위의 발사체를 고급 탄도학으로 정의하는 범위를 정합니다(미터) - 以玩家的半徑距離(公尺)定義先進彈道系統啟用範圍 - 以玩家的半径距离(公尺)定义先进弹道系统启用范围 This module enables advanced ballistics simulation - meaning the trajectory of projectiles is influenced by variables like air temperature, atmospheric pressure, humidity, gravity, the type of ammunition and the weapon from which it was fired. @@ -412,10 +312,6 @@ Этот модуль включает симуляцию продвинутой баллистики - при этом на траекторию полета снаряда влияют различные параметры, такие как температура воздуха, атмосферное давление, влажность, гравитация, тип боеприпаса и оружия, из которого произвели выстрел. Este módulo permite la simulación balística avanzada - es decir, la trayectoria de los proyectiles está influenciada por variables como la temperatura del aire, la presión atmosférica, la humedad, la gravedad, el tipo de municiones y el arma desde el que fue disparada. Questo modulo abilita la simulazione della Balistica Avanzata - cioè la traiettoria dei proiettili è influenzata da variabili come la temperatura dell'aria, pressione atmosferica, umidità, gravità, il tipo di munizione e l'arma da cui è sparata - このモジュールはアドバンスド バリスティックスを有効化します。弾道は気温や気圧、湿度、重力、弾薬の種類、発射する武器から影響を受けるようになります。 - 이 모듈은 고급 탄도학을 적용시킵니다 - 이는 발사체의 궤적이 기온, 대기압, 습도, 중력, 탄환의 종류와 어느 무기에서 발사되는지에 따라 영향을 받습니다. - 該模塊實現先進的彈道仿真 - 這意味著子彈的軌跡是由空氣溫度、大氣壓力、濕度、重力、彈藥類型以及射擊的武器所影響. - 该模块实现先进的弹道仿真 - 这意味着子弹的轨迹是由空气温度、大气压力、湿度、重力、弹药类型以及射击的武器所影响. - + \ No newline at end of file diff --git a/addons/advanced_fatigue/XEH_PREP.hpp b/addons/advanced_fatigue/XEH_PREP.hpp index c6250516f5..1ec7705695 100644 --- a/addons/advanced_fatigue/XEH_PREP.hpp +++ b/addons/advanced_fatigue/XEH_PREP.hpp @@ -5,6 +5,6 @@ PREP(getMetabolicCosts); PREP(handleEffects); PREP(handlePlayerChanged); PREP(handleStaminaBar); -PREP(mainLoop); PREP(moduleSettings); +PREP(pfhMain); PREP(removeDutyFactor); diff --git a/addons/advanced_fatigue/XEH_postInit.sqf b/addons/advanced_fatigue/XEH_postInit.sqf index 542360c0c3..2eff26abdf 100644 --- a/addons/advanced_fatigue/XEH_postInit.sqf +++ b/addons/advanced_fatigue/XEH_postInit.sqf @@ -12,40 +12,31 @@ if (!hasInterface) exitWith {}; GVAR(ppeBlackout) ppEffectCommit 0.4; // - GVAR updating and initialization ----------------------------------------- - ["unit", FUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler; - - ["visibleMap", { - params ["", "_visibleMap"]; // command visibleMap is updated one frame later - private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; - _staminaBarContainer ctrlShow ((!_visibleMap) && {(vehicle ACE_player) == ACE_player}); - }, true] call CBA_fnc_addPlayerEventHandler; - ["vehicle", { - private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; - _staminaBarContainer ctrlShow ((!visibleMap) && {(vehicle ACE_player) == ACE_player}); - }, true] call CBA_fnc_addPlayerEventHandler; + if !(isNull ACE_player) then { + [ACE_player, objNull] call FUNC(handlePlayerChanged); + }; + ["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; // - Duty factors ------------------------------------------------------------- - if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then { - [QEGVAR(medical,pain), { // 0->1.0, 0.5->1.05, 1->1.1 - linearConversion [0, 1, (_this getVariable [QEGVAR(medical,pain), 0]), 1, 1.1, true]; - }] call FUNC(addDutyFactor); - [QEGVAR(medical,bloodVolume), { // 100->1.0, 90->1.1, 80->1.2 - linearConversion [100, 0, (_this getVariable [QEGVAR(medical,bloodVolume), 100]), 1, 2, true]; - }] call FUNC(addDutyFactor); - }; - if (["ACE_Dragging"] call EFUNC(common,isModLoaded)) then { - [QEGVAR(dragging,isCarrying), { - [1, 3] select (_this getVariable [QEGVAR(dragging,isCarrying), false]); - }] call FUNC(addDutyFactor); - }; - if (["ACE_Weather"] call EFUNC(common,isModLoaded)) then { - [QEGVAR(weather,temperature), { // 35->1, 45->2 - linearConversion [35, 45, (missionNamespace getVariable [QEGVAR(weather,currentTemperature), 25]), 1, 2, true]; - }] call FUNC(addDutyFactor); - }; + [QEGVAR(medical,pain), { + 1 + (((_this getVariable [QEGVAR(medical,pain), 0]) min 1) / 10) + }] call FUNC(addDutyFactor); + [QEGVAR(medical,bloodVolume), { + 2 - (((_this getVariable [QEGVAR(medical,bloodVolume), 100]) min 100) / 100) + }] call FUNC(addDutyFactor); + [QEGVAR(dragging,isCarrying), { + if (_this getVariable [QEGVAR(dragging,isCarrying), false]) then { + 3 + } else { + 1 + }; + }] call FUNC(addDutyFactor); + [QEGVAR(weather,temperature), { + (((missionNamespace getVariable [QEGVAR(weather,currentTemperature), 25]) - 35) / 10) max 2 min 1 + }] call FUNC(addDutyFactor); - // - Add main loop at 1 second interval ------------------------------------------------------------- - [FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute; + // - Add main PFH ------------------------------------------------------------- + [FUNC(pfhMain), 1, []] call CBA_fnc_addPerFrameHandler; }] call CBA_fnc_addEventHandler; ["ace_settingChanged", { diff --git a/addons/advanced_fatigue/XEH_preInit.sqf b/addons/advanced_fatigue/XEH_preInit.sqf index 7d682e7db6..9b799a0816 100644 --- a/addons/advanced_fatigue/XEH_preInit.sqf +++ b/addons/advanced_fatigue/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; //#include "initSettings.sqf" GVAR(staminaBarWidth) = 10 * (((safezoneW / safezoneH) min 1.2) / 40); diff --git a/addons/advanced_fatigue/config.cpp b/addons/advanced_fatigue/config.cpp index 47d56d6ab2..db947b5815 100644 --- a/addons/advanced_fatigue/config.cpp +++ b/addons/advanced_fatigue/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author = ECSTRING(common,ACETeam); + author = CSTRING(ACETeam); authors[] = {"BaerMitUmlaut"}; url = ECSTRING(main,URL); VERSION_CONFIG; diff --git a/addons/advanced_fatigue/functions/fnc_addDutyFactor.sqf b/addons/advanced_fatigue/functions/fnc_addDutyFactor.sqf index 89801e902e..74a42d55cf 100644 --- a/addons/advanced_fatigue/functions/fnc_addDutyFactor.sqf +++ b/addons/advanced_fatigue/functions/fnc_addDutyFactor.sqf @@ -8,11 +8,6 @@ * * Return Value: * None - * - * Example: - * ["ID", 5] call ace_advanced_fatigue_fnc_addDutyFactor - * - * Public: No */ #include "script_component.hpp" params [["_id", "", [""]], ["_factor", 1, [0, {}]]]; diff --git a/addons/advanced_fatigue/functions/fnc_createStaminaBar.sqf b/addons/advanced_fatigue/functions/fnc_createStaminaBar.sqf index ce88c2b42e..773e240494 100644 --- a/addons/advanced_fatigue/functions/fnc_createStaminaBar.sqf +++ b/addons/advanced_fatigue/functions/fnc_createStaminaBar.sqf @@ -7,11 +7,6 @@ * * Return Value: * None - * - * Example: - * [DISPLAY] call ace_advanced_fatigue_fnc_createStaminaBar - * - * Public: No */ #include "script_component.hpp" params ["_display"]; diff --git a/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf b/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf index 629152b6a1..b91e8a09bf 100644 --- a/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf +++ b/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf @@ -21,16 +21,14 @@ private _duty = 1; private _animType = _animName select [1, 3]; GVAR(isSwimming) = false; -GVAR(isProne) = (stance _unit) == "PRONE"; -if (_animType in ["idl", "mov", "adj"]) then { +if (_animType in ["idl", "mov"]) then { switch (_animName select [5, 3]) do { case ("knl"): { _duty = 1.5; }; case ("pne"): { - _duty = 10; - GVAR(isProne) = true; // #4880 - Unarmed sprint->prone has wrong `stance` + _duty = 12; }; default { _duty = 1; @@ -49,15 +47,9 @@ if (_animType in ["idl", "mov", "adj"]) then { }; } else { // swimming and diving - switch (true) do { - case (_animType in ["swm", "ssw", "bsw"]): { - _duty = 6.5; - GVAR(isSwimming) = true; - }; - case (_animType in ["dve", "sdv", "bdv"]): { - _duty = 2.5; - GVAR(isSwimming) = true; - }; + if (_animType in ["swm", "ssw", "bsw", "dve", "sdv", "bdv"]) then { + _duty = 5; + GVAR(isSwimming) = true; }; }; diff --git a/addons/advanced_fatigue/functions/fnc_getMetabolicCosts.sqf b/addons/advanced_fatigue/functions/fnc_getMetabolicCosts.sqf index c2c673fd95..fd2234d1f2 100644 --- a/addons/advanced_fatigue/functions/fnc_getMetabolicCosts.sqf +++ b/addons/advanced_fatigue/functions/fnc_getMetabolicCosts.sqf @@ -18,8 +18,18 @@ #include "script_component.hpp" params ["_unit", "_velocity"]; -private _gearMass = ((_unit getVariable [QEGVAR(movement,totalLoad), loadAbs _unit]) / 22.046) * GVAR(loadFactor); +private _virtualLoad = 0; +{ + _virtualLoad = _virtualLoad + (_x getVariable [QEGVAR(movement,vLoad), 0]); +} forEach [ + _unit, + uniformContainer _unit, + vestContainer _unit, + backpackContainer _unit +]; +private _gearMass = ((loadAbs _unit + _virtualLoad) * 0.1 / 2.2046) * GVAR(loadFactor); +private _terrainFactor = 1; private _terrainAngle = asin (1 - ((surfaceNormal getPosASL _unit) select 2)); private _terrainGradient = (_terrainAngle / 45 min 1) * 5 * GVAR(terrainGradientFactor); private _duty = GVAR(animDuty); @@ -40,12 +50,12 @@ if (_velocity > 2) then { ( 2.10 * SIM_BODYMASS + 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2) - + (SIM_BODYMASS + _gearMass) * (0.90 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient) + + _terrainFactor * (SIM_BODYMASS + _gearMass) * (0.90 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient) ) * 0.23 * _duty } else { ( 1.05 * SIM_BODYMASS + 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2) - + (SIM_BODYMASS + _gearMass) * (1.15 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient) + + _terrainFactor * (SIM_BODYMASS + _gearMass) * (1.15 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient) ) * 0.23 * _duty }; diff --git a/addons/advanced_fatigue/functions/fnc_handleEffects.sqf b/addons/advanced_fatigue/functions/fnc_handleEffects.sqf index 111727c826..e23b9d86cd 100644 --- a/addons/advanced_fatigue/functions/fnc_handleEffects.sqf +++ b/addons/advanced_fatigue/functions/fnc_handleEffects.sqf @@ -58,18 +58,7 @@ if (GVAR(ppeBlackoutLast) == 1) then { // - Physical effects --------------------------------------------------------- if (GVAR(isSwimming)) exitWith { - _unit setAnimSpeedCoef linearConversion [0.7, 0.9, _fatigue, 1, 0.5, true]; - - if ((isSprintAllowed _unit) && {_fatigue > 0.7}) then { - [_unit, "blockSprint", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); - } else { - if ((!isSprintAllowed _unit) && {_fatigue < 0.7}) then { - [_unit, "blockSprint", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); - }; - }; -}; -if ((getAnimSpeedCoef _unit) != 1) then { - _unit setAnimSpeedCoef 1; + _unit setAnimSpeedCoef (1 - _fatigue / 3); }; if (_overexhausted) then { diff --git a/addons/advanced_fatigue/functions/fnc_handlePlayerChanged.sqf b/addons/advanced_fatigue/functions/fnc_handlePlayerChanged.sqf index 0e31e89645..c275b91cc8 100644 --- a/addons/advanced_fatigue/functions/fnc_handlePlayerChanged.sqf +++ b/addons/advanced_fatigue/functions/fnc_handlePlayerChanged.sqf @@ -8,21 +8,13 @@ * * Return Value: * None - * - * Example: - * [newbob, oldbob] call ace_advanced_fatigue_fnc_handlePlayerChanged - * - * Public: No */ #include "script_component.hpp" params ["_newUnit", "_oldUnit"]; -TRACE_2("unit changed",_newUnit,_oldUnit); if !(isNull _oldUnit) then { _oldUnit enableStamina true; _oldUnit removeEventHandler ["AnimChanged", _oldUnit getVariable [QGVAR(animHandler), -1]]; - _oldUnit setVariable [QGVAR(animHandler), nil]; - TRACE_1("remove old",_oldUnit getVariable QGVAR(animHandler)); _oldUnit setVariable [QGVAR(ae1Reserve), GVAR(ae1Reserve)]; _oldUnit setVariable [QGVAR(ae2Reserve), GVAR(ae2Reserve)]; @@ -38,7 +30,6 @@ if (_newUnit getVariable [QGVAR(animHandler), -1] == -1) then { private _animHandler = _newUnit addEventHandler ["AnimChanged", { GVAR(animDuty) = _this call FUNC(getAnimDuty); }]; - TRACE_1("add new",_animHandler); _newUnit setVariable [QGVAR(animHandler), _animHandler]; }; @@ -59,6 +50,7 @@ GVAR(peakPower) = VO2MAX_STRENGTH * GVAR(VO2MaxPower); GVAR(ae1PathwayPower) = GVAR(peakPower) / (13.3 + 16.7 + 113.3) * 13.3 * ANTPERCENT ^ 1.28 * 1.362; GVAR(ae2PathwayPower) = GVAR(peakPower) / (13.3 + 16.7 + 113.3) * 16.7 * ANTPERCENT ^ 1.28 * 1.362; +GVAR(anPathwayPower) = GVAR(peakPower) - _ae1PathwayPower - _ae2PathwayPower; GVAR(ppeBlackoutLast) = 100; GVAR(lastBreath) = 0; diff --git a/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf b/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf index 72772d16b1..2f865ac821 100644 --- a/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf +++ b/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf @@ -7,11 +7,6 @@ * * Return Value: * None - * - * Example: - * [0.5] call ace_advanced_fatigue_fnc_handleStaminaBar - * - * Public: No */ #include "script_component.hpp" params ["_stamina"]; diff --git a/addons/advanced_fatigue/functions/fnc_moduleSettings.sqf b/addons/advanced_fatigue/functions/fnc_moduleSettings.sqf index 9d1a0a6ab6..275e4b7907 100644 --- a/addons/advanced_fatigue/functions/fnc_moduleSettings.sqf +++ b/addons/advanced_fatigue/functions/fnc_moduleSettings.sqf @@ -7,11 +7,6 @@ * * Return Value: * None - * - * Example: - * [MODULE] call ace_advanced_fatigue_fnc_moduleSettings - * - * Public: No */ #include "script_component.hpp" params ["_logic"]; diff --git a/addons/advanced_fatigue/functions/fnc_mainLoop.sqf b/addons/advanced_fatigue/functions/fnc_pfhMain.sqf similarity index 74% rename from addons/advanced_fatigue/functions/fnc_mainLoop.sqf rename to addons/advanced_fatigue/functions/fnc_pfhMain.sqf index 4b23153dff..49db4646af 100644 --- a/addons/advanced_fatigue/functions/fnc_mainLoop.sqf +++ b/addons/advanced_fatigue/functions/fnc_pfhMain.sqf @@ -1,34 +1,18 @@ /* * Author: BaerMitUmlaut - * Main looping function that updates fatigue values. + * Main perFrameHandler that updates fatigue values. * * Arguments: * None * * Return Value: * None - * - * Example: - * [] call ace_advanced_fatigue_fnc_mainLoop - * - * Public: No */ #include "script_component.hpp" -if (!alive ACE_player) exitWith { // Dead people don't breath, Will also handle null (Map intros) - [FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute; - private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; - _staminaBarContainer ctrlSetFade 1; - _staminaBarContainer ctrlCommit 1; -}; +if (isNull ACE_player) exitWith {}; // Map intros private _currentWork = REE; private _currentSpeed = (vectorMagnitude (velocity ACE_player)) min 6; - -// fix #4481. Diving to the ground is recorded as PRONE stance with running speed velocity. Cap maximum speed to fix. -if (GVAR(isProne)) then { - _currentSpeed = _currentSpeed min 1.5; -}; - if ((vehicle ACE_player == ACE_player) && {_currentSpeed > 0.1} && {isTouchingGround ACE_player || {underwater ACE_player}}) then { _currentWork = [ACE_player, _currentSpeed] call FUNC(getMetabolicCosts); _currentWork = _currentWork max REE; @@ -37,11 +21,11 @@ if ((vehicle ACE_player == ACE_player) && {_currentSpeed > 0.1} && {isTouchingGr // Calculate muscle damage increase // Note: Muscle damage recovery is ignored as it takes multiple days GVAR(muscleDamage) = GVAR(muscleDamage) + (_currentWork / GVAR(peakPower)) ^ 3.2 * 0.00004; -private _muscleIntegritySqrt = sqrt (1 - GVAR(muscleDamage)); +private _muscleIntegrity = 1 - GVAR(muscleDamage); // Calculate available power -private _ae1PathwayPowerFatigued = GVAR(ae1PathwayPower) * sqrt (GVAR(ae1Reserve) / AE1_MAXRESERVE) * OXYGEN * _muscleIntegritySqrt; -private _ae2PathwayPowerFatigued = GVAR(ae2PathwayPower) * sqrt (GVAR(ae2Reserve) / AE2_MAXRESERVE) * OXYGEN * _muscleIntegritySqrt; +private _ae1PathwayPowerFatigued = GVAR(ae1PathwayPower) * sqrt (GVAR(ae1Reserve) / AE1_MAXRESERVE) * OXYGEN * sqrt _muscleIntegrity; +private _ae2PathwayPowerFatigued = GVAR(ae2PathwayPower) * sqrt (GVAR(ae2Reserve) / AE2_MAXRESERVE) * OXYGEN * sqrt _muscleIntegrity; // Calculate how much power is consumed from each reserve private _ae1Power = _currentWork min _ae1PathwayPowerFatigued; @@ -77,5 +61,3 @@ private _perceivedFatigue = 1 - (_anReservePercentage min _aeReservePercentage); if (GVAR(enableStaminaBar)) then { [GVAR(anReserve) / AN_MAXRESERVE] call FUNC(handleStaminaBar); }; - -[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/advanced_fatigue/functions/fnc_removeDutyFactor.sqf b/addons/advanced_fatigue/functions/fnc_removeDutyFactor.sqf index 4ae07704a5..0a67f318ac 100644 --- a/addons/advanced_fatigue/functions/fnc_removeDutyFactor.sqf +++ b/addons/advanced_fatigue/functions/fnc_removeDutyFactor.sqf @@ -7,11 +7,6 @@ * * Return Value: * None - * - * Example: - * ["ID"] call ace_advanced_fatigue_fnc_removeDutyFactor - * - * Public: No */ #include "script_component.hpp" params [["_id", "", [""]]]; diff --git a/addons/advanced_fatigue/script_component.hpp b/addons/advanced_fatigue/script_component.hpp index fcc8abd3c0..bed86c1be8 100644 --- a/addons/advanced_fatigue/script_component.hpp +++ b/addons/advanced_fatigue/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_ADVANCED_FATIGUE diff --git a/addons/advanced_fatigue/stringtable.xml b/addons/advanced_fatigue/stringtable.xml index 9aba5d1a04..900a5a7b18 100644 --- a/addons/advanced_fatigue/stringtable.xml +++ b/addons/advanced_fatigue/stringtable.xml @@ -4,145 +4,54 @@ Performance Factor Leistungsfaktor - パフォーマンス要因 - Współczynnik wydolności - 성능 요인 - Facteur de performance - Fattore Prestazione - 體力值 - 体力值 Influences the overall performance of all players with no custom factor. Higher means better. Beinflusst die Leistungsfähigkeit aller Spieler ohne eigenen Leistungsfaktor. Ein höherer Wert bedeutet bessere Leistung. - 非カスタム要因をもつ全プレイヤーへ全体的に動作を影響させます。高いほど影響がでます。 - Wpływa na ogólną wydolność organizmu u wszystkich graczy bez ustawionego niestandardowego współczynnika. Więcej znaczy lepiej. - 모든 성능이 임의로 설정된 값 없이 영향받습니다. 값이 클수록 더 나은 성능을 발휘합니다 - Influence les performances générales de tous les joueurs sans facteurs personalisés. Une valeur plus élevée implique de meilleures performances. - Influenza qualsiasi prestazione di tutti i giocatori smuniti di un fattore personalizzato. Maggiore significa migliore. - 影響所有玩家的體力表現. 值越高代表體力越好. - 影响所有玩家的体力表现. 值越高代表体力越好. Influences the overall performance of this unit. Higher means better. Beinflusst die Leistungsfähigkeit dieser Einheit. Ein höherer Wert bedeutet bessere Leistung. - 非カスタム要因をもつ全プレイヤーへ全体的に動作を影響させます。高いほど影響がでます。 - Wpływa na ogólną wydolność tej jednostki. Więcej znaczy lepiej. - 모든 성능이 이 단위로 영향을 받습니다. 값이 클수록 더 나은 성능을 발휘합니다 - Influence les performances générales de cette unité. Une valeur plus élevée implique de meilleures performances. - Influenza qualsiasi prestazione di questa unità. Maggiore significa migliore. - 影響這個單位的體力表現. 值越高代表體力越好. - 影响这个单位的体力表现. 值越高代表体力越好. Recovery Factor Erholungsfaktor - 回復要因 - Współczynnik regeneracji - 회복 요인 - Facteur de récupération - Fattore Recupero - 回復值 - 回复值 Changes how fast the player recovers when resting. Higher is faster. Ändert, wie schnell ein Spieler Ausdauer regeneriert. Ein höherer Wert bedeutet eine schnellere Regeneration. - 休憩時は、プレイヤーが早く回復します。高いほど早くなります。 - Wpływa na czas regeneracji podczas postoju. Więcej znaczy szybciej. - 얼마나 빨리 회복하는지를 바꿉니다. 값이 클수록 더 나은 성능을 발휘합니다 - Change la vitesse à laquelle les joueurs récupèrent leur endurance lorsqu'ils se reposent. Une valeur plus élevée implique une récupération plus rapide. - Determina in quanto tempo il giocatore recupera quando rilassato. Maggiore significa migliore. - 決定玩家休息多久就能回復體力. 值越高恢復越快. - 决定玩家休息多久就能回复体力. 值越高恢复越快. Load Factor Gewichtsfaktor - 負荷要因 - Współczynnik masy ekwipunku - 부담 요인 - Facteur d'encombrement - Fattore Caricamento - 負重量 - 负重量 Increases or decreases how much weight influences the players performance. Zero means equipment weight has no performance influence. Erhöht oder verringert, wie viel Einfluss das Ausrüstungsgewicht auf die Leistung hat. Null heißt, dass es keinen Einfluss hat. - 重量によりプレイヤーの動作への影響下増加したり、低下します。装備を持っていない場合、影響はしません。 - Zmniejsza lub zwiększa wpływ ciężaru ekwipunku na wydolność gracza. Zero oznacza kompletny brak wpływu na wydolność. - 플레이어가 무게에 따라 얼마나 영향받는지를 증가시키거나 감소시킵니다. 0의 경우 플레이어가 장비 무게에 영향받지 않습니다. - Augmente ou réduit l'influence que le poids à sur les performances des joueurs. Zéro implique que le poids de l'équipement n'a pas d'influence sur les performances. - Incrementa o decrementa quanto il peso influenza le prestazioni dei giocatori. Zero significa che il peso dell'equipaggiamento non ha alcuna influenza nelle prestazioni. - 增加或降低玩家所能承受的負重量. 如設定值為0, 代表裝備的重量將不會影響到玩家的體力表現. - 增加或降低玩家所能承受的负重量. 如设定值为0, 代表装备的重量将不会影响到玩家的体力表现. Terrain Gradient Factor Terrainsteigungsfaktor - 地形の勾配による要因 - Współczynnik terenu - 지형 경사도 요인 - Facteur d'inclinaison du terrain - Fattore Pendenza Terreno - 地形陡峭影響值 - 地形陡峭影响值 Sets how much steep terrain increases stamina loss. Higher means higher stamina loss. Beeinflusst, wie stark Steigungen den Ausdauerverbrauch erhöhen. Ein höherer Wert erhöht den Ausdauerverbrauch. - 地形によって影響する体力の消費量を決定します。高数値ではより体力を消費します。 - Wpływa na to w jakim stopniu stromy teren wpływa na utratę wytrzymałości. Więcej oznacza szybszą utratę wytrzymałości. - 경사도에 따라 얼마나 피로해지는지를 정합니다. 값이 클수록 더 많은 피로를 유발합니다. - Configure l'influence de l'inclinaison du terrain sur la perte d'endurance. Une valeur plus élevée implique une perte d'endurance plus importante. - Stabilisce quanto la pendenza del terreno incrementa la perdita della stamina. Maggiore significa più stamina persa. - 設定陡峭的地形將會影響多少體力的流失. 值越高代表體力流失越快. - 设定陡峭的地形将会影响多少体力的流失. 值越高代表体力流失越快. Enabled Aktiv - 有効化 - Włączone - 활성화 - Activé - Abilitato - 啟用 - 启用 Enables/disables Advanced Fatigue. Aktiviert/deaktiviert Advanced Fatigue. - アドバンスド疲労の有効化と無効化 - Włącza/wyłącza zaawansowaną wytrzymałość - 고급 피로도 활성화/비활성화 - Active/désactive la fatigue avancée. - Abilita/disabilita la Fatica Avanzata. - 啟用/關閉進階體力. - 启用/关闭进阶体力. Show stamina bar Zeige Ausdauerleiste - 体力バーを表示 - Pokaż pasek wytrzymałości - 피로도 막대 - Afficher la barre d'endurance - Mostra barra stamina - 顯示體力條 - 显示体力条 Shows the stamina bar. Zeigt die Ausdauerleiste an. - 体力バーを表示します。 - Pokazuje pasek wytrzymałości. - 피로도 막대를 보여줍니다. - Affiche la barre d'endurance. - Mostra la barra della stamina. - 顯示體力條. - 显示体力条. diff --git a/addons/advanced_throwing/CfgEventHandlers.hpp b/addons/advanced_throwing/CfgEventHandlers.hpp index 0d3301d6e0..9426fa861e 100644 --- a/addons/advanced_throwing/CfgEventHandlers.hpp +++ b/addons/advanced_throwing/CfgEventHandlers.hpp @@ -12,6 +12,6 @@ class Extended_PreInit_EventHandlers { class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient)); }; }; diff --git a/addons/advanced_throwing/CfgVehicles.hpp b/addons/advanced_throwing/CfgVehicles.hpp index 043de34bdb..6eab1b7501 100644 --- a/addons/advanced_throwing/CfgVehicles.hpp +++ b/addons/advanced_throwing/CfgVehicles.hpp @@ -58,7 +58,7 @@ class CfgVehicles { class ACE_Actions { class GVAR(pickUp) { displayName = CSTRING(PickUp); - condition = QUOTE([ARR_2(_player,true)] call FUNC(canPrepare)); + condition = QUOTE(_player call FUNC(canPrepare)); statement = QUOTE(_this call FUNC(pickUp)); distance = 1.8; // Requires >1.7 to work when standing with weapon on back icon = "\a3\ui_f\data\igui\cfg\actions\obsolete\ui_action_takemine_ca.paa"; diff --git a/addons/advanced_throwing/XEH_postInit.sqf b/addons/advanced_throwing/XEH_postInitClient.sqf similarity index 84% rename from addons/advanced_throwing/XEH_postInit.sqf rename to addons/advanced_throwing/XEH_postInitClient.sqf index 0f5cb6983e..75df42bf34 100644 --- a/addons/advanced_throwing/XEH_postInit.sqf +++ b/addons/advanced_throwing/XEH_postInitClient.sqf @@ -1,8 +1,5 @@ #include "script_component.hpp" -// Fired XEH -[QGVAR(throwFiredXEH), FUNC(throwFiredXEH)] call CBA_fnc_addEventHandler; - // Exit on HC if (!hasInterface) exitWith {}; @@ -11,7 +8,7 @@ GVAR(ammoMagLookup) = call CBA_fnc_createNamespace; { { private _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo"); - if (_ammo != "") then { GVAR(ammoMagLookup) setVariable [_ammo, _x]; }; + GVAR(ammoMagLookup) setVariable [_ammo, _x]; } count (getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines")); nil } count getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles"); @@ -66,14 +63,6 @@ GVAR(ammoMagLookup) = call CBA_fnc_createNamespace; [_this select 1, "Player changed"] call FUNC(exitThrowMode); }] call CBA_fnc_addPlayerEventhandler; -["visibleMap", { - params ["", "_visibleMap"]; // command visibleMap is updated one frame later - if (_visibleMap && {ACE_player getVariable [QGVAR(inHand), false]}) then { - [ACE_player, "Opened Map"] call FUNC(exitThrowMode); - }; -}] call CBA_fnc_addPlayerEventhandler; - - ["ace_interactMenuOpened", { // Exit if advanced throwing is disabled (pick up only supports advanced throwing) if (!GVAR(enabled)) exitWith {}; @@ -91,13 +80,8 @@ GVAR(ammoMagLookup) = call CBA_fnc_createNamespace; }] call CBA_fnc_addEventHandler; -// Set last thrown time on Vanilla Throwing and Advanced Throwing -["ace_firedPlayer", { - //IGNORE_PRIVATE_WARNING ["_unit", "_weapon"]; - if (_weapon == "Throw") then { - _unit setVariable [QGVAR(lastThrownTime), CBA_missionTime]; - }; -}] call CBA_fnc_addEventHandler; +// Fired XEH +[QGVAR(throwFiredXEH), FUNC(throwFiredXEH)] call CBA_fnc_addEventHandler; // Display handlers @@ -116,7 +100,8 @@ addMissionEventHandler ["Draw3D", { // Blue is predicted before throw, red is re drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [0,0,1,1], _newTrajAGL, 1, 1, 0, "", 2]; } forEach GVAR(predictedPath); { - drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [1,0,0,1], _x, 1, 1, 0, "", 2]; + _newTrajAGL = _x; + drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [1,0,0,1], _newTrajAGL, 1, 1, 0, "", 2]; } forEach GVAR(flightPath) }]; #endif diff --git a/addons/advanced_throwing/XEH_preInit.sqf b/addons/advanced_throwing/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/advanced_throwing/XEH_preInit.sqf +++ b/addons/advanced_throwing/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/advanced_throwing/functions/fnc_canPrepare.sqf b/addons/advanced_throwing/functions/fnc_canPrepare.sqf index 2e9547fd35..396fd7ea5c 100644 --- a/addons/advanced_throwing/functions/fnc_canPrepare.sqf +++ b/addons/advanced_throwing/functions/fnc_canPrepare.sqf @@ -4,7 +4,6 @@ * * Arguments: * 0: Unit - * 1: Ignore Last Thrown Time (default: false) * * Return Value: * Can Prepare @@ -16,19 +15,14 @@ */ #include "script_component.hpp" -params ["_unit", ["_ignoreLastThrownTime", false]]; - -// Don't delay when picking up -if (_ignoreLastThrownTime) then { - _unit setVariable [QGVAR(lastThrownTime), -1]; -}; +params ["_unit"]; GVAR(enabled) && -#ifdef ALLOW_QUICK_THROW -{true} && -#else +#ifndef DEBUG_MODE_FULL {_unit getVariable [QGVAR(lastThrownTime), CBA_missionTime - 3] < CBA_missionTime - 2} && // Prevent throwing in quick succession +#else +{true} && #endif {!(call EFUNC(common,isFeatureCameraActive))} && diff --git a/addons/advanced_throwing/functions/fnc_drawArc.sqf b/addons/advanced_throwing/functions/fnc_drawArc.sqf index 0935b75ab5..53398f7b2f 100644 --- a/addons/advanced_throwing/functions/fnc_drawArc.sqf +++ b/addons/advanced_throwing/functions/fnc_drawArc.sqf @@ -47,15 +47,11 @@ for "_i" from 0.05 to 1.45 step 0.1 do { if (_newTrajASL distance (getPosASLVisual ACE_player) <= 20) then { if ((ASLToATL _newTrajASL) select 2 <= 0) then { - _cross = 1; // 1: Distance Limit (Green) + _cross = 1 } else { // Even vanilla throwables go through glass, only "GEOM" LOD will stop it but that will also stop it when there is glass in a window - if (lineIntersects [_prevTrajASL, _newTrajASL]) then { // Checks the "VIEW" LOD - _cross = 2; // 2: View LOD Block (Red) - } else { - if (!((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isEqualTo [])) then { - _cross = 3; // 3: GEOM/FIRE LOD Block (Yellow) - pass a3 bulding glass, but blocked on some CUP glass - }; + if (lineIntersects [_prevTrajASL, _newTrajASL]) then { + _cross = 2; }; }; @@ -64,7 +60,7 @@ for "_i" from 0.05 to 1.45 step 0.1 do { private _movePerc = linearConversion [3, 0, vectorMagnitude (velocity ACE_player), 0, 1, true]; _alpha = _alpha * _movePerc; - private _col = [ [1, 1, 1, _alpha], [0, 1, 0, _alpha], [1, 0, 0, _alpha], [1, 1, 0, _alpha] ] select _cross; + private _col = [ [1, 1, 1, _alpha], [0, 1, 0, _alpha], [1, 0, 0, _alpha] ] select _cross; if (_cross != 2 && {lineIntersects [eyePos ACE_player, _newTrajASL]}) then { _col set [3, 0.1] diff --git a/addons/advanced_throwing/functions/fnc_drawThrowable.sqf b/addons/advanced_throwing/functions/fnc_drawThrowable.sqf index 4f7a27ec65..14fbb567d2 100644 --- a/addons/advanced_throwing/functions/fnc_drawThrowable.sqf +++ b/addons/advanced_throwing/functions/fnc_drawThrowable.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -if (dialog || {!(ACE_player getVariable [QGVAR(inHand), false])} || {!([ACE_player, true] call FUNC(canPrepare))}) exitWith { +if (dialog || {!(ACE_player getVariable [QGVAR(inHand), false])} || {!([ACE_player] call FUNC(canPrepare))}) exitWith { [ACE_player, "In dialog or no throwable in hand or cannot prepare throwable"] call FUNC(exitThrowMode); }; @@ -36,11 +36,6 @@ if (_throwable isEqualTo [] && {!_primed}) exitWith { private _throwableMag = _throwable param [0, "#none"]; -// If not primed, double check we actually have the magazine in inventory -if ((!_primed) && {!((_throwableMag in (uniformItems ACE_player)) || {_throwableMag in (vestItems ACE_player)} || {_throwableMag in (backpackItems ACE_player)})}) exitWith { - [ACE_player, "No valid throwable (glitched currentThrowable)"] call FUNC(exitThrowMode); -}; - // Get correct throw power for primed grenade if (_primed) then { private _ammoType = typeOf _activeThrowable; @@ -68,7 +63,7 @@ private _power = linearConversion [0, 180, _phi - 30, 1, 0.3, true]; ACE_player setVariable [QGVAR(throwSpeed), _throwSpeed * _power]; #ifdef DEBUG_MODE_FULL -hintSilent format ["Heading: %1\nPower: %2\nSpeed: %3\nThrowMag: %4\nMuzzle: %5", _phi, _power, _throwSpeed * _power, _throwableMag, ACE_player getVariable [QGVAR(activeMuzzle), ""]]; +hintSilent format ["Heading: %1\nPower: %2\nSpeed: %3\nThrowMag: %4", _phi, _power, _throwSpeed * _power, _throwableMag]; #endif private _throwableType = getText (configFile >> "CfgMagazines" >> _throwableMag >> "ammo"); @@ -76,25 +71,16 @@ private _throwableType = getText (configFile >> "CfgMagazines" >> _throwableMag if (!([ACE_player] call FUNC(canThrow)) && {!_primed}) exitWith { if (!isNull _activeThrowable) then { deleteVehicle _activeThrowable; - // Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory) - ACE_player setAmmo [ACE_player getVariable [QGVAR(activeMuzzle), ""], 1]; }; }; if (isNull _activeThrowable || {(_throwableType != typeOf _activeThrowable) && {!_primed}}) then { if (!isNull _activeThrowable) then { deleteVehicle _activeThrowable; - // Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory) - ACE_player setAmmo [ACE_player getVariable [QGVAR(activeMuzzle), ""], 1]; }; _activeThrowable = _throwableType createVehicleLocal [0, 0, 0]; _activeThrowable enableSimulation false; ACE_player setVariable [QGVAR(activeThrowable), _activeThrowable]; - - // Set muzzle ammo to 0 to block vanilla throwing (can only be 0 or 1) - private _muzzle = _throwableMag call FUNC(getMuzzle); - ACE_player setAmmo [_muzzle, 0]; - ACE_player setVariable [QGVAR(activeMuzzle), _muzzle]; }; // Exit in case of explosion in hand diff --git a/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf b/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf index 33ff556f6a..fd6cb7b998 100644 --- a/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf +++ b/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf @@ -25,26 +25,13 @@ if !(_unit getVariable [QGVAR(inHand), false]) exitWith {}; systemChat format ["Exit Throw Mode: %1", _reason]; #endif -private _activeThrowable = _unit getVariable [QGVAR(activeThrowable), objNull]; if !(_unit getVariable [QGVAR(primed), false]) then { - deleteVehicle _activeThrowable; -} else { - _unit setVariable [QGVAR(lastThrownTime), CBA_missionTime]; - // Fix floating for throwables without proper physics (eg. IR Grenade) - _activeThrowable setVelocity [0, 0, -0.1]; - - // Set thrower - private _instigator = (getShotParents _activeThrowable) param [1, _unit]; // getShotParents could be [] on replaced grenades (like IR chemlight) - [QEGVAR(common,setShotParents), [_activeThrowable, _unit, _instigator]] call CBA_fnc_serverEvent; + deleteVehicle (_unit getVariable [QGVAR(activeThrowable), objNull]); }; -// Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory) -_unit setAmmo [_unit getVariable [QGVAR(activeMuzzle), ""], 1]; - _unit setVariable [QGVAR(inHand), false]; _unit setVariable [QGVAR(primed), false]; _unit setVariable [QGVAR(activeThrowable), objNull]; -_unit setVariable [QGVAR(activeMuzzle), ""]; _unit setVariable [QGVAR(throwType), THROW_TYPE_DEFAULT]; _unit setVariable [QGVAR(throwSpeed), THROW_SPEED_DEFAULT]; _unit setVariable [QGVAR(dropMode), false]; diff --git a/addons/advanced_throwing/functions/fnc_moduleInit.sqf b/addons/advanced_throwing/functions/fnc_moduleInit.sqf index fe380d2bb5..2130319067 100644 --- a/addons/advanced_throwing/functions/fnc_moduleInit.sqf +++ b/addons/advanced_throwing/functions/fnc_moduleInit.sqf @@ -13,7 +13,8 @@ * Example: * [logic, [unit1, unit2], true] call ace_advanced_throwing_fnc_moduleInit * - * Public: No + * Public: + * No */ #include "script_component.hpp" @@ -29,4 +30,4 @@ if (!_activated) exitWith {}; [_logic, QGVAR(enablePickUp), "enablePickUp"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(enablePickUpAttached), "enablePickUpAttached"] call EFUNC(common,readSettingFromModule); -INFO_1("Advanced Throwing Module Initialized. Enabled: %1",GVAR(enabled)); +ACE_LOGINFO_1("Advanced Throwing Module Initialized. Enabled: %1",GVAR(enabled)); diff --git a/addons/advanced_throwing/functions/fnc_prepare.sqf b/addons/advanced_throwing/functions/fnc_prepare.sqf index 6245b0627e..b9e75ea480 100644 --- a/addons/advanced_throwing/functions/fnc_prepare.sqf +++ b/addons/advanced_throwing/functions/fnc_prepare.sqf @@ -23,15 +23,12 @@ if (_unit getVariable [QGVAR(inHand), false]) exitWith { TRACE_1("inHand",_unit); if (!(_unit getVariable [QGVAR(primed), false])) then { TRACE_1("not primed",_unit); - // Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory) - // selectNextGrenade relies on muzzles array (setAmmo 0 removes the muzzle from the array and current can't be found, cycles between 0 and 1 muzzles) - ACE_player setAmmo [ACE_player getVariable [QGVAR(activeMuzzle), ""], 1]; [_unit] call EFUNC(weaponselect,selectNextGrenade); }; }; // Try selecting next throwable if none currently selected -if (isNull (_unit getVariable [QGVAR(activeThrowable), objNull]) && {(currentThrowable _unit) isEqualTo []} && {!([_unit] call EFUNC(weaponselect,selectNextGrenade))}) exitWith { +if ((isNull (_unit getVariable [QGVAR(activeThrowable), objNull])) && {(currentThrowable _unit) isEqualTo []} && {!([_unit] call EFUNC(weaponselect,selectNextGrenade))}) exitWith { TRACE_1("no throwables",_unit); }; diff --git a/addons/advanced_throwing/functions/fnc_prime.sqf b/addons/advanced_throwing/functions/fnc_prime.sqf index d52bee67f2..84a3b0465a 100644 --- a/addons/advanced_throwing/functions/fnc_prime.sqf +++ b/addons/advanced_throwing/functions/fnc_prime.sqf @@ -26,16 +26,7 @@ private _throwableMag = (currentThrowable _unit) select 0; _unit removeItem _throwableMag; private _throwableType = getText (configFile >> "CfgMagazines" >> _throwableMag >> "ammo"); -private _muzzle = _unit getVariable [QGVAR(activeMuzzle), ""]; - -// Set muzzle ammo to 0 to block vanilla throwing (can only be 0 or 1), removeItem above resets it -_unit setAmmo [_muzzle, 0]; - -// Handle weird scripted grenades (RHS) which could cause unexpected behaviour -private _nonInheritedCfg = configProperties [configFile >> "CfgAmmo" >> _throwableType, 'configName _x == QGVAR(replaceWith)', false]; -if ((count _nonInheritedCfg) == 1) then { - _throwableType = getText (_nonInheritedCfg select 0); -}; +private _muzzle = _throwableMag call FUNC(getMuzzle); // Create actual throwable globally private _activeThrowableOld = _unit getVariable [QGVAR(activeThrowable), objNull]; @@ -54,9 +45,6 @@ deleteVehicle _activeThrowableOld; _activeThrowable // projectile ]] call CBA_fnc_globalEvent; -// Set prime instigator -[QEGVAR(common,setShotParents), [_activeThrowable, _unit, _unit]] call CBA_fnc_serverEvent; - if (_showHint) then { // Show primed hint private _displayNameShort = getText (configFile >> "CfgMagazines" >> _throwableMag >> "displayNameShort"); diff --git a/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf b/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf index 9f2743c600..7e9e5486dc 100644 --- a/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf +++ b/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf @@ -7,7 +7,7 @@ * None * * Return Value: - * None + * Nothing * * Example: * call ace_advanced_throwing_fnc_renderPickUpInteraction @@ -22,19 +22,15 @@ // isNull is necessarry to prevent rare error when ending mission with interact key down if (EGVAR(interact_menu,keyDown) && {!isNull ACE_player}) then { - // Rescan when player moved >5 meters from last pos, nearObjects can be costly with a lot of objects around + // Rescan when player moved >5 meters from last pos, nearObjects is costly if ((getPosASL ACE_player) distance _setPosition > 5) then { - // Grenades inherit from GrenadeHand, IR throwbles from IRStrobeBase, IR Chemlights are special snowflakes - // nearEntities does not see throwables + // IR throwbles inherit from GrenadeCore, others from GrenadeHand, IR Chemlights are special snowflakes _nearThrowables = ACE_player nearObjects ["GrenadeHand", PICK_UP_DISTANCE]; - _nearThrowables append (ACE_player nearObjects ["IRStrobeBase", PICK_UP_DISTANCE]); + _nearThrowables append (ACE_player nearObjects ["GrenadeCore", PICK_UP_DISTANCE]); _nearThrowables append (ACE_player nearObjects ["ACE_Chemlight_IR_Dummy", PICK_UP_DISTANCE]); { - if (!(_x in _throwablesHelped) && - {!(_x isKindOf "SmokeShellArty")} && {!(_x isKindOf "G_40mm_Smoke")} && // All smokes inherit from "GrenadeHand" >> "SmokeShell" - {GVAR(enablePickUpAttached) || {!GVAR(enablePickUpAttached) && {isNull (attachedTo _x)}}} - ) then { + if (!(_x in _throwablesHelped) && {GVAR(enablePickUpAttached) || {!GVAR(enablePickUpAttached) && {isNull (attachedTo _x)}}}) then { TRACE_2("Making PickUp Helper",_x,typeOf _x); private _pickUpHelper = QGVAR(pickUpHelper) createVehicleLocal [0, 0, 0]; diff --git a/addons/advanced_throwing/functions/fnc_throw.sqf b/addons/advanced_throwing/functions/fnc_throw.sqf index a3273eb034..0d92a4a7c0 100644 --- a/addons/advanced_throwing/functions/fnc_throw.sqf +++ b/addons/advanced_throwing/functions/fnc_throw.sqf @@ -54,6 +54,8 @@ if (!(_unit getVariable [QGVAR(primed), false])) then { _activeThrowable setVelocity _newVelocity; }; + _unit setVariable [QGVAR(lastThrownTime), CBA_missionTime]; + // Invoke listenable event ["ace_throwableThrown", [_unit, _activeThrowable]] call CBA_fnc_localEvent; }, [ diff --git a/addons/advanced_throwing/script_component.hpp b/addons/advanced_throwing/script_component.hpp index 4beb0ee342..abea16868f 100644 --- a/addons/advanced_throwing/script_component.hpp +++ b/addons/advanced_throwing/script_component.hpp @@ -3,9 +3,9 @@ #include "\z\ace\addons\main\script_mod.hpp" // #define DRAW_THROW_PATH -// #define ALLOW_QUICK_THROW // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_ADVANCED_THROWING diff --git a/addons/advanced_throwing/stringtable.xml b/addons/advanced_throwing/stringtable.xml index 66dbd8e500..1c3729d06e 100644 --- a/addons/advanced_throwing/stringtable.xml +++ b/addons/advanced_throwing/stringtable.xml @@ -1,257 +1,89 @@ - + Advanced Throwing Улучшенный бросок гранат - アドバンスド投てき - Zaawansowane rzucanie - Erweitertes Wurfsystem - 고급 투척 - Lancé amélioré - Lancio Avanzato - 進階投擲 - 进阶投掷 Allows changing advanced throwing behaviour. Позволяет настраивать поведение улучшенного броска гранат. - アドバンスド投てきの挙動変更を許可します。 - Zezwala na zmianę zachowania zaawansowanego trybu rzucania. - Erlaubt es, das Verhalten des erweiterten Wurfsystems zu ändern. - 고급 투척 행위를 허가합니다 - Permet de changer la configuration du lancé amélioré. - Permette il cambiamento della modalità di tiro. - 允許使用更多不同的投擲方式. - 允许使用更多不同的投掷方式. Enable Advanced Throwing Включить улучшенный бросок - アドバンスド投てきを有効化 - Aktywuj zaawansowane rzucanie - Aktiviere erweitertes Wurfsystem - 고급 투척 활성화 - Active le lancé amélioré - Abilita Lancio Avanzato - 啟用進階投擲 - 启用进阶投掷 Enables advanced throwing system. Включает систему улучшенного броска. - アドバンスド投てきシステムを有効化 - Aktywuje system zaawansowanego rzucania. - Aktiviert das erweiterte Wurfsystem. - 고급 투척을 활성화 합니다 - Active le système de lancé amélioré. - Abilita il sistema di lancio avanzato. - 啟用進階投擲系統. - 启用进阶投掷系统. Show Throw Arc Показать траекторию броска - 軌道を表示 - Pokaż trasę lotu - Zeige Wurfbogen - 투척 궤적 표시 - Afficher l'arc de lancé - Mostra Arco di Tiro - 顯示投擲軌道 - 显示投掷轨道 Enables visualization of the throw arc (where throwable will fly). Включает визуализацию траектории броска (как полетит граната). - 投てき物の予測軌道の表示を有効化します。 - Wyświetla wizualizację trasy przelotu granatu. - Aktiviert die Visualisierung des Wurfbogens (wohin das Objekt geworfen werden wird). - 투척 궤도를 시각화 합니다(투척물이 어디로 갈지) - Active la visualisation de l'arc de lancé (où l'objet lancé va atterrir). - Abilita la visualizzazione dell'arco del tiro (dove l'oggetto lanciabile volerà). - 顯示投擲軌道幫助投擲. - 显示投掷轨道帮助投掷. Show Throwing Mouse Controls Показывать управление мышью - 投てきのマウス操作を表示 - Pokaż podpowiedzi sterowania myszą - Zeige Maussteuerung beim Werfen - 마우스 조작 표시 - Afficher les contrôles à la souris du lancé - Mostra Comandi Mouse Lancio - 顯示滑鼠投擲控制提示 - 显示滑鼠投掷控制提示 Enables visual cues for mouse controls when throwable is prepared. Включает отображение подсказок по управлению мышью, когда граната подготовлена. - 投てき物を投げるとき、マウス操作の説明表示を有効化します。 - Wyświetla podpowiedzi sterowania myszą kiedy obiekt miotany jest w ręku. - Aktiviert visuelle Hinweise zur Maussteuerung, wenn ein Objekt zum Werfen vorbereitet wird. - 투척물을 준비시 마우스 조작을 시각화해서 보여줍니다 - Active les aides visuels pour les controles à la souris lorsqu'un lancé est préparé. - Abilita la visualizzazione dei controlli del mouse quando l'oggetto lanciabile è pronto. - 開啟後會在準備投擲時, 顯示滑鼠相關操作. - 开启后会在准备投掷时, 显示滑鼠相关操作. Enable Throwables Pick Up Включить подбор гранат - 投てき物の拾い上げを有効化 - Zezwól na podnoszenie obiektów miotanych - Aktiviere Aufheben von Wurfobjekten - 투척물 줍기 활성화 - Active la récupération des objets lancés - Abilita Raccogli Oggetti - 啟用可撿取地面投擲物 - 启用可捡取地面投掷物 Enables ability to pick up throwables from the ground. Включает возможность подбирать гранаты с земли. - 地面に落ちている投てき物の拾い上げ動作を有効化します。 - Umożliwia podnoszenie obiektów miotanych z ziemi. - Aktiviert die Möglichkeit, geworfene Objekte wieder vom Boden aufzuheben. - 땅에 떨어진 투척물을 주울 수 있게 해줍니다. - Active la capacité de récupérer les objets lancés sur le sol. - Abilita la possibilità di raccogliere un oggetto lanciabile da terra. - 啟用後, 可撿取地面上的投擲物. - 启用后, 可捡取地面上的投掷物. Enable Attached Throwables Pick Up Включить подбор прикрепленных гранат - 拾い上げた投てき物の取り付けを有効化 - Zezwól na podnoszenie przyczepionych obiektów miotanych - Aktiviere erneute Aufnahme befestigter Wurfobjekte - 부착 투척물 줍기 활성화 - Active le ramassage d'objets lançables attachés - Abilita Raccogli Oggetti Lanciabili da altri Oggetti - 啟用可撿取附著投擲物 - 启用可捡取附着投掷物 Enables ability to pick up throwables from attached objects. Включает возможность подбирать гранаты, прикрепленные к объектам. - オブジェクトに取り付けられていた投てき物を拾い上げられるようにします。 - Umożliwia podnoszenie obiektów miotanych przyczepionych do innych obiektów. - Aktiviert die Möglichkeit, befestigte Wurfobjekte erneut aufzunehmen. - 부착된 투척물을 주울 수 있게 해줍니다. - Active la capacité à ramasser les objets lançables attaché à d'autres objets. - Abilita la possibilità di raccogliere gli oggetti lanciabili dagli altri oggetti. - 啟用後, 可撿取附著在物件上的投擲物. - 启用后, 可捡取附着在物件上的投掷物. Prepare/Change Throwable Подготовить/заменить гранату - 機能の起動/変更 - Przygotuj/zmień ob. miotany - Wurfobjekt vorbereiten/wechseln - 투척물 준비/변경 - Préparer/changer d'objet - Prepara/Cambia Oggetto lanciabile - 準備/變更投擲物 - 准备/变更投掷物 Throwable Drop Mode (Hold) Режим броска гранаты (удерживать) - 投てきモード (押しっぱ) - Tryb upuszczania ob. miotanego (przytrzymaj) - Wurfobjekt Fallmodus (halten) - 투척물 떨어뜨리기 모드(꾹눌러서) - Mode de lancé de l'objet (Tenir) - Modalità Oggetto Gettabile (Mantenere) - 投擲模式 (按住) - 投掷模式 (按住) Throwable Drop Mode (Toggle) Режим броска гранаты (переключить) - 投てきモード (トグル) - Tryb upuszczania ob. miotanego (przełącz) - Wurfobjekt Fallmodus (umschalten) - 투척물 떨어뜨리기 모드(토글) - Mode de lancé de l'objet (Basculer) - Modalità Oggetto lanciabile Gettabile (Interruttore) - 投擲模式 (切換) - 投掷模式 (切换) Primed Подготовлена - 起動した - Odbezpieczony - Scharf gemacht - 뇌관 작동 - Amorcer - Armato - 引信開始燃燒 - 引信开始燃烧 Throw Бросить - 投げる - Rzuć - Werfen - 던지기 - Lancer - Lanciare - 投擲 - 投掷 (Scroll) Change Mode (Скролл) Изменить режим - (スクロール) モード変更 - (Kółko m.) zmień tryb - (Scrollen) Modus wechseln - (마우스 휠) 모드 변경 - (Molette souris) Changer de mode - (Scorrere) Cambio Modalità - (滾輪) 變更模式 - (滚轮) 变更模式 (Scroll) Extend (Скролл) Увеличить - (スクロール) 遠くに - (Kółko m.) przedłuż - (Scrollen) Erweitern - (마우스 휠) 연장 - (Molette souris) Etendre - (Scorrere) Estendere - (滾輪) 延長 - (滚轮) 延长 (Click) Cook (Клик) Подготовить - (クリック) 起爆 - (Kliknięcie) Odbezpiecz - (Klicken) Abkochen - (클릭) 예열 - (Clique) Dégoupiller - (Click) Arma - (點擊) 提早拉開引信 - (点击) 提早拉开引信 Pick Up Подобрать - 拾い上げる - Podnieś - Aufheben - 줍기 - Ramasser - Raccogli - 撿取 - 捡取 diff --git a/addons/ai/CfgAISkill.hpp b/addons/ai/CfgAISkill.hpp new file mode 100644 index 0000000000..c01b5eb96e --- /dev/null +++ b/addons/ai/CfgAISkill.hpp @@ -0,0 +1,28 @@ + +/* + * Documentation: + * https://community.bistudio.com/wiki/AI_Sub-skills + * + * The idea here is to reduce the AI's godlike aiming + * capabilties while retaining it's high intelligence. + * The AI should be smart enough to move through a town, + * but also be 'human' in their reaction time and aim. + * + * Note: All these values can still be adjusted via + * scripts, these arrays just change what 0 & 1 + * are for setSkill. + */ + +class CfgAISkill { + aimingAccuracy[] = {0,0, 1,0.8}; // {0,0,1,1}; v1.26 defaults + aimingShake[] = {0,0, 1,0.6}; // {0,0,1,1}; + aimingSpeed[] = {0,0, 1,0.7}; // {0,0.5,1,1}; + commanding[] = {0,0, 1,0.8}; // {0,0,1,1}; + courage[] = {0,0, 1,0.7}; // {0,0,1,1}; + endurance[] = {0,0, 1,0.7}; // {0,0,1,1}; + general[] = {0,0, 1,0.9}; // {0,0,1,1}; + // apparently breaks rapid firing in single fire mode for players + //reloadSpeed[] = {0,0, 1,0.8}; // {0,0,1,1}; + spotDistance[] = {0,0, 1,0.9}; // {0,0.2,1,0.4}; + spotTime[] = {0,0, 1,0.7}; // {0,0,1,0.7}; +}; diff --git a/addons/ai/CfgWeapons.hpp b/addons/ai/CfgWeapons.hpp index 01d8d5f9c2..be3245cce3 100644 --- a/addons/ai/CfgWeapons.hpp +++ b/addons/ai/CfgWeapons.hpp @@ -2,6 +2,8 @@ // weapon config changes, by commy2 /* documentation: +aiDispersionCoefX = 1.0 Dispersion multiplier for AI units (axis X - left to right). +aiDispersionCoefY = 1.0 Dispersion multiplier for AI units (axis Y - top-down). aiRateOfFire = 5.0 Delay between shots at given aiRateOfFireDistance. aiRateOfFireDistance = 500 At shorter distance delay (aiRateOfFire) goes linearly to zero. */ @@ -13,12 +15,19 @@ class Mode_FullAuto; class CfgWeapons { // rifles - class Rifle_Base_F; - class Rifle_Short_Base_F; - class Rifle_Long_Base_F; + class RifleCore; + class Rifle: RifleCore { + aiDispersionCoefX = 6; + aiDispersionCoefY = 6; + }; + + class Rifle_Base_F: Rifle {}; + class Rifle_Long_Base_F: Rifle_Base_F {}; // MX class arifle_MX_Base_F: Rifle_Base_F { + aiDispersionCoefY = 18.0; + aiDispersionCoefX = 12.0; modes[] += {"ACE_Burst_far"}; class Single: Mode_SemiAuto { @@ -61,6 +70,8 @@ class CfgWeapons { // MX carbine class arifle_MXC_F: arifle_MX_Base_F { + aiDispersionCoefY = 18.0; + aiDispersionCoefX = 12.0; class Single: Single { minRange = 120; // 2; @@ -132,6 +143,8 @@ class CfgWeapons { // MX machine gun class arifle_MX_SW_F: arifle_MX_Base_F { + aiDispersionCoefY = 24.0; + aiDispersionCoefX = 21.0; // Shit is still broken //modes[] += {"ACE_Burst_far"}; modes[] = {"Single","manual","close","short","medium","far_optic1","far_optic2","ACE_Burst_far"}; @@ -167,6 +180,8 @@ class CfgWeapons { // Katiba class arifle_Katiba_Base_F: Rifle_Base_F { + aiDispersionCoefY = 18.0; + aiDispersionCoefX = 12.0; modes[] += {"ACE_Burst_far"}; class Single: Mode_SemiAuto { @@ -209,6 +224,8 @@ class CfgWeapons { // Katiba carbine class arifle_Katiba_C_F: arifle_Katiba_Base_F { + aiDispersionCoefY = 18.0; + aiDispersionCoefX = 12.0; class Single: Single { minRange = 120; // 2; @@ -251,6 +268,8 @@ class CfgWeapons { // F2002 class mk20_base_F: Rifle_Base_F { + aiDispersionCoefY = 18.0; + aiDispersionCoefX = 12.0; modes[] += {"ACE_Burst_far"}; class Single: Mode_SemiAuto { @@ -297,6 +316,8 @@ class CfgWeapons { // F2002 carbine class arifle_Mk20C_F: mk20_base_F { + aiDispersionCoefY = 18.0; + aiDispersionCoefX = 12.0; class Single: Single { minRange = 120; // 2; @@ -337,6 +358,8 @@ class CfgWeapons { // TAR-20 class Tavor_base_F: Rifle_Base_F { + aiDispersionCoefY = 18.0; + aiDispersionCoefX = 12.0; modes[] += {"ACE_Burst_far"}; class Single: Mode_SemiAuto { @@ -384,6 +407,8 @@ class CfgWeapons { // TAR-21 class arifle_TRG21_F: Tavor_base_F { + aiDispersionCoefY = 18.0; + aiDispersionCoefX = 12.0; class Single: Single { minRange = 120; // 2; @@ -432,6 +457,8 @@ class CfgWeapons { // SDAR class SDAR_base_F: Rifle_Base_F { + aiDispersionCoefY = 28.0; + aiDispersionCoefX = 20.0; class Single: Mode_SemiAuto { minRange = 10; //2; @@ -443,7 +470,9 @@ class CfgWeapons { }; // PD2000 - class pdw2000_base_F: Rifle_Short_Base_F { + class pdw2000_base_F: Rifle_Base_F { + aiDispersionCoefY = 18.0; + aiDispersionCoefX = 12.0; class Single: Mode_SemiAuto { minRange = 100; //2; @@ -455,7 +484,9 @@ class CfgWeapons { }; // Vector - class SMG_01_Base: Rifle_Short_Base_F { + class SMG_01_Base: Rifle_Base_F { + aiDispersionCoefY = 18.0; + aiDispersionCoefX = 12.0; class Single: Mode_SemiAuto { minRange = 50; //2; @@ -467,7 +498,9 @@ class CfgWeapons { }; // Scorpion EVO - class SMG_02_base_F: Rifle_Short_Base_F { + class SMG_02_base_F: Rifle_Base_F { + aiDispersionCoefY = 18.0; + aiDispersionCoefX = 12.0; class Single: Mode_SemiAuto { minRange = 50; //2; @@ -482,6 +515,8 @@ class CfgWeapons { // Stoner class LMG_Mk200_F: Rifle_Long_Base_F { + aiDispersionCoefY = 24.0; + aiDispersionCoefX = 21.0; modes[] += {"ACE_Burst_far"}; class medium; @@ -509,6 +544,8 @@ class CfgWeapons { // Negev class LMG_Zafir_F: Rifle_Long_Base_F { + aiDispersionCoefY = 23.0; + aiDispersionCoefX = 19.0; modes[] += {"ACE_Burst_far"}; class Single: Mode_SemiAuto { @@ -682,6 +719,8 @@ class CfgWeapons { // marksmen medium mg class MMG_01_base_F: Rifle_Long_Base_F { + aiDispersionCoefY = 25.0; + aiDispersionCoefX = 20.0; modes[] += {"ACE_Burst_far"}; class manual; @@ -706,6 +745,8 @@ class CfgWeapons { }; class MMG_02_base_F: Rifle_Long_Base_F { + aiDispersionCoefY = 20.0; + aiDispersionCoefX = 15.0; modes[] += {"ACE_Burst_far"}; class manual; diff --git a/addons/ai/README.md b/addons/ai/README.md index e3175b1006..40b4e776a4 100644 --- a/addons/ai/README.md +++ b/addons/ai/README.md @@ -1,7 +1,7 @@ ace_ai ====== -Overhaul of AI firing modes of vanilla weapons, encouraging the AI to use full-auto and bursts more often. +Minor changes of AI skill and overhaul of AI firing modes of vanilla weapons, encouraging the AI to use full-auto and bursts more often. ## Maintainers diff --git a/addons/ai/config.cpp b/addons/ai/config.cpp index a269bdcdbc..60bf7184a4 100644 --- a/addons/ai/config.cpp +++ b/addons/ai/config.cpp @@ -14,4 +14,5 @@ class CfgPatches { }; }; +#include "CfgAISkill.hpp" #include "CfgWeapons.hpp" diff --git a/addons/ai/script_component.hpp b/addons/ai/script_component.hpp index 9a0afcf434..08d24079ba 100644 --- a/addons/ai/script_component.hpp +++ b/addons/ai/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_AI diff --git a/addons/aircraft/CfgAmmo.hpp b/addons/aircraft/CfgAmmo.hpp index 0da9c7760f..2c3701b8e0 100644 --- a/addons/aircraft/CfgAmmo.hpp +++ b/addons/aircraft/CfgAmmo.hpp @@ -1,3 +1,4 @@ + class CfgAmmo { class BulletBase; class B_20mm : BulletBase { @@ -10,11 +11,11 @@ class CfgAmmo { explosive = 1.8; tracersEvery = 3; tracerEndTime = 3.5; + CraterEffects = "ExploAmmoCrater"; explosionEffects = "ExploAmmoExplosion"; model = "\A3\Weapons_f\Data\bullettracer\tracer_red"; }; - class ACE_20mm_HE : B_20mm {}; class ACE_20mm_AP : B_20mm { hit = 50; @@ -39,20 +40,30 @@ class CfgAmmo { // also adjust tracer, "muh lightshow"; also adjust splash damage radius class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase { - hit = 80; // default: 180 - indirectHit = 12; // default: 4 - indirectHitRange = 3; // default: 3 - caliber = 1.4; // default: 5 - deflecting = 3; // default: 5 - fuseDistance = 3; // default: 10 - tracerStartTime = 0.02; // default: 0.1 - timeToLive = 40; // default: 6 + hit = 80; + indirectHit = 12; + indirectHitRange = 3; //2; + caliber = 1.4; + deflecting = 3; + fuseDistance = 3; + tracerStartTime = 0.02; + timeToLive = 40; }; + // helper projectiles to simulate a rof > fps + class ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy: Gatling_30mm_HE_Plane_CAS_01_F { + simulation = "shotSubmunitions"; + triggerTime = 0; + submunitionAmmo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Sub"; + submunitionConeType[] = {"custom", {{0,0}, {0,0}, {0,0}} }; + }; + + class ACE_Gatling_30mm_HE_Plane_CAS_01_Sub: Gatling_30mm_HE_Plane_CAS_01_F {}; + // adjust damage and splash damage, closer to bluefor gatling with same caliber class Cannon_30mm_HE_Plane_CAS_02_F: Gatling_30mm_HE_Plane_CAS_01_F { - hit = 70; // default: 150 - indirectHit = 11; // default: 4 - indirectHitRange = 3; // default: 3 + hit = 70; //40; + indirectHit = 11; //14; + indirectHitRange = 3; }; }; diff --git a/addons/aircraft/CfgMagazines.hpp b/addons/aircraft/CfgMagazines.hpp index 19797b53d8..b09bac6943 100644 --- a/addons/aircraft/CfgMagazines.hpp +++ b/addons/aircraft/CfgMagazines.hpp @@ -1,7 +1,9 @@ + class CfgMagazines { // shoot helper object to tripple rof class VehicleMagazine; class 1000Rnd_Gatling_30mm_Plane_CAS_01_F: VehicleMagazine { + ammo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy"; count = 1170; }; diff --git a/addons/aircraft/CfgVehicles.hpp b/addons/aircraft/CfgVehicles.hpp index 3279d35f71..9839149b3d 100644 --- a/addons/aircraft/CfgVehicles.hpp +++ b/addons/aircraft/CfgVehicles.hpp @@ -1,3 +1,4 @@ + class CfgVehicles { class All { class Turrets; @@ -10,6 +11,7 @@ class CfgVehicles { }; class Air: AllVehicles {}; + class Helicopter: Air { class Turrets { class MainTurret; @@ -17,11 +19,13 @@ class CfgVehicles { }; class Plane: Air {}; + class ParachuteBase: Helicopter { class Turrets; }; class UAV: Plane {}; + class Helicopter_Base_F: Helicopter { class Turrets: Turrets { class CopilotTurret; @@ -33,10 +37,12 @@ class CfgVehicles { class Turrets: Turrets { class CopilotTurret; }; + //class UserActions; }; class Heli_Light_01_base_F: Helicopter_Base_H { - incomingMissileDetectionSystem = 16; // Vanilla: 0 + lockDetectionSystem = 0; + incomingMissileDetectionSystem = 16; driverCanEject = 1; class Turrets: Turrets { @@ -47,8 +53,17 @@ class CfgVehicles { }; }; + class Heli_Light_01_unarmed_base_F: Heli_Light_01_base_F {}; + + class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F { + /*class Turrets: Turrets { + class CopilotTurret: CopilotTurret {}; + };*/ + }; + class Heli_Light_01_armed_base_F: Heli_Light_01_base_F { - incomingMissileDetectionSystem = 16; // Vanilla: 0 + lockDetectionSystem = 0; + incomingMissileDetectionSystem = 16; driverCanEject = 1; class Turrets: Turrets { @@ -57,10 +72,14 @@ class CfgVehicles { }; }; }; + + class B_Heli_Light_01_armed_F: Heli_Light_01_armed_base_F {}; + class Heli_Light_02_base_F: Helicopter_Base_H { driverCanEject = 1; - incomingMissileDetectionSystem = 16; // Vanilla: 24 - magazines[] = {"2000Rnd_762x51_Belt_T_Green", "12Rnd_PG_missiles", "168Rnd_CMFlare_Chaff_Magazine"}; // Switch gun magazine to 7.62mm from 6.5mm + lockDetectionSystem = 12; + incomingMissileDetectionSystem = 16; + magazines[] = {"2000Rnd_762x51_Belt_T_Green","12Rnd_PG_missiles","168Rnd_CMFlare_Chaff_Magazine"}; class Turrets: Turrets { class CopilotTurret: CopilotTurret { @@ -78,8 +97,11 @@ class CfgVehicles { #include "Heli_Attack_01_base_F.hpp" + class B_Heli_Attack_01_F: Heli_Attack_01_base_F {}; + class Heli_Attack_02_base_F: Helicopter_Base_F { - incomingMissileDetectionSystem = 16; // Vanilla: 24 + lockDetectionSystem = 12; + incomingMissileDetectionSystem = 16; driverCanEject = 1; class Turrets: Turrets { @@ -90,7 +112,8 @@ class CfgVehicles { }; class Heli_Transport_01_base_F: Helicopter_Base_H { - incomingMissileDetectionSystem = 16; // Vanilla: 24 + lockDetectionSystem = 12; + incomingMissileDetectionSystem = 16; driverCanEject = 1; class Turrets: Turrets { @@ -98,21 +121,36 @@ class CfgVehicles { canEject = 1; showHMD = 1; }; - class MainTurret: MainTurret { - magazines[] = {"2000Rnd_762x51_Belt_T_Red"}; // Switch gun magazine to 7.62mm from 6.5mm + magazines[] = {"2000Rnd_762x51_Belt_T_Red"}; canEject = 1; }; - class RightDoorGun: MainTurret { - magazines[] = {"2000Rnd_762x51_Belt_T_Red"}; // Switch gun magazine to 7.62mm from 6.5mm + magazines[] = {"2000Rnd_762x51_Belt_T_Red"}; canEject = 1; }; }; + + /*class UserActions { + class DoorL1_Open { + available = 1; + condition = "((this doorPhase 'door_L') == 0) AND Alive(this) AND driver this != player AND gunner this != player"; + }; + class DoorR1_Open: DoorL1_Open { + condition = "((this doorPhase 'door_R') == 0) AND Alive(this) AND driver this != player AND gunner this != player"; + }; + class DoorL1_Close: DoorL1_Open { + condition = "((this doorPhase 'door_L') > 0) AND Alive(this) AND driver this != player AND gunner this != player"; + }; + class DoorR1_Close: DoorL1_Close { + condition = "((this doorPhase 'door_R') > 0) AND Alive(this) AND driver this != player AND gunner this != player"; + }; + };*/ }; class Heli_Transport_02_base_F: Helicopter_Base_H { - incomingMissileDetectionSystem = 16; // Vanilla: 24 + lockDetectionSystem = 12; + incomingMissileDetectionSystem = 16; driverCanEject = 1; class Turrets: Turrets { @@ -121,71 +159,186 @@ class CfgVehicles { showHMD = 1; }; }; + + /*class UserActions: UserActions { + class DoorL1_Open { + available = 1; + condition = "this animationPhase ""door_back_L"" < 0.5 AND Alive(this)"; + }; + class DoorR1_Open: DoorL1_Open { + condition = "this animationPhase ""door_back_R"" < 0.5 AND Alive(this)"; + }; + class DoorL1_Close: DoorL1_Open { + condition = "this animationPhase ""door_back_L"" > 0.5 AND Alive(this)"; + }; + class DoorR1_Close: DoorL1_Close { + condition = "this animationPhase ""door_back_R"" > 0.5 AND Alive(this)"; + }; + class CargoRamp_Open: DoorL1_Open { + userActionID = 52; + displayName = CSTRING(OpenCargoRamp); + textToolTip = CSTRING(OpenCargoRamp); + position = "action_cargoramp"; + radius = 3.0; + condition = "this animationPhase ""cargoramp_open"" < 0.5 AND Alive(this)"; + statement = "this animateDoor ['cargoramp_open', 1]"; + }; + class CargoRamp_Close: DoorL1_Close { + userActionID = 55; + displayName = CSTRING(CloseCargoRamp); + textToolTip = CSTRING(CloseCargoRamp); + position = "action_cargoramp"; + radius = 3.0; + condition = "this animationPhase ""cargoramp_open"" > 0.5 AND Alive(this)"; + statement = "this animateDoor ['cargoramp_open', 0]"; + }; + };*/ }; - class Heli_light_03_base_F: Helicopter_Base_F { - lockDetectionSystem = 0; // Vanilla: 12 - incomingMissileDetectionSystem = 16; // Vanilla: 24 + class Heli_light_03_base_F: Helicopter_Base_F {}; + class I_Heli_light_03_base_F: Heli_light_03_base_F { + lockDetectionSystem = 0; + incomingMissileDetectionSystem = 16; driverCanEject = 1; + weapons[] = {"M134_minigun","missiles_DAR","CMFlareLauncher", "ACE_AIR_SAFETY" }; + magazines[] = {"5000Rnd_762x51_Yellow_Belt","24Rnd_missiles","168Rnd_CMFlare_Chaff_Magazine"}; class Turrets: Turrets { class MainTurret: MainTurret { canEject = 1; showHMD = 1; - weapons[] = {"Laserdesignator_mounted"}; // Add Laser Designator + gunBeg = "commanderview"; + gunEnd = "laserstart"; + memoryPointGun = "laserstart"; + stabilizedInAxes = 3; + weapons[] = {"Laserdesignator_mounted"}; + soundServo[] = {"",0.01,1,30}; magazines[] = {"Laserbatteries"}; + inGunnerMayFire = 1; }; }; }; + class I_Heli_light_03_F: Heli_light_03_base_F { + class Turrets: Turrets { + class MainTurret: MainTurret {}; + }; + }; + + class Heli_light_03_unarmed_base_F: Heli_light_03_base_F {}; + + class I_Heli_light_03_unarmed_F: Heli_light_03_unarmed_base_F {}; class Plane_CAS_01_base_F: Plane_Base_F { - lockDetectionSystem = 12; // Vanilla: 8 - incomingMissileDetectionSystem = 16; // Vanilla: 24 + lockDetectionSystem = 12; + incomingMissileDetectionSystem = 16; + + class Turrets; + + #include }; class Plane_CAS_02_base_F: Plane_Base_F { - lockDetectionSystem = 12; // Vanilla: 8 - incomingMissileDetectionSystem = 16; // Vanilla: 24 + lockDetectionSystem = 12; + incomingMissileDetectionSystem = 16; + + class Turrets; + + #include }; class Plane_Fighter_03_base_F: Plane_Base_F { - lockDetectionSystem = 12; // Vanilla: 8 - incomingMissileDetectionSystem = 16; // Vanilla: 24 + lockDetectionSystem = 12; + incomingMissileDetectionSystem = 16; + + class Turrets; + + #include + }; + + class UAV_01_base_F: Helicopter_Base_F { + /*class Turrets: Turrets { + class MainTurret: MainTurret {}; + };*/ }; class UAV_02_base_F: UAV { - weapons[] = {}; // Remove flare launcher + weapons[] = {}; magazines[] = {}; + + class Turrets { + class MainTurret; + }; }; class UAV_02_CAS_base_F: UAV_02_base_F { - weapons[] = {}; // Remove flare launcher + weapons[] = {}; magazines[] = {}; + + /*class Turrets: Turrets { + class MainTurret: MainTurret {}; + };*/ }; - class Heli_Transport_03_base_F: Helicopter_Base_H { - incomingMissileDetectionSystem = 16; // Vanilla: 24 + class Heli_Transport_03_base_F: Helicopter_Base_H {}; + class B_Heli_Transport_03_base_F: Heli_Transport_03_base_F { + lockDetectionSystem = 12; + incomingMissileDetectionSystem = 16; driverCanEject = 1; class Turrets: Turrets { class CopilotTurret: CopilotTurret { canEject = 1; }; + //class MainTurret: MainTurret {}; + class RightDoorGun: MainTurret {}; }; }; + + class B_Heli_Transport_03_unarmed_base_F: Heli_Transport_03_base_F { + class Turrets: Turrets { + class CopilotTurret: CopilotTurret { + canEject = 1; + }; + //class MainTurret: MainTurret {}; + //class RightDoorGun: MainTurret {}; + }; + }; + class Heli_Transport_04_base_F: Helicopter_Base_H { - incomingMissileDetectionSystem = 16; // Vanilla: 24 + lockDetectionSystem = 12; + incomingMissileDetectionSystem = 16; driverCanEject = 1; class Turrets: Turrets { class CopilotTurret: CopilotTurret { canEject = 1; }; - class LoadmasterTurret: MainTurret { canEject = 1; }; }; }; + + class O_Heli_Transport_04_bench_F: Heli_Transport_04_base_F { + class Turrets: Turrets { + class CopilotTurret: CopilotTurret { + canEject = 1; + }; + class LoadmasterTurret: LoadmasterTurret { + canEject = 1; + }; + }; + }; + + class O_Heli_Transport_04_covered_F: Heli_Transport_04_base_F { + class Turrets: Turrets { + class CopilotTurret: CopilotTurret { + canEject = 1; + }; + class LoadmasterTurret: LoadmasterTurret { + canEject = 1; + }; + }; + }; }; diff --git a/addons/aircraft/CfgWeapons.hpp b/addons/aircraft/CfgWeapons.hpp index 2d16223e1d..e97889eabf 100644 --- a/addons/aircraft/CfgWeapons.hpp +++ b/addons/aircraft/CfgWeapons.hpp @@ -1,8 +1,13 @@ + +class Mode_SemiAuto; +class Mode_Burst; class Mode_FullAuto; class CfgWeapons { + class RocketPods; - class ACE_AIR_SAFETY : RocketPods { + class ACE_AIR_SAFETY : RocketPods + { CanLock = 0; displayName = "SAFE"; displayNameMagazine = "SAFE"; @@ -16,6 +21,18 @@ class CfgWeapons { magazineReloadTime = 0.1; }; + // Manual Switching Of Flare Mode + class SmokeLauncher; + class CMFlareLauncher: SmokeLauncher { + modes[] = {"Single","Burst","AIBurst"}; + class Single: Mode_SemiAuto { + reloadTime = 0.1; + }; + class Burst: Mode_Burst { + displayName = CSTRING(CMFlareLauncher_Burst_Name); + }; + }; + // bigger mag for comanche class CannonCore; class gatling_20mm: CannonCore { @@ -26,7 +43,6 @@ class CfgWeapons { reloadTime = 0.023; //0.04; dispersion = 0.006; //0.0022; }; - class close: manual {}; class short: close {}; class medium: close {}; @@ -41,22 +57,18 @@ class CfgWeapons { dispersion = 0.006; displayName = CSTRING(gatling_20mm_Name); }; - class close: close { reloadTime = 0.04; dispersion = 0.006; }; - class short: short { reloadTime = 0.04; dispersion = 0.006; }; - class medium: medium { reloadTime = 0.04; dispersion = 0.006; }; - class far: far { reloadTime = 0.04; dispersion = 0.006; @@ -66,13 +78,14 @@ class CfgWeapons { // buff gatling rof class MGunCore; class MGun: MGunCore {}; + class LMG_RCWS: MGun {}; + class LMG_Minigun: LMG_RCWS { class manual: MGun { reloadTime = 0.075; //0.015; dispersion = 0.00093; //0.006; }; - class close: manual {}; class short: close {}; class medium: close {}; @@ -81,12 +94,10 @@ class CfgWeapons { class LMG_Minigun_heli: LMG_Minigun { showAimCursorInternal = 0; - class manual: manual { reloadTime = 0.015; //0.033; Note: This is a way to fast ROF (requires over 60 FPS) @todo dispersion = 0.006; //0.0087; }; - class close: manual {}; class short: close {}; class medium: close {}; @@ -99,16 +110,30 @@ class CfgWeapons { dispersion = 0.0064; //0.0023; multiplier = 1; }; - class HighROF: LowROF { reloadTime = 0.02; //0.03; dispersion = 0.0064; //0.0023; multiplier = 1; }; - class close: HighROF {}; class short: close {}; class medium: LowROF {}; class far: medium {}; }; + + class Gatling_30mm_Plane_CAS_01_F: CannonCore { + autoFire = 1; + burst = 1; + class LowROF: Mode_FullAuto { + autoFire = 0; + burst = 22; //65; + reloadTime = 0.0462; //0.0154; //0.034; + multiplier = 3; + }; + class close: LowROF {}; + class near: close {}; + class short: close {}; + class medium: close {}; + class far: close {}; + }; }; diff --git a/addons/aircraft/Heli_Attack_01_base_F.hpp b/addons/aircraft/Heli_Attack_01_base_F.hpp index 90a417000a..f56cda1fd8 100644 --- a/addons/aircraft/Heli_Attack_01_base_F.hpp +++ b/addons/aircraft/Heli_Attack_01_base_F.hpp @@ -1,15 +1,896 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { - incomingMissileDetectionSystem = 16; // Vanilla: 24 + lockDetectionSystem = 12; + incomingMissileDetectionSystem = 16; driverCanEject = 1; + class MFD + { + class AirplaneHUD + { + class Bones{}; + class Draw{}; + topLeft = "HUD_top_left"; + topRight = "HUD_top_right"; + bottomLeft = "HUD_bottom_left"; + borderLeft = 0; + borderRight = 0; + borderTop = 0; + borderBottom = 0; + color[] = {0.15,1,0.15,1}; + enableParallax = 0; + helmetMountedDisplay = 1; + helmetPosition[] = {0,0,0}; + helmetRight[] = {0,0,0}; + helmetDown[] = {0,0,0}; + }; + class ACE_HUD_1 + { + topLeft = "HUD_top_left"; + topRight = "HUD_top_right"; + bottomLeft = "HUD_bottom_left"; + borderLeft = 0; + borderRight = 0; + borderTop = 0; + borderBottom = 0; + color[] = {0.15,1,0.15,1}; + enableParallax = 0; + class Bones + { + class GunnerAim + { + type = "vector"; + source = "weapon"; + pos0[] = {0.5,"0.9 - 0.04 + 0.012"}; + pos10[] = {"0.5 + 0.0111","0.9 - 0.04 + 0.012 + 0.0133"}; + }; + class Target + { + source = "target"; + type = "vector"; + pos0[] = {0.5,0.5}; + pos10[] = {0.85,0.85}; + }; + class Velocity + { + type = "vector"; + source = "velocity"; + pos0[] = {0.5,0.5}; + pos10[] = {0.65,0.65}; + }; + class Velocity_slip + { + type = "vector"; + source = "velocity"; + pos0[] = {0.5,0.845}; + pos10[] = {0.53,0.845}; + }; + class VspeedBone + { + type = "linear"; + source = "vspeed"; + sourceScale = 1; + min = -10; + max = 10; + minPos[] = {0.93,0.2}; + maxPos[] = {0.93,0.8}; + }; + class RadarAltitudeBone + { + type = "linear"; + source = "altitudeAGL"; + sourceScale = 1; + min = 0; + max = 60; + minPos[] = {0.965,0.2}; + maxPos[] = {0.965,0.8}; + }; + class HorizonBankRot + { + type = "rotational"; + source = "horizonBank"; + center[] = {0.5,0.5}; + min = -3.1416; + max = 3.1416; + minAngle = -180; + maxAngle = 180; + aspectRatio = 1; + }; + class ForwardVec + { + type = "vector"; + source = "forward"; + pos0[] = {0,0}; + pos10[] = {0.25,0.25}; + }; + class WeaponAim + { + type = "vector"; + source = "weapon"; + pos0[] = {0.5,0.5}; + pos10[] = {0.75,0.75}; + }; + class Level0 + { + type = "horizon"; + pos0[] = {0.5,0.5}; + pos10[] = {0.78,0.78}; + angle = 0; + }; + class LevelP5: Level0 + { + angle = 5; + }; + class LevelM5: Level0 + { + angle = -5; + }; + class LevelP10: Level0 + { + angle = 10; + }; + class LevelM10: Level0 + { + angle = -10; + }; + class LevelP15: Level0 + { + angle = 15; + }; + class LevelM15: Level0 + { + angle = -15; + }; + class LevelP20: Level0 + { + angle = 20; + }; + class LevelM20: Level0 + { + angle = -20; + }; + class LevelP25: Level0 + { + angle = 25; + }; + class LevelM25: Level0 + { + angle = -25; + }; + class LevelP30: Level0 + { + angle = 30; + }; + class LevelM30: Level0 + { + angle = -30; + }; + class LevelP35: Level0 + { + angle = 35; + }; + class LevelM35: Level0 + { + angle = -35; + }; + class LevelP40: Level0 + { + angle = 40; + }; + class LevelM40: Level0 + { + angle = -40; + }; + class LevelP45: Level0 + { + angle = 45; + }; + class LevelM45: Level0 + { + angle = -45; + }; + class LevelP50: Level0 + { + angle = 50; + }; + class LevelM50: Level0 + { + angle = -50; + }; + }; + class Draw + { + color[] = {0.18,1,0.18}; + alpha = 1; + condition = "on"; + class Horizont + { + clipTL[] = {0.15,0.15}; + clipBR[] = {0.85,0.85}; + class Dimmed + { + class Level0 + { + type = "line"; + points[] = {{ "Level0",{ -0.42,0 },1 },{ "Level0",{ -0.38,0 },1 },{ },{ "Level0",{ -0.37,0 },1 },{ "Level0",{ -0.33,0 },1 },{ },{ "Level0",{ -0.32,0 },1 },{ "Level0",{ -0.28,0 },1 },{ },{ "Level0",{ -0.27,0 },1 },{ "Level0",{ -0.23,0 },1 },{ },{ "Level0",{ -0.22,0 },1 },{ "Level0",{ -0.18,0 },1 },{ },{ "Level0",{ -0.17,0 },1 },{ "Level0",{ -0.13,0 },1 },{ },{ "Level0",{ -0.12,0 },1 },{ "Level0",{ -0.08,0 },1 },{ },{ "Level0",{ 0.42,0 },1 },{ "Level0",{ 0.38,0 },1 },{ },{ "Level0",{ 0.37,0 },1 },{ "Level0",{ 0.33,0 },1 },{ },{ "Level0",{ 0.32,0 },1 },{ "Level0",{ 0.28,0 },1 },{ },{ "Level0",{ 0.27,0 },1 },{ "Level0",{ 0.23,0 },1 },{ },{ "Level0",{ 0.22,0 },1 },{ "Level0",{ 0.18,0 },1 },{ },{ "Level0",{ 0.17,0 },1 },{ "Level0",{ 0.13,0 },1 },{ },{ "Level0",{ 0.12,0 },1 },{ "Level0",{ 0.08,0 },1 }}; + }; + }; + }; + class HorizonBankRot + { + type = "line"; + width = 3; + points[] = {{ "HorizonBankRot",{ 0,0.25 },1 },{ "HorizonBankRot",{ -0.01,0.23 },1 },{ "HorizonBankRot",{ 0.01,0.23 },1 },{ "HorizonBankRot",{ 0,0.25 },1 }}; + }; + class Static_HAD_BOX + { + clipTL[] = {0,1}; + clipBR[] = {1,0}; + type = "line"; + width = 5; + points[] = {{ { "0.5-0.1","0.9-0.04" },1 },{ { "0.5-0.1","0.9+0.04" },1 },{ { "0.5+0.1","0.9+0.04" },1 },{ { "0.5+0.1","0.9-0.04" },1 },{ { "0.5-0.1","0.9-0.04" },1 },{ },{ { "0.5-0.1","0.9-0.04+0.012" },1 },{ { "0.5-0.092","0.9-0.04+0.012" },1 },{ },{ { "0.5+0.1","0.9-0.04+0.012" },1 },{ { "0.5+0.092","0.9-0.04+0.012" },1 },{ },{ { 0.5,"0.9-0.04" },1 },{ { 0.5,"0.9-0.032" },1 },{ },{ { 0.5,"0.9+0.04" },1 },{ { 0.5,"0.9+0.032" },1 },{ }}; + }; + class Gunner_HAD + { + type = "line"; + width = 6; + points[] = {{ "GunnerAim",{ -0.015,-0.008 },1 },{ "GunnerAim",{ -0.015,0.008 },1 },{ "GunnerAim",{ 0.015,0.008 },1 },{ "GunnerAim",{ 0.015,-0.008 },1 },{ "GunnerAim",{ -0.015,-0.008 },1 }}; + }; + class Slip_ball_group + { + class Slip_bars + { + type = "line"; + width = 4; + points[] = {{ { "0.5-0.018","0.9-0.04" },1 },{ { "0.5-0.018","0.9-0.075" },1 },{ },{ { "0.5+0.018","0.9-0.04" },1 },{ { "0.5+0.018","0.9-0.075" },1 }}; + }; + class Slip_ball + { + type = "line"; + width = 6; + points[] = {{ "Velocity_slip",1,{ "0 * 0.75","-0.02 * 0.75" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.75","-0.01732 * 0.75" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.75","-0.0099999998 * 0.75" },1 },{ "Velocity_slip",1,{ "0.02 * 0.75","0 * 0.75" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.75","0.0099999998 * 0.75" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.75","0.01732 * 0.75" },1 },{ "Velocity_slip",1,{ "0 * 0.75","0.02 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.75","0.01732 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.75","0.0099999998 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.75","0 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.75","-0.0099999998 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.75","-0.01732 * 0.75" },1 },{ "Velocity_slip",1,{ "0 * 0.75","-0.02 * 0.75" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.6","-0.02 * 0.6" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.6","-0.01732 * 0.6" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.6","-0.0099999998 * 0.6" },1 },{ "Velocity_slip",1,{ "0.02 * 0.6","0 * 0.6" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.6","0.0099999998 * 0.6" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.6","0.01732 * 0.6" },1 },{ "Velocity_slip",1,{ "0 * 0.6","0.02 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.6","0.01732 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.6","0.0099999998 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.6","0 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.6","-0.0099999998 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.6","-0.01732 * 0.6" },1 },{ "Velocity_slip",1,{ "0 * 0.6","-0.02 * 0.6" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.5","-0.02 * 0.5" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.5","-0.01732 * 0.5" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.5","-0.0099999998 * 0.5" },1 },{ "Velocity_slip",1,{ "0.02 * 0.5","0 * 0.5" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.5","0.0099999998 * 0.5" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.5","0.01732 * 0.5" },1 },{ "Velocity_slip",1,{ "0 * 0.5","0.02 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.5","0.01732 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.5","0.0099999998 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.5","0 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.5","-0.0099999998 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.5","-0.01732 * 0.5" },1 },{ "Velocity_slip",1,{ "0 * 0.5","-0.02 * 0.5" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.4","-0.02 * 0.4" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.4","-0.01732 * 0.4" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.4","-0.0099999998 * 0.4" },1 },{ "Velocity_slip",1,{ "0.02 * 0.4","0 * 0.4" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.4","0.0099999998 * 0.4" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.4","0.01732 * 0.4" },1 },{ "Velocity_slip",1,{ "0 * 0.4","0.02 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.4","0.01732 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.4","0.0099999998 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.4","0 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.4","-0.0099999998 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.4","-0.01732 * 0.4" },1 },{ "Velocity_slip",1,{ "0 * 0.4","-0.02 * 0.4" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.30","-0.02 * 0.30" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.30","-0.01732 * 0.30" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.30","-0.0099999998 * 0.30" },1 },{ "Velocity_slip",1,{ "0.02 * 0.30","0 * 0.30" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.30","0.0099999998 * 0.30" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.30","0.01732 * 0.30" },1 },{ "Velocity_slip",1,{ "0 * 0.30","0.02 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.30","0.01732 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.30","0.0099999998 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.30","0 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.30","-0.0099999998 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.30","-0.01732 * 0.30" },1 },{ "Velocity_slip",1,{ "0 * 0.30","-0.02 * 0.30" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.20","-0.02 * 0.20" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.20","-0.01732 * 0.20" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.20","-0.0099999998 * 0.20" },1 },{ "Velocity_slip",1,{ "0.02 * 0.20","0 * 0.20" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.20","0.0099999998 * 0.20" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.20","0.01732 * 0.20" },1 },{ "Velocity_slip",1,{ "0 * 0.20","0.02 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.20","0.01732 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.20","0.0099999998 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.20","0 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.20","-0.0099999998 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.20","-0.01732 * 0.20" },1 },{ "Velocity_slip",1,{ "0 * 0.20","-0.02 * 0.20" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.1","-0.02 * 0.1" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.1","-0.01732 * 0.1" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.1","-0.0099999998 * 0.1" },1 },{ "Velocity_slip",1,{ "0.02 * 0.1","0 * 0.1" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.1","0.0099999998 * 0.1" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.1","0.01732 * 0.1" },1 },{ "Velocity_slip",1,{ "0 * 0.1","0.02 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.1","0.01732 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.1","0.0099999998 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.1","0 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.1","-0.0099999998 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.1","-0.01732 * 0.1" },1 },{ "Velocity_slip",1,{ "0 * 0.1","-0.02 * 0.1" },1 }}; + }; + }; + class Centerline + { + type = "line"; + width = 5; + points[] = {{ { 0.5,0.48 },1 },{ { 0.5,0.45 },1 },{ },{ { 0.5,0.52 },1 },{ { 0.5,0.55 },1 },{ },{ { 0.48,0.5 },1 },{ { 0.45,0.5 },1 },{ },{ { 0.52,0.5 },1 },{ { 0.55,0.5 },1 },{ }}; + }; + class WeaponName + { + type = "text"; + source = "weapon"; + sourceScale = 1; + align = "right"; + scale = 1; + pos[] = {{ 0.61,0.86 },1}; + right[] = {{ 0.65,0.86 },1}; + down[] = {{ 0.61,0.9 },1}; + }; + class Ammo_GUN + { + type = "group"; + condition = "mgun"; + class Ammo_count_GUN + { + type = "text"; + source = "ammo"; + sourceScale = 1; + align = "right"; + scale = 1; + pos[] = {{ 0.61,0.89 },1}; + right[] = {{ 0.65,0.89 },1}; + down[] = {{ 0.61,0.93 },1}; + }; + }; + class Ammo_RKT + { + type = "group"; + condition = "rocket"; + class Ammo_count_RKT + { + type = "text"; + source = "ammo"; + sourceScale = 1; + align = "right"; + scale = 1; + pos[] = {{ 0.61,0.89 },1}; + right[] = {{ 0.65,0.89 },1}; + down[] = {{ 0.61,0.93 },1}; + }; + }; + class Ammo_AGM + { + type = "group"; + condition = "AAmissile"; + class Ammo_count_AGM + { + type = "text"; + source = "ammo"; + sourceScale = 1; + align = "right"; + scale = 1; + pos[] = {{ 0.61,0.89 },1}; + right[] = {{ 0.65,0.89 },1}; + down[] = {{ 0.61,0.93 },1}; + }; + }; + class Ammo_AAM + { + type = "group"; + condition = "ATmissile"; + class Ammo_count_AAM + { + type = "text"; + source = "ammo"; + sourceScale = 1; + align = "right"; + scale = 1; + pos[] = {{ 0.61,0.89 },1}; + right[] = {{ 0.65,0.89 },1}; + down[] = {{ 0.61,0.93 },1}; + }; + }; + class Ammo_Bomb + { + type = "group"; + condition = "Bomb"; + class Ammo_count_Bomb + { + type = "text"; + source = "ammo"; + sourceScale = 1; + align = "right"; + scale = 1; + pos[] = {{ 0.61,0.89 },1}; + right[] = {{ 0.65,0.89 },1}; + down[] = {{ 0.61,0.93 },1}; + }; + }; + class LightsGroup + { + type = "group"; + condition = "lights"; + class LightsText + { + type = "text"; + source = "static"; + text = "LIGHTS"; + align = "right"; + scale = 1; + pos[] = {{ 0.03,"0.53 + 0.055" },1}; + right[] = {{ 0.07,"0.53 + 0.055" },1}; + down[] = {{ 0.03,"0.53 + 0.095" },1}; + }; + }; + class CollisionLightsGroup + { + type = "group"; + condition = "collisionlights"; + class CollisionLightsText + { + type = "text"; + source = "static"; + text = "A-COL"; + align = "right"; + scale = 1; + pos[] = {{ 0.03,"0.53 + 0.105" },1}; + right[] = {{ 0.07,"0.53 + 0.105" },1}; + down[] = {{ 0.03,"0.53 + 0.145" },1}; + }; + }; + class GearGroup + { + type = "group"; + condition = "ils"; + class GearText + { + type = "text"; + source = "static"; + text = "GEAR"; + align = "right"; + scale = 1; + pos[] = {{ 0.03,"0.53 + 0.155" },1}; + right[] = {{ 0.07,"0.53 + 0.155" },1}; + down[] = {{ 0.03,"0.53 + 0.195" },1}; + }; + }; + class ATMissileTOFGroup + { + condition = "ATmissile"; + type = "group"; + class TOFtext + { + type = "text"; + align = "right"; + source = "static"; + text = "TOF="; + scale = 1; + pos[] = {{ 0.61,0.92 },1}; + right[] = {{ 0.65,0.92 },1}; + down[] = {{ 0.61,0.96 },1}; + }; + class TOFnumber + { + type = "text"; + source = "targetDist"; + sourcescale = 0.0025; + align = "right"; + scale = 1; + pos[] = {{ 0.69,0.92 },1}; + right[] = {{ 0.73,0.92 },1}; + down[] = {{ 0.69,0.96 },1}; + }; + }; + class LaserTOFGroup + { + condition = "Bomb"; + type = "group"; + class TOFtext + { + type = "text"; + align = "right"; + source = "static"; + text = "TOF="; + scale = 1; + pos[] = {{ 0.61,0.92 },1}; + right[] = {{ 0.65,0.92 },1}; + down[] = {{ 0.61,0.96 },1}; + }; + class TOFnumber + { + type = "text"; + source = "targetDist"; + sourcescale = 0.0025; + align = "right"; + scale = 1; + pos[] = {{ 0.69,0.92 },1}; + right[] = {{ 0.73,0.92 },1}; + down[] = {{ 0.69,0.96 },1}; + }; + }; + class RocketTOFGroup + { + condition = "Rocket"; + type = "group"; + class TOFtext + { + type = "text"; + align = "right"; + source = "static"; + text = "TOF="; + scale = 1; + pos[] = {{ 0.61,0.92 },1}; + right[] = {{ 0.65,0.92 },1}; + down[] = {{ 0.61,0.96 },1}; + }; + class TOFnumber + { + type = "text"; + source = "targetDist"; + sourcescale = 0.0025; + align = "right"; + scale = 1; + pos[] = {{ 0.69,0.92 },1}; + right[] = {{ 0.73,0.92 },1}; + down[] = {{ 0.69,0.96 },1}; + }; + }; + class RangeNumber + { + type = "text"; + source = "targetDist"; + sourceScale = 1; + align = "left"; + scale = 1; + pos[] = {{ 0.39,0.89 },1}; + right[] = {{ 0.43,0.89 },1}; + down[] = {{ 0.39,0.93 },1}; + }; + class RangeText + { + type = "text"; + source = "static"; + text = "RNG"; + align = "left"; + scale = 1; + pos[] = {{ 0.39,0.86 },1}; + right[] = {{ 0.43,0.86 },1}; + down[] = {{ 0.39,0.9 },1}; + }; + class SpeedNumber + { + type = "text"; + align = "right"; + scale = 1; + source = "speed"; + sourceScale = 3.6; + pos[] = {{ 0.03,0.475 },1}; + right[] = {{ 0.08,0.475 },1}; + down[] = {{ 0.03,0.525 },1}; + }; + class TorqueNumber + { + condition = "simulRTD"; + class Torque_number + { + type = "text"; + align = "left"; + scale = 1; + source = "rtdRotorTorque"; + sourceScale = 290; + pos[] = {{ 0.065,0.175 },1}; + right[] = {{ 0.115,0.175 },1}; + down[] = {{ 0.065,0.225 },1}; + }; + class Torquetext + { + type = "text"; + source = "static"; + text = "%"; + align = "right"; + scale = 1; + pos[] = {{ 0.07,0.175 },1}; + right[] = {{ 0.12,0.175 },1}; + down[] = {{ 0.07,0.225 },1}; + }; + }; + class AltNumber: SpeedNumber + { + align = "right"; + source = "altitudeAGL"; + sourceScale = 1; + pos[] = {{ 0.83,0.475 },1}; + right[] = {{ 0.88,0.475 },1}; + down[] = {{ 0.83,0.525 },1}; + }; + class ASLNumber + { + type = "text"; + source = "altitudeASL"; + sourceScale = 1; + align = "right"; + scale = 1; + pos[] = {{ 0.835,0.18 },1}; + right[] = {{ 0.875,0.18 },1}; + down[] = {{ 0.835,0.22 },1}; + }; + class VspeedScalePosta + { + type = "line"; + width = 5; + points[] = {{ { 0.98,0.2 },1 },{ { 1,0.2 },1 },{ },{ { 0.93,0.2 },1 },{ { 0.95,0.2 },1 },{ },{ { 0.98,0.35 },1 },{ { 1,0.35 },1 },{ },{ { 0.93,0.35 },1 },{ { 0.95,0.35 },1 },{ },{ { 0.94,0.38 },1 },{ { 0.95,0.38 },1 },{ },{ { 0.94,0.41 },1 },{ { 0.95,0.41 },1 },{ },{ { 0.94,0.44 },1 },{ { 0.95,0.44 },1 },{ },{ { 0.94,0.47 },1 },{ { 0.95,0.47 },1 },{ },{ { 0.98,0.5 },1 },{ { 1,0.5 },1 },{ },{ { 0.93,0.5 },1 },{ { 0.95,0.5 },1 },{ },{ { 0.94,0.53 },1 },{ { 0.95,0.53 },1 },{ },{ { 0.94,0.56 },1 },{ { 0.95,0.56 },1 },{ },{ { 0.94,0.59 },1 },{ { 0.95,0.59 },1 },{ },{ { 0.94,0.62 },1 },{ { 0.95,0.62 },1 },{ },{ { 0.98,0.65 },1 },{ { 1,0.65 },1 },{ },{ { 0.93,0.65 },1 },{ { 0.95,0.65 },1 },{ },{ { 0.99,0.68 },1 },{ { 0.98,0.68 },1 },{ },{ { 0.99,0.71 },1 },{ { 0.98,0.71 },1 },{ },{ { 0.99,0.74 },1 },{ { 0.98,0.74 },1 },{ },{ { 0.99,0.77 },1 },{ { 0.98,0.77 },1 },{ },{ { 0.98,0.8 },1 },{ { 1,0.8 },1 },{ },{ { 0.93,0.8 },1 },{ { 0.95,0.8 },1 },{ }}; + }; + class RadarAltitudeBand + { + clipTL[] = {0,0.2}; + clipBR[] = {1,0.8}; + hideValue = 201; + class radarbanda + { + type = "line"; + width = 17; + points[] = {{ "RadarAltitudeBone",{ 0,0 },1 },{ "RadarAltitudeBone",{ 0,0.6 },1 }}; + }; + }; + class VspeedBand + { + type = "line"; + width = 3; + points[] = {{ "VspeedBone",{ -0.01,0 },1 },{ "VspeedBone",{ -0.025,-0.015 },1 },{ "VspeedBone",{ -0.025,0.015 },1 },{ "VspeedBone",{ -0.01,0 },1 },{ }}; + }; + class HeadingNumber: SpeedNumber + { + source = "heading"; + sourceScale = 1; + align = "center"; + pos[] = {{ 0.5,0.045 },1}; + right[] = {{ 0.56,0.045 },1}; + down[] = {{ 0.5,"0.045 + 0.06" },1}; + }; + class Center_box + { + type = "line"; + width = 1.5; + points[] = {{ { 0.45,"0.02 + 0.085 - 0.06" },1 },{ { "0.45 + 0.10","0.02 + 0.085 - 0.06" },1 },{ { "0.45 + 0.10","0.02 + 0.085" },1 },{ { 0.45,"0.02 + 0.085" },1 },{ { 0.45,"0.02 + 0.085 - 0.06" },1 }}; + }; + class HeadingArrow + { + type = "line"; + width = 7; + points[] = {{ { "0.5","0.128 + 0.03" },1 },{ { 0.5,0.128 },1 }}; + }; + class HeadingScale_LEFT + { + clipTL[] = {0,0}; + clipBR[] = {0.45,1}; + class Heading_group + { + type = "scale"; + horizontal = 1; + source = "heading"; + sourceScale = 1; + width = 5; + top = 0.12; + center = 0.5; + bottom = 0.88; + lineXleft = "0.03 + 0.085"; + lineYright = "0.02 + 0.085"; + lineXleftMajor = "0.04 + 0.085"; + lineYrightMajor = "0.02 + 0.085"; + majorLineEach = 3; + numberEach = 3; + step = 10; + stepSize = "0.05"; + align = "center"; + scale = 1; + pos[] = {0.12,"0.0 + 0.065"}; + right[] = {0.16,"0.0 + 0.065"}; + down[] = {0.12,"0.04 + 0.065"}; + }; + }; + class HeadingScale_RIGHT + { + clipTL[] = {0.55,0}; + clipBR[] = {1,1}; + class Heading_group + { + type = "scale"; + horizontal = 1; + source = "heading"; + sourceScale = 1; + width = 5; + top = 0.12; + center = 0.5; + bottom = 0.88; + lineXleft = "0.03 + 0.085"; + lineYright = "0.02 + 0.085"; + lineXleftMajor = "0.04 + 0.085"; + lineYrightMajor = "0.02 + 0.085"; + majorLineEach = 3; + numberEach = 3; + step = 10; + stepSize = "0.05"; + align = "center"; + scale = 1; + pos[] = {0.12,"0.0 + 0.065"}; + right[] = {0.16,"0.0 + 0.065"}; + down[] = {0.12,"0.04 + 0.065"}; + }; + }; + class HeadingScale_BOTTOM + { + clipTL[] = {0.45,"0.02 + 0.085"}; + clipBR[] = {"0.45 + 0.10",1}; + class Heading_group + { + type = "scale"; + horizontal = 1; + source = "heading"; + sourceScale = 1; + width = 5; + top = 0.12; + center = 0.5; + bottom = 0.88; + lineXleft = "0.03 + 0.085"; + lineYright = "0.02 + 0.085"; + lineXleftMajor = "0.04 + 0.085"; + lineYrightMajor = "0.02 + 0.085"; + majorLineEach = 3; + numberEach = 3; + step = 10; + stepSize = "0.05"; + align = "center"; + scale = 1; + pos[] = {0.12,"0.0 + 0.065"}; + right[] = {0.16,"0.0 + 0.065"}; + down[] = {0.12,"0.04 + 0.065"}; + }; + }; + class Fuel_Text + { + type = "text"; + source = "static"; + text = "Fuel"; + align = "right"; + scale = 1; + pos[] = {{ 0.03,0.9 },1}; + right[] = {{ 0.07,0.9 },1}; + down[] = {{ 0.03,0.94 },1}; + }; + class Fuel_Number + { + type = "text"; + source = "fuel"; + sourceScale = 100; + align = "right"; + scale = 1; + pos[] = {{ 0.1,0.9 },1}; + right[] = {{ 0.14,0.9 },1}; + down[] = {{ 0.1,0.94 },1}; + }; + }; + helmetMountedDisplay = 1; + helmetPosition[] = {-0.04,0.04,0.1}; + helmetRight[] = {0.08,0,0}; + helmetDown[] = {0,-0.08,0}; + }; + class ACE_HUD_2 + { + topLeft = "HUD_top_left"; + topRight = "HUD_top_right"; + bottomLeft = "HUD_bottom_left"; + borderLeft = 0; + borderRight = 0; + borderTop = 0; + borderBottom = 0; + color[] = {0.15,1,0.15,1}; + enableParallax = 0; + class Bones + { + class Velocity + { + type = "vector"; + source = "velocity"; + pos0[] = {0.5,0.5}; + pos10[] = {0.75,0.75}; + }; + class ForwardVec1 + { + type = "vector"; + source = "forward"; + pos0[] = {0,0}; + pos10[] = {0.25,0.25}; + }; + class ForwardVec + { + type = "vector"; + source = "forward"; + pos0[] = {0,0}; + pos10[] = {0.253,0.253}; + }; + class WeaponAim + { + type = "vector"; + source = "weapon"; + pos0[] = {0.5,0.5}; + pos10[] = {0.753,0.753}; + }; + class WeaponAim1 + { + type = "vector"; + source = "weapon"; + pos0[] = {0,0}; + pos10[] = {0.253,0.23}; + }; + class Target + { + type = "vector"; + source = "target"; + pos0[] = {0.5,0.5}; + pos10[] = {0.753,0.753}; + }; + class RadarContact + { + type = "fixed"; + pos[] = {0,0}; + }; + }; + class Draw + { + color[] = {0.18,1,0.18}; + alpha = 1; + condition = "on"; + class PlaneMovementCrosshair + { + type = "line"; + width = 7; + points[] = {{ "ForwardVec1",1,"Velocity",1,{ 0,-0.02 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.01,-0.01732 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.01732,-0.01 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.02,0 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.01732,0.01 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.01,0.01732 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0,0.02 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.01,0.01732 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.01732,0.01 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.02,0 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.01732,-0.01 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.01,-0.01732 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0,-0.02 },1 },{ },{ "ForwardVec1",1,"Velocity",1,{ 0.04,0 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.02,0 },1 },{ },{ "ForwardVec1",1,"Velocity",1,{ -0.04,0 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.02,0 },1 },{ },{ "ForwardVec1",1,"Velocity",1,{ 0,-0.04 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0,-0.02 },1 }}; + }; + class Gunner_AIM + { + type = "group"; + class Circle + { + type = "line"; + width = 6; + points[] = {{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.015 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.03 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.0325 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.0475 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.015 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.03 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.0325 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.0475 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ -0.015,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.03,0 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ -0.0325,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.0475,0 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0.015,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.03,0 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0.0325,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.0475,0 },1 }}; + }; + }; + class GunCross + { + condition = "mgun"; + class Circle + { + type = "line"; + width = 9; + points[] = {{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.05 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.015 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.015 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.05 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ -0.05,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.015,0 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0.015,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.05,0 },1 },{ }}; + }; + }; + class RocketCross + { + condition = "rocket"; + width = 6; + class Circle + { + type = "line"; + width = 6; + points[] = {{ "ForwardVec",1,"WeaponAim",1,{ -0.05,-0.08 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.05,-0.08 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.08 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.08 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ -0.05,0.08 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.05,0.08 },1 },{ }}; + }; + }; + class AT_Aim + { + condition = "ATmissile"; + width = 2; + class Circle + { + type = "line"; + width = 2; + points[] = {{ "ForwardVec",1,"WeaponAim",1,{ -0.1,-0.1 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.1,-0.1 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.1,0.1 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.1,0.1 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.1,-0.1 },1 }}; + }; + }; + class AA_aim + { + condition = "AAmissile"; + class Circle + { + type = "line"; + width = 2.5; + points[] = {{ "ForwardVec",1,"WeaponAim",1,{ "0 / 4","-0.248559 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0434 / 4","-0.244781 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0855 / 4","-0.233571 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.125 / 4","-0.215252 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1607 / 4","-0.190396 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1915 / 4","-0.159774 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2165 / 4","-0.12428 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.234925 / 4","-0.0850072 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2462 / 4","-0.0431499 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.25 / 4","0 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2462 / 4","0.0431499 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.234925 / 4","0.0850072 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2165 / 4","0.12428 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1915 / 4","0.159774 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1607 / 4","0.190396 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.125 / 4","0.215252 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0855 / 4","0.233571 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0434 / 4","0.244781 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 4","0.248559 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0434 / 4","0.244781 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0855 / 4","0.233571 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.125 / 4","0.215252 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1607 / 4","0.190396 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1915 / 4","0.159774 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2165 / 4","0.12428 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.234925 / 4","0.0850072 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2462 / 4","0.0431499 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.25 / 4","0 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2462 / 4","-0.0431499 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.234925 / 4","-0.0850072 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2165 / 4","-0.12428 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1915 / 4","-0.159774 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1607 / 4","-0.190396 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.125 / 4","-0.215252 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0855 / 4","-0.233571 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0434 / 4","-0.244781 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 4","-0.248559 / 4" },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 2","-0.248559 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0434 / 2","-0.244781 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0855 / 2","-0.233571 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.125 / 2","-0.215252 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1607 / 2","-0.190396 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1915 / 2","-0.159774 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2165 / 2","-0.12428 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.234925 / 2","-0.0850072 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2462 / 2","-0.0431499 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.25 / 2","0 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2462 / 2","0.0431499 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.234925 / 2","0.0850072 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2165 / 2","0.12428 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1915 / 2","0.159774 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1607 / 2","0.190396 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.125 / 2","0.215252 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0855 / 2","0.233571 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0434 / 2","0.244781 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 2","0.248559 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0434 / 2","0.244781 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0855 / 2","0.233571 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.125 / 2","0.215252 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1607 / 2","0.190396 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1915 / 2","0.159774 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2165 / 2","0.12428 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.234925 / 2","0.0850072 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2462 / 2","0.0431499 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.25 / 2","0 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2462 / 2","-0.0431499 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.234925 / 2","-0.0850072 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2165 / 2","-0.12428 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1915 / 2","-0.159774 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1607 / 2","-0.190396 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.125 / 2","-0.215252 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0855 / 2","-0.233571 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0434 / 2","-0.244781 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 2","-0.248559 / 2" },1 }}; + }; + }; + class TargetACQ + { + type = "line"; + width = 2; + points[] = {{ "ForwardVec",1,"target",{ 0,-0.06 },1 },{ "ForwardVec",1,"target",{ 0,-0.055 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.05 },1 },{ "ForwardVec",1,"target",{ 0,-0.045 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.04 },1 },{ "ForwardVec",1,"target",{ 0,-0.035 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.03 },1 },{ "ForwardVec",1,"target",{ 0,-0.025 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.02 },1 },{ "ForwardVec",1,"target",{ 0,-0.015 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.01 },1 },{ "ForwardVec",1,"target",{ 0,-0.005 },1 },{ },{ "ForwardVec",1,"target",{ 0,0 },1 },{ "ForwardVec",1,"target",{ 0,0 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.06 },1 },{ "ForwardVec",1,"target",{ 0,0.055 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.05 },1 },{ "ForwardVec",1,"target",{ 0,0.045 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.04 },1 },{ "ForwardVec",1,"target",{ 0,0.035 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.03 },1 },{ "ForwardVec",1,"target",{ 0,0.025 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.02 },1 },{ "ForwardVec",1,"target",{ 0,0.015 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.01 },1 },{ "ForwardVec",1,"target",{ 0,0.005 },1 },{ },{ "ForwardVec",1,"target",{ -0.06,0 },1 },{ "ForwardVec",1,"target",{ -0.055,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.05,0 },1 },{ "ForwardVec",1,"target",{ -0.045,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.04,0 },1 },{ "ForwardVec",1,"target",{ -0.035,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.03,0 },1 },{ "ForwardVec",1,"target",{ -0.025,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.02,0 },1 },{ "ForwardVec",1,"target",{ -0.015,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.01,0 },1 },{ "ForwardVec",1,"target",{ -0.005,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.06,0 },1 },{ "ForwardVec",1,"target",{ 0.055,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.05,0 },1 },{ "ForwardVec",1,"target",{ 0.045,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.04,0 },1 },{ "ForwardVec",1,"target",{ 0.035,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.03,0 },1 },{ "ForwardVec",1,"target",{ 0.025,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.02,0 },1 },{ "ForwardVec",1,"target",{ 0.015,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.01,0 },1 },{ "ForwardVec",1,"target",{ 0.005,0 },1 },{ }}; + }; + class RadarTargets + { + type = "radar"; + pos0[] = {0.5,0.5}; + pos10[] = {0.753,0.753}; + width = 2.5; + points[] = {{ "ForwardVec",1,"RadarContact",{ -0.01,-0.01 },1 },{ "ForwardVec",1,"RadarContact",{ 0.01,-0.01 },1 },{ "ForwardVec",1,"RadarContact",{ 0.01,0.01 },1 },{ "ForwardVec",1,"RadarContact",{ -0.01,0.01 },1 },{ "ForwardVec",1,"RadarContact",{ -0.01,-0.01 },1 }}; + }; + }; + helmetMountedDisplay = 1; + helmetPosition[] = {-0.035,0.035,0.1}; + helmetRight[] = {0.07,0,0}; + helmetDown[] = {0,-0.07,0}; + }; + }; + class Turrets: Turrets { class MainTurret: MainTurret { - weapons[] = {"ACE_gatling_20mm_Comanche", "missiles_DAGR", "missiles_ASRAAM"}; - magazines[] = {"ACE_500Rnd_20mm_shells_Comanche", "4Rnd_AAA_missiles", "24Rnd_PG_missiles"}; + weapons[] = {"ACE_gatling_20mm_Comanche","missiles_DAGR","missiles_ASRAAM", "ACE_AIR_SAFETY"}; + magazines[] = {"ACE_500Rnd_20mm_shells_Comanche","4Rnd_AAA_missiles","24Rnd_PG_missiles"}; + + outGunnerMayFire = 1; + commanding = -1; + primaryGunner = 1; + gunnerOpticsModel = ""; + gunnerOpticsEffect[] = {"TankCommanderOptics1"}; + gunnerForceOptics = 0; turretInfoType = "Rsc_ACE_Helo_UI_Turret"; + showAllTargets = 2; + discretedistance[] = {100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000}; + discretedistanceinitindex = 3; + copilotHasFlares = 1; + directionStabilized = 1; + isCopilot = 1; + showHMD = 1; + CanEject = 1; + startEngine = 0; + minElev = -51; + maxElev = 9; + initElev = 6; + minTurn = -120; + maxTurn = 120; + initTurn = 0; - - class OpticsIn { + class OpticsIn + { delete Narrow; delete Medium; delete Wide; @@ -25,14 +906,13 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { initFov = 0.466; minFov = 0.466; maxFov = 0.466; - visionMode[] = {"Normal", "Ti"}; - thermalMode[] = {0, 1}; - gunnerOpticsColor[] = {0, 0, 0, 1}; + visionMode[] = {"Normal","Ti"}; + thermalMode[] = {0,1}; + gunnerOpticsColor[] = {0,0,0,1}; directionStabilized = 0; horizontallyStabilized = 1; gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_wide_F"; }; - class ACE_Wide: ACE_WideUnstabilized { opticsDisplayName = "W"; initAngleX = 0; @@ -44,50 +924,50 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { initFov = 0.466; minFov = 0.466; maxFov = 0.466; - visionMode[] = {"Normal", "Ti"}; - thermalMode[] = {0, 1}; - gunnerOpticsColor[] = {0, 0, 0, 1}; + visionMode[] = {"Normal","Ti"}; + thermalMode[] = {0,1}; + gunnerOpticsColor[] = {0,0,0,1}; directionStabilized = 1; horizontallyStabilized = 1; gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_wide_F"; }; - class ACE_Medium: ACE_Wide { opticsDisplayName = "M"; initFov = 0.093; minFov = 0.093; maxFov = 0.093; - gunnerOpticsColor[] = {0, 0, 0, 1}; + gunnerOpticsColor[] = {0,0,0,1}; directionStabilized = 1; horizontallyStabilized = 1; gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_medium_F"; }; - class ACE_Narrow: ACE_Wide { opticsDisplayName = "N"; initFov = 0.029; minFov = 0.029; maxFov = 0.029; - gunnerOpticsColor[] = {0, 0, 0, 1}; + gunnerOpticsColor[] = {0,0,0,1}; directionStabilized = 1; horizontallyStabilized = 1; gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F"; - }; + }; class ACE_Narrower: ACE_Wide { opticsDisplayName = "Z"; initFov = 0.01; minFov = 0.01; maxFov = 0.01; - gunnerOpticsColor[] = {0, 0, 0, 1}; + gunnerOpticsColor[] = {0,0,0,1}; directionStabilized = 1; horizontallyStabilized = 1; gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F"; + }; }; - - class OpticsOut { - class Monocular { + class OpticsOut + { + class Monocular + { initAngleX = 0; minAngleX = -30; maxAngleX = 30; @@ -110,19 +990,8 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { class Gatling { weapon = "ACE_gatling_20mm_Comanche"; }; - class Muzzle_flash { weapon = "ACE_gatling_20mm_Comanche"; }; }; }; - -class Heli_Attack_01_dynamicLoadout_base_F: Heli_Attack_01_base_F { - class Turrets: Turrets { - class MainTurret: MainTurret { - weapons[] = {"ACE_gatling_20mm_Comanche"}; - magazines[] = {"ACE_500Rnd_20mm_shells_Comanche"}; - }; - }; -}; - diff --git a/addons/aircraft/README.md b/addons/aircraft/README.md index c1bf72b3d7..3db71ca51a 100644 --- a/addons/aircraft/README.md +++ b/addons/aircraft/README.md @@ -1,7 +1,7 @@ ace_aircraft ============ -Changes to air weaponry, ejection and HUDs. +Changes to air weaponry, flight models and HUDs. - Contributions by Kimi (geraldbolso1899) for HUD updates diff --git a/addons/aircraft/RscInGameUI.hpp b/addons/aircraft/RscInGameUI.hpp index 67116a7b62..d3ef60c6b6 100644 --- a/addons/aircraft/RscInGameUI.hpp +++ b/addons/aircraft/RscInGameUI.hpp @@ -10,568 +10,572 @@ class HScrollbar; class RscLadderPicture; class RscControlsGroupNoScrollbars; -class RscInGameUI { - class RscUnitInfo; - class Rsc_ACE_Helo_UI_Turret: RscUnitInfo { - idd = 300; - controls[] = {"CA_IGUI_elements_group", "CA_VehicleToggles"}; +class RscInGameUI +{ + class RscUnitInfo; + class Rsc_ACE_Helo_UI_Turret: RscUnitInfo + { + idd = 300; + controls[] = {"CA_IGUI_elements_group","CA_VehicleToggles"}; class VScrollbar; class HScrollbar; - class CA_IGUI_elements_group: RscControlsGroup { + class CA_IGUI_elements_group: RscControlsGroup + { idc = 170; - - class VScrollbar: VScrollbar { + class VScrollbar: VScrollbar + { width = 0; }; - - class HScrollbar: HScrollbar { + class HScrollbar: HScrollbar + { height = 0; }; - - x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))"; - y = "0 * (0.025 * SafezoneH) + (SafezoneY)"; - w = "53.5 * (0.01875 * SafezoneH)"; - h = "40 * (0.025 * SafezoneH)"; - - class controls { - class CA_Distance: RscText { + x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))"; + y = "0 * (0.025 * SafezoneH) + (SafezoneY)"; + w = "53.5 * (0.01875 * SafezoneH)"; + h = "40 * (0.025 * SafezoneH)"; + class controls + { + class CA_Distance: RscText + { idc = 151; style = 2; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; - x = "24.78 * (0.01875 * SafezoneH)"; - y = "30.88 * (0.025 * SafezoneH)"; - w = "4 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "24.78 * (0.01875 * SafezoneH)"; + y = "30.88 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; - - class CA_Speed: RangeText { + class CA_Speed: RangeText + { idc = 188; style = 2; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; text = "120"; - x = "14.78 * (0.01875 * SafezoneH)"; - y = "30.88 * (0.025 * SafezoneH)"; - w = "4 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "14.78 * (0.01875 * SafezoneH)"; + y = "30.88 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; - - class CA_Alt: RangeText { + class CA_Alt: RangeText + { idc = 189; style = 2; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; text = "3825"; - x = "34.78 * (0.01875 * SafezoneH)"; - y = "30.88 * (0.025 * SafezoneH)"; - w = "4 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "34.78 * (0.01875 * SafezoneH)"; + y = "30.88 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; - - class CA_VisionMode: RscText { + class CA_VisionMode: RscText + { idc = 152; style = 0; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; text = "VIS"; - x = "12.58 * (0.01875 * SafezoneH)"; - y = "8 * (0.025 * SafezoneH)"; - w = "4 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "12.58 * (0.01875 * SafezoneH)"; + y = "8 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; - - class CA_FlirMode: RscText { + class CA_FlirMode: RscText + { idc = 153; style = 0; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; text = "BHOT"; - x = "15.78 * (0.01875 * SafezoneH)"; - y = "8 * (0.025 * SafezoneH)"; - w = "4.5 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "15.78 * (0.01875 * SafezoneH)"; + y = "8 * (0.025 * SafezoneH)"; + w = "4.5 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; - - class ValueGrid: RangeText { + class ValueGrid: RangeText + { idc = 172; font = "EtelkaMonospacePro"; style = 2; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; - x = "12.20 * (0.01875 * SafezoneH)"; - y = "3.5 * (0.025 * SafezoneH)"; - w = "6 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "12.20 * (0.01875 * SafezoneH)"; + y = "3.5 * (0.025 * SafezoneH)"; + w = "6 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class TextTADS: RangeText { + class TextTADS: RangeText + { idc = 1010; text = "TADS"; font = "EtelkaMonospacePro"; style = 2; shadow = 0; - x = "12.30 * (0.01875 * SafezoneH)"; - y = "5 * (0.025 * SafezoneH)"; - w = "4 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "12.30 * (0.01875 * SafezoneH)"; + y = "5 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; - - class ValueTime: RangeText { + class ValueTime: RangeText + { idc = 190; text = "20:28:35"; font = "EtelkaMonospacePro"; style = 2; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; - x = "12.1 * (0.01875 * SafezoneH)"; - y = "6.5 * (0.025 * SafezoneH)"; - w = "6 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "12.1 * (0.01875 * SafezoneH)"; + y = "6.5 * (0.025 * SafezoneH)"; + w = "6 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class CA_Laser: RscText { + class CA_Laser: RscText + { idc = 158; style = "0x30 + 0x800"; - sizeEx = "0.038 * SafezoneH"; + sizeEx = "0.038*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; text = QPATHTOF(data\Helo_LaserON.paa); - x = "20.45 * (0.01875 * SafezoneH)"; - y = "14.1 * (0.025 * SafezoneH)"; - w = "12.5 * (0.01875 * SafezoneH)"; - h = "12 * (0.025 * SafezoneH)"; + x = "20.45 * (0.01875 * SafezoneH)"; + y = "14.1 * (0.025 * SafezoneH)"; + w = "12.5 * (0.01875 * SafezoneH)"; + h = "12 * (0.025 * SafezoneH)"; }; - - class CA_Heading: RscText { + class CA_Heading: RscText + { idc = 156; style = 0; - sizeEx = "0.038 * SafezoneH"; + sizeEx = "0.038*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; text = "023"; - x = "24.83 * (0.01875 * SafezoneH)"; - y = "6 * (0.025 * SafezoneH)"; - w = "4 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "24.83 * (0.01875 * SafezoneH)"; + y = "6 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; }; }; }; - - class Rsc_ACE_Helo_UI_01: RscUnitInfo { - controls[] = {"WeaponInfoControlsGroupRight", "CA_TextFlaresMode", "CA_TextFlares", "CA_VehicleToggles", "CA_Radar"}; + class Rsc_ACE_Helo_UI_01: RscUnitInfo + { + controls[] = {"WeaponInfoControlsGroupRight","CA_TextFlaresMode","CA_TextFlares","CA_VehicleToggles","CA_Radar"}; }; - - class Rsc_ACE_Helo_UI_02: RscUnitInfo { - controls[] = {"CA_TextFlaresMode", "CA_TextFlares", "CA_VehicleToggles", "CA_Radar"}; + class Rsc_ACE_Helo_UI_02: RscUnitInfo + { + controls[] = {"CA_TextFlaresMode","CA_TextFlares","CA_VehicleToggles","CA_Radar"}; }; - - class Rsc_ACE_Drones_UI_Turret: RscUnitInfo { + class Rsc_ACE_Drones_UI_Turret: RscUnitInfo + { idd = 300; - controls[] = {"CA_Zeroing", "CA_IGUI_elements_group", "CA_VehicleToggles"}; - - class CA_IGUI_elements_group: RscControlsGroup { + controls[] = {"CA_Zeroing","CA_IGUI_elements_group","CA_VehicleToggles"}; + class CA_IGUI_elements_group: RscControlsGroup + { idc = 170; - - class VScrollbar: VScrollbar { + class VScrollbar: VScrollbar + { width = 0; }; - - class HScrollbar: HScrollbar { + class HScrollbar: HScrollbar + { height = 0; }; - - x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))"; - y = "0 * (0.025 * SafezoneH) + (SafezoneY)"; - w = "53.5 * (0.01875 * SafezoneH)"; - h = "40 * (0.025 * SafezoneH)"; - - class controls { - class CA_Distance: RscText { + x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))"; + y = "0 * (0.025 * SafezoneH) + (SafezoneY)"; + w = "53.5 * (0.01875 * SafezoneH)"; + h = "40 * (0.025 * SafezoneH)"; + class controls + { + class CA_Distance: RscText + { idc = 151; style = 2; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; - x = "24.78 * (0.01875 * SafezoneH)"; - y = "30.88 * (0.025 * SafezoneH)"; - w = "4 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "24.78 * (0.01875 * SafezoneH)"; + y = "30.88 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; - - class CA_Speed: RangeText { + class CA_Speed: RangeText + { idc = 188; style = 2; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; text = "120"; - x = "14.78 * (0.01875 * SafezoneH)"; - y = "30.88 * (0.025 * SafezoneH)"; - w = "4 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "14.78 * (0.01875 * SafezoneH)"; + y = "30.88 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; - - class CA_Alt: RangeText { + class CA_Alt: RangeText + { idc = 189; style = 2; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; text = "3825"; - x = "34.78 * (0.01875 * SafezoneH)"; - y = "30.88 * (0.025 * SafezoneH)"; - w = "4 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "34.78 * (0.01875 * SafezoneH)"; + y = "30.88 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; - - class ValueTime: RangeText { + class ValueTime: RangeText + { idc = 190; text = "20:28:35"; font = "EtelkaMonospacePro"; style = 2; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; - x = "1.75 * (0.01875 * SafezoneH)"; - y = "10.5 * (0.025 * SafezoneH)"; - w = "6 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "1.75 * (0.01875 * SafezoneH)"; + y = "10.5 * (0.025 * SafezoneH)"; + w = "6 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class CA_VisionMode: RscText { + class CA_VisionMode: RscText + { idc = 152; style = 0; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; text = "VIS"; align = "right"; - x = "2.6 * (0.01875 * SafezoneH)"; - y = "12.0 * (0.025 * SafezoneH)"; - w = "4 * (0.01875 * SafezoneH)"; - h = "1.0 * (0.025 * SafezoneH)"; + x = "2.6 * (0.01875 * SafezoneH)"; + y = "12.0 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "1.0 * (0.025 * SafezoneH)"; }; - - class CA_FlirMode: RscText { + class CA_FlirMode: RscText + { idc = 153; style = 0; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; text = "BHOT"; align = "right"; - x = "6.18 * (0.01875 * SafezoneH)"; - y = "12.0 * (0.025 * SafezoneH)"; - w = "4.5 * (0.01875 * SafezoneH)"; - h = "1.0 * (0.025 * SafezoneH)"; + x = "6.18 * (0.01875 * SafezoneH)"; + y = "12.0 * (0.025 * SafezoneH)"; + w = "4.5 * (0.01875 * SafezoneH)"; + h = "1.0 * (0.025 * SafezoneH)"; }; - - class TgT_Grid_text: RangeText { + class TgT_Grid_text: RangeText + { idc = 1005; text = "TGT:"; font = "EtelkaMonospacePro"; style = 2; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; - x = "1.20 * (0.01875 * SafezoneH)"; - y = "13.5 * (0.025 * SafezoneH)"; - w = "6 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "1.20 * (0.01875 * SafezoneH)"; + y = "13.5 * (0.025 * SafezoneH)"; + w = "6 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class TGT_ValueGrid: RangeText { + class TGT_ValueGrid: RangeText + { idc = 172; font = "EtelkaMonospacePro"; - colorText[] = {0.706, 0.0745, 0.0196, 0.8}; + colorText[] = {0.706,0.0745,0.0196,0.8}; style = 2; sizeEx = "0.0295*SafezoneH"; shadow = 0; - x = "5.20 * (0.01875 * SafezoneH)"; - y = "13.5 * (0.025 * SafezoneH)"; - w = "6 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "5.20 * (0.01875 * SafezoneH)"; + y = "13.5 * (0.025 * SafezoneH)"; + w = "6 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class OWN_Grid_text: RangeText { + class OWN_Grid_text: RangeText + { idc = 1005; text = "OWN:"; font = "EtelkaMonospacePro"; style = 2; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; - x = "1.20 * (0.01875 * SafezoneH)"; - y = "15 * (0.025 * SafezoneH)"; - w = "6 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "1.20 * (0.01875 * SafezoneH)"; + y = "15 * (0.025 * SafezoneH)"; + w = "6 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class OWN_ValueGrid: RangeText { + class OWN_ValueGrid: RangeText + { idc = 171; font = "EtelkaMonospacePro"; - colorText[] = {0.15, 1, 0.15, 0.8}; + colorText[] = {0.15,1,0.15,0.8}; style = 2; - sizeEx = "0.0295 * SafezoneH"; + sizeEx = "0.0295*SafezoneH"; shadow = 0; - x = "5.20 * (0.01875 * SafezoneH)"; - y = "15 * (0.025 * SafezoneH)"; - w = "6 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "5.20 * (0.01875 * SafezoneH)"; + y = "15 * (0.025 * SafezoneH)"; + w = "6 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class CA_Laser: RscText { + class CA_Laser: RscText + { idc = 158; style = "0x30 + 0x800"; - sizeEx = "0.038 * SafezoneH"; + sizeEx = "0.038*SafezoneH"; shadow = 0; align = "right"; font = "EtelkaMonospacePro"; text = QPATHTOF(data\Helo_LaserON.paa); - x = "20.45 * (0.01875 * SafezoneH)"; - y = "14.1 * (0.025 * SafezoneH)"; - w = "12.5 * (0.01875 * SafezoneH)"; - h = "12 * (0.025 * SafezoneH)"; + x = "20.45 * (0.01875 * SafezoneH)"; + y = "14.1 * (0.025 * SafezoneH)"; + w = "12.5 * (0.01875 * SafezoneH)"; + h = "12 * (0.025 * SafezoneH)"; }; - - class CA_Heading: RscText { + class CA_Heading: RscText + { idc = 156; style = 0; - sizeEx = "0.038 * SafezoneH"; + sizeEx = "0.038*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; text = "023"; align = "right"; - x = "25 * (0.01875 * SafezoneH)"; - y = "5 * (0.025 * SafezoneH)"; - w = "4 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "25 * (0.01875 * SafezoneH)"; + y = "5 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; }; }; }; - - class Rsc_ACE_Drones_UI_Pilots: RscUnitInfo { + class Rsc_ACE_Drones_UI_Pilots: RscUnitInfo + { idd = 300; - controls[] = {"WeaponInfoControlsGroupRight", "CA_BackgroundVehicle", "CA_BackgroundVehicleTitle", "CA_BackgroundVehicleTitleDark", "CA_BackgroundFuel", "CA_Vehicle", "CA_VehicleRole", "CA_HitZones", "CA_SpeedBackground", "CA_SpeedUnits", "CA_Speed", "CA_ValueFuel", "CA_AltBackground", "CA_AltUnits", "CA_Alt", "CA_VehicleToggles", "CA_Radar", "DriverOpticsGroup"}; - - class DriverOpticsGroup: RscControlsGroup { + controls[] = {"WeaponInfoControlsGroupRight","CA_BackgroundVehicle","CA_BackgroundVehicleTitle","CA_BackgroundVehicleTitleDark","CA_BackgroundFuel","CA_Vehicle","CA_VehicleRole","CA_HitZones","CA_SpeedBackground","CA_SpeedUnits","CA_Speed","CA_ValueFuel","CA_AltBackground","CA_AltUnits","CA_Alt","CA_VehicleToggles","CA_Radar","DriverOpticsGroup"}; + class DriverOpticsGroup: RscControlsGroup + { idc = 392; - - class VScrollbar: VScrollbar { + class VScrollbar: VScrollbar + { width = 0; }; - - class HScrollbar: HScrollbar { + class HScrollbar: HScrollbar + { height = 0; }; - x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))"; - y = "0 * (0.025 * SafezoneH) + (SafezoneY)"; - w = "53.5 * (0.01875 * SafezoneH)"; - h = "40 * (0.025 * SafezoneH)"; - - class controls { - class TextGrid: RscText { + x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))"; + y = "0 * (0.025 * SafezoneH) + (SafezoneY)"; + w = "53.5 * (0.01875 * SafezoneH)"; + h = "40 * (0.025 * SafezoneH)"; + class controls + { + class TextGrid: RscText + { style = 0; - sizeEx = "0.02 * SafezoneH"; + sizeEx = "0.02*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; idc = 1005; text = "GRID:"; - x = "5.8 * (0.01875 * SafezoneH)"; - y = "31.8 * (0.025 * SafezoneH)"; - w = "5 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "5.8 * (0.01875 * SafezoneH)"; + y = "31.8 * (0.025 * SafezoneH)"; + w = "5 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class ValueGrid: TextGrid { + class ValueGrid: TextGrid + { idc = 189; text = "382546"; - x = "10.3 * (0.01875 * SafezoneH)"; - y = "31.8 * (0.025 * SafezoneH)"; - w = "6 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "10.3 * (0.01875 * SafezoneH)"; + y = "31.8 * (0.025 * SafezoneH)"; + w = "6 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class TextTime: TextGrid { + class TextTime: TextGrid + { idc = 1010; text = "TIME [UTC]:"; - x = "5.8 * (0.01875 * SafezoneH)"; - y = "32.6 * (0.025 * SafezoneH)"; - w = "5 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "5.8 * (0.01875 * SafezoneH)"; + y = "32.6 * (0.025 * SafezoneH)"; + w = "5 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class ValueTime: TextGrid { + class ValueTime: TextGrid + { idc = 101; text = "20:28:35"; - x = "10 * (0.01875 * SafezoneH)"; - y = "32.6 * (0.025 * SafezoneH)"; - w = "6 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "10 * (0.01875 * SafezoneH)"; + y = "32.6 * (0.025 * SafezoneH)"; + w = "6 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class TextMag: TextGrid { + class TextMag: TextGrid + { idc = 1011; text = "CAM MAG:"; - x = "5.8 * (0.01875 * SafezoneH)"; - y = "7 * (0.025 * SafezoneH)"; - w = "5 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "5.8 * (0.01875 * SafezoneH)"; + y = "7 * (0.025 * SafezoneH)"; + w = "5 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class OpticsZoom: TextGrid { + class OpticsZoom: TextGrid + { idc = 192; text = "28x"; - x = "10.3 * (0.01875 * SafezoneH)"; - y = "7 * (0.025 * SafezoneH)"; - w = "6 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "10.3 * (0.01875 * SafezoneH)"; + y = "7 * (0.025 * SafezoneH)"; + w = "6 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class BorderLineSpdTop: RscPicture { + class BorderLineSpdTop: RscPicture + { idc = 1203; text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa"; - x = "3.343 * (0.01875 * SafezoneH)"; - y = "12.4 * (0.025 * SafezoneH)"; - w = "3 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "3.343 * (0.01875 * SafezoneH)"; + y = "12.4 * (0.025 * SafezoneH)"; + w = "3 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class BorderLineSpdBottom: RscPicture { + class BorderLineSpdBottom: RscPicture + { idc = 1207; text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa"; - x = "3.343 * (0.01875 * SafezoneH)"; - y = "26.5 * (0.025 * SafezoneH)"; - w = "3 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "3.343 * (0.01875 * SafezoneH)"; + y = "26.5 * (0.025 * SafezoneH)"; + w = "3 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class BorderLineAltTop: RscPicture { + class BorderLineAltTop: RscPicture + { idc = 1205; text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa"; - x = "47.16 * (0.01875 * SafezoneH)"; - y = "12.4 * (0.025 * SafezoneH)"; - w = "3 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "47.16 * (0.01875 * SafezoneH)"; + y = "12.4 * (0.025 * SafezoneH)"; + w = "3 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class BorderLineAltBottom: RscPicture { + class BorderLineAltBottom: RscPicture + { idc = 1206; text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa"; - x = "47.16 * (0.01875 * SafezoneH)"; - y = "26.5 * (0.025 * SafezoneH)"; - w = "3 * (0.01875 * SafezoneH)"; - h = "1 * (0.025 * SafezoneH)"; + x = "47.16 * (0.01875 * SafezoneH)"; + y = "26.5 * (0.025 * SafezoneH)"; + w = "3 * (0.01875 * SafezoneH)"; + h = "1 * (0.025 * SafezoneH)"; }; - - class TextSpd: TextGrid { + class TextSpd: TextGrid + { idc = 1004; text = "SPD"; - x = "4.8 * (0.01875 * SafezoneH)"; - y = "11.8 * (0.025 * SafezoneH)"; - w = "5 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "4.8 * (0.01875 * SafezoneH)"; + y = "11.8 * (0.025 * SafezoneH)"; + w = "5 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; - - class SpeedValueBorder: RscPicture { + class SpeedValueBorder: RscPicture + { idc = 1200; text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\altimeter_value_ca.paa"; - x = "6.3 * (0.01875 * SafezoneH)"; - y = "19 * (0.025 * SafezoneH)"; - w = "5 * (0.01875 * SafezoneH)"; - h = "2 * (0.025 * SafezoneH)"; + x = "6.3 * (0.01875 * SafezoneH)"; + y = "19 * (0.025 * SafezoneH)"; + w = "5 * (0.01875 * SafezoneH)"; + h = "2 * (0.025 * SafezoneH)"; }; - - class CA_Speed: TextGrid { + class CA_Speed: TextGrid + { idc = 190; sizeEx = "0.03*SafezoneH"; text = "120"; - x = "7.5 * (0.01875 * SafezoneH)"; - y = "19.5 * (0.025 * SafezoneH)"; - w = "6 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "7.5 * (0.01875 * SafezoneH)"; + y = "19.5 * (0.025 * SafezoneH)"; + w = "6 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; - - class AnalogueSpeed: RscLadderPicture { + class AnalogueSpeed: RscLadderPicture + { idc = 384; topValue = 1312; bottomValue = -345; visibleRange = -1; text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\UAVspeedLadder_ca.paa"; - x = "1.5 * (0.01875 * SafezoneH)"; - y = "13 * (0.025 * SafezoneH)"; - w = "5 * (0.01875 * SafezoneH)"; - h = "14 * (0.025 * SafezoneH)"; + x = "1.5 * (0.01875 * SafezoneH)"; + y = "13 * (0.025 * SafezoneH)"; + w = "5 * (0.01875 * SafezoneH)"; + h = "14 * (0.025 * SafezoneH)"; }; - - class TextAlt: TextGrid { + class TextAlt: TextGrid + { idc = 1006; text = "ALT"; - x = "46.9 * (0.01875 * SafezoneH)"; - y = "11.8 * (0.025 * SafezoneH)"; - w = "5 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "46.9 * (0.01875 * SafezoneH)"; + y = "11.8 * (0.025 * SafezoneH)"; + w = "5 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; - - class AltValueBorder: RscPicture { + class AltValueBorder: RscPicture + { idc = 1201; text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\airspeed_value_ca.paa"; - x = "42.25 * (0.01875 * SafezoneH)"; - y = "19 * (0.025 * SafezoneH)"; - w = "5 * (0.01875 * SafezoneH)"; - h = "2 * (0.025 * SafezoneH)"; + x = "42.25 * (0.01875 * SafezoneH)"; + y = "19 * (0.025 * SafezoneH)"; + w = "5 * (0.01875 * SafezoneH)"; + h = "2 * (0.025 * SafezoneH)"; }; - - class CA_Alt: TextGrid { + class CA_Alt: TextGrid + { idc = 191; - sizeEx = "0.03 * SafezoneH"; + sizeEx = "0.03*SafezoneH"; style = 1; text = "3825"; - x = "43 * (0.01875 * SafezoneH)"; - y = "19.5 * (0.025 * SafezoneH)"; - w = "3.2 * (0.01875 * SafezoneH)"; - h = "1.2 * (0.025 * SafezoneH)"; + x = "43 * (0.01875 * SafezoneH)"; + y = "19.5 * (0.025 * SafezoneH)"; + w = "3.2 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; }; - - class AnalogueAlt: RscLadderPicture { + class AnalogueAlt: RscLadderPicture + { idc = 385; topValue = 14430; bottomValue = -2110; visibleRange = -1; text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\UAValtLadder_ca.paa"; - x = "47 * (0.01875 * SafezoneH)"; - y = "13 * (0.025 * SafezoneH)"; - w = "2.5 * (0.01875 * SafezoneH)"; - h = "14 * (0.025 * SafezoneH)"; + x = "47 * (0.01875 * SafezoneH)"; + y = "13 * (0.025 * SafezoneH)"; + w = "2.5 * (0.01875 * SafezoneH)"; + h = "14 * (0.025 * SafezoneH)"; }; - - class AnalogueHorizon: RscLadderPicture { + class AnalogueHorizon: RscLadderPicture + { idc = 383; topValue = 90; bottomValue = -90; visibleRange = -1; text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\horizon_ladder_ca.paa"; - x = "16.75 * (0.01875 * SafezoneH)"; - y = "5 * (0.025 * SafezoneH)"; - w = "20 * (0.01875 * SafezoneH)"; - h = "30 * (0.025 * SafezoneH)"; + x = "16.75 * (0.01875 * SafezoneH)"; + y = "5 * (0.025 * SafezoneH)"; + w = "20 * (0.01875 * SafezoneH)"; + h = "30 * (0.025 * SafezoneH)"; }; - - class HorizonCenter: RscPicture { + class HorizonCenter: RscPicture + { idc = 1202; text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\horizon_aircraft_ca.paa"; - x = "24.75 * (0.01875 * SafezoneH)"; - y = "19 * (0.025 * SafezoneH)"; - w = "4 * (0.01875 * SafezoneH)"; - h = "2 * (0.025 * SafezoneH)"; + x = "24.75 * (0.01875 * SafezoneH)"; + y = "19 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "2 * (0.025 * SafezoneH)"; }; }; }; }; -}; +}; \ No newline at end of file diff --git a/addons/aircraft/config.cpp b/addons/aircraft/config.cpp index 48bf2c054e..863797ebeb 100644 --- a/addons/aircraft/config.cpp +++ b/addons/aircraft/config.cpp @@ -8,7 +8,7 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; author = ECSTRING(common,ACETeam); - authors[] = {"KoffeinFlummi", "Crusty", "commy2", "jaynus", "Kimi"}; + authors[] = {"KoffeinFlummi","Crusty","commy2","jaynus","Kimi"}; url = ECSTRING(main,URL); VERSION_CONFIG; @@ -21,4 +21,4 @@ class CfgPatches { #include "CfgMagazines.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" -#include "RscInGameUI.hpp" +#include "RscInGameUI.hpp" \ No newline at end of file diff --git a/addons/aircraft/flightmodel_alca.hpp b/addons/aircraft/flightmodel_alca.hpp new file mode 100644 index 0000000000..09785e22e7 --- /dev/null +++ b/addons/aircraft/flightmodel_alca.hpp @@ -0,0 +1,24 @@ + +acceleration = 300; +maxSpeed = 936; +irScanRangeMin = 500; +irScanRangeMax = 5000; +aileronSensitivity = 0.64; +elevatorSensitivity = 0.682; +rudderInfluence = 0.001; +aileronControlsSensitivityCoef = 3; +elevatorControlsSensitivity = 2; +rudderControlsSensitivityoef = 4; +elevatorCoef[] = {0.6,0.73,0.62,0.52,0.39,0.33,0.28}; +aileronCoef[] = {0.5,0.68,0.75,0.86,0.92,0.96,1}; +rudderCoef[] = {0.9,0.75,0.58,0.45,0.38,0.35,0.3}; +envelope[] = {0,0.06,1.2,3,3.6,3.75,3.65,3.45,3.3,2.8,2.4,1.9,1.5}; +angleOfIndicence = 0.0523599; //determines velocity vector behaviour, how quickly it catches up with where your nose is pointing, I think +draconicForceXCoef = 7.5; //max angle of attack, lower value gives higher aoa +draconicForceYCoef = 0.2198; //Something to do with bleed off of speed, low values seem to increase bleed off +draconicForceZCoef = 5.12; //???? +draconicTorqueXCoef = 0.18; //resistance to elevator input, also impacts speed degradation +draconicTorqueYCoef = 0.000017; +thrustCoef[] = {1.3,1.27,1.24,1.2,1.17,1.15,1.13,1.1,1.06,1,0.94,0.72,0.51,0.4,0.25,0}; +gunAimDown = 0.029; +flapsFrictionCoef = 0.32; diff --git a/addons/aircraft/flightmodel_thunderbolt.hpp b/addons/aircraft/flightmodel_thunderbolt.hpp new file mode 100644 index 0000000000..2446e166bc --- /dev/null +++ b/addons/aircraft/flightmodel_thunderbolt.hpp @@ -0,0 +1,22 @@ + +maxSpeed = 736; +aileronSensitivity = 0.85; +elevatorSensitivity = 0.75; +rudderInfluence = 0.001; +aileronControlsSensitivityCoef = 3; +elevatorControlsSensitivity = 2; +rudderControlsSensitivityoef = 4; +elevatorCoef[] = {0.7,0.75,0.75,0.65,0.55,0.45,0.35}; +aileronCoef[] = {0.6,0.85,0.88,0.92,0.95,0.97,1}; +rudderCoef[] = {0.8,0.75,0.65,0.5,0.4,0.33,0.3}; +flapsFrictionCoef = 0.35; +angleOfIndicence = 0.0523599; +draconicForceXCoef = 9.5; +draconicForceYCoef = 0.56; +draconicForceZCoef = 0.1; +draconicTorqueXCoef = 0.58; +draconicTorqueYCoef = 0.00013; +envelope[] = {0,0,0.75,2.4,3.6,3.8,3.7,3.2,2.2,1.7,0.9}; +thrustCoef[] = {1,1.2,1.3,1.25,1.06,1.01,1,0.92,0.75,0.65,0.5,0.25,0}; +acceleration = 265; +landingSpeed = 220; diff --git a/addons/aircraft/flightmodel_yak.hpp b/addons/aircraft/flightmodel_yak.hpp new file mode 100644 index 0000000000..bcf5a4cfd0 --- /dev/null +++ b/addons/aircraft/flightmodel_yak.hpp @@ -0,0 +1,21 @@ + +maxSpeed = 1059; +acceleration = 300; +aileronSensitivity = 0.635; +elevatorSensitivity = 0.814; +rudderInfluence = 0.001; +aileronControlsSensitivityCoef = 3; +elevatorControlsSensitivity = 2; +rudderControlsSensitivityoef = 4; +elevatorCoef[] = {0.6,0.76,0.7,0.65,0.58,0.47,0.43}; +aileronCoef[] = {0.5,0.85,0.87,0.89,0.92,0.95,1}; +rudderCoef[] = {0.8,0.7,0.6,0.5,0.4,0.32,0.27}; +angleOfIndicence = 0.0523599; +draconicForceXCoef = 7.6; +draconicForceYCoef = 0.75; +draconicForceZCoef = 0.085; +draconicTorqueXCoef = 0.815; +draconicTorqueYCoef = 0.000152; +envelope[] = {0,0.446,1.5,3.9,5.2,4.8,4.2,3.5,2,1,0.5}; +thrustCoef[] = {1,1.2,1.7,1.7,1.65,1.54,1.32,1.1,0.95,0.75,0.5,0.35,0}; +flapsFrictionCoef = 0.32; diff --git a/addons/aircraft/script_component.hpp b/addons/aircraft/script_component.hpp index 3f4510881e..e2379c0791 100644 --- a/addons/aircraft/script_component.hpp +++ b/addons/aircraft/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_AIRCRAFT diff --git a/addons/aircraft/stringtable.xml b/addons/aircraft/stringtable.xml index 0c52397242..5516551d42 100644 --- a/addons/aircraft/stringtable.xml +++ b/addons/aircraft/stringtable.xml @@ -1,6 +1,18 @@ - + + + Burst + Feuerstoß + Ráfaga + Seria + Dávka + Rafale + Очередь + Sorozat + Rajada + Raffica + XM301 XM301 @@ -12,10 +24,6 @@ XM301 XM301 XM301 - XM301 - XM301 - XM301 - XM301 Open Cargo Door @@ -28,10 +36,6 @@ Открыть грузовой отсек Apri la rampa di carico Abrir porta de carga - カーゴ ドアを開く - 화물칸 개방 - 開啟貨艙門 - 开启货舱门 Close Cargo Door @@ -44,10 +48,6 @@ Закрыть грузовой отсек Chiudi la rampa di carico Fechar porta de carga - カーゴ ドアを閉じる - 화물칸 폐쇄 - 關閉貨艙門 - 关闭货舱门 - + \ No newline at end of file diff --git a/addons/apl/script_component.hpp b/addons/apl/script_component.hpp index a0e82fb2d2..969c9dca7f 100644 --- a/addons/apl/script_component.hpp +++ b/addons/apl/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_APL diff --git a/addons/atragmx/RscTitles.hpp b/addons/atragmx/RscTitles.hpp index ba03785427..625cd68deb 100644 --- a/addons/atragmx/RscTitles.hpp +++ b/addons/atragmx/RscTitles.hpp @@ -2,10 +2,6 @@ #define ST_RIGHT 1 #define ST_CENTER 2 -#define ST_WITH_RECT 160 - -#define LB_TEXTURES 0x10 - class ATragMX_RscText { idc=-1; type=0; @@ -97,7 +93,7 @@ class ATragMX_RscToolbox { class ATragMX_RscListBox { idc=-1; type=5; - style=LB_TEXTURES; + style=0; font="TahomaB"; sizeEx=0.028; rowHeight=0.03; @@ -117,14 +113,13 @@ class ATragMX_RscListBox { soundSelect[]={"",0.09,1}; class ScrollBar { - width=0.05; - color[]={0.15,0.21,0.23,0.3}; - colorActive[]={0.15,0.21,0.23,0.3}; - colorDisabled[]={0.15,0.21,0.23,0.3}; - arrowEmpty="\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; - arrowFull="\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; - border="\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; - thumb="\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; + color[]={1,1,1,0.6}; + colorActive[]={1,1,1,1}; + colorDisabled[]={1,1,1,0.3}; + //thumb="\ca\ui\data\igui_scrollbar_thumb_ca.paa"; + //arrowFull="\ca\ui\data\igui_arrow_top_active_ca.paa"; + //arrowEmpty="\ca\ui\data\igui_arrow_top_ca.paa"; + //border="\ca\ui\data\igui_border_scroll_ca.paa"; }; class ListScrollBar : ScrollBar { @@ -133,6 +128,7 @@ class ATragMX_RscListBox { class ATragMX_RscListNBox: ATragMX_RscListBox { idc=-1; type=102; + columns[]={0.0, 0.225, 0.475, 0.7}; drawSideArrows=0; idcLeft=-1; idcRight=-1; @@ -354,7 +350,6 @@ class ATragMX_Display { colorBackground[]={0.15,0.21,0.23,0.3}; colorFocused[]={0.15,0.21,0.23,0.2}; text="MV"; - action=QUOTE(0 call FUNC(toggle_muzzle_velocity_data)); }; class TEXT_MUZZLE_VELOCITY_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT { idc=130; @@ -388,18 +383,18 @@ class ATragMX_Display { y=0.265*safezoneH+safezoneY+0.320; text=""; }; - class TEXT_BAROMETRIC_PRESSURE: TEXT_TEMPERATURE { + class TEXT_BAROMETRIC_PRESSURE: TEXT_AIR_FRICTION { idc=21; 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; }; - class TEXT_RELATIVE_HUMIDITY: TEXT_BAROMETRIC_PRESSURE { + class TEXT_RELATIVE_HUMIDITY: TEXT_AIR_FRICTION { idc=22; + x=0.550*safezoneW+safezoneX+0.20; y=0.265*safezoneH+safezoneY+0.390; text="RH"; }; @@ -531,7 +526,7 @@ class ATragMX_Display { }; class TEXT_ELEVATION_OUTPUT_ABSOLUTE: ATragMX_RscText { idc=400; - style=ST_WITH_RECT+ST_RIGHT; + style=160; sizeEx=0.025; w=0.065; h=0.032; @@ -611,40 +606,17 @@ class ATragMX_Display { class TEXT_SCOPE_CLICK_NUMBER: TEXT_GUN_LIST { idc=2001; style=ST_CENTER; - w=0.025; + w=0.03; x=0.550*safezoneW+safezoneX+0.27; text="4"; action=QUOTE(call FUNC(toggle_solution_setup)); }; - class TEXT_OPTIONS: TEXT_GUN_LIST { + class TEXT_CALCULATE: TEXT_SCOPE_UNIT { idc=3000; style=ST_RIGHT; x=0.550*safezoneW+safezoneX+0.3; - text="Options"; - action=QUOTE(false call FUNC(toggle_option_menu)); - }; - class TEXT_OPTIONS_BACKGROUND: ATragMX_RscButton { - idc=3001; - 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; - w=0.3; - h=0.535; - offsetPressedX=0.0; - offsetPressedY=0.0; - action=QUOTE(false call FUNC(toggle_option_menu)); - }; - class TEXT_OPTIONS_LIST_OUTPUT: ATragMX_RscListBox { - idc=3002; - style=0; - w=0.17; - h=0.28; - 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)); + text="Calc"; + action=QUOTE(call FUNC(calculate_target_solution)); }; class TEXT_RANGE_CARD_SCOPE_UNIT: TEXT_GUN_PROFILE { @@ -694,7 +666,6 @@ class ATragMX_Display { }; class TEXT_RANGE_CARD_OUTPUT: ATragMX_RscListNBox { idc=5007; - columns[]={0.0, 0.225, 0.475, 0.7}; idcLeft=50061; idcRight=50062; w=0.285; @@ -703,17 +674,16 @@ class ATragMX_Display { y=0.265*safezoneH+safezoneY+0.27; }; - class TEXT_GUN_LIST_OUTPUT: ATragMX_RscListNBox { + class TEXT_GUN_LIST_OUTPUT: ATragMX_RscListBox { idc=6000; - columns[]={-0.05}; w=0.16; h=0.45; x=0.550*safezoneW+safezoneX+0.11; y=0.265*safezoneH+safezoneY+0.24; - sizeEx=0.018; + sizeEx=0.025; colorSelectBackground[]={0.15,0.21,0.23,0.3}; colorSelectBackground2[]={0.15,0.21,0.23,0.3}; - onLBDblClick=QUOTE(true call FUNC(toggle_gun_list)); + onMouseButtonDblClick=QUOTE(true call FUNC(toggle_gun_list)); }; class TEXT_GUN_LIST_COLUMN_CAPTION: TEXT_GUN_PROFILE { idc=6001; @@ -796,9 +766,8 @@ 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; + x=0.550*safezoneW+safezoneX+0.10; 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 { @@ -905,22 +874,22 @@ class ATragMX_Display { 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.13; 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.13; 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.13; 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.13; text="Est Speed"; }; class TEXT_TARGET_SPEED_ASSIST_TARGET_RANGE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { @@ -1071,8 +1040,6 @@ class ATragMX_Display { 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)); }; class TEXT_ADD_NEW_GUN_OK: ATragMX_RscButton { idc=11002; @@ -1501,343 +1468,5 @@ class ATragMX_Display { 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; - 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; - sizeEx=0.022; - text="Muzzle velocity"; - }; - class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1: ATragMX_RscEdit { - idc=160021; - w=0.082; - h=0.035; - 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; - }; - class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_3: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { - idc=160023; - 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; - }; - class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_5: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { - idc=160025; - 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; - }; - class TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_7: TEXT_MUZZLE_VELOCITY_DATA_TEMPERATURE_INPUT_1 { - idc=160027; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - 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; - text="?"; - action=""; - }; - class TEXT_MUZZLE_VELOCITY_DATA_DONE: TEXT_TARGET_DATA_DONE { - idc=16006; - action=QUOTE(1 call FUNC(toggle_muzzle_velocity_data)); - }; - class TEXT_MUZZLE_VELOCITY_DATA_CANCEL: TEXT_TARGET_DATA_CANCEL { - idc=16007; - action=QUOTE(0 call FUNC(toggle_muzzle_velocity_data)); - }; - class TEXT_MUZZLE_VELOCITY_DATA_PREV: TEXT_TARGET_DATA_PREV { - idc=16008; - }; - class TEXT_MUZZLE_VELOCITY_DATA_NEXT: TEXT_TARGET_DATA_NEXT { - idc=16009; - }; - - 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; - 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; - sizeEx=0.022; - text="BC-Coef"; - }; - class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DISTANCE_INPUT_1: ATragMX_RscEdit { - idc=170021; - w=0.082; - h=0.035; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - }; - 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; - 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; - text="Clear"; - action=QUOTE(call FUNC(clear_c1_ballistic_coefficient_data)); - }; - class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_DONE: TEXT_TARGET_DATA_DONE { - idc=17006; - action=QUOTE(1 call FUNC(toggle_c1_ballistic_coefficient_data)); - }; - class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_CANCEL: TEXT_TARGET_DATA_CANCEL { - idc=17007; - action=QUOTE(0 call FUNC(toggle_c1_ballistic_coefficient_data)); - }; - class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_PREV: TEXT_TARGET_DATA_PREV { - idc=17008; - }; - class TEXT_C1_BALLISTIC_COEFFICIENT_DATA_NEXT: TEXT_TARGET_DATA_NEXT { - idc=17009; - }; - - 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; - w=0.135; - h=0.03; - sizeEx=0.025; - text="ZR=100meters"; - }; - class TEXT_TRUING_DROP_DROP_UNIT: TEXT_TRUING_DROP_ZERO_RANGE { - idc=18001; - style=ST_LEFT; - 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; - 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; - text="Drop"; - }; - class TEXT_TRUING_DROP_MUZZLE_VELOCITY: TEXT_TRUING_DROP_DROP { - idc=18004; - 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; - text="C1"; - }; - class TEXT_TRUING_DROP_DROP_OUTPUT: ATragMX_RscEdit { - idc=18006; - style=ST_WITH_RECT+ST_RIGHT; - 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; - text=""; - }; - class TEXT_TRUING_DROP_MUZZLE_VELOCITY_OUTPUT: TEXT_TRUING_DROP_DROP_OUTPUT { - idc=18007; - 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; - 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; - 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; - text="SUB"; - action=QUOTE(GVAR(truingDropMode) = 1; call FUNC(update_truing_drop_selection)); - }; - class TEXT_TRUING_DROP_TARGET_RANGE_SUPER_INPUT: ATragMX_RscEdit { - idc=18011; - style=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; - }; - class TEXT_TRUING_DROP_TARGET_RANGE_SUB_INPUT: TEXT_TRUING_DROP_TARGET_RANGE_SUPER_INPUT { - idc=18012; - 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; - }; - class TEXT_TRUING_DROP_DROP_SUB_INPUT: TEXT_TRUING_DROP_TARGET_RANGE_SUB_INPUT { - idc=18014; - 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; - 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; - }; - class TEXT_TRUING_DROP_C1_BALLISTIC_COEFFICIENT_INPUT: TEXT_TRUING_DROP_TARGET_RANGE_SUB_INPUT { - idc=18017; - 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; - 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; - 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; - text="Restore"; - action=QUOTE(true call FUNC(restore_truing_drop)); - }; }; }; diff --git a/addons/atragmx/XEH_PREP.hpp b/addons/atragmx/XEH_PREP.hpp index c77b7e0655..20900711c3 100644 --- a/addons/atragmx/XEH_PREP.hpp +++ b/addons/atragmx/XEH_PREP.hpp @@ -1,17 +1,13 @@ PREP(add_new_gun); -PREP(calculate_distance_at_velocity); PREP(calculate_range_card); PREP(calculate_solution); PREP(calculate_target_range_assist); PREP(calculate_target_solution); PREP(calculate_target_speed_assist); -PREP(calculate_truing_drop); PREP(can_show); PREP(change_gun); PREP(change_target_slot); -PREP(clear_c1_ballistic_coefficient_data); -PREP(clear_muzzle_velocity_data); PREP(clear_user_data); PREP(create_dialog); PREP(cycle_gun_list); @@ -22,29 +18,17 @@ PREP(cycle_scope_unit); PREP(cycle_target_size_units); PREP(cycle_target_speed_direction); PREP(delete_gun); -PREP(evaluate_option_menu_input); PREP(init); -PREP(initGunList); -PREP(insert_c1_ballistic_coefficient_data); -PREP(insert_muzzle_velocity_data); PREP(parse_input); -PREP(read_gun_list_entries_from_config); -PREP(recalculate_c1_ballistic_coefficient); -PREP(recalculate_muzzle_velocity); PREP(reset_relative_click_memory); PREP(restore_atmo_default); -PREP(restore_truing_drop); PREP(restore_user_data); PREP(save_gun); -PREP(shift_c1_ballistic_coefficient_data); -PREP(shift_muzzle_velocity_data); PREP(show_add_new_gun); PREP(show_atmo_env_data); -PREP(show_c1_ballistic_coefficient_data); PREP(show_gun_ammo_data); PREP(show_gun_list); PREP(show_main_page); -PREP(show_muzzle_velocity_data); PREP(show_range_card); PREP(show_range_card_setup); PREP(show_solution_setup); @@ -52,36 +36,24 @@ PREP(show_target_data); PREP(show_target_range_assist); PREP(show_target_speed_assist); PREP(show_target_speed_assist_timer); -PREP(show_truing_drop); PREP(sord); -PREP(store_gun_list); PREP(store_user_data); PREP(target_speed_assist_timer); PREP(toggle_atmo_env_data); -PREP(toggle_c1_ballistic_coefficient_data); -PREP(toggle_coriolis); PREP(toggle_gun_ammo_data); PREP(toggle_gun_list); -PREP(toggle_muzzle_velocity_data); -PREP(toggle_option_menu); PREP(toggle_range_card); PREP(toggle_range_card_setup); PREP(toggle_solution_setup); PREP(toggle_target_data); PREP(toggle_target_range_assist); PREP(toggle_target_speed_assist); -PREP(toggle_truing_drop); -PREP(trim_gun_name); -PREP(true_c1_ballistic_coefficient); -PREP(true_muzzle_velocity); PREP(update_atmosphere); PREP(update_atmo_env_data); PREP(update_atmo_selection); -PREP(update_c1_ballistic_coefficient_data); PREP(update_gun); PREP(update_gun_ammo_data); PREP(update_inclination_angle); -PREP(update_muzzle_velocity_data); PREP(update_range_card); PREP(update_relative_click_memory); PREP(update_result); @@ -90,8 +62,6 @@ PREP(update_solution_setup); PREP(update_target); PREP(update_target_data); PREP(update_target_selection); -PREP(update_truing_drop_data); -PREP(update_truing_drop_selection); PREP(update_unit_selection); PREP(update_zero_range); PREP(on_close_dialog); diff --git a/addons/atragmx/XEH_postInit.sqf b/addons/atragmx/XEH_postInit.sqf index 9034016212..4a68aac749 100644 --- a/addons/atragmx/XEH_postInit.sqf +++ b/addons/atragmx/XEH_postInit.sqf @@ -2,7 +2,53 @@ #include "initKeybinds.sqf" -GVAR(active) = false; -GVAR(initialised) = false; +if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) == ATRAGMX_PROFILE_NAMESPACE_VERSION && count (profileNamespace getVariable ["ACE_ATragMX_gunList", []]) > 0) then { + GVAR(gunList) = profileNamespace getVariable "ACE_ATragMX_gunList"; +} else { + // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model + GVAR(gunList) = [["12.7x108mm" , 820, 100, 0.0657485, -0.00063800, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" ], + + ["12.7x99mm AMAX" , 860, 100, 0.0611565, -0.00036645, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" ], + ["12.7x99mm" , 900, 100, 0.0582418, -0.00057503, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ], + ["12.7x99mm API" , 900, 100, 0.0582418, -0.00057503, 3.81, 0, 2, 10, 120, 0, 0, 41.99, 12.9, 38.10, 0.670, 1, "ASM" ], + + ["12.7x54mm" , 300, 100, 0.3394630, -0.00019268, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" ], + + [".408 Chey Tac" , 910, 100, 0.0569400, -0.00038944, 3.81, 0, 2, 10, 120, 0, 0, 26.57, 10.4, 33.02, 0.970, 1, "ASM" ], + + ["9.3×64mm" , 870, 100, 0.0619295, -0.00108571, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" ], + + [".338LM 250gr" , 880, 100, 0.0598469, -0.00059133, 3.81, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.322, 7, "ICAO"], + [".338LM 300gr" , 800, 100, 0.0677343, -0.00052190, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.381, 7, "ICAO"], + [".338LM API526" , 895, 100, 0.0588865, -0.00069611, 3.81, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.560, 1, "ASM" ], + + [".300WM Mk248 Mod0" , 900, 100, 0.0584442, -0.00070530, 3.81, 0, 2, 10, 120, 0, 0, 12.31, 7.80, 25.40, 0.268, 7, "ICAO"], + [".300WM Mk248 Mod1" , 867, 100, 0.0610738, -0.00061188, 3.81, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.310, 7, "ICAO"], + [".300WM Berger OTM" , 853, 100, 0.0622179, -0.00053733, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.368, 7, "ICAO"], + + ["7.62x54mmR" , 800, 100, 0.0691878, -0.00100023, 3.81, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO"], + + ["7.62x51mm M80" , 810, 100, 0.0679374, -0.00100957, 3.81, 0, 2, 10, 120, 0, 0, 9.461, 7.82, 25.40, 0.200, 7, "ICAO"], + ["7.62x51mm M118LR" , 780, 100, 0.0710319, -0.00082828, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.243, 7, "ICAO"], + ["7.62x51mm Mk316" , 780, 100, 0.0710319, -0.00082029, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.243, 7, "ICAO"], + ["7.62x51mm Mk319" , 910, 100, 0.0584524, -0.00102338, 3.81, 0, 2, 10, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO"], + ["7.62x51mm M993" , 930, 100, 0.0570316, -0.00107148, 3.81, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 25.40, 0.359, 1, "ICAO"], + ["7.62x51mm Subsonic", 320, 100, 0.3059680, -0.00049899, 3.81, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.235, 7, "ICAO"], + + ["6.5x39mm" , 800, 100, 0.0683482, -0.00075308, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.263, 7, "ICAO"], + ["6.5x47mm Lapua" , 800, 100, 0.0682221, -0.00067037, 3.81, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.290, 7, "ICAO"], + ["6.5mm Creedmor" , 840, 100, 0.0636501, -0.00060887, 3.81, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.317, 7, "ICAO"], + + ["5.56x45mm M855" , 870, 100, 0.0626386, -0.00126466, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.151, 7, "ASM" ], + ["5.56x45mm Mk262" , 820, 100, 0.0671481, -0.00109563, 3.81, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" ], + ["5.56x45mm Mk318" , 880, 100, 0.0615937, -0.00123318, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" ], + ["5.56x45mm M995" , 869, 100, 0.0626713, -0.00123272, 3.81, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" ]]; + + [] call FUNC(clear_user_data); + profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)]; +}; + +[] call FUNC(init); +[] call FUNC(restore_user_data); [QEGVAR(vector,rangefinderData), {_this call FUNC(sord)}] call CBA_fnc_addEventHandler; diff --git a/addons/atragmx/XEH_preInit.sqf b/addons/atragmx/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/atragmx/XEH_preInit.sqf +++ b/addons/atragmx/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/atragmx/config.cpp b/addons/atragmx/config.cpp index 125d4a488e..aec53ba837 100644 --- a/addons/atragmx/config.cpp +++ b/addons/atragmx/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {"ACE_Item_ATragMX"}; weapons[] = {"ACE_ATragMX"}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ACE_Advanced_Ballistics", "ACE_common", "ACE_weather"}; + requiredAddons[] = {"ACE_common", "ACE_weather"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg"}; url = ECSTRING(main,URL); @@ -18,3 +18,7 @@ class CfgPatches { #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" #include "RscTitles.hpp" + +class ACE_newEvents { + RangerfinderData = QEGVAR(vector,rangefinderData); +}; diff --git a/addons/atragmx/functions/fnc_add_new_gun.sqf b/addons/atragmx/functions/fnc_add_new_gun.sqf index 729649dc5d..dbc85cc27f 100644 --- a/addons/atragmx/functions/fnc_add_new_gun.sqf +++ b/addons/atragmx/functions/fnc_add_new_gun.sqf @@ -6,7 +6,7 @@ * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_add_new_gun @@ -15,16 +15,13 @@ */ #include "script_component.hpp" -call FUNC(trim_gun_name); - private _gunName = ctrlText 11001; - if (_gunName != "") then { - private _gunProfileEntry = [_gunName, 810, 100, 0.0679, -0.0010350, 3.81, 0, 2, 10, 120, 0, 0, 9.525, 7.82, 25.40, 0.393, 1, "ICAO", [[-15,0],[0,0],[10,0],[15,0],[25,0],[30,0],[35,0]], [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true]; + private _gunProfileEntry = [_gunName, 810, 100, 0.0679, -0.0010350, 3.81, 0, 2, 10, 120, 0, 0, 9.525, 7.82, 25.40, 0.393, 1, "ICAO"], GVAR(gunList) = GVAR(gunList) + [_gunProfileEntry]; - lbAdd [6000, _gunName]; + lbAdd [6000, _gunProfileEntry select 0]; - call FUNC(store_gun_list); + profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)]; }; diff --git a/addons/atragmx/functions/fnc_calculate_distance_at_velocity.sqf b/addons/atragmx/functions/fnc_calculate_distance_at_velocity.sqf deleted file mode 100644 index 450ecc8ab3..0000000000 --- a/addons/atragmx/functions/fnc_calculate_distance_at_velocity.sqf +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Author: Ruthberg - * Calculates distance at which the bullet velocity drops below the threshold velocity - * - * Arguments: - * theshold velocity - * - * Return Value: - * distance - * - * Example: - * 403 call ace_atragmx_fnc_calculate_distance_at_velocity - * - * Public: No - */ -#include "script_component.hpp" - -#define __DELTA_T 0.001 - -if (isNil QGVAR(targetSolutionInput)) exitWith { 0 }; - -private _thresholdVelocity = _this; -private _velocity = GVAR(targetSolutionInput) select 4; - -if (_velocity <= _thresholdVelocity) exitWith { 0 }; - -private _distance = 0; - -while {_velocity > _thresholdVelocity} do { - private _bc = GVAR(targetSolutionInput) select 14; - private _dragModel = GVAR(targetSolutionInput) select 15; - private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _velocity])); - _distance = _distance + _velocity * __DELTA_T; - _velocity = _velocity - (_drag * __DELTA_T); -}; - -_distance diff --git a/addons/atragmx/functions/fnc_calculate_range_card.sqf b/addons/atragmx/functions/fnc_calculate_range_card.sqf index 837a46079f..0b6d0a177b 100644 --- a/addons/atragmx/functions/fnc_calculate_range_card.sqf +++ b/addons/atragmx/functions/fnc_calculate_range_card.sqf @@ -3,10 +3,10 @@ * Calculates the range card output based on the current data set * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_calculate_range_card @@ -15,16 +15,61 @@ */ #include "script_component.hpp" -GVAR(rangeCardData) = []; +[] call FUNC(parse_input); +GVAR(workingMemory) params ["", + "_muzzleVelocity", "", + "_scopeBaseAngle", + "_airFriction", + "_boreHeight", "", "", "", "", "", "", + "_bulletMass", + "_bulletDiameter", + "_barrelTwist", + "_bc", + "_dragModel", + "_atmosphereModel" +]; + +private _twistDirection = 0; +if (_barrelTwist > 0) then { + _twistDirection = 1; +} else { + if (_barrelTwist < 0) then { + _twistDirection = -1; + }; +}; +_barrelTwist = abs _barrelTwist; + +private _altitude = GVAR(altitude); +private _temperature = GVAR(temperature); +private _barometricPressure = GVAR(barometricPressure); +private _relativeHumidity = GVAR(relativeHumidity); +if (!GVAR(atmosphereModeTBH)) then { + _barometricPressure = 1013.25 * (1 - (0.0065 * _altitude) / (273.15 + _temperature + 0.0065 * _altitude)) ^ 5.255754495; + _relativeHumidity = 50; +}; + +private _bulletLength = 45.72; +private _stabilityFactor = 1.5; +if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { + if (_bulletDiameter > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then { + _stabilityFactor = [_bulletDiameter, _bulletLength, _bulletMass, _barrelTwist * 10, _muzzleVelocity, _temperature, _barometricPressure] call EFUNC(advanced_ballistics,calculateStabilityFactor); + }; +}; + +private _latitude = GVAR(latitude) select GVAR(currentTarget); +private _directionOfFire = GVAR(directionOfFire) select GVAR(currentTarget); +private _windSpeed1 = (GVAR(windSpeed1) select GVAR(currentTarget)); +private _windSpeed2 = (GVAR(windSpeed2) select GVAR(currentTarget)); +private _windDirection = (GVAR(windDirection) select GVAR(currentTarget)); +private _inclinationAngle = (GVAR(inclinationAngle) select GVAR(currentTarget)); +private _targetSpeed = (GVAR(targetSpeed) select GVAR(currentTarget)); private _targetRange = GVAR(rangeCardEndRange); if (GVAR(currentUnit) == 1) then { _targetRange = _targetRange / 1.0936133; }; -private _solutionInput = +GVAR(targetSolutionInput); -_solutionInput set [ 8, round(_solutionInput select 4)]; -_solutionInput set [13, _targetRange]; -_solutionInput set [17, true]; +GVAR(rangeCardData) = []; -private _result = _solutionInput call FUNC(calculate_solution); +private _result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, + [_windSpeed1, _windSpeed2], _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, true, _stabilityFactor, _twistDirection, _latitude, _directionOfFire] call FUNC(calculate_solution); diff --git a/addons/atragmx/functions/fnc_calculate_solution.sqf b/addons/atragmx/functions/fnc_calculate_solution.sqf index 836d785242..d98c46c5fb 100644 --- a/addons/atragmx/functions/fnc_calculate_solution.sqf +++ b/addons/atragmx/functions/fnc_calculate_solution.sqf @@ -51,10 +51,7 @@ params [ ]; _windSpeed params ["_windSpeed1", "_windSpeed2"]; -private ["_tx", "_tz", "_lastBulletPos", "_bulletPos", "_bulletVelocity", "_bulletAccel", "_bulletSpeed", "_gravity", "_deltaT"]; -_tx = 0; -_tz = 0; -_lastBulletPos = [0, 0, 0]; +private ["_bulletPos", "_bulletVelocity", "_bulletAccel", "_bulletSpeed", "_gravity", "_deltaT"]; _bulletPos = [0, 0, 0]; _bulletVelocity = [0, 0, 0]; _bulletAccel = [0, 0, 0]; @@ -77,10 +74,9 @@ _horizontalDeflection = 0; _spinDrift = 0; _spinDeflection = 0; -private ["_n", "_range", "_trueRange", "_rangeFactor"]; +private ["_n", "_range", "_rangeFactor"]; _n = 0; _range = 0; -_trueRange = 0; _rangeFactor = 1; if (_storeRangeCardData) then { if (GVAR(currentUnit) == 1) then { @@ -94,15 +90,22 @@ _wind1 = [cos(270 - _windDirection * 30) * _windSpeed1, sin(270 - _windDirection _wind2 = [cos(270 - _windDirection * 30) * _windSpeed2, sin(270 - _windDirection * 30) * _windSpeed2, 0]; _windDrift = 0; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - _bc = parseNumber(("ace_advanced_ballistics" callExtension format["atmosphericCorrection:%1:%2:%3:%4:%5", _bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel])); + _bc = [_bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel] call EFUNC(advanced_ballistics,calculateAtmosphericCorrection); }; +private ["_speedTotal", "_stepsTotal", "_speedAverage"]; +_speedTotal = 0; +_stepsTotal = 0; +_speedAverage = 0; + private ["_eoetvoesMultiplier"]; _eoetvoesMultiplier = 0; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { _eoetvoesMultiplier = 2 * (0.0000729 * _muzzleVelocity / -9.80665) * cos(_latitude) * sin(_directionOfFire); }; +_TOF = 0; + _bulletPos set [0, 0]; _bulletPos set [1, 0]; _bulletPos set [2, -(_boreHeight / 100)]; @@ -114,11 +117,19 @@ _bulletVelocity set [2, Sin(_scopeBaseAngle) * _muzzleVelocity]; while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do { _bulletSpeed = vectorMagnitude _bulletVelocity; + _speedTotal = _speedTotal + _bulletSpeed; + _stepsTotal = _stepsTotal + 1; + _speedAverage = (_speedTotal / _stepsTotal); + _trueVelocity = _bulletVelocity vectorDiff _wind1; _trueSpeed = vectorMagnitude _trueVelocity; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _trueSpeed])); + private _drag = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,extensionAvailable), false]) then { + parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _trueSpeed])) + } else { + ([_dragModel, _bc, _trueSpeed] call EFUNC(advanced_ballistics,calculateRetardation)) + }; _bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (-1 * _drag); } else { _bulletAccel = _trueVelocity vectorMultiply (_trueSpeed * _airFriction); @@ -126,32 +137,29 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do { _bulletAccel = _bulletAccel vectorAdd _gravity; - _lastBulletPos = _bulletPos; - _bulletPos = _bulletPos vectorAdd (_bulletVelocity vectorMultiply (_deltaT * 0.5)); _bulletVelocity = _bulletVelocity vectorAdd (_bulletAccel vectorMultiply _deltaT); - _bulletPos = _bulletPos vectorAdd (_bulletVelocity vectorMultiply (_deltaT * 0.5)); + _bulletPos = _bulletPos vectorAdd (_bulletVelocity vectorMultiply _deltaT); _TOF = _TOF + _deltaT; if (_storeRangeCardData) then { _range = GVAR(rangeCardStartRange) + _n * GVAR(rangeCardIncrement); if ((_bulletPos select 1) * _rangeFactor >= _range && _range <= GVAR(rangeCardEndRange)) then { - _trueRange = _range / _rangeFactor; - if (_trueRange != 0) then { - _tx = (_lastBulletPos select 0) + (_trueRange - (_lastBulletPos select 1)) * ((_bulletPos select 0) - (_lastBulletPos select 0)) / ((_bulletPos select 1) - (_lastBulletPos select 1)); - _tz = (_lastBulletPos select 2) + (_trueRange - (_lastBulletPos select 1)) * ((_bulletPos select 2) - (_lastBulletPos select 2)) / ((_bulletPos select 1) - (_lastBulletPos select 1)); - _elevation = - atan(_tz / _trueRange); - _windage1 = - atan(_tx / _trueRange); - _windDrift = (_wind2 select 0) * (_TOF - _trueRange / _muzzleVelocity); - _windage2 = - atan(_windDrift / _trueRange); - _lead = (_targetSpeed * _TOF) / (Tan(3.38 / 60) * _trueRange); + if ((_bulletPos select 1) > 0) then { + _elevation = - atan((_bulletPos select 2) / (_bulletPos select 1)); + _windage1 = - atan((_bulletPos select 0) / (_bulletPos select 1)); + _windDrift = (_wind2 select 0) * (_TOF - (_range / _rangeFactor) / _muzzleVelocity); + _windage2 = - atan(_windDrift / (_bulletPos select 1)); + }; + if (_range != 0) then { + _lead = (_targetSpeed * _TOF) / (Tan(3.38 / 60) * _range); }; _kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); _kineticEnergy = _kineticEnergy * 0.737562149; if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (_bulletPos select 1) > 0) then { // Coriolis - _horizontalDeflection = 0.0000729 * (_bulletPos select 1) * _TOF * sin(_latitude); + _horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage; _horizontalCoriolis = - atan(_horizontalDeflection / (_bulletPos select 1)); _windage1 = _windage1 + _horizontalCoriolis; _windage2 = _windage2 + _horizontalCoriolis; @@ -172,13 +180,14 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do { }; }; -if (_targetRange != 0) then { - _tx = (_lastBulletPos select 0) + (_targetRange - (_lastBulletPos select 1)) * ((_bulletPos select 0) - (_lastBulletPos select 0)) / ((_bulletPos select 1) - (_lastBulletPos select 1)); - _tz = (_lastBulletPos select 2) + (_targetRange - (_lastBulletPos select 1)) * ((_bulletPos select 2) - (_lastBulletPos select 2)) / ((_bulletPos select 1) - (_lastBulletPos select 1)); - _elevation = - atan(_tz / _targetRange); - _windage1 = - atan(_tx / _targetRange); +if ((_bulletPos select 1) > 0) then { + _elevation = - atan((_bulletPos select 2) / (_bulletPos select 1)); + _windage1 = - atan((_bulletPos select 0) / (_bulletPos select 1)); _windDrift = (_wind2 select 0) * (_TOF - _targetRange / _muzzleVelocity); - _windage2 = - atan(_windDrift / _targetRange); + _windage2 = - atan(_windDrift / (_bulletPos select 1)); +}; + +if (_targetRange != 0) then { _lead = (_targetSpeed * _TOF) / (Tan(3.38 / 60) * _targetRange); }; @@ -187,7 +196,7 @@ _kineticEnergy = _kineticEnergy * 0.737562149; if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (_bulletPos select 1) > 0) then { // Coriolis - _horizontalDeflection = 0.0000729 * (_bulletPos select 1) * _TOF * sin(_latitude); + _horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage; _horizontalCoriolis = - atan(_horizontalDeflection / (_bulletPos select 1)); _windage1 = _windage1 + _horizontalCoriolis; _windage2 = _windage2 + _horizontalCoriolis; diff --git a/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf b/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf index 3a1bd879f1..e59cdee37d 100644 --- a/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf @@ -3,10 +3,10 @@ * Calculates the target range and updates the output fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_calculate_target_range_assist @@ -16,7 +16,7 @@ #include "script_component.hpp" private _angle = parseNumber(ctrlText 7012); -private _targetSize = abs(parseNumber(ctrlText 7010)); +private _targetSize = parseNumber(ctrlText 7010); if (GVAR(rangeAssistUseTargetHeight)) then { _targetSize = _targetSize * cos(_angle); }; @@ -43,7 +43,7 @@ switch (GVAR(rangeAssistImageSizeUnit)) do { _imageSize = _imageSize / 60 / 1.047; }; }; -private _estRange = abs(parseNumber(ctrlText 7013)); +private _estRange = parseNumber(ctrlText 7013); if (GVAR(currentUnit) == 1) then { _estRange = _estRange / 1.0936133; }; @@ -52,7 +52,7 @@ switch (_this) do { case 0: { _targetSize = tan(_imageSize) * _estRange; - if (GVAR(rangeAssistUseTargetHeight) && cos(_angle) != 0) then { + if (GVAR(rangeAssistUseTargetHeight)) then { _targetSize = _targetSize / cos(_angle); }; @@ -71,9 +71,7 @@ switch (_this) do { ctrlSetText [7010, Str(Round(_targetSize * 100) / 100)]; }; case 1: { - if (_estRange > 0) then { - _imageSize = atan(_targetSize / _estRange); - }; + _imageSize = atan(_targetSize / _estRange); switch (GVAR(rangeAssistImageSizeUnit)) do { case 0: { @@ -90,9 +88,7 @@ switch (_this) do { ctrlSetText [7011, Str(Round(_imageSize * 100) / 100)]; }; case 2: { - if (tan(_imageSize) != 0) then { - _estRange = _targetSize / tan(_imageSize); - }; + _estRange = _targetSize / tan(_imageSize); ctrlSetText [7013, Str(Round(_estRange))]; }; diff --git a/addons/atragmx/functions/fnc_calculate_target_solution.sqf b/addons/atragmx/functions/fnc_calculate_target_solution.sqf index f7a4750223..8bd844938f 100644 --- a/addons/atragmx/functions/fnc_calculate_target_solution.sqf +++ b/addons/atragmx/functions/fnc_calculate_target_solution.sqf @@ -3,10 +3,10 @@ * Calculates the fireing solution and updates the result input/output fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_calculate_target_solution @@ -52,7 +52,7 @@ if (!GVAR(atmosphereModeTBH)) then { }; private ["_bulletLength", "_stabilityFactor"]; -_bulletLength = 50 * _bulletMass / ((_bulletDiameter/2)^2); +_bulletLength = 45.72; _stabilityFactor = 1.5; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { if (_bulletDiameter > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then { @@ -70,10 +70,9 @@ _inclinationAngle = GVAR(inclinationAngle) select GVAR(currentTarget); _targetSpeed = GVAR(targetSpeed) select GVAR(currentTarget); _targetRange = GVAR(targetRange) select GVAR(currentTarget); -GVAR(targetSolutionInput) = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, round(_muzzleVelocity), - [_windSpeed1, _windSpeed2], _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, false, _stabilityFactor, _twistDirection, _latitude, _directionOfFire]; - -private _result = GVAR(targetSolutionInput) call FUNC(calculate_solution); +private ["_result"]; +_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, + [_windSpeed1, _windSpeed2], _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, false, _stabilityFactor, _twistDirection, _latitude, _directionOfFire] call FUNC(calculate_solution); GVAR(elevationOutput) set [GVAR(currentTarget), _result select 0]; GVAR(windage1Output) set [GVAR(currentTarget), (_result select 1) select 0]; @@ -81,8 +80,5 @@ GVAR(windage2Output) set [GVAR(currentTarget), (_result select 1) select 1]; GVAR(leadOutput) set [GVAR(currentTarget), _result select 2]; GVAR(tofOutput) set [GVAR(currentTarget), _result select 3]; GVAR(velocityOutput) set [GVAR(currentTarget), _result select 4]; -GVAR(verticalCoriolisOutput) set [GVAR(currentTarget), _result select 6]; -GVAR(horizontalCoriolisOutput) set [GVAR(currentTarget), _result select 7]; -GVAR(spinDriftOutput) set [GVAR(currentTarget), _result select 8]; [] call FUNC(update_result); diff --git a/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf b/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf index 7b18559b77..c3a4dac24f 100644 --- a/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf @@ -3,10 +3,10 @@ * Calculates the target speed and updates the output fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_calculate_target_speed_assist diff --git a/addons/atragmx/functions/fnc_calculate_truing_drop.sqf b/addons/atragmx/functions/fnc_calculate_truing_drop.sqf deleted file mode 100644 index d60f5b50e3..0000000000 --- a/addons/atragmx/functions/fnc_calculate_truing_drop.sqf +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Author: Ruthberg - * Calculates the truing drop and updates the output fields - * - * Arguments: - * parse input - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_calculate_truing_drop - * - * Public: No - */ -#include "script_component.hpp" - -private _parseInput = _this; - -private _transonicRange = GVAR(truingDropRangeData) select 0; -private _subsonicRange = GVAR(truingDropRangeData) select 1; -private _transonicDrop = GVAR(truingDropDropData) select 1; -private _subsonicDrop = GVAR(truingDropDropData) select 2; - -if (_parseInput) then { - _transonicRange = 0 max abs(parseNumber(ctrlText 18011)) min 4000; - _subsonicRange = 0 max abs(parseNumber(ctrlText 18012)) min 4000; - if (GVAR(currentUnit) != 2) then { - _transonicRange = _transonicRange * 0.9144; - _subsonicRange = _subsonicRange * 0.9144; - }; - _transonicRange = Round(_transonicRange); - _subsonicRange = Round(_subsonicRange); - - _subsonicRange = _transonicRange max _subsonicRange; - - _transonicDrop = -100 max parseNumber(ctrlText 18013) min 100; - _subsonicDrop = -100 max parseNumber(ctrlText 18014) min 100; - private _dropUnit = GVAR(currentScopeUnit); - if (_dropUnit == 3) then { - switch (GVAR(currentScopeClickUnit)) do { - case 0: { _dropUnit = 1; }; - case 1: { _dropUnit = 2; }; - case 2: { _dropUnit = 0; }; - }; - }; - switch (_dropUnit) do { - case 0: { - _transonicDrop = _transonicDrop * 3.38; - _subsonicDrop = _subsonicDrop * 3.38; - }; - case 2: { - _transonicDrop = _transonicDrop / 1.047; - _subsonicDrop = _subsonicDrop / 1.047; - }; - }; - _transonicDrop = Round(_transonicDrop * 100) / 100; - _subsonicDrop = Round(_subsonicDrop * 100) / 100; - - _subsonicDrop = _transonicDrop max _subsonicDrop; -}; - -if ((GVAR(truingDropDropData) select 0) == 0 || {!([_transonicRange, _subsonicRange] isEqualTo GVAR(truingDropRangeData))}) then { - if (isNil QGVAR(targetSolutionInput)) then { - call FUNC(calculate_target_solution); - }; - private _solutionInput = +GVAR(targetSolutionInput); - - if (_transonicRange == 0) then { - _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; - GVAR(truingDropRangeData) set [0, _transonicRange]; - GVAR(truingDropDropData) set [1, _transonicDrop]; - GVAR(truingDropReferenceDropData) set [0, _transonicDrop]; - - private _speedOfSound = (_solutionInput select 5) call EFUNC(weather,calculateSpeedOfSound); - if (_subsonicRange == 0) then { - _subsonicRange = _speedOfSound call FUNC(calculate_distance_at_velocity); - if (GVAR(currentUnit) == 2) then { - _subsonicRange = _subsonicRange + 200; - } else { - _subsonicRange = _subsonicRange + 200 * 1.0936133; - }; - _subsonicRange = Round(_subsonicRange); - }; - _solutionInput set [13, _subsonicRange]; - private _result2 = _solutionInput call FUNC(calculate_solution); - _subsonicDrop = Round((_result2 select 0) * 100) / 100; - GVAR(truingDropRangeData) set [1, _subsonicRange]; - GVAR(truingDropDropData) set [2, _subsonicDrop]; - GVAR(truingDropReferenceDropData) set [1, _subsonicDrop]; -} else { - if (_transonicDrop != GVAR(truingDropDropData) select 1 || _subsonicDrop != GVAR(truingDropDropData) select 2) then { - GVAR(truingDropDropData) set [1, _transonicDrop]; - GVAR(truingDropDropData) set [2, _subsonicDrop]; - if (GVAR(truingDropMode) == 0) then { - call FUNC(true_muzzle_velocity); - } else { - call FUNC(true_c1_ballistic_coefficient); - }; - }; -}; - -call FUNC(update_truing_drop_data); diff --git a/addons/atragmx/functions/fnc_can_show.sqf b/addons/atragmx/functions/fnc_can_show.sqf index bf05edee98..7054e85cf9 100644 --- a/addons/atragmx/functions/fnc_can_show.sqf +++ b/addons/atragmx/functions/fnc_can_show.sqf @@ -3,7 +3,7 @@ * Tests if the ATragMX dialog can be shown * * Arguments: - * None + * Nothing * * Return Value: * can_show diff --git a/addons/atragmx/functions/fnc_change_gun.sqf b/addons/atragmx/functions/fnc_change_gun.sqf index 53167f87b1..babd4e733c 100644 --- a/addons/atragmx/functions/fnc_change_gun.sqf +++ b/addons/atragmx/functions/fnc_change_gun.sqf @@ -8,7 +8,7 @@ * update display * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_change_gun @@ -26,12 +26,6 @@ if (_restoreMemory) then { }; GVAR(currentGun) = _gunID; -[false, false] call FUNC(recalculate_muzzle_velocity); -if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - false call FUNC(restore_truing_drop); - [false, false] call FUNC(recalculate_c1_ballistic_coefficient); -}; - if (_updateDisplay) then { lbSetCurSel [6000, GVAR(currentGun)]; }; @@ -43,8 +37,6 @@ GVAR(currentScopeClickNumber) = 1 max (GVAR(workingMemory) select 8) min 10; if (_updateDisplay) then { [] call FUNC(update_gun); [] call FUNC(update_gun_ammo_data); - [] call FUNC(update_muzzle_velocity_data); - [] call FUNC(update_c1_ballistic_coefficient_data); }; GVAR(elevationOutput) set [GVAR(currentTarget), 0]; @@ -53,9 +45,6 @@ GVAR(windage2Output) set [GVAR(currentTarget), 0]; GVAR(leadOutput) set [GVAR(currentTarget), 0]; GVAR(tofOutput) set [GVAR(currentTarget), 0]; GVAR(velocityOutput) set [GVAR(currentTarget), 0]; -GVAR(verticalCoriolisOutput) set [GVAR(currentTarget), 0]; -GVAR(horizontalCoriolisOutput) set [GVAR(currentTarget), 0]; -GVAR(spinDriftOutput) set [GVAR(currentTarget), 0]; if (_updateDisplay) then { [] call FUNC(calculate_target_solution); diff --git a/addons/atragmx/functions/fnc_change_target_slot.sqf b/addons/atragmx/functions/fnc_change_target_slot.sqf index 158e31ad87..a867749f21 100644 --- a/addons/atragmx/functions/fnc_change_target_slot.sqf +++ b/addons/atragmx/functions/fnc_change_target_slot.sqf @@ -6,7 +6,7 @@ * target * * Return Value: - * None + * Nothing * * Example: * 2 call ace_atragmx_fnc_change_target_slot @@ -17,8 +17,9 @@ private _target = 0 max _this min 3; -[] call FUNC(parse_input); +call FUNC(parse_input); GVAR(currentTarget) = _target; call FUNC(update_target_selection); -call FUNC(calculate_target_solution); + +[] call FUNC(calculate_target_solution); diff --git a/addons/atragmx/functions/fnc_clear_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_clear_c1_ballistic_coefficient_data.sqf deleted file mode 100644 index a795b74c70..0000000000 --- a/addons/atragmx/functions/fnc_clear_c1_ballistic_coefficient_data.sqf +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Author: Ruthberg - * Clears the c1 ballistic coefficient data fields - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_clear_c1_ballistic_coefficient_data - * - * Public: No - */ -#include "script_component.hpp" - -// Distances -{ctrlSetText [_x, "0"]} forEach [170021, 170022, 170023, 170024, 170025, 170026, 170027]; -// Ballistic Coefficients -{ctrlSetText [_x, "0"]} forEach [170031, 170032, 170033, 170034, 170035, 170036, 170037]; diff --git a/addons/atragmx/functions/fnc_clear_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_clear_muzzle_velocity_data.sqf deleted file mode 100644 index 6f4472c550..0000000000 --- a/addons/atragmx/functions/fnc_clear_muzzle_velocity_data.sqf +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Author: Ruthberg - * Clears the muzzle velocity data fields - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_clear_muzzle_velocity_data - * - * Public: No - */ -#include "script_component.hpp" - -// Temperatures -{ctrlSetText [_x, "0"]} forEach [160021, 160022, 160023, 160024, 160025, 160026, 160027]; -// Muzzle velocities -{ctrlSetText [_x, "0"]} forEach [160031, 160032, 160033, 160034, 160035, 160036, 160037]; diff --git a/addons/atragmx/functions/fnc_clear_user_data.sqf b/addons/atragmx/functions/fnc_clear_user_data.sqf index 727c8da107..308b5bbf12 100644 --- a/addons/atragmx/functions/fnc_clear_user_data.sqf +++ b/addons/atragmx/functions/fnc_clear_user_data.sqf @@ -3,10 +3,10 @@ * Removes all user data from the profileNamespace * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_clear_user_data @@ -28,7 +28,6 @@ profileNamespace setVariable ["ACE_ATragMX_temperature", nil]; profileNamespace setVariable ["ACE_ATragMX_barometricPressure", nil]; profileNamespace setVariable ["ACE_ATragMX_relativeHumidity", nil]; -profileNamespace setVariable ["ACE_ATragMX_showCoriolis", nil]; profileNamespace setVariable ["ACE_ATragMX_showWind2", nil]; profileNamespace setVariable ["ACE_ATragMX_latitude", nil]; profileNamespace setVariable ["ACE_ATragMX_directionOfFire", nil]; @@ -43,4 +42,4 @@ profileNamespace setVariable ["ACE_ATragMX_targetRange", nil]; profileNamespace setVariable ["ACE_ATragMX_rangeCardStartRange", nil]; profileNamespace setVariable ["ACE_ATragMX_rangeCardEndRange", nil]; profileNamespace setVariable ["ACE_ATragMX_rangeCardIncrement", nil]; -profileNamespace setVariable ["ACE_ATragMX_rangeCardCurrentColumn", nil]; +profileNamespace setVariable ["ACE_ATragMX_rangeCardCurrentColumn", nil]; \ No newline at end of file diff --git a/addons/atragmx/functions/fnc_create_dialog.sqf b/addons/atragmx/functions/fnc_create_dialog.sqf index c342bb1eb0..2eee7c1824 100644 --- a/addons/atragmx/functions/fnc_create_dialog.sqf +++ b/addons/atragmx/functions/fnc_create_dialog.sqf @@ -3,10 +3,10 @@ * Creates the ATragMX dialog * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_create_dialog @@ -18,16 +18,6 @@ #define __dsp (uiNamespace getVariable "ATragMX_Display") #define __ctrlBackground (__dsp displayCtrl 720000) -// Do all initialisation now -if (!GVAR(initialised)) then { - [] call FUNC(initGunList); - [] call FUNC(init); - [] call FUNC(restore_user_data); - [] call FUNC(read_gun_list_entries_from_config); - GVAR(initialised) = true; - TRACE_1("",GVAR(initialised)); -}; - if (GVAR(active)) exitWith { false }; if (underwater ACE_player) exitWith { false }; if (!("ACE_ATragMX" in (uniformItems ACE_player)) && !("ACE_ATragMX" in (vestItems ACE_player))) exitWith { false }; @@ -40,10 +30,8 @@ GVAR(showMainPage) call FUNC(show_main_page); GVAR(showAddNewGun) call FUNC(show_add_new_gun); GVAR(showAtmoEnvData) call FUNC(show_atmo_env_data); -GVAR(showC1BallisticCoefficientData) call FUNC(show_c1_ballistic_coefficient_data); GVAR(showGunAmmoData) call FUNC(show_gun_ammo_data); GVAR(showGunList) call FUNC(show_gun_list); -GVAR(showMuzzleVelocityData) call FUNC(show_muzzle_velocity_data); GVAR(showRangeCard) call FUNC(show_range_card); if (GVAR(showRangeCard)) then { ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 5001); @@ -55,7 +43,6 @@ GVAR(showTargetData) call FUNC(show_target_data); GVAR(showTargetRangeAssist) call FUNC(show_target_range_assist); GVAR(showTargetSpeedAssist) call FUNC(show_target_speed_assist); GVAR(showTargetSpeedAssistTimer) call FUNC(show_target_speed_assist_timer); -GVAR(showTruingDrop) call FUNC(show_truing_drop); [GVAR(currentGun), false, true] call FUNC(change_gun); @@ -63,13 +50,6 @@ GVAR(showTruingDrop) call FUNC(show_truing_drop); lbAdd [6000, _x select 0]; } forEach GVAR(gunList); -ctrlShow [3001, false]; -ctrlShow [3002, false]; - -{ - (__dsp displayCtrl _x) ctrlEnable false; -} forEach [18006, 18007, 18008]; - GVAR(active) = true; GVAR(DialogPFH) = [{ diff --git a/addons/atragmx/functions/fnc_cycle_gun_list.sqf b/addons/atragmx/functions/fnc_cycle_gun_list.sqf index 550bc624f2..1cc22abb45 100644 --- a/addons/atragmx/functions/fnc_cycle_gun_list.sqf +++ b/addons/atragmx/functions/fnc_cycle_gun_list.sqf @@ -6,7 +6,7 @@ * step * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_cycle_scope_unit diff --git a/addons/atragmx/functions/fnc_cycle_image_size_units.sqf b/addons/atragmx/functions/fnc_cycle_image_size_units.sqf index 2981a9a73e..ce91f818c6 100644 --- a/addons/atragmx/functions/fnc_cycle_image_size_units.sqf +++ b/addons/atragmx/functions/fnc_cycle_image_size_units.sqf @@ -6,7 +6,7 @@ * step * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_cycle_image_size_units diff --git a/addons/atragmx/functions/fnc_cycle_num_ticks_units.sqf b/addons/atragmx/functions/fnc_cycle_num_ticks_units.sqf index fc4746ee56..49b4ad0ffa 100644 --- a/addons/atragmx/functions/fnc_cycle_num_ticks_units.sqf +++ b/addons/atragmx/functions/fnc_cycle_num_ticks_units.sqf @@ -6,7 +6,7 @@ * step * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_cycle_num_ticks_units diff --git a/addons/atragmx/functions/fnc_cycle_range_card_columns.sqf b/addons/atragmx/functions/fnc_cycle_range_card_columns.sqf index dfba1f0574..dc572ede19 100644 --- a/addons/atragmx/functions/fnc_cycle_range_card_columns.sqf +++ b/addons/atragmx/functions/fnc_cycle_range_card_columns.sqf @@ -3,10 +3,10 @@ * Cycles through the range card columns * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_cycle_range_card_columns diff --git a/addons/atragmx/functions/fnc_cycle_scope_unit.sqf b/addons/atragmx/functions/fnc_cycle_scope_unit.sqf index a2020f4147..d83236bc78 100644 --- a/addons/atragmx/functions/fnc_cycle_scope_unit.sqf +++ b/addons/atragmx/functions/fnc_cycle_scope_unit.sqf @@ -3,10 +3,10 @@ * Cycles through the scope units * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_cycle_scope_unit @@ -15,10 +15,10 @@ */ #include "script_component.hpp" +[] call FUNC(parse_input); + GVAR(currentScopeUnit) = (GVAR(currentScopeUnit) + 1) % (count GVAR(scopeUnits)); GVAR(workingMemory) set [6, GVAR(currentScopeUnit)]; -true call FUNC(show_main_page); - [] call FUNC(update_scope_unit); [] call FUNC(update_result); diff --git a/addons/atragmx/functions/fnc_cycle_target_size_units.sqf b/addons/atragmx/functions/fnc_cycle_target_size_units.sqf index 267d4d5772..f44d2a5343 100644 --- a/addons/atragmx/functions/fnc_cycle_target_size_units.sqf +++ b/addons/atragmx/functions/fnc_cycle_target_size_units.sqf @@ -6,7 +6,7 @@ * step * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_cycle_target_size_units diff --git a/addons/atragmx/functions/fnc_cycle_target_speed_direction.sqf b/addons/atragmx/functions/fnc_cycle_target_speed_direction.sqf index e1e8282440..568dbcec53 100644 --- a/addons/atragmx/functions/fnc_cycle_target_speed_direction.sqf +++ b/addons/atragmx/functions/fnc_cycle_target_speed_direction.sqf @@ -3,10 +3,10 @@ * Cycles through the target directions left/right * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_cycle_target_direction diff --git a/addons/atragmx/functions/fnc_delete_gun.sqf b/addons/atragmx/functions/fnc_delete_gun.sqf index 55548527f1..42970d7aab 100644 --- a/addons/atragmx/functions/fnc_delete_gun.sqf +++ b/addons/atragmx/functions/fnc_delete_gun.sqf @@ -3,10 +3,10 @@ * Deletes the currently selected gun profile from the profileNamespace * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_delete_gun @@ -28,4 +28,4 @@ GVAR(gunList) = GVAR(gunList) - [0]; lbDelete [6000, _index]; -call FUNC(store_gun_list); +profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)]; diff --git a/addons/atragmx/functions/fnc_evaluate_option_menu_input.sqf b/addons/atragmx/functions/fnc_evaluate_option_menu_input.sqf deleted file mode 100644 index 2e4c9ef023..0000000000 --- a/addons/atragmx/functions/fnc_evaluate_option_menu_input.sqf +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Author: Ruthberg - * Evalutes input from the option menu - * - * Arguments: - * option menu id - * - * Return Value: - * None - * - * Example: - * 1 call ace_atragmx_fnc_evaluate_option_menu_input - * - * Public: No - */ -#include "script_component.hpp" - -params ["_optionID"]; - -switch (_optionID) do { - case 0: {}; // Accuracy 1st - case 1: { 0 call FUNC(toggle_muzzle_velocity_data); }; // MuzVel Table - case 2: { 0 call FUNC(toggle_c1_ballistic_coefficient_data); }; // Bal Coef Table - case 3: { 0 call FUNC(toggle_target_speed_assist); }; // Target Speed Est - case 4: { 0 call FUNC(toggle_target_range_assist); }; // Target Range Est - case 5: { 0 call FUNC(toggle_truing_drop); }; // Truing Drop - case 6: { 0 call FUNC(toggle_coriolis); }; // Show Coriolis - case 7: { 0 call FUNC(toggle_solution_setup); }; // Set Clicks - case 8: {}; // Gun Note -}; diff --git a/addons/atragmx/functions/fnc_init.sqf b/addons/atragmx/functions/fnc_init.sqf index 48401acb4c..30b17ebf90 100644 --- a/addons/atragmx/functions/fnc_init.sqf +++ b/addons/atragmx/functions/fnc_init.sqf @@ -3,10 +3,10 @@ * Inits all global variables with the default values * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_init @@ -15,6 +15,7 @@ */ #include "script_component.hpp" +GVAR(active) = false; GVAR(workingMemory) = +(GVAR(gunList) select 0); @@ -64,33 +65,18 @@ GVAR(targetSpeedDirection) = [1, 1, 1, 1]; GVAR(targetRange) = [0, 0, 0, 0]; GVAR(showWind2) = false; -GVAR(showCoriolis) = false; GVAR(elevationOutput) = [0, 0, 0, 0]; GVAR(windage1Output) = [0, 0, 0, 0]; GVAR(windage2Output) = [0, 0, 0, 0]; GVAR(leadOutput) = [0, 0, 0, 0]; GVAR(tofOutput) = [0, 0, 0, 0]; GVAR(velocityOutput) = [0, 0, 0, 0]; -GVAR(verticalCoriolisOutput) = [0, 0, 0, 0]; -GVAR(horizontalCoriolisOutput) = [0, 0, 0, 0]; -GVAR(spinDriftOutput) = [0, 0, 0, 0]; - -GVAR(truingDropMode) = 0; -GVAR(truingDropRangeData) = [0, 0]; -GVAR(truingDropDropData) = [0, 0, 0]; -GVAR(truingDropReferenceDropData) = [0, 0, 0]; -GVAR(truingDropC1) = 0; -GVAR(truingDropMuzzleVelocity) = 0; - -GVAR(targetSolutionInput) = nil; GVAR(showMainPage) = true; GVAR(showAddNewGun) = false; GVAR(showAtmoEnvData) = false; -GVAR(showC1BallisticCoefficientData) = false; GVAR(showGunAmmoData) = false; GVAR(showGunList) = false; -GVAR(showMuzzleVelocityData) = false; GVAR(showRangeCard) = false; GVAR(showRangeCardSetup) = false; GVAR(showSolutionSetup) = false; @@ -98,4 +84,3 @@ GVAR(showTargetData) = false; GVAR(showTargetRangeAssist) = false; GVAR(showTargetSpeedAssist) = false; GVAR(showTargetSpeedAssistTimer) = false; -GVAR(showTruingDrop) = false; diff --git a/addons/atragmx/functions/fnc_initGunList.sqf b/addons/atragmx/functions/fnc_initGunList.sqf deleted file mode 100644 index 69efdc68ef..0000000000 --- a/addons/atragmx/functions/fnc_initGunList.sqf +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Author: Ruthberg - * Inits the gun list from user profile - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_initGunList - * - * Public: No - */ -#include "script_component.hpp" - -LOG_2("Trying to load gunlist from profile [Version: %1][Count: %2]", profileNamespace getVariable [ARR_2(QGVAR(profileNamespaceVersion), 'none')], count (profileNamespace getVariable [ARR_2(QGVAR(gunList), [])])); - -private _resetGunList = true; -if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) == ATRAGMX_PROFILE_NAMESPACE_VERSION && {count (profileNamespace getVariable ["ACE_ATragMX_gunList", []]) > 0}) then { - GVAR(gunList) = profileNamespace getVariable "ACE_ATragMX_gunList"; - _resetGunList = false; - { - // Verify each gun has correct param type - if (!(_x isEqualTypeArray ["", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [], [], false])) exitWith { - _resetGunList = true; - }; - } forEach GVAR(gunList); -}; - -if (_resetGunList) then { - WARNING("Reseting Profile Gunlist"); - // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation, Persistent - GVAR(gunList) = [["12.7x108mm" , 812, 100, 0.0666557, -0.00063800, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" , [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - ["12.7x99mm AMAX" , 852, 100, 0.0615965, -0.00036645, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" , [[-15,833],[0,840],[10,847],[15,852],[25,866],[30,875],[35,886]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["12.7x99mm" , 892, 100, 0.0588284, -0.00057503, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" , [[-15,873],[0,880],[10,887],[15,892],[25,906],[30,915],[35,926]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - ["12.7x54mm" , 299, 100, 0.3406920, -0.00019268, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" , [[-15,297],[0,298],[10,299],[15,299],[25,301],[30,302],[35,303]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - [".50 Beowulf" , 562, 100, 0.1262000, -0.00202645, 3.81, 0, 2, 10, 120, 0, 0, 21.71, 12.7, 50.80, 0.210, 1, "ASM" , [[-15,560],[0,561],[10,562],[15,562],[25,564],[30,565],[35,566]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - [".408 CheyTac 305gr", 1059, 100, 0.0482146, -0.00063655, 3.81, 0, 2, 10, 120, 0, 0, 19.76, 10.4, 33.02, 0.569, 1, "ICAO", [[-15,1040],[0,1047],[10,1054],[15,1059],[25,1073],[30,1082],[35,1093]], [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - [".408 CheyTac 419gr", 859, 100, 0.0611842, -0.00044958, 3.81, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.866, 1, "ICAO", [[-15,840],[0,847],[10,854],[15,859],[25,873],[30,882],[35,893]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - ["9.3×64mm" , 862, 100, 0.0627652, -0.00108571, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" , [[-15,843],[0,850],[10,857],[15,862],[25,876],[30,885],[35,896]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - [".338LM 250gr" , 872, 100, 0.0604821, -0.00059133, 3.81, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.645, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - [".338LM 300gr" , 792, 100, 0.0685883, -0.00052190, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.759, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - [".338LM API526" , 872, 100, 0.0602535, -0.00069611, 3.81, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.580, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - [".300WM Mk248 Mod0" , 857, 100, 0.0621425, -0.00070530, 3.81, 0, 2, 10, 120, 0, 0, 12.31, 7.80, 25.40, 0.537, 1, "ICAO", [[-15,838],[0,845],[10,852],[15,857],[25,871],[30,880],[35,891]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - [".300WM Mk248 Mod1" , 839, 100, 0.0637038, -0.00061188, 3.81, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.619, 1, "ICAO", [[-15,820],[0,827],[10,834],[15,839],[25,853],[30,862],[35,873]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - [".300WM Berger OTM" , 792, 100, 0.0686968, -0.00053733, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.715, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - ["7.62x54mmR" , 812, 100, 0.0678441, -0.00100023, 3.81, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO", [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - ["7.62x51mm M80" , 802, 100, 0.0690229, -0.00100957, 3.81, 0, 2, 10, 120, 0, 0, 9.461, 7.82, 25.40, 0.398, 1, "ICAO", [[-15,783],[0,790],[10,797],[15,802],[25,816],[30,825],[35,836]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["7.62x51mm M118LR" , 757, 100, 0.0739989, -0.00082828, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.482, 1, "ICAO", [[-15,738],[0,745],[10,752],[15,757],[25,771],[30,780],[35,791]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["7.62x51mm Mk316" , 781, 100, 0.0709422, -0.00082029, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.483, 1, "ICAO", [[-15,777],[0,778],[10,779],[15,781],[25,783],[30,785],[35,787]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["7.62x51mm Mk319" , 900, 100, 0.0593025, -0.00102338, 3.81, 0, 2, 10, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO", [[-15,898],[0,899],[10,900],[15,900],[25,902],[30,903],[35,904]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["7.62x51mm M993" , 912, 100, 0.0585007, -0.00107148, 3.81, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 25.40, 0.359, 1, "ICAO", [[-15,893],[0,900],[10,907],[15,912],[25,926],[30,935],[35,946]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["7.62x51mm Subsonic", 314, 100, 0.3168140, -0.00049899, 3.81, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.502, 1, "ICAO", [[-15,312],[0,313],[10,314],[15,314],[25,316],[30,317],[35,318]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - ["7.62x39mm" , 708, 100, 0.0846559, -0.00151621, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 7.82, 25.40, 0.275, 1, "ICAO", [[-15,689],[0,696],[10,703],[15,708],[25,722],[30,731],[35,742]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - ["6.5x39mm" , 766, 100, 0.0725986, -0.00075308, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.524, 1, "ICAO", [[-15,747],[0,754],[10,761],[15,766],[25,780],[30,789],[35,800]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["6.5x47mm Lapua" , 767, 100, 0.0722256, -0.00067037, 3.81, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.577, 1, "ICAO", [[-15,748],[0,755],[10,762],[15,767],[25,781],[30,790],[35,801]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["6.5mm Creedmor" , 822, 100, 0.0655022, -0.00060887, 3.81, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.632, 1, "ICAO", [[-15,803],[0,810],[10,817],[15,822],[25,836],[30,845],[35,856]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - ["5.8x42mm DBP87" , 942, 100, 0.0566639, -0.00117956, 3.81, 0, 2, 10, 120, 0, 0, 4.150, 5.99, 24.40, 0.313, 1, "ICAO", [[-15,923],[0,930],[10,937],[15,942],[25,956],[30,965],[35,976]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - ["5.56x45mm M855" , 862, 100, 0.0635456, -0.00126466, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.302, 1, "ASM" , [[-15,843],[0,849],[10,857],[15,862],[25,876],[30,885],[35,898]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["5.56x45mm Mk262" , 812, 100, 0.0682606, -0.00109563, 3.81, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" , [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["5.56x45mm Mk318" , 872, 100, 0.0624569, -0.00123318, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" , [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["5.56x45mm M995" , 861, 100, 0.0635355, -0.00123272, 3.81, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" , [[-15,842],[0,849],[10,856],[15,861],[25,875],[30,884],[35,895]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - - ["5.45x39mm 7N6M" , 727, 100, 0.0801269, -0.00116278, 3.81, 0, 2, 10, 120, 0, 0, 3.428, 5.59, 16.00, 0.336, 1, "ICAO", [[-15,708],[0,715],[10,722],[15,727],[25,741],[30,750],[35,761]], [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true]]; - - [] call FUNC(clear_user_data); - profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)]; -}; diff --git a/addons/atragmx/functions/fnc_insert_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_insert_c1_ballistic_coefficient_data.sqf deleted file mode 100644 index ba5a781813..0000000000 --- a/addons/atragmx/functions/fnc_insert_c1_ballistic_coefficient_data.sqf +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Author: Ruthberg - * Inserts entry in the c1 ballistic coefficient vs. distance interpolation table - * - * Arguments: - * transonic range - - * subsonic range - - * c1 ballistic coefficient - - * - * Return Value: - * None - * - * Example: - * [800, 0.485] call ace_atragmx_fnc_insert_c1_ballistic_coefficient_data - * - * Public: No - */ -#include "script_component.hpp" - -params ["_transonicRange", "_subsonicRange", "_c1"]; - -private _entries = {(_x select 1) > 0} count (GVAR(workingMemory) select 19); - -if (_entries > 0) then { - // Insert - private _insertIndex = 0; - private _minDiff = 10000; - { - if (_minDiff > 0 && {(((GVAR(workingMemory) select 19) select _forEachIndex) select 1) == 0}) then { - _insertIndex = _forEachIndex; - _minDiff = 0; - }; - private _tr = ((GVAR(workingMemory) select 19) select _forEachIndex) select 0; - private _diff = abs(_subsonicRange - _tr); - if (_diff == 0) exitWith { - _insertIndex = _forEachIndex; - }; - if (_diff < _minDiff) then { - _insertIndex = _forEachIndex; - _minDiff = _diff; - }; - } forEach (GVAR(workingMemory) select 19); - - (GVAR(workingMemory) select 19) set [_insertIndex, [_subsonicRange, 0.1 max _c1 min 2.0]]; -} else { - // Reset - private _zeroRange = GVAR(workingMemory) select 2; - private _bc = GVAR(workingMemory) select 15; - GVAR(workingMemory) set [19, [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]; - (GVAR(workingMemory) select 19) set [0, [_zeroRange, _bc]]; - (GVAR(workingMemory) select 19) set [1, [_transonicRange + (_subsonicRange - _transonicRange) * 0.75, _bc]]; - (GVAR(workingMemory) select 19) set [2, [_subsonicRange, 0.1 max _c1 min 2.0]]; -}; - -call FUNC(update_c1_ballistic_coefficient_data); diff --git a/addons/atragmx/functions/fnc_insert_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_insert_muzzle_velocity_data.sqf deleted file mode 100644 index 43cd936beb..0000000000 --- a/addons/atragmx/functions/fnc_insert_muzzle_velocity_data.sqf +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Author: Ruthberg - * Inserts entry in the muzzle velocity vs. temperature interpolation table - * - * Arguments: - * temperature - - * muzzle velocity - - * - * Return Value: - * None - * - * Example: - * [10, 800] call ace_atragmx_fnc_insert_muzzle_velocity_data - * - * Public: No - */ -#include "script_component.hpp" - -params ["_temperature", "_muzzleVelocity"]; - -private _insertIndex = 0; -private _minDiff = 1000; -{ - if (_minDiff > 0 && {(((GVAR(workingMemory) select 18) select _forEachIndex) select 1) == 0}) then { - _insertIndex = _forEachIndex; - _minDiff = 0; - }; - private _t = ((GVAR(workingMemory) select 18) select _forEachIndex) select 0; - private _diff = abs(_temperature - _t); - if (_diff == 0) exitWith { - _insertIndex = _forEachIndex; - }; - if (_diff < _minDiff) then { - _insertIndex = _forEachIndex; - _minDiff = _diff; - }; -} forEach (GVAR(workingMemory) select 18); - -(GVAR(workingMemory) select 18) set [_insertIndex, [_temperature, 0 max _muzzleVelocity min 1400]]; - -call FUNC(update_muzzle_velocity_data); diff --git a/addons/atragmx/functions/fnc_on_close_dialog.sqf b/addons/atragmx/functions/fnc_on_close_dialog.sqf index 1c96828b1a..fca60574a9 100644 --- a/addons/atragmx/functions/fnc_on_close_dialog.sqf +++ b/addons/atragmx/functions/fnc_on_close_dialog.sqf @@ -1,21 +1,5 @@ -/* - * Author: ACE-Team - * On close Dialog - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_on_close_dialog - * - * Public: No - */ - #include "script_component.hpp" uiNamespace setVariable ['ATragMX_Display', nil]; GVAR(active) = false; -[GVAR(DialogPFH)] call CBA_fnc_removePerFrameHandler; +[GVAR(DialogPFH)] call CBA_fnc_removePerFrameHandler; \ No newline at end of file diff --git a/addons/atragmx/functions/fnc_parse_input.sqf b/addons/atragmx/functions/fnc_parse_input.sqf index b2ca70f31f..61a8caea6a 100644 --- a/addons/atragmx/functions/fnc_parse_input.sqf +++ b/addons/atragmx/functions/fnc_parse_input.sqf @@ -1,12 +1,12 @@ /* * Author: Ruthberg - * Parses all input fields in the gun-, atmosphere- and target column, the result input fields and the muzzle velocity data input fields + * Parses all input fields in the gun, atmosphere and target column and the result input fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_parse_input @@ -15,98 +15,22 @@ */ #include "script_component.hpp" -// Muzzle velocity vs. temperature interpolation data -{ - private _temperature = parseNumber(ctrlText _x); - if (GVAR(currentUnit) != 2) then { - _temperature = -50 max _temperature min 160; - _temperature = (_temperature - 32) / 1.8; - } else { - _temperature = -50 max _temperature min 71; - }; - ((GVAR(workingMemory) select 18) select _forEachIndex) set [0, _temperature]; -} forEach [160021, 160022, 160023, 160024, 160025, 160026, 160027]; -{ - private _muzzleVelocity = abs(parseNumber(ctrlText _x)); - if (_muzzleVelocity > 0) then { - if (GVAR(currentUnit) != 2) then { - _muzzleVelocity = 300 max _muzzleVelocity min 4500; - _muzzleVelocity = _muzzleVelocity * 0.3048; - } else { - _muzzleVelocity = 100 max _muzzleVelocity min 1400; - }; - }; - ((GVAR(workingMemory) select 18) select _forEachIndex) set [1, _muzzleVelocity]; -} forEach [160031, 160032, 160033, 160034, 160035, 160036, 160037]; - -// C1 coefficient vs. distance interpolation data -{ - private _distance = abs(parseNumber(ctrlText _x)); - if (_distance > 0) then { - if (GVAR(currentUnit) == 1) then { - _distance = 25 max _distance min 4000; - _distance = _distance * 0.9144; - } else { - _distance = 25 max _distance min 3700; - }; - }; - ((GVAR(workingMemory) select 19) select _forEachIndex) set [0, _distance]; -} forEach [170021, 170022, 170023, 170024, 170025, 170026, 170027]; -{ - private _c1 = abs(parseNumber(ctrlText _x)); - if (_c1 > 0) then { - _c1 = 0.1 max _c1 min 2.0; - }; - ((GVAR(workingMemory) select 19) select _forEachIndex) set [1, _c1]; -} forEach [170031, 170032, 170033, 170034, 170035, 170036, 170037]; - -GVAR(altitude) = parseNumber(ctrlText 130030); -GVAR(temperature) = parseNumber(ctrlText 130040); -GVAR(barometricPressure) = parseNumber(ctrlText 130050); -GVAR(relativeHumidity) = parseNumber(ctrlText 130060) / 100; +GVAR(altitude) = -1000 max parseNumber(ctrlText 130030) min 20000; +GVAR(temperature) = -50 max parseNumber(ctrlText 130040) min 160; +GVAR(barometricPressure) = 10 max parseNumber(ctrlText 130050) min 1350; +GVAR(relativeHumidity) = (0 max parseNumber(ctrlText 130060) min 100) / 100; if (GVAR(currentUnit) != 2) then { - GVAR(altitude) = -1000 max GVAR(altitude) min 20000; - GVAR(temperature) = -50 max GVAR(temperature) min 160; - GVAR(barometricPressure) = 10 max GVAR(barometricPressure) min 40; GVAR(altitude) = GVAR(altitude) * 0.3048; GVAR(temperature) = (GVAR(temperature) - 32) / 1.8; GVAR(barometricPressure) = GVAR(barometricPressure) * 33.86389; -} else { - GVAR(altitude) = -300 max GVAR(altitude) min 6100; - GVAR(temperature) = -50 max GVAR(temperature) min 71; - GVAR(barometricPressure) = 340 max GVAR(barometricPressure) min 1350; }; -private ["_windSpeed1", "_windSpeed2", "_targetSpeed", "_targetRange", "_inclinationAngleCosine", "_inclinationAngleDegree"]; -_windSpeed1 = parseNumber(ctrlText 140020); -_windSpeed2 = parseNumber(ctrlText 140021); -_targetSpeed = parseNumber(ctrlText 140050); -_targetRange = parseNumber(ctrlText 140060); -if (GVAR(currentUnit) != 2) then { - _windSpeed1 = 0 max _windSpeed1 min 50; - _windSpeed2 = 0 max _windSpeed2 min 50; - _targetSpeed = 0 max _targetSpeed min 50; - _windSpeed1 = _windSpeed1 * 0.44704; - _windSpeed2 = _windSpeed2 * 0.44704; - _targetSpeed = _targetSpeed * 0.44704; -} else { - _windSpeed1 = 0 max _windSpeed1 min 25; - _windSpeed2 = 0 max _windSpeed2 min 25; - _targetSpeed = 0 max _targetSpeed min 25; -}; -if (GVAR(currentUnit) == 1) then { - _targetRange = 25 max _targetRange min 4000; - _targetRange = _targetRange * 0.9144; -} else { - _targetRange = 25 max _targetRange min 3700; -}; +private ["_inclinationAngleCosine", "_inclinationAngleDegree"]; 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(windSpeed1) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140020)) min 50]; +GVAR(windSpeed2) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140021)) min 50]; 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]; _inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1; _inclinationAngleDegree = -60 max round(parseNumber(ctrlText 140040)) min 60; if (_inclinationAngleDegree != GVAR(inclinationAngle) select GVAR(currentTarget)) then { @@ -116,62 +40,58 @@ if (_inclinationAngleDegree != GVAR(inclinationAngle) select GVAR(currentTarget) GVAR(inclinationAngle) set [GVAR(currentTarget), round(acos(_inclinationAngleCosine))]; }; }; +GVAR(targetSpeed) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140050)) min 50]; if ((ctrlText 140051) == ">") then { GVAR(targetSpeedDirection) set [GVAR(currentTarget), +1]; } else { GVAR(targetSpeedDirection) set [GVAR(currentTarget), -1]; }; +GVAR(targetRange) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140060)) min 4000]; +if (GVAR(currentUnit) != 2) then { + GVAR(windSpeed1) set [GVAR(currentTarget), (GVAR(windSpeed1) select GVAR(currentTarget)) * 0.44704]; + GVAR(windSpeed2) set [GVAR(currentTarget), (GVAR(windSpeed2) select GVAR(currentTarget)) * 0.44704]; + GVAR(targetSpeed) set [GVAR(currentTarget), (GVAR(targetSpeed) select GVAR(currentTarget)) * 0.44704]; +}; +if (GVAR(currentUnit) == 1) then { + GVAR(targetRange) set [GVAR(currentTarget), (GVAR(targetRange) select GVAR(currentTarget)) * 0.9144]; +}; private ["_boreHeight", "_bulletMass", "_bulletDiameter", "_airFriction", "_rifleTwist", "_muzzleVelocity", "_zeroRange"]; _boreHeight = parseNumber(ctrlText 120000); _bulletMass = parseNumber(ctrlText 120010); -_bulletDiameter = parseNumber(ctrlText 120020); -_airFriction = parseNumber(ctrlText 120030); +_bulletDiameter = parseNumber(ctrlText 120020) * 10; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - _airFriction = 0.1 max _airFriction min 2; + _airFriction = 0.1 max parseNumber(ctrlText 120030) min 2; } else { - _airFriction = _airFriction / -1000; + _airFriction = parseNumber(ctrlText 120030) / -1000; }; _rifleTwist = parseNumber(ctrlText 120040); _muzzleVelocity = parseNumber(ctrlText 120050); -_zeroRange = parseNumber(ctrlText 120060); +_zeroRange = parseNumber (ctrlText 120060); if (GVAR(currentUnit) != 2) then { - _boreHeight = 0.1 max _boreHeight min 5; - _bulletMass = 1 max _bulletMass min 1500; - _bulletDiameter = 0.1 max _bulletDiameter min 1.0; - _rifleTwist = 1 max _rifleTwist min 36; - _muzzleVelocity = 300 max _muzzleVelocity min 4500; _boreHeight = _boreHeight * 2.54; _bulletMass = _bulletMass * 0.06479891; _bulletDiameter = _bulletDiameter * 2.54; _rifleTwist = _rifleTwist * 2.54; - _muzzleVelocity = _muzzleVelocity * 0.3048; -} else { - _boreHeight = 0.1 max _boreHeight min 10; - _bulletMass = 1 max _bulletMass min 100; - _bulletDiameter = 0.1 max _bulletDiameter min 2.5; - _rifleTwist = 1 max _rifleTwist min 75; - _muzzleVelocity = 100 max _muzzleVelocity min 1400; + _muzzleVelocity = _muzzleVelocity / 3.2808399; }; -_zeroRange = 25 max _zeroRange min 1000; if (GVAR(currentUnit) == 1) then { - _zeroRange = _zeroRange * 0.9144; + _zeroRange = _zeroRange / 1.0936133; }; +_boreHeight = 0.1 max _boreHeight min 10; +_bulletMass = 1 max _bulletMass min 100; +_bulletDiameter = 1 max _bulletDiameter min 25; +_muzzleVelocity = 100 max _muzzleVelocity min 1400; +_zeroRange = 0 max _zeroRange min 1000; GVAR(workingMemory) set [5, _boreHeight]; GVAR(workingMemory) set [12, _bulletMass]; -GVAR(workingMemory) set [13, _bulletDiameter * 10]; +GVAR(workingMemory) set [13, _bulletDiameter]; GVAR(workingMemory) set [14, _rifleTwist]; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - if (_airFriction != GVAR(workingMemory) select 15) then { - (_airFriction - (GVAR(workingMemory) select 15)) call FUNC(shift_c1_ballistic_coefficient_data); - }; GVAR(workingMemory) set [15, _airFriction]; } else { GVAR(workingMemory) set [4, _airFriction]; }; -if (_muzzleVelocity != GVAR(workingMemory) select 1) then { - (_muzzleVelocity - (GVAR(workingMemory) select 1)) call FUNC(shift_muzzle_velocity_data); -}; GVAR(workingMemory) set [1, _muzzleVelocity]; GVAR(workingMemory) set [2, _zeroRange]; @@ -181,7 +101,5 @@ GVAR(workingMemory) set [2, _zeroRange]; [] call FUNC(update_atmo_env_data); [] call FUNC(update_target); [] call FUNC(update_target_data); -[] call FUNC(update_muzzle_velocity_data); -[] call FUNC(update_c1_ballistic_coefficient_data); [] call FUNC(store_user_data); diff --git a/addons/atragmx/functions/fnc_read_gun_list_entries_from_config.sqf b/addons/atragmx/functions/fnc_read_gun_list_entries_from_config.sqf deleted file mode 100644 index 4d99a5637f..0000000000 --- a/addons/atragmx/functions/fnc_read_gun_list_entries_from_config.sqf +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Author: Ruthberg - * Reads gun list entries from the config and appends them to the gun list - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_read_gun_list_entries_from_config - * - * Public: No - */ -#include "script_component.hpp" - -private _validate_preset = { - private _valid = true; - if (count _this != 20) then { - private _errorMsg = format ["Invalid preset array size: %1", count _this]; - ERROR(_errorMsg); - _valid = false; - }; - if (_this select 0 == "") then { - ERROR("Invalid gun profile name"); - _valid = false; - }; - if (count (_this select 0) > 14) then { - WARNING("Gun profile name too long (max. allowed 14 characters)"); - }; - if (_this select 1 < 0 || _this select 1 > 1400) then { - private _errorMsg = format ["Invalid muzzle velocity: %1", _this select 1]; - ERROR(_errorMsg); - _valid = false; - }; - if (_this select 2 < 25 || _this select 2 > 1000) then { - private _errorMsg = format ["Invalid zero range: %1", _this select 2]; - ERROR(_errorMsg); - _valid = false; - }; - if (_this select 4 > 0) then { - private _errorMsg = format ["Invalid airFriction value: %1", _this select 4]; - ERROR(_errorMsg); - _valid = false; - }; - if (_this select 5 < 0.1 || _this select 5 > 10) then { - private _errorMsg = format ["Invalid bore height value: %1", _this select 4]; - ERROR(_errorMsg); - _valid = false; - }; - if (_this select 12 < 1 || _this select 12 > 100) then { - private _errorMsg = format ["Invalid bullet weight: %1", _this select 12]; - ERROR(_errorMsg); - _valid = false; - }; - if (_this select 13 < 1 || _this select 13 > 25) then { - private _errorMsg = format ["Invalid bullet diameter: %1", _this select 13]; - ERROR(_errorMsg); - _valid = false; - }; - if (_this select 14 < 1 || _this select 14 > 75) then { - private _errorMsg = format ["Invalid rifle twist: %1", _this select 14]; - ERROR(_errorMsg); - _valid = false; - }; - if (_this select 15 < 0.1 || _this select 15 > 2.0) then { - private _errorMsg = format ["Invalid ballistic coefficient: %1", _this select 15]; - ERROR(_errorMsg); - _valid = false; - }; - if (_this select 16 != 1) then { - private _errorMsg = format ["Invalid drag model: %1", _this select 16]; - ERROR(_errorMsg); - _valid = false; - }; - if (!((_this select 17) in ["ASM", "ICAO"])) then { - private _errorMsg = format ["Invalid atmosphere model: %1", _this select 17]; - ERROR(_errorMsg); - _valid = false; - }; - if (count (_this select 18) != 7) then { - private _errorMsg = format ["Invalid muzzle velocity table array size: %1", count (_this select 18)]; - ERROR(_errorMsg); - _valid = false; - } else { - { - if (count _x != 2) exitWith { - private _errorMsg = format ["Invalid muzzle velocity table subarray size: %1", count _x]; - ERROR(_errorMsg); - _valid = false; - }; - } forEach (_this select 18); - }; - if (count (_this select 19) != 7) then { - private _errorMsg = format ["Invalid drag coefficient table array size: %1", count (_this select 19)]; - ERROR(_errorMsg); - _valid = false; - } else { - { - if (count _x != 2) exitWith { - private _errorMsg = format ["Invalid drag coefficient table subarray size: %1", count _x]; - ERROR(_errorMsg); - _valid = false; - }; - } forEach (_this select 19); - }; - _valid -}; - -{ - private _preset = _x >> "preset"; - - if (isArray(_preset)) then { - private _gun = getArray _preset; - - if (_gun call _validate_preset) then { - _gun set [0, (_gun select 0) select [0, 14]]; - _gun set [20, false]; - GVAR(gunList) = GVAR(gunList) + [_gun]; - }; - }; -} forEach ("true" configClasses (configFile >> "ACE_ATragMX_Presets")); diff --git a/addons/atragmx/functions/fnc_recalculate_c1_ballistic_coefficient.sqf b/addons/atragmx/functions/fnc_recalculate_c1_ballistic_coefficient.sqf deleted file mode 100644 index e7ec8bf5a2..0000000000 --- a/addons/atragmx/functions/fnc_recalculate_c1_ballistic_coefficient.sqf +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Author: Ruthberg - * Recalculates the c1 ballistic coefficient based on the c1 ballistic coefficient vs. distance interpolation input - * - * Arguments: - * parse input - * update display - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_recalculate_c1_ballistic_coefficient - * - * Public: No - */ -#include "script_component.hpp" - -params ["_parseInput", "_updateDisplay"]; - -if (_parseInput) then { - [] call FUNC(parse_input); -}; - -private _lookupTable = []; -{ - if ((_x select 1) > 0) then { - _lookupTable pushBack _x; - }; -} forEach (GVAR(workingMemory) select 19); - -private _lookupTableSize = count _lookupTable; -if (_lookupTableSize < 2) exitWith {}; -_lookupTable sort true; - -private ["_lowerIndex", "_upperIndex"]; -for "_index" from 1 to (_lookupTableSize - 1) do { - _upperIndex = _index; - _lowerIndex = _upperIndex - 1; - if (((_lookupTable select _index) select 0) >= (GVAR(targetRange) select GVAR(currentTarget))) exitWith {}; -}; - -private ["_lowerDistance", "_upperDistance", "_lowerC1", "_upperC1", "_c1"]; -_lowerDistance = (_lookupTable select _lowerIndex) select 0; -_upperDistance = (_lookupTable select _upperIndex) select 0; -_lowerC1 = (_lookupTable select _lowerIndex) select 1; -_upperC1 = (_lookupTable select _upperIndex) select 1; -_c1 = _lowerC1; -if (_lowerDistance != _upperDistance) then { - private _slope = (_upperC1 - _lowerC1) / (_upperDistance - _lowerDistance); - _c1 = _lowerC1 + ((GVAR(targetRange) select GVAR(currentTarget)) - _lowerDistance) * _slope; -}; -_c1 = 0.1 max _c1 min 2.0; - -if (_c1 != GVAR(workingMemory) select 15) then { - GVAR(workingMemory) set [15, _c1]; - if (_updateDisplay) then { - call FUNC(update_gun); - call FUNC(update_gun_ammo_data); - }; -}; diff --git a/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf b/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf deleted file mode 100644 index 248c039969..0000000000 --- a/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Author: Ruthberg - * Recalculates the muzzle velocity based on the muzzle velocity vs. temperature interpolation input - * - * Arguments: - * parse input - * update display - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_recalculate_muzzle_velocity - * - * Public: No - */ -#include "script_component.hpp" - -params ["_parseInput", "_updateDisplay"]; - -if (_parseInput) then { - [] call FUNC(parse_input); -}; - -private _lookupTable = []; -{ - if ((_x select 1) > 0) then { - _lookupTable pushBack _x; - }; -} forEach (GVAR(workingMemory) select 18); - -private _lookupTableSize = count _lookupTable; -if (_lookupTableSize < 2) exitWith {}; -_lookupTable sort true; - -private ["_lowerIndex", "_upperIndex"]; -for "_index" from 1 to (_lookupTableSize - 1) do { - _upperIndex = _index; - _lowerIndex = _upperIndex - 1; - if (((_lookupTable select _index) select 0) >= GVAR(temperature)) exitWith {}; -}; - -private ["_lowerTemperature", "_upperTemperature", "_lowerMuzzleVelocity", "_upperMuzzleVelocity", "_muzzleVelocity"]; -_lowerTemperature = (_lookupTable select _lowerIndex) select 0; -_upperTemperature = (_lookupTable select _upperIndex) select 0; -_lowerMuzzleVelocity = (_lookupTable select _lowerIndex) select 1; -_upperMuzzleVelocity = (_lookupTable select _upperIndex) select 1; -_muzzleVelocity = _lowerMuzzleVelocity; -if (_lowerTemperature != _upperTemperature) then { - private _slope = (_upperMuzzleVelocity - _lowerMuzzleVelocity) / (_upperTemperature - _lowerTemperature); - _muzzleVelocity = _lowerMuzzleVelocity + (GVAR(temperature) - _lowerTemperature) * _slope; -}; -_muzzleVelocity = 100 max _muzzleVelocity min 1400; - -if (_muzzleVelocity != GVAR(workingMemory) select 1) then { - GVAR(workingMemory) set [1, _muzzleVelocity]; - if (_updateDisplay) then { - call FUNC(update_gun); - call FUNC(update_gun_ammo_data); - }; -}; diff --git a/addons/atragmx/functions/fnc_reset_relative_click_memory.sqf b/addons/atragmx/functions/fnc_reset_relative_click_memory.sqf index 85d8ff6bc6..489e832ea2 100644 --- a/addons/atragmx/functions/fnc_reset_relative_click_memory.sqf +++ b/addons/atragmx/functions/fnc_reset_relative_click_memory.sqf @@ -3,10 +3,10 @@ * Resets the relative click memory and updates the result input/output fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_reset_relative_click_memory diff --git a/addons/atragmx/functions/fnc_restore_atmo_default.sqf b/addons/atragmx/functions/fnc_restore_atmo_default.sqf index 560c0da875..08b7c56d86 100644 --- a/addons/atragmx/functions/fnc_restore_atmo_default.sqf +++ b/addons/atragmx/functions/fnc_restore_atmo_default.sqf @@ -3,10 +3,10 @@ * Restores the atmospheric data defaults * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_restore_atmo_default diff --git a/addons/atragmx/functions/fnc_restore_truing_drop.sqf b/addons/atragmx/functions/fnc_restore_truing_drop.sqf deleted file mode 100644 index a3fb516f23..0000000000 --- a/addons/atragmx/functions/fnc_restore_truing_drop.sqf +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Author: Ruthberg - * Restores the truing drop defaults - * - * Arguments: - * update display - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_restore_truing_drop - * - * Public: No - */ -#include "script_component.hpp" - -private _updateDisplay = _this; - -GVAR(truingDropMode) = 0; -GVAR(truingDropRangeData) = [0, 0]; -GVAR(truingDropDropData) = [0, 0, 0]; -GVAR(truingDropReferenceDropData) = [0, 0, 0]; -GVAR(truingDropC1) = 0; -GVAR(truingDropMuzzleVelocity) = 0; - -// Resets input fields -call FUNC(update_truing_drop_selection); - -if (_updateDisplay) then { - // Repopulates input fields - false call FUNC(calculate_truing_drop); -}; diff --git a/addons/atragmx/functions/fnc_restore_user_data.sqf b/addons/atragmx/functions/fnc_restore_user_data.sqf index cf7f2e2bef..896455ec7a 100644 --- a/addons/atragmx/functions/fnc_restore_user_data.sqf +++ b/addons/atragmx/functions/fnc_restore_user_data.sqf @@ -3,10 +3,10 @@ * Reads user data from profileNamespace * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_restore_user_data @@ -26,7 +26,6 @@ GVAR(barometricPressure) = 340 max (profileNamespace getVariable ["ACE_ATragMX_b GVAR(relativeHumidity) = 0 max (profileNamespace getVariable ["ACE_ATragMX_relativeHumidity", 0.5]) min 1; GVAR(showWind2) = profileNamespace getVariable ["ACE_ATragMX_showWind2", false]; -GVAR(showCoriolis) = profileNamespace getVariable ["ACE_ATragMX_showCoriolis", true]; GVAR(latitude) = profileNamespace getVariable ["ACE_ATragMX_latitude", [38, 38, 38, 38]]; GVAR(directionOfFire) = profileNamespace getVariable ["ACE_ATragMX_directionOfFire", [0, 0, 0, 0]]; GVAR(windSpeed1) = profileNamespace getVariable ["ACE_ATragMX_windSpeed1", [0, 0, 0, 0]]; diff --git a/addons/atragmx/functions/fnc_save_gun.sqf b/addons/atragmx/functions/fnc_save_gun.sqf index e26187b231..64fe17e4c4 100644 --- a/addons/atragmx/functions/fnc_save_gun.sqf +++ b/addons/atragmx/functions/fnc_save_gun.sqf @@ -3,10 +3,10 @@ * Saves the currently select gun profile into the profileNamespace * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_save_gun @@ -25,4 +25,4 @@ lbClear 6000; lbAdd [6000, _x select 0]; } forEach GVAR(gunList); -call FUNC(store_gun_list); +profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)]; diff --git a/addons/atragmx/functions/fnc_shift_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_shift_c1_ballistic_coefficient_data.sqf deleted file mode 100644 index 89667e25b9..0000000000 --- a/addons/atragmx/functions/fnc_shift_c1_ballistic_coefficient_data.sqf +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Author: Ruthberg - * Shifts all c1 ballistic coefficient entries in the c1 ballistic coefficient vs. distance interpolation table - * - * Arguments: - * ballistic coefficient - - * - * Return Value: - * None - * - * Example: - * 10 call ace_atragmx_fnc_shift_c1_ballistic_coefficient_data - * - * Public: No - */ -#include "script_component.hpp" - -if (_this == 0) exitWith {}; - -{ - private _c1 = _x select 1; - if (_c1 > 0) then { - ((GVAR(workingMemory) select 19) select _forEachIndex) set [1, 0.1 max (_c1 + _this) min 2]; - } -} forEach (GVAR(workingMemory) select 19); diff --git a/addons/atragmx/functions/fnc_shift_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_shift_muzzle_velocity_data.sqf deleted file mode 100644 index 75fcc9c3a6..0000000000 --- a/addons/atragmx/functions/fnc_shift_muzzle_velocity_data.sqf +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Author: Ruthberg - * Shifts all muzzle velocity entries in the muzzle velocity vs. temperature interpolation table - * - * Arguments: - * velocity - - * - * Return Value: - * None - * - * Example: - * 10 call ace_atragmx_fnc_shift_muzzle_velocity_data - * - * Public: No - */ -#include "script_component.hpp" - -if (_this == 0) exitWith {}; - -{ - private _velocity = _x select 1; - if (_velocity > 0) then { - ((GVAR(workingMemory) select 18) select _forEachIndex) set [1, 0 max (_velocity + _this) min 1400]; - } -} forEach (GVAR(workingMemory) select 18); diff --git a/addons/atragmx/functions/fnc_show_add_new_gun.sqf b/addons/atragmx/functions/fnc_show_add_new_gun.sqf index a5d4fd8b8b..b5b0f29a18 100644 --- a/addons/atragmx/functions/fnc_show_add_new_gun.sqf +++ b/addons/atragmx/functions/fnc_show_add_new_gun.sqf @@ -6,10 +6,10 @@ * visible - * * Return Value: - * None + * Nothing * * Example: - * false call ace_atragmx_fnc_show_add_new_gun + * call ace_atragmx_fnc_show_add_new_gun * * Public: No */ diff --git a/addons/atragmx/functions/fnc_show_atmo_env_data.sqf b/addons/atragmx/functions/fnc_show_atmo_env_data.sqf index 75dcaad502..56f75f7844 100644 --- a/addons/atragmx/functions/fnc_show_atmo_env_data.sqf +++ b/addons/atragmx/functions/fnc_show_atmo_env_data.sqf @@ -6,7 +6,7 @@ * visible - * * Return Value: - * None + * Nothing * * Example: * false call ace_atragmx_fnc_show_atmo_env_data diff --git a/addons/atragmx/functions/fnc_show_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_show_c1_ballistic_coefficient_data.sqf deleted file mode 100644 index 797f0498fe..0000000000 --- a/addons/atragmx/functions/fnc_show_c1_ballistic_coefficient_data.sqf +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Author: Ruthberg - * Shows/Hides the c1 ballistic coefficient data controls - * - * Arguments: - * visible - - * - * Return Value: - * None - * - * Example: - * false call ace_atragmx_fnc_show_c1_ballistic_coefficient_data - * - * Public: No - */ -#include "script_component.hpp" - -GVAR(showC1BallisticCoefficientData) = _this; - -{ctrlShow [_x, _this]} forEach [17000, 17001, 170021, 170022, 170023, 170024, 170025, 170026, 170027, 170031, 170032, 170033, 170034, 170035, 170036, 170037, 17004, 17005, 17006, 17007, 17008, 17009]; - -if (_this) then { - if (GVAR(currentUnit) != 1) then { - ctrlSetText [17000, "Meters"]; - } else { - ctrlSetText [17000, "Yards"]; - }; - ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 170031); - [] call FUNC(update_c1_ballistic_coefficient_data); -}; diff --git a/addons/atragmx/functions/fnc_show_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_show_gun_ammo_data.sqf index c6fb288acc..dfab6da238 100644 --- a/addons/atragmx/functions/fnc_show_gun_ammo_data.sqf +++ b/addons/atragmx/functions/fnc_show_gun_ammo_data.sqf @@ -6,7 +6,7 @@ * visible - * * Return Value: - * None + * Nothing * * Example: * false call ace_atragmx_fnc_show_gun_ammo_data diff --git a/addons/atragmx/functions/fnc_show_gun_list.sqf b/addons/atragmx/functions/fnc_show_gun_list.sqf index e6c8156d26..ce3b3bae3a 100644 --- a/addons/atragmx/functions/fnc_show_gun_list.sqf +++ b/addons/atragmx/functions/fnc_show_gun_list.sqf @@ -6,10 +6,10 @@ * visible - * * Return Value: - * None + * Nothing * * Example: - * false call ace_atragmx_fnc_show_gun_list + * call ace_atragmx_fnc_show_gun_list * * Public: No */ diff --git a/addons/atragmx/functions/fnc_show_main_page.sqf b/addons/atragmx/functions/fnc_show_main_page.sqf index 6b2259c72a..486ea1655a 100644 --- a/addons/atragmx/functions/fnc_show_main_page.sqf +++ b/addons/atragmx/functions/fnc_show_main_page.sqf @@ -6,10 +6,10 @@ * visible - * * Return Value: - * None + * Nothing * * Example: - * false call ace_atragmx_fnc_show_main_page + * call ace_atragmx_fnc_show_main_page * * Public: No */ @@ -21,18 +21,6 @@ GVAR(showMainPage) = _this; 500, 501, 502, 503, 600, 601, 602, 603, 1000, 1001, 1002, 1003, 1004, 2000, 2001, 3000, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008]; if (_this) then { - if (GVAR(showCoriolis)) then { - ctrlSetText [4003, "Hold"]; - ctrlSetText [4004, "Cor"]; - ctrlSetText [4005, "Spin"]; - {ctrlShow [_x, false]} forEach [402, 4006, 4007]; - } else { - ctrlSetText [4003, "Abs"]; - ctrlSetText [4004, "Rel"]; - ctrlSetText [4005, "Cur"]; - private _visible = (GVAR(currentScopeUnit) == 3); - {ctrlShow [_x, _visible]} forEach [401, 402, 411, 412, 4004, 4005, 4006, 4007]; - }; if (GVAR(atmosphereModeTBH)) then { {ctrlShow [_x, false]} forEach [23, 230]; } else { diff --git a/addons/atragmx/functions/fnc_show_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_show_muzzle_velocity_data.sqf deleted file mode 100644 index 20c7bf1826..0000000000 --- a/addons/atragmx/functions/fnc_show_muzzle_velocity_data.sqf +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Author: Ruthberg - * Shows/Hides the muzzle velocity data controls - * - * Arguments: - * visible - - * - * Return Value: - * None - * - * Example: - * false call ace_atragmx_fnc_show_muzzle_velocity_data - * - * Public: No - */ -#include "script_component.hpp" - -GVAR(showMuzzleVelocityData) = _this; - -{ctrlShow [_x, _this]} forEach [16000, 16001, 160021, 160022, 160023, 160024, 160025, 160026, 160027, 160031, 160032, 160033, 160034, 160035, 160036, 160037, 16004, 16005, 16006, 16007, 16008, 16009]; - -if (_this) then { - ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 160031); - [] call FUNC(update_muzzle_velocity_data); -}; diff --git a/addons/atragmx/functions/fnc_show_range_card.sqf b/addons/atragmx/functions/fnc_show_range_card.sqf index d2dc368bb4..7709589beb 100644 --- a/addons/atragmx/functions/fnc_show_range_card.sqf +++ b/addons/atragmx/functions/fnc_show_range_card.sqf @@ -6,10 +6,10 @@ * visible - * * Return Value: - * None + * Nothing * * Example: - * false call ace_atragmx_fnc_show_range_card + * call ace_atragmx_fnc_show_range_card * * Public: No */ diff --git a/addons/atragmx/functions/fnc_show_range_card_setup.sqf b/addons/atragmx/functions/fnc_show_range_card_setup.sqf index 6597e4ee7e..f4d55f33d1 100644 --- a/addons/atragmx/functions/fnc_show_range_card_setup.sqf +++ b/addons/atragmx/functions/fnc_show_range_card_setup.sqf @@ -6,10 +6,10 @@ * visible - * * Return Value: - * None + * Nothing * * Example: - * false call ace_atragmx_fnc_show_range_card_setup + * call ace_atragmx_fnc_show_range_card_setup * * Public: No */ diff --git a/addons/atragmx/functions/fnc_show_solution_setup.sqf b/addons/atragmx/functions/fnc_show_solution_setup.sqf index 83476228f4..761df45e6f 100644 --- a/addons/atragmx/functions/fnc_show_solution_setup.sqf +++ b/addons/atragmx/functions/fnc_show_solution_setup.sqf @@ -6,7 +6,7 @@ * visible - * * Return Value: - * None + * Nothing * * Example: * false call ace_atragmx_fnc_show_solution_setup diff --git a/addons/atragmx/functions/fnc_show_target_data.sqf b/addons/atragmx/functions/fnc_show_target_data.sqf index 7a0845f862..f1b432edf8 100644 --- a/addons/atragmx/functions/fnc_show_target_data.sqf +++ b/addons/atragmx/functions/fnc_show_target_data.sqf @@ -6,7 +6,7 @@ * visible - * * Return Value: - * None + * Nothing * * Example: * false call ace_atragmx_fnc_show_target_data diff --git a/addons/atragmx/functions/fnc_show_target_range_assist.sqf b/addons/atragmx/functions/fnc_show_target_range_assist.sqf index 0f6c7bad04..d910271aa4 100644 --- a/addons/atragmx/functions/fnc_show_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_show_target_range_assist.sqf @@ -6,10 +6,10 @@ * visible - * * Return Value: - * None + * Nothing * * Example: - * false call ace_atragmx_fnc_show_target_range_assist + * call ace_atragmx_fnc_show_target_range_assist * * Public: No */ diff --git a/addons/atragmx/functions/fnc_show_target_speed_assist.sqf b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf index ac99a4e76e..c5a23eb1b7 100644 --- a/addons/atragmx/functions/fnc_show_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf @@ -6,10 +6,10 @@ * visible - * * Return Value: - * None + * Nothing * * Example: - * false call ace_atragmx_fnc_show_target_speed_assist + * call ace_atragmx_fnc_show_target_speed_assist * * Public: No */ diff --git a/addons/atragmx/functions/fnc_show_target_speed_assist_timer.sqf b/addons/atragmx/functions/fnc_show_target_speed_assist_timer.sqf index cb28390ff6..a731dd194d 100644 --- a/addons/atragmx/functions/fnc_show_target_speed_assist_timer.sqf +++ b/addons/atragmx/functions/fnc_show_target_speed_assist_timer.sqf @@ -6,10 +6,10 @@ * visible - * * Return Value: - * None + * Nothing * * Example: - * false call ace_atragmx_fnc_show_target_speed_assist_timer + * call ace_atragmx_fnc_show_target_speed_assist_timer * * Public: No */ diff --git a/addons/atragmx/functions/fnc_show_truing_drop.sqf b/addons/atragmx/functions/fnc_show_truing_drop.sqf deleted file mode 100644 index 644fe834b6..0000000000 --- a/addons/atragmx/functions/fnc_show_truing_drop.sqf +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Author: Ruthberg - * Shows/Hides the truing drop controls - * - * Arguments: - * visible - - * - * Return Value: - * None - * - * Example: - * false call ace_atragmx_fnc_show_truing_drop - * - * Public: No - */ -#include "script_component.hpp" - -GVAR(showTruingDrop) = _this; - -{ctrlShow [_x, _this]} forEach [18000, 18001, 18002, 18003, 18004, 18005, 18006, 18007, 18008, 18009, 18010, 18011, 18012, 18013, 18014, 18015, 18016, 18017, 18018, 18019, 18020]; - -if (_this) then { - if (GVAR(currentUnit) == 2) then { - ctrlSetText [18000, format["ZR=%1meters", Round(GVAR(workingMemory) select 2)]]; - } else { - ctrlSetText [18000, format["ZR=%1yards", Round((GVAR(workingMemory) select 2) * 1.0936133)]]; - }; - private _dropUnit = GVAR(currentScopeUnit); - if (_dropUnit == 3) then { - switch (GVAR(currentScopeClickUnit)) do { - case 0: { _dropUnit = 1; }; - case 1: { _dropUnit = 2; }; - case 2: { _dropUnit = 0; }; - }; - }; - switch (_dropUnit) do { - case 0: { ctrlSetText [18001, "Drop=mils"]; }; - case 1: { ctrlSetText [18001, "Drop=tmoa"]; }; - case 2: { ctrlSetText [18001, "Drop=smoa"]; }; - }; - false call FUNC(calculate_truing_drop); - call FUNC(update_truing_drop_selection); -}; diff --git a/addons/atragmx/functions/fnc_sord.sqf b/addons/atragmx/functions/fnc_sord.sqf index 792d727c70..b342072018 100644 --- a/addons/atragmx/functions/fnc_sord.sqf +++ b/addons/atragmx/functions/fnc_sord.sqf @@ -8,7 +8,7 @@ * 2: Inclination (Degrees) * * Return Value: - * None + * Nothing * * Example: * [1000, 45, 1] call ace_microdagr_fnc_recieveRangefinderData @@ -17,8 +17,6 @@ */ #include "script_component.hpp" -if (!GVAR(initialised)) exitWith {}; - params ["_slopeDistance", "_azimuth", "_inclination"]; GVAR(inclinationAngle) set [GVAR(currentTarget), round(_inclination)]; diff --git a/addons/atragmx/functions/fnc_store_gun_list.sqf b/addons/atragmx/functions/fnc_store_gun_list.sqf deleted file mode 100644 index b3969837d2..0000000000 --- a/addons/atragmx/functions/fnc_store_gun_list.sqf +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Author: Ruthberg - * Saves the persistent gun list entries into profileNamespace - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_store_user_data - * - * Public: No - */ -#include "script_component.hpp" - -private _gunList = []; -{ - if (_x select 20) then { - _gunList pushBack _x; - }; -} forEach GVAR(gunList); - -profileNamespace setVariable ["ACE_ATragMX_gunList", _gunList]; diff --git a/addons/atragmx/functions/fnc_store_user_data.sqf b/addons/atragmx/functions/fnc_store_user_data.sqf index 264ac07458..5cfe7f2ae0 100644 --- a/addons/atragmx/functions/fnc_store_user_data.sqf +++ b/addons/atragmx/functions/fnc_store_user_data.sqf @@ -3,10 +3,10 @@ * Saves user data into profileNamespace * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_store_user_data @@ -28,7 +28,6 @@ profileNamespace setVariable ["ACE_ATragMX_barometricPressure", GVAR(barometricP profileNamespace setVariable ["ACE_ATragMX_relativeHumidity", GVAR(relativeHumidity)]; profileNamespace setVariable ["ACE_ATragMX_showWind2", GVAR(showWind2)]; -profileNamespace setVariable ["ACE_ATragMX_showCoriolis", GVAR(showCoriolis)]; profileNamespace setVariable ["ACE_ATragMX_latitude", GVAR(latitude)]; profileNamespace setVariable ["ACE_ATragMX_directionOfFire", GVAR(directionOfFire)]; profileNamespace setVariable ["ACE_ATragMX_windSpeed1", GVAR(windSpeed1)]; @@ -42,4 +41,4 @@ profileNamespace setVariable ["ACE_ATragMX_targetRange", GVAR(targetRange)]; profileNamespace setVariable ["ACE_ATragMX_rangeCardStartRange", GVAR(rangeCardStartRange)]; profileNamespace setVariable ["ACE_ATragMX_rangeCardEndRange", GVAR(rangeCardEndRange)]; profileNamespace setVariable ["ACE_ATragMX_rangeCardIncrement", GVAR(rangeCardIncrement)]; -profileNamespace setVariable ["ACE_ATragMX_rangeCardCurrentColumn", GVAR(rangeCardCurrentColumn)]; +profileNamespace setVariable ["ACE_ATragMX_rangeCardCurrentColumn", GVAR(rangeCardCurrentColumn)]; \ No newline at end of file diff --git a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf index d9ae84e1ae..d270dbf4c3 100644 --- a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf +++ b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf @@ -3,10 +3,10 @@ * Shows and starts the target speed assist timer * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_target_speed_assist_timer diff --git a/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf b/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf index 5e420b41f8..87e973c7c0 100644 --- a/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf +++ b/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf @@ -6,7 +6,7 @@ * Apply new data? * * Return Value: - * None + * Nothing * * Example: * 1 call ace_atragmx_fnc_toggle_atmo_env_data @@ -20,11 +20,7 @@ if (ctrlVisible 13000) then { true call FUNC(show_main_page); if (_this == 1) then { - GVAR(truingDropDropData) set [0, 0]; - [true, true] call FUNC(recalculate_muzzle_velocity); call FUNC(calculate_target_solution); - } else { - call FUNC(update_atmo_env_data); }; } else { true call FUNC(show_atmo_env_data); diff --git a/addons/atragmx/functions/fnc_toggle_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_toggle_c1_ballistic_coefficient_data.sqf deleted file mode 100644 index c83e21a872..0000000000 --- a/addons/atragmx/functions/fnc_toggle_c1_ballistic_coefficient_data.sqf +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Author: Ruthberg - * Toggles the c1 ballistic coefficient data screen on/off - * - * Arguments: - * Apply new data? - * - * Return Value: - * None - * - * Example: - * 1 call ace_atragmx_fnc_toggle_c1_ballistic_coefficient_data - * - * Public: No - */ -#include "script_component.hpp" - -if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {}; - -if (ctrlVisible 17000) then { - false call FUNC(show_c1_ballistic_coefficient_data); - true call FUNC(show_main_page); - - if (_this == 1) then { - [true, true] call FUNC(recalculate_c1_ballistic_coefficient); - call FUNC(calculate_target_solution); - } else { - call FUNC(update_c1_ballistic_coefficient_data); - }; -} else { - true call FUNC(show_c1_ballistic_coefficient_data); - false call FUNC(show_main_page); -}; diff --git a/addons/atragmx/functions/fnc_toggle_coriolis.sqf b/addons/atragmx/functions/fnc_toggle_coriolis.sqf deleted file mode 100644 index a711d2a55e..0000000000 --- a/addons/atragmx/functions/fnc_toggle_coriolis.sqf +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Author: Ruthberg - * Toggles the coriolis and spin drift output on/off - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_toggle_coriolis - * - * Public: No - */ -#include "script_component.hpp" - -GVAR(showCoriolis) = !GVAR(showCoriolis); -true call FUNC(show_main_page); diff --git a/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf index 332c0f1aba..f3eb814da7 100644 --- a/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf +++ b/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf @@ -6,7 +6,7 @@ * Apply new data? * * Return Value: - * None + * Nothing * * Example: * 1 call ace_atragmx_fnc_toggle_gun_ammo_data @@ -20,11 +20,8 @@ if (ctrlVisible 12000) then { true call FUNC(show_main_page); if (_this == 1) then { - GVAR(truingDropDropData) set [0, 0]; call FUNC(update_zero_range); call FUNC(calculate_target_solution); - } else { - call FUNC(update_gun_ammo_data); }; } else { true call FUNC(show_gun_ammo_data); diff --git a/addons/atragmx/functions/fnc_toggle_gun_list.sqf b/addons/atragmx/functions/fnc_toggle_gun_list.sqf index 6ff6e3b6f4..e5dbf54bd5 100644 --- a/addons/atragmx/functions/fnc_toggle_gun_list.sqf +++ b/addons/atragmx/functions/fnc_toggle_gun_list.sqf @@ -6,7 +6,7 @@ * change gun? * * Return Value: - * None + * Nothing * * Example: * false call ace_atragmx_fnc_toggle_gun_list diff --git a/addons/atragmx/functions/fnc_toggle_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_toggle_muzzle_velocity_data.sqf deleted file mode 100644 index d00992d856..0000000000 --- a/addons/atragmx/functions/fnc_toggle_muzzle_velocity_data.sqf +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Author: Ruthberg - * Toggles the muzzle velocity data screen on/off - * - * Arguments: - * Apply new data? - * - * Return Value: - * None - * - * Example: - * 1 call ace_atragmx_fnc_toggle_muzzle_velocity_data - * - * Public: No - */ -#include "script_component.hpp" - -if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {}; - -if (ctrlVisible 16000) then { - false call FUNC(show_muzzle_velocity_data); - true call FUNC(show_main_page); - - if (_this == 1) then { - [true, true] call FUNC(recalculate_muzzle_velocity); - call FUNC(calculate_target_solution); - } else { - call FUNC(update_muzzle_velocity_data); - }; -} else { - true call FUNC(show_muzzle_velocity_data); - false call FUNC(show_main_page); -}; diff --git a/addons/atragmx/functions/fnc_toggle_option_menu.sqf b/addons/atragmx/functions/fnc_toggle_option_menu.sqf deleted file mode 100644 index f7d7f06a13..0000000000 --- a/addons/atragmx/functions/fnc_toggle_option_menu.sqf +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Author: Ruthberg - * Toggles the option menu on/off - * - * Arguments: - * open menu item - * - * Return Value: - * None - * - * Example: - * 1 call ace_atragmx_fnc_toggle_option_menu - * - * Public: No - */ -#include "script_component.hpp" - -if (ctrlVisible 3001) then { - if (_this) then { - private _optionID = lbCurSel 3002; - if (_optionID > 0) then { - ctrlShow [3001, false]; - ctrlShow [3002, false]; - [_optionID] call FUNC(evaluate_option_menu_input); - }; - } else { - ctrlShow [3001, false]; - ctrlShow [3002, false]; - }; -} else { - lbClear 3002; - - lbAdd [3002, "Accuracy 1st"]; - lbAdd [3002, "Muz Vel Table"]; - lbAdd [3002, "Drag Coef Table"]; - lbAdd [3002, "Target Speed Est"]; - lbAdd [3002, "Target Range Est"]; - lbAdd [3002, "Truing Drop"]; - if (GVAR(showCoriolis)) then { - lbAdd [3002, "Show Coriolis *"]; - } else { - lbAdd [3002, "Show Coriolis"]; - }; - lbAdd [3002, "Set Clicks"]; - lbAdd [3002, "Gun Note"]; - - lbSetCurSel [3002, 0]; - - ctrlShow [3001, true]; - ctrlShow [3002, true]; - - ctrlSetFocus ((uiNamespace getVariable ["ATragMX_Display", displayNull]) displayCtrl 3002); -}; diff --git a/addons/atragmx/functions/fnc_toggle_range_card.sqf b/addons/atragmx/functions/fnc_toggle_range_card.sqf index 4e7ea4d511..7d8b7a0239 100644 --- a/addons/atragmx/functions/fnc_toggle_range_card.sqf +++ b/addons/atragmx/functions/fnc_toggle_range_card.sqf @@ -3,10 +3,10 @@ * Toggles the range card screen on/off * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_toggle_range_card diff --git a/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf index e5d68c3933..96c31459b2 100644 --- a/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf +++ b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf @@ -6,7 +6,7 @@ * Apply new range card settings * * Return Value: - * None + * Nothing * * Example: * 1 call ace_atragmx_fnc_toggle_range_card_setup diff --git a/addons/atragmx/functions/fnc_toggle_solution_setup.sqf b/addons/atragmx/functions/fnc_toggle_solution_setup.sqf index f548df689f..5372b205d0 100644 --- a/addons/atragmx/functions/fnc_toggle_solution_setup.sqf +++ b/addons/atragmx/functions/fnc_toggle_solution_setup.sqf @@ -6,7 +6,7 @@ * Apply new data? * * Return Value: - * None + * Nothing * * Example: * 1 call ace_atragmx_fnc_toggle_solution_setup diff --git a/addons/atragmx/functions/fnc_toggle_target_data.sqf b/addons/atragmx/functions/fnc_toggle_target_data.sqf index 863af6511f..2cfa2f8df5 100644 --- a/addons/atragmx/functions/fnc_toggle_target_data.sqf +++ b/addons/atragmx/functions/fnc_toggle_target_data.sqf @@ -6,7 +6,7 @@ * Apply new data? * * Return Value: - * None + * Nothing * * Example: * 1 call ace_atragmx_fnc_toggle_target_data @@ -21,8 +21,6 @@ if (ctrlVisible 14000) then { if (_this == 1) then { call FUNC(calculate_target_solution); - } else { - call FUNC(update_target_data); }; } else { true call FUNC(show_target_data); diff --git a/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf index ad593830f9..83d2daa95f 100644 --- a/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf @@ -6,7 +6,7 @@ * update range? * * Return Value: - * None + * Nothing * * Example: * 1 call ace_atragmx_fnc_toggle_target_range_assist diff --git a/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf index cbeabc48ac..4d1680d195 100644 --- a/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf @@ -6,7 +6,7 @@ * update speed? * * Return Value: - * None + * Nothing * * Example: * 1 call ace_atragmx_fnc_toggle_target_speed_assist diff --git a/addons/atragmx/functions/fnc_toggle_truing_drop.sqf b/addons/atragmx/functions/fnc_toggle_truing_drop.sqf deleted file mode 100644 index 9865005c78..0000000000 --- a/addons/atragmx/functions/fnc_toggle_truing_drop.sqf +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Author: Ruthberg - * Toggles the truing drop screen on/off - * - * Arguments: - * Apply new data? - * - * Return Value: - * None - * - * Example: - * 1 call ace_atragmx_fnc_toggle_truing_drop - * - * Public: No - */ -#include "script_component.hpp" - -if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {}; - -if (ctrlVisible 18000) then { - false call FUNC(show_truing_drop); - true call FUNC(show_main_page); - - if (_this == 1) then { - if (GVAR(truingDropMode) == 0) then { - [GVAR(temperature), GVAR(truingDropMuzzleVelocity)] call FUNC(insert_muzzle_velocity_data); - [false, true] call FUNC(recalculate_muzzle_velocity); - } else { - [GVAR(truingDropRangeData) select 0, GVAR(truingDropRangeData) select 1, GVAR(truingDropC1)] call FUNC(insert_c1_ballistic_coefficient_data); - [false, true] call FUNC(recalculate_c1_ballistic_coefficient); - }; - call FUNC(calculate_target_solution); - } else { - call FUNC(update_truing_drop_data); - }; -} else { - false call FUNC(show_main_page); - true call FUNC(show_truing_drop); -}; diff --git a/addons/atragmx/functions/fnc_trim_gun_name.sqf b/addons/atragmx/functions/fnc_trim_gun_name.sqf deleted file mode 100644 index 36344d6dfa..0000000000 --- a/addons/atragmx/functions/fnc_trim_gun_name.sqf +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Author: Ruthberg - * Trims the gun name input field - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_trim_gun_name - * - * Public: No - */ -#include "script_component.hpp" - -ctrlSetText [11001, (ctrlText 11001) select [0, 14]]; diff --git a/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf b/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf deleted file mode 100644 index dfa41ea0b4..0000000000 --- a/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Author: Ruthberg - * Trues the c1 ballistic coefficient - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_true_c1_ballistic_coefficient - * - * Public: No - */ -#include "script_component.hpp" - -private _referenceDrop = GVAR(truingDropDropData) select 0; -private _actualDrop = GVAR(truingDropDropData) select 2; - -if (Round(_actualDrop * 10) / 10 == Round(_referenceDrop * 10) / 10) exitWith {}; - -private _step = 0.01; -if (_actualDrop > _referenceDrop) then { - _step = -0.01; -}; - -private _solutionInput = +GVAR(targetSolutionInput); -_solutionInput set [ 8, 200]; -_solutionInput set [13, GVAR(truingDropRangeData) select 1]; -private _c1 = _solutionInput select 14; - -{ - _step = _step * _x; - while { _actualDrop * _step < _referenceDrop * _step } do { - _c1 = _c1 + _step; - _solutionInput set [14, _c1]; - private _result = _solutionInput call FUNC(calculate_solution); - _referenceDrop = (_result select 0); - }; -} forEach [1, -0.1]; - -GVAR(truingDropC1) = _c1; diff --git a/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf b/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf deleted file mode 100644 index db907aa29d..0000000000 --- a/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Author: Ruthberg - * Trues the muzzle velocity - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_true_muzzle_velocity - * - * Public: No - */ -#include "script_component.hpp" - -private _referenceDrop = GVAR(truingDropDropData) select 0; -private _actualDrop = GVAR(truingDropDropData) select 1; - -if (Round(_actualDrop * 10) / 10 == Round(_referenceDrop * 10) / 10) exitWith {}; - -private _step = 10; -if (_actualDrop > _referenceDrop) then { - _step = -10; -}; - -private _solutionInput = +GVAR(targetSolutionInput); -_solutionInput set [ 8, 200]; -_solutionInput set [13, GVAR(truingDropRangeData) select 0]; -private _muzzleVelocity = _solutionInput select 4; - -{ - _step = _step * _x; - while { _actualDrop * _step < _referenceDrop * _step } do { - _muzzleVelocity = _muzzleVelocity + _step; - _solutionInput set [4, _muzzleVelocity]; - private _result = _solutionInput call FUNC(calculate_solution); - _referenceDrop = (_result select 0); - }; -} forEach [1, -0.1]; - -GVAR(truingDropMuzzleVelocity) = _muzzleVelocity; diff --git a/addons/atragmx/functions/fnc_update_atmo_env_data.sqf b/addons/atragmx/functions/fnc_update_atmo_env_data.sqf index e8e805c0ab..7cd34754da 100644 --- a/addons/atragmx/functions/fnc_update_atmo_env_data.sqf +++ b/addons/atragmx/functions/fnc_update_atmo_env_data.sqf @@ -3,10 +3,10 @@ * Updates the atmospheric data fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_atmo_env_data diff --git a/addons/atragmx/functions/fnc_update_atmo_selection.sqf b/addons/atragmx/functions/fnc_update_atmo_selection.sqf index cd808326f8..18036178b4 100644 --- a/addons/atragmx/functions/fnc_update_atmo_selection.sqf +++ b/addons/atragmx/functions/fnc_update_atmo_selection.sqf @@ -3,10 +3,10 @@ * Updates the atmospheric data input method * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_atmo_selection diff --git a/addons/atragmx/functions/fnc_update_atmosphere.sqf b/addons/atragmx/functions/fnc_update_atmosphere.sqf index d54daed532..be7565bda7 100644 --- a/addons/atragmx/functions/fnc_update_atmosphere.sqf +++ b/addons/atragmx/functions/fnc_update_atmosphere.sqf @@ -3,10 +3,10 @@ * Updates all atmosphere column input fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_atmosphere diff --git a/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf deleted file mode 100644 index 5095ee0d96..0000000000 --- a/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Author: Ruthberg - * Updates the c1 ballistic coefficient data fields - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_update_c1_ballistic_coefficient_data - * - * Public: No - */ -#include "script_component.hpp" - -// 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]; -} else { - {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]; diff --git a/addons/atragmx/functions/fnc_update_gun.sqf b/addons/atragmx/functions/fnc_update_gun.sqf index ff7de54a1c..aa1f8c44bf 100644 --- a/addons/atragmx/functions/fnc_update_gun.sqf +++ b/addons/atragmx/functions/fnc_update_gun.sqf @@ -3,10 +3,10 @@ * Updates all gun column input fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_gun diff --git a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf index 7d29252b28..6332506006 100644 --- a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf +++ b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf @@ -3,10 +3,10 @@ * Updates the gun ammo data fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_gun_ammo_data @@ -68,7 +68,7 @@ if (GVAR(currentUnit) == 2) then { ctrlSetText [12000, "Bore (inches)"]; ctrlSetText [12001, "Bullet Weight (grains)"]; ctrlSetText [12002, "Bullet Diam (inches)"]; - ctrlSetText [12004, "Rifle Twist (in/trn)"]; + ctrlSetText [12004, "Rifle Twist (inches/trn)"]; ctrlSetText [12005, "Muzzle Velocity (feet/sec)"]; }; diff --git a/addons/atragmx/functions/fnc_update_inclination_angle.sqf b/addons/atragmx/functions/fnc_update_inclination_angle.sqf index 223a7ae4d4..ea5599bf2d 100644 --- a/addons/atragmx/functions/fnc_update_inclination_angle.sqf +++ b/addons/atragmx/functions/fnc_update_inclination_angle.sqf @@ -6,7 +6,7 @@ * Reference input field ID * * Return Value: - * None + * Nothing * * Example: * 0 call ace_atragmx_fnc_update_inclination_angle diff --git a/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf deleted file mode 100644 index 466d83cc4c..0000000000 --- a/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Author: Ruthberg - * Updates the muzzle velocity data fields - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_update_muzzle_velocity_data - * - * Public: No - */ -#include "script_component.hpp" - -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]; - // Muzzle velocities - {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]; - // Muzzle velocities - {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 5656a45fe5..e8c910ca74 100644 --- a/addons/atragmx/functions/fnc_update_range_card.sqf +++ b/addons/atragmx/functions/fnc_update_range_card.sqf @@ -3,10 +3,10 @@ * Updates the range card listbox content * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_range_card diff --git a/addons/atragmx/functions/fnc_update_relative_click_memory.sqf b/addons/atragmx/functions/fnc_update_relative_click_memory.sqf index fe09d46cf7..1dc534ce4b 100644 --- a/addons/atragmx/functions/fnc_update_relative_click_memory.sqf +++ b/addons/atragmx/functions/fnc_update_relative_click_memory.sqf @@ -3,10 +3,10 @@ * Updates the relative click memory * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_relative_click_memory diff --git a/addons/atragmx/functions/fnc_update_result.sqf b/addons/atragmx/functions/fnc_update_result.sqf index 98718e6955..2b6ca29e23 100644 --- a/addons/atragmx/functions/fnc_update_result.sqf +++ b/addons/atragmx/functions/fnc_update_result.sqf @@ -3,10 +3,10 @@ * Updates the result input and output fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_result @@ -15,28 +15,17 @@ */ #include "script_component.hpp" -private ["_elevationAbs", "_elevationRel", "_elevationCur", "_windageAbs", "_windageRel", "_windageCur", "_wind2", "_lead", "_clickSize", "_clickNumber", "_clickInterval"]; +private ["_elevationAbs", "_elevationRel", "_elevationCur", "_windageAbs", "_wind2", "_windageRel", "_windageCur", "_lead", "_clickSize", "_clickNumber", "_clickInterval"]; _elevationAbs = GVAR(elevationOutput) select GVAR(currentTarget); -_elevationRel = 0; -_elevationCur = 0; _windageAbs = GVAR(windage1Output) select GVAR(currentTarget); -_windageRel = 0; -_windageCur = 0; _wind2 = GVAR(windage2Output) select GVAR(currentTarget); -if (GVAR(showCoriolis)) then { - _elevationRel = GVAR(verticalCoriolisOutput) select GVAR(currentTarget); - _windageRel = GVAR(horizontalCoriolisOutput) select GVAR(currentTarget); +_elevationCur = GVAR(workingMemory) select 10; +_windageCur = GVAR(workingMemory) select 11; - _windageCur = GVAR(spinDriftOutput) select GVAR(currentTarget); -} else { - _elevationCur = GVAR(workingMemory) select 10; - _windageCur = GVAR(workingMemory) select 11; - - _elevationRel = _elevationAbs - _elevationCur; - _windageRel = _windageAbs - _windageCur; -}; +_elevationRel = _elevationAbs - _elevationCur; +_windageRel = _windageAbs - _windageCur; _lead = GVAR(leadOutput) select GVAR(currentTarget); diff --git a/addons/atragmx/functions/fnc_update_scope_unit.sqf b/addons/atragmx/functions/fnc_update_scope_unit.sqf index b66d0885bb..46db8c40c4 100644 --- a/addons/atragmx/functions/fnc_update_scope_unit.sqf +++ b/addons/atragmx/functions/fnc_update_scope_unit.sqf @@ -3,10 +3,10 @@ * Updates the scope unit fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_scope_unit @@ -26,4 +26,4 @@ if (GVAR(currentScopeUnit) == 3) then { } else { ctrlSetText [5000, GVAR(scopeUnits) select GVAR(currentScopeUnit)]; ctrlShow [2001, false]; -}; +}; \ No newline at end of file diff --git a/addons/atragmx/functions/fnc_update_solution_setup.sqf b/addons/atragmx/functions/fnc_update_solution_setup.sqf index 8850c937a5..204a844c9d 100644 --- a/addons/atragmx/functions/fnc_update_solution_setup.sqf +++ b/addons/atragmx/functions/fnc_update_solution_setup.sqf @@ -3,10 +3,10 @@ * Updates all solution setup input fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_solution_setup diff --git a/addons/atragmx/functions/fnc_update_target.sqf b/addons/atragmx/functions/fnc_update_target.sqf index c457a5cc21..ef2ef1de5c 100644 --- a/addons/atragmx/functions/fnc_update_target.sqf +++ b/addons/atragmx/functions/fnc_update_target.sqf @@ -3,10 +3,10 @@ * Updates all target column input fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_target diff --git a/addons/atragmx/functions/fnc_update_target_data.sqf b/addons/atragmx/functions/fnc_update_target_data.sqf index 3cb6c24c9c..6fa9035a62 100644 --- a/addons/atragmx/functions/fnc_update_target_data.sqf +++ b/addons/atragmx/functions/fnc_update_target_data.sqf @@ -3,10 +3,10 @@ * Updates all target column input fields * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_target diff --git a/addons/atragmx/functions/fnc_update_target_selection.sqf b/addons/atragmx/functions/fnc_update_target_selection.sqf index 7ae6256f33..d9fd6002c9 100644 --- a/addons/atragmx/functions/fnc_update_target_selection.sqf +++ b/addons/atragmx/functions/fnc_update_target_selection.sqf @@ -3,10 +3,10 @@ * Updates all input fields based on the currently selected target * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_target_selection diff --git a/addons/atragmx/functions/fnc_update_truing_drop_data.sqf b/addons/atragmx/functions/fnc_update_truing_drop_data.sqf deleted file mode 100644 index 161e8877e1..0000000000 --- a/addons/atragmx/functions/fnc_update_truing_drop_data.sqf +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Author: Ruthberg - * Updates the truing drop data fields - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_update_truing_drop_data - * - * Public: No - */ -#include "script_component.hpp" - -if (GVAR(currentUnit) == 2) then { - 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))]; -}; - -if (GVAR(truingDropMode) == 0) then { - GVAR(truingDropDropData) set [0, GVAR(truingDropReferenceDropData) select 0]; -} else { - GVAR(truingDropDropData) set [0, GVAR(truingDropReferenceDropData) select 1]; -}; - -private _dropUnit = GVAR(currentScopeUnit); -if (_dropUnit == 3) then { - switch (GVAR(currentScopeClickUnit)) do { - case 0: { _dropUnit = 1; }; - case 1: { _dropUnit = 2; }; - case 2: { _dropUnit = 0; }; - }; -}; - -private _dropData = +GVAR(truingDropDropData); - -switch (_dropUnit) do { - case 0: { - _dropData set [0, (_dropData select 0) / 3.38]; - _dropData set [1, (_dropData select 1) / 3.38]; - _dropData set [2, (_dropData select 2) / 3.38]; - }; - case 2: { - _dropData set [0, (_dropData select 0) * 1.047]; - _dropData set [1, (_dropData select 1) * 1.047]; - _dropData set [2, (_dropData select 2) * 1.047]; - }; -}; - -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))]; - if (GVAR(truingDropMuzzleVelocity) > 0) then { - 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))]; - if (GVAR(truingDropMuzzleVelocity) > 0) then { - 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)]; -if (GVAR(truingDropC1) > 0) then { - ctrlSetText [18017, Str(Round(GVAR(truingDropC1) * 1000) / 1000)]; -}; diff --git a/addons/atragmx/functions/fnc_update_truing_drop_selection.sqf b/addons/atragmx/functions/fnc_update_truing_drop_selection.sqf deleted file mode 100644 index e00876e4a1..0000000000 --- a/addons/atragmx/functions/fnc_update_truing_drop_selection.sqf +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Author: Ruthberg - * Updates the truing drop input method - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_atragmx_fnc_update_truing_drop_selection - * - * Public: No - */ -#include "script_component.hpp" - -#define __dsp (uiNamespace getVariable "ATragMX_Display") - -(__dsp displayCtrl 18009) ctrlEnable true; -(__dsp displayCtrl 18010) ctrlEnable true; - -if (GVAR(truingDropMode) == 0) then { - (__dsp displayCtrl 18009) ctrlEnable false; - { - (__dsp displayCtrl _x) ctrlEnable true; - } forEach [18011, 18013, 18016]; - { - (__dsp displayCtrl _x) ctrlEnable false; - } forEach [18012, 18014, 18017]; - ctrlSetFocus (__dsp displayCtrl 18011); -} else { - (__dsp displayCtrl 18010) ctrlEnable false; - { - (__dsp displayCtrl _x) ctrlEnable true; - } forEach [18012, 18014, 18017]; - { - (__dsp displayCtrl _x) ctrlEnable false; - } forEach [18011, 18013, 18016]; - ctrlSetFocus (__dsp displayCtrl 18012); -}; - -[] call FUNC(update_truing_drop_data); diff --git a/addons/atragmx/functions/fnc_update_unit_selection.sqf b/addons/atragmx/functions/fnc_update_unit_selection.sqf index 2fc5400e27..77d96bfdd6 100644 --- a/addons/atragmx/functions/fnc_update_unit_selection.sqf +++ b/addons/atragmx/functions/fnc_update_unit_selection.sqf @@ -3,10 +3,10 @@ * Updates all input fields based on the currently selected unit * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_unit_selection @@ -27,7 +27,5 @@ [] call FUNC(update_atmo_env_data); [] call FUNC(update_target); [] call FUNC(update_target_data); -[] call FUNC(update_muzzle_velocity_data); -[] call FUNC(update_c1_ballistic_coefficient_data); [] call FUNC(update_result); diff --git a/addons/atragmx/functions/fnc_update_zero_range.sqf b/addons/atragmx/functions/fnc_update_zero_range.sqf index f0f787d7cf..299c321d33 100644 --- a/addons/atragmx/functions/fnc_update_zero_range.sqf +++ b/addons/atragmx/functions/fnc_update_zero_range.sqf @@ -3,10 +3,10 @@ * Updates the scope base angle based on the zero range input * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * call ace_atragmx_fnc_update_zero_range @@ -15,7 +15,8 @@ */ #include "script_component.hpp" -[] call FUNC(parse_input); +private ["_scopeBaseAngle"]; +_scopeBaseAngle = (GVAR(workingMemory) select 3); private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel"]; _bulletMass = GVAR(workingMemory) select 12; @@ -27,25 +28,23 @@ _dragModel = GVAR(workingMemory) select 16; _atmosphereModel = GVAR(workingMemory) select 17; private ["_zeroRange"]; -_zeroRange = GVAR(workingMemory) select 2; +_zeroRange = Round(parseNumber(ctrlText 120060)); +if (GVAR(currentUnit) == 1) then { + _zeroRange = _zeroRange / 1.0936133; +}; +if (_zeroRange < 10) exitWith { + GVAR(workingMemory) set [2, _zeroRange]; + GVAR(workingMemory) set [3, 0]; +}; private ["_altitude", "_temperature", "_barometricPressure", "_relativeHumidity"]; _altitude = GVAR(altitude); _temperature = GVAR(temperature); _barometricPressure = GVAR(barometricPressure); _relativeHumidity = GVAR(relativeHumidity); -if (!GVAR(atmosphereModeTBH)) then { - _barometricPressure = 1013.25 * (1 - (0.0065 * _altitude) / (273.15 + _temperature + 0.0065 * _altitude)) ^ 5.255754495; - _relativeHumidity = 50; -}; -private _scopeBaseAngle = if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) then { - private _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngleVanilla:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight]; - (parseNumber _zeroAngle) -} else { - private _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngle:%1:%2:%3:%4:%5:%6:%7:%8:%9", _zeroRange, _muzzleVelocity, _boreHeight, _temperature, _barometricPressure, _relativeHumidity, _bc, _dragModel, _atmosphereModel]; - (parseNumber _zeroAngle) -}; +private ["_result"]; +_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, [0, 0], 0, 0, 0, _zeroRange, _bc, _dragModel, _atmosphereModel, false, 1.5, 0, 0, 0] call FUNC(calculate_solution); GVAR(workingMemory) set [2, _zeroRange]; -GVAR(workingMemory) set [3, _scopeBaseAngle]; +GVAR(workingMemory) set [3, _scopeBaseAngle + (_result select 0) / 60]; diff --git a/addons/atragmx/script_component.hpp b/addons/atragmx/script_component.hpp index 8ebc8b445f..d5da1ee973 100644 --- a/addons/atragmx/script_component.hpp +++ b/addons/atragmx/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_ATRAGMX @@ -16,4 +17,4 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define ATRAGMX_PROFILE_NAMESPACE_VERSION 2.0 +#define ATRAGMX_PROFILE_NAMESPACE_VERSION 1.7 diff --git a/addons/atragmx/stringtable.xml b/addons/atragmx/stringtable.xml index 4c11ea8add..c4f358f5bc 100644 --- a/addons/atragmx/stringtable.xml +++ b/addons/atragmx/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ ATragMX ATragMX ATragMX - ATragMX - ATragMX - ATragMX - ATragMX Open ATragMX @@ -28,10 +24,6 @@ ATragMX elővétele Otevřít ATragMX Abrir ATragMX - ATragMX を開く - ATragMX 열기 - 開啟ATragMX - 开启ATragMX Rugged PDA with ATragMX @@ -44,10 +36,6 @@ Megerősített PDA, ATragMX-el PDA s ATragMX PDA Robusto com ATragMX - ATragMX 付きの携行型端末 - ATragMX가 달린 PDA - 裝有軍用PDA的ATragMX - 装有军用PDA的ATragMX Open ATragMX @@ -60,10 +48,6 @@ ATragMX elővétele Otevřít ATragMX Abrir ATragMX - ATragMX を開く - ATragMX 열기 - 開啟ATragMX - 开启ATragMX - + \ No newline at end of file diff --git a/addons/attach/CfgVehicles.hpp b/addons/attach/CfgVehicles.hpp index 5fa75105e7..1e0c0f3e71 100644 --- a/addons/attach/CfgVehicles.hpp +++ b/addons/attach/CfgVehicles.hpp @@ -10,6 +10,7 @@ showDisabled = 0; \ priority = 0; \ icon = QPATHTOF(UI\attach_ca.paa); \ + distance = 4.5; \ }; \ class GVAR(DetachVehicle) { \ displayName = CSTRING(Detach); \ @@ -19,6 +20,7 @@ showDisabled = 0; \ priority = 0.1; \ icon = QPATHTOF(UI\detach_ca.paa); \ + distance = 4.5; \ }; \ }; \ }; diff --git a/addons/attach/XEH_preInit.sqf b/addons/attach/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/attach/XEH_preInit.sqf +++ b/addons/attach/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/attach/config.cpp b/addons/attach/config.cpp index f862a008a2..cadc84705b 100644 --- a/addons/attach/config.cpp +++ b/addons/attach/config.cpp @@ -19,3 +19,7 @@ class CfgPatches { #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" #include "GUI_VirtualAmmo.hpp" + +class ACE_newEvents { + interactMenuOpened = "ace_interactMenuOpened"; +}; \ No newline at end of file diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 3bbf085ca4..366a43d900 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -8,7 +8,7 @@ * 2: Array containing a string of the attachable item * * Return Value: - * None + * Nothing * * Example: * [bob, bob, ["light"]] call ace_attach_fnc_attach; @@ -57,6 +57,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment _actionID = _unit addAction [format ["%1", localize LSTRING(CancelAction)], {GVAR(placeAction) = PLACE_CANCEL}]; //Display to show virtual object: + private []; _model = getText (configFile >> "CfgAmmo" >> _itemVehClass >> "model"); if (_model == "") then { _model = getText (configFile >> "CfgVehicles" >> _itemVehClass >> "model"); diff --git a/addons/attach/functions/fnc_canAttach.sqf b/addons/attach/functions/fnc_canAttach.sqf index 36264ed628..37d92e8908 100644 --- a/addons/attach/functions/fnc_canAttach.sqf +++ b/addons/attach/functions/fnc_canAttach.sqf @@ -27,7 +27,7 @@ _attachLimit = [6, 1] select (_player == _attachToVehicle); _attachedObjects = _attachToVehicle getVariable [QGVAR(attached), []]; ((_player == _attachToVehicle) || {canStand _player}) && -{(_attachToVehicle distance _player) < 10} && -{alive _attachToVehicle} && -{(count _attachedObjects) < _attachLimit} && +{(_attachToVehicle distance _player) < 7} && +{alive _attachToVehicle} && +{(count _attachedObjects) < _attachLimit} && {_itemClassname in ((itemsWithMagazines _player) + [""])}; diff --git a/addons/attach/functions/fnc_canDetach.sqf b/addons/attach/functions/fnc_canDetach.sqf index a9b6f2deff..d9796a5a5c 100644 --- a/addons/attach/functions/fnc_canDetach.sqf +++ b/addons/attach/functions/fnc_canDetach.sqf @@ -21,7 +21,7 @@ TRACE_2("params",_attachToVehicle,_unit); if ((vehicle _unit) != _unit) exitWith {false}; -private _attachedList = _attachToVehicle getVariable [QGVAR(attached), []]; +_attachedList = _attachToVehicle getVariable [QGVAR(attached), []]; if ((count _attachedList) == 0) exitWith {false}; private ["_inRange"]; diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index 945e399b74..4ff4f9fbd6 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -7,7 +7,7 @@ * 1: unit doing the detaching (player) * * Return Value: - * None + * Nothing * * Example: * [car, bob] call ace_attach_fnc_detach @@ -69,7 +69,7 @@ if (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then detach _x; deleteVehicle _x; } forEach (attachedObjects _attachedObject); - + // Delete attached item detach _attachedObject; deleteVehicle _attachedObject; diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index 895f91a7b6..922136107e 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -16,7 +16,7 @@ * 5: Starting Pos of dummy item * * Return Value: - * None + * Nothing * * Example: * No diff --git a/addons/attach/script_component.hpp b/addons/attach/script_component.hpp index b4fa09f5dd..aa6165ae8e 100644 --- a/addons/attach/script_component.hpp +++ b/addons/attach/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_ATTACH diff --git a/addons/attach/stringtable.xml b/addons/attach/stringtable.xml index 39455dedcf..1ab8d61dc5 100644 --- a/addons/attach/stringtable.xml +++ b/addons/attach/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Attacca l'oggetto Tárgy hozzácsatolása Прикрепить предмет - アイテムを取り付ける - 물건 부착 - 附掛裝備>> - 附挂装备>> Attach @@ -28,10 +24,6 @@ Attacca Hozzácsatolás Прикрепить - 取り付ける - 부착 - 附掛 - 附挂 Detach item @@ -44,10 +36,6 @@ Stacca l'oggetto Tárgy lecsatolása Отсоединить - アイテムを外す - 분리 - 取下裝備 - 取下装备 IR Strobe Attached @@ -60,10 +48,6 @@ Strobo IR attaccata Infravörös jeladó hozzácsatolva ИК-маяк прикреплён - 赤外線ストロボを取り付ける - 적외선 스트로브 부착됨 - 已附掛紅外線頻閃器 - 已附挂红外线频闪器 IR Strobe Detached @@ -76,10 +60,6 @@ Strobo IR staccata Infravörös jeladó lecsatolva ИК-маяк отсоединён - 赤外線ストロボを外す - 적외선 스트로브 분리됨 - 已取下紅外線頻閃器 - 已取下红外线频闪器 IR Grenade Attached @@ -92,10 +72,6 @@ Granata IR attaccata Infravörös gránát hozzácsatolva ИК-граната прикреплена - 赤外線グレネードを取り付ける - 적외선 수류탄 부착됨 - 已附掛紅外線手榴彈 - 已附挂红外线手榴弹 IR Grenade Detached @@ -108,10 +84,6 @@ Granata IR staccata Infravörös gránát lecsatolva ИК-граната отсоединена - 赤外線グレネードを外す - 적외선 수류탄 분리됨 - 已取下紅外線手榴彈 - 已取下红外线手榴弹 Chemlight Attached @@ -124,10 +96,6 @@ Chemlight attaccata Chemlight hozzácsatolva Химсвет прикреплён - ケミライトを取り付け - 켐라이트 부착됨 - 已附掛螢光棒 - 已附挂萤光棒 Chemlight Detached @@ -140,10 +108,6 @@ Chemlight staccata Chemlight hozzácsatolva Химсвет отсоединён - ケミライトを外す - 켐라이트 분리됨 - 已取下螢光棒 - 已取下萤光棒 No inventory space @@ -156,10 +120,6 @@ Non hai più spazio Nincs több hely В инвентаре нет места - インベントリに空きがない - 넣을 공간이 없음 - 無可用空間 - 无可用空间 IR Strobe @@ -172,10 +132,6 @@ Strobo IR Infravörös jeladó ИК-маяк - 赤外線ストロボ - 적외선 스트로브 - 紅外線頻閃器 - 红外线频闪器 IR Strobe allows you to signal your position through a pulsating beacon only visible with NVGs. @@ -188,10 +144,6 @@ La Strobo IR è una luce stroboscopica che ti permette di segnalare la tua posizione grazie all'emissione di impulsi ad infrarossi visibili solo con i visori notturni. Az infravörös jeladóval megjelölheted a helyzetedet úgy, hogy annak pulzáló fénye csak éjjellátó készülékkel látható. ИК-маяк позволяет сигнализировать о своём местоположении через пульсирующий свет, видимый только через ПНВ. - 赤外線ストロボはあなたの位置を知らせますが、夜間暗視装置を介してでしか見れません。 - 적외선 스트로브는 자신의 위치를 반짝이면서 표시합니다. 이는 야간투시경으로 밖에 보지 못합니다. - 紅外線閃頻器,藉由紅外線閃頻信號來辨識你的位置,僅能使用夜視系統來辨識紅外線信號 - 红外线闪频器,藉由红外线闪频信号来辨识你的位置,仅能使用夜视系统来辨识红外线信号 Place @@ -204,10 +156,6 @@ Posiziona Elhelyez Установить - 置く - 두기 - 放置 - 放置 Cancel @@ -220,10 +168,6 @@ Annulla Mégse Отмена - やめる - 취소 - 取消 - 取消 Attach Failed @@ -236,10 +180,6 @@ Przyczepianie nie powiodło się Hozzácsatolás sikertelen Non si attacca - 取り付けに失敗した - 부착 실패 - 附掛失敗 - 附挂失败 %1<br/>Attached @@ -252,10 +192,6 @@ %1<br/>attaccata %1<br/>hozzácsatolva %1<br/>присоединен(-а) - %1<br/>を取り付けた - %1<br/>부착됨 - %1<br/>已附掛 - %1<br/>已附挂 %1<br/>Detached @@ -268,10 +204,6 @@ %1<br/>staccata %1<br/>lecsatolva %1<br/>отсоединен(-а) - %1<br/>を外した - %1<br/>분리됨 - %1<br/>已取下 - %1<br/>已取下 diff --git a/addons/backpacks/XEH_preInit.sqf b/addons/backpacks/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/backpacks/XEH_preInit.sqf +++ b/addons/backpacks/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/backpacks/config.cpp b/addons/backpacks/config.cpp index 9b63e4df9f..80439533e2 100644 --- a/addons/backpacks/config.cpp +++ b/addons/backpacks/config.cpp @@ -15,3 +15,7 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" + +class ACE_newEvents { + backpackOpened = "ace_backpackOpened"; +}; diff --git a/addons/backpacks/functions/fnc_backpackOpened.sqf b/addons/backpacks/functions/fnc_backpackOpened.sqf index 0b94b391f0..8b4e05c20e 100644 --- a/addons/backpacks/functions/fnc_backpackOpened.sqf +++ b/addons/backpacks/functions/fnc_backpackOpened.sqf @@ -3,16 +3,13 @@ * Someone opened your backpack. Play sound and camshake. Execute locally. * * Arguments: - * 0: Who accessed your inventory? - * 1: Unit that wields the backpack - * 2: The backpack object + * 0: Who accessed your inventory? (Object) + * 1: Unit that wields the backpack (Object) + * 2: The backpack object (Object) * * Return Value: * None * - * Example: - * [bob, kevin, backpack] call ace_backpacks_fnc_backpackOpened - * * Public: No */ #include "script_component.hpp" diff --git a/addons/backpacks/functions/fnc_isBackpack.sqf b/addons/backpacks/functions/fnc_isBackpack.sqf index 80550290f2..aa12b85ad9 100644 --- a/addons/backpacks/functions/fnc_isBackpack.sqf +++ b/addons/backpacks/functions/fnc_isBackpack.sqf @@ -8,9 +8,6 @@ * Return Value: * Boolean * - * Example: - * [bob] call ace_backpacks_fnc_isBackpack - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/backpacks/functions/fnc_onOpenInventory.sqf b/addons/backpacks/functions/fnc_onOpenInventory.sqf index b229bbb111..0857f6b7ab 100644 --- a/addons/backpacks/functions/fnc_onOpenInventory.sqf +++ b/addons/backpacks/functions/fnc_onOpenInventory.sqf @@ -7,10 +7,7 @@ * 1: Backpack * * Return Value: - * false. Always open the inventory dialog. - * - * Example: - * [bob, backpack] call ace_backpacks_fnc_onOpenInventory + * false. Always open the inventory dialog. (Bool) * * Public: No */ diff --git a/addons/backpacks/script_component.hpp b/addons/backpacks/script_component.hpp index 1720d55d64..6cfb663dd2 100644 --- a/addons/backpacks/script_component.hpp +++ b/addons/backpacks/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_BACKPACKS diff --git a/addons/ballistics/CfgAmmo.hpp b/addons/ballistics/CfgAmmo.hpp index 795a84087d..0819f8aa4b 100644 --- a/addons/ballistics/CfgAmmo.hpp +++ b/addons/ballistics/CfgAmmo.hpp @@ -8,6 +8,8 @@ class CfgAmmo { class B_556x45_Ball : BulletBase { airFriction=-0.00126466; + hit=8; + typicalSpeed=750; tracerScale = 1; tracerStartTime=0.073; // M856 tracer burns out to 800m tracerEndTime=1.57123; // Time in seconds calculated with ballistics calculator @@ -24,6 +26,10 @@ class CfgAmmo { }; class ACE_556x45_Ball_Mk262 : B_556x45_Ball { airFriction=-0.00109563; + caliber=0.8; + deflecting=18; + hit=11; + typicalSpeed=836; ACE_caliber=5.69; ACE_bulletLength=23.012; ACE_bulletMass=4.9896; @@ -37,6 +43,10 @@ class CfgAmmo { }; class ACE_556x45_Ball_Mk318 : B_556x45_Ball { airFriction=-0.00123318; + caliber=0.8; + deflecting=18; + hit=9; + typicalSpeed=886; ACE_caliber=5.69; ACE_bulletLength=23.012; ACE_bulletMass=4.0176; @@ -51,6 +61,9 @@ class CfgAmmo { class ACE_556x45_Ball_M995_AP : B_556x45_Ball { airFriction=-0.00123272; caliber=1.6; + deflecting=18; + hit=6; + typicalSpeed=869; ACE_caliber=5.69; ACE_bulletLength=23.012; ACE_bulletMass=4.5359237; @@ -66,8 +79,12 @@ class CfgAmmo { class ACE_B_556x45_Ball_Tracer_Dim: B_556x45_Ball_Tracer_Red { nvgOnly = 1; }; - class B_545x39_Ball_F : BulletBase { - airFriction=-0.00116278; + class ACE_545x39_Ball_7N6M : B_556x45_Ball { + airFriction=-0.00114744; + caliber=0.6; + deflecting=18; + hit=7; + typicalSpeed=880; ACE_caliber=5.588; ACE_bulletLength=21.59; ACE_bulletMass=3.42792; @@ -76,27 +93,35 @@ class CfgAmmo { ACE_velocityBoundaries[]={}; ACE_standardAtmosphere="ICAO"; ACE_dragModel=7; - ACE_muzzleVelocities[]={735, 883, 892}; - ACE_barrelLengths[]={206.5, 414.02, 508.0}; + ACE_muzzleVelocities[]={780, 880, 920}; + ACE_barrelLengths[]={254.0, 414.02, 508.0}; + }; + class B_556x45_Ball_Tracer_Green; + class ACE_545x39_Ball_7T3M : B_556x45_Ball_Tracer_Green { + airFriction=-0.00114744; + caliber=0.6; + deflecting=18; + hit=7; + typicalSpeed=883; + tracerStartTime=0.073; // 7T3M tracer burns out to 850m + tracerEndTime=1.70236; // Time in seconds calculated with ballistics calculator + ACE_caliber=5.588; + ACE_bulletLength=21.59; + ACE_bulletMass=3.22704; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.168}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={785, 883, 925}; + ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; class B_56x15_dual: BulletBase { tracerScale = 0.5; }; - class B_580x42_Ball_F: BulletBase { - airFriction=-0.00117956; - ACE_caliber=5.9944; - ACE_bulletLength=24.2; - ACE_bulletMass=4.15; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.156}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ICAO"; - ACE_dragModel=7; - ACE_muzzleVelocities[]={790, 930, 950}; - ACE_barrelLengths[]={369.0, 463.0, 600.0}; - }; class B_65x39_Caseless : BulletBase { airFriction=-0.00075308; + typicalSpeed=800; tracerScale = 1.1; //1.0; ACE_caliber=6.706; ACE_bulletLength=32.893; @@ -119,6 +144,7 @@ class CfgAmmo { }; class ACE_65x47_Ball_Scenar: B_65x39_Caseless { airFriction=-0.00067037; + typicalSpeed=820 ; caliber=0.9; ACE_caliber=6.706; ACE_bulletLength=34.646; @@ -133,6 +159,7 @@ class CfgAmmo { }; class ACE_65_Creedmor_Ball: B_65x39_Caseless { airFriction=-0.00060887; + typicalSpeed=860 ; caliber=1.1; ACE_caliber=6.706; ACE_bulletLength=36.22; @@ -151,6 +178,8 @@ class CfgAmmo { }; class B_762x51_Ball : BulletBase { airFriction=-0.00100957; + typicalSpeed=833; + hit=9; tracerScale = 1.2; //0.6; tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m tracerEndTime=2.15957; // Time in seconds calculated with ballistics calculator @@ -249,6 +278,54 @@ class CfgAmmo { ACE_muzzleVelocities[]={305, 325, 335, 340}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; + class ACE_30_06_M1_Ball : B_762x51_Ball { + airFriction=-0.00080900; + typicalSpeed=800; + caliber=2.0; + hit=10; + ACE_caliber=7.823; + ACE_bulletLength=30.734; + ACE_bulletMass=11.2752; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.494}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={700, 785, 800, 830, 840}; + ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4}; + }; + class ACE_7_Remington_Magnum_Ball : B_762x51_Ball { + airFriction=-0.00056738; + typicalSpeed=820; + caliber=2.1; + hit=8; + ACE_caliber=7.214; + ACE_bulletLength=38.837; + ACE_bulletMass=11.664; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.345}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={720, 780, 812, 822, 830}; + ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4}; + }; + class ACE_243_Winchester_Ball : B_762x51_Ball { + airFriction=-0.00067875; + typicalSpeed=915; + caliber=2.3; + hit=6; + ACE_caliber=6.172; + ACE_bulletLength=32.563; + ACE_bulletMass=11.664; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.278}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={830, 875, 900, 915, 920}; + ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4}; + }; class ACE_762x67_Ball_Mk248_Mod_0 : B_762x51_Ball { airFriction=-0.00070530; caliber=1.8; @@ -299,6 +376,23 @@ class CfgAmmo { }; class B_762x54_Ball: B_762x51_Ball { airFriction=-0.00100023; + typicalSpeed=820; + ACE_caliber=7.925; + ACE_bulletLength=28.956; + ACE_bulletMass=9.8496; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.4}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={700, 800, 820, 833}; + ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; + }; + class ACE_762x54_Ball_7N14 : B_762x51_Ball { + airFriction=-0.00100023; + caliber=1.5; + hit=15; + typicalSpeed=820; ACE_caliber=7.925; ACE_bulletLength=28.956; ACE_bulletMass=9.8496; @@ -313,6 +407,8 @@ class CfgAmmo { class B_762x54_Tracer_Green; class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green { airFriction=-0.00103989; + caliber=1.5; + hit=15; typicalSpeed=800; tracerStartTime=0.073; // Based on the 7T2 which burns three seconds tracerEndTime=3; @@ -327,8 +423,27 @@ class CfgAmmo { ACE_muzzleVelocities[]={680, 750, 798, 800}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class B_762x39_Ball_F : BulletBase { + class ACE_762x35_Ball : B_762x51_Ball { + airFriction=-0.00128942; + caliber=1.5; + hit=11; + typicalSpeed=790; + ACE_caliber=7.823; + ACE_bulletLength=29.286; + ACE_bulletMass=8.1; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.349, 0.338, 0.330, 0.310}; + ACE_velocityBoundaries[]={792, 610, 488}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={620, 655, 675}; + ACE_barrelLengths[]={228.6, 406.4, 508.0}; + }; + class ACE_762x39_Ball : B_762x51_Ball { airFriction=-0.00151621; + hit=12; + caliber=1.5; + typicalSpeed=716; ACE_caliber=7.823; ACE_bulletLength=28.956; ACE_bulletMass=7.9704; @@ -340,9 +455,29 @@ class CfgAmmo { ACE_muzzleVelocities[]={650, 716, 750}; ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; + class ACE_762x39_Ball_57N231P : B_762x54_Tracer_Green { + airFriction=-0.00151621; + hit=12; + caliber=1.5; + typicalSpeed=716; + tracerStartTime = 0.073; //57N231P tracer burns out to 800m + tracerEndTime = 2.082; //Time in seconds calculated with ballistics calculator + ACE_caliber=7.823; + ACE_bulletLength=28.956; + ACE_bulletMass=7.5816; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.275}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={650, 716, 750}; + ACE_barrelLengths[]={254.0, 414.02, 508.0}; + }; class B_9x21_Ball : BulletBase { - airFriction=-0.00208292; + airFriction=-0.00226847; + typicalSpeed=390; tracerScale = 0.5; + hit=6; ACE_caliber=9.042; ACE_bulletLength=15.494; ACE_bulletMass=7.452; @@ -351,14 +486,31 @@ class CfgAmmo { ACE_velocityBoundaries[]={}; ACE_standardAtmosphere="ICAO"; ACE_dragModel=1; - ACE_muzzleVelocities[]={380, 390, 420, 435}; - ACE_barrelLengths[]={93.5, 101.6, 127.0, 228.6}; + ACE_muzzleVelocities[]={440, 460, 480}; + ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; class B_9x21_Ball_Tracer_Green: B_9x21_Ball { tracerScale = 0.5; }; + class ACE_9x18_Ball_57N181S : B_9x21_Ball { + hit=5; + airFriction=-0.00190333; + typicalSpeed=298; + ACE_caliber=9.271; + ACE_bulletLength=15.494; + ACE_bulletMass=6.00048; + ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; + ACE_ballisticCoefficients[]={0.125}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={298, 330, 350}; + ACE_barrelLengths[]={96.52, 127.0, 228.6}; + }; class ACE_9x19_Ball : B_9x21_Ball { - airFriction=-0.0019835; + airFriction=-0.0018577; + typicalSpeed=370; + hit=6; ACE_caliber=9.017; ACE_bulletLength=15.494; ACE_bulletMass=8.0352; @@ -370,8 +522,54 @@ class CfgAmmo { ACE_muzzleVelocities[]={340, 370, 400}; ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; + class ACE_10x25_Ball : B_9x21_Ball { + airFriction=-0.00181928; + typicalSpeed=425; + hit=7; + ACE_caliber=12.7; + ACE_bulletLength=19.406; + ACE_bulletMass=10.692; + ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; + ACE_ballisticCoefficients[]={0.189}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={360, 400, 430}; + ACE_barrelLengths[]={101.6, 117.094, 228.6}; + }; + class ACE_765x17_Ball: B_9x21_Ball { + airFriction=-0.00163356; + typicalSpeed=282; + hit=7; + ACE_caliber=7.938; + ACE_bulletLength=15.494; + ACE_bulletMass=4.212; + ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; + ACE_ballisticCoefficients[]={0.118}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={282, 300, 320}; + ACE_barrelLengths[]={101.6, 127.0, 228.6}; + }; + class ACE_303_Ball : ACE_762x51_Ball_M118LR { + airFriction=-0.0008349; + typicalSpeed=761; + caliber=2.0; + ACE_caliber=7.899; + ACE_bulletLength=31.166; + ACE_bulletMass=11.2752; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.499, 0.493, 0.48}; + ACE_velocityBoundaries[]={671, 549}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={748, 761, 765}; + ACE_barrelLengths[]={508.0, 609.6, 660.4}; + }; class B_93x64_Ball : BulletBase { airFriction=-0.00108571; + typicalSpeed=880; ACE_caliber=9.296; ACE_bulletLength=34.29; ACE_bulletMass=14.904; @@ -385,40 +583,39 @@ class CfgAmmo { }; class B_408_Ball : BulletBase { timeToLive=10; - airFriction=-0.00044958; - tracerScale = 1.3; + airFriction=-0.00038944; + typicalSpeed=910; + tracerScale = 1.3; //1.2; ACE_caliber=10.363; - ACE_bulletLength=55.1942; - ACE_bulletMass=27.1507; // 419 gr + ACE_bulletLength=54.0; + ACE_bulletMass=26.568; ACE_transonicStabilityCoef=1; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.434}; + ACE_ballisticCoefficients[]={0.97}; ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ICAO"; - ACE_dragModel=7; - ACE_muzzleVelocities[]={867}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={910}; ACE_barrelLengths[]={736.6}; }; - class ACE_408_Ball : BulletBase { + class ACE_106x83mm_Ball : B_408_Ball { timeToLive=10; - airFriction=-0.00063655; - typicalSpeed=1067; - tracerScale = 1.3; - ACE_caliber=10.363; - ACE_bulletLength=41.4528; - ACE_bulletMass=19.7637; // 305 gr - ACE_transonicStabilityCoef=1; + airFriction=-0.00052047; + ACE_caliber=10.566; + ACE_bulletLength=53.061; + ACE_bulletMass=25.7904; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.279}; + ACE_ballisticCoefficients[]={0.72}; ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ICAO"; - ACE_dragModel=7; - ACE_muzzleVelocities[]={1067}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={960}; ACE_barrelLengths[]={736.6}; }; class B_338_Ball : BulletBase { timeToLive=10; airFriction=-0.00059133; + typicalSpeed=915; ACE_caliber=8.585; ACE_bulletLength=39.573; ACE_bulletMass=16.2; @@ -432,6 +629,7 @@ class CfgAmmo { }; class B_338_NM_Ball : BulletBase { airFriction=-0.00052201; + typicalSpeed=820; ACE_caliber=8.585; ACE_bulletLength=43.18; ACE_bulletMass=19.44; @@ -451,7 +649,7 @@ class CfgAmmo { ACE_bulletLength=43.18; ACE_bulletMass=19.44; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.368}; + ACE_ballisticCoefficients[]={0.381}; ACE_velocityBoundaries[]={}; ACE_standardAtmosphere="ICAO"; ACE_dragModel=7; @@ -467,18 +665,19 @@ class CfgAmmo { ACE_bulletLength=38.989; ACE_bulletMass=16.3941242; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.290}; + ACE_ballisticCoefficients[]={0.560}; ACE_velocityBoundaries[]={}; ACE_standardAtmosphere="ICAO"; - ACE_dragModel=7; - ACE_muzzleVelocities[]={880, 895, 900}; - ACE_barrelLengths[]={508.0, 685.8, 711.2}; + ACE_dragModel=1; + ACE_muzzleVelocities[]={880, 915, 925}; + ACE_barrelLengths[]={508.0, 660.4, 711.2}; }; class B_127x33_Ball: BulletBase { tracerScale = 1.3; //1.2; }; class B_127x54_Ball : BulletBase { airFriction=-0.00019268; + typicalSpeed=300; tracerScale = 1.3;// ACE_caliber=12.954; ACE_bulletLength=64.516; @@ -494,6 +693,7 @@ class CfgAmmo { class B_127x99_Ball : BulletBase { timeToLive=10; airFriction=-0.00057503; + typicalSpeed=900; tracerScale = 1.3; //1.2; ACE_caliber=12.954; ACE_bulletLength=58.674; @@ -506,9 +706,10 @@ class CfgAmmo { ACE_muzzleVelocities[]={900}; ACE_barrelLengths[]={736.6}; }; - class ACE_127x99_API : B_127x99_Ball { + class ACE_127x99_API : BulletBase { timeToLive=10; airFriction=-0.00057503; + typicalSpeed=900; tracerScale = 1.3;// hit=25; caliber=4.0; @@ -526,6 +727,7 @@ class CfgAmmo { class ACE_127x99_Ball_AMAX : B_127x99_Ball { timeToLive=10; airFriction=-0.00036645; + typicalSpeed=860; caliber=3.0; ACE_caliber=12.954; ACE_bulletLength=64.516; @@ -541,6 +743,7 @@ class CfgAmmo { class B_127x108_Ball : BulletBase { timeToLive=10; airFriction=-0.00063800; + typicalSpeed=820; tracerScale = 1.3; //1.5; ACE_caliber=12.979; ACE_bulletLength=64.008; @@ -555,6 +758,7 @@ class CfgAmmo { }; class B_45ACP_Ball : BulletBase { airFriction=-0.00081221; + typicalSpeed=250; tracerScale = 0.6; ACE_caliber=11.481; ACE_bulletLength=17.272; @@ -567,19 +771,6 @@ class CfgAmmo { ACE_muzzleVelocities[]={230, 250, 285}; ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; - class B_50BW_Ball_F : BulletBase { - airFriction=-0.00202645; - ACE_caliber=12.7; - ACE_bulletLength=24.13; - ACE_bulletMass=21.7076; - ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; - ACE_ballisticCoefficients[]={0.21}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={510, 550, 596}; - ACE_barrelLengths[]={304.8, 406.4, 609.6}; - }; class B_19mm_HE: BulletBase { tracerScale = 1; }; diff --git a/addons/ballistics/CfgMagazines.hpp b/addons/ballistics/CfgMagazines.hpp index 072fedde3c..931a6c2309 100644 --- a/addons/ballistics/CfgMagazines.hpp +++ b/addons/ballistics/CfgMagazines.hpp @@ -2,15 +2,6 @@ class CfgMagazines { class CA_Magazine; - class 30Rnd_580x42_Mag_F: CA_Magazine { - initSpeed = 930; - }; - class 100Rnd_580x42_Mag_F: 30Rnd_580x42_Mag_F { - initSpeed = 930; - }; - class 20Rnd_650x39_Cased_Mag_F: CA_Magazine { - initSpeed = 760; - }; class 30Rnd_65x39_caseless_mag: CA_Magazine { initSpeed = 760; }; @@ -56,10 +47,6 @@ class CfgMagazines { descriptionShort = CSTRING(30Rnd_65x39_caseless_green_mag_Tracer_DimDescription); }; - class 30Rnd_545x39_Mag_F: CA_Magazine { - initSpeed = 735; - }; - class 30Rnd_556x45_Stanag: CA_Magazine { }; class ACE_30Rnd_556x45_Stanag_M995_AP_mag: 30Rnd_556x45_Stanag { @@ -97,14 +84,6 @@ class CfgMagazines { picture = "\A3\weapons_f\data\ui\m_20stanag_red_ca.paa"; }; - class 200Rnd_556x45_Box_F: CA_Magazine { - initSpeed = 872; - }; - - class 30Rnd_762x39_Mag_F: CA_Magazine { - initSpeed = 715; - }; - class 20Rnd_762x51_Mag: CA_Magazine { initSpeed = 833; }; @@ -240,35 +219,17 @@ class CfgMagazines { class ACE_30Rnd_65x47_Scenar_mag: 30Rnd_65x39_caseless_mag { author = ECSTRING(common,ACETeam); ammo = "ACE_65x47_Ball_Scenar"; - initSpeed = 761; displayName = CSTRING(30Rnd_65x47_Scenar_mag_Name); displayNameShort = CSTRING(30Rnd_65x47_Scenar_mag_NameShort); descriptionShort = CSTRING(30Rnd_65x47_Scenar_mag_Description); }; - class ACE_20Rnd_65x47_Scenar_mag: 20Rnd_650x39_Cased_Mag_F { - author = ECSTRING(common,ACETeam); - ammo = "ACE_65x47_Ball_Scenar"; - initSpeed = 779; - displayName = CSTRING(20Rnd_65x47_Scenar_mag_Name); - displayNameShort = CSTRING(20Rnd_65x47_Scenar_mag_NameShort); - descriptionShort = CSTRING(20Rnd_65x47_Scenar_mag_Description); - }; class ACE_30Rnd_65_Creedmor_mag: 30Rnd_65x39_caseless_mag { author = ECSTRING(common,ACETeam); ammo = "ACE_65_Creedmor_Ball"; - initSpeed = 815; displayName = CSTRING(30Rnd_65_Creedmor_mag_Name); displayNameShort = CSTRING(30Rnd_65_Creedmor_mag_NameShort); descriptionShort = CSTRING(30Rnd_65_Creedmor_mag_Description); }; - class ACE_20Rnd_65_Creedmor_mag: 20Rnd_650x39_Cased_Mag_F { - author = ECSTRING(common,ACETeam); - ammo = "ACE_65_Creedmor_Ball"; - initSpeed = 808; - displayName = CSTRING(20Rnd_65_Creedmor_mag_Name); - displayNameShort = CSTRING(20Rnd_65_Creedmor_mag_NameShort); - descriptionShort = CSTRING(20Rnd_65_Creedmor_mag_Description); - }; class 10Rnd_338_Mag; class ACE_10Rnd_338_300gr_HPBT_Mag: 10Rnd_338_Mag { author = ECSTRING(common,ACETeam); @@ -286,18 +247,6 @@ class CfgMagazines { descriptionShort = CSTRING(10Rnd_338_API526_Mag_Description); initSpeed = 880; }; - - class 7Rnd_408_Mag: CA_Magazine { - initSpeed = 867; - }; - class ACE_7Rnd_408_305gr_Mag: 7Rnd_408_Mag { - author = ECSTRING(common,ACETeam); - ammo = "ACE_408_Ball"; - displayName = CSTRING(7Rnd_408_305gr_Mag_Name); - displayNameShort = CSTRING(7Rnd_408_305gr_Mag_NameShort); - descriptionShort = CSTRING(7Rnd_408_305gr_Mag_Description); - initSpeed = 1067; - }; class 5Rnd_127x108_Mag; class ACE_5Rnd_127x99_Mag: 5Rnd_127x108_Mag { @@ -327,7 +276,7 @@ class CfgMagazines { class 30Rnd_9x21_Mag: CA_Magazine { - initSpeed = 390; + initSpeed = 450; }; class ACE_30Rnd_9x19_mag: 30Rnd_9x21_Mag { author = ECSTRING(common,ACETeam); @@ -338,10 +287,6 @@ class CfgMagazines { initSpeed = 370; }; - class 10Rnd_50BW_Mag_F: CA_Magazine { - initSpeed = 552; - }; - class 11Rnd_45ACP_Mag: CA_Magazine { initSpeed = 250; }; @@ -363,10 +308,7 @@ class CfgMagazines { }; class 16Rnd_9x21_Mag: 30Rnd_9x21_Mag { - initSpeed = 390; - }; - class 10Rnd_9x21_Mag: 16Rnd_9x21_Mag { - initSpeed = 390; + initSpeed = 450; }; class ACE_16Rnd_9x19_mag: 16Rnd_9x21_Mag { author = ECSTRING(common,ACETeam); diff --git a/addons/ballistics/CfgVehicles.hpp b/addons/ballistics/CfgVehicles.hpp index c6a40301f2..bb50dcdc2e 100644 --- a/addons/ballistics/CfgVehicles.hpp +++ b/addons/ballistics/CfgVehicles.hpp @@ -13,9 +13,7 @@ class CfgVehicles { class NATO_Box_Base; class Box_NATO_Wps_F: NATO_Box_Base { class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); }; }; @@ -28,7 +26,6 @@ class CfgVehicles { MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,1); MACRO_ADDMAGAZINE(ACE_10Rnd_338_300gr_HPBT_Mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_338_API526_Mag,4); - MACRO_ADDMAGAZINE(ACE_7Rnd_408_305gr_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_AMAX_Mag,4); @@ -37,9 +34,7 @@ class CfgVehicles { class Box_NATO_Ammo_F: NATO_Box_Base { class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M118LR_Mag,4); MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,4); @@ -51,7 +46,6 @@ class CfgVehicles { MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_Tracer_Dim,4); MACRO_ADDMAGAZINE(ACE_10Rnd_338_300gr_HPBT_Mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_338_API526_Mag,4); - MACRO_ADDMAGAZINE(ACE_7Rnd_408_305gr_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_AMAX_Mag,4); @@ -73,7 +67,6 @@ class CfgVehicles { MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M993_AP_Mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_338_300gr_HPBT_Mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_338_API526_Mag,4); - MACRO_ADDMAGAZINE(ACE_7Rnd_408_305gr_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_AMAX_Mag,4); @@ -83,9 +76,7 @@ class CfgVehicles { class ReammoBox_F; class B_supplyCrate_F: ReammoBox_F { class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M118LR_Mag,4); MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,4); @@ -101,9 +92,7 @@ class CfgVehicles { class EAST_Box_Base; class Box_East_Wps_F: EAST_Box_Base { class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); }; @@ -113,9 +102,7 @@ class CfgVehicles { class TransportMagazines { MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,1); MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); }; @@ -123,9 +110,7 @@ class CfgVehicles { class Box_East_Ammo_F: EAST_Box_Base { class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); }; @@ -133,9 +118,7 @@ class CfgVehicles { class Box_East_Support_F: EAST_Box_Base { class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,6); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); }; @@ -199,9 +182,7 @@ class CfgVehicles { class C_supplyCrate_F: ReammoBox_F { class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); }; }; @@ -236,13 +217,10 @@ class CfgVehicles { MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim,4); MACRO_ADDMAGAZINE(ACE_100Rnd_65x39_caseless_mag_Tracer_Dim,4); MACRO_ADDMAGAZINE(ACE_200Rnd_65x39_cased_Box_Tracer_Dim,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_338_300gr_HPBT_Mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_338_API526_Mag,4); - MACRO_ADDMAGAZINE(ACE_7Rnd_408_305gr_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_AMAX_Mag,4); diff --git a/addons/ballistics/CfgWeapons.hpp b/addons/ballistics/CfgWeapons.hpp index f95408d6a6..8586aa8216 100644 --- a/addons/ballistics/CfgWeapons.hpp +++ b/addons/ballistics/CfgWeapons.hpp @@ -9,8 +9,7 @@ class CfgWeapons { class MMG_01_base_F; class MMG_02_base_F; class Rifle_Base_F; - class Rifle_Short_Base_F: Rifle_Base_F {}; - class Rifle_Long_Base_F: Rifle_Base_F {}; + class Rifle_Long_Base_F; class MuzzleSlot; /* Long Rifles */ @@ -27,17 +26,6 @@ class CfgWeapons { }; }; - class DMR_07_base_F: Rifle_Long_Base_F { - initSpeed = -1.06051; - ACE_barrelTwist = 228.6; - ACE_barrelLength = 640.0; - magazines[] = { - "20Rnd_650x39_Cased_Mag_F", - "ACE_20Rnd_65x47_Scenar_mag", - "ACE_20Rnd_65_Creedmor_mag" - }; - }; - class DMR_06_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { dispersion = 0.00029; // radians. Equal to 1.00 MOA. @@ -112,8 +100,8 @@ class CfgWeapons { "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim" }; initSpeed = -1.0; - ACE_barrelTwist = 228.6; - ACE_barrelLength = 406.4; + ACE_barrelTwist=228.6; + ACE_barrelLength=406.4; }; class arifle_MXM_F: arifle_MX_Base_F { magazines[] = { @@ -123,9 +111,9 @@ class CfgWeapons { "ACE_30Rnd_65x47_Scenar_mag", "ACE_30Rnd_65_Creedmor_mag" }; - initSpeed = -1.01842; - ACE_barrelTwist = 228.6; - ACE_barrelLength = 457.2; + initSpeed = -1.018; + ACE_barrelTwist=228.6; + ACE_barrelLength=457.2; class Single: Single { dispersion = 0.000436; // radians. Equal to 1.50 MOA. }; @@ -139,44 +127,6 @@ class CfgWeapons { /* Katiba */ class arifle_katiba_Base_F: Rifle_Base_F {}; - /* SPAR */ - class arifle_SPAR_01_base_F: Rifle_Base_F { - magazines[] = { - "30Rnd_556x45_Stanag", - "30Rnd_556x45_Stanag_green", - "30Rnd_556x45_Stanag_red", - "30Rnd_556x45_Stanag_Tracer_Red", - "30Rnd_556x45_Stanag_Tracer_Green", - "30Rnd_556x45_Stanag_Tracer_Yellow", - "ACE_30Rnd_556x45_Stanag_M995_AP_mag", - "ACE_30Rnd_556x45_Stanag_Mk262_mag", - "ACE_30Rnd_556x45_Stanag_Mk318_mag", - "ACE_30Rnd_556x45_Stanag_Tracer_Dim" - }; - initSpeed = -0.859238; - ACE_barrelTwist = 177.8; - ACE_barrelLength = 264.0; - }; - class arifle_SPAR_02_base_F: Rifle_Base_F { - initSpeed = -0.934282; - ACE_barrelTwist = 177.8; - ACE_barrelLength = 368.0; - }; - class arifle_SPAR_03_base_F: Rifle_Base_F { - magazines[] = { - "20Rnd_762x51_Mag", - "ACE_20Rnd_762x51_Mag_Tracer", - "ACE_20Rnd_762x51_Mag_Tracer_Dim", - "ACE_20Rnd_762x51_Mk316_Mod_0_Mag", - "ACE_20Rnd_762x51_M118LR_Mag", - "ACE_20Rnd_762x51_Mk319_Mod_0_Mag", - "ACE_20Rnd_762x51_M993_AP_Mag", - "ACE_20Rnd_762x51_Mag_SD" - }; - initSpeed = -0.984394; - ACE_barrelTwist = 279.4; - ACE_barrelLength = 508.0; - }; /* Other */ class LMG_Mk200_F: Rifle_Long_Base_F { @@ -185,26 +135,21 @@ class CfgWeapons { "200Rnd_65x39_cased_Box_Tracer", "ACE_200Rnd_65x39_cased_Box_Tracer_Dim" }; - initSpeed = -0.976974; - ACE_barrelTwist = 177.8; - ACE_barrelLength = 317.5; + initSpeed = -0.9763; + ACE_barrelTwist=177.8; + ACE_barrelLength=317.5; }; class LMG_Zafir_F: Rifle_Long_Base_F { - initSpeed = -1.00333; - ACE_barrelTwist = 304.8; - ACE_barrelLength = 459.74; - }; - class LMG_03_base_F: Rifle_Long_Base_F { - initSpeed = -1.02002; - ACE_barrelTwist = 177.8; - ACE_barrelLength = 414.02; + initSpeed = -1.0; + ACE_barrelTwist=304.8; + ACE_barrelLength=459.74; }; class Tavor_base_F: Rifle_Base_F {}; class mk20_base_F: Rifle_Base_F {}; /* SMGs */ class SDAR_base_F: Rifle_Base_F { - initSpeed = -1.211; + initSpeed = -0.989; class Single: Mode_SemiAuto { dispersion = 0.0008727; // radians. Equal to 3 MOA. }; @@ -217,6 +162,9 @@ class CfgWeapons { dispersion = 0.0008727; // radians. Equal to 3 MOA. }; }; + class pdw2000_base_F: Rifle_Base_F {}; + class SMG_01_Base: Rifle_Base_F {}; + class SMG_02_base_F: Rifle_Base_F {}; /* Pistols */ @@ -224,77 +172,38 @@ class CfgWeapons { class Pistol_Base_F: Pistol {}; class hgun_P07_F: Pistol_Base_F { - initSpeed = -1.0; - ACE_barrelTwist = 254.0; - ACE_barrelLength = 101.6; + initSpeed = -0.9778; + ACE_barrelTwist=254.0; + ACE_barrelLength=101.6; }; class hgun_Rook40_F: Pistol_Base_F { - initSpeed = -1.03077; - ACE_barrelTwist = 254.0; - ACE_barrelLength = 111.76; + initSpeed = -1.0; + ACE_barrelTwist=254.0; + ACE_barrelLength=111.76; }; class hgun_ACPC2_F: Pistol_Base_F { initSpeed = -1.0; - ACE_barrelTwist = 406.4; - ACE_barrelLength = 127.0; + ACE_barrelTwist=406.4; + ACE_barrelLength=127.0; }; class hgun_Pistol_heavy_01_F: Pistol_Base_F { initSpeed = -0.96; - ACE_barrelTwist = 406.4; - ACE_barrelLength = 114.3; + ACE_barrelTwist=406.4; + ACE_barrelLength=114.3; }; class hgun_Pistol_heavy_02_F: Pistol_Base_F { initSpeed = -0.92; - ACE_barrelTwist = 406.4; - ACE_barrelLength = 76.2; + ACE_barrelTwist=406.4; + ACE_barrelLength=76.2; }; - - class hgun_Pistol_01_F: Pistol_Base_F { - initSpeed = -0.974359; - ACE_barrelTwist = 254.0; - ACE_barrelLength = 93.5; - }; - - class pdw2000_base_F: Rifle_Short_Base_F { - initSpeed = -1.09615; - ACE_barrelTwist = 228.6; - ACE_barrelLength = 177.8; - }; - - /* Rifles */ - class arifle_AKS_base_F: Rifle_Base_F { - initSpeed = -1.0; - ACE_barrelTwist = 160.02; - ACE_barrelLength = 206.5; - }; - class arifle_AKM_base_F: Rifle_Base_F { - initSpeed = -1.0014; - ACE_barrelTwist = 199.898; - ACE_barrelLength = 414.02; - }; - class arifle_AK12_base_F: Rifle_Base_F { - initSpeed = -1.0014; - ACE_barrelTwist = 199.898; - ACE_barrelLength = 414.02; - }; - class arifle_CTAR_base_F: Rifle_Base_F { - initSpeed = -1.0; - ACE_barrelTwist = 244.0; - ACE_barrelLength = 463.0; - }; - class arifle_CTARS_base_F: Rifle_Base_F { - initSpeed = -1.04301; - ACE_barrelTwist = 244.0; - ACE_barrelLength = 600.0; - }; - class arifle_ARX_base_F: Rifle_Base_F { - initSpeed = -1.02052; - ACE_barrelTwist = 228.6; - ACE_barrelLength = 463.0; + class hgun_PDW2000_F: pdw2000_base_F { + initSpeed = -1.157; + ACE_barrelTwist=228.6; + ACE_barrelLength=177.8; }; class arifle_Katiba_F: arifle_katiba_Base_F { magazines[] = { @@ -302,9 +211,9 @@ class CfgWeapons { "30Rnd_65x39_caseless_green_mag_Tracer", "ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim" }; - initSpeed = -1.08355; - ACE_barrelTwist = 203.2; - ACE_barrelLength = 508.0; + initSpeed = -1.08; + ACE_barrelTwist=203.2; + ACE_barrelLength=728.98; }; class arifle_Katiba_C_F: arifle_katiba_Base_F { magazines[] = { @@ -312,9 +221,9 @@ class CfgWeapons { "30Rnd_65x39_caseless_green_mag_Tracer", "ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim" }; - initSpeed = -1.07105; - ACE_barrelTwist = 203.2; - ACE_barrelLength = 393.7; + initSpeed = -1.07; + ACE_barrelTwist=203.2; + ACE_barrelLength=680.72; }; class arifle_Katiba_GL_F: arifle_katiba_Base_F { magazines[] = { @@ -322,9 +231,9 @@ class CfgWeapons { "30Rnd_65x39_caseless_green_mag_Tracer", "ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim" }; - initSpeed = -1.08355; - ACE_barrelTwist = 203.2; - ACE_barrelLength = 508.0; + initSpeed = -1.08; + ACE_barrelTwist=203.2; + ACE_barrelLength=728.98; }; class arifle_MX_F: arifle_MX_Base_F { magazines[] = { @@ -332,9 +241,9 @@ class CfgWeapons { "30Rnd_65x39_caseless_mag_Tracer", "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim" }; - initSpeed = -0.990132; - ACE_barrelTwist = 228.6; - ACE_barrelLength = 368.3; + initSpeed = -0.99; + ACE_barrelTwist=228.6; + ACE_barrelLength=368.3; }; class arifle_MX_GL_F: arifle_MX_Base_F { magazines[] = { @@ -343,8 +252,8 @@ class CfgWeapons { "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim" }; initSpeed = -0.99; - ACE_barrelTwist = 228.6; - ACE_barrelLength = 368.3; + ACE_barrelTwist=228.6; + ACE_barrelLength=368.3; }; /* class arifle_MX_SW_F: arifle_MX_Base_F { @@ -358,9 +267,9 @@ class CfgWeapons { "30Rnd_65x39_caseless_mag_Tracer", "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim" }; - initSpeed = -0.963816; - ACE_barrelTwist = 203.2; - ACE_barrelLength = 266.7; + initSpeed = -0.965; + ACE_barrelTwist=203.2; + ACE_barrelLength=266.7; }; /* class arifle_MXM_F: arifle_MX_Base_F { @@ -383,18 +292,13 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; initSpeed = -0.989; - ACE_barrelTwist = 285.75; - ACE_barrelLength = 457.2; + ACE_barrelTwist=285.75; + ACE_barrelLength=457.2; }; - class SMG_02_base_F: Rifle_Short_Base_F { - initSpeed = -1.10288; - ACE_barrelTwist = 254.0; - ACE_barrelLength = 195.58; - }; - class SMG_05_base_F: Rifle_Short_Base_F { - initSpeed = -1.04058; - ACE_barrelTwist = 254.0; - ACE_barrelLength = 115.0; + class SMG_02_F: SMG_02_base_F { + initSpeed = -1.054; + ACE_barrelTwist=254.0; + ACE_barrelLength=195.58; }; class arifle_TRG20_F: Tavor_base_F { magazines[] = { @@ -410,8 +314,8 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; initSpeed = -0.95; - ACE_barrelTwist = 177.8; - ACE_barrelLength = 381.0; + ACE_barrelTwist=177.8; + ACE_barrelLength=381.0; }; class arifle_TRG21_F: Tavor_base_F { magazines[] = { @@ -426,9 +330,9 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Mk318_mag", "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; - initSpeed = -0.988043; - ACE_barrelTwist = 177.8; - ACE_barrelLength = 459.74; + initSpeed = -0.989; + ACE_barrelTwist=177.8; + ACE_barrelLength=459.74; }; class arifle_TRG21_GL_F: arifle_TRG21_F { magazines[] = { @@ -443,9 +347,9 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Mk318_mag", "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; - initSpeed = -0.988043; - ACE_barrelTwist = 177.8; - ACE_barrelLength = 459.74; + initSpeed = -0.989; + ACE_barrelTwist=177.8; + ACE_barrelLength=459.74; }; /* class LMG_Zafir_F: Rifle_Long_Base_F { @@ -466,9 +370,9 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Mk318_mag", "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; - initSpeed = -0.980978; - ACE_barrelTwist = 177.8; - ACE_barrelLength = 441.96; + initSpeed = -0.98; + ACE_barrelTwist=177.8; + ACE_barrelLength=441.96; }; class arifle_Mk20C_F: mk20_base_F { magazines[] = { @@ -483,9 +387,9 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Mk318_mag", "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; - initSpeed = -0.962648; - ACE_barrelTwist = 177.8; - ACE_barrelLength = 406.4; + initSpeed = -0.956; + ACE_barrelTwist=177.8; + ACE_barrelLength=406.4; }; class arifle_Mk20_GL_F: mk20_base_F { magazines[] = { @@ -500,14 +404,14 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Mk318_mag", "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; - initSpeed = -0.962648; - ACE_barrelTwist = 177.8; - ACE_barrelLength = 406.4; + initSpeed = -0.956; + ACE_barrelTwist=177.8; + ACE_barrelLength=406.4; }; - class SMG_01_Base: Rifle_Short_Base_F { - initSpeed = -1.0175; - ACE_barrelTwist = 406.4; - ACE_barrelLength = 139.7; + class SMG_01_F: SMG_01_Base { + initSpeed = -1.016; + ACE_barrelTwist=406.4; + ACE_barrelLength=139.7; }; class srifle_DMR_01_F: DMR_01_base_F { magazines[] = { @@ -515,8 +419,8 @@ class CfgWeapons { "ACE_10Rnd_762x54_Tracer_mag" }; initSpeed = -1.025; - ACE_barrelTwist = 241.3; - ACE_barrelLength = 609.6; + ACE_barrelTwist=241.3; + ACE_barrelLength=609.6; }; class srifle_EBR_F: EBR_base_F { magazines[] = { @@ -529,9 +433,9 @@ class CfgWeapons { "ACE_20Rnd_762x51_M993_AP_Mag", "ACE_20Rnd_762x51_Mag_SD" }; - initSpeed = -0.972389; - ACE_barrelTwist = 304.8; - ACE_barrelLength = 457.2; + initSpeed = -0.9724; + ACE_barrelTwist=304.8; + ACE_barrelLength=457.2; }; /* class LMG_Mk200_F: Rifle_Long_Base_F { @@ -541,13 +445,9 @@ class CfgWeapons { }; */ class srifle_LRR_F: LRR_base_F { - magazines[] = { - "7Rnd_408_Mag", - "ACE_7Rnd_408_305gr_Mag" - }; initSpeed = -1.0; - ACE_barrelTwist = 330.2; - ACE_barrelLength = 736.6; + ACE_barrelTwist=330.2; + ACE_barrelLength=736.6; }; class srifle_GM6_F: GM6_base_F { magazines[] = { @@ -558,8 +458,8 @@ class CfgWeapons { "ACE_5Rnd_127x99_AMAX_Mag" }; initSpeed = -1.0; - ACE_barrelTwist = 381.0; - ACE_barrelLength = 730; + ACE_barrelTwist=381.0; + ACE_barrelLength=730; }; class srifle_DMR_02_F: DMR_02_base_F { magazines[] = { @@ -570,9 +470,9 @@ class CfgWeapons { "ACE_20Rnd_762x67_Mk248_Mod_1_Mag", "ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag" }; - initSpeed = -0.961749; - ACE_barrelTwist = 254.0; - ACE_barrelLength = 508.0; + initSpeed = -0.962; + ACE_barrelTwist=254.0; + ACE_barrelLength=508.0; }; class srifle_DMR_03_F: DMR_03_base_F { magazines[] = { @@ -585,19 +485,19 @@ class CfgWeapons { "ACE_20Rnd_762x51_M993_AP_Mag", "ACE_20Rnd_762x51_Mag_SD" }; - initSpeed = -0.984394; - ACE_barrelTwist = 254.0; - ACE_barrelLength = 508.0; + initSpeed = -0.9843; + ACE_barrelTwist=254.0; + ACE_barrelLength=508.0; }; class srifle_DMR_04_F: DMR_04_base_F { initSpeed = -1.0; - ACE_barrelTwist = 203.2; - ACE_barrelLength = 450.088; + ACE_barrelTwist=203.2; + ACE_barrelLength=450.088; }; class srifle_DMR_05_blk_F: DMR_05_base_F { initSpeed = -1.0; - ACE_barrelTwist = 359.918; - ACE_barrelLength = 620.014; + ACE_barrelTwist=359.918; + ACE_barrelLength=620.014; }; class srifle_DMR_06_camo_F: DMR_06_base_F { magazines[] = { @@ -610,19 +510,19 @@ class CfgWeapons { "ACE_20Rnd_762x51_M993_AP_Mag", "ACE_20Rnd_762x51_Mag_SD" }; - initSpeed = -0.992197; - ACE_barrelTwist = 304.8; - ACE_barrelLength = 558.8; + initSpeed = -0.9916; + ACE_barrelTwist=304.8; + ACE_barrelLength=558.8; }; class MMG_01_hex_F: MMG_01_base_F { - initSpeed = -0.997073; - ACE_barrelTwist = 359.918; - ACE_barrelLength = 549.91; + initSpeed = -1.0; + ACE_barrelTwist=359.918; + ACE_barrelLength=549.91; }; class MMG_02_camo_F: MMG_02_base_F { initSpeed = -1.0; - ACE_barrelTwist = 234.95; - ACE_barrelLength = 609.6; + ACE_barrelTwist=234.95; + ACE_barrelLength=609.6; }; class HMG_127 : LMG_RCWS { @@ -631,8 +531,8 @@ class CfgWeapons { }; class HMG_M2: HMG_01 { initSpeed = -1.0; - ACE_barrelTwist = 304.8; - ACE_barrelLength = 1143.0; + ACE_barrelTwist=304.8; + ACE_barrelLength=1143.0; }; /* Silencers */ diff --git a/addons/ballistics/script_component.hpp b/addons/ballistics/script_component.hpp index a1b54b53b4..0b2f31da6a 100644 --- a/addons/ballistics/script_component.hpp +++ b/addons/ballistics/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_BALLISTICS diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml index ad33b30704..b51303fa6d 100644 --- a/addons/ballistics/stringtable.xml +++ b/addons/ballistics/stringtable.xml @@ -1,103 +1,6 @@ - + - - - 6.5x47mm 20Rnd Mag (HPBT Scenar) - Ch. 6,5x47mm 20Cps (HPBT Scenar) - Cargador de 20 balas de 6.5x47mm (HPBT Scenar) - Magazynek 6,5x47mm 20rd (HPBT Scenar) - Магазин из 20-ти 6,5x47 мм (экспансивные Scenar) - 6,5x47mm 20-Patronen-Magazin (HPBT Scenar) - 6.5x47mm 20Rnd Mag (HPBT Scenar) - 6.5x47mm 20náb. Zásobník (HPBT Scenar) - Carregador 6.5x47mm com 20 cartuchos (HPBT Scenar) - 6,5x47mm 20-lövedékes tár (HPBT Scenar) - 6.5x47mm 20発入り 弾倉 (HPBT Scenar) - 20발들이 6.5x47mm (HPBT Scenar) - 6.5x47mm 20發 彈匣 (Lapua 空尖艇尾狙擊專用彈) - 6.5x47mm 20发 弹匣 (Lapua 空尖艇尾狙击专用弹) - - - 6.5mm Lapua - 6,5mm Lapua - 6.5mm Lapua - 6,5mm Lapua - 6,5 мм Lapua - 6,5mm Lapua - 6.5mm Lapua - 6.5mm Lapua - 6.5mm Lapua - 6,5mm Lapua - 6.5mm Lapua - 6.5mm Lapua - 6.5mm Lapua 空尖艇尾狙擊專用彈 - 6.5mm Lapua 空尖艇尾狙击专用弹 - - - Caliber: 6.5x47mm (HPBT Scenar)<br />Rounds: 20<br />Used in: QBU-88 - Calibre: 6,5x47mm (HPBT Scenar)<br />Cartouches: 20 - Calibre: 6.5x47mm (HPBT Scenar)<br />Balas: 20<br />Se usa en: QBU-88 - Kaliber: 6,5x47mm (HPBT Scenar)<br />Pociski: 20 - Калибр: 6,5x47 мм (экспансивные Scenar)<br />Патронов: 20<br />Используются с: QBU-88 - Kaliber: 6,5x47mm (HPBT Scenar)<br />Patronen: 20<br />Eingesetzt von: QBU-88 - Calibro: 6.5x47mm (HPBT Scenar)<br />Munizioni: 20<br />In uso su: QBU-88 - Ráže: 6.5x47mm (HPBT Scenar)<br />Nábojů: 20<br />Použití u: QBU-88 - Calibre: 6.5x47mm (HPBT Scenar)<br/>Cartuchos: 20<br/>Usado em: QBU-88 - Kaliber: 6,5x47mm (HPBT Scenar)<br />Lövedékek: 20<br />Használható: QBU-88 - 口径: 6.5x47mm (HPBT Scenar)<br />装填数: 20<br />次で使用: QBU-88 - 구경: 6.5x47mm (HPBT Scenar)<br />장탄수: 20<br />사용처: QBU-88 - 口徑: 6.5x47mm (Lapua 空尖艇尾狙擊專用彈)<br />發數: 20<br />使用於: QBU-88 - 口径: 6.5x47mm (Lapua 空尖艇尾狙击专用弹)<br />发数: 20<br />使用于: QBU-88 - - - 6.5mm Creedmor 20Rnd Mag - Magazynek 6,5mm Creedmor 20rd - 6.5mm Creedmor 20Rnd Mag - Магазин из 20-ти 6,5 мм Creedmor - 6,5mm Creedmor 20-Patronen-Magazin - Cargador de 20 balas Creedmor de 6.5mm - Ch. 6,5mm Creedmor 20Cps - 6.5mm Creedmor 20náb. Zásobník - Carregador 6.5mm com 20 cartuchos Creedmor - 6,5mm Creedmor 20-lövedékes tár - 6.5mm Creedmor 20発入り 弾倉 - 20발들이 6.5mm Creedmor 탄창 - 6.5mm 20發 彈匣 (Creedmor 狙擊專用彈) - 6.5mm 20发 弹匣 (Creedmor 狙击专用弹) - - - 6.5mm CM - 6,5mm CM - 6.5mm CM - 6,5mm CM - 6,5 мм CM - 6,5mm CM - 6.5mm CM - 6.5mm CM - 6.5mm CM - 6,5mm CM - 6.5mm CM - 6.5mm CM - 6.5mm CM 狙擊專用彈 - 6.5mm CM 狙击专用弹 - - - Caliber: 6.5x47mm Creedmor<br />Rounds: 20<br />Used in: QBU-88 - Kaliber: 6,5x47mm Creedmor<br />Pociski: 20<br />Używany w: QBU-88 - Kaliber: 6,5x47mm Creedmor<br />Patronen: 20<br />Eingesetzt von: QBU-88 - Calibre: 6,5x47mm Creedmor <br />Cartouches: 20<br />Utilisé avec: QBU-88 - Calibro: 6.5mm Creedmor<br />Munizioni: 20<br />In uso su: QBU-88 - Calibre: 6.5mm Creedmor<br />Balas: 20<br />Se usa en: QBU-88 - Калибр: 6,5x47мм Creedmor<br />Патронов: 20<br />Используются c: QBU-88 - Ráže: 6.5x47mm Creedmor<br />Nábojů: 20<br />Použití u: QBU-88 - Calibre: 6.5x47mm Creedmor<br/>Cartuchos: 20<br/>Usado em: QBU-88 - Kaliber: 6,5x47mm Creedmor<br />Lövedékek: 20<br />Használható: QBU-88 - 口径: 6.5x47mm Creedmor<br />装填数: 20<br />次で使用: QBU-88 - 구경: 6.5x47mm Creedmor<br />장탄수: 20<br />사용처: QBU-88 - 口徑: 6.5x47mm Creedmor 狙擊專用彈<br />發數: 20<br />使用於: QBU-88 - 口径: 6.5x47mm Creedmor 狙击专用弹<br />发数: 20<br />使用于: QBU-88 - 6.5mm 30Rnd Tracer IR-DIM Mag @@ -110,10 +13,6 @@ Carregador de 30 projéteis traçantes IR-DIM de 6,5mm Caricatore 6.5mm 30Rnd Traccianti IR-DIM Магазин из 30-ти 6,5 мм ИК-трассирующих - 6.5mm 30発入り IR-DIM曳光弾 弾倉 - 30발들이 6.5mm IR-DIM 예광탄 탄창 - 6.5mm 30發 低視度紅外線曳光彈 彈匣 - 6.5mm 30发 低视度红外线曳光弹 弹匣 6.5mm IR-DIM @@ -126,10 +25,6 @@ 6,5mm IR-DIM 6.5mm IR-DIM 6,5 мм ИК-трассирующие - 6.5mm IR-DIM曳光弾 - 6.5mm IR-DIM 예광탄 - 6.5mm 低視紅外曳光彈 - 6.5mm 低视红外曳光弹 Caliber: 6.5x39mm Tracer IR-DIM<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL @@ -142,10 +37,6 @@ Calibre: 6,5x39mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL Calibro: 6.5x39mm Traccianti 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.5x39mm 曳光弾 IR-DIM<br />装填数: 30<br />次で使用: MX/C/M/SW/3GL - 구경: 6.5x39mm IR-DIM 예광탄<br />장탄수: 30<br />사용처: MX/C/M/SW/3GL - 口徑: 6.5x39mm 低視度紅外線曳光彈<br />發數: 30<br />使用於: MX/C/M/SW/3GL - 口径: 6.5x39mm 低视度红外线曳光弹<br />发数: 30<br />使用于: MX/C/M/SW/3GL 6.5mm 30Rnd SD Mag @@ -158,10 +49,6 @@ Carregador de 30 projéteis SD de 6,5mm Caricatore 6.5mm 30Rnd Sil. Магазин из 30-ти 6,5 мм дозвуковых - 6.5mm 30発入り 亜音速弾 弾倉 - 30발들이 6.5mm 아음속탄 탄창 - 6.5mm 30發 消音彈 彈匣 - 6.5mm 30发 消音弹 弹匣 6.5mm SD @@ -174,10 +61,6 @@ 6,5mm SD 6.5mm Sil. 6,5 мм дозвуковые - 6.5mm 亜音速弾 - 6.5mm 아음속탄 - 6.5mm 消音彈 - 6.5mm 消音弹 Caliber: 6.5x39mm SD<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL @@ -190,10 +73,6 @@ Calibre: 6,5x39mm SD<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL Calibro: 6.5x39mm Sil.<br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL Калибр: 6,5x39 мм дозвуковые<br />Патронов: 30<br />Используются с: MX/C/M/SW/3GL - 口径: 6.5x39mm 亜音速弾<br />装填数: 30<br />次で使用: MX/C/M/SW/3GL - 구경: 6.5x39mm SD<br />장탄수: 30<br />사용처: MX/C/M/SW/3GL - 口徑: 6.5x39mm 消音彈<br />發數: 30<br />使用於: MX/C/M/SW/3GL - 口径: 6.5x39mm 消音弹<br />发数: 30<br />使用于: MX/C/M/SW/3GL 6.5mm 30Rnd AP Mag @@ -206,10 +85,6 @@ Carregador de 30 projéteis AP de 6,5mm Caricatore 6.5mm 30Rnd AP Магазин из 30-ти 6,5 мм бронебойных - 6.5mm 30 発入り徹甲弾 弾倉 - 30발들이 6.5mm 철갑탄 탄창 - 6.5mm 30發 穿甲彈 彈匣 - 6.5mm 30发 穿甲弹 弹匣 6.5mm AP @@ -222,10 +97,6 @@ 6,5mm AP 6.5mm AP 6,5 мм бронебойные - 6.5mm 徹甲弾 - 6.5mm 철갑탄 - 6.5mm 穿甲彈 - 6.5mm 穿甲弹 Caliber: 6.5x39mm AP<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL @@ -238,10 +109,6 @@ Calibre: 6,5x39mm AP<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL Calibro: 6.5x39mm AP<br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL Калибр: 6,5x39 мм бронебойные<br />Патронов: 30<br />Используются с: MX/C/M/SW/3GL - 口径: 6.5x39mm 徹甲弾<br />装填数: 30<br />次で使用: MX/C/M/SW/3GL - 구경: 6.5x39mm 철갑탄<br />장탄수: 30<br />사용처: MX/C/M/SW/3GL - 口徑: 6.5x39mm 穿甲彈<br />發數: 30<br />使用於: MX/C/M/SW/3GL - 口径: 6.5x39mm 穿甲弹<br />发数: 30<br />使用于: MX/C/M/SW/3GL @@ -255,10 +122,6 @@ Carregador de 30 projéteis traçantes IR-DIM de 6,5mm Caricatore 6.5mm 30Rnd Traccianti IR-DIM Магазин из 30-ти 6,5 мм ИК-трассирующих - 6.5mm 30発入り IR-DIM曳光弾 弾倉 - 30발들이 6.5mm IR-DIM 예광탄 탄창 - 6.5mm 30發 低視度紅外線曳光彈 彈匣 - 6.5mm 30发 低视度红外线曳光弹 弹匣 6.5mm IR-DIM @@ -271,10 +134,6 @@ 6,5mm IR-DIM 6.5mm IR-DIM 6,5 мм ИК-трассирующие - 6.5mm IR-DIM曳光弾 - 6.5mm IR-DIM 예광탄 - 6.5mm 低視紅外曳光彈 - 6.5mm 低视红外曳光弹 Caliber: 6.5x39mm Tracer IR-DIM<br />Rounds: 30<br />Used in: Katiba @@ -287,10 +146,6 @@ Calibre: 6,5x39mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: Katiba Calibro: 6.5x39mm Tracciant IR-DIM<br />Munizioni: 30<br />In uso su: Katiba Калибр: 6,5x39 мм ИК-трассирующие<br />Патронов: 30<br />Используются с: Katiba - 口径: 6.5x39mm IR-DIM曳光弾<br />装填数: 30<br />次で使用: Katiba - 구경: 6.5x39mm IR-DIM 예광탄<br />장탄수: 30<br />사용처: Katiba - 口徑: 6.5x39mm 低視度紅外線曳光彈<br />發數: 30<br />使用於: Katiba - 口径: 6.5x39mm 低视度红外线曳光弹<br />发数: 30<br />使用于: Katiba 6.5mm 30Rnd SD Mag @@ -303,10 +158,6 @@ Carregador de 30 projéteis SD de 6,5mm Caricatore 6.5mm 30Rnd Sil. Магазин из 30-ти 6,5 мм дозвуковых - 6.5mm 30発入り 亜音速弾 弾倉 - 30발들이 6.5mm 아음속탄 탄창 - 6.5mm 30發 消音彈 彈匣 - 6.5mm 30发 消音弹 弹匣 6.5mm SD @@ -319,10 +170,6 @@ 6,5mm SD 6.5mm Sil. 6,5 мм дозвуковые - 6.5mm 亜音速弾 - 6.5mm 아음속탄 - 6.5mm 消音彈 - 6.5mm 消音弹 Caliber: 6.5x39mm SD<br />Rounds: 30<br />Used in: Katiba @@ -335,10 +182,6 @@ Calibre: 6,5x39mm SD<br />Projéteis: 30<br />Usado em: Katiba Calibro: 6.5x39mm Sil.<br />Munizioni: 30<br />In uso su: Katiba Калибр: 6,5x39 мм дозвуковые<br />Патронов: 30<br />Используются с: Katiba - 口径: 6.5x39mm 亜音速弾<br />装填数: 30<br />次で使用: Katiba - 구경: 6.5x39mm 아음속탄<br />장탄수: 30<br />사용처: Katiba - 口徑: 6.5x39mm 消音彈<br />發數: 30<br />使用於: Katiba - 口径: 6.5x39mm 消音弹<br />发数: 30<br />使用于: Katiba 6.5mm 30Rnd AP Mag @@ -351,10 +194,6 @@ Carregador de 30 projéteis AP de 6,5mm Caricatore 6.5mm 30Rnd AP Магазин из 30-ти 6,5 мм бронебойных - 6.5mm 30 発入り徹甲弾 弾倉 - 30발들이 6.5mm 철갑탄 탄창 - 6.5mm 30發 穿甲彈 彈匣 - 6.5mm 30发 穿甲弹 弹匣 6.5mm AP @@ -367,10 +206,6 @@ 6,5mm AP 6.5mm AP 6,5 мм бронебойные - 6.5mm 徹甲弾 - 6.5mm 철갑탄 - 6.5mm 穿甲彈 - 6.5mm 穿甲弹 Caliber: 6.5x39mm AP<br />Rounds: 30<br />Used in: Katiba @@ -383,10 +218,6 @@ Calibre: 6,5x39mm AP<br />Projéteis: 30<br />Usado em: Katiba Calibro: 6.5x39mm AP<br />Munizioni: 30<br />In uso su: Katiba Калибр: 6,5x39 мм бронебойные<br />Патронов: 30<br />Используются с: Katiba - 口径: 6.5x39mm 徹甲弾<br />装填数: 30<br />次で使用: Katiba - 구경: 6.5x39mm 철갑탄<br />장탄수: 30<br />사용처: Katiba - 口徑: 6.5x39mm 穿甲彈<br />發數: 30<br />使用於: Katiba - 口径: 6.5x39mm 穿甲弹<br />发数: 30<br />使用于: Katiba @@ -400,10 +231,6 @@ Carregador de 30 projéteis traçantes IR-DIM de 5,56mm Caricatore 5.56mm 30rnd Traccianti IR-DIM Магазин из 30-ти 5,56 мм ИК-трассирующих - 5.56mm 30発入り IR-DIM曳光弾 弾倉 - 30발 들이 5.56mm IR-DIM 예광탄 탄창 - 5.56mm 30發 低視度紅外線曳光彈 彈匣 - 5.56mm 30发 低视度红外线曳光弹 弹匣 5.56mm IR-DIM @@ -416,10 +243,6 @@ 5,56mm IR-DIM 5.56mm IR-DIM 5,56 мм ИК-трассирующие - 5.56mm IR-DIM曳光弾 - 5.56mm IR-DIM 예광탄 - 5.56mm 低視紅外曳光彈 - 5.56mm 低视红外曳光弹 Caliber: 5.56x45mm Tracer IR-DIM<br />Rounds: 30<br />Used in: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR @@ -432,10 +255,6 @@ Calibre: 5,56x45mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR Calibro: 5.56x45mm Traccianti 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.56x45mm IR-DIM曳光弾<br />装填数: 30<br />次で使用: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - 구경: 5.56x45mm IR-DIM 예광탄<br />장탄수: 30<br />사용처: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - 口徑: 5.56x45mm 低視度紅外線曳光彈<br />發數: 30<br />使用於: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - 口径: 5.56x45mm 低视度红外线曳光弹<br />发数: 30<br />使用于: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR @@ -449,10 +268,6 @@ Carregador de 20 projéteis traçantes de 7,62mm Caricatore 7.62mm 20Rnd Traccianti Магазин из 20-ти 7,62 мм трассирующих - 7.62mm 20発入り 曳光弾 - 20발들이 7.62mm 예광탄 탄창 - 7.62mm 20發 曳光彈 彈匣 - 7.62mm 20发 曳光弹 弹匣 7.62mm Tracer @@ -465,10 +280,6 @@ 7,62mm Traçante 7.62mm Traccianti 7,62 мм трассирущие - 7.62mm 曳光弾 - 7.62mm 예광탄 - 7.62mm 曳光彈 - 7.62mm 曳光弹 Caliber: 7.62x51mm Tracer<br />Rounds: 20<br />Used in: Mk18 ABR @@ -481,10 +292,6 @@ Calibre: 7,62x51mm Traçante<br />Projéteis: 20<br />Usado em: Mk18 ABR Calibro: 7.62x51mm Traccianti<br />Munizioni: 20<br />In uso su: Mk18 ABR Калибр: 7,62x51 мм трассирующие<br />Патронов: 20<br />Используются с: Mk18 ABR - 口径: 7.62x51mm 曳光弾<br />装填数: 20<br />次で使用: Mk18 ABR - 구경: 7.62x51mm 예광탄<br />장탄수: 20<br />사용처: Mk18 ABR - 口徑: 7.62x51mm 曳光彈<br />發數: 20<br />使用於: Mk18 ABR - 口径: 7.62x51mm 曳光弹<br />发数: 20<br />使用于: Mk18 ABR 7.62mm 20rnd Tracer IR-DIM Mag @@ -497,10 +304,6 @@ Carregador de 20 projéteis IR-DIM de 7,62mm Caricatore 7.62mm 20rnd Traccianti IR-DIM Магазин из 20-ти 7,62 мм ИК-трассирующих - 7.62mm 20発入り IR-DIM曳光弾 - 20발들이 7.62mm IR-DIM 예광탄 탄창 - 7.62mm 20發 低視度紅外線曳光彈 彈匣 - 7.62mm 20发 低视度红外线曳光弹 弹匣 7.62mm IR-DIM @@ -513,10 +316,6 @@ 7,62mm IR-DIM 7.62mm IR-DIM 7,62 мм ИК-трассирующие - 7.62mm IR-DIM曳光弾 - 7.62mm IR-DIM 예광탄 - 7.62mm 低視紅外曳光彈 - 7.62mm 低视红外曳光弹 Caliber: 7.62x51mm Tracer IR-DIM<br />Rounds: 20<br />Used in: Mk18 ABR @@ -529,10 +328,6 @@ Calibre: 7,62x51mm Traçante IR-DIM<br />Projéteis: 20<br />Usado em: Mk18 ABR Calibro: 7.62x51mm Traccianti IR-DIM<br />Munizioni: 20<br />In uso su: Mk18 ABR Калибр: 7,62x51 мм ИК-трассирующие<br />Патронов: 20<br />Используются с: Mk18 ABR - 口径: 7.62x51mm IR-DIM曳光弾<br />装填数: 20<br />次で使用: Mk18 ABR - 구경: 7.62x51mm IR-DIM 예광탄<br />장탄수: 20<br />사용처: Mk18 ABR - 口徑: 7.62x51mm 低視度紅外線曳光彈<br />發數: 20<br />使用於: Mk18 ABR - 口径: 7.62x51mm 低视度红外线曳光弹<br />发数: 20<br />使用于: Mk18 ABR 7.62mm 20Rnd SD Mag @@ -545,10 +340,6 @@ Carregador de 20 projéteis SD de 7,62mm Caricatore 7.62mm 20Rnd Sil. Магазин из 20-ти 7,62 мм дозвуковых - 7.62mm 20発入り 亜音速弾 弾倉 - 20발들이 7.62mm 아음속탄 탄창 - 7.62mm 20發 消音彈 彈匣 - 7.62mm 20发 消音弹 弹匣 7.62mm SD @@ -561,10 +352,6 @@ 7,62mm SD 7.62mm Sil. 7,62 мм дозвуковые - 7.62mm 亜音速弾 - 7.62mm 아음속탄 - 7.62mm 消音彈 - 7.62mm 消音弹 Caliber: 7.62x51mm SD<br />Rounds: 20<br />Used in: Mk18 ABR @@ -577,10 +364,6 @@ Calibre: 7,62x51mm SD<br />Projéteis: 20<br />Usado em: Mk18 ABR Calibro: 7.62x51mm Sil.<br />Munizioni: 20<br />In uso su: Mk18 ABR Калибр: 7,62x51 мм дозвуковые<br />Патронов: 20<br />Используются с: Mk18 ABR - 口径: 7.62x51mm 亜音速弾<br />装填数: 20<br />次で使用: Mk18 ABR - 구경: 7.62x51mm SD<br />장탄수: 20<br />사용처: Mk18 ABR - 口徑: 7.62x51mm 消音彈<br />發數: 20<br />使用於: Mk18 ABR - 口径: 7.62x51mm 消音弹<br />发数: 20<br />使用于: Mk18 ABR @@ -594,10 +377,6 @@ .338 NM 130náb. Svítící Pás Cinto de munição .338 NM com 130 cartuchos .338 NM 130-lövedékes nyomkövető heveder - .338 NM 130発入り 曳光弾ベルト - 130발들이 .338 NM 예광탄 벨트 - .338 NM 130發 曳光彈 彈鏈 - .338 NM 130发 曳光弹 弹链 .338 NM Tracer @@ -610,10 +389,6 @@ .338 NM 130Rnd Tracciante .338 NM Traçante .338 NM nyomkövető - .338 NM 曳光弾 - .338 NM 예광탄 - .338 NM 曳光彈 - .338 NM 曳光弹 Caliber: .338 Norma Magnum Tracer<br />Rounds: 130<br />Used in: SPMG @@ -626,10 +401,6 @@ Ráže: .338 Noma Magnum Svítící<br />Nábojů: 130<br />Použití u: LWMMG Calibre: .338 Norma Magnum Traçante<br />Cartuchos: 130<br />Usado em: SPMG Kaliber: .338 Norma Magnum nyomkövető<br />Lövedékek: 130<br />Használható: SPMG - 口径: .338 Norma Magnum 曳光弾<br />装填数: 130<br />次で使用: SPMG - 구경: .338 Norma 매그넘 예광탄<br />장탄수: 130<br />사용처: SPMG - 口徑: .338 Norma Magnum 曳光彈<br />發數: 130<br />使用於: SPMG - 口径: .338 Norma Magnum 曳光弹<br />发数: 130<br />使用于: SPMG .338 NM 130Rnd IR-DIM Belt @@ -642,10 +413,6 @@ .338 NM 130náb. IR-DIM Pás 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 130発入り IR-DIM曳光弾ベルト - 130발들이 .338 NM IR-DIM 예광탄 벨트 - .338 NM 130發 低視度紅外線曳光彈 彈鏈 - .338 NM 130发 低视度红外线曳光弹 弹链 .338 NM IR-DIM @@ -658,10 +425,6 @@ .338 NM IR-DIM .338 NM IR-DIM .338 NM infravörös nyomkövető - .338 NM IR-DIM曳光弾 - .338 NM IR-DIM 예광탄 - .338 NM 低視紅外曳光彈 - .338 NM 低视红外曳光弹 Caliber: .338 Norma Magnum Tracer IR-DIM<br />Rounds: 130<br />Used in: SPMG @@ -674,10 +437,6 @@ Ráže: .338 Noma Magnum Svítící IR-DIM<br />Nábojů: 130<br />Použití u: LWMMG 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 Norma 매그넘 IR-DIM 예광탄<br />장탄수: 130<br />사용처: SPMG - 口徑: .338 Norma Magnum 低視度紅外線曳光彈<br />發數: 130<br />使用於: SPMG - 口径: .338 Norma Magnum 低视度红外线曳光弹<br />发数: 130<br />使用于: SPMG .338 NM 130Rnd AP Belt @@ -690,10 +449,6 @@ .338 NM 130náb. AP Pás Cinto de munição .338 NM com 130 cartuchos AP .338 NM 130-lövedékes páncéltörő heveder - .338 NM 130発入り 徹甲弾ベルト - 130발들이 .338 NM 철갑탄 벨트 - .338 NM 130發 穿甲彈 彈鏈 - .338 NM 130发 穿甲弹 弹链 .338 NM AP @@ -706,10 +461,6 @@ .338 NM AP .338 NM AP .338 NM páncéltörő - .338 NM 徹甲弾 - .338 NM 철갑탄 - .338 NM 穿甲彈 - .338 NM 穿甲弹 Caliber: .338 Norma Magnum AP<br />Rounds: 130<br />Used in: SPMG @@ -722,252 +473,188 @@ Ráže: .338 Noma Magnum AP<br />Nábojů: 130<br />Použití u: LWMMG Calibre: .338 Norma Magnum AP<br />Cartuchos: 130<br />Usado em: SPMG Kaliber: .338 Norma Magnum páncéltörő<br />Lövedékek: 130<br />Használható: SPMG - 口径: .338 Norma Magnum 徹甲弾<br />装填数: 130<br />次で使用: SPMG - 구경: .338 Norma 매그넘 철갑탄<br />장탄수: 130<br />사용처: SPMG - 口徑: .338 Norma Magnum 穿甲彈<br />發數: 130<br />使用於: SPMG - 口径: .338 Norma Magnum 穿甲弹<br />发数: 130<br />使用于: SPMG 9.3mm 10Rnd Tracer Mag 9,3mm 10-Patronen-Magazin Leuchtspur Magazynek 9.3mm 10rd Smugacz - Ch. 9,3mm 10Cps Traçante + Ch. 9.3mm 10Cps Traçante Cargador de 10 balas trazadoras de 9.3mm Магазин из 10-ти 9,3 мм трассирующих 9.3mm 10Rnd Tracer Mag 9.3mm 10náb. Svítící Zásobník Carregador de 10 cartuchos 9.3mm traçantes 9,3mm 10-lövedékes nyomkövető tár - 9.3mm 10発入り 曳光弾 弾倉 - 10발들이 9.3mm 예광탄 탄창 - 9.3mm 10發 曳光彈 彈匣 - 9.3mm 10发 曳光弹 弹匣 9.3mm Tracer 9,3mm Leuchtspur 9,3mm Smugacz 9.3mm Svítící - 9,3mm Traçante + 9.3mm Traçante 9.3mm Trazadora 9,3 мм трассирующие 9.3mm Tracer 9.3mm Traçante 9,3mm nyomkövető - 9.3mm 曳光弾 - 9.3mm 예광탄 - 9.3mm 曳光彈 - 9.3mm 曳光弹 Caliber: 9.3x64mm Tracer<br />Rounds: 10<br />Used in: Cyrus Kaliber: 9,3x64mm Leuchtspur<br />Patronen: 10<br />Eingesetzt von: Cyrus Kaliber: 9,3x64mm Smugacz<br />Pociski: 10<br />Używany w: Cyrus - Calibre: 9,3x64mm Traçante<br />Cartouches: 10<br />Utilisé avec: Cyrus + Calibre: 9.3x64mm Traçante<br />Cartouches: 10<br />Utilisé avec: Cyrus Calibre: 9.3x64mm trazadora<br />Balas: 10<br />Se usa en: Cyrus Калибр: 9,3x64 мм трассирующие<br />Патронов: 10<br />Используются с: Cyrus Calibro: 9.3x64mm Tracer<br />Munizioni: 10<br />In uso su: Cyrus Ráže: 9.3x64mm Svítící<br />Nábojů: 10<br />Použití u: Cyrus Calibre: 9.3x64mm Traçante<br />Cartuchos: 10<br />Usado em: Cyrus Kaliber: 9,3x64mm nyomkövető<br />Lövedékek: 10<br />Használható: Cyrus - 口径: 9.3x64mm 曳光弾<br />装填数: 10<br />次で使用: Cyrus - 구경: 9.3x64mm 예광탄<br />장탄수: 10<br />사용처: Cyrus - 口徑: 9.3x64mm 曳光彈<br />發數: 10<br />使用於: Cyrus - 口径: 9.3x64mm 曳光弹<br />发数: 10<br />使用于: Cyrus 9.3mm 10Rnd Tracer IR-DIM Mag 9,3mm 10-Patronen-Magazin Leuchtspur IR-DIM Magazynek 9,3mm 10rd Smugacz IR-DIM - Ch. 9,3mm 10Cps Traçante IR-DIM + Ch. 9.3mm 10Cps Traçante IR-DIM Cargador de 10 balas trazadoras IR-DIM de 9.3mm Магазин из 10-ти 9,3 мм ИК-трассирующих 9.3mm 10Rnd Tracciante IR-DIM Mag 9.3mm 10náb. Svítící IR-DIM Zásobník Carregador de 10 cartuchos 9.3mm traçantes IR-DIM 9,3mm 10-lövedékes infravörös nyomkövető tár - 9.3mm 10発入り IR-DIM曳光弾 弾倉 - 10발들이 9.3mm IR-DIM 예광탄 탄창 - 9.3mm 10發 低視度紅外線曳光彈 彈匣 - 9.3mm 10发 低视度红外线曳光弹 弹匣 9.3mm IR-DIM 9,3mm IR-DIM 9,3mm IR-DIM 9.3mm IR-DIM - 9,3mm IR-DIM + 9.3mm IR-DIM 9.3mm IR-DIM 9,3 мм ИК-трассирующие 9.3mm IR-DIM 9.3mm IR-DIM 9,3mm infravörös nyomkövető - 9.3mm IR-DIM曳光弾 - 9.3mm IR-DIM 예광탄 - 9.3mm 低視紅外曳光彈 - 9.3mm 低视红外曳光弹 Caliber: 9.3x64mm Tracer IR-DIM<br />Rounds: 10<br />Used in: Cyrus Kaliber: 9,3x64mm Leuchtspur IR-DIM<br />Patronen: 10<br />Eingesetzt von: Cyrus Kaliber: 9,3x64mm Smugacz IR-DIM<br />Pociski: 10<br />Używany w: Cyrus - Calibre: 9,3x64mm Traçante IR-DIM<br />Cartouches: 10<br />Utilisé avec: Cyrus + Calibre: 9.3x64mm Traçante IR-DIM<br />Cartouches: 10<br />Utilisé avec: Cyrus Calibre: 9.3x64mm trazadora IR-DIM<br />Balas: 10<br />Se usa en: Cyrus Калибр: 9,3x64 мм ИК-трассирующие<br />Патронов: 10<br />Используются с: Cyrus Calibro: 9.3x64mm Tracciante IR-DIM<br />Munizioni: 10<br />In uso su: Cyrus Ráže: 9.3x64mm Svítící IR-DIM<br />Nábojů: 10<br />Použití u: Cyrus Calibre: 9.3x64mm Traçante IR-DIM<br />Cartuchos: 10<br />Usado em: Cyrus Kaliber: 9,3x64mm infravörös nyomkövető<br />Lövedékek: 10<br /> Használható: Cyrus - 口径: 9.3x64mm IR-DIM曳光弾<br />装填数: 10<br />次で使用: Cyrus - 구경: 9.3x64mm IR-DIM 예광탄<br />장탄수: 10<br />사용처: Cyrus - 口徑: 9.3x64mm 低視度紅外線曳光彈<br />發數: 10<br />使用於: Cyrus - 口径: 9.3x64mm 低视度红外线曳光弹<br />发数: 10<br />使用于: Cyrus 9.3mm 150Rnd Tracer Belt 9,3mm 150-Patronen-Gurt Leuchtspur Taśma 9,3mm 150rd Smugacz - Bande 9,3mm 150Cps Traçante + Bande 9.3mm 150Cps Traçante Cinta de 150 balas trazadoras de 9.3mm Лента из 150-ти 9,3 мм трассирующих 9.3mm 150Rnd Tracer Belt 9.3mm 150náb. Svítící Pás Cinto de munição traçante 9.3mm com 150 cartuchos 9,3mm 150-lövedékes nyomkövető heveder - 9.3mm 150発入り 曳光弾ベルト - 150발들이 9.3mm 예광탄 벨트 - 9.3mm 150發 曳光彈 彈鏈 - 9.3mm 150发 曳光弹 弹链 9.3mm Tracer 9,3mm Leuchtspur 9,3mm Smugacz 9.3mm Svítící - 9,3mm Traçante + 9.3mm Traçante 9.3mm Trazadora 9,3 мм трассирующие 9.3mm Tracciante 9.3mm Traçante 9,3mm nyomkövető - 9.3mm 曳光弾 - 9.3mm 예광탄 - 9.3mm 曳光彈 - 9.3mm 曳光弹 Caliber: 9.3x64mm Tracer<br />Rounds: 150<br />Used in: Navid Kaliber: 9,3x64mm Leuchtspur<br />Patronen: 150<br />Eingesetzt von: Navid Kaliber: 9,3x64mm Smugacz<br />Pociski: 150<br />Używane w: Navid - Calibre: 9,3x64mm Traçante<br />Cartouches: 150<br />Utilisé avec: Navid + Calibre: 9.3x64mm Traçante<br />Cartouches: 150<br />Utilisé avec: Navid Calibre: 9.3x64mm trazadora<br />Balas: 150<br />Se usa en: Navid Калибр: 9,3x64 мм трассирующие<br />Патронов: 150<br />Используются с: Навид Calibro: 9.3x64mm Tracciante<br />Munizioni: 150<br />In uso su: Navid Ráže: 9.3x64mm Svítící<br />Nábojů: 150<br />Použití u: HK121 Calibre: 9.3x64mm Traçante<br />Cartuchos: 150<br />Usado em: Navid Kaliber: 9,3x64mm nyomkövető<br />Lövedékek: 150<br />Használható: Navid - 口径: 9.3x64mm 曳光弾<br />装填数: 150<br />次で使用: Navid - 구경: 9.3x64mm 예광탄<br />장탄수: 150<br />사용처: Navid - 口徑: 9.3x64mm 曳光彈<br />發數: 150<br />使用於: Navid - 口径: 9.3x64mm 曳光弹<br />发数: 150<br />使用于: Navid 9.3mm 150Rnd Tracer IR-DIM Belt 9,3mm 150-Patronen-Gurt Leuchtspur IR-DIM Taśma 9,3mm 150rd Smugacz IR-DIM - Bande 9,3mm 150Cps Traçante IR-DIM + Bande 9.3mm 150Cps Traçante IR-DIM Cinta de 150 balas trazadoras IR-DIM de 9.3mm Лента из 150-ти 9,3 мм ИК-трассирующих 9.3mm 150Rnd Tracciante IR-DIM Belt 9.3mm 150náb. Svítící IR-DIM Pás Cinto de munição traçante 9.3mm IR-DIM com 150 cartuchos 9,3mm 150-lövedékes infravörös nyomkövető heveder - 9.3mm 150発入り IR-DIM曳光弾ベルト - 150발들이 9.3mm IR-DIM 예광탄 벨트 - 9.3mm 150發 低視度紅外線曳光彈 彈鏈 - 9.3mm 150发 低视度红外线曳光弹 弹链 9.3mm IR-DIM 9,3mm IR-DIM 9,3mm IR-DIM 9.3mm IR-DIM - 9,3mm IR-DIM + 9.3mm IR-DIM 9.3mm IR-DIM 9,3 мм ИК-трассирующие 9.3mm IR-DIM 9.3mm IR-DIM 9,3mm infravörös nyomkövető - 9.3mm IR-DIM曳光弾 - 9.3mm IR-DIM 예광탄 - 9.3mm 低視紅外曳光彈 - 9.3mm 低视红外曳光弹 Caliber: 9.3x64mm Tracer IR-DIM<br />Rounds: 150<br />Used in: Navid Kaliber: 9,3x64mm Leuchtspur IR-DIM<br />Patronen: 150<br />Eingesetzt von: Navid Kaliber: 9,3x64mm Smugacz IR-DIM<br />Pociski: 150<br />Używane w: Navid - Calibre: 9,3x64mm Traçante IR-DIM<br />Cartouches: 150<br />Utilisé avec: Navid + Calibre: 9.3x64mm Traçante IR-DIM<br />Cartouches: 150<br />Utilisé avec: Navid Calibre: 9.3x64mm trazadora IR-DIM<br />Balas: 150<br />Se usa en: Navid Калибр: 9,3x64 мм ИК-трассирующие<br />Патронов: 150<br />Используются с: Навид Calibro: 9.3x64mm Tracciante IR-DIM<br />Munizioni: 150<br />In uso su: Navid Ráže: 9.3x64mm Svítící IR-DIM<br />Nábojů: 150<br />Použití u: HK121 Calibre: 9.3x64mm Traçante IR-DIM<br />Cartuchos: 150<br />Usado em: Navid Kaliber: 9,3x64mm infravörös nyomkövető<br />Lövedékek: 150<br />Használható: Navid - 口径: 9.3x64mm IR-DIM曳光弾<br />装填数: 150<br />次で使用: Navid - 구경: 9.3x64mm IR-DIM 예광탄<br />장탄수: 150<br />사용처: Navid - 口徑: 9.3x64mm 低視度紅外線曳光彈<br />發數: 150<br />使用於: Navid - 口径: 9.3x64mm 低视度红外线曳光弹<br />发数: 150<br />使用于: Navid 9.3mm 150Rnd AP Belt 9,3mm 150-Patronen-Gurt Hartkern Taśma 9,3mm 150rd AP - Bande 9,3mm 150Cps AP + Bande 9.3mm 150Cps AP Cinta de 150 balas AP de 9.3mm Лента из 150-ти 9,3 мм бронебойных 9.3mm 150Rnd AP Belt 9.3mm 150náb. AP Pás Cinto de munição 9.3mm AP com 150 cartuchos 9,3mm 150-lövedékes páncéltörő heveder - 9.3mm 150発入り 徹甲弾ベルト - 150발들이 9.3mm 철갑탄 벨트 - 9.3mm 150發 穿甲彈 彈鏈 - 9.3mm 150发 穿甲弹 弹链 9.3mm AP 9,3mm AP 9,3mm AP 9.3mm AP - 9,3mm AP + 9.3mm AP 9.3mm AP 9,3 мм бронебойные 9.3mm AP 9.3mm AP 9,3mm páncéltörő - 9.3mm 徹甲弾 - 9.3mm 철갑탄 - 9.3mm 穿甲彈 - 9.3mm 穿甲弹 Caliber: 9.3x64mm AP<br />Rounds: 150<br />Used in: Navid Kaliber: 9,3x64mm Hartkern<br />Patronen: 150<br />Eingesetzt von: Navid Kaliber: 9,3x64mm AP<br />Pociski: 150<br />Używane w: Navid - Calibre: 9,3x64mm AP<br />Cartouches: 150<br />Utilisé avec: Navid + Calibre: 9.3x64mm AP<br />Cartouches: 150<br />Utilisé avec: Navid Calibre: 9.3x64mm AP<br />Balas: 150<br />Se usa en: Navid Калибр: 9,3x64 мм бронебойные<br />Патронов: 150<br />Используются с: Навид Calibro: 9.3x64mm AP<br />Munizioni: 150<br />In uso su: Navid Ráže: 9.3x64mm AP<br />Nábojů: 150<br />Použití u: HK121 Calibre: 9.3x64mm AP<br />Cartuchos: 150<br />Usado em: Navid Kaliber: 9,3x64mm páncéltörő<br />Lövedékek: 150<br />Használható: Navid - 口径: 9.3x64mm 徹甲弾<br />装填数: 150<br />次で使用: Navid - 구경: 9.3x64mm 철갑탄<br />장탄수: 150<br />사용처: Navid - 口徑: 9.3x64mm 穿甲彈<br />發數: 150<br />使用於: Navid - 口径: 9.3x64mm 穿甲弹<br />发数: 150<br />使用于: Navid 9x19mm 16Rnd Mag @@ -980,10 +667,6 @@ 9x19mm 16náb. Zásobník Carregador de 16 cartuchos 9x19mm 9x19mm 16-lövedékes tár - 9x19mm 16発入り 弾倉 - 16발들이 9x19mm 탄창 - 9x19mm 16發 彈匣 - 9x19mm 16发 弹匣 9x19mm @@ -996,10 +679,6 @@ 9x19mm 9x19mm 9x19mm - 9x19mm - 9x19mm - 9x19mm - 9x19mm 9x19mm 30Rnd Mag @@ -1012,10 +691,6 @@ 9x19mm 30náb. Zásobník Carregador de 16 cartuchos 9x19mm 9x19mm 16-lövedékes tár - 9x19mm 30発入り 弾倉 - 30발들이 9x19mm 탄창 - 9x19mm 30發 彈匣 - 9x19mm 30发 弹匣 9x19mm 30Rnd Mag @@ -1028,10 +703,6 @@ 9x19mm 30náb. Zásobník Carregador de 30 cartuchos 9x19mm 9x19mm 30-lövedékes tár - 9x19mm 30発入り 弾倉 - 30발들이 9x19mm 탄창 - 9x19mm 30發 彈匣 - 9x19mm 30发 弹匣 9x19mm @@ -1044,10 +715,6 @@ 9x19mm 9x19mm 9x19mm - 9x19mm - 9x19mm - 9x19mm - 9x19mm 9x19mm 30Rnd Mag @@ -1060,15 +727,11 @@ 9x19mm 30náb. Zásobník Carregador de 30 cartuchos 9x19mm 9x19mm 30-lövedékes tár - 9x19mm 30発入り 弾倉 - 30발들이 9x19mm 탄창 - 9x19mm 30發 彈匣 - 9x19mm 30发 弹匣 7.62x54mm 10Rnd Tracer Mag Magazynek 7,62x54mm 10rd Smugacz - Ch. 7,62x54mm 10Cps Traçante + Ch. 7.62x54mm 10Rnd Traçante Cargador de 10 balas trazadoras de 7.62x54mm Магазин из 10-ти 7,62 мм ИК-трассирующих 7,62x54mm 10-Patronen-Magazin Leuchtspur @@ -1076,15 +739,11 @@ 7.62x54mm 10náb. Svítící Zásobník Carregador com 10 cartuchos 7.62x54mm Traçante 7,62x54mm 10-lövedékes nyomkövető tár - 7.62x54mm 10発入り 曳光弾 弾倉 - 10발들이 7.62x54mm 예광탄 탄창 - 7.62x54mm 10發 曳光彈 彈匣 - 7.62x54mm 10发 曳光弹 弹匣 7.62mm 7,62mm - 7,62mm + 7.62mm 7.62mm 7,62 мм 7,62mm @@ -1092,15 +751,11 @@ 7.62mm 7.62mm 7,62mm - 7.62mm - 7.62mm - 7.62mm - 7.62mm 7.62x54mm 10Rnd Tracer Mag Magazynek 7,62x54mm 10rd Smugacz - Ch. 7,62x54mm 10Cps Traçante + Ch. 7.62x54mm 10Cps Traçante Cargador de 10 balas trazadoras de 7.62x54mm Магазин из 10-ти 7,62 мм ИК-трассирующих 7,62x54mm 10-Patronen-Magazin Leuchtspur @@ -1108,15 +763,11 @@ 7.62x54mm 10náb. Svítící Zásobník Carregador com 10 cartuchos 7.62x54mm Traçante 7,62x54mm 10-lövedékes nyomkövető tár - 7.62x54mm 10発入り 曳光弾 弾倉 - 10발들이 7.62x54mm 예광탄 탄창 - 7.62x54mm 10發 曳光彈 彈匣 - 7.62x54mm 10发 曳光弹 弹匣 6.5mm 100Rnd Tracer IR-DIM Mag Magazynek 6,5mm 100rd Smugacz IR-DIM - Ch. 6,5mm 100Cps Traçante IR-DIM + Ch. 6.5mm 100Rnd Traçante IR-DIM Cargador de 100 balas trazadoras IR-DIM de 6.5mm Магазин из 100 6,5 мм ИК-трассирующих 6,5mm 100-Patronen-Magazin IR-DIM Leuchtspur @@ -1124,15 +775,11 @@ 6.5mm 100náb. Svítící IR-DIM Zásobník Carregador com 100 cartuchos 6.5mm IR-DIM Traçante 6,5mm 100-lövedékes infravörös nyomkövető tár - 6.5mm 100発入り IR-DIM曳光弾 弾倉 - 100발들이 6.5mm IR-DIM 예광탄 탄창 - 6.5mm 100發 低視度紅外線曳光彈 彈匣 - 6.5mm 100发 低视度红外线曳光弹 弹匣 6.5mm IR-DIM 6,5mm IR-DIM - 6,5mm IR-DIM + 6.5mm IR-DIM 6.5mm IR-DIM 6,5 мм ИК-трассирующие 6,5mm IR-DIM @@ -1140,15 +787,11 @@ 6.5mm IR-DIM 6.5mm IR-DIM 6,5mm infravörös nyomkövető - 6.5mm IR-DIM曳光弾 - 6.5mm IR-DIM 예광탄 - 6.5mm 低視紅外曳光彈 - 6.5mm 低视红外曳光弹 6.5mm 100Rnd Tracer IR-DIM Mag<br />Rounds: 100<br />Used in: MX LSW Magazynek 6,5mm 100rd Smugacz IR-DIM - Ch. 6,5mm 100Cps Traçante IR-DIM<br />Cartouches: 100<br />Utilisé avec: MX LSW + Ch. 6.5mm 100Rnd Traçante IR-DIM<br />Cartouches: 100<br />Utilisé avec: MX LSW Cargador de 100 balas trazadoras IR-DIM de 6.5mm Магазин из 100 6,5 мм ИК-трассирующих 6,5mm 100-Patronen-Magazin IR-DIM Leuchtspur<br />Patronen: 100<br />Eingesetzt von: MXLSW @@ -1156,15 +799,11 @@ 6.5mm 100náb. Svítící IR-DIM Zásobník<br />Nábojů: 100<br />Použití u: MX LSW Carregador 6.5mm 100 Cartuchos Traçantes IR-DIM<br />Cartuchos: 100<br />Usado em: MX LSW 6.5mm 100-lövedékes infravörös nyomkövető tár<br />Lövedékek: 100<br />Használható: MX LSW - 6.5mm 100発入り IR-DIM曳光弾 弾倉<br />装填数: 100<br />次で使用: MX LSW - 100발들이 6.5mm IR-DIM 예광탄 탄창<br />장탄수: 100<br />사용처: MX LSW - 6.5mm 100發 低視度紅外線曳光彈<br />發數: 100<br />使用於: MX LSW - 6.5mm 100发 低视度红外线曳光弹<br />发数: 100<br />使用于: MX LSW 6.5mm 200Rnd Tracer IR-DIM Belt Magazynek 6,5mm 200rd Smugacz IR-DIM - Bande 6,5mm 200Cps Traçante IR-DIM + Bande 6.5mm 200Rnd Traçante IR-DIM Cinta de 200 balas trazadoras IR-DIM de 6.5mm Магазин из 200-т 6,5 мм ИК-трассирующих 6,5mm 200-Patronen-Gurt IR-DIM Leuchtspur @@ -1172,15 +811,11 @@ 6.5mm 200náb. Svítící IR-DIM Pás Cinto de munição traçante 6.5mm IR-DIM com 200 cartuchos 6,5mm 200-lövedékes infravörös nyomkövető heveder - 6.5mm 200発入り IR-DIM曳光弾ベルト - 200발들이 6.5mm IR-DIM 예광탄 탄창 - 6.5mm 200發 低視度紅外線曳光彈 彈鏈 - 6.5mm 200发 低视度红外线曳光弹 弹链 6.5mm IR-DIM 6,5mm IR-DIM - 6,5mm IR-DIM + 6.5mm IR-DIM 6.5mm IR-DIM 6,5 мм ИК-трассирующие 6,5mm IR-DIM @@ -1188,10 +823,6 @@ 6.5mm IR-DIM 6.5mm IR-DIM 6,5mm infravörös nyomkövető - 6.5mm IR-DIM曳光弾 - 6.5mm IR-DIM 예광탄 - 6.5mm 低視紅外曳光彈 - 6.5mm 低视红外曳光弹 6.5mm 200Rnd Tracer IR-DIM Belt<br />Rounds: 200<br />Used in: Stoner 99 LMG @@ -1204,15 +835,11 @@ 6.5mm 200náb. Svítící IR-DIM Pás<br />Nábojů: 200<br />Použití u: Stoner 99 LMG Cinto de munição traçante 6.5mm IR-DIM com 200 cartuchos<br />Cartuchos: 200<br />Usado em: Stoner 99 LMG 6.5mm 200-lövedékes infravörös nyomkövető heveder<br />Lövedékek: 200<br />Használható: Stoner 99 LMG - 6.5mm 200発入り IR-DIM曳光弾ベルト<br />装填数: 200<br />次で使用: Stoner 99 LMG - 200발들이 6.5mm IR-DIM 예광탄 벨트<br />장탄수: 200<br />사용처: Stoner 99 LMG - 6.5mm 200發 低視度紅外線曳光彈<br />發數: 200<br />使用於: Stoner 99 LMG - 6.5mm 200发 低视度红外线曳光弹<br />发数: 200<br />使用于: Stoner 99 LMG 5.56mm 30Rnd Mag (Mk262) Magazynek 5,56mm 30rd Mk262 - 5,56mm 30Cps (Mk262) + 5.56mm 30Cps (Mk262) Cargador de 30 balas de 5.56mm (Mk262) Магазин из 30-ти 5.56 мм Mk262 5,56mm 30-Patronen-Magazin (Mk262) @@ -1220,15 +847,11 @@ 5.56mm 30náb. Zásobník (Mk262) Carregador 5.56mm com 30 cartuchos (Mk262) 5,56mm 30-lövedékes tár (Mk262) - 5.56mm 30発入り 弾倉 (Mk262) - 30발들이 5.56mm 탄창 (Mk262) - 5.56mm 30發 彈匣 (Mk262 狙擊專用彈) - 5.56mm 30发 弹匣 (Mk262 狙击专用弹) 5.56mm Mk262 5,56mm Mk262 - 5,56mm Mk262 + 5.56mm Mk262 5.56mm Mk262 5,56 мм Mk262 5,56mm Mk262 @@ -1236,15 +859,11 @@ 5.56mm Mk262 5.56mm Mk262 5,56mm Mk262 - 5.56mm Mk262 - 5.56mm Mk262 - 5.56mm Mk262 狙擊專用彈 - 5.56mm Mk262 狙击专用弹 Caliber: 5.56x45mm NATO (Mk262)<br />Rounds: 30 Kaliber: 5,56x45mm NATO (Mk262)<br />Pociski: 30 - Calibre: 5,56x45mm NATO (Mk262)<br />Cartouches: 30 + Calibre: 5.56x45mm NATO (Mk262)<br />Cartouches: 30 Calibre: 5.56x45mm NATO (Mk262)<br />Balas: 30 Калибр: 5,56x45 мм NATO (Mk262)<br />Патронов: 30 Kaliber: 5,56x45mm NATO (Mk262)<br />Patronen: 30 @@ -1252,15 +871,11 @@ Ráže: 5.56x45mm NATO (Mk262)<br />Nábojů: 30 Calibre: 5.56x45mm NATO (Mk262)<br/>Cartuchos: 30 Kaliber: 5,56x45mm NATO (Mk262)<br />Lövedékek: 30 - 口径: 5.56x45mm NATO (Mk262)<br />装填数: 30 - 구경: 5.56x45mm NATO (Mk262)<br />장탄수: 30 - 口徑: 5.56x45mm NATO標準 (Mk262 狙擊專用彈)<br />發數: 30 - 口径: 5.56x45mm NATO标准 (Mk262 狙击专用弹)<br />发数: 30 5.56mm 30Rnd Mag (Mk318) Magazynek 5,56mm 30rd (Mk318) - Ch. 5,56mm 30Cps (Mk318) + Ch. 5.56mm 30Cps (Mk318) Cargador de 30 balas de 5.56mm (Mk318) Магазин из 30-ти 5.56 мм (Mk318) 5,56mm 30-Patronen-Magazin (Mk318) @@ -1268,15 +883,11 @@ 5.56mm 30Rnd Zásobník (Mk318) Carregador 5.56mm com 30 cartuchos (Mk318) 5,56mm 30-lövedékes tár (Mk318) - 5.56mm 30発入り 弾倉 (Mk318) - 30발들이 5.56mm 탄창 (Mk318) - 5.56mm 30發 彈匣 (Mk318 特戰專用彈) - 5.56mm 30发 弹匣 (Mk318 特战专用弹) 5.56mm Mk318 5,56mm Mk318 - 5,56mm Mk318 + 5.56mm Mk318 5.56mm Mk318 5.56 мм Mk318 5,56mm Mk318 @@ -1284,15 +895,11 @@ 5.56mm Mk318 5.56mm Mk318 5,56mm Mk318 - 5.56mm Mk318 - 5.56mm Mk318 - 5.56mm Mk318 特戰專用彈 - 5.56mm Mk318 特战专用弹 Caliber: 5.56x45mm NATO (Mk318)<br />Rounds: 30 Kaliber: 5,56x45mm NATO (Mk318)<br />Pociski: 30 - Calibre: 5,56x45mm NATO (Mk318)<br />Cartouches: 30 + Calibre: 5.56x45mm NATO (Mk318)<br />Cartouches: 30 Calibre: 5.56x45mm NATO (Mk318)<br />Balas: 30 Калибр: 5,56x45 мм NATO (Mk318)<br />Патронов: 30 Kaliber: 5,56x45mm NATO (Mk318)<br />Patronen: 30 @@ -1300,15 +907,11 @@ Ráže: 5.56x45mm NATO (Mk318)<br />Nábojů: 30 Calibre: 5.56x45mm NATO (Mk318)<br/>Cartuchos: 30 Kaliber: 5,56x45mm NATO (Mk318)<br />Lövedékek: 30 - 口径: 5.56x45mm NATO (Mk318)<br />装填数: 30 - 구경: 5.56x45mm NATO (Mk318)<br />장탄수: 30 - 口徑: 5.56x45mm NATO標準 (Mk318 特戰專用彈)<br />發數: 30 - 口径: 5.56x45mm NATO标准 (Mk318 特战专用弹)<br />发数: 30 5.56mm 30Rnd Mag (M995 AP) Magazynek 5,56mm 30rd (M995 AP) - Ch. 5,56mm 30Cps (M995 AP) + Ch. 5.56mm 30Cps (M995 AP) Cargador de 30 balas de 5.56mm (M995 AP) Магазин из 30-ти 5.56 мм (M995 бронебойные) 5,56mm 30-Patronen-Magazin (M995AP) @@ -1316,15 +919,11 @@ 5.56mm 30náb. Zásobník (M995 AP) Carregador 5.56mm com 30 cartuchos (M995 AP) 5,56mm 30-lövedékes tár (M995 páncéltörő) - 5.56mm 30発入り 弾倉 (M995 徹甲弾) - 30발들이 5.56mm 탄창 (Mk995 철갑탄) - 5.56mm 30發 彈匣 (M995 穿甲彈) - 5.56mm 30发 弹匣 (M995 穿甲弹) 5.56mm AP 5,56mm AP - 5,56mm AP + 5.56mm AP 5.56mm AP 5.56 мм бронебойные 5,56mm AP @@ -1332,15 +931,11 @@ 5.56mm AP 5.56mm M995 AP 5,56mm páncéltörő - 5.56mm 徹甲弾 - 5.56mm 철갑탄 - 5.56mm M995 穿甲彈 - 5.56mm M995 穿甲弹 Caliber: 5.56x45mm NATO (M995 AP)<br />Rounds: 30 Kaliber: 5,56x45mm NATO (M995 AP)<br />Pociski: 30 - Calibre: 5,56x45mm NATO (M995 AP)<br />Cartouches: 30 + Calibre: 5.56x45mm NATO (M995 AP)<br />Cartouches: 30 Calibre: 5.56x45mm NATO (M995 AP)<br />Balas: 30 Калибр: 5,56x45 мм NATO (M995 бронебойные)<br />Патронов: 30 Kaliber: 5,56x45mm NATO (M995 AP)<br />Patronen: 30 @@ -1348,15 +943,11 @@ Ráže: 5.56x45mm NATO (M995 AP)<br />Nábojů: 30 Calibre: 5.56x45mm NATO (M995 AP)<br/>Cartuchos: 30 Kaliber: 5,56x45mm NATO (M995 páncéltörő)<br />Lövedékek: 30 - 口径: 5.56x45mm NATO (M995 徹甲弾)<br />装填数: 30 - 구경: 5.56x45mm NATO (Mk995 철갑탄)<br />장탄수: 30 - 口徑: 5.56x45mm NATO標準 (M995 穿甲彈)<br />發數: 30 - 口径: 5.56x45mm NATO标准 (M995 穿甲弹)<br />发数: 30 7.62mm 10Rnd Mag (M118LR) Magazynek 7,62mm 10rd (M118LR) - Ch. 7,62mm 10Cps (M118LR) + Ch. 7.62mm 10Cps (M118LR) Cargador de 10 balas de 7.62mm (M118LR) Магазин из 10-ти 7,62 мм (M118LR) 7,62mm 10-Patronen-Magazin (M118LR) @@ -1364,15 +955,11 @@ 7.62mm 10náb. Zásobník (M118LR) Carregador 7.62mm com 10 cartuchos (M118LR) 7,62mm 10-lövedékes tár (M118LR) - 7.62mm 10発入り 弾倉 (M118LR) - 10발들이 7.62mm 탄창 (M118LR) - 7.62mm 10發 彈匣 (M118LR 狙擊專用彈) - 7.62mm 10发 弹匣 (M118LR 狙击专用弹) 7.62mm M118LR 7,62mm M118LR - 7,62mm M118LR + 7.62mm M118LR 7.62mm M118LR 7,62 мм M118LR 7,62mm M118LR @@ -1380,15 +967,11 @@ 7.62mm M118LR 7.62mm M118LR 7,62mm M118LR - 7.62mm M118LR - 7.62mm M118LR - 7.62mm M118LR 狙擊專用彈 - 7.62mm M118LR 狙击专用弹 Caliber: 7.62x51mm NATO (M118LR)<br />Rounds: 10 Kaliber: 7,62x51mm NATO (M118LR)<br />Pociski: 10 - Calibre: 7,62x51mm NATO (M118LR)<br />Cartouches: 10 + Calibre: 7.62x51mm NATO (M118LR)<br />Cartouches: 10 Calibre: 7.62x51mm NATO (M118LR)<br />Balas: 10 Калибр: 7,62x51 мм NATO (M118LR)<br />Патронов: 10 Kaliber: 7,62x51mm NATO (M118LR)<br />Patronen: 10 @@ -1396,15 +979,11 @@ Ráže: 7.62x51mm NATO (M118LR)<br />Nábojů: 10 Calibre: 7.26x51mm NATO (M118LR)<br/>Cartuchos: 10 Kaliber: 7,62x51mm NATO (M118LR)<br />Lövedékek: 10 - 口径: 7.62x51mm NATO (M118LR)<br />装填数: 10 - 구경: 7.62x51mm NATO (M118LR)<br />장탄수: 10 - 口徑: 7.62x51mm NATO標準 (M118LR 狙擊專用彈)<br />發數: 10 - 口径: 7.62x51mm NATO标准 (M118LR 狙击专用弹)<br />发数: 10 7.62mm 20Rnd Mag (M118LR) Magazynek 7,62mm 20rd (M118LR) - Ch. 7,62mm 20Cps (M118LR) + Ch. 7.62mm 20Cps (M118LR) Cargador de 20 balas de 7.62mm (M118LR) Магазин из 20-ти 7,62 мм (M118LR) 7,62mm 20-Patronen-Magazin (M118LR) @@ -1412,15 +991,11 @@ 7.62mm 20náb. Zásobník (M118LR) Carregador 7.62mm com 20 cartuchos (M118LR) 7,62mm 20-lövedékes tár (M118LR) - 7.62mm 20発入り 弾倉 (M118LR) - 20발들이 7.62mm 탄창 (M118LR) - 7.62mm 20發 彈匣 (M118LR 狙擊專用彈) - 7.62mm 20发 弹匣 (M118LR 狙击专用弹) 7.62mm M118LR 7,62mm M118LR - 7,62mm M118LR + 7.62mm M118LR 7.62mm M118LR 7,62 мм M118LR 7,62mm M118LR @@ -1428,10 +1003,6 @@ 7.62mm M118LR 7.62mm M118LR 7,62mm M118LR - 7.62mm M118LR - 7.62mm M118LR - 7.62mm M118LR 狙擊專用彈 - 7.62mm M118LR 狙击专用弹 Caliber: 7.62x51mm NATO (M118LR)<br />Rounds: 20 @@ -1444,15 +1015,11 @@ Ráže: 7.62x51mm NATO (M118LR)<br />Nábojů: 20 Calibre: 7.26x51mm NATO (M118LR)<br/>Cartuchos: 20 Kaliber: 7,62x51mm NATO (M118LR)<br />Lövedékek: 20 - 口径: 7.62x51mm NATO (M118LR)<br />装填数: 20 - 구경: 7.62x51mm NATO (M118LR)<br />장탄수: 20 - 口徑: 7.62x51mm NATO標準 (M118LR 狙擊專用彈)<br />發數: 20 - 口径: 7.62x51mm NATO标准 (M118LR 狙击专用弹)<br />发数: 20 7.62mm 10Rnd Mag (Mk316 Mod 0) Magazynek 7,62mm 10rd (Mk316 Mod 0) - Ch. 7,62mm 10Cps (Mk316 Mod 0) + Ch. 7.62mm 10Cps (Mk316 Mod 0) Cargador de 10 balas de 7.62mm (Mk316 Mod 0) Магазин из 10-ти 7,62 мм (Mk316 Mod 0) 7,62mm 10-Patronen-Magazin (Mk316 Mod 0) @@ -1460,15 +1027,11 @@ 7.62mm 10náb. Zásobník (Mk316 Mod 0) Carregador 7.62mm com 10 cartuchos (Mk316 Mod 0) 7,62mm 10-lövedékes tár (Mk316 Mod 0) - 7.62mm 10発入り 弾倉 (Mk316 Mod 0) - 10발들이 7.62mm 탄창 (Mk316 Mod 0) - 7.62mm 10發 彈匣 (Mk316 Mod 0 狙擊專用彈) - 7.62mm 10发 弹匣 (Mk316 Mod 0 狙击专用弹) 7.62mm Mk316 7,62mm Mk316 - 7,62mm Mk316 + 7.62mm Mk316 7.62mm Mk316 7,62 мм Mk316 7,62mm Mk316 @@ -1476,15 +1039,11 @@ 7.62mm Mk316 7.62mm Mk316 7,62mm Mk316 - 7.62mm Mk316 - 7.62mm Mk316 - 7.62mm Mk316 狙擊專用彈 - 7.62mm Mk316 狙击专用弹 Caliber: 7.62x51mm NATO (Mk316 Mod 0)<br />Rounds: 10 Kaliber: 7,62x51mm NATO (Mk316 Mod 0)<br />Pociski: 10 - Calibre: 7,62x51mm NATO (Mk316 Mod 0)<br />Cartouches: 10 + Calibre: 7.62x51mm NATO (Mk316 Mod 0)<br />Cartouches: 10 Calibre: 7.62x51mm NATO (Mk316 Mod 0)<br />Balas: 10 Калибр: 7,62x51 мм NATO (Mk316 Mod 0)<br />Патронов: 10 Kaliber: 7,62x51mm NATO (Mk316 Mod 0)<br />Patronen: 10 @@ -1492,15 +1051,11 @@ Ráže: 7.62x51mm NATO (Mk316 Mod 0)<br />Nábojů: 10 Calibre: 7.26x51mm NATO (Mk316 Mod 0)<br/>Cartuchos: 10 Kaliber: 7,62x51mm NATO (Mk316 Mod 0)<br />Lövedékek: 10 - 口径: 7.62x51mm NATO (Mk316 Mod 0)<br />装填数: 10 - 구경: 7.62x51mm NATO (Mk316 Mod 0)<br />장탄수: 10 - 口徑: 7.62x51mm NATO標準 (Mk316 Mod 0 狙擊專用彈)<br />發數: 10 - 口径: 7.62x51mm NATO标准 (Mk316 Mod 0 狙击专用弹)<br />发数: 10 7.62mm 20Rnd Mag (Mk316 Mod 0) Magazynek 7,62mm 20rd (Mk316 Mod 0) - Ch. 7,62mm 20Cps (Mk316 Mod 0) + Ch. 7.62mm 20Cps (Mk316 Mod 0) Cargador de 20 balas de 7.62mm (Mk316 Mod 0) Магазин из 20-ти 7,62 мм (Mk316 Mod 0) 7,62mm 20-Patronen-Magazin (Mk316 Mod 0) @@ -1508,15 +1063,11 @@ 7.62mm 20náb. Zásobník (Mk316 Mod 0) Carregador 7.62mm com 20 cartuchos (Mk316 Mod 0) 7,62mm 20-lövedékes tár (Mk316 Mod 0) - 7.62mm 20発入り 弾倉 (Mk316 Mod 0) - 20발들이 7.62mm 탄창 (Mk316 Mod 0) - 7.62mm 20發 彈匣 (Mk316 Mod 0 狙擊專用彈) - 7.62mm 20发 弹匣 (Mk316 Mod 0 狙击专用弹) 7.62mm Mk316 7,62mm Mk316 - 7,62mm Mk316 + 7.62mm Mk316 7.62mm Mk316 7,62 мм Mk316 7,62mm Mk316 @@ -1524,15 +1075,11 @@ 7.62mm Mk316 7.62mm Mk316 7,62mm Mk316 - 7.62mm Mk316 - 7.62mm Mk316 - 7.62mm Mk316 狙擊專用彈 - 7.62mm Mk316 狙击专用弹 Caliber: 7.62x51mm NATO (Mk316 Mod 0)<br />Rounds: 20 Kaliber: 7,62x51mm NATO (Mk316 Mod 0)<br />Pociski: 20 - Calibre: 7,62x51mm NATO (Mk316 Mod 0)<br />Cartouches: 20 + Calibre: 7.62x51mm NATO (Mk316 Mod 0)<br />Cartouches: 20 Calibre: 7.62x51mm NATO (Mk316 Mod 0)<br />Balas: 20 Калибр: 7,62x51 мм NATO (Mk316 Mod 0)<br />Патронов: 20 Kaliber: 7,62x51mm NATO (Mk316 Mod 0)<br />Patronen: 20 @@ -1540,15 +1087,11 @@ Ráže: 7.62x51mm NATO (Mk316 Mod 0)<br />Nábojů: 20 Calibre: 7.26x51mm NATO (Mk316 Mod 0)<br/>Cartuchos: 20 Kaliber: 7,62x51mm NATO (Mk316 Mod 0)<br />Lövedékek: 20 - 口径: 7.62x51mm NATO (Mk316 Mod 0)<br />装填数: 20 - 구경: 7.62x51mm NATO (Mk316 Mod 0)<br />장탄수: 20 - 口徑: 7.62x51mm NATO標準 (Mk316 Mod 0 狙擊專用彈)<br />發數: 20 - 口径: 7.62x51mm NATO标准 (Mk316 Mod 0 狙击专用弹)<br />发数: 20 7.62mm 10Rnd Mag (Mk319 Mod 0) Magazynek 7,62mm 10rd (Mk319 Mod 0) - Ch. 7,62mm 10Cps (Mk319 Mod 0) + Ch. 7.62mm 10Cps (Mk319 Mod 0) Cargador de 10 balas de 7.62mm (Mk319 Mod 0) Магазин из 10-ти 7,62 мм (Mk319 Mod 0) 7,62mm 10-Patronen-Magazin (Mk319 Mod 0) @@ -1556,15 +1099,11 @@ 7.62mm 10náb. Zásobník (Mk319 Mod 0) Carregador 7.62mm com 10 cartuchos (Mk319 Mod 0) 7,62mm 10-lövedékes tár (Mk319 Mod 0) - 7.62mm 10発入り 弾倉 (Mk319 Mod 0) - 10발들이 7.62mm 탄창 (Mk319 Mod 0) - 7.62mm 10發 彈匣 (Mk319 Mod 0 特戰專用彈) - 7.62mm 10发 弹匣 (Mk319 Mod 0 特战专用弹) 7.62mm Mk319 7,62mm Mk319 - 7,62mm Mk319 + 7.62mm Mk319 7.62mm Mk319 7,62 мм Mk319 7,62mm Mk319 @@ -1572,15 +1111,11 @@ 7.62mm Mk319 7.62mm Mk319 7,62mm Mk319 - 7.62mm Mk319 - 7.62mm Mk319 - 7.62mm Mk319 特戰專用彈 - 7.62mm Mk319 特战专用弹 Caliber: 7.62x51mm NATO (Mk319 Mod 0)<br />Rounds: 10 Kaliber: 7,62x51mm NATO (Mk319 Mod 0)<br />Pociski: 10 - Calibre: 7,62x51mm NATO (Mk319 Mod 0)<br />Cartouches: 10 + Calibre: 7.62x51mm NATO (Mk319 Mod 0)<br />Cartouches: 10 Calibre: 7.62x51mm NATO (Mk319 Mod 0)<br />Balas: 10 Калибр: 7,62x51 мм NATO (Mk319 Mod 0)<br />Патронов: 10 Kaliber: 7,62x51mm NATO (Mk319 Mod 0)<br />Patronen: 10 @@ -1588,15 +1123,11 @@ Ráže: 7.62x51mm NATO (Mk319 Mod 0)<br />Nábojů: 10 Calibre: 7.26x51mm NATO (Mk319 Mod 0)<br/>Cartuchos: 10 Kaliber: 7,62x51mm NATO (Mk319 Mod 0)<br />Lövedékek: 10 - 口径: 7.62x51mm NATO (Mk319 Mod 0)<br />装填数: 10 - 구경: 7.62x51mm NATO (Mk319 Mod 0)<br />장탄수: 10 - 口徑: 7.62x51mm NATO標準 (Mk319 Mod 0 特戰專用彈)<br />發數: 10 - 口径: 7.62x51mm NATO标准 (Mk319 Mod 0 特战专用弹)<br />发数: 10 7.62mm 20Rnd Mag (Mk319 Mod 0) Magazynek 7,62mm 20rd (Mk319 Mod 0) - Ch. 7,62mm 20Cps (Mk319 Mod 0) + Ch. 7.62mm 20Cps (Mk319 Mod 0) Cargador de 20 balas de 7.62mm (Mk319 Mod 0) Магазин из 20-ти 7,62 мм (Mk319 Mod 0) 7,62mm 20-Patronen-Magazin (Mk319 Mod 0) @@ -1604,15 +1135,11 @@ 7.62mm 20náb. Zásobník (Mk319 Mod 0) Carregador 7.62mm com 20 cartuchos (Mk319 Mod 0) 7,62mm 20-lövedékes tár (Mk319 Mod 0) - 7.62mm 20発入り 弾倉 (Mk319 Mod 0) - 20발들이 7.62mm 탄창 (Mk319 Mod 0) - 7.62mm 20發 彈匣 (Mk319 Mod 0 特戰專用彈) - 7.62mm 20发 弹匣 (Mk319 Mod 0 特战专用弹) 7.62mm Mk319 7,62mm Mk319 - 7,62mm Mk319 + 7.62mm Mk319 7.62mm Mk319 7,62 мм Mk319 7,62mm Mk319 @@ -1620,15 +1147,11 @@ 7.62mm Mk319 7.62mm Mk319 7,62mm Mk319 - 7.62mm Mk319 - 7.62mm Mk319 - 7.62mm Mk319 特戰專用彈 - 7.62mm Mk319 特战专用弹 Caliber: 7.62x51mm NATO (Mk319 Mod 0)<br />Rounds: 20 Kaliber: 7,62x51mm NATO (Mk319 Mod 0)<br />Pociski: 20 - Calibre: 7,62x51mm NATO (Mk319 Mod 0)<br />Cartouches: 20 + Calibre: 7.62x51mm NATO (Mk319 Mod 0)<br />Cartouches: 20 Calibre: 7.62x51mm NATO (Mk319 Mod 0)<br />Balas: 20 Калибр: 7,62x51 мм NATO (Mk319 Mod 0)<br />Патронов: 20 Kaliber: 7,62x51mm NATO (Mk319 Mod 0)<br />Patronen: 20 @@ -1636,15 +1159,11 @@ Ráže: 7.62x51mm NATO (Mk319 Mod 0)<br />Nábojů: 20 Calibre: 7.26x51mm NATO (Mk319 Mod 0)<br/>Cartuchos: 20 Kaliber: 7,62x51mm NATO (Mk319 Mod 0)<br />Lövedékek: 20 - 口径: 7.62x51mm NATO (Mk319 Mod 0)<br />装填数: 20 - 구경: 7.62x51mm NATO (Mk319 Mod 0)<br />장탄수: 20 - 口徑: 7.62x51mm NATO標準 (Mk319 Mod 0 特戰專用彈)<br />發數: 20 - 口径: 7.62x51mm NATO标准 (Mk319 Mod 0 特战专用弹)<br />发数: 20 7.62mm 10Rnd Mag (M993 AP) Magazynek 7,62mm 10rd (M993 AP) - Ch. 7,62mm 10Cps (M993 AP) + Ch. 7.62mm 10Cps (M993 AP) Cargador de 10 balas de 7.62mm (M993 AP) Магазин из 10-ти 7,62 мм (M993 бронебойные) 7,62mm 10-Patronen-Magazin (M993 AP) @@ -1652,15 +1171,11 @@ 7.62 10náb. Zásobník (M993 AP) Carregador 7.62mm com 10 cartuchos (M993 AP) 7,62mm 10-lövedékes tár (M993 páncéltörő) - 7.62mm 10発入り 弾倉 (M993 徹甲弾) - 10발들이 7.62mm 탄창 (M993 철갑탄) - 7.62mm 10發 彈匣 (M993 穿甲專用彈) - 7.62mm 10发 弹匣 (M993 穿甲专用弹) 7.62mm AP 7,62mm AP - 7,62mm AP + 7.62mm AP 7.62mm AP 7,62mm бронебойные 7,62mm AP @@ -1668,15 +1183,11 @@ 7.62mm AP 7.62mm AP 7,62mm páncéltörő - 7.62mm 徹甲弾 - 7.62mm 철갑탄 - 7.62mm M993 穿甲專用彈 - 7.62mm M993 穿甲专用弹 Caliber: 7.62x51mm NATO (M993 AP)<br />Rounds: 10 Kaliber: 7,62x51mm NATO (M993 AP)<br />Pociski: 10 - Calibre: 7,62x51mm NATO (M993 AP)<br />Cartouches: 10 + Calibre: 7.62x51mm NATO (M993 AP)<br />Cartouches: 10 Calibre: 7.62x51mm NATO (M993 AP)<br />Balas: 10 Калибр: 7,62x51 мм NATO (M993 бронебойные)<br />Патронов: 10 Kaliber: 7,62x51mm NATO (M993 AP)<br />Patronen: 10 @@ -1684,15 +1195,11 @@ Ráže: 7.62x51mm NATO (M993 AP)<br />Nábojů: 10 Calibre: 7.26x51mm NATO (M993 AP)<br/>Cartuchos: 10 Kaliber: 7,62x51mm NATO (M993 páncéltörő)<br />Lövedékek: 10 - 口径: 7.62x51mm NATO (Mk319 Mod 0)<br />装填数: 10 - 구경: 7.62x51mm NATO (M993 철갑탄)<br />장탄수: 10 - 口徑: 7.62x51mm NATO標準 (M993 穿甲專用彈)<br />發數: 10 - 口径: 7.62x51mm NATO标准 (M993 穿甲专用弹)<br />发数: 10 7.62mm 20Rnd Mag (M993 AP) Magazynek 7,62mm 20rd (M993 AP) - Ch. 7,62mm 20Cps (M993 AP) + Ch. 7.62mm 20Cps (M993 AP) Cargador de 20 balas de 7.62mm (M993 AP) Магазин из 20-ти 7,62 мм (M993 бронебойные) 7,62mm 20-Patronen-Magazin (M993 AP) @@ -1700,15 +1207,11 @@ 7.62mm 20náb. Zásobník (M993 AP) Carregador 7.62mm com 20 cartuchos (M993 AP) 7,62mm 20-lövedékes tár (M993 páncéltörő) - 7.62mm 20発入り 弾倉 (M993 徹甲弾) - 20발들이 7.62mm 탄창 (M993 철갑탄) - 7.62mm 20發 彈匣 (M993 穿甲專用彈) - 7.62mm 20发 弹匣 (M993 穿甲专用弹) 7.62mm AP 7,62mm AP - 7,62mm AP + 7.62mm AP 7.62mm AP 7,62 мм бронебойные 7,62mm AP @@ -1716,15 +1219,11 @@ 7.62mm AP 7.62mm AP 7,62mm páncéltörő - 7.62mm 徹甲弾 - 7.62mm 철갑탄 - 7.62mm M993 穿甲專用彈 - 7.62mm M993 穿甲专用弹 Caliber: 7.62x51mm NATO (M993 AP)<br />Rounds: 20 Kaliber: 7,62x51mm NATO (M993 AP)<br />Pociski: 20 - Calibre: 7,62x51mm NATO (M993 AP)<br />Cartouches: 20 + Calibre: 7.62x51mm NATO (M993 AP)<br />Cartouches: 20 Калибр: 7,62x51 мм NATO (M993 бронебойные)<br />Патронов: 20 Kaliber: 7,62x51mm NATO (M993 AP)<br />Patronen: 20 Calibro: 7.62x51 mm NATO (M993 AP)<br />Munizioni: 20 @@ -1732,15 +1231,11 @@ Ráže: 7.62x51mm NATO (M993 AP)<br />Nábojů: 20 Calibre: 7.26x51mm NATO (M993 AP)<br/>Cartuchos: 20 Kaliber: 7,62x51mm NATO (M993 páncéltörő)<br />Lövedékek: 20 - 口径: 7.62x51mm NATO (M993 徹甲弾)<br />装填数: 20 - 구경: 7.62x51mm NATO (M993 철갑탄)<br />장탄수: 20 - 口徑: 7.62x51mm NATO標準 (M993 穿甲專用彈)<br />發數: 20 - 口径: 7.62x51mm NATO标准 (M993 穿甲专用弹)<br />发数: 20 7.62mm 20Rnd Mag (Mk248 Mod 0) Magazynek 7,62mm 20rd (Mk248 Mod 0) - Ch. 7,62mm 20Cps (Mk248 Mod 0) + Ch. 7.62mm 20Cps (Mk248 Mod 0) Cargador de 20 balas de 7.62mm (Mk248 Mod 0) Магазин из 20-ти 7,62 мм (Mk248 Mod 0) 7,62mm 20-Patronen-Magazin (Mk248 Mod 0) @@ -1748,15 +1243,11 @@ 7.62mm 20náb. Zásobník (Mk248 Mod 0) Carregador 7.62mm com 20 cartuchos (Mk248 Mod 0) 7,62mm 20-lövedékes tár (Mk248 Mod 0) - 7.62mm 20発入り 弾倉 (Mk248 Mod 0) - 20발들이 7.62mm 탄창 (Mk248 Mod 0) - 7.62mm 20發 彈匣 (Mk248 Mod 0 狙擊專用彈) - 7.62mm 20发 弹匣 (Mk248 Mod 0 狙击专用弹) 7.62mm Mk248 7,62mm Mk248 - 7,62mm Mk248 + 7.62mm Mk248 7.62mm Mk248 7,62 мм Mk248 7,62mm Mk248 @@ -1764,15 +1255,11 @@ 7.62mm Mk248 7.62mm Mk248 7,62mm Mk248 - 7.62mm Mk248 - 7.62mm Mk248 - 7.62mm Mk248 狙擊專用彈 - 7.62mm Mk248 狙击专用弹 Caliber: 7.62x67mm NATO (Mk248 Mod 0)<br />Rounds: 20 Kaliber: 7,62x67mm NATO (Mk248 Mod 0)<br />Pociski: 20 - Calibre: 7,62x67mm NATO (Mk248 Mod 0)<br />Cartouches: 20 + Calibre: 7.62x67mm NATO (Mk248 Mod 0)<br />Cartouches: 20 Calibre: 7.62x67mm NATO (Mk248 Mod 0)<br />Balas: 20 Калибр: 7,62x67 мм NATO (Mk248 Mod 0)<br />Патронов: 20 Kaliber: 7,62x51mm NATO (Mk248 Mod 0)<br />Patronen: 20 @@ -1780,15 +1267,11 @@ Ráže: 7.62x67mm NATO (Mk248 Mod 0)<br />Nábojů: 20 Calibre: 7.26x67mm NATO (Mk248 Mod 0)<br/>Cartuchos: 20 Kaliber: 7,62x51mm NATO (Mk248 Mod 0)<br />Lövedékek: 20 - 口径: 7.62x67mm NATO (Mk248 Mod 0)<br />装填数: 20 - 구경: 7.62x51mm NATO (Mk248 Mod 0)<br />장탄수: 20 - 口徑: 7.62x67mm NATO標準 (Mk248 Mod 0 狙擊專用彈)<br />發數: 20 - 口径: 7.62x67mm NATO标准 (Mk248 Mod 0 狙击专用弹)<br />发数: 20 7.62mm 20Rnd Mag (Mk248 Mod 1) Magazynek 7,62mm 20rd (Mk248 Mod 1) - Ch. 7,62mm 20Cps (Mk248 Mod 1) + Ch. 7.62mm 20Cps (Mk248 Mod 1) Cargador de 20 balas de 7.62mm (Mk248 Mod 1) Магазин из 20-ти 7,62 мм (Mk248 Mod 1) 7,62mm 20-Patronen-Magazin (Mk248 Mod 1) @@ -1796,15 +1279,11 @@ 7.62mm 20náb. Zásobník (Mk248 Mod 1) Carregador 7.62mm com 20 cartuchos (Mk248 Mod 1) 7,62mm 20-lövedékes tár (Mk248 Mod 1) - 7.62mm 20発入り 弾倉 (Mk248 Mod 1) - 20발들이 7.62mm 탄창 (Mk248 Mod 1) - 7.62mm 20發 彈匣 (Mk248 Mod 1 狙擊專用彈) - 7.62mm 20发 弹匣 (Mk248 Mod 1 狙击专用弹) 7.62mm Mk248 7,62mm Mk248 - 7,62mm Mk248 + 7.62mm Mk248 7.62mm Mk248 7,62 мм Mk248 7,62mm Mk248 @@ -1812,15 +1291,11 @@ 7.62mm Mk248 7.62mm Mk248 7,62mm Mk248 - 7.62mm Mk248 - 7.62mm Mk248 - 7.62mm Mk248 狙擊專用彈 - 7.62mm Mk248 狙击专用弹 Caliber: 7.62x67mm NATO (Mk248 Mod 1)<br />Rounds: 20 Kaliber: 7,62x67mm NATO (Mk248 Mod 1)<br />Pociski: 20 - Calibre: 7,62x67mm NATO (Mk248 Mod 1)<br />Cartouches: 20 + Calibre: 7.62x67mm NATO (Mk248 Mod 1)<br />Cartouches: 20 Calibre: 7.62x67mm NATO (Mk248 Mod 1)<br />Balas: 20 Калибр: 7,62x67 мм NATO (Mk248 Mod 1)<br />Патронов: 20 Kaliber: 7,62x51mm NATO (Mk248 Mod 1)<br />Patronen: 20 @@ -1828,15 +1303,11 @@ Ráže: 7.62x67mm NATO (Mk248 Mod 1)<br />Nábojů: 20 Calibre: 7.26x67mm NATO (Mk248 Mod 1)<br/>Cartuchos: 20 Kaliber: 7,62x51mm NATO (Mk248 Mod 1)<br />Lövedékek: 20 - 口径: 7.62x67mm NATO (Mk248 Mod 1)<br />装填数: 20 - 구경: 7.62x51mm NATO (Mk248 Mod 1)<br />장탄수: 20 - 口徑: 7.62x67mm NATO標準 (Mk248 Mod 1 狙擊專用彈)<br />發數: 20 - 口径: 7.62x67mm NATO标准 (Mk248 Mod 1 狙击专用弹)<br />发数: 20 7.62mm 20Rnd Mag (Berger Hybrid OTM) Magazynek 7,62mm 20rd (Berger Hybrid OTM) - Ch. 7,62 20Cps (Berger Hybrid OTM) + Ch. 7.62 20Cps (Berger Hybrid OTM) Cargador de 20 balas de 7.62mm (Berger Hybrid OTM) Магазин из 20-ти 7,62 мм (Berger Hybrid OTM) 7,62mm 20-Patronen-Magazin (Berger Hybrid OTM) @@ -1844,15 +1315,11 @@ 7.62mm 20náb. Zásobník (Berger Hybrid OTM) Carregador 7.62mm com 20 cartuchos (Berger Hybrid OTM) 7,62mm 20-lövedékes tár (Berger Hybrid OTM) - 7.62mm 20発入り 弾倉 (Berger Hybrid OTM) - 20발들이 7.62mm 탄창 (Berger Hybrid OTM) - 7.62mm 20發 彈匣 (Berger Hybrid 空尖比賽專用彈) - 7.62mm 20发 弹匣 (Berger Hybrid 空尖比赛专用弹) 7.62mm OTM 7,62mm OTM - 7,62mm OTM + 7.62mm OTM 7.62mm OTM 7,62 мм OTM 7,62mm OTM @@ -1860,15 +1327,11 @@ 7.62mm OTM 7.62mm OTM 7,62mm OTM - 7.62mm OTM - 7.62mm OTM - 7.62mm 空尖比賽專用彈 - 7.62mm 空尖比赛专用弹 Caliber: 7.62x67mm NATO (Berger Hybrid OTM)<br />Rounds: 20 Kaliber: 7,62x67mm NATO (Berger Hybrid OTM)<br />Pociski: 20 - Calibre: 7,62x67mm NATO (Berger Hybrid OTM)<br />Cartouches: 20 + Calibre: 7.62x67mm NATO (Berger Hybrid OTM)<br />Cartouches: 20 Calibre: 7.62x67mm NATO (Berger Hybrid OTM)<br />Balas: 20 Калибр: 7,62x67 мм NATO (Berger Hybrid OTM)<br />Патронов: 20 Kaliber: 7,62x67mm NATO (Berger Hybrid OTM)<br />Patronen: 20 @@ -1876,14 +1339,10 @@ Ráže: 7.62x67mm NATO (Berger Hybrid OTM)<br />Nábojů: 20 Calibre: 7.26x67mm NATO (Berger Hybrid OTM)<br/>Cartuchos: 20 Kaliber: 7,62x67mm NATO (Berger Hybrid OTM)<br />Lövedékek: 20 - 口径: 7.62x67mm NATO (Berger Hybrid OTM)<br />装填数: 20 - 구경: 7.62x51mm NATO (Berger Hybrid OTM)<br />장탄수: 20 - 口徑: 7.62x67mm NATO標準 (Berger Hybrid 空尖比賽專用彈)<br />發數: 20 - 口径: 7.62x67mm NATO标准 (Berger Hybrid 空尖比赛专用弹)<br />发数: 20 6.5x47mm 30Rnd Mag (HPBT Scenar) - Ch. 6,5x47mm 30Cps (HPBT Scenar) + Ch. 6.5x47mm 30Cps (HPBT Scenar) Cargador de 30 balas de 6.5x47mm (HPBT Scenar) Magazynek 6,5x47mm 30rd (HPBT Scenar) Магазин из 30-ти 6,5x47 мм (экспансивные Scenar) @@ -1892,14 +1351,10 @@ 6.5x47mm 30náb. Zásobník (HPBT Scenar) Carregador 6.5x47mm com 30 cartuchos (HPBT Scenar) 6,5x47mm 30-lövedékes tár (HPBT Scenar) - 6.5x47mm 30発入り 弾倉 (HPBT Scenar) - 30발들이 6.5x47mm 탄창 (HPBT Scenar) - 6.5x47mm 30發 彈匣 (Lapua 空尖艇尾狙擊專用彈) - 6.5x47mm 30发 弹匣 (Lapua 空尖艇尾狙击专用弹) 6.5mm Lapua - 6,5mm Lapua + 6.5mm Lapua 6.5mm Lapua 6,5mm Lapua 6,5 мм Lapua @@ -1908,14 +1363,10 @@ 6.5mm Lapua 6.5mm Lapua 6,5mm Lapua - 6.5mm Lapua - 6.5mm Lapua - 6.5mm Lapua 空尖艇尾狙擊專用彈 - 6.5mm Lapua 空尖艇尾狙击专用弹 Caliber: 6.5x47mm (HPBT Scenar)<br />Rounds: 30<br />Used in: MXM - Calibre: 6,5x47mm (HPBT Scenar)<br />Cartouches: 30 + Calibre: 6.5x47mm (HPBT Scenar)<br />Cartouches: 30 Calibre: 6.5x47mm (HPBT Scenar)<br />Balas: 30<br />Se usa en: MXM Kaliber: 6,5x47mm (HPBT Scenar)<br />Pociski: 30 Калибр: 6,5x47 мм (экспансивные Scenar)<br />Патронов: 30<br />Используются с: MXM @@ -1924,10 +1375,6 @@ Ráže: 6.5x47mm (HPBT Scenar)<br />Nábojů: 30<br />Použití u: MXM Calibre: 6.5x47mm (HPBT Scenar)<br/>Cartuchos: 30<br/>Usado em: MXM Kaliber: 6,5x47mm (HPBT Scenar)<br />Lövedékek: 30<br />Használható: MXM - 口径: 6.5x47mm (HPBT Scenar)<br />装填数: 30<br />次で使用: MXM - 구경: 6.5x47mm (HPBT Scenar)<br />장탄수: 30<br />사용처: MXM - 口徑: 6.5x47mm (Lapua 空尖艇尾狙擊專用彈)<br />發數: 30<br />使用於: MXM - 口径: 6.5x47mm (Lapua 空尖艇尾狙击专用弹)<br />发数: 30<br />使用于: MXM 6.5mm Creedmor 30Rnd Mag @@ -1936,18 +1383,14 @@ Магазин из 30-ти 6,5 мм Creedmor 6,5mm Creedmor 30-Patronen-Magazin Cargador de 30 balas Creedmor de 6.5mm - Ch. 6,5mm Creedmor 30Cps + Ch. 6.5mm Creedmor 30Cps 6.5mm Creedmor 30náb. Zásobník Carregador 6.5mm com 30 cartuchos Creedmor 6,5mm Creedmor 30-lövedékes tár - 6.5mm Creedmor 30発入り 弾倉 - 30발들이 6.5mm Creedmor 탄창 - 6.5mm 30發 彈匣 (Creedmor 狙擊專用彈) - 6.5mm 30发 弹匣 (Creedmor 狙击专用弹) 6.5mm CM - 6,5mm CM + 6.5mm CM 6.5mm CM 6,5mm CM 6,5 мм CM @@ -1956,26 +1399,18 @@ 6.5mm CM 6.5mm CM 6,5mm CM - 6.5mm CM - 6.5mm CM - 6.5mm CM 狙擊專用彈 - 6.5mm CM 狙击专用弹 Caliber: 6.5x47mm Creedmor<br />Rounds: 30<br />Used in: MXM Kaliber: 6,5x47mm Creedmor<br />Pociski: 30<br />Używany w: MXM Kaliber: 6,5x47mm Creedmor<br />Patronen: 30<br />Eingesetzt von: MXM - Calibre: 6,5x47mm Creedmor <br />Cartouches: 30<br />Utilisé avec: MXM + Calibre: 6.5x47mm Creedmor <br />Cartouches: 30<br />Utilisé avec: MXM Calibro: 6.5mm Creedmor<br />Munizioni: 30<br />In uso su: MXM Calibre: 6.5mm Creedmor<br />Balas: 30<br />Se usa en: MXM Калибр: 6,5x47мм Creedmor<br />Патронов: 30<br />Используются c: MXM Ráže: 6.5x47mm Creedmor<br />Nábojů: 30<br />Použití u: MXM Calibre: 6.5x47mm Creedmor<br/>Cartuchos: 30<br/>Usado em: MXM Kaliber: 6,5x47mm Creedmor<br />Lövedékek: 30<br />Használható: MXM - 口径: 6.5x47mm Creedmor<br />装填数: 30<br />次で使用: MXM - 구경: 6.5x47mm Creedmor<br />장탄수: 30<br />사용처: MXM - 口徑: 6.5x47mm Creedmor 狙擊專用彈<br />發數: 30<br />使用於: MXM - 口径: 6.5x47mm Creedmor 狙击专用弹<br />发数: 30<br />使用于: MXM .338 10Rnd Mag (300gr Sierra MatchKing HPBT) @@ -1988,10 +1423,6 @@ .338 10náb. Zásobník (300gr Sierra MatchKing HPBT) Carregador .338 (300gr Sierra MatchKing HPBT) com 10 cartuchos .338 10-lövedékes tár (300gr Sierra MatchKing HPBT) - .338 10発入り 弾倉 (300gr Sierra MatchKing HPBT) - 10발들이 .338 탄창 (300gr Sierra MatchKing HPBT) - .338 10發 彈匣 (300公克 Sierra MatchKing 空尖艇尾比賽專用彈) - .338 10发 弹匣 (300公克 Sierra MatchKing 空尖艇尾比赛专用弹) .338 HPBT @@ -2004,14 +1435,10 @@ .338 HPBT .338 HPBT .338 HPBT - 338 HPBT - .338 HPBT - .338 空尖艇尾比賽專用彈 - .338 空尖艇尾比赛专用弹 Caliber: 8.6x70mm (300gr Sierra MatchKing HPBT)<br />Rounds: 10 - Calibre: 8,6x70mm (300gr Sierra MatchKing HPBT)<br />Cartouches: 10 + Calibre: 8.6x70mm (300gr Sierra MatchKing HPBT)<br />Cartouches: 10 Calibre: 8.6x70mm (300gr Sierra MatchKing HPBT)<br />Balas: 10 Kaliber: 8,6x70mm (300gr Sierra MatchKing HPBT)<br />Pociski: 10 Калибр: 8,6x70mm (300 гран Sierra MatchKing экспансивные)<br />Патронов: 10 @@ -2020,10 +1447,6 @@ Ráže: 8.6x70mm (300gr Sierra MatchKing HPBT)<br />Nábojů: 10 Calibre: 8.6x70mm (300gr Sierra MatchKing HPBT)<br/>Cartuchos: 10 Kaliber: 8,6x70mm (300gr Sierra MatchKing HPBT)<br />Lövedékek: 10 - 口径: 8.6x70mm (300gr Sierra MatchKing HPBT)<br />装填数: 10 - 구경: 8.6x70mm (300gr Sierra MatchKing HPBT)<br />장탄수: 10 - 口徑: 8.6x70mm (300公克 Sierra MatchKing 空尖艇尾比賽專用彈)<br />發數: 10 - 口径: 8.6x70mm (300公克 Sierra MatchKing 空尖艇尾比赛专用弹)<br />发数: 10 .338 10Rnd Mag (API526) @@ -2036,10 +1459,6 @@ .338 10náb. Zásobník (API526) Carregador .338 (API526) com 10 cartuchos .338 10-lövedékes tár (API526) - .338 10発入り 弾倉 (API526) - 10발들이 .338 탄창 (API526) - .338 10發 彈匣 (API526 穿甲燃燒彈) - .338 10发 弹匣 (API526 穿甲燃烧弹) .338 AP @@ -2052,14 +1471,10 @@ .338 AP .338 AP .338 páncéltörő - .338 徹甲弾 - .338 철갑탄 - .338 API526 穿甲燃燒彈 - .338 API526 穿甲燃烧弹 Caliber: 8.6x70mm (API526)<br />Rounds: 10 - Calibre: 8,6x70mm (API526)<br />Cartouches: 10 + Calibre: 8.6x70mm (API526)<br />Cartouches: 10 Calibre: 8.6x70mm (API526)<br />Balas: 10 Kaliber: 8,6x70mm (API526)<br />Pociski: 10 Калибр: 8,6x70 мм (API526)<br />Патронов: 10 @@ -2068,62 +1483,10 @@ Ráže: 8.6x70mm (API526)<br />Nábojů: 10 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.6x70mm (API526 穿甲燃烧弹)<br />发数: 10 - - - .408 7Rnd Mag (305gr) - Ch. .408 7Cps (305gr) - Cargador de 7 balas de .408 (305gr) - Magazynek .408 7rd (305gr) - Магазин из 7-ти .408 (305gr) - .408 7-Patronen-Magazin (305gr) - .408 7Rnd Mag (305gr) - .408 7náb. Zásobník (305gr) - Carregador .408 (305gr) com 7 cartuchos - .408 7-lövedékes tár (305gr) - .408 7発入り 弾倉 (305gr) - 7발들이 .408 탄창 (305gr) - .408 7發 彈匣 (305公克) - .408 7发 弹匣 (305公克) - - - .408 - .408 - .408 - .408 - .408 - .408 - .408 - .408 - .408 - .408 - .408 - .408 - .408 - .408 - - - Caliber: .408 CheyTac (305gr)<br />Rounds: 7 - Calibre: .408 CheyTac (305gr)<br />Cartouches: 7 - Calibre: .408 CheyTac (305gr)<br />Balas: 7 - Kaliber: .408 CheyTac (305gr)<br />Pociski: 7 - Калибр: .408 CheyTac (305gr)<br />Патронов: 7 - Kaliber: .408 CheyTac (305gr)<br />Patronen: 7 - Calibro: .408 CheyTac (305gr)<br />Munizioni: 7 - Ráže: .408 CheyTac (305gr)<br />Nábojů: 7 - Calibre: .408 CheyTac (305gr)<br/>Cartuchos: 7 - Kaliber: .408 CheyTac (305gr)<br />Lövedékek: 7 - 口径: .408 CheyTac (305gr)<br />装填数: 7 - 구경: .408 CheyTac (305gr)<br />장탄수: 7 - 口徑: .408 夏伊戰術狙擊彈 (305公克)<br />發數: 7 - 口径: .408 夏伊战术狙击弹 (305公克)<br />发数: 7 12.7x99mm 5Rnd Mag - Ch. 12,7x99mm 5Cps + Ch. 12.7x99mm 5Cps Cargador de 5 balas de 12.7x99mm Magazynek 12,7x99mm 5rd Магазин из 5-ти 12,7x99 мм @@ -2132,14 +1495,10 @@ 12.7x99mm 5náb. Zásobník Carregador 12.7x99mm com 5 cartuchos 12,7x99mm 5-lövedékes tár - 12.7x99mm 5発入り 弾倉 - 5발들이 12.7x99mm 탄창 - 12.7x99mm 5發 彈匣 - 12.7x99mm 5发 弹匣 12.7mm - 12,7mm + 12.7mm 12.7mm 12,7mm 12,7 мм @@ -2148,10 +1507,6 @@ 12.7mm 12.7mm 12,7mm - 12.7mm - 12.7mm - 12.7mm - 12.7mm Caliber: 12.7x99mm<br />Rounds: 5 @@ -2164,14 +1519,10 @@ Ráže: 12.7x99mm<br />Nábojů: 5 Calibre: 12.7x99mm<br/>Cartuchos: 5 Kaliber: 12,7x99mm<br />Lövedékek: 5 - 口径: 12.7x99mm<br />装填数: 5 - 구경: 12.7x99mm<br />장탄수: 5 - 口徑: 12.7x99mm<br />發數: 5 - 口径: 12.7x99mm<br />发数: 5 12.7x99mm API 5Rnd Mag - Ch. 12,7x99mm API 5Cps + Ch. 12.7x99mm API 5Cps Cargador de 5 balas de 12.7x99mm API Magazynek 12,7x99mm API 5rd 12.7x99mm API 5Rnd Mag @@ -2180,14 +1531,10 @@ 12.7x99mm API 5náb. Zásobník Carregador 12.7x99mm API com 5 cartuchos 12,7x99mm 5-lövedékes tár (páncéltörő-gyújtó) - 12.7x99mm 5発入り焼夷徹甲弾 弾倉 - 5발들이 12.7x99mm 철갑소이탄 탄창 - 12.7x99mm 穿甲燃燒彈 5發 彈匣 - 12.7x99mm 穿甲燃烧弹 5发 弹匣 12.7mm API - 12,7mm API + 12.7mm API 12.7mm API 12,7mm API 12.7mm API @@ -2196,14 +1543,10 @@ 12.7mm API 12.7mm API 12,7mm páncéltörő-gyújtó - 12.7mm 焼夷徹甲弾 - 12.7mm 철갑소이탄 - 12.7mm 穿甲燃燒彈 - 12.7mm 穿甲燃烧弹 Caliber: 12.7x99mm API<br />Rounds: 5 - Calibre: 12,7x99mm API<br />Cartouches: 5 + Calibre: 12.7x99mm API<br />Cartouches: 5 Calibre: 12.7x99mm API<br />Balas: 5 Kaliber: 12,7x99mm API<br />Pociski: 5 Калибр: 12,7x99 мм бронебойно-зажигательные<br />Патронов: 5 @@ -2212,14 +1555,10 @@ Ráže: 12.7x99mm API<br />Nábojů: 5 Calibre: 12.7x99mm API<br/>Cartuchos: 5 Kaliber: 12,7x99mm API<br />Lövedékek: 5 - 口径: 12.7x99mm 焼夷徹甲弾<br />装填数: 5 - 구경: 12.7x99mm 철갑소이탄<br />장탄수: 5 - 口徑: 12.7x99mm 穿甲燃燒彈<br />發數: 5 - 口径: 12.7x99mm 穿甲燃烧弹<br />发数: 5 12.7x99mm 5Rnd Mag (AMAX) - Ch. 12,7x99mm 5Cps (AMAX) + Ch. 12.7x99mm 5Cps (AMAX) Cargador de 5 balas de 12.7x99mm (AMAX) Magazynek 12,7x99mm 5rd (AMAX) Магазин из 5-ти 12,7x99 мм (A-MAX) @@ -2228,14 +1567,10 @@ 12.7x99mm 5náb. Zásobník (AMAX) Carregador 12.7x99mm (AMAX) com 5 cartuchos 12,7x99mm 5-lövedékes tár (AMAX) - 12.7x99mm 5発入り 弾倉 (AMAX) - 5발들이 12.7x99mm 탄창 (AMAX) - 12.7x99mm 5發 彈匣 (AMAX 比賽專用彈) - 12.7x99mm 5发 弹匣 (AMAX 比赛专用弹) 12.7mm - 12,7mm + 12.7mm 12.7mm 12,7mm 12,7 мм @@ -2244,14 +1579,10 @@ 12.7mm 12.7mm 12,7mm - 12.7mm - 12.7mm - 12.7mm AMAX 比賽專用彈 - 12.7mm AMAX 比赛专用弹 Caliber: 12.7x99mm (AMAX)<br />Rounds: 5 - Calibre: 12,7x99mm (AMAX)<br />Cartouches: 5 + Calibre: 12.7x99mm (AMAX)<br />Cartouches: 5 Calibre: 12.7x99mm (AMAX)<br />Balas: 5 Kaliber: 12,7x99mm (AMAX)<br />Pociski: 5 Калибр: 12,7x99 мм (A-MAX)<br />Патронов: 5 @@ -2260,10 +1591,6 @@ Ráže: 12.7x99mm (AMAX)<br />Nábojů: 5 Calibre: 12.7x99mm (AMAX)<br/>Cartuchos: 5 Kaliber: 12,7x99mm (AMAX)<br />Lövedékek: 5 - 口径: 12.7x99mm (AMAX)<br />装填数: 5 - 구경: 12.7x99mm (AMAX)<br />장탄수: 5 - 口徑: 12.7x99mm (AMAX 比賽專用彈)<br />發數: 5 - 口径: 12.7x99mm (AMAX 比赛专用弹)<br />发数: 5 [ACE] Ammo Supply Crate @@ -2276,10 +1603,6 @@ [ACE] Lőszeres láda [ACE] Ящик с боеприпасами [ACE] Cassa munizioni - [ACE] 弾薬物資箱 - [ACE] 탄약 보급 상자 - [ACE] 彈藥補給箱 - [ACE] 弹药补给箱 - + \ No newline at end of file diff --git a/addons/captives/XEH_preInit.sqf b/addons/captives/XEH_preInit.sqf index 641da1f5c8..81657a8960 100644 --- a/addons/captives/XEH_preInit.sqf +++ b/addons/captives/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(captivityEnabled) = false; diff --git a/addons/captives/config.cpp b/addons/captives/config.cpp index e9055e896a..b879e906fa 100644 --- a/addons/captives/config.cpp +++ b/addons/captives/config.cpp @@ -20,3 +20,11 @@ class CfgPatches { #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" #include "CfgEden.hpp" + +class ACE_newEvents { + SetSurrendered = QGVAR(setSurrendered); + SetHandcuffed = QGVAR(setHandcuffed); + MoveOutCaptive = QGVAR(moveOutCaptive); + MoveInCaptive = QGVAR(moveInCaptive); + CaptiveStatusChanged = "ace_captiveStatusChanged"; +}; diff --git a/addons/captives/functions/fnc_doEscortCaptive.sqf b/addons/captives/functions/fnc_doEscortCaptive.sqf index ad57dabcd7..e0d3ae8fa6 100644 --- a/addons/captives/functions/fnc_doEscortCaptive.sqf +++ b/addons/captives/functions/fnc_doEscortCaptive.sqf @@ -30,7 +30,7 @@ if (_state) then { _unit setVariable [QGVAR(escortedUnit), _target, true]; //Add Actionmenu to release captive - private _actionID = _unit addAction [format ["%1", localize LSTRING(StopEscorting)], + _actionID = _unit addAction [format ["%1", localize LSTRING(StopEscorting)], {[(_this select 0), ((_this select 0) getVariable [QGVAR(escortedUnit), objNull]), false] call FUNC(doEscortCaptive);}, nil, 20, false, true, "", QUOTE(!isNull (GETVAR(_target,QGVAR(escortedUnit),objNull)))]; diff --git a/addons/captives/functions/fnc_doFriskPerson.sqf b/addons/captives/functions/fnc_doFriskPerson.sqf index 700fba4ffb..d3ddecfd13 100644 --- a/addons/captives/functions/fnc_doFriskPerson.sqf +++ b/addons/captives/functions/fnc_doFriskPerson.sqf @@ -7,7 +7,7 @@ * 1: unit * * Return Value: - * None + * Nothing * * Example: * [player, bob] call ACE_captives_fnc_doFristPerson; diff --git a/addons/captives/functions/fnc_doLoadCaptive.sqf b/addons/captives/functions/fnc_doLoadCaptive.sqf index 82e446b460..2a8bc055ec 100644 --- a/addons/captives/functions/fnc_doLoadCaptive.sqf +++ b/addons/captives/functions/fnc_doLoadCaptive.sqf @@ -8,7 +8,7 @@ * 2: Vehicle to load the captive into. ObjNull for the nearest vehicle * * Return Value: - * None + * Nothing * * Example: * [bob, tom, car] call ACE_captives_fnc_doLoadCaptive @@ -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) || {(vehicle _target) != _target} || {!(_target getVariable [QGVAR(isHandcuffed), false])}) exitWith {ERROR("");}; if (isNull _vehicle) then { //Looking at a captive unit, search for nearby vehicles with valid seats: @@ -44,7 +44,7 @@ if (isNull _vehicle) then { }; }; -if (isNull _vehicle) exitWith {WARNING("Could not find vehicle to load captive");}; +if (isNull _vehicle) exitWith {ERROR("");}; _unit setVariable [QGVAR(isEscorting), false, true]; [QGVAR(moveInCaptive), [_target, _vehicle], [_target]] call CBA_fnc_targetEvent; diff --git a/addons/captives/functions/fnc_doUnloadCaptive.sqf b/addons/captives/functions/fnc_doUnloadCaptive.sqf index 93bdab114c..fd4375e4b7 100644 --- a/addons/captives/functions/fnc_doUnloadCaptive.sqf +++ b/addons/captives/functions/fnc_doUnloadCaptive.sqf @@ -7,7 +7,7 @@ * 1: A captive loaded in a vehicle * * Return Value: - * None + * Nothing * * Example: * [bob, prisoner] call ACE_captives_fnc_doUnloadCaptive diff --git a/addons/captives/functions/fnc_findEmptyNonFFVCargoSeat.sqf b/addons/captives/functions/fnc_findEmptyNonFFVCargoSeat.sqf index 63792a7c55..cf67614f91 100644 --- a/addons/captives/functions/fnc_findEmptyNonFFVCargoSeat.sqf +++ b/addons/captives/functions/fnc_findEmptyNonFFVCargoSeat.sqf @@ -18,22 +18,50 @@ params ["_vehicle"]; TRACE_1("params", _vehicle); -private _vehicleConfig = configFile >> "CfgVehicles" >> (typeOf _vehicle); +_vehicleConfig = configFile >> "CfgVehicles" >> (typeOf _vehicle); -scopeName "main"; +_proxyOrder = getArray (_vehicleConfig >> "getInProxyOrder"); +_transportSoldier = getNumber (_vehicleConfig >> "transportSoldier"); +_realCargoCount = if (isArray (_vehicleConfig >> "getInProxyOrder")) then {count _proxyOrder} else {_transportSoldier}; +//Find FFV turrets: +_ffvCargoIndexes = []; { - _x params ["_unit", "_role", "_cargoIndex", "_turretPath", "_isPersonTurret"]; - if ((isNull _unit) && {_role == "cargo"} && {_cargoIndex > -1} && {!_isPersonTurret}) then { - [_cargoIndex, false] breakOut "main"; - }; -} forEach (fullCrew [_vehicle, "", true]); + _turretConfig = [_vehicleConfig, _x] call EFUNC(common,getTurretConfigPath); + _isCargoProxy = ((getText (_turretConfig >> "proxyType")) == "CPCargo") && {isNumber (_turretConfig >> "proxyIndex")}; + if (_isCargoProxy) then { + _proxyCargoIndex = getNumber (_turretConfig >> "proxyIndex"); + _cargoIndex = _proxyOrder find _proxyCargoIndex; + _ffvCargoIndexes pushBack _cargoIndex; + }; +} forEach (allTurrets [_vehicle, true]); + +//Find Empty Seats: +_occupiedSeats = []; { - _x params ["_unit", "_role", "_cargoIndex", "_turretPath", "_isPersonTurret"]; - if ((isNull _unit) && {_cargoIndex > -1}) then { - [_cargoIndex, true] breakOut "main"; - }; -} forEach (fullCrew [_vehicle, "", true]); + _x params ["", "", "_xIndex"]; + if (_xIndex > -1) then {_occupiedSeats pushBack _xIndex;}; +} forEach (fullCrew _vehicle); -[-1, false] +TRACE_3("Searching for empty seat",_realCargoCount,_ffvCargoIndexes,_occupiedSeats); + +_emptyCargoSeatReturn = [-1, false]; + +//First seach for non-ffv seats: +for "_index" from 0 to (_realCargoCount - 1) do { + if ((!(_index in _ffvCargoIndexes)) && {!(_index in _occupiedSeats)}) exitWith { + _emptyCargoSeatReturn = [_index, false]; + }; +}; + +//Only use FFV if none found: +if (_emptyCargoSeatReturn isEqualTo [-1, false]) then { + for "_index" from 0 to (_realCargoCount - 1) do { + if (!(_index in _occupiedSeats)) exitWith { + _emptyCargoSeatReturn = [_index, true]; + }; + }; +}; + +_emptyCargoSeatReturn diff --git a/addons/captives/functions/fnc_handleAnimChangedHandcuffed.sqf b/addons/captives/functions/fnc_handleAnimChangedHandcuffed.sqf index f71a3f04a3..2f55d51fc3 100644 --- a/addons/captives/functions/fnc_handleAnimChangedHandcuffed.sqf +++ b/addons/captives/functions/fnc_handleAnimChangedHandcuffed.sqf @@ -6,12 +6,9 @@ * 0: The Unit * 1: New animation * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob, "movearm"] call ACE_captives_fnc_handleAnimChangedHandcuffed - * * Public: No */ @@ -26,7 +23,7 @@ if (_unit == (vehicle _unit)) then { [_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation); }; } else { - private _turretPath = []; + _turretPath = []; { _x params ["_xUnit", "", "", "_xTurretPath"]; if (_unit == _xUnit) exitWith {_turretPath = _xTurretPath}; diff --git a/addons/captives/functions/fnc_handleAnimChangedSurrendered.sqf b/addons/captives/functions/fnc_handleAnimChangedSurrendered.sqf index 304926600f..cf17d8b873 100644 --- a/addons/captives/functions/fnc_handleAnimChangedSurrendered.sqf +++ b/addons/captives/functions/fnc_handleAnimChangedSurrendered.sqf @@ -6,12 +6,9 @@ * 0: The Unit * 1: New animation * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob, "movearm"] call ACE_captives_fnc_handleAnimChangedSurrendered - * * Public: No */ diff --git a/addons/captives/functions/fnc_handleGetIn.sqf b/addons/captives/functions/fnc_handleGetIn.sqf index 60f1ecf9b9..d89049a031 100644 --- a/addons/captives/functions/fnc_handleGetIn.sqf +++ b/addons/captives/functions/fnc_handleGetIn.sqf @@ -31,7 +31,7 @@ if (local _unit) then { if (_unit getVariable [QGVAR(isHandcuffed), false]) then { //Need to force animation for FFV turrets - private _turretPath = []; + _turretPath = []; { _x params ["_xUnit", "", "", "_xTurretPath"]; if (_unit == _xUnit) exitWith {_turretPath = _xTurretPath}; diff --git a/addons/captives/functions/fnc_handleLocal.sqf b/addons/captives/functions/fnc_handleLocal.sqf index ee11e74fcb..693eb844fd 100644 --- a/addons/captives/functions/fnc_handleLocal.sqf +++ b/addons/captives/functions/fnc_handleLocal.sqf @@ -6,12 +6,9 @@ * 0: The Unit * 1: Is local * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob, true] call ACE_captives_fnc_handleLocal - * * Public: No */ diff --git a/addons/captives/functions/fnc_handleOnUnconscious.sqf b/addons/captives/functions/fnc_handleOnUnconscious.sqf index d89d18c506..456161d9de 100644 --- a/addons/captives/functions/fnc_handleOnUnconscious.sqf +++ b/addons/captives/functions/fnc_handleOnUnconscious.sqf @@ -7,7 +7,7 @@ * 0: Is Unconsisisiouses * * Return Value: - * None + * Nothing * * Example: * [bob, true] call ACE_captives_fnc_handleOnUnconscious diff --git a/addons/captives/functions/fnc_handleRespawn.sqf b/addons/captives/functions/fnc_handleRespawn.sqf index 98672798fd..b95438fa22 100644 --- a/addons/captives/functions/fnc_handleRespawn.sqf +++ b/addons/captives/functions/fnc_handleRespawn.sqf @@ -7,7 +7,7 @@ * 1: Corpse * * Return Value: - * None + * Nothing * * Example: * [alive, body] call ACE_captives_fnc_handleRespawn; @@ -46,7 +46,7 @@ if (_respawn > 3) then { }; [_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set); - if (_unit getVariable [QGVAR(isEscorting), false]) then { - _unit setVariable [QGVAR(isEscorting), false, true]; + if (_oldUnit getVariable [QGVAR(isEscorting), false]) then { + _oldUnit setVariable [QGVAR(isEscorting), false, true]; }; }; diff --git a/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf b/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf index bdb1450874..433c1fc259 100644 --- a/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf +++ b/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf @@ -8,7 +8,7 @@ * 1: Display is now open * * Return Value: - * None + * Nothing * * Example: * [bob1, false] call ACE_captives_fnc_handleZeusDisplayChanged diff --git a/addons/captives/functions/fnc_moduleHandcuffed.sqf b/addons/captives/functions/fnc_moduleHandcuffed.sqf index 5b04696678..b2e0b431b3 100644 --- a/addons/captives/functions/fnc_moduleHandcuffed.sqf +++ b/addons/captives/functions/fnc_moduleHandcuffed.sqf @@ -9,7 +9,7 @@ * 2: Activated * * Return Value: - * None + * Nothing * * Example: * [objNull, [player], true] call ace_captives_fnc_moduleHandcuffed diff --git a/addons/captives/functions/fnc_moduleSettings.sqf b/addons/captives/functions/fnc_moduleSettings.sqf index 6be3fb8d56..fc8c76721f 100644 --- a/addons/captives/functions/fnc_moduleSettings.sqf +++ b/addons/captives/functions/fnc_moduleSettings.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [LOGIC] call ace_captives_fnc_moduleSettings - * * Public: No */ diff --git a/addons/captives/functions/fnc_moduleSurrender.sqf b/addons/captives/functions/fnc_moduleSurrender.sqf index 9f3bd8cdf9..c4482ce904 100644 --- a/addons/captives/functions/fnc_moduleSurrender.sqf +++ b/addons/captives/functions/fnc_moduleSurrender.sqf @@ -9,7 +9,7 @@ * 2: Activated * * Return Value: - * None + * Nothing * * Example: * [objNull, [player], true] call ace_captives_fnc_moduleSurrender diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index 9a713af0b4..1859bfb0b1 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -7,7 +7,7 @@ * 1: True to take captive, false to release captive * * Return Value: - * None + * Nothing * * Example: * [bob, true] call ACE_captives_fnc_setHandcuffed; @@ -20,7 +20,7 @@ params ["_unit","_state"]; TRACE_2("params",_unit,_state); if (!local _unit) exitWith { - WARNING("running setHandcuffed on remote unit"); + ERROR("running setHandcuffed on remote unit"); }; if !(missionNamespace getVariable [QGVAR(captivityEnabled), false]) exitWith { @@ -35,7 +35,7 @@ if !(missionNamespace getVariable [QGVAR(captivityEnabled), false]) exitWith { }; if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith { - WARNING("setHandcuffed: current state same as new"); + ERROR("setHandcuffed: current state same as new"); }; if (_state) then { diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index a0551d0219..6acd3436aa 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -7,7 +7,7 @@ * 1: True to surrender, false to un-surrender * * Return Value: - * None + * Nothing * * Example: * [Pierre, true] call ACE_captives_fnc_setSurrendered; @@ -20,7 +20,7 @@ params ["_unit","_state"]; TRACE_2("params",_unit,_state); if (!local _unit) exitWith { - WARNING("running surrender on remote unit"); + ERROR("running surrender on remote unit"); }; if !(missionNamespace getVariable [QGVAR(captivityEnabled), false]) exitWith { @@ -35,12 +35,12 @@ if !(missionNamespace getVariable [QGVAR(captivityEnabled), false]) exitWith { }; if ((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _state) exitWith { - WARNING("Surrender: current state same as new"); + ERROR("Surrender: current state same as new"); }; if (_state) then { - if ((vehicle _unit) != _unit) exitWith {WARNING("Cannot surrender while mounted");}; - if (_unit getVariable [QGVAR(isHandcuffed), false]) exitWith {WARNING("Cannot surrender while handcuffed");}; + if ((vehicle _unit) != _unit) exitWith {ERROR("Cannot surrender while mounted");}; + if (_unit getVariable [QGVAR(isHandcuffed), false]) exitWith {ERROR("Cannot surrender while handcuffed");}; _unit setVariable [QGVAR(isSurrendering), true, true]; diff --git a/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf b/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf index fa1d920a0d..dbd3e0af5c 100644 --- a/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf +++ b/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf @@ -7,7 +7,7 @@ * 1: The Vehicle * * Return Value: - * None + * Nothing * * Example: * [bob, car1] call ACE_captives_fnc_vehicleCaptiveMoveIn; @@ -19,10 +19,10 @@ params ["_target","_vehicle"]; TRACE_2("params",_target,_vehicle); -private _getSeat = [_vehicle] call FUNC(findEmptyNonFFVCargoSeat); +_getSeat = [_vehicle] call FUNC(findEmptyNonFFVCargoSeat); TRACE_1("free cargo seat",_getSeat); _getSeat params ["_cargoIndex"]; -if (_cargoIndex == -1) exitWith {WARNING("cargo index -1");}; +if (_cargoIndex == -1) exitWith {ERROR("cargo index -1");}; _target moveInCargo [_vehicle, _cargoIndex]; _target assignAsCargoIndex [_vehicle, _cargoIndex]; diff --git a/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf b/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf index 329adc1740..ce44b5926f 100644 --- a/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf +++ b/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf @@ -6,7 +6,7 @@ * 0: Captive Unit being unloaded * * Return Value: - * None + * Nothing * * Example: * [bob] call ACE_captives_fnc_vehicleCaptiveMoveOut; diff --git a/addons/captives/script_component.hpp b/addons/captives/script_component.hpp index c0cbefe5b2..415ca8f4fd 100644 --- a/addons/captives/script_component.hpp +++ b/addons/captives/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_CAPTIVES diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 467d06bd83..fbb3d11541 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Tomar Prisioneiro Foglyul ejtés Взять в плен - 捕虜にする - 사로잡기 - 逮捕俘虜 - 逮捕俘虏 Free Prisoner @@ -28,10 +24,6 @@ Libertar Prisioneiro Fogoly szabadon engedése Освободить пленника - 捕虜を解放する - 풀어주기 - 釋放俘虜 - 释放俘虏 Escort Prisoner @@ -44,10 +36,6 @@ Escoltar Prisioneiro Fogoly kísérése Конвоировать пленника - 捕虜を移動させる - 포로 호송하기 - 護送俘虜 - 护送俘虏 Release Prisoner @@ -60,10 +48,6 @@ Largar Prisioneiro Fogoly elengedése Прекратить конвоирование - 捕虜を解放する - 포로 풀어주기 - 停止護送俘虜 - 停止护送俘虏 You need to take him as prisoner first! @@ -76,10 +60,6 @@ Você deve tomá-lo como prisioneiro primeiro! Először foglyul kell ejtened őt! Вы должны сначала взять его в плен! - あなたは先に捕虜を取る必要があります。 - 먼저 포로로 만들어야합니다! - 你必須先逮捕他! - 你必须先逮捕他! Load Captive @@ -92,10 +72,6 @@ Загрузить пленного Embarcar Prisioneiro Fai salire il prigioniero - 捕虜を乗せる - 포로 태우기 - 將俘虜放入載具 - 将俘虏放入载具 Unload Captive @@ -108,10 +84,6 @@ Выгрузить пленного Desembarcar Prisioneiro Fai scendere il prigioniero - 捕虜を降ろす - 포로 내리기 - 將俘虜帶出載具 - 将俘虏带出载具 Cable Tie @@ -124,10 +96,6 @@ Fascietta Gyorskötöző Кабельная стяжка - ケーブル タイ - 케이블 타이 - 束線帶 - 束线带 Cable ties that allow you to restrain prisoners. @@ -140,10 +108,6 @@ Fascetta per arrestare i prigionieri Gyorskötöző, emberek foglyulejtéséhez használható. Кабельные стяжки позволяют связывать пленников. - ケーブル タイは捕虜を制圧できます。 - 케이블 타이는 포로를 구류시킬때 씁니다. - 束線帶可以綁住俘虜 - 束线带可以绑住俘虏 Inventory of frisked person @@ -156,10 +120,6 @@ Инвентарь обысканного человека Inventário da pessoa revistada Inventario della persona perquisita - 捕虜の持ち物を確認する - 검문당한 사람의 소지품 - 搜身選單 - 搜身选单 Frisk person @@ -172,10 +132,6 @@ Обыскать человека Revistar Perquisisci la persona - 捕虜の持ち物 - 검문당한사람 - 搜身 - 搜身 Surrender @@ -188,10 +144,6 @@ Сдаться Megadás Arrenditi - 投降 - 투항 - 投降 - 投降 Stop Surrendering @@ -204,10 +156,6 @@ Прекратить сдачу в плен Megadás abbahagyása Smetti di arrenderti - 投降をやめる - 투항하는것을 멈춤 - 停止投降 - 停止投降 Make Unit Surrender @@ -220,10 +168,6 @@ Egység kapitulálása Заставить юнита сдаться Fai arrendere l'unità - ユニットを投降させる - 투항시키기 - 使單位投降 - 使单位投降 Sync a unit to make them surrender. @@ -236,10 +180,6 @@ Egység szinkronizálása, hogy kapituláljon. Синхронизируйте с юнитами, чтобы заставить их сдаться в плен. Sincronizza una unità per farla arrendere. - 同期されたユニットを投降させます。 - 투항시키기 위해 동기화합니다. - 同步此模塊到一個單位, 使該單位投降 - 同步此模块到一个单位, 使该单位投降 Make Unit Handcuffed @@ -251,10 +191,6 @@ Metti manette all'unità Hacer que la unidad esté esposada Rendre une unité captive - ユニットを拘束する - 수갑을 채우기 - 使單位戴上手銬 - 使单位戴上手铐 Sync a unit to make them handcuffed. @@ -266,10 +202,6 @@ Sincronizza un'unità per metterle le manette. Sincroniza una unidad para hacer que esté esposada. Synchronisez une unité pour la rendre captive. - 同期されたユニットを拘束させます。 - 수갑을 채우기 위해 동기화합니다. - 使單位戴上手銬 - 使单位戴上手铐 Captives Settings @@ -282,10 +214,6 @@ Fogoly-beállítások Настройки пленения Impostazioni Prigionieri - 拘束の設定 - 포로 설정 - 俘虜設定 - 俘虏设定 Controls settings for surrender and cable ties @@ -298,10 +226,6 @@ Szabályozza a kapituláció és bilincselés beállításait Управляет настройками сдачи в плен и связывания Controlla le impostazioni per la resa e le manette - 投降したユニットや拘束されたユニットの扱いを設定します。 - 투항과 케이블 타이에 관련한 설정 - 定義投降與束帶等設定 - 定义投降与束带等设定 Can handcuff own side @@ -314,10 +238,6 @@ Saját oldal megbilincselhető Связать союзника Puoi ammanettare unità alleate - 自陣営への拘束を可能に - 자기편에게 수갑을 채울 수 있게 합니다 - 可以銬住同陣營隊友 - 可以铐住同阵营队友 Can players cabletie units on their own side @@ -330,10 +250,6 @@ A játékosok megkötözhetik-e a saját oldalukon lévő egységeket Разрешить игрокам связывать юнитов своей стороны I giocatori possono ammanettare unità alleate - プレイヤーがユニットを拘束し、彼らの陣営に変更できます。 - 자기편에게 케이블타이를 사용할 수 있게합니다 - 玩家可以使用束線帶銬住同陣營隊友 - 玩家可以使用束线带铐住同阵营队友 Allow surrendering @@ -346,10 +262,6 @@ Kapituláció engedélyezése Сдаться в плен Permetti Resa - 投降を許可 - 투항 활성화 - 允許投降 - 允许投降 Players can surrender after holstering their weapon @@ -362,10 +274,6 @@ A játékosok megadhatják magukat a fegyverük elrakása után Игроки могут сдаться в плен после того, как уберут оружие I giocatori possono arrendersi dopo aver messo via le proprie armi - プレイヤーは武器を収めたあとに投降できるようにします。 - 비무장한 플레이어가 투항할 수 있게 합니다 - 玩家能在收起自己武器後投降 - 玩家能在收起自己武器后投降 Require surrendering @@ -377,10 +285,6 @@ Vzdávání vyžadováno Richiedi Resa Requiert la reddition - 投降を必要とする - 투항 필요 - 要求目標投降 - 要求目标投降 Require Players to surrender before they can be arrested @@ -392,10 +296,6 @@ Vyžaduje, aby se hráč nejdříve vzdal, poté může být spoután I giocatori devono arrendersi prima che possano essere arrestati Requiert la capitulation des joueurs avant qu'ils ne puissent être arrêtés - プレイヤーは拘束される前に、投降する必要があります。 - 체포하기 전에 플레이어가 투항을 먼저해야만 합니다 - 玩家須先要求目標投降, 才可以進行逮捕 - 玩家须先要求目标投降, 才可以进行逮捕 Surrendering only @@ -407,10 +307,6 @@ Pouze vzdávání Solo Resa Reddition seulement - 投降中のみ - 투항 중에만 - 只能在投降狀態 - 只能在投降状态 Surrendering or No weapon @@ -422,10 +318,6 @@ Vzdávání nebo beze zbraně Resa o senza armi Capitulation ou desarmé - 投降中か非武装時 - 투항 중 혹은 비무장 - 投降或無武器狀態 - 投降或无武器状态 diff --git a/addons/cargo/ACE_Settings.hpp b/addons/cargo/ACE_Settings.hpp index 595de28459..574000155e 100644 --- a/addons/cargo/ACE_Settings.hpp +++ b/addons/cargo/ACE_Settings.hpp @@ -6,11 +6,4 @@ class ACE_Settings { value = 1; category = ECSTRING(OptionsMenu,CategoryLogistics); }; - class GVAR(paradropTimeCoefficent) { - displayName = CSTRING(paradropTimeCoefficent); - description = CSTRING(paradropTimeCoefficent_description); - typeName = "SCALAR"; - value = 2.5; - category = ECSTRING(OptionsMenu,CategoryLogistics); - }; }; diff --git a/addons/cargo/CfgEden.hpp b/addons/cargo/CfgEden.hpp deleted file mode 100644 index 9144ba458b..0000000000 --- a/addons/cargo/CfgEden.hpp +++ /dev/null @@ -1,37 +0,0 @@ -class Cfg3DEN { - class Object { - class AttributeCategories { - class ace_attributes { - class Attributes { - class GVAR(space) { - displayName = CSTRING(space_edenName); - tooltip = CSTRING(space_edenDesc); - property = QGVAR(space); - control = "Edit"; - - expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSpace);); - defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(space),0)); - - validate = "number"; - condition = "objectHasInventoryCargo"; - typeName = "NUMBER"; - }; - class GVAR(size) { - displayName = CSTRING(size_edenName); - tooltip = CSTRING(size_edenDesc); - property = QGVAR(size); - control = "Edit"; - - // Expression only runs on the server, must handle actions for all machines and future JIPs (Why BI?!) - expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSize);); - defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(size),-1)); - - validate = "number"; - condition = "1-objectBrain"; - typeName = "NUMBER"; - }; - }; - }; - }; - }; -}; diff --git a/addons/cargo/CfgEventHandlers.hpp b/addons/cargo/CfgEventHandlers.hpp index 823dc87470..45f6d48997 100644 --- a/addons/cargo/CfgEventHandlers.hpp +++ b/addons/cargo/CfgEventHandlers.hpp @@ -24,3 +24,52 @@ class Extended_Killed_EventHandlers { }; }; }; + +//Need initPost or we have problems with setVariable with 'ACE_Cargo' +class Extended_InitPost_EventHandlers { + class ThingX { + class ADDON { + init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); + }; + }; + class Land_PaperBox_closed_F { + class ADDON { + init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); + }; + }; + class PlasticCase_01_base_F { + class ADDON { + init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); + }; + }; + class LandVehicle { + class ADDON { + init = QUOTE(_this call DFUNC(initVehicle)); + }; + }; + class Air { + class ADDON { + init = QUOTE(_this call DFUNC(initVehicle)); + }; + }; + class Ship_F { + class ADDON { + init = QUOTE(_this call DFUNC(initVehicle)); + }; + }; + class ACE_ConcertinaWireCoil { + class ADDON { + init = QUOTE(_this call DFUNC(initObject)); + }; + }; + class Land_PortableLight_single_F { + class ADDON { + init = QUOTE(_this call DFUNC(initObject)); + }; + }; + class StaticWeapon { + class ADDON { + init = QUOTE(_this call DFUNC(initObject)); + }; + }; +}; diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp index b8d5b30415..9d4c34182f 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -26,12 +26,6 @@ class CfgVehicles { typeName = "BOOL"; defaultValue = 1; }; - class paradropTimeCoefficent { - displayName = CSTRING(paradropTimeCoefficent); - description = CSTRING(paradropTimeCoefficent_description); - typeName = "SCALAR"; - defaultValue = 2.5; - }; }; class ModuleDescription { @@ -265,17 +259,12 @@ class CfgVehicles { GVAR(space) = 4; }; - // planes (off by default as most are attack jets) + // jets class Plane: Air { GVAR(space) = 0; GVAR(hasCargo) = 0; }; - class Plane_Base_F: Plane {}; - class Plane_Civil_01_base_F: Plane_Base_F { // Tanoa Civilian Prop Plane - GVAR(space) = 2; - GVAR(hasCargo) = 1; - }; class VTOL_Base_F; class VTOL_01_base_F: VTOL_Base_F { GVAR(space) = 4; @@ -285,7 +274,7 @@ class CfgVehicles { GVAR(space) = 4; GVAR(hasCargo) = 1; }; - + // autonomus class UAV_01_base_F: Helicopter_Base_F { GVAR(space) = 0; @@ -327,6 +316,26 @@ class CfgVehicles { GVAR(canLoad) = 1; }; + // Taru pods + class Pod_Heli_Transport_04_base_F; + class Land_Pod_Heli_Transport_04_ammo_F: Pod_Heli_Transport_04_base_F { + GVAR(space) = 8; + GVAR(hasCargo) = 1; + }; + class Land_Pod_Heli_Transport_04_box_F: Pod_Heli_Transport_04_base_F { + GVAR(space) = 20; + GVAR(hasCargo) = 1; + }; + class Land_Pod_Heli_Transport_04_repair_F: Pod_Heli_Transport_04_base_F { + GVAR(space) = 12; + GVAR(hasCargo) = 1; + }; + class Pod_Heli_Transport_04_crewed_base_F; + class Land_Pod_Heli_Transport_04_medevac_F: Pod_Heli_Transport_04_crewed_base_F { + GVAR(space) = 8; + GVAR(hasCargo) = 1; + }; + class StaticMortar; class Mortar_01_base_F: StaticMortar { GVAR(size) = 2; // 1 = small, 2 = large @@ -355,57 +364,8 @@ class CfgVehicles { class CargoNet_01_base_F: Slingload_base_F { //Slingload pallets GVAR(size) = 6; }; - - //Huron 20ft containers - class Slingload_01_Base_F: Slingload_base_F { + class Slingload_01_Base_F: Slingload_base_F { //Huron 20ft containers GVAR(canLoad) = 0; - GVAR(size) = -1; - }; - class B_Slingload_01_Cargo_F: Slingload_01_Base_F { // Huron Cargo - GVAR(space) = 20; - GVAR(hasCargo) = 1; - }; - class B_Slingload_01_Ammo_F: Slingload_01_Base_F { // Huron Ammo - GVAR(space) = 8; - GVAR(hasCargo) = 1; - }; - class B_Slingload_01_Medevac_F: Slingload_01_Base_F { // Huron Medevac - GVAR(space) = 8; - GVAR(hasCargo) = 1; - }; - class B_Slingload_01_Repair_F: Slingload_01_Base_F { // Huron Repair - GVAR(space) = 12; - GVAR(hasCargo) = 1; - }; - - // Taru pods - class Pod_Heli_Transport_04_base_F: Slingload_base_F { - GVAR(canLoad) = 0; - GVAR(size) = -1; - }; - class Land_Pod_Heli_Transport_04_ammo_F: Pod_Heli_Transport_04_base_F { - GVAR(space) = 8; - GVAR(hasCargo) = 1; - }; - class Land_Pod_Heli_Transport_04_box_F: Pod_Heli_Transport_04_base_F { - GVAR(space) = 20; - GVAR(hasCargo) = 1; - }; - class Land_Pod_Heli_Transport_04_repair_F: Pod_Heli_Transport_04_base_F { - GVAR(space) = 12; - GVAR(hasCargo) = 1; - }; - class Pod_Heli_Transport_04_crewed_base_F: StaticWeapon { - GVAR(canLoad) = 0; - GVAR(size) = -1; - }; - class Land_Pod_Heli_Transport_04_covered_F: Pod_Heli_Transport_04_crewed_base_F { - GVAR(space) = 8; - GVAR(hasCargo) = 1; - }; - class Land_Pod_Heli_Transport_04_medevac_F: Pod_Heli_Transport_04_crewed_base_F { - GVAR(space) = 8; - GVAR(hasCargo) = 1; }; //Plastic and metal case diff --git a/addons/cargo/XEH_PREP.hpp b/addons/cargo/XEH_PREP.hpp index 8b7d3c5d4f..8224ec0029 100644 --- a/addons/cargo/XEH_PREP.hpp +++ b/addons/cargo/XEH_PREP.hpp @@ -1,8 +1,9 @@ PREP(addCargoItem); -PREP(addCargoVehiclesActions); +PREP(canLoad); PREP(canLoadItemIn); PREP(canUnloadItem); +PREP(findNearestVehicle); PREP(getCargoSpaceLeft); PREP(getSizeItem); PREP(handleDestroyed); @@ -14,8 +15,6 @@ PREP(moduleMakeLoadable); PREP(moduleSettings); PREP(onMenuOpen); PREP(paradropItem); -PREP(setSize); -PREP(setSpace); PREP(startLoadIn); PREP(startUnload); PREP(unloadItem); diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 051c77ec9c..6b7320d5ae 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -51,28 +51,3 @@ _item hideObjectGlobal false; _item setPosASL (AGLtoASL _emptyPosAGL); }] call CBA_fnc_addEventHandler; - -// Private events to handle adding actions globally via public functions -[QGVAR(initObject), DFUNC(initObject)] call CBA_fnc_addEventHandler; -[QGVAR(initVehicle), DFUNC(initVehicle)] call CBA_fnc_addEventHandler; - -// Add all the vehicle init EHs (require initPost for set/get variables) -["LandVehicle", "initPost", DFUNC(initVehicle), nil, nil, true] call CBA_fnc_addClassEventHandler; -["Air", "initPost", DFUNC(initVehicle), nil, nil, true] call CBA_fnc_addClassEventHandler; -["Ship_F", "initPost", DFUNC(initVehicle), nil, nil, true] call CBA_fnc_addClassEventHandler; - -// Add all the object init EHs -["StaticWeapon", "initPost", DFUNC(initObject), nil, nil, true] call CBA_fnc_addClassEventHandler; -["Land_PortableLight_single_F", "initPost", DFUNC(initObject), nil, nil, true] call CBA_fnc_addClassEventHandler; -["ACE_ConcertinaWireCoil", "initPost", DFUNC(initObject), nil, nil, true] call CBA_fnc_addClassEventHandler; - -// Add all the vehicle/object init EHs -["ThingX", "initPost", { - _this call DFUNC(initObject); _this call DFUNC(initVehicle); -}, nil, nil, true] call CBA_fnc_addClassEventHandler; -["Land_PaperBox_closed_F", "initPost", { - _this call DFUNC(initObject); _this call DFUNC(initVehicle); -}, nil, nil, true] call CBA_fnc_addClassEventHandler; -["PlasticCase_01_base_F", "initPost", { - _this call DFUNC(initObject); _this call DFUNC(initVehicle); -}, nil, nil, true] call CBA_fnc_addClassEventHandler; diff --git a/addons/cargo/XEH_preInit.sqf b/addons/cargo/XEH_preInit.sqf index 5ee6406a7d..a24ce048b5 100644 --- a/addons/cargo/XEH_preInit.sqf +++ b/addons/cargo/XEH_preInit.sqf @@ -2,12 +2,9 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(initializedItemClasses) = []; GVAR(initializedVehicleClasses) = []; -GVAR(cargoHolderTypes) = ["Car", "Air", "Tank", "Ship", "Cargo_base_F", "Land_PaperBox_closed_F"]; ADDON = true; diff --git a/addons/cargo/config.cpp b/addons/cargo/config.cpp index 31f01ffd72..c368cab8d5 100644 --- a/addons/cargo/config.cpp +++ b/addons/cargo/config.cpp @@ -15,7 +15,16 @@ class CfgPatches { }; #include "ACE_Settings.hpp" -#include "CfgEden.hpp" #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "menu.hpp" + +class ACE_newEvents { + LoadCargo = "ace_loadCargo"; + cargoUnloaded = "ace_cargoUnloaded"; + cargoLoaded = "ace_cargoLoaded"; + AddCargoByClass = "ace_addCargo"; + ServerUnloadCargo = QGVAR(serverUnload); + UnloadCargo = "ace_unloadCargo"; + cargoAddedByClass = "ace_cargoAdded"; +}; diff --git a/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf b/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf deleted file mode 100644 index 176b2f31b6..0000000000 --- a/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Author: Dystopian - * Create actions for nearest vehicles with cargo. - * - * Arguments: - * 0: Target - * 1: Player - * - * Return Value: - * Children actions - * - * Example: - * [target, player] call ace_cargo_fnc_addCargoVehiclesActions - * - * Public: No - */ -#include "script_component.hpp" - -params ["_target", "_player"]; - -private _statement = { - params ["_target", "_player", "_params"]; - _params params ["_vehicle"]; - [_player, _target, _vehicle] call FUNC(startLoadIn); -}; - -private _actions = []; - -{ - private _config = configFile >> "CfgVehicles" >> typeOf _x; - private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false]; - private _hasCargoConfig = getNumber (_config >> QGVAR(hasCargo)) == 1; - if ((_hasCargoPublic || _hasCargoConfig) && {_x != _target}) then { - private _name = getText (_config >> "displayName"); - private _ownerName = [_x, true] call EFUNC(common,getName); - if ("" != _ownerName) then { - _name = format ["%1 (%2)", _name, _ownerName]; - }; - private _icon = (getText (_config >> "icon")) call BIS_fnc_textureVehicleIcon; - private _action = [format ["%1", _x], _name, _icon, _statement, {true}, {}, [_x]] call EFUNC(interact_menu,createAction); - _actions pushBack [_action, [], _target]; - }; -} forEach (nearestObjects [_player, GVAR(cargoHolderTypes), MAX_LOAD_DISTANCE]); - -_actions diff --git a/addons/cargo/functions/fnc_canLoad.sqf b/addons/cargo/functions/fnc_canLoad.sqf new file mode 100644 index 0000000000..f576ea3e79 --- /dev/null +++ b/addons/cargo/functions/fnc_canLoad.sqf @@ -0,0 +1,36 @@ +/* + * Author: Glowbal + * Check if player can load an item into the nearest vehicle. + * + * Arguments: + * 0: Player + * 1: Object to load + * + * Return Value: + * Can load + * + * Example: + * [player, object] call ace_cargo_fnc_canLoad + * + * Public: No + */ +#include "script_component.hpp" + +params ["_player", "_object"]; +TRACE_2("params",_player,_object); + +if (!([_player, _object, []] call EFUNC(common,canInteractWith))) exitWith {false}; + +private _nearestVehicle = [_player] call FUNC(findNearestVehicle); + +if (_nearestVehicle isKindOf "Cargo_Base_F" || isNull _nearestVehicle) then { + { + if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_nearestVehicle = _x}; + } forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]); +}; + +if (isNull _nearestVehicle) exitWith {false}; + +if ((locked _nearestVehicle) >= 2) exitWith {false}; + +[_object, _nearestVehicle] call FUNC(canLoadItemIn) diff --git a/addons/cargo/functions/fnc_canLoadItemIn.sqf b/addons/cargo/functions/fnc_canLoadItemIn.sqf index 092272f94f..e2bb1ecc4d 100644 --- a/addons/cargo/functions/fnc_canLoadItemIn.sqf +++ b/addons/cargo/functions/fnc_canLoadItemIn.sqf @@ -20,11 +20,6 @@ params [["_item", "", [objNull,""]], "_vehicle"]; if (speed _vehicle > 1 || {((getPos _vehicle) select 2) > 3}) exitWith {TRACE_1("vehicle not stable",_vehicle); false}; -if (_item isEqualType objNull && {{alive _x && {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0}) exitWith { - TRACE_1("item is occupied",_item); - false -}; - private _itemSize = [_item] call FUNC(getSizeItem); private _validItem = false; if (_item isEqualType "") then { @@ -40,5 +35,4 @@ if (_item isEqualType "") then { _validItem && {_itemSize > 0} && {alive _vehicle} && -{_itemSize <= ([_vehicle] call FUNC(getCargoSpaceLeft))} && -{locked _vehicle < 2} +{_itemSize <= ([_vehicle] call FUNC(getCargoSpaceLeft))} diff --git a/addons/cargo/functions/fnc_findNearestVehicle.sqf b/addons/cargo/functions/fnc_findNearestVehicle.sqf new file mode 100644 index 0000000000..6d5b7ce1a8 --- /dev/null +++ b/addons/cargo/functions/fnc_findNearestVehicle.sqf @@ -0,0 +1,35 @@ +/* + * Author: Glowbal + * Get nearest vehicle from unit, priority: Car-Air-Tank-Ship. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Vehicle in Distance + * + * Example: + * [unit] call ace_cargo_fnc_findNearestVehicle + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit"]; + +private _loadCar = nearestObject [_unit, "car"]; +if (_unit distance _loadCar <= MAX_LOAD_DISTANCE) exitWith {_loadCar}; + +private _loadHelicopter = nearestObject [_unit, "air"]; +if (_unit distance _loadHelicopter <= MAX_LOAD_DISTANCE) exitWith {_loadHelicopter}; + +private _loadTank = nearestObject [_unit, "tank"]; +if (_unit distance _loadTank <= MAX_LOAD_DISTANCE) exitWith {_loadTank}; + +private _loadShip = nearestObject [_unit, "ship"]; +if (_unit distance _loadShip <= MAX_LOAD_DISTANCE) exitWith {_loadShip}; + +private _loadContainer = nearestObject [_unit,"Cargo_base_F"]; +if (_unit distance _loadContainer <= MAX_LOAD_DISTANCE) exitWith {_loadContainer}; + +objNull diff --git a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf index dc5f3ab073..7e8594ffe4 100644 --- a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf +++ b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf @@ -18,4 +18,4 @@ params ["_object"]; // TRACE_1("params",_object); -(_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))]) max 0 +_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))] diff --git a/addons/cargo/functions/fnc_getSizeItem.sqf b/addons/cargo/functions/fnc_getSizeItem.sqf index 32ec92a550..c53c05ee28 100644 --- a/addons/cargo/functions/fnc_getSizeItem.sqf +++ b/addons/cargo/functions/fnc_getSizeItem.sqf @@ -1,5 +1,5 @@ /* - * Author: Glowbal, SilentSpike + * Author: Glowbal * Get the cargo size of an object. * * Arguments: @@ -17,13 +17,23 @@ params ["_item"]; -// Virtual items are much easier to deal with -if (_item isEqualType "") then { - CARGO_SIZE(_item) +scopeName "return"; + +private _isVirtual = (_item isEqualType ""); +private _itemClass = if (_isVirtual) then {_item} else {typeOf _item}; +private _config = (configFile >> "CfgVehicles" >> _itemClass >> QGVAR(size)); + +if (_isVirtual) then { + if (isNumber _config) then { + (getNumber _config) breakOut "return"; + }; } else { - if (isNil {_item getVariable QGVAR(size)}) then { - CARGO_SIZE(typeOf _item) - } else { - _item getVariable QGVAR(size) + if (!isNil {_item getVariable QGVAR(size)}) then { + (_item getVariable QGVAR(size)) breakOut "return"; + }; + if (isNumber _config) then { + (getNumber _config) breakOut "return"; }; }; + +-1 diff --git a/addons/cargo/functions/fnc_initObject.sqf b/addons/cargo/functions/fnc_initObject.sqf index d59249c31b..92403b8dd9 100644 --- a/addons/cargo/functions/fnc_initObject.sqf +++ b/addons/cargo/functions/fnc_initObject.sqf @@ -1,5 +1,5 @@ /* - * Author: Glowbal, SilentSpike + * Author: Glowbal * Initializes variables for loadable objects. Called from init EH. * * Arguments: @@ -19,47 +19,20 @@ params ["_object"]; private _type = typeOf _object; TRACE_2("params",_object,_type); -// If object had size given to it via eden/public then override config canLoad setting -private _canLoadPublic = _object getVariable [QGVAR(canLoad), false]; -if (!(_canLoadPublic isEqualType false)) then { - WARNING_4("%1[%2] - Variable %3 is %4 - Should be bool",_object,_type,QGVAR(canLoad),_canLoadPublic); -}; -private _canLoadConfig = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad)) == 1; +if ((_object getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad))]) != 1) exitWith {}; -// Nothing to do here if object can't be loaded -if !(_canLoadConfig || {_canLoadPublic in [true, 1]}) exitWith {}; - -// Servers and HCs do not require action menus (beyond this point) -if !(hasInterface) exitWith {}; - -// Unnecessary to add actions to an object class that's already got them +// do nothing if the class is already initialized if (_type in GVAR(initializedItemClasses)) exitWith {}; -if (_object getVariable [QGVAR(initObject),false]) exitWith {}; +GVAR(initializedItemClasses) pushBack _type; -// Objects given size via eden have their actions added to the object -// So this function may run for multiple of the same class in that case -if (_canLoadConfig) then { - GVAR(initializedItemClasses) pushBack _type; - TRACE_1("Adding load cargo action to class", _type); -} else { - _object setVariable [QGVAR(initObject),true]; - TRACE_1("Adding load cargo action to object", _object); -}; +TRACE_1("Adding load cargo action to class", _type); -// Vehicles with passengers inside are prevented from being loaded in `fnc_canLoadItemIn` private _condition = { - //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(enable) && - {(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad))]) in [true, 1]} && + {(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad))]) == 1} && {locked _target < 2} && {alive _target} && - {[_player, _target, []] call EFUNC(common,canInteractWith)} && - {0 < { - private _type = typeOf _x; - private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false]; - private _hasCargoConfig = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) == 1; - (_hasCargoPublic || _hasCargoConfig) && {_x != _target} - } count (nearestObjects [_player, GVAR(cargoHolderTypes), MAX_LOAD_DISTANCE])} + {[_player, _target, []] call EFUNC(common,canInteractWith)} }; private _statement = { params ["_target", "_player"]; @@ -68,10 +41,6 @@ private _statement = { private _text = localize LSTRING(loadObject); private _icon = QPATHTOF(UI\Icon_load.paa); -private _action = [QGVAR(load), _text, _icon, _statement, _condition, {call FUNC(addCargoVehiclesActions)}] call EFUNC(interact_menu,createAction); -if (_canLoadConfig) then { - [_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass); -} else { - [_object, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToObject); -}; +private _action = [QGVAR(load), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction); +[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass); diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf index 6d3709a329..c65a9bddbc 100644 --- a/addons/cargo/functions/fnc_initVehicle.sqf +++ b/addons/cargo/functions/fnc_initVehicle.sqf @@ -20,24 +20,8 @@ TRACE_1("params", _vehicle); private _type = typeOf _vehicle; -// If vehicle had space given to it via eden/public then override config hasCargo setting -private _hasCargoPublic = _vehicle getVariable [QGVAR(hasCargo), false]; -private _hasCargoConfig = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) == 1; +if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {}; -// Nothing to do here if vehicle has no cargo space -if !(_hasCargoConfig || _hasCargoPublic) exitWith {}; - -// Check if cargo is in cargo holder types (checked when trying to search for loadable objects) -private _addCargoType = true; -{ - if (_type isKindOf _x) exitWith {_addCargoType = false}; -} forEach GVAR(cargoHolderTypes); -TRACE_2("",_addCargoType,_type); -if (_addCargoType) then { - GVAR(cargoHolderTypes) pushBack _type; -}; - -// Vehicle can have default ace cargo in its config if (isServer) then { { if (isClass _x) then { @@ -49,33 +33,19 @@ if (isServer) then { } count ("true" configClasses (configFile >> "CfgVehicles" >> _type >> "ACE_Cargo" >> "Cargo")); }; -// Servers and HCs do not require action menus (beyond this point) -if !(hasInterface) exitWith {}; - -// Unnecessary to add actions to a vehicle class that's already got them +// do nothing if the class is already initialized if (_type in GVAR(initializedVehicleClasses)) exitWith {}; -if (_vehicle getVariable [QGVAR(initVehicle),false]) exitWith {}; +// set class as initialized +GVAR(initializedVehicleClasses) pushBack _type; -// Vehicles given cargo via eden have their actions added to the object -// So this function may run for multiple of the same class in that case -if (_hasCargoConfig) then { - GVAR(initializedVehicleClasses) pushBack _type; - TRACE_1("Adding unload cargo action to class", _type); -} else { - _vehicle setVariable [QGVAR(initVehicle),true]; - TRACE_1("Adding unload cargo action to object", _vehicle); -}; +if (!hasInterface) exitWith {}; + +TRACE_1("Adding unload cargo action to class", _type); private _condition = { - //IGNORE_PRIVATE_WARNING ["_target", "_player"]; - GVAR(enable) && - {(_target getVariable [QGVAR(hasCargo), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(hasCargo)) == 1])} && - {locked _target < 2} && - {alive _target} && - {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} + GVAR(enable) && {locked _target < 2} && {alive _target} && {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} }; private _statement = { - //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(interactionVehicle) = _target; GVAR(interactionParadrop) = false; createDialog QGVAR(menu); @@ -84,16 +54,11 @@ private _text = localize LSTRING(openMenu); private _icon = ""; private _action = [QGVAR(openMenu), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction); -if (_hasCargoConfig) then { - [_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass); -} else { - [_vehicle, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToObject); -}; +[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass); // 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 = _player call CBA_fnc_turretPath; (_player == (driver _target)) || // pilot @@ -101,7 +66,6 @@ if (_vehicle isKindOf "Air") then { {_turretPath in (getArray (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(loadmasterTurrets)))}} // loadMaster turret from config }; private _statement = { - //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(interactionVehicle) = _target; GVAR(interactionParadrop) = true; createDialog QGVAR(menu); @@ -110,9 +74,5 @@ if (_vehicle isKindOf "Air") then { private _icon = ""; private _action = [QGVAR(openMenu), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction); - if (_hasCargoConfig) then { - [_type, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToClass); // self action on the vehicle - } else { - [_vehicle, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToObject); - }; + [_type, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToClass); // self action on the vehicle }; diff --git a/addons/cargo/functions/fnc_loadItem.sqf b/addons/cargo/functions/fnc_loadItem.sqf index bb608ff926..1d59cc1e64 100644 --- a/addons/cargo/functions/fnc_loadItem.sqf +++ b/addons/cargo/functions/fnc_loadItem.sqf @@ -13,7 +13,7 @@ * Example: * [object, vehicle] call ace_cargo_fnc_loadItem * - * Public: Yes + * Public: No */ #include "script_component.hpp" diff --git a/addons/cargo/functions/fnc_makeLoadable.sqf b/addons/cargo/functions/fnc_makeLoadable.sqf index 4d2aac21f0..27513a1864 100644 --- a/addons/cargo/functions/fnc_makeLoadable.sqf +++ b/addons/cargo/functions/fnc_makeLoadable.sqf @@ -17,13 +17,6 @@ */ #include "script_component.hpp" -// Only run this after the settings are initialized -if !(EGVAR(common,settingsInitFinished)) exitWith { - EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(makeLoadable), _this]; -}; - -ACE_DEPRECATED(QFUNC(makeLoadable),"3.12.0",QFUNC(setSize)); - params [["_object", objNull, [objNull]], ["_canLoad", true, [false, 0]], ["_setSize", 1, [0]]]; TRACE_3("params",_object,_canLoad,_setSize); @@ -32,15 +25,15 @@ private _type = typeOf _object; private _cfgCanLoad = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad)); private _curSize = [_object] call FUNC(getSizeItem); -_canLoad = [0, 1] select _canLoad; // Convert true/false to scalar +_canLoad = [0, 1] select _canLoad; //convert true/false to scalar if ((_canLoad == 1) && {_setSize <= 0}) exitWith { - ERROR("ace_cargo_fnc_makeLoadable (size <= 0) when making loadable"); + ACE_LOGERROR("ace_cargo_fnc_makeLoadable (size <= 0) when making loadable"); }; TRACE_2("setVar if different from config",_canLoad,_cfgCanLoad); if (_canLoad != _cfgCanLoad) then { - _object setVariable [QGVAR(canLoad), _canLoad == 1]; + _object setVariable [QGVAR(canLoad), _canLoad]; }; TRACE_2("setVar if different from config",_setSize,_curSize); diff --git a/addons/cargo/functions/fnc_moduleMakeLoadable.sqf b/addons/cargo/functions/fnc_moduleMakeLoadable.sqf index 9a9e21a22d..bcc6307863 100644 --- a/addons/cargo/functions/fnc_moduleMakeLoadable.sqf +++ b/addons/cargo/functions/fnc_moduleMakeLoadable.sqf @@ -20,11 +20,9 @@ params ["_logic", "_objects", "_activated"]; TRACE_3("params",_logic,_objects,_activated); -ACE_DEPRECATED(QFUNC(moduleMakeLoadable),"3.12.0","Eden editor object attributes"); - if ((isNull _logic) || {!_activated}) exitWith {}; if (_objects isEqualTo []) exitWith { - WARNING_1("ace_cargo_fnc_moduleMakeLoadable has no synced objects [%1]", _logic); + ACE_LOGWARNING_1("ace_cargo_fnc_moduleMakeLoadable has no synced objects [%1]", _logic); }; private _canLoad = _logic getVariable ["canLoad", true]; diff --git a/addons/cargo/functions/fnc_moduleSettings.sqf b/addons/cargo/functions/fnc_moduleSettings.sqf index b7af19c76a..c4b6baea3d 100644 --- a/addons/cargo/functions/fnc_moduleSettings.sqf +++ b/addons/cargo/functions/fnc_moduleSettings.sqf @@ -24,6 +24,5 @@ params ["_logic", "", "_activated"]; if (!_activated) exitWith {}; [_logic, QGVAR(enable), "enable"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(paradropTimeCoefficent), "paradropTimeCoefficent"] call EFUNC(common,readSettingFromModule); -INFO("Cargo Module Initialized."); +ACE_LOGINFO("Cargo Module Initialized."); diff --git a/addons/cargo/functions/fnc_onMenuOpen.sqf b/addons/cargo/functions/fnc_onMenuOpen.sqf index 8b3847993d..852729e529 100644 --- a/addons/cargo/functions/fnc_onMenuOpen.sqf +++ b/addons/cargo/functions/fnc_onMenuOpen.sqf @@ -44,13 +44,7 @@ if (GVAR(interactionParadrop)) then { lbClear _ctrl; { private _class = if (_x isEqualType "") then {_x} else {typeOf _x}; - private _displayName = getText (configfile >> "CfgVehicles" >> _class >> "displayName"); - if (GVAR(interactionParadrop)) then { - _ctrl lbAdd format ["%1 (%2s)", _displayName, GVAR(paradropTimeCoefficent) * ([_class] call FUNC(getSizeItem))]; - } else { - _ctrl lbAdd _displayName; - }; - + _ctrl lbAdd (getText(configfile >> "CfgVehicles" >> _class >> "displayName")); true } count _loaded; diff --git a/addons/cargo/functions/fnc_paradropItem.sqf b/addons/cargo/functions/fnc_paradropItem.sqf index 0f74787723..deec93b95e 100644 --- a/addons/cargo/functions/fnc_paradropItem.sqf +++ b/addons/cargo/functions/fnc_paradropItem.sqf @@ -6,7 +6,7 @@ * 0: Object * 1: Vehicle * - * Return Value: + * Return value: * Object unloaded * * Example: @@ -31,10 +31,10 @@ private _cargoSpace = [_vehicle] call FUNC(getCargoSpaceLeft); private _itemSize = [_item] call FUNC(getSizeItem); _vehicle setVariable [QGVAR(space), (_cargoSpace + _itemSize), true]; -(boundingBoxReal _vehicle) params ["_bb1", "_bb2"]; -private _distBehind = ((_bb1 select 1) min (_bb2 select 1)) - 4; // 4 meters behind max bounding box +(boundingBoxReal q2) params ["_bb1", "_bb2"]; +private _distBehind = ((_bb1 select 1) min (_bb2 select 1)) - 3; // 3 meters behind max bounding box TRACE_1("",_distBehind); -private _posBehindVehicleAGL = _vehicle modelToWorld [0, _distBehind, -2]; +private _posBehindVehicleAGL = _vehicle modelToWorld [0, _distBehind, -1]; private _itemObject = if (_item isEqualType objNull) then { @@ -49,7 +49,7 @@ private _itemObject = if (_item isEqualType objNull) then { _newItem }; -_itemObject setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply -5)); +_newItem setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply 10)); // open parachute and ir light effect [{ @@ -57,16 +57,13 @@ _itemObject setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vecto if (isNull _item || {getPos _item select 2 < 1}) exitWith {}; + private _itemPosASL = getPosASL _item; + private _itemVelocity = velocity _item; private _parachute = createVehicle ["B_Parachute_02_F", [0,0,0], [], 0, "CAN_COLLIDE"]; - // cannot use setPos on parachutes without them closing down - _parachute attachTo [_item, [0,0,0]]; - detach _parachute; - - private _velocity = velocity _item; - - _item attachTo [_parachute, [0,0,-1]]; - _parachute setVelocity _velocity; + _item attachTo [_parachute, [0,0,0.2]]; + _parachute setPosASL _itemPosASL; + _parachute setVelocity _itemVelocity; private _light = "Chemlight_yellow" createVehicle [0,0,0]; _light attachTo [_item, [0,0,0]]; @@ -90,15 +87,6 @@ _itemObject setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vecto }, 1, [_itemObject]] call CBA_fnc_addPerFrameHandler; -[ - [ - LSTRING(UnloadedItem), - getText (configFile >> "CfgVehicles" >> typeOf _itemObject >> "displayName"), - getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName") - ], - 3 -] call EFUNC(common,displayTextStructured); - // Invoke listenable event ["ace_cargoUnloaded", [_item, _vehicle, "paradrop"]] call CBA_fnc_globalEvent; diff --git a/addons/cargo/functions/fnc_setSize.sqf b/addons/cargo/functions/fnc_setSize.sqf deleted file mode 100644 index 2e5c0aa441..0000000000 --- a/addons/cargo/functions/fnc_setSize.sqf +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Author: SilentSpike - * Set the cargo size of any object. Has global effect. - * Adds the load action menu if necessary. - * Negative size makes unloadable. - * - * Arguments: - * 0: Object - * 1: Cargo size - * - * Return Value: - * None - * - * Example: - * [cursorTarget, 3] call ace_cargo_fnc_setSize - * - * Public: Yes - */ -#include "script_component.hpp" - -// Only run this after the settings are initialized -if !(EGVAR(common,settingsInitFinished)) exitWith { - EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(setSize), _this]; -}; - -params [ - ["_object",objNull,[objNull]], - ["_size",nil,[0]] // Default can't be a number since all are valid -]; -TRACE_2("setSize",_object,_size); - -// Nothing to do here -if ( - (isNil "_size") || - {isNull _object} || - {_size == _object getVariable [QGVAR(size), CARGO_SIZE(typeOf _object)]} -) exitWith {}; - -// Apply new size globally -// Necessary to update value, even if unloadable, as API could be used again -_object setVariable [QGVAR(canLoad), _size >= 0, true]; -_object setVariable [QGVAR(size), _size, true]; - -// If no size no need for load action -if (_size < 0) exitWith {}; - -// If an existing ID is present, load action has already been added globally -private _jipID = _object getVariable QGVAR(setSize_jipID); - -// Actions should be added to all future JIP players too -if (isNil "_jipID") then { - _jipID = [QGVAR(initObject), [_object]] call CBA_fnc_globalEventJIP; - - // Store the ID for any future calls to this function - _object setVariable [QGVAR(setSize_jipID), _jipID, true]; -}; diff --git a/addons/cargo/functions/fnc_setSpace.sqf b/addons/cargo/functions/fnc_setSpace.sqf deleted file mode 100644 index 9f8ab85c68..0000000000 --- a/addons/cargo/functions/fnc_setSpace.sqf +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Author: SilentSpike - * Set the cargo space of any object. Has global effect. - * Adds the cargo action menu if necessary. - * - * Arguments: - * 0: Object - * 1: Cargo space - * - * Return Value: - * None - * - * Example: - * [vehicle player, 20] call ace_cargo_fnc_setSpace - * - * Public: Yes - */ -#include "script_component.hpp" - -// Only run this after the settings are initialized -if !(EGVAR(common,settingsInitFinished)) exitWith { - EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(setSpace), _this]; -}; - -params [ - ["_vehicle",objNull,[objNull]], - ["_space",nil,[0]] // Default can't be a number since all are valid -]; -TRACE_2("setSpace",_vehicle,_size); - -// Nothing to do here -if ( - (isNil "_space") || - {isNull _vehicle} || - {_space == _vehicle getVariable [QGVAR(space), CARGO_SPACE(typeOf _vehicle)]} -) exitWith {}; - -// Apply new space globally -// Necessary to update value, even if no space, as API could be used again -_vehicle setVariable [QGVAR(hasCargo), _space > 0, true]; -_vehicle setVariable [QGVAR(space), _space, true]; - -// If no cargo space no need for cargo menu -if (_space <= 0) exitWith {}; - -// If an existing ID is present, cargo menu has already been added globally -private _jipID = _vehicle getVariable QGVAR(setSpace_jipID); - -// Cargo menu should be added to all future JIP players too -if (isNil "_jipID") then { - _jipID = [QGVAR(initVehicle), [_vehicle]] call CBA_fnc_globalEventJIP; - - // Store the ID for any future calls to this function - _vehicle setVariable [QGVAR(setSpace_jipID), _jipID, true]; -}; diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index 4fa0401772..466471c375 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -5,7 +5,6 @@ * Arguments: * 0: Player * 1: Object - * 2: Vehicle (Optional) * * Return Value: * Load ProgressBar Started @@ -17,14 +16,15 @@ */ #include "script_component.hpp" -params ["_player", "_object", ["_cargoVehicle", objNull]]; -TRACE_3("params",_player,_object,_cargoVehicle); +params ["_player", "_object"]; +TRACE_2("params",_player,_object); -private _vehicle = _cargoVehicle; -if (isNull _vehicle) then { +private _vehicle = [_player] call FUNC(findNearestVehicle); + +if ((isNull _vehicle) || {_vehicle isKindOf "Cargo_Base_F"}) then { { if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_vehicle = _x}; - } forEach (nearestObjects [_player, GVAR(cargoHolderTypes), MAX_LOAD_DISTANCE]); + } forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]); }; if (isNull _vehicle) exitWith { diff --git a/addons/cargo/functions/fnc_startUnload.sqf b/addons/cargo/functions/fnc_startUnload.sqf index 27ebe9e952..8631449b9e 100644 --- a/addons/cargo/functions/fnc_startUnload.sqf +++ b/addons/cargo/functions/fnc_startUnload.sqf @@ -28,18 +28,13 @@ private _ctrl = _display displayCtrl 100; private _selected = (lbCurSel _ctrl) max 0; if (count _loaded <= _selected) exitWith {}; -private _item = _loaded select _selected; // This can be an object or a classname string +private _item = _loaded select _selected; //This can be an object or a classname string if (GVAR(interactionParadrop)) exitWith { - // If drop time is 0 don't show a progress bar - if (GVAR(paradropTimeCoefficent) == 0) exitWith { - [QGVAR(paradropItem), [_item, GVAR(interactionVehicle)]] call CBA_fnc_localEvent; - }; - // Start progress bar - paradrop private _size = [_item] call FUNC(getSizeItem); [ - GVAR(paradropTimeCoefficent) * _size, + 2.5 * _size, [_item, GVAR(interactionVehicle), ACE_player], { (_this select 0) params ["_item", "_target", "_player"]; diff --git a/addons/cargo/functions/fnc_unloadItem.sqf b/addons/cargo/functions/fnc_unloadItem.sqf index 20fde5d631..ce84772c1f 100644 --- a/addons/cargo/functions/fnc_unloadItem.sqf +++ b/addons/cargo/functions/fnc_unloadItem.sqf @@ -5,15 +5,14 @@ * Arguments: * 0: Item * 1: Vehicle - * 2: Unloader (default: objNull) * * Return Value: - * Object was unloaded + * Object unloaded * * Example: * [object, vehicle] call ace_cargo_fnc_unloadItem * - * Public: Yes + * Public: No */ #include "script_component.hpp" @@ -38,7 +37,7 @@ if ((count _emptyPosAGL) != 3) exitWith { private _loaded = _vehicle getVariable [QGVAR(loaded), []]; if !(_item in _loaded) exitWith { - ERROR_3("Tried to unload item [%1] not in vehicle[%2] cargo[%3]", _item, _vehicle, _loaded); + ACE_LOGERROR_3("Tried to unload item [%1] not in vehicle[%2] cargo[%3]", _item, _vehicle, _loaded); false }; diff --git a/addons/cargo/script_component.hpp b/addons/cargo/script_component.hpp index 3ae6331f91..905a8b0613 100644 --- a/addons/cargo/script_component.hpp +++ b/addons/cargo/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_CARGO @@ -17,9 +18,3 @@ #include "\z\ace\addons\main\script_macros.hpp" #define MAX_LOAD_DISTANCE 10 - -#define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) - -// Default cargo size is -1 as 0 is a valid size -#define CARGO_SIZE(classname) GET_NUMBER(configFile >> "CfgVehicles" >> (classname) >> QGVAR(size),-1) -#define CARGO_SPACE(classname) GET_NUMBER(configFile >> "CfgVehicles" >> (classname) >> QGVAR(space),0) diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 05c8d9bc23..251220fd1c 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -11,10 +11,6 @@ Cargar Carica Charger - 積み込む - 싣기 - 裝載 - 装载 Unload @@ -26,10 +22,6 @@ Descargar Scarica Décharger - 下ろす - 내리기 - 卸載 - 卸载 Cargo @@ -41,10 +33,6 @@ Carga Cargo Cargaison - カーゴ - 화물 - 貨物 - 货物 Cargo Menu @@ -56,10 +44,6 @@ Menu de carga Menù Cargo Menu de cargaison - カーゴ メニュー - 화물 메뉴 - 貨物選單 - 货物选单 Cargo space left: %1 @@ -71,10 +55,6 @@ Espacio de carga restante: %1 Spazio cargo rimanente: %1 Espace de cargaison restant : %1 - カーゴの空き容量: %1 - 선적 공간 남음: %1 - 貨物剩餘空間: %1 - 货物剩余空间: %1 Enable Cargo @@ -86,10 +66,6 @@ Habilitar carga Abilita Cargo Activer la mise en cargaison - カーゴを有効化 - 화물 활성화 - 啟用貨物裝載 - 启用货物装载 Enable the load in cargo module @@ -101,10 +77,6 @@ Umožňuje naložit předměty do nákladového prostoru vozidla Abilita il modulo di caricamento in cargo Active le chargement de cargaison dans un vehicule - カーゴ モジュールで積み込みを有効化 - 화물 모듈에 싣기를 활성화합니다 - 啟用貨物裝載功能 - 启用货物装载功能 Cargo Settings @@ -116,10 +88,6 @@ Ajustes de carga Impostazioni Cargo Paramètres de cargaison - カーゴ設定 - 화물 설정 - 貨物設定 - 货物设定 Configure the cargo module settings @@ -131,10 +99,6 @@ Konfigurace nákladního modulu Configura le impostazioni del modulo cargo Configure les paramètres du module de cargaison - カーゴ モジュールの設定を構成 - 화물 모듈의 환경 설정을 바꿉니다 - 配置貨物模塊設定 - 配置货物模块设定 %1<br/>loaded into<br/>%2 @@ -147,10 +111,6 @@ %1<br/>caricato su<br/>%2 %1<br/>berakodva ide:<br/>%2 %1<br/>загружен в<br/>%2 - %1<br/>は<br/>%2へ積み込まれた - %1<br/>는<br/>%2 에 실림 - %1<br/>裝載至<br/>%2 - %1<br/>装载至<br/>%2 Unloaded<br/>%1 from<br/>%2 @@ -163,10 +123,6 @@ Hai scaricato<br/>%1 da<br/>%2 1%<br/>kirakodva ebből:<br/>%2 %1<br/>разгружен из<br/>%2 - <br/>%1が<br/>%2から降ろされた - %1<br/>는<br/>%2 에서 내려짐 - 從<br/>%2卸載<br/>%1 - 从<br/>%2卸载<br/>%1 Loading Cargo @@ -178,10 +134,6 @@ Caricando Cargando Chargement de la cargaison - カーゴへ積み込んでいる - 화물 싣기 - 裝載貨物中 - 装载货物中 Unloading Cargo @@ -193,10 +145,6 @@ Scaricando Descargando Déchargement de la cargaison - カーゴから降ろしている - 화물 내리기 - 卸載貨物中 - 卸载货物中 %1<br/>could not be loaded @@ -208,10 +156,6 @@ %1<br/>non può essere caricato %1<br/>no pudo ser cargado %1<br /> n'a pas pu être chargé - %1<br/>は積み込めなかった - %1<br/>이 실릴 수가 없습니다 - %1<br/>無法被裝載 - %1<br/>无法被装载 %1<br/>could not be unloaded @@ -223,10 +167,6 @@ %1<br/>non può essere scaricato %1<br/>no pudo ser descargado %1<br /> n'a pas pu être déchargé - %1<br/>は降ろせなかった - %1<br/>이 내려질 수가 없습니다 - %1<br/>無法被卸載 - %1<br/>无法被卸载 Make Object Loadable @@ -238,10 +178,6 @@ Vytvořit objekt nakladatelným Fazer objeto carregável Сделать объект загружаемым - オブジェクトを積載可能に - 물체를 화물화시키기 - 使物件可裝載 - 使物件可装载 Sets the synced object as loadable by the cargo system. @@ -253,10 +189,6 @@ Nastaví synchronizované objekty nakladatelnými za pomocí Nákladního systému. Seta o objeto sincronizado como carregável Делает синхронизированный объект загружаемым для модуля перевозки грузов. - オブジェクトを同期させると、カーゴ システムによる積載が可能になります。 - 물체를 화물 시스템과 동기화시켜 실을 수 있게 합니다 - 使用同步線來使該物件可被裝載. - 使用同步线来使该物件可被装载. Object's Size @@ -268,76 +200,14 @@ Velikost objektu Tamanho do objeto Размер объекта - オブジェクトの大きさ - 물체 크기 - 物件的大小 - 物件的大小 - - - Cargo Space - Spazio Cargo - カーゴ スペース - 貨物空間 - 货物空间 - - - The cargo space available in this vehicle/container - Lo spazio disponibile in questo veicolo/container - この車両/コンテナでカーゴ スペースを使えるようにします - 設定此載具/集裝箱可裝載多少貨物 - 设定此载具/集装箱可装载多少货物 - - - Cargo Size - Dimensioni Cargo - カーゴ サイズ - 貨物的大小 - 货物的大小 - - - The cargo space required to hold this object (-1 for unloadable) - Lo spazio del cargo necessita di mantenere questo oggetto (-1 per scaricabile) - このオブジェクトを積載するのに必要なカーゴ スペース (-1 で積載不可) - 此貨物會佔掉多少空間(設定-1的話此貨物就不能被裝載) - 此货物会占掉多少空间(设定-1的话此货物就不能被装载) Airdrop Türlast - 空中投下 - Zrzut zaopatrzenia - 공중 투하 - Largage aérien - Lancio Aereo - 空投 - 空投 Unlevel Flight Schieflage - 機体が水平ではありません - Nierówny lot - 기체가 수평이 아닙니다 - Rétablir l'assiette - Volo non Livellato - 此架飛機並無保持水平飛行 - 此架飞机并无保持水平飞行 - - - Paradrop Time Coffecient - 空中投下までの時間係数 - Coefficente Tempo Lancio Paracadute - Coefficient Temps de largage de cargaison - 空投時間係數 - 空投时间系数 - - - Modifier for how long it takes to paradrop a cargo item. - カーゴ アイテムを空中投下するまでの時間を変更します。 - Modificato per quanto tempo ci impiega a paracadutare un oggetto cargo. - Modifier le temps qu'il faut pour larguer la cargaison. - 設定空投所需消耗的時間. - 设定空投所需消耗的时间. - + \ No newline at end of file diff --git a/addons/chemlights/CfgWeapons.hpp b/addons/chemlights/CfgWeapons.hpp index c182ded34b..de5fc8aea5 100644 --- a/addons/chemlights/CfgWeapons.hpp +++ b/addons/chemlights/CfgWeapons.hpp @@ -44,7 +44,7 @@ class CfgWeapons { descriptionShort = CSTRING(Shield_Empty_DescriptionShort); model = "\A3\weapons_F\ammo\mag_univ.p3d"; picture = QPATHTOF(UI\ace_chemlight_shield_x_ca.paa); - scope = 2; + scope = 1; class ItemInfo: InventoryItem_Base_F { mass = 1; }; diff --git a/addons/chemlights/XEH_preInit.sqf b/addons/chemlights/XEH_preInit.sqf index 7fe826a174..7d00e938cf 100644 --- a/addons/chemlights/XEH_preInit.sqf +++ b/addons/chemlights/XEH_preInit.sqf @@ -3,8 +3,6 @@ ADDON = false; LOG(MSG_INIT); -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/chemlights/functions/fnc_compileChemlightMenu.sqf b/addons/chemlights/functions/fnc_compileChemlightMenu.sqf index c87c4247ec..74b0a154c9 100644 --- a/addons/chemlights/functions/fnc_compileChemlightMenu.sqf +++ b/addons/chemlights/functions/fnc_compileChemlightMenu.sqf @@ -7,7 +7,7 @@ * 1: Player * 2: Parameters * - * Return Value: + * Return value: * None * * Example: @@ -29,7 +29,7 @@ private _chemlights = [_player] call FUNC(getShieldComponents); private _icon = getText (_config >> "picture"); private _shieldClass = getText (_config >> "ACE_Chemlight_Shield"); private _displayName = getText (configFile >> "CfgWeapons" >> _shieldClass >> "displayName"); - + _displayName = format [localize LSTRING(Action_Prepare), _displayName]; private _statement = {_this call FUNC(prepShield)}; diff --git a/addons/chemlights/functions/fnc_getShieldComponents.sqf b/addons/chemlights/functions/fnc_getShieldComponents.sqf index 6055070351..be089b261c 100644 --- a/addons/chemlights/functions/fnc_getShieldComponents.sqf +++ b/addons/chemlights/functions/fnc_getShieldComponents.sqf @@ -5,7 +5,7 @@ * Arguments: * 0: Unit to check * - * Return Value: + * Return value: * List of carried chemlight classnames * * Example: diff --git a/addons/chemlights/functions/fnc_prepShield.sqf b/addons/chemlights/functions/fnc_prepShield.sqf index b4861da080..52623d6488 100644 --- a/addons/chemlights/functions/fnc_prepShield.sqf +++ b/addons/chemlights/functions/fnc_prepShield.sqf @@ -7,7 +7,7 @@ * 1: Activator Unit (player) * 2: Chemlight class, chemlight shield class * - * Return Value: + * Return value: * None * * Example: diff --git a/addons/chemlights/functions/fnc_throwEH.sqf b/addons/chemlights/functions/fnc_throwEH.sqf index d99d83495b..18215c9846 100644 --- a/addons/chemlights/functions/fnc_throwEH.sqf +++ b/addons/chemlights/functions/fnc_throwEH.sqf @@ -27,8 +27,8 @@ if (isNull _projectile) then { if (local _unit) then { if ([_ammo] call FUNC(isIRClass)) then { - // Handle Advanced Throwing - if ((ACE_player getVariable [QEGVAR(advanced_throwing,activeThrowable), objNull]) == _projectile) then { + // Handle advancedThrowing: + if ((ace_player getVariable [QEGVAR(advancedThrowing,activeThrowable), objNull]) == _projectile) then { [_projectile, _ammo, true] call FUNC(throwIR); // direct call if we are priming with adv throw } else { [{_this call FUNC(throwIR)}, [_projectile, _ammo]] call CBA_fnc_execNextFrame; diff --git a/addons/chemlights/functions/fnc_throwIR.sqf b/addons/chemlights/functions/fnc_throwIR.sqf index 7d97c99f8e..0148b0d669 100644 --- a/addons/chemlights/functions/fnc_throwIR.sqf +++ b/addons/chemlights/functions/fnc_throwIR.sqf @@ -32,5 +32,5 @@ _dummy setPosATL _pos; _dummy setVelocity _velocity; if (_replaceAdvThrowable) then { - ACE_player setVariable [QEGVAR(advanced_throwing,activeThrowable), _dummy]; + ace_player setVariable [QEGVAR(advancedThrowing,activeThrowable), _dummy]; }; diff --git a/addons/chemlights/script_component.hpp b/addons/chemlights/script_component.hpp index 324af2c55c..8648a3e065 100644 --- a/addons/chemlights/script_component.hpp +++ b/addons/chemlights/script_component.hpp @@ -3,6 +3,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_CHEMLIGHTS diff --git a/addons/chemlights/stringtable.xml b/addons/chemlights/stringtable.xml index cd3ee7c894..4be6323287 100644 --- a/addons/chemlights/stringtable.xml +++ b/addons/chemlights/stringtable.xml @@ -1,450 +1,151 @@ - + Chemlights - ケミライト - Świetliki - Knicklichter - 켐라이트 - Cyalumes - Luce chimica - 螢光棒 - 萤光棒 + Prepare %1 - %1 をつかう - Przygotuj %1 - %1 vorbereiten - %1 준비 - Prépare %1 - Prepara %1 - 使用%1 - 使用%1 - + %1<br/>Prepared - %1<br/>をつかった - %1<br/>Przygotowany - %1<br/>vorbereitet - %1<br/>준비됨 - %1<br/>prêt - %1 <br/> Preparata - %1<br/>已使用 - %1<br/>已使用 + No inventory space Kein Platz im Inventar Sin espacio en inventario Brak miejsca w ekwipunku - Pas de place + Pas de place dans l'inventaire Nedostatek místa v inventáři Sem espaço no inventário - Nessuno spazio nell'inventario + Non hai più spazio Nincs több hely В инвентаре нет места - インベントリに空きがありません - 소지품 공간이 없음 - 已無存放空間 - 已无存放空间 + [ACE] Chemlights - [ACE] ケミライト - [ACE] Świetliki - [ACE] Knicklichter - [ACE] 켐라이트 - [ACE] Cyalume - [ACE] Luci chimiche - [ACE] 螢光棒 - [ACE] 萤光棒 + Chemlight (Orange) - ケミライト (オレンジ) - Świetlik (pomarańczowy) - Knicklicht (orange) - 켐라이트 (주황) - Cyalume (orange) - Luce chimica (Arancione) - 螢光棒 (橘色) - 萤光棒 (橘色) Orange Light - オレンジ色 - Pomarańczowe światło - Oranges Knicklicht - 주황색 - Lum. orange - Luce Arancione - 橘色光 - 橘色光 Type: Light - Orange<br />Rounds: 1<br />Used in: Hand - 種類: 照明 - オレンジ<br />装填数: 1<br />次で使用: 携帯 - Typ: Światło - pomarańczowe<br/>Pociski: 1<br/>Używany w: ręce - Typ: Licht - orange<br />Anzahl: 1<br />Benutzt in: Hand - 종류:밝은 오렌지<br />수량: 1<br />사용처: 손 - Type: Lumière - orange<br />Nbre: 1<br /> À main - Tipo: Luce - Arancione<br/>Rimanenti: 1<br/>Usata in: Mano - 類型: 光 - 橘色<br />發數: 1<br />使用於: 手 - 类型: 光 - 橘色<br />发数: 1<br />使用于: 手 + Chemlight (White) - ケミライト (白) - Świetlik (biały) - Knicklicht (weiß) - 켐라이트 (하양) - Cyalume (blanc) - Luce chimica (Bianca) - 螢光棒 (白色) - 萤光棒 (白色) White Light - 白色 - Białe światło - Weißes Knicklicht - 하얀색 - Lum. blanche - Luce Bianca - 白色光 - 白色光 Type: Light - White<br />Rounds: 1<br />Used in: Hand - 種類: 照明 - 白<br />装填数: 1<br />次で使用: 携帯 - Typ: Światło - białe<br/>Pociski: 1<br/>Używany w: ręce - Typ: Licht - weiß<br />Anzahl: 1<br />Benutzt in: Hand - 종류:하얀색<br />수량: 1<br />사용처: 손 - Type: Lumière - blanche<br />Nbre: 1<br /> À main - Tipo: Luce - Bianca<br/>Rimanenti: 1<br/>Usata in: Mano - 類型: 光 - 白色<br />發數: 1<br />使用於: 手 - 类型: 光 - 白色<br />发数: 1<br />使用于: 手 + Chemlight (Hi Red) - ケミライト (高輝度 赤) - Świetlik (jaskrawy czerwony) - Knicklicht (rot, hell) - 켐라이트 (밝은 빨간색) - Cyalume (Hi rouge) - Luce chimica (Hi Rossa) - 螢光棒 (超亮紅色) - 萤光棒 (超亮红色) Red Hi Light - 高輝度の赤色 - Jaskrawe czerwone światło - Helles, rotes Knicklicht - 밝은 빨간색 - Lum. rouge haute intensité - Luce Hi Rossa - 超亮紅色光 - 超亮红色光 Type: Light - Red Hi (5 minute)<br />Rounds: 1<br />Used in: Hand - 種類: 照明 - 高輝度 赤 (5分間)<br />装填数: 1<br />次で使用: 携帯 - Typ: Światło - jaskrawe czerwone (5 minut)<br/>Pociski: 1<br/>Używany w: ręce - Typ: Licht - rot, hell (5 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand - 종류: 밝은 빨간색 (5분)<br />수량: 1<br />사용처: 손 - Type: Lumière - rouge Hi (5 minutes)<br />Nbre: 1<br /> À main - Tipo: Luce - Rossa Hi (5 minuti)<br />Rimanenti: 1<br/>Usata in: Mano - 類型: 光 - 超亮紅色 (5分鐘)<br />發數: 1<br />使用於: 手 - 类型: 光 - 超亮红色 (5分钟)<br />发数: 1<br />使用于: 手 + Chemlight (Hi Yellow) - ケミライト (高輝度 黄) - Świetlik (jaskrawy żółty) - Knicklicht (gelb, hell) - 켐라이트 (밝은 노란색) - Cyalume (Hi jaune) - Luce chimica (Hi Gialla) - 螢光棒 (超亮黃色) - 萤光棒 (超亮黄色) Yellow Hi Light - 高輝度の黄色 - Jaskrawe żółte światło - Helles, gelbes Knicklicht - 밝은 노란색 - Lum. jaune haute intensité - Luce Hi Gialla - 超亮黃色光 - 超亮黄色光 Type: Light - Yellow Hi (5 minute)<br />Rounds: 1<br />Used in: Hand - 種類: 照明 - 高輝度 黄 (5分間)<br />装填数: 1<br />次で使用: 携帯 - Typ: Światło - jaskrawe żółte (5 minut)<br/>Pociski: 1<br/>Używany w: ręce - Typ: Licht - gelb, hell (5 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand - 종류:밝은 노란색 (5분)<br />수량: 1<br />사용처: Hand - Type: Lumière - Jaune Hi (5 minutes)Nbre: 1<br /> À main - Tipo: Luce - Gialla Hi (5 minuti)<br />Rimanenti: 1<br/>Usata in: Mano - 類型: 光 - 超亮黃色 (5分鐘)<br />發數: 1<br />使用於: 手 - 类型: 光 - 超亮黄色 (5分钟)<br />发数: 1<br />使用于: 手 + Chemlight (Hi Orange) - ケミライト (高輝度 オレンジ) - Świetlik (jaskrawy pomarańczowy) - Knicklicht (orange, hell) - 켐라이트 (밝은 주황색) - Cyalume (Hi orange) - Luce chimica (Hi Arancione) - 螢光棒 (超亮橘色) - 萤光棒 (超亮橘色) Orange Hi Light - 高輝度のオレンジ - Jaskrawe pomarańczowe światło - Helles, oranges Knicklicht - 밝은 주황색 - Lum. orange haute intensité - Luce Hi Arancione - 超亮橘色光 - 超亮橘色光 Type: Light - Orange Hi (5 minute)<br />Rounds: 1<br />Used in: Hand - 種類: 照明 - 高輝度 オレンジ (5分間)<br />装填数: 1<br />次で使用: 携帯 - Typ: Światło - jaskrawe pomarańczowe (5 minut)<br/>Pociski: 1<br/>Używany w: ręce - Typ: Licht - orange, hell (5 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand - 종류: 밝은 주황색 (5분)<br />수량: 1<br />사용처: 손 - Type: Lumière - orange Hi (5 minutes)<br />Nbre: 1<br /> À main - Tipo: Luce - Arancione Hi (5 minuti)<br />Rimanenti: 1<br/>Usata in: Mano - 類型: 光 - 超亮橘色 (5分鐘)<br />發數: 1<br />使用於: 手 - 类型: 光 - 超亮橘色 (5分钟)<br />发数: 1<br />使用于: 手 + Chemlight (Hi White) - ケミライト (高輝度 白) - Świetlik (jaskrawy biały) - Knicklicht (weiß, hell) - 켐라이트 (밝은 하얀색) - Cyalume (Hi blanc) - Luce chimica (Hi Bianca) - 螢光棒 (超亮白色) - 萤光棒 (超亮白色) White Hi Light - 高輝度の白色 - Jaskrawe białe światło - Helles, weißes Knicklicht - 밝은 하얀색 - Lum. blanche haute intensité - Luce Hi Bianca - 超亮白色光 - 超亮白色光 Type: Light - White Hi (5 minute)<br />Rounds: 1<br />Used in: Hand - 種類: 照明 - 高輝度 白 (5分間)<br />装填数: 1<br />次で使用: 携帯 - Typ: Światło - jaskrawe białe (5 minut)<br/>Pociski: 1<br/>Używany w: ręce - Typ: Licht - weiß, hell (5 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand - 종류: 밝은 하얀색 (5분)<br />수량: 1<br />사용처: 손 - Type: Lumière - blanche Hi (5 minutes)<br />Nbre: 1<br /> À main - Tipo: Luce - Bianca Hi (5 minuti)<br />Rimanenti: 1<br/>Usata in: Mano - 類型: 光 - 超亮白色 (5分鐘)<br />發數: 1<br />使用於: 手 - 类型: 光 - 超亮白色 (5分钟)<br />发数: 1<br />使用于: 手 + Chemlight (IR) - ケミライト (IR) - Świetlik (podczerwony) - Knicklicht (IR) - 켐라이트 (적외선) - Cyalume (IR) - Luce chimica (IR) - 螢光棒 (紅外線) - 萤光棒 (红外线) IR Light - 赤外線光 - Światło podczerwone - IR-Knicklicht - 적외선 켐라이트 - Lumière IR - Luce IR - 紅外線光 - 红外线光 Type: Light - Infrared<br />Rounds: 1<br />Used in: Hand - 種類: 照明 - 赤外線<br />装填数: 1<br />次で使用: 携帯 - Typ: Światło - podczerwone<br/>Pociski: 1<br/>Używany w: ręce - Typ: Licht - infrarot<br />Anzahl: 1<br />Benutzt in: Hand - 종류: 적외선<br />수량: 1<br />사용처: 손 - Type: Lumière - infrarouge<br />Nbre: 1<br /> À main - Tipo: Luce - Infrarossi<br />Usata in: Mano - 類型: 光 - 紅外線<br />發數: 1<br />使用於: 手 - 类型: 光 - 红外线<br />发数: 1<br />使用于: 手 + Chemlight Shield (Empty) - ケミライト シールド (空) - Osłona na świetlik (pusta) - Knicklicht-Abschirmung (leer) - 켐라이트 쉴드 (비어있음) - Étui cyalume (vide) - Scudo Luce chimica (Vuoto) - 螢光棒保護殼 (空) - 萤光棒保护壳 (空) Shield for chemlights. Combine with chemlight to prepare reading light. - ケミライトを入れられます。シールドとケミライトを組み合わせることで、照明にもなりえます。 - Osłona na świetliki. Połącz ją ze świetlikiem by stworzyć lampkę do czytania. - Abschirmung für Knicklichter. Mit Knicklicht kombinieren, um Leselicht zu erhalten. - 켐라이트를 위한 가림막입니다. 켐라이트와 같이 사용하여 읽을 때 씁니다. - Étui pour cyalume. Combiné avec un cyalume pour obtennir un lampe de lecture. - Scudo per luci chimiche. Combina con una luce chimica per una luce da lettura. - 螢光棒的保護殼. 與螢光棒結合後可充當閱讀燈. - 萤光棒的保护壳. 与萤光棒结合后可充当阅读灯. + Chemlight Shield (Green) - ケミライト シールド (緑) - Osłona na świetlik (zielona) - Knicklicht-Abschirmung (grün) - 켐라이트 쉴드 (초록) - Étui cyalume (vert) - Scudo Luce Chimica (Verde) - 螢光棒保護殼 (綠色) - 萤光棒保护壳 (绿色) Green reading light. - 緑色の照明。 - Zielona lampka. - Grünes Leselicht. - 초록빛 조명 - Lampe d'orientation verte. - Luce da lettura Verde. - 綠色閱讀燈. - 绿色阅读灯. + Chemlight Shield (Red) - ケミライト シールド (赤) - Osłona na świetlik (czerwona) - Knicklicht-Abschirmung (rot) - 켐라이트 쉴드 (빨강) - Étui cyalume (rouge) - Scudo Luce Chimica (Rossa) - 螢光棒保護殼 (紅色) - 萤光棒保护壳 (红色) Red reading light. - 赤色の照明。 - Czerwona lampka. - Rotes Leselicht. - 빨간색 조명 - Lampe d'orientation rouge. - Luce da lettura Rossa. - 紅色閱讀燈. - 红色阅读灯. + Chemlight Shield (Blue) - ケミライト シールド (青) - Osłona na świetlik (niebieska) - Knicklicht-Abschirmung (blau) - 켐라이트 쉴드 (파랑) - Étui cyalume (bleu) - Scudo Luce Chimica (Blu) - 螢光棒保護殼 (藍色) - 萤光棒保护壳 (蓝色) Blue reading light. - 青色の照明。 - Niebieska lampka. - Blaues Leselicht. - 파란색 조명 - Lampe d'orientation bleue. - Luce da lettura Blu. - 藍色閱讀燈. - 蓝色阅读灯. - + + Chemlight Shield (Yellow) - ケミライト シールド (黄) - Osłona na świetlik (żółta) - Knicklicht-Abschirmung (gelb) - 켐라이트 쉴드 (노랑) - Étui cyalume (jaune) - Scudo Luce Chimica (Gialla) - 螢光棒保護殼 (黃色) - 萤光棒保护壳 (黄色) Yellow reading light. - 黄色の照明。 - Żółta lampka. - Gelbes Leselicht. - 노란색 조명 - Lampe d'orientation jaune. - Luce da lettura Gialla. - 黃色閱讀燈. - 黄色阅读灯. + Chemlight Shield (Orange) - ケミライト シールド (オレンジ) - Osłona na świetlik (pomarańczowa) - Knicklicht-Abschirmung (orange) - 켐라이트 쉴드 (주황) - Étui cyalume (orange) - Scudo Luce Chimica (Arancione) - 螢光棒保護殼 (橘色) - 萤光棒保护壳 (橘色) Orange reading light. - オレンジの照明。 - Pomarańczowa lampka. - Oranges Leselicht. - 주황색 조명 - Lampe d'orientation orange. - Luce da lettura Arancione. - 橘色閱讀燈. - 橘色阅读灯. + Chemlight Shield (White) - ケミライト シールド (白) - Osłona na świetlik (biała) - Knicklicht-Abschirmung (weiß) - 켐라이트 쉴드 (하양) - Étui cyalume (blanc) - Scudo Luce Chimica (Bianca) - 螢光棒保護殼 (白色) - 萤光棒保护壳 (白色) White reading light. - 白の照明。 - Biała lampka. - Weißes Leselicht. - 주황색 조명 - Lampe d'orientation blanche. - Luce da lettura Bianca. - 白色閱讀燈. - 白色阅读灯. - + \ No newline at end of file diff --git a/addons/common/CfgEden.hpp b/addons/common/CfgEden.hpp index a58896b6fc..1b833b0342 100644 --- a/addons/common/CfgEden.hpp +++ b/addons/common/CfgEden.hpp @@ -8,14 +8,4 @@ class Cfg3DEN { }; }; }; - - class Group { - class AttributeCategories { - class ace_attributes { - displayName = CSTRING(Options); - collapsed = 1; - class Attributes {}; - }; - }; - }; }; diff --git a/addons/common/CfgLocationTypes.hpp b/addons/common/CfgLocationTypes.hpp index 163c1e5a88..15b56c120c 100644 --- a/addons/common/CfgLocationTypes.hpp +++ b/addons/common/CfgLocationTypes.hpp @@ -4,7 +4,7 @@ class CfgLocationTypes { class ACE_HashLocation { color[] = {0,0,0,0}; - drawStyle = "WARNING-ACE_HashLocation_is_deprecated"; // Replaced by CBA_fnc_createNamespace + drawStyle = "bananas"; font = "RobotoCondensed"; importance = 5; name = "HashLocation"; diff --git a/addons/common/HintConfig.hpp b/addons/common/HintConfig.hpp index e3912e56f3..04c6995318 100644 --- a/addons/common/HintConfig.hpp +++ b/addons/common/HintConfig.hpp @@ -2,24 +2,8 @@ class RscStructuredText; class RscMapControl; -class ctrlStructuredText; - -class GVAR(debug_structuredText): ctrlStructuredText { - sizeEx = "16 * pixelH"; - size = "16 * pixelH"; -}; class RscTitles { - class GVAR(watchVariableUI) { - idd = -1; - onLoad = QUOTE(with uiNameSpace do {GVAR(watchVariableUI) = _this select 0};); - movingEnable = 0; - duration = 999999; - fadeIn = "false"; - fadeOut = "false"; - class controls {}; - }; - class ACE_RscHint { idd = -1; onLoad = "uiNamespace setVariable ['ACE_ctrlHint', (_this select 0) displayCtrl 1];"; diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index 5720d31873..d8b22a8198 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -7,13 +7,10 @@ PREP(addToInventory); PREP(assignedItemFix); PREP(assignObjectsInList); PREP(ambientBrightness); -PREP(arithmeticGetResult); -PREP(arithmeticSetSource); PREP(ASLToPosition); PREP(binarizeNumber); PREP(blurScreen); PREP(cachedCall); -PREP(canDig); PREP(canGetInPosition); PREP(canInteractWith); PREP(changeProjectileDirection); @@ -37,11 +34,11 @@ PREP(displayTextPicture); PREP(displayTextStructured); PREP(doAnimation); PREP(doGesture); -PREP(dummy); PREP(dropBackpack); PREP(endRadioTransmission); PREP(eraseCache); PREP(errorMessage); +PREP(execNextFrame); PREP(findUnloadPosition); PREP(firedEH); PREP(fixCollision); @@ -88,10 +85,12 @@ PREP(hadamardProduct); PREP(handleEngine); PREP(handleModifierKey); PREP(handleModifierKeyUp); +PREP(handleScrollWheel); PREP(hasItem); PREP(hasMagazine); PREP(headBugFix); PREP(hideUnit); +PREP(insertionSort); PREP(interpolateFromArray); PREP(inTransitionAnim); PREP(isAwake); @@ -143,7 +142,6 @@ PREP(setHearingCapability); PREP(setName); PREP(setParameter); PREP(setPitchBankYaw); -PREP(setPlayerOwner); PREP(setProne); PREP(setSetting); PREP(setSettingFromConfig); @@ -174,7 +172,8 @@ PREP(unloadPersonLocal); PREP(unmuteUnit); PREP(useItem); PREP(useMagazine); -PREP(watchVariable); +PREP(waitAndExecute); +PREP(waitUntilAndExecute); PREP(waveHeightAt); PREP(translateToWeaponSpace); @@ -184,12 +183,14 @@ PREP(translateToModelSpace); PREP(worldToScreenBounds); // config items +PREP(getConfigType); PREP(getItemType); PREP(getWeaponType); PREP(getWeaponModes); PREP(getWeaponMuzzles); // config objects +PREP(getConfigTypeObject); PREP(getConfigGunner); PREP(getConfigCommander); PREP(getSelectionsWithoutHitPoints); @@ -210,6 +211,10 @@ PREP(getTurretsFFV); PREP(getTurretsOther); PREP(hasHatch); +// missing inventory commands +PREP(binocularMagazine); +PREP(removeBinocularMagazine); + // ACE_Debug PREP(getChildren); PREP(getDisplayConfigName); @@ -219,6 +224,15 @@ PREP(showUser); PREP(dumpPerformanceCounters); PREP(dumpArray); +PREP(globalEvent); +PREP(addEventHandler); +PREP(objectEvent); +PREP(targetEvent); +PREP(serverEvent); +PREP(localEvent); +PREP(removeEventHandler); +PREP(removeAlLEventHandlers); + // Synchronized Events PREP(syncedEventPFH); PREP(addSyncedEventHandler); @@ -233,8 +247,17 @@ PREP(_handleRequestAllSyncedEvents); // other eventhandlers PREP(addActionEventHandler); PREP(addActionMenuEventHandler); +PREP(addScrollWheelEventHandler); PREP(addMapMarkerCreatedEventHandler); PREP(removeActionEventHandler); PREP(removeActionMenuEventHandler); +PREP(removeScrollWheelEventHandler); PREP(removeMapMarkerCreatedEventHandler); + +// hashes +PREP(hashCreate); +PREP(hashSet); +PREP(hashGet); +PREP(hashHasKey); +PREP(hashRem); diff --git a/addons/common/XEH_missionDisplayLoad.sqf b/addons/common/XEH_missionDisplayLoad.sqf index f1657703c0..a07c301288 100644 --- a/addons/common/XEH_missionDisplayLoad.sqf +++ b/addons/common/XEH_missionDisplayLoad.sqf @@ -1,3 +1,4 @@ #include "script_component.hpp" +call COMPILE_FILE(init_handleScrollWheel); call COMPILE_FILE(init_handleModifierKey); diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index ebfbd31ef4..a930fba126 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -65,7 +65,7 @@ if (isServer) then { if ((!isNil "_zeusLogic") && {!isNull _zeusLogic}) then { { 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); + ACE_LOGINFO_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]; }; nil @@ -91,7 +91,7 @@ if (isServer) then { // Event to log Fix Headbug output [QGVAR(headbugFixUsed), { params ["_profileName", "_animation"]; - INFO_2("Headbug Used: Name: %1, Animation: %2",_profileName,_animation); + ACE_LOGINFO_2("Headbug Used: Name: %1, Animation: %2",_profileName,_animation); }] call CBA_fnc_addEventHandler; [QGVAR(fixCollision), FUNC(fixCollision)] call CBA_fnc_addEventHandler; @@ -133,7 +133,6 @@ if (isServer) then { if (isServer) then { [QGVAR(hideObjectGlobal), {(_this select 0) hideObjectGlobal (_this select 1)}] call CBA_fnc_addEventHandler; [QGVAR(enableSimulationGlobal), {(_this select 0) enableSimulationGlobal (_this select 1)}] call CBA_fnc_addEventHandler; - [QGVAR(setShotParents), {(_this select 0) setShotParents [_this select 1, _this select 2]}] call CBA_fnc_addEventHandler; ["ace_setOwner", {(_this select 0) setOwner (_this select 1)}] call CBA_fnc_addEventHandler; [QGVAR(serverLog), FUNC(serverLog)] call CBA_fnc_addEventHandler; }; @@ -147,7 +146,7 @@ if (isServer) then { // Handle JIP scenario if (!isServer) then { ["ace_playerJIP", { - INFO("JIP event synchronization initialized"); + ACE_LOGINFO("JIP event synchronization initialized"); ["ACEa", [player]] call CBA_fnc_serverEvent; }] call CBA_fnc_addEventHandler; } else { @@ -204,13 +203,13 @@ call FUNC(checkFiles); if (isNil QGVAR(settings) || {!isServer && isNil QEGVAR(modules,serverModulesRead)}) exitWith { if !(_waitingMsgSent) then { _args set [0, true]; - INFO("Waiting on settings from server..."); + ACE_LOGINFO("Waiting on settings from server..."); }; }; [_this select 1] call CBA_fnc_removePerFrameHandler; - INFO("Settings received from server."); + ACE_LOGINFO("Settings received from server."); if (isServer) then { //read settings from paramsArray [] call FUNC(readSettingsFromParamsArray); @@ -229,14 +228,14 @@ call FUNC(checkFiles); call FUNC(loadSettingsLocalizedText); }; - INFO("Settings initialized."); + ACE_LOGINFO("Settings initialized."); //Event that settings are safe to use: ["ace_settingsInitialized", []] call CBA_fnc_localEvent; //Set init finished and run all delayed functions: GVAR(settingsInitFinished) = true; - INFO_1("%1 delayed functions running.",count GVAR(runAtSettingsInitialized)); + ACE_LOGINFO_1("%1 delayed functions running.",count GVAR(runAtSettingsInitialized)); { (_x select 1) call (_x select 0); @@ -283,11 +282,11 @@ enableCamShake true; params ["_newPlayer","_oldPlayer"]; if (alive _newPlayer) then { - [FUNC(setName), [_newPlayer]] call CBA_fnc_execNextFrame; + [_newPlayer] call FUNC(setName); }; if (alive _oldPlayer) then { - [FUNC(setName), [_oldPlayer]] call CBA_fnc_execNextFrame; + [_oldPlayer] call FUNC(setName); }; }] call CBA_fnc_addPlayerEventHandler; @@ -296,10 +295,83 @@ enableCamShake true; // Set up numerous eventhanders for player controlled units ////////////////////////////////////////////////// -TRACE_1("adding unit playerEH to set ace_player",isNull cba_events_oldUnit); +// It is possible that CBA_fnc_addPlayerEventHandler has allready been called and run +// We will NOT get any events for the initial state, so manually set ACE_player +if (!isNull (missionNamespace getVariable ["cba_events_oldUnit", objNull])) then { + // INFO("CBA_fnc_addPlayerEventHandler has already run - manually setting ace_player"); //ToDo CBA 3.1 + diag_log text "[ACE-Common - CBA_fnc_addPlayerEventHandler has already run - manually setting ace_player"; + ACE_player = cba_events_oldUnit; +}; + +// "playerChanged" event ["unit", { ACE_player = (_this select 0); -}, true] call CBA_fnc_addPlayerEventHandler; + ["ace_playerChanged", _this] call CBA_fnc_localEvent; +}] call CBA_fnc_addPlayerEventHandler; + +// "playerVehicleChanged" event +["vehicle", { + ["ace_playerVehicleChanged", _this] call CBA_fnc_localEvent; +}] call CBA_fnc_addPlayerEventHandler; + +// "playerTurretChanged" event +["turret", { + ["ace_playerTurretChanged", _this] call CBA_fnc_localEvent; +}] call CBA_fnc_addPlayerEventHandler; + +// "playerWeaponChanged" event +["weapon", { + ["ace_playerWeaponChanged", _this] call CBA_fnc_localEvent; +}] call CBA_fnc_addPlayerEventHandler; + +// "playerInventoryChanged" event +["loadout", { + private _fnc_getAllGear = { + if (isNull _this) exitWith {[ + "", + "", + "", [], + "", [], + "", [], + "", ["","","",""], [], + "", ["","","",""], [], + "", ["","","",""], [], + [], + "", + "" + ]}; + + [ + headgear _this, + goggles _this, + uniform _this, uniformItems _this, + vest _this, vestItems _this, + backpack _this, backpackItems _this, + primaryWeapon _this, primaryWeaponItems _this, primaryWeaponMagazine _this, + secondaryWeapon _this, secondaryWeaponItems _this, secondaryWeaponMagazine _this, + handgunWeapon _this, handgunItems _this, handgunMagazine _this, + assignedItems _this, + binocular _this, + _this call CBA_fnc_binocularMagazine + ] + }; + + ["ace_playerInventoryChanged", [ACE_player, ACE_player call _fnc_getAllGear]] call CBA_fnc_localEvent; +}] call CBA_fnc_addPlayerEventHandler; + +// "playerVisionModeChanged" event +["visionMode", { + ["ace_playerVisionModeChanged", _this] call CBA_fnc_localEvent; +}] call CBA_fnc_addPlayerEventHandler; + +// "cameraViewChanged" event +["cameraView", { + ["ace_cameraViewChanged", _this] call CBA_fnc_localEvent; +}] call CBA_fnc_addPlayerEventHandler; + +["visibleMap", { + ["ace_visibleMapChanged", _this] call CBA_fnc_localEvent; +}] call CBA_fnc_addPlayerEventHandler; GVAR(OldIsCamera) = false; @@ -458,8 +530,8 @@ GVAR(deviceKeyCurrentIndex) = -1; ["ACE3 Equipment", QGVAR(cycleDevice), (localize "STR_ACE_Common_cycleHandheldDevices"), { [1] call FUNC(deviceKeyFindValidIndex); if (GVAR(deviceKeyCurrentIndex) == -1) exitWith {false}; - private _displayName = ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 0); - private _iconImage = ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 1); + _displayName = ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 0); + _iconImage = ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 1); [_displayName, _iconImage] call FUNC(displayTextPicture); true }, diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 355ffb2a7d..eca1aebf36 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -3,9 +3,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(syncedEvents) = [] call CBA_fnc_hashCreate; GVAR(showHudHash) = [] call CBA_fnc_hashCreate; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index 2cddf76bd8..74e5691973 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -14,6 +14,70 @@ class CfgPatches { }; }; +// This class will be deprecated in version 3.8.0 +class ACE_newEvents { + // Status effect events + forceWalk = QGVAR(forceWalk); + blockSprint = QGVAR(blockSprint); + setCaptive = QGVAR(setCaptive); + blockDamage = QGVAR(blockDamage); + blockEngine = QGVAR(blockEngine); + + // Public listenable events + PlayerJip = "ace_playerJIP"; + activeCameraChanged = "ace_activeCameraChanged"; + visibleMapChanged = "ace_visibleMapChanged"; + cameraViewChanged = "ace_cameraViewChanged"; + playerVisionModeChanged = "ace_playerVisionModeChanged"; + playerInventoryChanged = "ace_playerInventoryChanged"; + playerWeaponChanged = "ace_playerWeaponChanged"; + playerTurretChanged = "ace_playerTurretChanged"; + playerVehicleChanged = "ace_playerVehicleChanged"; + playerChanged = "ace_playerChanged"; + SettingsInitialized = "ace_settingsInitialized"; + SettingChanged = "ace_settingChanged"; + firedNonPlayerVehicle = "ace_firedNonPlayerVehicle"; + firedPlayerVehicleNonLocal = "ace_firedPlayerVehicleNonLocal"; + firedPlayerVehicle = "ace_firedPlayerVehicle"; + firedNonPlayer = "ace_firedNonPlayer"; + firedPlayerNonLocal = "ace_firedPlayerNonLocal"; + firedPlayer = "ace_firedPlayer"; + unloadPersonEvent = "ace_unloadPersonEvent"; + loadPersonEvent = "ace_loadPersonEvent"; + useItem = "ace_useItem"; + infoDisplayChanged = "ace_infoDisplayChanged"; + + // Internal callable events + setStatusEffect = QGVAR(setStatusEffect); + HeadbugFixUsed = QGVAR(headbugFixUsed); + InitSettingsFromModules = QGVAR(initSettingsFromModules); + enableSimulationGlobal = QGVAR(enableSimulationGlobal); + hideObjectGlobal = QGVAR(hideObjectGlobal); + fixPosition = QGVAR(fixPosition); + fixFloating = QGVAR(fixFloating); + fixCollision = QGVAR(fixCollision); + unlockVehicle = QGVAR(unlockVehicle); + lockVehicle = QGVAR(lockVehicle); + displayTextPicture = QGVAR(displayTextPicture); + displayTextStructured = QGVAR(displayTextStructured); + setVanillaHitPointDamage = QGVAR(setVanillaHitPointDamage); + setVectorDirAndUp = QGVAR(setVectorDirAndUp); + switchMove = QGVAR(switchMove); + playMoveNow = QGVAR(playMoveNow); + playMove = QGVAR(playMove); + setVelocity = QGVAR(setVelocity); + selectLeader = QGVAR(selectLeader); + setSpeaker = QGVAR(setSpeaker); + engineOn = QGVAR(engineOn); + setFuel = QGVAR(setFuel); + setDir = QGVAR(setDir); + + // Events framework + SEH_s = "ACEs"; + SEH = "ACEe"; + SEH_all = "ACEa"; +}; + #include "CfgEventHandlers.hpp" #include "CfgLocationTypes.hpp" diff --git a/addons/common/functions/fnc_ASLToPosition.sqf b/addons/common/functions/fnc_ASLToPosition.sqf index 0f745cd2bb..a5afb1db75 100644 --- a/addons/common/functions/fnc_ASLToPosition.sqf +++ b/addons/common/functions/fnc_ASLToPosition.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [1, 2, 3] call ace_common_fnc_ASLToPosition - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf index e41436078c..763874de82 100644 --- a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf +++ b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf @@ -8,9 +8,6 @@ * Return Value: * Event is successed * - * Example: - * [bob] call ace_common_fnc__handleRequestAllSyncedEvents - * * Public: No */ #include "script_component.hpp" @@ -18,7 +15,6 @@ params ["_client"]; [GVAR(syncedEvents), { - //IGNORE_PRIVATE_WARNING ["_key", "_value"]; _value params ["", "_eventLog"]; ["ACEs", [_key, _eventLog], _client] call CBA_fnc_targetEvent; diff --git a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf index 61711eb0b0..131ae56f7f 100644 --- a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf +++ b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf @@ -2,21 +2,17 @@ * Author: jaynus * Receives either requests for synchronization from clients, or the synchronization data from the server. * - * Arguments [Client]: + * Arguments [Client] : * 0: eventName * 1: eventLog * - * Arguments [Server]: + * Arguments [Server] : * 0: eventName * 1: client * * Return Value: * Event is successed * - * Example: - * ["name", [LOG]] call ace_common_fnc__handleRequestSyncedEvent //Client - * ["name", bob] call ace_common_fnc__handleRequestSyncedEvent//Server - * * Public: No */ #include "script_component.hpp" @@ -27,7 +23,7 @@ if (isServer) then { params ["_eventName", "_client"]; if !([GVAR(syncedEvents), _eventName] call CBA_fnc_hashHasKey) exitWith { - ERROR_1("Request for synced event - key [%1] not found.", _eventName); + ACE_LOGERROR_1("Request for synced event - key [%1] not found.", _eventName); false }; @@ -46,7 +42,7 @@ if (isServer) then { false } count _eventLog; - INFO_1("[%1] synchronized",_eventName); + ACE_LOGINFO_1("[%1] synchronized",_eventName); }; true diff --git a/addons/common/functions/fnc__handleSyncedEvent.sqf b/addons/common/functions/fnc__handleSyncedEvent.sqf index f59c8a6535..b818ed257c 100644 --- a/addons/common/functions/fnc__handleSyncedEvent.sqf +++ b/addons/common/functions/fnc__handleSyncedEvent.sqf @@ -2,7 +2,7 @@ * Author: jaynus * Handles synced events being received. Server will log them, and server/client will execute them. * - * Arguments: [Client] + * Arguments [Client] : * 0: eventName * 1: arguments * 2: ttl @@ -10,9 +10,6 @@ * Return Value: * Boolean of success * - * Example: - * [bob] call ace_common_fnc__handleSyncedEvent - * * Public: No */ #include "script_component.hpp" @@ -20,7 +17,7 @@ params ["_name", "_args", "_ttl"]; if !([GVAR(syncedEvents), _name] call CBA_fnc_hashHasKey) exitWith { - ERROR_1("Synced event key [%1] not found (_handleSyncedEvent).", _name); + ACE_LOGERROR_1("Synced event key [%1] not found (_handleSyncedEvent).", _name); false }; diff --git a/addons/common/functions/fnc_addActionEventHandler.sqf b/addons/common/functions/fnc_addActionEventHandler.sqf index 18d337225f..56d2de16db 100644 --- a/addons/common/functions/fnc_addActionEventHandler.sqf +++ b/addons/common/functions/fnc_addActionEventHandler.sqf @@ -11,9 +11,6 @@ * Return Value: * ID of the action (used to remove it later) * - * Example: - * [bob, "DefaultAction", "condition", "execute"] call ace_common_fnc_addActionEventHandler - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_addActionMenuEventHandler.sqf b/addons/common/functions/fnc_addActionMenuEventHandler.sqf index 94028b9aea..c86cf45f17 100644 --- a/addons/common/functions/fnc_addActionMenuEventHandler.sqf +++ b/addons/common/functions/fnc_addActionMenuEventHandler.sqf @@ -15,9 +15,6 @@ * Return Value: * ID of the action (used to remove it later) * - * Example: - * [bob, "Title", "DefaultAction", "condition", "execute", "conditionmenu", "executemenu", 5] call ace_common_fnc_addActionMenuEventHandler - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_addCanInteractWithCondition.sqf b/addons/common/functions/fnc_addCanInteractWithCondition.sqf index 7c2bc3591b..294dac1c72 100644 --- a/addons/common/functions/fnc_addCanInteractWithCondition.sqf +++ b/addons/common/functions/fnc_addCanInteractWithCondition.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * ["ID", {Condition}] call ace_common_fnc_addCanInteractWithCondition - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_addEventHandler.sqf b/addons/common/functions/fnc_addEventHandler.sqf new file mode 100644 index 0000000000..6ded410c87 --- /dev/null +++ b/addons/common/functions/fnc_addEventHandler.sqf @@ -0,0 +1,14 @@ +#define DEBUG_MODE_FULL +#include "script_component.hpp" + +params ["_eventName", "_eventCode"]; + +private _newName = getText (configFile >> "ACE_newEvents" >> _eventName); +if (_newName != "") then { + TRACE_2("Switching Names",_eventName,_newName); + _eventName = _newName; +}; + +[_eventName, _eventCode] call CBA_fnc_addEventHandler; + +ACE_DEPRECATED("ace_common_fnc_addEventHandler","3.8.0","CBA_fnc_addEventHandler"); diff --git a/addons/common/functions/fnc_addLineToDebugDraw.sqf b/addons/common/functions/fnc_addLineToDebugDraw.sqf index 46f015c5e0..f0a643e922 100644 --- a/addons/common/functions/fnc_addLineToDebugDraw.sqf +++ b/addons/common/functions/fnc_addLineToDebugDraw.sqf @@ -7,41 +7,42 @@ * 1: End point ASL * 2: Color * - * Return Value: * None * - * Example: - * [[0,0,0], [1,1,0], [1,0,0,1]] call ace_common_fnc_addLineToDebugDraw; - * * Public: No */ #include "script_component.hpp" -params ["_startASL", "_endASL", "_color"]; - if (isNil QGVAR(debugLines)) then { GVAR(debugLines) = []; GVAR(debugLinesIndex) = 0; }; if (count GVAR(debugLines) < 100) then { - GVAR(debugLines) pushBack [ASLtoAGL _startASL, ASLtoAGL _endASL, _color]; + GVAR(debugLines) pushBack _this; GVAR(debugLinesIndex) = 0; } else { - GVAR(debugLines) set [GVAR(debugLinesIndex), [ASLtoAGL _startASL, ASLtoAGL _endASL, _color]]; + GVAR(debugLines) set [GVAR(debugLinesIndex), _this]; GVAR(debugLinesIndex) = (GVAR(debugLinesIndex) + 1) mod 100; }; if (isNil QGVAR(debugDrawHandler)) then { GVAR(debugDrawHandler) = addMissionEventHandler ["Draw3D", { - if (GVAR(debugLines) isEqualTo []) exitWith { + if (count GVAR(debugLines) == 0) exitWith { removeMissionEventHandler ["Draw3D", GVAR(debugDrawHandler)]; GVAR(debugDrawHandler) = nil; }; { - _x params ["_start", "_end", "_color"]; - drawLine3D [_start, _end, _color]; + _p0 = _x select 0; + if (!surfaceIsWater _p0) then { + _p0 = ASLtoATL _p0; + }; + _p1 = _x select 1; + if (!surfaceIsWater _p1) then { + _p1 = ASLtoATL _p1; + }; + drawLine3D [_p0, _p1, _x select 2]; } forEach GVAR(debugLines); }]; }; diff --git a/addons/common/functions/fnc_addMapMarkerCreatedEventHandler.sqf b/addons/common/functions/fnc_addMapMarkerCreatedEventHandler.sqf index 1b82b9fedf..2201426e48 100644 --- a/addons/common/functions/fnc_addMapMarkerCreatedEventHandler.sqf +++ b/addons/common/functions/fnc_addMapMarkerCreatedEventHandler.sqf @@ -8,9 +8,6 @@ * Return Value: * ID of the event script (used to remove it later). * - * Example: - * ["bob"] call ace_common_fnc_addMapMarkerCreatedEventHandler - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_addScrollWheelEventHandler.sqf b/addons/common/functions/fnc_addScrollWheelEventHandler.sqf new file mode 100644 index 0000000000..2a9b26e71c --- /dev/null +++ b/addons/common/functions/fnc_addScrollWheelEventHandler.sqf @@ -0,0 +1,35 @@ +/* + * Author: commy2 + * Add an event handler that executes every time the scroll wheel is used. This is needed, because adding a MouseZ display event handler to display 46 will break in save games. + * _this will be [Interval] where 'Interval' is a number. + * + * Arguments: + * 0: Code to execute + * + * Return Value: + * ID of the event script (used to remove it later). + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_statement"]; + +ACE_DEPRECATED("ace_common_fnc_addScrollWheelEventHandler", "3.8.0", "'MouseZChanged' Display EventHandler"); + +if (_statement isEqualType "") then { + _statement = compile _statement; +}; + +private _actionsVar = missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]]; + +_actionsVar params ["_id", "_actionIDs", "_actions"]; + +_id = _id + 1; + +_actionIDs pushBack _id; +_actions pushBack _statement; + +missionNamespace setVariable ["ACE_EventHandler_ScrollWheel", [_id, _actionIDs, _actions]]; + +_id diff --git a/addons/common/functions/fnc_addSetting.sqf b/addons/common/functions/fnc_addSetting.sqf index 0e5d391b1a..c4b97ddcce 100644 --- a/addons/common/functions/fnc_addSetting.sqf +++ b/addons/common/functions/fnc_addSetting.sqf @@ -16,9 +16,6 @@ * Return Value: * None * - * Example: - * ["bob", "type", true, "bob", "person", [1,2,3], true, 5] call ace_common_fnc_addSettings - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_addSyncedEventHandler.sqf b/addons/common/functions/fnc_addSyncedEventHandler.sqf index d46dcbe45c..6499f96ff4 100644 --- a/addons/common/functions/fnc_addSyncedEventHandler.sqf +++ b/addons/common/functions/fnc_addSyncedEventHandler.sqf @@ -20,7 +20,7 @@ params ["_name", "_handler", ["_ttl", 0]]; if ([GVAR(syncedEvents), _name] call CBA_fnc_hashHasKey) exitWith { - ERROR_1("Duplicate synced event [%1] creation.",_name); + ACE_LOGERROR_1("Duplicate synced event [%1] creation.",_name); false }; diff --git a/addons/common/functions/fnc_addToInventory.sqf b/addons/common/functions/fnc_addToInventory.sqf index 19aea9bcdd..9d796d6018 100644 --- a/addons/common/functions/fnc_addToInventory.sqf +++ b/addons/common/functions/fnc_addToInventory.sqf @@ -12,9 +12,6 @@ * 0: Added to player * 1: weaponholder * - * Example: - * [bob, "classname", "", 5] call ace_common_fnc_addToInventory - * * Public: Yes */ #include "script_component.hpp" @@ -134,7 +131,7 @@ switch (_type select 0) do { default { _addedToUnit = false; - WARNING_2("Incorrect item type passed to %1, passed: %2",QFUNC(AddToInventory),_type); + ACE_LOGWARNING_2("Incorrect item type passed to %1, passed: %2",QFUNC(AddToInventory),_type); }; }; diff --git a/addons/common/functions/fnc_ambientBrightness.sqf b/addons/common/functions/fnc_ambientBrightness.sqf index 276d7aa5c3..4ec2840e47 100644 --- a/addons/common/functions/fnc_ambientBrightness.sqf +++ b/addons/common/functions/fnc_ambientBrightness.sqf @@ -8,9 +8,6 @@ * Return Value: * Ambient brightness * - * Example: - * [] call ace_common_fnc_ambientBrightness - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_arithmeticGetResult.sqf b/addons/common/functions/fnc_arithmeticGetResult.sqf deleted file mode 100644 index 3dae9b23a0..0000000000 --- a/addons/common/functions/fnc_arithmeticGetResult.sqf +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Author: PabstMirror - * Gets arithmetic result from a set. - * - * Arguments: - * 0: Namespace - * 1: Number Set ID - * 2: Operation (sum, product, min, max, avg) - * - * Return Value: - * Value - * - * Example: - * [ace_player, "ace_aimCoefficents", "product"] call ace_common_fnc_arithmeticGetResult - * [missionNameSpace, "ace_hearing", "min"] call ace_common_fnc_arithmeticGetResult - * - * Public: Yes - */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - -params ["_namespace", "_setID", "_op"]; -TRACE_3("params",_namespace,_setID,_op); - -private _data = (_namespace getVariable _setID) param [2, []]; - -switch (_op) do { - case ("sum"): { - private _result = 0; - { - _result = _result + (call _x); - nil - } count _data; - _result // return - }; - case ("product"): { - private _result = 1; - { - _result = _result * (call _x); - nil - } count _data; - _result // return - }; - case ("min"): { - private _result = 1e99; - { - _result = _result min (call _x); - nil - } count _data; - _result // return - }; - case ("max"): { - private _result = -1e99; - { - _result = _result max (call _x); - nil - } count _data; - _result // return - }; - case ("avg"): { - private _result = 0; - { - _result = _result + (call _x); - nil - } count _data; - _result / (count _data); // return - }; - default {3735928559}; -}; diff --git a/addons/common/functions/fnc_arithmeticSetSource.sqf b/addons/common/functions/fnc_arithmeticSetSource.sqf deleted file mode 100644 index a11cb29527..0000000000 --- a/addons/common/functions/fnc_arithmeticSetSource.sqf +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Author: PabstMirror - * Adds or removes a source to an arithmetic set. - * - * Arguments: - * 0: Namespace - * 1: Number Set ID - * 2: Source - * 3: Code that returns a number (can access var _namespace) [use {} to remove] - * - * Return Value: - * None - * - * Example: - * [missionNameSpace, "ace_hearing", "myMission", {0.5}] call ace_common_fnc_arithmeticSetSource - * [ace_player, "ace_aimCoefficents", "ace_medical", {linearConversion [0,1,(_namespace getVariable "ace_medical_pain",1,0.2,true]}] call ace_common_fnc_arithmeticSetSource - * - * Public: Yes - */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - -params ["_namespace", "_setID", "_source", "_variable"]; -TRACE_4("params",_namespace,_setID,_source,_variable); - -private _hash = _namespace getVariable _setID; -if (isNil "_hash") then { - _hash = [] call CBA_fnc_hashCreate; - _namespace setVariable [_setID, _hash]; -}; -if (_variable isEqualTo {}) then { - TRACE_1("removing",_source); - [_hash, _source] call CBA_fnc_hashRem; -} else { - TRACE_2("adding",_source,_variable); - [_hash, _source, _variable] call CBA_fnc_hashSet; -}; - -nil diff --git a/addons/common/functions/fnc_assignedItemFix.sqf b/addons/common/functions/fnc_assignedItemFix.sqf index f7fe02f30c..9a4ac5bf47 100644 --- a/addons/common/functions/fnc_assignedItemFix.sqf +++ b/addons/common/functions/fnc_assignedItemFix.sqf @@ -8,10 +8,7 @@ * Return Value: * None * - * Example: - * call ace_common_fnc_assignedItemFix - * - * Public: No + * Public : No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_binarizeNumber.sqf b/addons/common/functions/fnc_binarizeNumber.sqf index 82494e39d6..0945afa770 100644 --- a/addons/common/functions/fnc_binarizeNumber.sqf +++ b/addons/common/functions/fnc_binarizeNumber.sqf @@ -9,9 +9,6 @@ * Return Value: * Booleans * - * Example: - * [5, 5] call ace_common_fnc_binarizeNumber - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_binocularMagazine.sqf b/addons/common/functions/fnc_binocularMagazine.sqf new file mode 100644 index 0000000000..aacac7c142 --- /dev/null +++ b/addons/common/functions/fnc_binocularMagazine.sqf @@ -0,0 +1,20 @@ +/* + * Author: commy2 + * Returns the magazine of the units rangefinder. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Magazine of the units binocular + * + * Example: + * player call ace_common_fnc_binocularMagazine + * + * Public: Yes + */ +#include "script_component.hpp" + +ACE_DEPRECATED("ace_common_fnc_binocularMagazine","3.8.0","CBA_fnc_binocularMagazine"); + +_this call CBA_fnc_binocularMagazine diff --git a/addons/common/functions/fnc_blurScreen.sqf b/addons/common/functions/fnc_blurScreen.sqf index 0995c957d9..4a6c0d3cb4 100644 --- a/addons/common/functions/fnc_blurScreen.sqf +++ b/addons/common/functions/fnc_blurScreen.sqf @@ -4,7 +4,7 @@ * * Arguments: * 0: ID - * 1: Show? + * 1: Show? * * Return Value: * None diff --git a/addons/common/functions/fnc_cachedCall.sqf b/addons/common/functions/fnc_cachedCall.sqf index 8636ffff84..8ff6744a54 100644 --- a/addons/common/functions/fnc_cachedCall.sqf +++ b/addons/common/functions/fnc_cachedCall.sqf @@ -13,9 +13,6 @@ * Return Value: * Result of the function * - * Example: - * [[array]], {dothings}, NAMESPACE, "UID", 5, "clear"] call ace_common_fnc_cachedCall - * * Public: No */ #include "script_component.hpp" @@ -36,12 +33,11 @@ if ((_namespace getVariable [_uid, [-99999]]) select 0 < diag_tickTime) then { missionNamespace setVariable [_varName, _cacheList]; [_event, { + // _eventName is defined on the function that calls the event #ifdef DEBUG_MODE_FULL - INFO_1("Clear cached variables on event: %1",_eventName); + ACE_LOGINFO_1("Clear cached variables on event: %1",_eventName); #endif // Get the list of caches to clear - //IGNORE_PRIVATE_WARNING ["_eventName"]; - // _eventName is defined on the function that calls the event private _varName = format [QGVAR(clearCache_%1), _eventName]; private _cacheList = missionNamespace getVariable [_varName, []]; // Erase all the cached results @@ -58,9 +54,9 @@ if ((_namespace getVariable [_uid, [-99999]]) select 0 < diag_tickTime) then { }; #ifdef DEBUG_MODE_FULL - INFO_2("Calculated result: %1 %2",_namespace,_uid); + ACE_LOGINFO_2("Calculated result: %1 %2",_namespace,_uid); } else { - INFO_2("Cached result: %1 %2",_namespace,_uid); + ACE_LOGINFO_2("Cached result: %1 %2",_namespace,_uid); #endif }; diff --git a/addons/common/functions/fnc_canDig.sqf b/addons/common/functions/fnc_canDig.sqf deleted file mode 100644 index b3cdfd8405..0000000000 --- a/addons/common/functions/fnc_canDig.sqf +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Author: Ruthberg, commy2 - * Checks if the player can dig on the surface below (enough dust). - * - * Arguments: - * 0: Unit - * - * Return Value: - * Can Dig - * - * Example: - * [ACE_player] call ace_common_fnc_canDig - * - * Public: No - */ -#include "script_component.hpp" - -params ["_unit"]; - -private _posASL = getPosASL _unit; - -if ((getPosATL _unit) select 2 > 0.05 || // Walking on objects, such as buildings, pavements, etc. - {surfaceIsWater _posASL} // posATL in low water (not as low to allow awalking) is negative -) exitWith {false}; - -private _surfaceClass = (surfaceType _posASL) select [1]; -private _surfaceType = getText (configFile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron"); -private _surfaceDust = getNumber (configFile >> "CfgSurfaces" >> _surfaceClass >> "dust"); -TRACE_2("Surface",_surfaceType,_surfaceDust); - -!(_surfaceType in DIG_SURFACE_BLACKLIST) && {_surfaceDust >= 0.1} diff --git a/addons/common/functions/fnc_canGetInPosition.sqf b/addons/common/functions/fnc_canGetInPosition.sqf index c0379c861a..c470337d6a 100644 --- a/addons/common/functions/fnc_canGetInPosition.sqf +++ b/addons/common/functions/fnc_canGetInPosition.sqf @@ -7,14 +7,12 @@ * 1: The vehicle to be entered * 2: Position. Can be "Driver", "Pilot", "Gunner", "Commander", "Copilot", "Turret", "FFV", "Codriver" or "Cargo" * 3: Check current distance to vehicles memory point? (default: false) - * 4: Index. "Turret", "FFV", "Codriver" and "Cargo" support this optional parameter. Which position should be taken. Note: This index is different from Armas "cargoIndex". (default: next free index) + * 4: Index. "Turret", "FFV", "Codriver" and "Cargo" support this optional parameter. Which position should be taken. + * Note: This index is diffrent from Armas "cargoIndex". (default: next free index) * * Return Value: * None * - * Example: - * [bob, car, "Pilot", true, "Turret"] call ace_common_fnc_canGetInPosition - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_canInteractWith.sqf b/addons/common/functions/fnc_canInteractWith.sqf index a94ba6d9d1..7603452965 100644 --- a/addons/common/functions/fnc_canInteractWith.sqf +++ b/addons/common/functions/fnc_canInteractWith.sqf @@ -8,10 +8,7 @@ * 2: Exceptions. What general conditions are to skip? (default: []) * * Return Value: - * Unit can interact? - * - * Example: - * [bob, target, []] call ace_common_fnc_canInteractWith + * Unit can interact? * * Public: Yes */ diff --git a/addons/common/functions/fnc_changeProjectileDirection.sqf b/addons/common/functions/fnc_changeProjectileDirection.sqf index 6e42ee332a..89a8988306 100644 --- a/addons/common/functions/fnc_changeProjectileDirection.sqf +++ b/addons/common/functions/fnc_changeProjectileDirection.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * [bullet, 2, 5, 3] call ace_common_fnc_changeProjectileDirection - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index 480cdab9a9..9d5a2436c1 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * call ace_common_fnc_checkFiles - * * Public: No */ #include "script_component.hpp" @@ -20,20 +17,15 @@ /////////////// private _version = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr"); -INFO_1("ACE is version %1.",_version); +ACE_LOGINFO_1("ACE is version %1.",_version); //CBA Versioning check - close main display if using incompatible version private _cbaVersionAr = getArray (configFile >> "CfgPatches" >> "cba_main" >> "versionAr"); -private _cbaRequiredAr = getArray (configFile >> "CfgSettings" >> "CBA" >> "Versioning" >> "ACE" >> "dependencies" >> "CBA") select 1; - -private _cbaVersionStr = _cbaVersionAr joinString "."; -private _cbaRequiredStr = _cbaRequiredAr joinString "."; - -INFO_2("CBA is version %1 (min required %2)",_cbaVersionStr,_cbaRequiredStr); - +private _cbaRequiredAr = (getArray (configFile >> "CfgSettings" >> "CBA" >> "Versioning" >> "ACE" >> "dependencies" >> "CBA")) select 1; +ACE_LOGINFO_2("CBA is version %1 [min required %2]",_cbaVersionAr,_cbaRequiredAr); if ([_cbaRequiredAr, _cbaVersionAr] call cba_versioning_fnc_version_compare) then { - private _errorMsg = format ["CBA version %1 is outdated (required %2)", _cbaVersionStr, _cbaRequiredStr]; - ERROR(_errorMsg); + private _errorMsg = format ["CBA Version [%1] is outdated [required %2]", _cbaVersionAr, _cbaRequiredAr]; + ACE_LOGERROR(_errorMsg); if (hasInterface) then { ["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage); }; @@ -44,35 +36,24 @@ private _addons = "true" configClasses (configFile >> "CfgPatches");// _addons = _addons apply {toLower configName _x};// _addons = _addons select {_x find "ace_" == 0}; -private _oldCompats = []; { if (getText (configFile >> "CfgPatches" >> _x >> "versionStr") != _version) then { private _errorMsg = format ["File %1.pbo is outdated.", _x]; - ERROR(_errorMsg); + ACE_LOGERROR(_errorMsg); - if ((_x select [0, 10]) != "ace_compat") then { - if (hasInterface) then { - ["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage); - }; - } else { - _oldCompats pushBack _x; // Don't block game if it's just an old compat pbo + if (hasInterface) then { + ["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage); }; }; false } count _addons; -if (!(_oldCompats isEqualTo [])) then { - [{ - // Lasts for ~10 seconds - ERROR_WITH_TITLE_1("The following ACE compatiblity PBOs are outdated", "%1", _this); - }, _oldCompats, 1] call CBA_fnc_waitAndExecute; -}; /////////////// // check dlls /////////////// if (toLower (productVersion select 6) in ["linux", "osx"]) then { - INFO_2("Operating system does not support DLL file format"); + ACE_LOGINFO_2("Operating system does not support DLL file format"); } else { { private _versionEx = _x callExtension "version"; @@ -80,14 +61,14 @@ if (toLower (productVersion select 6) in ["linux", "osx"]) then { if (_versionEx == "") then { private _errorMsg = format ["Extension %1.dll not installed.", _x]; - ERROR(_errorMsg); + ACE_LOGERROR(_errorMsg); if (hasInterface) then { ["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage); }; } else { // Print the current extension version - INFO_2("Extension version: %1: %2",_x,_versionEx); + ACE_LOGINFO_2("Extension version: %1: %2",_x,_versionEx); }; false } count getArray (configFile >> "ACE_Extensions" >> "extensions"); @@ -116,7 +97,7 @@ if (isMultiplayer) then { if (_version != GVAR(ServerVersion)) then { private _errorMsg = format ["Client/Server Version Mismatch. Server: %1, Client: %2.", GVAR(ServerVersion), _version]; - ERROR(_errorMsg); + ACE_LOGERROR(_errorMsg); if (hasInterface) then { ["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage); @@ -125,9 +106,9 @@ if (isMultiplayer) then { _addons = _addons - GVAR(ServerAddons); if !(_addons isEqualTo []) then { - private _errorMsg = format ["Client/Server Addon Mismatch. Client has extra addons: %1.",_addons]; + _errorMsg = format ["Client/Server Addon Mismatch. Client has extra addons: %1.",_addons]; - ERROR(_errorMsg); + ACE_LOGERROR(_errorMsg); if (hasInterface) then { ["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage); diff --git a/addons/common/functions/fnc_checkPBOs.sqf b/addons/common/functions/fnc_checkPBOs.sqf index 2504d73dc1..1328624a0c 100644 --- a/addons/common/functions/fnc_checkPBOs.sqf +++ b/addons/common/functions/fnc_checkPBOs.sqf @@ -14,9 +14,6 @@ * Return Value: * None * - * Example: - * [0, false, ""] call ace_common_fnc_checkPBOs - * * Public: Yes */ #include "script_component.hpp" @@ -66,7 +63,7 @@ if (!isServer) then { //[QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent; - ERROR(_error); + ACE_LOGERROR(_error); if (_mode < 2) then { _text = composeText [lineBreak, parseText format ["%1", _text]]; diff --git a/addons/common/functions/fnc_claim.sqf b/addons/common/functions/fnc_claim.sqf index 79237d725b..214de6052b 100644 --- a/addons/common/functions/fnc_claim.sqf +++ b/addons/common/functions/fnc_claim.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [bob, flag, true] call ace_common_fnc_claim - * * Public: No */ #include "script_component.hpp" @@ -22,7 +19,7 @@ params ["_unit", "_target", ["_lockTarget", false]]; private _owner = _target getVariable [QGVAR(owner), objNull]; if (!isNull _owner && {!isNull _unit} && {_unit != _owner}) then { - ERROR("Claiming already owned object."); + ACE_LOGERROR("Claiming already owned object."); }; // transfer this immediately diff --git a/addons/common/functions/fnc_codeToString.sqf b/addons/common/functions/fnc_codeToString.sqf index ff4597f7bb..62e4cb5698 100644 --- a/addons/common/functions/fnc_codeToString.sqf +++ b/addons/common/functions/fnc_codeToString.sqf @@ -8,9 +8,6 @@ * Return Value: * Code * - * Example: - * ["bob"] call ace_common_fnc_codeToString - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_createOrthonormalReference.sqf b/addons/common/functions/fnc_createOrthonormalReference.sqf index cb443de15b..e45bf269aa 100644 --- a/addons/common/functions/fnc_createOrthonormalReference.sqf +++ b/addons/common/functions/fnc_createOrthonormalReference.sqf @@ -2,7 +2,7 @@ * Author: esteldunedain * Returns a orthonormal system of reference aligned with the supplied vector * - * Arguments: + * Arguments: * Vector to align the coordinate system with * * Return Value: @@ -10,9 +10,6 @@ * 1: Normalized Cross Product Vector * 2: Vector Cross Product * - * Example: - * [[0,0,0]] call ace_common_fnc_createOrthonormalReference - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_currentChannel.sqf b/addons/common/functions/fnc_currentChannel.sqf index 0844ebd881..a78e2b0204 100644 --- a/addons/common/functions/fnc_currentChannel.sqf +++ b/addons/common/functions/fnc_currentChannel.sqf @@ -8,9 +8,6 @@ * Return Value: * The current channel ("group", "side", "global", "command", "vehicle", "direct", "custom_X") * - * Example: - * [] call ace_common_fnc_currentChannel - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_debug.sqf b/addons/common/functions/fnc_debug.sqf index a825c82523..019ce2abff 100644 --- a/addons/common/functions/fnc_debug.sqf +++ b/addons/common/functions/fnc_debug.sqf @@ -9,9 +9,6 @@ * Return Value: * Message is Printed * - * Example: - * [bob, 2] call ace_common_fnc_debug - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_debugModule.sqf b/addons/common/functions/fnc_debugModule.sqf index c4fa7b8547..125887183e 100644 --- a/addons/common/functions/fnc_debugModule.sqf +++ b/addons/common/functions/fnc_debugModule.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * call ace_common_fnc_debugModule - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_defineVariable.sqf b/addons/common/functions/fnc_defineVariable.sqf index 7c1a694aeb..35a1e96d31 100644 --- a/addons/common/functions/fnc_defineVariable.sqf +++ b/addons/common/functions/fnc_defineVariable.sqf @@ -13,9 +13,6 @@ * Return Value: * None * - * Example: - * ["bob", 1, true, "category", 1, true] call ace_common_fnc_defineVariable - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_deprecateComponent.sqf b/addons/common/functions/fnc_deprecateComponent.sqf index 6bf38559fc..21905e8e4e 100644 --- a/addons/common/functions/fnc_deprecateComponent.sqf +++ b/addons/common/functions/fnc_deprecateComponent.sqf @@ -40,20 +40,20 @@ if (_isDeprecatedLoaded && {!_isReplacementLoaded}) then { private _message = format[ "Component %1 is deprecated. It has been replaced by %2. The component %1 is no longer usable on this version. ", _oldComponentName, _newComponentName, _version]; systemChat format["ACE [ERROR] - %1", _message]; - ERROR(_message); + ACE_LOGERROR(_message); }; case (_componentMajor >= _major && {_componentMinor >= _minor-1}): { // Removed the next this version private _message = format[ "Component %1 is deprecated. It is replaced by %2. Please disable %1 and make use of %2. " + "The component (%1) will no longer be available from version %3 and later.", _oldComponentName, _newComponentName, _version]; systemChat format["ACE [WARNING] - %1", _message]; - WARNING(_message); + ACE_LOGWARNING(_message); }; case (_componentMajor == _major && {_componentMinor >= _minor - 2}): { // we are in a version leading up to removal private _message = format[ "Component %1 is deprecated. It is replaced by %2. Please disable %1 and make use of %2. " + "The component (%1) will no longer be available from version %3 and later.", _oldComponentName, _newComponentName, _version]; - WARNING(_message); + ACE_LOGWARNING(_message); }; default { }; diff --git a/addons/common/functions/fnc_deviceKeyFindValidIndex.sqf b/addons/common/functions/fnc_deviceKeyFindValidIndex.sqf index aeacf940cc..02135e59db 100644 --- a/addons/common/functions/fnc_deviceKeyFindValidIndex.sqf +++ b/addons/common/functions/fnc_deviceKeyFindValidIndex.sqf @@ -3,7 +3,7 @@ * Finds next valid index for the device array. * * Arguments: - * 0: Offset from currentIndex (use 1 to find next valid after current) or a displayName string (default: 0) + * 0: Offset from currentIndex (use 1 to find next valid after current) or a displayName string (default: 0) * * Return Value: * The new index (-1 if no valid) @@ -28,7 +28,7 @@ if (_searchOffsetOrName isEqualType "") then { } forEach GVAR(deviceKeyHandlingArray); } else { if (count GVAR(deviceKeyHandlingArray) > 0) then { - private _baseIndex = [GVAR(deviceKeyCurrentIndex) + _searchOffsetOrName, 0] select (GVAR(deviceKeyCurrentIndex) == -1); + _baseIndex = [GVAR(deviceKeyCurrentIndex) + _searchOffsetOrName, 0] select (GVAR(deviceKeyCurrentIndex) == -1); for "_offset" from _baseIndex to (count GVAR(deviceKeyHandlingArray) - 1 + _baseIndex) do { private _realIndex = _offset % (count GVAR(deviceKeyHandlingArray)); diff --git a/addons/common/functions/fnc_disableAI.sqf b/addons/common/functions/fnc_disableAI.sqf index 75c59d1a9a..5dc3cdfbb2 100644 --- a/addons/common/functions/fnc_disableAI.sqf +++ b/addons/common/functions/fnc_disableAI.sqf @@ -30,7 +30,7 @@ if !([_unit] call EFUNC(common,isPlayer)) then { } else { //Sanity check to make sure we don't enable unconsious AI if (_unit getVariable ["ace_isunconscious", false] && alive _unit) exitWith { - ERROR("Enabling AI for unconsious unit"); + ACE_LOGERROR("Enabling AI for unconsious unit"); }; _unit enableAI "MOVE"; diff --git a/addons/common/functions/fnc_disableUserInput.sqf b/addons/common/functions/fnc_disableUserInput.sqf index 729da9b504..8e28edc5f0 100644 --- a/addons/common/functions/fnc_disableUserInput.sqf +++ b/addons/common/functions/fnc_disableUserInput.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [true] call ace_common_fnc_disableUserInput - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_displayText.sqf b/addons/common/functions/fnc_displayText.sqf index fdd1f960d5..ee22f6949a 100644 --- a/addons/common/functions/fnc_displayText.sqf +++ b/addons/common/functions/fnc_displayText.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * ["Message", true, 5, 2] call ace_common_fnc_displayText - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index ee2c6a9f3f..e952fce9a4 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -1,25 +1,23 @@ /* - * Author: commy2, Glowbal, GitHawk + * Author: commy2, Glowbal * Display a structured text. * * Arguments: * 0: Text * 1: Size of the textbox (default: 1.5) * 2: Target Unit. Will only display if target is the player controlled object (default: ACE_player) - * 3: Custom Width (default: 10) * * Return Value: * None * * Example: - * [["Test: %1", 123], 1.5] call ace_common_fnc_displayTextStructured - * ["wow", 1, ace_player, 3] call ace_common_fnc_displayTextStructured + * * * Public: Yes */ #include "script_component.hpp" -params [["_text", ""], ["_size", 1.5, [0]], ["_target", ACE_player, [objNull]], ["_width", 10, [0]]]; +params [["_text", ""], ["_size", 1.5, [0]], ["_target", ACE_player, [objNull]]]; if (_target != ACE_player) exitWith {}; @@ -57,9 +55,9 @@ private _wPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_W", (10 private _hPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))]; */ -private _xPos = ((safezoneX + safezoneW) - (_width *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40)); +private _xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40)); private _yPos = safeZoneY + 0.175 * safezoneH; -private _wPos = (_width *(((safezoneW / safezoneH) min 1.2) / 40)); +private _wPos = (10 *(((safezoneW / safezoneH) min 1.2) / 40)); private _hPos = (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)); // Zeus Interface Open and Display would be under the "CREATE" list diff --git a/addons/common/functions/fnc_dropBackpack.sqf b/addons/common/functions/fnc_dropBackpack.sqf index dcbb9a3f70..b0d77af7d5 100644 --- a/addons/common/functions/fnc_dropBackpack.sqf +++ b/addons/common/functions/fnc_dropBackpack.sqf @@ -8,9 +8,6 @@ * Return Value: * Ground wepaon holder with backpack * - * Example: - * [unit] call ace_common_fnc_dropBackpack - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_dummy.sqf b/addons/common/functions/fnc_dummy.sqf deleted file mode 100644 index a70fed35c0..0000000000 --- a/addons/common/functions/fnc_dummy.sqf +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Author: SilentSpike - * A dummy function which does nothing. Can be useful. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Public: No - */ diff --git a/addons/common/functions/fnc_dumpPerformanceCounters.sqf b/addons/common/functions/fnc_dumpPerformanceCounters.sqf index a6bcc1d29c..ec6f225ce4 100644 --- a/addons/common/functions/fnc_dumpPerformanceCounters.sqf +++ b/addons/common/functions/fnc_dumpPerformanceCounters.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * call ace_common_fnc_dumpPerformanceCounters - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_endRadioTransmission.sqf b/addons/common/functions/fnc_endRadioTransmission.sqf index ead1ec29c6..4597426d67 100644 --- a/addons/common/functions/fnc_endRadioTransmission.sqf +++ b/addons/common/functions/fnc_endRadioTransmission.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * call ace_common_fnc_endRadioTransmission - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_eraseCache.sqf b/addons/common/functions/fnc_eraseCache.sqf index 0bcfab1dd4..ae988ced28 100644 --- a/addons/common/functions/fnc_eraseCache.sqf +++ b/addons/common/functions/fnc_eraseCache.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [NAMESPACE, "UID"] call ace_common_fnc_eraseCache - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_errorMessage.sqf b/addons/common/functions/fnc_errorMessage.sqf index 8ccd7c22fb..88e0a3b90f 100644 --- a/addons/common/functions/fnc_errorMessage.sqf +++ b/addons/common/functions/fnc_errorMessage.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * call ace_common_fnc_errorMessage - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_execNextFrame.sqf b/addons/common/functions/fnc_execNextFrame.sqf new file mode 100644 index 0000000000..c1c4b81592 --- /dev/null +++ b/addons/common/functions/fnc_execNextFrame.sqf @@ -0,0 +1,18 @@ +/* + * Author: esteldunedain + * Executes a code on the next frame + * + * Arguments: + * 0: Code to execute + * 1: Parameters to run the code with + * + * Return Value: + * PFH handler ID + * + * Public: Yes + */ +#include "script_component.hpp" + +ACE_DEPRECATED("ace_common_fnc_execNextFrame","3.8.0","CBA_fnc_execNextFrame"); + +_this call CBA_fnc_execNextFrame; diff --git a/addons/common/functions/fnc_firedEH.sqf b/addons/common/functions/fnc_firedEH.sqf index cbf49f626b..29e58a4c6a 100644 --- a/addons/common/functions/fnc_firedEH.sqf +++ b/addons/common/functions/fnc_firedEH.sqf @@ -14,9 +14,6 @@ * Return Value: * None * - * Example: - * [bob, "gun", "muzzle", "single", "ammo", "magazine", "bullet"] call ace_common_fnc_firedEH - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_fixCollision.sqf b/addons/common/functions/fnc_fixCollision.sqf index 569d7d1e87..3b3b16a9f9 100644 --- a/addons/common/functions/fnc_fixCollision.sqf +++ b/addons/common/functions/fnc_fixCollision.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_common_fnc_fixCollision - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_fixFloating.sqf b/addons/common/functions/fnc_fixFloating.sqf index dc7608f9fe..5a00aa3863 100644 --- a/addons/common/functions/fnc_fixFloating.sqf +++ b/addons/common/functions/fnc_fixFloating.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [object] call ace_common_fnc_fixFloating - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_fixLoweredRifleAnimation.sqf b/addons/common/functions/fnc_fixLoweredRifleAnimation.sqf index f804b087d2..9e230b00ad 100644 --- a/addons/common/functions/fnc_fixLoweredRifleAnimation.sqf +++ b/addons/common/functions/fnc_fixLoweredRifleAnimation.sqf @@ -6,7 +6,7 @@ * 0: Unit * * Return Value: - * None + * Nothing * * Example: * [ACE_player] call ace_common_fnc_fixLoweredRifleAnimation diff --git a/addons/common/functions/fnc_fixPosition.sqf b/addons/common/functions/fnc_fixPosition.sqf index fb14141fe2..883a502c4e 100644 --- a/addons/common/functions/fnc_fixPosition.sqf +++ b/addons/common/functions/fnc_fixPosition.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_common_fnc_fixPosition - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf index fd94ae8024..a5d973767f 100644 --- a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf +++ b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf @@ -14,9 +14,6 @@ * 3: publicFlag * 4: peristentFlag * - * Example: - * [bob, ""] call ace_common_fnc_getAllDefinedSetVariables - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getChildren.sqf b/addons/common/functions/fnc_getChildren.sqf index 56bc5d779c..f2930b015d 100644 --- a/addons/common/functions/fnc_getChildren.sqf +++ b/addons/common/functions/fnc_getChildren.sqf @@ -7,9 +7,6 @@ * * Return Value: * Parent Entry Class Children - - * Example: - * [bob] call ace_common_fnc_getChildren * * Public: Yes */ diff --git a/addons/common/functions/fnc_getConfigCommander.sqf b/addons/common/functions/fnc_getConfigCommander.sqf index 45d7d6389c..d4a53905b8 100644 --- a/addons/common/functions/fnc_getConfigCommander.sqf +++ b/addons/common/functions/fnc_getConfigCommander.sqf @@ -7,9 +7,6 @@ * * Return Value: * Commander config - - * Example: - * [car] call ace_common_fnc_getConfigCommander * * Public: Yes */ diff --git a/addons/common/functions/fnc_getConfigGunner.sqf b/addons/common/functions/fnc_getConfigGunner.sqf index c14eb85ed5..abbbd5f014 100644 --- a/addons/common/functions/fnc_getConfigGunner.sqf +++ b/addons/common/functions/fnc_getConfigGunner.sqf @@ -8,9 +8,6 @@ * Return Value: * Gunner config * - * Example: - * [car] call ace_common_fnc_getConfigGunner - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getConfigType.sqf b/addons/common/functions/fnc_getConfigType.sqf new file mode 100644 index 0000000000..34aaa03172 --- /dev/null +++ b/addons/common/functions/fnc_getConfigType.sqf @@ -0,0 +1,17 @@ +/* + * Author: commy2 + * Determins type of item. Can be CfgMagaines, CfgWeapons or CfgGlasses. + * + * Arguments: + * 0: Item Classname + * + * Return Value: + * Config category ("CfgWeapons", "CfgMagazines", "CfgGlasses", "") + * + * Public: Yes + */ +#include "script_component.hpp" + +ACE_DEPRECATED("ace_common_fnc_getConfigType","3.8.0","CBA_fnc_getItemConfig"); + +configName (configHierarchy (_item call CBA_fnc_getItemConfig) param [1, configNull]) diff --git a/addons/common/functions/fnc_getConfigTypeObject.sqf b/addons/common/functions/fnc_getConfigTypeObject.sqf new file mode 100644 index 0000000000..92a6d43a42 --- /dev/null +++ b/addons/common/functions/fnc_getConfigTypeObject.sqf @@ -0,0 +1,17 @@ +/* + * Author: commy2 + * Determins type of object. Can be CfgVehicles or CfgAmmo. + * + * Arguments: + * 0: Object classname + * + * Return Value: + * Config category ("CfgWeapons", "Cfgmagazines", "CfgGlasses", "") + * + * Public: Yes + */ +#include "script_component.hpp" + +ACE_DEPRECATED("ace_common_fnc_getConfigTypeObject","3.8.0","CBA_fnc_getObjectConfig"); + +configName (configHierarchy (_item call CBA_fnc_getObjectConfig) param [1, configNull]) diff --git a/addons/common/functions/fnc_getDefinedVariable.sqf b/addons/common/functions/fnc_getDefinedVariable.sqf index 98267ab18f..32a75edb5e 100644 --- a/addons/common/functions/fnc_getDefinedVariable.sqf +++ b/addons/common/functions/fnc_getDefinedVariable.sqf @@ -9,9 +9,6 @@ * Return Value: * Value of variable or default value, if the variable is undefined * - * Example: - * [bob, "var"] call ace_common_fnc_getDefinedVariable - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getDefinedVariableDefault.sqf b/addons/common/functions/fnc_getDefinedVariableDefault.sqf index 88199f8ad3..c6f4f7711c 100644 --- a/addons/common/functions/fnc_getDefinedVariableDefault.sqf +++ b/addons/common/functions/fnc_getDefinedVariableDefault.sqf @@ -8,9 +8,6 @@ * Return Value: * Default value of variable * - * Example: - * ["name"] call ace_common_fnc_getDefinedVariableDefault - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getDefinedVariableInfo.sqf b/addons/common/functions/fnc_getDefinedVariableInfo.sqf index e22ba193f6..adcb70c6ee 100644 --- a/addons/common/functions/fnc_getDefinedVariableInfo.sqf +++ b/addons/common/functions/fnc_getDefinedVariableInfo.sqf @@ -8,9 +8,6 @@ * Return Value: * Variable Metadata * - * Example: - * ["var"] call ace_common_fnc_getDefinedVariableInfo - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getDisplayConfigName.sqf b/addons/common/functions/fnc_getDisplayConfigName.sqf index d61800e5ce..1660bbf804 100644 --- a/addons/common/functions/fnc_getDisplayConfigName.sqf +++ b/addons/common/functions/fnc_getDisplayConfigName.sqf @@ -8,9 +8,6 @@ * Return Value: * Display Classnames * - * Example: - * [5] call ace_common_fnc_getDisplayConfigName - * * Public: Yes * * Note: Really slow due to iteration through whole config. Meant for debugging. diff --git a/addons/common/functions/fnc_getDoorTurrets.sqf b/addons/common/functions/fnc_getDoorTurrets.sqf index cfb0369d63..533e2a7489 100644 --- a/addons/common/functions/fnc_getDoorTurrets.sqf +++ b/addons/common/functions/fnc_getDoorTurrets.sqf @@ -8,9 +8,6 @@ * Return Value: * All turret indecies of the Vehicle * - * Example: - * [car] call ace_common_fnc_getDoorTurrets - * * Public: Yes */ #include "script_component.hpp" @@ -26,7 +23,7 @@ private _doorTurrets = []; _config = [_config, _x] call FUNC(getTurretConfigPath); - if (((getNumber (_config >> "isCopilot")) == 0) && {count getArray (_config >> "weapons") > 0}) then { + if (getNumber (_config >> "isCopilot" == 0) && {count getArray (_config >> "weapons") > 0}) then { _doorTurrets pushBack _x; }; false diff --git a/addons/common/functions/fnc_getFirstObjectIntersection.sqf b/addons/common/functions/fnc_getFirstObjectIntersection.sqf index 951f48ad16..c4cc46ab9b 100644 --- a/addons/common/functions/fnc_getFirstObjectIntersection.sqf +++ b/addons/common/functions/fnc_getFirstObjectIntersection.sqf @@ -11,9 +11,6 @@ * 0: Intersects * 1: Intersection Position ASL * - * Example: - * [[1,2,3], [0,0,5], 5] call ace_common_fnc_getFirstObjectIntersection - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getFirstTerrainIntersection.sqf b/addons/common/functions/fnc_getFirstTerrainIntersection.sqf index cfb2397c95..27a6f3c613 100644 --- a/addons/common/functions/fnc_getFirstTerrainIntersection.sqf +++ b/addons/common/functions/fnc_getFirstTerrainIntersection.sqf @@ -11,9 +11,6 @@ * 0: Intersects * 1: Intersection Position ASL * - * Example: - * [[1,2,3], [0,0,5], 5] call ace_common_fnc_getFirstTerrainIntersection - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getGunner.sqf b/addons/common/functions/fnc_getGunner.sqf index 85f4cef199..c11f2882ca 100644 --- a/addons/common/functions/fnc_getGunner.sqf +++ b/addons/common/functions/fnc_getGunner.sqf @@ -9,9 +9,6 @@ * Return Value: * Gunner * - * Example: - * [car, "gun"] call ace_common_fnc_getGunner - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getInPosition.sqf b/addons/common/functions/fnc_getInPosition.sqf index a19a150704..5d6e5d71b5 100644 --- a/addons/common/functions/fnc_getInPosition.sqf +++ b/addons/common/functions/fnc_getInPosition.sqf @@ -1,19 +1,16 @@ /* * Author: commy2 * Move unit into given vehicle position or switch to that position if the unit is already inside the vehicle. - * - * Arguments: + * + * Arguments: * 0: Unit * 1: Vehicle * 2: Position ("Driver", "Pilot", "Gunner", "Commander", "Copilot", "Turret", "FFV", "Codriver", "Cargo") * 3: Index (only applies to "Turret", "FFV", "Codriver", "Cargo") (default: next free index) - * - * Return Value: + * + * Return Value: * None * - * Example: - * [unit, vehicle, "Driver", 5] call ace_common_fnc_getInPosition - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getItemType.sqf b/addons/common/functions/fnc_getItemType.sqf index 33d9d267e4..eb5015e20a 100644 --- a/addons/common/functions/fnc_getItemType.sqf +++ b/addons/common/functions/fnc_getItemType.sqf @@ -9,9 +9,6 @@ * 0: Type ("weapon", "item", "magazine", "") * 1: Item Description * - * Example: - * ["tire"] call ace_common_fnc_getItemType - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getLightProperties.sqf b/addons/common/functions/fnc_getLightProperties.sqf index ffaddfaf87..a376dff841 100644 --- a/addons/common/functions/fnc_getLightProperties.sqf +++ b/addons/common/functions/fnc_getLightProperties.sqf @@ -13,9 +13,6 @@ * 3: Light inner angle * 4: Light outer angle * - * Example: - * [car, "light"] call ace_common_fnc_getLightProperties - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getLightPropertiesWeapon.sqf b/addons/common/functions/fnc_getLightPropertiesWeapon.sqf index dfcd483304..44c866e67f 100644 --- a/addons/common/functions/fnc_getLightPropertiesWeapon.sqf +++ b/addons/common/functions/fnc_getLightPropertiesWeapon.sqf @@ -12,9 +12,6 @@ * 3: Light inner angle * 4: Light outer angle * - * Example: - * ["flashlight"] call ace_common_fnc_getLightPropertiesWeapon - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getMGRSdata.sqf b/addons/common/functions/fnc_getMGRSdata.sqf index 4e0df618e1..6b29b6625a 100644 --- a/addons/common/functions/fnc_getMGRSdata.sqf +++ b/addons/common/functions/fnc_getMGRSdata.sqf @@ -12,9 +12,6 @@ * 1: 100km square * 2: GZD + 100km sq. as a single string * - * Example: - * ["worldName"] call ace_common_fnc_getMGRSdata - * * Public: No */ #include "script_component.hpp" @@ -28,9 +25,9 @@ private _altitude = getNumber (configFile >> "CfgWorlds" >> _map >> "elevationO private _mapData = _map call FUNC(getMapData); if (!(_mapData isEqualTo [])) then { _lat = _mapData select 0; - _altitude = _mapData select 1; + _alt = _mapData select 1; }; -TRACE_2("Latitude and Altitude",_lat,_altitude); +TRACE_2("Latitude and Altitude",_lat,_alt); private _UTM = [_long, _lat] call BIS_fnc_posDegToUTM; private _easting = _UTM select 0; diff --git a/addons/common/functions/fnc_getMapData.sqf b/addons/common/functions/fnc_getMapData.sqf index 33f3e09d83..7d7bef817f 100644 --- a/addons/common/functions/fnc_getMapData.sqf +++ b/addons/common/functions/fnc_getMapData.sqf @@ -9,9 +9,6 @@ * 0: Latitude * 1: Altitude * - * Example: - * ["altis"] call ace_common_fnc_getMapData - * * Public: No */ @@ -24,90 +21,72 @@ _map = toLower _map; if (_map in ["tanoa"]) exitWith { [-18, 0] }; if (_map in ["altis"]) exitWith { [40, 0] }; if (_map in ["stratis"]) exitWith { [40, 0] }; -if (_map in ["malden", "abel"]) exitWith { [38.8, 0] }; // 1.72 Malden and CWR2 Malden -if (_map in ["abbottabad"]) exitWith { [34, 1256] }; // Abbottabad elevation 1256m (Wikipedia) +if (_map in ["abbottabad"]) exitWith { [34, 1256] }; //Abbottabad elevation 1256m (Wikipedia) +if (_map in ["abel"]) exitWith { [39, 0] }; //CWR2 Malden if (_map in ["abramia"]) exitWith { [60, 0] }; if (_map in ["af_kandahar_province"]) exitWith { [42, 0] }; if (_map in ["angel"]) exitWith { [38, 0] }; if (_map in ["anim_helvantis_v2"]) exitWith { [50, 0] }; if (_map in ["australia"]) exitWith { [-25, 0] }; -if (_map in ["baranow", "ivachev", "panavo", "staszow"]) exitWith { [50, 148.1] }; // IFA3LITE - default elevationOffset -if (_map in ["beketov"]) exitWith { [55, 0] }; -if (_map in ["blud_cordelia"]) exitWith { [12, 5] }; // Trung Si if (_map in ["bootcamp_acr"]) exitWith { [50, 0] }; if (_map in ["bornholm"]) exitWith { [55, 0] }; if (_map in ["bozcaada"]) exitWith { [40, 0] }; -if (_map in ["cain"]) exitWith { [40, 0] }; // CWR2 Kolgujev +if (_map in ["cain"]) exitWith { [40, 0] }; //CWR2 Kolgujev if (_map in ["caribou"]) exitWith { [68, 0] }; -if (_map in ["cartercity"]) exitWith { [43, 130] }; // Pecher, based on Grozny (1995 - 1996) elevation 130m (Wikipedia) +if (_map in ["cartercity"]) exitWith { [43, 130] }; //Pecher, based on Grozny (1995 - 1996) elevation 130m (Wikipedia) if (_map in ["catalina"]) exitWith { [33, 0] }; if (_map in ["chernarus", "chernarus_summer", "chernarus_winter"]) exitWith { [50, 0] }; if (_map in ["chernobylzone", "chernobylzonea2"]) exitWith { [51, 0] }; if (_map in ["clafghan"]) exitWith { [34, 640] }; -if (_map in ["colleville"]) exitWith { [49, 0] }; // IFA3LITE, Omaha Beach 1944 -if (_map in ["csj_lawlands", "uns_dong_ha"]) exitWith { [12, 0] }; // Unsung Mod -if (_map in ["csj_sea"]) exitWith { [15, 0] }; // Unsung Mod -if (_map in ["dakrong"]) exitWith { [16, 0] }; // Unsung Mod +if (_map in ["dakrong"]) exitWith { [16, 0] }; //Unsung Mod if (_map in ["desert_e"]) exitWith { [40, 800] }; -if (_map in ["desert_island"]) exitWith { [40, 0] }; // CWR2 Desert Island -if (_map in ["dya"]) exitWith { [34, 110] }; // Diyala Iraq - default elevationOffset -if (_map in ["eden"]) exitWith { [45, 0] }; // CWR2 Everon +if (_map in ["desert_island"]) exitWith { [40, 0] }; //CWR2 Desert Island +if (_map in ["dya"]) exitWith { [34, 110] }; //Diyala Iraq - default elevationOffset +if (_map in ["eden"]) exitWith { [45, 0] }; //CWR2 Everon if (_map in ["esseker"]) exitWith { [43, 2000] }; -if (_map in ["evergreen"]) exitWith { [41, 0] }; // Burgazada, Turkey - default elevationOffset +if (_map in ["evergreen"]) exitWith { [41, 0] }; //Burgazada, Turkey - default elevationOffset if (_map in ["fallujah"]) exitWith { [33, 0] }; if (_map in ["fata"]) exitWith { [33, 1347] }; if (_map in ["gorgona"]) exitWith { [43, 0] }; -if (_map in ["hellskitchen", "hellskitchens"]) exitWith { [32, 900] }; // Sangin summer, Sangin winter - Sangin elevation 888m (Wikipedia) +if (_map in ["hellskitchen", "hellskitchens"]) exitWith { [32, 900] }; //Sangin summer, Sangin winter - Sangin elevation 888m (Wikipedia) if (_map in ["hindukush"]) exitWith { [36, 0] }; -if (_map in ["i44_omaha_v2"]) exitWith { [49, 0] }; if (_map in ["imrali", "imralispring"]) exitWith { [40, 0] }; if (_map in ["intro"]) exitWith { [40, 0] }; if (_map in ["isladuala3"]) exitWith { [-19, 0] }; -if (_map in ["jacobi"]) exitWith { [34, 2000] }; // default elevationOffset +if (_map in ["jacobi"]) exitWith { [34, 2000] }; //default elevationOffset if (_map in ["kapaulio"]) exitWith { [0, 0] }; -if (_map in ["kerama"]) exitWith { [26, 0] }; // Kerama Islands, Japan - default elevationOffset -if (_map in ["khe_sanh"]) exitWith { [17, 0] }; // Unsung Mod +if (_map in ["kerama"]) exitWith { [26, 0] }; //Kerama Islands, Japan - default elevationOffset if (_map in ["kholm"]) exitWith { [36, 0] }; -if (_map in ["kidal"]) exitWith { [18, 0] }; // Kidal, Mali - default elevationOffset +if (_map in ["kidal"]) exitWith { [18, 0] }; //Kidal, Mali - default elevationOffset if (_map in ["koplic"]) exitWith { [42, 0] }; if (_map in ["kunduz"]) exitWith { [37, 0] }; -if (_map in ["lingor", "lingor3", "dingor"]) exitWith { [-4, 0] }; +if (_map in ["lingor", "lingor3"]) exitWith { [-4, 0] }; if (_map in ["lost", "lostw"]) exitWith { [60, 0] }; -if (_map in ["lythium"]) exitWith { [34, 0] }; if (_map in ["malvinas"]) exitWith { [-52, 0] }; -if (_map in ["marenice"]) exitWith { [51, 0] }; // CSA38 Mod (Czechoslovak army 1938 - Munich crisis), Lisatian Mountains. if (_map in ["mcn_aliabad"]) exitWith { [36, 0] }; -if (_map in ["mcn_neaville", "mcn_neaville_winter"]) exitWith { [45, 0] }; // I44: Neaville, I44: Neaville (Winter) if (_map in ["mef_alaska"]) exitWith { [60, 5] }; -if (_map in ["mog"]) exitWith { [2, 0] }; // Mogadishu, Somalia if (_map in ["mountains_acr"]) exitWith { [35, 2000] }; -if (_map in ["mske"]) exitWith { [35, 0] }; // MSKE 2017 -if (_map in ["nam2"]) exitWith { [14, 0] }; if (_map in ["namalsk"]) exitWith { [65, 0] }; if (_map in ["napf", "napfwinter"]) exitWith { [47, 0] }; -if (_map in ["newyork_lumnuon"]) exitWith { [41, 5] }; // Governer´s Island, New York - default elevationOffset -if (_map in ["noe"]) exitWith { [45, 0] }; // CWR2 Nogova -if (_map in ["panthera3", "winthera3"]) exitWith { [46, 0] }; -if (_map in ["phu_bai", "rockwall", "us101_cao_bang"]) exitWith { [14, 0] }; // Unsung Mod -if (_map in ["pianosa_aut"]) exitWith { [43, 0] }; // Pianosa, Italy - default elevationOffset -if (_map in ["pja305"]) exitWith { [0, 0] }; // G.O.S N'Ziwasogo -if (_map in ["pja306"]) exitWith { [35, 0] }; // G.O.S Kalu Khan -if (_map in ["pja307"]) exitWith { [17, 0] }; // F.S.F Daryah -if (_map in ["pja308"]) exitWith { [36, 0] }; // G.O.S Gunkizli -if (_map in ["pja310"]) exitWith { [36, 0] }; // G.O.S Al Rayak -if (_map in ["pja312"]) exitWith { [16, 0] }; // G.O.S Song Bin Tanh -if (_map in ["pja314"]) exitWith { [46, 0] }; // G.O.S Leskovets -if (_map in ["pja319"]) exitWith { [20, 0] }; // G.O.S N'Djenahoud, Ennedi Massif (Republic of Chad) -if (_map in ["plr_bulge"]) exitWith { [49, 0] }; // I44: Battle of the Bulge +if (_map in ["newyork_lumnuon"]) exitWith { [41, 5] }; //Governer´s Island, New York - default elevationOffset +if (_map in ["noe"]) exitWith { [45, 0] }; //CWR2 Nogova +if (_map in ["panthera3"]) exitWith { [46, 0] }; +if (_map in ["pianosa_aut"]) exitWith { [43, 0] }; //Pianosa, Italy - default elevationOffset +if (_map in ["pja305"]) exitWith { [0, 0] }; //G.O.S N'Ziwasogo +if (_map in ["pja306"]) exitWith { [35, 0] }; //G.O.S Kalu Khan +if (_map in ["pja307"]) exitWith { [17, 0] }; //F.S.F Daryah +if (_map in ["pja308"]) exitWith { [36, 0] }; //G.O.S Gunkizli +if (_map in ["pja310"]) exitWith { [36, 0] }; //G.O.S Al Rayak +if (_map in ["pja312"]) exitWith { [16, 0] }; //G.O.S Song Bin Tanh if (_map in ["porquerolles"]) exitWith { [43, 0] }; if (_map in ["porto"]) exitWith { [40, 0] }; if (_map in ["provinggrounds_pmc"]) exitWith { [35, 100] }; if (_map in ["reshmaan"]) exitWith { [35, 2000] }; -if (_map in ["rungsat"]) exitWith { [10, 0] }; // Unsung Mod +if (_map in ["rungsat"]) exitWith { [10, 0] }; //Unsung Mod if (_map in ["sara", "sara_dbe1"]) exitWith { [40, 0] }; if (_map in ["saralite"]) exitWith { [40, 0] }; -if (_map in ["sb3"]) exitWith { [53, 25] }; // TrpUebPl Einfelde Nord (Munster North Training Area, Germany) - default elevationOffset +if (_map in ["sb3"]) exitWith { [53, 25] }; //TrpUebPl Einfelde Nord (Munster North Training Area, Germany) - default elevationOffset if (_map in ["sfp_sturko"]) exitWith { [56, 0] }; if (_map in ["sfp_wamako"]) exitWith { [14, 0] }; if (_map in ["shapur_baf"]) exitWith { [35, 100] }; @@ -115,17 +94,14 @@ if (_map in ["sugarlake"]) exitWith { [29, 0] }; if (_map in ["takistan"]) exitWith { [35, 2000] }; if (_map in ["thirsk"]) exitWith { [65, 0] }; if (_map in ["tilos"]) exitWith { [36, 0] }; -if (_map in ["uhao"]) exitWith { [21, 0] }; -if (_map in ["uns_idv", "uns_ptv"]) exitWith { [13, 0] }; // Unsung Mod if (_map in ["utes"]) exitWith { [50, 0] }; -if (_map in ["vt5"]) exitWith { [61, 100] }; // Valtatie 5, Finland - default elevationOffset +if (_map in ["vt5"]) exitWith { [61, 100] }; //Vt5, Suomi Finland - default elevationOffset if (_map in ["wake"]) exitWith { [19, 0] }; if (_map in ["waziristan"]) exitWith { [33, 0] }; -if (_map in ["wintermap"]) exitWith { [61, 0] }; // Nordkvingo - default elevationOffset -if (_map in ["wintertown", "wintertowna3"]) exitWith { [39, 600] }; // U.S. state Kansas mean elevation 610m (Wikipedia) +if (_map in ["wintermap"]) exitWith { [61, 0] }; //Nordkvingo - default elevationOffset +if (_map in ["wintertown", "wintertowna3"]) exitWith { [39, 600] }; //U.S. state Kansas mean elevation 610m (Wikipedia) if (_map in ["woodland_acr"]) exitWith { [50, 0] }; if (_map in ["xcam_prototype"]) exitWith { [35, 0] }; -if (_map in ["xcam_taunus"]) exitWith { [50, 0] }; if (_map in ["zargabad"]) exitWith { [35, 2000] }; [] //Return empty array if we have no specific data for the map diff --git a/addons/common/functions/fnc_getMapGridData.sqf b/addons/common/functions/fnc_getMapGridData.sqf index 60edb8941d..be87a8585b 100644 --- a/addons/common/functions/fnc_getMapGridData.sqf +++ b/addons/common/functions/fnc_getMapGridData.sqf @@ -47,7 +47,7 @@ if (toLower _formatX find "a" != -1) then {_letterGrid = true}; if (toLower _formatY find "a" != -1) then {_letterGrid = true}; if (_letterGrid) exitWith { - WARNING_3("Map Grid Warning (%1) - Map uses letter grids [%2, %3]",worldName,_formatX,_formatY); + ACE_LOGWARNING_3("Map Grid Warning (%1) - Map uses letter grids [%2, %3]",worldName,_formatX,_formatY); }; //Start at [0, 500] and move north until we get a change in grid @@ -64,19 +64,19 @@ while {_startGrid == _originGrid} do { private _realOffsetY = (parseNumber (_originGrid select [count _formatX, count _formatY])) * _stepY + _heightOffset - 1; //Calculate MGRS 10digit step - they should both be 1 meter: -private _stepXat5 = _stepX * 10 ^ ((count _formatX) - 5); -private _stepYat5 = -1 * _stepY * 10 ^ ((count _formatY) - 5); +_stepXat5 = _stepX * 10 ^ ((count _formatX) - 5); +_stepYat5 = -1 * _stepY * 10 ^ ((count _formatY) - 5); if (_stepYat5 < 0) then { - WARNING_1("Map Grid Warning (%1) - Northing is reversed.",worldName); + ACE_LOGWARNING_1("Map Grid Warning (%1) - Northing is reversed.",worldName); }; if (_stepXat5 != 1) then { - WARNING_2("Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for x.",worldName,_stepXat5); + ACE_LOGWARNING_2("Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for x.",worldName,_stepXat5); }; if (_stepYat5 != 1 && {_stepYat5 != -1}) then { - WARNING_2("Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for y.",worldName,_stepXat5); + ACE_LOGWARNING_2("Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for y.",worldName,_stepXat5); }; GVAR(mapGridData) = [_offsetX, _realOffsetY, _stepXat5, _stepYat5]; diff --git a/addons/common/functions/fnc_getMapPosFromGrid.sqf b/addons/common/functions/fnc_getMapPosFromGrid.sqf index 18599f4ef4..96960a844d 100644 --- a/addons/common/functions/fnc_getMapPosFromGrid.sqf +++ b/addons/common/functions/fnc_getMapPosFromGrid.sqf @@ -6,7 +6,7 @@ * 0: Grid Cords * 1: Grid center (true), Grid Bottom Right (false) (default: true) * - * Return Value: + * Return values: * Position * * Example: @@ -19,7 +19,7 @@ params ["_inputString", ["_getCenterOfGrid", true]]; if (count GVAR(mapGridData) == 0) exitWith { - ERROR("Map has bad data, falling back to BIS_fnc_gridToPos"); + ACE_LOGERROR("Map has bad data, falling back to BIS_fnc_gridToPos"); (_this call BIS_fnc_gridToPos) select 0 }; diff --git a/addons/common/functions/fnc_getMarkerType.sqf b/addons/common/functions/fnc_getMarkerType.sqf index 3d5864cf08..0da7f1a46e 100644 --- a/addons/common/functions/fnc_getMarkerType.sqf +++ b/addons/common/functions/fnc_getMarkerType.sqf @@ -3,14 +3,11 @@ * Get the apropriate marker for a group. * * Arguments: - * 0: Group + * 0: Group * * Return Value: * Marker Type * - * Example: - * ["GROUP"] call ace_common_fnc_getmarkerType - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getNumberMagazinesIn.sqf b/addons/common/functions/fnc_getNumberMagazinesIn.sqf index dd02d055e0..87f92979eb 100644 --- a/addons/common/functions/fnc_getNumberMagazinesIn.sqf +++ b/addons/common/functions/fnc_getNumberMagazinesIn.sqf @@ -9,9 +9,6 @@ * Return Value: * Magazine amount * - * Example: - * [bob, "magazine"] call ace_common_fnc_getNumberMagazinesIn - * * Public: No */ #include "script_component.hpp" @@ -24,14 +21,11 @@ if (_unit isKindOf "CAManBase") then { _return = {_x == _magazine} count magazines _unit; } else { { - _return = _return + ({_x == _magazine} count magazines _x); + _return = _return + {_x == _magazine} count magazines _x; false } count crew _unit; - (getMagazineCargo _unit) params [["_magNames", []], ["_magCount", []]]; - { - if (_magazine == _x) exitWith {_return = _return + (_magCount select _forEachIndex)}; - } forEach _magNames; + _return = _return + ({_x == _magazine} count getMagazineCargo _unit); }; _return diff --git a/addons/common/functions/fnc_getPitchBankYaw.sqf b/addons/common/functions/fnc_getPitchBankYaw.sqf index 2a7a5c43e8..89fab8d92b 100644 --- a/addons/common/functions/fnc_getPitchBankYaw.sqf +++ b/addons/common/functions/fnc_getPitchBankYaw.sqf @@ -10,9 +10,6 @@ * 1: bank * 2: yaw * - * Example: - * [plane] call ace_common_fnc_getPitchBankYaw - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getReflectorsWithSelections.sqf b/addons/common/functions/fnc_getReflectorsWithSelections.sqf index d166818494..248050486c 100644 --- a/addons/common/functions/fnc_getReflectorsWithSelections.sqf +++ b/addons/common/functions/fnc_getReflectorsWithSelections.sqf @@ -12,9 +12,6 @@ * 0: Light Hitpoints * 1: Selections * - * Example: - * [car] call ace_common_fnc_getReflectorsWithSelections - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getSelectionsWithoutHitPoints.sqf b/addons/common/functions/fnc_getSelectionsWithoutHitPoints.sqf index 028024a94e..b46ec308ec 100644 --- a/addons/common/functions/fnc_getSelectionsWithoutHitPoints.sqf +++ b/addons/common/functions/fnc_getSelectionsWithoutHitPoints.sqf @@ -4,15 +4,10 @@ * Returns all damageable selections without hitpoints of any vehicle. * * Arguments: - * 0: A vehicle, not the classname + * 0: A vehicle, not the classname (Object) * * Return Value: - * The selections without hitpoints, i.e. reflectors. - * - * Example: - * [car] call ace_common_fnc_getSelectionsWithoutHitPoints - * - * Public: No + * The selections without hitpoints, i.e. reflectors. (Array) */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getSettingData.sqf b/addons/common/functions/fnc_getSettingData.sqf index 0eb76d9b7b..ae9dd5351e 100644 --- a/addons/common/functions/fnc_getSettingData.sqf +++ b/addons/common/functions/fnc_getSettingData.sqf @@ -6,7 +6,7 @@ * 0: Setting Name * * Return Value: - * Setting Data + * Setting Data (Array) * 0: Name * 1: Type Name * 2: Is Client Settable @@ -17,9 +17,6 @@ * 7: Default Value * 8: Localized Category * - * Example: - * ["setting"] call ace_common_fnc_getSettingData - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getStaminaBarControl.sqf b/addons/common/functions/fnc_getStaminaBarControl.sqf index cfdef5bb35..1fa747fef6 100644 --- a/addons/common/functions/fnc_getStaminaBarControl.sqf +++ b/addons/common/functions/fnc_getStaminaBarControl.sqf @@ -8,9 +8,6 @@ * Return Value: * Stamina Bar control * - * Example: - * call ace_common_fnc_getStaminaBarControl - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getTargetAzimuthAndInclination.sqf b/addons/common/functions/fnc_getTargetAzimuthAndInclination.sqf index 98e7a5e3b2..0d2343bec9 100644 --- a/addons/common/functions/fnc_getTargetAzimuthAndInclination.sqf +++ b/addons/common/functions/fnc_getTargetAzimuthAndInclination.sqf @@ -9,9 +9,6 @@ * 0: Azimuth * 1: Inclination * - * Example: - * [] call ace_common_fnc_getTargetAzimuthAndInclination - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getTargetDistance.sqf b/addons/common/functions/fnc_getTargetDistance.sqf index c93941eb12..000f0ae31d 100644 --- a/addons/common/functions/fnc_getTargetDistance.sqf +++ b/addons/common/functions/fnc_getTargetDistance.sqf @@ -10,9 +10,6 @@ * Return Value: * Distance in meters * - * Example: - * [5,20000,56] call ace_common_fnc_getTargetDistance - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getTargetObject.sqf b/addons/common/functions/fnc_getTargetObject.sqf index 9ee1d26ff3..ed757dedf4 100644 --- a/addons/common/functions/fnc_getTargetObject.sqf +++ b/addons/common/functions/fnc_getTargetObject.sqf @@ -8,9 +8,6 @@ * Return Value: * Nearest object in line of sight, objNull if none are found * - * Example: - * [56] call ace_common_fnc_getTargetObject - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getTurnedOnLights.sqf b/addons/common/functions/fnc_getTurnedOnLights.sqf index f95a4bbf19..a996e146d2 100644 --- a/addons/common/functions/fnc_getTurnedOnLights.sqf +++ b/addons/common/functions/fnc_getTurnedOnLights.sqf @@ -8,9 +8,6 @@ * Return Value: * All burning lights * - * Example: - * [car] call ace_common_fnc_getTurnedOnLights - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getTurretCommander.sqf b/addons/common/functions/fnc_getTurretCommander.sqf index 2f832438b5..3e7f09215f 100644 --- a/addons/common/functions/fnc_getTurretCommander.sqf +++ b/addons/common/functions/fnc_getTurretCommander.sqf @@ -8,9 +8,6 @@ * Return Value: * Vehicle commander turrent indecies * - * Example: - * [car] call ace_common_fnc_getTurretCommander - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getTurretConfigPath.sqf b/addons/common/functions/fnc_getTurretConfigPath.sqf index 6af9aa62e3..95d0773fd3 100644 --- a/addons/common/functions/fnc_getTurretConfigPath.sqf +++ b/addons/common/functions/fnc_getTurretConfigPath.sqf @@ -9,9 +9,6 @@ * Return Value: * Turret config * - * Example: - * [CfgVehicle, [Array]] call ace_common_fnc_getTurretConfigPath - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getTurretCopilot.sqf b/addons/common/functions/fnc_getTurretCopilot.sqf index ef52200f6e..49002cc40e 100644 --- a/addons/common/functions/fnc_getTurretCopilot.sqf +++ b/addons/common/functions/fnc_getTurretCopilot.sqf @@ -8,9 +8,6 @@ * Return Value: * Vehicle Copilot Turret indecies * - * Example: - * [car] call ace_common_fnc_getTurretCopilot - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getTurretDirection.sqf b/addons/common/functions/fnc_getTurretDirection.sqf index 7bec5cf3e6..1de8af459e 100644 --- a/addons/common/functions/fnc_getTurretDirection.sqf +++ b/addons/common/functions/fnc_getTurretDirection.sqf @@ -10,9 +10,6 @@ * 0: Position ASL * 1: Direction * - * Example: - * [car, [5,6,5]] call ace_common_fnc_getTurretDirection - * * Public: Yes */ #include "script_component.hpp" @@ -41,5 +38,5 @@ if (_pov == "pip0_pos") then { _povDir = _gunBeginPos vectorDiff _gunEndPos; }; -_povDir = vectorNormalized _povDir; + [_povPos, _povDir] diff --git a/addons/common/functions/fnc_getTurretGunner.sqf b/addons/common/functions/fnc_getTurretGunner.sqf index e1846f96de..4a26e2c03d 100644 --- a/addons/common/functions/fnc_getTurretGunner.sqf +++ b/addons/common/functions/fnc_getTurretGunner.sqf @@ -8,9 +8,6 @@ * Return Value: * Vehicle Gunner Turret indecies * - * Example: - * [car] call ace_common_fnc_getTurretGunner - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getTurretsFFV.sqf b/addons/common/functions/fnc_getTurretsFFV.sqf index 885396b2bf..5c36e20197 100644 --- a/addons/common/functions/fnc_getTurretsFFV.sqf +++ b/addons/common/functions/fnc_getTurretsFFV.sqf @@ -8,9 +8,6 @@ * Return Value: * Vehicle FFV Turret indecies * - * Example: - * [car] call ace_common_fnc_getTurretsFFV - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getTurretsOther.sqf b/addons/common/functions/fnc_getTurretsOther.sqf index 04750e98fd..ef2a1278dc 100644 --- a/addons/common/functions/fnc_getTurretsOther.sqf +++ b/addons/common/functions/fnc_getTurretsOther.sqf @@ -8,9 +8,6 @@ * Return Value: * Vehicle Other Turret indecies * - * Example: - * [car] call ace_common_fnc_getTurretsOther - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getVehicleCargo.sqf b/addons/common/functions/fnc_getVehicleCargo.sqf index 5279825008..68599c919b 100644 --- a/addons/common/functions/fnc_getVehicleCargo.sqf +++ b/addons/common/functions/fnc_getVehicleCargo.sqf @@ -8,9 +8,6 @@ * Return Value: * Vehicle cargo positions * - * Example: - * [car] call ace_common_fnc_getVehicleCargo - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getVehicleCodriver.sqf b/addons/common/functions/fnc_getVehicleCodriver.sqf index 8b0fd3be29..a1cc5814e1 100644 --- a/addons/common/functions/fnc_getVehicleCodriver.sqf +++ b/addons/common/functions/fnc_getVehicleCodriver.sqf @@ -8,9 +8,6 @@ * Return Value: * Vehicle codriver positions * - * Example: - * ["car"] call ace_common_fnc_getVehicleCodriver - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getVehicleCrew.sqf b/addons/common/functions/fnc_getVehicleCrew.sqf index f0377671e9..adb0e9701a 100644 --- a/addons/common/functions/fnc_getVehicleCrew.sqf +++ b/addons/common/functions/fnc_getVehicleCrew.sqf @@ -9,9 +9,6 @@ * Return Value: * Crew * - * Example: - * [car, ["driver"]] call ace_common_fnc_getVehicleCrew - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getVehicleUAVCrew.sqf b/addons/common/functions/fnc_getVehicleUAVCrew.sqf index 9804a14b68..2b2281ed10 100644 --- a/addons/common/functions/fnc_getVehicleUAVCrew.sqf +++ b/addons/common/functions/fnc_getVehicleUAVCrew.sqf @@ -8,9 +8,6 @@ * Return Value: * UAV Dummy Crew * - * Example: - * [car] call ace_common_fnc_getVehicleUAVCrew - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getVersion.sqf b/addons/common/functions/fnc_getVersion.sqf index e0f2ab9f6d..24773240b7 100644 --- a/addons/common/functions/fnc_getVersion.sqf +++ b/addons/common/functions/fnc_getVersion.sqf @@ -8,9 +8,6 @@ * Return Value: * ACE Version * - * Example: - * [] call ace_common_fnc_getVersion - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getWeaponAzimuthAndInclination.sqf b/addons/common/functions/fnc_getWeaponAzimuthAndInclination.sqf index 604a89b9f8..f7c7909e01 100644 --- a/addons/common/functions/fnc_getWeaponAzimuthAndInclination.sqf +++ b/addons/common/functions/fnc_getWeaponAzimuthAndInclination.sqf @@ -9,9 +9,6 @@ * 0: Azimuth * 1: Inclination * - * Example: - * ["gun"] call ace_common_fnc_getWeaponAzimuthAndInclination - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getWeaponIndex.sqf b/addons/common/functions/fnc_getWeaponIndex.sqf index a881233469..0e24f190a5 100644 --- a/addons/common/functions/fnc_getWeaponIndex.sqf +++ b/addons/common/functions/fnc_getWeaponIndex.sqf @@ -13,9 +13,6 @@ * 2 = handgun * -1 = other * - * Example: - * [bob, "gun"] call ace_common_fnc_getWeaponIndex - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getWeaponModes.sqf b/addons/common/functions/fnc_getWeaponModes.sqf index ede86ac842..48755d3a9b 100644 --- a/addons/common/functions/fnc_getWeaponModes.sqf +++ b/addons/common/functions/fnc_getWeaponModes.sqf @@ -8,9 +8,6 @@ * Return Value: * Firing Modes * - * Example: - * ["gun"] call ace_common_fnc_getWeaponModes - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getWeaponMuzzles.sqf b/addons/common/functions/fnc_getWeaponMuzzles.sqf index b0b0533721..e252d879f9 100644 --- a/addons/common/functions/fnc_getWeaponMuzzles.sqf +++ b/addons/common/functions/fnc_getWeaponMuzzles.sqf @@ -8,9 +8,6 @@ * Return Value: * All weapon muzzles * - * Example: - * ["gun"] call ace_common_fnc_getWeaponMuzzles - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getWeaponState.sqf b/addons/common/functions/fnc_getWeaponState.sqf index 772a5058b9..73e5897236 100644 --- a/addons/common/functions/fnc_getWeaponState.sqf +++ b/addons/common/functions/fnc_getWeaponState.sqf @@ -12,9 +12,6 @@ * 2: Magazines * 3: Ammo * - * Example: - * [bob, "gun"] call ace_common_fnc_getWeaponState - * * Public: Yes */ #include "script_component.hpp" @@ -45,4 +42,4 @@ private _ammo = _muzzles apply {0}; false } count magazinesAmmoFull _unit; -[_attachments, _muzzles, _magazines, _ammo]; +[_attachments, _muzzles, _magazines, _ammo]; diff --git a/addons/common/functions/fnc_getWeaponType.sqf b/addons/common/functions/fnc_getWeaponType.sqf index b53f23d514..5666ea5bc0 100644 --- a/addons/common/functions/fnc_getWeaponType.sqf +++ b/addons/common/functions/fnc_getWeaponType.sqf @@ -12,9 +12,6 @@ * 3 = handgun * -1 = other * - * Example: - * ["gun"] call ace_common_fnc_getWeaponType - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getWindDirection.sqf b/addons/common/functions/fnc_getWindDirection.sqf index f35047fc30..7341ea9c1d 100644 --- a/addons/common/functions/fnc_getWindDirection.sqf +++ b/addons/common/functions/fnc_getWindDirection.sqf @@ -8,9 +8,6 @@ * Return Value: * Wind cardinal direction * - * Example: - * [] call ace_common_fnc_getWindDirection - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_getZoom.sqf b/addons/common/functions/fnc_getZoom.sqf index 9c3f7987a4..f4113198a7 100644 --- a/addons/common/functions/fnc_getZoom.sqf +++ b/addons/common/functions/fnc_getZoom.sqf @@ -8,13 +8,10 @@ * Return Value: * Zoom * - * Example: - * [] call ace_common_fnc_getZoom - * * Public: Yes */ #include "script_component.hpp" if (!hasInterface) exitWith {0}; -(0.5 - ((worldToScreen positionCameraToWorld [0, 1, 1]) select 1)) * (getResolution select 5) +(0.5 - ((worldToScreen positionCameraToWorld [0, 1, 1]) select 1)) * (getResolution select 5) diff --git a/addons/common/functions/fnc_globalEvent.sqf b/addons/common/functions/fnc_globalEvent.sqf new file mode 100644 index 0000000000..b58a0f092c --- /dev/null +++ b/addons/common/functions/fnc_globalEvent.sqf @@ -0,0 +1,14 @@ +#define DEBUG_MODE_FULL +#include "script_component.hpp" + +params ["_eventName", "_eventArgs"]; + +private _newName = getText (configFile >> "ACE_newEvents" >> _eventName); +if (_newName != "") then { + TRACE_2("Switching Names",_eventName,_newName); + _eventName = _newName; +}; + +[_eventName, _eventArgs] call CBA_fnc_globalEvent; + +ACE_DEPRECATED("ace_common_fnc_globalEvent","3.8.0","CBA_fnc_globalEvent"); diff --git a/addons/common/functions/fnc_goKneeling.sqf b/addons/common/functions/fnc_goKneeling.sqf index b838a4f047..9e7aed708a 100644 --- a/addons/common/functions/fnc_goKneeling.sqf +++ b/addons/common/functions/fnc_goKneeling.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_common_fnc_goKneeling - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_hadamardProduct.sqf b/addons/common/functions/fnc_hadamardProduct.sqf index 20173e7d0b..cdaf707395 100644 --- a/addons/common/functions/fnc_hadamardProduct.sqf +++ b/addons/common/functions/fnc_hadamardProduct.sqf @@ -10,9 +10,6 @@ * Return Value: * Hadamard Product * - * Example: - * [[0,0,0], [1,1,1]] call ace_common_fnc_hadamardProduct - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_handleEngine.sqf b/addons/common/functions/fnc_handleEngine.sqf index 55696a679e..829ad5bb49 100644 --- a/addons/common/functions/fnc_handleEngine.sqf +++ b/addons/common/functions/fnc_handleEngine.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, "running"] call ace_common_fnc_handleEngine - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_handleModifierKey.sqf b/addons/common/functions/fnc_handleModifierKey.sqf index 094ec278f4..bfb7e84931 100644 --- a/addons/common/functions/fnc_handleModifierKey.sqf +++ b/addons/common/functions/fnc_handleModifierKey.sqf @@ -8,10 +8,7 @@ * Return Value: * None * - * Example: - * call ace_common_fnc_handleModifierKey - * - * Public: No + * Public : No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_handleModifierKeyUp.sqf b/addons/common/functions/fnc_handleModifierKeyUp.sqf index 97df636050..ffa5855115 100644 --- a/addons/common/functions/fnc_handleModifierKeyUp.sqf +++ b/addons/common/functions/fnc_handleModifierKeyUp.sqf @@ -8,10 +8,7 @@ * Return Value: * None * - * Example: - * call ace_common_fnc_handleModifierKeyUp - * - * Public: No + * Public : No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_handleScrollWheel.sqf b/addons/common/functions/fnc_handleScrollWheel.sqf new file mode 100644 index 0000000000..037b7b640b --- /dev/null +++ b/addons/common/functions/fnc_handleScrollWheel.sqf @@ -0,0 +1,20 @@ +/* + * Author: commy2 + * Handles MouseZChanged event. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public : No + */ +#include "script_component.hpp" + +{ + [_this select 1] call _x; + false +} count ((missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]]) select 2); + +nil diff --git a/addons/common/functions/fnc_hasHatch.sqf b/addons/common/functions/fnc_hasHatch.sqf index b750d01b85..e39c52f897 100644 --- a/addons/common/functions/fnc_hasHatch.sqf +++ b/addons/common/functions/fnc_hasHatch.sqf @@ -8,9 +8,6 @@ * Return Value: * Unit has a hatch? * - * Example: - * [bob] call ace_common_fnc_hasHatch - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_hasItem.sqf b/addons/common/functions/fnc_hasItem.sqf index f77337a5dd..8ca785d78e 100644 --- a/addons/common/functions/fnc_hasItem.sqf +++ b/addons/common/functions/fnc_hasItem.sqf @@ -9,9 +9,6 @@ * Return Value: * has Item * - * Example: - * [[bob, "item"] call ace_common_fnc_hasItem - * * Public: yes * * Note: Case sensitive diff --git a/addons/common/functions/fnc_hasMagazine.sqf b/addons/common/functions/fnc_hasMagazine.sqf index 4ad40bf959..eaa9bc0556 100644 --- a/addons/common/functions/fnc_hasMagazine.sqf +++ b/addons/common/functions/fnc_hasMagazine.sqf @@ -9,9 +9,6 @@ * Return Value: * has Magazine * - * Example: - * [bob, "magazine"] call ace_common_fnc_hasMagazine - * * Public: yes * * Note: Case sensitive diff --git a/addons/common/functions/fnc_hashCreate.sqf b/addons/common/functions/fnc_hashCreate.sqf new file mode 100644 index 0000000000..c3ff836573 --- /dev/null +++ b/addons/common/functions/fnc_hashCreate.sqf @@ -0,0 +1,17 @@ +/* + * Author: ? + * Returns an empty hash structure + * + * Arguments: + * None + * + * Return Value: + * Empty Hash Structure + * + * Public: No + */ +#include "script_component.hpp" + +ACE_DEPRECATED(QFUNC(hashCreate),"3.8.0","CBA_fnc_hashCreate"); + +[[],[]] diff --git a/addons/common/functions/fnc_hashGet.sqf b/addons/common/functions/fnc_hashGet.sqf new file mode 100644 index 0000000000..e7bee04eec --- /dev/null +++ b/addons/common/functions/fnc_hashGet.sqf @@ -0,0 +1,40 @@ +/* + * Author: ? + * Returns value attached to key in given hash. + * + * Arguments: + * 0: Hash + * 1: Key + * + * Return Value: + * Value + * + * Public: No + */ +#include "script_component.hpp" + +ACE_DEPRECATED(QFUNC(hashGet),"3.8.0","CBA_fnc_hashGet"); + +params ["_hash", "_key"]; + +ERRORDATA(2); +private _val = nil; +try { + if(VALIDHASH(_hash)) then { + private _index = (_hash select 0) find _key; + if(_index != -1) then { + _val = (_hash select 1) select _index; + if(IS_STRING(_val) && {_val == "ACREHASHREMOVEDONOTUSETHISVAL"}) then { + _val = nil; + }; + }; + } else { + ERROR("Input hash is not valid"); + }; +} catch { + HANDLECATCH; +}; + +if (isNil "_val") exitWith { nil }; + +_val diff --git a/addons/common/functions/fnc_hashHasKey.sqf b/addons/common/functions/fnc_hashHasKey.sqf new file mode 100644 index 0000000000..65c1517e4f --- /dev/null +++ b/addons/common/functions/fnc_hashHasKey.sqf @@ -0,0 +1,35 @@ +/* + * Author: ? + * ? + * + * Arguments: + * ? + * + * Return Value: + * ? + * + * Public: ? + */ +#include "script_component.hpp" + +ACE_DEPRECATED(QFUNC(hashHasKey),"3.8.0","CBA_fnc_hashHasKey"); + +// diag_log text format["%1 HASH HAS KEY: %2", diag_tickTime, _this]; + +params ["_hash", "_key"]; + +ERRORDATA(2); +private _val = false; +try { + if(VALIDHASH(_hash)) then { + private _index = (_hash select 0) find _key; + if(_index != -1) then { + _val = true; + }; + } else { + ERROR("Input hash is not valid"); + }; +} catch { + HANDLECATCH; +}; +_val diff --git a/addons/common/functions/fnc_hashRem.sqf b/addons/common/functions/fnc_hashRem.sqf new file mode 100644 index 0000000000..a09f87ee2e --- /dev/null +++ b/addons/common/functions/fnc_hashRem.sqf @@ -0,0 +1,41 @@ +/* + * Author: ? + * ? + * + * Arguments: + * ? + * + * Return Value: + * ? + * + * Public: ? + */ +#include "script_component.hpp" + +ACE_DEPRECATED(QFUNC(hashRem),"3.8.0","CBA_fnc_hashRem"); + +params ["_hash", "_key"]; + +ERRORDATA(2); +private _val = nil; +try { + if(VALIDHASH(_hash)) then { + private _index = (_hash select 0) find _key; + if(_index != -1) then { + (_hash select 1) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"]; + // is this hash is not part of a hash list? + // if it is we need to leave the keys intact. + if((count _hash) == 2) then { + // if this is a standalone hash then we can clean it up + (_hash select 0) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"]; + _hash set[0, ((_hash select 0) - ["ACREHASHREMOVEDONOTUSETHISVAL"])]; + _hash set[1, ((_hash select 1) - ["ACREHASHREMOVEDONOTUSETHISVAL"])]; + }; + }; + } else { + ERROR("Input hash is not valid"); + }; +} catch { + HANDLECATCH; +}; +true diff --git a/addons/common/functions/fnc_hashSet.sqf b/addons/common/functions/fnc_hashSet.sqf new file mode 100644 index 0000000000..8344b50f92 --- /dev/null +++ b/addons/common/functions/fnc_hashSet.sqf @@ -0,0 +1,38 @@ +/* + * Author: ? + * ? + * + * Arguments: + * ? + * + * Return Value: + * ? + * + * Public: ? + */ +#include "script_component.hpp" + +ACE_DEPRECATED(QFUNC(hashSet),"3.8.0","CBA_fnc_hashSet"); + +// diag_log text format["%1 HASH SET: %2", diag_tickTime, _this]; + +params ["_hash", "_key", "_val"]; + +ERRORDATA(3); +try { + if(VALIDHASH(_hash)) then { + private _index = (_hash select 0) find _key; + if(_index == -1) then { + _index = (_hash select 0) find "ACREHASHREMOVEDONOTUSETHISVAL"; + if(_index == -1) then { + _index = (count (_hash select 0)); + }; + (_hash select 0) set[_index, _key]; + }; + (_hash select 1) set[_index, _val]; + } else { + ERROR("Input hash is not valid"); + }; +} catch { + HANDLECATCH; +}; diff --git a/addons/common/functions/fnc_headBugFix.sqf b/addons/common/functions/fnc_headBugFix.sqf index fca04c234b..07a1652b1b 100644 --- a/addons/common/functions/fnc_headBugFix.sqf +++ b/addons/common/functions/fnc_headBugFix.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [] call ace_common_fnc_headBugFix - * * Public: Yes * * Note: Has to be spawned not called diff --git a/addons/common/functions/fnc_hideUnit.sqf b/addons/common/functions/fnc_hideUnit.sqf index 838bd4246e..e0adb201c3 100644 --- a/addons/common/functions/fnc_hideUnit.sqf +++ b/addons/common/functions/fnc_hideUnit.sqf @@ -7,7 +7,7 @@ * 1: Reason to hide the unit * * Return Value: - * None + * nil * * Example: * [ACE_Player, "SpectatorMode"] call ace_common_fnc_hideUnit diff --git a/addons/common/functions/fnc_inTransitionAnim.sqf b/addons/common/functions/fnc_inTransitionAnim.sqf index a127fad005..fd90291d73 100644 --- a/addons/common/functions/fnc_inTransitionAnim.sqf +++ b/addons/common/functions/fnc_inTransitionAnim.sqf @@ -3,13 +3,10 @@ * Check if given unit is in a transitional animation * * Arguments: - * 0: A soldier + * 0: A soldier * * Return Value: - * Boolean - * - * Example: - * [bob] call ace_common_fnc_inTransitionAnim + * * * Public: Yes */ diff --git a/addons/common/functions/fnc_insertionSort.sqf b/addons/common/functions/fnc_insertionSort.sqf new file mode 100644 index 0000000000..1b664e1fd6 --- /dev/null +++ b/addons/common/functions/fnc_insertionSort.sqf @@ -0,0 +1,22 @@ +/* + * Author: Ruthberg + * Sorts an array of numbers + * + * Arguments: + * 0: array + * 1: ascending (optional) + * + * Return Value: + * sortedArray (ARRAY) + * + * Public: No + */ +#include "script_component.hpp" + +ACE_DEPRECATED(QFUNC(insertionSort),"3.8.0","sort"); + +params [["_list", [], [[]]], ["_ascending", true, [false]]]; + +_list = + _list; // copy array to not alter the original one +_list sort _ascending; +_list diff --git a/addons/common/functions/fnc_interpolateFromArray.sqf b/addons/common/functions/fnc_interpolateFromArray.sqf index 9c63a9798c..07207071e7 100644 --- a/addons/common/functions/fnc_interpolateFromArray.sqf +++ b/addons/common/functions/fnc_interpolateFromArray.sqf @@ -9,9 +9,6 @@ * Return Value: * Interpolation result * - * Example: - * [[0,1], 5] call ace_common_fnc_interpolateFromArray - * * Public: Yes */ #include "script_component.hpp" @@ -21,4 +18,4 @@ params ["_array", "_value"]; private _min = _array select floor _value; private _max = _array select ceil _value; -linearConversion [0, 1, _value % 1, _min, _max] // return +_min + (_max - _min) * (_value % 1) // return diff --git a/addons/common/functions/fnc_isAwake.sqf b/addons/common/functions/fnc_isAwake.sqf index d7f0b79149..1179ced02f 100644 --- a/addons/common/functions/fnc_isAwake.sqf +++ b/addons/common/functions/fnc_isAwake.sqf @@ -8,9 +8,6 @@ * Return Value: * if unit is awake * - * Example: - * [bob] call ace_common_fnc_isAwake - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_isEOD.sqf b/addons/common/functions/fnc_isEOD.sqf index 2a6e04247c..ee82cf2068 100644 --- a/addons/common/functions/fnc_isEOD.sqf +++ b/addons/common/functions/fnc_isEOD.sqf @@ -20,4 +20,4 @@ params ["_unit"]; -_unit getVariable ["ACE_isEOD", _unit getUnitTrait "explosiveSpecialist"] // return +_unit getVariable ["ACE_isEOD", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "canDeactivateMines") == 1] // return diff --git a/addons/common/functions/fnc_isEngineer.sqf b/addons/common/functions/fnc_isEngineer.sqf index 96a00970f6..01eabfc0b3 100644 --- a/addons/common/functions/fnc_isEngineer.sqf +++ b/addons/common/functions/fnc_isEngineer.sqf @@ -17,7 +17,7 @@ params ["_unit"]; -private _isEngineer = _unit getVariable ["ACE_isEngineer", _unit getUnitTrait "engineer"]; +private _isEngineer = _unit getVariable ["ACE_isEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer") == 1]; //Handle ace_repair modules setting this to a number if (_isEngineer isEqualType 0) then {_isEngineer = _isEngineer > 0}; diff --git a/addons/common/functions/fnc_isFeatureCameraActive.sqf b/addons/common/functions/fnc_isFeatureCameraActive.sqf index b0870408af..7d282109b2 100644 --- a/addons/common/functions/fnc_isFeatureCameraActive.sqf +++ b/addons/common/functions/fnc_isFeatureCameraActive.sqf @@ -25,7 +25,7 @@ !( isNull curatorCamera && // Curator - {!(GETMVAR(EGVAR(spectator,isSet),false))} && // ACE Spectator + {isNull (GETMVAR(EGVAR(spectator,camera),objNull))} && // ACE Spectator {isNull (GETUVAR(BIS_fnc_arsenal_cam, objNull))} && // Arsenal camera {isNull (GETMVAR(BIS_fnc_establishingShot_fakeUAV, objNull))} && // Establishing shot camera {isNull (GETMVAR(BIS_fnc_camera_cam, objNull))} && // Splendid camera diff --git a/addons/common/functions/fnc_isInBuilding.sqf b/addons/common/functions/fnc_isInBuilding.sqf index 98f092e762..d4a9307cd6 100644 --- a/addons/common/functions/fnc_isInBuilding.sqf +++ b/addons/common/functions/fnc_isInBuilding.sqf @@ -8,9 +8,6 @@ * Return Value: * Is the unit in a building? * - * Example: - * [bob] call ace_common_fnc_isInBuilding - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_isModLoaded.sqf b/addons/common/functions/fnc_isModLoaded.sqf index f740f58b0b..46e1bc03a8 100644 --- a/addons/common/functions/fnc_isModLoaded.sqf +++ b/addons/common/functions/fnc_isModLoaded.sqf @@ -8,9 +8,6 @@ * Return Value: * if modification is loaded * - * Example: - * ["class"] call ace_common_fnc_isModLoaded - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_isUnderwater.sqf b/addons/common/functions/fnc_isUnderwater.sqf index f3f127d75f..637ed49f3d 100644 --- a/addons/common/functions/fnc_isUnderwater.sqf +++ b/addons/common/functions/fnc_isUnderwater.sqf @@ -8,9 +8,6 @@ * Return Value: * If unit's head is underwater * - * Example: - * [bob] call ace_common_fnc_isUnderwater - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_lightIntensityFromObject.sqf b/addons/common/functions/fnc_lightIntensityFromObject.sqf index 6725a71580..a495897dea 100644 --- a/addons/common/functions/fnc_lightIntensityFromObject.sqf +++ b/addons/common/functions/fnc_lightIntensityFromObject.sqf @@ -7,10 +7,7 @@ * 1: Object that emits light * * Return Value: - * Brightest light level - * - * Example: - * [reciever, giver] call ace_common_fnc_lightIntensityFromObject + * Brightest light level * * Public: Yes */ diff --git a/addons/common/functions/fnc_loadPerson.sqf b/addons/common/functions/fnc_loadPerson.sqf index 59c9af2c20..f8a4456b96 100644 --- a/addons/common/functions/fnc_loadPerson.sqf +++ b/addons/common/functions/fnc_loadPerson.sqf @@ -9,9 +9,6 @@ * Return Value: * the vehicle that the unitToBeloaded has been loaded in. Returns ObjNull if function failed * - * Example: - * [bob, kevin] call ace_common_fnc_loadPerson - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_loadPersonLocal.sqf b/addons/common/functions/fnc_loadPersonLocal.sqf index 90cbd7da03..db0248a901 100644 --- a/addons/common/functions/fnc_loadPersonLocal.sqf +++ b/addons/common/functions/fnc_loadPersonLocal.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [bob, car, kevin] call ace_common_fnc_loadPersonLocal - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_loadSettingsFromProfile.sqf b/addons/common/functions/fnc_loadSettingsFromProfile.sqf index 9151d79cce..46b0134740 100644 --- a/addons/common/functions/fnc_loadSettingsFromProfile.sqf +++ b/addons/common/functions/fnc_loadSettingsFromProfile.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * call ace_common_fnc_loadSettingsFromProfile - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf index 7ceffa04e7..6a2711c2a7 100644 --- a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf +++ b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * call ace_common_fnc_loadSettingsLocalizedText - * * Public: No */ #include "script_component.hpp" @@ -38,11 +35,11 @@ private _fnc_parseConfigForDisplayNames = { if (!(_values isEqualTo [])) then { if (_typeOf != "SCALAR") then { - WARNING_2("Setting [%1] has values[] but is not SCALAR (%2)", _name, _typeOf); + ACE_LOGWARNING_2("Setting [%1] has values[] but is not SCALAR (%2)", _name, _typeOf); } else { private _value = missionNamespace getVariable [_name, -1]; if ((_value < 0) || {_value >= (count _values)}) then { - WARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)", _name, _value, count _values); + ACE_LOGWARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)", _name, _value, count _values); }; }; }; @@ -56,7 +53,7 @@ private _fnc_parseConfigForDisplayNames = { if !([configFile >> "ACE_Settings" >> _name] call _fnc_parseConfigForDisplayNames) then { if !([configFile >> "ACE_ServerSettings" >> _name] call _fnc_parseConfigForDisplayNames) then { if !([missionConfigFile >> "ACE_Settings" >> _name] call _fnc_parseConfigForDisplayNames) then { - WARNING_1("Setting found, but couldn't localize [%1] (server has but we don't?)",_name); + ACE_LOGWARNING_1("Setting found, but couldn't localize [%1] (server has but we don't?)",_name); }; }; }; diff --git a/addons/common/functions/fnc_loadSettingsOnServer.sqf b/addons/common/functions/fnc_loadSettingsOnServer.sqf index eaeac7d51d..4498c9d058 100644 --- a/addons/common/functions/fnc_loadSettingsOnServer.sqf +++ b/addons/common/functions/fnc_loadSettingsOnServer.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * call ace_common_fnc_loadSettingsOnServer - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_localEvent.sqf b/addons/common/functions/fnc_localEvent.sqf new file mode 100644 index 0000000000..fb473b75b8 --- /dev/null +++ b/addons/common/functions/fnc_localEvent.sqf @@ -0,0 +1,13 @@ +#include "script_component.hpp" + +params ["_eventName", "_eventArgs"]; + +private _newName = getText (configFile >> "ACE_newEvents" >> _eventName); +if (_newName != "") then { + TRACE_2("Switching Names",_eventName,_newName); + _eventName = _newName; +}; + +[_eventName, _eventArgs] call CBA_fnc_localEvent; + +ACE_DEPRECATED("ace_common_fnc_localEvent","3.8.0","CBA_fnc_localEvent"); diff --git a/addons/common/functions/fnc_moduleCheckPBOs.sqf b/addons/common/functions/fnc_moduleCheckPBOs.sqf index f3a8c0902c..4585682496 100644 --- a/addons/common/functions/fnc_moduleCheckPBOs.sqf +++ b/addons/common/functions/fnc_moduleCheckPBOs.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ace_common_fnc_moduleCheckPBOs - * * Public: No */ #include "script_component.hpp" @@ -27,4 +24,4 @@ if !(_activated) exitWith {}; [_logic, QGVAR(checkPBOsCheckAll), "CheckAll" ] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(checkPBOsWhitelist), "Whitelist" ] call EFUNC(common,readSettingFromModule); -INFO_1("Check-PBOs Module Initialized. Mode: %1.",GVAR(checkPBOsAction)); +ACE_LOGINFO_1("Check-PBOs Module Initialized. Mode: %1.",GVAR(checkPBOsAction)); diff --git a/addons/common/functions/fnc_moduleLSDVehicles.sqf b/addons/common/functions/fnc_moduleLSDVehicles.sqf index cecc8983a1..8a6cb90eca 100644 --- a/addons/common/functions/fnc_moduleLSDVehicles.sqf +++ b/addons/common/functions/fnc_moduleLSDVehicles.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob, target, []] call ace_common_fnc_moduleLSDVehicles - * * Public: No */ #include "script_component.hpp" @@ -59,4 +56,4 @@ if (isNil QGVAR(LSD_PFH)) then { }, 0.02, [0]] call CBA_fnc_addPerFrameHandler; }; -INFO("WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEED."); +ACE_LOGINFO("WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEED."); diff --git a/addons/common/functions/fnc_monitor.sqf b/addons/common/functions/fnc_monitor.sqf index 591e923d1b..8aef62895c 100644 --- a/addons/common/functions/fnc_monitor.sqf +++ b/addons/common/functions/fnc_monitor.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [{code}] call ace_common_fnc_monitor - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_muteUnit.sqf b/addons/common/functions/fnc_muteUnit.sqf index 25106c979f..11c18aedd7 100644 --- a/addons/common/functions/fnc_muteUnit.sqf +++ b/addons/common/functions/fnc_muteUnit.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, "because"] call ace_common_fnc_muteUnit - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_muteUnitHandleInitPost.sqf b/addons/common/functions/fnc_muteUnitHandleInitPost.sqf index 4e6ac7cbaf..53e8d4d5b7 100644 --- a/addons/common/functions/fnc_muteUnitHandleInitPost.sqf +++ b/addons/common/functions/fnc_muteUnitHandleInitPost.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_common_fnc_muteUnitHandleInitPost - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_muteUnitHandleRespawn.sqf b/addons/common/functions/fnc_muteUnitHandleRespawn.sqf index 6e93e40ef6..ceb0614116 100644 --- a/addons/common/functions/fnc_muteUnitHandleRespawn.sqf +++ b/addons/common/functions/fnc_muteUnitHandleRespawn.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_common_fnc_muteUnitHandleRespawn - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_numberToDigits.sqf b/addons/common/functions/fnc_numberToDigits.sqf index d9aceb2426..b90f0eefd7 100644 --- a/addons/common/functions/fnc_numberToDigits.sqf +++ b/addons/common/functions/fnc_numberToDigits.sqf @@ -9,9 +9,6 @@ * Return Value: * Digits. The maximum count is six digits. * - * Example: - * [5, 5] call ace_common_fnc_numberToDigits - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_numberToDigitsString.sqf b/addons/common/functions/fnc_numberToDigitsString.sqf index 9f19cfe3dc..7e2c78f8b4 100644 --- a/addons/common/functions/fnc_numberToDigitsString.sqf +++ b/addons/common/functions/fnc_numberToDigitsString.sqf @@ -4,14 +4,11 @@ * * Arguments: * 0: Number to 'digitize' - * 1: Set the minimal length of the returned string. Useful for getting left hand zeroes. (Optional) + * 1: Set the minimal length of the returned string. Useful for getting left hand zeroes. (Number, optional) * * Return Value: * Digits. The maximum length is six digits. * - * Example: - * [5, 5] call ace_common_fnc_numberToDigitsString - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_numberToString.sqf b/addons/common/functions/fnc_numberToString.sqf index 8ca22bca88..1cb2f521f8 100644 --- a/addons/common/functions/fnc_numberToString.sqf +++ b/addons/common/functions/fnc_numberToString.sqf @@ -8,9 +8,6 @@ * Return Value: * The number as string * - * Example: - * [5] call ace_common_fnc_numberToString - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_objectEvent.sqf b/addons/common/functions/fnc_objectEvent.sqf new file mode 100644 index 0000000000..878b0d80d1 --- /dev/null +++ b/addons/common/functions/fnc_objectEvent.sqf @@ -0,0 +1,13 @@ +#include "script_component.hpp" + +params ["_eventName", "_eventTargets", "_eventArgs"]; + +private _newName = getText (configFile >> "ACE_newEvents" >> _eventName); +if (_newName != "") then { + TRACE_2("Switching Names",_eventName,_newName); + _eventName = _newName; +}; + +[_eventName, _eventArgs, _eventTargets] call CBA_fnc_targetEvent; + +ACE_DEPRECATED("ace_common_fnc_objectEvent","3.8.0","CBA_fnc_targetEvent"); diff --git a/addons/common/functions/fnc_onAnswerRequest.sqf b/addons/common/functions/fnc_onAnswerRequest.sqf index 38f35f1968..8c77719256 100644 --- a/addons/common/functions/fnc_onAnswerRequest.sqf +++ b/addons/common/functions/fnc_onAnswerRequest.sqf @@ -3,15 +3,10 @@ * N/A * * Arguments: - * 0: Unit - * 1: ID? - * 2: Accepted + * ? * * Return Value: - * None - * - * Example: - * [bob, "ID", true] call ace_common_fnc_onAnswerRequest + * ? * * Public: No */ diff --git a/addons/common/functions/fnc_owned.sqf b/addons/common/functions/fnc_owned.sqf index a8c3f737e7..e352795c5e 100644 --- a/addons/common/functions/fnc_owned.sqf +++ b/addons/common/functions/fnc_owned.sqf @@ -6,10 +6,7 @@ * 0: Any object. * * Return Value: - * Is this object claimed by someone? - * - * Example: - * [bob] call ace_common_fnc_owned + * Is this object claimed by someone? * * Public: No */ diff --git a/addons/common/functions/fnc_parseList.sqf b/addons/common/functions/fnc_parseList.sqf index 40b16c1aa5..fc92605682 100644 --- a/addons/common/functions/fnc_parseList.sqf +++ b/addons/common/functions/fnc_parseList.sqf @@ -28,7 +28,7 @@ private _whitespaceList = []; { if (_removeWhitespace) then { - _whitespaceList pushBack ([_x] call CBA_fnc_removeWhitespace); + _whitespaceList pushBack ([_x] call FUNC(stringRemoveWhiteSpace)); } else { _whitespaceList pushBack ([_x] call CBA_fnc_trim); }; diff --git a/addons/common/functions/fnc_playConfigSound3D.sqf b/addons/common/functions/fnc_playConfigSound3D.sqf index 2631c30d06..6253f75fb4 100644 --- a/addons/common/functions/fnc_playConfigSound3D.sqf +++ b/addons/common/functions/fnc_playConfigSound3D.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * ["sound", [0,0,0], 5, 5] call ace_common_fnc_playConfigSound3D - * * Public: Yes */ #define DEBUG_MODE_FULL @@ -24,7 +21,7 @@ params ["_soundClass", "_posASL", "_volume", "_distance"]; private _cfgSound = configFile >> "CfgSounds" >> _soundClass; if (!isClass _cfgSound) exitWith { - ERROR_1("CfgSounds class [%1] does not exist", _soundClass); + ACE_LOGERROR_1("CfgSounds class [%1] does not exist", _soundClass); }; private _args = getArray (_cfgSound >> "sound"); diff --git a/addons/common/functions/fnc_player.sqf b/addons/common/functions/fnc_player.sqf index 54510be05e..1a268515a7 100644 --- a/addons/common/functions/fnc_player.sqf +++ b/addons/common/functions/fnc_player.sqf @@ -9,9 +9,6 @@ * Return Value: * Player controlled unit * - * Example: - * [] call ace_common_fnc_player - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_playerSide.sqf b/addons/common/functions/fnc_playerSide.sqf index dd6b7e8b2f..3a7ce5bba9 100644 --- a/addons/common/functions/fnc_playerSide.sqf +++ b/addons/common/functions/fnc_playerSide.sqf @@ -8,9 +8,6 @@ * Return Value: * current local side * - * Example: - * [] call ace_common_fnc_playerSide - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_positionToASL.sqf b/addons/common/functions/fnc_positionToASL.sqf index 297e89ee2b..267bbf2353 100644 --- a/addons/common/functions/fnc_positionToASL.sqf +++ b/addons/common/functions/fnc_positionToASL.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [1, 1, 1] call ace_common_fnc_positionToASL - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_progressBar.sqf b/addons/common/functions/fnc_progressBar.sqf index 37fb17190a..7103dd08e4 100644 --- a/addons/common/functions/fnc_progressBar.sqf +++ b/addons/common/functions/fnc_progressBar.sqf @@ -4,16 +4,16 @@ * Finish/Failure/Conditional are all passed [_args, _elapsedTime, _totalTime, _errorCode] * * Arguments: - * 0: Total Time (in game "time" seconds) - * 1: Arguments, passed to condition, fail and finish - * 2: On Finish: Code called or STRING raised as event. - * 3: On Failure: Code called or STRING raised as event. - * 4: (Optional) Localized Title - * 5: Code to check each frame (Optional) - * 6: Exceptions for checking EFUNC(common,canInteractWith) (Optional) + * 0: NUMBER - Total Time (in game "time" seconds) + * 1: ARRAY - Arguments, passed to condition, fail and finish + * 2: CODE or STRING - On Finish: Code called or STRING raised as event. + * 3: CODE or STRING - On Failure: Code called or STRING raised as event. + * 4: STRING - (Optional) Localized Title + * 5: CODE - (Optional) Code to check each frame + * 6: ARRAY - (Optional) Exceptions for checking EFUNC(common,canInteractWith) * * Return Value: - * None + * Nothing * * Example: * [5, [], {Hint "Finished!"}, {hint "Failure!"}, "My Title"] call ace_common_fnc_progressBar diff --git a/addons/common/functions/fnc_readSettingFromModule.sqf b/addons/common/functions/fnc_readSettingFromModule.sqf index 21e7dc7e4b..3e2a5d862e 100644 --- a/addons/common/functions/fnc_readSettingFromModule.sqf +++ b/addons/common/functions/fnc_readSettingFromModule.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * [MODULE, "Param", "paramname"] call ace_common_fnc_readSettingFromModule - * * Public: No */ #include "script_component.hpp" @@ -24,7 +21,7 @@ params ["_logic", "_settingName", "_moduleVariable"]; // Check if the parameter is defined in the module if (isNil {_logic getVariable _moduleVariable}) exitWith { - WARNING_2("Warning in %1 module: %2 setting is missing. Probably an obsolete version of the module is used in the mission.",typeOf _logic,_moduleVariable); + ACE_LOGWARNING_2("Warning in %1 module: %2 setting is missing. Probably an obsolete version of the module is used in the mission.",typeOf _logic,_moduleVariable); }; private _value = _logic getVariable _moduleVariable; @@ -32,7 +29,7 @@ if (_value isEqualTo -1) then { //3den missions will save modules with value = 0 as -1 //If the setting has a "values" array, we should be able to assume that -1 is not a valid number as it would not be a valid index for the array if (isArray (configFile >> "ACE_Settings" >> _settingName >> "values")) then { - WARNING_2("Module For Setting [%1] is saved as (-1), switching to (0) - missionVersion [%2]",_settingName,missionVersion); + ACE_LOGWARNING_2("Module For Setting [%1] is saved as (-1), switching to (0) - missionVersion [%2]",_settingName,missionVersion); _value = 0; }; }; diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index 5faf1f52cf..e158ae5c81 100644 --- a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -32,14 +32,14 @@ TRACE_1("Reading missionConfigFile params",_paramsArray); // Check if the variable is already defined if (isNil _settingName) exitWith { - ERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName); + ACE_LOGERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName); }; private _settingData = [_settingName] call FUNC(getSettingData); _settingData params ["", "_typeName", "", "", "", "", "_isForced"]; // Check if it's already forced and quit - if (_isForced) exitWith {WARNING_1("readSettingsFromParamsArray - param [%1] is already set and forced", _settingName);}; + if (_isForced) exitWith {ACE_LOGWARNING_1("readSettingsFromParamsArray - param [%1] is already set and forced", _settingName);}; // The setting is not forced, so update the value // Read entry and cast it to the correct type from the existing variable @@ -54,7 +54,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray); }; if (!_validValue) exitWith { - WARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]", _settingName,_settingValue,_typeName); + ACE_LOGWARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]", _settingName,_settingValue,_typeName); }; // Update the variable globaly and Force diff --git a/addons/common/functions/fnc_receiveRequest.sqf b/addons/common/functions/fnc_receiveRequest.sqf index a3f10550af..1bb48428df 100644 --- a/addons/common/functions/fnc_receiveRequest.sqf +++ b/addons/common/functions/fnc_receiveRequest.sqf @@ -3,18 +3,11 @@ * N/A * * Arguments: - * 0: caller - * 1: target - * 2: requestID - * 3: Message - * 4: callback (NOT USED) + * ? * * Return Value: * None * - * Example: - * [bob, kevin, "ID", "Message", {Callback}] call ace_common_fnc_recieveRequest - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_removeActionEventHandler.sqf b/addons/common/functions/fnc_removeActionEventHandler.sqf index db711b77f4..60e551590d 100644 --- a/addons/common/functions/fnc_removeActionEventHandler.sqf +++ b/addons/common/functions/fnc_removeActionEventHandler.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [bob, "DefaultAction", 5] call ace_common_fnc_removeActionEventHandler - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_removeActionMenuEventHandler.sqf b/addons/common/functions/fnc_removeActionMenuEventHandler.sqf index 9fb8ee6588..943e3b4e22 100644 --- a/addons/common/functions/fnc_removeActionMenuEventHandler.sqf +++ b/addons/common/functions/fnc_removeActionMenuEventHandler.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [bob, "DefaultAction", 5] call ace_common_fnc_removeActionMenuEventHandler - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_removeAllEventHandlers.sqf b/addons/common/functions/fnc_removeAllEventHandlers.sqf new file mode 100644 index 0000000000..958923f808 --- /dev/null +++ b/addons/common/functions/fnc_removeAllEventHandlers.sqf @@ -0,0 +1,14 @@ +#include "script_component.hpp" + +params ["_eventName"]; + +private _newName = getText (configFile >> "ACE_newEvents" >> _eventName); +if (_newName != "") then { + TRACE_2("Switching Names",_eventName,_newName); + _eventName = _newName; +}; + +CBA_events_eventNamespace setVariable [_eventName,nil]; +CBA_events_eventHashes setVariable [_eventName,nil]; + +ACE_DEPRECATED("ace_common_fnc_removeAllEventHandlers","3.8.0","N/A (remove events individually w/ CBA_fnc_removeEventHandler)"); diff --git a/addons/common/functions/fnc_removeBinocularMagazine.sqf b/addons/common/functions/fnc_removeBinocularMagazine.sqf new file mode 100644 index 0000000000..4f1e0fcdd6 --- /dev/null +++ b/addons/common/functions/fnc_removeBinocularMagazine.sqf @@ -0,0 +1,20 @@ +/* + * Author: commy2 + * Removes the magazine of the units rangefinder. + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * player call ace_common_fnc_removeBinocularMagazine + * + * Public: Yes + */ +#include "script_component.hpp" + +ACE_DEPRECATED("ace_common_fnc_removeBinocularMagazine","3.8.0","CBA_fnc_removeBinocularMagazine"); + +_this call CBA_fnc_removeBinocularMagazine diff --git a/addons/common/functions/fnc_removeCanInteractWithCondition.sqf b/addons/common/functions/fnc_removeCanInteractWithCondition.sqf index 8c7c72d861..b267e84557 100644 --- a/addons/common/functions/fnc_removeCanInteractWithCondition.sqf +++ b/addons/common/functions/fnc_removeCanInteractWithCondition.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * ["ID"] call ace_common_fnc_removeCanInteractWithCondition - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_removeEventHandler.sqf b/addons/common/functions/fnc_removeEventHandler.sqf new file mode 100644 index 0000000000..ff89571a6e --- /dev/null +++ b/addons/common/functions/fnc_removeEventHandler.sqf @@ -0,0 +1,13 @@ +#include "script_component.hpp" + +params ["_eventName", "_eventCode"]; + +private _newName = getText (configFile >> "ACE_newEvents" >> _eventName); +if (_newName != "") then { + TRACE_2("Switching Names",_eventName,_newName); + _eventName = _newName; +}; + +[_eventName, _eventCode] call CBA_fnc_removeEventHandler; + +ACE_DEPRECATED("ace_common_fnc_removeEventHandler","3.8.0","CBA_fnc_removeEventHandler"); diff --git a/addons/common/functions/fnc_removeMapMarkerCreatedEventHandler.sqf b/addons/common/functions/fnc_removeMapMarkerCreatedEventHandler.sqf index bda7877a70..825281c3e0 100644 --- a/addons/common/functions/fnc_removeMapMarkerCreatedEventHandler.sqf +++ b/addons/common/functions/fnc_removeMapMarkerCreatedEventHandler.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [5] call ace_common_fnc_removeMapMarkerCreatedEventHandler - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_removeScrollWheelEventHandler.sqf b/addons/common/functions/fnc_removeScrollWheelEventHandler.sqf new file mode 100644 index 0000000000..d7a8ae28cc --- /dev/null +++ b/addons/common/functions/fnc_removeScrollWheelEventHandler.sqf @@ -0,0 +1,31 @@ +/* + * Author: commy2 + * Remove a scroll wheel event handler. + * + * Arguments: + * 0: ID of the event handler + * + * Return Value: + * None + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_id"]; + +private _actionsVar = missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]]; + +_actionsVar params ["_currentId", "_actionIDs", "_actions"]; + +_id = _actionIDs find _id; + +if (_id == -1) exitWith {}; + +_actionIDs set [_id, -1]; +_actionIDs = _actionIDs - [-1]; + +_actions set [_id, []];//{} +_actions = _actions - [[]];//[{}] + +missionNamespace setVariable ["ACE_EventHandler_ScrollWheel", [_currentId, _actionIDs, _actions]]; diff --git a/addons/common/functions/fnc_removeSpecificMagazine.sqf b/addons/common/functions/fnc_removeSpecificMagazine.sqf index 73fe910673..4ca5eec6d7 100644 --- a/addons/common/functions/fnc_removeSpecificMagazine.sqf +++ b/addons/common/functions/fnc_removeSpecificMagazine.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [bob, "magazine", 5] call ace_common_fnc_removeSpecificMagazine - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_removeSyncedEventHandler.sqf b/addons/common/functions/fnc_removeSyncedEventHandler.sqf index f256c21203..157b9699e4 100644 --- a/addons/common/functions/fnc_removeSyncedEventHandler.sqf +++ b/addons/common/functions/fnc_removeSyncedEventHandler.sqf @@ -6,10 +6,7 @@ * 0: Name * * Return Value: - * Boolean of success - * - * Example: - * ["bob"] call ace_common_fnc_removeSyncedEventHandler + * Boolean of success * * Public: No */ @@ -18,7 +15,7 @@ params ["_name"]; if !([GVAR(syncedEvents), _name] call CBA_fnc_hashHasKey) exitWith { - ERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name); + ACE_LOGERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name); false }; diff --git a/addons/common/functions/fnc_requestCallback.sqf b/addons/common/functions/fnc_requestCallback.sqf index e28ff9439f..399f50466d 100644 --- a/addons/common/functions/fnc_requestCallback.sqf +++ b/addons/common/functions/fnc_requestCallback.sqf @@ -3,13 +3,10 @@ * N/A * * Arguments: - * ? + * ? * * Return Value: - * ? - * - * Example: - * [bob] call ace_common_fnc_requestCallback + * ? * * Public: No */ diff --git a/addons/common/functions/fnc_requestSyncedEvent.sqf b/addons/common/functions/fnc_requestSyncedEvent.sqf index fd277c4b36..e35c1e3645 100644 --- a/addons/common/functions/fnc_requestSyncedEvent.sqf +++ b/addons/common/functions/fnc_requestSyncedEvent.sqf @@ -6,10 +6,7 @@ * 0: eventName * * Return Value: - * Boolean of success - * - * Example: - * ["event"] call ace_common_fnc_requestSyncedEvent + * Boolean of success * * Public: No */ diff --git a/addons/common/functions/fnc_resetAllDefaults.sqf b/addons/common/functions/fnc_resetAllDefaults.sqf index 367c72d5e9..6432f3759e 100644 --- a/addons/common/functions/fnc_resetAllDefaults.sqf +++ b/addons/common/functions/fnc_resetAllDefaults.sqf @@ -3,13 +3,10 @@ * reset all variables that have been defined * * Arguments: - * 0: Unit + * ? * * Return Value: - * ? - * - * Example: - * [bob] call ace_common_fnc_resetAllDefaults + * ? * * Public: No */ diff --git a/addons/common/functions/fnc_restoreVariablesJIP.sqf b/addons/common/functions/fnc_restoreVariablesJIP.sqf index 921be28165..39626514bb 100644 --- a/addons/common/functions/fnc_restoreVariablesJIP.sqf +++ b/addons/common/functions/fnc_restoreVariablesJIP.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_common_fnc_restoreVariablesJIP - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_sendRequest.sqf b/addons/common/functions/fnc_sendRequest.sqf index 55a3da9873..a0c505c575 100644 --- a/addons/common/functions/fnc_sendRequest.sqf +++ b/addons/common/functions/fnc_sendRequest.sqf @@ -5,16 +5,13 @@ * Arguments: * 0: caller * 1: target - * 2: requestID - * 3: requestMessage Will be localized for other target object. - * 4: callback Code called upon accept or decline. + * 2: requestID (STRING) + * 3: requestMessage Will be localized for other target object. (STRING) + * 4: callback Code called upon accept or decline. (CODE) * * Return Value: * None * - * Example: - * [bob, kevin, "ID", "Message", {callback}] call ace_common_fnc_sendRequest - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_serverEvent.sqf b/addons/common/functions/fnc_serverEvent.sqf new file mode 100644 index 0000000000..5b116e9661 --- /dev/null +++ b/addons/common/functions/fnc_serverEvent.sqf @@ -0,0 +1,13 @@ +#include "script_component.hpp" + +params ["_eventName", "_eventArgs"]; + +private _newName = getText (configFile >> "ACE_newEvents" >> _eventName); +if (_newName != "") then { + TRACE_2("Switching Names",_eventName,_newName); + _eventName = _newName; +}; + +[_eventName, _eventArgs] call CBA_fnc_serverEvent; + +ACE_DEPRECATED("ace_common_fnc_serverEvent","3.8.0","CBA_fnc_serverEvent"); diff --git a/addons/common/functions/fnc_setApproximateVariablePublic.sqf b/addons/common/functions/fnc_setApproximateVariablePublic.sqf index e888efe3c2..549dea9eb4 100644 --- a/addons/common/functions/fnc_setApproximateVariablePublic.sqf +++ b/addons/common/functions/fnc_setApproximateVariablePublic.sqf @@ -9,7 +9,7 @@ * 3: Absolute tolerance * * Return Value: - * None + * Nothing. * * Example: * [player, "balls", 2, 0.1] call ace_common_fnc_setApproximateVariablePublic; diff --git a/addons/common/functions/fnc_setDefinedVariable.sqf b/addons/common/functions/fnc_setDefinedVariable.sqf index 70b8ef42e3..6f1f0c2e58 100644 --- a/addons/common/functions/fnc_setDefinedVariable.sqf +++ b/addons/common/functions/fnc_setDefinedVariable.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [bob, "var", 5] call ace_common_fnc_setDefinedVariable - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_setDisableUserInputStatus.sqf b/addons/common/functions/fnc_setDisableUserInputStatus.sqf index b217570dac..ec475f744f 100644 --- a/addons/common/functions/fnc_setDisableUserInputStatus.sqf +++ b/addons/common/functions/fnc_setDisableUserInputStatus.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * ["id", true] call ace_common_fnc_setDisableUserInputStatus - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_setName.sqf b/addons/common/functions/fnc_setName.sqf index e93e09c0f0..1b2b515ec2 100644 --- a/addons/common/functions/fnc_setName.sqf +++ b/addons/common/functions/fnc_setName.sqf @@ -8,15 +8,11 @@ * Return Value: * None * - * Example: - * [bob] call ace_common_fnc_setName - * * Public: No */ #include "script_component.hpp" params ["_unit"]; -TRACE_3("setName",_unit,alive _unit,name _unit); if (isNull _unit || {!alive _unit}) exitWith {}; diff --git a/addons/common/functions/fnc_setParameter.sqf b/addons/common/functions/fnc_setParameter.sqf index 723d49ea0c..b24e2506b5 100644 --- a/addons/common/functions/fnc_setParameter.sqf +++ b/addons/common/functions/fnc_setParameter.sqf @@ -4,14 +4,11 @@ * * Arguments: * 0: Parameter name - * 1: Value + * 1: Value * * Return Value: * None * - * Example: - * ["Name", 5] call ace_common_fnc_setParameter - * * Public: Yes * * Deprecated diff --git a/addons/common/functions/fnc_setPitchBankYaw.sqf b/addons/common/functions/fnc_setPitchBankYaw.sqf index 1b986c6445..fecc16208c 100644 --- a/addons/common/functions/fnc_setPitchBankYaw.sqf +++ b/addons/common/functions/fnc_setPitchBankYaw.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * [bob, 1, 2, 3] call ace_common_fnc_setPitchBankYaw - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_setPlayerOwner.sqf b/addons/common/functions/fnc_setPlayerOwner.sqf deleted file mode 100644 index 5b21db0190..0000000000 --- a/addons/common/functions/fnc_setPlayerOwner.sqf +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Author: PabstMirror - * Sets the player's owner id as a variable on his player ojbect. - * Should be called on all machines (including server) - * Note: Needs to wait for CBA_clientID to be recieved from server. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ace_common_fnc_setPlayerOwner - * - * Public: No - */ - -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - -if (missionNameSpace getVariable [QGVAR(setPlayerOwnerRunning), false]) exitWith {}; -GVAR(setPlayerOwnerRunning) = true; - -if (isServer) then { - addMissionEventHandler ["HandleDisconnect", { - params ["_dcPlayer"]; - TRACE_1("HandleDisconnect eh",_dcPlayer); - if (!isNil {_dcPlayer getVariable QGVAR(playerOwner)}) then { - _dcPlayer setVariable [QGVAR(playerOwner), nil, true]; - }; - }]; -}; - -if (hasInterface) then { - [{ - (!isNil "CBA_clientID") && {CBA_clientID > -1} - }, { - TRACE_1("CBA_clientID ready",CBA_clientID); - - ["unit", { - params ["_newUnit", "_oldUnit"]; - TRACE_2("unit changed",_newUnit,_oldUnit); - if ((_oldUnit getVariable [QGVAR(playerOwner), -1]) == CBA_clientID) then { - _oldUnit setVariable [QGVAR(playerOwner), nil, true]; - }; - if (alive _newUnit) then { - _newUnit setVariable [QGVAR(playerOwner), CBA_clientID, true]; - }; - }, true] call CBA_fnc_addPlayerEventHandler; - - }, []] call CBA_fnc_waitUntilAndExecute; -}; - diff --git a/addons/common/functions/fnc_setProne.sqf b/addons/common/functions/fnc_setProne.sqf index 8df8a4d900..c40b0de254 100644 --- a/addons/common/functions/fnc_setProne.sqf +++ b/addons/common/functions/fnc_setProne.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_common_fnc_setProne - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_setSetting.sqf b/addons/common/functions/fnc_setSetting.sqf index fc2dc92339..5a56b385a7 100644 --- a/addons/common/functions/fnc_setSetting.sqf +++ b/addons/common/functions/fnc_setSetting.sqf @@ -26,19 +26,19 @@ private _settingData = [_name] call FUNC(getSettingData); // Exit if the setting does not exist if (_settingData isEqualTo []) exitWith { - ERROR_1("SetSetting [%1] setting does not exist", _name); + ACE_LOGERROR_1("SetSetting [%1] setting does not exist", _name); }; _settingData params ["", "_typeName", "_isClientSetable", "", "", "", "_isForced"]; // Exit if the setting is already forced if (_isForced) exitWith { - INFO_1("SetSetting [%1] Trying to set forced setting", _name); + ACE_LOGINFO_1("SetSetting [%1] Trying to set forced setting", _name); }; //This does NOT broadcast changes to GVAR(settings), so clients would not get updated force status if ((missionNamespace getVariable [QEGVAR(modules,serverModulesRead), false]) && {!(_isForced isEqualTo _force)}) then { - WARNING_3("SetSetting [%1] attempting to broadcast a change to force (%2 to %3)", _name, _isForced, _force); + ACE_LOGWARNING_3("SetSetting [%1] attempting to broadcast a change to force (%2 to %3)", _name, _isForced, _force); }; // If the type is not equal, try to cast it @@ -61,7 +61,7 @@ if (typeName _value != _settingData select 1) then { }; }; -if (_failed) exitWith {ERROR_3("SetSetting [%1] bad data type expected %2 got %3", _name, _typeName, typeName _value);}; +if (_failed) exitWith {ACE_LOGERROR_3("SetSetting [%1] bad data type expected %2 got %3", _name, _typeName, typeName _value);}; // Force it if it was required _settingData set [6, _force]; diff --git a/addons/common/functions/fnc_setSettingFromConfig.sqf b/addons/common/functions/fnc_setSettingFromConfig.sqf index 6308438ac8..ac7a0f4875 100644 --- a/addons/common/functions/fnc_setSettingFromConfig.sqf +++ b/addons/common/functions/fnc_setSettingFromConfig.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [CONFIG] call ace_common_fnc_setSettingFromConfig - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_setVariableJIP.sqf b/addons/common/functions/fnc_setVariableJIP.sqf index 151d7b9925..35e8c0d116 100644 --- a/addons/common/functions/fnc_setVariableJIP.sqf +++ b/addons/common/functions/fnc_setVariableJIP.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [bob, "varname", 5] call ace_common_fnc_setVariableJIP - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_setVariablePublic.sqf b/addons/common/functions/fnc_setVariablePublic.sqf index 2eac69f6ce..5eeff87aee 100644 --- a/addons/common/functions/fnc_setVariablePublic.sqf +++ b/addons/common/functions/fnc_setVariablePublic.sqf @@ -9,7 +9,7 @@ * 3: Embargo delay (Optional. Default: 1) * * Return Value: - * None + * Nothing. * * Example: * [player, "balls", 2, 1] call ace_common_fnc_setVariablePublic; @@ -48,7 +48,6 @@ TRACE_2("Starting Embargo", _varName, _delay); //If value at start of embargo doesn't equal current, then broadcast and start new embargo if (!(_value isEqualTo _curValue)) then { - _this set [2, _curValue]; _this call FUNC(setVariablePublic); }; }, _this, _delay] call CBA_fnc_waitAndExecute; diff --git a/addons/common/functions/fnc_setVolume.sqf b/addons/common/functions/fnc_setVolume.sqf index 5d7f349ce1..37e1f04cfa 100644 --- a/addons/common/functions/fnc_setVolume.sqf +++ b/addons/common/functions/fnc_setVolume.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [true] call ace_common_fnc_setVolume - * * Public: Yes * * Note: Uses player diff --git a/addons/common/functions/fnc_showHud.sqf b/addons/common/functions/fnc_showHud.sqf index 7c91ab3592..98b9801b3f 100644 --- a/addons/common/functions/fnc_showHud.sqf +++ b/addons/common/functions/fnc_showHud.sqf @@ -33,7 +33,7 @@ params [["_reason", "", [""]], ["_mask", [], [[]], [0,8]]]; if (isArray (missionConfigFile >> "showHUD")) then { //(showHud = 0;) is fine - the array is the problem - WARNING("showHUD[] in Description.ext breaks the showHud command"); + ACE_LOGWARNING("showHUD[] in Description.ext breaks the showHud command"); }; if (_reason != "") then { diff --git a/addons/common/functions/fnc_showUser.sqf b/addons/common/functions/fnc_showUser.sqf index 6c78e03f97..2e7af12a3f 100644 --- a/addons/common/functions/fnc_showUser.sqf +++ b/addons/common/functions/fnc_showUser.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_common_fnc_showUser - * * Public: No */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_statusEffect_addType.sqf b/addons/common/functions/fnc_statusEffect_addType.sqf index c423db2393..b5d6c1e879 100644 --- a/addons/common/functions/fnc_statusEffect_addType.sqf +++ b/addons/common/functions/fnc_statusEffect_addType.sqf @@ -8,7 +8,7 @@ * 2: Common Effect Reaons to pre-seed durring init * * Return Value: - * None + * Nothing * * Example: * ["setCaptive", true, []] call ace_common_fnc_statusEffect_addType @@ -21,8 +21,8 @@ params [["_name", "", [""]], ["_isGlobal", false, [false]], ["_commonReasonsArray", [], [[]]]]; TRACE_3("params",_name,_isGlobal,_commonReasonsArray); -if (_name == "") exitWith {ERROR_1("addStatusEffect - Bad Name %1", _this)}; -if (_name in GVAR(statusEffect_Names)) exitWith {WARNING_1("addStatusEffect - Effect Already Added (note, will not update global bit) %1", _this)}; +if (_name == "") exitWith {ACE_LOGERROR_1("addStatusEffect - Bad Name %1", _this)}; +if (_name in GVAR(statusEffect_Names)) exitWith {ACE_LOGWARNING_1("addStatusEffect - Effect Already Added (note, will not update global bit) %1", _this)}; GVAR(statusEffect_Names) pushBack _name; GVAR(statusEffect_isGlobal) pushBack _isGlobal; diff --git a/addons/common/functions/fnc_statusEffect_localEH.sqf b/addons/common/functions/fnc_statusEffect_localEH.sqf index 84f3e0e9a2..5490029a3b 100644 --- a/addons/common/functions/fnc_statusEffect_localEH.sqf +++ b/addons/common/functions/fnc_statusEffect_localEH.sqf @@ -4,10 +4,9 @@ * * Arguments: * 0: vehicle that it will be attached to (player or vehicle) - * 1: isLocal * * Return Value: - * None + * Nothing * * Example: * [player, true] call ace_common_fnc_statusEffect_localEH @@ -20,7 +19,7 @@ params ["_object", "_isLocal"]; TRACE_2("params",_object,_isLocal); -//Only run this after the settings are initialized +//Only run this after the settings are initialized //Need to wait for all EH to be installed (local event will happen between pre and post init) if !(GVAR(settingsInitFinished)) exitWith { TRACE_1("pushing to runAtSettingsInitialized", _this); diff --git a/addons/common/functions/fnc_statusEffect_resetVariables.sqf b/addons/common/functions/fnc_statusEffect_resetVariables.sqf index 7f638bcbef..2a307c84e5 100644 --- a/addons/common/functions/fnc_statusEffect_resetVariables.sqf +++ b/addons/common/functions/fnc_statusEffect_resetVariables.sqf @@ -6,7 +6,7 @@ * 0: vehicle that it will be attached to (player or vehicle) * * Return Value: - * None + * Nothing * * Example: * [player, true] call ace_common_fnc_statusEffect_resetVariables diff --git a/addons/common/functions/fnc_statusEffect_respawnEH.sqf b/addons/common/functions/fnc_statusEffect_respawnEH.sqf index ba3058be19..92717b68c7 100644 --- a/addons/common/functions/fnc_statusEffect_respawnEH.sqf +++ b/addons/common/functions/fnc_statusEffect_respawnEH.sqf @@ -6,7 +6,7 @@ * 0: vehicle that it will be attached to (player or vehicle) * * Return Value: - * None + * Nothing * * Example: * [player, objNull] call ace_common_fnc_statusEffect_respawnEH @@ -19,7 +19,7 @@ params ["_object"]; TRACE_1("params",_object); -//Only run this after the settings are initialized +//Only run this after the settings are initialized //Need to wait for all EH to be installed (local event will happen between pre and post init) if !(GVAR(settingsInitFinished)) exitWith { TRACE_1("pushing to runAtSettingsInitialized", _this); diff --git a/addons/common/functions/fnc_statusEffect_sendEffects.sqf b/addons/common/functions/fnc_statusEffect_sendEffects.sqf index 0945fc3424..f82ab10427 100644 --- a/addons/common/functions/fnc_statusEffect_sendEffects.sqf +++ b/addons/common/functions/fnc_statusEffect_sendEffects.sqf @@ -7,7 +7,7 @@ * 1: Effect name (or "" to send all) * * Return Value: - * None + * Nothing * * Example: * [player, ""] call ace_common_fnc_statusEffect_sendEffects diff --git a/addons/common/functions/fnc_statusEffect_set.sqf b/addons/common/functions/fnc_statusEffect_set.sqf index 4908da5395..a0be8d8719 100644 --- a/addons/common/functions/fnc_statusEffect_set.sqf +++ b/addons/common/functions/fnc_statusEffect_set.sqf @@ -9,7 +9,7 @@ * 3: Is Set (true adds/false removes) * * Return Value: - * None + * Nothing * * Example: * [player, "setCaptive", "reason1", true] call ace_common_fnc_statusEffect_set diff --git a/addons/common/functions/fnc_stringCompare.sqf b/addons/common/functions/fnc_stringCompare.sqf index b14eedb653..ad3073eb1e 100644 --- a/addons/common/functions/fnc_stringCompare.sqf +++ b/addons/common/functions/fnc_stringCompare.sqf @@ -7,10 +7,7 @@ * 1: stringB * * Return Value: - * Number of matching characters - * - * Example: - * ["a", "b"] call ace_common_fnc_stringCompare + * Number of matching characters >NUMBER> * * Public: Yes */ diff --git a/addons/common/functions/fnc_stringRemoveWhiteSpace.sqf b/addons/common/functions/fnc_stringRemoveWhiteSpace.sqf index 51d43d71a9..47c9375d43 100644 --- a/addons/common/functions/fnc_stringRemoveWhiteSpace.sqf +++ b/addons/common/functions/fnc_stringRemoveWhiteSpace.sqf @@ -17,6 +17,4 @@ params ["_string"]; -ACE_DEPRECATED(QFUNC(stringRemoveWhiteSpace),"3.10.0","CBA_fnc_removeWhitespace"); - (_string splitString " ") joinString "" diff --git a/addons/common/functions/fnc_stringToColoredText.sqf b/addons/common/functions/fnc_stringToColoredText.sqf index c072da9253..e6e19e4869 100644 --- a/addons/common/functions/fnc_stringToColoredText.sqf +++ b/addons/common/functions/fnc_stringToColoredText.sqf @@ -9,9 +9,6 @@ * Return Value: * Text * - * Example: - * ["text", [0, 1, 2]] call ace_common_fnc_stringToColoredText - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_switchToGroupSide.sqf b/addons/common/functions/fnc_switchToGroupSide.sqf index 914c12034f..3a559a7a65 100644 --- a/addons/common/functions/fnc_switchToGroupSide.sqf +++ b/addons/common/functions/fnc_switchToGroupSide.sqf @@ -11,14 +11,11 @@ * Return Value: * None * - * Example: - * [bob, true, "id", SIDE] call ace_common_fnc_switchToGroupSide - * * Public: Yes */ #include "script_component.hpp" -params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", sideUnknown]]; +params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", side _unit]]; private _previousGroupsList = _unit getVariable [QGVAR(previousGroupSwitchTo), []]; diff --git a/addons/common/functions/fnc_syncedEvent.sqf b/addons/common/functions/fnc_syncedEvent.sqf index a6a7fb30e3..7b7a0094cf 100644 --- a/addons/common/functions/fnc_syncedEvent.sqf +++ b/addons/common/functions/fnc_syncedEvent.sqf @@ -10,9 +10,6 @@ * Return Value: * Boolean of success * - * Example: - * ["bob", [args], 5] call ace_common_fnc_syncedEvent - * * Public: No */ #include "script_component.hpp" @@ -20,7 +17,7 @@ params ["_name", "_args", ["_ttl", 0]]; if !([GVAR(syncedEvents), _name] call CBA_fnc_hashHasKey) exitWith { - ERROR_1("Synced event key [%1] not found (syncedEvent).", _name); + ACE_LOGERROR_1("Synced event key [%1] not found (syncedEvent).", _name); false }; diff --git a/addons/common/functions/fnc_syncedEventPFH.sqf b/addons/common/functions/fnc_syncedEventPFH.sqf index c35be73d5c..8fcd143536 100644 --- a/addons/common/functions/fnc_syncedEventPFH.sqf +++ b/addons/common/functions/fnc_syncedEventPFH.sqf @@ -1,5 +1,5 @@ /* - * Author: ACE-Team + * Author: ? * * ? * @@ -7,12 +7,9 @@ * ? * * Return Value: - * None + * ? * - * Example: - * [?] call ace_common_fnc_syncedEventPFH - * - * Public: No + * Public: ? */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_targetEvent.sqf b/addons/common/functions/fnc_targetEvent.sqf new file mode 100644 index 0000000000..8cce931547 --- /dev/null +++ b/addons/common/functions/fnc_targetEvent.sqf @@ -0,0 +1,13 @@ +#include "script_component.hpp" + +params ["_eventName", "_eventTargets", "_eventArgs"]; + +private _newName = getText (configFile >> "ACE_newEvents" >> _eventName); +if (_newName != "") then { + TRACE_2("Switching Names",_eventName,_newName); + _eventName = _newName; +}; + +[_eventName,_eventArgs,_eventTargets] call CBA_fnc_targetEvent; + +ACE_DEPRECATED("ace_common_fnc_targetEvent","3.8.0","CBA_fnc_targetEvent"); diff --git a/addons/common/functions/fnc_throttledPublicVariable.sqf b/addons/common/functions/fnc_throttledPublicVariable.sqf index 7d86a75a29..3aaa3c8f47 100644 --- a/addons/common/functions/fnc_throttledPublicVariable.sqf +++ b/addons/common/functions/fnc_throttledPublicVariable.sqf @@ -27,7 +27,7 @@ if (isNil QGVAR(publishSchedId)) then { GVAR(publishSchedId) = [{ if (diag_tickTime > GVAR(publishNextTime)) then { { - _x params ["_unit", "_varName"]; + _x params [_unit, _varName]; _unit setVariable [_varName, _unit getVariable _varName, true]; false } count GVAR(publishVarNames); diff --git a/addons/common/functions/fnc_toBin.sqf b/addons/common/functions/fnc_toBin.sqf index f3e08711a7..f8ec0bac68 100644 --- a/addons/common/functions/fnc_toBin.sqf +++ b/addons/common/functions/fnc_toBin.sqf @@ -8,9 +8,6 @@ * Return Value: * A binary number as string * - * Example: - * [5] call ace_common_fnc_toBin - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_toBitmask.sqf b/addons/common/functions/fnc_toBitmask.sqf index ac5b7f056e..333e5c737b 100644 --- a/addons/common/functions/fnc_toBitmask.sqf +++ b/addons/common/functions/fnc_toBitmask.sqf @@ -8,9 +8,6 @@ * Return Value: * Bitmask * - * Example: - * [[true, false]] call ace_common_fnc_toBitmask - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_toHex.sqf b/addons/common/functions/fnc_toHex.sqf index 2c82c1c4a3..c558aab04b 100644 --- a/addons/common/functions/fnc_toHex.sqf +++ b/addons/common/functions/fnc_toHex.sqf @@ -8,9 +8,6 @@ * Return Value: * A hexadecimal number as string * - * Example: - * [154] call ace_common_fnc_toHex - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_toNumber.sqf b/addons/common/functions/fnc_toNumber.sqf index eeede0813b..c375dfb02e 100644 --- a/addons/common/functions/fnc_toNumber.sqf +++ b/addons/common/functions/fnc_toNumber.sqf @@ -6,7 +6,7 @@ * 0: Value to attempt to convert to number or if number simply return number. * * Return Value: - * Number + * * * Example: * number = ["102"] call ace_common_fnc_toNumber; diff --git a/addons/common/functions/fnc_translateToModelSpace.sqf b/addons/common/functions/fnc_translateToModelSpace.sqf index 0d7a5551fc..309387086f 100644 --- a/addons/common/functions/fnc_translateToModelSpace.sqf +++ b/addons/common/functions/fnc_translateToModelSpace.sqf @@ -1,17 +1,14 @@ /* - * Author: ACE-Team + * Author: ? * ? * * Arguments: - * + * ? * * Return Value: - * Something + * ? * - * Example: - * [UNKNOWN] call ace_common_fnc_translateToModelSpace - * - * Public: No + * Public: ? */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_translateToWeaponSpace.sqf b/addons/common/functions/fnc_translateToWeaponSpace.sqf index af3abddb74..fab3fe6a3c 100644 --- a/addons/common/functions/fnc_translateToWeaponSpace.sqf +++ b/addons/common/functions/fnc_translateToWeaponSpace.sqf @@ -1,17 +1,14 @@ /* - * Author: ACE-Team + * Author: ? * ? * * Arguments: - * + * ? * * Return Value: - * Unknown + * ? * - * Example: - * [UNKOWN] call ace_common_fnc_translateToWeaponSpace - * - * Public: No + * Public: ? */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_uniqueElements.sqf b/addons/common/functions/fnc_uniqueElements.sqf index 62a68a71ff..471ba47457 100644 --- a/addons/common/functions/fnc_uniqueElements.sqf +++ b/addons/common/functions/fnc_uniqueElements.sqf @@ -8,9 +8,6 @@ * Return Value: * Copy of original array * - * Example: - * [[array]] call ace_common_fnc_uniqueElements - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf index ed5b8dc020..2939edad18 100644 --- a/addons/common/functions/fnc_unloadPersonLocal.sqf +++ b/addons/common/functions/fnc_unloadPersonLocal.sqf @@ -10,9 +10,6 @@ * Return Value: * Returns true if succesfully unloaded person * - * Example: - * [bob, car, bob] call ace_common_fnc_unloadpersonLocal - * * Public: No */ #include "script_component.hpp" @@ -27,7 +24,7 @@ private _emptyPos = [_vehicle, (typeOf _unit), _unloader] call EFUNC(common,find TRACE_1("findUnloadPosition",_emptyPos); 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); + ACE_LOGWARNING_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 [QGVAR(displayTextStructured), [localize LSTRING(NoRoomToUnload)], [_unloader]] call CBA_fnc_targetEvent; diff --git a/addons/common/functions/fnc_unmuteUnit.sqf b/addons/common/functions/fnc_unmuteUnit.sqf index 7d81ae7346..b6d673cfd5 100644 --- a/addons/common/functions/fnc_unmuteUnit.sqf +++ b/addons/common/functions/fnc_unmuteUnit.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, "because"] call ace_common_fnc_unmuteUnit - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_useItem.sqf b/addons/common/functions/fnc_useItem.sqf index 3accecc429..2d2116b38f 100644 --- a/addons/common/functions/fnc_useItem.sqf +++ b/addons/common/functions/fnc_useItem.sqf @@ -9,9 +9,6 @@ * Return Value: * if item has been used. * - * Example: - * [bob, "gun"] call ace_common_fnc_useItem - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_useMagazine.sqf b/addons/common/functions/fnc_useMagazine.sqf index 646d461d21..4dc6136fa6 100644 --- a/addons/common/functions/fnc_useMagazine.sqf +++ b/addons/common/functions/fnc_useMagazine.sqf @@ -9,9 +9,6 @@ * Return Value: * if magazine has been used. * - * Example: - * [bob, "magazine"] call ace_common_fnc_useMagazine - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/common/functions/fnc_waitAndExecute.sqf b/addons/common/functions/fnc_waitAndExecute.sqf new file mode 100644 index 0000000000..1ac0d3f54d --- /dev/null +++ b/addons/common/functions/fnc_waitAndExecute.sqf @@ -0,0 +1,22 @@ +/* + * Author: esteldunedain + * Executes a code once with a given game time delay, using a PFH + * + * Arguments: + * 0: Code to execute + * 1: Parameters to run the code with + * 2: Delay in seconds before executing the code + * + * Return Value: + * None + * + * Example: + * [{(_this select 0) setVelocity [0,0,200];}, [player], 10] call ace_common_fnc_waitAndExecute + * + * Public: Yes + */ +#include "script_component.hpp" + +ACE_DEPRECATED("ace_common_fnc_waitAndExecute","3.8.0","CBA_fnc_waitAndExecute"); + +_this call CBA_fnc_waitAndExecute; diff --git a/addons/common/functions/fnc_waitUntilAndExecute.sqf b/addons/common/functions/fnc_waitUntilAndExecute.sqf new file mode 100644 index 0000000000..52c596c70a --- /dev/null +++ b/addons/common/functions/fnc_waitUntilAndExecute.sqf @@ -0,0 +1,24 @@ +/* + * Author: joko // Jonas + * Executes a code once with after the Condition is True, using a PFH + * + * Arguments: + * 0: Condition + * 1: Code to execute + * 2: Parameters to run the code with + * + * Return Value: + * None + * + * Example: + * [{(_this select 0) == vehicle (_this select 0)}, {(_this select 0) setDamage 1;}, [ACE_player]] call ace_common_fnc_waitUntilAndExecute + * + * Public: No + */ +#include "script_component.hpp" + +ACE_DEPRECATED("ace_common_fnc_waitUntilAndExecute","3.8.0","CBA_fnc_waitUntilAndExecute"); + +_this call CBA_fnc_waitUntilAndExecute; + +nil diff --git a/addons/common/functions/fnc_watchVariable.sqf b/addons/common/functions/fnc_watchVariable.sqf deleted file mode 100644 index 300a5ef195..0000000000 --- a/addons/common/functions/fnc_watchVariable.sqf +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Author: PabstMirror - * Shows multiple watched variables on the main display (for easy debugging) - * - * Arguments: - * 0: Title (var name) - * 1: Code to generate result (passed nothing, can return any) - * 2: Array containing modifiers - * For Numbers: - * 0: Show Delta change (default: true) - * 1: Slider Min Value (default: 0) - * 1: Slider Max Value (default: 0) - * For Anything else: - * 0: Number of structured text lines (default: 1) - * - * Return Value: - * None - * - * Example: - * ["CBA_missionTime"] call ace_common_fnc_watchVariable; // Uses title as code - * ["diag_frameNo", {diag_frameNo}, [false]] call ace_common_fnc_watchVariable; // Won't show delta - * ["blood", {player getVariable "ace_medical_bloodVolume"}, [true, 0, 100]] call ace_common_fnc_watchVariable; // Shows slider - * ["multiLine text", {"Line 1
Line 2"}, [2]] call ace_common_fnc_watchVariable; - * ["player names", {allPlayers apply {name _x}}, [5]] call ace_common_fnc_watchVariable; // handles any data types - * - * Public: Yes - */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - -#define TEXT_HEIGHT 16 - -params [["_name", "", [""]],["_code", {}, [{}]], ["_mods", [], [[]]]]; -TRACE_3("params",_name,_code,_mods); - -if (!hasInterface) exitWith {}; - -if (canSuspend) exitWith { // Ensure atomic - (fix `disableSerialization` error when called from init.sqf) - [FUNC(watchVariable), _this] call CBA_fnc_directCall; -}; - -if (isNull (findDisplay 46)) exitWith { - TRACE_1("waiting for main display to be ready",isNull (findDisplay 46)); - [{!isNull (findDisplay 46)}, {_this call FUNC(watchVariable);}, _this] call CBA_fnc_waitUntilAndExecute; -}; - -if (_code isEqualTo {}) then {TRACE_1("using title as code",_title); _code = compile _name;}; - -private _trackedDisplay = uiNamespace getVariable [QGVAR(watchVariableUI), displayNull]; -if (isNull _trackedDisplay) then { - TRACE_1("creating display and adding PFEH",time); - QGVAR(watchVariableUI) cutRsc [QGVAR(watchVariableUI), "PLAIN", 1, true]; - - [{ - private _trackedDisplay = uiNamespace getVariable [QGVAR(watchVariableUI), displayNull]; - private _varArray = _trackedDisplay getVariable [QGVAR(vars), []]; - TRACE_1("updating watched variables",count _varArray); - { - _x params ["_ctrlGroup", "_code", "_showDelta", "_lastNumber", "_barMin", "_barMax"]; - private _result = [] call _code; - if (isNil "_result") then { - (_ctrlGroup controlsGroupCtrl 1) ctrlSetStructuredText parseText format ["NIL"]; - } else { - if (_result isEqualType 0) then { - (_ctrlGroup controlsGroupCtrl 2) progressSetPosition linearConversion [_barMin, _barMax, _result, 0, 1, true]; - if (_showDelta) then { - private _delta = _result - _lastNumber; - _x set [3, _result]; - if (_delta < 0) then { - (_ctrlGroup controlsGroupCtrl 1) ctrlSetStructuredText parseText format ["%1 (%2)", _result, _delta]; - } else { - (_ctrlGroup controlsGroupCtrl 1) ctrlSetStructuredText parseText format ["%1 (%2)", _result, _delta]; - }; - } else { - (_ctrlGroup controlsGroupCtrl 1) ctrlSetStructuredText parseText format ["%1", _result]; - }; - } else { - (_ctrlGroup controlsGroupCtrl 1) ctrlSetStructuredText parseText format ["%1", _result]; - }; - }; - } forEach _varArray; - }, 1, []] call CBA_fnc_addPerFrameHandler; -}; - -// Add curent call: - -private _trackedDisplay = uiNamespace getVariable [QGVAR(watchVariableUI), displayNull]; -private _varArray = _trackedDisplay getVariable [QGVAR(vars), []]; -private _freePositionY = _trackedDisplay getVariable [QGVAR(freePosition), safeZoneY + 100 * pixelH]; - -private _height = 2 * TEXT_HEIGHT * pixelH; - -private _ctrlGroup = _trackedDisplay ctrlCreate ["ctrlControlsGroupNoScrollbars", -1]; - -private _ctrlBackground = (_trackedDisplay ctrlCreate ["ctrlStaticBackground", -1, _ctrlGroup]); -_ctrlBackground ctrlSetBackgroundColor [0.2, 0.2, 0.2, 0.5]; - -private _ctrlTitle = (_trackedDisplay ctrlCreate ["ctrlStatic", -1, _ctrlGroup]); -_ctrlTitle ctrlSetFontHeight (TEXT_HEIGHT * pixelH); -_ctrlTitle ctrlSetFont "EtelkaMonospacePro"; -_ctrlTitle ctrlSetPosition [0, 0, 300 * pixelW, TEXT_HEIGHT * pixelW]; -_ctrlTitle ctrlCommit 0; -_ctrlTitle ctrlSetText _name; - -if ((_mods param [0, true, [0, false]]) isEqualType false) then { - _mods params [["_showDelta", true, [false]], ["_barMin", 0, [0]], ["_barMax", 0, [0]]]; - TRACE_3("adding number",_barMin,_barMax,_showDelta); - - if (_barMin != _barMax) then { - TRACE_2("creating bar",_barMin,_barMax); - private _ctrlSlider = _trackedDisplay ctrlCreate ["RscProgress", 2, _ctrlGroup]; - _ctrlSlider ctrlSetPosition [0 * pixelW, TEXT_HEIGHT * pixelH, 300 * pixelW, TEXT_HEIGHT * pixelH]; - _ctrlSlider ctrlSetFade 0.25; - _ctrlSlider ctrlSetTextColor [0, 0, 0.2, 1]; - _ctrlSlider ctrlCommit 0; - }; - - private _ctrlResultText = _trackedDisplay ctrlCreate [QGVAR(debug_structuredText), 1, _ctrlGroup]; - _ctrlResultText ctrlSetPosition [25 * pixelW, TEXT_HEIGHT * pixelH, 275 * pixelW, TEXT_HEIGHT * pixelH]; - _ctrlResultText ctrlCommit 0; - - _varArray pushBack [_ctrlGroup, _code, _showDelta, 0, _barMin, _barMax]; - -} else { - _mods params [["_lines", 1, [1]]]; - _lines = _lines max 1; - TRACE_1("adding text",_lines); - - private _ctrlResultText = _trackedDisplay ctrlCreate [QGVAR(debug_structuredText), 1, _ctrlGroup]; - _ctrlResultText ctrlSetPosition [25 * pixelW, TEXT_HEIGHT * pixelH, 275 * pixelW, _lines * TEXT_HEIGHT * pixelH]; - _ctrlResultText ctrlCommit 0; - - _height = (1 + _lines) * TEXT_HEIGHT * pixelH; - - _varArray pushBack [_ctrlGroup, _code, false, -1, 0, 0]; -}; - -_trackedDisplay setVariable [QGVAR(vars), _varArray]; - -_ctrlGroup ctrlSetPosition [safeZoneX, _freePositionY, 300 * pixelW, _height]; -_ctrlGroup ctrlCommit 0; -_ctrlBackground ctrlSetPosition [0, 0, 300 * pixelW, _height]; -_ctrlBackground ctrlCommit 0; - - -_freePositionY = _freePositionY + _height + 5 * pixelH; -_trackedDisplay setVariable [QGVAR(freePosition), _freePositionY]; - -nil diff --git a/addons/common/functions/fnc_waveHeightAt.sqf b/addons/common/functions/fnc_waveHeightAt.sqf index 1a9049b491..c140b1ce94 100644 --- a/addons/common/functions/fnc_waveHeightAt.sqf +++ b/addons/common/functions/fnc_waveHeightAt.sqf @@ -3,13 +3,11 @@ * Gets the wave height at a specific location. Uses a logic, so may be performance iffy * * Arguments: - * 0: Position ASL to get height at + * 0: Position ASL to get height at * * Return Value: - * Wave height in meters + * Wave height in meters * - * Example: - * [[5, 2, 5]]] call ace_common_fnc_waveHeightAt * * Public: No */ diff --git a/addons/common/functions/fnc_worldToScreenBounds.sqf b/addons/common/functions/fnc_worldToScreenBounds.sqf index 42ffa27317..65b0164ca0 100644 --- a/addons/common/functions/fnc_worldToScreenBounds.sqf +++ b/addons/common/functions/fnc_worldToScreenBounds.sqf @@ -19,9 +19,6 @@ * 2: Maximal X * 3: Maximal Y * - * Example: - * [bob, [5, 5, 5], [6, 6, 6]] call ace_common_fnc_worldToScreenBounds - * * Public: No */ #include "script_component.hpp" @@ -41,13 +38,13 @@ _bounds params ["_boundsMin", "_boundsMax"]; _boundsMin params ["_boundsMinX", "_boundsMinY", "_boundsMinZ"]; _boundsMax params ["_boundsMaxX", "_boundsMaxY", "_boundsMaxZ"]; -_boundsMinX = ((_boundsMinX - _marginsX) min 0) + _offsetsX; -_boundsMinY = ((_boundsMinY - _marginsY) min 0) + _offsetsY; -_boundsMinZ = ((_boundsMinZ - _marginsZ) min 0) + _offsetsZ; +_boundsMinX = _boundsMinX - _marginsX + _offsetsX; +_boundsMinY = _boundsMinY - _marginsY + _offsetsY; +_boundsMinZ = _boundsMinZ - _marginsZ + _offsetsZ; -_boundsMaxX = ((_boundsMaxX + _marginsX) max 0) + _offsetsX; -_boundsMaxY = ((_boundsMaxY + _marginsY) max 0) + _offsetsY; -_boundsMaxZ = ((_boundsMaxZ + _marginsZ) max 0) + _offsetsZ; +_boundsMaxX = _boundsMaxX + _marginsX + _offsetsX; +_boundsMaxY = _boundsMaxY + _marginsY + _offsetsY; +_boundsMaxZ = _boundsMaxZ + _marginsZ + _offsetsZ; private _boundsCorners = [ [_boundsMinX, _boundsMinY, _boundsMinZ], diff --git a/addons/common/functions/script_component.hpp b/addons/common/functions/script_component.hpp index 6a1bf9154d..bb0d2d5dff 100644 --- a/addons/common/functions/script_component.hpp +++ b/addons/common/functions/script_component.hpp @@ -1 +1,13 @@ #include "\z\ace\addons\common\script_component.hpp" + +#define VALIDHASH(hash) (IS_ARRAY(hash) && {(count hash) >= 2} && {IS_ARRAY(hash select 0)} && {IS_ARRAY(hash select 1)}) +#define ERROR(msg) throw msg + format[" @ %1:%2", _callFrom, _lineNo] +#define HANDLECATCH diag_log text _exception; assert(exception=="") + +#define ERRORDATA(c) private ["_callFrom", "_lineNo"];\ + _callFrom = "";\ + _lineNo = -1;\ + if((count _this) > c) then {\ + _callFrom = _this select c;\ + _lineNo = _this select c+1;\ + }; diff --git a/addons/common/init_handleScrollWheel.sqf b/addons/common/init_handleScrollWheel.sqf new file mode 100644 index 0000000000..0acb84a5f2 --- /dev/null +++ b/addons/common/init_handleScrollWheel.sqf @@ -0,0 +1,19 @@ +/* + * Author: commy2 + * Initializes the MouseZChanged eventhandler. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public : No + */ +#include "script_component.hpp" + +disableSerialization; + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", QUOTE(_this call FUNC(handleScrollWheel))]; diff --git a/addons/common/script_component.hpp b/addons/common/script_component.hpp index 66f7ac63bf..f5dec2fd55 100644 --- a/addons/common/script_component.hpp +++ b/addons/common/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_COMMON @@ -19,16 +20,3 @@ #define VERSION_CONFIG_COMMON VERSION_CONFIG;\ versionDesc = "ACE 3";\ versionAct = QUOTE(call COMPILE_FILE(init_versionTooltip)) - - -#define DIG_SURFACE_BLACKLIST [ \ - "concrete", "concrete_exp", "concrete_int", "int_concrete", "int_concrete_exp", \ - "pavement_exp", "int_pavement_exp", \ - "tiling", "tiles_int", "int_tiles", \ - "roof_tin", "roof_tiles", "rooftiles_exp", \ - "tarmac", "asphalt_exp", \ - "stones_exp", "rock", "stony", \ - "metal", "gridmetal_exp", "metalplate_exp", "int_metalplate_exp", "metal_int", "wavymetal", "wavymetal_exp", "int_metal", "steel_exp", \ - "lino_exp", "int_lino_exp", "int_mat_exp", \ - "wood", "wood_int", "int_wood", "softwood_exp", "int_softwood_exp", "int_solidwood_exp" \ -] diff --git a/addons/common/scripts/checkVersionNumber.sqf b/addons/common/scripts/checkVersionNumber.sqf index f407ed57b0..6267ed08b2 100644 --- a/addons/common/scripts/checkVersionNumber.sqf +++ b/addons/common/scripts/checkVersionNumber.sqf @@ -74,7 +74,7 @@ if (!isServer) then { } forEach _files; // display and log error messages - private _fnc_cutComma = { + _fnc_cutComma = { _string = _this; _string = toArray _string; diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 94c723567f..1b988ca488 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ ACE-Team ACE-Team ACE-Team - ACE-Team - ACE-Team - ACE-製作團隊 - ACE-制作团队 Save @@ -28,10 +24,6 @@ Salvar Mentés Salva - 保存 - 저장 - 儲存 - 储存 Cancel @@ -44,10 +36,6 @@ Cancelar Mégse Annulla - 中止 - 취소 - 取消 - 取消 ACE Options @@ -60,10 +48,6 @@ Opções do ACE ACE Beállítások Opzioni ACE - ACE オプション - ACE 옵션 - ACE設定選項 - ACE设定选项 @@ -77,10 +61,6 @@ N É N - - - - NNE @@ -93,10 +73,6 @@ NNE ÉÉK NNE - 北北東 - 북북동 - 北北東 - 北北东 NE @@ -109,10 +85,6 @@ NE ÉK NE - 北東 - 북동 - 東北 - 东北 ENE @@ -125,10 +97,6 @@ LNE KÉK ENE - 東北東 - 동북동 - 東北東 - 东北东 E @@ -141,10 +109,6 @@ L K E - - - - ESE @@ -157,10 +121,6 @@ LSE KDK ESE - 東南東 - 동남동 - 東南東 - 东南东 SE @@ -173,10 +133,6 @@ SE DK SE - 南東 - 남동 - 東南 - 东南 SSE @@ -189,10 +145,6 @@ SSE DDK SSE - 南南東 - 남남동 - 南南東 - 南南东 S @@ -205,10 +157,6 @@ S D S - - - - SSW @@ -221,10 +169,6 @@ SSO DDNy SSO - 南南西 - 남남서 - 南南西 - 南南西 SW @@ -237,10 +181,6 @@ SO DNy SO - 南西 - 남서 - 西南 - 西南 WSW @@ -253,10 +193,6 @@ OSO NyDNy OSO - 西南西 - 서남서 - 西南西 - 西南西 W @@ -269,10 +205,6 @@ O Ny O - 西 - - 西 - 西 WNW @@ -285,10 +217,6 @@ ONO NyÉNy ONO - 北北西 - 서북서 - 西北西 - 西北西 NW @@ -301,10 +229,6 @@ NO ÉNy NO - 北西 - 북서 - 西北 - 西北 NNW @@ -317,10 +241,6 @@ NNO ÉÉNy NNO - 北北西 - 북북서 - 北北西 - 北北西 Action cancelled. @@ -333,10 +253,6 @@ Ação cancelada. Művelet megszakítva. Azione cancellata. - 動作を中止した。 - 행동 취소됨. - 動作已被取消 - 动作已被取消 [ACE] Miscellaneous Items @@ -349,10 +265,6 @@ [ACE] Itens diversos [ACE] Egyéb tárgyak [ACE] Oggetti vari - [ACE] その他のアイテム - [ACE] 기타 물품. - [ACE] 雜項 - [ACE] 杂项 Disable Command Menu @@ -365,10 +277,6 @@ Parancsnoki menü kikapcsolása Disabilita menù di comando Desabilitar menu de comando - 指揮メニューを無効化 - 지휘 메뉴 종료 - 關閉命令選單 - 关闭命令选单 Unknown @@ -381,10 +289,6 @@ Sconosciuto Inconnu Desconhecido - 不明 - 알 수 없음 - 未知的 - 未知的 No Voice @@ -397,10 +301,6 @@ Senza voce Pas de voix Sem voz - 音声なし - 무음 - 沒聲音 - 没声音 Accept Requests @@ -413,10 +313,6 @@ Kérések elfogadása Aceitar Pedido Accetta la richiesta - 要求を受け入れ - 요청 수락 - 接受請求 - 接受请求 Decline Requests @@ -429,10 +325,6 @@ Kérések elutasítása Rejeitar pedido Rifiuta la richiesta - 要求を拒否 - 요청 거부 - 拒絕請求 - 拒绝请求 Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions. @@ -445,10 +337,6 @@ Accepter les requêtes d'autres joueurs. Comme l'utilisation / l'échange d'équipement, la réalisation d'actions. Más játékosok általi kérések elfogadása. Ezek a kérések vonatkozhatnak a felszerelés használatára/megosztására, valamint különböző cselekményekre. Aceitar pedidos enviados por outros jogadores. Podem ser pedidos para usar/ compartilhar equipamento, realizar certas ações. - 他プレイヤからの要求を許可します。他プレイヤは装備を共有し、使うなど特定の動作を行えます。 - 다른 플레이어가 보내온 요청을 수락합니다. 이것은 장비 사용 / 공유 요청, 특정 작업 수행 등이 될 수 있습니다. - 接受由其他玩家送出的請求. 包含使用/共享裝備與執行特定動作 - 接受由其他玩家送出的请求. 包含使用/共享装备与执行特定动作 Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions. @@ -461,10 +349,6 @@ Rejeter les requêtes d'autres joueurs. Comme l'utilisation / l'échange d'équipement, la réalisation d'actions. Más játékosok általi kérések elutasítása. Ezek a kérések vonatkozhatnak a felszerelés használatára/megosztására, valamint különböző cselekményekre. Rejeita pedidos enviados por outros jogadores. Podem ser pedidos para usar/ compartilhar equipamento, realizar certas ações. - 他プレイヤからの要求を拒否します。他プレイヤは装備を共有し、使うなど特定の動作をできません。 - 다른 플레이어가 보내온 요청을 거부합니다. 이것은 장비 사용 / 공유 요청, 특정 작업 수행 등이 될 수 있습니다. - 拒絕由其他玩家送出的請求. 包含使用/共享裝備與執行特定動作 - 拒绝由其他玩家送出的请求. 包含使用/共享装备与执行特定动作 Feedback icons @@ -477,10 +361,6 @@ Pomocné ikony Visszajelző ikonok Ícones de Feedback - フィードバック アイコン - 피드백 아이콘 - 回饋圖標 - 回馈图标 Select the position of or disable the feedback icons on your screen. These icons will show to provide extra feedback on your character status and actions performed. @@ -493,10 +373,6 @@ Nastavuje pozici nebo vypíná pomocné ikony. Tyto ikony ukazují extra informace ke stavu postavy a vykonávaných činností. Itt beállítható a visszajelző ikonok képernyőn lévő helyzete és jelenléte. Ezek az ikonok extra visszajelzést biztosítanak a karaktered állapotán és végrehajtott cselekvésein. Selecione a posição ou disabilite a posição dos ícones de feedback na sua tela. Esses ícones irão aparecer para mostrar feedback extra do status do seu personagem e ações realizadas. - 画面上に表示するフィードバック アイコンの位置や無効化を選択できます。このアイコンは自キャラクター状態や動作の状況をフィードバックするために表示されています。 - 피드백 아이콘의 위치를 설정하거나 비활성화합니다. 피드백 아이콘은 캐릭터의 상세정보와 행동을 보여줍니다. - 選擇位置或取消回饋圖標顯示在螢幕上. 這些圖標將顯示出你角色額外的狀態與行動等資訊. - 选择位置或取消回馈图标显示在荧幕上. 这些图标将显示出你角色额外的状态与行动等资讯. Progress bar location @@ -509,10 +385,6 @@ Pozice ukazetele průběhu činnosti Állapotjelző sáv helyzete Local da barra de progresso - プログレス バーの位置 - 진행 막대의 위치 - 進度欄位置 - 进度栏位置 Set the desired location of the progress bar on your screen. @@ -525,10 +397,6 @@ Nastavuje pozici ukazetele průběhu činnosti na vaší obrazovce. Itt beállítható az állapotjelző sáv képernyődön lévő helyzete. Define o local desejado da barra de progresso na sua tela. - 画面上に表示されるプログレス バーの位置を設定できます。 - 진행 막대를 원하는 곳에 배치합니다. - 設定進度欄在畫面中的位置 - 设定进度栏在画面中的位置 Hint Background color @@ -541,10 +409,6 @@ Barva pozadí nápovědy Súgó háttérszíne Cor do fundo da hint - ヒントの背景色 - 힌트 배경색 - 提示的背景顏色 - 提示的背景颜色 The color of the background from the ACE hints. @@ -557,10 +421,6 @@ Barva pozadí ACE nápovědy. Az ACE-súgók hátterének színe. A cor de fundo das hints do ACE. - ACE によるヒントの背景色を指定します。 - ACE힌트의 배경색을 정합니다. - 設定ACE提示的背景顏色. - 设定ACE提示的背景颜色. Hint text font color @@ -573,10 +433,6 @@ Barva fontu nápovědy. Súgószöveg betűinek színe Cor do do texto da hint - ヒント文章の色 - 힌트 글씨색 - 提示文字的顏色 - 提示文字的颜色 The color of the text font from the ACE hints. This color is the default color for all text displayed through the ACE Hint system, if the hint text has no other color specified. @@ -589,10 +445,6 @@ Barva fontu ACE nápověd. Toto je standardní barva pro všechen text zobrazovaný ACE nápovědami, pokud nemá nápověda žádnou specifikanou barvu. Az ACE-súgók betűkészletének színek. Ez a szín alapértelmezett az összes szövegre az ACE-súgórendszerben, ha a súgószöveg maga nem ad meg más színt. A cor do texto das hints do ACE. Essa cor é a cor default para todos os texos exibidos pelo sistema de hints do ACE , caso o texto da hint não tem outra cor especificada. - ACE によるヒントの文章へ、色を設定できます。この色は ACE ヒント システムを介して表示される全文章の色と標準でなっており、特定の色を設定していても、標準色になります。 - ACE 힌트에 쓰이는 글씨 색입니다. 힌트 글씨의 색이 정해지지 않을경우 모든 힌트의 색은 기본으로 설정됩니다. - 設定ACE提示文字的顏色. 若提示字體並無指定其他顏色, 將會自動選用ACE系統的預設顏色 - 设定ACE提示文字的颜色. 若提示字体并无指定其他颜色, 将会自动选用ACE系统的预设颜色 Banana @@ -605,10 +457,6 @@ Banane Banán Banana - 甘蕉 - 바나나 - 香蕉 - 香蕉 A banana is an edible fruit, botanically a berry, produced by several kinds of large herbaceous flowering plants in the genus Musa. @@ -621,10 +469,6 @@ Rodzaj roślin z rodziny bananowatych, obejmujący około 80 gatunków.<br />Przedstawiciele są typowymi przedstawicielami flory międzyzwrotnikowej Azji, Afryki i Australii.<br />Część gatunków dostarcza jadalnych owoców. Słowo banan pochodzi prawdopodobnie od arabskiego słowa banan, co oznacza palec, lub afrykańskiego języka wolof, w którym rośliny te określa się mianem banaana. Une banane est un fruit qui, d'un point de vue botanique, fait partie du groupe des baies. Produite par plusieurs sortes de grandes plantes à fleurs herbacées du type Musa. A banana é uma fruta comestível, botanicamente uma baga, produzida por vários tipos de plantas herbáceas grandes do genero Musa. - 甘蕉は食べられる果物でバショウ科バショウ属のうち、果実を食用とする品種群の総称。また、その果実のこと。いくつかの原種から育種された多年草。種によっては熟すまでは毒を持つものもある。 - 바나나는 식용 과일로써 식물학적으로 열매류이며 여러 종류의 개화가능한 초본의 파초과로 부터 생산됩니다. - 香蕉(學名: Musa × paradisiaca), 為芭蕉科芭蕉屬小果野蕉及野蕉的人工栽培雜交種, 為多年生草本植物. 果實長有棱; 果皮黃色, 果肉白色, 味道香甜. 主要生長在熱帶、亞熱帶地區. 原產於亞洲東南部熱帶、亞熱帶地區. - 香蕉(学名: Musa × paradisiaca), 为芭蕉科芭蕉属小果野蕉及野蕉的人工栽培杂交种, 为多年生草本植物. 果实长有棱; 果皮黄色, 果肉白色, 味道香甜. 主要生长在热带、亚热带地区. 原产于亚洲东南部热带、亚热带地区. Check PBOs @@ -637,10 +481,6 @@ PBO-k ellenőrzése Проверка аддонов Controlla PBO - PBO を検査 - PBO 검사 - 檢查PBO檔 - 检查PBO档 Check addon integrity with server and do selected action if an addon is missing. @@ -652,10 +492,6 @@ Выполняет проверку версий аддонов ACE у подключаемых игроков Ce module contrôle si les PBOs de chaque joueur sont corrects Controlla l'integrità degli addon con il server ed esegui l'azione selezionata se un addon è mancante - サーバがアドオンの整合性を検査し、もし不備があれば実行する動作を選択できます。 - 서버 에드온의 무결성을 검사하고 사라진 에드온이 있을경우 행동을 선택합니다. - 檢查客戶端與伺服器端的模組清單是否一致且完整, 並提供訊息表示遺失的模組. - 检查客户端与伺服器端的模组清单是否一致且完整, 并提供讯息表示遗失的模组. Action @@ -668,10 +504,6 @@ Cselekvés Действие Azione - 動作 - 작동 - 動作 - 动作 What to do with people who do not have the right PBOs? @@ -684,10 +516,6 @@ Mi legyen azokkal a személyekkel, akiknek nincsenek meg a helyes PBO-k? Что делать с игроками с неправильными аддонами? Cosa fare con giocatori che non hanno i PBO corretti? - プレイヤーが正しい PBO を持っていない場合は? - 올바르지 않는 PBO를 가진 사람을 어떻게 할까요? - 若玩家沒有正確的PBO檔時, 將採取何種動作? - 若玩家没有正确的PBO档时, 将采取何种动作? Warn once @@ -700,10 +528,6 @@ Egyszeri figyelmeztetés Предупредить один раз Avverti una volta - 一度の警告 - 경고 한 번 - 警告 (一次) - 警告 (一次) Warn (permanent) @@ -716,10 +540,6 @@ Figyelmeztetés (tartós) Предупреждать (постоянно) Avverti (permanente) - 警告(永久的) - 경고 (영구적) - 警告 (持續) - 警告 (持续) Kick @@ -732,10 +552,6 @@ Kirúgás Кикнуть Kick - 排除 - 추방 - 踢除 - 踢除 Check all addons @@ -748,10 +564,6 @@ Összes bővítmény ellenőrzése Проверять все аддоны Controlla tutti gli addon - 全アドオンを検査 - 모든 에드온 검사 - 檢查所有模組 - 检查所有模组 Check all addons instead of only those of ACE? @@ -764,10 +576,6 @@ Az összes bővítmény ellenőrzése, csak az ACE helyett? Проверять все аддоны, а не только ACE? Controlla tutti gli addon invece dei soli addon ACE? - ACE MOD の代わりに全アドオンを検査しますか? - ACE를 제외한 모든 모드를 검사할까요? - 檢查包含ACE之外的其他模組? - 检查包含ACE之外的其他模组? Whitelist @@ -780,10 +588,6 @@ Fehérlista Вайтлист доп. аддонов Lista Bianca - 許可制 - 화이트리스트 - 白名單 - 白名单 What addons are allowed regardless? @@ -796,10 +600,6 @@ Milyen bővítmények vannak feltétlenül engedélyezve? Какие аддоны дополнительно разрешены? Quali addon sono permessi in ogni caso? - どのようなアドオンを許可しますか? - 허가되는 에드온은 어느것입니까? - 哪些模組是可被允許/忽略的? - 哪些模组是可被允许/忽略的? LSD Vehicles @@ -812,10 +612,6 @@ LSD járművek Транспорт под LSD Veicoli LSD - LSD 車両 - LSD 차량 - 迷幻載具 - 迷幻载具 Adds LSD effect to synchronized vehicle @@ -828,10 +624,6 @@ LSD-effekt hozzáadása a szinkronizált járművekhez Добавляет эффект LSD (мигание всеми цветами радуги) синхронизированным транспортным средствам Aggiunge effetti LSD ai veicoli sincronizzati - 同期されたオブジェクトに LSD の効果を追加します - 동기화된 차량에 LSD효과를 추가합니다. - 使被同步的載具產生瘋狂的迷幻效果. (後果自負) - 使被同步的载具产生疯狂的迷幻效果. (后果自负) Toggle Handheld Device @@ -844,10 +636,6 @@ Kézi eszköz kapcsolása Включить портативное устройство Apri dispositivo palmare - デバイスを常に表示 - 휴대장치 토글 - 切換手持裝備 - 切换手持装备 Close Handheld Device @@ -860,10 +648,6 @@ Kézi eszköz bezárása Закрыть портативное устройство Chiudi dispositivo palmare - デバイスを閉じる - 휴대장치 닫기 - 關閉手持裝備 - 关闭手持装备 Cycle Handheld Devices @@ -876,10 +660,6 @@ Kézi eszköz váltása Следующее портативное устройство Cicla tra dispositivi palmari - 表示するデバイスを変える - 휴대장치 순환 - 循環切換手持裝備 - 循环切换手持装备 Disabled @@ -891,10 +671,6 @@ Desativado Откл. Desactivado - 無効化 - 비활성화 - 停用 - 停用 Enabled @@ -906,10 +682,6 @@ Ativado Вкл. Activado - 有効化 - 활성화 - 啟用 - 启用 Yes @@ -922,10 +694,6 @@ Igen Sim Si - はい - - - No @@ -938,10 +706,6 @@ Nem Não No - いいえ - 아니오 - - Vehicles only @@ -953,10 +717,6 @@ Solo vehículos Solo veicoli Vehicules seulement - 車両のみ - 차량 전용 - 只有載具 - 只有载具 Do Not Force @@ -968,10 +728,6 @@ Не обязывать Non forzare Ne pas forcer - 強制しない - 강제하지 말것 - 不要強行 - 不要强行 ACE3 Equipment @@ -983,10 +739,6 @@ ACE3 Equipo Equipaggiamento ACE3 ACE3 Equipement - ACE3 装備 - ACE3 장비 - ACE3 裝備按鍵 - ACE3 装备按键 ACE3 Common @@ -998,10 +750,6 @@ ACE3 Obecné Comune ACE3 ACE3 Commun - ACE3 全般 - ACE3 일반 - ACE3 通用按鍵 - ACE3 通用按键 ACE3 Weapons @@ -1013,10 +761,6 @@ ACE3 Armas Armi ACE3 ACE3 Armes - ACE3 武器 - ACE3 무기 - ACE3 武器按鍵 - ACE3 武器按键 ACE3 Movement @@ -1028,10 +772,6 @@ ACE3 Pohyb Movimento ACE3 ACE3 Mouvement - ACE3 移動 - ACE3 움직임 - ACE3 動作按鍵 - ACE3 动作按键 ACE3 Scope Adjustment @@ -1043,10 +783,6 @@ ACE3 Ajuste de miras Regolazione Ottiche ACE3 ACE3 Ajustement de la lunette - ACE3 スコープ調節 - ACE3 조준경 조정 - ACE3 瞄準鏡調節按鍵 - ACE3 瞄准镜调节按键 ACE3 Vehicles @@ -1058,10 +794,6 @@ ACE3 Vehículos Veicoli ACE3 ACE3 Vehicules - ACE3 車両 - ACE3 차량 - ACE3 載具按鍵 - ACE3 载具按键 No Room to unload @@ -1073,25 +805,6 @@ Nedostatek místa k vyložení Sem espaço para descarregar Нет места для выгрузки - 降ろすための空間がありません - 沒有空間可卸載 - 没有空间可卸载 - - - Toggle - переключить - переключить - Basculer - Cambiar - Cambia - Umschalten - pecek - přep. - alternar - トグル - 토글 - 切換 - 切换 - + \ No newline at end of file diff --git a/addons/concertina_wire/XEH_init.sqf b/addons/concertina_wire/XEH_init.sqf index b24353b4df..dc6424f172 100644 --- a/addons/concertina_wire/XEH_init.sqf +++ b/addons/concertina_wire/XEH_init.sqf @@ -1,3 +1,3 @@ #include "script_component.hpp" params ["_wire"]; -_wire addEventHandler ["HandleDamage", {call FUNC(handleDamage)}]; +_wire addEventHandler ["HandleDamage", FUNC(handleDamage)]; diff --git a/addons/concertina_wire/XEH_preInit.sqf b/addons/concertina_wire/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/concertina_wire/XEH_preInit.sqf +++ b/addons/concertina_wire/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/concertina_wire/config.cpp b/addons/concertina_wire/config.cpp index 438822a93b..326c1cd0ea 100644 --- a/addons/concertina_wire/config.cpp +++ b/addons/concertina_wire/config.cpp @@ -16,3 +16,7 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" + +class ACE_newEvents { + interactMenuOpened = "ace_interactMenuOpened"; +}; diff --git a/addons/concertina_wire/functions/fnc_deploy.sqf b/addons/concertina_wire/functions/fnc_deploy.sqf index 6dc05b365d..67b3584de2 100644 --- a/addons/concertina_wire/functions/fnc_deploy.sqf +++ b/addons/concertina_wire/functions/fnc_deploy.sqf @@ -10,14 +10,11 @@ * Return Value: * None * - * Example: - * [coil, bob] call ace_concertina_wire_fnc_deploy - * * Public: No */ #include "script_component.hpp" -params ["_wirecoil", "_unit"]; +PARAMS_2(_wirecoil,_unit); private _wireNoGeo = "ACE_ConcertinaWireNoGeo" createVehicle [0,0,0]; { diff --git a/addons/concertina_wire/functions/fnc_dismount.sqf b/addons/concertina_wire/functions/fnc_dismount.sqf index ef32431292..9dcd50cc4a 100644 --- a/addons/concertina_wire/functions/fnc_dismount.sqf +++ b/addons/concertina_wire/functions/fnc_dismount.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [wire, bob] call ace_concertina_wire_fnc_dismount - * * Public: No */ #include "script_component.hpp" @@ -26,7 +23,7 @@ if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exit params ["_wire", "_unit"]; private _config = (configFile >> "CfgVehicles" >> typeOf _unit); -private _delay = [45, 30] select ([_unit] call EFUNC(common,isEngineer) || {[_unit] call EFUNC(common,isEOD)}); +private _delay = [120, 60] select (getNumber (_config >> "engineer") == 1 || {getNumber (_config >> "canDeactivateMines") == 1}); // TODO: Animation? [ diff --git a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf index d730fbb4b6..a3f5081271 100644 --- a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf +++ b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf @@ -9,14 +9,11 @@ * Return Value: * None * - * Example: - * [wire] call ace_concertina_wire_fnc_dismountSuccess - * * Public: No */ #include "script_component.hpp" -params ["_wire"]; +PARAMS_1(_wire); { _wire animate [_x, 1]; diff --git a/addons/concertina_wire/functions/fnc_handleDamage.sqf b/addons/concertina_wire/functions/fnc_handleDamage.sqf index d4f2555546..43a04641dd 100644 --- a/addons/concertina_wire/functions/fnc_handleDamage.sqf +++ b/addons/concertina_wire/functions/fnc_handleDamage.sqf @@ -13,9 +13,6 @@ * Return Value: * None * - * Example: - * [wire, "selection", 5, source, "scrap"] call ace_concertina_wire_fnc_handleDamage - * * Public: No */ #include "script_component.hpp" diff --git a/addons/concertina_wire/functions/fnc_handleKilled.sqf b/addons/concertina_wire/functions/fnc_handleKilled.sqf index 6649f5c3b6..7fb5ef6e1b 100644 --- a/addons/concertina_wire/functions/fnc_handleKilled.sqf +++ b/addons/concertina_wire/functions/fnc_handleKilled.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [wire, car] call ace_concertina_wire_fnc_handleKilled - * * Public: No */ #include "script_component.hpp" diff --git a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf index 7d84d4b244..e5732f7000 100644 --- a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf +++ b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [wire, car] call ace_concertina_wire_fnc_vehicleDamage - * * Public: No */ #include "script_component.hpp" diff --git a/addons/concertina_wire/script_component.hpp b/addons/concertina_wire/script_component.hpp index 81da52dd2a..38af41b899 100644 --- a/addons/concertina_wire/script_component.hpp +++ b/addons/concertina_wire/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_CONCERTINA_WIRE diff --git a/addons/concertina_wire/stringtable.xml b/addons/concertina_wire/stringtable.xml index 6c510c56b7..616879f31e 100644 --- a/addons/concertina_wire/stringtable.xml +++ b/addons/concertina_wire/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Filo spinato di concertina Concertina wire Arame farpado - 鉄条網 - 철조망 - 鐵絲網 - 铁丝网 Concertina Wire Coil @@ -28,10 +24,6 @@ Bobina di concertina Concertina wire coil Bobina de arame farpado - 鉄条網コイル - 윤형 철조망 - 鐵絲網捲 - 铁丝网卷 Dismount Concertina Wire @@ -44,10 +36,6 @@ Smonta la concertina Dismount Concertina wire Desmontar arame farpado - 鉄条網をほどく - 철조망 해체 - 卸下鐵絲網 - 卸下铁丝网 Deploy Concertina Wire @@ -60,10 +48,6 @@ Posa il filo di concertina Deploy Concertina wire Colocar arame farpado - 鉄条網を置く - 철조망 배치 - 佈署鐵絲網 - 布署铁丝网 - + \ No newline at end of file diff --git a/addons/cookoff/ACE_Settings.hpp b/addons/cookoff/ACE_Settings.hpp index 13ef915ffb..df96613ee0 100644 --- a/addons/cookoff/ACE_Settings.hpp +++ b/addons/cookoff/ACE_Settings.hpp @@ -6,22 +6,4 @@ class ACE_Settings { value = 1; typeName = "BOOL"; }; - class GVAR(enableAmmobox) { - displayName = CSTRING(enableBoxCookoff_name); - description = CSTRING(enableBoxCookoff_tooltip); - value = 1; - typeName = "BOOL"; - }; - class GVAR(enableAmmoCookoff) { // For CBA Setting Switch: we can eliminate and just use (ammoCookoffDuration == 0) - displayName = CSTRING(enableAmmoCookoff_name); - description = CSTRING(enableAmmoCookoff_tooltip); - value = 1; - typeName = "BOOL"; - }; - class GVAR(ammoCookoffDuration) { - displayName = CSTRING(ammoCookoffDuration_name); - description = CSTRING(ammoCookoffDuration_tooltip); - value = 1; - typeName = "SCALAR"; - }; }; diff --git a/addons/cookoff/CfgAmmo.hpp b/addons/cookoff/CfgAmmo.hpp deleted file mode 100644 index 952ec22322..0000000000 --- a/addons/cookoff/CfgAmmo.hpp +++ /dev/null @@ -1,33 +0,0 @@ -class CfgAmmo { - class ShellBase; - class ace_ammoExplosion: ShellBase { - hit = 10; - indirectHit = 0.5; - indirectHitRange = 1; - soundHit[] = {"", 1, 1, 0}; - typicalSpeed = 100; - explosive = 0; - cost = 300; - model = "\A3\Weapons_F\empty.p3d"; - airFriction = 0; - timeToLive = 1; - explosionTime = 0.001; - soundFly[] = {"",1,1}; - soundEngine[] = {"",1,4}; - explosionEffects = "ExploAmmoExplosion"; - }; - - class SmallSecondary; - class ACE_ammoExplosionLarge: SmallSecondary { - soundHit[] = {"", 1, 1, 0}; - model = "\A3\Weapons_F\empty.p3d"; - soundFly[] = {"",1,1}; - soundEngine[] = {"",1,4}; - soundHit1[] = {"",1,1,1}; - soundHit2[] = {"",1,1,1}; - soundHit3[] = {"",1,1,1}; - supersonicCrackFar[] = {"",1,1,1}; - supersonicCrackNear[] = {"",1,1,1}; - craterEffects = "ImpactEffectsMedium"; - }; -}; diff --git a/addons/cookoff/CfgCloudlets.hpp b/addons/cookoff/CfgCloudlets.hpp index c167177705..9b262c75c1 100644 --- a/addons/cookoff/CfgCloudlets.hpp +++ b/addons/cookoff/CfgCloudlets.hpp @@ -52,30 +52,3 @@ class CfgCloudlets { destroyOnWaterSurfaceOffset = 0; }; }; - -class GVAR(ExploAmmoExplosion) { - class ExploAmmoFlash { - position[] = {0,0,0}; - simulation = "particles"; - type = "ExploAmmoFlash"; - intensity = 1; - interval = 1; - lifeTime = 1; - }; - class LightExplosion { - simulation = "light"; - type = "SparksLight"; - position[] = {0,0,0}; - intensity = 1; - interval = 1; - lifeTime = 0.15; - }; - class ExploAmmoSmoke { - position[] = {0,0,0}; - simulation = "particles"; - type = "AutoCannonFired"; - intensity = 1.5; - interval = 1.5; - lifeTime = 1.5; - }; -}; diff --git a/addons/cookoff/CfgEden.hpp b/addons/cookoff/CfgEden.hpp deleted file mode 100644 index aa550a9228..0000000000 --- a/addons/cookoff/CfgEden.hpp +++ /dev/null @@ -1,21 +0,0 @@ - -class Cfg3DEN { - class Object { - class AttributeCategories { - class ace_attributes { - class Attributes { - class GVAR(enable) { - property = QGVAR(enable); - control = "Checkbox"; - displayName = CSTRING(enable_name); - tooltip = CSTRING(enable_tooltip); - expression = QUOTE(if !(_value) then {_this setVariable [ARR_3('%s',_value,true)];};); - typeName = "BOOL"; - condition = "objectHasInventoryCargo"; - defaultValue = "(true)"; // fix pbo project preprocessing bug - }; - }; - }; - }; - }; -}; diff --git a/addons/cookoff/CfgSFX.hpp b/addons/cookoff/CfgSFX.hpp index 0d670ead86..0e10644729 100644 --- a/addons/cookoff/CfgSFX.hpp +++ b/addons/cookoff/CfgSFX.hpp @@ -1,18 +1,9 @@ class CfgSFX { - class GVAR(CookOff_low) { - name = QGVAR(cookoff_low); - sound[] = {QPATHTOF(sounds\cookoff_low_pressure.ogg),6,1,400,1,0,0,0}; - sounds[] = {"sound"}; - titles[] = {}; + class GVAR(CookOff) { + name = QGVAR(cookoff); + sounds[] = {QGVAR(cookoff)}; + GVAR(cookoff)[] = {PATHTOF(sounds\cookoff.wss),6,1.8,400,1,0,0,0}; empty[] = {"",0,0,0,0,0,0,0}; }; - class GVAR(CookOff_mid): GVAR(CookOff_low) { - name = QGVAR(cookoff_mid); - sound[] = {QPATHTOF(sounds\cookoff_mid_pressure.ogg),6,1,400,1,0,0,0}; - }; - class GVAR(CookOff_high): GVAR(CookOff_low) { - name = QGVAR(cookoff_high); - sound[] = {QPATHTOF(sounds\cookoff_high_pressure.ogg),6,1,400,1,0,0,0}; - }; }; diff --git a/addons/cookoff/CfgVehicles.hpp b/addons/cookoff/CfgVehicles.hpp index 7d82d97c12..845eb55d94 100644 --- a/addons/cookoff/CfgVehicles.hpp +++ b/addons/cookoff/CfgVehicles.hpp @@ -1,50 +1,43 @@ class CfgVehicles { class Sound; - class GVAR(Sound_low): Sound { + class GVAR(Sound): Sound { author = ECSTRING(common,ACETeam); _generalMacro = QGVAR(Sound); scope = 1; - sound = QGVAR(CookOff_low); - }; - - class GVAR(Sound_mid): GVAR(Sound_low) { - sound = QGVAR(CookOff_mid); - }; - class GVAR(Sound_high): GVAR(Sound_low) { - sound = QGVAR(CookOff_high); + sound = QGVAR(CookOff); }; class ThingX; class GVAR(Turret_MBT_01): ThingX { author = ECSTRING(common,ACETeam); - _generalMacro = QGVAR(Turret_MBT_01); + _generalMacro = QGVAR(TurretDummy); scope = 1; - displayName = CSTRING(generic_turret_wreck); model = "\A3\Structures_F\Wrecks\Wreck_Slammer_turret_F.p3d"; - icon = "\A3\armor_f_gamma\MBT_01\Data\ui\map_slammer_mk4_ca.paa"; }; class GVAR(Turret_MBT_02): ThingX { author = ECSTRING(common,ACETeam); - _generalMacro = QGVAR(Turret_MBT_02); + _generalMacro = QGVAR(TurretDummy); scope = 1; - displayName = CSTRING(generic_turret_wreck); model = "\A3\Structures_F\Wrecks\Wreck_T72_turret_F.p3d"; - icon = "\A3\armor_f_gamma\MBT_02\Data\UI\map_MBT_02_ca.paa"; }; class Tank; class Tank_F: Tank { - GVAR(ammoLocation) = "HitHull"; + GVAR(ammoLocation) = "HitTurret"; GVAR(cookoffSelections)[] = {"poklop_gunner","poklop_commander"}; }; - class MBT_02_base_F: Tank_F { - GVAR(ammoLocation) = "HitTurret"; + + class MBT_01_base_F: Tank_F { + GVAR(ammoLocation) = "HitHull"; + }; + class APC_Tracked_01_base_F: Tank_F { + GVAR(ammoLocation) = "HitHull"; }; class Car_F; class Wheeled_APC_F: Car_F { - GVAR(ammoLocation) = "HitHull"; + GVAR(ammoLocation) = "HitTurret"; GVAR(cookoffSelections)[] = {"poklop_gunner","poklop_commander"}; // big explosions for wheeled APCs (same as for tanks) @@ -60,20 +53,4 @@ class CfgVehicles { class O_MBT_02_cannon_F: O_MBT_02_base_F { GVAR(turret)[] = {QGVAR(Turret_MBT_02),{0,-1,0}}; }; - - class MRAP_01_base_F: Car_F { - GVAR(engineSmokeOffset)[] = {0,-2,0}; - }; - - class MRAP_02_base_F: Car_F { - GVAR(engineSmokeOffset)[] = {0,-2,0}; - }; - - class MRAP_03_base_F: Car_F { - GVAR(engineSmokeOffset)[] = {0,-2,0}; - }; - - class Quadbike_01_base_F: Car_F { - GVAR(engineSmokeOffset)[] = {0,1,0}; - }; }; diff --git a/addons/cookoff/XEH_PREP.hpp b/addons/cookoff/XEH_PREP.hpp index f1deb8eaed..5b744f9221 100644 --- a/addons/cookoff/XEH_PREP.hpp +++ b/addons/cookoff/XEH_PREP.hpp @@ -2,7 +2,5 @@ PREP(handleDamage); PREP(engineFire); PREP(cookOff); -PREP(cookOffBox); PREP(blowOffTurret); -PREP(detonateAmmunition); -PREP(getVehicleAmmo); +PREP(secondaryExplosions); diff --git a/addons/cookoff/XEH_postInit.sqf b/addons/cookoff/XEH_postInit.sqf index b7bed03475..411f9d5a78 100644 --- a/addons/cookoff/XEH_postInit.sqf +++ b/addons/cookoff/XEH_postInit.sqf @@ -2,109 +2,58 @@ [QGVAR(engineFire), FUNC(engineFire)] call CBA_fnc_addEventHandler; [QGVAR(cookOff), FUNC(cookOff)] call CBA_fnc_addEventHandler; -[QGVAR(cookOffBox), FUNC(cookOffBox)] call CBA_fnc_addEventHandler; GVAR(cacheTankDuplicates) = call CBA_fnc_createNamespace; // cookoff and burning engine ["Tank", "init", { params ["_vehicle"]; - private _typeOf = typeOf _vehicle; - if (isNil {GVAR(cacheTankDuplicates) getVariable _typeOf}) then { private _hitpoints = (getAllHitPointsDamage _vehicle param [0, []]) apply {toLower _x}; private _duplicateHitpoints = []; - { if ((_x != "") && {_x in (_hitpoints select [0,_forEachIndex])}) then { _duplicateHitpoints pushBack _forEachIndex; }; } forEach _hitpoints; - TRACE_2("dupes",_typeOf,_duplicateHitpoints); GVAR(cacheTankDuplicates) setVariable [_typeOf, _duplicateHitpoints]; }; _vehicle addEventHandler ["HandleDamage", { - if ((_this select 0) getVariable [QGVAR(enable), GVAR(enable)]) then { + if (GVAR(enable)) then { ["tank", _this] call FUNC(handleDamage); }; }]; }, nil, nil, true] call CBA_fnc_addClassEventHandler; ["Wheeled_APC_F", "init", { - params ["_vehicle"]; - - private _typeOf = typeOf _vehicle; - - if (isNil {GVAR(cacheTankDuplicates) getVariable _typeOf}) then { - private _hitpoints = (getAllHitPointsDamage _vehicle param [0, []]) apply {toLower _x}; - private _duplicateHitpoints = []; - - { - if ((_x != "") && {_x in (_hitpoints select [0,_forEachIndex])}) then { - _duplicateHitpoints pushBack _forEachIndex; - }; - } forEach _hitpoints; - - TRACE_2("dupes",_typeOf,_duplicateHitpoints); - GVAR(cacheTankDuplicates) setVariable [_typeOf, _duplicateHitpoints]; - }; - - _vehicle addEventHandler ["HandleDamage", { - if ((_this select 0) getVariable [QGVAR(enable), GVAR(enable)]) then { + (_this select 0) addEventHandler ["HandleDamage", { + if (GVAR(enable)) then { ["tank", _this] call FUNC(handleDamage); }; }]; }, nil, nil, true] call CBA_fnc_addClassEventHandler; ["Car", "init", { - params ["_vehicle"]; - - _vehicle addEventHandler ["HandleDamage", { - if ((_this select 0) getVariable [QGVAR(enable), GVAR(enable)]) then { + (_this select 0) addEventHandler ["HandleDamage", { + if (GVAR(enable)) then { ["car", _this] call FUNC(handleDamage); }; }]; }, nil, ["Wheeled_APC_F"], true] call CBA_fnc_addClassEventHandler; -["ReammoBox_F", "init", { - (_this select 0) addEventHandler ["HandleDamage", { - if ((_this select 0) getVariable [QGVAR(enable), GVAR(enableAmmobox)]) then { - ["box", _this] call FUNC(handleDamage); - }; - }]; -}, nil, nil, true] call CBA_fnc_addClassEventHandler; - // secondary explosions ["AllVehicles", "killed", { - params ["_vehicle"]; - if (_vehicle getVariable [QGVAR(enableAmmoCookoff), GVAR(enableAmmoCookoff)]) then { - if (GVAR(ammoCookoffDuration) == 0) exitWith {}; - ([_vehicle] call FUNC(getVehicleAmmo)) params ["_mags", "_total"]; - [_vehicle, _mags, _total] call FUNC(detonateAmmunition); + if (GVAR(enable)) then { + (_this select 0) call FUNC(secondaryExplosions); }; -}, nil, ["Man","StaticWeapon"]] call CBA_fnc_addClassEventHandler; +}, nil, ["Man"]] call CBA_fnc_addClassEventHandler; // blow off turret effect ["Tank", "killed", { - if ((_this select 0) getVariable [QGVAR(enable),GVAR(enable)]) then { - if (random 1 < 0.15) then { - (_this select 0) call FUNC(blowOffTurret); - }; + if (GVAR(enable)) then { + (_this select 0) call FUNC(blowOffTurret); }; }] call CBA_fnc_addClassEventHandler; - -// event to add a turret to a curator if the vehicle already belonged to that curator -if (isServer) then { - [QGVAR(addTurretToEditable), { - params ["_vehicle", "_turret"]; - - { - if (_vehicle in curatorEditableObjects _x) then { - _x addCuratorEditableObjects [[_turret], false]; - }; - } forEach allCurators; - }] call CBA_fnc_addEventHandler; -}; diff --git a/addons/cookoff/XEH_preInit.sqf b/addons/cookoff/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/cookoff/XEH_preInit.sqf +++ b/addons/cookoff/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/cookoff/config.cpp b/addons/cookoff/config.cpp index 0673efaffe..902f02740d 100644 --- a/addons/cookoff/config.cpp +++ b/addons/cookoff/config.cpp @@ -8,17 +8,15 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; author = ECSTRING(common,ACETeam); - authors[] = {"commy2", "Glowbal"}; + authors[] = {"commy2"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; }; #include "ACE_Settings.hpp" -#include "CfgEden.hpp" #include "CfgEventHandlers.hpp" -#include "CfgAmmo.hpp" #include "CfgCloudlets.hpp" #include "CfgSFX.hpp" #include "CfgVehicles.hpp" diff --git a/addons/cookoff/functions/fnc_blowOffTurret.sqf b/addons/cookoff/functions/fnc_blowOffTurret.sqf index fed5afc188..1ff505f7ef 100644 --- a/addons/cookoff/functions/fnc_blowOffTurret.sqf +++ b/addons/cookoff/functions/fnc_blowOffTurret.sqf @@ -30,7 +30,4 @@ _turret setVectorUp [random 1, random 1, 1]; _turret setVelocity [random 7, random 7, 8 + random 5]; - - // add turret to all curators that already own the wreck - [QGVAR(addTurretToEditable), [_vehicle, _turret]] call CBA_fnc_serverEvent; }, _this, 1] call CBA_fnc_waitAndExecute; diff --git a/addons/cookoff/functions/fnc_cookOff.sqf b/addons/cookoff/functions/fnc_cookOff.sqf index 8154217e9d..a9984235dd 100644 --- a/addons/cookoff/functions/fnc_cookOff.sqf +++ b/addons/cookoff/functions/fnc_cookOff.sqf @@ -9,7 +9,7 @@ * None * * Example: - * [(vehicle player)] call ace_cookoff_fnc_cookOff + * (vehicle player) call ace_cookoff_fnc_cookOff * * Public: No */ @@ -20,9 +20,7 @@ params ["_vehicle"]; if (_vehicle getVariable [QGVAR(isCookingOff), false]) exitWith {}; _vehicle setVariable [QGVAR(isCookingOff), true]; -if (local _vehicle) then { - [QGVAR(cookOff), _vehicle] call CBA_fnc_remoteEvent; -}; +[QGVAR(cookOff), _vehicle] call CBA_fnc_remoteEvent; [{ params ["_vehicle"]; @@ -31,7 +29,7 @@ if (local _vehicle) then { private _positions = getArray (_config >> QGVAR(cookoffSelections)) select {!((_vehicle selectionPosition _x) isEqualTo [0,0,0])}; if (_positions isEqualTo []) then { - WARNING_1("no valid selection for cookoff found. %1", typeOf _vehicle); + ACE_LOGWARNING_1("no valid selection for cookoff found. %1", typeOf _vehicle); _positions pushBack "#noselection"; }; @@ -91,9 +89,7 @@ if (local _vehicle) then { } forEach _positions; if (isServer) then { - private _soundName = [QGVAR(Sound_low), 0.1, QGVAR(Sound_mid), 0.25, QGVAR(Sound_high), 0.65] call BIS_fnc_selectRandomWeighted; // TODO: replace with script Command in 1.74 - // TODO - Players in the vehicle hear no sound (even after exiting the vehicle) - private _sound = createSoundSource [_soundName, position _vehicle, [], 0]; + private _sound = createSoundSource [QGVAR(Sound), position _vehicle, [], 0]; _effects pushBack _sound; }; @@ -109,19 +105,15 @@ if (local _vehicle) then { DEC(_counter); if (_counter > 0) then { - [_fnc_FlameEffect, [_vehicle, _fnc_FlameEffect, _counter], FLAME_EFFECT_DELAY] call CBA_fnc_waitAndExecute + [_fnc_FlameEffect, [_vehicle, _fnc_FlameEffect, _counter], 0.4] call CBA_fnc_waitAndExecute }; }; - // Recursive function, occurs for duration of cookoff - [_vehicle, _fnc_FlameEffect, ceil(COOKOFF_TIME/FLAME_EFFECT_DELAY)] call _fnc_FlameEffect; - - private _randomPosition = _vehicle getPos [100, random 360]; + [_vehicle, _fnc_FlameEffect, 12] call _fnc_FlameEffect; // recursive function { if (local _x && {!(_x call EFUNC(common,isPlayer))}) then { - _x leaveVehicle _vehicle; - _x doMove _randomPosition; + _x action ["Eject", _vehicle]; }; } forEach crew _vehicle; @@ -135,6 +127,6 @@ if (local _vehicle) then { if (local _vehicle) then { _vehicle setDamage 1; }; - }, [_vehicle, _effects], COOKOFF_TIME] call CBA_fnc_waitAndExecute; // TODO: Randomise cook off time with locality in mind - }, [_vehicle, _effects, _positions], SMOKE_TIME] call CBA_fnc_waitAndExecute; -}, _vehicle, IGNITE_TIME] call CBA_fnc_waitAndExecute; + }, [_vehicle, _effects], 4 + random 1] call CBA_fnc_waitAndExecute; + }, [_vehicle, _effects, _positions], 3 + random 2] call CBA_fnc_waitAndExecute; +}, _vehicle, 0.5 + random 0.3] call CBA_fnc_waitAndExecute; diff --git a/addons/cookoff/functions/fnc_cookOffBox.sqf b/addons/cookoff/functions/fnc_cookOffBox.sqf deleted file mode 100644 index 4e509e3194..0000000000 --- a/addons/cookoff/functions/fnc_cookOffBox.sqf +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Author: KoffeinFlummi, commy2, SilentSpike - * Start a cook-off in the given ammo box. - * - * Arguments: - * 0: Ammo box - * - * Return Value: - * None - * - * Example: - * [_box] call ace_cookoff_fnc_cookOffBox - * - * Public: No - */ -#include "script_component.hpp" - -params ["_box"]; - -if (_box getVariable [QGVAR(isCookingOff), false]) exitWith {}; -_box setVariable [QGVAR(isCookingOff), true]; - -if (local _box) then { - [QGVAR(cookOffBox), _box] call CBA_fnc_remoteEvent; -}; - -[{ - params ["_box"]; - - // Box will start smoking - private _smoke = "#particlesource" createVehicleLocal [0,0,0]; - _smoke setParticleClass "AmmoSmokeParticles2"; - _smoke attachTo [_box, [0,0,0]]; - - private _effects = [_smoke]; - - if (isServer) then { - private _sound = createSoundSource ["Sound_Fire", position _box, [], 0]; - _effects pushBack _sound; - }; - - [{ - params ["_box", "_effects"]; - - // These functions are smart and do all the cooking off work - if (local _box) then { - if (_box getVariable [QGVAR(enableAmmoCookoff), GVAR(enableAmmoCookoff)]) then { - if (GVAR(ammoCookoffDuration) == 0) exitWith {}; - ([_box] call FUNC(getVehicleAmmo)) params ["_mags", "_total"]; - [_box, _mags, _total] call FUNC(detonateAmmunition); - }; - - // This shit is busy being on fire, magazines aren't accessible/usable - clearMagazineCargoGlobal _box; - }; - - // Light the fire (also handles lighting) - private _fire = "#particlesource" createVehicleLocal [0,0,0]; - _fire setParticleClass "AmmoBulletCore"; - _fire attachTo [_box, [0,0,0]]; - - _effects pushBack _fire; - - [{ - params ["_box", "_effects"]; - - { - deleteVehicle _x; - } forEach _effects; - - if (local _box) then { - _box setDamage 1; - }; - }, [_box, _effects], COOKOFF_TIME_BOX] call CBA_fnc_waitAndExecute; // TODO: Change so that box is alive until no ammo left, with locality in mind - }, [_box, _effects], SMOKE_TIME] call CBA_fnc_waitAndExecute; -}, _box, IGNITE_TIME] call CBA_fnc_waitAndExecute; diff --git a/addons/cookoff/functions/fnc_detonateAmmunition.sqf b/addons/cookoff/functions/fnc_detonateAmmunition.sqf deleted file mode 100644 index c5c0a64549..0000000000 --- a/addons/cookoff/functions/fnc_detonateAmmunition.sqf +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Author: Glowbal - * Detonates ammunition from a vehicle until no ammo left - * - * Arguments: - * 0: vehicle - * 1: Ammo Array - * 0: Magazine Classname - * 1: Ammo Count - * 2: Total Ammo Count - * - * Return Value: - * None - * - * Example: - * [_vehicle, magazinesAmmo _vehicle] call ace_cookoff_fnc_detonateAmmunition - * - * Public: No - */ -#include "script_component.hpp" -#define MAX_TIME_BETWEEN_AMMO_DET 25 - -params ["_vehicle", "_magazines", "_totalAmmo"]; - -if (isNull _vehicle) exitWith {}; // vehicle got deleted -if (_magazines isEqualTo []) exitWith {}; // nothing to detonate anymore -if (underwater _vehicle) exitWith {}; - -private _magazineIndex = floor random(count _magazines); -private _magazine = _magazines select _magazineIndex; -_magazine params ["_magazineClassname", "_amountOfMagazines"]; - -if (_amountOfMagazines > 0) exitWith { - private _removed = _amountOfMagazines min floor(1 + random(6 / GVAR(ammoCookoffDuration))); - - _amountOfMagazines = _amountOfMagazines - _removed; - if (_amountOfMagazines <= 0) then { - _magazines deleteAt _magazineIndex; - } else { - _magazine set [1, _amountOfMagazines]; // clear out the magazine - }; - private _timeBetweenAmmoDetonation = (((random 10) / (sqrt _totalAmmo)) min MAX_TIME_BETWEEN_AMMO_DET) max 0.1; - TRACE_2("",_totalAmmo,_timeBetweenAmmoDetonation); - _totalAmmo = _totalAmmo - _removed; - - private _ammo = getText (configFile >> "CfgMagazines" >> _magazineClassname >> "ammo"); - private _ammoCfg = configFile >> "CfgAmmo" >> _ammo; - - private _speedOfAmmo = getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "initSpeed"); - private _simType = getText (_ammoCfg >> "simulation"); - - private _effect2pos = _vehicle selectionPosition "destructionEffect2"; - - private _spawnProjectile = { - params ["_vehicle", "_ammo", "_speed", "_flyAway"]; - - private _spawnPos = _vehicle modelToWorld [-0.2 + (random 0.4), -0.2 + (random 0.4), random 3]; - if (_spawnPos select 2 < 0) then { - _spawnPos set [2, 0]; - }; - - private _projectile = createVehicle [_ammo, _spawnPos, [], 0, "CAN_COLLIDE"]; - if (_flyAway) then { - private _vectorAmmo = [(-1 + (random 2)), (-1 + (random 2)), -0.2 + (random 1)]; - private _velVec = _vectorAmmo vectorMultiply _speed; - _projectile setVectorDir _velVec; - _projectile setVelocity _velVec; - } else { - _projectile setDamage 1; - }; - - _projectile; - }; - - private _speed = random (_speedOfAmmo / 10) max 1; - - if (toLower _simType == "shotbullet") then { - private _sound = selectRandom [QUOTE(PATHTO_R(sounds\light_crack_close.wss)), QUOTE(PATHTO_R(sounds\light_crack_close_filtered.wss)), QUOTE(PATHTO_R(sounds\heavy_crack_close.wss)), QUOTE(PATHTO_R(sounds\heavy_crack_close_filtered.wss))]; - playSound3D [_sound, objNull, false, (getPosASL _vehicle), 2, 1, 1250]; - - if (random 1 < 0.6) then { - [_vehicle, _ammo, _speed, true] call _spawnProjectile; - }; - }; - if (toLower _simType == "shotshell") then { - private _sound = selectRandom [QUOTE(PATHTO_R(sounds\heavy_crack_close.wss)), QUOTE(PATHTO_R(sounds\heavy_crack_close_filtered.wss))]; - playSound3D [_sound, objNull, false, (getPosASL _vehicle), 2, 1, 1300]; - - if (random 1 < 0.15) then { - [_vehicle, _ammo, _speed, random 1 < 0.15] call _spawnProjectile; - }; - }; - if (toLower _simType == "shotgrenade") then { - if (random 1 < 0.9) then { - _speed = 0; - }; - [_vehicle, _ammo, _speed, random 1 < 0.5] call _spawnProjectile; - }; - if (toLower _simType in ["shotrocket", "shotmissile", "shotsubmunitions"]) then { - if (random 1 < 0.1) then { - private _sound = selectRandom [QUOTE(PATHTO_R(sounds\cannon_crack_close.wss)), QUOTE(PATHTO_R(sounds\cannon_crack_close_filtered.wss))]; - playSound3D [_sound, objNull, false, (getPosASL _vehicle), 3, 1, 1600]; - - [_vehicle, _ammo, _speed, random 1 < 0.3] call _spawnProjectile; - } else { - createvehicle ["ACE_ammoExplosionLarge", (_vehicle modelToWorld _effect2pos), [], 0 , "CAN_COLLIDE"]; - }; - }; - if (toLower _simType in ["shotdirectionalbomb", "shotmine"]) then { - if (random 1 < 0.5) then { - // Not all explosives detonate on destruction, some have scripted alternatives - private _scripted = getNumber (_ammoCfg >> "triggerWhenDestroyed") == 1; - if !(_scripted) then { - _ammo = getText (_ammoCfg >> "ace_explosives_Explosive"); - }; - - // If a scripted alternative doesn't exist use generic explosion - if (_ammo != "") then { - [_vehicle, _ammo, 0, false] call _spawnProjectile; - } else { - createvehicle ["SmallSecondary", (_vehicle modelToWorld _effect2pos), [], 0 , "CAN_COLLIDE"]; - }; - }; - }; - if (toLower _simType == "shotilluminating") then { - if (random 1 < 0.15) then { - [_vehicle, _ammo, _speed, random 1 < 0.3] call _spawnProjectile; - }; - }; - - [FUNC(detonateAmmunition), [_vehicle, _magazines, _totalAmmo], _timeBetweenAmmoDetonation] call CBA_fnc_waitAndExecute; -}; -ERROR_1("mag with no ammo - %1", _magazine); diff --git a/addons/cookoff/functions/fnc_engineFire.sqf b/addons/cookoff/functions/fnc_engineFire.sqf index 580bd5d54d..f9598fe7cf 100644 --- a/addons/cookoff/functions/fnc_engineFire.sqf +++ b/addons/cookoff/functions/fnc_engineFire.sqf @@ -24,17 +24,11 @@ if (local _vehicle) then { [QGVAR(engineFire), _vehicle] call CBA_fnc_remoteEvent; }; -private _offset = getArray (_vehicle call CBA_fnc_getObjectConfig >> QGVAR(engineSmokeOffset)); - -if (_offset isEqualTo []) then { - _offset = [0,0,0]; -}; - private _position = [ 0, - (boundingBoxReal _vehicle select 1 select 1) - 2, + (boundingBoxReal _vehicle select 1 select 1) - 4, (boundingBoxReal _vehicle select 0 select 2) + 2 -] vectorAdd _offset; +]; private _smoke = "#particlesource" createVehicleLocal [0,0,0]; _smoke setParticleClass "ObjectDestructionSmoke1_2Smallx"; diff --git a/addons/cookoff/functions/fnc_getVehicleAmmo.sqf b/addons/cookoff/functions/fnc_getVehicleAmmo.sqf deleted file mode 100644 index 67c7f6e56e..0000000000 --- a/addons/cookoff/functions/fnc_getVehicleAmmo.sqf +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Author: PabstMirror - * Gets all magazines inside of a vehicle. - * - * Arguments: - * 0: Vehicle - * - * Return Value: - * 0: Ammo Array - * 0: Magazine Classname - * 1: Ammo Count - * 1: Total Ammo Count - * - * Example: - * [vehicle player] call ace_cookoff_fnc_getVehicleAmmo - * - * Public: No - */ -#include "script_component.hpp" - -params ["_vehicle"]; -TRACE_1("getVehicleAmmo",_vehicle); - -private _ammoToDetonate = []; -private _totalAmmo = 0; - -// Get ammo from turrets -{ - _x params ["_mag", "", "_count"]; - if (_count > 0) then { - _ammoToDetonate pushBack [_mag, _count]; - _totalAmmo = _totalAmmo + _count; - }; -} forEach (magazinesAllTurrets _vehicle); - -// Get ammo from cargo space -{ - _x params ["_mag", "_count"]; - if (_count > 0) then { - _ammoToDetonate pushBack [_mag, _count]; - _totalAmmo = _totalAmmo + _count; - }; -} forEach (magazinesAmmoCargo _vehicle); - -// Get ammo from transportAmmo / ace_rearm -private _vehCfg = configFile >> "CfgVehicles" >> typeOf _vehicle; -if (((getNumber (_vehCfg >> "transportAmmo")) > 1000) || {isClass (_vehCfg >> "ACE_Actions" >> "ACE_MainActions" >> QEGVAR(rearm,TakeAmmo))}) then { - TRACE_1("transportAmmo vehicle - adding virtual ammo",typeOf _vehicle); - - _ammoToDetonate pushBack ["2000Rnd_65x39_belt", 2000]; - _totalAmmo = _totalAmmo + 2000; - _ammoToDetonate pushBack ["20Rnd_105mm_HEAT_MP", 100]; - _totalAmmo = _totalAmmo + 100; -}; - -[_ammoToDetonate, _totalAmmo] diff --git a/addons/cookoff/functions/fnc_handleDamage.sqf b/addons/cookoff/functions/fnc_handleDamage.sqf index f462cbf56c..2a0f2d54bc 100644 --- a/addons/cookoff/functions/fnc_handleDamage.sqf +++ b/addons/cookoff/functions/fnc_handleDamage.sqf @@ -3,10 +3,10 @@ * Handles all incoming damage for tanks (including wheeled APCs). * * Arguments: - * HandleDamage EH + * HandleDamage EH * * Return Value: - * Damage to be inflicted. + * Damage to be inflicted. * * Example: * _this call ace_cookoff_fnc_handleDamage @@ -16,7 +16,7 @@ #include "script_component.hpp" params ["_simulationType", "_thisHandleDamage"]; -_thisHandleDamage params ["_vehicle", "", "_damage", "_source", "_ammo", "_hitIndex", "_shooter"]; +_thisHandleDamage params ["_vehicle", "", "_damage", "", "_ammo", "_hitIndex"]; // it's already dead, who cares? if (damage _vehicle >= 1) exitWith {}; @@ -58,19 +58,19 @@ if (_simulationType == "car") exitWith { if (_simulationType == "tank") exitWith { // determine ammo storage location - private _ammoLocationHitpoint = getText (_vehicle call CBA_fnc_getObjectConfig >> QGVAR(ammoLocation)); + private _ammoLocationHitpoint = getText (_vehicle call CBA_fnc_getObjectConfig >> QGVAR(ammoLocation)); if (_hitIndex in (GVAR(cacheTankDuplicates) getVariable (typeOf _vehicle))) then { _hitpoint = "#subturret"; }; - + // ammo was hit, high chance for cook-off if (_hitpoint == _ammoLocationHitpoint) then { if (_damage > 0.5 && {random 1 < 0.7}) then { _vehicle call FUNC(cookOff); }; } else { - if (_hitpoint in ["hithull", "hitturret", "#structural"] && {_newDamage > 0.6 + random 0.3}) then { + if (_hitpoint in ["hitbody", "hitturret", "#structural"] && {_newDamage > 0.6 + random 0.3}) then { _vehicle call FUNC(cookOff); }; }; @@ -82,37 +82,3 @@ if (_simulationType == "tank") exitWith { _damage }; }; - -if (_simulationType == "box") exitWith { - if (_hitpoint == "#structural" && _damage > 0.5) then { - // Almost always catch fire when hit by an explosive - if (IS_EXPLOSIVE_AMMO(_ammo)) then { - _vehicle call FUNC(cookOffBox); - } else { - // Need magazine to check for tracers - private _mag = ""; - if (_source == _shooter) then { - _mag = currentMagazine _source; - } else { - _mag = _source currentMagazineTurret ([_shooter] call CBA_fnc_turretPath); - }; - private _magCfg = configFile >> "CfgMagazines" >> _mag; - - // Magazine could have changed during flight time (just ignore if so) - if (getText (_magCfg >> "ammo") == _ammo) then { - // If magazine's tracer density is high enough then low chance for cook off - private _tracers = getNumber (_magCfg >> "tracersEvery"); - if (_tracers >= 1 && {_tracers <= 4}) then { - if (random 1 < _oldDamage*0.05) then { - _vehicle call FUNC(cookOffBox); - }; - }; - }; - }; - - // prevent destruction, let cook-off handle it if necessary - _damage min 0.89 - } else { - _damage - }; -}; diff --git a/addons/cookoff/functions/fnc_secondaryExplosions.sqf b/addons/cookoff/functions/fnc_secondaryExplosions.sqf new file mode 100644 index 0000000000..01a2fa3b3f --- /dev/null +++ b/addons/cookoff/functions/fnc_secondaryExplosions.sqf @@ -0,0 +1,64 @@ +/* + * Author: Maddmatt, commy2 + * Generate an amount of secondary explosions + * + * Arguments: + * 0: Vehicle + * 1: Amount + * + * Return Value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +#define SECONDARIES_DELAY (1 + random 45) + +params ["_vehicle", "_amount"]; + +if (isNil "_amount") then { + // calculate amount of secondary explosions if not specified + _amount = 0; + + { + _x params ["_magazine", "_count"]; + + private _ammo = getText (_magazine call CBA_fnc_getItemConfig >> "ammo"); + + if (IS_EXPLOSIVE_AMMO(_ammo)) then { + if (_ammo isKindOf "ShellBase") then { + ADD(_amount,_count); + } else { + ADD(_amount,_count/50); + }; + }; + } forEach magazinesAmmo _vehicle; +}; + +if (_amount <= 0) exitWith {}; + +private _fnc_secondaryExplosion = { + params ["_vehicle", "_amount", "_fnc_secondaryExplosion"]; + + private _position = _vehicle modelToWorld (_vehicle selectionPosition "destructionEffect2"); + + // these CfgAmmo objects are always global + "SmallSecondary" createVehicle _position; + + DEC(_amount); + + if (!isNull _vehicle && {_amount > 0}) then { + [_fnc_secondaryExplosion, [_vehicle, _amount, _fnc_secondaryExplosion], SECONDARIES_DELAY] call CBA_fnc_waitAndExecute; + }; +}; + +[_fnc_secondaryExplosion, [_vehicle, _amount, _fnc_secondaryExplosion], SECONDARIES_DELAY] call CBA_fnc_waitAndExecute; + +nil + +/*SencondaryExplosion + SecondaryExp + SecondarySmoke + GrenadeExploLight +*/ diff --git a/addons/cookoff/script_component.hpp b/addons/cookoff/script_component.hpp index 5daa0e8330..91afa5df3c 100644 --- a/addons/cookoff/script_component.hpp +++ b/addons/cookoff/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_COOKOFF @@ -17,13 +18,3 @@ #include "\z\ace\addons\main\script_macros.hpp" #define IS_EXPLOSIVE_AMMO(ammo) (getNumber (ammo call CBA_fnc_getObjectConfig >> "explosive") > 0.5) - -// Stages of cookoff in order (in seconds) -// Should be no un-synced randomness in these as the effects must be ran on each client -#define IGNITE_TIME 3 -#define SMOKE_TIME 10.5 -#define COOKOFF_TIME 14 // Cook off time should be 20s at most due to length of sound files -#define COOKOFF_TIME_BOX 82.5 // Cook off time for boxes should be significant to allow time for ammo to burn - -// Delay between flame effect for players in a cooking off vehicle -#define FLAME_EFFECT_DELAY 0.4 diff --git a/addons/cookoff/sounds/cannon_crack_close.wss b/addons/cookoff/sounds/cannon_crack_close.wss deleted file mode 100644 index b45ea96ab0..0000000000 Binary files a/addons/cookoff/sounds/cannon_crack_close.wss and /dev/null differ diff --git a/addons/cookoff/sounds/cannon_crack_close_filtered.wss b/addons/cookoff/sounds/cannon_crack_close_filtered.wss deleted file mode 100644 index 4ddb18539b..0000000000 Binary files a/addons/cookoff/sounds/cannon_crack_close_filtered.wss and /dev/null differ diff --git a/addons/cookoff/sounds/cookoff.wss b/addons/cookoff/sounds/cookoff.wss new file mode 100644 index 0000000000..11b9d55194 Binary files /dev/null and b/addons/cookoff/sounds/cookoff.wss differ diff --git a/addons/cookoff/sounds/cookoff_high_pressure.ogg b/addons/cookoff/sounds/cookoff_high_pressure.ogg deleted file mode 100644 index ebcffaf9ce..0000000000 Binary files a/addons/cookoff/sounds/cookoff_high_pressure.ogg and /dev/null differ diff --git a/addons/cookoff/sounds/cookoff_low_pressure.ogg b/addons/cookoff/sounds/cookoff_low_pressure.ogg deleted file mode 100644 index 89439e21a7..0000000000 Binary files a/addons/cookoff/sounds/cookoff_low_pressure.ogg and /dev/null differ diff --git a/addons/cookoff/sounds/cookoff_mid_pressure.ogg b/addons/cookoff/sounds/cookoff_mid_pressure.ogg deleted file mode 100644 index b82cbcf4e1..0000000000 Binary files a/addons/cookoff/sounds/cookoff_mid_pressure.ogg and /dev/null differ diff --git a/addons/cookoff/sounds/heavy_crack_close.wss b/addons/cookoff/sounds/heavy_crack_close.wss deleted file mode 100644 index 95cc68d90e..0000000000 Binary files a/addons/cookoff/sounds/heavy_crack_close.wss and /dev/null differ diff --git a/addons/cookoff/sounds/heavy_crack_close_filtered.wss b/addons/cookoff/sounds/heavy_crack_close_filtered.wss deleted file mode 100644 index 1b4520cd4a..0000000000 Binary files a/addons/cookoff/sounds/heavy_crack_close_filtered.wss and /dev/null differ diff --git a/addons/cookoff/sounds/light_crack_close.wss b/addons/cookoff/sounds/light_crack_close.wss deleted file mode 100644 index ef284f24ef..0000000000 Binary files a/addons/cookoff/sounds/light_crack_close.wss and /dev/null differ diff --git a/addons/cookoff/sounds/light_crack_close_filtered.wss b/addons/cookoff/sounds/light_crack_close_filtered.wss deleted file mode 100644 index b1c76fa8ed..0000000000 Binary files a/addons/cookoff/sounds/light_crack_close_filtered.wss and /dev/null differ diff --git a/addons/cookoff/stringtable.xml b/addons/cookoff/stringtable.xml index c9c04f86dd..f4738765f9 100644 --- a/addons/cookoff/stringtable.xml +++ b/addons/cookoff/stringtable.xml @@ -1,108 +1,17 @@ - + Enable cook off - Selbstzündung ermöglichen + Cook-off ermöglichen Povolit explozi munice Включить воспламенение - 誘爆を有効化 - 쿡오프 현상 활성화 - Aktywuj efekty samozapłonu amunicji - Active le cook-off - Abilita Esplosione - 開啟殉爆效果 - 开启殉爆效果 Enables cook off and related vehicle destruction effects. - Ermöglicht Selbstzündung und zugehörige Fahrzeug-Zerstörungseffekte. + Ermöglicht Cook-off und zugehörige Fahrzeug-Zerstörungseffekte. Povolí explozi munice a její následné ničivé efekty. Включает воспламенение и сопутствующие эффекты повреждения техники. - 誘爆を有効化し、車両が誘爆によって破壊されていきます。 - 쿡오프 현상을 활성화 하고 관련된 차량에 폭발 이펙트를 적용합니다. - Aktywuje efekt samozapłonu amunicji na zniszczonych pojazdach. - Active le cook-off (autocombustion des munitions) et les effets de destruction liés. - Abilita l'esplosione e i relativi effetti di distruzione del veicolo. - 開啟此功能後, 將使有關載具在損毀時有殉爆的效果. - 开启此功能后, 将使有关载具在损毁时有殉爆的效果. - - - Wreck (Turret) - Épave (tourelle) - Restos (torreta) - Rottami (torretta) - Wrak (wieżyczka) - Обломки (башня) - Wrack (Geschützturm) - Vrak (věž) - Wreck (Turret) - Ruínas (torre) - 잔해(포탑) - 残骸(タレット) - 殘骸 (砲塔) - 残骸 (炮塔) - - - Enable ammo box cook off - 弾薬箱に誘爆を有効化 - Selbstzündung für Munitionskisten ermöglichen - 탄약 상자 쿡오프 현상 활성화 - Aktywuj samozapłon skrzyń z amunicją - Cook-off caisses de munitions - Abilita esplosione cassa munizioni - 開啟彈藥箱殉爆效果 - 开启弹药箱殉爆效果 - - - Enables cooking off of ammo boxes. - 弾薬箱が誘爆するようになります。 - Ermöglicht Selbstzündung von Munitionskisten. - 탄약 상자에 쿡오프 현상을 적용합니다. - Aktywuje samozapłon skrzyń z amunicją - Active le cook-off sur toutes les caisses de munitions. - Abilita l'esplosione della cassa di munizioni. - 開啟彈藥箱殉爆效果. - 开启弹药箱殉爆效果. - - - Enable Ammunition cook off - 弾薬の誘爆を有効化 - Selbstzündung für Munition ermöglichen - 탄약 쿡오프 현상 활성화 - Aktywuj samozapłon amunicji - Active le cook-off des munitions - Abilita Esplosione munizioni - 開啟彈藥殉爆效果 - 开启弹药殉爆效果 - - - Enables Ammunition cook off. Fires ammunition projectiles while vehicle is on fire and has ammunition. - 弾薬が誘爆します。車両が燃えると、搭載している弾薬が激しく燃え上がりす。 - Ermöglicht Selbstzündung von Munition. Feuert Projektile der Munition ab, solange das Fahrzeug brennt und Munition besitzt. - Aktywuje samozapłon amunicji. Wystrzeliwuje pociski podczas gdy pojazd płonie i posiada amunicję. - Mets à feu les munitions lorsqu'un véhicule est en feu et contient des munitions. - Abilita l'esplosione delle munizioni. Spara munizioni di proiettili quando il veicolo va a fuoco e contiene munizioni. - 開啟彈藥殉爆效果. 當一台載有彈藥的載具起火時, 將會有殉爆的效果. - 开启弹药殉爆效果. 当一台载有弹药的载具起火时, 将会有殉爆的效果. - - - Ammunition cook off duration - Czas trwania samozapłonu amunicji - 弾薬の誘爆持続時間 - Durée cook-off des munitions - Durata esplosione munizioni - 彈藥殉爆效果持續時間 - 弹药殉爆效果持续时间 - - - Multiplier for how long cook off lasts [Setting to 0 will disable ammo cookoff] - Multiplicateur de la durée du cook-off des munitions [Une valeur de 0 désactive l'effet] - Mnożnik decydujący jak długo ma trwać samozapłon amunicji [Ustawienie na 0 spowoduje wyłącznie samozapłonu] - 誘爆の持続時間を乗数で設定。[0 に設定で誘爆を無効化] - Moltiplicatore della durata dell'esplosione [Impostare 0 disabiliterà l'esplosione delle munizioni] - 設定彈藥殉爆效果會持續多久時間 [輸入0來關閉殉爆效果] - 设定弹药殉爆效果会持续多久时间 [输入0来关闭殉爆效果] diff --git a/addons/dagr/XEH_preInit.sqf b/addons/dagr/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/dagr/XEH_preInit.sqf +++ b/addons/dagr/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/dagr/config.cpp b/addons/dagr/config.cpp index b923c3ea94..f84f4aeb38 100644 --- a/addons/dagr/config.cpp +++ b/addons/dagr/config.cpp @@ -19,3 +19,7 @@ class CfgPatches { #include "CfgWeapons.hpp" #include "Dialog.hpp" #include "RscTitles.hpp" + +class ACE_newEvents { + RangerfinderData = QEGVAR(vector,rangefinderData); +}; diff --git a/addons/dagr/functions/fnc_handleRangeFinderData.sqf b/addons/dagr/functions/fnc_handleRangeFinderData.sqf index 61d8201552..59e10a1711 100644 --- a/addons/dagr/functions/fnc_handleRangeFinderData.sqf +++ b/addons/dagr/functions/fnc_handleRangeFinderData.sqf @@ -8,7 +8,7 @@ * 2: Inclination (Degrees) * * Return Value: - * None + * Nothing * * Example: * [1000, 45, 1] call ace_dagr_fnc_handleRangeFinderData diff --git a/addons/dagr/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf index b061717c58..c4aa989854 100644 --- a/addons/dagr/functions/fnc_menuInit.sqf +++ b/addons/dagr/functions/fnc_menuInit.sqf @@ -3,10 +3,10 @@ * Creates the DAGR menu dialog * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * diff --git a/addons/dagr/functions/fnc_outputData.sqf b/addons/dagr/functions/fnc_outputData.sqf index 2208587932..0fcc3ccbda 100644 --- a/addons/dagr/functions/fnc_outputData.sqf +++ b/addons/dagr/functions/fnc_outputData.sqf @@ -3,13 +3,12 @@ * DAGR data output loop * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: - * call ace_dagr_fnc_outputData * * Public: No */ diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf index 686dbcc407..23996c46b4 100644 --- a/addons/dagr/functions/fnc_outputVector.sqf +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -1,19 +1,17 @@ -/* +/* * Author: Rosuto * DAGR vector output loop * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: - * call ace_dagr_fnc_outputVector * * Public: No */ - #include "script_component.hpp" private ["_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevation", "_dagrTime", "_elevation", "_xCoord", "_yCoord"]; diff --git a/addons/dagr/functions/fnc_outputWP.sqf b/addons/dagr/functions/fnc_outputWP.sqf index 32e1c2eaa0..d36f222a51 100644 --- a/addons/dagr/functions/fnc_outputWP.sqf +++ b/addons/dagr/functions/fnc_outputWP.sqf @@ -1,15 +1,14 @@ -/* +/* * Author: Rosuto * DAGR waypoint output loop * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: - * call ace_dagr_fnc_outputWP * * Public: No */ @@ -80,11 +79,7 @@ GVAR(outputPFH) = [{ }); // WP Heading - _bearing = floor (if (GVAR(useDegrees)) then { - ((_WPpos vectorDiff _MYpos) call CBA_fnc_vectDir) - } else { - DEG_TO_MIL(((_WPpos vectorDiff _MYpos) call CBA_fnc_vectDir)) - }); + _bearing = floor ((_WPpos vectorDiff _MYpos) call CBA_fnc_vectDir); // Output __gridControl ctrlSetText format ["%1", _dagrGrid]; diff --git a/addons/dagr/functions/fnc_toggleOverlay.sqf b/addons/dagr/functions/fnc_toggleOverlay.sqf index af9909efda..d48a83ae51 100644 --- a/addons/dagr/functions/fnc_toggleOverlay.sqf +++ b/addons/dagr/functions/fnc_toggleOverlay.sqf @@ -3,13 +3,12 @@ * Toggles the DAGR overlay * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: - * call ace_dagr_fnc_toggleOverlay * * Public: No */ diff --git a/addons/dagr/script_component.hpp b/addons/dagr/script_component.hpp index 4fadaf982c..e392295765 100644 --- a/addons/dagr/script_component.hpp +++ b/addons/dagr/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_DAGR diff --git a/addons/dagr/stringtable.xml b/addons/dagr/stringtable.xml index 51ca754a82..01b43391ab 100644 --- a/addons/dagr/stringtable.xml +++ b/addons/dagr/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -11,10 +11,6 @@ DAGR DAGR DAGR - DAGR - DAGR - 軍用GPS接收器 - 军用GPS接收器 Configure DAGR @@ -26,10 +22,6 @@ Konfigurovat DAGR Configura DAGR Configurer le DAGR - DAGR を設定 - DAGR 설정 - 軍用GPS接收器設定 - 军用GPS接收器设定 Toggle DAGR @@ -41,10 +33,6 @@ Přepnout DAGR Apri DAGR Activer/Desactiver le DAGR - DAGR を常に表示 - DAGR 토글 - 切換軍用GPS接收器 - 切换军用GPS接收器 Defense Advanced GPS Receiver @@ -56,10 +44,6 @@ Defense Advanced GPS Receiver Defense Advanced GPS Receiver Defense Advanced GPS Receiver - アドバンスド DAGR の受信を定義します - 국방 고급위성항법시스템 수신기 - 軍用高級防禦GPS接收器 - 军用高级防御GPS接收器 diff --git a/addons/disarming/XEH_preInit.sqf b/addons/disarming/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/disarming/XEH_preInit.sqf +++ b/addons/disarming/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/disarming/config.cpp b/addons/disarming/config.cpp index e38f4346ab..d8f249a9c6 100644 --- a/addons/disarming/config.cpp +++ b/addons/disarming/config.cpp @@ -19,3 +19,8 @@ class CfgPatches { #include "CfgWeapons.hpp" #include "gui_disarm.hpp" + +class ACE_newEvents { + DisarmDebugCallback = QGVAR(debugCallback); + DisarmDropItems = QGVAR(dropItems); +}; diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index af799e25df..c9eb920084 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -10,7 +10,7 @@ * 3: Do Not Drop Ammo * * Return Value: - * None + * Nothing * * Example: * [player, cursorTarget, ["ace_bandage"]] call ace_disarming_fnc_disarmDropItems diff --git a/addons/disarming/functions/fnc_eventCallerFinish.sqf b/addons/disarming/functions/fnc_eventCallerFinish.sqf index 48a7191a5f..bf1daee2f0 100644 --- a/addons/disarming/functions/fnc_eventCallerFinish.sqf +++ b/addons/disarming/functions/fnc_eventCallerFinish.sqf @@ -23,4 +23,4 @@ params ["_caller", "_target", "_errorMsg"]; if (_caller != ACE_player) exitWith {}; systemChat format ["Debug-Caller: Disarm finished from [%1] with code [%2]", _target, _errorMsg]; -INFO_2("%1 - eventCallerFinish: %2",CBA_missionTime,_this); +ACE_LOGINFO_2("%1 - eventCallerFinish: %2",CBA_missionTime,_this); diff --git a/addons/disarming/functions/fnc_eventTargetFinish.sqf b/addons/disarming/functions/fnc_eventTargetFinish.sqf index f700cb6f79..4b7487d47c 100644 --- a/addons/disarming/functions/fnc_eventTargetFinish.sqf +++ b/addons/disarming/functions/fnc_eventTargetFinish.sqf @@ -10,7 +10,7 @@ * 2: errorMsg * * Return Value: - * None + * Nothing * * Example: * [player1, player2, "Someting fucked up"] call ace_disarming_fnc_eventTargetFinish @@ -22,6 +22,6 @@ params ["_caller", "_target", "_errorMsg"]; if (_errorMsg != "") then { - INFO_2("%1 - eventTargetFinish: %2",CBA_missionTime,_this); + ACE_LOGINFO_2("%1 - eventTargetFinish: %2",CBA_missionTime,_this); [QGVAR(debugCallback), [_caller, _target, _errorMsg], [_caller]] call CBA_fnc_targetEvent; }; diff --git a/addons/disarming/functions/fnc_eventTargetStart.sqf b/addons/disarming/functions/fnc_eventTargetStart.sqf index 8490c17be1..77dfd9d271 100644 --- a/addons/disarming/functions/fnc_eventTargetStart.sqf +++ b/addons/disarming/functions/fnc_eventTargetStart.sqf @@ -10,10 +10,10 @@ * 2: type of disarm * * Return Value: - * None + * Nothing * * Example: - * [bob, kevin, "disarm"] call ace_disarming_fnc_eventTargetStart + * eventTargetStart * * Public: No */ diff --git a/addons/disarming/functions/fnc_showItemsInListbox.sqf b/addons/disarming/functions/fnc_showItemsInListbox.sqf index d43dd9b5ca..82b9645850 100644 --- a/addons/disarming/functions/fnc_showItemsInListbox.sqf +++ b/addons/disarming/functions/fnc_showItemsInListbox.sqf @@ -8,7 +8,7 @@ * 1: ItemArray [["itemClassnames"],[counts]] * * Return Value: - * None + * Nothing * * Example: * [theListBox, [["ace_bandage"],[2]]] call ace_disarming_fnc_showItemsInListbox diff --git a/addons/disarming/script_component.hpp b/addons/disarming/script_component.hpp index 56dda33d5f..7bd87ade59 100644 --- a/addons/disarming/script_component.hpp +++ b/addons/disarming/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_DISARMING diff --git a/addons/disarming/stringtable.xml b/addons/disarming/stringtable.xml index 30f9fa4b85..dfa030273a 100644 --- a/addons/disarming/stringtable.xml +++ b/addons/disarming/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Ouvrir l'inventaire Felszerelés megtekintése Abrir inventário - インベントリを開く - 소지품 열기 - 開啟裝備 - 开启装备 diff --git a/addons/disposable/CfgWeapons.hpp b/addons/disposable/CfgWeapons.hpp index 731910b704..0ca6763d63 100644 --- a/addons/disposable/CfgWeapons.hpp +++ b/addons/disposable/CfgWeapons.hpp @@ -5,7 +5,6 @@ class CfgWeapons { magazines[] = {"ACE_PreloadedMissileDummy"}; // The dummy magazine }; class ACE_launch_NLAW_Used_F: launch_NLAW_F { // the used tube should be a sub class of the disposable launcher - EGVAR(nlaw,enabled) = 0; // disable guidance for the disposabled tube scope = 1; ACE_isUsedLauncher = 1; author = ECSTRING(common,ACETeam); diff --git a/addons/disposable/XEH_preInit.sqf b/addons/disposable/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/disposable/XEH_preInit.sqf +++ b/addons/disposable/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/disposable/functions/fnc_replaceATWeapon.sqf b/addons/disposable/functions/fnc_replaceATWeapon.sqf index d94944bfde..58c58a6056 100644 --- a/addons/disposable/functions/fnc_replaceATWeapon.sqf +++ b/addons/disposable/functions/fnc_replaceATWeapon.sqf @@ -6,7 +6,7 @@ * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: - * None + * Nothing * * Example: * [fromBisFiredEH] call ace_disposable_fnc_replaceATWeapon; diff --git a/addons/disposable/script_component.hpp b/addons/disposable/script_component.hpp index c2f4c833ab..32402bc3e5 100644 --- a/addons/disposable/script_component.hpp +++ b/addons/disposable/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_ATTACH diff --git a/addons/disposable/stringtable.xml b/addons/disposable/stringtable.xml index f41b2cad88..ac2b76ee7f 100644 --- a/addons/disposable/stringtable.xml +++ b/addons/disposable/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -10,12 +10,8 @@ Lanzador utilizado Elhasznált kilövőcső Отстрелянная труба - Lanciatore usato + Tubo usato Tubo utilizado - 使用済み - 사용함 - 使用過的火箭筒 - 使用过的火箭筒 Used disposable rocket launcher @@ -28,10 +24,6 @@ Отстрелянная одноразовая пусковая установка Lanciarazzi monouso già utilizzato Lança foguetes descartável utilizado - 使い終わったロケット ランチャーの筒部分 - 사용한 일회용 발사관 - 使用過的一次性火箭發射器 - 使用过的一次性火箭发射器 Preloaded Missile Dummy @@ -44,10 +36,6 @@ Предзаряженная ракетная болванка Missile inerte precaricato Míssel inerte pré-carregado - 仮置きのミサイルをあらかじめ装填 - 임시로 미사일을 미리 장전 - 預裝訓練導彈 - 预装训练导弹 - + \ No newline at end of file diff --git a/addons/dogtags/CfgVehicles.hpp b/addons/dogtags/CfgVehicles.hpp index f583164b1f..9757ac1c53 100644 --- a/addons/dogtags/CfgVehicles.hpp +++ b/addons/dogtags/CfgVehicles.hpp @@ -2,29 +2,30 @@ class CfgVehicles { class Man; class CAManBase: Man { class ACE_Actions { - class ACE_Dogtag { - displayName = CSTRING(itemName); - condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeDogtag)); - statement = ""; - showDisabled = 0; - distance = 1.75; - icon = QPATHTOF(data\dogtag_icon_ca.paa); - selection = "neck"; - class ACE_CheckDogtag { - displayName = CSTRING(checkDogtag); - condition = QUOTE([ARR_2(_player,_target)] call FUNC(canCheckDogtag)); - statement = QUOTE([ARR_2(_player,_target)] call FUNC(checkDogtag)); - showDisabled = 0; - priority = 3; - icon = QPATHTOF(data\dogtag_icon_ca.paa); - }; - class ACE_TakeDogtag { - displayName = CSTRING(takeDogtag); - condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeDogtag)); - statement = QUOTE([ARR_2(_player,_target)] call FUNC(takeDogtag)); + class ACE_MainActions { + class ACE_Dogtag { + displayName = CSTRING(itemName); + condition = ""; + statement = ""; showDisabled = 0; priority = 3; icon = QPATHTOF(data\dogtag_icon_ca.paa); + class ACE_CheckDogtag { + displayName = CSTRING(checkDogtag); + condition = QUOTE([ARR_2(_player,_target)] call FUNC(canCheckDogtag)); + statement = QUOTE([ARR_2(_player,_target)] call FUNC(checkDogtag)); + showDisabled = 0; + priority = 3; + icon = QPATHTOF(data\dogtag_icon_ca.paa); + }; + class ACE_TakeDogtag { + displayName = CSTRING(takeDogtag); + condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeDogtag)); + statement = QUOTE([ARR_2(_player,_target)] call FUNC(takeDogtag)); + showDisabled = 0; + priority = 3; + icon = QPATHTOF(data\dogtag_icon_ca.paa); + }; }; }; }; @@ -34,7 +35,6 @@ class CfgVehicles { displayName = CSTRING(checkItem); condition = "true"; statement = ""; - exceptions[] = {"isNotInside", "isNotSitting"}; insertChildren = QUOTE(_this call DFUNC(addDogtagActions)); }; }; diff --git a/addons/dogtags/CfgWeapons.hpp b/addons/dogtags/CfgWeapons.hpp index a0ce4b0132..4e37db74db 100644 --- a/addons/dogtags/CfgWeapons.hpp +++ b/addons/dogtags/CfgWeapons.hpp @@ -4,7 +4,7 @@ scope = 1; \ scopeArsenal = 0; \ scopeCurator = 0; \ - descriptionShort = CSTRING(itemName); \ + descriptionShort = QUOTE(DOGTAGID); \ GVAR(tagID) = DOGTAGID; \ } diff --git a/addons/dogtags/XEH_PREP.hpp b/addons/dogtags/XEH_PREP.hpp index 5917600139..33e42ba191 100644 --- a/addons/dogtags/XEH_PREP.hpp +++ b/addons/dogtags/XEH_PREP.hpp @@ -1,4 +1,3 @@ - PREP(addDogtagActions); PREP(addDogtagItem); PREP(bloodType); @@ -12,4 +11,3 @@ PREP(sendDogtagData); PREP(showDogtag); PREP(ssn); PREP(takeDogtag); -PREP(disableFactionDogtags); diff --git a/addons/dogtags/XEH_postInit.sqf b/addons/dogtags/XEH_postInit.sqf index 6a50ce61cf..729ae7eb04 100644 --- a/addons/dogtags/XEH_postInit.sqf +++ b/addons/dogtags/XEH_postInit.sqf @@ -10,27 +10,25 @@ // - Adding actions via config would create a dependency if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then { if (hasInterface) then { - private _checkTagAction = [ - "ACE_CheckDogtag", - format ["%1: %2", localize LSTRING(itemName), localize LSTRING(checkDogtag)], - QPATHTOF(data\dogtag_icon_ca.paa), - {[_player,_target] call FUNC(checkDogtag)}, - {!isNil {_target getVariable QGVAR(dogtagData)}} - ] call EFUNC(interact_menu,createAction); + private _checkTagAction = [ + "ACE_CheckDogtag", + format ["%1: %2", localize LSTRING(itemName), localize LSTRING(checkDogtag)], + QPATHTOF(data\dogtag_icon_ca.paa), + {[_player,_target] call FUNC(checkDogtag)}, + {!isNil {_target getVariable QGVAR(dogtagData)}} + ] call ace_interact_menu_fnc_createAction; ["ACE_bodyBagObject", 0, ["ACE_MainActions"], _checkTagAction] call EFUNC(interact_menu,addActionToClass); private _takeTagAction = [ - "ACE_TakeDogtag", - format ["%1: %2", localize LSTRING(itemName), localize LSTRING(takeDogtag)], - QPATHTOF(data\dogtag_icon_ca.paa), - {[_player,_target] call FUNC(takeDogtag)}, - {(!isNil {_target getVariable QGVAR(dogtagData)}) && {((_target getVariable [QGVAR(dogtagTaken), objNull]) != _target)}} - ] call EFUNC(interact_menu,createAction); - + "ACE_TakeDogtag", + format ["%1: %2", localize LSTRING(itemName), localize LSTRING(takeDogtag)], + QPATHTOF(data\dogtag_icon_ca.paa), + {[_player,_target] call FUNC(takeDogtag)}, + {(!isNil {_target getVariable QGVAR(dogtagData)}) && {((_target getVariable [QGVAR(dogtagTaken), objNull]) != _target)}} + ] call ace_interact_menu_fnc_createAction; ["ACE_bodyBagObject", 0, ["ACE_MainActions"], _takeTagAction] call EFUNC(interact_menu,addActionToClass); }; - if (isServer) then { ["ace_placedInBodyBag", { params ["_target", "_bodyBag"]; @@ -45,6 +43,3 @@ if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then { }] call CBA_fnc_addEventHandler; }; }; - -// disable dogtags for civilians -"CIV_F" call FUNC(disableFactionDogtags); diff --git a/addons/dogtags/XEH_preInit.sqf b/addons/dogtags/XEH_preInit.sqf index a7a080b91e..a7feade1c3 100644 --- a/addons/dogtags/XEH_preInit.sqf +++ b/addons/dogtags/XEH_preInit.sqf @@ -2,10 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; -GVAR(disabledFactions) = [] call CBA_fnc_createNamespace; - ADDON = true; diff --git a/addons/dogtags/config.cpp b/addons/dogtags/config.cpp index 183b59e67e..a3ad6b7cf0 100644 --- a/addons/dogtags/config.cpp +++ b/addons/dogtags/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_interaction"}; + requiredAddons[] = {"ace_common"}; author = ECSTRING(common,ACETeam); authors[] = {"SzwedzikPL"}; url = ECSTRING(main,URL); diff --git a/addons/dogtags/functions/fnc_addDogtagActions.sqf b/addons/dogtags/functions/fnc_addDogtagActions.sqf index 988f909775..05f136830c 100644 --- a/addons/dogtags/functions/fnc_addDogtagActions.sqf +++ b/addons/dogtags/functions/fnc_addDogtagActions.sqf @@ -32,7 +32,8 @@ private _unitDogtagIDs = []; //Create action children for all dogtags private _actions = []; { - private _displayName = getText (configFile >> "CfgWeapons" >> _x >> "displayName"); + private _tagID = _unitDogtagIDs select _forEachIndex; + private _displayName = format ["%1 #%2", getText (configFile >> "CfgWeapons" >> _x >> "displayName"), _tagID]; private _picture = getText (configFile >> "CfgWeapons" >> _x >> "picture"); private _action = [_x, _displayName, _picture, {_this call FUNC(checkDogtagItem)}, {true}, {}, _x] call EFUNC(interact_menu,createAction); diff --git a/addons/dogtags/functions/fnc_addDogtagItem.sqf b/addons/dogtags/functions/fnc_addDogtagItem.sqf index 09d07f1d13..e734b6f38f 100644 --- a/addons/dogtags/functions/fnc_addDogtagItem.sqf +++ b/addons/dogtags/functions/fnc_addDogtagItem.sqf @@ -24,8 +24,4 @@ if (_item == "") exitWith {}; _dogtagData params ["_nickName"]; private _displayText = format [localize LSTRING(takeDogtagSuccess), _nickName]; - -// display message -[{ - [_this, 2.5] call EFUNC(common,displayTextStructured); -}, _displayText, DOGTAG_SHOW_DELAY] call CBA_fnc_waitAndExecute; +[_displayText] call EFUNC(common,displayText); diff --git a/addons/dogtags/functions/fnc_canCheckDogtag.sqf b/addons/dogtags/functions/fnc_canCheckDogtag.sqf index b31911a0c6..66a25c94b0 100644 --- a/addons/dogtags/functions/fnc_canCheckDogtag.sqf +++ b/addons/dogtags/functions/fnc_canCheckDogtag.sqf @@ -20,7 +20,4 @@ params ["_player", "_target"]; if (isNull _target) exitWith {false}; -// check if disabled for faction -if ([GVAR(disabledFactions) getVariable faction _target] param [0, false]) exitWith {false}; - (!alive _target) || {_target getVariable ["ACE_isUnconscious", false]} diff --git a/addons/dogtags/functions/fnc_canTakeDogtag.sqf b/addons/dogtags/functions/fnc_canTakeDogtag.sqf index 37163f68c7..33a3ef055f 100644 --- a/addons/dogtags/functions/fnc_canTakeDogtag.sqf +++ b/addons/dogtags/functions/fnc_canTakeDogtag.sqf @@ -20,7 +20,4 @@ params ["_player", "_target"]; if (isNull _target) exitWith {false}; -// check if disabled for faction -if ([GVAR(disabledFactions) getVariable faction _target] param [0, false]) exitWith {false}; - (!alive _target) || {_target getVariable ["ACE_isUnconscious", false]} diff --git a/addons/dogtags/functions/fnc_checkDogtag.sqf b/addons/dogtags/functions/fnc_checkDogtag.sqf index 7c032259c1..7b703b995c 100644 --- a/addons/dogtags/functions/fnc_checkDogtag.sqf +++ b/addons/dogtags/functions/fnc_checkDogtag.sqf @@ -18,26 +18,7 @@ params ["_player", "_target"]; -// animation -_player call EFUNC(common,goKneeling); - -// sound -private _position = AGLToASL (_target modelToWorld (_target selectionPosition "neck")); - -playSound3D [ - selectRandom RUSTLING_SOUNDS, - objNull, - false, - _position, - 1, - 1, - 50 -]; - -// display dogtag private _doubleTags = (_target getVariable [QGVAR(dogtagTaken), objNull]) != _target; private _dogTagData = [_target] call FUNC(getDogTagData); -[{ - [QGVAR(showDogtag), _this] call CBA_fnc_localEvent; -}, [_dogTagData, _doubleTags], DOGTAG_SHOW_DELAY] call CBA_fnc_waitAndExecute; +[QGVAR(showDogtag), [_dogTagData, _doubleTags]] call CBA_fnc_localEvent; diff --git a/addons/dogtags/functions/fnc_disableFactionDogtags.sqf b/addons/dogtags/functions/fnc_disableFactionDogtags.sqf deleted file mode 100644 index 2418b31f4e..0000000000 --- a/addons/dogtags/functions/fnc_disableFactionDogtags.sqf +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Author: commy2 - * Disable this faction from using dogtags. - * - * Arguments: - * 0: Faction - * - * Return Value: - * None - * - * Example: - * "CIV_F" call ace_dogtags_fnc_disableFactionDogtags - * - * Public: Yes - */ -#include "script_component.hpp" - -params [["_faction", "", [""]]]; - -GVAR(disabledFactions) setVariable [_faction, true]; diff --git a/addons/dogtags/functions/fnc_getDogtagItem.sqf b/addons/dogtags/functions/fnc_getDogtagItem.sqf index 43897ac9fc..9c21ce0c54 100644 --- a/addons/dogtags/functions/fnc_getDogtagItem.sqf +++ b/addons/dogtags/functions/fnc_getDogtagItem.sqf @@ -26,7 +26,7 @@ private _allDogtagDatas = missionNamespace getVariable [QGVAR(allDogtagDatas), [ private _nextID = count _allDogtags + 1; -if (_nextID > 999) exitWith {ERROR("Ran out of IDs");}; +if (_nextID > 999) exitWith {ACE_LOGERROR("Ran out of IDs");}; private _dogTagData = [_target] call FUNC(getDogTagData); private _item = format ["ACE_dogtag_%1", _nextID]; diff --git a/addons/dogtags/functions/fnc_takeDogtag.sqf b/addons/dogtags/functions/fnc_takeDogtag.sqf index 5073ff73f7..0b779c029b 100644 --- a/addons/dogtags/functions/fnc_takeDogtag.sqf +++ b/addons/dogtags/functions/fnc_takeDogtag.sqf @@ -19,27 +19,8 @@ params ["_player", "_target"]; -// animation -_player call EFUNC(common,goKneeling); - -// sound -private _position = AGLToASL (_target modelToWorld (_target selectionPosition "neck")); - -playSound3D [ - selectRandom RUSTLING_SOUNDS, - objNull, - false, - _position, - 1, - 1, - 50 -]; - -// display message if ((_target getVariable [QGVAR(dogtagTaken), objNull]) == _target) then { - [{ - [_this, 2.5] call EFUNC(common,displayTextStructured); - }, localize LSTRING(dogtagAlreadyTaken), DOGTAG_SHOW_DELAY] call CBA_fnc_waitAndExecute; + [localize LSTRING(dogtagAlreadyTaken)] call EFUNC(common,displayText); } else { _target setVariable [QGVAR(dogtagTaken), _target, true]; [QGVAR(getDogtagItem), [_player, _target]] call CBA_fnc_serverEvent; diff --git a/addons/dogtags/script_component.hpp b/addons/dogtags/script_component.hpp index 0060f9579f..c5912f2d2c 100644 --- a/addons/dogtags/script_component.hpp +++ b/addons/dogtags/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_DOGTAGS @@ -15,12 +16,3 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" - -#define DOGTAG_SHOW_DELAY 1 - -#define RUSTLING_SOUNDS [\ - "a3\sounds_f\characters\ingame\AinvPknlMstpSlayWpstDnon_medic.wss",\ - "a3\sounds_f\characters\ingame\AinvPknlMstpSlayWrflDnon_medic.wss",\ - "a3\sounds_f\characters\ingame\AinvPpneMstpSlayWpstDnon_medic.wss",\ - "a3\sounds_f\characters\ingame\AinvPpneMstpSlayWrflDnon_medic.wss"\ -] diff --git a/addons/dogtags/stringtable.xml b/addons/dogtags/stringtable.xml index e47a0ae1b7..328baf53b6 100644 --- a/addons/dogtags/stringtable.xml +++ b/addons/dogtags/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -6,78 +6,36 @@ Nieśmiertelnik Жетон Identifikační známka - ドッグ タグ - Hundemarke - 군번줄 - Plaque d'identification - Piastrina - 兵籍牌 - 兵籍牌 Check Dog Tag Sprawdź nieśmiertelnik Проверить жетон Zkontrolovat známku - ドッグ タグを見る - Hundemarke prüfen - 군번줄 확인 - Vérifier les plaques d'identification - Controlla Piastrina - 檢查兵籍牌 - 检查兵籍牌 Check Sprawdź Проверить Zkontroluj - 見る - Prüfen - 확인 - Vérifier - Controlla - 檢查 - 检查 Take Zabierz Взять Vezmi - 取る - Nehmen - 회수 - Prendre - Prendi - 拿取 - 拿取 Dogtag taken from %1... Zabrałeś nieśmiertelnik %1... Жетон снят с %1... Sebral jsem známku od %1... - %1からドッグ タグを取っている・・・ - Hundemarke von %1 genommen ... - %1로부터 군번줄을 회수했습니다... - Plaque d'identification pris sur %1... - Piastrina presa da %1... - 從%1身上拿取兵籍牌... - 从%1身上拿取兵籍牌... Somebody else has already taken the dogtag... Ktoś już zabrał ten nieśmiertelnik... Кто-то уже забрал жетон... Někdo jiný už vzal identifikační známku... - すでに誰かがドッグ タグを取っているようだ・・・ - Jemand anderes hat bereits die Hundemarke genommen ... - 누군가 이미 군번줄을 회수해갔습니다... - Quelqu'un d'autre a déjâ pris les plaques d'identification... - Qualcun altro ha già preso la piastrina... - 已經有人把他的兵籍牌拿走了... - 已经有人把他的兵籍牌拿走了... - + \ No newline at end of file diff --git a/addons/dragging/CfgVehicles.hpp b/addons/dragging/CfgVehicles.hpp index f5d72fba50..c8e3c7284a 100644 --- a/addons/dragging/CfgVehicles.hpp +++ b/addons/dragging/CfgVehicles.hpp @@ -30,21 +30,6 @@ class CfgVehicles { GVAR(dragDirection) = 0; }; - // Big 1.70 Autonomous AA Turrets - class StaticMGWeapon; - class AAA_System_01_base_F: StaticMGWeapon { // Praetorian 1C (aka Phalanx CIWS) - GVAR(canCarry) = 0; - GVAR(canDrag) = 0; - }; - class SAM_System_01_base_F: StaticMGWeapon { // Mk49 Spartan - GVAR(canCarry) = 0; - GVAR(canDrag) = 0; - }; - class SAM_System_02_base_F: StaticMGWeapon { // Mk21 Centurion - GVAR(canCarry) = 0; - GVAR(canDrag) = 0; - }; - // ammo boxes class ThingX; class Items_base_F; @@ -67,10 +52,6 @@ class CfgVehicles { GVAR(canCarry) = 0; GVAR(canDrag) = 0; }; - class Pod_Heli_Transport_04_crewed_base_F: StaticWeapon { - GVAR(canCarry) = 0; - GVAR(canDrag) = 0; - }; class EAST_Box_Base: ReammoBox_F { GVAR(canCarry) = 1; diff --git a/addons/dragging/XEH_preInit.sqf b/addons/dragging/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/dragging/XEH_preInit.sqf +++ b/addons/dragging/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/dragging/functions/fnc_handleAnimChanged.sqf b/addons/dragging/functions/fnc_handleAnimChanged.sqf index c59b088ee0..935a6d3652 100644 --- a/addons/dragging/functions/fnc_handleAnimChanged.sqf +++ b/addons/dragging/functions/fnc_handleAnimChanged.sqf @@ -16,8 +16,6 @@ */ #include "script_component.hpp" -//IGNORE_PRIVATE_WARNING ["_thisArgs", "_thisID"]; // From CBA_fnc_addBISEventHandler; - params ["_unit", "_anim"]; _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 f82478d531..e3a30ea9e0 100644 --- a/addons/dragging/functions/fnc_handleScrollWheel.sqf +++ b/addons/dragging/functions/fnc_handleScrollWheel.sqf @@ -37,12 +37,8 @@ _position set [2, ((_position select 2) + _scrollAmount min (_maxHeight + 1.5)) // move up/down object and reattach at current position detach _carriedItem; - -// Uses this method of selecting position because setPosATL did not have immediate effect -private _positionChange = _position vectorDiff (getPosATL _carriedItem); -private _selectionPosition = _unit worldToModel (ASLtoAGL getPosWorld _carriedItem); -_selectionPosition = _selectionPosition vectorAdd _positionChange; -_carriedItem attachTo [_unit, _selectionPosition]; +_carriedItem setPosATL _position; +_carriedItem attachTo [_unit]; //reset the carry direction private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0]; diff --git a/addons/dragging/functions/fnc_isObjectOnObject.sqf b/addons/dragging/functions/fnc_isObjectOnObject.sqf index 00c2823e4a..cec6ce764e 100644 --- a/addons/dragging/functions/fnc_isObjectOnObject.sqf +++ b/addons/dragging/functions/fnc_isObjectOnObject.sqf @@ -6,9 +6,9 @@ * 0: Object * * Return Value: - * Boolean + * * - * Example: + * Example; * [player] call ace_dragging_fnc_isObjectOnObject * * Public: No diff --git a/addons/dragging/functions/fnc_setDraggable.sqf b/addons/dragging/functions/fnc_setDraggable.sqf index ce47f8a829..1fbcb995dc 100644 --- a/addons/dragging/functions/fnc_setDraggable.sqf +++ b/addons/dragging/functions/fnc_setDraggable.sqf @@ -5,8 +5,8 @@ * Arguments: * 0: Any object * 1: true to enable dragging, false to disable - * 2: Position offset for attachTo command (optinal; default: [0,0,0]) - * 3: Direction in degree to rotate the object after attachTo (optional; default: 0) + * 2: Position offset for attachTo command (Array, optinal; default: [0,0,0]) + * 3: Direction in degree to rotate the object after attachTo (Number, optional; default: 0) * * Return Value: * None @@ -18,7 +18,7 @@ */ #include "script_component.hpp" -//IGNORE_PRIVATE_WARNING ["_player", "_target"]; +//IGNORE_PRIVATE_WARNING("_player", "_target"); params ["_object", "_enableDrag", "_position", "_direction"]; if (isNil "_position") then { diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf index 7a5341b8a8..1890dbac1a 100644 --- a/addons/dragging/functions/fnc_startCarry.sqf +++ b/addons/dragging/functions/fnc_startCarry.sqf @@ -51,7 +51,7 @@ if (_target isKindOf "CAManBase") then { } else { // select no weapon and stop sprinting - _unit action ["SwitchWeapon", _unit, _unit, 299]; + _unit action ["SwitchWeapon", _unit, _unit, 99]; [_unit, "AmovPercMstpSnonWnonDnon", 0] call EFUNC(common,doAnimation); [_unit, "forceWalk", "ACE_dragging", true] call EFUNC(common,statusEffect_set); diff --git a/addons/dragging/script_component.hpp b/addons/dragging/script_component.hpp index 7a82a9ed3a..13915637ab 100644 --- a/addons/dragging/script_component.hpp +++ b/addons/dragging/script_component.hpp @@ -5,6 +5,7 @@ //#define DEBUG_ENABLED_DRAGGING // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_DRAGGING diff --git a/addons/dragging/stringtable.xml b/addons/dragging/stringtable.xml index 767ae3fd73..94757299cc 100644 --- a/addons/dragging/stringtable.xml +++ b/addons/dragging/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Arrastar Trascina Húzás - 引きずる - 끌기 - 拖拉 - 拖拉 Release @@ -28,10 +24,6 @@ Soltar Lascia Elengedés - はなす - 놓기 - 放開 - 放开 Drag/Release Object @@ -44,10 +36,6 @@ Arrastar/Soltar Objeto Trascina/Lascia Oggetto Húzás/Elengedés Objektum - オブジェクトを引きずる/はなす - 물건 끌기/놓기 - 拖拉/放開物品 - 拖拉/放开物品 Item too heavy @@ -60,10 +48,6 @@ Предмет слишком тяжёлый Předmět je moc těžký Az objektum túl nehéz - アイテムが重すぎる - 물체가 너무 무겁습니다 - 此物品過重 - 此物品过重 Carry @@ -76,10 +60,6 @@ Felvevés Trasporta Нести - 運ぶ - 업기 - 背起 - 背起 Raise/Lower @@ -91,10 +71,6 @@ Alza/Abbassa Subir/Bajar Lever/Baisser - 上げる/下げる - 높이기/낮추기 - 提高/下降 - 提高/下降 diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index 355377102a..05780b706a 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -27,13 +27,10 @@ class CfgAmmo { class PipeBombCore: TimeBombCore; class PipeBombBase: PipeBombCore; */ - // GVAR(size) = 0; is small size - // GVAR(size) = 1; is large size class DirectionalBombBase; class ClaymoreDirectionalMine_Remote_Ammo: DirectionalBombBase { GVAR(magazine) = "ClaymoreDirectionalMine_Remote_Mag"; GVAR(Explosive) = "ClaymoreDirectionalMine_Remote_Ammo_Scripted"; - GVAR(size) = 0; GVAR(defuseObjectPosition)[] = {0, 0, 0.038}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; @@ -42,7 +39,6 @@ class CfgAmmo { class APERSTripMine_Wire_Ammo: DirectionalBombBase { GVAR(defuseObjectPosition)[] = {-1.415, 0, 0.12}; - GVAR(size) = 0; }; class ACE_FlareTripMine_Wire_Ammo: APERSTripMine_Wire_Ammo { @@ -62,18 +58,16 @@ class CfgAmmo { distance = 0; }; }; - + class F_20mm_Red; class ACE_TripFlare_FlareEffect: F_20mm_Red { triggerTime = 0.1; - GVAR(size) = 0; }; class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase { indirectHitRange = 20; GVAR(explodeOnDefuseChance) = 1; GVAR(magazine) = "SLAMDirectionalMine_Wire_Mag"; - GVAR(size) = 0; }; class ACE_SLAMDirectionalMine_Command_Ammo: SLAMDirectionalMine_Wire_Ammo { mineTrigger = "RemoteTrigger"; @@ -95,7 +89,6 @@ class CfgAmmo { class DemoCharge_Remote_Ammo: PipeBombBase { GVAR(magazine) = "DemoCharge_Remote_Mag"; GVAR(Explosive) = "DemoCharge_Remote_Ammo_Scripted"; - GVAR(size) = 0; GVAR(defuseObjectPosition)[] = {0.07, 0, 0.055}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; @@ -106,7 +99,6 @@ class CfgAmmo { class SatchelCharge_Remote_Ammo: PipeBombBase { GVAR(magazine) = "SatchelCharge_Remote_Mag"; GVAR(Explosive) = "SatchelCharge_Remote_Ammo_Scripted"; - GVAR(size) = 0; GVAR(defuseObjectPosition)[] = {0.1, 0.1, 0.05}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; @@ -118,7 +110,6 @@ class CfgAmmo { triggerWhenDestroyed = 1; GVAR(explodeOnDefuseChance) = 0.02; GVAR(magazine) = "IEDUrbanBig_Remote_Mag"; - GVAR(size) = 1; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; class ACE_IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo { @@ -132,7 +123,6 @@ class CfgAmmo { triggerWhenDestroyed = 1; GVAR(explodeOnDefuseChance) = 0.02; GVAR(magazine) = "IEDUrbanSmall_Remote_Mag"; - GVAR(size) = 0; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; class ACE_IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo { @@ -146,7 +136,6 @@ class CfgAmmo { triggerWhenDestroyed = 1; GVAR(explodeOnDefuseChance) = 0.02; GVAR(magazine) = "IEDLandBig_Remote_Mag"; - GVAR(size) = 1; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; class ACE_IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo { @@ -160,7 +149,6 @@ class CfgAmmo { triggerWhenDestroyed = 1; GVAR(explodeOnDefuseChance) = 0.02; GVAR(magazine) = "IEDLandSmall_Remote_Mag"; - GVAR(size) = 0; soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; class ACE_IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo { diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 70499ba809..f2b6ece8db 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -60,11 +60,11 @@ class CfgVehicles { icon = QPATHTOF(UI\Defuse_ca.paa); }; }; - }; + }; class ACE_DefuseObject_Large: ACE_DefuseObject { class ACE_Actions: ACE_Actions { class ACE_Defuse: ACE_Defuse { - distance = 2; + distance = 1.5; }; }; }; diff --git a/addons/explosives/XEH_PREP.hpp b/addons/explosives/XEH_PREP.hpp index 17558ee54c..b43953d8fd 100644 --- a/addons/explosives/XEH_PREP.hpp +++ b/addons/explosives/XEH_PREP.hpp @@ -2,7 +2,6 @@ PREP(addCellphoneIED); PREP(addClacker); PREP(addDetonateActions); -PREP(addDetonateHandler); PREP(addExplosiveActions); PREP(addToSpeedDial); PREP(addTransmitterActions); diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index 7cc99bf921..1ddd52cc53 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -22,19 +22,6 @@ //When getting knocked out in medical, trigger deadman explosives: //Event is global, only run on server (ref: ace_medical_fnc_setUnconscious) if (isServer) then { - [QGVAR(detonate), { - params ["_unit", "_explosive", "_delay"]; - TRACE_3("server detonate EH",_unit,_explosive,_delay); - _explosive setShotParents [_unit, _unit]; - [{ - params ["_explosive"]; - TRACE_1("exploding",_explosive); - if (!isNull _explosive) then { - _explosive setDamage 1; - }; - }, _explosive, _delay] call CBA_fnc_waitAndExecute; - }] call CBA_fnc_addEventHandler; - ["ace_unconscious", { params ["_unit", "_isUnconscious"]; if (!_isUnconscious) exitWith {}; diff --git a/addons/explosives/XEH_preInit.sqf b/addons/explosives/XEH_preInit.sqf index 3a4d9a5aea..16a9a4124b 100644 --- a/addons/explosives/XEH_preInit.sqf +++ b/addons/explosives/XEH_preInit.sqf @@ -17,14 +17,10 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; if (isServer) then { GVAR(explosivesOrientations) = [] }; -GVAR(detonationHandlers) = []; - ADDON = true; diff --git a/addons/explosives/config.cpp b/addons/explosives/config.cpp index 71952c2eec..9c323af6c1 100644 --- a/addons/explosives/config.cpp +++ b/addons/explosives/config.cpp @@ -45,3 +45,8 @@ class CfgMineTriggers { mineTriggerRange = 1; }; }; + +class ACE_newEvents { + clientRequestsOrientations = QGVAR(sendOrientations); + serverSendsOrientations = QGVAR(orientationsSent); +}; diff --git a/addons/explosives/functions/fnc_addDetonateActions.sqf b/addons/explosives/functions/fnc_addDetonateActions.sqf index 5b61de01f4..f88abc29d3 100644 --- a/addons/explosives/functions/fnc_addDetonateActions.sqf +++ b/addons/explosives/functions/fnc_addDetonateActions.sqf @@ -43,7 +43,7 @@ _explosivesList = []; {(_this select 2) call FUNC(detonateExplosive);}, {true}, {}, - [_unit,_range,_x,_detonator] + [_unit,_range,_x] ] call EFUNC(interact_menu,createAction), [], _unit @@ -62,7 +62,7 @@ if (_detonator != "ACE_DeadManSwitch") then { {(_this select 2) call FUNC(detonateExplosiveAll);}, {true}, {}, - [_unit,_range,_explosivesList, _detonator] + [_unit,_range,_explosivesList] ] call EFUNC(interact_menu,createAction), [], _unit diff --git a/addons/explosives/functions/fnc_addDetonateHandler.sqf b/addons/explosives/functions/fnc_addDetonateHandler.sqf deleted file mode 100644 index 2058b24502..0000000000 --- a/addons/explosives/functions/fnc_addDetonateHandler.sqf +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Author: PabstMirror - * Add a explosive detonation handler. - * Should be called on all machines. - * Code needs to return BOOL: true(allowed) / false(blocked) - * See https://ace3mod.com/wiki/framework/explosives-framework.html for an example. - * - * Arguments: - * 0: Code - * - Passed [Unit, MaxRange , Explosive , FuzeTime , TriggerItem ] - * - * Return Value: - * None - * - * Example: - * [{false}] call ace_explosives_fnc_addDetonateHandler; - * - * Public: Yes - */ -#include "script_component.hpp" - -params [["_code", {true}, [{}]]]; - -GVAR(detonationHandlers) pushBack _code; diff --git a/addons/explosives/functions/fnc_addExplosiveActions.sqf b/addons/explosives/functions/fnc_addExplosiveActions.sqf index 888583b60c..0ee3ca9f78 100644 --- a/addons/explosives/functions/fnc_addExplosiveActions.sqf +++ b/addons/explosives/functions/fnc_addExplosiveActions.sqf @@ -6,10 +6,7 @@ * 0: Unit * * Return Value: - * Actions - * - * Example: - * [bob] call ace_explosives_fnc_addExplosiveActions + * Actions * * Public: No */ diff --git a/addons/explosives/functions/fnc_addTransmitterActions.sqf b/addons/explosives/functions/fnc_addTransmitterActions.sqf index 418d99a0df..4397e743a0 100644 --- a/addons/explosives/functions/fnc_addTransmitterActions.sqf +++ b/addons/explosives/functions/fnc_addTransmitterActions.sqf @@ -6,7 +6,7 @@ * 0: Unit * * Return Value: - * None + * Nothing * * Example: * [player] call ACE_Explosives_fnc_addTransmitterActions; diff --git a/addons/explosives/functions/fnc_defuseExplosive.sqf b/addons/explosives/functions/fnc_defuseExplosive.sqf index a6d0e82a6b..b98b992f8e 100644 --- a/addons/explosives/functions/fnc_defuseExplosive.sqf +++ b/addons/explosives/functions/fnc_defuseExplosive.sqf @@ -21,7 +21,7 @@ TRACE_2("params",_unit,_explosive); 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); + [_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive); [QGVAR(explodeOnDefuse), [_explosive, _unit]] call CBA_fnc_globalEvent; }; diff --git a/addons/explosives/functions/fnc_detonateExplosive.sqf b/addons/explosives/functions/fnc_detonateExplosive.sqf index 822a04aeaf..b7f4893e52 100644 --- a/addons/explosives/functions/fnc_detonateExplosive.sqf +++ b/addons/explosives/functions/fnc_detonateExplosive.sqf @@ -8,34 +8,27 @@ * 2: Explosive * 0: Explosive * 1: Fuse time - * 3: Trigger Item Classname * * Return Value: * None * * Example: - * [player, 100, [Explosive, 1], "ACE_Clacker"] call ACE_Explosives_fnc_detonateExplosive; // has to be within range - * [player, -1, [Explosive, 1], "ACE_Cellphone"] call ACE_Explosives_fnc_detonateExplosive; // range ignored. + * [player, 100, [Explosive, 1]] call ACE_Explosives_fnc_detonateExplosive; // has to be within range + * [player, -1, [Explosive, 1]] call ACE_Explosives_fnc_detonateExplosive; // range ignored. * * Public: Yes */ #include "script_component.hpp" -params ["_unit", "_range", "_item", ["_triggerClassname", "#unknown", [""]]]; -TRACE_4("detonateExplosive",_unit,_range,_item,_triggerClassname); +params ["_unit", "_range", "_item"]; +TRACE_3("params",_unit,_range,_item); private ["_result", "_ignoreRange", "_pos"]; _ignoreRange = (_range == -1); -if (!_ignoreRange && {(_unit distance (_item select 0)) > _range}) exitWith {TRACE_1("out of range",_range); false}; - _result = true; -{ - // Pass [Unit, MaxRange , Explosive , FuzeTime , TriggerItem ] - private _handlerResult = [_unit, _range, _item select 0, _item select 1, _triggerClassname] call _x; - if (_handlerResult isEqualTo false) then {TRACE_1("Handler Failed",_forEachIndex); _result = false}; -} forEach GVAR(detonationHandlers); -if (!_result) exitWith {false}; + +if (!_ignoreRange && {(_unit distance (_item select 0)) > _range}) exitWith {TRACE_1("out of range",_range); false}; if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhenDestroyed") == 0) then { private ["_exp", "_previousExp"]; @@ -50,7 +43,12 @@ if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhe _exp setPosASL _pos; }; }; - -[QGVAR(detonate), [_unit, _item select 0, _item select 1]] call CBA_fnc_serverEvent; +[{ + params ["_explosive"]; + TRACE_1("exploding",_explosive); + if (!isNull _explosive) then { + _explosive setDamage 1; + }; +}, [_item select 0], (_item select 1)] call CBA_fnc_waitAndExecute; _result diff --git a/addons/explosives/functions/fnc_detonateExplosiveAll.sqf b/addons/explosives/functions/fnc_detonateExplosiveAll.sqf index 468183a003..377dc0b93a 100644 --- a/addons/explosives/functions/fnc_detonateExplosiveAll.sqf +++ b/addons/explosives/functions/fnc_detonateExplosiveAll.sqf @@ -8,21 +8,20 @@ * 2: Explosives to detonate * 0: Explosive * 1: Fuse time - * 3: Trigger Item Classname * * Return Value: * None * * Example: - * [player, -1, [[c4,0.5]], "ACE_Clacker"] call ACE_Explosives_fnc_detonateExplosiveAll; + * [player, -1, [[c4,0.5]]] call ACE_Explosives_fnc_detonateExplosiveAll; * * Public: No */ #include "script_component.hpp" -params ["_unit", "_range", "_explosivesList", "_triggerClassname"]; -TRACE_4("Params",_unit,_range,_explosivesList,_triggerClassname); +params ["_unit", "_range", "_explosivesList"]; +TRACE_3("Params",_unit,_range,_explosivesList); { - [_unit,_range,_x,_triggerClassname] call FUNC(detonateExplosive); + [_unit,_range,_x] call FUNC(detonateExplosive); } forEach _explosivesList; diff --git a/addons/explosives/functions/fnc_dialPhone.sqf b/addons/explosives/functions/fnc_dialPhone.sqf index 7e715c2ac7..e205f9b381 100644 --- a/addons/explosives/functions/fnc_dialPhone.sqf +++ b/addons/explosives/functions/fnc_dialPhone.sqf @@ -41,6 +41,6 @@ if (_unit == ace_player) then { playSound3D [QUOTE(PATHTO_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosASL (_this select 1),3.16228,1,75]; (_this select 0) setVariable [QGVAR(Dialing), false, true]; }, [_unit,_explosive select 0], 0.25 * (count _arr - 4)] call CBA_fnc_waitAndExecute; - [_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2), "ACE_Cellphone"] call FUNC(startTimer); + [_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2)] call FUNC(startTimer); }; }; diff --git a/addons/explosives/functions/fnc_dialingPhone.sqf b/addons/explosives/functions/fnc_dialingPhone.sqf index 9cafa01a5e..aa20ebf4b0 100644 --- a/addons/explosives/functions/fnc_dialingPhone.sqf +++ b/addons/explosives/functions/fnc_dialingPhone.sqf @@ -31,7 +31,7 @@ private _explosive = [_code] call FUNC(getSpeedDialExplosive); if (_i >= (count _arr + 2)) then { [_pfID] call CALLSTACK(CBA_fnc_removePerFrameHandler); if ((count _explosive) > 0) then { - [_unit, -1, [_explosive select 0, _explosive select 2], "ACE_Cellphone"] call FUNC(detonateExplosive); + [_unit, -1, [_explosive select 0, _explosive select 2]] call FUNC(detonateExplosive); }; _unit setVariable [QGVAR(Dialing), false, true]; if (_unit == ace_player) then { diff --git a/addons/explosives/functions/fnc_interactEH.sqf b/addons/explosives/functions/fnc_interactEH.sqf index eac82bcddb..c8486adc09 100644 --- a/addons/explosives/functions/fnc_interactEH.sqf +++ b/addons/explosives/functions/fnc_interactEH.sqf @@ -7,7 +7,7 @@ * Interact Menu Type (0 - world, 1 - self) * * Return Value: - * None + * Nothing * * Example: * [0] call ace_explosives_fnc_interactEH @@ -42,16 +42,14 @@ if (!("ACE_DefusalKit" in (items ACE_player))) exitWith {}; if (((getPosASL ace_player) distance _setPosition) > 5) then { { if (((_x distance ACE_player) < 15) && {!(_x in _minesHelped)}) then { + TRACE_3("Making Defuse Helper",(_x),(typeOf _x),(_x isKindOf "UnderwaterMine_Range_Ammo")); + private _defuseHelper = if (_x isKindOf "UnderwaterMine_Range_Ammo") then { + "ACE_DefuseObject_Large" createVehicleLocal (getPos _x); + } else { + "ACE_DefuseObject" createVehicleLocal (getPos _x); + }; private _config = configFile >> "CfgAmmo" >> typeOf _x; - private _size = getNumber (_config >> QGVAR(size)); - TRACE_3("Making Defuse Helper",(_x),(typeOf _x),(_size == 1)); - private ["_defuseHelper"]; - if (_size == 1) then { - _defuseHelper = "ACE_DefuseObject_Large" createVehicleLocal (getPos _x); - } else { - _defuseHelper = "ACE_DefuseObject" createVehicleLocal (getPos _x); - }; private _defuseObjectPosition = getArray (_config >> QGVAR(defuseObjectPosition)); if (_defuseObjectPosition isEqualTo []) then { diff --git a/addons/explosives/functions/fnc_module.sqf b/addons/explosives/functions/fnc_module.sqf index cbe7c3e2ad..6764e9bea4 100644 --- a/addons/explosives/functions/fnc_module.sqf +++ b/addons/explosives/functions/fnc_module.sqf @@ -23,4 +23,4 @@ params ["_logic"]; [_logic, QGVAR(PunishNonSpecialists),"PunishNonSpecialists"] call EFUNC(Common,readSettingFromModule); [_logic, QGVAR(ExplodeOnDefuse),"ExplodeOnDefuse"] call EFUNC(Common,readSettingFromModule); -INFO("Explosive Module Initialized."); +ACE_LOGINFO("Explosive Module Initialized."); diff --git a/addons/explosives/functions/fnc_onIncapacitated.sqf b/addons/explosives/functions/fnc_onIncapacitated.sqf index 6f9a9f498a..6bbf6152d3 100644 --- a/addons/explosives/functions/fnc_onIncapacitated.sqf +++ b/addons/explosives/functions/fnc_onIncapacitated.sqf @@ -19,14 +19,11 @@ params ["_unit"]; TRACE_1("params",_unit); -// Exit if no item: -if (({_x == "ACE_DeadManSwitch"} count (items _unit)) == 0) exitWith {}; +private ["_deadman"]; -private _range = getNumber (configFile >> "CfgWeapons" >> "ACE_DeadManSwitch" >> QGVAR(range)); -private _deadman = [_unit, "DeadManSwitch"] call FUNC(getPlacedExplosives); -TRACE_2("placed",_deadman,_range); +_deadman = [_unit, "DeadManSwitch"] call FUNC(getPlacedExplosives); { - [_unit, _range, _x, "ACE_DeadManSwitch"] call FUNC(detonateExplosive); + [_unit, -1, _x, true] call FUNC(detonateExplosive); } forEach _deadman; //Handle deadman connected to explosive in inventory @@ -47,5 +44,5 @@ if (_connectedInventoryExplosive != "") then { private _explosive = createVehicle [_ammo, (getPos _unit), [], 0, "NONE"]; _explosive setPosASL (getPosASL _unit); - [_unit, -1, [_explosive, 0.5], "ACE_DeadManSwitch"] call FUNC(detonateExplosive); //Explode, ignoring range, with a 0.5 second delay + [_unit, -1, [_explosive, -1]] call FUNC(detonateExplosive); //Explode, ignoring range, with a random 0-1 second delay }; diff --git a/addons/explosives/functions/fnc_onInventoryChanged.sqf b/addons/explosives/functions/fnc_onInventoryChanged.sqf index f67995b1c9..889e9e2186 100644 --- a/addons/explosives/functions/fnc_onInventoryChanged.sqf +++ b/addons/explosives/functions/fnc_onInventoryChanged.sqf @@ -21,15 +21,17 @@ params ["_receiver", "_giver", "_item"]; TRACE_3("params",_receiver,_giver,_item); -if ((_receiver != ace_player) && {_giver != ace_player}) exitWith {}; +private ["_config", "_detonators"]; -private _config = ConfigFile >> "CfgWeapons" >> _item; +if (_receiver != ace_player) exitWith {}; + +_config = ConfigFile >> "CfgWeapons" >> _item; if (isClass _config && {getNumber(_config >> QGVAR(Detonator)) == 1}) then { private ["_clackerItems"]; _clackerItems = _giver getVariable [QGVAR(Clackers), []]; _receiver setVariable [QGVAR(Clackers), (_receiver getVariable [QGVAR(Clackers), []]) + _clackerItems, true]; - private _detonators = [_giver] call FUNC(getDetonators); + _detonators = [_giver] call FUNC(getDetonators); if (count _detonators == 0) then { _giver setVariable [QGVAR(Clackers), nil, true]; }; diff --git a/addons/explosives/functions/fnc_placeExplosive.sqf b/addons/explosives/functions/fnc_placeExplosive.sqf index 5114f907ac..4a3e06df4b 100644 --- a/addons/explosives/functions/fnc_placeExplosive.sqf +++ b/addons/explosives/functions/fnc_placeExplosive.sqf @@ -36,7 +36,7 @@ if (!isNull _setupPlaceholderObject) then { }; if (isNil "_triggerConfig") exitWith { - ERROR_1("Config not passed to PlaceExplosive: %1",_this); + ACE_LOGERROR_1("Config not passed to PlaceExplosive: %1",_this); objNull }; @@ -44,7 +44,7 @@ _magazineTrigger = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Trigge _triggerConfig = ConfigFile >> "ACE_Triggers" >> _triggerConfig; if (isNil "_triggerConfig") exitWith { - ERROR_1("Config not found in PlaceExplosive: %1",_this); + ACE_LOGERROR_1("Config not found in PlaceExplosive: %1",_this); objNull }; diff --git a/addons/explosives/functions/fnc_scriptedExplosive.sqf b/addons/explosives/functions/fnc_scriptedExplosive.sqf index ff7a2ca1a0..6a554ac09c 100644 --- a/addons/explosives/functions/fnc_scriptedExplosive.sqf +++ b/addons/explosives/functions/fnc_scriptedExplosive.sqf @@ -6,7 +6,6 @@ * Arguments: * 0: Explosives objects to detonate * 1: Fuze delay (for each explosive; use negative number for random time up to value) - * 2: Trigger Item Classname * * Return Value: * None @@ -19,7 +18,7 @@ */ #include "script_component.hpp" -params [["_explosiveArr", [], [[], objNull]], ["_fuzeTime", 0, [0]], ["_triggerClassname", "#scripted", [""]]]; +params [["_explosiveArr", [], [[], objNull]], ["_fuzeTime", 0, [0]]]; if (_explosiveArr isEqualType objNull) then { _explosiveArr = [_explosiveArr]; @@ -27,5 +26,5 @@ if (_explosiveArr isEqualType objNull) then { { private _detTime = if (_fuzeTime < 0) then {random abs _fuzeTime} else {_fuzeTime}; - [objNull, -1, [_x, _detTime], _triggerClassname] call FUNC(detonateExplosive); + [objNull, -1, [_x, _detTime]] call FUNC(detonateExplosive); } forEach _explosiveArr; diff --git a/addons/explosives/functions/fnc_spawnFlare.sqf b/addons/explosives/functions/fnc_spawnFlare.sqf index 79f105b67b..acd5dc2a99 100644 --- a/addons/explosives/functions/fnc_spawnFlare.sqf +++ b/addons/explosives/functions/fnc_spawnFlare.sqf @@ -21,5 +21,3 @@ TRACE_3("Params",_posX,_posY,_posZ); private _flare = "ACE_TripFlare_FlareEffect" createVehicle [_posX,_posY,_posZ]; TRACE_1("",_flare); - -nil diff --git a/addons/explosives/functions/fnc_startDefuse.sqf b/addons/explosives/functions/fnc_startDefuse.sqf index 375f1562e1..95e258696c 100644 --- a/addons/explosives/functions/fnc_startDefuse.sqf +++ b/addons/explosives/functions/fnc_startDefuse.sqf @@ -7,7 +7,7 @@ * 1: Target explosive * * Return Value: - * None + * Nothing * * Example: * [player, ACE_Interaction_Target] call ACE_Explosives_fnc_StartDefuse; diff --git a/addons/explosives/functions/fnc_startTimer.sqf b/addons/explosives/functions/fnc_startTimer.sqf index 6694d5dc0d..1f529d9765 100644 --- a/addons/explosives/functions/fnc_startTimer.sqf +++ b/addons/explosives/functions/fnc_startTimer.sqf @@ -5,7 +5,6 @@ * Arguments: * 0: Explosive * 1: Time till detonate - * 2: Trigger Item Classname * * Return Value: * None @@ -17,13 +16,13 @@ */ #include "script_component.hpp" -params ["_explosive", "_delay", ["_triggerClassname", "#timer", [""]]]; -TRACE_3("startTimer",_explosive,_delay,_triggerClassname); +params ["_explosive", "_delay"]; +TRACE_2("params",_explosive,_delay); [{ - params ["_explosive", "_triggerClassname"]; + params ["_explosive"]; TRACE_1("Explosive Going Boom",_explosive); if (!isNull _explosive) then { - [_explosive, -1, [_explosive, 0], _triggerClassname] call FUNC(detonateExplosive); + [_explosive, -1, [_explosive, 0]] call FUNC(detonateExplosive); }; -}, [_explosive, _triggerClassname], _delay] call CBA_fnc_waitAndExecute; +}, [_explosive], _delay] call CBA_fnc_waitAndExecute; diff --git a/addons/explosives/script_component.hpp b/addons/explosives/script_component.hpp index b276fc8356..7245801cc9 100644 --- a/addons/explosives/script_component.hpp +++ b/addons/explosives/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_EXPLOSIVES diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index f34a160cca..eab890988c 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Robbanóanyagok Explosivos Взрывчатка - 爆発物 - 폭발물 - 炸药 - 炸藥 Place @@ -28,10 +24,6 @@ Elhelyezés Colocar Установить - 設置 - 설치 - 放置 - 放置 Detonate @@ -44,10 +36,6 @@ Robbantás Detonar Подрыв - 点火 - 폭파 - 引爆 - 引爆 Detonate All @@ -59,10 +47,6 @@ Detona Tutti Tout détoner Detonar Tudo - すべて点火 - 모두 폭파 - 引爆全部 - 引爆全部 Explosive code: %1 @@ -75,10 +59,6 @@ Código do explosivo: %1 Код подрыва: %1 Codice esplosivo: %1 - 爆破コード: %1 - 폭파 코드: %1 - 炸药代码: %1 - 炸藥代碼: %1 Place @@ -91,10 +71,6 @@ Elhelyezés Colocar Установить - 設置 - 설치 - 放置 - 放置 Attach @@ -107,10 +83,6 @@ Attacca Hozzácsatolás Прикрепить - 取り付け - 부착 - 连接 - 連接 Blocked @@ -122,10 +94,6 @@ Bloccato Blockiert Bloqué - 取り付けできない - 막힘 - 断开 - 斷開 Cancel @@ -138,10 +106,6 @@ Mégsem Cancelar Отмена - 中止 - 취소 - 取消 - 取消 Rotate @@ -154,10 +118,6 @@ Obrót Rotaciona Bращать - 向きを変える - 회전 - 旋转 - 旋轉 Turn On Thor III @@ -170,10 +130,6 @@ Thor III bekapcsolása Ativar Thor III Активировать Thor III - Thor III を使う - Thor III 켜기 - 开启索尔三型 - 開啟索爾三型 Turn Off Thor III @@ -186,10 +142,6 @@ Thor III kikapcsolása Desativar Thor III Деактивировать Thor III - Thor III を止める - Thor III 끄기 - 关闭索尔三型 - 關閉索爾三型 Cellphone @@ -202,10 +154,6 @@ Mobiltelefon Celular Сотовый телефон - 携帯電話 - 휴대전화 - 手机 - 手機 Used to remotely trigger explosives @@ -218,10 +166,6 @@ Robbanóanyagok távoli robbantásához való Usado para acionar explosivos remotamente Используется для удаленной детонации СВУ - 爆発物を遠隔で起爆させるのに使います - 원격으로 폭발물을 폭파시킬때 씁니다. - 用于远端引爆炸药 - 用於遠端引爆炸藥 M57 Firing Device @@ -234,10 +178,6 @@ M57 Gyújtóeszköz M57 Dispositivo de Detonação Взрыватель M57 - M57 起爆装置 - M57 격발기 - M57 引爆装置 - M57 引爆裝置 Used to remotely trigger explosives @@ -250,10 +190,6 @@ Robbanóanyagok távoli robbantásához Usado para acionar explosivos remotamente Используется для удаленной детонации зарядов - 爆発物を遠隔で起爆させるのに使います - 원격으로 폭발물을 폭파시킬때 씁니다. - 用于远端引爆炸药 - 用於遠端引爆炸藥 M152 Firing Device @@ -266,10 +202,6 @@ M152 Gyújtóeszköz M152 Dispositivo de Detonação Взрыватель M152 - M152 起爆装置 - M152 격발기 - M152 引爆装置 - M152 引爆裝置 M152 RAMS @@ -282,10 +214,6 @@ M152 RAMS M152 RAMS M152 RAMS - M152 RAMS - M152 RAMS - M152 远端炸药引爆系统 - M152 遠端炸藥引爆系統 Defusal Kit @@ -298,10 +226,6 @@ Hatástalanító felszerelés Kit de desarme Комплект разминирования - 解除キット - 해체 장비 - 拆弹工具 - 拆彈工具 Allows defusing of explosives @@ -314,10 +238,6 @@ Robbanóanyagok hatástalanítását teszi lehetővé Permite o desarme de explosivos Позволяет обезвреживать взрывчатку - 爆発物を無力化できます - 폭발물을 해체할 수 있게 해줍니다 - 可以用来拆除炸弹 - 可以用來拆除炸彈 Add to Speed Dial @@ -330,10 +250,6 @@ Hozzáadás a gyorstárcsázóhoz Adicionar à ligação rápida Добавить в быстрый вызов - 短縮ダイアルに追加 - 단축키에 지정 - 增加到快速拨号 - 增加到快速撥號 Clear @@ -346,10 +262,6 @@ Törlés Limpar Очистить - 消去 - 삭제 - 清除 - 清除 Dial @@ -362,10 +274,6 @@ Tárcsázás Discar Hабрать - ダイアル - 다이얼 - 拨号 - 撥號 Up @@ -378,10 +286,6 @@ Fel Cima Вызов - 上へ - - - Down @@ -394,10 +298,6 @@ Le Baixo Сброс - 下へ - 아래 - - Cancel @@ -410,10 +310,6 @@ Mégsem Cancelar Отмена - 中止 - 취소 - 取消 - 取消 Detonate Menu @@ -426,10 +322,6 @@ Robbantási menü Menu de detonação Меню подрыва - 点火メニュー - 폭파 메뉴 - 引爆选单 - 引爆選單 Place Menu @@ -442,10 +334,6 @@ Elhelyezési menü Menu de posicionamento Меню установки - 設置メニュー - 설치 메뉴 - 放置选单 - 放置選單 Defuse @@ -458,10 +346,6 @@ Hatástalanítás Desarmar Обезвредить - 無力化 - 해체 - 拆除 - 拆除 Defusing Explosive... @@ -474,10 +358,6 @@ Robbanóanyag hatástalanítása... Desarmando Explosivo... Обезвреживание... - 爆発物を無力化中・・・ - 폭발물 해체중... - 炸弹拆除中... - 炸彈拆除中... Timer @@ -490,10 +370,6 @@ Időzítő Timer Таймер - タイマー - 타이머 - 计时器 - 計時器 Time: %1m %2s @@ -506,10 +382,6 @@ Idő: %1m %2s Tempo: %1m %2s Время: %1m %2c - 設定時間: %1分 %2秒 - 시간: %1분 %2초 - 时间: %1分%2秒 - 時間: %1分%2秒 Set Time @@ -522,10 +394,6 @@ Idő beállítása Configurar Tempo Установить время - 時間を設定 - 시간 설정 - 设定时间 - 設定時間 Select a Trigger @@ -538,10 +406,6 @@ Gyújtóeszköz kiválasztása Selecionar um Gatilho Выберите детонатор - 点火装置を選択 - 작동방식 선택 - 选择一个触发器 - 選擇一個觸發器 Select @@ -554,10 +418,6 @@ Kiválasztás Selecionar Выбрать - 選択 - 선택 - 选择 - 選擇 Pressure Plate @@ -570,10 +430,6 @@ Nyomólap Placa de pressão Нажимная плита - 圧力感知式 - 압력식 - 压力盘 - 壓力盤 Tripwire @@ -586,10 +442,6 @@ Botlódrót Linha de tração Растяжка - 仕掛け線 - 인계철선 - 绊线 - 絆線 IR Sensor @@ -602,10 +454,6 @@ Infravörös szenzor Sensor IV ИК сенсор - 赤外線感知式 - 적외선 센서 - 红外线感应器 - 紅外線感應器 No triggers available for %1 @@ -618,10 +466,6 @@ Nincs elérhető gyújtóeszköz ide: %1 Nenhum gatilho disponível para %1 Нет доступных взрывателей для %1 - %1 につかえる点火装置がありません - %1(을)를 작동할 장치가 없습니다. - 没有适合%1的触发器 - 沒有適合%1的觸發器 IR Sensor (Side Attack) @@ -634,10 +478,6 @@ Infravörös szenzor (Side Attack) Sensor infravermelho (ataque lateral) ИК сенсор (детонация вбок) - 赤外線感知式 (横からの攻撃) - 적외선 센서 (측면 공격) - 红外线感应器 (侧边攻击) - 紅外線感應器 (側邊攻擊) Magnetic Influence Sensor (Bottom Attack) @@ -650,10 +490,6 @@ Mágneses mező érzékelő (Bottom Attack) Influência magnética (ataque inferior) Магнитный сенсор (детонация вверх) - 磁気感知式 (下からの攻撃) - 자기장 감지센서 (바닥 공격) - 磁性感应器 (底部攻击) - 磁性感應器 (底部攻擊) No explosives on trigger. @@ -666,10 +502,6 @@ Brak ładunków na zapalnik. Nenhum explosivo no gatilho. Взрыватель не подсоединён к взрывчатке - 点火装置に爆発物がありません。 - 격발기에 등록된 폭발물이 없습니다. - 触发器上并没有炸药 - 觸發器上並沒有炸藥 Dead Man's Switch @@ -682,10 +514,6 @@ Detonador do homem morto Кнопка мертвеца Detonatore a rilascio - 自爆装置 - 자폭 장치 - 自杀炸弹客引爆器 - 自殺炸彈客引爆器 Used to remotely trigger explosives when released. @@ -698,10 +526,6 @@ Usado para detonar remotamente o explosivo quando solto. Используется для дистанционного подрыва, после смерти оператора. Usato per attivare a distanza esplosivi al momento del rilascio - 点火装置を離すと遠隔で起爆したいときに使います。 - 압력이 해제될때 원격으로 폭발시킵니다. - 当放开按钮时, 将会引爆炸弹. - 當放開按鈕時, 將會引爆炸彈. Pick up @@ -714,10 +538,6 @@ Поднять Raccogli Pegar - 拾う - 줍기 - 捡起 - 撿起 Explosive System @@ -730,10 +550,6 @@ Robbanóanyag-rendszer Взрывные устройства Sistema Esplosivi - 爆発システム - 폭발물 시스템 - 炸药系统 - 炸藥系統 Require specialists? @@ -746,10 +562,6 @@ Specialisták igénylése? Требуется специалист? Richiedi specialisti? - 特技兵を必要としますか? - 전문가가 필요합니까? - 需要专家? - 需要專家? Require explosive specialists to disable explosives? Default: No @@ -762,10 +574,6 @@ Szükséges-e egy specialista a robbanóanyagok hatástalanításához? Alapértelmezett: Nem Требуется ли специалист по минному делу для обезвреживания взрывчатки? По-умолчанию: Нет Richiedi specialisti esplosivi per disabilitare esplosivi? Default: No - 爆発物を無効化するには、爆発物の特技兵を必要としますか?標準:いいえ - 폭발물을 해제하기 위해서는 전문가가 필요합니까? 기본설정: 아니요 - 需要炸弹专家才能拆除炸弹? 预设: 否 - 需要炸彈專家才能拆除炸彈? 預設: 否 Punish non-specialists? @@ -778,10 +586,6 @@ Nem-specialisták büntetése? Штраф не-специалистам? Punisci non-specialisti? - 非特技兵へ足かせを与えますか? - 비-전문가에 불이익을 줍니까? - 折磨非专业人员? - 折磨非專業人員? Increase the time it takes to complete actions for non-specialists? Default: Yes @@ -794,10 +598,6 @@ Nem-specialisták esetén több ideig tartson a cselekvés befejezése? Alapértelmezett: Igen Увеличивать время завершения действий для не-специалистов? По-умолчанию: Нет Aumenta il tempo richiesto per completare azioni per non-specialisti? Default: Si - 非特技兵は動作を完了する必要を増加させますか?標準:はい - 비-전문가가 폭발물을 해제시 더욱 많은 시간을 소요합니까? 기본설정: 예 - 增加非专业人员相关操作的时间? 预设: 是 - 增加非專業人員相關操作的時間? 預設: 是 Explode on defusal? @@ -810,10 +610,6 @@ Robbanás hatástalanításkor? Взрыв при разминир.? Fai esplodere quando disarmato? - 解除時に爆発させますか? - 해제시 폭발합니까? - 拆除时引爆? - 拆除時引爆? Enable certain explosives to explode on defusal? Default: Yes @@ -826,10 +622,6 @@ Meghatározott robbanóanyagok felrobbanjanak-e hatástalanításkor? Alapértelmezett: Igen Разрешить определенным взрывным устройствам взрываться при разминировании? По-умолчанию: Да Abilita alcuni esplosivi per esplosione al disarmo? Default: Si - 特定の爆発物へ、解除時に爆発させますか?標準:はい - 특정 폭발물이 해제시 폭발하게 합니까? 기본설정: 예 - 启用后, 某些炸弹会在拆除时引爆? 预设: 是 - 啟用後, 某些炸彈會在拆除時引爆? 預設: 是 This module adjusts the settings related to explosives. @@ -842,10 +634,6 @@ Этот модуль управляет настройками, связанными со взрывными устройствами Este módulo ajusta las configuraciones relacionadas con explosivos. Questo modulo cambia le impostazioni relative agli esplosivi - このモジュールを調節し爆発物に設定を反映させます。 - 이 모듈은 폭발물에 관한 설정을 수정할 수 있게합니다. - 此模块用来调整炸药的相关设定 - 此模塊用來調整炸藥的相關設定 M6 SLAM Mine (Bottom Attack) @@ -864,10 +652,6 @@ M6 SLAM (Útok zespoda) Mina M6 SLAM (Ataque Inferior) Мина M6 SLAM (направлена вверх) - M6 SLAM 地雷 (下からの攻撃) - M6 SLAM 지뢰 (바닥 공격) - M6指向性反装甲地雷 (底部攻击) - M6指向性反裝甲地雷 (底部攻擊) M6 SLAM Mine (Side Attack) @@ -886,10 +670,6 @@ M6 SLAM (Útok do strany) Mina M6 SLAM (Ataque Lateral) Мина M6 SLAM (направлена вбок) - M6 SLAM 地雷 (横からの攻撃) - M6 SLAM 지뢰 (측면 공격) - M6指向性反装甲地雷 (侧边攻击) - M6指向性反裝甲地雷 (側邊攻擊) Large IED (Urban, Pressure Plate) @@ -908,10 +688,6 @@ IED, Velké (Městské, Nášlapné) IED Grande (Urbano, Placa de pressão) Большое СВУ (городское, нажимного действия) - 大きな IED (市街地用、圧力感知) - 대형 급조폭발물 (시가지, 압력식) - 大型简易爆炸装置 (地表上, 压力盘) - 大型簡易爆炸裝置 (地表上, 壓力盤) Large IED (Dug-in, Pressure Plate) @@ -930,10 +706,6 @@ IED, Velké (Zakopané, Nášlapné) IED Grande (Enterrado, Placa de pressão) Большое СВУ (закопанное, нажимного действия) - 大きな IED (埋め込み型、圧力感知) - 대형 급조폭발물 (묻힘, 압력식) - 大型简易爆炸装置 (地表下, 压力盘) - 大型簡易爆炸裝置 (地表下, 壓力盤) Small IED (Urban, Pressure Plate) @@ -952,10 +724,6 @@ IED, Malé (Městské, Nášlapné) IED Pequeno(Urbano, Placa de pressão) Малое СВУ (городское, нажимного действия) - 小さな IED (市街地用、圧力感知) - 소형 급조폭발물 (시가지, 압력식) - 小型简易爆炸装置 (地表上, 压力盘) - 小型簡易爆炸裝置 (地表上, 壓力盤) Small IED (Dug-in, Pressure Plate) @@ -974,10 +742,6 @@ IED, Malé (Zakopané, Nášlapné) IED Pequeno (Enterrado, Placa de pressão) Малое СВУ (закопанное, нажимного действия) - 小さな IED (埋め込み型、圧力感知) - 소형 급조폭발물 (묻힘, 압력식) - 小型简易爆炸装置 (地表下, 压力盘) - 小型簡易爆炸裝置 (地表下, 壓力盤) Connect to %1 @@ -990,34 +754,14 @@ Csatlakozás %1 Collega a %1 Conectar à %1 - %1 へ接続 - %1에 연결중 - 连接到%1 - 連接到%1 Tripwire Flare Сигнальная растяжка - 仕掛け型照明地雷 - Flara na linkę - Stolperdraht-Leuchtrakete - 조명지뢰 - Fusée éclairante avec fil de détente - Cavo d'innesco - 绊线闪光地雷 - 絆線閃光地雷 Type: Tripwire flare - Ignites a non-lethal flare when triggered.<br />Rounds: 1<br />Used on: Ground Тип: Сигнальная растяжка - При срабатывании выпускает несмертельную сгнальную вспышку.<br />Зарядов: 1<br />Используется на: Земле - 種類: 仕掛け型照明地雷 - 発動したとき、非致死性の照明を発炎します。<br />装填数: 1<br />次で使用: 地表 - Typ: Flara na linkę - Wystrzeliwuje nieszkodliwą flarę przy nadepnięciu linki.<br/>Pociski: 1<br/>Używane na: ziemia - Typ: Stolperdraht-Leuchtrakete - Schießt bei Auslösung eine nicht-tödliche Leuchtrakete ab.<br />Ladungen: 1<br />Benutzt auf: Boden - 종류: 조명지뢰 - 작동시 무해한 조명을 사출합니다.<br />장탄수: 1<br />사용처: 지면 - Type : Fusée éclairante avec fil de détente - Allume une fusée éclairante lorsque déclenché. <br />Coups : 1<br />Utilisé sur : le sol - Tipo: Cavo d'innesco - Sfocio un abbaglio non letale quanto attivato. <br />Rimanenti: 1<br />Usato: A terra - 类型: 绊线闪光地雷 - 触发后产生非致命性的强光.<br />发数: 1<br />使用于: 地面 - 類型: 絆線閃光地雷 - 觸發後產生非致命性的強光.<br />發數: 1<br />使用於: 地面 diff --git a/addons/fastroping/CfgVehicles.hpp b/addons/fastroping/CfgVehicles.hpp index 23517bffca..5ade667c12 100644 --- a/addons/fastroping/CfgVehicles.hpp +++ b/addons/fastroping/CfgVehicles.hpp @@ -217,7 +217,7 @@ class CfgVehicles { GVAR(enabled) = 2; GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"}; GVAR(friesType) = "ACE_friesGantry"; - GVAR(friesAttachmentPoint)[] = {1.07, 2.5, -0.5}; + GVAR(friesAttachmentPoint)[] = {-1.07, 3.26, -0.5}; EQUIP_FRIES_ATTRIBUTE; }; class Heli_Transport_04_base_F: Helicopter_Base_H { diff --git a/addons/fastroping/XEH_postInit.sqf b/addons/fastroping/XEH_postInit.sqf index 1efb204247..2752e2dcde 100644 --- a/addons/fastroping/XEH_postInit.sqf +++ b/addons/fastroping/XEH_postInit.sqf @@ -16,24 +16,3 @@ false }; }, {false}] call CBA_fnc_addKeybind; - - - -#ifdef DRAW_FASTROPE_INFO -addMissionEventHandler ["Draw3D", { - if (!(cursorObject isKindOf "Helicopter")) exitWith {}; - private _config = configFile >> "CfgVehicles" >> (typeOf 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"]; - if (_enabled > 0) then { - { - private _hookAttachment = cursorObject getVariable [QGVAR(FRIES), cursorObject]; - private _ropeOrigin = if (_x isEqualType []) then {_x} else {_hookAttachment selectionPosition _x}; - drawIcon3D ["", [1,.5,.5,1], (_hookAttachment modelToWorld _ropeOrigin), 0.5, 0.5, 0, format ["Rope: %1", _forEachIndex], 0.5, 0.025, "TahomaB"]; - } forEach (getArray (_config >> QGVAR(ropeOrigins))); - }; - if (_enabled == 2) then { - drawIcon3D ["", [.5,1,.5,1], (cursorObject modelToWorld getArray (_config >> QGVAR(friesAttachmentPoint))), 0.5, 0.5, 0, format ["Fries: %1", getText (_config >> QGVAR(friesType))], 0.5, 0.025, "TahomaB"]; - }; -}]; -#endif diff --git a/addons/fastroping/XEH_preInit.sqf b/addons/fastroping/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/fastroping/XEH_preInit.sqf +++ b/addons/fastroping/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/fastroping/functions/fnc_deployAI.sqf b/addons/fastroping/functions/fnc_deployAI.sqf index 646b171526..843f23cdb5 100644 --- a/addons/fastroping/functions/fnc_deployAI.sqf +++ b/addons/fastroping/functions/fnc_deployAI.sqf @@ -25,7 +25,7 @@ if (isNull _vehicle || {!(_vehicle isKindOf "Helicopter")}) exitWith { // Note: BIS_fnc_guiMessage causes a CTD with call, so spawn is used instead. ["deployAI was called with an invalid or non-existant vehicle.", QFUNC(deployAI)] spawn BIS_fnc_guiMessage; }; - ERROR('FUNC(deployAI): deployAI was called with an invalid or non-existant vehicle.'); + ACE_LOGERROR('FUNC(deployAI): deployAI was called with an invalid or non-existant vehicle.'); }; _config = configFile >> "CfgVehicles" >> typeOf _vehicle; @@ -34,14 +34,14 @@ if (_configEnabled == 0) exitWith { if (hasInterface) then { [format ["You cannot fast rope from a ""%1"" helicopter.", getText (_config >> "DisplayName")], QFUNC(deployAI)] spawn BIS_fnc_guiMessage; }; - ERROR_1('FUNC(deployAI): You cannot fast rope from a "%1" helicopter.',getText (_config >> "DisplayName")); + ACE_LOGERROR_1('FUNC(deployAI): You cannot fast rope from a "%1" helicopter.',getText (_config >> "DisplayName")); }; if (_configEnabled == 2 && {isNull (_vehicle getVariable [QGVAR(FRIES), objNull])}) exitWith { if (hasInterface) then { [format ["""%1"" requires a FRIES for fastroping, but has not been equipped with one.", getText (_config >> "DisplayName")], QFUNC(deployAI)] spawn BIS_fnc_guiMessage; }; - ERROR_1('FUNC(deployAI): "%1" requires a FRIES for fastroping but has not been equipped with one.',getText (_config >> "DisplayName")); + ACE_LOGERROR_1('FUNC(deployAI): "%1" requires a FRIES for fastroping but has not been equipped with one.',getText (_config >> "DisplayName")); }; _unitsToDeploy = crew _vehicle; @@ -52,7 +52,7 @@ if (_deploySpecial) then { }; if (_unitsToDeploy isEqualTo []) exitWith { - WARNING_1('FUNC(deployAI): Found no units to deploy in "%1".',getText (_config >> "DisplayName")); + ACE_LOGWARNING_1('FUNC(deployAI): Found no units to deploy in "%1".',getText (_config >> "DisplayName")); }; if (_createDeploymentGroup) then { diff --git a/addons/fastroping/functions/fnc_deployAIWaypoint.sqf b/addons/fastroping/functions/fnc_deployAIWaypoint.sqf index df8cdef0c1..9d8f4a03e2 100644 --- a/addons/fastroping/functions/fnc_deployAIWaypoint.sqf +++ b/addons/fastroping/functions/fnc_deployAIWaypoint.sqf @@ -7,7 +7,7 @@ * 1: Waypoint position * * Return Value: - * true + * true * * Example: * [_group, [6560, 12390, 0]] call ace_fastroping_fnc_deployAIWayoint diff --git a/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf b/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf index 0011e0ecf9..2ebffe680e 100644 --- a/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf +++ b/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf @@ -53,12 +53,7 @@ if (_hasBeenAttached && {isNull attachedTo _unit}) exitWith { _dummy setVelocity [0,0,-6]; //Check if fast rope is finished -if ( - ((getPos _unit select 2) < 0.2) - || {ropeLength _ropeTop == 34.5} - || {vectorMagnitude (velocity _vehicle) > 5} - || {!([_unit] call EFUNC(common,isAwake))} -) exitWith { +if (((getPos _unit select 2) < 0.2) || {ropeLength _ropeTop == 34.5} || {vectorMagnitude (velocity _vehicle) > 5} || {!(alive _unit)} || {captive _unit}) exitWith { detach _unit; //Reset rope diff --git a/addons/fastroping/functions/fnc_onRopeBreak.sqf b/addons/fastroping/functions/fnc_onRopeBreak.sqf index 29da355481..ed5f8bf1c8 100644 --- a/addons/fastroping/functions/fnc_onRopeBreak.sqf +++ b/addons/fastroping/functions/fnc_onRopeBreak.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [[array]], "top"] call ace_fastroping_fnc_onRopeBreak - * * Public: No */ diff --git a/addons/fastroping/script_component.hpp b/addons/fastroping/script_component.hpp index 19bdd1a109..bb0b891f2b 100644 --- a/addons/fastroping/script_component.hpp +++ b/addons/fastroping/script_component.hpp @@ -2,9 +2,9 @@ #define COMPONENT_BEAUTIFIED Fastroping #include "\z\ace\addons\main\script_mod.hpp" -// #define DRAW_FASTROPE_INFO // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_FASTROPING diff --git a/addons/fastroping/stringtable.xml b/addons/fastroping/stringtable.xml index f3988ee14f..fe62267b2c 100644 --- a/addons/fastroping/stringtable.xml +++ b/addons/fastroping/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -7,14 +7,10 @@ Wyposaż FRIES Equiper le FRIES Equipar FRIES - Equipaggia il FRIES + Equipaggia la FRIES Vybavit FRIES Equipar FRIES Десантирование по канатам - FRIES を装備 - FRIES 장착 - 启用快速绳降及撤离系统 - 啟用快速繩降及撤離系統 Equips compatible helicopters with a Fast Rope Insertion Extraction System. @@ -22,14 +18,10 @@ Wyposaża kompatybilne helikoptery w zestaw Fast Rope Insertion Extraction System. Equipe les hélicoptères compatibles avec un Module Fast Rope Insertion Extraction System. Equipar helicoptero compatible con un Sistema de Inserción Extracción Fast Rope. - Equipagga l'elicottero compatibile con il Fast Rope Insertion Extraction System + Equipagga l'elicottero compatibile con il Fast Rope Insertion Exstraction System Vybavit kompatibilní vrtulníky systémem Fast Rope Insertion Extraction (FRIES). Equipa um helicóptero compatível com o Fast Rope Insertion Exctraction System. Снаряжает совместимые вертолеты оборудованием для спуска десанта по канатам. - ヘリコプターで Fast Rope Insertion Extraction System を使えるようにします - 패스트로프 투입 및 탈출 시스템을 호환되는 헬리콥터에 적용합니다. - 使可相容的直升机启用快速绳降及撤离系统 - 使可相容的直升機啟用快速繩降及撤離系統 Prepare fast roping system @@ -41,10 +33,6 @@ Připravit systém slaňování Prepara sistema de descida rápida Подготовить канаты - ファスト ロープのシステムを準備 - 패스트로프 준비 - 准备快速绳降系统 - 準備快速繩降系統 Deploy ropes @@ -56,10 +44,6 @@ Připravit lana Jogar cordas Зацепить канаты - ロープを展開 - 줄 배치 - 部属绳索 - 部屬繩索 Fast rope @@ -67,14 +51,10 @@ Zjedź na linie Descendre à la corde Descender por la cuerda - Scendi dalla corda + Scendi sulla corda SLANIT Descida rápida Спуститься по канату - ファスト ロープをする - 강하하기 - 快速绳降 - 快速繩降 Cut ropes @@ -86,10 +66,6 @@ Odříznout lano Cortar cordas Обрезать канаты - ロープを切断 - 줄 자르기 - 剪掉绳索 - 剪掉繩索 Equip helicopter with FRIES @@ -97,14 +73,10 @@ Wyposaż helikopter w FRIES Equiper l'hélicoptère avec le FRIES Equipar helicoptero con FRIES - Equipaggia l'elicottero con il FRIES + Equipaggia l'elicottero con FRIES Vybavit vrtulník pomocí FRIES Equipar helicóptero com FRIES Снарядить вертолет канатами для спуска - ヘリコプターへ FRIES を装備 - 헬리콥터에 FRIES 장착 - 启用快速绳降及撤离系统给指定的直升机 - 啟用快速繩降及撤離系統給指定的直升機 Equips the selected helicopter with a Fast Rope Insertion Extraction System @@ -116,10 +88,6 @@ Vybavit vybraný vrtulník systémem Fast Rope Insertion Extraction (FRIES) Equipa um helicóptero selecionado com um sistema de Fast Rope Insertion Extraction System Снаряжает выбранный вертолет оборудованием для спуска десанта по канатам - 選択されたヘリコプターで Fast Rope Insertion Extraction System を使えるようにします。 - 선택된 헬리콥터에 패스트로프 투입 및 탈출 시스템을 장착합니다. - 使指定的直升机启用快速绳降及撤离系统 - 使指定的直升機啟用快速繩降及撤離系統 LET UNITS FAST ROPE @@ -128,10 +96,6 @@ Equipa o helicóptero selecionado com o Fast Rope Insertion Extraction System LAISSER LES UNITES UTILISER LA CORDE ДЕСАНТИРОВАНИЕ ПО КАНАТУ - ユニットへファスト ロープをさせる - ZJAZD NA LINACH - 让单位快速绳降 - 讓單位快速繩降 - + \ No newline at end of file diff --git a/addons/fcs/CfgEventHandlers.hpp b/addons/fcs/CfgEventHandlers.hpp index 9c5c368307..b477f93d6a 100644 --- a/addons/fcs/CfgEventHandlers.hpp +++ b/addons/fcs/CfgEventHandlers.hpp @@ -17,7 +17,7 @@ class Extended_PostInit_EventHandlers { }; }; -class Extended_InitPost_EventHandlers { +class Extended_Init_EventHandlers { class Tank { class ADDON { serverInit = QUOTE(_this call FUNC(vehicleInit)); diff --git a/addons/fcs/CfgOptics.hpp b/addons/fcs/CfgOptics.hpp index f8770d7327..aa68a6f68a 100644 --- a/addons/fcs/CfgOptics.hpp +++ b/addons/fcs/CfgOptics.hpp @@ -11,13 +11,110 @@ h = 0; \ }; -class RscText; class RscControlsGroup; class RscMapControl; class RscInGameUI { class RscUnitInfo; + class RscUnitInfo_AH64D_gunner { + controls[] = {"CA_Distance","ACE_CA_Distance"}; + MACRO_RANGEFINDER + }; + class RscWeaponRangeFinder { + controls[] = {"CA_Distance","ACE_CA_Distance"}; + MACRO_RANGEFINDER + }; + class RscWeaponRangeFinderPAS13 { + MACRO_RANGEFINDER + }; + class RscOptics_Rangefinder: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscWeaponRangeFinderMAAWS { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscWeaponRangeFinderAbramsCom { + controls[] = {"CA_Distance","ACE_CA_Distance"}; + MACRO_RANGEFINDER + }; + class RscWeaponRangeFinderAbramsGun { + controls[] = {"CA_Distance","ACE_CA_Distance"}; + MACRO_RANGEFINDER + }; + class RscWeaponRangeFinderStrykerMGSGun { + controls[] = {"CA_Distance","ACE_CA_Distance"}; + MACRO_RANGEFINDER + }; + class RscOptics_crows: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_strider_commander { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + + class RscWeaponRangeZeroing: RscUnitInfo { + controls[] = {"CA_Zeroing", "CA_DistanceText", "CA_Distance","ACE_CA_Distance", "ACE_Rangehelper"}; + MACRO_RANGEFINDER + }; + class RscOptics_sos: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_nightstalker: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_tws: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_punisher { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_tws_sniper: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_SDV_periscope { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; class RscOptics_Heli_Attack_02_gunner: RscUnitInfo { class CA_IGUI_elements_group: RscControlsGroup { class controls { @@ -25,7 +122,7 @@ class RscInGameUI { }; }; }; - class Rsc_ACE_Helo_UI_Turret: RscUnitInfo { // RscOptics_Heli_Attack_01_gunner + class Rsc_ACE_Helo_UI_Turret: RscUnitInfo { 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 { @@ -33,30 +130,103 @@ class RscInGameUI { }; }; }; - - class RscOptics_APC_Tracked_01_gunner: RscUnitInfo { + class RscOptics_Heli_Attack_01_gunner: RscUnitInfo { class CA_IGUI_elements_group: RscControlsGroup { class controls { - class CA_Distance: RscText {}; + MACRO_RANGEFINDER }; }; }; - class ACE_RscOptics_APC_Tracked_01_gunner: RscOptics_APC_Tracked_01_gunner { - class CA_IGUI_elements_group: CA_IGUI_elements_group { - class controls: controls { - // MACRO_RANGEFINDER + modify IDC of CA_Distance - class CA_Distance: CA_Distance { - idc = 151; - }; - class ACE_CA_Distance: CA_Distance { - idc = 1713151; - text = "----"; - }; - class ACE_Rangehelper: RscMapControl { - onDraw = "((ctrlParent (_this select 0)) displayCtrl 1713151) ctrlShow (cameraView == 'GUNNER');"; - w = 0; - h = 0; - }; + class RscOptics_UAV_gunner: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_UGV_gunner: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_APC_Tracked_01_gunner: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_APC_Tracked_03_gunner: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_APC_Wheeled_01_gunner: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_APC_Wheeled_03_commander: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_APC_Wheeled_03_gunner: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_MBT_01_commander: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_MBT_01_gunner: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_MBT_02_commander: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_MBT_02_gunner: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + class RscOptics_MBT_03_gunner: RscUnitInfo { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER + }; + }; + }; + + // marksmen + class RscOptics_LaserDesignator_02 { + class CA_IGUI_elements_group: RscControlsGroup { + class controls { + MACRO_RANGEFINDER }; }; }; diff --git a/addons/fcs/CfgVehicles.hpp b/addons/fcs/CfgVehicles.hpp index 47b731a66c..82572f2c68 100644 --- a/addons/fcs/CfgVehicles.hpp +++ b/addons/fcs/CfgVehicles.hpp @@ -49,6 +49,9 @@ class CfgVehicles { class Turrets { class MainTurret: NewTurret { GVAR(Enabled) = 1; // all tracked vehicles get one by default + class Turrets { + class CommanderOptics; + }; }; }; }; @@ -57,52 +60,231 @@ class CfgVehicles { class Turrets { class MainTurret: NewTurret { GVAR(Enabled) = 1; // all tracked vehicles get one by default + class Turrets { + class CommanderOptics;//: CommanderOptics {}; + }; }; }; }; - class APC_Tracked_01_base_F: Tank_F { + class Car_F: Car { + class Turrets { + class MainTurret; + }; + }; + + class Wheeled_APC_F: Car_F { + class Turrets { + class MainTurret: NewTurret { + class Turrets { + class CommanderOptics;//: CommanderOptics {}; + }; + }; + }; + }; + + class MRAP_01_base_F: Car_F {}; + + class MRAP_01_gmg_base_F: MRAP_01_base_F { class Turrets: Turrets { class MainTurret: MainTurret { + GVAR(Enabled) = 1; + GVAR(MaxDistance) = 2000; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + }; + }; + + class MRAP_01_hmg_base_F: MRAP_01_gmg_base_F { + /*class Turrets: Turrets { + class MainTurret: MainTurret {}; + };*/ + }; + + class B_MRAP_01_F: MRAP_01_base_F { + class Turrets; + }; + + class MRAP_02_base_F: Car_F {}; + + class MRAP_02_hmg_base_F: MRAP_02_base_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + GVAR(Enabled) = 1; + GVAR(MaxDistance) = 2000; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + }; + }; + + class MRAP_02_gmg_base_F: MRAP_02_hmg_base_F { + /*class Turrets: Turrets { + class MainTurret: MainTurret {}; + };*/ + }; + + class O_MRAP_02_F: MRAP_02_base_F { + class Turrets; + }; + + class MRAP_03_base_F: Car_F { + class Turrets: Turrets { + class CommanderTurret: MainTurret { GVAR(Enabled) = 0; }; }; }; - class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F {}; + class MRAP_03_hmg_base_F: MRAP_03_base_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + GVAR(Enabled) = 1; + GVAR(MaxDistance) = 2000; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + class CommanderTurret: CommanderTurret { + GVAR(Enabled) = 0; + }; + }; + }; + + class MRAP_03_gmg_base_F: MRAP_03_hmg_base_F { + /*class Turrets: Turrets { + class MainTurret: MainTurret {}; + class CommanderTurret: CommanderTurret {}; + };*/ + }; + + class APC_Wheeled_01_base_F: Wheeled_APC_F { + /*class Turrets: Turrets { + class MainTurret: MainTurret { + class Turrets: Turrets { + class CommanderOptics: CommanderOptics {}; + }; + }; + };*/ + }; + + class B_APC_Wheeled_01_base_F: APC_Wheeled_01_base_F {}; + + class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + GVAR(Enabled) = 1; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + }; + }; + + class APC_Wheeled_02_base_F: Wheeled_APC_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + GVAR(Enabled) = 1; + GVAR(MaxDistance) = 2000; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + + // class CommanderOptics: CommanderOptics {}; + }; + }; + + class APC_Wheeled_03_base_F: Wheeled_APC_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + GVAR(Enabled) = 1; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + + /*class Turrets: Turrets { + class CommanderOptics: CommanderOptics {}; + };*/ + }; + }; + }; + + class I_APC_Wheeled_03_base_F: APC_Wheeled_03_base_F {}; + + class I_APC_Wheeled_03_cannon_F: I_APC_Wheeled_03_base_F { + /*class Turrets: Turrets { + class MainTurret: MainTurret {}; + };*/ + }; + + class APC_Tracked_01_base_F: Tank_F { + /*class Turrets: Turrets { + class MainTurret: MainTurret { + class Turrets; + }; + };*/ + }; + + class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F { + /*class Turrets: Turrets { + class MainTurret: MainTurret {}; + };*/ + }; + + class B_APC_Tracked_01_rcws_F: B_APC_Tracked_01_base_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + GVAR(Enabled) = 1; + GVAR(MaxDistance) = 2000; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + class CommanderOptics: CommanderOptics {}; + }; + }; + + class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F { + //GVAR(Enabled) = 0; @todo + }; class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F { class Turrets: Turrets { class MainTurret: MainTurret { - GVAR(Enabled) = 1; - turretinfotype = "ACE_RscOptics_APC_Tracked_01_gunner"; - GVAR(MaxDistance) = 2000; discreteDistance[] = {}; discreteDistanceInitIndex = 0; magazines[] += {"ACE_120Rnd_35mm_ABM_shells_Tracer_Red"}; + + /*class Turrets: Turrets { + class CommanderOptics: CommanderOptics {}; + };*/ }; }; }; class APC_Tracked_02_base_F: Tank_F { - class Turrets: Turrets { + /*class Turrets: Turrets { class MainTurret: MainTurret { - GVAR(Enabled) = 0; + class Turrets: Turrets { + class CommanderOptics: CommanderOptics {}; + }; }; - }; + };*/ }; class O_APC_Tracked_02_base_F: APC_Tracked_02_base_F {}; - + + class O_APC_Tracked_02_cannon_F: O_APC_Tracked_02_base_F { + /*class Turrets: Turrets { + class MainTurret: MainTurret {}; + };*/ + }; + class O_APC_Tracked_02_AA_F: O_APC_Tracked_02_base_F { class Turrets: Turrets { class MainTurret: MainTurret { - GVAR(Enabled) = 1; - turretinfotype = "ACE_RscOptics_APC_Tracked_01_gunner"; - GVAR(MaxDistance) = 2000; - discreteDistance[] = {}; - discreteDistanceInitIndex = 0; magazines[] += {"ACE_120Rnd_35mm_ABM_shells_Tracer_Green"}; + + /*class Turrets: Turrets { + class CommanderOptics: CommanderOptics {}; + };*/ }; }; }; @@ -110,15 +292,72 @@ class CfgVehicles { class APC_Tracked_03_base_F: Tank_F { class Turrets: Turrets { class MainTurret: MainTurret { - GVAR(Enabled) = 0; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + + /*class Turrets: Turrets { + class CommanderOptics: CommanderOptics {}; + };*/ }; }; }; class MBT_01_base_F: Tank_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + + /*class Turrets: Turrets { + class CommanderOptics: CommanderOptics {}; + };*/ + }; + }; + }; + + class B_MBT_01_base_F: MBT_01_base_F {}; + + class B_MBT_01_cannon_F: B_MBT_01_base_F {}; + + class B_MBT_01_TUSK_F: B_MBT_01_cannon_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + + class Turrets: Turrets { + class CommanderOptics: CommanderOptics { + GVAR(Enabled) = 1; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + }; + + class MBT_01_arty_base_F: MBT_01_base_F { class Turrets: Turrets { class MainTurret: MainTurret { GVAR(Enabled) = 0; + + class Turrets: Turrets { + class CommanderOptics: CommanderOptics { + GVAR(Enabled) = 1; + GVAR(MaxDistance) = 2000; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + }; + + class MBT_01_mlrs_base_F: MBT_01_base_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + GVAR(Enabled) = 0; + //class Turrets; }; }; }; @@ -126,15 +365,78 @@ class CfgVehicles { class MBT_02_base_F: Tank_F { class Turrets: Turrets { class MainTurret: MainTurret { - GVAR(Enabled) = 0; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + + class Turrets: Turrets { + class CommanderOptics: CommanderOptics { + GVAR(Enabled) = 1; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + }; }; }; }; - - class MBT_03_base_F: Tank_F { + + class MBT_02_arty_base_F: MBT_02_base_F { class Turrets: Turrets { class MainTurret: MainTurret { GVAR(Enabled) = 0; + + class Turrets: Turrets { + class CommanderOptics: CommanderOptics { + GVAR(Enabled) = 1; + GVAR(MaxDistance) = 2000; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + }; + + class MBT_03_base_F: Tank_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + + class Turrets: Turrets { + class CommanderOptics: CommanderOptics { + GVAR(Enabled) = 1; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + }; + + // SHIPS + class Ship: AllVehicles { + class Turrets { + class MainTurret; + }; + }; + + class Ship_F: Ship {}; + + class Boat_F: Ship_F {}; + + class Boat_Armed_01_base_F: Boat_F { + class Turrets: Turrets { + class FrontTurret: NewTurret { + GVAR(enabled) = 1; + GVAR(minDistance) = 100; + GVAR(maxDistance) = 2000; + GVAR(distanceInterval) = 5; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + class RearTurret: FrontTurret { + discreteDistance[] = {100,200,300,400,600,800,1000,1200}; // Originally inherited from FrontTurret + discreteDistanceInitIndex = 4; }; }; }; @@ -148,7 +450,51 @@ class CfgVehicles { }; }; - class Helicopter_Base_F: Helicopter {}; + class Plane: Air {}; + + class Helicopter_Base_F: Helicopter { + class Turrets: Turrets { + class CopilotTurret; + }; + }; + + class Helicopter_Base_H: Helicopter_Base_F { + class Turrets: Turrets { + class CopilotTurret; + }; + }; + + class Heli_Light_01_base_F: Helicopter_Base_H { + /*class Turrets: Turrets { + class CopilotTurret: CopilotTurret {}; + };*/ + }; + + class Heli_Light_01_unarmed_base_F: Heli_Light_01_base_F {}; + + class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F { + /*class Turrets: Turrets { + class CopilotTurret: CopilotTurret {}; + };*/ + }; + + class Heli_Light_01_armed_base_F: Heli_Light_01_base_F { + /*class Turrets: Turrets { + class CopilotTurret: CopilotTurret {}; + };*/ + }; + + class Heli_Light_02_base_F: Helicopter_Base_H { + /*class Turrets: Turrets { + class CopilotTurret: CopilotTurret {}; + };*/ + }; + + class Plane_Base_F: Plane { + class Turrets { + class CopilotTurret; + }; + }; class Heli_Attack_01_base_F: Helicopter_Base_F { class Turrets: Turrets { @@ -169,4 +515,80 @@ class CfgVehicles { }; }; }; + + class Heli_Transport_01_base_F: Helicopter_Base_H { + /*class Turrets: Turrets { + class CopilotTurret: CopilotTurret {}; + class MainTurret: MainTurret {}; + class RightDoorGun: MainTurret {}; + };*/ + }; + + class Heli_Transport_02_base_F: Helicopter_Base_H { + /*class Turrets: Turrets { + class CopilotTurret: CopilotTurret {}; + };*/ + }; + + class Heli_light_03_base_F; + class I_Heli_light_03_base_F: Heli_light_03_base_F { + /*class Turrets: Turrets { + class MainTurret: MainTurret {}; + };*/ + }; + class I_Heli_light_03_F: Heli_light_03_base_F { + /*class Turrets: Turrets { + class MainTurret: MainTurret {}; + };*/ + }; + + class Plane_CAS_01_base_F: Plane_Base_F { + class Turrets; + }; + + class Plane_CAS_02_base_F: Plane_Base_F { + class Turrets; + }; + + class Plane_Fighter_03_base_F: Plane_Base_F { + class Turrets; + }; + + // static weapons. + class StaticWeapon: LandVehicle { + class Turrets { + class MainTurret; //: NewTurret {}; + }; + }; + + class StaticMGWeapon: StaticWeapon {}; + + class HMG_01_base_F: StaticMGWeapon { + class Turrets: Turrets { + class MainTurret: MainTurret { + GVAR(Enabled) = 1; + GVAR(MinDistance) = 200; + GVAR(MaxDistance) = 2000; + GVAR(DistanceInterval) = 5; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + }; + }; + + class StaticGrenadeLauncher: StaticWeapon {}; + class GMG_TriPod: StaticGrenadeLauncher {}; + + class GMG_01_base_F: GMG_TriPod { + class Turrets: Turrets { + class MainTurret: MainTurret { + GVAR(Enabled) = 1; + GVAR(MinDistance) = 200; + GVAR(MaxDistance) = 2000; + GVAR(DistanceInterval) = 5; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; + }; + }; + }; }; diff --git a/addons/fcs/CfgWeapons.hpp b/addons/fcs/CfgWeapons.hpp index 555060b119..760e39e2de 100644 --- a/addons/fcs/CfgWeapons.hpp +++ b/addons/fcs/CfgWeapons.hpp @@ -1,6 +1,15 @@ class CfgWeapons { + // disable locking, so it doesn't interfere with our system class CannonCore; + class cannon_120mm: CannonCore { + canLock = 0; + ballisticsComputer = 0; + }; + class autocannon_Base_F: CannonCore { + canLock = 0; + ballisticsComputer = 0; + }; class autocannon_35mm: CannonCore { canLock = 0; ballisticsComputer = 4; //was "4 + 2", 2 is for manual zeroing, 4 is for the lead indicator - https://community.bistudio.com/wiki/A3_Locking_Review#ballisticsComputer diff --git a/addons/fcs/XEH_postInit.sqf b/addons/fcs/XEH_postInit.sqf index ef6e89d5cc..02c9e72ae5 100644 --- a/addons/fcs/XEH_postInit.sqf +++ b/addons/fcs/XEH_postInit.sqf @@ -21,7 +21,3 @@ if (!hasInterface) exitWith {}; // Register event for global updates [QGVAR(forceUpdate), {[ACE_player] call FUNC(onForceUpdate)}] call CBA_fnc_addEventHandler; - -#ifdef DEBUG_MODE_FULL -call compile preprocessFileLineNumbers QPATHTOF(functions\dev_debugConfigs.sqf); -#endif diff --git a/addons/fcs/XEH_preInit.sqf b/addons/fcs/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/fcs/XEH_preInit.sqf +++ b/addons/fcs/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/fcs/functions/dev_debugConfigs.sqf b/addons/fcs/functions/dev_debugConfigs.sqf deleted file mode 100644 index 73abd89771..0000000000 --- a/addons/fcs/functions/dev_debugConfigs.sqf +++ /dev/null @@ -1,88 +0,0 @@ -// PabstMirror -#include "script_component.hpp" - -diag_log text format ["[ACE_FCS] ---------------"]; -private _vehicles = configProperties [configFile >> "CfgVehicles", "(isClass _x) && {2 == getNumber (_x >> 'scope')}", true]; -private _problemUIs = []; -{ - private _vehicleType = configName _x; - { - private _turret = _x; - private _config = [_vehicleType, _turret] call CBA_fnc_getTurret; - if (!isNull _config) then { - private _aceFCS = (getNumber (_config >> "ACE_FCS_Enabled")) == 1; - - private _vanillaFCS = false; - private _weapons = getArray (_config >> "weapons"); - { - private _weapon = _x; - private _ballisticComputer = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ballisticsComputer"); - _ballisticComputer = [_ballisticComputer, 5] call ace_common_fnc_toBin; - if ((_ballisticComputer select [(count _ballisticComputer) - 5, 1]) == "1") then { - _vanillaFCS = true; - if (_aceFCS) then {diag_log text format ["%1 -> %2: ACE FCS Enabled CONFLICTS with vanilla FCS [%3]", _vehicleType, _weapon, _ballisticComputer];}; - }; - } forEach _weapons; - - if (!(_weapons isEqualTo [])) then { - private _fcsMsg = switch (true) do { - // case ((!_vanillaFCS) && {!_aceFCS}): {"No FCS"}; - // case ((_vanillaFCS) && {_aceFCS}): {"CONFLICT FCS"}; - // case (_vanillaFCS): {"Vanilla FCS"}; - // case (_aceFCS): {"ACE FCS"}; - default {""}; - }; - if (_fcsMsg != "") then {diag_log text format ["%1: %2", _vehicleType, _fcsMsg];}; - }; - - if (_vanillaFCS) then { - private _dd = getArray (_config >> "discreteDistance"); - if (_dd isEqualTo []) exitWith {diag_log format ["%1->%2: discreteDistance with vanillaFCS [%3]", _vehicleType, _turret, _config];}; - }; - - if (true) then { - private _turretInfo = getText (_config >> "turretInfoType"); - private _infoConfig = configFile >> "RscInGameUI" >> _turretInfo; - if (!isNull _infoConfig) then { - private _idcList = []; - - private _fncGetIDCS = { - params ["_subConfig"]; - if (!isClass _subConfig) exitWith {diag_log "err";}; - private _controlsArray = getArray (_subConfig >> "controls"); - { - [_subConfig >> _x] call _fncGetIDCS; - } forEach _controlsArray; - private _controlsConfig = configProperties [(_subConfig >> "controls"), "isClass _x", true]; - { - [_x] call _fncGetIDCS; - } forEach _controlsConfig; - _idcList pushBack getNumber (_subConfig >> "idc"); - }; - [_infoConfig] call _fncGetIDCS; - - if (_aceFCS && {!(1713151 in _idcList)}) then { - _problemUIs pushBackUnique format ["%1: ACE_FCS, but missing ACE_CA_DIST", _turretInfo]; - }; - if (_aceFCS && {(198 in _idcList)}) then { - _problemUIs pushBackUnique format ["%1: ACE_FCS, but NEW Lazr CA_DIST", _turretInfo, _vehicleType]; - }; - if ((!_aceFCS) && {(1713151 in _idcList)}) then { - _problemUIs pushBackUnique format ["%1: Not ACE but has ACE_CA_DIST", _turretInfo, _vehicleType]; - }; - if (_vanillaFCS && {!(198 in _idcList)}) then { - _problemUIs pushBackUnique format ["%1: vanillaFCS but missing NEW Lazr CA_DIST [just a warning]", _turretInfo, _vehicleType]; - }; - }; - }; - }; - } forEach [[0],[0,0]]; -} forEach _vehicles; - -_problemUIs sort true; - -diag_log text format ["[ACE_FCS] ------- Problem UIs --------"]; -{ - diag_log text format ["- %1", _x]; -} forEach _problemUIs; -diag_log text format ["[ACE_FCS] ---------------"]; diff --git a/addons/fcs/functions/fnc_adjustRange.sqf b/addons/fcs/functions/fnc_adjustRange.sqf index 0f400a50fb..bed9389716 100644 --- a/addons/fcs/functions/fnc_adjustRange.sqf +++ b/addons/fcs/functions/fnc_adjustRange.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [bob, [], 5] call ace_fcs_fnc_adjustRange - * * Public: No */ #include "script_component.hpp" diff --git a/addons/fcs/functions/fnc_calculateSolution.sqf b/addons/fcs/functions/fnc_calculateSolution.sqf index f28a1c7048..61bfbd8c58 100644 --- a/addons/fcs/functions/fnc_calculateSolution.sqf +++ b/addons/fcs/functions/fnc_calculateSolution.sqf @@ -3,24 +3,20 @@ * Calculate FCS solution * * Arguments: - * 0: Vehicle - * 1: Turret - * 2: Target distance - * 3: Azimuth offset + * 0: Vehicle + * 1: Turret + * 2: Target distance + * 3: Azimuth offset * * Return Value: * None * - * Example: - * [car, [turret], 5, ?] call ace_fcs_fnc_calculateSolution - * * Public: No */ #include "script_component.hpp" params ["_vehicle","_turret","_distance","_angleTarget"]; TRACE_4("params",_vehicle,_turret,_distance,_angleTarget); -private _FCSInitSpeed = []; private _FCSMagazines = []; private _FCSElevation = []; private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); @@ -68,7 +64,6 @@ private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret private _offset = "ace_fcs" callExtension format ["%1,%2,%3,%4", _initSpeed, _airFriction, _angleTarget, _distance]; _offset = parseNumber _offset; - _FCSInitSpeed pushBack _initSpeed; _FCSMagazines pushBack _magazine; _FCSElevation pushBack _offset; }; @@ -76,6 +71,5 @@ private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret } count (_vehicle magazinesTurret _turret); [_vehicle, format ["%1_%2", QGVAR(Distance), _turret], _distance] call EFUNC(common,setVariablePublic); -[_vehicle, format ["%1_%2", QGVAR(InitSpeed), _turret], _FCSInitSpeed] call EFUNC(common,setVariablePublic); [_vehicle, format ["%1_%2", QGVAR(Magazines), _turret], _FCSMagazines] call EFUNC(common,setVariablePublic); [_vehicle, format ["%1_%2", QGVAR(Elevation), _turret], _FCSElevation] call EFUNC(common,setVariablePublic); diff --git a/addons/fcs/functions/fnc_canResetFCS.sqf b/addons/fcs/functions/fnc_canResetFCS.sqf index 8713357f3d..cf0dcf2674 100644 --- a/addons/fcs/functions/fnc_canResetFCS.sqf +++ b/addons/fcs/functions/fnc_canResetFCS.sqf @@ -3,14 +3,11 @@ * Called from config. Can player reset FCS? * * Arguments: - * None + * Nothing * * Return Value: * Boolean * - * Example: - * call ace_fcs_fnc_canResetFCS - * * Public: No */ #include "script_component.hpp" diff --git a/addons/fcs/functions/fnc_canUseRangefinder.sqf b/addons/fcs/functions/fnc_canUseRangefinder.sqf index a8b8239097..7403c74ac1 100644 --- a/addons/fcs/functions/fnc_canUseRangefinder.sqf +++ b/addons/fcs/functions/fnc_canUseRangefinder.sqf @@ -8,9 +8,6 @@ * Return Value: * Boolean * - * Example: - * call ace_fcs_fnc_canUseRangeFinder - * * Public: No */ #include "script_component.hpp" diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf index 097722c958..4c9b7d8b85 100644 --- a/addons/fcs/functions/fnc_firedEH.sqf +++ b/addons/fcs/functions/fnc_firedEH.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * call ace_fcs_fnc_firedEH - * * Public: No */ #include "script_component.hpp" @@ -22,37 +19,17 @@ private _FCSMagazines = _vehicle getVariable [format ["%1_%2", QGVAR(Magazines), if !(_magazine in _FCSMagazines) exitWith {}; -private _FCSInitSpeed = _vehicle getVariable format ["%1_%2", QGVAR(InitSpeed), _turret]; private _FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret]; -// GET ELEVATION OFFSET AND INITSPEED OF CURRENT MAGAZINE +// GET ELEVATION OFFSET OF CURRENT MAGAZINE private _offset = 0; -private _initSpeed = 0; + { if (_x == _magazine) exitWith { _offset = _FCSElevation select _forEachIndex; - _initSpeed = _FCSInitSpeed select _forEachIndex; }; } forEach _FCSMagazines; -// Calculate the correction due to vanilla zeroing -private _zeroDistance = currentZeroing _gunner; -if (_zeroDistance > 0) then { - private _weaponCombo = [_weapon, _magazine, _ammo, _zeroDistance]; - if !(_weaponCombo isEqualTo (_gunner getVariable [QGVAR(lastWeaponCombo), []])) then { - private _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammo >> "airFriction"); - private _antiOffset = "ace_fcs" callExtension format ["%1,%2,%3,%4", _initSpeed, _airFriction, 0, _zeroDistance]; - _antiOffset = parseNumber _antiOffset; - - _gunner setVariable [QGVAR(lastWeaponCombo), _weaponCombo]; - _gunner setVariable [QGVAR(lastAntiOffset), _antiOffset]; - }; - private _antiOffset = _gunner getVariable QGVAR(lastAntiOffset); - - _offset = _offset - _antiOffset; - TRACE_4("fired",_gunner, currentZeroing _gunner, _antiOffset, _offset); -}; - [_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, 0] call EFUNC(common,changeProjectileDirection); // Remove the platform velocity @@ -67,7 +44,7 @@ if (vectorMagnitude velocity _vehicle > 2) then { if (!local _gunner) exitWith {}; if (getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(Airburst)) == 1) then { - private _zeroing = _vehicle getVariable [format ["%1_%2", QGVAR(Distance), _turret], currentZeroing _gunner]; + private _zeroing = _vehicle getVariable [format ["%1_%2", QGVAR(Distance), _turret], currentZeroing _vehicle]; if (_zeroing < 50) exitWith {}; if (_zeroing > 1500) exitWith {}; diff --git a/addons/fcs/functions/fnc_getAngle.sqf b/addons/fcs/functions/fnc_getAngle.sqf index d9e14a343b..d2c51a9542 100644 --- a/addons/fcs/functions/fnc_getAngle.sqf +++ b/addons/fcs/functions/fnc_getAngle.sqf @@ -14,9 +14,6 @@ * Return Value: * offset from the current angle necessary to hit the target * - * Example: - * [1, 2, 3, 4, 5, 6, 7] call ace_fcs_fnc_getAngle - * * Public: No */ #include "script_component.hpp" diff --git a/addons/fcs/functions/fnc_getRange.sqf b/addons/fcs/functions/fnc_getRange.sqf index 829e4c9072..ba49621047 100644 --- a/addons/fcs/functions/fnc_getRange.sqf +++ b/addons/fcs/functions/fnc_getRange.sqf @@ -11,9 +11,6 @@ * Return Value: * Measured distance * - * Example: - * [5, 6, 7, true] call ace_fcs_fnc_getRange - * * Public: No */ #include "script_component.hpp" diff --git a/addons/fcs/functions/fnc_handleAirBurstAmmunitionPFH.sqf b/addons/fcs/functions/fnc_handleAirBurstAmmunitionPFH.sqf index 4c1c210994..aa166ece12 100644 --- a/addons/fcs/functions/fnc_handleAirBurstAmmunitionPFH.sqf +++ b/addons/fcs/functions/fnc_handleAirBurstAmmunitionPFH.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [[array]] call ace_fcs_fnc_handleAirBurstAummunitionPFH - * * Public: No */ #include "script_component.hpp" diff --git a/addons/fcs/functions/fnc_keyDown.sqf b/addons/fcs/functions/fnc_keyDown.sqf index 01795ce280..3c4943badf 100644 --- a/addons/fcs/functions/fnc_keyDown.sqf +++ b/addons/fcs/functions/fnc_keyDown.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [car, [turret]] call ace_fcs_fnc_keyDown - * * Public: No */ #include "script_component.hpp" diff --git a/addons/fcs/functions/fnc_keyUp.sqf b/addons/fcs/functions/fnc_keyUp.sqf index d35174a198..a07f5d5d35 100644 --- a/addons/fcs/functions/fnc_keyUp.sqf +++ b/addons/fcs/functions/fnc_keyUp.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [car, [turret]] call ace_fcs_fnc_keyUp - * * Public: No */ #include "script_component.hpp" diff --git a/addons/fcs/functions/fnc_onForceUpdate.sqf b/addons/fcs/functions/fnc_onForceUpdate.sqf index 1bbaee5b58..2c6d136300 100644 --- a/addons/fcs/functions/fnc_onForceUpdate.sqf +++ b/addons/fcs/functions/fnc_onForceUpdate.sqf @@ -1,19 +1,3 @@ -/* - * Author: ACE-Team - * - * - * Arguments: - * Nothing - * - * Return Value: - * None - * - * Example: - * call ace_fcs_fnc_onForceUpdate - * - * Public: No - */ - #include "script_component.hpp" params ["_unit"]; diff --git a/addons/fcs/functions/fnc_reset.sqf b/addons/fcs/functions/fnc_reset.sqf index 9d4a5f65a0..dcb1718b3f 100644 --- a/addons/fcs/functions/fnc_reset.sqf +++ b/addons/fcs/functions/fnc_reset.sqf @@ -7,10 +7,7 @@ * 1: Turret * * Return Value: - * None - * - * Example: - * [car, [turret]] call ace_fcs_fnc_reset + * none * * Public: No */ diff --git a/addons/fcs/functions/fnc_updateRangeHUD.sqf b/addons/fcs/functions/fnc_updateRangeHUD.sqf index 2e415b3f49..0bb15b2507 100644 --- a/addons/fcs/functions/fnc_updateRangeHUD.sqf +++ b/addons/fcs/functions/fnc_updateRangeHUD.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * call ace_fcs_fnc_updateRangeHUD - * * Public: No */ #include "script_component.hpp" diff --git a/addons/fcs/functions/fnc_vehicleInit.sqf b/addons/fcs/functions/fnc_vehicleInit.sqf index 47b8359b2b..901e0477ab 100644 --- a/addons/fcs/functions/fnc_vehicleInit.sqf +++ b/addons/fcs/functions/fnc_vehicleInit.sqf @@ -3,13 +3,10 @@ * Checks if a vehicle is equipped with an FCS and if so, adds the fired event handler. Execute on server. * * Arguments: - * 0: Vehicle + * 0: Vehicle * * Return Value: - * None - * - * Example: - * [car] call ace_fcs_fnc_vehicleInit + * none * * Public: No */ diff --git a/addons/fcs/script_component.hpp b/addons/fcs/script_component.hpp index 805d723cd7..6f5aa2cc86 100644 --- a/addons/fcs/script_component.hpp +++ b/addons/fcs/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_FCS diff --git a/addons/fcs/stringtable.xml b/addons/fcs/stringtable.xml index 9e776f34cd..2623351972 100644 --- a/addons/fcs/stringtable.xml +++ b/addons/fcs/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Célpont lézerezése / Távolság Bemérése Misura la distanza Marcar com laser / Medir Distância - レーザー ターゲット / 計測距離 - 목표까지 거리를 레이저로 취득 - 雷射指示目标 / 测量距离 - 雷射指示目標 / 測量距離 Zeroed To @@ -28,10 +24,6 @@ Nullázási táv Fixado em Azzeramento a - 次にゼロイン - 영점 조절 - 归零到 - 歸零到 Adjust FCS Range (Up) @@ -44,10 +36,6 @@ Ajustar distância do FCS (Acima) Aumentare la distanza dell'FCS Диапазон СУО (Выше) - FCS による距離を調節 (上げ) - 사통장치 거리 조정 (위로) - 调整火控系统距离 (上) - 調整火控系統距離 (上) Adjust FCS Range (Down) @@ -60,10 +48,6 @@ Ajustar distância do FCS (Abaixo) Ridurre la distanza dell'FCS Диапазон СУО (Ниже) - FCS による距離を調節 (下げ) - 사통장치 거리 조정 (아래로) - 调整火控系统距离 (下) - 調整火控系統距離 (下) Reset FCS @@ -76,10 +60,6 @@ Reiniciar FCS Azzeramento dell'FCS Обнулить СУО - FCS を初期化 - 사통장치 초기화 - 重置火控系统 - 重置火控系統 FCS has been reset. @@ -92,10 +72,6 @@ FCS reiniciado. L'FCS è stato azzerato СУО обнулен. - FCS は初期化された - 사통장치 초기화됨 - 火控系统已被重置 - 火控系統已被重置 - + \ No newline at end of file diff --git a/addons/finger/XEH_preInit.sqf b/addons/finger/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/finger/XEH_preInit.sqf +++ b/addons/finger/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/finger/functions/fnc_moduleSettings.sqf b/addons/finger/functions/fnc_moduleSettings.sqf index 4667e76c51..c5189f4562 100644 --- a/addons/finger/functions/fnc_moduleSettings.sqf +++ b/addons/finger/functions/fnc_moduleSettings.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [logic] call ace_finger_fnc_moduleSettings - * * Public: No */ diff --git a/addons/finger/functions/fnc_perFrameEH.sqf b/addons/finger/functions/fnc_perFrameEH.sqf index a28a30ef96..94ea4fe067 100644 --- a/addons/finger/functions/fnc_perFrameEH.sqf +++ b/addons/finger/functions/fnc_perFrameEH.sqf @@ -24,7 +24,6 @@ if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "Stat private _iconSize = BASE_SIZE * 0.10713 * (call EFUNC(common,getZoom)); [+GVAR(fingersHash), { - //IGNORE_PRIVATE_WARNING ["_key", "_value"]; _value params ["_lastTime", "_pos", "_name"]; private _timeLeftToShow = _lastTime + FP_TIMEOUT - diag_tickTime; if (_timeLeftToShow <= 0) then { diff --git a/addons/finger/script_component.hpp b/addons/finger/script_component.hpp index 690f814b0d..85abc395f5 100644 --- a/addons/finger/script_component.hpp +++ b/addons/finger/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_FINGER diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml index b6dc3c5f87..113b3e5c2e 100644 --- a/addons/finger/stringtable.xml +++ b/addons/finger/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Mostrar el indicador de señalado a uno mismo Zobrazit ukázání směru pro sebe Mostra puntatore per te stesso - 自分にポインティング表記を表示する - 자신이 가리키는곳을 보여줍니다 - 显示指向指示器给自己 - 顯示指向指示器給自己 Render the indicator for the pointing player. This option doesn't affect whether the other players would see the indicator @@ -28,10 +24,6 @@ Muestra el indicador para el jugador que apunta. Esta opción no afecta si los otros jugadores verían el indicador Zobrazit infikátor, když ukážete prstem. Tato volba nemá vliv, zda ostatní hráči uvidí indikátor nebo ne. Mostra puntatore per il giocatore indicato. Questa opzione non influisce la possibilità che gli altri giocatori vedano il puntatore - プレイヤーへのポインティング表記を描画します。このオプションは他のプレイヤーの表記に影響しません。 - 대상이 가리키는곳을 보이게 합니다. - 显示指向指示器给玩家自己. 此选项设定并不影响其他玩家能否看到指示器. - 顯示指向指示器給玩家自己. 此選項設定並不影響其他玩家能否看到指示器. Pointing indicator @@ -44,10 +36,6 @@ Indicador de señalado Ukazování směru Indicatore di puntamento - ポインティング表記 - 가리키기 표시기 - 指向指示器 - 指向指示器 Color of the pointing indicator circle @@ -60,10 +48,6 @@ Color del círculo indicador que señala Barva kruhu pro ukázání směru Colore del cerchio dell'indicatore di puntamento - ポインティング表記の円の色 - 가리키기의 원형 색상 - 指向指示器颜色 - 指向指示器顏色 Action "point a finger at" @@ -76,10 +60,6 @@ Acción "apuntar con el dedo a" Akce "ukázat prstem na" Azione "punta il dito a" - "point a finger at"キー - "손가락으로 가리키기"행동 - 使"手指指向在" - 使"手指指向在" Points, and shows a virtual marker of where you are looking to nearby units. Can be held down. @@ -92,10 +72,6 @@ Señala y muestra un marcador virtual donde ustás apuntando para las unidades cercanas. Puede ser mantenido. Ukazuje virtuální značku kruhu ve směru, kterým se díváte pro všechny blízké jednotky. Punta e mostra un marker virtuale di dove stai guardando alle unità vicine. Può essere tenuto premuto. - ポイント、そして架空のマーカー表記は自ユニットの近くにいると表記されます。これは押しっぱなしにできます。 - 당신이 보는것을 가상의 마커로 표시함으로서 다른 인원이 볼 수 있게 합니다. 누른채로 유지할 수 있습니다. - 当按下此按键后, 你附近的单位即可看见一个虚拟图示, 标明你正在指向的位置. 此按键可以被按住来持续显示. - 當按下此按鍵後, 你附近的單位即可看見一個虛擬圖示, 標明你正在指向的位置. 此按鍵可以被按住來持續顯示. Pointing Settings @@ -108,10 +84,6 @@ Ajustes de señalado Nastavení ukázování směru Impostazioni puntamento - ポインティング設定 - 가리키기 설정 - 指向设定 - 指向設定 Pointing Enabled @@ -124,10 +96,6 @@ Señalado habilitado Ukazování povoleno Puntamento abilitato - ポインティングを有効 - 가리키기 활성화 - 指向系统启动 - 指向系統啟動 Pointing Max Range @@ -140,10 +108,6 @@ Distancia máxima de señalado Maximální dosah pro ukazování směru Raggio massimo puntamento - ポインティングの最大範囲 - 가리키기 최대 범위 - 指向指示器最大显示距离 - 指向指示器最大顯示距離 Max range between players to show the pointing indicator [default: 4 meters] @@ -156,10 +120,6 @@ Distancia máxima entre los jugadores para mostrar el indicador que señala [por defecto: 4 metros] Maximální vzdálenost mezi hráči pro ukázání směru [výchozí: 4 metry] Distanza massima tra giocatori per mostrare l'indicatore di puntamento [default: 4 metri] - ポインティング表記が他のプレイヤーに表示される範囲を決定できます。(標準 4 メートル) - 플레이어 사이에서 가리키기 표시를 보이게 하는 최대거리를 설정합니다[기본설정: 4 미터] - 设定指向指示器最大显示距离. [预设: 4公尺] - 設定指向指示器最大顯示距離. [預設: 4公尺] - + \ No newline at end of file diff --git a/addons/flashlights/script_component.hpp b/addons/flashlights/script_component.hpp index 9b2b9e30be..3c89c041c5 100644 --- a/addons/flashlights/script_component.hpp +++ b/addons/flashlights/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_FLASHLIGHTS diff --git a/addons/flashlights/stringtable.xml b/addons/flashlights/stringtable.xml index d896d3724a..d8719d95ae 100644 --- a/addons/flashlights/stringtable.xml +++ b/addons/flashlights/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -11,10 +11,6 @@ Fulton MX-991 Fulton MX-991 Fulton MX-991 - Fulton MX-991 - Fulton MX-991 - Fulton MX-991 - Fulton MX-991 Flashlight with red filter. For use on map. @@ -26,10 +22,6 @@ Linterna con filtro rojo. Para su uso en el mapa. Torcia con filtro rosso. Da usare in mappa. Lampe torche avec un filtre rouge. Pour utilisation sur carte. - 赤色フィルタ付きのフラッシュライト。地図上でつかいます。 - 빨간색 필터가 달린 손전등입니다. 지도를 비출때 씁니다. - 拥有红色滤光片的手电筒. 用来照亮地图. - 擁有紅色濾光片的手電筒. 用來照亮地圖. Maglite XL50 @@ -41,10 +33,6 @@ Maglite XL50 Maglite XL50 Maglite XL50 - Maglite XL50 - Maglite XL50 - Maglite XL50 - Maglite XL50 White mini flashlight. For use on map. @@ -56,10 +44,6 @@ Mini linterna blanca. Para su uso en el mapa. Mini-torcia bianca. Da usare in mappa. Mini lampe torche blanche. Pour utilisation sur carte. - 白色光の小さなフラッシュライト。地図上でつかいます。 - 하얀색 조그마한 손전등. 지도를 비출때 씁니다. - 白色的迷你手电筒. 用来照亮地图. - 白色的迷你手電筒. 用來照亮地圖. KSF-1 @@ -71,10 +55,6 @@ KSF-1 KSF-1 KSF-1 - KSF-1 - KSF-1 - KSF-1 - KSF-1 Flashlight with red filter. For use on map. @@ -86,10 +66,6 @@ Linterna con filtro rojo. Para su uso en el mapa. Torcia con filtro rosso. Da usare in mappa. Lampe torche avec un filtre rouge. Pour utilisation sur carte. - 赤色フィルタ付きのフラッシュライト。地図上でつかいます。 - 빨간색 필터가 달린 손전등입니다. 지도를 비출때 씁니다. - 拥有红色滤光片的手电筒. 用来照亮地图. - 擁有紅色濾光片的手電筒. 用來照亮地圖. - + \ No newline at end of file diff --git a/addons/flashsuppressors/CfgWeapons.hpp b/addons/flashsuppressors/CfgWeapons.hpp index bf5aee16f1..e807dc2ae9 100644 --- a/addons/flashsuppressors/CfgWeapons.hpp +++ b/addons/flashsuppressors/CfgWeapons.hpp @@ -9,12 +9,6 @@ class asdg_MuzzleSlot_762: asdg_MuzzleSlot { // for 7.62x51 universal mount supp ACE_muzzle_mzls_B = 1; }; }; -class asdg_MuzzleSlot_65: asdg_MuzzleSlot_762 { // for 6.5 weapons, mostly to deal with BIS vanilla compatibility - class compatibleItems: compatibleItems { - ACE_muzzle_mzls_H = 1; - ACE_muzzle_mzls_B = 0; - }; -}; class asdg_MuzzleSlot_93x64: asdg_MuzzleSlot { // for 9.3x64 universal mount suppressors class compatibleItems { ACE_muzzle_mzls_93mmg = 1; @@ -25,11 +19,6 @@ class asdg_MuzzleSlot_9MM_SMG: asdg_MuzzleSlot { // for 9x19mm universal mount S ACE_muzzle_mzls_smg_02 = 1; }; }; -class asdg_MuzzleSlot_9MM: asdg_MuzzleSlot { // for 9x19mm universal mount pistol suppressors - class compatibleItems { - ACE_muzzle_mzls_smg_02 = 1; - }; -}; class asdg_MuzzleSlot_556: asdg_MuzzleSlot { // for 5.56x45 universal mount suppressors class compatibleItems { ACE_muzzle_mzls_L = 1; @@ -40,16 +29,12 @@ class asdg_MuzzleSlot_45ACP_SMG: asdg_MuzzleSlot { // for .45ACP universal mount ACE_muzzle_mzls_smg_01 = 1; }; }; -class asdg_MuzzleSlot_45ACP: asdg_MuzzleSlot { // for .45ACP universal mount pistol suppressors - class compatibleItems { - ACE_muzzle_mzls_smg_01 = 1; - }; -}; class asdg_MuzzleSlot_762MG: asdg_MuzzleSlot { // for 7.62, 6.5 and 5.56 universal mount MG suppressors class compatibleItems { ACE_muzzle_mzls_B = 1; }; }; + class MuzzleSlot; class CfgWeapons { @@ -59,6 +44,100 @@ class CfgWeapons { class WeaponSlotsInfo; }; + /* MX */ + class arifle_MX_Base_F: Rifle_Base_F { + class WeaponSlotsInfo; + }; + + class arifle_MXC_F: arifle_MX_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; + }; + }; + }; + class arifle_MX_F: arifle_MX_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; + }; + }; + }; + class arifle_MX_GL_F: arifle_MX_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; + }; + }; + }; + class arifle_MX_SW_F: arifle_MX_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: asdg_MuzzleSlot_762MG { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; + }; + }; + }; + class arifle_MXM_F: arifle_MX_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; + }; + }; + }; + + + /* Katiba */ + + class arifle_Katiba_Base_F: Rifle_Base_F { + class WeaponSlotsInfo; + }; + class arifle_Katiba_F: arifle_Katiba_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; + }; + }; + }; + class arifle_Katiba_C_F: arifle_Katiba_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; + }; + }; + }; + class arifle_Katiba_GL_F: arifle_Katiba_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; + }; + }; + }; + + /* Other */ class LMG_Mk200_F: Rifle_Long_Base_F { class WeaponSlotsInfo: WeaponSlotsInfo { @@ -71,6 +150,56 @@ class CfgWeapons { }; }; + /* Pistols */ + + class Pistol; + class Pistol_Base_F: Pistol { + class WeaponSlotsInfo; + }; + + class hgun_P07_F: Pistol_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE"; + compatibleItems[] += {"ACE_muzzle_mzls_smg_02"}; + }; + }; + }; + + class hgun_Rook40_F: Pistol_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE"; + compatibleItems[] += {"ACE_muzzle_mzls_smg_02"}; + }; + }; + }; + + class hgun_ACPC2_F: Pistol_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_smg_01"}; + }; + }; + }; + + class hgun_Pistol_heavy_01_F: Pistol_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_smg_01"}; + }; + }; + }; + + /*class hgun_Pistol_heavy_02_F: Pistol_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE"; + compatibleItems[] += {"ACE_muzzle_mzls_smg_01"}; + }; + }; + };*/ + /* Flashsuppressors */ diff --git a/addons/flashsuppressors/script_component.hpp b/addons/flashsuppressors/script_component.hpp index 6dcc21780a..cfc61f8990 100644 --- a/addons/flashsuppressors/script_component.hpp +++ b/addons/flashsuppressors/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_FLASHSUPPRESSORS diff --git a/addons/flashsuppressors/stringtable.xml b/addons/flashsuppressors/stringtable.xml index 52563ea1c4..f075f1aa34 100644 --- a/addons/flashsuppressors/stringtable.xml +++ b/addons/flashsuppressors/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Cache-flamme (6,5 mm) Пламегаситель (6,5 мм) Bocacha (6,5 mm) - 消炎器 (6.5 mm) - 소염기 (6.5 mm) - 消光器 (6.5 mm) - 消光器 (6.5 mm) Flash Suppressor (7.62 mm) @@ -28,10 +24,6 @@ Cache-flamme (7,62 mm) Пламегаситель (7,62 мм) Bocacha (7,62 mm) - 消炎器 (7.62 mm) - 소염기 (7.62 mm) - 消光器 (7.62 mm) - 消光器 (7.62 mm) Flash Suppressor (5.56 mm) @@ -44,10 +36,6 @@ Cache-flamme (5,56 mm) Пламегаситель (5,56 мм) Bocacha (5,56 mm) - 消炎器 (5.56 mm) - 소염기 (5.56 mm) - 消光器 (5.56 mm) - 消光器 (5.56 mm) Flash Suppressor (.45 ACP) @@ -60,10 +48,6 @@ Cache-flamme (.45 ACP) Пламегаситель (.45 ACP) Bocacha (.45 ACP) - 消炎器 (.45 ACP) - 소염기 (.45 ACP) - 消光器 (.45 ACP) - 消光器 (.45 ACP) Flash Suppressor (9 mm) @@ -76,10 +60,6 @@ Cache-flamme (9 mm) Пламегаситель (9 мм) Bocacha (9 mm) - 消炎器 (9 mm) - 소염기 (9 mm) - 消光器 (9 mm) - 消光器 (9 mm) Flash Suppressor (.338) @@ -92,10 +72,6 @@ Cache-flamme (.338) Пламегаситель (.338) Bocacha (.338) - 消炎器 (.338) - 소염기 (.338) - 消光器 (.338) - 消光器 (.338) Flash Suppressor (9.3 mm) @@ -108,10 +84,6 @@ Cache-flamme (9,3 mm) Пламегаситель (9,3 мм) Bocacha (9,3 mm) - 消炎器 (9.3 mm) - 소염기 (9.3 mm) - 消光器 (9.3 mm) - 消光器 (9.3 mm) - + \ No newline at end of file diff --git a/addons/fonts/script_component.hpp b/addons/fonts/script_component.hpp index 23e7f42f80..735276e31c 100644 --- a/addons/fonts/script_component.hpp +++ b/addons/fonts/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_FONTS diff --git a/addons/frag/$PBOPREFIX$ b/addons/frag/$PBOPREFIX$ index bc4c9e8dc9..ddf45c738b 100644 --- a/addons/frag/$PBOPREFIX$ +++ b/addons/frag/$PBOPREFIX$ @@ -1 +1 @@ -z\ace\addons\frag +z\ace\addons\frag \ No newline at end of file diff --git a/addons/frag/ACE_Settings.hpp b/addons/frag/ACE_Settings.hpp index 63a3d564d2..4dfa172bb3 100644 --- a/addons/frag/ACE_Settings.hpp +++ b/addons/frag/ACE_Settings.hpp @@ -25,13 +25,21 @@ class ACE_Settings { displayName = CSTRING(MaxTrack); description = CSTRING(MaxTrack_Desc); typeName = "SCALAR"; - value = 10; + value = 500; }; class GVAR(maxTrackPerFrame) { category = CSTRING(Module_DisplayName); displayName = CSTRING(MaxTrackPerFrame); description = CSTRING(MaxTrackPerFrame_Desc); typeName = "SCALAR"; - value = 10; + value = 50; + }; + + class GVAR(enableDebugTrace) { + category = CSTRING(Module_DisplayName); + displayName = CSTRING(EnableDebugTrace); + description = CSTRING(EnableDebugTrace_Desc); + typeName = "BOOL"; + value = 0; }; }; diff --git a/addons/frag/CfgAmmo.hpp b/addons/frag/CfgAmmo.hpp index bff5a49ffa..3da01ac29b 100644 --- a/addons/frag/CfgAmmo.hpp +++ b/addons/frag/CfgAmmo.hpp @@ -1,31 +1,16 @@ -#define BASE_DRAG -0.01 -#define HD_MULT 5 -#define BASE_DRAG_HD (BASE_DRAG * HD_MULT) +#define BASE_DRAG -0.01 +#define HD_MULT 5 +#define BASE_DRAG_HD (BASE_DRAG*HD_MULT) class CfgAmmo { + //class ace_arty_105mm_m1_m782_time; + //class ace_arty_105mm_m1_m782_prox: ace_arty_105mm_m1_m782_time {}; + //class ace_arty_105mm_m1_m782_delay: ace_arty_105mm_m1_m782_prox { + // GVAR(skip) = 1; + //}; - // ~~~~ Bombs: - class LaserBombCore; - class Bo_GBU12_LGB: LaserBombCore { - 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 Bomb_04_F: LaserBombCore { - 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 { + class Bo_GBU12_LGB; + class ACE_GBU12 : Bo_GBU12_LGB { GVAR(enabled) = 1; GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large), QGVAR(huge), QGVAR(huge_HD), QGVAR(huge)}; @@ -33,9 +18,11 @@ class CfgAmmo { GVAR(charge) = 87000; GVAR(gurney_c) = 2320; GVAR(gurney_k) = 1/2; + sideAirFriction = 0.04; + airFriction = 0.04; + laserLock = 0; }; - // ~~~~ Grenades: class GrenadeBase; class Grenade; class GrenadeHand: Grenade { @@ -60,6 +47,41 @@ class CfgAmmo { class SmokeShell: GrenadeHand { GVAR(skip) = 1; }; + + class RocketBase; + class R_Hydra_HE: RocketBase { + // 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 R_57mm_HE: RocketBase { + // GVAR(skip) = 1; + //}; + + class R_80mm_HE: RocketBase { + GVAR(skip) = 1; + }; + + //class R_S8T_AT: RocketBase { + // GVAR(skip) = 1; + //}; + + 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; + }; + class G_40mm_HE: GrenadeBase { // Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M441 GVAR(enabled) = 1; @@ -82,8 +104,10 @@ class CfgAmmo { 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_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; @@ -93,94 +117,6 @@ class CfgAmmo { 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"}; - }; - - - // ~~~~ 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 ACE_Hellfire_AGM114K: M_PG_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 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 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; @@ -194,7 +130,7 @@ class CfgAmmo { GVAR(gurney_c) = 2440; GVAR(gurney_k) = 1/2; }; - class Sh_82mm_AMOS: Sh_155mm_AMOS { + class Sh_82mm_AMOS : Sh_155mm_AMOS { // Source: http://www.arsenal-bg.com/defense_police/mortar_bombs_82mm.htm GVAR(enabled) = 1; @@ -213,7 +149,7 @@ class CfgAmmo { GVAR(gurney_c) = 2320; GVAR(gurney_k) = 1/2; }; - class Sh_105mm_HEAT_MP: Sh_125mm_HEAT { + class Sh_105mm_HEAT_MP : Sh_125mm_HEAT { GVAR(enabled) = 1; GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; @@ -222,7 +158,7 @@ class CfgAmmo { GVAR(gurney_c) = 2800; GVAR(gurney_k) = 1/2; }; - class Sh_120mm_HE: ShellBase { + class Sh_120mm_HE : ShellBase { GVAR(enabled) = 1; GVAR(classes)[] = {QGVAR(medium), QGVAR(medium_HD)}; @@ -250,6 +186,200 @@ class CfgAmmo { GVAR(gurney_k) = 1/2; }; + //class R_230mm_HE; + //class ModuleOrdnanceRocket_F_ammo: R_230mm_HE { + //}; + + //class R_230mm_fly; + //class ModuleOrdnanceRocket_F_subammo: R_230mm_fly { + //}; + // end of curator ammo entries + + //class R_SMAW_HEDP; + //class R_MEEWS_HEDP : R_SMAW_HEDP { + // GVAR(force) = 1; + // GVAR(multiplier) = 1.2; + //}; + + class MissileBase; + 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 M_Hellfire_AT: MissileBase { + // 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 B_762x51_Ball; + class GVAR(base): B_762x51_Ball { ////TODO: B_762x45_Ball no longer exists, is this a valid replacement? + model = "\A3\Weapons_f\ammo\shell"; + timeToLive = 12; + typicalSpeed = 800; + // Fix sounds + effectFly = "AmmoClassic"; + soundDefault1[] = {"A3\sounds_f\weapons\hits\concrete_1.wav",0.158114,1,30}; + soundDefault2[] = {"A3\sounds_f\weapons\hits\concrete_2.wav",0.158114,1,30}; + soundDefault3[] = {"A3\sounds_f\weapons\hits\concrete_3.wav",0.158114,1,30}; + soundDefault4[] = {"A3\sounds_f\weapons\hits\concrete_4.wav",0.158114,1,30}; + soundDefault5[] = {"A3\sounds_f\weapons\hits\concrete_5.wav",0.158114,1,30}; + soundDefault6[] = {"A3\sounds_f\weapons\hits\concrete_6.wav",0.158114,1,30}; + soundDefault7[] = {"A3\sounds_f\weapons\hits\concrete_7.wav",0.158114,1,30}; + soundDefault8[] = {"A3\sounds_f\weapons\hits\concrete_8.wav",0.158114,1,30}; + soundGroundSoft1[] = {"A3\sounds_f\weapons\hits\soft_ground_1.wav",0.02811705,1,30}; + soundGroundSoft2[] = {"A3\sounds_f\weapons\hits\soft_ground_2.wav",0.02811705,1,30}; + soundGroundSoft3[] = {"A3\sounds_f\weapons\hits\soft_ground_3.wav",0.02811705,1,30}; + soundGroundSoft4[] = {"A3\sounds_f\weapons\hits\soft_ground_4.wav",0.02811705,1,30}; + soundGroundSoft5[] = {"A3\sounds_f\weapons\hits\soft_ground_5.wav",0.02811705,1,30}; + soundGroundSoft6[] = {"A3\sounds_f\weapons\hits\soft_ground_6.wav",0.02811705,1,30}; + soundGroundSoft7[] = {"A3\sounds_f\weapons\hits\soft_ground_7.wav",0.02811705,1,30}; + soundGroundSoft8[] = {"A3\sounds_f\weapons\hits\soft_ground_8.wav",0.02811705,1,30}; + soundGroundHard1[] = {"A3\sounds_f\weapons\hits\hard_ground_1.wav",0.62946,1,40}; + soundGroundHard2[] = {"A3\sounds_f\weapons\hits\hard_ground_2.wav",0.62946,1,40}; + soundGroundHard3[] = {"A3\sounds_f\weapons\hits\hard_ground_3.wav",0.62946,1,40}; + soundGroundHard4[] = {"A3\sounds_f\weapons\hits\hard_ground_4.wav",0.62946,1,40}; + soundGroundHard5[] = {"A3\sounds_f\weapons\hits\hard_ground_5.wav",0.62946,1,40}; + soundGroundHard6[] = {"A3\sounds_f\weapons\hits\hard_ground_6.wav",0.62946,1,40}; + soundGroundHard7[] = {"A3\sounds_f\weapons\hits\hard_ground_7.wav",0.62946,1,40}; + soundGroundHard8[] = {"A3\sounds_f\weapons\hits\hard_ground_8.wav",0.62946,1,40}; + soundMetal1[] = {"A3\sounds_f\weapons\hits\metal_1.wav",0.158114,1,45}; + soundMetal2[] = {"A3\sounds_f\weapons\hits\metal_2.wav",0.158114,1,45}; + soundMetal3[] = {"A3\sounds_f\weapons\hits\metal_3.wav",0.158114,1,45}; + soundMetal4[] = {"A3\sounds_f\weapons\hits\metal_4.wav",0.158114,1,45}; + soundMetal5[] = {"A3\sounds_f\weapons\hits\metal_5.wav",0.158114,1,45}; + soundMetal6[] = {"A3\sounds_f\weapons\hits\metal_6.wav",0.158114,1,45}; + soundMetal7[] = {"A3\sounds_f\weapons\hits\metal_7.wav",0.158114,1,45}; + soundMetal8[] = {"A3\sounds_f\weapons\hits\metal_8.wav",0.158114,1,45}; + soundGlass1[] = {"A3\sounds_f\weapons\hits\glass_1.wav",0.177828,1,25}; + soundGlass2[] = {"A3\sounds_f\weapons\hits\glass_2.wav",0.177828,1,25}; + soundGlass3[] = {"A3\sounds_f\weapons\hits\glass_3.wav",0.177828,1,25}; + soundGlass4[] = {"A3\sounds_f\weapons\hits\glass_4.wav",0.177828,1,25}; + soundGlass5[] = {"A3\sounds_f\weapons\hits\glass_5.wav",0.177828,1,25}; + soundGlass6[] = {"A3\sounds_f\weapons\hits\glass_6.wav",0.177828,1,25}; + soundGlass7[] = {"A3\sounds_f\weapons\hits\glass_7.wav",0.177828,1,25}; + soundGlass8[] = {"A3\sounds_f\weapons\hits\glass_8.wav",0.177828,1,25}; + soundGlassArmored1[] = {"A3\sounds_f\weapons\hits\glass_arm_1.wav",0.177828,1,30}; + soundGlassArmored2[] = {"A3\sounds_f\weapons\hits\glass_arm_2.wav",0.177828,1,30}; + soundGlassArmored3[] = {"A3\sounds_f\weapons\hits\glass_arm_3.wav",0.177828,1,30}; + soundGlassArmored4[] = {"A3\sounds_f\weapons\hits\glass_arm_4.wav",0.177828,1,30}; + soundGlassArmored5[] = {"A3\sounds_f\weapons\hits\glass_arm_5.wav",0.177828,1,30}; + soundGlassArmored6[] = {"A3\sounds_f\weapons\hits\glass_arm_6.wav",0.177828,1,30}; + soundGlassArmored7[] = {"A3\sounds_f\weapons\hits\glass_arm_7.wav",0.177828,1,30}; + soundGlassArmored8[] = {"A3\sounds_f\weapons\hits\glass_arm_8.wav",0.177828,1,30}; + soundVehiclePlate1[] = {"A3\sounds_f\weapons\hits\metal_plate_1.wav",0.281170,1,40}; + soundVehiclePlate2[] = {"A3\sounds_f\weapons\hits\metal_plate_2.wav",0.281170,1,40}; + soundVehiclePlate3[] = {"A3\sounds_f\weapons\hits\metal_plate_3.wav",0.281170,1,40}; + soundVehiclePlate4[] = {"A3\sounds_f\weapons\hits\metal_plate_4.wav",0.281170,1,40}; + soundVehiclePlate5[] = {"A3\sounds_f\weapons\hits\metal_plate_5.wav",0.281170,1,40}; + soundVehiclePlate6[] = {"A3\sounds_f\weapons\hits\metal_plate_6.wav",0.281170,1,40}; + soundVehiclePlate7[] = {"A3\sounds_f\weapons\hits\metal_plate_7.wav",0.281170,1,40}; + soundVehiclePlate8[] = {"A3\sounds_f\weapons\hits\metal_plate_8.wav",0.281170,1,40}; + soundWood1[] = {"A3\sounds_f\weapons\hits\wood_1.wav",0.158114,1,30}; + soundWood2[] = {"A3\sounds_f\weapons\hits\wood_2.wav",0.158114,1,30}; + soundWood3[] = {"A3\sounds_f\weapons\hits\wood_3.wav",0.158114,1,30}; + soundWood4[] = {"A3\sounds_f\weapons\hits\wood_4.wav",0.158114,1,30}; + soundWood5[] = {"A3\sounds_f\weapons\hits\wood_5.wav",0.158114,1,30}; + soundWood6[] = {"A3\sounds_f\weapons\hits\wood_6.wav",0.158114,1,30}; + soundWood7[] = {"A3\sounds_f\weapons\hits\wood_7.wav",0.158114,1,30}; + soundWood8[] = {"A3\sounds_f\weapons\hits\wood_8.wav",0.158114,1,30}; + soundHitBody1[] = {"A3\sounds_f\weapons\hits\body_1.wav",0.0177828,1,25}; + soundHitBody2[] = {"A3\sounds_f\weapons\hits\body_2.wav",0.0177828,1,25}; + soundHitBody3[] = {"A3\sounds_f\weapons\hits\body_3.wav",0.0177828,1,25}; + soundHitBody4[] = {"A3\sounds_f\weapons\hits\body_4.wav",0.0177828,1,25}; + soundHitBody5[] = {"A3\sounds_f\weapons\hits\body_5.wav",0.0177828,1,25}; + soundHitBody6[] = {"A3\sounds_f\weapons\hits\body_6.wav",0.0177828,1,25}; + soundHitBody7[] = {"A3\sounds_f\weapons\hits\body_7.wav",0.0177828,1,25}; + soundHitBody8[] = {"A3\sounds_f\weapons\hits\body_8.wav",0.0177828,1,25}; + soundHitBuilding1[] = {"A3\sounds_f\weapons\hits\building_1.wav",0.251189,1,30}; + soundHitBuilding2[] = {"A3\sounds_f\weapons\hits\building_2.wav",0.251189,1,30}; + soundHitBuilding3[] = {"A3\sounds_f\weapons\hits\building_3.wav",0.251189,1,30}; + soundHitBuilding4[] = {"A3\sounds_f\weapons\hits\building_4.wav",0.251189,1,30}; + soundHitBuilding5[] = {"A3\sounds_f\weapons\hits\building_5.wav",0.251189,1,30}; + soundHitBuilding6[] = {"A3\sounds_f\weapons\hits\building_6.wav",0.251189,1,30}; + soundHitBuilding7[] = {"A3\sounds_f\weapons\hits\building_7.wav",0.251189,1,30}; + soundHitBuilding8[] = {"A3\sounds_f\weapons\hits\building_8.wav",0.251189,1,30}; + soundHitFoliage1[] = {"A3\sounds_f\weapons\hits\foliage_1.wav",0.177828,1,25}; + soundHitFoliage2[] = {"A3\sounds_f\weapons\hits\foliage_2.wav",0.177828,1,25}; + soundHitFoliage3[] = {"A3\sounds_f\weapons\hits\foliage_3.wav",0.177828,1,25}; + soundHitFoliage4[] = {"A3\sounds_f\weapons\hits\foliage_4.wav",0.177828,1,25}; + soundHitFoliage5[] = {"A3\sounds_f\weapons\hits\foliage_5.wav",0.177828,1,25}; + soundHitFoliage6[] = {"A3\sounds_f\weapons\hits\foliage_6.wav",0.177828,1,25}; + soundHitFoliage7[] = {"A3\sounds_f\weapons\hits\foliage_7.wav",0.177828,1,25}; + soundHitFoliage8[] = {"A3\sounds_f\weapons\hits\foliage_8.wav",0.177828,1,25}; + soundPlastic1[] = {"A3\sounds_f\weapons\hits\plastic_1.wav",0.177828,1,25}; + soundPlastic2[] = {"A3\sounds_f\weapons\hits\plastic_2.wav",0.177828,1,25}; + soundPlastic3[] = {"A3\sounds_f\weapons\hits\plastic_3.wav",0.177828,1,25}; + soundPlastic4[] = {"A3\sounds_f\weapons\hits\plastic_4.wav",0.177828,1,25}; + soundPlastic5[] = {"A3\sounds_f\weapons\hits\plastic_5.wav",0.177828,1,25}; + soundPlastic6[] = {"A3\sounds_f\weapons\hits\plastic_6.wav",0.177828,1,25}; + soundPlastic7[] = {"A3\sounds_f\weapons\hits\plastic_7.wav",0.177828,1,25}; + soundPlastic8[] = {"A3\sounds_f\weapons\hits\plastic_8.wav",0.177828,1,25}; + soundConcrete1[] = {"A3\sounds_f\weapons\hits\concrete_1.wav",0.177828,1,35}; + soundConcrete2[] = {"A3\sounds_f\weapons\hits\concrete_2.wav",0.177828,1,35}; + soundConcrete3[] = {"A3\sounds_f\weapons\hits\concrete_3.wav",0.177828,1,35}; + soundConcrete4[] = {"A3\sounds_f\weapons\hits\concrete_4.wav",0.177828,1,35}; + soundConcrete5[] = {"A3\sounds_f\weapons\hits\concrete_5.wav",0.177828,1,35}; + soundConcrete6[] = {"A3\sounds_f\weapons\hits\concrete_6.wav",0.177828,1,35}; + soundConcrete7[] = {"A3\sounds_f\weapons\hits\concrete_7.wav",0.177828,1,35}; + soundConcrete8[] = {"A3\sounds_f\weapons\hits\concrete_8.wav",0.177828,1,35}; + soundRubber1[] = {"A3\sounds_f\weapons\hits\tyre_1.wav",0.158114,1,25}; + soundRubber2[] = {"A3\sounds_f\weapons\hits\tyre_2.wav",0.158114,1,25}; + soundRubber3[] = {"A3\sounds_f\weapons\hits\tyre_3.wav",0.158114,1,25}; + soundRubber4[] = {"A3\sounds_f\weapons\hits\tyre_4.wav",0.158114,1,25}; + soundRubber5[] = {"A3\sounds_f\weapons\hits\tyre_5.wav",0.158114,1,25}; + soundRubber6[] = {"A3\sounds_f\weapons\hits\tyre_6.wav",0.158114,1,25}; + soundRubber7[] = {"A3\sounds_f\weapons\hits\tyre_7.wav",0.158114,1,25}; + soundRubber8[] = {"A3\sounds_f\weapons\hits\tyre_8.wav",0.158114,1,25}; + soundWater1[] = {"A3\sounds_f\weapons\hits\water_01.wav",0.158114,1,25}; + soundWater2[] = {"A3\sounds_f\weapons\hits\water_02.wav",0.158114,1,25}; + soundWater3[] = {"A3\sounds_f\weapons\hits\water_03.wav",0.158114,1,25}; + soundWater4[] = {"A3\sounds_f\weapons\hits\water_04.wav",0.158114,1,25}; + soundWater5[] = {"A3\sounds_f\weapons\hits\water_05.wav",0.158114,1,25}; + soundWater6[] = {"A3\sounds_f\weapons\hits\water_06.wav",0.158114,1,25}; + soundWater7[] = {"A3\sounds_f\weapons\hits\water_07.wav",0.158114,1,25}; + soundWater8[] = {"A3\sounds_f\weapons\hits\water_08.wav",0.158114,1,25}; + hitGroundSoft[] = {"soundGroundSoft1",0.2,"soundGroundSoft2",0.2,"soundGroundSoft3",0.1,"soundGroundSoft4",0.1,"soundGroundSoft5",0.1,"soundGroundSoft6",0.1,"soundGroundSoft7",0.1,"soundGroundSoft8",0.1}; + hitGroundHard[] = {"soundGroundHard1",0.2,"soundGroundHard2",0.2,"soundGroundHard3",0.1,"soundGroundHard4",0.1,"soundGroundHard5",0.1,"soundGroundHard6",0.1,"soundGroundHard7",0.1,"soundGroundHard8",0.1}; + hitMan[] = {"soundHitBody1",0.125,"soundHitBody2",0.125,"soundHitBody3",0.125,"soundHitBody4",0.125,"soundHitBody5",0.125,"soundHitBody6",0.125,"soundHitBody7",0.125,"soundHitBody8",0.125}; + hitArmor[] = {"soundVehiclePlate1",0.125,"soundVehiclePlate2",0.125,"soundVehiclePlate3",0.125,"soundVehiclePlate4",0.125,"soundVehiclePlate5",0.125,"soundVehiclePlate6",0.125,"soundVehiclePlate7",0.125,"soundVehiclePlate8",0.125}; + hitBuilding[] = {"soundHitBuilding1",0.2,"soundHitBuilding2",0.2,"soundHitBuilding3",0.1,"soundHitBuilding4",0.1,"soundHitBuilding5",0.1,"soundHitBuilding6",0.1,"soundHitBuilding7",0.1,"soundHitBuilding8",0.1}; + hitFoliage[] = {"soundHitFoliage1",0.125,"soundHitFoliage2",0.125,"soundHitFoliage3",0.125,"soundHitFoliage4",0.125,"soundHitFoliage5",0.125,"soundHitFoliage6",0.125,"soundHitFoliage7",0.125,"soundHitFoliage8",0.125}; + hitWood[] = {"soundWood1",0.125,"soundWood2",0.125,"soundWood3",0.125,"soundWood4",0.125,"soundWood5",0.125,"soundWood6",0.125,"soundWood7",0.125,"soundWood8",0.125}; + hitGlass[] = {"soundGlass1",0.125,"soundGlass2",0.125,"soundGlass3",0.125,"soundGlass4",0.125,"soundGlass5",0.125,"soundGlass6",0.125,"soundGlass7",0.125,"soundGlass8",0.125}; + hitGlassArmored[] = {"soundGlassArmored1",0.125,"soundGlassArmored2",0.125,"soundGlassArmored3",0.125,"soundGlassArmored4",0.125,"soundGlassArmored5",0.125,"soundGlassArmored6",0.125,"soundGlassArmored7",0.125,"soundGlassArmored8",0.125}; + hitConcrete[] = {"soundConcrete1",0.125,"soundConcrete2",0.125,"soundConcrete3",0.125,"soundConcrete4",0.125,"soundConcrete5",0.125,"soundConcrete6",0.125,"soundConcrete7",0.125,"soundConcrete8",0.125}; + hitRubber[] = {"soundRubber1",0.125,"soundRubber2",0.125,"soundRubber3",0.125,"soundRubber4",0.125,"soundRubber5",0.125,"soundRubber6",0.125,"soundRubber7",0.125,"soundRubber8",0.125}; + hitPlastic[] = {"soundPlastic1",0.125,"soundPlastic2",0.125,"soundPlastic3",0.125,"soundPlastic4",0.125,"soundPlastic5",0.125,"soundPlastic6",0.125,"soundPlastic7",0.125,"soundPlastic8",0.125}; + hitDefault[] = {"soundDefault1",0.2,"soundDefault2",0.2,"soundDefault3",0.1,"soundDefault4",0.1,"soundDefault5",0.1,"soundDefault6",0.1,"soundDefault7",0.1,"soundDefault8",0.1}; + hitMetal[] = {"soundMetal1",0.125,"soundMetal2",0.125,"soundMetal3",0.125,"soundMetal4",0.125,"soundMetal5",0.125,"soundMetal6",0.125,"soundMetal7",0.125,"soundMetal8",0.125}; + hitMetalplate[] = {"soundVehiclePlate1",0.125,"soundVehiclePlate2",0.125,"soundVehiclePlate3",0.125,"soundVehiclePlate4",0.125,"soundVehiclePlate5",0.125,"soundVehiclePlate6",0.125,"soundVehiclePlate7",0.125,"soundVehiclePlate8",0.125}; + hitWater[] = {"soundWater1",0.125,"soundWater2",0.125,"soundWater3",0.125,"soundWater4",0.125,"soundWater5",0.125,"soundWater6",0.125,"soundWater7",0.125,"soundWater8",0.125}; + bulletFly1[] = {"A3\sounds_f\weapons\hits\bullet_by_1.wav",1,1,35}; + bulletFly2[] = {"A3\sounds_f\weapons\hits\bullet_by_2.wav",1,1,35}; + bulletFly3[] = {"A3\sounds_f\weapons\hits\bullet_by_3.wav",1,1,35}; + bulletFly4[] = {"A3\sounds_f\weapons\hits\bullet_by_4.wav",1,1,35}; + bulletFly5[] = {"A3\sounds_f\weapons\hits\bullet_by_5.wav",1,1,35}; + bulletFly6[] = {"A3\sounds_f\weapons\hits\bullet_by_6.wav",1,1,35}; + bulletFly7[] = {"A3\sounds_f\weapons\hits\bullet_by_7.wav",1,1,35}; + bulletFly8[] = {"A3\sounds_f\weapons\hits\bullet_by_8.wav",1,1,35}; + bulletFly[] = {"bulletFly1",0.166,"bulletFly2",0.166,"bulletFly3",0.166,"bulletFly4",0.166,"bulletFly5",0.166,"bulletFly6",0.167,"bulletFly7",0.166,"bulletFly8",0.167}; + supersonicCrackNear[] = {"A3\sounds_f\weapons\hits\sscrack1.wav",1,1,35}; + supersonicCrackFar[] = {"A3\sounds_f\weapons\hits\sscrack2.wav",1,1,135}; + }; + */ class B_65x39_Caseless; class GVAR(base): B_65x39_Caseless { @@ -308,6 +438,8 @@ class CfgAmmo { indirectHitRange = 0.25; airFriction = BASE_DRAG_HD*0.65; caliber = 2; + + }; class GVAR(huge): GVAR(large) { diff --git a/addons/frag/CfgAmmoReflections.hpp b/addons/frag/CfgAmmoReflections.hpp index 513b58d544..fdaac6dd90 100644 --- a/addons/frag/CfgAmmoReflections.hpp +++ b/addons/frag/CfgAmmoReflections.hpp @@ -1,3 +1,5 @@ +//CfgAmmoReflections.hpp + #define ACE_EXPLOSION_REFLECTION(range, hit)\ class ace_explosion_reflection_##range##_##hit : ace_explosion_reflection_base {\ indirectHitRange = range;\ diff --git a/addons/frag/CfgEventhandlers.hpp b/addons/frag/CfgEventhandlers.hpp index 0d3301d6e0..becf395052 100644 --- a/addons/frag/CfgEventhandlers.hpp +++ b/addons/frag/CfgEventhandlers.hpp @@ -1,3 +1,4 @@ + class Extended_PreStart_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preStart)); diff --git a/addons/frag/XEH_PREP.hpp b/addons/frag/XEH_PREP.hpp index a7fb8ff8c3..2fed1630f2 100644 --- a/addons/frag/XEH_PREP.hpp +++ b/addons/frag/XEH_PREP.hpp @@ -7,19 +7,22 @@ PREP(spallTrack); // * Other */ PREP(addBlackList); -PREP(dev_addTrack); -PREP(dev_drawTraces); +PREP(addTrack); +PREP(drawTraces); +PREP(removeTrack); PREP(spallHP); -PREP(dev_startTracing); -PREP(dev_stopTracing); -PREP(dev_trackTrace); +PREP(startTracing); +PREP(stopTracing); +PREP(trackTrace); // New tracking mechanisms PREP(masterPFH); PREP(pfhRound); PREP(addPfhRound); +PREP(removePfhRound); // THIS SHOULD ABE USED SPARINGLY // Explosive Reflection +GVAR(replacedBisArtyWrapper) = true; PREP(findReflections); PREP(doExplosions); PREP(doReflections); diff --git a/addons/frag/XEH_postInit.sqf b/addons/frag/XEH_postInit.sqf index 4126ca328c..feb4be05b6 100644 --- a/addons/frag/XEH_postInit.sqf +++ b/addons/frag/XEH_postInit.sqf @@ -1,32 +1,28 @@ #include "script_component.hpp" -if (isServer) then { - GVAR(lastFragTime) = -1; - [QGVAR(frag_eh), {_this call FUNC(frago);}] call CBA_fnc_addEventHandler; +if(GVAR(EnableDebugTrace) && !isMultiplayer) then { + GVAR(traceFrags) = true; + GVAR(autoTrace) = true; +}; + +if(isServer) then { + [QGVAR(frag_eh), { _this call FUNC(frago); }] call CBA_fnc_addEventHandler; }; ["ace_settingsInitialized", { + //If not enabled, exit 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; + ["ace_firedPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler; + ["ace_firedNonPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler; + ["ace_firedPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler; + ["ace_firedNonPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler; + + [FUNC(masterPFH), 0, []] call CBA_fnc_addPerFrameHandler; - addMissionEventHandler ["EachFrame", {call FUNC(masterPFH)}]; }] call CBA_fnc_addEventHandler; -// Cache for ammo type configs -GVAR(cacheRoundsTypesToTrack) = [false] call CBA_fnc_createNamespace; - - -// Debug stuff: - -#ifdef DRAW_FRAG_INFO -[] call FUNC(dev_startTracing); -#endif - -#ifdef DEBUG_MODE_FULL -[true, true, 30] call FUNC(dev_debugAmmo); -#endif +//Cache for ammo type configs +GVAR(cacheRoundsTypesToTrack) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0]; +GVAR(cacheRoundsTypesToTrack) setText QGVAR(cacheRoundsTypesToTrack); diff --git a/addons/frag/XEH_preInit.sqf b/addons/frag/XEH_preInit.sqf index 7cbd6092a1..9c03491a4e 100644 --- a/addons/frag/XEH_preInit.sqf +++ b/addons/frag/XEH_preInit.sqf @@ -2,22 +2,24 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(blackList) = []; GVAR(traceFrags) = false; +GVAR(TOTALFRAGS) = 0; + GVAR(spallHPData) = []; GVAR(spallIsTrackingCount) = 0; +GVAR(autoTrace) = false; GVAR(traceID) = -1; GVAR(traces) = []; GVAR(tracesStarted) = false; GVAR(lastIterationIndex) = 0; GVAR(objects) = []; +GVAR(objectTypes) = []; GVAR(arguments) = []; ADDON = true; diff --git a/addons/frag/config.cpp b/addons/frag/config.cpp index f3b409dbd0..7ac109d29f 100644 --- a/addons/frag/config.cpp +++ b/addons/frag/config.cpp @@ -1,5 +1,4 @@ #include "script_component.hpp" - class CfgPatches { class ADDON { name = COMPONENT_NAME; diff --git a/addons/frag/functions/fnc_addBlackList.sqf b/addons/frag/functions/fnc_addBlackList.sqf index cfa96c9784..1a7d7cb253 100644 --- a/addons/frag/functions/fnc_addBlackList.sqf +++ b/addons/frag/functions/fnc_addBlackList.sqf @@ -1,21 +1,3 @@ -/* - * 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 - */ #include "script_component.hpp" - params ["_round"]; -TRACE_1("addBlackList",_round); - -GVAR(blackList) pushBack _round; +GVAR(blackList) set [(count GVAR(blackList)), _round]; diff --git a/addons/frag/functions/fnc_addPfhRound.sqf b/addons/frag/functions/fnc_addPfhRound.sqf index f97d868b9d..f0047bb24d 100644 --- a/addons/frag/functions/fnc_addPfhRound.sqf +++ b/addons/frag/functions/fnc_addPfhRound.sqf @@ -1,78 +1,74 @@ -/* - * 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 - */ //#define DEBUG_MODE_FULL #include "script_component.hpp" -params ["_gun", "_type", "_round"]; -TRACE_3("addPfhRound",_gun,_type,_round); +private ["_enabled", "_doSpall", "_spallTrack", "_spallTrackID"]; +PARAMS_3(_gun,_type,_round); +DEFAULT_PARAM(3,_doFragTrack,false); -if (!GVAR(enabled)) exitWith {TRACE_1("setting disabled",_this);}; +if (!GVAR(enabled)) exitWith {}; -if (!alive _round) exitWith {TRACE_1("round dead?",_this);}; +//_enabled = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(enabled)); +//if(_enabled < 1) exitWith {}; -if (_round in GVAR(blackList)) exitWith { - TRACE_1("round in blackList",_this); - REM(GVAR(blackList),_round); +if(_round in GVAR(blackList)) exitWith { + GVAR(blackList) = GVAR(blackList) - [_round]; }; // Exit on max track -if ((count GVAR(objects)) >= GVAR(maxTrack)) exitWith {TRACE_1("maxTrack limit",count GVAR(objects));}; +if( (count GVAR(objects)) > GVAR(MaxTrack)) exitWith { }; -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)); +if(_gun == ACE_player) then { + _doFragTrack = true; +} else { + if((gunner _gun) == ACE_player) then { + _doFragTrack = true; } else { - _doSpall = true; - INC(GVAR(spallIsTrackingCount)); + if(local _gun && {!(isPlayer (gunner _gun))} && {!(isPlayer _gun)}) then { + _doFragTrack = true; + }; }; - TRACE_2("",_doSpall,GVAR(spallIsTrackingCount)); }; -#ifdef DRAW_FRAG_INFO -[ACE_player, _round, [0, 1, 0, 1]] call FUNC(dev_addTrack); -#endif +_doSpall = false; +if(GVAR(SpallEnabled)) then { + if(GVAR(spallIsTrackingCount) <= 0) then { + GVAR(spallHPData) = []; + }; + if(GVAR(spallIsTrackingCount) > 5) then { + // ACE_player sideChat "LIMT!"; + } else { + _doSpall = true; + GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) + 1; + }; +}; +// ACE_player sideChat format["c: %1", GVAR(spallIsTrackingCount)]; + +if(GVAR(autoTrace)) then { + [ACE_player, _round, [1,0,0,1]] call FUNC(addTrack); +}; // 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 = []; +if(_doFragTrack && {alive _round}) then { + _spallTrack = []; + _spallTrackID = []; - private _args = [ - _round, getPosASL _round, velocity _round, _type, diag_frameno, _gun, _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"))) + private ["_args"]; + _args = [_round, (getPosASL _round), (velocity _round), _type, diag_frameno, _gun, _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 { + if(_doSpall) then { [_round, 1, _spallTrack, _spallTrackID] call FUNC(spallTrack); }; + // ACE_player sideChat "WTF2"; }; diff --git a/addons/frag/functions/fnc_addTrack.sqf b/addons/frag/functions/fnc_addTrack.sqf new file mode 100644 index 0000000000..4270e15996 --- /dev/null +++ b/addons/frag/functions/fnc_addTrack.sqf @@ -0,0 +1,20 @@ +#include "script_component.hpp" + +if (GVAR(autoTrace)) then { + [] call FUNC(startTracing); +}; + +// setAccTime 0.05; +private _index = count GVAR(traces); +params ["_origin", "_obj"]; +private _color = [1,0,0,1]; +if((count _this) > 2) then { + _color = _this select 2; +}; +private _positions = []; +private _objSpd = vectorMagnitude (velocity _obj); +_positions set[(count _positions), [(getPos _obj), _objSpd]]; +private _data = [_origin, typeOf _origin, typeOf _obj, _objSpd, _positions, _color]; + +GVAR(traces) set[_index, _data]; +[DFUNC(trackTrace), 0, [_obj, _index, CBA_missionTime]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/frag/functions/fnc_dev_addTrack.sqf b/addons/frag/functions/fnc_dev_addTrack.sqf deleted file mode 100644 index fd180eacfe..0000000000 --- a/addons/frag/functions/fnc_dev_addTrack.sqf +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_addTack - * - * Public: No - */ - -#include "script_component.hpp" - -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_debugAmmo.sqf b/addons/frag/functions/fnc_dev_debugAmmo.sqf index 8eec5f04f5..297113f5af 100644 --- a/addons/frag/functions/fnc_dev_debugAmmo.sqf +++ b/addons/frag/functions/fnc_dev_debugAmmo.sqf @@ -1,27 +1,7 @@ -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_debugAmmo - * - * Public: No - */ - #define DEBUG_MODE_FULL #include "script_component.hpp" -params [ - ["_debugMissing", true, [false]], - ["_debugForce", false, [false]], - ["_debugSkippedFragPower", 30, [0]] -]; +params [["_debugMissing", true, [false]], ["_debugForce", false, [false]], ["_debugNonFrag", false, [false]]]; diag_log text format ["~~~~~~~~~~~~~Start [%1]~~~~~~~~~~~~~", _this]; @@ -30,7 +10,7 @@ private _processedCfgAmmos = []; { private _ammo = toLower getText (_x >> "ammo"); - if (_ammo != "" && {!(_ammo in _processedCfgAmmos)}) then { + if ((_ammo != "") && {!(_ammo in _processedCfgAmmos)}) then { _processedCfgAmmos pushBack _ammo; //Ignore mines/bombs @@ -43,37 +23,37 @@ private _processedCfgAmmos = []; 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")))); + private _fragPower = getNumber(_ammoConfig >> "indirecthit")*(sqrt((getNumber (_ammoConfig >> "indirectHitRange")))); private _shouldAdd = (_skip == 0) && {(_force == 1) || {_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}}}; 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]; + 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 _warn = false; + + _warn = false; _fragTypes = getArray (_ammoConfig >> QGVAR(CLASSES)); - if (_fragTypes isEqualTo []) then {_warn = true;}; + if(_fragTypes isEqualTo []) then {_warn = true;}; _c = getNumber(_ammoConfig >> QGVAR(CHARGE)); - if (_c == 0) then {_warn = true;}; + if(_c == 0) then {_warn = true;}; _m = getNumber(_ammoConfig >> QGVAR(METAL)); - if (_m == 0) then {_warn = true;}; + if(_m == 0) then {_warn = true;}; _k = getNumber(_ammoConfig >> QGVAR(GURNEY_K)); - if (_k == 0) then {_warn = true;}; + if(_k == 0) then {_warn = true;}; _gC = getNumber(_ammoConfig >> QGVAR(GURNEY_C)); - if (_gC == 0) then {_warn = true;}; + if(_gC == 0) then { _warn = 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]; + 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 (_debugNonFrag && {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]; }; }; }; diff --git a/addons/frag/functions/fnc_dev_drawTraces.sqf b/addons/frag/functions/fnc_dev_drawTraces.sqf deleted file mode 100644 index f7d36b4f02..0000000000 --- a/addons/frag/functions/fnc_dev_drawTraces.sqf +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_drawTraces - * - * Public: No - */ - -#include "script_component.hpp" - -{ - _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_startTracing.sqf b/addons/frag/functions/fnc_dev_startTracing.sqf deleted file mode 100644 index e58445ec83..0000000000 --- a/addons/frag/functions/fnc_dev_startTracing.sqf +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_dev_startTracing - * - * Public: No - */ - -#include "script_component.hpp" - -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 f3b8fa234b..0000000000 --- a/addons/frag/functions/fnc_dev_stopTracing.sqf +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Author: ACE-Team - * Dev things - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * - * Public: No - */ - -#include "script_component.hpp" - -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_trackTrace.sqf b/addons/frag/functions/fnc_dev_trackTrace.sqf deleted file mode 100644 index b71f1982ff..0000000000 --- a/addons/frag/functions/fnc_dev_trackTrace.sqf +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Author: ACE-Team - * Dev things - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_dev_trackTrace - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_args", "_pfhID"]; -_args params ["_tracerObj", "_index"]; - -if (alive _tracerObj && {!(GVAR(traces) isEqualTo [])}) 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 25302cca7c..03ad4d1dec 100644 --- a/addons/frag/functions/fnc_doExplosions.sqf +++ b/addons/frag/functions/fnc_doExplosions.sqf @@ -1,38 +1,20 @@ -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_doExplosions - * - * Public: No - */ - //fnc_doExplosions.sqf #include "script_component.hpp" -params ["_args", "_pfhID"]; +params ["_args"]; _args params ["_explosions", "_index"]; -for "_i" from _index to ((_index + 2) min (count _explosions)) do { +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); - // if (_hit >= 150 && _distance > _indirectHitRange) then { + // if(_hit >= 150 && _distance > _indirectHitRange) then { // [_bpos, _refExp, _depth] call FUNC(doReflections); // }; }; - -ADD(_index,2); - -if (_index >= count _explosions) then { - [_pfhID] call CBA_fnc_removePerFrameHandler; +_index = _index + 2; +if(_index >= (count _explosions)) then { + [(_this select 1)] call CBA_fnc_removePerFrameHandler; } else { - _args set [1, _index]; + _params set[1, _index]; }; diff --git a/addons/frag/functions/fnc_doReflections.sqf b/addons/frag/functions/fnc_doReflections.sqf index 622c4c57f4..de5bac1b62 100644 --- a/addons/frag/functions/fnc_doReflections.sqf +++ b/addons/frag/functions/fnc_doReflections.sqf @@ -1,26 +1,14 @@ -/* - * Author: ACE-Team - * Dev things - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_doReflections - * - * Public: No - */ - //fnc_doReflections.sqf #include "script_component.hpp" -params ["_pos", "_ammo", ["_depth", 1]]; +params ["_pos", "_ammo"]; -// TEST_ICONS pushBack [_pos, format ["EXP!", _hit, _range, _hitFactor]]; -if (_depth <= 2) then { +private _depth = 1; +if(count _this > 2) then { + _depth = _this select 2; +}; +// TEST_ICONS pushBack [_pos, format["EXP!", _hit, _range, _hitFactor]]; +if(_depth <= 2) then { private _indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange"); private _indirectHit = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHit"); private _testParams = [_pos, [_indirectHitRange, _indirectHit], [], [], -4, _depth, 0]; diff --git a/addons/frag/functions/fnc_doSpall.sqf b/addons/frag/functions/fnc_doSpall.sqf index dcc1759648..83f4518a03 100644 --- a/addons/frag/functions/fnc_doSpall.sqf +++ b/addons/frag/functions/fnc_doSpall.sqf @@ -1,144 +1,146 @@ -/* - * Author: ACE-Team - * Dev things - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_doSpall - * - * Public: No - */ - //fnc_doSpall.sqf #include "script_component.hpp" // ACE_player sideChat "WAAAAAAAAAAAAAAAAAAAAA"; -params ["_hitData", "_hitPartDataIndex"]; +params ["_hitData"]; private _initialData = GVAR(spallHPData) select (_hitData select 0); -_initialData params ["_hpId", "_object", "_roundType", "_round", "_curPos", "_velocity"]; +private _hpData = (_hitData select 1) select (_this select 1); -private _hpData = (_hitData select 1) select _hitPartDataIndex; -(_hpData select 0) removeEventHandler ["hitPart", _hpId]; +_hpData params ["_object"]; +_object removeEventHandler ["hitPart", _initialData select 0]; +private _foundObjects = _initialData select 7; +private _index = _foundObjects find _object; +if(_index != -1) then { + _foundObjects set[_index, nil]; +}; -private _caliber = getNumber (configFile >> "CfgAmmo" >> _roundType >> "caliber"); -private _explosive = getNumber (configFile >> "CfgAmmo" >> _roundType >> "explosive"); -private _idh = getNumber (configFile >> "CfgAmmo" >> _roundType >> "indirectHitRange"); +_initialData params ["", "_object", "_roundType", "_round"]; -if !(_caliber >= 2.5 || {(_explosive > 0 && {_idh >= 1})}) exitWith {}; -// ACE_player sideChat format ["BBBB"]; -private _exit = false; -private _vm = 1; +private _caliber = getNumber(configFile >> "CfgAmmo" >> _roundType >> "caliber"); +private _explosive = getNumber(configFile >> "CfgAmmo" >> _roundType >> "explosive"); +private _idh = getNumber(configFile >> "CfgAmmo" >> _roundType >> "indirectHitRange"); -private _oldVelocity = vectorMagnitude _velocity; -private _curVelocity = vectorMagnitude (velocity _round); +private _alive = true; +if(!alive _round && (_initialData select 6) isEqualTo 1) then { + _alive = false; +}; -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(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then { + // ACE_player sideChat format["BBBB"]; + private _exit = false; + private _vm = 1; + private _velocity = _initialData select 5; + + 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 { + _vm = 1-(_curVelocity/_oldVelocity); + }; + }; + }; + if(!_exit) then { + private _unitDir = vectorNormalized _velocity; + private _pos = _hpData select 3; + private _spallPos = nil; + 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))); + // _blah = [_object, "FIRE"] intersect [_object worldToModel (ASLtoATL _pos1), _object worldToModel (ASLtoATL _pos2)]; + // diag_log text format["b: %1", _blah]; + + // _data = [nil, nil, nil, 1, [[ASLtoATL _pos1, 1], [ASLtoATL _pos2, 1]]]; + // NOU_TRACES set[(count NOU_TRACES), _data]; + + if(!lineIntersects [_pos1, _pos2]) exitWith { + // ACE_player sideChat format["FOUND!"]; + _spallPos = _pos2; + }; + }; + if(!isNil "_spallPos") then { + 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 { + ACE_LOGWARNING_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]; + }; + + private _fragTypes = [ + QGVAR(spall_small), QGVAR(spall_small), QGVAR(spall_small), + QGVAR(spall_small),QGVAR(spall_medium),QGVAR(spall_medium),QGVAR(spall_medium), + QGVAR(spall_medium), QGVAR(spall_large), QGVAR(spall_large), QGVAR(spall_huge), + QGVAR(spall_huge) + + ]; + + // diag_log text format["SPALL POWER: %1", _spallPolar select 0]; + private _spread = 15+(random 25); + private _spallCount = 5+(random 10); + 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 { + _dir = _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 _fragType = round (random ((count _fragTypes)-1)); + private _fragment = (_fragTypes select _fragType) createVehicleLocal [0,0,10000]; + _fragment setPosASL _spallPos; + _fragment setVelocity _spallFragVect; + + if(GVAR(traceFrags)) then { + [ACE_player, _fragment, [1,0.5,0,1]] call FUNC(addTrack); + }; + }; + _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 { + _dir = _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 _fragType = round (random ((count _fragTypes)-1)); + private _fragment = (_fragTypes select _fragType) createVehicleLocal [0,0,10000]; + _fragment setPosASL _spallPos; + _fragment setVelocity _spallFragVect; + + if(GVAR(traceFrags)) then { + [ACE_player, _fragment, [1,0,0,1]] call FUNC(addTrack); + }; + }; }; }; }; -if (_exit) exitWith {}; -private _unitDir = vectorNormalized _velocity; -private _pos = _hpData select 3; -private _spallPos = []; -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]; -}; - -private _fragTypes = [ - QGVAR(spall_small), QGVAR(spall_small), QGVAR(spall_small), - QGVAR(spall_small),QGVAR(spall_medium),QGVAR(spall_medium),QGVAR(spall_medium), - QGVAR(spall_medium), QGVAR(spall_large), QGVAR(spall_large), QGVAR(spall_huge), - QGVAR(spall_huge) - -]; - -// diag_log text format ["SPALL POWER: %1", _spallPolar select 0]; -private _spread = 15 + (random 25); -private _spallCount = 5 + (random 10); -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 _fragType = round (random ((count _fragTypes) - 1)); - private _fragment = (_fragTypes select _fragType) 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 _fragType = round (random ((count _fragTypes) - 1)); - private _fragment = (_fragTypes select _fragType) 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_drawTraces.sqf b/addons/frag/functions/fnc_drawTraces.sqf new file mode 100644 index 0000000000..790d53491f --- /dev/null +++ b/addons/frag/functions/fnc_drawTraces.sqf @@ -0,0 +1,31 @@ +#include "script_component.hpp" + +private ["_color", "_index", "_lastPos", "_lastSpd", "_max", "_positions", "_startSpeed"]; + +{ + _positions = _x select 4; + _color = _x select 5; + _index = 0; + _max = count _positions; + _startSpeed = 0.01 max ((_positions select 0) select 1); + _lastSpd = []; + _lastPos = []; + while {_index < _max} do { + _data1 = _positions select _index; + _data2 = nil; + if(_index + ACE_TRACE_DRAW_INC >= _max) then { + _data2 = _positions select (_max - 1); + } else { + _data2 = _positions select (_index + ACE_TRACE_DRAW_INC); + }; + + _pos1 = _data1 select 0; + _pos2 = _data2 select 0; + _index = _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_findReflections.sqf b/addons/frag/functions/fnc_findReflections.sqf index 774e1764ea..cc123641d3 100644 --- a/addons/frag/functions/fnc_findReflections.sqf +++ b/addons/frag/functions/fnc_findReflections.sqf @@ -1,74 +1,61 @@ -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_findReflections - * - * Public: No - */ - //fnc_findReflections.sqf #include "script_component.hpp" +private ["_lastPos", "_test", "_vec", "_testPos", "_buckets", "_excludes", "_bucketIndex", "_bucketPos", "_bucketList", "_c", "_index", "_blist", "_avgX", "_avgY", "_avgZ", "_bpos", "_distance", "_hitFactor", "_hit", "_range", "_refExp", "_i", "_x", "_res", "_forEachIndex", "_explosions", "_can", "_dirvec", "_zAng"]; + BEGIN_COUNTER(fnc_findReflections); -params ["_args", "_pfhID"]; +params ["_args"]; _args params ["_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_rand"]; private _split = 15; -private _radi = 360 / _split * _depth; +private _radi = (360/_split*_depth); -// player sideChat format ["p: %1", _explosiveInfo]; +// player sideChat format["p: %1", _explosiveInfo]; _explosiveInfo params ["_indirectHitRange", "_indirectHit"]; -private _distanceCount = (floor _indirectHitRange * 4) min 100; +private _distanceCount = (floor _indirectHitRange*4) min 100; -if (_zIndex < 5) then { - private _lastPos = _pos; - private _zAng = _zIndex * 20 + 2; - if (_zAng > 80) then { +if(_zIndex < 5) then { + _lastPos = _pos; + _zAng = _zIndex*20+2; + if(_zAng > 80) then { _radi = 1; _zAng = 90; }; for "_i" from 0 to _radi do { - private _test = true; - private _vec = [1, ((_i * _split) + _rand) % 360, _zAng] call CBA_fnc_polar2vect; + _test = true; + _vec = [1, ((_i*_split)+_rand) mod 360, _zAng] call CBA_fnc_polar2vect; for "_x" from 1 to _distanceCount do { - private _testPos = _pos vectorAdd (_vec vectorMultiply _x); + _testPos = _pos vectorAdd (_vec vectorMultiply _x); // drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""]; - private _res = lineIntersectsWith [_pos, _testPos]; - if (count _res > 0) exitWith { + _res = lineIntersectsWith [_pos, _testPos]; + if(count _res > 0) exitWith { _test = false; _nlos pushBack _lastPos; // { - // _x addEventHandler ["HandleDamage", { diag_log text format ["this: %1", _this]; }]; + // _x addEventHandler ["HandleDamage", { diag_log text format["this: %1", _this]; }]; // } forEach _res; // drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""]; // TEST_PAIRS pushBack [_pos, _lastPos, [1,0,0,1]]; }; - // if (terrainIntersectASL [_pos, _testPos]) exitWith {}; + // if(terrainIntersectASL [_pos, _testPos]) exitWith {}; _lastPos = _testPos; }; }; - _args set [4, _zIndex + 1]; + _params set[4, _zIndex+1]; } else { - INC(_depth); - private _buckets = []; - private _excludes = []; - private _bucketPos = nil; - private _bucketList = nil; - private _c = 0; - while {count _nlos != count _excludes && {_c < (count _nlos)}} do { + _depth = _depth + 1; + _buckets = []; + _excludes = []; + _bucketIndex = 0; + _bucketPos = nil; + _bucketList = nil; + _c = 0; + while { count(_nlos) != count(_excludes) && _c < (count _nlos) } do { scopeName "mainSearch"; { - if (!(_forEachIndex in _excludes)) then { - private _index = _buckets pushBack [_x, [_x]]; + if(!(_forEachIndex in _excludes)) then { + _index = _buckets pushBack [_x, [_x]]; _excludes pushBack _forEachIndex; _bucketPos = _x; _bucketList = (_buckets select _index) select 1; @@ -76,53 +63,59 @@ if (_zIndex < 5) then { }; } forEach _nlos; { - if (!(_forEachIndex in _excludes)) then { + if(!(_forEachIndex in _excludes)) then { _testPos = _x; - if (_testPos vectorDistanceSqr _bucketPos <= 30) then { + if(_testPos vectorDistanceSqr _bucketPos <= 30) then { _bucketList pushBack _x; _excludes pushBack _forEachIndex; }; }; } forEach _nlos; - INC(_c); + _c = _c + 1; }; - // player sideChat format ["c: %1", count _buckets]; - private _explosions = []; + // player sideChat format["c: %1", count _buckets]; + _explosions = []; { - private _blist = _x select 1; - private _avg = [0, 0, 0]; + _blist = _x select 1; + _avgX = 0; + _avgY = 0; + _avgZ = 0; { - _avg = _avg vectorAdd _x; + _avgX = _avgX + (_x select 0); + _avgY = _avgY + (_x select 1); + _avgZ = _avgZ + (_x select 2); } forEach _blist; _c = count _blist; - private _bpos = _avg vectorMultiply (1 / _c); + _bpos = [_avgX/_c, _avgY/_c, _avgZ/_c]; - private _distance = _pos vectorDistance _bpos; - private _hitFactor = 1 - (((_distance / (_indirectHitRange * 4)) min 1) max 0); - // _hitFactor = 1 / (_distance ^ 2); - private _hit = (floor (_indirectHit * _hitFactor / 4)) min 500; - SUB(_hit,_hit % 10); - private _range = (floor (_indirectHitRange - (_distance / 4))) min 100; - SUB(_range,_range % 2); + _distance = _pos vectorDistance _bpos; + _hitFactor = 1-(((_distance/(_indirectHitRange*4)) min 1) max 0); + // _hitFactor = 1/(_distance^2); + _hit = _indirectHit*_hitFactor; + _hit = (floor (_hit/4)) min 500; + _hit = _hit - (_hit%10); + _range = (floor (_indirectHitRange-(_distance/4))) min 100; + _range = _range - (_range%2); - if (_hit >= 10 && {_range > 0}) then { - // TEST_ICONS pushBack [_bpos, format ["h: %1, r: %2, hf: %3 d: %4 ihr: %5", _hit, _range, _hitFactor, _distance, _indirectHitRange*4]]; + if(_hit >= 10 && _range > 0) then { + // TEST_ICONS pushBack [_bpos, format["h: %1, r: %2, hf: %3 d: %4 ihr: %5", _hit, _range, _hitFactor, _distance, _indirectHitRange*4]]; // TEST_PAIRS pushBack [_pos, _bpos, [1,0,0,1]]; - private _refExp = format ["ace_explosion_reflection_%1_%2", _range, _hit]; + _refExp = format["ace_explosion_reflection_%1_%2", _range, _hit]; // _refExp createVehicle (ASLtoATL _bpos); // drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _bpos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""]; - _explosions pushBack [_refExp, _bpos, _hit, _distance, _indirectHitRange / 4, _depth]; + _explosions pushBack [_refExp, _bpos, _hit, _distance, _indirectHitRange/4, _depth]; + }; - if (count _explosions > (_radi * 2) / _depth) exitWith {}; + if(count _explosions > (_radi*2)/_depth) exitWith {}; } forEach _buckets; // _can = "Land_Bricks_V4_F" createVehicle (ASLtoATL _pos); // _dirvec = _pos vectorFromTo ((ATLtoASL (player modelToWorldVisual (player selectionPosition "Spine3")))); // _dirvec = _dirvec vectorMultiply 100; // _can setVelocity _dirvec; [DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler; - [_pfhID] call CBA_fnc_removePerFrameHandler; + [(_this select 1)] call CBA_fnc_removePerFrameHandler; }; END_COUNTER(fnc_findReflections); diff --git a/addons/frag/functions/fnc_fired.sqf b/addons/frag/functions/fnc_fired.sqf index b1e29a79ca..dbe1ab6347 100644 --- a/addons/frag/functions/fnc_fired.sqf +++ b/addons/frag/functions/fnc_fired.sqf @@ -7,7 +7,7 @@ * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: - * None + * Nothing * * Example: * [clientFiredBIS-XEH] call ace_frag_fnc_fired @@ -30,7 +30,7 @@ if (isNil "_shouldAdd") then { _shouldAdd = false; }; - if (GVAR(spallEnabled)) exitWith { + if (GVAR(SpallEnabled)) exitWith { //Always want to run whenever spall is enabled? _shouldAdd = true; TRACE_2("SettingCache[spallEnabled]",_ammo,_shouldAdd); @@ -42,7 +42,7 @@ if (isNil "_shouldAdd") then { 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"))); + 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}}}; TRACE_6("SettingCache[willFrag?]",_skip,_explosive,_indirectRange,_force,_fragPower,_shouldAdd); @@ -50,14 +50,6 @@ if (isNil "_shouldAdd") then { }; 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 {}; - - // 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]; - + TRACE_3("Running Frag Tracking",_unit,_ammo,_projectile); [_unit, _ammo, _projectile] call FUNC(addPfhRound); }; diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf index a21e92d4b3..2c04528492 100644 --- a/addons/frag/functions/fnc_frago.sqf +++ b/addons/frag/functions/fnc_frago.sqf @@ -1,53 +1,49 @@ -/* - * Author: Jaynus, NouberNou - * Server func to create the fragmentation for a round. - * - * Arguments: - * 0: Last Position (ASL) - * 1: Velocity - * 2: Ammo Classname - * - * Return Value: - * None - * - * Example: - * [[], [], "handGrenade"] call ace_frag_fnc_frago - * - * Public: No - */ -//#define DEBUG_MODE_FULL +//fnc_frago.sqf +// #define DEBUG_MODE_FULL #include "script_component.hpp" #define FRAG_VEC_VAR 0.004 + #define MAX_FRAG_COUNT 50 +if(!isServer) exitWith { }; + BEGIN_COUNTER(frago); +// _startTime = diag_tickTime; -params ["_lastPos", "_lastVel", "_shellType"]; -TRACE_3("frago",_lastPos,_lastVel,_shellType); +private ["_fuseDist", "_indirectHitRange", "_fragRange", "_c", "_m", "_k", "_gC", "_fragPower", "_fragPowerRandom", "_manObjects", "_objects", "_crew", "_fragCount", "_fragArcs", "_doRandom", "_boundingBox", "_targetPos", "_distance", "_add", "_bbX", "_bbY", "_bbZ", "_cubic", "_targetVel", "_baseVec", "_dir", "_currentCount", "_count", "_vecVar", "_vec", "_fp", "_vel", "_fragType", "_fragObj", "_randomCount", "_sectorSize", "_sectorOffset", "_i", "_randomDir", "_endTime", "_target"]; -// 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]); -TRACE_2("",_maxFrags,CBA_missionTime - GVAR(lastFragTime)); -GVAR(lastFragTime) = CBA_missionTime; +params ["_round", "_lastPos", "_lastVel", "_shellType"]; +private _gun = nil; +if((count _this) > 5) then { + _gun = _this select 5; +}; 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(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 { +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; +private _atlPos = ASLtoATL _lastPos; + +private _isArmed = true; +if(!isNil "_gun") then { + _fuseDist = getNumber(configFile >> "CfgAmmo" >> _shellType >> "fuseDistance"); + _isArmed = ((getPosASL _gun) distance _lastPos > _fuseDist); +}; + +_indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _shellType >> "indirecthitrange"); +_fragRange = 20 * _indirectHitRange * 4; // _c = 185; // grams of comp-b // _m = 210; // grams of fragmentating metal // _k = 3/5; // spherical K factor @@ -58,138 +54,162 @@ private _fragRange = 20 * _indirectHitRange * 4; // _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); +_c = getNumber(configFile >> "CfgAmmo" >> _shellType >> QGVAR(CHARGE)); +if(_c == 0) then { _c = 1; _warn = true;}; +_m = getNumber(configFile >> "CfgAmmo" >> _shellType >> QGVAR(METAL)); +if(_m == 0) then { _m = 2; _warn = true;}; +_k = getNumber(configFile >> "CfgAmmo" >> _shellType >> QGVAR(GURNEY_K)); +if(_k == 0) then { _k = 1/2; _warn = true;}; +_gC = getNumber(configFile >> "CfgAmmo" >> _shellType >> QGVAR(GURNEY_C)); +if(_gC == 0) then { _gC = 2440; _warn = true;}; + +if(_warn) then { + ACE_LOGWARNING_1("Ammo class %1 lacks proper explosive properties definitions for frag!",_shellType); //TODO: turn this off when we get closer to release }; -// Gunery equation is for a non-fragmenting metal, imperical value of 80% represents fragmentation -private _fragPower = 0.8 * (((_m / _c) + _k) ^ - (1 / 2)) * _gC; +_fragPower = (((_m/_c)+_k)^-(1/2))*_gC; +_fragPower = _fragPower * 0.8; // Gunery equation is for a non-fragmenting metal, imperical value of 80% represents fragmentation -private _atlPos = ASLtoATL _lastPos; - -private _fragPowerRandom = _fragPower * 0.5; -if ((_atlPos select 2) < 0.5) then { - _lastPos vectorAdd [0, 0, 0.5]; +_fragPowerRandom = _fragPower * 0.5; +if((_atlPos select 2) < 0.5) then { + _lastPos set[2, (_lastPos select 2)+0.5]; }; -private _objects = _atlPos nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], _fragRange]; -// Add unique crews in faster way +// _manObjects = _atlPos nearEntities ["CaManBase", _fragRange]; + +// setAccTime 0.01; + +//_objects = nearestObjects [_atlPos, ["AllVehicles"], _fragRange]; // Not sure if tracking "ReammoBox" is required, if so revert this change for _objects +_objects = _atlPos nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], _fragRange]; + +// _objects = _manObjects; +// Target also people inside vehicles or manning weapons +_crew = []; { { - _objects pushBackUnique _x; + _crew set [count _crew,_x] } forEach (crew _x); } forEach _objects; -TRACE_2("",_fragRange,count _objects); -private _fragCount = 0; +_objects = _objects - _crew; +_objects = _objects + _crew; -private _fragArcs = []; -_fragArcs set [360, 0]; +_fragCount = 0; -private _doRandom = true; -if (!(_objects isEqualTo [])) then { - if (GVAR(reflectionsEnabled)) then { +_fragArcs = []; +_fragArcs set[360, 0]; + +#ifdef DEBUG_MODE_FULL + ACE_player sideChat format["_fragRange: %1", _fragRange]; + ACE_player sideChat format["_objects: %1", _objects]; +#endif +_doRandom = true; +if(_isArmed && (count _objects) > 0) then { + if (GVAR(ReflectionsEnabled)) then { [_lastPos, _shellType] call FUNC(doReflections); }; { - private _target = _x; - if (alive _target) then { - (boundingBox _target) params ["_boundingBoxA", "_boundingBoxB"]; + //if(random(1) > 0.5) then { + _target = _x; + if(alive _target) then { + _boundingBox = boundingBox _target; + _targetPos = (getPosASL _target); + _distance = _targetPos distance _lastPos; + _add = (((_boundingBox select 1) select 2)/2)+((((_distance-(_fragpower/8)) max 0)/_fragPower)*10); + _bbX = (abs((_boundingBox select 0) select 0))+((_boundingBox select 1) select 0); + _bbY = (abs((_boundingBox select 0) select 1))+((_boundingBox select 1) select 1); + _bbZ = (abs((_boundingBox select 0) select 2))+((_boundingBox select 1) select 2); + _cubic = _bbX * _bbY * _bbZ; + if(_cubic > 1) then { + _doRandom = true; - private _cubic = ((abs (_boundingBoxA select 0)) + (_boundingBoxB select 0)) * ((abs (_boundingBoxA select 1)) + (_boundingBoxB select 1)) * ((abs (_boundingBoxA select 2)) + (_boundingBoxB select 2)); + _targetVel = (velocity _target); - 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); + _targetPos set[0, (_targetPos select 0)+((_targetVel select 0)*(_distance/_fragPower))]; + _targetPos set[1, (_targetPos select 1)+((_targetVel select 1)*(_distance/_fragPower))]; + _targetPos set[2, (_targetPos select 2)+_add]; - _targetPos = _targetPos vectorAdd [ - (_targetVel select 0) * (_distance / _fragPower), - (_targetVel select 1) * (_distance / _fragPower), - _add - ]; + _baseVec = _lastPos vectorFromTo _targetPos; - private _baseVec = _lastPos vectorFromTo _targetPos; + _dir = floor(_baseVec call CBA_fnc_vectDir); + _currentCount = _fragArcs select _dir; + if(isNil "_currentCount") then { + _currentCount = 0; + }; + if(_currentCount < 20) then { + _count = ceil(random(sqrt(_m/1000))); + _vecVar = FRAG_VEC_VAR; + if(!(_target isKindOf "Man")) then { + _vecVar = ((sqrt _cubic)/2000)+FRAG_VEC_VAR; + if((count (crew _target)) == 0 && _count > 0) then { + _count = 0 max (_count/2); + }; + }; + for "_i" from 1 to _count do { + _vec = +_baseVec; - 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 _vecVar = FRAG_VEC_VAR; - if (!(_target isKindOf "Man")) then { - ADD(_vecVar,(sqrt _cubic) / 2000); - if ((crew _target) isEqualTo [] && {_count > 0}) then { - _count = 0 max (_count / 2); + _vec set[0, (_vec select 0)-(_vecVar/2)+(random _vecVar)]; + _vec set[1, (_vec select 1)-(_vecVar/2)+(random _vecVar)]; + _vec set[2, (_vec select 2)-(_vecVar/2)+(random _vecVar)]; + + _fp = (_fragPower-(random (_fragPowerRandom))); + _vel = _vec vectorMultiply _fp; + + _fragType = round (random ((count _fragTypes)-1)); + _fragObj = (_fragTypes select _fragType) createVehicleLocal [0,0,10000]; + // diag_log text format["fp: %1 %2", _fp, typeOf _fragObj]; + _fragObj setPosASL _lastPos; + _fragObj setVectorDir _vec; + _fragObj setVelocity _vel; + if(GVAR(traceFrags)) then { + GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1; + [ACE_player, _fragObj, [1,0,0,1]] call FUNC(addTrack); + }; + _fragCount = _fragCount + 1; + _currentCount = _currentCount + 1; + }; + _fragArcs set[_dir, _currentCount]; }; }; - for "_i" from 1 to _count do { - private _vec = _baseVec vectorDiff [ - (_vecVar / 2) + (random _vecVar), - (_vecVar / 2) + (random _vecVar), - (_vecVar / 2) + (random _vecVar) - ]; - - private _fp = _fragPower - (random (_fragPowerRandom)); - private _vel = _vec vectorMultiply _fp; - - 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); - #endif - INC(_fragCount); - INC(_currentCount); - }; - _fragArcs set [_dir, _currentCount]; }; - }; - if (_fragCount > _maxFrags) exitWith {}; + //}; + if(_fragCount > MAX_FRAG_COUNT) exitWith {}; } forEach _objects; - 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 { + if(_fragCount > MAX_FRAG_COUNT) exitWith {}; + _randomCount = ((ceil((MAX_FRAG_COUNT - _fragCount)*0.1)) max 0)+20; + _sectorSize = 360 / (_randomCount max 1); + // _doRandom = false; + 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))]; + _sectorOffset = 360 * (_i - 1) / (_randomCount max 1); + _randomDir = random(_sectorSize); + _vec = [cos(_sectorOffset + _randomDir), sin(_sectorOffset + _randomDir), sin(30 - (random 45))]; - _fp = (_fragPower - (random (_fragPowerRandom))); + _fp = (_fragPower-(random (_fragPowerRandom))); _vel = _vec vectorMultiply _fp; - _fragObj = (selectRandom _fragTypes) createVehicleLocal [0, 0, 10000]; + _fragType = round (random ((count _fragTypes)-1)); + _fragObj = (_fragTypes select _fragType) createVehicleLocal [0,0,10000]; _fragObj setPosASL _lastPos; _fragObj setVectorDir _vec; _fragObj setVelocity _vel; - #ifdef DRAW_FRAG_INFO - [ACE_player, _fragObj, [1,0.5,0,1]] call FUNC(dev_addTrack); - #endif - INC(_fragCount); + if(GVAR(traceFrags)) then { + GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1; + [ACE_player, _fragObj, [1,0.5,0,1]] call FUNC(addTrack); + }; + _fragCount = _fragCount + 1; }; }; + }; - -TRACE_1("total created",_fragCount); - +// #ifdef DEBUG_MODE_FULL + // ACE_player sideChat format["total frags: %1", GVAR(TOTALFRAGS)]; + // ACE_player sideChat format["tracks: %1", (count GVAR(trackedObjects))]; +// #endif +// _endTime = diag_tickTime; END_COUNTER(frago); diff --git a/addons/frag/functions/fnc_masterPFH.sqf b/addons/frag/functions/fnc_masterPFH.sqf index 638a91ee63..722590a391 100644 --- a/addons/frag/functions/fnc_masterPFH.sqf +++ b/addons/frag/functions/fnc_masterPFH.sqf @@ -1,58 +1,50 @@ /* * Author: jaynus - * Master single PFH abstraction for all rounds being tracked by frag/spall. + * + * 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 */ - //#define DEBUG_MODE_FULL #include "script_component.hpp" +//PARAMS_2(_pfhArgs,_handle); -BEGIN_COUNTER(PFH); +if (!GVAR(enabled)) exitWith {}; -// Fast exit if nothing to do -if (GVAR(objects) isEqualTo []) exitWith {END_COUNTER(PFH);}; +private ["_gcIndex", "_iter"]; +_gcIndex = []; -private _gcIndex = []; - -private _iter = 0; -private _objectCount = count GVAR(objects); -while {_objectCount > 0 && {_iter < (GVAR(maxTrackPerFrame) min _objectCount)}} do { - - if (GVAR(lastIterationIndex) >= _objectCount) then { +_iter = 0; +while { (count GVAR(objects)) > 0 && { _iter < (GVAR(MaxTrackPerFrame) min (count GVAR(objects))) } } do { + private ["_object", "_args"]; + if(GVAR(lastIterationIndex) >= (count GVAR(objects))) then { GVAR(lastIterationIndex) = 0; }; - private _object = GVAR(objects) select GVAR(lastIterationIndex); + _object = GVAR(objects) select GVAR(lastIterationIndex); - if (!isNil "_object") then { - private _args = GVAR(arguments) select GVAR(lastIterationIndex); + if(!isNil "_object") then { + _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 + if(!(_args call FUNC(pfhRound))) then { + _gcIndex pushBack GVAR(lastIterationIndex); // Add it to the GC if it returns false }; }; - INC(_iter); - INC(GVAR(lastIterationIndex)); + _iter = _iter + 1; + GVAR(lastIterationIndex) = GVAR(lastIterationIndex) + 1; }; -// Clean up dead object references -private _deletionCount = 0; +// clean up dead object references +private ["_deletionCount", "_deleteIndex"]; +_deletionCount = 0; { TRACE_1("GC Projectile", _x); - private _deleteIndex = _x - _deletionCount; + _deleteIndex = _x - _deletionCount; GVAR(objects) deleteAt _deleteIndex; GVAR(arguments) deleteAt _deleteIndex; - INC(_deletionCount); + _deletionCount = _deletionCount + 1; } forEach _gcIndex; - -END_COUNTER(PFH); diff --git a/addons/frag/functions/fnc_pfhRound.sqf b/addons/frag/functions/fnc_pfhRound.sqf index 9d63df3f2a..cbbd75b633 100644 --- a/addons/frag/functions/fnc_pfhRound.sqf +++ b/addons/frag/functions/fnc_pfhRound.sqf @@ -1,50 +1,26 @@ -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_pfhRound - * - * Public: No - */ - #include "script_component.hpp" -params ["_round", "_lastPos", "_lastVel", "_shellType", "_firedFrame", "_gun", "_doSpall", "_spallTrack", "_foundObjectHPIds", "_skip", "_explosive", "_indirectRange", "_force", "_fragPower"]; +params ["_round", "_lastPos", "_lastVel", "_type", "_firedFrame", "", "_doSpall", "_spallTrack", "_foundObjectHPIds", "_skip", "_explosive", "_indirectRange", "_force", "_fragPower"]; -if (_round in GVAR(blackList)) exitWith { +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 { + 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 (((_lastPos select 2) < 0) && {(toLower getText (configFile >> "CfgAmmo" >> _shellType >> "simulation")) in ["shotbullet", "shotshell"]}) exitWith {}; - private _isArmed = true; - if (!isNil "_gun") then { - private _fuseDist = getNumber(configFile >> "CfgAmmo" >> _shellType >> "fuseDistance"); - _isArmed = ((getPosASL _gun) distance _lastPos > _fuseDist); - 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 (((_lastPos select 2) < 0) && {(toLower getText (configFile >> "CfgAmmo" >> _type >> "simulation")) in ["shotbullet", "shotshell"]}) exitWith {}; + [QGVAR(frag_eh), _this] call CBA_fnc_serverEvent; }; }; }; - if (_doSpall) then { - DEC(GVAR(spallIsTrackingCount)); - TRACE_1("doSpall",_foundObjectHPIds); + if(_doSpall) then { + GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) - 1; + // diag_log text format["F: %1", _foundObjectHPIds]; { - if (!isNil "_x") then { + if(!isNil "_x") then { _x removeEventHandler ["hitPart", _foundObjectHPIds select _forEachIndex]; }; } forEach _spallTrack; @@ -52,11 +28,12 @@ if (!alive _round) exitWith { false }; -_this set [1, getPosASL _round]; -_this set [2, velocity _round]; +_this set[1, (getPosASL _round)]; +_this set[2, (velocity _round)]; -if (_doSpall) then { - private _scale = ((count GVAR(objects)) / GVAR(maxTrackPerFrame)) max 0.1; +if(_doSpall) then { + private ["_scale"]; + _scale = ( (count GVAR(objects)) / GVAR(MaxTrackPerFrame) ) max 0.1; [_round, _scale, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack); }; diff --git a/addons/frag/functions/fnc_removePfhRound.sqf b/addons/frag/functions/fnc_removePfhRound.sqf new file mode 100644 index 0000000000..d186da1e17 --- /dev/null +++ b/addons/frag/functions/fnc_removePfhRound.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" + +// THIS FUNCTION SHOULD NOT BE USED BECAUSE IT CAUSES AN SEARCH AND REBUILD + +PARAMS_1(_round); + +if(_round in GVAR(blackList)) then { + GVAR(blackList) = GVAR(blackList) - [_round]; +}; + +GVAR(objects) = GVAR(objects) - [_round]; diff --git a/addons/frag/functions/fnc_removeTrack.sqf b/addons/frag/functions/fnc_removeTrack.sqf new file mode 100644 index 0000000000..914a90602c --- /dev/null +++ b/addons/frag/functions/fnc_removeTrack.sqf @@ -0,0 +1,14 @@ +#include "script_component.hpp" + +private ["_ret"]; +_ret = true; +if(IS_ARRAY((_this select 0))) then { + _ret = false; +} else { + if((_this select 0) in GVAR(trackedObjects)) then { + GVAR(trackedObjects) = GVAR(trackedObjects) - [(_this select 0)]; + } else { + _ret = false; + }; +}; +_ret diff --git a/addons/frag/functions/fnc_spallHP.sqf b/addons/frag/functions/fnc_spallHP.sqf index 643f5aefe4..5bdde6eee9 100644 --- a/addons/frag/functions/fnc_spallHP.sqf +++ b/addons/frag/functions/fnc_spallHP.sqf @@ -1,43 +1,29 @@ -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_spallHP - * - * Public: No - */ - #include "script_component.hpp" -//player sideChat format ["f: %1 c: %2", (_this select 0), (count GVAR(spallHPData))]; +private ["_initialData", "_hpData", "_round", "_hpRound", "_hpDirect"]; +//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; +if ((_this select 0) <= (count GVAR(spallHPData))) then { + _initialData = GVAR(spallHPData) select (_this select 0); + if (!isNil "_initialData") then { + _hpRound = ((_this select 1) select 0) select 2; + _round = _initialData select 3; + _hpDirect = ((_this select 1) select 0) select 10; + if (_hpDirect && {_round == _hpRound}) then { + { + _hpData = _x; + _round = _initialData select 3; + // 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 (_this select 1); + }; + }; }; diff --git a/addons/frag/functions/fnc_spallTrack.sqf b/addons/frag/functions/fnc_spallTrack.sqf index ee928b35c0..91c7dee511 100644 --- a/addons/frag/functions/fnc_spallTrack.sqf +++ b/addons/frag/functions/fnc_spallTrack.sqf @@ -1,25 +1,9 @@ -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_frag_fnc_spallTrack - * - * Public: No - */ - //fnc_spallTrack.sqf #include "script_component.hpp" params ["_round", "_multiplier", "_foundObjects", "_foundObjectHPIds"]; -private _delta = (1 / diag_fps) * _multiplier; +private _delta = (1/diag_fps) * _multiplier; private _curPos = getPosASL _round; private _velocity = velocity _round; @@ -28,15 +12,17 @@ private _forwardPos = _curPos vectorAdd _velocityStep; private _intersectsWith = lineIntersectsWith [_curPos, _forwardPos]; -if (_intersectsWith isEqualTo []) exitWith {}; - -// player sideChat format ["inter: %1", _intersectsWith]; -{ - // 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)}); +if (count _intersectsWith > 0) then { + // player sideChat format["inter: %1", _intersectsWith]; + { + if(!(_x in _foundObjects)) then { + // 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 set[(count _foundObjects), _x]; + _foundObjectHPIds set[(count _foundObjectHPIds), _hpId]; + private _data = [_hpId, _x, typeOf _round, _round, _curPos, _velocity, 0, _foundObjects, _foundObjectHPIds]; + GVAR(spallHPData) set[_index, _data]; + }; + } forEach _intersectsWith; +}; diff --git a/addons/frag/functions/fnc_startTracing.sqf b/addons/frag/functions/fnc_startTracing.sqf new file mode 100644 index 0000000000..ca9aa8c84e --- /dev/null +++ b/addons/frag/functions/fnc_startTracing.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" +if(!GVAR(tracesStarted)) then { + GVAR(tracesStarted) = true; + GVAR(traceID) = [FUNC(drawTraces), 0, []] call CBA_fnc_addPerFrameHandler; +}; diff --git a/addons/frag/functions/fnc_stopTracing.sqf b/addons/frag/functions/fnc_stopTracing.sqf new file mode 100644 index 0000000000..b58352c897 --- /dev/null +++ b/addons/frag/functions/fnc_stopTracing.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" +if(GVAR(tracesStarted)) then { + GVAR(tracesStarted) = false; + [GVAR(traceID)] call CBA_fnc_removePerFrameHandler; +}; diff --git a/addons/frag/functions/fnc_trackTrace.sqf b/addons/frag/functions/fnc_trackTrace.sqf new file mode 100644 index 0000000000..d57eaa8c5c --- /dev/null +++ b/addons/frag/functions/fnc_trackTrace.sqf @@ -0,0 +1,12 @@ +#include "script_component.hpp" + +params ["_args"]; +_args params ["_tracerObj", "_index"]; + +if (alive _tracerObj && (count GVAR(traces)) > 0) then { + private _data = GVAR(traces) select _index; + private _positions = _data select 4; + _positions pushBack [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]; +} else { + [(_this select 1)] call CBA_fnc_removePerFrameHandler; +}; diff --git a/addons/frag/functions/script_component.hpp b/addons/frag/functions/script_component.hpp index 0903b3ba1e..8312313751 100644 --- a/addons/frag/functions/script_component.hpp +++ b/addons/frag/functions/script_component.hpp @@ -1 +1 @@ -#include "\z\ace\addons\frag\script_component.hpp" +#include "\z\ace\addons\frag\script_component.hpp" \ No newline at end of file diff --git a/addons/frag/script_component.hpp b/addons/frag/script_component.hpp index 0215e9f4d7..73655e84e5 100644 --- a/addons/frag/script_component.hpp +++ b/addons/frag/script_component.hpp @@ -2,9 +2,10 @@ #define COMPONENT_BEAUTIFIED Frag #include "\z\ace\addons\main\script_mod.hpp" -// #define DRAW_FRAG_INFO +//#define DEBUG_ENABLED_FRAG // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_FRAG @@ -17,4 +18,4 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define ACE_TRACE_DRAW_INC 1 +#define ACE_TRACE_DRAW_INC 1 diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml index d74033f6a4..0385f3d133 100644 --- a/addons/frag/stringtable.xml +++ b/addons/frag/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Repesz-szimuláció Симуляция осколков Simulazione Frammentazione - 破片シミュレーション - 조각 시뮬레이션 - 模拟碎片 - 模擬碎片 Fragmentation Simulation @@ -28,10 +24,6 @@ Repesz-szimuláció Симуляция осколков Simulazione Frammentazione - 破片シミュレーション - 조각 시뮬레이션 - 模拟碎片 - 模擬碎片 Enable the ACE Fragmentation Simulation @@ -44,10 +36,6 @@ Az ACE repesz-szimuláció engedélyezése Включить симуляцию осколков ACE Abilita la Simulazione Frammentazione di ACE - ACE 破片シミュレーションを有効化 - ACE 조각 시뮬레이션을 적용합니다. - 启用ACE模拟碎片 - 啟用ACE模擬碎片 Spalling Simulation @@ -60,10 +48,6 @@ Pattogzás-szimuláció Симуляция обломков Simulazione Spalling - 剥離シミュレーション - 파편 시뮬레이션 - 模拟剥落 - 模擬剝落 Enable the ACE Spalling Simulation @@ -76,10 +60,6 @@ Az ACE pattogzás-szimuláció engedélyezése Включить симуляцию обломков ACE Abilita la Simulazione Spalling di ACE - ACE 剥離シミュレーションを有効化 - ACE 파편 시뮬레이션을 적용합니다. - 启用ACE模拟剥落 - 啟用ACE模擬剝落 Explosion Reflections Simulation @@ -90,10 +70,6 @@ Simulation de la réflection des explosions. Simulação de reflexo de explosão Cимуляция отражения взрывов ACE - 爆発による飛翔シミュレーション - 폭발 반사 시뮬레이션 - 模拟爆炸反射 - 模擬爆炸反射 Enable the ACE Explosion Reflection Simulation @@ -104,10 +80,6 @@ Activer la simulation de la réfléction des explosions ACE. Ativa a simulação de reflexo de explosão do ACE Включить симуляцию отражения взрывов ACE - 爆発による飛翔シミュレーションを有効化 - ACE 폭발 반사 시뮬레이션을 적용합니다. - 启用ACE模拟爆炸反射 - 啟用ACE模擬爆炸反射 Maximum Projectiles Tracked @@ -120,10 +92,6 @@ 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) @@ -136,10 +104,6 @@ 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) Эта настройка контролирует максимальное количество снарядов, которок отслеживает система осколков и обломков в каждый момент времени. Снаряды, выстреленные сверх этого числа, отслеживаться не будут. Уменьшите это значение, если вы не хотите падения FPS при большом количестве снарядов в одной перестрелке (> 200 одновременно летящих снарядов) Questo parametro controlla il numero massimo di proiettili che la frammentazione e il sistema di spalling tracciano in ogni momento. Se più proiettili sono sparati, non verranno tracciati. Abbassa questo parametro se non vuoi cali di FPS in scenari con molti proiettili (>200 proiettili in aria contemporaneamente) - 時間が許すかぎり、破片と剥離システムの最大数を設定できます。設定数以上の弾丸が発射された場合、それは対象になりません。もし多い弾数による FPS の低下を望まない場合は、低い数へ設定にします。( &gt;一度に空中内で200発) - 이 설정은 조각 및 파편 시스템으로 인해 생긴 발사체의 수를 결정합니다. 만약 더 많은 발사체가 나올경우 정해진 수 이외에는 추적하지 않습니다. 이 설정을 낮춤으로써 파편이 많은 시나리오를 실행할때 더욱 원활히 진행할 수 있습니다 (한 번에 200개 이하) - 设定在指定时间内, 系统最大可追踪的碎片/剥落粒子数量. 如有更多的碎片在这之后产生, 这些粒子将不会被追踪. 如果你想要维持好的帧数, 此设定勿调的过高. ( >一次200颗粒子) - 設定在指定時間內, 系統最大可追蹤的碎片/剝落粒子數量. 如有更多的碎片在這之後產生, 這些粒子將不會被追蹤. 如果你想要維持好的幀數, 此設定勿調的過高. ( >一次200顆粒子) Maximum Projectiles Per Frame @@ -152,10 +116,6 @@ Maximum repesz/képkocka Макс. количество снарядов за кадр Numero massimo di proiettili per Frame - フレームごとの最大弾頭数 - 프레임당 최대 발사체 수 - 每一帧数(FPS)最大碎片/剥落粒子数量 - 每一幀數(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. @@ -168,10 +128,6 @@ 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, limitando ancora di più l'impatto. - 与えられたフレームごとに追跡する剥離の数を決定します。FPS に影響をあたえないよう、剥離を複数のフレームで追跡し、分散させています。 - 가능한 프레임마다 파편을 추적 및 계산합니다. 여러 프레임에 걸쳐 파편난 발사체를 추적하여 FPS에 도움을 줍니다. 이를 제한함으로써 더욱 큰 효과를 볼 수 있습니다. - 设定在每一帧数内, 系统最大可追踪的碎片/剥落粒子数量. 此设定可有效帮助系统减低计算压力. - 設定在每一幀數內, 系統最大可追蹤的碎片/剝落粒子數量. 此設定可有效幫助系統減低計算壓力. (SP Only) Frag/Spall Debug Tracing @@ -184,10 +140,6 @@ (Csak SP) Repesz/Pattogzás debug követés (Только для одиночной игры) Отслеживаение/отладка осколков (Solo SP) Debug Tracciamento Frag/Spall - (SP のみ) 破片/剥離のデバッグ用表示 - (싱글플레이 전용) 조각/파편 디버그 추적화 - (仅在单人模式) 碎片/剥落除错追踪 - (僅在單人模式) 碎片/剝落除錯追蹤 (SP Only) Requires a mission/editor restart. Enables visual tracing of fragmentation and spalling rounds in SP game mode only. @@ -196,13 +148,10 @@ (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. + (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 のみ) ミッションとエディタの再起動が必要です。有効化すると、シングルプレイでのみ破片と剥離の弾頭が見えるようになります。 - (仅在单人模式) 让你在单人模式下可观察到碎片/剥落粒子的移动轨迹. - (僅在單人模式) 讓你在單人模式下可觀察到碎片/剝落粒子的移動軌跡. - + \ No newline at end of file diff --git a/addons/gestures/XEH_postInit.sqf b/addons/gestures/XEH_postInit.sqf index b2d5de86ef..b68df0a592 100644 --- a/addons/gestures/XEH_postInit.sqf +++ b/addons/gestures/XEH_postInit.sqf @@ -14,9 +14,6 @@ if (!hasInterface) exitWith {}; }; private _code = compile format [QUOTE('%1' call FUNC(playSignal)), _signalName]; - if (_currentName == "Stop") then { - _code = compile format [QUOTE('%1' call FUNC(playSignal)), "BIgestureFreeze"]; - }; TRACE_4("Adding KeyBind",_currentName,_signalName,_code,_key); diff --git a/addons/gestures/XEH_preInit.sqf b/addons/gestures/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/gestures/XEH_preInit.sqf +++ b/addons/gestures/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/gestures/functions/fnc_playSignal.sqf b/addons/gestures/functions/fnc_playSignal.sqf index 9dc1ecce4b..273db82da1 100644 --- a/addons/gestures/functions/fnc_playSignal.sqf +++ b/addons/gestures/functions/fnc_playSignal.sqf @@ -6,7 +6,7 @@ * Animation * * Return Value: - * Boolean + * * * Example: * "GeniusAnimation" call ace_gestures_fnc_playSignal diff --git a/addons/gestures/script_component.hpp b/addons/gestures/script_component.hpp index f8ddbd1771..ddf7ddb401 100644 --- a/addons/gestures/script_component.hpp +++ b/addons/gestures/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_GESTURES diff --git a/addons/gestures/stringtable.xml b/addons/gestures/stringtable.xml index 18e8883227..a0171c7465 100644 --- a/addons/gestures/stringtable.xml +++ b/addons/gestures/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -8,14 +8,10 @@ ACE Posunky ACE Gestes ACE Kézjelek - Gesti ACE + ACE Gesti ACE Gestos ACE Жесты ACE Gestos - ACE ジェスチャー - ACE 수신호 - ACE 手势 - ACE 手勢 Gestures @@ -28,10 +24,6 @@ Kézjelek Gestos Gesti - ジェスチャー - 수신호 - 手势 - 手勢 Advance @@ -44,10 +36,6 @@ Előre Avançar Avanzare - 警戒 - 전진 - 前进 - 前進 Go @@ -60,10 +48,6 @@ Mozgás Mover-se Muoversi - 進め - 이동 - 出发 - 出發 Follow @@ -76,10 +60,6 @@ Utánam Seguir Seguire - ついて来い - 따라올것 - 跟进 - 跟進 Up @@ -92,10 +72,6 @@ Fel Acima Alzarsi - 立ち上がれ - - 起立 - 起立 Cease Fire @@ -108,10 +84,6 @@ Tüzet szüntess Cessar Fogo Cessare il Fuoco - 撃つな - 사격 중지 - 停火 - 停火 Stop @@ -123,10 +95,6 @@ Stop Stop Detenerse - 止まれ - 멈춰 - 停止 - 停止 Freeze @@ -139,10 +107,6 @@ Állj Alto Fermi - 動くな - 정지 - 不准动 - 不准動 Cover @@ -155,10 +119,6 @@ Fedezékbe Proteger-se Copertura - 隠れろ - 엄폐 - 掩护 - 掩護 Rally up @@ -170,10 +130,6 @@ Přeskupit Raggruppare Reunirse - 集合 - 집결 - 集合 - 集合 Move forward @@ -185,10 +141,6 @@ Kupředu Muovere avanti Avanzar - 前に進め - 앞으로 이동 - 往前走 - 往前走 Engage @@ -200,10 +152,6 @@ Útok Ingaggiare Atacar - 交戦しろ - 교전할것 - 交战 - 交戰 Point @@ -215,10 +163,6 @@ Ukázat Puntare Señalar - 指示 - 가리키기 - 指出 - 指出 Hold @@ -230,10 +174,6 @@ Čekej Mantenere Esperar - そこにいろ - 기다려 - 停住 - 停住 Warning @@ -245,10 +185,6 @@ Pozor Attenzione Atención - 注意 - 주의 - 警告 - 警告 Show Gestures On Interaction Menu @@ -260,55 +196,39 @@ Afficher les gestes dans le menu d'interaction. Mostrar gestos no menu de interação Показать жесты в меню взаимодействия - インタラクション メニュー上でジェスチャーを表示する - 수신호를 상호작용 메뉴에서 보여줍니다 - 显示手势互动选单 - 顯示手勢互動選單 Show gestures on the self interaction menu, or just use keybinds, or disable completely Zeige Gesten im Selbst-Interkationsmenü, lege sie auf Schnelltasten, oder deaktiviere sie vollständig. Zobrazit posunky pro vlastní interakční menu, nebo prostě použít klávesové zkratky, nebo to zakázat úplně Pokaż listę gestów w menu własnej interakcji, użyj tylko skrótów na klawiaturze lub wyłącz całkowicie - Mostra Gesti nel Menù Interazione Personale, o usa solamente tasti di scelta rapida, o disabilita completamente + Mostra Gesti nel Menù Interazione Personale, o usa solamente Hotkey, o disabilita completamente Muestror los gestos en el menú de interacción propia, utilizar solo combinación de teclas o desactivarlos completamente Afficher les gestes dans le menu d'interaction personnel, ou seulement utiliser les touches, ou desactiver complètement. Mostra gestos no menu de interação, ou utilize um dos atalhos de teclado ou desative completamente Показать жесты в меню взамиодейтсвия с собой или только использовать горячие клавиши, или полностью отключить - キー操作や同時使用を無効化している場合はセルフ インタラクション メニュ上でジェスチャーを表示します - 수신호를 상호작용 메뉴에서 보여주거나 혹은 단축키를 지정하거나 아니면 아예 사용하지 않습니다. - 显示手势选项在自己的互动选单上, 或只利用键盘来使用手势, 或完全禁用 - 顯示手勢選項在自己的互動選單上, 或只利用鍵盤來使用手勢, 或完全禁用 Just Keybinds Nur Schnelltasten Pouze klávesové zkratky Tylko skróty klaw. - Solo tasti di scelta rapida + Solo Hotkey Solo mediante teclas Seulement les touches Somente atalhos de teclado Только горячие клавиши - キー操作のみ - 오직 단축키만 - 只利用键盘 - 只利用鍵盤 Keybinds + Interaction Menu Schnelltasten+ Interaktionsmenü Klávesové zkratky + interakční menu Skróty klaw. + menu interakcji - Tasti di scelta rapida + Menù Interazione + Hotkey + Menù Interazione Teclas y Menú de Interacción Touches + menu d'interaction Atalhos + Menu de Interação Клавиши + Меню взаимодействия - キー操作とインタラクション メニュ - 단축키및 상호작용 메뉴 - 键盘 + 互动选单 - 鍵盤 + 互動選單 - + \ No newline at end of file diff --git a/addons/gforces/XEH_postInit.sqf b/addons/gforces/XEH_postInit.sqf index f7d532c288..9eb049c9f5 100644 --- a/addons/gforces/XEH_postInit.sqf +++ b/addons/gforces/XEH_postInit.sqf @@ -3,26 +3,22 @@ if (!hasInterface) exitWith {}; GVAR(pfID) = -1; -GVAR(playerIsVirtual) = false; ["ace_settingsInitialized", { TRACE_1("SettingsInitialized eh",GVAR(enabledFor)); if (GVAR(enabledFor) == 0) exitWith {}; //Module has no effect if enabledFor is "None" - - ["unit", { // Add unit changed EH to check if player is either virtual (logic) or a UAV AI - params ["_unit"]; - GVAR(playerIsVirtual) = ((getNumber (configFile >> "CfgVehicles" >> (typeOf _unit) >> "isPlayableLogic")) == 1) || - {(getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "simulation")) == "UAVPilot"}; - TRACE_3("unit changed",_unit,typeOf _unit,GVAR(playerIsVirtual)); - }, true] call CBA_fnc_addPlayerEventHandler; - if (GVAR(enabledFor) == 2) exitWith { //PFEH is always on when enabledFor is "All" [] call FUNC(addPFEH); TRACE_1("adding perm PFEH",GVAR(pfID)); }; //PFEH only runs when player is in a type "Air" vehicle when enabledFor is "Aircraft" + + if ((!isNull (vehicle ACE_player)) && {(vehicle ACE_player) isKindOf "Air"}) then { //"playerVehicleChanged" can happen before "settingInit" + [] call FUNC(addPFEH); + TRACE_1("adding temp PFEH [start in]",GVAR(pfID)); + }; ["vehicle", { params ["", "_vehicle"]; TRACE_2("playerVehicleChanged",_vehicle,typeOf _vehicle); @@ -39,5 +35,5 @@ GVAR(playerIsVirtual) = false; GVAR(pfID) = -1; }; }; - }, true] call CBA_fnc_addPlayerEventHandler; + }] call CBA_fnc_addPlayerEventHandler; }] call CBA_fnc_addEventHandler; diff --git a/addons/gforces/XEH_preInit.sqf b/addons/gforces/XEH_preInit.sqf index 7530cabc45..99e6461c54 100644 --- a/addons/gforces/XEH_preInit.sqf +++ b/addons/gforces/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(GForces) = []; GVAR(GForces_Index) = 0; diff --git a/addons/gforces/functions/fnc_addPFEH.sqf b/addons/gforces/functions/fnc_addPFEH.sqf index 2464575fdc..9bd4d7fa1a 100644 --- a/addons/gforces/functions/fnc_addPFEH.sqf +++ b/addons/gforces/functions/fnc_addPFEH.sqf @@ -8,19 +8,12 @@ * Return Value: * None * - * Example: - * call ace_gforces_fnc_addPFEH - * * Public: No */ #include "script_component.hpp" //Reset forces array GVAR(GForces) = []; -// init array to full array of neutral g-forces -GVAR(GForces) resize 30; -GVAR(GForces) = GVAR(GForces) apply {1}; - GVAR(GForces_Index) = 0; // Setup ppEffect @@ -33,4 +26,4 @@ GVAR(GForces_CC) ppEffectCommit 0.4; GVAR(lastUpdateTime) = 0; GVAR(oldVel) = [0,0,0]; -GVAR(pfID) = [LINKFUNC(pfhUpdateGForces), 0, []] call CBA_fnc_addPerFrameHandler; +GVAR(pfID) = [DFUNC(pfhUpdateGForces), 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf index 98e633f500..48370c2431 100644 --- a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf +++ b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [[args], 5] call ace_gforces_fnc_pfhUpdateGForces - * * Public: No */ #include "script_component.hpp" @@ -20,7 +17,7 @@ if ((CBA_missionTime - GVAR(lastUpdateTime)) < INTERVAL) exitWith {}; GVAR(lastUpdateTime) = CBA_missionTime; -if (GVAR(playerIsVirtual) || {!alive ACE_player}) exitWith {}; +if (isNull ACE_player || !(alive ACE_player)) exitWith {}; BEGIN_COUNTER(everyInterval); @@ -30,7 +27,7 @@ private _accel = ((_newVel vectorDiff GVAR(oldVel)) vectorMultiply (1 / INTERVAL private _currentGForce = (((_accel vectorDotProduct vectorUp (vehicle ACE_player)) / 9.8) max -10) min 10; GVAR(GForces) set [GVAR(GForces_Index), _currentGForce]; -GVAR(GForces_Index) = (GVAR(GForces_Index) + 1) % 30; // 30 = round (AVERAGEDURATION / INTERVAL); +GVAR(GForces_Index) = (GVAR(GForces_Index) + 1) % round (AVERAGEDURATION / INTERVAL); GVAR(oldVel) = _newVel; /* Source: https://github.com/KoffeinFlummi/AGM/issues/1774#issuecomment-70341573 diff --git a/addons/gforces/script_component.hpp b/addons/gforces/script_component.hpp index f20c3451bc..6adfb95cf6 100644 --- a/addons/gforces/script_component.hpp +++ b/addons/gforces/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_GFORCES diff --git a/addons/gforces/stringtable.xml b/addons/gforces/stringtable.xml index 12d3d0ba53..7cd33b34d7 100644 --- a/addons/gforces/stringtable.xml +++ b/addons/gforces/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -9,12 +9,6 @@ Efeitos de ForçaG Effets de force gravitationnelle Эффекты перегрузок - G による効果 - Efekty przeciążeń - 중력가속도 효과 - Effetti forza G - G力影响 - G力影響 Only Aircraft @@ -24,12 +18,6 @@ Somente Aeronave Avions seulement Только для летательных аппаратов - 航空機のみ - Tylko samoloty - 비행기에만 적용 - Solo Aerei - 只有战斗机 - 只有戰鬥機 - + \ No newline at end of file diff --git a/addons/goggles/XEH_postInit.sqf b/addons/goggles/XEH_postInit.sqf index 5b93a7a459..b7b5de9e1b 100644 --- a/addons/goggles/XEH_postInit.sqf +++ b/addons/goggles/XEH_postInit.sqf @@ -20,7 +20,7 @@ if (!hasInterface) exitWith {}; if (GVAR(effects) == 0) exitWith {}; // ---Add the TINT Effect--- - + // make sure to stack effect layers in correct order GVAR(GogglesEffectsLayer) = QGVAR(GogglesEffectsLayer) call BIS_fnc_RSCLayer; GVAR(GogglesLayer) = QGVAR(GogglesLayer) call BIS_fnc_RSCLayer; @@ -29,26 +29,6 @@ if (!hasInterface) exitWith {}; GVAR(UsePP) = true; }; - // init pp effects - GVAR(PostProcess) = ppEffectCreate ["ColorCorrections", 1995]; - GVAR(EffectsActive) = false; - - // add glasses eventhandlers - ["ace_glassesChanged", { - params ["_unit", "_glasses"]; - TRACE_2("ace_glassesChanged eh",_unit,_glasses); - - SETGLASSES(_unit,GLASSESDEFAULT); - - if (call FUNC(ExternalCamera)) exitWith {call FUNC(RemoveGlassesEffect)}; - - if ([_unit] call FUNC(isGogglesVisible)) then { - [_unit, _glasses] call FUNC(applyGlassesEffect); - } else { - call FUNC(removeGlassesEffect); - }; - }] call CBA_fnc_addEventHandler; - // init GlassesChanged eventhandler GVAR(OldGlasses) = ""; ["loadout", { @@ -60,9 +40,12 @@ if (!hasInterface) exitWith {}; ["ace_glassesChanged", [_unit, _currentGlasses]] call CBA_fnc_localEvent; GVAR(OldGlasses) = _currentGlasses; }; - }, true] call CBA_fnc_addPlayerEventHandler; + }] call CBA_fnc_addPlayerEventHandler; + // init pp effects + GVAR(PostProcess) = ppEffectCreate ["ColorCorrections", 1995]; + GVAR(EffectsActive) = false; // check goggles private _fnc_checkGoggles = { @@ -74,7 +57,7 @@ if (!hasInterface) exitWith {}; }; } else { if (!(call FUNC(externalCamera)) && {[_unit] call FUNC(isGogglesVisible)}) then { - [_unit, goggles _unit] call FUNC(applyGlassesEffect); + [goggles _unit] call FUNC(applyGlassesEffect); }; }; }; @@ -83,6 +66,21 @@ if (!hasInterface) exitWith {}; ["ace_activeCameraChanged", _fnc_checkGoggles] call CBA_fnc_addEventHandler; + // add glasses eventhandlers + ["ace_glassesChanged", { + params ["_unit", "_glasses"]; + + SETGLASSES(_unit,GLASSESDEFAULT); + + if (call FUNC(ExternalCamera)) exitWith {call FUNC(RemoveGlassesEffect)}; + + if ([_unit] call FUNC(isGogglesVisible)) then { + _glasses call FUNC(applyGlassesEffect); + } else { + call FUNC(removeGlassesEffect); + }; + }] call CBA_fnc_addEventHandler; + // // ---Add the Dust/Dirt/Rain Effects--- if (GVAR(effects) == 2) then { @@ -98,7 +96,7 @@ if (!hasInterface) exitWith {}; GVAR(PostProcessEyes) ppEffectCommit 0; GVAR(PostProcessEyes) ppEffectEnable false; GVAR(PostProcessEyes_Enabled) = false; - + GVAR(FrameEvent) = [false, [false, 20]]; GVAR(DustHandler) = -1; GVAR(RainDrops) = objNull; diff --git a/addons/goggles/XEH_preInit.sqf b/addons/goggles/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/goggles/XEH_preInit.sqf +++ b/addons/goggles/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/goggles/config.cpp b/addons/goggles/config.cpp index 9102b7fbf0..8341caa9f4 100644 --- a/addons/goggles/config.cpp +++ b/addons/goggles/config.cpp @@ -270,3 +270,8 @@ class CfgCloudlets { destroyOnWaterSurface = 1; }; }; + +class ACE_newEvents { + GlassesChanged = "ace_glassesChanged"; + GlassesCracked = "ace_glassesCracked"; +}; diff --git a/addons/goggles/functions/fnc_applyGlassesEffect.sqf b/addons/goggles/functions/fnc_applyGlassesEffect.sqf index 71425ce6ca..71a5b3b84c 100644 --- a/addons/goggles/functions/fnc_applyGlassesEffect.sqf +++ b/addons/goggles/functions/fnc_applyGlassesEffect.sqf @@ -5,29 +5,23 @@ * Sets dirt/rain overlay for glasses. * * Arguments: - * 0: Player - * 1: Glasses classname to be applied + * 0: Glasses classname to be applied * * Return Value: * None * * Example: - * [ace_player, goggles ace_player] call ace_goggles_fnc_applyGlassesEffect + * [goggles ace_player] call ace_goggles_fnc_applyGlassesEffect * * Public: No */ #include "script_component.hpp" -params ["_player", "_glasses"]; -TRACE_2("applyGlassesEffect",_player,_glasses); +params ["_glasses"]; // remove old effect call FUNC(removeGlassesEffect); -if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _player) >> "isPlayableLogic")) == 1) exitWith { - TRACE_1("skipping playable logic",typeOf _player); // VirtualMan_F (placeable logic zeus / spectator) -}; - private ["_config", "_postProcessColour", "_postProcessTintAmount", "_imagePath"]; _config = configFile >> "CfgGlasses" >> _glasses; diff --git a/addons/goggles/functions/fnc_handleExplosion.sqf b/addons/goggles/functions/fnc_handleExplosion.sqf index fcda2a3e49..44be6ab6c1 100644 --- a/addons/goggles/functions/fnc_handleExplosion.sqf +++ b/addons/goggles/functions/fnc_handleExplosion.sqf @@ -8,9 +8,6 @@ * Return Value: * Function is handled? * - * Example: - * [bob] call ace_goggles_fnc_handleExplosion - * * Public: No */ #include "script_component.hpp" diff --git a/addons/goggles/functions/fnc_handleFired.sqf b/addons/goggles/functions/fnc_handleFired.sqf index e231a4562b..066bc040f7 100644 --- a/addons/goggles/functions/fnc_handleFired.sqf +++ b/addons/goggles/functions/fnc_handleFired.sqf @@ -8,9 +8,6 @@ * Return Value: * Function is handled? * - * Example: - * call ace_goggles_fnc_handleFired - * * Public: No */ #include "script_component.hpp" diff --git a/addons/goggles/functions/fnc_handleKilled.sqf b/addons/goggles/functions/fnc_handleKilled.sqf index 001a4041b8..b9af2e075b 100644 --- a/addons/goggles/functions/fnc_handleKilled.sqf +++ b/addons/goggles/functions/fnc_handleKilled.sqf @@ -8,9 +8,6 @@ * Return Value: * Function is handled? * - * Example: - * [bob] call ace_goggles_fnc_handleKilled - * * Public: No */ #include "script_component.hpp" diff --git a/addons/goggles/functions/fnc_isInRotorWash.sqf b/addons/goggles/functions/fnc_isInRotorWash.sqf index 80e1bdd8e8..319da3a875 100644 --- a/addons/goggles/functions/fnc_isInRotorWash.sqf +++ b/addons/goggles/functions/fnc_isInRotorWash.sqf @@ -7,7 +7,7 @@ * 1: Radius to check for helicopter (default: 15) * * Return Value: - * Array : + * : * 0: In rotorwash * 1: Amount of rotor wash. * diff --git a/addons/goggles/script_component.hpp b/addons/goggles/script_component.hpp index c0c8e43df4..3074c10b81 100644 --- a/addons/goggles/script_component.hpp +++ b/addons/goggles/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_GOGGLES diff --git a/addons/goggles/stringtable.xml b/addons/goggles/stringtable.xml index 309a420a46..5891c98434 100644 --- a/addons/goggles/stringtable.xml +++ b/addons/goggles/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Włącz efekty gogli w trzeciej osobie Mostrar efeitos de óculos em Terceira Pessoa Attiva l'effetto degli occhiali in terza persona - 三人称視点でもゴーグルによる効果を出す - 3인칭시에도 고글 효과를 보이게 합니다 - 在第三人称视角显示护目镜效果 - 在第三人稱視角顯示護目鏡效果 Wipe Goggles @@ -28,46 +24,18 @@ Wytrzyj gogle Limpar Óculos Pulisci gli occhiali - ゴーグルを拭く - 고글 닦기 - 擦拭护目镜 - 擦拭護目鏡 Goggle Effects Эффект очков - ゴーグルによる効果 - Efekty gogli - Brilleneffekt - 고글 효과 - Effets des lunettes - Effetto Occhiali - 护目镜效果 - 護目鏡效果 Tint Тонировка - 色彩のみ - Winieta - Tönung - 색조 - Teinte - Colore - 染色 - 染色 Tint + Effects Тонировка + эффекты - 色彩 + 効果 - Winieta + Efekty - Tönung + Effekte - 색조+효과 - Teinte + effets - Colore + Effetti - 染色 + 影响 - 染色 + 影響 - + \ No newline at end of file diff --git a/addons/grenades/CfgVehicles.hpp b/addons/grenades/CfgVehicles.hpp index f9ac60d9fe..1315ccf611 100644 --- a/addons/grenades/CfgVehicles.hpp +++ b/addons/grenades/CfgVehicles.hpp @@ -2,40 +2,40 @@ class CfgVehicles { class NATO_Box_Base; class Box_NATO_Grenades_F: NATO_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_HandFlare_White,12); - MACRO_ADDMAGAZINE(ACE_HandFlare_Green,12); - MACRO_ADDMAGAZINE(ACE_M84,12); + class TransportItems { + MACRO_ADDITEM(ACE_HandFlare_White,12); + MACRO_ADDITEM(ACE_HandFlare_Green,12); + MACRO_ADDITEM(ACE_M84,12); }; }; class EAST_Box_Base; class Box_East_Grenades_F: EAST_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_HandFlare_Yellow,12); - MACRO_ADDMAGAZINE(ACE_HandFlare_Red,12); - MACRO_ADDMAGAZINE(ACE_M84,12); + class TransportItems { + MACRO_ADDITEM(ACE_HandFlare_Yellow,12); + MACRO_ADDITEM(ACE_HandFlare_Red,12); + MACRO_ADDITEM(ACE_M84,12); }; }; class IND_Box_Base; class Box_IND_Grenades_F: IND_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_HandFlare_Yellow,12); - MACRO_ADDMAGAZINE(ACE_HandFlare_Green,12); - MACRO_ADDMAGAZINE(ACE_M84,12); + class TransportItems { + MACRO_ADDITEM(ACE_HandFlare_Yellow,12); + MACRO_ADDITEM(ACE_HandFlare_Green,12); + MACRO_ADDITEM(ACE_M84,12); }; }; class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_HandFlare_White,12); - MACRO_ADDMAGAZINE(ACE_HandFlare_Red,12); - MACRO_ADDMAGAZINE(ACE_HandFlare_Green,12); - MACRO_ADDMAGAZINE(ACE_HandFlare_Yellow,12); - MACRO_ADDMAGAZINE(ACE_M84,12); - MACRO_ADDMAGAZINE(ACE_M14,12); + class TransportItems { + MACRO_ADDITEM(ACE_HandFlare_White,12); + MACRO_ADDITEM(ACE_HandFlare_Red,12); + MACRO_ADDITEM(ACE_HandFlare_Green,12); + MACRO_ADDITEM(ACE_HandFlare_Yellow,12); + MACRO_ADDITEM(ACE_M84,12); + MACRO_ADDITEM(ACE_M14,12); }; }; }; diff --git a/addons/grenades/XEH_postInit.sqf b/addons/grenades/XEH_postInit.sqf index 6809321d83..71347d721c 100644 --- a/addons/grenades/XEH_postInit.sqf +++ b/addons/grenades/XEH_postInit.sqf @@ -4,11 +4,6 @@ ["ace_flashbangExploded", {_this call FUNC(flashbangExplosionEH)}] call CBA_fnc_addEventHandler; -// Register fired event handlers -["ace_firedPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler; -["ace_firedPlayerNonLocal", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler; -["ace_firedNonPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler; - if (!hasInterface) exitWith {}; GVAR(flashbangPPEffectCC) = ppEffectCreate ["ColorCorrections", 4265]; @@ -20,9 +15,12 @@ GVAR(flashbangPPEffectCC) ppEffectForceInNVG true; if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; - // Don't change mode or show hint if advanced throwing is active - if (ACE_player getVariable [QEGVAR(advanced_throwing,inHand), false]) exitWith {false}; // Statement [] call FUNC(nextMode); }, {false}, [9, [false, false, false]], false] call CBA_fnc_addKeybind; //8 Key + +// Register fire event handler +["ace_firedPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler; +["ace_firedPlayerNonLocal", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler; +["ace_firedNonPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler; diff --git a/addons/grenades/XEH_preInit.sqf b/addons/grenades/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/grenades/XEH_preInit.sqf +++ b/addons/grenades/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/grenades/config.cpp b/addons/grenades/config.cpp index c836b613e1..a06d5f74d8 100644 --- a/addons/grenades/config.cpp +++ b/addons/grenades/config.cpp @@ -28,3 +28,7 @@ class CfgPatches { #include "CfgVehicles.hpp" #include "Effects.hpp" + +class ACE_newEvents { + flashbangExplosion = "ace_flashbangExploded"; +}; diff --git a/addons/grenades/functions/fnc_incendiary.sqf b/addons/grenades/functions/fnc_incendiary.sqf index 6081daa8af..e9267a155e 100644 --- a/addons/grenades/functions/fnc_incendiary.sqf +++ b/addons/grenades/functions/fnc_incendiary.sqf @@ -16,8 +16,6 @@ */ #include "script_component.hpp" -#define ALERT_NEAR_ENEMY_RANGE 60 - #define PARTICLE_LIFE_TIME 2 #define PARTICLE_DENSITY 20 #define PARTICLE_SIZE 1 @@ -34,29 +32,10 @@ #define ORIENTATION 5.4 #define EXPANSION 1 -params ["_projectile", "_timeToLive", "_center"]; - -if (isNull _projectile) exitWith {TRACE_1("null",_projectile);}; +params ["_projectile", "_timeToLive"]; private _position = position _projectile; -// --- AI -private _nearLocalEnemies = []; - -{ - { - if (local _x && {[_center, side _x] call BIS_fnc_sideIsEnemy}) then { // WE WANT THE OBJECTS SIDE HERE! - _nearLocalEnemies pushBackUnique _x; - }; - } forEach crew _x; -} forEach (_position nearObjects ALERT_NEAR_ENEMY_RANGE); - -{ - if (behaviour _x in ["SAFE", "AWARE"]) then { - _x setBehaviour "COMBAT"; - }; -} forEach _nearLocalEnemies; - // --- fire private _fire = "#particlesource" createVehicleLocal _position; @@ -165,16 +144,9 @@ if (isServer) then { //systemChat format ["burn: %1", _x]; // --- destroy nearby static weapons and ammo boxes - if (_x isKindOf "StaticWeapon" || {_x isKindOf "ACE_RepairItem_Base"}) then { + if (_x isKindOf "StaticWeapon" || {_x isKindOf "ReammoBox_F"}) then { _x setDamage 1; }; - if (_x isKindOf "ReammoBox_F") then { - if ("ace_cookoff" call EFUNC(common,isModLoaded) && {EGVAR(cookoff,enable)}) then { - _x call EFUNC(cookoff,cookOffBox); - } else { - _x setDamage 1; - }; - }; // --- delete nearby ground weapon holders if (_x isKindOf "WeaponHolder" || {_x isKindOf "WeaponHolderSimulated"}) then { @@ -186,39 +158,11 @@ if (isServer) then { }; } forEach (_position nearObjects EFFECT_SIZE); -// --- damage local vehicle -private _vehicle = _position nearestObject "Car"; - -if (!local _vehicle) exitWith {}; - -private _config = _vehicle call CBA_fnc_getObjectConfig; - -// --- burn tyres -private _fnc_isWheelHitPoint = { - params ["_selectionName"]; - - // wheels must use a selection named "wheel_X_Y_steering" for PhysX to work - _selectionName select [0, 6] == "wheel_" && { - _selectionName select [count _selectionName - 9] == "_steering" - } // return -}; - -{ - private _wheelSelection = getText (_config >> "HitPoints" >> _x >> "name"); - - if (_wheelSelection call _fnc_isWheelHitPoint) then { - private _wheelPosition = _vehicle modelToWorld (_vehicle selectionPosition _wheelSelection); - - if (_position distance _wheelPosition < EFFECT_SIZE * 2) then { - _vehicle setHit [_wheelSelection, 1]; - }; - }; -} forEach (getAllHitPointsDamage _vehicle param [0, []]); - // --- burn car engine -if (_vehicle isKindOf "Wheeled_APC_F") exitWith {}; +private _vehicle = _position nearestObject "Car"; +if (!local _vehicle || {_vehicle isKindOf "Wheeled_APC_F"}) exitWith {}; -private _engineSelection = getText (_config >> "HitPoints" >> "HitEngine" >> "name"); +private _engineSelection = getText (_vehicle call CBA_fnc_getObjectConfig >> "HitPoints" >> "HitEngine" >> "name"); private _enginePosition = _vehicle modelToWorld (_vehicle selectionPosition _engineSelection); if (_position distance _enginePosition < EFFECT_SIZE * 2) then { diff --git a/addons/grenades/functions/fnc_throwGrenade.sqf b/addons/grenades/functions/fnc_throwGrenade.sqf index 92c2639826..5f66dc30bf 100644 --- a/addons/grenades/functions/fnc_throwGrenade.sqf +++ b/addons/grenades/functions/fnc_throwGrenade.sqf @@ -56,12 +56,11 @@ if (getNumber (_config >> QGVAR(incendiary)) == 1) then { private _fuzeTime = getNumber (_config >> "explosionTime"); private _timeToLive = getNumber (_config >> "timeToLive"); - [FUNC(incendiary), [_projectile, _timeToLive, side _unit], _fuzeTime] call CBA_fnc_waitAndExecute; // WE WANT THE OBJECTS SIDE HERE! + [FUNC(incendiary), [_projectile, _timeToLive], _fuzeTime] call CBA_fnc_waitAndExecute; }; // handle throw modes if (_unit != ACE_player) exitWith {}; -if (_unit getVariable [QEGVAR(advanced_throwing,primed), false]) exitWith {LOG("advanced_throwing throw");}; private _mode = missionNamespace getVariable [QGVAR(currentThrowMode), 0]; diff --git a/addons/grenades/script_component.hpp b/addons/grenades/script_component.hpp index 49dbe92a3f..299a1cd69a 100644 --- a/addons/grenades/script_component.hpp +++ b/addons/grenades/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_GRENADES diff --git a/addons/grenades/stringtable.xml b/addons/grenades/stringtable.xml index fb54bed50b..711d12d023 100644 --- a/addons/grenades/stringtable.xml +++ b/addons/grenades/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Gránátkezelési mód váltása Cambia tipo di granata Alternar Modo de Granada - グレネード モードを切り替え - 투척 종류 전환 - 切换投掷模式 - 切換投擲模式 Normal Throw @@ -28,10 +24,6 @@ Normál dobás Lancio normale Arremesso Normal - 通常で投げる - 일반 던지기 - 普通投掷 - 普通投擲 High Throw @@ -44,10 +36,6 @@ Magas dobás Lancio verso l'alto Arremesso Alto - 高く投げる - 높이 던지기 - 高抛 - 高拋 Precise Throw @@ -60,10 +48,6 @@ Pontos dobás Lancio preciso Arremesso Preciso - 低く投げる - 정확한 던지기 - 精准投掷 - 精準投擲 Roll Grenade @@ -76,10 +60,6 @@ Gránát gurítása Fai rotolare la granata Rolar Granada - 転がす - 굴려넣기 - 地面滚抛 - 地面滾拋 Drop Grenade @@ -92,10 +72,6 @@ Gránát ejtése Lascia la granata Largar Granada - 落とす - 떨어뜨리기 - 下丢投掷 - 下丟投擲 M84 Stun Grenade @@ -108,10 +84,6 @@ M84 Kábítógránát Granata Stordente M84 M84 granada de atordoamento - M84 閃光手榴弾 - M84 섬광 수류탄 - M84 震撼弹 - M84 震撼彈 M84 @@ -124,10 +96,6 @@ M84 M84 M84 - M84 - M84 - M84 - M84 Also known as flashbang. Causes immediate flash blindness, deafness, tinnitus, and inner ear disturbance. @@ -140,10 +108,6 @@ Villanógránát néven is ismert. Azonnali villanási vakságot, süketséget, fülzúgást, és belső füli zavart okoz. Anche conosciuta come flashbang. Causa accecamento immediato, sensazioni di sposatezza, mancanza d'equilibrio e disturbi al timpano. Também conhecida como flashbang. Causa uma clarão imediato, cegueira, surdez, zumbido e distúrbio no tímpano. - フラッシュバンとも知られています。即時に失明と難聴、耳鳴り、内耳障害を引き起こします。 - 플래시뱅이라고도 알려져있습니다. 사용즉시 섬광으로 인한 시력장애, 청각장애, 이명, 내이기관방해를 유발합니다. - 也被称为闪光弹, 会造成暂时性失明, 耳聋, 耳鸣等效果 - 也被稱為閃光彈, 會造成暫時性失明, 耳聾, 耳鳴等效果 M127A1 Hand Held Signal (White) @@ -156,10 +120,6 @@ M127A1 Фальшфейер (Белый) Bengala M127A1 (Blanca) M127A1 Feux à main (Blanc) - M127A1 信号弾 (白) - M127A1 신호탄 (하얀색) - M127A1 手持式信号弹 (白色) - M127A1 手持式信號彈 (白色) M127A1 Hand Held Signal (Red) @@ -172,10 +132,6 @@ M127A1 Фальшфейер (Красный) Bengala M127A1 (Roja) M127A1 Feux à main (Rouge) - M127A1 信号弾 (赤) - M127A1 신호탄 (빨간색) - M127A1 手持式信号弹 (红色) - M127A1 手持式信號彈 (紅色) M127A1 Hand Held Signal (Green) @@ -188,10 +144,6 @@ M127A1 Фальшфейер (Зелёный) Bengala M127A1 (Verde) M127A1 Feux à main (Vert) - M127A1 信号弾 (緑) - M127A1 신호탄 (초록색) - M127A1 手持式信号弹 (绿色) - M127A1 手持式信號彈 (綠色) M127A1 Hand Held Signal (Yellow) @@ -204,10 +156,6 @@ M127A1 Фальшфейер (Жёлтые) Bengala M127A1 (Amarilla) M127A1 Feux à main (Jaune) - M127A1 信号弾 (黄) - M127A1 신호탄 (노란색) - M127A1 手持式信号弹 (黄色) - M127A1 手持式信號彈 (黃色) White Hand Flare @@ -220,10 +168,6 @@ Фальшфейер (Белый) Bengala (Blanca) Feux à main (Blanc) - 白の発炎筒 - 하얀색 불꽃신호기 - 白色手持式信号弹 - 白色手持式信號彈 Red Hand Flare @@ -236,10 +180,6 @@ Фальшфейер (Красный) Bengala (Roja) Feux à main (Rouge) - 赤の発炎筒 - 빨간색 불꽃신호기 - 红色手持式信号弹 - 紅色手持式信號彈 Green Hand Flare @@ -252,10 +192,6 @@ Фальшфейер (Зелёный) Bengala (Verde) Feux à main (Vert) - 緑の発炎筒 - 초록색 불꽃신호기 - 绿色手持式信号弹 - 綠色手持式信號彈 Yellow Hand Flare @@ -268,10 +204,6 @@ Фальшфейер (Жёлтые) Bengala (Amarilla) Feux à main (Jaune) - 黄の発炎筒 - 노란색 불꽃신호기 - 黄色手持式信号弹 - 黃色手持式信號彈 M127A1 (White) @@ -284,10 +216,6 @@ M127A1 (Branco) M127A1 (Белый) M127A1 (Blanca) - M127A1 (白) - M127A1 (하양) - M127A1 (白色) - M127A1 (白色) M127A1 (Red) @@ -300,10 +228,6 @@ M127A1 (Vermelho) M127A1 (Красный) M127A1 (Roja) - M127A1 (赤) - M127A1 (빨강) - M127A1 (红色) - M127A1 (紅色) M127A1 (Green) @@ -316,10 +240,6 @@ M127A1 (Verde) M127A1 (Зелёный) M127A1 (Verde) - M127A1 (緑) - M127A1 (초록) - M127A1 (绿色) - M127A1 (綠色) M127A1 (Yellow) @@ -332,46 +252,21 @@ M127A1 (Amarelo) M127A1 (Жёлтые) M127A1 (Amarilla) - M127A1 (黄) - M127A1 (노랑) - M127A1 (黄色) - M127A1 (黃色) AN-M14 Incendiary Grenade AN-M14 Brandsatz AN-M14 Зажигательная граната - AN-M14 焼夷手榴弾 - Granat zapalający AN-M14 - AN-M14 소이 수류탄 - Grenade incendiaire AN-M14 - AN-M14 Granata Incendiaria - AN-M14 燃烧手榴弹 - AN-M14 燃燒手榴彈 AN-M14 AN-M14 AN-M14 - AN-M14 - AN-M14 - AN-M14 - AN-M14 - AN-M14 - AN-M14 - AN-M14 Incendiary grenade used to destroy weapons, ammunition and other equipment. Brandsatzgranate. Verwendet um Waffen, Munition und andere Ausrüstung zu zerstören. Зажигательная граната используется для уничтожения оружия, боеприпасов и прочего оборудования. - 焼夷手榴弾は武器や弾薬箱などの装備を破壊するために使われます。 - Granat zapalający, używany do niszczenia broni, amunicji i innego sprzętu. - 소이 수류탄은 무기나 탄약 그리고 장비를 파괴할때 쓰입니다. - Grenade incendiaire utilisé pour détruire des armes, munitions et autres équipements. - Granata incendiaria usata per distruggere armi, munizioni e altri equipaggiamenti. - 燃烧手榴弹是用来摧毁武器, 弹药以及其他装备的好帮手. - 燃燒手榴彈是用來摧毀武器, 彈藥以及其他裝備的好幫手. diff --git a/addons/gunbag/XEH_preInit.sqf b/addons/gunbag/XEH_preInit.sqf index cac548d134..73b1a7ea75 100644 --- a/addons/gunbag/XEH_preInit.sqf +++ b/addons/gunbag/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; // restore gunbag info after respawn ["CAManBase", "respawn", { diff --git a/addons/gunbag/data/ace_gunbag.p3d b/addons/gunbag/data/ace_gunbag.p3d index 64de90bf4e..22658bb93d 100644 Binary files a/addons/gunbag/data/ace_gunbag.p3d and b/addons/gunbag/data/ace_gunbag.p3d differ diff --git a/addons/gunbag/functions/fnc_canInteract.sqf b/addons/gunbag/functions/fnc_canInteract.sqf index 556ea1f700..1ec9e38583 100644 --- a/addons/gunbag/functions/fnc_canInteract.sqf +++ b/addons/gunbag/functions/fnc_canInteract.sqf @@ -7,7 +7,7 @@ * 1: Target * * Return Value: - * -1: can't interact 0: empty gunbag 1: full gunbag + * -1: can't interact 0: empty gunbag 1: full gunbag * * Example: * _canInteract = [player, target] call ace_gunbag_fnc_canInteract diff --git a/addons/gunbag/functions/fnc_offGunbagCallback.sqf b/addons/gunbag/functions/fnc_offGunbagCallback.sqf index 580103b021..5d548d0e9c 100644 --- a/addons/gunbag/functions/fnc_offGunbagCallback.sqf +++ b/addons/gunbag/functions/fnc_offGunbagCallback.sqf @@ -29,16 +29,6 @@ if (_state isEqualTo []) exitWith { _state params ["_weapon", "_items", "_magazines"]; _unit addWeapon _weapon; - -// Game will auto add magazines from player's inventory, put these back in player inventory as they will be overwritten -([_unit, _weapon] call EFUNC(common,getWeaponState)) params ["", "", "_addedMags", "_addedAmmo"]; -{ - if (((_x select 0) != "") && {(_addedMags select _forEachIndex) != ""}) then { - TRACE_2("Re-adding mag",_x,_addedMags select _forEachIndex); - _unit addMagazine [_addedMags select _forEachIndex, _addedAmmo select _forEachIndex]; - }; -} forEach _magazines; - removeAllPrimaryWeaponItems _unit; { diff --git a/addons/gunbag/script_component.hpp b/addons/gunbag/script_component.hpp index c0595c1a46..5627e1048b 100644 --- a/addons/gunbag/script_component.hpp +++ b/addons/gunbag/script_component.hpp @@ -2,9 +2,10 @@ #define COMPONENT_BEAUTIFIED Gunbag #include "\z\ace\addons\main\script_mod.hpp" -// #define DEBUG_ENABLED_GUNBAG -// #define DISABLE_COMPILE_CACHE -// #define ENABLE_PERFORMANCE_COUNTERS +//#define DEBUG_ENABLED_GUNBAG +//#define DISABLE_COMPILE_CACHE +//#define CBA_DEBUG_SYNCHRONOUS +//#define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_GUNBAG #define DEBUG_MODE_FULL diff --git a/addons/gunbag/stringtable.xml b/addons/gunbag/stringtable.xml index ab4fdf5ac7..6fca478f6d 100644 --- a/addons/gunbag/stringtable.xml +++ b/addons/gunbag/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -7,12 +7,6 @@ Housse d'arme Чехол Pouzdro na zbraň - ガンバッグ - Torba na broń - 총가방 - Borsa per Armi - 枪袋 - 槍袋 Gunbag (Tan) @@ -20,12 +14,6 @@ Housse d'arme (marron clair) Чехол (желтовато-коричневый) Pouzdro na zbraň (Žlutohnědá) - ガンバッグ (タン) - Torba na broń (jasnobrązowa) - 총가방 (황갈색) - Borsa per Armi (Tan) - 枪袋 (黄褐色) - 槍袋 (黃褐色) Put weapon into gunbag @@ -33,12 +21,6 @@ Placer l'arme dans la housse d'arme Зачехлить оружие Vložit zbraň do pouzdra - ガンバッグへ武器を入れる - Włóż broń do torby - 무기를 총가방에 넣기 - Metti l'arma nella borsa per armi - 将武器放置枪袋 - 將武器放置槍袋 Get weapon out of gunbag @@ -46,12 +28,6 @@ Sortir l'arme hors de la housse Расчехлить оружие Vytáhnout zbraň z pouzdra - ガンバッグから武器を出す - Wyciągnij broń z torby - 무기를 총가방에서 꺼내기 - Prendi l'arma dalla borsa per armi - 将武器拿出枪袋 - 將武器拿出槍袋 Status @@ -59,12 +35,6 @@ Status Статус Status - 中身 - Status - 상태 - Stato - 状态 - 狀態 Gunbag Empty @@ -72,12 +42,6 @@ Housse d'arme vide Чехол пуст Prázdné pouzdro na zbraň - ガンバッグは空 - Torba jest pusta - 총가방 비어있음 - Borsa per armi vuota - 枪袋为空 - 槍袋為空 - + \ No newline at end of file diff --git a/addons/hearing/CfgVehicles.hpp b/addons/hearing/CfgVehicles.hpp index f44e50e6d0..760ed95a03 100644 --- a/addons/hearing/CfgVehicles.hpp +++ b/addons/hearing/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { class ACE_Equipment { class ACE_PutInEarplugs { displayName = CSTRING(EarPlugs_On); - condition = QUOTE(GVAR(EnableCombatDeafness) && {!([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player}}); + condition = QUOTE( !([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player} ); exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE( [_player] call FUNC(putInEarPlugs) ); showDisabled = 0; @@ -14,7 +14,7 @@ class CfgVehicles { }; class ACE_RemoveEarplugs { displayName = CSTRING(EarPlugs_Off); - condition = QUOTE( GVAR(EnableCombatDeafness) && {[_player] call FUNC(hasEarPlugsIn)}); + condition = QUOTE( [_player] call FUNC(hasEarPlugsIn) ); exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE( [_player] call FUNC(removeEarPlugs) ); showDisabled = 0; diff --git a/addons/hearing/CfgWeapons.hpp b/addons/hearing/CfgWeapons.hpp index 8b138271b3..c063c0e896 100644 --- a/addons/hearing/CfgWeapons.hpp +++ b/addons/hearing/CfgWeapons.hpp @@ -13,42 +13,42 @@ class CfgWeapons { }; }; - #define HEARING_PROTECTION_VICCREW EGVAR(hearing,protection) = 0.85; EGVAR(hearing,lowerVolume) = 0.6; - #define HEARING_PROTECTION_EARMUFF EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0.5; - #define HEARING_PROTECTION_PELTOR EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0; - class H_HelmetB; class H_HelmetCrew_B: H_HelmetB { - HEARING_PROTECTION_VICCREW + GVAR(protection) = 1; + GVAR(lowerVolume) = 0.80; }; class H_CrewHelmetHeli_B: H_HelmetB { - HEARING_PROTECTION_VICCREW + GVAR(protection) = 0.85; + GVAR(lowerVolume) = 0.75; }; class H_PilotHelmetHeli_B: H_HelmetB { - HEARING_PROTECTION_VICCREW + GVAR(protection) = 0.85; + GVAR(lowerVolume) = 0.75; }; class H_PilotHelmetFighter_B: H_HelmetB { - HEARING_PROTECTION_VICCREW + GVAR(protection) = 1; + GVAR(lowerVolume) = 0.80; }; class HelmetBase; class H_Cap_headphones: HelmetBase { - HEARING_PROTECTION_EARMUFF + GVAR(protection) = 0.5; + GVAR(lowerVolume) = 0.60; }; class H_HelmetB_light: H_HelmetB { - HEARING_PROTECTION_PELTOR - }; - class H_HelmetB_camo: H_HelmetB { - HEARING_PROTECTION_PELTOR + GVAR(protection) = 0.8; + GVAR(lowerVolume) = 0.20; }; class H_HelmetB_plain_mcamo; class H_HelmetSpecB: H_HelmetB_plain_mcamo { - HEARING_PROTECTION_PELTOR + GVAR(protection) = 0.8; + GVAR(lowerVolume) = 0.20; }; }; diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index 17548a973b..34664525da 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -11,71 +11,35 @@ GVAR(playerVehAttenuation) = 1; GVAR(time3) = 0; GVAR(damageCoefficent) = 1; GVAR(volumeAttenuation) = 1; -GVAR(lastPlayerVehicle) = objNull; ["ace_settingsInitialized", { TRACE_1("settingInit",GVAR(EnableCombatDeafness)); // Only run PFEH and install event handlers if combat deafness is enabled if (!GVAR(EnableCombatDeafness)) exitWith {}; + //Add XEH: + ["CAManBase", "FiredNear", FUNC(firedNear)] call CBA_fnc_addClassEventHandler; + ["CAManBase", "Explosion", FUNC(explosionNear)] call CBA_fnc_addClassEventHandler; + + // Update hearing protection now: + [] call FUNC(updateHearingProtection); + // Spawn volume updating process - [LINKFUNC(updateVolume), 1, [false]] call CBA_fnc_addPerFrameHandler; + [FUNC(updateVolume), 1, [false]] call CBA_fnc_addPerFrameHandler; // Update veh attunation when player veh changes - ["vehicle", { - params ["_player", "_vehicle"]; - TRACE_2("vehicle change",_player,_vehicle); - _this call FUNC(updatePlayerVehAttenuation); - - if (!isNull GVAR(lastPlayerVehicle)) then { - private _firedEH = GVAR(lastPlayerVehicle) getVariable [QGVAR(firedEH), -1]; - GVAR(lastPlayerVehicle) removeEventHandler ["FiredNear", _firedEH]; - GVAR(lastPlayerVehicle) setVariable [QGVAR(firedEH), nil]; - GVAR(lastPlayerVehicle) = objNull; - TRACE_2("removed veh eh",_firedEH,GVAR(lastPlayerVehicle)); - }; - if ((!isNull _vehicle) && {_player != _vehicle}) then { - private _firedEH = _vehicle addEventHandler ["FiredNear", {call FUNC(firedNear)}]; - _vehicle setVariable [QGVAR(firedEH), _firedEH]; - GVAR(lastPlayerVehicle) = _vehicle; - TRACE_2("added veh eh",_firedEH,GVAR(lastPlayerVehicle)); - }; - }, true] call CBA_fnc_addPlayerEventHandler; - ["turret", LINKFUNC(updatePlayerVehAttenuation), false] call CBA_fnc_addPlayerEventHandler; - + ["vehicle", FUNC(updatePlayerVehAttenuation)] call CBA_fnc_addPlayerEventHandler; + ["turret", FUNC(updatePlayerVehAttenuation)] call CBA_fnc_addPlayerEventHandler; // 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]; - private _explosionEH = _oldPlayer getVariable [QGVAR(explosionEH), -1]; - _oldPlayer removeEventHandler ["Explosion", _explosionEH]; - _oldPlayer setVariable [QGVAR(explosionEH), nil]; - TRACE_3("removed unit eh",_oldPlayer,_firedEH,_explosionEH); - }; - // Don't add a new EH if the unit respawned - if ((_player getVariable [QGVAR(firedEH), -1]) == -1) then { - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _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]; - private _explosionEH = _player addEventHandler ["Explosion", {call FUNC(explosionNear)}]; - _player setVariable [QGVAR(explosionEH), _explosionEH]; - TRACE_3("added unit eh",_player,_firedEH,_explosionEH); - }; - GVAR(deafnessDV) = 0; GVAR(deafnessPrior) = 0; + ACE_player setVariable [QGVAR(deaf), false]; GVAR(time3) = 0; [] call FUNC(updateHearingProtection); - }, true] call CBA_fnc_addPlayerEventHandler; + }] call CBA_fnc_addPlayerEventHandler; // Update protection on possible helmet change - ["loadout", LINKFUNC(updateHearingProtection), false] call CBA_fnc_addPlayerEventHandler; + ["loadout", FUNC(updateHearingProtection)] call CBA_fnc_addPlayerEventHandler; }] call CBA_fnc_addEventHandler; diff --git a/addons/hearing/XEH_preInit.sqf b/addons/hearing/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/hearing/XEH_preInit.sqf +++ b/addons/hearing/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/hearing/functions/fnc_explosionNear.sqf b/addons/hearing/functions/fnc_explosionNear.sqf index 9087984b50..76c6707de5 100644 --- a/addons/hearing/functions/fnc_explosionNear.sqf +++ b/addons/hearing/functions/fnc_explosionNear.sqf @@ -18,6 +18,8 @@ params ["_unit", "_damage"]; +if (_unit != ACE_player) exitWith {}; + TRACE_2("explosion near player",_unit,_damage); private ["_strength"]; diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf index 9a5e65b774..46bbee4fae 100644 --- a/addons/hearing/functions/fnc_firedNear.sqf +++ b/addons/hearing/functions/fnc_firedNear.sqf @@ -24,6 +24,8 @@ params ["_object", "_firer", "_distance", "_weapon", "", "", "_ammo"]; +//Only run if firedNear object is player or player's vehicle: +if ((ACE_player != _object) && {(vehicle ACE_player) != _object}) exitWith {}; if (_weapon in ["Throw", "Put"]) exitWith {}; if (_distance > 50) exitWith {}; @@ -53,7 +55,7 @@ if (isNil "_loudness") then { }; } count _muzzles; { - private _ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo"); + _ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo"); _weaponMagazines set [_forEachIndex, [_x, _ammoType]]; } forEach _weaponMagazines; @@ -72,8 +74,6 @@ if (isNil "_loudness") then { private _initSpeed = getNumber(configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); private _caliber = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_caliber"); _caliber = call { - // If explicilty defined, use ACE_caliber - if ((count configProperties [(configFile >> "CfgAmmo" >> _ammo), "configName _x == 'ACE_caliber'", false]) == 1) exitWith {_caliber}; if (_ammo isKindOf ["ShellBase", (configFile >> "CfgAmmo")]) exitWith { 80 }; if (_ammo isKindOf ["RocketBase", (configFile >> "CfgAmmo")]) exitWith { 200 }; if (_ammo isKindOf ["MissileBase", (configFile >> "CfgAmmo")]) exitWith { 600 }; diff --git a/addons/hearing/functions/fnc_handleRespawn.sqf b/addons/hearing/functions/fnc_handleRespawn.sqf index 58500f1c3d..5bad68761c 100644 --- a/addons/hearing/functions/fnc_handleRespawn.sqf +++ b/addons/hearing/functions/fnc_handleRespawn.sqf @@ -6,7 +6,7 @@ * 0: Unit * * Return Value: - * None + * Nothing * * Example: * [player] call ACE_hearing_fnc_handleRespawn; diff --git a/addons/hearing/functions/fnc_hasEarPlugsIn.sqf b/addons/hearing/functions/fnc_hasEarPlugsIn.sqf index ce697ab295..67a76685f4 100644 --- a/addons/hearing/functions/fnc_hasEarPlugsIn.sqf +++ b/addons/hearing/functions/fnc_hasEarPlugsIn.sqf @@ -3,7 +3,7 @@ * Check if the unit has earplugs put in. * * Arguments: - * 0: Unit (player) + * 0:Unit (player) * * Return Value: * Have Earplugs in diff --git a/addons/hearing/functions/fnc_moduleHearing.sqf b/addons/hearing/functions/fnc_moduleHearing.sqf index 8c04d9b8a4..053bcb6d7f 100644 --- a/addons/hearing/functions/fnc_moduleHearing.sqf +++ b/addons/hearing/functions/fnc_moduleHearing.sqf @@ -3,15 +3,10 @@ * Initializes the Hearing module. * * Arguments: - * Whatever the module provides. (I dunno.) + * Whatever the module provides. (I dunno.) * * Return Value: * None - * - * Example: - * [player] call ACE_hearing_fnc_moduleHearing - * - * Public: No */ #include "script_component.hpp" @@ -25,4 +20,4 @@ if ((_logic getVariable "DisableEarRinging") != -1) then { }; [_logic, QGVAR(enabledForZeusUnits), "enabledForZeusUnits"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(autoAddEarplugsToUnits), "autoAddEarplugsToUnits"] call EFUNC(common,readSettingFromModule); -INFO("Hearing Module Initialized."); +ACE_LOGINFO("Hearing Module Initialized."); diff --git a/addons/hearing/functions/fnc_putInEarplugs.sqf b/addons/hearing/functions/fnc_putInEarplugs.sqf index 4471ec1aba..90fe8d62ac 100644 --- a/addons/hearing/functions/fnc_putInEarplugs.sqf +++ b/addons/hearing/functions/fnc_putInEarplugs.sqf @@ -3,7 +3,7 @@ * Puts in earplugs. * * Arguments: - * 0: Unit (player) + * 0:Unit (player) * * Return Value: * None @@ -17,8 +17,6 @@ params ["_player"]; -if (!GVAR(EnableCombatDeafness)) exitWith {}; - // Plugs in inventory, putting them in _player removeItem "ACE_EarPlugs"; diff --git a/addons/hearing/functions/fnc_removeEarplugs.sqf b/addons/hearing/functions/fnc_removeEarplugs.sqf index a46febefb2..3154230ecf 100644 --- a/addons/hearing/functions/fnc_removeEarplugs.sqf +++ b/addons/hearing/functions/fnc_removeEarplugs.sqf @@ -3,7 +3,7 @@ * Takes out earplugs. * * Arguments: - * 0: Unit (player) + * 0:Unit (player) * * Return Value: * None @@ -17,8 +17,6 @@ params ["_player"]; -if (!GVAR(EnableCombatDeafness)) exitWith {}; - if !(_player canAdd "ACE_EarPlugs") exitWith { // inventory full [localize LSTRING(Inventory_Full)] call EFUNC(common,displayTextStructured); }; diff --git a/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf index b077487c79..7d48ca7b34 100644 --- a/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf +++ b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf @@ -15,17 +15,20 @@ */ #include "script_component.hpp" -private _vehicle = vehicle ACE_player; +private ["_effectType", "_newAttenuation", "_turretConfig", "_turretPath", "_vehicle"]; + +_vehicle = vehicle ACE_player; if (isNull _vehicle) exitWith {}; -private _newAttenuation = 1; +_newAttenuation = 1; if (ACE_player != _vehicle) then { - private _turretPath = [ACE_player] call EFUNC(common,getTurretIndex); - private _effectType = getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "attenuationEffectType"); + _effectType = ""; + _turretPath = [ACE_player] call EFUNC(common,getTurretIndex); + _effectType = getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "attenuationEffectType"); if (!(_turretPath isEqualTo [])) then { - private _turretConfig = [(configFile >> "CfgVehicles" >> (typeOf _vehicle)), _turretPath] call EFUNC(common,getTurretConfigPath); + _turretConfig = [(configFile >> "CfgVehicles" >> (typeOf _vehicle)), _turretPath] call EFUNC(common,getTurretConfigPath); if ((getNumber (_turretConfig >> "disableSoundAttenuation")) == 1) then { _effectType = ""; @@ -38,10 +41,8 @@ if (ACE_player != _vehicle) then { _newAttenuation = switch (true) do { case (_effectType == ""): {1}; - case (_effectType == "CarAttenuation"); - case (_effectType == "RHS_CarAttenuation"): { // Increase protection for armored cars - private _armor = getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "HitPoints" >> "HitBody" >> "armor"); - linearConversion [2, 8, _armor, 0.5, 0.3, true];}; + case (_effectType == "CarAttenuation"): {0.5}; + case (_effectType == "RHS_CarAttenuation"): {0.5}; case (_effectType == "OpenCarAttenuation"): {1}; case (_effectType == "TankAttenuation"): {0.1}; case (_effectType == "HeliAttenuation"): {0.3}; diff --git a/addons/hearing/script_component.hpp b/addons/hearing/script_component.hpp index 7e69c908b5..7c0413898f 100644 --- a/addons/hearing/script_component.hpp +++ b/addons/hearing/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_HEARING diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index e8b44833ef..e58f657417 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Füldugó Protetor auricular Tappi auricolari - 耳栓 - 귀마개 - 耳塞 - 耳塞 Protective Earplugs allow the wearer to be near loud weaponry without damage to his hearing. @@ -28,10 +24,6 @@ Erősebb hanghatásoktól védő füldugó, megakadályozza a nagy hanggal járó fegyverzettől való halláskárosodást. Protetor para ouvidos permitem que o usuário esteja próximo a ruídos sem danificar sua audição. Proteggono l'apparato uditivo, permettendo a chi li indossa di resistere ai suoni particolarmente forti senza alcun danno. - 着けることにより、近くの大きな銃声から聴覚を保護します。 - 보호용 귀마개는 화기로부터의 큰소리로부터 사용자의 청력을 보호합니다. - 配戴防护耳塞, 遇到大声的武器发射时也不会损害听力. - 配戴防護耳塞, 遇到大聲的武器發射時也不會損害聽力. Earplugs in @@ -44,10 +36,6 @@ Füldugó berakva Protetores colocados Indossa i tappi auricolari - 耳栓を着ける - 귀마개 착용 - 塞入耳塞 - 塞入耳塞 Earplugs out @@ -60,10 +48,6 @@ Füldugó kivéve Protetores retirados Levati i tappi auricolari - 耳栓を外す - 귀마개 뺌 - 取出耳塞 - 取出耳塞 Earplugs in @@ -76,10 +60,6 @@ Füldugó berakva Protetores colocados Indossa i tappi auricolari - 耳栓を着けた - 귀마개 착용 - 耳塞已塞入 - 耳塞已塞入 Earplugs out @@ -92,10 +72,6 @@ Füldugó kivéve Protetores retirados Levati i tappi auricolari - 耳栓を外した - 귀마개 뺌 - 耳塞已取出 - 耳塞已取出 You have no earplugs @@ -108,10 +84,6 @@ Nincsen füldugód Você não possui protetores auriculares Non hai i tappi auricolari - 耳栓を持っていません - 귀마개가 없습니다 - 你没有耳塞 - 你沒有耳塞 No inventory space @@ -124,10 +96,6 @@ Não há espaço no inventário Nincs több hely Нет места в инвентаре - インベントリに空きがありません。 - 넣을 공간이 없습니다 - 无可用空间 - 無可用空間 Disable ear ringing @@ -140,10 +108,6 @@ Fülcsengés letiltása Disabilita i fischi nelle orecchie Desabilitar zumbido de ouvidos - 耳鳴りを無効化する - 이명현상 끄기 - 关闭耳鸣效果 - 關閉耳鳴效果 Remove tinnitus effect when the player takes hearing damage @@ -154,10 +118,6 @@ Quando il giocatore riceve danni all'udito, non fa sentire i fischi nelle orecchie Remove o efeito de zunido quando o jogador recebe dano na audição Убирает эффект звона в ушах, когда игрок получает повреждение слуха - プレイヤーの聴覚が損傷をしたら耳鳴りの効果を削除します - 플레이어가 청력손실을 입을때 생기는 이명현상을 제거합니다. - 关闭耳鸣效果时, 就算玩家受到相当程度的听力伤害, 也不会造成耳鸣效果. - 關閉耳鳴效果時, 就算玩家受到相當程度的聽力傷害, 也不會造成耳鳴效果. Hearing @@ -170,10 +130,6 @@ Hallás Слух Udito - 聴覚 - 청력 - 听力设定 - 聽力設定 Enable Combat Deafness @@ -186,10 +142,6 @@ Harci süketség engedélyezése? Оглушение Sordità da combattimento - 戦闘による難聴を有効化 - 전투 난청 켜기 - 启用战斗性耳聋? - 啟用戰鬥性耳聾? Reduces the hearing ability as the player takes hearing damage @@ -201,10 +153,6 @@ Уменьшает возможность игрока слышать звуки при повреждении органов слуха Riduci l'abilità uditiva quando il giocatore riceve danno uditivo Réduire l'audition lorsque le joueur prend des dommages auditifs. - 音による損傷をうけ、聴覚が減る可能性があります - 청력에 손상을 입으면 듣는 소리가 감소합니다. - 当玩家听力受损时降低听力能力? - 當玩家聽力受損時降低聽力能力? 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 @@ -217,10 +165,6 @@ Ce module active / désactivé la surdité au combat. Si active, des joueurs peuvent devenir sourds sans protection d'oreille, si une arme est utilisée ou une explosion a lieu à proximité Controles de sordera de combate y zumbido en los oídos. Al activarlo, los jugadores pueden ser ensordecidos cuando un arma se dispara cerca o una explosión tiene lugar sin protección auditiva Controlla la sordità da combattimento e fischio alle orecchie. Quando attivato, i giocatori possono essere assordati quando un'arma spara vicino o avviene un'esplosione senza protezione uditiva - 戦闘による難聴や、耳鳴りを設定します。有効になった場合、聴覚を保護していないと近傍の銃声や爆発音により、難聴になります。 - 전투 난청과 이명현상을 조작합니다. 작동시 플레이어가 화기나 폭발의 주변에 있을경우 청력보호장치가 없을때 청력손실을 입습니다. - 设定战斗性耳聋和耳鸣. 当启用后, 玩家会在有武器在旁边射击或爆炸产生时造成耳鸣效果 - 設定戰鬥性耳聾和耳鳴. 當啟用後, 玩家會在有武器在旁邊射擊或爆炸產生時造成耳鳴效果 Effect Zeus RC @@ -232,10 +176,6 @@ Vliv na Zeus RC Effetto Zeus RC Effet sur le CàD du Zeus - Zeus RC への効果 - Zeus RC 효과 - 启用效果在宙斯远程遥控 - 啟用效果在宙斯遠程遙控 Allow zeus remote controlled units to be able to take hearing damage. @@ -247,10 +187,6 @@ Aktivovat efekt ztráty sluchu pro vzdáleně ovládané jednotky. Consenti alle unità controllate in remoto da Zeus di ricevere danni all'udito. Permet aux unités controlées à distance de subir des traumatismes sonores. - Zeus により遠隔操作されたユニットにも、聴覚へ損傷を受けるようにします。 - Zeus가 원격으로 청력손실을 입힐 수 있게 합니다. - 设定宙斯远程遥控的单位也会受到耳鸣的效果. - 設定宙斯遠程遙控的單位也會受到耳鳴的效果. Add earplugs to units @@ -262,10 +198,6 @@ Aggiungi Tappi per Orecchie alle unità Agregar tapones de oida a la unidad Ajouter des bouchons anti-bruits aux unités - ユニットへ耳栓を追加 - 해당 인원에게 귀마개 추가 - 增加耳塞给单位 - 增加耳塞給單位 Add the `ACE_EarPlugs` item to all units that have loud weapons. Can disable if using custom loadouts. @@ -277,10 +209,6 @@ Aggiungi l'oggetto 'ACE_EarPlugs' a tutte le unità che hanno armi rumorose. Può essere disabilitato se vengono usati loadout personalizzati. Agregar el item `ACE_EarPlugs` a todas las unidades equipadas con armas muy ruidosas. Desactivar si quieren utilizarse equipamientos personalizados. Ajoute l'objet "Ace_EarPlugs" à toutes les unités ayant des armes bruyantes. Peut être désactivé par des loadouts personalisés. - 全ユニットへ`ACE_EarPlugs`アイテムをもたせます。これは変更された武装で無効化できます。 - 무기를 가지고 있는 모든 인원에게 'ACE_EarPlugs'를 지급합니다. 임의의 장비를 사용시 비활성화 할 수 있습니다. - 增加`ACE_EarPlugs`物品给拥有巨大噪音武器的单位. 当你想自定装备时, 此功能可被关闭. - 增加`ACE_EarPlugs`物品給擁有巨大噪音武器的單位. 當你想自定裝備時, 此功能可被關閉. - + \ No newline at end of file diff --git a/addons/hellfire/$PBOPREFIX$ b/addons/hellfire/$PBOPREFIX$ deleted file mode 100644 index 5bd6c77aff..0000000000 --- a/addons/hellfire/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\hellfire diff --git a/addons/hellfire/ACE_GuidanceConfig.hpp b/addons/hellfire/ACE_GuidanceConfig.hpp deleted file mode 100644 index 1c5d4705f3..0000000000 --- a/addons/hellfire/ACE_GuidanceConfig.hpp +++ /dev/null @@ -1,17 +0,0 @@ -class EGVAR(missileguidance,AttackProfiles) { - class hellfire { - // LOBL and LOAL-DIR behaive the same - name = "LOAL-DIR"; - nameLocked = "LOBL"; - functionName = QFUNC(attackProfile); - GVAR(launchHeightClear) = 0; - }; - class hellfire_hi: hellfire { - name = "LOAL-HI"; - GVAR(launchHeightClear) = 304.8; // clear 1000 ft by 1500m - }; - class hellfire_lo: hellfire_hi { - name = "LOAL-LO"; - GVAR(launchHeightClear) = 91.5; // clear 300 ft by 600m - }; -}; diff --git a/addons/hellfire/CfgAmmo.hpp b/addons/hellfire/CfgAmmo.hpp deleted file mode 100644 index c8900459ad..0000000000 --- a/addons/hellfire/CfgAmmo.hpp +++ /dev/null @@ -1,70 +0,0 @@ -class CfgAmmo { - class M_PG_AT; - - class ACE_Hellfire_AGM114K: M_PG_AT { - displayName = "AGM-114K"; - displayNameShort = "AGM-114K"; - description = "AGM-114K"; - descriptionShort = "AGM-114K"; - - model = "\A3\Weapons_F\Ammo\Missile_AT_03_fly_F"; - proxyShape = "\A3\Weapons_F\Ammo\Missile_AT_03_F"; - - hit = 1400; - indirectHit = 71; - indirectHitRange = 4.5; - effectsMissile = "missile2"; - - irLock = 0; - laserLock = 0; - manualControl = 0; - maxSpeed = 450; - - thrustTime = 2.5; // motor burn 2-3 sec - thrust = 250; - timeToLive = 40; - - EGVAR(rearm,caliber) = 178; - - class ace_missileguidance { - enabled = 1; - - minDeflection = 0.0005; // Minium flap deflection for guidance - maxDeflection = 0.01; // Maximum flap deflection for guidance - incDeflection = 0.0005; // The incrmeent in which deflection adjusts. - - 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" }; - - 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 = 5000; // Range from the missile which the seeker can visually search - - // Attack profile type selection - defaultAttackProfile = "hellfire"; - attackProfiles[] = {"hellfire", "hellfire_hi", "hellfire_lo"}; - }; - }; - class ACE_Hellfire_AGM114N: ACE_Hellfire_AGM114K { - displayName = "AGM-114N"; - displayNameShort = "AGM-114N"; - description = "AGM-114N"; - descriptionShort = "AGM-114N"; - hit = 1100; - indirectHit = 200; - indirectHitRange = 10; - explosionEffects = "BombExplosion"; - class ace_missileguidance: ace_missileguidance { - enabled = 1; // Missile Guidance must be explicitly enabled - }; - }; -}; diff --git a/addons/hellfire/CfgEventHandlers.hpp b/addons/hellfire/CfgEventHandlers.hpp deleted file mode 100644 index 77ea0239bd..0000000000 --- a/addons/hellfire/CfgEventHandlers.hpp +++ /dev/null @@ -1,15 +0,0 @@ -class Extended_PreStart_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); - }; -}; -class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); - }; -}; -class Extended_PostInit_EventHandlers { - class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postInit)); - }; -}; diff --git a/addons/hellfire/CfgMagazines.hpp b/addons/hellfire/CfgMagazines.hpp deleted file mode 100644 index 79c5b5016c..0000000000 --- a/addons/hellfire/CfgMagazines.hpp +++ /dev/null @@ -1,87 +0,0 @@ -class CfgMagazines { - class 12Rnd_PG_missiles; - - // Kilo - tandem shaped charge HEAT (anti-tank) - class 6Rnd_ACE_Hellfire_AGM114K: 12Rnd_PG_missiles { // Old style vehicle magazine - count = 6; - ammo = "ACE_Hellfire_AGM114K"; - displayName = "AGM-114K [ACE]"; - displayNameShort = "AGM-114K"; - descriptionShort = "AGM-114K"; - }; - - // 1.70 pylon magazines: - class PylonMissile_1Rnd_ACE_Hellfire_AGM114K: 6Rnd_ACE_Hellfire_AGM114K { // Bare missle - displayName = "1x AGM-114K [ACE]"; - count = 1; - mass = 70; - pylonWeapon = QGVAR(launcher); - hardpoints[] = {"SCALPEL_1RND"}; - model = "\A3\Weapons_F\DynamicLoadout\PylonMissile_1x_Bomb_04_F.p3d"; - }; - class PylonRack_1Rnd_ACE_Hellfire_AGM114K: 6Rnd_ACE_Hellfire_AGM114K { // 1x Launcher Support Rack - displayName = "1x AGM-114K [ACE]"; - count = 1; - mass = 85; - pylonWeapon = QGVAR(launcher); - hardpoints[] = {"B_MISSILE_PYLON", "SCALPEL_1RND_EJECTOR", "B_ASRRAM_EJECTOR", "UNI_SCALPEL"}; - model = "\A3\Weapons_F\DynamicLoadout\PylonPod_1x_Missile_AA_04_F.p3d"; - }; - class PylonRack_3Rnd_ACE_Hellfire_AGM114K: 6Rnd_ACE_Hellfire_AGM114K { // 3x Launcher Support Rack - displayName = "3x AGM-114K [ACE]"; - count = 3; - mass = 250; - pylonWeapon = QGVAR(launcher); - hardpoints[] = {"B_MISSILE_PYLON", "UNI_SCALPEL"}; - model = "\A3\Weapons_F\DynamicLoadout\PylonPod_3x_Missile_LG_scalpel_F.p3d"; - mirrorMissilesIndexes[] = {2, 1, 3}; - }; - class PylonRack_4Rnd_ACE_Hellfire_AGM114K: 6Rnd_ACE_Hellfire_AGM114K { // 4x Launcher Support Rack - displayName = "4x AGM-114K [ACE]"; - count = 4; - mass = 340; - pylonWeapon = QGVAR(launcher); - hardpoints[] = {"UNI_SCALPEL"}; - model = "\A3\Weapons_F\DynamicLoadout\PylonPod_4x_Missile_LG_scalpel_F.p3d"; - mirrorMissilesIndexes[] = {2, 1, 4, 3}; - }; - - // November - Metal augmented charge (Thermobaric) (Enclosures, ships, urban targets, air defense units) - class 6Rnd_ACE_Hellfire_AGM114N: 6Rnd_ACE_Hellfire_AGM114K { // Old style vehicle magazine - count = 6; - ammo = "ACE_Hellfire_AGM114N"; - displayName = "AGM-114N [ACE]"; - displayNameShort = "AGM-114N"; - descriptionShort = "AGM-114N"; - }; - - // 1.70 pylon magazines: - class PylonMissile_1Rnd_ACE_Hellfire_AGM114N: PylonMissile_1Rnd_ACE_Hellfire_AGM114K { // Bare missle - displayName = "1x AGM-114N [ACE]"; - displayNameShort = "AGM-114N"; - descriptionShort = "AGM-114N"; - ammo = "ACE_Hellfire_AGM114N"; - pylonWeapon = QGVAR(launcher_N); - }; - class PylonRack_1Rnd_ACE_Hellfire_AGM114N: PylonRack_1Rnd_ACE_Hellfire_AGM114K { // 1x Launcher Support Rack - displayName = "1x AGM-114N [ACE]"; - displayNameShort = "AGM-114N"; - descriptionShort = "AGM-114N"; - ammo = "ACE_Hellfire_AGM114N"; - pylonWeapon = QGVAR(launcher_N); - }; - class PylonRack_3Rnd_ACE_Hellfire_AGM114N: PylonRack_3Rnd_ACE_Hellfire_AGM114K { // 3x Launcher Support Rack - displayName = "3x AGM-114N [ACE]"; - displayNameShort = "AGM-114N"; - descriptionShort = "AGM-114N"; - ammo = "ACE_Hellfire_AGM114N"; - pylonWeapon = QGVAR(launcher_N); - }; - class PylonRack_4Rnd_ACE_Hellfire_AGM114N: PylonRack_4Rnd_ACE_Hellfire_AGM114K { // 4x Launcher Support Rack - displayName = "4x AGM-114N [ACE]"; - displayNameShort = "AGM-114N"; - descriptionShort = "AGM-114N"; - ammo = "ACE_Hellfire_AGM114N"; - pylonWeapon = QGVAR(launcher_N); - }; -}; diff --git a/addons/hellfire/CfgVehicles.hpp b/addons/hellfire/CfgVehicles.hpp deleted file mode 100644 index 89dbf131d7..0000000000 --- a/addons/hellfire/CfgVehicles.hpp +++ /dev/null @@ -1,6 +0,0 @@ -class CfgVehicles { - class Heli_Attack_01_base_F; - class Heli_Attack_01_dynamicLoadout_base_F: Heli_Attack_01_base_F { - GVAR(addLaserDesignator) = 1; - }; -}; diff --git a/addons/hellfire/CfgWeapons.hpp b/addons/hellfire/CfgWeapons.hpp deleted file mode 100644 index 483f1dd0a7..0000000000 --- a/addons/hellfire/CfgWeapons.hpp +++ /dev/null @@ -1,17 +0,0 @@ -class CfgWeapons { - class missiles_SCALPEL; - class GVAR(launcher): missiles_SCALPEL { - displayName = "AGM-114K Hellfire II"; - GVAR(enabled) = 1; // show attack profile / lock on hud - EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code) - canLock = 0; - weaponLockSystem = 0; - magazines[] = {"6Rnd_ACE_Hellfire_AGM114K", "PylonMissile_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_3Rnd_ACE_Hellfire_AGM114K", "PylonRack_4Rnd_ACE_Hellfire_AGM114K"}; - lockingTargetSound[] = {"",0,1}; - lockedTargetSound[] = {"",0,1}; - }; - class GVAR(launcher_N): GVAR(launcher) { - displayName = "AGM-114N Hellfire II"; - magazines[] = {"6Rnd_ACE_Hellfire_AGM114N", "PylonMissile_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_3Rnd_ACE_Hellfire_AGM114N", "PylonRack_4Rnd_ACE_Hellfire_AGM114N"}; - }; -}; diff --git a/addons/hellfire/README.md b/addons/hellfire/README.md deleted file mode 100644 index bb9eef711e..0000000000 --- a/addons/hellfire/README.md +++ /dev/null @@ -1,10 +0,0 @@ -ace_hellfire -========== - -Adds AGM-114K Hellfire missiles. - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/hellfire/RscTitles.hpp b/addons/hellfire/RscTitles.hpp deleted file mode 100644 index 2bbedae1b6..0000000000 --- a/addons/hellfire/RscTitles.hpp +++ /dev/null @@ -1,57 +0,0 @@ -class RscControlsGroupNoScrollbars; -class RscPictureKeepAspect; -class RscText; - -class RscTitles { - class GVAR(modeDisplay) { - idd = -1; - onLoad = QUOTE(with uiNameSpace do { GVAR(display) = _this select 0 };); - movingEnable = 0; - duration = 60; - fadeIn = "false"; - fadeOut = "false"; - 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)"; - - class controls { - class AttackMode: RscText { - idc = IDC_ATTACKMODE; - colorText[] = {1, 1, 1, 1}; - 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)"; - }; - 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)"; - 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)"; - }; - 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)"; - y = "0"; - w = "(1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - h = "(1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - }; - }; - }; - - }; - }; -}; diff --git a/addons/hellfire/XEH_PREP.hpp b/addons/hellfire/XEH_PREP.hpp deleted file mode 100644 index 8b07d00b2c..0000000000 --- a/addons/hellfire/XEH_PREP.hpp +++ /dev/null @@ -1,5 +0,0 @@ -LOG("prep"); -PREP(attackProfile); -PREP(getAttackProfileSettings); -PREP(setupVehicle); -PREP(showHud); diff --git a/addons/hellfire/XEH_postInit.sqf b/addons/hellfire/XEH_postInit.sqf deleted file mode 100644 index 34fc5b92ba..0000000000 --- a/addons/hellfire/XEH_postInit.sqf +++ /dev/null @@ -1,10 +0,0 @@ -#include "script_component.hpp" - -if (!hasInterface) exitWith {}; - -GVAR(pfID) = -1; - -["ace_settingsInitialized", { - ["turret", LINKFUNC(showHud), false] call CBA_fnc_addPlayerEventHandler; - ["vehicle", LINKFUNC(showHud), true] call CBA_fnc_addPlayerEventHandler; // only one of these needs the retro flag -}] call CBA_fnc_addEventHandler; diff --git a/addons/hellfire/XEH_preInit.sqf b/addons/hellfire/XEH_preInit.sqf deleted file mode 100644 index 3464490b65..0000000000 --- a/addons/hellfire/XEH_preInit.sqf +++ /dev/null @@ -1,9 +0,0 @@ -#include "script_component.hpp" - -ADDON = false; - -PREP_RECOMPILE_START; - #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; - -ADDON = true; diff --git a/addons/hellfire/config.cpp b/addons/hellfire/config.cpp deleted file mode 100644 index 14c00904f1..0000000000 --- a/addons/hellfire/config.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - name = COMPONENT_NAME; - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_interaction", "ace_missileguidance"}; - author = ECSTRING(common,ACETeam); - authors[] = {"PabstMirror"}; - url = ECSTRING(main,URL); - VERSION_CONFIG; - }; -}; - -#include "ACE_GuidanceConfig.hpp" -#include "CfgAmmo.hpp" -#include "CfgEventHandlers.hpp" -#include "CfgMagazines.hpp" -#include "CfgVehicles.hpp" -#include "CfgWeapons.hpp" -#include "RscTitles.hpp" diff --git a/addons/hellfire/functions/fnc_attackProfile.sqf b/addons/hellfire/functions/fnc_attackProfile.sqf deleted file mode 100644 index 84f1c39f0a..0000000000 --- a/addons/hellfire/functions/fnc_attackProfile.sqf +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Author: PabstMirror - * Hellfire attack profile. Handles all 4 modes LOBL, LOAL-DIR, LOAL-HI, LOAL-LO - * - * Arguments: - * 0: Seeker Target PosASL - * 1: Guidance Arg Array - * 2: Attack Profile State - * - * Return Value: - * Missile Aim PosASL - * - * Example: - * [[1,2,3], [], []] call ace_hellfire_fnc_attackProfile - * - * Public: No - */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - -params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; -_args params ["_firedEH", "_launchParams"]; -_launchParams params ["","_targetLaunchParams"]; -_targetLaunchParams params ["", "", "_launchPos"]; -_firedEH params ["","","","","","","_projectile"]; - -// Get state params: -if (_attackProfileStateParams isEqualTo []) then { - _this call FUNC(getAttackProfileSettings); -}; -_attackProfileStateParams params ["_attackStage", "_configLaunchHeightClear"]; - - -private _projectilePos = getPosASL _projectile; -private _distanceFromLaunch2d = _launchPos distance2d _projectilePos; -private _heightAboveLaunch = (_projectilePos select 2) - (_launchPos select 2); - -// Add height depending on distance for compensate -private _returnTargetPos = nil; - -switch (_attackStage) do { - case STAGE_LAUNCH: { // Gain height quickly to pass terrain mask - _returnTargetPos = _projectilePos getPos [100, getDir _projectile]; - _returnTargetPos set [2, (_projectilePos select 2) + 36.4]; // 100 and 36.4 gives a 20 deg angle - - if (_heightAboveLaunch > _configLaunchHeightClear) then { - _attackProfileStateParams set [0, STAGE_SEEK_CRUISE]; - TRACE_2("New Stage: STAGE_SEEK_CRUISE",_distanceFromLaunch2d,_heightAboveLaunch); - }; - }; - case STAGE_SEEK_CRUISE: { // Slowly gain altitude while searching for target - // Before 4000 cruise at 5.7 degrees up, then level out - private _cruiseHeight = linearConversion [3000, 5000, _distanceFromLaunch2d, 10, 0, true]; - - _returnTargetPos = _projectilePos getPos [100, getDir _projectile]; - _returnTargetPos set [2, (_projectilePos select 2) + _cruiseHeight]; - - if (!(_seekerTargetPos isEqualTo [0,0,0])) then { - _attackProfileStateParams set [0, STAGE_ATTACK_CRUISE]; - TRACE_1("New Stage: STAGE_ATTACK_CRUISE",_distanceFromLaunch2d); - }; - }; - case STAGE_ATTACK_CRUISE: { - private _currentHeightOverTarget = (_projectilePos select 2) - (_seekerTargetPos select 2); - private _distanceToTarget2d = _seekerTargetPos distance2d _projectilePos; - private _distToGoRatio = _distanceToTarget2d / (_launchPos distance2d _seekerTargetPos); - - // arcing up at 7 degrees to start until 50% left, then smooth curve to a downward attack - private _gainSlope = linearConversion [0.5, 0.1, _distToGoRatio, 7, -7, true]; - _returnTargetPos = +_seekerTargetPos; - _returnTargetPos set [2, ((_projectilePos select 2) + (_distanceToTarget2d * sin _gainSlope)) max (_seekerTargetPos select 2)]; - - if ((_distanceToTarget2d < 500) || {(_currentHeightOverTarget atan2 _distanceToTarget2d) > 15}) then { // Wait until we can come down at a sharp angle - _attackProfileStateParams set [0, STAGE_ATTACK_TERMINAL]; - TRACE_2("New Stage: STAGE_ATTACK_TERMINAL",_distanceToTarget2d,_currentHeightOverTarget); - }; - }; - case STAGE_ATTACK_TERMINAL: { - private _distanceToTarget2d = _seekerTargetPos distance2d _projectilePos; - _returnTargetPos = _seekerTargetPos vectorAdd [0, 0, _distanceToTarget2d * 0.02]; - }; -}; - -// TRACE_1("Adjusted target position", _returnTargetPos); -_returnTargetPos; diff --git a/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf b/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf deleted file mode 100644 index a4854faa55..0000000000 --- a/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Author: PabstMirror - * Gets attack profile parameters for first run of hellfire attack profile function - * - * Arguments: - * 0: Seeker Target PosASL - * 1: Guidance Arg Array - * 2: Attack Profile State - * - * Return Value: - * Nothing - * - * Example: - * [[], [], []] call ace_hellfire_fnc_getAttackProfileSettings; - * - * Public: No - */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - -params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; -_args params ["_firedEH", "_launchParams"]; -_launchParams params ["", "", "", "_attackProfile"]; -_firedEH params ["","","","","","","_projectile"]; - -private _attackConfig = configFile >> QEGVAR(missileguidance,AttackProfiles) >> _attackProfile; - -// Launch (clearing terrain mask for LO/HI): -private _configLaunchHeightClear = getNumber (_attackConfig >> QGVAR(launchHeightClear)); - -// Get starting stage -private _startingStage = if (_configLaunchHeightClear > 0) then { - STAGE_LAUNCH; // LOAL-HI / LO -} else { - if (_seekerTargetPos isEqualTo [0,0,0]) then { - STAGE_SEEK_CRUISE; // LOAL-DIR - } else { - STAGE_ATTACK_CRUISE // LOBL - }; -}; - -// Set data in param array -_attackProfileStateParams set [0, _startingStage]; -_attackProfileStateParams set [1, _configLaunchHeightClear]; - -TRACE_1("new shot settings",_attackProfileStateParams); diff --git a/addons/hellfire/functions/fnc_setupVehicle.sqf b/addons/hellfire/functions/fnc_setupVehicle.sqf deleted file mode 100644 index 811e6c6f3f..0000000000 --- a/addons/hellfire/functions/fnc_setupVehicle.sqf +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Author: PabstMirror - * Adds interaction menu actions to switch the firemode to a vehicle. - * Also adds a Laser Designator if vehicle is configured for one. - * - * Arguments: - * 0: Vehicle - * 1: Player's Turret Path - * - * Return Value: - * Nothing - * - * Example: - * [(vehicle player), [0]] call ace_hellfire_fnc_setupVehicle - * - * Public: No - */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - -params ["_vehicle", "_turretPath"]; -TRACE_2("setupVehicle",_vehicle,_turretPath); - -// Add laser if vehicle is configured for one: -if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QGVAR(addLaserDesignator))) == 1) then { - [{ - params ["_vehicle", "_turretPath"]; - TRACE_3("checking for laser",_vehicle,_turretPath,_vehicle turretLocal _turretPath); - if (!alive _vehicle) exitWith {}; - if (!(_vehicle turretLocal _turretPath)) then {WARNING("Turret not local");}; - private _hasLaser = false; - { - // Most addons just use "Laserdesignator_mounted", but this should cover custom ones - if ((getNumber (configFile >> "CfgWeapons" >> _x >> "Laser")) == 1) exitWith { - _hasLaser = true; - }; - } forEach (_vehicle weaponsTurret _turretPath); - if (!_hasLaser) then { - TRACE_1("Adding Laser Designator",typeOf _vehicle); - _vehicle addWeaponTurret ["Laserdesignator_mounted", _turretPath]; - _vehicle addMagazineTurret ["Laserbatteries", _turretPath]; - }; - }, _this, 1] call CBA_fnc_waitAndExecute; // Need to delay slightly for turret to become local (probably only needs a single frame) -}; - - -// Add interaction menu actions: -if (_vehicle getVariable [QGVAR(actionsAdded), false]) exitWith {}; -_vehicle setVariable [QGVAR(actionsAdded), true]; - -private _action = [QUOTE(ADDON), localize LSTRING(hellfireModeAction), "", {}, {true}] call EFUNC(interact_menu,createAction); -private _basePath = [_vehicle, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToObject); - -private _fnc_statement = { - params ["_target", "", "_attackProfile"]; - TRACE_2("statement",_target,_attackProfile); - - _target setVariable [QEGVAR(missileguidance,attackProfile), _attackProfile]; -}; -private _fnc_condition = { - params ["_target", "_player", "_attackProfile"]; - - private _turretPath = if (ACE_player == (driver _target)) then {[-1]} else {ACE_player call CBA_fnc_turretPath}; - private _hasWeapon = ({(isNumber (configFile >> "CfgWeapons" >> _x >> QGVAR(enabled))) && {getNumber (configFile >> "CfgWeapons" >> _x >> QGVAR(enabled)) > 0}} count (_target weaponsTurret _turretPath)) > 0; - - (_hasWeapon) && - {(_target getVariable [QEGVAR(missileguidance,attackProfile), "hellfire"]) != _attackProfile}; -}; - -{ - private _displayName = getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _x >> "name"); - private _action = [format [QGVAR(%1),_x], _displayName, "", _fnc_statement, _fnc_condition, {}, _x] call EFUNC(interact_menu,createAction); - [_vehicle, 1, _basePath, _action] call EFUNC(interact_menu,addActionToObject); -} forEach ["hellfire", "hellfire_hi", "hellfire_lo"]; - -TRACE_2("interactions added",_vehicle,typeOf _vehicle); diff --git a/addons/hellfire/functions/fnc_showHud.sqf b/addons/hellfire/functions/fnc_showHud.sqf deleted file mode 100644 index c79780c3fe..0000000000 --- a/addons/hellfire/functions/fnc_showHud.sqf +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Author: PabstMirror - * Shows the hellfire hud when vehicle is equiped with the weapon. - * Shows laser code, fire mode and seeker status. - * - * Arguments: - * 0: Player - * - * Return Value: - * Nothing - * - * Example: - * [player] call ace_hellfire_fnc_showHud - * - * Public: No - */ -#include "script_component.hpp" - -params ["_player"]; -TRACE_1("showHud",_player); - -private _enabled = false; -private _vehicle = vehicle _player; -private _turretPath = [-1]; - -if ((alive _player) && {_player != _vehicle}) then { - if (_player != (driver _vehicle)) then { - _turretPath = _player call CBA_fnc_turretPath - }; - { - if ((getNumber (configFile >> "CfgWeapons" >> _x >> QGVAR(enabled))) == 1) then { - TRACE_1("enabled",_x); - _enabled = true; - }; - } forEach (_vehicle weaponsTurret _turretPath); -}; - -if ((!_enabled) && (GVAR(pfID) < 0)) exitWith {TRACE_2("Disabled - No Change",_enabled,GVAR(pfID));}; - -TRACE_2("Cleaning up old pfeh and display",_enabled,GVAR(pfID)); -[GVAR(pfID)] call CBA_fnc_removePerFrameHandler; -if (!isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then { - ([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; -}; -GVAR(pfID) = -1; - -if (!_enabled) exitWith {TRACE_2("Disabled - Now Off",_enabled,GVAR(pfID));}; - -TRACE_2("Enabled - Adding actions and PFEH",_enabled,GVAR(pfID)); - -[_vehicle, _turretPath] call FUNC(setupVehicle); - -private _adjustDown = false; // Flares display will block ours, if present just move ours down a bit -{ - if ((getText (configFile >> "CfgWeapons" >> _x >> "simulation")) == "cmlauncher") exitWith {_adjustDown = true}; -} forEach (_vehicle weaponsTurret _turretPath); - -private _turretConfig = [_vehicle, _turretPath] call CBA_fnc_getTurret; -private _seekerSource = getText (_turretConfig >> "memoryPointGunnerOptics"); -TRACE_3("",_adjustDown,_seekerSource,_vehicle selectionPosition _seekerSource); - -GVAR(pfID) = [{ - params ["_args", "_pfID"]; - _args params ["_vehicle", "_turretPath", "_seekerSource", "_adjustDown"]; - - // Restart display if null (not just at start, this will happen periodicly) - if (isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then { - TRACE_1("creating display",_this); - ([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutRsc [QGVAR(modeDisplay), "PLAIN", 1, false]; - 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)]; - _ctrl ctrlSetPosition _pos; - _ctrl ctrlCommit 0; - }; - }; - - private _currentWeapon = _vehicle currentWeaponTurret _turretPath; - private _showLockMode = (getNumber (configFile >> "CfgWeapons" >> _currentWeapon >> QGVAR(enabled))) == 1; - - private _ctrlGroup = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl 1000; - - if (!_showLockMode) exitWith { - _ctrlGroup ctrlShow false; - }; - _ctrlGroup ctrlShow true; - - private _ctrlText = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_ATTACKMODE; - private _ctrlCode = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_LASERCODE; - private _ctrlIcon = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_LASERICON; - - // Do Laser Scan: - private _laserSource = AGLtoASL (_vehicle modelToWorld (_vehicle selectionPosition _seekerSource)); - private _laserCode = _vehicle getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE]; - private _laserResult = [_laserSource, vectorDir _vehicle, 70, 5000, [ACE_DEFAULT_LASER_WAVELENGTH,ACE_DEFAULT_LASER_WAVELENGTH], _laserCode, _vehicle] call EFUNC(laser,seekerFindLaserSpot); - private _foundTargetPos = _laserResult select 0; - private _haveLock = !isNil "_foundTargetPos"; - - private _modeShort = "ERR"; - private _vehicleLockMode = _vehicle getVariable [QEGVAR(missileguidance,attackProfile), ""]; - - switch (_vehicleLockMode) do { // note: missileguidance is case sensitive - case ("hellfire_hi"): { - _modeShort = getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _vehicleLockMode >> "name"); - }; - case ("hellfire_lo"): { - _modeShort = getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _vehicleLockMode >> "name"); - }; - default { - _vehicleLockMode = "hellfire"; - _modeShort = if (_haveLock) then { - getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _vehicleLockMode >> "nameLocked"); - } else { - getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _vehicleLockMode >> "name"); - }; - }; - }; - - _ctrlIcon ctrlSetTextColor ([[0,0,0,0.25],[1,0,0,0.75]] select _haveLock); - _ctrlText ctrlSetText _modeShort; - _ctrlCode ctrlSetText format ["CODE: %1", _laserCode]; - -}, 0.1, [_vehicle, _turretPath, _seekerSource, _adjustDown]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/hellfire/functions/script_component.hpp b/addons/hellfire/functions/script_component.hpp deleted file mode 100644 index 899f29a758..0000000000 --- a/addons/hellfire/functions/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\ace\addons\hellfire\script_component.hpp" diff --git a/addons/hellfire/script_component.hpp b/addons/hellfire/script_component.hpp deleted file mode 100644 index 2e8cf04eff..0000000000 --- a/addons/hellfire/script_component.hpp +++ /dev/null @@ -1,27 +0,0 @@ -#define COMPONENT hellfire -#define COMPONENT_BEAUTIFIED Hellfire -#include "\z\ace\addons\main\script_mod.hpp" - -// #define DEBUG_MODE_FULL -// #define DISABLE_COMPILE_CACHE -// #define ENABLE_PERFORMANCE_COUNTERS - -#ifdef DEBUG_ENABLED_HELLFIRE - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_SETTINGS_HELLFIRE - #define DEBUG_SETTINGS DEBUG_SETTINGS_HELLFIRE -#endif - -#include "\z\ace\addons\main\script_macros.hpp" - -#define STAGE_LAUNCH 1 -#define STAGE_SEEK_CRUISE 2 -#define STAGE_ATTACK_CRUISE 3 -#define STAGE_ATTACK_TERMINAL 4 - -#define IDC_MODECONTROLGROUP 1000 -#define IDC_ATTACKMODE 1001 -#define IDC_LASERCODE 1002 -#define IDC_LASERICON 1003 diff --git a/addons/hellfire/stringtable.xml b/addons/hellfire/stringtable.xml deleted file mode 100644 index 8afbad9bd8..0000000000 --- a/addons/hellfire/stringtable.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Set Hellfire mode - Imposta modalità Hellfire - ヘルファイア モードを設定 - 设定地狱火模式 - 設定地獄火模式 - - - diff --git a/addons/hitreactions/XEH_preInit.sqf b/addons/hitreactions/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/hitreactions/XEH_preInit.sqf +++ b/addons/hitreactions/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/hitreactions/functions/fnc_fallDown.sqf b/addons/hitreactions/functions/fnc_fallDown.sqf index a7814b914e..03484438eb 100644 --- a/addons/hitreactions/functions/fnc_fallDown.sqf +++ b/addons/hitreactions/functions/fnc_fallDown.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [player, kevin, 5] call ACE_hitreactions_fnc_fallDown - * * Public: No */ #include "script_component.hpp" @@ -30,9 +27,6 @@ if (_unit == _firer) exitWith {}; // camshake for player if (_unit == ACE_player) then { - if (visibleMap) then { - openMap false; - }; addCamShake [3, 5, _damage + random 10]; }; diff --git a/addons/hitreactions/functions/fnc_getRandomAnimation.sqf b/addons/hitreactions/functions/fnc_getRandomAnimation.sqf index 10b64b5eae..996901a31e 100644 --- a/addons/hitreactions/functions/fnc_getRandomAnimation.sqf +++ b/addons/hitreactions/functions/fnc_getRandomAnimation.sqf @@ -8,9 +8,6 @@ * Return Value: * Fall animation * - * Example: - * [bob] call ACE_hitreactions_fnc_getRandomAnimation - * * Public: No */ #include "script_component.hpp" diff --git a/addons/hitreactions/script_component.hpp b/addons/hitreactions/script_component.hpp index dccbef24f7..9252f1bca0 100644 --- a/addons/hitreactions/script_component.hpp +++ b/addons/hitreactions/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_HITREACTIONS diff --git a/addons/huntir/CfgWeapons.hpp b/addons/huntir/CfgWeapons.hpp index 8a3b57c4b0..799cfcb976 100644 --- a/addons/huntir/CfgWeapons.hpp +++ b/addons/huntir/CfgWeapons.hpp @@ -19,5 +19,11 @@ class CfgWeapons { class UGL_F: GrenadeLauncher { magazines[] += {"ACE_HuntIR_M203"}; }; - // Added to the GL_3GL_F in subconfig + class Rifle_Base_F; + class arifle_MX_Base_F: Rifle_Base_F { + class GL_3GL_F: UGL_F { + //magazines[] += {"ACE_HuntIR_M203"}; + magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell","ACE_HuntIR_M203"}; + }; + }; }; diff --git a/addons/huntir/XEH_preInit.sqf b/addons/huntir/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/huntir/XEH_preInit.sqf +++ b/addons/huntir/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index 4c9ba71745..41a9561e60 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [cam] call ACE_huntir_fnc_cam - * * Public: No */ #include "script_component.hpp" diff --git a/addons/huntir/functions/fnc_handleFired.sqf b/addons/huntir/functions/fnc_handleFired.sqf index 50ed4713aa..b7e8c2a010 100644 --- a/addons/huntir/functions/fnc_handleFired.sqf +++ b/addons/huntir/functions/fnc_handleFired.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * call ACE_huntir_fnc_handleFired - * * Public: No */ #include "script_component.hpp" diff --git a/addons/huntir/functions/fnc_huntir.sqf b/addons/huntir/functions/fnc_huntir.sqf index f692da749b..844ca302e7 100644 --- a/addons/huntir/functions/fnc_huntir.sqf +++ b/addons/huntir/functions/fnc_huntir.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * call ACE_huntir_fnc_huntir - * * Public: No */ #include "script_component.hpp" diff --git a/addons/huntir/functions/fnc_huntirCompass.sqf b/addons/huntir/functions/fnc_huntirCompass.sqf index 662dd621a3..f383a23a24 100644 --- a/addons/huntir/functions/fnc_huntirCompass.sqf +++ b/addons/huntir/functions/fnc_huntirCompass.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * call ACE_huntir_fnc_huntirCompass - * * Public: No */ #include "script_component.hpp" diff --git a/addons/huntir/functions/fnc_keyPressed.sqf b/addons/huntir/functions/fnc_keyPressed.sqf index 82764ffd05..509dcb9de5 100644 --- a/addons/huntir/functions/fnc_keyPressed.sqf +++ b/addons/huntir/functions/fnc_keyPressed.sqf @@ -3,7 +3,7 @@ * Handles the HuntIR monitor key interaction * * Arguments: - * 0: ? + * 0: ? * 1: keycode * * Return Value: diff --git a/addons/huntir/script_component.hpp b/addons/huntir/script_component.hpp index f4fba8ac1a..01b4f92fec 100644 --- a/addons/huntir/script_component.hpp +++ b/addons/huntir/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_HUNTIR diff --git a/addons/huntir/stringtable.xml b/addons/huntir/stringtable.xml index 3bba8c02ab..8db0e6afd1 100644 --- a/addons/huntir/stringtable.xml +++ b/addons/huntir/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Boite de transport HuntIR HuntIR Transport Box Caixa de transporte do HuntIR - HuntIR 輸送箱 - HuntIR 수송함 - 高空战术成像器运输箱 - 高空戰術成像器運輸箱 HuntIR Round @@ -28,10 +24,6 @@ Munition HuntIR HuntIR lövedék Cartucho HuntIR - HuntIR 弾頭 - HuntIR 유탄 - 高空战术成像器弹药 - 高空戰術成像器彈藥 HuntIR monitor @@ -44,10 +36,6 @@ Ecran HuntIR HuntIR monitor Monitor HuntIR - HuntIR モニタ - HuntIR 모니터 - 高空战术成像器显示面板 - 高空戰術成像器顯示面板 Activate HuntIR monitor @@ -60,10 +48,6 @@ Allumer l'écran du HuntIR HuntIR monitor aktiválása Ativar monitor do HuntIR - HuntIR を起動する - HuntIR 모니터 켜기 - 开启高空战术成像器显示面板 - 開啟高空戰術成像器顯示面板 Camera: @@ -76,10 +60,6 @@ Caméra : Kamera: Câmera: - カメラ: - 카메라: - 摄影机: - 攝影機: Altitude: @@ -92,10 +72,6 @@ Altitude : Magasság: Altitude: - 高度: - 고도: - 高度: - 高度: Recording Time: @@ -108,10 +84,6 @@ Temps d'enregistrement : Felvételi idő: Tempo de gravação: - 録画時間: - 녹화시간: - 记录时间: - 記錄時間: Press ESC to quit camera @@ -124,10 +96,6 @@ Appuyer sur ESC pour quitter la camera Nyomj ESC-ket a kamerából való kilépéshez Pressione ESC para sair da câmera - ESC を押しカメラを抜ける - ESC를 눌러 카메라 나가기 - 按下ESC退出摄影机 - 按下ESC退出攝影機 Help @@ -140,10 +108,6 @@ Aide Súgó Ajuda - ヘルプ - 도움말 - 帮助 - 幫助 A/D - Cycle zoom @@ -156,10 +120,6 @@ Q/D - Changement de zoom A/D - Nagyítás A/D - Troca zoom - A/D - 倍率の変更 - A/D - 줌 전환 - A/D - 切换放大倍率 - A/D - 切換放大倍率 W/S - Select camera @@ -172,10 +132,6 @@ Z/S - Sélectionner la caméra W/S - Kamera váltás W/S - Seleciona câmera - W/S - カメラを選択 - W/S - 카메라 선택 - W/S - 切换摄影机 - W/S - 切換攝影機 Left/Right - Rotate camera @@ -188,10 +144,6 @@ Gauche/Droite - Rotation de la caméra Jobb/Bal - Kamera forgatás Esquerda/Direita - Rotaciona câmera - Left/Right - カメラを開店 - 좌/우 - 카메라 돌리기 - 左/右 - 旋转摄影机 - 左/右 - 旋轉攝影機 Up/Down - Elevate/lower camera @@ -204,10 +156,6 @@ Haut/Bas - Monter/descendre la caméra Fel/Le - Kamera döntése/süllyesztése Acima/Abaixo - Eleva/Abaixa a câmera - Up/Down - カメラ角度を変更 - 상/하 카메라 올리기/내리기 - 上/下 - 上升/下降摄影机 - 上/下 - 上升/下降攝影機 N - Cycle IT modes @@ -220,10 +168,6 @@ N - Changement de modes IT N - Hőkép módok N - Troca modo IT - N - IT モードを変更 - N - IT모드 순환 - N - 切换热显模式 - N - 切換熱顯模式 R - Reset camera @@ -236,10 +180,6 @@ R - Reset de la caméra R - Kamera visszaállítása R - Redefine a câmera - R - カメラを初期化 - R - 카메라 초기화 - R - 重置摄影机 - R - 重置攝影機 Esc - Exit help @@ -252,10 +192,6 @@ Esc - Sortir de l'aide Exit - Kilépés a súgóból Esc - Sai do Ajuda - Esc - ヘルプを出る - Esc - 도움말 나가기 - Esc - 离开帮助 - Esc - 離開幫助 - + \ No newline at end of file diff --git a/addons/huntir/subConfig/config.cpp b/addons/huntir/subConfig/config.cpp deleted file mode 100644 index 29a9f0ca25..0000000000 --- a/addons/huntir/subConfig/config.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "\z\ace\addons\huntir\script_component.hpp" -#undef COMPONENT -#define COMPONENT huntir_sub - -class CfgPatches { - class ADDON { - name = COMPONENT_NAME; - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_huntir"}; - author = ECSTRING(common,ACETeam); - url = ECSTRING(main,URL); - VERSION_CONFIG; - }; -}; - -class CfgWeapons { - class UGL_F; - class Rifle_Base_F; - class arifle_MX_Base_F: Rifle_Base_F { - class GL_3GL_F: UGL_F { - magazines[] += {"ACE_HuntIR_M203"}; - }; - }; -}; diff --git a/addons/interact_menu/CfgEventHandlers.hpp b/addons/interact_menu/CfgEventHandlers.hpp index b8bb1264e1..fa53ccf57c 100644 --- a/addons/interact_menu/CfgEventHandlers.hpp +++ b/addons/interact_menu/CfgEventHandlers.hpp @@ -29,10 +29,4 @@ class Extended_DisplayLoad_EventHandlers { class RscDiary { ADDON = QUOTE(call COMPILE_FILE(XEH_displayLoad)); }; - class RscDisplayInterrupt { - ADDON = QUOTE(_this call FUNC(handleEscapeMenu)); - }; - class RscDisplayMPInterrupt { - ADDON = QUOTE(_this call FUNC(handleEscapeMenu)); - }; }; diff --git a/addons/interact_menu/XEH_PREP.hpp b/addons/interact_menu/XEH_PREP.hpp index 55c35d54df..0c1a6842fc 100644 --- a/addons/interact_menu/XEH_PREP.hpp +++ b/addons/interact_menu/XEH_PREP.hpp @@ -9,7 +9,6 @@ PREP(collectActiveActionTree); PREP(createAction); PREP(ctrlSetParsedTextCached); PREP(findActionNode); -PREP(handleEscapeMenu); PREP(isSubPath); PREP(keyDown); PREP(keyUp); diff --git a/addons/interact_menu/XEH_clientInit.sqf b/addons/interact_menu/XEH_clientInit.sqf index dbe9d548cd..0d280506b3 100644 --- a/addons/interact_menu/XEH_clientInit.sqf +++ b/addons/interact_menu/XEH_clientInit.sqf @@ -21,7 +21,7 @@ GVAR(ParsedTextCached) = []; //Setup text/shadow/size/color settings matrix [] call FUNC(setupTextColors); // Install the render EH on the main display - addMissionEventHandler ["Draw3D", {call FUNC(render)}]; + addMissionEventHandler ["Draw3D", DFUNC(render)]; }] call CBA_fnc_addEventHandler; //Add Actions to Houses: @@ -42,27 +42,6 @@ GVAR(ParsedTextCached) = []; [219, [false, true, false]], false] call CBA_fnc_addKeybind; //Left Windows Key + Ctrl/Strg -["ACE3 Common", QGVAR(InteractKey_Toggle), -format ["%1 (%2)", (localize LSTRING(InteractKey)), localize ELSTRING(common,KeybindToggle)], -{ - if (GVAR(openedMenuType) != 0) then { - [0] call FUNC(keyDown) - } else { - [0,false] call FUNC(keyUp) - }; -}, {}, [-1, [false, false, false]], false] call CBA_fnc_addKeybind; // UNBOUND - -["ACE3 Common", QGVAR(SelfInteractKey_Toggle), -format ["%1 (%2)", (localize LSTRING(SelfInteractKey)), localize ELSTRING(common,KeybindToggle)], -{ - if (GVAR(openedMenuType) != 1) then { - [1] call FUNC(keyDown) - } else { - [1, false] call FUNC(keyUp) - }; -}, {}, [-1, [false, false, false]], false] call CBA_fnc_addKeybind; // UNBOUND - - // Listens for the falling unconscious event, just in case the menu needs to be closed ["ace_unconscious", { // If no menu is open just quit diff --git a/addons/interact_menu/XEH_preInit.sqf b/addons/interact_menu/XEH_preInit.sqf index 817693c93c..8711f8c180 100644 --- a/addons/interact_menu/XEH_preInit.sqf +++ b/addons/interact_menu/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(ActNamespace) = [] call CBA_fnc_createNamespace; GVAR(ActSelfNamespace) = [] call CBA_fnc_createNamespace; diff --git a/addons/interact_menu/config.cpp b/addons/interact_menu/config.cpp index 687d644924..95561f4579 100644 --- a/addons/interact_menu/config.cpp +++ b/addons/interact_menu/config.cpp @@ -25,3 +25,9 @@ class CfgPatches { class ACE_Extensions { extensions[] += {"ace_break_line", "ace_parse_imagepath"}; }; + +class ACE_newEvents { + interactMenuOpened = "ace_interactMenuOpened"; + clearConditionCaches = QGVAR(clearConditionCaches); + interactMenuClosed = "ace_interactMenuClosed"; +}; diff --git a/addons/interact_menu/functions/fnc_addActionToClass.sqf b/addons/interact_menu/functions/fnc_addActionToClass.sqf index 03838234ec..1b4ea27b46 100644 --- a/addons/interact_menu/functions/fnc_addActionToClass.sqf +++ b/addons/interact_menu/functions/fnc_addActionToClass.sqf @@ -22,7 +22,6 @@ if (!params [["_objectType", "", [""]], ["_typeNum", 0, [0]], ["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith { ERROR("Bad Params"); - [] }; TRACE_4("params",_objectType,_typeNum,_parentPath,_action); @@ -39,9 +38,6 @@ if (param [4, false, [false]]) exitwith { ', _index]; TRACE_2("Added inheritable action",_objectType,_index); [_objectType, "init", _initEH, true, [], true] call CBA_fnc_addClassEventHandler; - - // Return the full path - (_parentPath + [_action select 0]) }; // Ensure the config menu was compiled first @@ -64,12 +60,12 @@ if (_parentPath isEqualTo ["ACE_MainActions"]) then { private _parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode); if (isNil {_parentNode}) exitWith { - ERROR_4("Failed to add action - action (%1) to parent %2 on object %3 [%4]",(_action select 0),_parentPath,_objectType,_typeNum); - [] + ERROR("Failed to add action"); + ACE_LOGERROR_4("action (%1) to parent %2 on object %3 [%4]",(_action select 0),_parentPath,_objectType,_typeNum); }; // Add action node as children of the correct node of action tree (_parentNode select 1) pushBack [_action,[]]; // Return the full path -(_parentPath + [_action select 0]) +(+ _parentPath) pushBack (_action select 0) diff --git a/addons/interact_menu/functions/fnc_addActionToObject.sqf b/addons/interact_menu/functions/fnc_addActionToObject.sqf index 31c8301735..d307f8b9ad 100644 --- a/addons/interact_menu/functions/fnc_addActionToObject.sqf +++ b/addons/interact_menu/functions/fnc_addActionToObject.sqf @@ -21,7 +21,6 @@ if (!params [["_object", objNull, [objNull]], ["_typeNum", 0, [0]], ["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith { ERROR("Bad Params"); - [] }; private _varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum; @@ -39,4 +38,4 @@ if (_parentPath isEqualTo ["ACE_MainActions"]) then { _actionList pushBack [_action, +_parentPath]; // Return the full path -(_parentPath + [_action select 0]) +(+ _parentPath) pushBack (_action select 0) diff --git a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf index 08e1608990..ae066576f7 100644 --- a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf +++ b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf @@ -11,9 +11,6 @@ * Return Value: * Active children * - * Example: - * [bob, [array], [array], 5] call ACE_interact_menu_fnc_collectActoveActionTree - * * Public: No */ #include "script_component.hpp" diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index 58e13ee481..4cf657a3bc 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -8,12 +8,9 @@ * Return Value: * None * - * Example: - * [bob] call ACE_interact_menu_fnc_compileMenu - * * Public: No */ -#include "script_component.hpp" +#include "script_component.hpp"; params ["_target"]; @@ -36,7 +33,7 @@ private _recurseFnc = { private _displayName = getText (_entryCfg >> "displayName"); private _distance = _parentDistance; if (isNumber (_entryCfg >> "distance")) then {_distance = getNumber (_entryCfg >> "distance");}; - // if (_distance < _parentDistance) then {WARNING_3("[%1] distance %2 less than parent %3", configName _entryCfg, _distance, _parentDistance);}; + // if (_distance < _parentDistance) then {ACE_LOGWARNING_3("[%1] distance %2 less than parent %3", configName _entryCfg, _distance, _parentDistance);}; private _icon = getText (_entryCfg >> "icon"); private _statement = compile (getText (_entryCfg >> "statement")); @@ -102,32 +99,11 @@ private _recurseFnc = { _actions }; -if ((getNumber (configFile >> "CfgVehicles" >> _objectType >> "isPlayableLogic")) == 1) exitWith { - TRACE_1("skipping playable logic",_objectType); - _namespace setVariable [_objectType, []]; -}; - private _actionsCfg = configFile >> "CfgVehicles" >> _objectType >> "ACE_Actions"; TRACE_1("Building ACE_Actions",_objectType); private _actions = [_actionsCfg, 0] call _recurseFnc; -// ace_interaction_fnc_addPassengerAction expects ACE_MainActions to be first -// Other mods can change the order that configs are added, so we should verify this now and resort if needed -if (_objectType isKindOf "CaManBase") then { - if ((((_actions select 0) select 0) select 0) != "ACE_MainActions") then { - INFO_1("ACE_MainActions not first for man [%1]",_objectType); - private _mainActions = []; - { - if (((_x select 0) select 0) == "ACE_MainActions") then { - _mainActions = _actions deleteAt _forEachIndex; - }; - } forEach _actions; - if (_mainActions isEqualTo []) exitWith {ERROR_1("ACE_MainActions not found on man [%1]",_objectType);}; - _actions = [_mainActions] + _actions; // resort array with ACE_MainActions first - }; -}; - _namespace setVariable [_objectType, _actions]; /* diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index 9209447630..0c5e236f0b 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -8,12 +8,9 @@ * Return Value: * None * - * Example: - * [bob] call ACE_interact_menu_fnc_compileMenuSelfAction - * * Public: No */ -#include "script_component.hpp" +#include "script_component.hpp"; params ["_target"]; diff --git a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf index a5987d411f..c0797269e6 100644 --- a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf @@ -3,17 +3,14 @@ * Compile the zeus action menu (only to be done once) * * Arguments: - * None + * nil * * Return Value: * None * - * Example: - * call ACE_interact_menu_fnc_compileMenuZeus - * * Public: No */ -#include "script_component.hpp" +#include "script_component.hpp"; // Exit if the action menu is already compiled for zeus if !(isNil {missionNamespace getVariable [QGVAR(ZeusActions), nil]}) exitWith {}; diff --git a/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf b/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf index 98408f58f9..38e5a42460 100644 --- a/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf +++ b/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [CONTROL, 5, "text"] call ACE_interact_menu_fnc_ctrlSetParsedTextCached - * * Public: No */ #include "script_component.hpp" diff --git a/addons/interact_menu/functions/fnc_handleEscapeMenu.sqf b/addons/interact_menu/functions/fnc_handleEscapeMenu.sqf deleted file mode 100644 index 41e16e8951..0000000000 --- a/addons/interact_menu/functions/fnc_handleEscapeMenu.sqf +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Author: PabstMirror - * Handle the escape key being pressed. - * - * Arguments: - * 0: Escape menu display that should be closed - * - * Return Value: - * Nothing - * - * Public: No - */ -#include "script_component.hpp" - -if (GVAR(openedMenuType) < 0) exitWith {}; - -params [["_display", displayNull, [displayNull]]]; -TRACE_2("handleEscapeMenu",_display,isNull _display); - -if (!isNull _display) then { - _display closeDisplay 0; -}; - -GVAR(actionSelected) = false; -[GVAR(openedMenuType), false] call FUNC(keyUp); diff --git a/addons/interact_menu/functions/fnc_isSubPath.sqf b/addons/interact_menu/functions/fnc_isSubPath.sqf index 2c8244b081..5933e2c462 100644 --- a/addons/interact_menu/functions/fnc_isSubPath.sqf +++ b/addons/interact_menu/functions/fnc_isSubPath.sqf @@ -7,7 +7,7 @@ * 1: ShortPath * * Return Value: - * Bool + * Bool * * Example: * [[["ACE_SelfActions", player],["ace_Gestures", player]], [["ACE_SelfActions", player]]] call ace_interact_menu_fnc_isSubPath @@ -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) isEqualTo (_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 52388ffe89..58286a65bb 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -8,9 +8,6 @@ * Return Value: * true * - * Example: - * [0] call ACE_interact_menu_fnc_keyDown - * * Public: No */ #include "script_component.hpp" @@ -62,13 +59,7 @@ if (GVAR(useCursorMenu)) then { createDialog QGVAR(cursorMenu); }; (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); - }; - [_this,'keydown'] call CBA_events_fnc_keyHandler; - }]; + (finddisplay 91919) displayAddEventHandler ["KeyDown", {[_this,'keydown'] call CBA_events_fnc_keyHandler}]; // The dialog sets: // uiNamespace getVariable QGVAR(dlgCursorMenu); // uiNamespace getVariable QGVAR(cursorMenuOpened); @@ -82,10 +73,6 @@ if (GVAR(useCursorMenu)) then { ((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 { - (findDisplay 91919) closeDisplay 2; - }; }; GVAR(selfMenuOffset) = (AGLtoASL (positionCameraToWorld [0, 0, 2])) vectorDiff (AGLtoASL (positionCameraToWorld [0, 0, 0])); diff --git a/addons/interact_menu/functions/fnc_keyUp.sqf b/addons/interact_menu/functions/fnc_keyUp.sqf index dc1fcf3fe6..aae9a370c1 100644 --- a/addons/interact_menu/functions/fnc_keyUp.sqf +++ b/addons/interact_menu/functions/fnc_keyUp.sqf @@ -8,9 +8,6 @@ * Return Value: * true * - * Example: - * [1] call ACE_interact_menu_fnc_keyUp - * * Public: No */ #include "script_component.hpp" diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 0572f15fa6..017d3e539b 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * call ACE_interact_menu_fnc_renderActionPoints - * * Public: No */ #include "script_component.hpp" diff --git a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf index 4b88212d59..363f7100f9 100644 --- a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf @@ -10,9 +10,6 @@ * Return Value: * Was the menu rendered * - * Example: - * [bob, [node], [0, 0, 0]] call ACE_interact_menu_fnc_renderBaseMenu - * * Public: No */ #include "script_component.hpp" @@ -64,7 +61,7 @@ if ((_sPos select 0) < safeZoneXAbs || {(_sPos select 0) > safeZoneXAbs + safeZo if ((_sPos select 1) < safeZoneY || {(_sPos select 1) > safeZoneY + safeZoneH}) exitWith {false}; -BEGIN_COUNTER(fnc_collectActiveActionTree); +BEGIN_COUNTER(fnc_collectActiveActionTree) // Collect active tree private _uid = format [QGVAR(ATCache_%1), _actionName]; @@ -74,7 +71,7 @@ private _activeActionTree = [ _object, _uid, 1.0, "ace_interactMenuClosed" ] call EFUNC(common,cachedCall); -END_COUNTER(fnc_collectActiveActionTree); +END_COUNTER(fnc_collectActiveActionTree) #ifdef DEBUG_MODE_EXTRA diag_log "Printing: _activeActionTree"; @@ -82,6 +79,9 @@ diag_log "Printing: _activeActionTree"; params ["_level", "_node"]; _node params ["_actionData", "_children", "_object"]; diag_log text format ["Level %1 -> %2 on %3", _level, _actionData select 0, _object]; + { + [_level + 1, _x] call _fnc_print; + } forEach _children; }; #endif @@ -101,6 +101,6 @@ GVAR(collectedActionPoints) pushBack [_sPos select 2, _sPos, _activeActionTree]; END_COUNTER(fnc_renderMenus); -END_COUNTER(fnc_renderBaseMenu); +END_COUNTER(fnc_renderBaseMenu) true diff --git a/addons/interact_menu/functions/fnc_renderIcon.sqf b/addons/interact_menu/functions/fnc_renderIcon.sqf index 4d9892ed2c..ec26635f02 100644 --- a/addons/interact_menu/functions/fnc_renderIcon.sqf +++ b/addons/interact_menu/functions/fnc_renderIcon.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * ["text", "icon", [5, 6], "text"] call ACE_interact_menu_fnc_renderIcon - * * Public: No */ #include "script_component.hpp" diff --git a/addons/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index 70bf02fe9a..687c56d2c3 100644 --- a/addons/interact_menu/functions/fnc_renderMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderMenu.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * [[], [], [5, 2], []] call ACE_interact_menu_fnc_renderMenu - * * Public: No */ #include "script_component.hpp" diff --git a/addons/interact_menu/functions/fnc_renderSelector.sqf b/addons/interact_menu/functions/fnc_renderSelector.sqf index c2fe5f932c..ef10456b5a 100644 --- a/addons/interact_menu/functions/fnc_renderSelector.sqf +++ b/addons/interact_menu/functions/fnc_renderSelector.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [[2, 5], "icon"] call ACE_interact_menu_fnc_renderSelector - * * Public: No */ #include "script_component.hpp" diff --git a/addons/interact_menu/functions/fnc_setupTextColors.sqf b/addons/interact_menu/functions/fnc_setupTextColors.sqf index e51d39e533..120c5b18e3 100644 --- a/addons/interact_menu/functions/fnc_setupTextColors.sqf +++ b/addons/interact_menu/functions/fnc_setupTextColors.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * call ACE_interact_menu_fnc_setupTextColor - * * Public: No */ #include "script_component.hpp" diff --git a/addons/interact_menu/functions/fnc_splitPath.sqf b/addons/interact_menu/functions/fnc_splitPath.sqf index 93dea35d7c..eba203aa6f 100644 --- a/addons/interact_menu/functions/fnc_splitPath.sqf +++ b/addons/interact_menu/functions/fnc_splitPath.sqf @@ -9,9 +9,6 @@ * 0: Parent path * 1: Action name * - * Example: - * [[path]] call ACE_interact_menu_fnc_splitPath - * * Public: No */ #include "script_component.hpp" diff --git a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf index 7fa9ffdac5..2940bc2936 100644 --- a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf @@ -7,7 +7,7 @@ * 0: Interact Menu Type (0 - world, 1 - self) * * Return Value: - * None + * Nothing * * Example: * [0] call ace_interact_menu_fnc_userActions_addHouseActions diff --git a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf index 99eafc0392..c513805d10 100644 --- a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf @@ -6,7 +6,7 @@ * 0: Building Classname * * Return Value: - * [[Array of MemPoints], [Array Of Actions]] + * [[Array of MemPoints], [Array Of Actions]] * * Example: * ["Land_i_House_Big_01_V1_F"] call ace_interact_menu_fnc_userActions_getHouseActions diff --git a/addons/interact_menu/script_component.hpp b/addons/interact_menu/script_component.hpp index fea92a9417..1d38d205d7 100644 --- a/addons/interact_menu/script_component.hpp +++ b/addons/interact_menu/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_INTERACT_MENU diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index 83d9b1c31f..d44252e8e1 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Mindig legyen a saját cselekvés kurzorja látható Mostra sempre il cursore delle autointerazioni Sempre mostrar cursor para interação pessoal - セルフ インタラクションへ常にカーソルを表示 - 자기상호작용시 항상 커서를 보이기 - 自我互动时永远显示游标 - 自我互動時永遠顯示游標 Always display cursor for interaction @@ -28,10 +24,6 @@ Immer den Mauszeiger für Fremd-Interaktionen anzeigen Mindig legyen a cselekvés kurzorja látható Sempre mostrar cursor para interação - インタラクションへ常にカーソルを表示 - 상호작용시 항상 커서를 보이기 - 互动时永远显示游标 - 互動時永遠顯示游標 Display interaction menus as lists @@ -44,10 +36,6 @@ Interaktionsmenü in Listen anzeigen Cselekvő menük listaként való megjelenítése Mostrar menu de interação como listas - 表示されるインタラクション メニューを一覧表示 - 상호작용메뉴를 리스트화 해서 보이기 - 以列表方式显示互动表单 - 以列表方式顯示互動表單 Interact Key @@ -60,10 +48,6 @@ Cselekvő gomb Tasto interazione Tecla de Interação - インタラクション キー - 상호작용 키 - 互动键 - 互動鍵 Self Interaction Key @@ -76,10 +60,6 @@ Saját cselekvő gomb Tasto interazione su se stessi Tecla de Interação Pessoal - セルフ インタラクション キー - 자기상호작용 키 - 自我互动键 - 自我互動鍵 Self Actions @@ -92,10 +72,6 @@ Saját cselekvések Interazioni su se stessi Ações Pessoais - 自分への動作 - 자기 동작 - 自我动作 - 自我動作 Vehicle Actions @@ -108,10 +84,6 @@ Járműves cselekvések Interazioni con veicoli Ações de Veículos - 車両への動作 - 차량 동작 - 载具动作 - 載具動作 Zeus Actions @@ -124,10 +96,6 @@ Ações do Zeus Действия Зевса Azioni Zeus - Zeus への動作 - Zeus 동작 - 宙斯操作 - 宙斯操作 Interaction - Text Max @@ -140,10 +108,6 @@ Interacción - Texto al max. Cselekvés - Szöveg max. Interação - Max. de Texto - インタラクション - 文字の色 - 상호작용 - 문자색깔 - 互动 - 文字最大化 - 互動 - 文字最大化 Interaction - Text Min @@ -156,10 +120,6 @@ Interacción - Texto al min. Cselekvés - Szöveg min. Interação - Min. de Texto - インタラクション - 文字の背景色 - 상호작용 - 문자배경색 - 互动 - 文字最小化 - 互動 - 文字最小化 Interaction - Shadow Max @@ -172,10 +132,6 @@ Interacción - Sombras al max. Cselekvés - Árnyék max. Interação - Max. de Sombra - インタラクション - 文字への影の色 - 상호작용 - 문자그림자색 - 互动 - 阴影最大化 - 互動 - 陰影最大化 Interaction - Shadow Min @@ -188,10 +144,6 @@ Interacción - Sombras al min. Cselekvés - Árnyék min. Interação - Min. de Sombra - インタラクション - 文字への影の最低色 - 상호작용 - 문자그림자배경색 - 互动 - 阴影最小化 - 互動 - 陰影最小化 Keep cursor centered @@ -204,10 +156,6 @@ Udržuj kurzor na středu Manter o cursor centralizado Mantieni il cursore centrato - 常にカーソルを中央にする - 커서를 항상 가운데에 둡니다 - 保持游标在中心点 - 保持游標在中心點 Keeps cursor centered and pans the option menu around. Useful if screen size is limited. @@ -220,10 +168,6 @@ Mantiene el cursor centrado y despliega los menús alrededor. Útil si el tamaño de la pantalla es limitado. Manter o cursor centralizado e mover o menu de opções. Útil caso o tamanho da tela seja limitado. Mantieni il cursore centrato e sposta il menù intorno. Utile se lo schermo è piccolo. - 常にカーソルを中央へ表示させ、オプション メニューが移動します。画面の大きさが制限されている時に使いやすくなります。 - 커서를 항상 가운데에 두고 메뉴를 움직입니다. 화면의 크기가 제한되있을때 유용합니다. - 保持游标在中心点并平移周遭的选项选单. 这对在荧幕尺寸有限的玩家很有用! - 保持游標在中心點並平移周遭的選項選單. 這對在螢幕尺寸有限的玩家很有用! Do action when releasing menu key @@ -236,10 +180,6 @@ Execute a ação quando soltar a tecla de menu Cselekvés végrehajtása a menügomb elengedésekor Esegui l'azione quando rilasci il tasto menu - メニュー キーを離したときに動作を実行します。 - 메뉴키를 놓을때 행동하기 - 当放开选单键后就执行动作 - 當放開選單鍵後就執行動作 Interaction Text Size @@ -252,10 +192,6 @@ Tamanho do texto de interação Cselekvő szöveg mérete Dimensione del testo d'interazione - インタラクション文字の大きさ - 상호작용 - 문자크기 - 互动选单文字大小 - 互動選單文字大小 Interaction Text Shadow @@ -268,10 +204,6 @@ Sombra do texto de interação Cselekvő szöveg árnyéka Ombra del testo d'interazione - インタラクション文字へ影 - 상호작용 - 문자그림자 - 互动选单文字阴影 - 互動選單文字陰影 Allows controlling the text's shadow. Outline ignores custom shadow colors. @@ -284,10 +216,6 @@ Permite controlar a sombra do texto. Contorno ignora sombras com cores customizadas. Hozzáférést biztosít a szöveg árnyékának kezeléséhez. A körvonal nem veszi figyelembe az egyedi árnyékszíneket. Permette di controllare l'ombra del testo. L'impostazione "Contorno" ignora il colore dell'ombra. - 文字への影を設定します。縁取りは設定された影の色を無視します。 - 문자의 그림자를 조절하는것을 가능케합니다. 외각선은 임의의 그림자색을 무시합니다. - 允许控制文字阴影. 轮廓部分则会忽略自定义的阴影颜色 - 允許控制文字陰影. 輪廓部分則會忽略自定義的陰影顏色 Outline @@ -300,10 +228,6 @@ Contorno Körvonal Contorno - 縁取り - 외각선 - 只显示轮廓 - 只顯示輪廓 Interaction menu background @@ -316,10 +240,6 @@ Cselekvő menü háttere Фон меню взаимодействия Sfondo Menù Interazioni - インタラクション メニューの背景 - 상호작용 메뉴 배경 - 互动选单背景 - 互動選單背景 Blur the background while the interaction menu is open. @@ -332,10 +252,6 @@ A háttér elmosása a cselekvő menü használata alatt. Размыть фон, пока открыто меню взаимодействия. Sfoca lo sfondo mentre il Menù Interazioni è aperto. - インタラクション メニューを開いたとき、背景にボケを与えます。 - 상호작용 메뉴가 열릴시 배경을 흐릿하게 처리합니다. - 当互动选单开启时, 模糊背景画面 - 當互動選單開啟時, 模糊背景畫面 Blur screen @@ -348,10 +264,6 @@ Kép elmosása Размытый Sfoca schermo - ボケ画面 - 화면 흐리게 - 模糊画面 - 模糊畫面 Black @@ -364,10 +276,6 @@ Fekete Черный Nero - ブラック - 까맣게 - 黑色 - 黑色 Show actions for buildings @@ -380,10 +288,6 @@ Mostrar ações para edifícios Показывать действия для зданий Mostra azioni per edifici - 建物へ動作を表示 - 건물에 행동을 취함 - 显示建筑物可用的动作 - 顯示建築物可用的動作 Adds interaction actions for opening doors and mounting ladders on buildings. (Note: There is a performance cost when opening interaction menu, especially in towns) @@ -396,10 +300,6 @@ Adiciona ações de interações para abrir portas e montar escadas em edifícios. (Nota: Existe um custo de performance quando aberto o menu de interação, especialmente em cidades) Добавляет действия открывания дверей и залезания на лестницы для зданий. (Примечание: возможно падение производительности при открытии меню взаимодействия, особенно в городах) Aggiunge azioni interattive per l'apertura delle porte e piazzamento scale su edifici. (Nota: C'è un costo in performance quando si apre il Menù Interazioni, soprattutto in città) - 建物にあるドアの開閉やラダーの昇降といった動作をインタラクションへ追加します。(街などでインタラクション メニューを開くとパフォーマンスが低下します) - 건물의 문을 열거나 사다리에 오르는 상호작용 행동을 추가합니다. (주의: 상호작용 메뉴를 열경우 성능하락이 있을 수 있음, 특히 마을 내부에서) - 增加互动选单的功能在可开启的门与建筑物的梯子上. (注意: 此功能有可能会降低系统效能, 特别是在城镇区更明显) - 增加互動選單的功能在可開啟的門與建築物的梯子上. (注意: 此功能有可能會降低系統效能, 特別是在城鎮區更明顯) Interaction Menu @@ -411,10 +311,6 @@ Menú de interacción Menù Interazioni Menu d'interaction - インタラクション メニュー - 상호작용 메뉴 - 互动选单 - 互動選單 Interaction Animation Speed @@ -426,10 +322,6 @@ Velocità Animazioni Interazioni Velocidad de animación del menú de interacción Vitesse de l'aniamtion d'interaction - インタラクションのアニメーション速度 - 상호작용 움직임 속도 - 互动选单动画速度 - 互動選單動畫速度 Makes menu animations faster and decreases the time needed to hover to show sub actions @@ -441,9 +333,6 @@ Rende le animazioni Menù più veloci e diminuisce il tempo richiesto per mostrare sotto-azioni Hace la animación del menú más rápida, reduciendo el tiempo necesario para abrir sub-acciones. Rend les animations de menu plus rapide et réduit le temps nécessaire à l'affichage des sous menus d'action - サブ動作が表示されるホバーをした時に、表示されるメニューのアニメーション速度を早くしたり遅くしたりできます - 使选单的动画速度更快, 并减少子选项显现出来的时间 - 使選單的動畫速度更快, 並減少子選項顯現出來的時間 - + \ No newline at end of file diff --git a/addons/interaction/ACE_ZeusActions.hpp b/addons/interaction/ACE_ZeusActions.hpp index 44b7078f4b..af29186895 100644 --- a/addons/interaction/ACE_ZeusActions.hpp +++ b/addons/interaction/ACE_ZeusActions.hpp @@ -3,7 +3,6 @@ class ACE_ZeusActions { class ZeusUnits { displayName = "$STR_A3_RscDisplayCurator_ModeUnits_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeUnits_ca.paa"; - condition = QUOTE((count (curatorSelected select 0)) > 0); class stance { displayName = "$STR_A3_RscAttributeUnitPos_Title"; @@ -11,22 +10,22 @@ class ACE_ZeusActions { class prone { displayName = "$STR_Pos_Down"; icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_prone_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusStance),[ARR_2('DOWN',curatorSelected select 0)],curatorSelected select 0)] call CBA_fnc_targetEvent;); + statement = "{_x setUnitPos 'DOWN';} forEach (curatorSelected select 0);"; }; class crouch { displayName = "$STR_Pos_Crouch"; icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_crouch_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusStance),[ARR_2('MIDDLE',curatorSelected select 0)],curatorSelected select 0)] call CBA_fnc_targetEvent;); + statement = "{_x setUnitPos 'MIDDLE';} forEach (curatorSelected select 0);"; }; class stand { displayName = "$STR_Pos_Up"; icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_stand_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusStance),[ARR_2('UP',curatorSelected select 0)],curatorSelected select 0)] call CBA_fnc_targetEvent;); + statement = "{_x setUnitPos 'UP';} forEach (curatorSelected select 0);"; }; class auto { displayName = "$STR_Pos_Automatic"; icon = "\A3\UI_F_Curator\Data\default_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusStance),[ARR_2('AUTO',curatorSelected select 0)],curatorSelected select 0)] call CBA_fnc_targetEvent;); + statement = "{_x setUnitPos 'AUTO';} forEach (curatorSelected select 0);"; }; }; @@ -40,34 +39,33 @@ class ACE_ZeusActions { class ZeusGroups { displayName = "$STR_A3_RscDisplayCurator_ModeGroups_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeGroups_ca.paa"; - condition = QUOTE((count (curatorSelected select 1)) > 0); class behaviour { displayName = "$STR_Combat_Mode"; class careless { displayName = "$STR_Combat_Careless"; - statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('CARELESS',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{ _x setBehaviour 'CARELESS'; } forEach (curatorSelected select 1);"; }; class safe { displayName = "$STR_Combat_Safe"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\safe_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('CARELESS',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{ _x setBehaviour 'SAFE'; } forEach (curatorSelected select 1);"; }; class aware { displayName = "$STR_Combat_Aware"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\aware_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('AWARE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{ _x setBehaviour 'AWARE'; } forEach (curatorSelected select 1);"; }; class combat { displayName = "$STR_Combat_Combat"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\combat_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('COMBAT',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{ _x setBehaviour 'COMBAT'; } forEach (curatorSelected select 1);"; }; class stealth { displayName = "$STR_Combat_Stealth"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\stealth_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('STEALTH',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{ _x setBehaviour 'STEALTH'; } forEach (curatorSelected select 1);"; }; }; @@ -77,17 +75,17 @@ class ACE_ZeusActions { class limited { displayName = "$STR_Speed_Limited"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\limited_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusSpeed),[ARR_2('LIMITED',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{_x setSpeedMode 'LIMITED';} forEach (curatorSelected select 1);"; }; class normal { displayName = "$STR_Speed_Normal"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\normal_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusSpeed),[ARR_2('NORMAL',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{_x setSpeedMode 'NORMAL';} forEach (curatorSelected select 1);"; }; class full { displayName = "$STR_Speed_Full"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\full_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusSpeed),[ARR_2('FULL',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{_x setSpeedMode 'FULL';} forEach (curatorSelected select 1);"; }; }; @@ -97,47 +95,47 @@ class ACE_ZeusActions { class wedge { displayName = "$STR_Wedge"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\wedge_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('WEDGE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{_x setFormation 'WEDGE';} forEach (curatorSelected select 1);"; }; class vee { displayName = "$STR_Vee"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\vee_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('VEE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{_x setFormation 'VEE';} forEach (curatorSelected select 1);"; }; class line { displayName = "$STR_Line"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\line_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('LINE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{_x setFormation 'LINE';} forEach (curatorSelected select 1);"; }; class column { displayName = "$STR_Column"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\column_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('COLUMN',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{_x setFormation 'COLUMN';} forEach (curatorSelected select 1);"; }; class file { displayName = "$STR_File"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\file_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('FILE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{_x setFormation 'FILE';} forEach (curatorSelected select 1);"; }; class stag_column { displayName = "$STR_Staggered"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\stag_column_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('STAG COLUMN',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{_x setFormation 'STAG COLUMN';} forEach (curatorSelected select 1);"; }; class ech_left { displayName = "$STR_EchL"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_left_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('ECH LEFT',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{_x setFormation 'ECH LEFT';} forEach (curatorSelected select 1);"; }; class ech_right { displayName = "$STR_EchR"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_right_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('ECH RIGHT',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{_x setFormation 'ECH RIGHT';} forEach (curatorSelected select 1);"; }; class diamond { displayName = "$STR_Diamond"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\diamond_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusFormation),[ARR_2('DIAMOND',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = "{_x setFormation 'DIAMOND';} forEach (curatorSelected select 1);"; }; }; }; @@ -145,34 +143,33 @@ class ACE_ZeusActions { class ZeusWaypoints { displayName = "Waypoints"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeRecent_ca.paa"; - condition = QUOTE((count (curatorSelected select 2)) > 0); class behaviour { displayName = "$STR_Combat_Mode"; class careless { displayName = "$STR_Combat_Careless"; - statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('CARELESS',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{ _x setWaypointBehaviour 'CARELESS'; } forEach (curatorSelected select 2);"; }; class safe { displayName = "$STR_Combat_Safe"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\safe_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('SAFE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{ _x setWaypointBehaviour 'SAFE'; } forEach (curatorSelected select 2);"; }; class aware { displayName = "$STR_Combat_Aware"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\aware_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('AWARE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{ _x setWaypointBehaviour 'AWARE'; } forEach (curatorSelected select 2);"; }; class combat { displayName = "$STR_Combat_Combat"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\combat_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('COMBAT',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{ _x setWaypointBehaviour 'COMBAT'; } forEach (curatorSelected select 2);"; }; class stealth { displayName = "$STR_Combat_Stealth"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\stealth_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusBehaviour),[ARR_3('STEALTH',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{ _x setWaypointBehaviour 'STEALTH'; } forEach (curatorSelected select 2);"; }; }; @@ -182,17 +179,17 @@ class ACE_ZeusActions { class limited { displayName = "$STR_Speed_Limited"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\limited_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusSpeed),[ARR_3('LIMITED',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{ _x setWaypointSpeed 'LIMITED'; } forEach (curatorSelected select 2);"; }; class normal { displayName = "$STR_Speed_Normal"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\normal_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusSpeed),[ARR_3('NORMAL',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{ _x setWaypointSpeed 'NORMAL'; } forEach (curatorSelected select 2);"; }; class full { displayName = "$STR_Speed_Full"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\full_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusSpeed),[ARR_3('FULL',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{ _x setWaypointSpeed 'FULL'; } forEach (curatorSelected select 2);"; }; }; @@ -202,47 +199,47 @@ class ACE_ZeusActions { class wedge { displayName = "$STR_Wedge"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\wedge_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('WEDGE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{_x setWaypointFormation 'WEDGE';} forEach (curatorSelected select 2);"; }; class vee { displayName = "$STR_Vee"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\vee_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('VEE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{_x setWaypointFormation 'VEE';} forEach (curatorSelected select 2);"; }; class line { displayName = "$STR_Line"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\line_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('LINE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{_x setWaypointFormation 'LINE';} forEach (curatorSelected select 2);"; }; class column { displayName = "$STR_Column"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\column_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('COLUMN',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{_x setWaypointFormation 'COLUMN';} forEach (curatorSelected select 2);"; }; class file { displayName = "$STR_File"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\file_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('FILE',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{_x setWaypointFormation 'FILE';} forEach (curatorSelected select 2);"; }; class stag_column { displayName = "$STR_Staggered"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\stag_column_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('COLUMN',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{_x setWaypointFormation 'STAG COLUMN';} forEach (curatorSelected select 2);"; }; class ech_left { displayName = "$STR_EchL"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_left_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('LEFT',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{_x setWaypointFormation 'ECH LEFT';} forEach (curatorSelected select 2);"; }; class ech_right { displayName = "$STR_EchR"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_right_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('RIGHT',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{_x setWaypointFormation 'ECH RIGHT';} forEach (curatorSelected select 2);"; }; class diamond { displayName = "$STR_Diamond"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\diamond_ca.paa"; - statement = QUOTE([ARR_2(QQGVAR(zeusFormation),[ARR_3('DIAMOND',curatorSelected select 2,true)])] call CBA_fnc_serverEvent;); + statement = "{_x setWaypointFormation 'DIAMOND';} forEach (curatorSelected select 2);"; }; }; }; @@ -250,6 +247,5 @@ class ACE_ZeusActions { class ZeusMarkers { displayName = "$STR_A3_RscDisplayCurator_ModeMarkers_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeMarkers_ca.paa"; - condition = QUOTE((count (curatorSelected select 3)) > 0); }; }; diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index cc281247db..5ee893e101 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -116,7 +116,6 @@ class CfgVehicles { displayName = CSTRING(JoinGroup); condition = QUOTE(GVAR(EnableTeamManagement) && {[ARR_2(_player,_target)] call DFUNC(canJoinGroup)}); statement = QUOTE([_player] joinSilent group _target); - modifierFunction = QUOTE(call FUNC(modifyJoinGroupAction)); showDisabled = 0; priority = 2.6; icon = QPATHTOF(UI\team\team_management_ca.paa); @@ -551,7 +550,7 @@ class CfgVehicles { class ACE_OpenBox { displayName = CSTRING(OpenBox); - condition = QUOTE((alive _target) && {(getNumber (configFile >> 'CfgVehicles' >> (typeOf _target) >> 'disableInventory')) == 0}); + condition = QUOTE(alive _target); statement = QUOTE(_player action [ARR_2(QUOTE(QUOTE(Gear)), _target)]); showDisabled = 0; priority = -1; @@ -562,13 +561,6 @@ class CfgVehicles { class ACE_SelfActions {}; }; class Slingload_base_F: ReammoBox_F {}; - class Slingload_01_Base_F: Slingload_base_F { - class ACE_Actions: ACE_Actions { - class ACE_MainActions: ACE_MainActions { - distance = 5; - }; - }; - }; class Pod_Heli_Transport_04_base_F: Slingload_base_F { class ACE_Actions: ACE_Actions { class ACE_MainActions: ACE_MainActions { diff --git a/addons/interaction/XEH_PREP.hpp b/addons/interaction/XEH_PREP.hpp index 4f0ef58357..c8ceb66e8f 100644 --- a/addons/interaction/XEH_PREP.hpp +++ b/addons/interaction/XEH_PREP.hpp @@ -2,7 +2,6 @@ // interaction menu PREP(addPassengerActions); PREP(addPassengersActions); -PREP(getInteractionDistance); PREP(getVehiclePos); PREP(getVehiclePosComplex); PREP(getWeaponPos); @@ -17,7 +16,6 @@ PREP(canInteractWithCivilian); PREP(getDown); PREP(sendAway); PREP(canJoinGroup); -PREP(modifyJoinGroupAction); PREP(canJoinTeam); PREP(joinTeam); PREP(canPassMagazine); @@ -31,7 +29,6 @@ PREP(pardon); // interaction with doors PREP(getDoor); -PREP(getGlassDoor); PREP(getDoorAnimations); PREP(handleScrollWheel); PREP(openDoor); diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index bbbda80bfa..9aa9cfb157 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -28,36 +28,6 @@ ACE_Modifier = 0; {_lamp setHit [_x select 0, (_x select 1) max _disabledLampDMG];nil} count _hitPointsDamage; }] call CBA_fnc_addEventHandler; -// Zeus action events -[QGVAR(zeusStance),{ - { _x setUnitPos (_this select 0); } forEach (_this select 1); -}] call CBA_fnc_addEventHandler; - -// The following 3 events handle both waypoints and groups -[QGVAR(zeusBehaviour),{ - if (param [2,false]) then { - { _x setWaypointBehaviour (_this select 0); } forEach (_this select 1); - } else { - { _x setBehaviour (_this select 0); } forEach (_this select 1); - }; -}] call CBA_fnc_addEventHandler; - -[QGVAR(zeusSpeed),{ - if (param [2,false]) then { - { _x setWaypointSpeed (_this select 0); } forEach (_this select 1); - } else { - { _x setSpeedMode (_this select 0); } forEach (_this select 1); - }; -}] call CBA_fnc_addEventHandler; - -[QGVAR(zeusFormation),{ - if (param [2,false]) then { - { _x setWaypointFormation (_this select 0); } forEach (_this select 1); - } else { - { _x setFormation (_this select 0); } forEach (_this select 1); - }; -}] call CBA_fnc_addEventHandler; - if (!hasInterface) exitWith {}; GVAR(isOpeningDoor) = false; @@ -90,6 +60,7 @@ GVAR(isOpeningDoor) = false; }, [57, [false, true, false]], false] call CBA_fnc_addKeybind; //Key CTRL+Space + ["ACE3 Common", QGVAR(tapShoulder), localize LSTRING(TapShoulder), { // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; diff --git a/addons/interaction/XEH_preInit.sqf b/addons/interaction/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/interaction/XEH_preInit.sqf +++ b/addons/interaction/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/interaction/config.cpp b/addons/interaction/config.cpp index 77c2b408af..c6aff730cf 100644 --- a/addons/interaction/config.cpp +++ b/addons/interaction/config.cpp @@ -19,3 +19,12 @@ class CfgPatches { #include "RscTitles.hpp" #include "ACE_Settings.hpp" #include "ACE_ZeusActions.hpp" + +class ACE_newEvents { + getDown = QGVAR(getDown); + pardon = QGVAR(pardon); + tapShoulder = QGVAR(tapShoulder); + sendAway = QGVAR(sendAway); + lampTurnOff = QGVAR(setLampOff); + lampTurnOn = QGVAR(setLampOn); +}; diff --git a/addons/interaction/functions/fnc_canJoinTeam.sqf b/addons/interaction/functions/fnc_canJoinTeam.sqf index ee99723d77..7732e164e7 100644 --- a/addons/interaction/functions/fnc_canJoinTeam.sqf +++ b/addons/interaction/functions/fnc_canJoinTeam.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -params ["_unit", "_target"]; +PARAMS_2(_unit,_target); alive _target && {!(_target getVariable ["ACE_isUnconscious", false])} diff --git a/addons/interaction/functions/fnc_canPardon.sqf b/addons/interaction/functions/fnc_canPardon.sqf index 892647640e..a377533018 100644 --- a/addons/interaction/functions/fnc_canPardon.sqf +++ b/addons/interaction/functions/fnc_canPardon.sqf @@ -9,9 +9,6 @@ * Return Value: * Unit can pardon target * - * Example: - * [bob, kevin] call ACE_interaction_fnc_canPardon - * * Public: No */ #include "script_component.hpp" diff --git a/addons/interaction/functions/fnc_doBecomeLeader.sqf b/addons/interaction/functions/fnc_doBecomeLeader.sqf index cc96de5611..8c8663b03b 100644 --- a/addons/interaction/functions/fnc_doBecomeLeader.sqf +++ b/addons/interaction/functions/fnc_doBecomeLeader.sqf @@ -1,4 +1,4 @@ -/* + /* * Author: PabstMirror * Become Leader of group. * @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_unit"]; diff --git a/addons/interaction/functions/fnc_getDoor.sqf b/addons/interaction/functions/fnc_getDoor.sqf index 05793decc5..8261aa44f0 100644 --- a/addons/interaction/functions/fnc_getDoor.sqf +++ b/addons/interaction/functions/fnc_getDoor.sqf @@ -1,5 +1,5 @@ /* - * Author: commy2, Phyma + * Author: commy2 * Find door. * * Arguments: @@ -35,14 +35,7 @@ if (typeOf _house == "") exitWith {[objNull, ""]}; _intersections = [_house, "GEOM"] intersect [_position0, _position1]; -_door = toLower (_intersections select 0 select 0); - -if (isNil "_door") exitWith {[_house, ""]}; - -//Check if door is glass because then we need to find the proper location of the door so we can use it -if ((_door find "glass") != -1) then { - _door = [_distance, _house, _door] call FUNC(getGlassDoor); -}; +_door = _intersections select 0 select 0; if (isNil "_door") exitWith {[_house, ""]}; diff --git a/addons/interaction/functions/fnc_getDoorAnimations.sqf b/addons/interaction/functions/fnc_getDoorAnimations.sqf index 0d40d066be..fac29c74a8 100644 --- a/addons/interaction/functions/fnc_getDoorAnimations.sqf +++ b/addons/interaction/functions/fnc_getDoorAnimations.sqf @@ -1,6 +1,6 @@ /* - * Author: commy2, Phyma - * Get door animations. + * Author: commy2 + * Get door animations. @todo rewrite for better custom building support * * Arguments: * 0: House @@ -20,19 +20,104 @@ params ["_house", "_door"]; -private _animate = animationNames _house; -private _animations = []; -private _lockedVariable = []; +private ["_index", "_animations", "_lockedVariable"]; -{ - private _animName = toLower _x; - if ((_animName find (toLower _door)) != -1) then { - if (((_animName find "disabled") != -1) || ((_animName find "locked") != -1)) then { - _lockedVariable pushBack _animName; - } else { - _animations pushBack _animName; - }; - }; -} forEach _animate; +_index = [ + "door_1", + "door_2", + "door_3", + "door_4", + "door_5", + "door_6", + "door_7", + "door_8", + "door_9", + "door_10", + "door_11", + "door_12", + "door_13", + "Door_14", + "door_15", + "door_16", + "door_17", + "door_18", + "door_19", + "door_20", + "door_21", + "door_22", + + "hatch_1", + "hatch_2", + "hatch_3", + "hatch_4", + "hatch_5", + "hatch_6" +] find toLower _door; + +if (_index == -1) exitWith {[[],""]}; + +_animations = [ + ["Door_1_rot", "Door_Handle_1_rot_1", "Door_Handle_1_rot_2"], + ["Door_2_rot", "Door_Handle_2_rot_1", "Door_Handle_2_rot_2"], + ["Door_3_rot", "Door_Handle_3_rot_1", "Door_Handle_3_rot_2"], + ["Door_4_rot", "Door_Handle_4_rot_1", "Door_Handle_4_rot_2"], + ["Door_5_rot", "Door_Handle_5_rot_1", "Door_Handle_5_rot_2"], + ["Door_6_rot", "Door_Handle_6_rot_1", "Door_Handle_6_rot_2"], + ["Door_7_rot", "Door_Handle_7_rot_1", "Door_Handle_7_rot_2"], + ["Door_8_rot", "Door_Handle_8_rot_1", "Door_Handle_8_rot_2"], + ["Door_9_rot", "Door_Handle_9_rot_1", "Door_Handle_9_rot_2"], + ["Door_10_rot", "Door_Handle_10_rot_1", "Door_Handle_10_rot_2"], + ["Door_11_rot", "Door_Handle_11_rot_1", "Door_Handle_11_rot_2"], + ["Door_12_rot", "Door_Handle_12_rot_1", "Door_Handle_12_rot_2"], + ["Door_13_rot", "Door_Handle_13_rot_1", "Door_Handle_13_rot_2"], + ["Door_14_rot", "Door_Handle_14_rot_1", "Door_Handle_14_rot_2"], + ["Door_15_rot", "Door_Handle_15_rot_1", "Door_Handle_15_rot_2"], + ["Door_16_rot", "Door_Handle_16_rot_1", "Door_Handle_16_rot_2"], + ["Door_17_rot", "Door_Handle_17_rot_1", "Door_Handle_17_rot_2"], + ["Door_18_rot", "Door_Handle_18_rot_1", "Door_Handle_18_rot_2"], + ["Door_19_rot", "Door_Handle_19_rot_1", "Door_Handle_19_rot_2"], + ["Door_20_rot", "Door_Handle_20_rot_1", "Door_Handle_20_rot_2"], + ["Door_21_rot", "Door_Handle_21_rot_1", "Door_Handle_21_rot_2"], + ["Door_22_rot", "Door_Handle_22_rot_1", "Door_Handle_22_rot_2"], + + ["Hatch_1_rot"], + ["Hatch_2_rot"], + ["Hatch_3_rot"], + ["Hatch_4_rot"], + ["Hatch_5_rot"], + ["Hatch_6_rot"] +] select _index; + +_lockedVariable = [ + ["BIS_Disabled_Door_1", "Door_Handle_1_rot_1", "Door_Locked_1_rot"], + ["BIS_Disabled_Door_2", "Door_Handle_2_rot_1", "Door_Locked_2_rot"], + ["BIS_Disabled_Door_3", "Door_Handle_3_rot_1", "Door_Locked_3_rot"], + ["BIS_Disabled_Door_4", "Door_Handle_4_rot_1", "Door_Locked_4_rot"], + ["BIS_Disabled_Door_5", "Door_Handle_5_rot_1", "Door_Locked_5_rot"], + ["BIS_Disabled_Door_6", "Door_Handle_6_rot_1", "Door_Locked_6_rot"], + ["BIS_Disabled_Door_7", "Door_Handle_7_rot_1", "Door_Locked_7_rot"], + ["BIS_Disabled_Door_8", "Door_Handle_8_rot_1", "Door_Locked_8_rot"], + ["BIS_Disabled_Door_9", "Door_Handle_9_rot_1", "Door_Locked_9_rot"], + ["BIS_Disabled_Door_10", "Door_Handle_10_rot_1", "Door_Locked_10_rot"], + ["BIS_Disabled_Door_11", "Door_Handle_11_rot_1", "Door_Locked_11_rot"], + ["BIS_Disabled_Door_12", "Door_Handle_12_rot_1", "Door_Locked_12_rot"], + ["BIS_Disabled_Door_13", "Door_Handle_13_rot_1", "Door_Locked_13_rot"], + ["BIS_Disabled_Door_14", "Door_Handle_14_rot_1", "Door_Locked_14_rot"], + ["BIS_Disabled_Door_15", "Door_Handle_15_rot_1", "Door_Locked_15_rot"], + ["BIS_Disabled_Door_16", "Door_Handle_16_rot_1", "Door_Locked_16_rot"], + ["BIS_Disabled_Door_17", "Door_Handle_17_rot_1", "Door_Locked_17_rot"], + ["BIS_Disabled_Door_18", "Door_Handle_18_rot_1", "Door_Locked_18_rot"], + ["BIS_Disabled_Door_19", "Door_Handle_19_rot_1", "Door_Locked_19_rot"], + ["BIS_Disabled_Door_20", "Door_Handle_20_rot_1", "Door_Locked_20_rot"], + ["BIS_Disabled_Door_21", "Door_Handle_21_rot_1", "Door_Locked_21_rot"], + ["BIS_Disabled_Door_22", "Door_Handle_22_rot_1", "Door_Locked_22_rot"], + + ["", ""], + ["", ""], + ["", ""], + ["", ""], + ["", ""], + ["", ""] +] select _index; [_animations, _lockedVariable] diff --git a/addons/interaction/functions/fnc_getGlassDoor.sqf b/addons/interaction/functions/fnc_getGlassDoor.sqf deleted file mode 100644 index 2731f82888..0000000000 --- a/addons/interaction/functions/fnc_getGlassDoor.sqf +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Author: Phyma - * Find glass door. - * - * Arguments: - * 0: Distance - * 1: House - * 2: Door name - * - * Return Value: - * 0: Door Name - * - * Example: - * [player, target] call ace_interaction_fnc_getGlassDoor - * - * Public: No - */ -#include "script_component.hpp" - -params ["_distance", "_house", "_door"]; - -private _doorParts = []; -private _doorPos = []; -private _animate = animationNames _house; -private _glassDoor = _door splitString "_"; -private _glassPos = (_house selectionPosition [(_glassDoor select 0) + "_" + (_glassDoor select 1) + "_effects", "Memory"]); -// Calculate all animation names so we know what is there -{ - private _animName = toLower _x; - if (((_animName find "door") != -1) && ((_animName find "locked") == -1) && ((_animName find "disabled") == -1) && ((_animName find "handle") == -1)) then { - private _splitStr = _animName splitString "_"; - _doorParts pushBack ((_splitStr select 0) + "_" + (_splitStr select 1) + "_trigger"); - }; -} forEach _animate; - - -// Get the pos of all the door components and save the parts -{ - _doorPos pushBack (_house selectionPosition [_x, "Memory"]); -} forEach _doorParts; - -// Calculate what door that is closest to the glass door -private _lowestDistance = 0; -{ - private _objDist = _glassPos distance _x; - //Make sure we dont take another door by mistake - if (_objDist <= _distance) then { - //Need to set the value in the beginning - if (_lowestDistance == 0) then { - _lowestDistance = _objDist; - private _splitStr = (_doorParts select _forEachIndex) splitString "_"; - _door = (_splitStr select 0) + "_" + (_splitStr select 1); - } else { - if (_objDist < _lowestDistance) then { - _lowestDistance = _objDist; - private _splitStr = (_doorParts select _forEachIndex) splitString "_"; - _door = (_splitStr select 0) + "_" + (_splitStr select 1); - }; - }; - }; -} forEach _doorPos; - -// Check if we have a door or if it is the glass part -if ((isNil "_door") || ((_door find "glass") != -1)) exitWith {}; - -_door - diff --git a/addons/interaction/functions/fnc_getInteractionDistance.sqf b/addons/interaction/functions/fnc_getInteractionDistance.sqf deleted file mode 100644 index c731c6e7d1..0000000000 --- a/addons/interaction/functions/fnc_getInteractionDistance.sqf +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Author: PabstMirror - * Gets effective interaction distance (handles very large vehicles) - * - * Arguments: - * 0: Player - * 0: Target Vehicle - * - * Return Value: - * Distance to interaction point - * - * Example: - * [player, cursorObject] call ace_interaction_fnc_getInteractionDistance - * - * Public: No - */ -#include "script_component.hpp" - -params ["_unit", "_target"]; -TRACE_3("getInteractionDistance",_unit,_target,typeOf _target); - -// Handle Man, Crate -if (!((_target isKindOf "Car") || {_target isKindOf "Tank"} || {_target isKindOf "Helicopter"} || {_target isKindOf "Plane"} || {_target isKindOf "Ship_F"})) exitWith { - _unit distance _target -}; - -private _unitEyeASL = eyePos _unit; -private _targetModelPos = [_target, _unitEyeASL] call FUNC(getVehiclePosComplex); -private _distance = _unitEyeASL distance (AGLtoASL (_target modelToWorld _targetModelPos)); - -TRACE_2("",_targetModelPos,_distance); - -_distance diff --git a/addons/interaction/functions/fnc_getVehiclePos.sqf b/addons/interaction/functions/fnc_getVehiclePos.sqf index f66b071ecd..1544aea939 100644 --- a/addons/interaction/functions/fnc_getVehiclePos.sqf +++ b/addons/interaction/functions/fnc_getVehiclePos.sqf @@ -5,7 +5,7 @@ * Arguments: * None (uses local variable _target) * - * Return Value: + * Return value: * Children actions * * Example: diff --git a/addons/interaction/functions/fnc_getVehiclePosComplex.sqf b/addons/interaction/functions/fnc_getVehiclePosComplex.sqf index 6907721aba..886f7052c4 100644 --- a/addons/interaction/functions/fnc_getVehiclePosComplex.sqf +++ b/addons/interaction/functions/fnc_getVehiclePosComplex.sqf @@ -6,7 +6,7 @@ * 0: Target * 1: Player's Position ASL * - * Return Value: + * Return value: * Interaction point in model cords * * Example: diff --git a/addons/interaction/functions/fnc_handleScrollWheel.sqf b/addons/interaction/functions/fnc_handleScrollWheel.sqf index 48716a05c3..793e78c1b3 100644 --- a/addons/interaction/functions/fnc_handleScrollWheel.sqf +++ b/addons/interaction/functions/fnc_handleScrollWheel.sqf @@ -8,9 +8,6 @@ * Return Value: * handled * - * Example: - * [5] call ACE_interaction_fnc_handleScrollWheel - * * Public: No */ #include "script_component.hpp" diff --git a/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf b/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf deleted file mode 100644 index 3ac493aa54..0000000000 --- a/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Author: PabstMirror - * Modifies the ACE_JoinGroup action to show group name. - * - * Arguments: - * 0: Target - * 1: Player - * 2: Args - * 3: Action Data - * - * Return Value: - * None - * - * Example: - * [cursorObject, player, [], []] call ace_interaction_fnc_modifyJoinGroupAction - * - * Public: No - */ -#include "script_component.hpp" - -params ["_target", "_player", "", "_actionData"]; - -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_moduleInteraction.sqf b/addons/interaction/functions/fnc_moduleInteraction.sqf index ec3ec0a086..425ee9d6e4 100644 --- a/addons/interaction/functions/fnc_moduleInteraction.sqf +++ b/addons/interaction/functions/fnc_moduleInteraction.sqf @@ -23,4 +23,4 @@ if !(_activated) exitWith {}; [_logic, QGVAR(EnableTeamManagement), "EnableTeamManagement"] call EFUNC(common,readSettingFromModule); -INFO("Interaction Module Initialized."); +ACE_LOGINFO("Interaction Module Initialized."); diff --git a/addons/interaction/functions/fnc_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf index 7d94a5c4a1..b1c7789ec3 100644 --- a/addons/interaction/functions/fnc_openDoor.sqf +++ b/addons/interaction/functions/fnc_openDoor.sqf @@ -19,26 +19,18 @@ private _info = [MACRO_DOOR_REACH_DISTANCE] call FUNC(getDoor); _info params ["_house", "_door"]; -TRACE_2("openDoor",_house,_door); if (isNull _house) exitWith {}; private _getDoorAnimations = [_house, _door] call FUNC(getDoorAnimations); -_getDoorAnimations params ["_animations"]; +_getDoorAnimations params ["_animations", "_lockedVariable"]; if (_animations isEqualTo []) exitWith {}; -private _lockedVariable = format ["bis_disabled_%1", _door]; - -//Check if the door can be locked aka have locked variable, otherwhise cant lock it -if ((_house animationPhase (_animations select 0) <= 0) && {_house getVariable [_lockedVariable, 0] == 1}) exitWith { - private _lockedAnimation = format ["%1_locked_source", _door]; - TRACE_3("locked",_house,_lockedAnimation,isClass (configfile >> "CfgVehicles" >> (typeOf _house) >> "AnimationSources" >> _lockedAnimation)); - if (isClass (configfile >> "CfgVehicles" >> (typeOf _house) >> "AnimationSources" >> _lockedAnimation)) then { - // from: a3\structures_f\scripts\fn_door.sqf: - wiggles the door handle (A3 buildings) - _house animateSource [_lockedAnimation, (1 - (_house animationSourcePhase _lockedAnimation))]; - }; +if (_house animationPhase (_animations select 0) <= 0 && {_house getVariable [_lockedVariable select 0, 0] == 1}) exitWith { + _lockedVariable set [0, _house]; + _lockedVariable call BIS_fnc_LockedDoorOpen; }; playSound "ACE_Sound_Click"; // @todo replace with smth. more fitting @@ -70,6 +62,7 @@ GVAR(usedScrollWheel) = false; if (CBA_missionTime > _time && {diag_frameno > _frame}) then { GVAR(usedScrollWheel) = true; }; + // do incremental door opening {_house animate [_x, GVAR(doorTargetPhase)]; false} count _animations; }, 0.1, [_house, _animations, getPosASL ACE_player, CBA_missionTime + 0.2, diag_frameno + 2]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/interaction/functions/fnc_pardon.sqf b/addons/interaction/functions/fnc_pardon.sqf index 7b6085bcf4..e11a92e7db 100644 --- a/addons/interaction/functions/fnc_pardon.sqf +++ b/addons/interaction/functions/fnc_pardon.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, kevin] call ACE_interaction_fnc_pardon - * * Public: No */ #include "script_component.hpp" diff --git a/addons/interaction/functions/fnc_tapShoulder.sqf b/addons/interaction/functions/fnc_tapShoulder.sqf index 483498329d..3926503746 100644 --- a/addons/interaction/functions/fnc_tapShoulder.sqf +++ b/addons/interaction/functions/fnc_tapShoulder.sqf @@ -23,6 +23,6 @@ if (_unit == ACE_player) then { addCamShake [4, 0.5, 5]; }; -[_unit, "gesturePoint"] call EFUNC(common,doGesture); +[_unit, "PutDown"] call EFUNC(common,doGesture); [QGVAR(tapShoulder), [_target, _shoulderNum], [_target]] call CBA_fnc_targetEvent; diff --git a/addons/interaction/script_component.hpp b/addons/interaction/script_component.hpp index bd5484992f..460550300d 100644 --- a/addons/interaction/script_component.hpp +++ b/addons/interaction/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_INTERACTION diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 1e9367347e..5d80cc3dc9 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Cselekvések Interazioni Interaçãoes - インタラクション - 상호작용 - 互动 - 互動 Torso @@ -28,10 +24,6 @@ Testtörzs Torso Torso - 胴体 - 몸통 - 身体 - 身體 Head @@ -44,10 +36,6 @@ Fej Testa Cabeça - 頭部 - 머리 - 头部 - 頭部 Left Arm @@ -60,10 +48,6 @@ Bal kar Braccio sinistro Braço Esquerdo - 左腕 - 왼쪽 팔 - 左手 - 左手 Right Arm @@ -76,10 +60,6 @@ Jobb kar Braccio destro Braço Direito - 右腕 - 오른쪽 팔 - 右手 - 右手 Left Leg @@ -92,10 +72,6 @@ Bal láb Gamba sinistra Perna Esquerda - 左足 - 왼쪽 다리 - 左脚 - 左腳 Right Leg @@ -108,10 +84,6 @@ Jobb láb Gamba destra Perna Direita - 右足 - 오른쪽 다리 - 右脚 - 右腳 Weapon @@ -124,10 +96,6 @@ Fegyver Arma Arma - 武器 - 무기 - 武器 - 武器 Interaction Menu @@ -140,10 +108,6 @@ Cselekvő menü Menu de Interação Menù interazione - インタラクション メニュー - 상호작용 메뉴 - 互动选单 - 互動選單 Interaction Menu (Self) @@ -156,10 +120,6 @@ Cselekvő menü (saját) Menu de Interação (Individual) Menù interazione (individuale) - インタラクション メニュー (セルフ) - 상호작용 메뉴(자신) - 互动选单 (自我) - 互動選單 (自我) Open / Close Door @@ -172,10 +132,6 @@ Ajtó nyitása / zárása Abrir / Fechar Porta Apri / Chiudi la porta - ドアの開け閉め - 문 열기 / 닫기 - 打开/关上 门 - 打開/關上 門 Lock Door @@ -188,10 +144,6 @@ Ajtó bezárása Zablokuj drzwi Zamknout dveře - ドアの鍵を閉める - 문 잠그기 - 锁门 - 鎖門 Unlock Door @@ -204,10 +156,6 @@ Zár kinyitása Odblokuj drzwi Odemknout dveře - ドアの鍵を開ける - 잠긴문 열기 - 解锁门 - 解鎖門 Locked Door @@ -220,10 +168,6 @@ Zárt ajtó Zablokowano drzwi Zamčené dveře - ドアの鍵を締めた - 잠긴 문 - 门已上锁 - 門已上鎖 Unlocked Door @@ -236,10 +180,6 @@ Nyitott ajtó Odblokowano drzwi Odemčené dveře - ドアの鍵を開けられた - 열린 문 - 门未上锁 - 門未上鎖 Join group @@ -252,10 +192,6 @@ Csatlakozás a csoporthoz Unir-se ao grupo Unisciti alla squadra - グループにはいる - 그룹 참여 - 加入小队 - 加入小隊 Leave Group @@ -268,10 +204,6 @@ Csoport elhagyása Deixar grupo Lascia la squadra - グループをぬける - 그룹 나가기 - 离开小队 - 離開小隊 Become Leader @@ -284,10 +216,6 @@ Vezetés átvétele Tornar-se Líder Prendi il comando - リーダーになる - 리더 되기 - 成为队长 - 成為隊長 DANCE! @@ -300,10 +228,6 @@ TÁNC! DANCE! DANZA! - おどれ! - 춤추기! - 跳舞 - 跳舞 Stop Dancing @@ -316,10 +240,6 @@ Tánc abbahagyása Parar de dançar Smetti di ballare - 踊るのをやめる - 춤 멈추기 - 停止跳舞 - 停止跳舞 << Back @@ -332,10 +252,6 @@ << Vissza << Voltar << Indietro - &lt;&lt; もどる - <<뒤로 - <<返回 - <<返回 Put weapon on back @@ -348,10 +264,6 @@ Fegyvert hátra Colocar arma nas costas Metti l'arma in spalla - 武器を背負う - 등에 무기 메기 - 将武器放到背后 - 將武器放到背後 Tap Shoulder @@ -364,10 +276,6 @@ Vállveregetés Tocar ombro Dai un colpetto - 肩をたたく - 어깨 두드리기 - 轻拍肩膀 - 輕拍肩膀 You were tapped on the RIGHT shoulder @@ -380,10 +288,6 @@ Вас похлопали по ПРАВОМУ плечу Você foi tocado no ombro Ti è stato dato un colpetto sulla spalla destra - 右肩を叩かれた - 누군가 오른쪽 어깨를 쳤다 - 你的右肩膀被轻拍了一下 - 你的右肩膀被輕拍了一下 You were tapped on the LEFT shoulder. @@ -396,10 +300,6 @@ Вас похлопали по ЛЕВОМУ плечу Você foi tocado no ombro. Ti è stato dato un colpetto sulla spalla sinistra - 左肩を叩かれた - 누군가 왼쪽 어깨를 쳤다 - 你的左肩膀被轻拍了一下 - 你的左肩膀被輕拍了一下 Cancel @@ -412,10 +312,6 @@ Отменить Cancelar Mégse - 中止 - 취소 - 取消 - 取消 Select @@ -428,10 +324,6 @@ Выбрать Selecionar Kiválaszt - 選択 - 선택 - 选择 - 選擇 Go Away! @@ -444,10 +336,6 @@ Tűnés! Vá Embora! Via di qui! - うせろ! - 저리 가! - 走开! - 走開! Get Down! @@ -460,10 +348,6 @@ Ложись! Abaixe-se! A terra! - ふせろ! - 엎드려! - 趴下! - 趴下! Get Out @@ -474,10 +358,6 @@ Sortez ! Выходи Vystupte - 降りる - 나가 - 出去 - 出去 Team Management @@ -490,10 +370,6 @@ Gerenciamento de Equipe Organizzazione Squadra Csapat kezelése - チーム管理 - 팀 설정 - 小队管理 - 小隊管理 Red @@ -506,10 +382,6 @@ Vermelha Rosso Piros - レッド - 빨강 - 红色 - 紅色 Green @@ -522,10 +394,6 @@ Verde Verde Zöld - グリーン - 초록 - 绿色 - 綠色 Blue @@ -538,10 +406,6 @@ Azul Blu Kék - ブルー - 파랑 - 蓝色 - 藍色 Yellow @@ -554,10 +418,6 @@ Amarela Giallo Sárga - イエロー - 노랑 - 黄色 - 黃色 Assign Red @@ -570,10 +430,6 @@ Назначить в Красную группу Assigner à rouge Assegna al team rosso - レッドにする - 빨강에 등록 - 指派为红组 - 指派為紅組 Assign Green @@ -586,10 +442,6 @@ Назначить в Зеленую группу Assigner à vert Assegna al team verde - グリーンにする - 초록에 등록 - 指派为绿组 - 指派為綠組 Assign Blue @@ -602,10 +454,6 @@ Назначить в Синюю группу Assigner à bleu Assegna al team blu - ブルーにする - 파랑이 등록 - 指派为蓝组 - 指派為藍組 Assign Yellow @@ -618,10 +466,6 @@ Назначить в Желтую группу Assigner à jaune Assegna al team giallo - イエローにする - 노랑에 등록 - 指派为黄组 - 指派為黃組 Join Red @@ -634,10 +478,6 @@ Присоединиться к Красной группе Rejoindre rouge Unirsi al team rosso - レッドに入る - 빨강에 참여 - 加入红组 - 加入紅組 Join Green @@ -650,10 +490,6 @@ Присоединиться к Зеленой группе Rejoindre vert Unirsi al team verde - グリーンに入る - 초록에 참여 - 加入绿组 - 加入綠組 Join Blue @@ -666,10 +502,6 @@ Присоединиться к Синей группе Rejoindre bleu Unirsi al team blu - ブルーに入る - 파랑에 참여 - 加入蓝组 - 加入藍組 Join Yellow @@ -682,10 +514,6 @@ Присоединиться к Жёлтой группе Rejoindre jaune Unirsi al team giallo - イエローに入る - 노랑에 참여 - 加入黄组 - 加入黃組 You joined Team %1 @@ -698,10 +526,6 @@ Você uniu-se à Equipe %1 Sei entrato nel team %1 Csatlakoztál a %1 csapathoz - チーム %1 に入った - 당신은 %1팀에 참여했습니다 - 你已加入%1组 - 你已加入%1組 Leave Team @@ -714,10 +538,6 @@ Deixar Equipe Lascia il team Csapat elhagyása - チームを抜ける - 팀 나가기 - 离开小队 - 離開小隊 You left the Team @@ -730,10 +550,6 @@ Você deixou a Equipe Hai lasciato il team Elhagytad a csapatot - チームを抜けた - 팀을 나갔습니다 - 你已离开小队 - 你已離開小隊 Pardon @@ -746,10 +562,6 @@ Perdão Perdona Megbocsátás - 許す - 허용 - 原谅 - 原諒 Scroll @@ -762,10 +574,6 @@ Scorri Görgetés Posunout - スクロール - 스크롤 - 滚动 - 滾動 Modifier Key @@ -778,10 +586,6 @@ Tasto modifica Módosító billentyű Modifikátor - キーを割り当て - 키 할당하기 - 编辑按键 - 編輯按鍵 Not in Range @@ -794,10 +598,6 @@ Poza zasięgiem Mimo dosah Fuori limite - 範囲内にありません - 범위 내에 없습니다 - 不在范围内 - 不在範圍內 Equipment @@ -810,10 +610,6 @@ Снаряжение Equipaggiamento Equipamento - 装備 - 장비 - 装备 - 裝備 Push @@ -826,10 +622,6 @@ Толкать Empurrar Spingere - 押す - 밀기 - - Interact @@ -842,10 +634,6 @@ Cselekvés Interagire Interagir - インタラクト - 상호작용 - 互动 - 互動 Passengers @@ -858,10 +646,6 @@ Utasok Passeggeri Passageiros - 後部座席 - 승객 - 乘客 - 乘客 Open @@ -874,10 +658,6 @@ Открыть Apri Öffnen - 開く - 열기 - 打开 - 打開 Interaction System @@ -890,10 +670,6 @@ Interakciós rendszer Sistema de interação Sistema Interazioni - インタラクション システム - 상호작용 시스템 - 互动系统 - 互動系統 Enable Team Management @@ -906,10 +682,6 @@ Csapatkezelés engedélyezése Habilitar gestão de equipes Abilità Management Squadra - チーム管理をつかう - 팀 설정 활성화 - 启用小队管理 - 啟用小隊管理 Should players be allowed to use the Team Management Menu? Default: Yes @@ -922,10 +694,6 @@ A játékosoknak engedélyezve legyen a csapatkezelő menü? Alapértelmezett: Igen Devem os jogadores ter permissão de usar o menu de gestão de equipes? Padrão: Sim Possono i giocatori usare il Menù Managment Squadra? Default: Si - プレイヤーがチーム管理メニューを使えるようにしますか?標準:はい - 플레이어들이 팀 설정하는 것을 허락합니까? 기본설정: 예 - 允许玩家使用小队管理选单? 预设: 是 - 允許玩家使用小隊管理選單? 預設: 是 Team management allows color allocation for team members, taking team command and joining/leaving teams. @@ -938,10 +706,6 @@ O módulo de gestão de equipe é composto por: a atribuição de cores para os membros da equipe, comando das equipes, juntando-se / deixando equipes. Управление группами позволяет назначать цвета членам групп, брать командование, вступать в группы или покидать их. Management Squadra permette l'assegnazione di colori per membri della squadra, prendere il comando ed entrare/uscire dalle squadre. - チーム管理はチーム メンバーへ色の割り当てや指揮権を取ったり、チームの出入りを許可します。 - 팀 설정은 팀 멤버에게 색을 부여하거나 팀에 참여 혹은 나가게 할 수 있게 합니다. - 队伍管理系统允许将指定颜色分配到队伍成员上, 接管队长职位或加入/离开队伍. - 隊伍管理系統允許將指定顏色分配到隊伍成員上, 接管隊長職位或加入/離開隊伍. Turn on @@ -953,10 +717,6 @@ Zapnout Ligar Включить - 中に入る - 켜기 - 开启 - 開啟 Turn off @@ -968,10 +728,6 @@ Vypnout Desligar Выключить - 外に出す - 끄기 - 关闭 - 關閉 Pass magazine @@ -983,10 +739,6 @@ Passa caricatore Pasar cargador Passer un chargeur - 弾倉をわたす - 탄창 건네기 - 给予弹匣 - 給予彈匣 Primary magazine @@ -998,10 +750,6 @@ Caricatore Primario Cargador primario Chargeur de l'arme principale - プライマリ用弾倉 - 주무기 탄창 - 给予主武器弹匣 - 給予主武器彈匣 Pistol magazine @@ -1013,10 +761,6 @@ Caricatore Pistola Cargador de pistola Chargeur de pistolet - 拳銃の弾倉 - 부무기 탄창 - 给予手枪弹匣 - 給予手槍彈匣 %1 passed you a %2 magazine. @@ -1028,10 +772,6 @@ %1 ti ha passato un caricatore %2 . %1 te pasó un cargador %2. %1 vous a passé un chargeur de %2. - %1 はあなたに %2 弾倉をわたした - %1에게서 %2탄창을 받았다 - %1给你%2弹匣 - %1給你%2彈匣 Show "pass magazine" interaction @@ -1043,10 +783,6 @@ Mostra interazione "passa caricatore" Mostrar "Pasar cargador" en el menú de interacción Montrer l'interaction "Passer un chargeur" - "弾倉をわたす"をインタラクションに表示する - '탄창 건네기'를 상호작용에서 보여줌 - 显示"给予弹匣"互动动作 - 顯示"給予彈匣"互動動作 - + \ No newline at end of file diff --git a/addons/inventory/XEH_preInit.sqf b/addons/inventory/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/inventory/XEH_preInit.sqf +++ b/addons/inventory/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/inventory/functions/fnc_addCustomFilter.sqf b/addons/inventory/functions/fnc_addCustomFilter.sqf index 0dd80c2e74..44e43bdbf0 100644 --- a/addons/inventory/functions/fnc_addCustomFilter.sqf +++ b/addons/inventory/functions/fnc_addCustomFilter.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * ["displayname", "filter"] call ACE_inventory_fnc_addCustomFilter - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/functions/fnc_currentItemListBox.sqf b/addons/inventory/functions/fnc_currentItemListBox.sqf index 670efeb044..1f1b528e93 100644 --- a/addons/inventory/functions/fnc_currentItemListBox.sqf +++ b/addons/inventory/functions/fnc_currentItemListBox.sqf @@ -10,9 +10,6 @@ * Return Value: * Currently selected item list box * - * Example: - * [DISPLAY] call ACE_inventory_fnc_currentItemListBox - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/functions/fnc_filterBackpacks.sqf b/addons/inventory/functions/fnc_filterBackpacks.sqf index 082dbd6501..9b629de66f 100644 --- a/addons/inventory/functions/fnc_filterBackpacks.sqf +++ b/addons/inventory/functions/fnc_filterBackpacks.sqf @@ -8,9 +8,6 @@ * Return Value: * Item should appear in this list? * - * Example: - * [CONFIG] call ACE_inventory_fnc_filterBackpacks - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/functions/fnc_filterGrenades.sqf b/addons/inventory/functions/fnc_filterGrenades.sqf index 6a869849fc..0acfbcaa2c 100644 --- a/addons/inventory/functions/fnc_filterGrenades.sqf +++ b/addons/inventory/functions/fnc_filterGrenades.sqf @@ -8,9 +8,6 @@ * Return Value: * Item should appear in this list? * - * Example: - * [CONFIG] call ACE_inventory_fnc_filterGrenades - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/functions/fnc_filterHeadgear.sqf b/addons/inventory/functions/fnc_filterHeadgear.sqf index ac787fc35a..056406a3d1 100644 --- a/addons/inventory/functions/fnc_filterHeadgear.sqf +++ b/addons/inventory/functions/fnc_filterHeadgear.sqf @@ -8,9 +8,6 @@ * Return Value: * Item should appear in this list? * - * Example: - * [CONFIG] call ACE_inventory_fnc_filterHeadgear - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/functions/fnc_filterItems.sqf b/addons/inventory/functions/fnc_filterItems.sqf index 1aaba46497..b9bf9baeea 100644 --- a/addons/inventory/functions/fnc_filterItems.sqf +++ b/addons/inventory/functions/fnc_filterItems.sqf @@ -8,9 +8,6 @@ * Return Value: * Item should appear in this list? * - * Example: - * [CONFIG] call ACE_inventory_fnc_filterItems - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/functions/fnc_filterMagazines.sqf b/addons/inventory/functions/fnc_filterMagazines.sqf index e0d67e3c7e..dfd357f61d 100644 --- a/addons/inventory/functions/fnc_filterMagazines.sqf +++ b/addons/inventory/functions/fnc_filterMagazines.sqf @@ -8,9 +8,6 @@ * Return Value: * Item should appear in this list? * - * Example: - * [CONFIG] call ACE_inventory_fnc_filterMagazines - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/functions/fnc_filterMedical.sqf b/addons/inventory/functions/fnc_filterMedical.sqf index 567aa528a3..397be50f06 100644 --- a/addons/inventory/functions/fnc_filterMedical.sqf +++ b/addons/inventory/functions/fnc_filterMedical.sqf @@ -8,9 +8,6 @@ * Return Value: * Item should appear in this list? * - * Example: - * [CONFIG] call ACE_inventory_fnc_filterMedical - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/functions/fnc_filterUniforms.sqf b/addons/inventory/functions/fnc_filterUniforms.sqf index 74773c3ad0..4c135dfa88 100644 --- a/addons/inventory/functions/fnc_filterUniforms.sqf +++ b/addons/inventory/functions/fnc_filterUniforms.sqf @@ -8,9 +8,6 @@ * Return Value: * Item should appear in this list? * - * Example: - * [CONFIG] call ACE_inventory_fnc_filterUniforms - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/functions/fnc_filterVests.sqf b/addons/inventory/functions/fnc_filterVests.sqf index a0ce281bda..646e23d04d 100644 --- a/addons/inventory/functions/fnc_filterVests.sqf +++ b/addons/inventory/functions/fnc_filterVests.sqf @@ -8,9 +8,6 @@ * Return Value: * Item should appear in this list? * - * Example: - * [CONFIG] call ACE_inventory_fnc_filterVests - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/functions/fnc_filterWeapons.sqf b/addons/inventory/functions/fnc_filterWeapons.sqf index 65b3d7cdea..94a92814ae 100644 --- a/addons/inventory/functions/fnc_filterWeapons.sqf +++ b/addons/inventory/functions/fnc_filterWeapons.sqf @@ -8,9 +8,6 @@ * Return Value: * Item should appear in this list? * - * Example: - * [CONFIG] call ACE_inventory_fnc_filterWeapons - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/functions/fnc_forceItemListUpdate.sqf b/addons/inventory/functions/fnc_forceItemListUpdate.sqf index 03bf667504..e5358212bb 100644 --- a/addons/inventory/functions/fnc_forceItemListUpdate.sqf +++ b/addons/inventory/functions/fnc_forceItemListUpdate.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [DISPLAY] call ACE_inventory_fnc_forceitemListUpdate - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf b/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf index 09d2b6fb9b..0e1daa4a52 100644 --- a/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf +++ b/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [DISPLAY] call ACE_inventory_fnc_inventoryDisplayLoad - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/functions/fnc_onLBSelChanged.sqf b/addons/inventory/functions/fnc_onLBSelChanged.sqf index 86ecfa0087..5ae49049fe 100644 --- a/addons/inventory/functions/fnc_onLBSelChanged.sqf +++ b/addons/inventory/functions/fnc_onLBSelChanged.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [CONTROL, 5] call ACE_inventory_fnc_onLBSelChanged - * * Public: No */ #include "script_component.hpp" diff --git a/addons/inventory/script_component.hpp b/addons/inventory/script_component.hpp index 5988a1526a..defacb991a 100644 --- a/addons/inventory/script_component.hpp +++ b/addons/inventory/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_INVENTORY diff --git a/addons/inventory/stringtable.xml b/addons/inventory/stringtable.xml index 6009a3e479..cfff3624bd 100644 --- a/addons/inventory/stringtable.xml +++ b/addons/inventory/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Legyen a felszerelés menüje nagyobb Ingrandisci il menù inventario Aumentar o Tamanho da Tela do Inventário - インベントリ表示を大きくする - 소지품 화면을 더 크게 합니다 - 使物品显示清单更大 - 使物品顯示清單更大 Normally inventory display is scaled by UI size. This allows scaling the Inventory UI size up, but doesn't increase font size allowing more rows displayed. @@ -28,10 +24,6 @@ Alaphelyzetben a kezelőfelület mérete skálázza a felszerelési menüt. Ez az opció engedélyezi a menü felskálázását, de megtartja a betűméreteket, így növelve a láthatóságot. Normalmente il menù inventario è scalato in base alle dimensioni interfaccia. Questa opzione di permette di ingrandirlo ulteriormente ma senza aumentare la dimensione del testo. Normalmente o tamanho da tela do inventário é ditada pelo tamanho da UI. Isso permite aumentar o tamanho da tela de inventário, mas não aumenta o tamanho da fonte, permitindo que mais linhas sejam visualizadas. - 通常のインベントリは UI の大きさによって表示されます。これはインベントリ UI を大きくできますが、文字は大きくできません。 - 보통 소지품 화면은 사용자 인터페이스 크기에 비례합니다. 이 항목은 소지품의 사용자 인터페이스를 확대를 가능케하면서 글씨는 그대로 냅두게 해줍니다. - 一般来说, 物品清单尺寸是由使用者介面来决定的. 此选项能让你的物品显示清单更大但不会增加字体大小, 此举可增加更多能被显示的描述行数! - 一般來說, 物品清單尺寸是由使用者介面來決定的. 此選項能讓你的物品顯示清單更大但不會增加字體大小, 此舉可增加更多能被顯示的描述行數! Backpacks @@ -43,10 +35,6 @@ Sacs à dos Mochilas Рюкзаки - バックパック - 가방 - 背包 - 背包 Headgear @@ -55,13 +43,9 @@ Hełmy Copricapi Cascos - Couvre-chefs + Couvre-chefs Capacetes Головные уборы - ヘッドギア - 헬멧 - 头盔 - 頭盔 Glasses @@ -73,10 +57,6 @@ Lunettes Óculos Очки - メガネ - 안경 - 眼镜 - 眼鏡 Uniforms @@ -88,10 +68,6 @@ Uniformes Uniformes Униформа - 戦闘服 - 복장 - 服装 - 服裝 Vests @@ -103,10 +79,6 @@ Vestes Coletes Жилеты - ベスト - 조끼 - 背心 - 背心 Grenades @@ -118,10 +90,6 @@ Grenades Granadas Гранаты - 手榴弾 - 수류탄 - 手榴弹 - 手榴彈 Medical @@ -133,10 +101,6 @@ Médical Médico Медицина - 医療 - 의료 - 医疗 - 醫療 - + \ No newline at end of file diff --git a/addons/javelin/CfgEventhandlers.hpp b/addons/javelin/CfgEventhandlers.hpp index 789cfeb05c..7b76e00d43 100644 --- a/addons/javelin/CfgEventhandlers.hpp +++ b/addons/javelin/CfgEventhandlers.hpp @@ -6,13 +6,20 @@ class Extended_PreStart_EventHandlers { }; class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_pre_init)); }; }; class Extended_PostInit_EventHandlers { - class ADDON { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_post_init)); clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit)); }; }; + +class Extended_FiredBIS_EventHandlers { + class All { + ADDON = QUOTE(_this call FUNC(onFired)); + }; +}; diff --git a/addons/javelin/CfgVehicles.hpp b/addons/javelin/CfgVehicles.hpp index 790b802230..a30489ad14 100644 --- a/addons/javelin/CfgVehicles.hpp +++ b/addons/javelin/CfgVehicles.hpp @@ -1,19 +1,19 @@ class CfgVehicles { class LandVehicle; - class StaticWeapon: LandVehicle { + class StaticWeapon : LandVehicle { class Turrets; }; - class StaticMGWeapon: StaticWeapon { - class Turrets: Turrets { + class StaticMGWeapon : StaticWeapon { + class Turrets : Turrets { class MainTurret; }; }; class AT_01_base_F: StaticMGWeapon {}; class B_static_AT_F: AT_01_base_F { - class Turrets: Turrets { - class MainTurret: MainTurret { + class Turrets : Turrets { + class MainTurret : MainTurret { weapons[] = { QGVAR(Titan_Static) }; magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"}; @@ -30,8 +30,8 @@ class CfgVehicles { }; }; class O_static_AT_F: AT_01_base_F { - class Turrets: Turrets { - class MainTurret: MainTurret { + class Turrets : Turrets { + class MainTurret : MainTurret { weapons[] = { QGVAR(Titan_Static) }; magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"}; @@ -48,8 +48,8 @@ class CfgVehicles { }; }; class I_static_AT_F: AT_01_base_F { - class Turrets: Turrets { - class MainTurret: MainTurret { + class Turrets : Turrets { + class MainTurret : MainTurret { weapons[] = { QGVAR(Titan_Static) }; magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"}; diff --git a/addons/javelin/CfgWeapons.hpp b/addons/javelin/CfgWeapons.hpp index e8e5d382b2..45c8c5942c 100644 --- a/addons/javelin/CfgWeapons.hpp +++ b/addons/javelin/CfgWeapons.hpp @@ -2,17 +2,17 @@ class CfgWeapons { class Launcher; class MissileLauncher; - class Launcher_Base_F: Launcher { + class Launcher_Base_F : Launcher { class WeaponSlotsInfo; }; // @TODO: AA by default, motherfuckers - class missiles_titan: MissileLauncher { + class missiles_titan : MissileLauncher { }; - class missiles_titan_at: missiles_titan { }; - class GVAR(Titan_Static): missiles_titan_at { + class missiles_titan_at : missiles_titan { }; + class GVAR(Titan_Static) : missiles_titan_at { GVAR(enabled) = 1; weaponInfoType = "ACE_RscOptics_javelin"; modelOptics = QPATHTOF(data\reticle_titan.p3d); @@ -24,9 +24,9 @@ class CfgWeapons { }; // @TODO: AA by default, motherfuckers - class launch_Titan_base: Launcher_Base_F {}; + class launch_Titan_base : Launcher_Base_F {}; - class launch_Titan_short_base: launch_Titan_base { }; + class launch_Titan_short_base : launch_Titan_base { }; class launch_B_Titan_short_F: launch_Titan_short_base { GVAR(enabled) = 1; @@ -58,6 +58,7 @@ class CfgWeapons { canLock = 0; + lockingTargetSound[] = {"",0,1}; lockedTargetSound[] = {"",0,1}; }; diff --git a/addons/javelin/README.md b/addons/javelin/README.md index ecbf3743b4..37685d9cce 100644 --- a/addons/javelin/README.md +++ b/addons/javelin/README.md @@ -9,4 +9,3 @@ Adds the Javelin AT launcher. The people responsible for merging changes to this component or answering potential questions. - [jaynus](https://github.com/walterpearce) -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/javelin/RscInGameUI.hpp b/addons/javelin/RscInGameUI.hpp index e34630dde3..80e1201682 100644 --- a/addons/javelin/RscInGameUI.hpp +++ b/addons/javelin/RscInGameUI.hpp @@ -1,8 +1,10 @@ class RscOpticsValue; -class RscControlsGroupNoScrollbars; +class RscControlsGroup; class RscPicture; -class RscLine; class RscMapControl; +class VScrollbar; +class HScrollbar; +class RscLine; // Taken from AGM for optics management. @@ -10,24 +12,29 @@ class RscMapControl; class RscInGameUI { class ACE_RscOptics_javelin { idd = 300; - controls[] = { QGVAR(elements_group), "ACE_Targeting", QGVAR(mapHelper) }; - onLoad = QUOTE(with uiNamespace do {ACE_RscOptics_javelin = _this select 0;};); + controls[] = { QGVAR(elements_group), "ACE_Targeting" }; //, "ACE_TargetingConstrains", "ACE_TargetingGate", "ACE_TargetingLines"}; + onLoad = QUOTE(_this call FUNC(onOpticLoad)); + onUnload = QUOTE(_this call FUNC(onOpticUnload)); - class GVAR(mapHelper): RscMapControl { - onDraw = QUOTE(_this call FUNC(mapHelperDraw);); - x = -10; - y = -10; - w = 0; - h = 0; - }; - - class GVAR(elements_group): RscControlsGroupNoScrollbars { - x = "safeZoneX"; - y = "safeZoneY"; - w = "safeZoneW"; - h = "safeZoneH"; + class GVAR(elements_group): RscControlsGroup + { + x = "SafezoneX"; + y = "SafezoneY"; + w = "SafezoneW"; + h = "SafezoneH"; idc = 170; - class Controls { + class VScrollbar { + autoScrollSpeed = -1; + autoScrollDelay = 5; + autoScrollRewind = 0; + color[] = {1,1,1,0}; + width = 0.001; + }; + class HScrollbar { + color[] = {1,1,1,0}; + height = 0.001; + }; + class Controls { class CA_Distance: RscOpticsValue { idc = 151; sizeEx = "0"; @@ -37,12 +44,13 @@ class RscInGameUI { w = 0; h = 0; }; + class GVAR(Day_mode_off): RscPicture { idc = 1001; - x = "(safeZoneX+(safeZoneW -safeZoneH*3/4)/2)+ (0.03/4)*3*safeZoneH - safeZoneX"; - y = "safeZoneY+safeZoneH*0.031 - safeZoneY"; - w = "0.1045752* (((safeZoneW*3)/4)/safeZoneW)/(1/safeZoneH)"; - h = "safeZoneH*0.1045752"; + x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (0.03/4)*3*SafezoneH - SafezoneX"; + y = "SafezoneY+SafezoneH*0.031 - SafezoneY"; + w = "0.1045752* (((SafezoneW*3)/4)/SafezoneW)/(1/SafezoneH)"; + h = "SafezoneH*0.1045752"; colorText[] = {0.2941,0.2941,0.2941,1}; text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\day_co.paa"; }; @@ -50,135 +58,146 @@ class RscInGameUI { idc = 160; colorText[] = {0.2941,0.8745,0.2157,1}; }; - class GVAR(WFOV_mode_off): GVAR(Day_mode_off) { + class CA_Javelin_WFOV_mode_off : GVAR(Day_mode_off) { idc = 1004; - x = "(safeZoneX+(safeZoneW -safeZoneH*3/4)/2)+ (0.307/4)*3*safeZoneH - safeZoneX"; + x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (0.307/4)*3*SafezoneH - SafezoneX"; text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\wfov_co.paa"; }; - class GVAR(WFOV_mode_group): RscControlsGroupNoScrollbars { - x = "safeZoneX"; - y = "safeZoneY"; - w = "safeZoneW"; - h = "safeZoneH"; + class GVAR(WFOV_mode_group): RscControlsGroup { + x = "SafezoneX"; + y = "SafezoneY"; + w = "SafezoneW"; + h = "SafezoneH"; idc = 163; + class VScrollbar { + autoScrollSpeed = -1; + autoScrollDelay = 5; + autoScrollRewind = 0; + color[] = {1,1,1,0}; + width = 0.001; + }; + class HScrollbar { + color[] = {1,1,1,0}; + height = 0.001; + }; class Controls { - class GVAR(WFOV_mode_on): GVAR(WFOV_mode_off) { - idc = -1; - y = "0.031*SafeZoneH - SafezoneY"; - x = "((SafezoneW -SafezoneH*3/4)/2)+ (0.307/4)*3*SafezoneH - SafezoneX"; - colorText[] = {0.2941,0.8745,0.2157,1}; - }; class StadiaL: RscLine { - x = "0.4899*safeZoneW - safeZoneX"; - y = "0.171*safeZoneH - safeZoneY"; + x = "0.4899*SafezoneW - SafezoneX"; + y = "0.171*SafezoneH - SafezoneY"; w = 0; - h = "0.049*safeZoneH"; + h = "0.049*SafezoneH"; colorText[] = {0.2941,0.8745,0.2157,1}; }; class StadiaR: RscLine { - x = "0.5109*safeZoneW- safeZoneX"; - y = "0.171*safeZoneH - safeZoneY"; + x = "0.5109*SafezoneW- SafezoneX"; + y = "0.171*SafezoneH - SafezoneY"; w = 0; - h = "0.049*safeZoneH"; + h = "0.049*SafezoneH"; colorText[] = {0.2941,0.8745,0.2157,1}; }; class BracketL: RscLine { - x = "((safeZoneW -safeZoneH*3/4)/2)+ (0.293/4)*3*safeZoneH - safeZoneX"; - y = "0.4677*safeZoneH - safeZoneY"; + x = "((SafezoneW -SafezoneH*3/4)/2)+ (0.293/4)*3*SafezoneH - SafezoneX"; + y = "0.4677*SafezoneH - SafezoneY"; w = 0; - h = "0.0646*safeZoneH"; + h = "0.0646*SafezoneH"; colorText[] = {0.2941,0.8745,0.2157,1}; }; class BracketR: RscLine { - x = "((safeZoneW -safeZoneH*3/4)/2)+ (0.70/4)*3*safeZoneH - safeZoneX"; - y = "0.4677*safeZoneH - safeZoneY"; + x = "((SafezoneW -SafezoneH*3/4)/2)+ (0.70/4)*3*SafezoneH - SafezoneX"; + y = "0.4677*SafezoneH - SafezoneY"; w = 0; - h = "0.0646*safeZoneH"; + h = "0.0646*SafezoneH"; colorText[] = {0.2941,0.8745,0.2157,1}; }; class BracketT: RscLine { - x = "((safeZoneW -safeZoneH*3/4)/2)+ (0.467/4)*3*safeZoneH - safeZoneX"; - y = "0.3535*safeZoneH - safeZoneY"; - w = "0.065* (((safeZoneW*3)/4)/safeZoneW)/(1/safeZoneH)"; + x = "((SafezoneW -SafezoneH*3/4)/2)+ (0.467/4)*3*SafezoneH - SafezoneX"; + y = "0.3535*SafezoneH - SafezoneY"; + w = "0.065* (((SafezoneW*3)/4)/SafezoneW)/(1/SafezoneH)"; h = 0; colorText[] = {0.2941,0.8745,0.2157,1}; }; class BracketB: RscLine { - x = "((safeZoneW -safeZoneH*3/4)/2)+ (0.467/4)*3*safeZoneH - safeZoneX"; - y = "0.6465*safeZoneH - safeZoneY"; - w = "0.065* (((safeZoneW*3)/4)/safeZoneW)/(1/safeZoneH)"; + x = "((SafezoneW -SafezoneH*3/4)/2)+ (0.467/4)*3*SafezoneH - SafezoneX"; + y = "0.6465*SafezoneH - SafezoneY"; + w = "0.065* (((SafezoneW*3)/4)/SafezoneW)/(1/SafezoneH)"; h = 0; colorText[] = {0.2941,0.8745,0.2157,1}; }; }; }; - class GVAR(NFOV_mode_off): GVAR(Day_mode_off) { + class CA_Javelin_NFOV_mode_off: GVAR(Day_mode_off) { idc = 1003; - x = "(safeZoneX+(safeZoneW -safeZoneH*3/4)/2)+ (0.586/4)*3*safeZoneH - safeZoneX"; + x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (0.586/4)*3*SafezoneH - SafezoneX"; text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\nfov_co.paa"; }; - class GVAR(NFOV_mode_group): RscControlsGroupNoScrollbars { - x = "safeZoneX"; - y = "safeZoneY"; - w = "safeZoneW-safeZoneX"; - h = "safeZoneH-safeZoneY"; + class GVAR(NFOV_mode_group): RscControlsGroup { + x = "SafezoneX"; + y = "SafezoneY"; + w = "SafezoneW-SafezoneX"; + h = "SafezoneH-SafezoneY"; idc = 162; + class VScrollbar { + autoScrollSpeed = -1; + autoScrollDelay = 5; + autoScrollRewind = 0; + color[] = {1,1,1,0}; + width = 0.001; + }; + class HScrollbar { + color[] = {1,1,1,0}; + height = 0.001; + }; class Controls { - class GVAR(NFOV_mode_on): GVAR(NFOV_mode_off) { - idc = -1; - x = "((SafezoneW -SafezoneH*3/4)/2)+ (0.586/4)*3*SafezoneH - SafezoneX"; - y = "0.031*SafeZoneH - SafezoneY"; - colorText[] = {0.2941,0.8745,0.2157,1}; - }; class StadiaL: RscLine { - x = "0.4788*safeZoneW - safeZoneX"; - y = "0.171*safeZoneH - safeZoneY"; + x = "0.4788*SafezoneW - SafezoneX"; + y = "0.171*SafezoneH - SafezoneY"; w = 0; - h = "0.049*safeZoneH"; + h = "0.049*SafezoneH"; colorText[] = {0.2941,0.8745,0.2157,1}; }; class StadiaR: RscLine { - x = "0.5212*safeZoneW - safeZoneX"; - y = "0.171*safeZoneH - safeZoneY"; + x = "0.5212*SafezoneW - SafezoneX"; + y = "0.171*SafezoneH - SafezoneY"; w = 0; - h = "0.049*safeZoneH"; + h = "0.049*SafezoneH"; colorText[] = {0.2941,0.8745,0.2157,1}; }; class LineHL: RscLine { - x = "((safeZoneW -safeZoneH*3/4)/2)+ (0.01/4)*3*safeZoneH - safeZoneX"; - y = "safeZoneH*0.5 - safeZoneY"; - w = "0.29* (((safeZoneW*3)/4)/safeZoneW)/(1/safeZoneH)"; - h = "safeZoneH*0.0"; + x = "((SafezoneW -SafezoneH*3/4)/2)+ (0.01/4)*3*SafezoneH - SafezoneX"; + y = "SafezoneH*0.5 - SafezoneY"; + w = "0.29* (((SafezoneW*3)/4)/SafezoneW)/(1/SafezoneH)"; + h = "SafezoneH*0.0"; colorText[] = {0.2941,0.8745,0.2157,1}; }; class LineHR: RscLine { - x = "((safeZoneW -safeZoneH*3/4)/2)+ (0.695/4)*3*safeZoneH - safeZoneX"; - y = "safeZoneH*0.5 - safeZoneY"; - w = "0.29* (((safeZoneW*3)/4)/safeZoneW)/(1/safeZoneH)"; - h = "safeZoneH*0.0"; + x = "((SafezoneW -SafezoneH*3/4)/2)+ (0.695/4)*3*SafezoneH - SafezoneX"; + y = "SafezoneH*0.5 - SafezoneY"; + w = "0.29* (((SafezoneW*3)/4)/SafezoneW)/(1/SafezoneH)"; + h = "SafezoneH*0.0"; colorText[] = {0.2941,0.8745,0.2157,1}; }; class LineVT: RscLine { - x = "0.5*safeZoneW - safeZoneX"; - y = "0.171*safeZoneH - safeZoneY"; + x = "0.5*SafezoneW - SafezoneX"; + y = "0.171*SafezoneH - SafezoneY"; w = 0; - h = "0.1825*safeZoneH"; + h = "0.1825*SafezoneH"; colorText[] = {0.2941,0.8745,0.2157,1}; }; class LineVB: RscLine { - x = "0.5*safeZoneW - safeZoneX"; - y = "0.6465*safeZoneH - safeZoneY"; + x = "0.5*SafezoneW - SafezoneX"; + y = "0.6465*SafezoneH - SafezoneY"; w = 0; - h = "0.1895*safeZoneH"; + h = "0.1895*SafezoneH"; colorText[] = {0.2941,0.8745,0.2157,1}; }; + }; }; class GVAR(SEEK_off): GVAR(Day_mode_off) { idc = 699000; - x = "(safeZoneX+(safeZoneW -safeZoneH*3/4)/2)+ (0.863/4)*3*safeZoneH - safeZoneX"; + x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (0.863/4)*3*SafezoneH - SafezoneX"; text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\seek_co.paa"; }; class GVAR(SEEK): GVAR(SEEK_off) { @@ -187,8 +206,8 @@ class RscInGameUI { }; class GVAR(Missle_off): GVAR(Day_mode_off) { idc = 1032; - x = "(safeZoneX+(safeZoneW -safeZoneH*3/4)/2)+ (-0.134/4)*3*safeZoneH - safeZoneX"; - y = "(safeZoneY + 0.208*safeZoneH) - safeZoneY"; + x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (-0.134/4)*3*SafezoneH - SafezoneX"; + y = "(SafezoneY + 0.208*SafezoneH) - SafezoneY"; colorText[] = {0.2941,0.2941,0.2941,1}; text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\missle_co.paa"; }; @@ -198,32 +217,32 @@ class RscInGameUI { }; class GVAR(CLU_off): GVAR(Missle_off) { idc = 1027; - y = "(safeZoneY + 0.436*safeZoneH) - safeZoneY"; + y = "(SafezoneY + 0.436*SafezoneH) - SafezoneY"; text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\clu_co.paa"; }; class GVAR(HangFire_off): GVAR(Missle_off) { idc = 1028; - y = "(safeZoneY + 0.669*safeZoneH) - safeZoneY"; + y = "(SafezoneY + 0.669*SafezoneH) - SafezoneY"; text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\hangfire_co.paa"; }; class GVAR(TOP_off): GVAR(Day_mode_off) { idc = 699001; - x = "(safeZoneX+(safeZoneW -safeZoneH*3/4)/2)+ (1.023/4)*3*safeZoneH - safeZoneX"; - y = "(safeZoneY + 0.208*safeZoneH) - safeZoneY"; + x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (1.023/4)*3*SafezoneH - SafezoneX"; + y = "(SafezoneY + 0.208*SafezoneH) - SafezoneY"; text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\top_co.paa"; colorText[] = {0.2941,0.8745,0.2157,1}; }; class GVAR(DIR): GVAR(Day_mode) { idc = 699002; - x = "(safeZoneX+(safeZoneW -safeZoneH*3/4)/2)+ (1.023/4)*3*safeZoneH - safeZoneX"; - y = "(safeZoneY + 0.436*safeZoneH) - safeZoneY"; + x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (1.023/4)*3*SafezoneH - SafezoneX"; + y = "(SafezoneY + 0.436*SafezoneH) - SafezoneY"; text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\dir_co.paa"; colorText[] = {0.2941,0.2941,0.2941,1}; }; class GVAR(FLTR_mode_off): GVAR(Day_mode_off) { idc = 1002; - x = "(safeZoneX+(safeZoneW -safeZoneH*3/4)/2)+ (1.023/4)*3*safeZoneH - safeZoneX"; - y = "(safeZoneY + 0.669*safeZoneH) - safeZoneY"; + x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (1.023/4)*3*SafezoneH - SafezoneX"; + y = "(SafezoneY + 0.669*SafezoneH) - SafezoneY"; text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\fltr_co.paa"; }; class GVAR(FLTR_mode): GVAR(FLTR_mode_off) { @@ -232,139 +251,151 @@ class RscInGameUI { }; }; }; - class ACE_Targeting: RscControlsGroupNoScrollbars { + class ACE_Targeting : RscControlsGroup { idc = 6999; - x = "safeZoneX"; - y = "safeZoneY"; - w = "safeZoneW"; - h = "safeZoneH"; - enabled = 0; - show = 0; + + x = "SafezoneX"; + y = "SafezoneY"; + w = "SafezoneW"; + h = "SafezoneH"; + + enabled = 0; class Controls { - class ACE_TargetingConstrains: RscControlsGroupNoScrollbars { - x = "safeZoneX"; - y = "safeZoneY"; - w = "safeZoneW-safeZoneX"; - h = "safeZoneH-safeZoneY"; + class ACE_TargetingConstrains: RscControlsGroup { + x = "SafezoneX"; + y = "SafezoneY"; + w = "SafezoneW-SafezoneX"; + h = "SafezoneH-SafezoneY"; enabled = 0; + class VScrollbar { + autoScrollSpeed = -1; + autoScrollDelay = 5; + autoScrollRewind = 0; + color[] = {1,1,1,0}; + width = 0.001; + }; + class HScrollbar { + color[] = {1,1,1,0}; + height = 0.001; + }; class Controls { class Top: RscPicture { idc = 699101; text = "#(argb,8,8,3)color(1,1,1,1)"; colorText[] = {0.2941,0.2941,0.2941,1}; - x = "((safeZoneW -(3/4)*safeZoneH)/2) - safeZoneX"; - y = "0.15*safeZoneH-safeZoneY"; - w = "(3/4)*safeZoneH"; - h = "0.21*safeZoneH"; + x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX"; + y = "0.15*SafezoneH-SafezoneY"; + w = "(3/4)*SafezoneH"; + h = "0.21*SafezoneH"; }; class Bottom: Top { idc = 699102; - y = "0.64*safeZoneH-safeZoneY"; + y = "0.64*SafezoneH-SafezoneY"; }; class Left: Top { idc = 699103; - x = "((safeZoneW -(3/4)*safeZoneH)/2) - safeZoneX"; - y = "0.36*safeZoneH-safeZoneY"; - w = "0.31*(3/4)*safeZoneH"; - h = "0.28*safeZoneH"; + x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX"; + y = "0.36*SafezoneH-SafezoneY"; + w = "0.31*(3/4)*SafezoneH"; + h = "0.28*SafezoneH"; }; class Right: Left { idc = 699104; - x = "((safeZoneW -(3/4)*safeZoneH)/2)+ 0.69*(3/4)*safeZoneH - safeZoneX"; + x = "((SafezoneW -(3/4)*SafezoneH)/2)+ 0.69*(3/4)*SafezoneH - SafezoneX"; }; class OpticsBorders: RscPicture { idc = 699105; text = QPATHTOF(data\javelin_ui_border_ca.paa); colorText[] = {0,0,0,1}; - x = "((safeZoneW -(3.1/4)*safeZoneH)/2) - safeZoneX"; - y = "0.15*safeZoneH-safeZoneY"; - w = "(3.1/4)*safeZoneH"; - h = "0.7*safeZoneH"; + x = "((SafezoneW -(3.1/4)*SafezoneH)/2) - SafezoneX"; + y = "0.15*SafezoneH-SafezoneY"; + w = "(3.1/4)*SafezoneH"; + h = "0.7*SafezoneH"; }; }; }; - class ACE_TargetingGate: ACE_TargetingConstrains { + class ACE_TargetingGate : ACE_TargetingConstrains { idc = 699200; class Controls { class TargetingGateTL: ACE_TargetingConstrains { - x = "((safeZoneW -(3/4)*safeZoneH)/2) - safeZoneX"; - y = "0.15*safeZoneH - safeZoneY"; + x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX"; + y = "0.15*SafezoneH - SafezoneY"; idc = 699201; class Controls { class LineH: RscLine { idc = 699210; x = "0"; y = "0"; - w = "0.025*(3/4)*safeZoneH"; + w = "0.025*(3/4)*SafezoneH"; h = "0"; colorText[] = {0.8745,0.8745,0.8745,1}; }; class LineV: LineH { idc = 699211; w = "0"; - h = "0.025*safeZoneH"; + h = "0.025*SafezoneH"; }; }; }; class TargetingGateTR: TargetingGateTL { - x = "((safeZoneW -(3/4)*safeZoneH)/2) - safeZoneX + 0.975*(3/4)*safeZoneH"; - y = "0.15*safeZoneH - safeZoneY"; + x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX + 0.975*(3/4)*SafezoneH"; + y = "0.15*SafezoneH - SafezoneY"; idc = 699202; class Controls { class LineH: RscLine { idc = 699220; x = "0"; y = "0"; - w = "0.025*(3/4)*safeZoneH"; + w = "0.025*(3/4)*SafezoneH"; h = "0"; colorText[] = {0.8745,0.8745,0.8745,1}; }; class LineV: LineH { idc = 699221; - x = "0.025*(3/4)*safeZoneH"; + x = "0.025*(3/4)*SafezoneH"; w = "0"; - h = "0.025*safeZoneH"; + h = "0.025*SafezoneH"; }; }; }; class TargetingGateBL: TargetingGateTL { - x = "((safeZoneW -(3/4)*safeZoneH)/2) - safeZoneX"; - y = "0.825*safeZoneH - safeZoneY"; + x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX"; + y = "0.825*SafezoneH - SafezoneY"; idc = 699203; class Controls { class LineH: RscLine { x = "0"; - y = "0.025*safeZoneH"; - w = "0.025*(3/4)*safeZoneH"; + y = "0.025*SafezoneH"; + w = "0.025*(3/4)*SafezoneH"; h = "0"; colorText[] = {0.8745,0.8745,0.8745,1}; }; class LineV: LineH { y = "0"; w = "0"; - h = "0.025*safeZoneH"; + h = "0.025*SafezoneH"; }; }; }; class TargetingGateBR: TargetingGateBL { - x = "((safeZoneW -(3/4)*safeZoneH)/2) - safeZoneX + 0.975*(3/4)*safeZoneH"; - y = "0.825*safeZoneH - safeZoneY"; + x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX + 0.975*(3/4)*SafezoneH"; + y = "0.825*SafezoneH - SafezoneY"; idc = 699204; class Controls { class LineH: RscLine { x = "0"; - y = "0.025*safeZoneH"; - w = "0.025*(3/4)*safeZoneH"; + y = "0.025*SafezoneH"; + w = "0.025*(3/4)*SafezoneH"; h = "0"; colorText[] = {0.8745,0.8745,0.8745,1}; }; class LineV: LineH { - x = "0.025*(3/4)*safeZoneH"; + x = "0.025*(3/4)*SafezoneH"; y = "0"; w = "0"; - h = "0.025*safeZoneH"; + h = "0.025*SafezoneH"; }; }; }; @@ -377,18 +408,18 @@ class RscInGameUI { class Controls { class LineH: RscLine { idc = 699301; - x = "((safeZoneW -(3/4)*safeZoneH)/2) - safeZoneX"; - y = "0.5*safeZoneH - safeZoneY"; - w = "(3/4)*safeZoneH"; + x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX"; + y = "0.5*SafezoneH - SafezoneY"; + w = "(3/4)*SafezoneH"; h = "0"; colorText[] = {0.8745,0.8745,0.8745,1}; }; class LineV: RscLine { idc = 699302; - x = "0.5*safeZoneW - safeZoneX"; - y = "0.15*safeZoneH - safeZoneY"; + x = "0.5*SafezoneW - SafezoneX"; + y = "0.15*SafezoneH - SafezoneY"; w = "0"; - h = "0.7*safeZoneH"; + h = "0.7*SafezoneH"; colorText[] = {0.8745,0.8745,0.8745,1}; }; }; @@ -420,4 +451,4 @@ ACE_Titan_TOP_off: 1006 ACE_Titan_DIR: 1007 ACE_Titan_FLTR_mode_off: 1002 ACE_Titan_FLTR_mode: 161 - */ +*/ diff --git a/addons/javelin/XEH_PREP.hpp b/addons/javelin/XEH_PREP.hpp index 76d658d90d..fe9bbc553b 100644 --- a/addons/javelin/XEH_PREP.hpp +++ b/addons/javelin/XEH_PREP.hpp @@ -1,5 +1,11 @@ -PREP(getTarget); -PREP(mapHelperDraw); -PREP(onOpticDraw); +PREP(lockKeyDown); +PREP(lockKeyUp); + +PREP(cycleFireMode); PREP(showFireMode); + +PREP(onFired); +PREP(onOpticLoad); +PREP(onOpticDraw); +PREP(onOpticUnload); diff --git a/addons/javelin/XEH_clientInit.sqf b/addons/javelin/XEH_clientInit.sqf index 66d645968f..1286be3697 100644 --- a/addons/javelin/XEH_clientInit.sqf +++ b/addons/javelin/XEH_clientInit.sqf @@ -1,6 +1,5 @@ -// #define DEBUG_MODE_FULL #include "script_component.hpp" if (!hasInterface) exitWith {}; -#include "initKeybinds.sqf" +#include "initKeybinds.sqf" \ No newline at end of file diff --git a/addons/nlaw/XEH_preStart.sqf b/addons/javelin/XEH_post_init.sqf similarity index 57% rename from addons/nlaw/XEH_preStart.sqf rename to addons/javelin/XEH_post_init.sqf index 022888575e..6eccf9d1dd 100644 --- a/addons/nlaw/XEH_preStart.sqf +++ b/addons/javelin/XEH_post_init.sqf @@ -1,3 +1,2 @@ #include "script_component.hpp" -#include "XEH_PREP.hpp" diff --git a/addons/javelin/XEH_preInit.sqf b/addons/javelin/XEH_pre_init.sqf similarity index 55% rename from addons/javelin/XEH_preInit.sqf rename to addons/javelin/XEH_pre_init.sqf index b404d35889..27cbb54cfc 100644 --- a/addons/javelin/XEH_preInit.sqf +++ b/addons/javelin/XEH_pre_init.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(isLockKeyDown) = false; GVAR(pfehID) = -1; @@ -12,13 +10,13 @@ GVAR(pfehID) = -1; DFUNC(disableFire) = { params ["_firedEH"]; - if (_firedEH < 0 && {difficulty > 0}) then { + if(_firedEH < 0 && {difficulty > 0}) then { _firedEH = [ACE_player, "DefaultAction", {true}, { - private _canFire = (_this select 1) getVariable ["ace_missileguidance_target", nil]; - if (!isNil "_canFire") exitWith { false }; + _canFire = (_this select 1) getVariable["ace_missileguidance_target", nil]; + if(!isNil "_canFire") exitWith { false }; true }] call EFUNC(common,addActionEventHandler); - TRACE_1("Locking Fire Button",_firedEH); + TRACE_1("added",_firedEH); }; _firedEH @@ -26,8 +24,8 @@ DFUNC(disableFire) = { DFUNC(enableFire) = { params ["_firedEH"]; - if (_firedEH >= 0 && {difficulty > 0}) then { - TRACE_1("Unlocking Fire Button",_firedEH); + if(_firedEH >= 0 && {difficulty > 0}) then { + TRACE_1("removing",_firedEH); [ACE_player, "DefaultAction", _firedEH] call EFUNC(common,removeActionEventHandler); }; -1 diff --git a/addons/javelin/functions/fnc_cycleFireMode.sqf b/addons/javelin/functions/fnc_cycleFireMode.sqf new file mode 100644 index 0000000000..50609b3468 --- /dev/null +++ b/addons/javelin/functions/fnc_cycleFireMode.sqf @@ -0,0 +1,13 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" +TRACE_1("enter", _this); + +private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player}; +private _currentFireMode = _currentShooter getVariable["ace_missileguidance_attackProfile", "JAV_TOP"]; + +if(_currentFireMode == "JAV_DIR") then { + _currentFireMode = "JAV_TOP"; +} else { + _currentFireMode = "JAV_DIR"; +}; +_currentShooter setVariable["ace_missileguidance_attackProfile", _currentFireMode, false]; diff --git a/addons/javelin/functions/fnc_getTarget.sqf b/addons/javelin/functions/fnc_getTarget.sqf deleted file mode 100644 index 49748e2883..0000000000 --- a/addons/javelin/functions/fnc_getTarget.sqf +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Author: PabstMirror - * Find a target within the optic range - * - * Arguments: - * 0: Last Target (seeds the scan) - * 1: Max Range (meters) - * - * Return Value: - * Target - * - * Example: - * [bob, 5] call ace_javelin_fnc_getTarget - * - * Public: No - */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - -params ["_lastTarget", "_maxRange"]; - -scopeName "main"; - -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 { - private _aimASL = aimPos _lastTarget; - - if ((_viewASL vectorDistance _aimASL) > _maxRange) exitWith {}; - if ((acos ((_viewASL vectorFromTo _aimASL) vectorDotProduct _viewDir)) > 0.6) exitWith {}; - - private _relAngle = (_lastTarget getRelDir _viewASL); - - for "_xOffset" from -2.5 to 2.5 step 0.5 do { - for "_yOffset" from -2 to 1 step 0.5 do { - // Find test points in the model based on the angle that we are viewing it from (not true 3d projection, but not bad) - private _testPosASL = AGLtoASL (_lastTarget modelToWorld [_xOffset * - cos _relAngle, _xOffset * sin _relAngle, _yOffset]); - 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,1,1], [1,0,1,1]] select (count _intersectionsToCursorTarget), (ASLtoAGL _testPosASL), 0.25, 0.25, 0, "", 0.5, 0.025, "TahomaB"]; - if (!(_intersectionsToCursorTarget isEqualTo [])) then { - (_intersectionsToCursorTarget select 0) params ["", "", "_intersectedObject"]; - if (_intersectedObject isKindOf "AllVehicles") then { - _intersectedObject breakOut "main"; - }; - }; - }; - }; -}; - -// Try cursorObject/Target as they are very fast -if ((cursorObject isKindOf "AllVehicles") && {(cursorObject distance ace_player) < _maxRange}) then { - private _intersectionsToCursorTarget = lineIntersectsSurfaces [_viewASL, aimPos cursorObject, ace_player, cursorObject, true, 1]; - if (_intersectionsToCursorTarget isEqualTo []) then { - cursorObject breakOut "main"; - }; -}; -if ((cursorTarget isKindOf "AllVehicles") && {(cursorObject distance ace_player) < _maxRange}) then { - private _intersectionsToCursorTarget = lineIntersectsSurfaces [_viewASL, aimPos cursorTarget, ace_player, cursorTarget, true, 1]; - if (_intersectionsToCursorTarget isEqualTo []) then { - cursorTarget breakOut "main"; - }; -}; - -// 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 _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 isEqualTo [])) then { - (_intersectionsToCursorTarget select 0) params ["", "", "_intersectedObject"]; - if (_intersectedObject isKindOf "AllVehicles") then { - _intersectedObject breakOut "main"; - }; - }; - }; -}; - -objNull diff --git a/addons/javelin/functions/fnc_lockKeyDown.sqf b/addons/javelin/functions/fnc_lockKeyDown.sqf new file mode 100644 index 0000000000..3eabbd9c28 --- /dev/null +++ b/addons/javelin/functions/fnc_lockKeyDown.sqf @@ -0,0 +1,3 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" +TRACE_1("enter", _this); \ No newline at end of file diff --git a/addons/javelin/functions/fnc_lockKeyUp.sqf b/addons/javelin/functions/fnc_lockKeyUp.sqf new file mode 100644 index 0000000000..3eabbd9c28 --- /dev/null +++ b/addons/javelin/functions/fnc_lockKeyUp.sqf @@ -0,0 +1,3 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" +TRACE_1("enter", _this); \ No newline at end of file diff --git a/addons/javelin/functions/fnc_mapHelperDraw.sqf b/addons/javelin/functions/fnc_mapHelperDraw.sqf deleted file mode 100644 index 20ec3ab349..0000000000 --- a/addons/javelin/functions/fnc_mapHelperDraw.sqf +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Author: PabstMirror - * Handles the map helper's draw event - * Resets arguments if not run recently - * And starts a watchdog to detect when weapon display unloaded - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ace_javelin_fnc_mapHelperDraw - * - * Public: No - */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - -if (isNil QGVAR(arguments)) then { - TRACE_1("Starting optic draw", _this); - - // reset shooter var: - private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player}; - _currentShooter setVariable ["ace_missileguidance_target", nil, false]; - - GVAR(arguments) = [ - diag_frameno, // Last run frame - objNull, // currentTargetObject - 0, // Lock Start Time - 0, // Next Sound timer - -1, // _fireDisabledEH - 0 // _nextTargetScan - ]; - - // Start up a watchdog for when the display is no longer shown (but might not be unloaded or null) - [{ - if (isNull (uiNamespace getVariable ["ACE_RscOptics_javelin", displayNull])) exitWith {true}; - GVAR(arguments) params ["_lastRunFrame"]; - (diag_frameno < _lastRunFrame) || {diag_frameno > (_lastRunFrame + 1)} - }, { - TRACE_1("old/null display - ending optic draw",_this); - private _fireDisabledEH = GVAR(arguments) param [4, -1]; - [_fireDisabledEH] call FUNC(enableFire); - GVAR(arguments) = nil; - }, []] call CBA_fnc_waitUntilAndExecute; -}; - -BEGIN_COUNTER(onOpticDraw); -GVAR(arguments) call FUNC(onOpticDraw); -END_COUNTER(onOpticDraw); diff --git a/addons/javelin/functions/fnc_onFired.sqf b/addons/javelin/functions/fnc_onFired.sqf new file mode 100644 index 0000000000..220ddc37f0 --- /dev/null +++ b/addons/javelin/functions/fnc_onFired.sqf @@ -0,0 +1,15 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +PARAMS_2(_shooter,_weapon); + +// Bail on not missile or javelin PFEH not running +if ((_shooter != ACE_player) || {(GVAR(pfehID) == -1)}) exitWith { false }; + +private _configs = configProperties [configFile >> "CfgWeapons" >> _weapon, QUOTE(configName _x == QUOTE(QGVAR(enabled))), false]; +if (((count _configs) < 1) || {(getNumber (_configs select 0)) != 1}) exitWith {}; + +__JavelinIGUITargeting ctrlShow false; +__JavelinIGUITargetingGate ctrlShow false; +__JavelinIGUITargetingLines ctrlShow false; +__JavelinIGUITargetingConstraints ctrlShow false; diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf index 8a473669f9..dede3ae69c 100644 --- a/addons/javelin/functions/fnc_onOpticDraw.sqf +++ b/addons/javelin/functions/fnc_onOpticDraw.sqf @@ -1,67 +1,69 @@ -/* - * Author: jaynus, PabstMirror - * Main loop, handles scaning for targets and drawing the javelin optic - * - * Arguments: - * 0: Last run frame - * 0: Current target (what we locked last run) - * 0: Lock start time (cba mission time) - * 0: Next sound play time (ticktime) - * 0: Next target scan (ticktime) - * - * Return Value: - * None - * - * Example: - * [] call ace_javelin_fnc_mapHelperDraw - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" +TRACE_1("enter", _this); -// TRACE_1("onOpticDraw",diag_frameno); +#define __TRACKINTERVAL 0 // how frequent the check should be. +#define __LOCKONTIME 3 // Lock on won't occur sooner -#define __TRACKINTERVAL 0 // how frequent the ui update should be. -#define __SCANNTERVAL 0.05 // how frequent the target scan check should be. -#define __LOCKONTIME 3 // Lock on won't occur sooner +private ["_apos", "_aposX", "_aposY", "_args", "_boundsInput", "_bpos", "_canFire", "_constraintBottom"]; +private ["_constraintLeft", "_constraintRight", "_constraintTop", "_currentTarget", "_fireDisabledEH"]; +private ["_firedEH", "_fov", "_lastTick", "_lockTime", "_maxX", "_maxY", "_minX", "_minY", "_newTarget"]; +private ["_offsetX", "_offsetY", "_pos", "_randomLockInterval", "_randomPosWithinBounds", "_range"]; +private ["_runTime", "_soundTime", "_targetArray", "_zamerny", "_currentShooter"]; + +_currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player}; + +#define __OffsetX ((ctrlPosition __JavelinIGUITargetingLineV) select 0) - 0.5 +#define __OffsetY ((ctrlPosition __JavelinIGUITargetingLineH) select 1) - 0.5 + +// Reset arguments if we havnt rendered in over a second +_args = uiNamespace getVariable[QGVAR(arguments), [] ]; +if( (count _args) > 0) then { + _lastTick = _args select 0; + if(diag_tickTime - _lastTick > 1) then { + [] call FUNC(onOpticLoad); + }; +}; + +TRACE_1("Running", "Running"); // Pull the arguments -params ["_lastRunFrame", "_currentTarget", "_lockStartTime", "_soundNextPlayTime", "_fireDisabledEH", "_nextTargetScan"]; +_currentTarget = _args select 1; +_runTime = _args select 2; +_lockTime = _args select 3; +_soundTime = _args select 4; +_randomLockInterval = _args select 5; +_fireDisabledEH = _args select 6; -// Get shooter info -private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player}; -private _currentWeapon = currentWeapon _currentShooter; -private _currentMagazine = currentMagazine _currentShooter; - -// Get weapon / ammo configs -private _ammoCount = _currentShooter ammo _currentWeapon; -private _weaponConfig = configProperties [configFile >> "CfgWeapons" >> _currentWeapon, QUOTE(configName _x == QUOTE(QGVAR(enabled))), false]; -private _ammoConfig = if (_currentMagazine != "") then { - private _ammoType = getText (configFile >> "CfgMagazines" >> _currentMagazine >> "ammo"); - configProperties [(configFile >> "CfgAmmo" >> _ammoType), "(configName _x) == 'ace_missileguidance'", false]; +private ["_ammo", "_magazineConfig", "_weaponConfig"]; +_weaponConfig = configProperties [configFile >> "CfgWeapons" >> (currentWeapon _currentShooter), QUOTE(configName _x == QUOTE(QGVAR(enabled))), false]; +_magazineConfig = if ((currentMagazine _currentShooter) != "") then { + _ammo = getText (configFile >> "CfgMagazines" >> (currentMagazine _currentShooter) >> "ammo"); + configProperties [(configFile >> "CfgAmmo" >> _ammo), "(configName _x) == 'ace_missileguidance'", false]; } else { [] }; -// Check if loaded and javelin enabled for wepaon and missile guidance enabled for loaded ammo -if ((_ammoCount == 0) || // No ammo loaded - {(count _weaponConfig) < 1} || {(getNumber (_weaponConfig select 0)) != 1} || // Not enabled for weapon - {(count _ammoConfig) < 1} || {(getNumber ((_ammoConfig select 0) >> "enabled")) != 1} // Not enabled for ammo - ) exitWith { - +//If weapon does not have "javelin enabled", then exit PFEH +if (((count _weaponConfig) < 1) || {(getNumber (_weaponConfig select 0)) != 1}) exitWith { __JavelinIGUITargeting ctrlShow false; - __JavelinIGUISeek ctrlSetTextColor __ColorGray; + __JavelinIGUITargetingGate ctrlShow false; + __JavelinIGUITargetingLines ctrlShow false; + __JavelinIGUITargetingConstraints ctrlShow false; - _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire); - _this set [0, diag_frameno]; - _this set [4, _fireDisabledEH]; + if(!isNil "_fireDisabledEH") then { + _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire); + }; + + [(_this select 1)] call CBA_fnc_removePerFrameHandler; + GVAR(pfehID) = -1; }; +// Find a target within the optic range +_newTarget = objNull; -// Bail on fast movement (keep it steady) -if ((velocity ACE_player) distance [0,0,0] > 0.75 && {cameraView == "GUNNER"} && {cameraOn == ACE_player}) exitWith { - TRACE_1("exiting gunner because movement",velocity ACE_player); +// Bail on fast movement +if ((velocity ACE_player) distance [0,0,0] > 0.5 && {cameraView == "GUNNER"} && {cameraOn == ACE_player}) exitWith { // keep it steady. ACE_player switchCamera "INTERNAL"; if (player != ACE_player) then { TRACE_2("Zeus, manually reseting RC after switchCamera",player,ACE_player); @@ -69,122 +71,222 @@ if ((velocity ACE_player) distance [0,0,0] > 0.75 && {cameraView == "GUNNER"} && }; }; -// Refresh the firemode (top/dir) +// Refresh the firemode [] call FUNC(showFireMode); -// Get UI constants -private _offsetX = 0.5 * safeZoneW - safeZoneX - 0.5; -private _offsetY = 0.5 * safeZoneH - safeZoneY - 0.5; - -private _newTarget = objNull; -if (GVAR(isLockKeyDown) && {cameraView == "GUNNER"} && {(currentVisionMode ACE_player) == 2}) then { - // Attempting to lock; getTarget can be expensive so it's rate is limited - if (diag_tickTime > _nextTargetScan) then { - BEGIN_COUNTER(getTarget); - _newTarget = [_currentTarget, 2500, 0.6] call FUNC(getTarget); - END_COUNTER(getTarget); - _nextTargetScan = diag_tickTime + __SCANNTERVAL; - } else { - _newTarget = _currentTarget; - }; - - // Show gate box - private _boundsInput = if (_currentTarget isKindOf "CAManBase") then { - [_currentTarget,[-0.5,-0.5,-0.25],[0,0,0]]; - } else { - [_currentTarget,[-1,-1,-1],_currentTarget selectionPosition "zamerny"]; - }; - - private _bpos = _boundsInput call EFUNC(common,worldToScreenBounds); - - private _lockTime = if (isNull _currentTarget) then {0} else {CBA_missionTime - _lockStartTime}; - private _minX = ((linearConversion [1, (__LOCKONTIME - 0.5), _lockTime, 0.5 - 0.075*safeZoneW, (_bpos select 0), true]) + _offsetX) max __ConstraintLeft; - private _minY = ((linearConversion [1, (__LOCKONTIME - 0.5), _lockTime, 0.5 - 0.075*safeZoneH, (_bpos select 1), true]) + _offsetY) max __ConstraintTop; - private _maxX = (((linearConversion [1, (__LOCKONTIME - 0.5), _lockTime, 0.5 + 0.075*safeZoneW, (_bpos select 2), true]) + _offsetX) min __ConstraintRight) - (0.025 * (3 / 4) * safeZoneH); - private _maxY = (((linearConversion [1, (__LOCKONTIME - 0.5), _lockTime, 0.5 + 0.075*safeZoneH, (_bpos select 3), true]) + _offsetY) min __ConstraintBottom) - (0.025 * safeZoneH); - - // TRACE_3("",_boundsInput,_bpos,_lockTime); - // TRACE_4("",_minX,_maxX,_minY,_maxY); - - __JavelinIGUITargetingGateTL ctrlSetPosition [_minX, _minY]; - __JavelinIGUITargetingGateTR ctrlSetPosition [_maxX, _minY]; - __JavelinIGUITargetingGateBL ctrlSetPosition [_minX, _maxY]; - __JavelinIGUITargetingGateBR ctrlSetPosition [_maxX, _maxY]; - {_x ctrlCommit __TRACKINTERVAL} forEach [__JavelinIGUITargetingGateTL, __JavelinIGUITargetingGateTR, __JavelinIGUITargetingGateBL, __JavelinIGUITargetingGateBR]; - - __JavelinIGUITargeting ctrlShow true; - __JavelinIGUITargetingGate ctrlShow true; -} else { - // Not trying to lock +_ammo = _currentShooter ammo (currentWeapon _currentShooter); +// not loaded or not "javelin enabled" for magazine, hide targeting and enable firing +if ((_ammo == 0) || {(count _magazineConfig) < 1} || {(getNumber ((_magazineConfig select 0) >> "enabled")) != 1}) exitWith { __JavelinIGUITargeting ctrlShow false; __JavelinIGUITargetingGate ctrlShow false; __JavelinIGUITargetingLines ctrlShow false; + __JavelinIGUITargetingConstraints ctrlShow false; + + if(!isNil "_fireDisabledEH") then { + _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire); + }; +}; + +_range = parseNumber (ctrlText __JavelinIGUIRangefinder); +TRACE_1("Viewing range", _range); +if (_range > 50 && {_range < 2500}) then { + _pos = positionCameraToWorld [0,0,_range]; + _targetArray = _pos nearEntities ["AllVehicles", _range/100]; + TRACE_1("Searching at range", _targetArray); + if (count (_targetArray) > 0) then { + _newTarget = _targetArray select 0; + }; +}; + +if ((isNull _newTarget) && {cursorObject isKindOf "AllVehicles"}) then { + private _intersectionsToCursorTarget = lineIntersectsSurfaces [(AGLtoASL positionCameraToWorld [0,0,0]), aimPos cursorObject, ace_player, cursorObject, true, 1]; + if (_intersectionsToCursorTarget isEqualTo []) then { + _newTarget = cursorObject; + }; +}; +if ((isNull _newTarget) && {cursorTarget isKindOf "AllVehicles"}) then { + private _intersectionsToCursorTarget = lineIntersectsSurfaces [(AGLtoASL positionCameraToWorld [0,0,0]), aimPos cursorTarget, ace_player, cursorTarget, true, 1]; + if (_intersectionsToCursorTarget isEqualTo []) then { + _newTarget = cursorTarget; + }; +}; + +// Create constants +_constraintTop = __ConstraintTop; +_constraintLeft = __ConstraintLeft; +_constraintBottom = __ConstraintBottom; +_constraintRight = __ConstraintRight; + +_offsetX = __OffsetX; +_offsetY = __OffsetY; + +__JavelinIGUITargeting ctrlShow true; +__JavelinIGUITargetingConstrains ctrlShow true; + +_zamerny = _currentTarget selectionPosition (["zamerny", "body"] select (_currentTarget isKindOf "CAManBase")); +_randomPosWithinBounds = [(_zamerny select 0) + 1 - (random 2.0),(_zamerny select 1) + 1 - (random 2.0),(_zamerny select 2) + 0.5 - (random 1.0)]; + +_apos = worldToScreen (_currentTarget modelToWorld _randomPosWithinBounds); + +_aposX = 0; +_aposY = 0; +if (count _apos < 2) then { + _aposX = 1; + _aposY = 0; +} else { + _aposX = (_apos select 0) + _offsetX; + _aposY = (_apos select 1) + _offsetY; +}; + +if((call CBA_fnc_getFoV) select 1 > 9) then { + __JavelinIGUINFOV ctrlSetTextColor __ColorGreen; + __JavelinIGUIWFOV ctrlSetTextColor __ColorGray; +} else { + __JavelinIGUINFOV ctrlSetTextColor __ColorGray; + __JavelinIGUIWFOV ctrlSetTextColor __ColorGreen; }; if (isNull _newTarget) then { - // No target found + // No targets found _currentTarget = objNull; - _lockStartTime = 0; - __JavelinIGUISeek ctrlSetTextColor __ColorGray; - _currentShooter setVariable ["ace_missileguidance_target", nil, false]; + _lockTime = 0; + __JavelinIGUISeek ctrlSetTextColor __ColorGray; + __JavelinIGUITargeting ctrlShow false; + __JavelinIGUITargetingGate ctrlShow false; __JavelinIGUITargetingLines ctrlShow false; - + __JavelinIGUITargetingConstraints ctrlShow false; + + _currentShooter setVariable ["ace_missileguidance_target",nil, false]; + // Disallow fire _fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire); } else { - if ((!isNull _newTarget) && {_currentTarget != _newTarget}) then { - TRACE_1("New Target, reseting locking", _newTarget); - _lockStartTime = CBA_missionTime; - _currentTarget = _newTarget; - }; + _fov = [] call CBA_fnc_getFoV; + TRACE_1("FOV", _fov); + if (_newTarget distance ACE_player < 2500 + && {(call CBA_fnc_getFoV) select 1 > 9} + && { (currentVisionMode ACE_player == 2)} + && GVAR(isLockKeyDown) + ) then { + // Lock on after 3 seconds + if(_currentTarget != _newTarget) then { + TRACE_1("New Target, reseting locking", _newTarget); + _lockTime = diag_tickTime; + _currentTarget = _newTarget; - if ((CBA_missionTime - _lockStartTime) > __LOCKONTIME) then { // Lock on after 3 seconds - TRACE_2("LOCKED!", _currentTarget, _lockStartTime); - __JavelinIGUISeek ctrlSetTextColor __ColorGreen; - __JavelinIGUITargetingLines ctrlShow true; + playSound "ACE_Javelin_Locking"; + } else { + if(diag_tickTime - _lockTime > __LOCKONTIME + _randomLockInterval) then { + TRACE_2("LOCKED!", _currentTarget, _lockTime); - // Move target marker (the crosshair) to aimpoint on the target - private _aimPointOnTarget = _currentTarget selectionPosition (["zamerny", "body"] select (_currentTarget isKindOf "CAManBase")); - (worldToScreen (_currentTarget modelToWorld _aimPointOnTarget)) params [["_aposX", 0.5], ["_aposY", 0.5]]; - private _ctrlPos = ctrlPosition __JavelinIGUITargetingLineV; - _ctrlPos set [0, _aposX + _offsetX]; - __JavelinIGUITargetingLineV ctrlSetPosition _ctrlPos; - __JavelinIGUITargetingLineV ctrlCommit __TRACKINTERVAL; - _ctrlPos = ctrlPosition __JavelinIGUITargetingLineH; - _ctrlPos set [1, _aposY + _offsetY]; - __JavelinIGUITargetingLineH ctrlSetPosition _ctrlPos; - __JavelinIGUITargetingLineH ctrlCommit __TRACKINTERVAL; + __JavelinIGUISeek ctrlSetTextColor __ColorGreen; - _currentShooter setVariable ["ace_missileguidance_target", _currentTarget, false]; + __JavelinIGUITargeting ctrlShow true; + __JavelinIGUITargetingConstrains ctrlShow false; + __JavelinIGUITargetingGate ctrlShow true; + __JavelinIGUITargetingLines ctrlShow true; - // Allow fire - _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire); + // Move target marker to coords. + //__JavelinIGUITargetingLineV ctrlSetPosition [_aposX,ctrlPosition __JavelinIGUITargetingLineV select 1]; + //__JavelinIGUITargetingLineH ctrlSetPosition [ctrlPosition __JavelinIGUITargetingLineH select 0,_aposY]; + //{_x ctrlCommit __TRACKINTERVAL} forEach [__JavelinIGUITargetingLineH,__JavelinIGUITargetingLineV]; - if (diag_tickTime > _soundNextPlayTime) then { - playSound "ACE_Javelin_Locked"; - _soundNextPlayTime = diag_tickTime + 0.25; + _boundsInput = if (_currentTarget isKindOf "CAManBase") then { + [_currentTarget,[-1,-1,-2],_currentTarget selectionPosition "body"]; + } else { + [_currentTarget,[-1,-1,-2],_currentTarget selectionPosition "zamerny"]; + }; + + _bpos = _boundsInput call EFUNC(common,worldToScreenBounds); + + _minX = ((_bpos select 0) + _offsetX) max _constraintLeft; + _minY = ((_bpos select 1) + _offsetY) max _constraintTop; + _maxX = ((_bpos select 2) + _offsetX) min (_constraintRight - 0.025 * (3 / 4) * SafezoneH); + _maxY = ((_bpos select 3) + _offsetY) min (_constraintBottom - 0.025 * SafezoneH); + + TRACE_4("", _boundsInput, _bpos, _minX, _minY); + + __JavelinIGUITargetingGateTL ctrlSetPosition [_minX, _minY]; + __JavelinIGUITargetingGateTR ctrlSetPosition [_maxX, _minY]; + __JavelinIGUITargetingGateBL ctrlSetPosition [_minX, _maxY]; + __JavelinIGUITargetingGateBR ctrlSetPosition [_maxX, _maxY]; + + {_x ctrlCommit __TRACKINTERVAL} forEach [__JavelinIGUITargetingGateTL, __JavelinIGUITargetingGateTR, __JavelinIGUITargetingGateBL, __JavelinIGUITargetingGateBR]; + + _currentShooter setVariable["ace_missileguidance_target", _currentTarget, false]; + + // Allow fire + _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire); + + if(diag_tickTime > _soundTime) then { + playSound "ACE_Javelin_Locked"; + _soundTime = diag_tickTime + 0.25; + }; + } else { + __JavelinIGUITargeting ctrlShow true; + __JavelinIGUITargetingGate ctrlShow true; + __JavelinIGUITargetingConstrains ctrlShow true; + __JavelinIGUITargetingLines ctrlShow false; + + _currentShooter setVariable["ace_missileguidance_target", nil, false]; + + _boundsInput = if (_currentTarget isKindOf "CAManBase") then { + [_newTarget,[-1,-1,-2],_currentTarget selectionPosition "body"]; + } else { + [_newTarget,[-1,-1,-1],_currentTarget selectionPosition "zamerny"]; + }; + + _bpos = _boundsInput call EFUNC(common,worldToScreenBounds); + + _minX = ((_bpos select 0) + _offsetX) max _constraintLeft; + _minY = ((_bpos select 1) + _offsetY) max _constraintTop; + _maxX = ((_bpos select 2) + _offsetX) min (_constraintRight - 0.025 * (3 / 4) * SafezoneH); + _maxY = ((_bpos select 3) + _offsetY) min (_constraintBottom - 0.025 * SafezoneH); + + TRACE_4("", _boundsInput, _bpos, _minX, _minY); + + __JavelinIGUITargetingGateTL ctrlSetPosition [_minX,_minY]; + __JavelinIGUITargetingGateTR ctrlSetPosition [_maxX,_minY]; + __JavelinIGUITargetingGateBL ctrlSetPosition [_minX,_maxY]; + __JavelinIGUITargetingGateBR ctrlSetPosition [_maxX,_maxY]; + + {_x ctrlCommit __TRACKINTERVAL} forEach [__JavelinIGUITargetingGateTL,__JavelinIGUITargetingGateTR,__JavelinIGUITargetingGateBL,__JavelinIGUITargetingGateBR]; + + if(diag_tickTime > _soundTime) then { + playSound "ACE_Javelin_Locking"; + _soundTime = diag_tickTime + 0.25; + }; + // Disallow fire + _fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire); + }; }; } else { - // Lock in progress + // No targets found + _currentTarget = objNull; + _lockTime = 0; + __JavelinIGUISeek ctrlSetTextColor __ColorGray; + __JavelinIGUITargeting ctrlShow false; + __JavelinIGUITargetingGate ctrlShow false; __JavelinIGUITargetingLines ctrlShow false; + __JavelinIGUITargetingConstraints ctrlShow false; _currentShooter setVariable ["ace_missileguidance_target", nil, false]; - if (diag_tickTime > _soundNextPlayTime) then { - playSound "ACE_Javelin_Locking"; - _soundNextPlayTime = diag_tickTime + 0.25; - }; // Disallow fire _fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire); }; }; +//TRACE_2("", _newTarget, _currentTarget); + // Save arguments for next run -_this set [0, diag_frameno]; -_this set [1, _currentTarget]; -_this set [2, _lockStartTime]; -_this set [3, _soundNextPlayTime]; -_this set [4, _fireDisabledEH]; -_this set [5, _nextTargetScan]; +_args set[0, diag_tickTime]; +_args set[1, _currentTarget]; +_args set[2, _runTime]; +_args set[3, _lockTime]; +_args set[4, _soundTime]; +_args set[6, _fireDisabledEH]; + +uiNamespace setVariable[QGVAR(arguments), _args ]; diff --git a/addons/javelin/functions/fnc_onOpticLoad.sqf b/addons/javelin/functions/fnc_onOpticLoad.sqf new file mode 100644 index 0000000000..5148ca983f --- /dev/null +++ b/addons/javelin/functions/fnc_onOpticLoad.sqf @@ -0,0 +1,39 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" +TRACE_1("enter", _this); + +#define __LOCKONTIMERANDOM 1 // Deviation in lock on time + +if((count _this) > 0) then { + uiNameSpace setVariable ['ACE_RscOptics_javelin',_this select 0]; +}; + +private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player}; +TRACE_2("shooter",_currentShooter,typeOf _currentShooter); +_currentShooter setVariable ["ace_missileguidance_target", nil, false]; + +__JavelinIGUISeek ctrlSetTextColor __ColorGray; +__JavelinIGUINFOV ctrlSetTextColor __ColorGray; + +__JavelinIGUITargeting ctrlShow false; +__JavelinIGUITargetingConstrains ctrlShow false; +__JavelinIGUITargetingGate ctrlShow false; +__JavelinIGUITargetingLines ctrlShow false; + +if(GVAR(pfehID) != -1) then { + [] call FUNC(onOpticUnload); // Unload optic if it was already loaded +}; + +uiNameSpace setVariable [QGVAR(arguments), + [ + diag_tickTime, // Last runtime + objNull, // currentTargetObject + 0, // Run Time + 0, // Lock Time + 0, // Sound timer + (random __LOCKONTIMERANDOM), // random lock time addition + -1 + ] +]; + +GVAR(pfehID) = [FUNC(onOpticDraw), 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/javelin/functions/fnc_onOpticUnload.sqf b/addons/javelin/functions/fnc_onOpticUnload.sqf new file mode 100644 index 0000000000..221fe3b5f6 --- /dev/null +++ b/addons/javelin/functions/fnc_onOpticUnload.sqf @@ -0,0 +1,20 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" +TRACE_1("enter", _this); +private ["_args", "_disableFireEH"]; + +// uiNameSpace setVariable ['ACE_RscOptics_javelin',nil]; + +if(GVAR(pfehID) != -1) then { + [GVAR(pfehID)] call CBA_fnc_removePerFrameHandler; + GVAR(pfehID) = -1; +}; + +_args = uiNamespace getVariable[QGVAR(arguments), nil ]; +if(!isNil "_args") then { + _disableFireEH = _args select 6; + if(_disableFireEH > 0 && difficulty > 0) then { + [ACE_player, "DefaultAction", _disableFireEH] call EFUNC(common,removeActionEventHandler); + }; + uiNameSpace setVariable [QGVAR(arguments),nil]; +}; diff --git a/addons/javelin/functions/fnc_showFireMode.sqf b/addons/javelin/functions/fnc_showFireMode.sqf index 525289d031..95dd038b92 100644 --- a/addons/javelin/functions/fnc_showFireMode.sqf +++ b/addons/javelin/functions/fnc_showFireMode.sqf @@ -1,27 +1,11 @@ -/* - * Author: jaynus - * Updates fire mode on javelin display (top/dir) - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ace_javelin_fnc_showFireMode - * - * Public: No - */ //#define DEBUG_MODE_FULL #include "script_component.hpp" +TRACE_1("enter", _this); private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player}; private _currentFireMode = _currentShooter getVariable ["ace_missileguidance_attackProfile", "JAV_TOP"]; -TRACE_1("showFireMode", _currentFireMode); - -if (_currentFireMode == "JAV_TOP") then { +if(_currentFireMode == "JAV_TOP") then { __JavelinIGUITop ctrlSetTextColor __ColorGreen; __JavelinIGUIDir ctrlSetTextColor __ColorGray; } else { diff --git a/addons/javelin/initKeybinds.sqf b/addons/javelin/initKeybinds.sqf index 7652f2fd57..cbfafa326d 100644 --- a/addons/javelin/initKeybinds.sqf +++ b/addons/javelin/initKeybinds.sqf @@ -5,16 +5,26 @@ if (GETGVAR(isLockKeyDown,false)) exitWith {false}; GVAR(isLockKeyDown) = true; - TRACE_1("lock key down",GVAR(isLockKeyDown)); + // Statement + [ACE_player] call FUNC(lockKeyDown); // Return false so it doesn't block the rest weapon action false }, { // prevent holding down GVAR(isLockKeyDown) = false; - TRACE_1("lock key up",GVAR(isLockKeyDown)); + // Statement + [ACE_player] call FUNC(lockKeyUp); false }, [15, [false, false, false]], false] call CBA_fnc_addKeybind; //Tab Key + +["ACE3 Weapons", QGVAR(cycleFireMode), localize LSTRING(CycleFireMode), +{ false }, +{ + [ACE_player] call FUNC(cycleFireMode); + false +}, +[15, [false, true, false]], false] call CBA_fnc_addKeybind; //Ctrl+Tab Key \ No newline at end of file diff --git a/addons/javelin/script_component.hpp b/addons/javelin/script_component.hpp index b78032439d..11bb4a5a33 100644 --- a/addons/javelin/script_component.hpp +++ b/addons/javelin/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_JAVELIN @@ -16,6 +17,9 @@ #include "\z\ace\addons\main\script_macros.hpp" +#define ACE_JAV_FIREMODE_DIR 1 +#define ACE_JAV_FIREMODE_TOP 2 + // Javelin IGUI defines #define __JavelinIGUI (uinamespace getVariable "ACE_RscOptics_javelin") @@ -26,6 +30,8 @@ #define __JavelinIGUISeek (__JavelinIGUI displayCtrl 699000) #define __JavelinIGUITop (__JavelinIGUI displayCtrl 699001) #define __JavelinIGUIDir (__JavelinIGUI displayCtrl 699002) +#define __JavelinIGUINFOV (__JavelinIGUI displayCtrl 1003) +#define __JavelinIGUIWFOV (__JavelinIGUI displayCtrl 1004) #define __JavelinIGUIRangefinder (__JavelinIGUI displayCtrl 151) // Constrains diff --git a/addons/javelin/stringtable.xml b/addons/javelin/stringtable.xml index 96dc8d33ee..dcc03dca91 100644 --- a/addons/javelin/stringtable.xml +++ b/addons/javelin/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -9,13 +9,21 @@ Namierz cel (przytrzymaj) Verrouiller la cible (maintenir) Célpontra állás (Lenyomva tartott) - Aggangia il bersaglio + Aggangia il bersagio Fijar objetivo (Mantener) Travar Alvo(Segurar) - 目標を捕捉 (押しっぱ) - 표적 획득 (누르기) - 锁定目标 (按住) - 鎖定目標 (按住) + + + Cycle Fire Mode + Wechsle Feuermodus + Переключение режимов огня + Přepínání režimů palby + Przełącz tryb ognia + Cycle mode de tir + Tüzelési mód váltása + Alterna le modalità di fuoco + Cambiar modo de disparo + Alterar Modo de Disparo diff --git a/addons/kestrel4500/XEH_preInit.sqf b/addons/kestrel4500/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/kestrel4500/XEH_preInit.sqf +++ b/addons/kestrel4500/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index 039da0e213..c3bce5efa2 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -107,7 +107,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 2: { // Wind SPD if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(_windSpeed * 10) / 10); + _textCenterBig = Str(round(abs(_windSpeed) * 10) / 10); } else { _textCenterLine1Left = "Max"; _textCenterLine2Left = "Avg"; @@ -134,7 +134,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { if (!GVAR(MinAvgMax)) then { if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { _textCenterBig = Str(round(abs(sin(GVAR(RefHeading) - _playerDir) * _windSpeed) * 10) / 10); - _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_playerDir)]; + _textInfoLine1 = format["%1 m/s @ %2", round((abs(cos(_playerDir - _windDir)) * _windSpeed) * 10) / 10, round(_playerDir)]; } else { _textCenterBig = Str(round(abs(sin(GVAR(RefHeading)) * _windSpeed) * 10) / 10); _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_windDir)]; @@ -143,7 +143,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { } else { _textCenterLine1Left = "Max"; _textCenterLine2Left = "Avg"; - switch (GVAR(MinAvgMaxMode)) do { + switch (GVAR(MinAvgMax)Mode) do { case 0: { _textCenterLine1Right = "--. -"; _textCenterLine2Right = "--. -"; @@ -166,7 +166,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { if (!GVAR(MinAvgMax)) then { if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { _textCenterBig = Str(round(cos(GVAR(RefHeading) - _playerDir) * _windSpeed * 10) / 10); - _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_playerDir)]; + _textInfoLine1 = format["%1 m/s @ %2", round((abs(cos(_playerDir - _windDir)) * _windSpeed) * 10) / 10, round(_playerDir)]; } else { _textCenterBig = Str(round(cos(GVAR(RefHeading)) * _windSpeed * 10) / 10); _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_windDir)]; @@ -175,7 +175,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { } else { _textCenterLine1Left = "Max"; _textCenterLine2Left = "Avg"; - switch (GVAR(MinAvgMaxMode)) do { + switch (GVAR(MinAvgMax)Mode) do { case 0: { _textCenterLine1Right = "--. -"; _textCenterLine2Right = "--. -"; diff --git a/addons/kestrel4500/script_component.hpp b/addons/kestrel4500/script_component.hpp index 10a61a4d08..f098cd2a57 100644 --- a/addons/kestrel4500/script_component.hpp +++ b/addons/kestrel4500/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_KESTREL4500 diff --git a/addons/kestrel4500/stringtable.xml b/addons/kestrel4500/stringtable.xml index bb65f22191..88f0e90363 100644 --- a/addons/kestrel4500/stringtable.xml +++ b/addons/kestrel4500/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Kestrel 4500NV Kestrel 4500NV Kestrel 4500NV - Kestrel 4500NV - Kestrel 4500NV - 猎隼4500测风仪 - 獵隼4500測風儀 Kestrel 4500 Pocket Weather Tracker @@ -28,10 +24,6 @@ Kestrel 4500 Medidor Balístico Ativo Kestrel 4500 kézi szél-és időjárásmérő Příruční meteostanice Kestrel 4500 - Kestrel 4500 携帯型風速計 - Kestrel 4500 휴대형 기상 관측기 - 猎隼4500掌上型天气追踪仪 - 獵隼4500掌上型天氣追蹤儀 Open Kestrel 4500 @@ -44,10 +36,6 @@ Kestrel 4500 öffnen Abrir Kestrel 4500 Otevřít Kestrel 4500 - Kestrel 4500 を開く - Kestrel 4500 열기 - 开启猎隼4500测风仪 - 開啟獵隼4500測風儀 Show Kestrel 4500 @@ -60,10 +48,6 @@ Kestrel 4500 mutatása Zobrazit Kestrel 4500 Mostrar Kestrel 4500 - Kestrel 4500 を見る - Kestrel 4500 보이기 - 显示猎隼4500测风仪 - 顯示獵隼4500測風儀 Hide Kestrel 4500 @@ -76,10 +60,6 @@ Kestrel 4500 elrejtése Skrýt Kestrel 4500 Ocultar Kestrel 4500 - Kestrel 4500 を隠す - Kestrel 4500 숨기기 - 隐藏猎隼4500测风仪 - 隱藏獵隼4500測風儀 Open Kestrel 4500 @@ -92,10 +72,6 @@ Kestrel 4500 elővétele Otevřít Kestrel 4500 Abrir Kestrel 4500 - Kestrel 4500 を開く - Kestrel 4500 열기 - 开启猎隼4500测风仪 - 開啟獵隼4500測風儀 Show Kestrel 4500 @@ -108,10 +84,6 @@ Kestrel 4500 mutatása Zobrazit Kestrel 4500 Mostrar Kestrel 4500 - Kestrel 4500 を見る - Kestrel 4500 숨기기 - 显示猎隼4500测风仪 - 顯示獵隼4500測風儀 - + \ No newline at end of file diff --git a/addons/laser/ACE_Settings.hpp b/addons/laser/ACE_Settings.hpp deleted file mode 100644 index 72c513f928..0000000000 --- a/addons/laser/ACE_Settings.hpp +++ /dev/null @@ -1,7 +0,0 @@ -class ACE_Settings { - class GVAR(dispersionCount) { - value = 2; - typeName = "SCALAR"; - displayName = CSTRING(dispersionCount_displayName); - }; -}; diff --git a/addons/laser/CfgEventhandlers.hpp b/addons/laser/CfgEventhandlers.hpp index 0e652d2459..e8fb763b8b 100644 --- a/addons/laser/CfgEventhandlers.hpp +++ b/addons/laser/CfgEventhandlers.hpp @@ -1,3 +1,4 @@ + class Extended_PreStart_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preStart)); @@ -6,13 +7,20 @@ class Extended_PreStart_EventHandlers { class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_FILE(XEH_pre_init)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_FILE(XEH_post_init)); }; }; +class Extended_Init_EventHandlers { + class LaserTargetBase { + class ADDON { + init = QUOTE(_this call DFUNC(laser_init)); + }; + }; +}; diff --git a/addons/laser/CfgVehicles.hpp b/addons/laser/CfgVehicles.hpp index 4f226a1468..ed752cee42 100644 --- a/addons/laser/CfgVehicles.hpp +++ b/addons/laser/CfgVehicles.hpp @@ -1,31 +1,44 @@ class CfgVehicles { class All; + class LaserTarget: All { // @TODO: Changing the model and simulation hides it, but THEN IT DOESNT SPAWN WTF!? - // model = "\A3\Weapons_F\empty.p3d"; + model = "\A3\Weapons_F\empty.p3d"; + destrType = "DestructNo"; + simulation = "LaserTarget"; class EventHandlers { - class ADDON { - init = QUOTE(_this call FUNC(handleLaserTargetCreation)); - }; + init = QUOTE(_this call FUNC(laser_init)); }; }; - // laserTarget fails if the turret does not have "primaryGunner" config - // This only effects the indfor strider who's commander is not the primaryGunner - class LandVehicle; - class Car: LandVehicle { - class NewTurret; + // Visual laserTarget override + class ACE_LaserTarget_Visual : LaserTarget { + simulation = "LaserTarget"; + model = "\A3\Weapons_f\laserTgt.p3d"; }; - class Car_F: Car { + + // Vehicle lockable configurations + + class AllVehicles; + class Air: AllVehicles { + class Turrets; + }; + + class Helicopter: Air { class Turrets { - class MainTurret: NewTurret {}; + class MainTurret; }; }; - class MRAP_03_base_F: Car_F { + + class Helicopter_Base_F: Helicopter {}; + + class Heli_Attack_01_base_F: Helicopter_Base_F {}; + + class B_Heli_Attack_01_F: Heli_Attack_01_base_F { class Turrets: Turrets { - class CommanderTurret: MainTurret { - primaryGunner = 1; + class MainTurret: MainTurret { + GVAR(CanLockLaser) = 1; // Enable laser locking selection }; }; }; diff --git a/addons/laser/README.md b/addons/laser/README.md index 64ea8fe045..96a2bd7b19 100644 --- a/addons/laser/README.md +++ b/addons/laser/README.md @@ -10,5 +10,3 @@ The people responsible for merging changes to this component or answering potent - [walterpearce](https://github.com/walterpearce) - [NouberNou](https://github.com/NouberNou) -- [esteldunedain](https://github.com/esteldunedain) -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/laser/XEH_PREP.hpp b/addons/laser/XEH_PREP.hpp index a95eae7842..df185221ff 100644 --- a/addons/laser/XEH_PREP.hpp +++ b/addons/laser/XEH_PREP.hpp @@ -1,15 +1,26 @@ -PREP(addLaserTarget); -PREP(dev_drawVisibleLaserTargets); -PREP(findLaserSource); -PREP(handleLaserTargetCreation); -PREP(keyLaserCodeChange); -PREP(laserOff); -PREP(laserOn); -PREP(laserTargetPFH); -PREP(onLaserDesignatorDraw); -PREP(rotateVectLine); PREP(rotateVectLineGetMap); -PREP(seekerFindLaserSpot); -PREP(shootCone); +PREP(rotateVectLine); PREP(shootRay); +PREP(shootCone); +PREP(checkLos); + +PREP(findStrongestRay); + +PREP(onLaserDesignatorDraw); + +PREP(seekerFindLaserSpot); +PREP(laserOn); +PREP(laserOff); +PREP(handleLaserOn); +PREP(handleLaserOff); + +PREP(drawVisibleLaserTargets); + +PREP(laser_init); +PREP(vanillaLaserSeekerHandler); +PREP(laserTargetPFH); + +PREP(unitTurretCanLockLaser); +PREP(keyLaserCodeUp); +PREP(keyLaserCodeDown); diff --git a/addons/laser/XEH_postInit.sqf b/addons/laser/XEH_postInit.sqf deleted file mode 100644 index b439fd1f06..0000000000 --- a/addons/laser/XEH_postInit.sqf +++ /dev/null @@ -1,33 +0,0 @@ -#include "script_component.hpp" - -#include "initKeybinds.sqf" - -// Global Laser EHs -["ace_laserOn", { - params ["_uuid", "_args"]; - TRACE_2("ace_laserOn eh",_uuid,_args); - [GVAR(laserEmitters), _uuid, _args] call CBA_fnc_hashSet; -}] call CBA_fnc_addEventHandler; - -["ace_laserOff", { - params ["_uuid"]; - TRACE_1("ace_laserOn eh",_uuid); - if ([GVAR(laserEmitters), _uuid] call CBA_fnc_hashHasKey) then { - [GVAR(laserEmitters), _uuid] call CBA_fnc_hashRem; - }; -}] call CBA_fnc_addEventHandler; - -[QGVAR(updateCode), { - params ["_uuid", "_newCode"]; - TRACE_2("ace_laser_updateCode eh",_uuid,_newCode); - if ([GVAR(laserEmitters), _uuid] call CBA_fnc_hashHasKey) then { - private _laserArray = [GVAR(laserEmitters), _uuid] call CBA_fnc_hashGet; - TRACE_2("updating",_newCode,_laserArray select 4); - _laserArray set [4, _newCode]; - }; -}] call CBA_fnc_addEventHandler; - -// Shows detector and mine posistions in 3d when debug is on -#ifdef DRAW_LASER_INFO -addMissionEventHandler ["Draw3D", {_this call FUNC(dev_drawVisibleLaserTargets)}]; -#endif diff --git a/addons/laser/XEH_post_init.sqf b/addons/laser/XEH_post_init.sqf new file mode 100644 index 0000000000..51473ceba6 --- /dev/null +++ b/addons/laser/XEH_post_init.sqf @@ -0,0 +1,7 @@ +#include "script_component.hpp" + +#include "initKeybinds.sqf" + +["ace_laserOn", {_this call DFUNC(handleLaserOn)}] call CBA_fnc_addEventHandler; +["ace_laserOff", {_this call DFUNC(handleLaserOff)}] call CBA_fnc_addEventHandler; + diff --git a/addons/laser/XEH_preInit.sqf b/addons/laser/XEH_pre_init.sqf similarity index 65% rename from addons/laser/XEH_preInit.sqf rename to addons/laser/XEH_pre_init.sqf index 2c4e7c7f4f..410df488f5 100644 --- a/addons/laser/XEH_preInit.sqf +++ b/addons/laser/XEH_pre_init.sqf @@ -2,17 +2,15 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; + +GVAR(VanillaLasers) = []; // Laser default variables -ACE_DEFAULT_LASER_CODE = 1111; +ACE_DEFAULT_LASER_CODE = 1001; ACE_DEFAULT_LASER_WAVELENGTH = 1550; ACE_DEFAULT_LASER_BEAMSPREAD = 1; GVAR(laserEmitters) = [] call CBA_fnc_hashCreate; -GVAR(trackedLaserTargets) = []; -GVAR(pfehID) = -1; ADDON = true; diff --git a/addons/laser/config.cpp b/addons/laser/config.cpp index 75f70449ea..d989c4f85b 100644 --- a/addons/laser/config.cpp +++ b/addons/laser/config.cpp @@ -13,8 +13,12 @@ class CfgPatches { }; }; -#include "ACE_Settings.hpp" #include "CfgEventhandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" #include "RscInGameUI.hpp" + +class ACE_newEvents { + laser_laserOff = "ace_laserOff"; + laser_laserOn = "ace_laserOn"; +}; diff --git a/addons/laser/functions/fnc_addLaserTarget.sqf b/addons/laser/functions/fnc_addLaserTarget.sqf deleted file mode 100644 index 9addb8ed93..0000000000 --- a/addons/laser/functions/fnc_addLaserTarget.sqf +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Author: esteldunedain - * Adds a vanilla laser target to the tracker PFH and globaly turns it on - * - * Argument: - * 0: TargetObject (vanilla laser) - * 1: Vehicle - * - * Return Value: - * None - * - * Example: - * [laserTarget player, player] call ace_laser_fnc_addLaserTarget; - * - * Public: No - */ -#include "script_component.hpp" - -params ["_targetObject", "_vehicle"]; -TRACE_2("params",_targetObject,_vehicle); - -// Get the designator variables, or use defaults -private _waveLength = _vehicle getVariable [QEGVAR(laser,waveLength), ACE_DEFAULT_LASER_WAVELENGTH]; -private _laserCode = _vehicle getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE]; -private _beamSpread = _vehicle getVariable [QEGVAR(laser,beamSpread), ACE_DEFAULT_LASER_BEAMSPREAD]; -TRACE_3("codes",_waveLength,_laserCode,_beamSpread); - -// Laser method is the method ACE_Laser will use to determine from where to where it should project the designator cone -_vehicle setVariable [QGVAR(targetObject), _targetObject, true]; - -private _laserMethod = QFUNC(findLaserSource); - -private _vehicleSourceSelection = ""; -if (_vehicle isKindOf "CaManBase") then { - _vehicleSourceSelection = "pilot"; -} else { - { // Go through turrets on vehicle and find the laser - private _turretPath = _x; - { - if ((getNumber (configFile >> "CfgWeapons" >> _x >> "laser")) > 0) exitWith { - _vehicleSourceSelection = getText (([_vehicle, _turretPath] call CBA_fnc_getTurret) >> "memoryPointGunnerOptics"); - TRACE_3("",_turretPath,_x,_vehicleSourceSelection); - }; - } forEach (_vehicle weaponsTurret _turretPath); - } forEach (allTurrets [_vehicle, true]); -}; - -private _methodArgs = [_vehicleSourceSelection]; - -TRACE_6("Laser on:",_vehicle,_laserMethod,_waveLength,_laserCode,_beamSpread,_methodArgs); -private _laserUuid = [_vehicle, _vehicle, _laserMethod, _waveLength, _laserCode, _beamSpread, _methodArgs] call FUNC(laserOn); - -GVAR(trackedLaserTargets) pushBack [_targetObject, _vehicle, _laserUuid, _laserCode]; -TRACE_1("",GVAR(trackedLaserTargets)); - -if (GVAR(pfehID) == -1) then { - TRACE_1("starting pfeh",count GVAR(trackedLaserTargets)); - GVAR(pfehID) = [DFUNC(laserTargetPFH), 0, []] call CBA_fnc_addPerFrameHandler; -}; diff --git a/addons/laser/functions/fnc_checkLos.sqf b/addons/laser/functions/fnc_checkLos.sqf new file mode 100644 index 0000000000..c3dc8cc67f --- /dev/null +++ b/addons/laser/functions/fnc_checkLos.sqf @@ -0,0 +1,28 @@ +#include "script_component.hpp" + +params ["_pos1", "_pos2", "_designator", "_seeker"]; + +private _spacing = 100; +if((count _this) > 4) then { + _spacing = _this select 4; +}; + +private _return = true; +private _vectorTo = [_pos2, _pos1] call BIS_fnc_vectorFromXToY; + +private _x = (_vectorTo select 0)*0.25; +private _y = (_vectorTo select 1)*0.25; +private _z = (_vectorTo select 2)*0.25; + +_pos2 = [(_pos2 select 0) + _x, (_pos2 select 1) + _y, (_pos2 select 2) + _z]; + +// player sideChat format["new los check"]; +if(terrainIntersect [_pos2, _pos1]) then { + _return = false; +} else { + if(lineIntersects [_pos2, _pos1]) then { // should take as arguments and add to this command objects to exclude - target and observer + // player sideChat format["with: %1", lineIntersectsWith [_pos1, _pos2]]; + _return = false; + }; +}; +_return; \ No newline at end of file diff --git a/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf b/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf deleted file mode 100644 index 42931db29d..0000000000 --- a/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Author: ACE-Team - * - * - * Argument: - * None - * - * Return Value: - * None - * - * Example: - * call ace_laser_fnc_dev_drawVisibleLaserTargets - * - * Public: No - */ - - -// Dev Debug Function -// Displays lasers and attempts to lock on to codes 1111 and 1112 from a target vehicle's view -// On Screen Debug: -// Red - Vanilla Laser Targets -// Yellow - Array (vehicle pos/weapon) Laser Targets -// Green - Rays -// Blue - Seeker Locks - -#include "script_component.hpp" - -// Try searching for lasers from a given vehicle position [BLUE]: -private _seekerVehicle = vehicle ace_player; -private _testSeekerPosASL = AGLtoASL (_seekerVehicle modelToWorldVisual [0,0,1]); -private _testSeekerDir = vectorDirVisual _seekerVehicle; -{ - private _code = _x; - private _results = [_testSeekerPosASL, _testSeekerDir, 45, 10000, [1550,1550], _code, _seekerVehicle] call FUNC(seekerFindLaserSpot); - 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"]; - }; -} forEach [1111, 1112]; // Scan at codes 1111 and 1112 - - -// Draw all lasers -[GVAR(laserEmitters), { - //IGNORE_PRIVATE_WARNING ["_key", "_value"]; - // TRACE_2("",_key,_value); - _value params ["_obj", "_owner", "_laserMethod", "_waveLength", "_laserCode", "_beamSpread"]; - - // Draw vanila lasers [RED] - 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"]; - - (_value 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"]; - } 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"]; - }; - }; - // Draw array weapon lasers [YELLOW] - if ((_laserMethod isEqualType []) && {(count _laserMethod) == 2}) then { - _laserMethod params ["_modelPosition", "_weaponName"]; - private _laserPosASL = AGLtoASL (_obj modelToWorldVisual _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"]; - 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"]; - }; - }; -}] call CBA_fnc_hashEachPair; diff --git a/addons/laser/functions/fnc_drawVisibleLaserTargets.sqf b/addons/laser/functions/fnc_drawVisibleLaserTargets.sqf new file mode 100644 index 0000000000..1e03b168fd --- /dev/null +++ b/addons/laser/functions/fnc_drawVisibleLaserTargets.sqf @@ -0,0 +1,9 @@ +// This is a debug function for displaying visible lasers for ourselves +#include "script_component.hpp" + +ACE_LOGINFO("Laser Emitter Dump"); + +{ + ACE_LOGINFO_1(" %1", _x); + ACE_LOGINFO_1(" %1",[ARR_2(GVAR(laserEmitters),_x)] call CBA_fnc_hashGet); +} forEach (GVAR(laserEmitters) select 1); diff --git a/addons/laser/functions/fnc_findLaserSource.sqf b/addons/laser/functions/fnc_findLaserSource.sqf deleted file mode 100644 index 585faf3023..0000000000 --- a/addons/laser/functions/fnc_findLaserSource.sqf +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Author: esteldunedain - * Handler function for finding position and direction of a vanilla laser. - * - * Arguments: - * 0: Vehicle (shooter of laser) - * 6: Method Args - * 0: Laser Source selection on Vehicle - * - * Return Value: - * [position, direction] - * - * Example: - * [player, x,x,x,x,x, ["pilot"]] call ace_laser_fnc_findLaserSource; - * - * Public: No - */ -#include "script_component.hpp" - -params ["_vehicle", "", "", "", "", "", "_methodArgs"]; -_methodArgs params ["_ownerSelection"]; - -// Get the laser target object stored in the unit -private _targetObject = _vehicle getVariable [QGVAR(targetObject), objNull]; -private _targetPos = getPosASL _targetObject; -if (surfaceIsWater _targetPos && {(_targetPos select 2) < 0}) then { - // Vanilla lasers seem to give position at ocean floor heigh, even though the x and y are correct?? - _targetPos set [2, 0.25]; -}; - -private _povPos = AGLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _ownerSelection)); -private _povDir = _povPos vectorFromTo _targetPos; - -TRACE_4("",_vehicle,_targetObject,_povPos,_povDir); - -if(isNil "_povPos" || isNil "_povDir") exitWith { - WARNING_2("bad data [%1][%2]",_povPos,_povDir); - [-1,-1] -}; - -[_povPos, _povDir] diff --git a/addons/laser/functions/fnc_findStrongestRay.sqf b/addons/laser/functions/fnc_findStrongestRay.sqf new file mode 100644 index 0000000000..e863fb4d11 --- /dev/null +++ b/addons/laser/functions/fnc_findStrongestRay.sqf @@ -0,0 +1,48 @@ +#include "script_component.hpp" + +params ["_list", "_checkPos"]; +private _spots = []; +private _outliers = []; +private _spot = []; +(_list select 0) params ["_testPos"]; +{ + _x params ["_samplePos"]; + if(!lineIntersects [_samplePos, _checkPos] && {!terrainIntersectASL [_samplePos, _checkPos]}) then { + if(_samplePos distance _testPos < 2) then { + _spot pushBack _samplePos; + } else { + _outliers pushBack _samplePos; + }; + }; +} forEach _list; +_spots pushBack _spot; + +if(count _outliers > 0) then { + for "_i" from 1 to 3 do { + private _remainingSpots = _outliers; + _outliers = []; + _spot = []; + _testPos = (_remainingSpots select 0); + { + private _samplePos = _x; + if(!lineIntersects [_samplePos, _checkPos] && {!terrainIntersectASL [_samplePos, _checkPos]}) then { + if(_samplePos distance _testPos < 2) then { + _spot pushBack _samplePos; + } else { + _outliers pushBack _samplePos; + }; + }; + } forEach _remainingSpots; + _spots pushBack _spot; + }; +}; +private _largest = 0; +private _largestSpot = []; +{ + if(count _x > _largest) then { + _largest = count _x; + _largestSpot = _x; + }; +} forEach _spots; +// player sideChat format["g: %1", _spots]; +_largestSpot select (random (floor(count _largestSpot))); \ No newline at end of file diff --git a/addons/laser/functions/fnc_handleLaserOff.sqf b/addons/laser/functions/fnc_handleLaserOff.sqf new file mode 100644 index 0000000000..9a83120934 --- /dev/null +++ b/addons/laser/functions/fnc_handleLaserOff.sqf @@ -0,0 +1,7 @@ +//fnc_handleLaserOff.sqf +#include "script_component.hpp" + +params ["_uuid"]; +if ([GVAR(laserEmitters), _uuid] call CBA_fnc_hashHasKey) then { + [GVAR(laserEmitters), _uuid] call CBA_fnc_hashRem; +}; diff --git a/addons/laser/functions/fnc_handleLaserOn.sqf b/addons/laser/functions/fnc_handleLaserOn.sqf new file mode 100644 index 0000000000..243023d8aa --- /dev/null +++ b/addons/laser/functions/fnc_handleLaserOn.sqf @@ -0,0 +1,5 @@ +//fnc_handleLaserOn.sqf +#include "script_component.hpp" + +params ["_uuid", "_args"]; +[GVAR(laserEmitters), _uuid, _args] call CBA_fnc_hashSet; diff --git a/addons/laser/functions/fnc_handleLaserTargetCreation.sqf b/addons/laser/functions/fnc_handleLaserTargetCreation.sqf deleted file mode 100644 index 482a733b41..0000000000 --- a/addons/laser/functions/fnc_handleLaserTargetCreation.sqf +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Author: esteldunedain - * Associates a newly created laser target to it's owner - * - * Argument: - * 0: Vanilla Laser (base type LaserTarget) - * - * Return Value: - * None - * - * Example: - * [laserTarget player] call ace_laser_fnc_handleLaserTargetCreation; - * - * Public: No - */ -#include "script_component.hpp" - -TRACE_1("params",_this); -[{ - params ["_targetObject"]; - - // Only handle locally created lasers - if(!(local _targetObject)) exitWith {TRACE_1("not local",_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}; - if (count _owners == 1) exitWith { - TRACE_2("Laser target owner [vehicles]", _targetObject, _owners select 0); - [_targetObject, _owners select 0] call FUNC(addLaserTarget); - }; - - TRACE_1("Laser target doesn't have owner", _targetObject); -}, _this] call CBA_fnc_execNextFrame; diff --git a/addons/laser/functions/fnc_keyLaserCodeChange.sqf b/addons/laser/functions/fnc_keyLaserCodeChange.sqf deleted file mode 100644 index c5140709e0..0000000000 --- a/addons/laser/functions/fnc_keyLaserCodeChange.sqf +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Author: PabstMirror - * Change the laser key code (both seeker and transmitter) - * - * Argument: - * 0: Change in code - * - * Return Value: - * Key Handled - - * Example: - * [1] call ace_laser_fnc_keyLaserCodeChange; - * - * Public: No - */ -#include "script_component.hpp" - -params [["_codeChange", 0, [0]]]; - -TRACE_1("params",_codeChange); - -if ((!alive ACE_player) || {!([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith))}) exitWith {false}; - -private _currentShooter = objNull; -private _currentWeapon = ""; - -if (ACE_player call CBA_fnc_canUseWeapon) then { - _currentShooter = ACE_player; - _currentWeapon = currentWeapon ACE_player; -} else { - _currentShooter = vehicle ACE_player; - private _turretPath = if (ACE_player == (driver _currentShooter)) then {[-1]} else {ACE_player call CBA_fnc_turretPath}; - _currentWeapon = _currentShooter currentWeaponTurret _turretPath; -}; - -TRACE_2("",_currentShooter,_currentWeapon); -if (((getNumber (configFile >> "CfgWeapons" >> _currentWeapon >> "laser")) == 0) && - {(getNumber (configFile >> "CfgWeapons" >> _currentWeapon >> QGVAR(canSelect))) == 0}) exitWith {false}; - -private _oldLaserCode = _currentShooter getVariable [QGVAR(code), ACE_DEFAULT_LASER_CODE]; -private _newLaserCode = _oldLaserCode; - -// "Four-digit code equipment settings range from 1111 to 1788" -// While there is a 0 or 9 in code, keep adding change - -if (((_codeChange < 0) && {_oldLaserCode > ACE_DEFAULT_LASER_CODE}) || {(_codeChange > 0) && {_oldLaserCode < 1788}}) then { - _newLaserCode = _oldLaserCode + _codeChange; - while {(((str _newLaserCode) find "0") >= 0) || {((str _newLaserCode) find "9") >= 0}} do { - _newLaserCode = _newLaserCode + _codeChange; - }; -}; - -TRACE_2("",_oldLaserCode,_newLaserCode); - -if (_oldLaserCode != _newLaserCode) then { - _currentShooter setVariable [QGVAR(code), _newLaserCode, true]; -}; -[format ["%1: %2", localize LSTRING(laserCode), _newLaserCode]] call EFUNC(common,displayTextStructured); - -true diff --git a/addons/laser/functions/fnc_keyLaserCodeDown.sqf b/addons/laser/functions/fnc_keyLaserCodeDown.sqf new file mode 100644 index 0000000000..a75487193d --- /dev/null +++ b/addons/laser/functions/fnc_keyLaserCodeDown.sqf @@ -0,0 +1,12 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" +private ["_oldLaserCode", "_laserCode"]; + +_oldLaserCode = ACE_player getVariable [QGVAR(code), ACE_DEFAULT_LASER_CODE]; +if(_oldLaserCode > ACE_DEFAULT_LASER_CODE) then { + _laserCode = _oldLaserCode - 1; + ACE_player setVariable [QGVAR(code), _laserCode, false]; +}; +if(_laserCode != _oldLaserCode) then { + [format ["%1: %2", localize LSTRING(laserCode), _laserCode]] call EFUNC(common,displayTextStructured); +}; \ No newline at end of file diff --git a/addons/laser/functions/fnc_keyLaserCodeUp.sqf b/addons/laser/functions/fnc_keyLaserCodeUp.sqf new file mode 100644 index 0000000000..93001a06fd --- /dev/null +++ b/addons/laser/functions/fnc_keyLaserCodeUp.sqf @@ -0,0 +1,10 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" +private ["_oldLaserCode", "_laserCode"]; + +_oldLaserCode = ACE_player getVariable [QGVAR(code), ACE_DEFAULT_LASER_CODE]; +_laserCode = _oldLaserCode + 1; +ACE_player setVariable [QGVAR(code), _laserCode, false]; +if(_laserCode != _oldLaserCode) then { +[format ["%1: %2", localize LSTRING(laserCode), _laserCode]] call EFUNC(common,displayTextStructured); +}; \ No newline at end of file diff --git a/addons/laser/functions/fnc_laserOff.sqf b/addons/laser/functions/fnc_laserOff.sqf index 64188a62f1..8e9792f0d4 100644 --- a/addons/laser/functions/fnc_laserOff.sqf +++ b/addons/laser/functions/fnc_laserOff.sqf @@ -3,20 +3,13 @@ * Turn a laser designator off. * * Arguments: - * 0: UUID (from laserOn) + * 0: UUID (from laserOn) * * Return Value: * None - * - * Example: - * ["yourLaserUID"] call ace_laser_fnc_laserOff; - * - * Public: No */ + #include "script_component.hpp" params ["_uuid"]; - -TRACE_1("Sending Global Laser Off Event",_uuid); - ["ace_laserOff", [_uuid]] call CBA_fnc_globalEvent; diff --git a/addons/laser/functions/fnc_laserOn.sqf b/addons/laser/functions/fnc_laserOn.sqf index cd300af083..644059c406 100644 --- a/addons/laser/functions/fnc_laserOn.sqf +++ b/addons/laser/functions/fnc_laserOn.sqf @@ -3,33 +3,20 @@ * Turn a laser designator on. * * Arguments: - * 0: Emitter - * 1: Owner - * 2: Method, can be code, which emitter and owner are passed to, a string function name, an array with a position memory point and weapon name, or an array with a position memory point, a vector begining memory point, and vector ending memory point. - * 3: Wavelength (1550nm is common eye safe) - * 4: Laser code - * 5: Beam divergence (in mils off beam center). - * 6: Method Args + * 0: Emitter + * 1: Owner + * 2: Method, can be code, which emitter and owner are passed to, a string function name, an array with a position memory point and weapon name, or an array with a position memory point, a vector begining memory point, and vector ending memory point. + * 3: Wavelength (1550nm is common eye safe) + * 4: Laser code + * 5: Beam divergence (in mils off beam center). * * Return Value: - * UUID for sending to laserOff function. - * - * Example: - * [hmg, hmg, [[0,0,1], "HMG_static"], 1550, 1111, 1] call ace_laser_fnc_laserOn; - * [player, player, "ace_laser_fnc_findLaserSource", 1550, 1111, 1, ["pilot"]] call ace_laser_fnc_laserOn; - * - * Public: No + * String, UUID for sending to laserOff function. */ #include "script_component.hpp" -// params [["_emitter", objNull, [objNull]],["_owner", objNull, [objNull]],["_method", "", ["", {}, []]],["_wavelength", 0, [0]],["_code", 0, [0]],["_beamSpread", 0, [0]],"_methodArgs"]; - private _uuid = format["%1%2%3", floor diag_tickTime, floor random 1000, floor random 10000]; private _args = [_uuid, _this]; - -TRACE_2("Sending Global Laser On Event",_uuid,_this); - ["ace_laserOn", _args] call CBA_fnc_globalEvent; - _uuid; diff --git a/addons/laser/functions/fnc_laserTargetPFH.sqf b/addons/laser/functions/fnc_laserTargetPFH.sqf index 8ee3396d94..c0805b1e6c 100644 --- a/addons/laser/functions/fnc_laserTargetPFH.sqf +++ b/addons/laser/functions/fnc_laserTargetPFH.sqf @@ -1,46 +1,27 @@ -/* - * Author: esteldunedain - * Maintains the tracked lasers, deleting any laser that is turned off - * - * Argument: - * PFEH Args - * - * Return Value: - * None - * - * Example: - * [[], 1]] call ace_laser_fnc_laserTargetPFH; - * - * Public: No - */ +//#define DEBUG_MODE_FULL #include "script_component.hpp" +TRACE_1("enter", _this); -params ["", "_pfhuid"]; +//TRACE_1("enter", _this); +params ["_args"]; +_args params ["_laserTarget", "_shooter", "_uuid"]; -GVAR(trackedLaserTargets) = GVAR(trackedLaserTargets) select { - _x params ["_targetObject", "_owner", "_laserUuid", "_laserCode"]; - if ((isNull _targetObject) || - {!(alive _targetObject)} || - {isNull _owner} || - {!(alive _owner)}) then { +if(isNull _laserTarget || !alive _shooter) exitWith { + [(_this select 1)] call CBA_fnc_removePerFrameHandler; + REM(GVAR(VanillaLasers), _laserTarget); - // Turn off the laser in ace_laser - [_laserUuid] call FUNC(laserOff); - TRACE_1("Laser off:", _laserUuid); - false - } else { - private _newCode = _owner getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE]; - if (_laserCode != _newCode) then { - TRACE_2("code change",_newCode,_laserCode); - [QGVAR(updateCode), [_laserUuid, _newCode]] call CBA_fnc_globalEvent; - _x set [3, _newCode]; - }; - true - }; + // Remove laseron + [_uuid] call FUNC(laserOff); }; -if (GVAR(trackedLaserTargets) isEqualTo []) then { - TRACE_1("ending pfeh",count GVAR(trackedLaserTargets)); - [_pfhuid] call CBA_fnc_removePerFrameHandler; - GVAR(pfehID) = -1; -}; +#ifdef DEBUG_MODE_FULL +// Iconize the location of the actual laserTarget +_pos = getPosASL _laserTarget; +drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLtoATL _pos), 0.75, 0.75, 0, "", 0.5, 0.025, "TahomaB"]; + +{ + drawLine3D [ASLtoATL (_x select 0), ASLtoATL (_x select 1), (_x select 2)]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", (_x select 2), ASLtoATL (_x select 1), 0.75, 0.75, 0, "", 0.5, 0.025, "TahomaB"]; +} forEach DRAW_LINES; +DRAW_LINES = []; +#endif diff --git a/addons/laser/functions/fnc_laser_init.sqf b/addons/laser/functions/fnc_laser_init.sqf new file mode 100644 index 0000000000..23f84c0bf5 --- /dev/null +++ b/addons/laser/functions/fnc_laser_init.sqf @@ -0,0 +1,33 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" +TRACE_1("enter", _this); + +PARAMS_1(_laserTarget); +private ["_uuid"]; + +// Add the target to the global targets array +// Everyone tracks them +// Add the laser localized to the laser array, and give it the default localized code +PUSH(GVAR(VanillaLasers), _laserTarget); + +// Check the vehicle, otherwise use the default +_laserTarget setVariable [QGVAR(code), ACE_DEFAULT_LASER_CODE, false]; +_laserTarget setVariable [QGVAR(beamSpread), ACE_DEFAULT_LASER_BEAMSPREAD, false]; +_laserTarget setVariable [QGVAR(waveLength), ACE_DEFAULT_LASER_WAVELENGTH, false]; + +// Clean the lasers of any null objects while we are here +REM(GVAR(VanillaLasers), objNull); + +if(!(local _laserTarget)) exitWith { }; + +// The target is local, so its on this client +if(!isDedicated) then { + // @TODO: Get ownership variables and set them on the vehicle + + _uuid = [(vehicle ACE_player), ACE_player, QFUNC(vanillaLaserSeekerHandler), ACE_DEFAULT_LASER_WAVELENGTH, ACE_DEFAULT_LASER_CODE, ACE_DEFAULT_LASER_BEAMSPREAD] call FUNC(laserOn); + _laserTarget setVariable [QGVAR(uuid), _uuid, false]; + [FUNC(laserTargetPFH), 0, [_laserTarget, ACE_player, _uuid]] call CBA_fnc_addPerFrameHandler; +} else { + // server side ownership of laser + _laserTarget setVariable [QGVAR(owner), nil, true]; +}; diff --git a/addons/laser/functions/fnc_onLaserDesignatorDraw.sqf b/addons/laser/functions/fnc_onLaserDesignatorDraw.sqf index 1b5a3e36ca..3161b2a220 100644 --- a/addons/laser/functions/fnc_onLaserDesignatorDraw.sqf +++ b/addons/laser/functions/fnc_onLaserDesignatorDraw.sqf @@ -1,28 +1,15 @@ -/* - * Author: Nou - * Update distance when rangefinder laser is on - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ace_laser_fnc_onLaserDesignatorDraw - * - * Public: No - */ +//#define DEBUG_MODE_FULL #include "script_component.hpp" +private ["_laserCode"]; -private _laserCode = ACE_player getVariable[QGVAR(code), ACE_DEFAULT_LASER_CODE]; -if (!isNil "_laserCode") then { +_laserCode = ACE_player getVariable[QGVAR(code), ACE_DEFAULT_LASER_CODE]; +if(!isNil "_laserCode") then { __LaserDesignatorIGUI_LaserCode ctrlSetText format["Code: %1", [_laserCode, 4, 0, false] call CBA_fnc_formatNumber]; }; -if (! (ctrlShown __LaserDesignatorIGUI_LaserOn) ) then { +if(! (ctrlShown __LaserDesignatorIGUI_LaserOn) ) then { // TODO: hide distance __LaserDesignatorIGUI_ACE_Distance ctrlSetText "----"; } else { __LaserDesignatorIGUI_ACE_Distance ctrlSetText (ctrlText __LaserDesignatorIGUI_CA_Distance); -}; +}; \ No newline at end of file diff --git a/addons/laser/functions/fnc_rotateVectLine.sqf b/addons/laser/functions/fnc_rotateVectLine.sqf index 17b771debe..76ff42c66c 100644 --- a/addons/laser/functions/fnc_rotateVectLine.sqf +++ b/addons/laser/functions/fnc_rotateVectLine.sqf @@ -1,25 +1,16 @@ -/* - * Author: ACE-Team - * - * - * Argument: - * None - * - * Return Value: - * None - * - * Example: - * call ace_laser_fnc_rotateVectline - * - * Public: No - */ - #include "script_component.hpp" +private ["_d", "_map", "_p", "_theta", "_u"]; +_map = _this select 0; +_theta = _this select 1; -params ["_map", "_theta"]; -_map params ["_p", "_p1", "_p2", "_q1", "_q2", "_u", "_d"]; -_q1 = +_q1; -_q2 = +_q2; +_p = _map select 0; +_p1 = _map select 1; +_p2 = _map select 2; + +_q1 = +(_map select 3); +_q2 = +(_map select 4); +_u = _map select 5; +_d = _map select 6; /* Step 4 */ _q2 set[0, (_q1 select 0) * cos(_theta) - (_q1 select 1) * sin(_theta)]; @@ -42,4 +33,4 @@ if (_d != 0) then { /* Inverse of step 1 */ _q1 = _q2 vectorAdd _p1; -_q1; +_q1; \ No newline at end of file diff --git a/addons/laser/functions/fnc_rotateVectLineGetMap.sqf b/addons/laser/functions/fnc_rotateVectLineGetMap.sqf index 8d7f0a7f2e..53ee35a288 100644 --- a/addons/laser/functions/fnc_rotateVectLineGetMap.sqf +++ b/addons/laser/functions/fnc_rotateVectLineGetMap.sqf @@ -1,30 +1,17 @@ -/* - * Author: ACE-Team - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_laser_fnc_rotateVectLineGetMap - * - * Public: No - */ - #include "script_component.hpp" -params ["_p", "_p1", "_p2"]; +private ["_p", "_theta", "_p1", "_p2", "_q1", "_q2", "_u", "_d"]; +_p = _this select 0; +_p1 = _this select 1; +_p2 = _this select 2; -private _q2 = []; +_q2 = []; /* Step 1 */ -private _q1 = _p vectorDiff _p1; -private _u = _p2 vectorDiff _p1; +_q1 = _p vectorDiff _p1; +_u = _p2 vectorDiff _p1; _u = vectorNormalized _u; -private _d = sqrt((_u select 1)*(_u select 1) + (_u select 2)*(_u select 2)); +_d = sqrt((_u select 1)*(_u select 1) + (_u select 2)*(_u select 2)); /* Step 2 */ if (_d != 0) then { @@ -40,4 +27,4 @@ _q1 set[0, (_q2 select 0) * _d - (_q2 select 2) * (_u select 0)]; _q1 set[1, (_q2 select 1)]; _q1 set[2, (_q2 select 0) * (_u select 0) + (_q2 select 2) * _d]; -[_p, _p1, _p2, _q1, _q2, _u, _d] +[_p, _p1, _p2, _q1, _q2, _u, _d] \ No newline at end of file diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf index 460add1c74..b6abefa691 100644 --- a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf +++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf @@ -1,119 +1,92 @@ /* * Author: Nou - * Searches for a laser spot given a seekers params. - * Provides the interface for Missile Guidance + * Turn a laser designator on. * * Arguments: - * 0: Position of seeker (ASL) - * 1: Direction vector (will be normalized) - * 2: Seeker FOV in degrees - * 3: Seeker max distance in meters - * 4: Seeker wavelength sensitivity range, [1550,1550] is common eye safe. - * 5: Seeker laser code. - * 6: Ignore 1 (e.g. Player's vehicle) + * 0: Position of seeker (ASL) + * 1: Direction vector (will be normalized) + * 2: Seeker FOV in degrees + * 3: Seeker wavelength sensitivity range, [1550,1550] is common eye safe. + * 4: Seeker laser code. * * Return Value: - * [Strongest compatible laser spot ASL pos, owner object] Nil array values if nothing found. - * - * Example: - * [getPosASL player, [0,1,0], 90, [1500, 1500], 1111, player] call ace_laser_fnc_seekerFindLaserSpot; - * - * Public: No + * Array, [Strongest compatible laser spot ASL pos, owner object] Nil array values if nothing found. */ -// #define DEBUG_MODE_FULL + #include "script_component.hpp" -BEGIN_COUNTER(seekerFindLaserSpot); +private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method"]; +private ["_emitterWavelength", "_laserCode", "_divergence", "_laser", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index"]; +private ["_testPos", "_finalBuckets", "_largest", "_largestIndex", "_finalBucket", "_owners", "_avgX", "_avgY", "_avgZ", "_count", "_maxOwner", "_maxOwnerIndex", "_finalOwner"]; +private ["_dir", "_seekerCos", "_seekerFov", "_testDotProduct", "_testPoint", "_testPointVector"]; -params ["_posASL", "_dir", "_seekerFov", "_seekerMaxDistnace", "_seekerWavelengths", "_seekerCode", ["_ignoreObj1", objNull]]; +_pos = _this select 0; +_dir = vectorNormalized (_this select 1); +_seekerFov = _this select 2; +_seekerWavelengths = _this select 3; +_seekerCode = _this select 4; -_dir = vectorNormalized _dir; -_seekerWavelengths params ["_seekerWavelengthMin", "_seekerWavelengthMax"]; -private _seekerCos = cos _seekerFov; -private _seekerMaxDistSq = _seekerMaxDistnace ^ 2; +_seekerCos = cos _seekerFov; -TRACE_6("",_posASL,_dir,_seekerFov,_seekerMaxDistnace,_seekerWavelengths,_seekerCode); +_spots = []; +_buckets = []; +_excludes = []; +_bucketIndex = 0; +_finalPos = nil; +_finalOwner = nil; -private _spots = []; -private _finalPos = nil; -private _finalOwner = objNull; - -// Go through all lasers in GVAR(laserEmitters) { - _x params ["_obj", "_owner", "_laserMethod", "_emitterWavelength", "_laserCode", "_divergence"]; - TRACE_6("laser",_obj,_owner,_laserMethod,_emitterWavelength,_laserCode,_divergence); - - if (alive _obj && {_emitterWavelength >= _seekerWavelengthMin} && {_emitterWavelength <= _seekerWavelengthMax} && {_laserCode == _seekerCode}) then { - - private _laser = []; - // Find laser pos and dir of the laser depending on type - if (IS_STRING(_laserMethod)) then { - _laser = _x call (missionNamespace getVariable [_laserMethod, []]); + _obj = _x select 0; + _owner = _x select 1; + _method = _x select 2; + _emitterWavelength = _x select 3; + _laserCode = _x select 4; + _divergence = _x select 5; + if(alive _obj && {_emitterWavelength >= (_seekerWavelengths select 0)} && {_emitterWavelength <= (_seekerWavelengths select 1)} && {_laserCode == _seekerCode}) then { + _laser = []; + if(IS_CODE(_method)) then { + _laser = _x call _method; } else { - if (IS_CODE(_laserMethod)) then { - _laser = _x call _laserMethod; + if(IS_STRING(_method)) then { + _laser = _x call (missionNamespace getVariable [_method, {}]); } else { - - if (IS_ARRAY(_laserMethod)) then { - if (count _laserMethod == 2) then { // [modelPosition, weaponName] for _obj - _laser = [AGLtoASL (_obj modelToWorldVisual (_laserMethod select 0)), _obj weaponDirection (_laserMethod select 1)]; + if(IS_ARRAY(_method)) then { + if(count _method == 2) then { + _laser = [ATLtoASL (_obj modelToWorldVisual (_method select 0)), _obj weaponDirection (_method select 1)]; } else { - if (count _laserMethod == 3) then { - _laser = [AGLtoASL (_obj modelToWorldVisual (_laserMethod select 0)), (AGLtoASL (_obj modelToWorldVisual (_laserMethod select 1))) vectorFromTo (AGLtoASL (_obj modelToWorldVisual (_laserMethod select 2)))]; + if(count _method == 3) then { + _laser = [ATLtoASL (_obj modelToWorldVisual (_method select 0)), (ATLtoASL (_obj modelToWorldVisual (_method select 1))) vectorFromTo (ATLtoASL (_obj modelToWorldVisual (_method select 2)))]; }; }; }; }; }; - TRACE_1("",_laser); - //Handle Weird Data Return - skips over this laser in the for loop - if ((_laser isEqualTo []) || {_laser isEqualTo [-1, -1]}) exitWith {WARNING_1("Bad Laser Return",_laser);}; - _laser params [["_laserPos", [], [[]], 3], ["_laserDir", [], [[]], 3]]; - - if (GVAR(dispersionCount) > 0) then { - // Shoot a cone with dispersion - ([_laserPos, _laserDir, _divergence, GVAR(dispersionCount), _obj] call FUNC(shootCone)) params ["", "", "_resultPositions"]; + //Handle Weird Data Return + if (_laser params [["_laserPos", [], [[]], 3], ["_laserDir", [], [[]], 3]]) then { + _res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone); { - private _testPoint = _x select 0; - private _testPointVector = _posASL vectorFromTo _testPoint; - private _testDotProduct = _dir vectorDotProduct _testPointVector; - if ((_testDotProduct > _seekerCos) && {(_testPoint vectorDistanceSqr _posASL) < _seekerMaxDistSq}) then { + _testPoint = _x select 0; + _testPointVector = vectorNormalized (_testPoint vectorDiff _pos); + _testDotProduct = _dir vectorDotProduct _testPointVector; + if(_testDotProduct > _seekerCos) then { _spots pushBack [_testPoint, _owner]; }; - } forEach _resultPositions; - } else { - // Shoot a single perfect ray from source to target (note, increased chance to "miss" on weird objects like bushes / rocks) - ([_laserPos, _laserDir, _obj] call FUNC(shootRay)) params ["_resultPos", "_distance"]; - TRACE_2("spot",_resultPos,_distance); - if (_distance > 0) then { - private _testPointVector = _posASL vectorFromTo _resultPos; - private _testDotProduct = _dir vectorDotProduct _testPointVector; - if ((_testDotProduct > _seekerCos) && {(_resultPos vectorDistanceSqr _posASL) < _seekerMaxDistSq}) then { - _spots pushBack [_resultPos, _owner]; - }; - }; + } forEach (_res select 2); }; }; -} forEach (GVAR(laserEmitters) select 2); // Go through all values in hash +} forEach (GVAR(laserEmitters) select 2); -TRACE_2("",count _spots, _spots); - -if ((count _spots) > 0) then { - private _bucketList = nil; - private _bucketPos = nil; - private _c = 0; - private _buckets = []; - private _excludes = []; - private _bucketIndex = 0; - - // Put close points together into buckets +if((count _spots) > 0) then { + _bucketPos = nil; + _bucketList = nil; + _c = 0; while { count(_spots) != count(_excludes) && _c < (count _spots) } do { scopeName "mainSearch"; { - if (!(_forEachIndex in _excludes)) then { - private _index = _buckets pushBack [_x, [_x]]; + if(!(_forEachIndex in _excludes)) then { + _index = _buckets pushBack [_x, [_x]]; _excludes pushBack _forEachIndex; _bucketPos = _x select 0; _bucketList = (_buckets select _index) select 1; @@ -121,9 +94,9 @@ if ((count _spots) > 0) then { }; } forEach _spots; { - if (!(_forEachIndex in _excludes)) then { - private _testPos = (_x select 0); - if ((_testPos vectorDistanceSqr _bucketPos) <= 100) then { + if(!(_forEachIndex in _excludes)) then { + _testPos = (_x select 0); + if(_testPos vectorDistanceSqr _bucketPos <= 100) then { _bucketList pushBack _x; _excludes pushBack _forEachIndex; }; @@ -131,72 +104,55 @@ if ((count _spots) > 0) then { } forEach _spots; _c = _c + 1; }; - - TRACE_1("",_buckets); - - private _finalBuckets = []; - private _largest = -1; - private _largestIndex = 0; + _finalBuckets = []; + _largest = -1; + _largestIndex = 0; { - // find bucket with largest number of points we can see - private _index = _finalBuckets pushBack []; + _index = _finalBuckets pushBack []; _bucketList = _finalBuckets select _index; { - private _testPos = (_x select 0) vectorAdd [0,0,0.05]; - private _testIntersections = lineIntersectsSurfaces [_posASL, _testPos, _ignoreObj1]; - if ([] isEqualTo _testIntersections) then { + _testPos = (_x select 0); + if(!terrainIntersectASL [_pos, _testPos] && {!lineIntersects [_pos, _testPos]}) then { _bucketList pushBack _x; }; } forEach (_x select 1); - if ((count _bucketList) > _largest) then { + if((count _bucketList) > _largest) then { _largest = (count _bucketList); _largestIndex = _index; }; } forEach _buckets; - private _finalBucket = _finalBuckets select _largestIndex; - private _ownersHash = [] call CBA_fnc_hashCreate; + _finalBucket = _finalBuckets select _largestIndex; + _owners = [] call CBA_fnc_hashCreate; - TRACE_2("",_finalBucket,_finalBuckets); - - if (count _finalBucket > 0) then { - // merge all points in the best bucket into an average point and find effective owner - _finalPos = [0,0,0]; + if(count _finalBucket > 0) then { + _avgX = 0; + _avgY = 0; + _avgZ = 0; { - _x params ["_xPos", "_owner"]; - _finalPos = _finalPos vectorAdd _xPos; - if ([_ownersHash, _owner] call CBA_fnc_hashHasKey) then { - private _count = [_ownersHash, _owner] call CBA_fnc_hashGet; - [_ownersHash, _owner, _count + 1] call CBA_fnc_hashSet; + //player sideChat format["x: %1", _x]; + _avgX = _avgX + ((_x select 0) select 0); + _avgY = _avgY + ((_x select 0) select 1); + _avgZ = _avgZ + ((_x select 0) select 2); + _owner = _x select 1; + if ([_owners, _owner] call CBA_fnc_hashHasKey) then { + private _count = [_owners, _owner] call CBA_fnc_hashGet; + [_owners, _owner, _count + 1] call CBA_fnc_hashSet; } else { - [_ownersHash, _owner, 1] call CBA_fnc_hashSet; + [_owners, _owner, 1] call CBA_fnc_hashSet; }; } forEach _finalBucket; - - _finalPos = _finalPos vectorMultiply (1 / (count _finalBucket)); - - private _maxOwnerCount = -1; - - [_ownersHash, { - //IGNORE_PRIVATE_WARNING ["_key", "_value"]; - if (_value > _maxOwnerCount) then { - _finalOwner = _key; + _count = count _finalBucket; + _finalPos = [_avgX/_count, _avgY/_count, _avgZ/_count]; + _maxOwner = -1; + _maxOwnerIndex = 0; + { + if((_owners select 1) select _forEachIndex > _maxOwner) then { + _maxOwner = (_owners select 1) select _forEachIndex; + _maxOwnerIndex = _forEachIndex; }; - }] call CBA_fnc_hashEachPair; + } forEach (_owners select 0); + _finalOwner = (_owners select 0) select _maxOwnerIndex; }; }; - -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"]; -} 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]]; -}; -#endif - -TRACE_2("return",_finalPos,_finalOwner); -if (isNil "_finalPos") exitWith {[nil, _finalOwner]}; -[_finalPos, _finalOwner]; +[_finalPos, _owner]; diff --git a/addons/laser/functions/fnc_shootCone.sqf b/addons/laser/functions/fnc_shootCone.sqf index ceb45ba24b..a9e1f3e50d 100644 --- a/addons/laser/functions/fnc_shootCone.sqf +++ b/addons/laser/functions/fnc_shootCone.sqf @@ -1,71 +1,68 @@ -/* - * Author: Nou - * Shoots multiple rays in a dispersion pattern - * - * Arguments: - * 0: Origin position ASL - * 1: Direction (normalized) - * 2: Divergence (mils) - * 3: Count at each divergence level - * 4: Ignore vehicle 1 (e.g. Player's vehicle) - * - * Return Value: - * [_longestReturn, _shortestReturn, _resultPositions] - * - * Example: - * [getPosASL player, [0,1,0]] call ace_laser_fnc_shootCone; - * - * Public: No - */ -//#define DEBUG_MODE_FULL #include "script_component.hpp" +//#define DEBUG_MODE_FULL +private ["_i", "_divergence","_pos","_vec","_longestReturn","_shortestReturn","_resultPositions","_p1","_p2","_p","_v","_cp","_vecRotateMap","_result", "_resultPos","_distance","_count","_pos2","_radOffset","_offset","_offsetPos","_offsetVector"]; +_divergence = 0.3; +_pos = _this select 0; +_vec = _this select 1; +if(count _this > 2) then { + _divergence = _this select 2; +}; +_count = 3; +if(count _this > 3) then { + _count = _this select 3; +}; +_longestReturn = -1000000000; +_shortestReturn = 1000000000; +_resultPositions = []; +_p1 = [0,0,0]; +_p2 = +_vec; +_p = (_vec call CBA_fnc_vect2polar); +_v = [(_p select 0), (_p select 1), (_p select 2)+90] call CBA_fnc_polar2vect; +_cp = _vec vectorCrossProduct _v; -BEGIN_COUNTER(shootCone); +_vecRotateMap = [_cp, _p1, _p2] call FUNC(rotateVectLineGetMap); -params ["_pos", "_vec", ["_divergence", 0.3], ["_count", 3], ["_ignoreObj1", objNull]]; - -private _longestReturn = -1000000000; -private _shortestReturn = 1000000000; -private _resultPositions = []; -private _p1 = [0,0,0]; -private _p2 = +_vec; -private _p = (_vec call CBA_fnc_vect2polar); -private _v = [(_p select 0), (_p select 1), (_p select 2)+90] call CBA_fnc_polar2vect; -private _cp = _vec vectorCrossProduct _v; - -private _vecRotateMap = [_cp, _p1, _p2] call FUNC(rotateVectLineGetMap); - -// Check first with a perfect ray to the center -private _result = [_pos, _vec, _ignoreObj1] call FUNC(shootRay); -private _resultPos = _result select 0; - -if (!isNil "_resultPos") then { - private _distance = _result select 1; - if (_distance < _shortestReturn) then { _shortestReturn = _distance; }; - if (_distance > _longestReturn) then { _longestReturn = _distance; }; +_result = [_pos, _vec] call FUNC(shootRay); +_resultPos = _result select 0; +if(!isNil "_resultPos") then { + _distance = _result select 1; + if(_distance < _shortestReturn) then { + _shortestReturn = _distance; + }; + if(_distance > _longestReturn) then { + _longestReturn = _distance; + }; _resultPositions pushBack _result; +#ifdef DEBUG_MODE_FULL + // DRAW_LINES set[(count DRAW_LINES), [_pos, _resultPos, [0, 1, 0, 1]]]; + drawLine3D [ASLtoATL _pos, ASLtoATL _resultPos, [1,0,0,1]]; +#endif }; -private _pos2 = _pos vectorAdd (_vec vectorMultiply 1000); -// Try at 3 radius (full, half, quarter of specified divergence) -{ - private _radOffset = random 360; - for "_i" from 1 to ceil(_count*_x) do { // Will always do at least 1 - private _offset = [_vecRotateMap, (((360/_count)*_i)+_radOffset) mod 360] call FUNC(rotateVectLine); - private _offsetPos = _pos2 vectorAdd (_offset vectorMultiply (_divergence*_x)); - private _offsetVector = _pos vectorFromTo _offsetPos; - _result = [_pos, _offsetVector, _ignoreObj1] call FUNC(shootRay); +_pos2 = _pos vectorAdd (_vec vectorMultiply 1000); +{ + for "_i" from 0 to ceil(_count*_x) do { + _radOffset = random 360; + _offset = [_vecRotateMap, (((360/_count)*_i)+_radOffset) mod 360] call FUNC(rotateVectLine); + _offsetPos = _pos2 vectorAdd (_offset vectorMultiply (_divergence*_x)); + _offsetVector = _pos vectorFromTo _offsetPos; + _result = [_pos, _offsetVector] call FUNC(shootRay); _resultPos = _result select 0; - if (!isNil "_resultPos") then { - private _distance = _result select 1; - if (_distance < _shortestReturn) then { _shortestReturn = _distance; }; - if (_distance > _longestReturn) then { _longestReturn = _distance; }; + if(!isNil "_resultPos") then { + _distance = _result select 1; + if(_distance < _shortestReturn) then { + _shortestReturn = _distance; + }; + if(_distance > _longestReturn) then { + _longestReturn = _distance; + }; _resultPositions pushBack _result; +#ifdef DEBUG_MODE_FULL + // DRAW_LINES set[(count DRAW_LINES), [_pos, _resultPos, [0, 1, 0, 1]]]; + drawLine3D [ASLtoATL _pos, ASLtoATL _resultPos, [1,0,0,1]]; +#endif }; }; } forEach [1,0.5,0.25]; - -END_COUNTER(shootCone); - -[_longestReturn, _shortestReturn, _resultPositions]; +[_longestReturn, _shortestReturn, _resultPositions]; \ No newline at end of file diff --git a/addons/laser/functions/fnc_shootRay.sqf b/addons/laser/functions/fnc_shootRay.sqf index ceae27fe77..51b5e55f17 100644 --- a/addons/laser/functions/fnc_shootRay.sqf +++ b/addons/laser/functions/fnc_shootRay.sqf @@ -1,50 +1,24 @@ -/* - * Author: Nou, PabstMirror - * Shoots a ray from a source to a direction and finds first intersction and distance - * - * Arguments: - * 0: Origin position ASL - * 1: Direction (normalized) - * 2: Ignore 1 (e.g. Player's vehicle) - * 2: Ignore 2 (e.g. Player's vehicle) - * - * Return Value: - * [posASL, distance] - pos will be nil if no intersection - * - * Example: - * [getPosASL player, [0,1,0], player] call ace_laser_fnc_shootRay; - * - * Public: No - */ #include "script_component.hpp" -BEGIN_COUNTER(shootRay); - -params ["_posASL", "_dir", ["_ignoreVehicle1", objNull], ["_ignoreVehicle2", objNull]]; -// TRACE_2("ray origin:", _posASL, _dir); - -private _distance = 0; -private _resultPos = nil; - -private _farPoint = _posASL vectorAdd (_dir vectorMultiply 10000); -private _intersects = lineIntersectsSurfaces [_posASL, _farPoint, _ignoreVehicle1, _ignoreVehicle2]; - -if (!(_intersects isEqualTo [])) then { - (_intersects select 0) params ["_intersectPosASL", "", "_intersectObject"]; - // Move back slightly to prevents issues with it going below terrain - _distance = (_posASL vectorDistance _intersectPosASL) - 0.005; - _resultPos = _posASL vectorAdd (_dir vectorMultiply _distance); -}; - -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]]; -}; -#endif - -END_COUNTER(shootRay); -[_resultPos, _distance]; +private ["_pos", "_vec", "_distance", "_resultPos", "_fidelity", "_lastPos", "_i", "_nextPos"]; +scopeName "main"; +_pos = _this select 0; +_vec = _this select 1; +_distance = 0; +_resultPos = nil; +_fidelity = [1000,100,10,1,0.1]; +_lastPos = +_pos; +{ + scopeName "mainSearch"; + for "_i" from 1 to 10 do { + _nextPos = _lastPos vectorAdd (_vec vectorMultiply _x); + if(terrainIntersectASL [_lastPos, _nextPos] || {lineIntersects [_lastPos, _nextPos]}) then { + _resultPos = _lastPos; + breakTo "mainSearch"; + } else { + _distance = _distance + _x; + _lastPos = _nextPos; + }; + }; +} forEach _fidelity; +[_resultPos, _distance]; \ No newline at end of file diff --git a/addons/laser/functions/fnc_unitTurretCanLockLaser.sqf b/addons/laser/functions/fnc_unitTurretCanLockLaser.sqf new file mode 100644 index 0000000000..9fe478f623 --- /dev/null +++ b/addons/laser/functions/fnc_unitTurretCanLockLaser.sqf @@ -0,0 +1,21 @@ +/* + * Author: jaynus + * Checks if the turret occupied by the given unit can lock a laser designator and select laser code. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Has designator? + */ +#include "script_component.hpp" + +EXPLODE_1_PVT(_this,_unit); + +// Get the player turret path +private ["_turret","_config","_turretConfig"]; +_turret = [_unit] call EFUNC(common,getTurretIndex); +_config = configFile >> "CfgVehicles" >> typeOf vehicle _unit; +_turretConfig = [_config, _turret] call EFUNC(common,getTurretConfigPath); + +getNumber (_turretConfig >> QGVAR(CanLockLaser)) > 0 diff --git a/addons/laser/functions/fnc_vanillaLaserSeekerHandler.sqf b/addons/laser/functions/fnc_vanillaLaserSeekerHandler.sqf new file mode 100644 index 0000000000..7de303dee7 --- /dev/null +++ b/addons/laser/functions/fnc_vanillaLaserSeekerHandler.sqf @@ -0,0 +1,26 @@ +/* + * Author: jaynus + * Handler function for laser network code. + * + * Arguments: + * 0: Emitter + * 1: Owner + * + * Return Value: + * [position, direction] + */ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +private ["_emmiter", "_owner", "_gunnerInfo", "_turretInfo", "_povPos", "_povDir"]; + +_emmiter = _this select 0; +_owner = _this select 1; + +// Not in a vehicle.... +// @TODO: handle lasering from turrets +if( (vehicle _emmiter) == _emmiter && alive _emmiter && (currentWeapon _emmiter) == "LaserDesignator") exitWith { + [(eyePos _emmiter), (eyeDirection _emmiter)] +}; + +[-1,-1] \ No newline at end of file diff --git a/addons/laser/initKeybinds.sqf b/addons/laser/initKeybinds.sqf index 418b062fec..8ae9d05e9f 100644 --- a/addons/laser/initKeybinds.sqf +++ b/addons/laser/initKeybinds.sqf @@ -1,16 +1,27 @@ - - ["ACE3 Equipment", QGVAR(LaserCodeUp), localize LSTRING(laserCodeUp), { - [1] call FUNC(keyLaserCodeChange); + if( EGVAR(laser_selfdesignate,active) + || + { (currentWeapon ACE_player) == "Laserdesignator" && (call CBA_fnc_getFoV) select 1 > 5 } // If laserdesignator & FOV, we are in scope. + || + { [ACE_player] call FUNC(unitTurretCanLockLaser) } + ) then { + [] call FUNC(keyLaserCodeUp); + }; }, {false}, [16, [false, true, true]], false, 0] call CBA_fnc_addKeybind; // (ALT+CTRL+Q) ["ACE3 Equipment", QGVAR(LaserCodeDown), localize LSTRING(laserCodeDown), { - - [-1] call FUNC(keyLaserCodeChange); + if( EGVAR(laser_selfdesignate,active) + || + { (currentWeapon ACE_player) == "Laserdesignator" && (call CBA_fnc_getFoV) select 1 > 5 } // If laserdesignator & FOV, we are in scope. + || + { [ACE_player] call FUNC(unitTurretCanLockLaser) } + ) then { + [] call FUNC(keyLaserCodeDown); + }; }, {false}, [18, [false, true, true]], false, 0] call CBA_fnc_addKeybind; // (ALT+CTRL+E) diff --git a/addons/laser/script_component.hpp b/addons/laser/script_component.hpp index af562536b6..a1c69183df 100644 --- a/addons/laser/script_component.hpp +++ b/addons/laser/script_component.hpp @@ -2,9 +2,9 @@ #define COMPONENT_BEAUTIFIED Laser #include "\z\ace\addons\main\script_mod.hpp" -// #define DRAW_LASER_INFO // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_LASER @@ -18,6 +18,9 @@ #include "\z\ace\addons\main\script_macros.hpp" +#define FIREMODE_DIRECT_LOAL 1 + + #define __LaserDesignatorIGUI (uiNamespace getVariable ["ACE_RscOptics_LaserDesignator", nil]) #define __LaserDesignatorIGUI_LaserCode (__LaserDesignatorIGUI displayCtrl 123001) #define __LaserDesignatorIGUI_ACE_Distance (__LaserDesignatorIGUI displayCtrl 123002) diff --git a/addons/laser/stringtable.xml b/addons/laser/stringtable.xml index aa09f5de0e..4a478096d0 100644 --- a/addons/laser/stringtable.xml +++ b/addons/laser/stringtable.xml @@ -1,17 +1,6 @@ - + - - Laser Dispersion Simulation Count - レーザーの分散シミュレート数 - Laserstreuung-Simulationszähler - 레이저 분산 시뮬레이션 수 - Wskaźnik poziomu rozproszenia wiązki lasera - Compte de la simulation de la dispersion du laser - Contatore Simulazione Dispersione Laser - 雷射散射模拟计算 - 雷射散射模擬計算 - Laser Code Lasercode @@ -23,10 +12,6 @@ Código del láser Laser kód Codice laser - レーザ コード - 레이저 코드 - 雷射码 - 雷射碼 Laser - Cycle Code Up @@ -39,10 +24,6 @@ Láser - Aumentar código Laser - Kód + Codice laser + - レーザ - コードの数値を増やす - 레이저 - 코드 순환 위 - 雷射 - 循环切换雷射码 上 - 雷射 - 循環切換雷射碼 上 Laser - Cycle Code Down @@ -55,10 +36,6 @@ Láser - Reducir código Laser - Kód - Codice laser - - レーザ - コードの数値を減らす - 레이저 - 코드 순환 아래 - 雷射 - 循环切换雷射码 下 - 雷射 - 循環切換雷射碼 下 diff --git a/addons/laser_selfdesignate/$PBOPREFIX$ b/addons/laser_selfdesignate/$PBOPREFIX$ new file mode 100644 index 0000000000..821ffd07ea --- /dev/null +++ b/addons/laser_selfdesignate/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\laser_selfdesignate \ No newline at end of file diff --git a/addons/laser_selfdesignate/CfgEventhandlers.hpp b/addons/laser_selfdesignate/CfgEventhandlers.hpp new file mode 100644 index 0000000000..0458ace904 --- /dev/null +++ b/addons/laser_selfdesignate/CfgEventhandlers.hpp @@ -0,0 +1,26 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_pre_init)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_post_init)); + }; +}; + +class Extended_Init_EventHandlers { + class Helicopter { + class ADDON { + init = QUOTE(_this call DFUNC(initDesignatorActions)); + }; + }; +}; diff --git a/addons/laser_selfdesignate/CfgVehicles.hpp b/addons/laser_selfdesignate/CfgVehicles.hpp new file mode 100644 index 0000000000..8eb84326c5 --- /dev/null +++ b/addons/laser_selfdesignate/CfgVehicles.hpp @@ -0,0 +1,49 @@ +class CfgVehicles { + class AllVehicles; + class Air: AllVehicles { + class Turrets; + }; + + class Helicopter: Air { + class Turrets { + class MainTurret; + }; + }; + + class Helicopter_Base_F: Helicopter {}; + + class Heli_Attack_01_base_F: Helicopter_Base_F {}; + + class B_Heli_Attack_01_F: Heli_Attack_01_base_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + GVAR(Enabled) = 0; // Enable laser self-designation + }; + }; + }; + + class Plane: Air {}; + class Plane_Base_F: Plane { + class Turrets { + class CopilotTurret; + }; + }; + + /* @TODO: LGB GBU + class Plane_CAS_01_base_F: Plane_Base_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + GVAR(Enabled) = 1; // Enable laser self-designation + }; + }; + }; + + class Plane_CAS_02_base_F: Plane_Base_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + GVAR(Enabled) = 1; // Enable laser self-designation + }; + }; + }; + */ +}; diff --git a/addons/laser_selfdesignate/CfgWeapons.hpp b/addons/laser_selfdesignate/CfgWeapons.hpp new file mode 100644 index 0000000000..802e2ba6a5 --- /dev/null +++ b/addons/laser_selfdesignate/CfgWeapons.hpp @@ -0,0 +1,11 @@ +class CfgWeapons { + // Disable locking unless newb mode + class LauncherCore; + class RocketPods: LauncherCore { + // canLock = 1; + }; + + class missiles_DAGR: RocketPods { + //canLock = 1; + }; +}; diff --git a/addons/laser_selfdesignate/README.md b/addons/laser_selfdesignate/README.md new file mode 100644 index 0000000000..75b3d2753b --- /dev/null +++ b/addons/laser_selfdesignate/README.md @@ -0,0 +1,12 @@ +ace_laser_selfdesignate +======================= + +Allows gunners to lase their own targets. + + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [walterpearce](https://github.com/walterpearce) +- [NouberNou](https://github.com/NouberNou) diff --git a/addons/laser_selfdesignate/XEH_PREP.hpp b/addons/laser_selfdesignate/XEH_PREP.hpp new file mode 100644 index 0000000000..6c05680db4 --- /dev/null +++ b/addons/laser_selfdesignate/XEH_PREP.hpp @@ -0,0 +1,7 @@ + +PREP(initDesignatorActions); +PREP(laserHudDesignateOn); +PREP(laserHudDesignateOff); +PREP(unitTurretHasDesignator); + +PREP(findLaserSource); diff --git a/addons/quickmount/XEH_preStart.sqf b/addons/laser_selfdesignate/XEH_post_init.sqf similarity index 57% rename from addons/quickmount/XEH_preStart.sqf rename to addons/laser_selfdesignate/XEH_post_init.sqf index 022888575e..6eccf9d1dd 100644 --- a/addons/quickmount/XEH_preStart.sqf +++ b/addons/laser_selfdesignate/XEH_post_init.sqf @@ -1,3 +1,2 @@ #include "script_component.hpp" -#include "XEH_PREP.hpp" diff --git a/addons/hellfire/XEH_preStart.sqf b/addons/laser_selfdesignate/XEH_preStart.sqf similarity index 100% rename from addons/hellfire/XEH_preStart.sqf rename to addons/laser_selfdesignate/XEH_preStart.sqf diff --git a/addons/nlaw/XEH_preInit.sqf b/addons/laser_selfdesignate/XEH_pre_init.sqf similarity index 52% rename from addons/nlaw/XEH_preInit.sqf rename to addons/laser_selfdesignate/XEH_pre_init.sqf index b47cf6628d..f957638ba2 100644 --- a/addons/nlaw/XEH_preInit.sqf +++ b/addons/laser_selfdesignate/XEH_pre_init.sqf @@ -2,8 +2,10 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; + +GVAR(active) = false; + +FUNC(getPosASL) = {visiblePositionASL (_this select 0)}; ADDON = true; diff --git a/optionals/nouniformrestrictions/config.cpp b/addons/laser_selfdesignate/config.cpp similarity index 73% rename from optionals/nouniformrestrictions/config.cpp rename to addons/laser_selfdesignate/config.cpp index 2b658fdb85..e95d754809 100644 --- a/optionals/nouniformrestrictions/config.cpp +++ b/addons/laser_selfdesignate/config.cpp @@ -6,13 +6,13 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; + requiredAddons[] = {"ace_laser"}; author = ECSTRING(common,ACETeam); - authors[] = {"654wak654", "jonpas"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; }; -#include "CfgEventHandlers.hpp" +#include "CfgEventhandlers.hpp" +#include "CfgWeapons.hpp" #include "CfgVehicles.hpp" diff --git a/addons/laser_selfdesignate/functions/fnc_findLaserSource.sqf b/addons/laser_selfdesignate/functions/fnc_findLaserSource.sqf new file mode 100644 index 0000000000..ba2e6a4100 --- /dev/null +++ b/addons/laser_selfdesignate/functions/fnc_findLaserSource.sqf @@ -0,0 +1,23 @@ +/* + * Author: jaynus + * Handler function for laser network code. + * + * Arguments: + * 0: Emitter + * + * Return Value: + * 0: position + * 1: direction + * + * Public: No + */ +#include "script_component.hpp" + +private ["_gunnerInfo", "_turretInfo"]; +params ["_emmiter"]; + +_gunnerInfo = [_emmiter, (currentWeapon _emmiter)] call CBA_fnc_getFirer; +_turretInfo = [_emmiter, _gunnerInfo select 1] call EFUNC(common,getTurretDirection); +_turretInfo params [["_povPos", -1], ["_povDir", -1]]; + +[_povPos, _povDir] diff --git a/addons/laser_selfdesignate/functions/fnc_initDesignatorActions.sqf b/addons/laser_selfdesignate/functions/fnc_initDesignatorActions.sqf new file mode 100644 index 0000000000..5afc581619 --- /dev/null +++ b/addons/laser_selfdesignate/functions/fnc_initDesignatorActions.sqf @@ -0,0 +1,59 @@ +/* + * Author: esteldunedain + * Initializes the actions for turning on/off the laser for vehicles that have them + * + * Arguments: + * 0: Vehicle + * + * Return Value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +params ["_vehicle"]; + +// Add action to class if it is not already done +private ["_type", "_initializedClasses"]; +_type = typeOf _vehicle; +_initializedClasses = GETGVAR(initializedClasses,[]); + +// do nothing if the class is already initialized +if (_type in _initializedClasses) exitWith {}; +_initializedClasses pushBack _type; +GVAR(initializedClasses) = _initializedClasses; + +{ + private ["_turretConfig","_onAction","_offAction"]; + _turretConfig = [configFile >> "CfgVehicles" >> _type, _x] call EFUNC(common,getTurretConfigPath); + + if (getNumber (_turretConfig >> QGVAR(Enabled)) == 1) exitWith { + // @todo: Add the state variables to the vehicle, instead of to the client + // e.g.: _vehicle setVariable [format ["%1_%2", QGVAR(active), _x], false]; + + // Add actions + _onAction = [QGVAR(LaserOn), localize LSTRING(DesignatorOn), "", + { + // Statement + _this call FUNC(laserHudDesignateOn) + }, + { + // Condition + !GVAR(active) && {[ACE_player] call FUNC(unitTurretHasDesignator)} + }] call EFUNC(interact_menu,createAction); + + _offAction = [QGVAR(LaserOff), localize LSTRING(DesignatorOff), "", + { + // Statement + _this call FUNC(laserHudDesignateOff) + }, + { + // Condition + GVAR(active) && {[ACE_player] call FUNC(unitTurretHasDesignator)} + }] call EFUNC(interact_menu,createAction); + + [_type, 1, ["ACE_SelfActions"], _onAction] call EFUNC(interact_menu,addActionToClass); + [_type, 1, ["ACE_SelfActions"], _offAction] call EFUNC(interact_menu,addActionToClass); + }; +} forEach allTurrets _vehicle; diff --git a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOff.sqf b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOff.sqf new file mode 100644 index 0000000000..be1793668d --- /dev/null +++ b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOff.sqf @@ -0,0 +1,29 @@ +/* + * Author: jaynus + * Turns off passed laser self designation. + * + * Arguments: + * 0: Shooter, player shooting the laser + * 1: LaserUUID, the UUID of the laser returned by EFUNC(laser,laserOn) + * 2: Local laser target, unused. + * + * Return Value: + * True + */ +#include "script_component.hpp" + +if( (count _this) > 2) then { + params ["", "_laserUuid"]; + [_laserUuid] call EFUNC(laser,laserOff); + // @TODO: Nou gets to field all tickets about missing lasers. + //deleteVehicle _localLaserTarget; +}; + +GVAR(active) = false; + +if(!isNil QGVAR(selfDesignateHandle)) then { + [GVAR(selfDesignateHandle)] call CBA_fnc_removePerFrameHandler; + GVAR(selfDesignateHandle) = nil; +}; + +true diff --git a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf new file mode 100644 index 0000000000..d77360ce49 --- /dev/null +++ b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf @@ -0,0 +1,90 @@ +/* + * Author: jaynus + * Turns on laser self designation from this vehicle based on the turret. + * There are no arguments, because it is all strictly based on the users vehicle. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +TRACE_1("enter", _this); + +#define FCS_UPDATE_DELAY 1 + +FUNC(laserHudDesignatePFH) = { + private ["_strongestResultPos", "_args", "_localLaserTarget", "_laserResultPosition", "_laserResult", "_shooter", "_vehicle", "_weapon", "_gunnerInfo", "_turretInfo", "_pov", "_gunBeg", "_gunEnd", "_povPos", "_povDir", "_result", "_resultPositions", "_firstResult", "_forceUpdateTime"]; + params ["_args"]; + _args params ["_shooter", "_localLaserTarget"]; + _vehicle = vehicle _shooter; + TRACE_1("", _args); + + if((vehicle _shooter) == _shooter || {!alive _shooter} || {isNull _vehicle} || {!GVAR(active)} ) exitWith { + _args call FUNC(laserHudDesignateOff); + }; + if(!([_shooter] call FUNC(unitTurretHasDesignator)) ) exitWith { + _args call FUNC(laserHudDesignateOff); + }; + + if( (count _args) < 4) then { + _args set[3, diag_tickTime + FCS_UPDATE_DELAY]; + }; + _forceUpdateTime = _args select 3; + + // @TODO: We don't have anything here we need to do the calculations for right now + /* + + _gunnerInfo = [_vehicle, (currentWeapon _vehicle)] call CBA_fnc_getFirer; + _turretInfo = [_vehicle, _gunnerInfo select 1] call EFUNC(common,getTurretDirection); + _povPos = _turretInfo select 0; + + _laserCode = (vehicle ACE_player) getVariable["ace_laser_code", ACE_DEFAULT_LASER_CODE]; + _waveLength = (vehicle ACE_player) getVariable["ace_laser_waveLength", ACE_DEFAULT_LASER_WAVELENGTH]; + + + _laserResult = [_povPos, [_waveLength,_waveLength], _laserCode] call EFUNC(laser,seekerFindLaserSpot); + _laserResultPosition = _laserResult select 0; + TRACE_1("Search", _laserResult); + + if((count _laserResult) > 0) then { + // @TODO: Nou gets to field all tickets about missing lasers. + //_localLaserTarget setPosASL _laserResultPosition; + }; + */ + + if(diag_tickTime > _forceUpdateTime) then { + ["ace_fcs_forceUpdate", []] call ace_common_fnc_localEvent; + _args set[3, diag_tickTime + FCS_UPDATE_DELAY]; + }; + + _this set[0, _args]; +}; + +private ["_laserTarget", "_handle", "_vehicle", "_laserUuid", "_waveLength", "_beamSpread", "_laserCode"]; + +if(!GVAR(active)) then { + GVAR(active) = true; + + TRACE_1("Activating laser", ""); + + // Get the self-designation variables, or use defaults + _laserCode = (vehicle ACE_player) getVariable["ace_laser_code", ACE_DEFAULT_LASER_CODE]; + _waveLength = (vehicle ACE_player) getVariable["ace_laser_waveLength", ACE_DEFAULT_LASER_WAVELENGTH]; + _beamSpread = (vehicle ACE_player) getVariable["ace_laser_beamSpread", ACE_DEFAULT_LASER_BEAMSPREAD]; + + _laserUuid = [(vehicle ACE_player), ACE_player, QFUNC(findLaserSource), _waveLength, _laserCode, _beamSpread] call EFUNC(laser,laserOn); + + // @TODO: Create the local target for the players side + // @TODO: Nou gets to field all tickets about missing lasers. + //_localLaserTarget = "LaserTargetW" createVehicleLocal (getpos ACE_player); + + GVAR(selfDesignateHandle) = [FUNC(laserHudDesignatePFH), 0.1, [ACE_player, _laserUuid, nil]] call CBA_fnc_addPerFrameHandler; +} else { + [] call FUNC(laserHudDesignateOff); + [] call FUNC(laserHudDesignateOn); +}; diff --git a/addons/laser_selfdesignate/functions/fnc_unitTurretHasDesignator.sqf b/addons/laser_selfdesignate/functions/fnc_unitTurretHasDesignator.sqf new file mode 100644 index 0000000000..46c3afaaa3 --- /dev/null +++ b/addons/laser_selfdesignate/functions/fnc_unitTurretHasDesignator.sqf @@ -0,0 +1,23 @@ +/* + * Author: esteldunedain + * Checks if the turret occupied by the given unit has a laser designator + * + * Arguments: + * 0: Unit + * + * Return Value: + * Has unit designator + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit"]; + +// Get the player turret path +private ["_turret","_config","_turretConfig"]; +_turret = [_unit] call EFUNC(common,getTurretIndex); +_config = configFile >> "CfgVehicles" >> typeOf vehicle _unit; +_turretConfig = [_config, _turret] call EFUNC(common,getTurretConfigPath); + +getNumber (_turretConfig >> QGVAR(Enabled)) > 0 diff --git a/addons/laser_selfdesignate/functions/script_component.hpp b/addons/laser_selfdesignate/functions/script_component.hpp new file mode 100644 index 0000000000..845a51c186 --- /dev/null +++ b/addons/laser_selfdesignate/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\laser_selfdesignate\script_component.hpp" diff --git a/addons/laser_selfdesignate/script_component.hpp b/addons/laser_selfdesignate/script_component.hpp new file mode 100644 index 0000000000..583aca5e95 --- /dev/null +++ b/addons/laser_selfdesignate/script_component.hpp @@ -0,0 +1,18 @@ +#define COMPONENT laser_selfdesignate +#define COMPONENT_BEAUTIFIED Laser Selfdesignate +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_LASER_SELFDESIGNATE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_LASER_SELFDESIGNATE + #define DEBUG_SETTINGS DEBUG_SETTINGS_LASER_SELFDESIGNATE +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/laser_selfdesignate/stringtable.xml b/addons/laser_selfdesignate/stringtable.xml new file mode 100644 index 0000000000..cdd7439200 --- /dev/null +++ b/addons/laser_selfdesignate/stringtable.xml @@ -0,0 +1,29 @@ + + + + + Laser Designator On + Lasermarkierer an + Designador láser encendido + ЛЦУ ВКЛ + Laserový značkovač zapnut + Desygnator laserowy wł. + Désignateur laser allumé + Lézeres Megjelölő Be + Designatore laser acceso + Designador Laser Ligado + + + Laser Designator Off + Lasermarkierer aus + Designador láser apagado + ЛЦУ ВЫКЛ + Laserový značkovat vypnut + Desygnator laserowy wył. + Désignateur laser éteint + Lézeres Megjelölő Ki + Designatore laser spento + Designador Laser Desligado + + + diff --git a/addons/laserpointer/CfgEventHandlers.hpp b/addons/laserpointer/CfgEventHandlers.hpp index 0d3301d6e0..becf395052 100644 --- a/addons/laserpointer/CfgEventHandlers.hpp +++ b/addons/laserpointer/CfgEventHandlers.hpp @@ -1,3 +1,4 @@ + class Extended_PreStart_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preStart)); diff --git a/addons/laserpointer/CfgWeapons.hpp b/addons/laserpointer/CfgWeapons.hpp index c86887e1c3..608d025a01 100644 --- a/addons/laserpointer/CfgWeapons.hpp +++ b/addons/laserpointer/CfgWeapons.hpp @@ -9,18 +9,16 @@ class CfgWeapons { class InventoryFlashLightItem_Base_F; class acc_pointer_IR: ItemCore { - MRT_SwitchItemNextClass = "ACE_acc_pointer_red"; - MRT_SwitchItemPrevClass = "ACE_acc_pointer_red"; - MRT_switchItemHintText = CSTRING(IRLaser); + ACE_nextModeClass = "ACE_acc_pointer_red"; + ACE_modeDescription = CSTRING(IRLaser); displayName = CSTRING(red); descriptionUse = CSTRING(useLaser); }; class ACE_acc_pointer_red: ItemCore { - MRT_SwitchItemNextClass = "acc_pointer_IR"; - MRT_SwitchItemPrevClass = "acc_pointer_IR"; - MRT_switchItemHintText = CSTRING(Laser); + ACE_nextModeClass = "acc_pointer_IR"; + ACE_modeDescription = CSTRING(Laser); ACE_laserpointer = 1; @@ -70,9 +68,8 @@ class CfgWeapons { }; class ACE_acc_pointer_green_IR: acc_pointer_IR { - MRT_SwitchItemNextClass = "ACE_acc_pointer_green"; - MRT_SwitchItemPrevClass = "ACE_acc_pointer_green"; - MRT_switchItemHintText = CSTRING(IRLaser); + ACE_nextModeClass = "ACE_acc_pointer_green"; + ACE_modeDescription = CSTRING(IRLaser); author = ECSTRING(common,ACETeam); _generalMacro = "ACE_acc_pointer_green"; @@ -81,9 +78,8 @@ class CfgWeapons { }; class ACE_acc_pointer_green: ACE_acc_pointer_red { - MRT_SwitchItemNextClass = "ACE_acc_pointer_green_IR"; - MRT_SwitchItemPrevClass = "ACE_acc_pointer_green_IR"; - MRT_switchItemHintText = CSTRING(Laser); + ACE_nextModeClass = "ACE_acc_pointer_green_IR"; + ACE_modeDescription = CSTRING(Laser); ACE_laserpointer = 2; diff --git a/addons/laserpointer/XEH_PREP.hpp b/addons/laserpointer/XEH_PREP.hpp index 59a28bb4cc..c5dcd74a75 100644 --- a/addons/laserpointer/XEH_PREP.hpp +++ b/addons/laserpointer/XEH_PREP.hpp @@ -1,3 +1,4 @@ + PREP(drawLaserpoint); -PREP(getNearUnits); PREP(onDraw); +PREP(switchLaserLightMode); diff --git a/addons/laserpointer/XEH_postInit.sqf b/addons/laserpointer/XEH_postInit.sqf index 7e90e29259..219c70d372 100644 --- a/addons/laserpointer/XEH_postInit.sqf +++ b/addons/laserpointer/XEH_postInit.sqf @@ -2,90 +2,33 @@ #include "script_component.hpp" // fixes laser when being captured. Needed, because the selectionPosition of the right hand is used -[QEGVAR(captives,setHandcuffed), {if (_this select 1) then {(_this select 0) action ["GunLightOff", _this select 0]};}] call CBA_fnc_addEventHandler; +[QEGVAR(captives,setHandcuffed), {if (_this select 1) then {(_this select 0) action ["ace_gunLightOff", _this select 0]};}] call CBA_fnc_addEventHandler; if (!hasInterface) exitWith {}; GVAR(nearUnits) = []; -GVAR(index) = -1; -GVAR(laserClassesCache) = [] call CBA_fnc_createNamespace; -GVAR(redLaserUnits) = []; -GVAR(greenLaserUnits) = []; + +#include "initKeybinds.sqf" ["ace_settingsInitialized", { - // If not enabled, dont't add draw eventhandler or PFEH (for performance) - if (!GVAR(enabled)) exitWith { - ["CBA_attachmentSwitched", { - params ["_unit", "_prevItem", "_newItem", "_currWeaponType"]; - TRACE_4("CBA_attachmentSwitched eh",_unit,_prevItem,_newItem,_currWeaponType); - if ((getNumber (configFile >> "CfgWeapons" >> _newItem >> "ACE_laserpointer")) > 0) then { - TRACE_1("removing ACE_laserpointer",getNumber (configFile >> "CfgWeapons" >> _newItem >> "ACE_laserpointer")); - [1, "prev"] call CBA_accessory_fnc_switchAttachment; - }; - }] call CBA_fnc_addEventHandler; - }; + //If not enabled, dont't add draw eventhandler or PFEH (for performance) + if (!GVAR(enabled)) exitWith {}; + // @todo. Maybe move to common? [{ - private _oldNearUnits = GVAR(nearUnits); - GVAR(nearUnits) = call FUNC(getNearUnits); - - // remove units that moved away + private _nearUnits = []; { - GVAR(redLaserUnits) deleteAt (GVAR(redLaserUnits) find _x); - GVAR(greenLaserUnits) deleteAt (GVAR(greenLaserUnits) find _x); - } forEach (_oldNearUnits - GVAR(nearUnits)); - }, 5, []] call CBA_fnc_addPerFrameHandler; + _nearUnits append crew _x; + if (count _nearUnits > 10) exitWith { + _nearUnits resize 10; + }; + } forEach nearestObjects [positionCameraToWorld [0,0,0], ["AllVehicles"], 50]; // when moving this, search also for units inside vehicles. currently breaks the laser in FFV + GVAR(nearUnits) = _nearUnits; - private _fnc_processUnit = { - params ["_unit"]; + } , 5, []] call CBA_fnc_addPerFrameHandler; - private _weapon = currentWeapon _unit; - if (!(_unit isFlashlightOn _weapon)) exitWith { - GVAR(redLaserUnits) deleteAt (GVAR(redLaserUnits) find _unit); - GVAR(greenLaserUnits) deleteAt (GVAR(greenLaserUnits) find _unit); - }; - - private _laser = [(_unit weaponAccessories _weapon) select 1] param [0, ""]; - if (_laser isEqualTo "") exitWith { - GVAR(redLaserUnits) deleteAt (GVAR(redLaserUnits) find _unit); - GVAR(greenLaserUnits) deleteAt (GVAR(greenLaserUnits) find _unit); - }; - - private _laserID = GVAR(laserClassesCache) getVariable _laser; - - if (isNil "_laserID") then { - _laserID = getNumber (configFile >> "CfgWeapons" >> _laser >> "ACE_laserpointer"); - GVAR(laserClassesCache) setVariable [_laser, _laserID]; - }; - TRACE_3("",_weapon,_laser,_laserID); - - if (_laserID isEqualTo 1) exitWith { - GVAR(redLaserUnits) pushBackUnique _unit; - GVAR(greenLaserUnits) deleteAt (GVAR(greenLaserUnits) find _unit); - }; - - if (_laserID isEqualTo 2) exitWith { - GVAR(greenLaserUnits) pushBackUnique _unit; - GVAR(redLaserUnits) deleteAt (GVAR(redLaserUnits) find _unit); - }; - }; - - // custom scheduler - [{ - params ["_fnc_processUnit"]; - - ACE_player call _fnc_processUnit; - - GVAR(index) = GVAR(index) + 1; - private _unit = GVAR(nearUnits) param [GVAR(index), objNull]; - - if (isNull _unit) exitWith { - GVAR(index) = -1; - }; - - _unit call _fnc_processUnit; - }, 0.1, _fnc_processUnit] call CBA_fnc_addPerFrameHandler; - - addMissionEventHandler ["Draw3D", {call FUNC(onDraw)}]; + addMissionEventHandler ["Draw3D", { + call FUNC(onDraw); + }]; }] call CBA_fnc_addEventHandler; diff --git a/addons/laserpointer/XEH_preInit.sqf b/addons/laserpointer/XEH_preInit.sqf index d2efe43e9c..a7feade1c3 100644 --- a/addons/laserpointer/XEH_preInit.sqf +++ b/addons/laserpointer/XEH_preInit.sqf @@ -2,15 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; - -["visionMode", { - params ["", "_visionMode"]; - - GVAR(isIR) = _visionMode isEqualTo 1; - GVAR(isTI) = _visionMode isEqualTo 2; -}] call CBA_fnc_addPlayerEventHandler; ADDON = true; diff --git a/addons/laserpointer/config.cpp b/addons/laserpointer/config.cpp index 4058157660..add36aeff5 100644 --- a/addons/laserpointer/config.cpp +++ b/addons/laserpointer/config.cpp @@ -19,3 +19,8 @@ class CfgPatches { #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" #include "CfgJointRails.hpp" + +class ACE_newEvents { + GunLightOff = "ace_gunLightOff"; + SetHandcuffed = QEGVAR(captives,setHandcuffed); +}; diff --git a/addons/laserpointer/functions/fnc_drawLaserpoint.sqf b/addons/laserpointer/functions/fnc_drawLaserpoint.sqf index f5320d2c63..3ea9ed158b 100644 --- a/addons/laserpointer/functions/fnc_drawLaserpoint.sqf +++ b/addons/laserpointer/functions/fnc_drawLaserpoint.sqf @@ -85,7 +85,7 @@ private _size = 2 * sqrt (1 / _distance) * (call EFUNC(common,getZoom)); drawIcon3D [ format ["\a3\weapons_f\acc\data\collimdot_%1_ca.paa", ["red", "green"] select _isGreen], - [[1,0.25,0.25,0.6*_brightness], [0.25,1,0.25,0.5*_brightness]] select _isGreen, + [[1,0.25,0.25,0.5*_brightness], [0.25,1,0.25,0.5*_brightness]] select _isGreen, _pL, _size, _size, diff --git a/addons/laserpointer/functions/fnc_getNearUnits.sqf b/addons/laserpointer/functions/fnc_getNearUnits.sqf deleted file mode 100644 index baeb07c86e..0000000000 --- a/addons/laserpointer/functions/fnc_getNearUnits.sqf +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Author: commy2 - * Reports near units. - * - * Arguments: - * None - * - * Return Value: - * Near Units - * - * Example: - * call ACE_laserpointer_fnc_getNearUnits - * - * Public: No - */ -#include "script_component.hpp" - -private _camPosAGL = positionCameraToWorld [0, 0, 0]; - -// handle RHS / bugged vehicle slots -if !((_camPosAGL select 0) isEqualType 0) exitWith { [] }; - -private _nearUnits = []; - -{ - _nearUnits append crew _x; -} forEach nearestObjects [_camPosAGL, ["AllVehicles"], MAX_LASER_RANGE]; - -_nearUnits diff --git a/addons/laserpointer/functions/fnc_onDraw.sqf b/addons/laserpointer/functions/fnc_onDraw.sqf index 06c601869c..1945dcf2b7 100644 --- a/addons/laserpointer/functions/fnc_onDraw.sqf +++ b/addons/laserpointer/functions/fnc_onDraw.sqf @@ -8,24 +8,34 @@ * Return Value: * None * - * Example: - * call ACE_laserpointer_fnc_onDraw - * * Public: No */ #include "script_component.hpp" -// no lasers in thermal mode -if !(GVAR(isTI)) then { - private _brightness = 2 - call EFUNC(common,ambientBrightness); +private _isIR = currentVisionMode ACE_player; - { - // red laser. draw green dot anyway in IR mode - [_x, 100, GVAR(isIR), _brightness] call FUNC(drawLaserpoint); - } count GVAR(redLaserUnits); +if (_isIR == 2) exitWith {}; - { - // green laser - [_x, 100, true, _brightness] call FUNC(drawLaserpoint); - } count GVAR(greenLaserUnits); -}; +_isIR = _isIR == 1; + +private _brightness = 2 - call EFUNC(common,ambientBrightness); + +{ + private _weapon = currentWeapon _x; + private _laser = (_x weaponAccessories _weapon) select 1; + + if (_laser != "") then { + private _cacheName = format [QGVAR(laser_%1), _laser]; + private _laserID = missionNamespace getVariable [_cacheName, -1]; + + if (missionNamespace getVariable [_cacheName, -1] == -1) then { + _laserID = getNumber (configFile >> "CfgWeapons" >> _laser >> "ACE_laserpointer"); + missionNamespace setVariable [_cacheName, _laserID]; + }; + + if (_laserID > 0 && {_x isFlashlightOn _weapon}) then { + [_x, 100, (_laserID == 2 || _isIR), _brightness] call FUNC(drawLaserpoint); + }; + }; + false +} count GVAR(nearUnits); diff --git a/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf b/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf new file mode 100644 index 0000000000..e26d5f75c1 --- /dev/null +++ b/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf @@ -0,0 +1,54 @@ +/* + * Author: Commy2 + * Switch between laser modes. + * + * Arguments: + * 0: Unit + * 1: Weapon + * + * Return Value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_weapon"]; + +private _pointer = (_unit weaponAccessories _weapon) select 1; + +if (_pointer == "") exitWith {}; + +private _config = configFile >> "CfgWeapons" >> _pointer; + +private _nextPointer = getText (_config >> "ACE_nextModeClass"); + +if (_nextPointer == "") exitWith {}; + +//If system disabled, don't switch to a laser: +private _nextPointerIsLaser = getNumber (configFile >> "CfgWeapons" >> _nextPointer >> "ACE_laserpointer"); +if ((!GVAR(enabled)) && {_nextPointerIsLaser == 1}) exitWith {}; + +// disable inheritance for this entry, because addons claim this as a base class for convenience +if !((_config >> "ACE_nextModeClass") in configProperties [_config, "true", false]) exitWith {}; + +_unit addWeaponItem [_weapon, _nextPointer]; + +private _error = false; + +if ((_unit weaponAccessories _weapon) select 1 != _nextPointer) then { + ERROR("NextPointer not compatible"); + _unit addWeaponItem [_weapon, _pointer]; + _error = true; +}; + +if (!_error) then { + private _description = getText (configFile >> "CfgWeapons" >> _nextPointer >> "ACE_modeDescription"); + private _picture = getText (configFile >> "CfgWeapons" >> _nextPointer >> "picture"); + + [_description, _picture] call EFUNC(common,displayTextPicture); +} else { + ACE_LOGERROR_3("Failed to add %1 to %2 - reverting to %3",_nextPointer,_weapon,_pointer); +}; + +playSound "ACE_Sound_Click"; diff --git a/addons/laserpointer/initKeybinds.sqf b/addons/laserpointer/initKeybinds.sqf new file mode 100644 index 0000000000..2251ddfb71 --- /dev/null +++ b/addons/laserpointer/initKeybinds.sqf @@ -0,0 +1,13 @@ +// by commy2 + +["ACE3 Weapons", QGVAR(switchLaserLightMode), localize LSTRING(switchLaserLight), +{ + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false}; + + [ACE_player, currentWeapon ACE_player] call FUNC(switchLaserLightMode); + true +}, +{false}, [38, [false, true, false]], false] call CBA_fnc_addKeybind; diff --git a/addons/laserpointer/script_component.hpp b/addons/laserpointer/script_component.hpp index 4b7b2e0d39..0e450721fd 100644 --- a/addons/laserpointer/script_component.hpp +++ b/addons/laserpointer/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_LASERPOINTER @@ -15,5 +16,3 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" - -#define MAX_LASER_RANGE 50 diff --git a/addons/laserpointer/stringtable.xml b/addons/laserpointer/stringtable.xml index 88228dc289..b161b0998c 100644 --- a/addons/laserpointer/stringtable.xml +++ b/addons/laserpointer/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Puntero láser (rojo) Puntatore laser (rosso) Laser (vermelho) - レーザ ポインタ (赤) - 레이저 지시기 (빨강) - 雷射指示器 (红色) - 雷射指示器 (紅色) Laser Pointer (green) @@ -28,10 +24,6 @@ Puntero láser (verde) Puntatore laser (verde) Laser (verde) - レーザ ポインタ (緑) - 레이저 지시기 (초록) - 雷射指示器 (绿色) - 雷射指示器 (綠色) Emits visible light. @@ -44,10 +36,6 @@ Emite luz visible. Emette luce visibile. Emite luz visível. - 可視光をだします。 - 밝은 곳에서도 보임 - 发射出可见光 - 發射出可見光 <t color='#9cf953'>Use: </t>Turn Laser ON/OFF @@ -60,10 +48,6 @@ <t color='#9cf953'>Использовать: </t>ВКЛ/ВЫКЛ лазер <t color='#9cf953'>Usar: </t>Encender/Apagar láser <t color='#9cf953'>Használat: </t>Lézer BE/KI kapcsolása - <t color='#9cf953'>つかう: </t>レーザの起動/停止 - <t color='#9cf953'>사용키: </t>레이저 켜기/끄기 - <t color='#9cf953'>使用: </t>雷射开启/关闭 - <t color='#9cf953'>使用: </t>雷射開啟/關閉 Laser @@ -76,10 +60,6 @@ Lézer Laser Laser - レーザ - 레이저 - 雷射 - 雷射 IR Laser @@ -92,10 +72,6 @@ Infravörös Lézer IR Laser Laser IV - 赤外線レーザ - 적외선 레이저 - 红外线雷射 - 紅外線雷射 Switch Laser / IR Laser @@ -108,10 +84,6 @@ Lézer / Infravörös Lézer váltása Přepnout Laser / Infračervený Laser Alternar entre Laser / Laser IV - レーザ/赤外線レーザを切り替える - 레이저 / 적외선 레이저 전환 - 切换雷射/红外线雷射 - 切換雷射/紅外線雷射 - + \ No newline at end of file diff --git a/addons/logistics_uavbattery/XEH_preInit.sqf b/addons/logistics_uavbattery/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/logistics_uavbattery/XEH_preInit.sqf +++ b/addons/logistics_uavbattery/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf b/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf index 2e83043d00..2bf617478d 100644 --- a/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf +++ b/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf @@ -7,7 +7,7 @@ * 1: UAV * * Return Value: - * None + * Nothing * * Example: * [player, theUAV] call ace_logistics_uavbattery_fnc_refuelUAV diff --git a/addons/logistics_uavbattery/script_component.hpp b/addons/logistics_uavbattery/script_component.hpp index 6232900558..464118c01f 100644 --- a/addons/logistics_uavbattery/script_component.hpp +++ b/addons/logistics_uavbattery/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_LOGISTICS_UAVBATTERY diff --git a/addons/logistics_uavbattery/stringtable.xml b/addons/logistics_uavbattery/stringtable.xml index 97c709d8dd..ea0cea97eb 100644 --- a/addons/logistics_uavbattery/stringtable.xml +++ b/addons/logistics_uavbattery/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ O VANT está cheio Il drone è pieno БПЛА полностью заряжен - ドローンは充電完了 - 드론 충전완료 - 无人载具电池已充满 - 無人載具電池已充滿 You need a UAV Battery @@ -28,10 +24,6 @@ Você precisa de uma bateria para VANTs Hai bisogno di una Batteria UAV Требуется аккумулятор для БПЛА - UAV バッテリが必要です - UAV 배터리가 필요합니다 - 你需要一个无人载具电池 - 你需要一個無人載具電池 Recharge @@ -44,10 +36,6 @@ Recarregar Ricarica Зарядить - 充電 - 재충전 - 充电 - 充電 UAV Battery @@ -60,10 +48,6 @@ Bateria para VANT Batteria UAV Аккумулятор БПЛА - UAV バッテリ - UAV 배터리 - 无人载具电池 - 無人載具電池 Used to refuel Carried UAV's @@ -76,10 +60,6 @@ Usada para reabastecer o VANT Usata per ricaricare la Batteria dell'UAV Используется для зарядки переносных БПЛА - 運んでいる UAV を充電に使う - UAV를 재충전 할때 씁니다. - 对可携式无人载具进行充电 - 對可攜式無人載具進行充電 Recharging... @@ -92,9 +72,6 @@ Recarregando... In ricarica... Заряжается... - 充電中 - 充电中... - 充電中... - + \ No newline at end of file diff --git a/addons/logistics_wirecutter/XEH_preInit.sqf b/addons/logistics_wirecutter/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/logistics_wirecutter/XEH_preInit.sqf +++ b/addons/logistics_wirecutter/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/logistics_wirecutter/config.cpp b/addons/logistics_wirecutter/config.cpp index e1bdf84e47..25c58f1604 100644 --- a/addons/logistics_wirecutter/config.cpp +++ b/addons/logistics_wirecutter/config.cpp @@ -17,3 +17,7 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgWeapons.hpp" #include "CfgVehicles.hpp" + +class ACE_newEvents { + interactMenuOpened = "ace_interactMenuOpened"; +}; \ No newline at end of file diff --git a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf index 61d8a254c5..2bf807975f 100644 --- a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf @@ -7,7 +7,7 @@ * 1: Fence * * Return Value: - * None + * Nothing * * Example: * [player, berlinWall] call ace_logistics_wirecutter_fnc_cutDownFence diff --git a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf index 302e4b0975..bf0f5d3bc9 100644 --- a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf +++ b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf @@ -6,7 +6,7 @@ * Interact Menu Type (0 - world, 1 - self) * * Return Value: - * None + * Nothing * * Example: * [0] call ace_logistics_wirecutter_fnc_interactEH diff --git a/addons/logistics_wirecutter/script_component.hpp b/addons/logistics_wirecutter/script_component.hpp index 7ec3a5dc0d..9e52593ba7 100644 --- a/addons/logistics_wirecutter/script_component.hpp +++ b/addons/logistics_wirecutter/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_LOGISTICS_WIRECUTTER diff --git a/addons/logistics_wirecutter/stringtable.xml b/addons/logistics_wirecutter/stringtable.xml index 53c5e21b14..6790d67ec6 100644 --- a/addons/logistics_wirecutter/stringtable.xml +++ b/addons/logistics_wirecutter/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Drótvágó Trancia Cortador de Arame - ワイヤーカッター - 절단기 - 剪铁丝网钳 - 剪鐵絲網鉗 Wirecutter @@ -26,12 +22,8 @@ Służą do cięcia drutu i płotów Pince coupante Drótok, huzalok, és kábelek vágására alkalmas olló. - Tronchese + Trancia da ferro Cortador de Arame - ワイヤーカッター - 절단기 - 剪铁丝网钳 - 剪鐵絲網鉗 Cut Fence @@ -44,10 +36,6 @@ Taglia Drótkerítés átvágása Разрезать забор - フェンスを切断する - 철조망 자르기 - 剪断护栏 - 剪斷護欄 Cutting Fences / Wires... @@ -60,10 +48,6 @@ Sto tagliando... Drótok elvágása... Разрезаем забор / провода... - フェンス/ワイヤを切断中・・・ - 철망/철조망 자르는중... - 剪断护栏/刺网中... - 剪斷護欄/刺網中... Fence cut @@ -76,10 +60,6 @@ Fatto! Drótkerítés átvágva Забор разрезан - フェンスを切断した - 절단됨 - 护栏已被剪断 - 護欄已被剪斷 - + \ No newline at end of file diff --git a/addons/magazinerepack/XEH_preInit.sqf b/addons/magazinerepack/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/magazinerepack/XEH_preInit.sqf +++ b/addons/magazinerepack/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/magazinerepack/functions/fnc_magazineRepackProgress.sqf b/addons/magazinerepack/functions/fnc_magazineRepackProgress.sqf index ddc7ca4fa8..3808df4cdc 100644 --- a/addons/magazinerepack/functions/fnc_magazineRepackProgress.sqf +++ b/addons/magazinerepack/functions/fnc_magazineRepackProgress.sqf @@ -18,7 +18,7 @@ */ #include "script_component.hpp" -params ["_args", "_elapsedTime", "_totalTime"]; +params ["_ars", "_elapsedTime", "_totalTime"]; _args params ["_magazineClassname", "_lastAmmoCount", "_simEvents"]; if !((_simEvents select 0) params ["_nextEventTime", "_nextEventIsBullet", "_nextEventMags"]) exitWith { ERROR("No Event"); false }; diff --git a/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf b/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf index a96fa2dead..09c04de26e 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/magazinerepack/functions/fnc_startRepackingMagazine.sqf b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf index d3cd621305..32ce65d188 100644 --- a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf +++ b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf @@ -10,7 +10,7 @@ * 2: Magazine Classname * * Return Value: - * None + * Nothing * * Example: * [player, player, "30Rnd_65x39_caseless_mag"] call ace_magazinerepack_fnc_startRepackingMagazine diff --git a/addons/magazinerepack/script_component.hpp b/addons/magazinerepack/script_component.hpp index 0b81c73d98..79c1a20652 100644 --- a/addons/magazinerepack/script_component.hpp +++ b/addons/magazinerepack/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MAGAZINEREPACK diff --git a/addons/magazinerepack/stringtable.xml b/addons/magazinerepack/stringtable.xml index f82280961e..75cd177ed9 100644 --- a/addons/magazinerepack/stringtable.xml +++ b/addons/magazinerepack/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Reorganizar Carregadores Újratárazás Перепаковать магазины - 弾倉を詰め替え - 탄창 다시 채우기 - 重新整理弹匣 - 重新整理彈匣 Select Magazine Menu @@ -28,10 +24,6 @@ Menu de Seleção de Carregador Fegyvertár menü kiválasztás Меню выбора магазинов - 弾倉メニューから選ぶ - 탄창 메뉴 고르기 - 选择弹匣清单 - 選擇彈匣清單 Select Mag @@ -44,10 +36,6 @@ Selecionar Carregador Tár kiválasztása Выбрать магазин - 弾倉を選択 - 탄창 고르기 - 选择弹匣 - 選擇彈匣 Repacking Magazines... @@ -60,10 +48,6 @@ Reorganizando Carregadores... Újratárazás... Перепаковка магазинов... - 弾倉を詰め替え中・・・ - 다시 채우는중... - 重新整理弹匣中 ... - 重新整理彈匣中 ... Repacked Magazines @@ -76,10 +60,6 @@ Carregadores Reorganizados Újratárazott tárak Магазины перепакованы - 弾倉の詰め替えが終わった - 탄창 채워짐 - 弹匣已重新整理 - 彈匣已重新整理 %1 full mag(s) and %2 extra round(s) @@ -92,10 +72,6 @@ %1 carregador(es) cheio(s) e %2 disparo(s) a mais %1 teljes tár és %2 extra lőszer %1 полных магазина(ов) и %2 патрона(ов) - %1 個の満杯な弾倉と入りきらなかった %2 個の弾倉 - %1개의 꽉찬 탄창과 %2발의 총알이 남았다 - %1个满的弹匣与%2发额外子弹 - %1個滿的彈匣與%2發額外子彈 Repacking Finished @@ -108,10 +84,6 @@ Újratárazás befejezve Caricatori riempiti Reorganização Terminada - 詰め替えが完了 - 탄창 채우기 끝남 - 重整完成 - 重整完成 Repacking Interrupted @@ -124,10 +96,6 @@ Újratárazás megszakítva Riempimento interrotto Reorganização Interrompida - 詰め替えを中断した - 탄창 채우기 방해받음 - 重整被中断 - 重整被中斷 %1 Full and %2 Partial @@ -140,10 +108,6 @@ %1 teljes és %2 részleges %1 pieno(i) e %2 parziale(i) %1 Total e %2 Parcial - %1 個の満杯で、 %2 の余分数 - %1 꽉찼고 %2 부분참 - %1个满的与%2个部分的 - %1個滿的與%2個部分的 - + \ No newline at end of file diff --git a/addons/main/CfgSettings.hpp b/addons/main/CfgSettings.hpp index dcb78ffb60..58cb824a6f 100644 --- a/addons/main/CfgSettings.hpp +++ b/addons/main/CfgSettings.hpp @@ -10,7 +10,6 @@ class CfgSettings { //Warnings for missing RHS compat pbos compat_rhs_afrf3[] = {"ace_compat_rhs_afrf3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhs_main')"}; compat_rhs_usf3[] = {"ace_compat_rhs_usf3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhsusf_main')"}; - compat_rhs_gref3[] = {"ace_compat_rhs_gref3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhsgref_main')"}; }; }; }; diff --git a/addons/main/script_component.hpp b/addons/main/script_component.hpp index c88928f0cd..2f40ce8e8d 100644 --- a/addons/main/script_component.hpp +++ b/addons/main/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MAIN diff --git a/addons/main/script_debug.hpp b/addons/main/script_debug.hpp index d0574bcd32..92f58e1f96 100644 --- a/addons/main/script_debug.hpp +++ b/addons/main/script_debug.hpp @@ -1,20 +1,3 @@ -/** -Fast Recompiling via function -**/ -// #define DISABLE_COMPILE_CACHE -// To Use: [] call ACE_PREP_RECOMPILE; - -#ifdef DISABLE_COMPILE_CACHE - #define LINKFUNC(x) {_this call FUNC(x)} - #define PREP_RECOMPILE_START if (isNil "ACE_PREP_RECOMPILE") then {ACE_RECOMPILES = []; ACE_PREP_RECOMPILE = {{call _x} forEach ACE_RECOMPILES;}}; private _recomp = { - #define PREP_RECOMPILE_END }; call _recomp; ACE_RECOMPILES pushBack _recomp; -#else - #define LINKFUNC(x) FUNC(x) - #define PREP_RECOMPILE_START /* */ - #define PREP_RECOMPILE_END /* */ -#endif - - /** STACK TRACING **/ @@ -40,7 +23,6 @@ STACK TRACING PERFORMANCE COUNTERS SECTION **/ //#define ENABLE_PERFORMANCE_COUNTERS -// To Use: [] call ace_common_fnc_dumpPerformanceCounters; #ifdef ENABLE_PERFORMANCE_COUNTERS #define CBA_fnc_addPerFrameHandler { _ret = [(_this select 0), (_this select 1), (_this select 2), #function] call CBA_fnc_addPerFrameHandler; if(isNil "ACE_PFH_COUNTER" ) then { ACE_PFH_COUNTER=[]; }; ACE_PFH_COUNTER pushBack [[_ret, __FILE__, __LINE__], [(_this select 0), (_this select 1), (_this select 2)]]; _ret } diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 167884616f..5b92c93ade 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -1,4 +1,11 @@ -#define DEBUG_SYNCHRONOUS +// BWC for CBA's DEBUG_SYNCHRONOUS - https://github.com/CBATeam/CBA_A3/pull/466/ +#ifdef CBA_DEBUG_SYNCHRONOUS + // For New CBA: + #define DEBUG_SYNCHRONOUS + // For Old CBA: + #define CBA_fnc_log { params ["_file","_lineNum","_message"]; diag_log [diag_frameNo, diag_tickTime, time, _file + ":"+str(_lineNum + 1), _message]; } +#endif + #include "\x\cba\addons\main\script_macros_common.hpp" #include "\x\cba\addons\xeh\script_xeh.hpp" @@ -98,7 +105,93 @@ #define IDC_STAMINA_BAR 193 -#define ACE_DEPRECATED(arg1,arg2,arg3) WARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3",arg1,arg2,arg3) +#define ACE_LOG(module,level,message) diag_log text ACE_LOGFORMAT(module,level,message) +#define ACE_LOGFORMAT(module,level,message) FORMAT_2(QUOTE([ACE] (module) %1: %2),level,message) + +#define ACE_LOG_FILELINENUMBERS(module,level,message) diag_log text ACE_LOGFORMAT_FILELINENUMBERS(module,level,message) +#define ACE_LOGFORMAT_FILELINENUMBERS(module,level,message) FORMAT_4(QUOTE([ACE] (module) %1: %2 File: %3 Line: %4),level,message,__FILE__,__LINE__) + +#define ACE_LOGERROR(message) ACE_LOG_FILELINENUMBERS(COMPONENT,"ERROR",message) +#define ACE_LOGERROR_1(message,arg1) ACE_LOGERROR(FORMAT_1(message,arg1)) +#define ACE_LOGERROR_2(message,arg1,arg2) ACE_LOGERROR(FORMAT_2(message,arg1,arg2)) +#define ACE_LOGERROR_3(message,arg1,arg2,arg3) ACE_LOGERROR(FORMAT_3(message,arg1,arg2,arg3)) +#define ACE_LOGERROR_4(message,arg1,arg2,arg3,arg4) ACE_LOGERROR(FORMAT_4(message,arg1,arg2,arg3,arg4)) +#define ACE_LOGERROR_5(message,arg1,arg2,arg3,arg4,arg5) ACE_LOGERROR(FORMAT_5(message,arg1,arg2,arg3,arg4,arg5)) +#define ACE_LOGERROR_6(message,arg1,arg2,arg3,arg4,arg5,arg6) ACE_LOGERROR(FORMAT_6(message,arg1,arg2,arg3,arg4,arg5,arg6)) +#define ACE_LOGERROR_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ACE_LOGERROR(FORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7)) +#define ACE_LOGERROR_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ACE_LOGERROR(FORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)) + +#define ACE_ERRORFORMAT(message) ACE_LOGFORMAT_FILELINENUMBERS(COMPONENT,"ERROR",message) +#define ACE_ERRORFORMAT_1(message,arg1) ACE_ERRORFORMAT(FORMAT_1(message,arg1)) +#define ACE_ERRORFORMAT_2(message,arg1,arg2) ACE_ERRORFORMAT(FORMAT_2(message,arg1,arg2)) +#define ACE_ERRORFORMAT_3(message,arg1,arg2,arg3) ACE_ERRORFORMAT(FORMAT_3(message,arg1,arg2,arg3)) +#define ACE_ERRORFORMAT_4(message,arg1,arg2,arg3,arg4) ACE_ERRORFORMAT(FORMAT_4(message,arg1,arg2,arg3,arg4)) +#define ACE_ERRORFORMAT_5(message,arg1,arg2,arg3,arg4,arg5) ACE_ERRORFORMAT(FORMAT_5(message,arg1,arg2,arg3,arg4,arg5)) +#define ACE_ERRORFORMAT_6(message,arg1,arg2,arg3,arg4,arg5,arg6) ACE_ERRORFORMAT(FORMAT_6(message,arg1,arg2,arg3,arg4,arg5,arg6)) +#define ACE_ERRORFORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ACE_ERRORFORMAT(FORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7)) +#define ACE_ERRORFORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ACE_ERRORFORMAT(FORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)) + +#define ACE_LOGWARNING(message) ACE_LOG_FILELINENUMBERS(COMPONENT,"WARNING",message) +#define ACE_LOGWARNING_1(message,arg1) ACE_LOGWARNING(FORMAT_1(message,arg1)) +#define ACE_LOGWARNING_2(message,arg1,arg2) ACE_LOGWARNING(FORMAT_2(message,arg1,arg2)) +#define ACE_LOGWARNING_3(message,arg1,arg2,arg3) ACE_LOGWARNING(FORMAT_3(message,arg1,arg2,arg3)) +#define ACE_LOGWARNING_4(message,arg1,arg2,arg3,arg4) ACE_LOGWARNING(FORMAT_4(message,arg1,arg2,arg3,arg4)) +#define ACE_LOGWARNING_5(message,arg1,arg2,arg3,arg4,arg5) ACE_LOGWARNING(FORMAT_5(message,arg1,arg2,arg3,arg4,arg5)) +#define ACE_LOGWARNING_6(message,arg1,arg2,arg3,arg4,arg5,arg6) ACE_LOGWARNING(FORMAT_6(message,arg1,arg2,arg3,arg4,arg5,arg6)) +#define ACE_LOGWARNING_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ACE_LOGWARNING(FORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7)) +#define ACE_LOGWARNING_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ACE_LOGWARNING(FORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)) + +#define ACE_WARNINGFORMAT(message) ACE_LOGFORMAT_FILELINENUMBERS(COMPONENT,"WARNING",message) +#define ACE_WARNINGFORMAT_1(message,arg1) ACE_WARNINGFORMAT(FORMAT_1(message,arg1)) +#define ACE_WARNINGFORMAT_2(message,arg1,arg2) ACE_WARNINGFORMAT(FORMAT_2(message,arg1,arg2)) +#define ACE_WARNINGFORMAT_3(message,arg1,arg2,arg3) ACE_WARNINGFORMAT(FORMAT_3(message,arg1,arg2,arg3)) +#define ACE_WARNINGFORMAT_4(message,arg1,arg2,arg3,arg4) ACE_WARNINGFORMAT(FORMAT_4(message,arg1,arg2,arg3,arg4)) +#define ACE_WARNINGFORMAT_5(message,arg1,arg2,arg3,arg4,arg5) ACE_WARNINGFORMAT(FORMAT_5(message,arg1,arg2,arg3,arg4,arg5)) +#define ACE_WARNINGFORMAT_6(message,arg1,arg2,arg3,arg4,arg5,arg6) ACE_WARNINGFORMAT(FORMAT_6(message,arg1,arg2,arg3,arg4,arg5,arg6)) +#define ACE_WARNINGFORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ACE_WARNINGFORMAT(FORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7)) +#define ACE_WARNINGFORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ACE_WARNINGFORMAT(FORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)) + +#define ACE_LOGINFO(message) ACE_LOG(COMPONENT,"INFO",message) +#define ACE_LOGINFO_1(message,arg1) ACE_LOGINFO(FORMAT_1(message,arg1)) +#define ACE_LOGINFO_2(message,arg1,arg2) ACE_LOGINFO(FORMAT_2(message,arg1,arg2)) +#define ACE_LOGINFO_3(message,arg1,arg2,arg3) ACE_LOGINFO(FORMAT_3(message,arg1,arg2,arg3)) +#define ACE_LOGINFO_4(message,arg1,arg2,arg3,arg4) ACE_LOGINFO(FORMAT_4(message,arg1,arg2,arg3,arg4)) +#define ACE_LOGINFO_5(message,arg1,arg2,arg3,arg4,arg5) ACE_LOGINFO(FORMAT_5(message,arg1,arg2,arg3,arg4,arg5)) +#define ACE_LOGINFO_6(message,arg1,arg2,arg3,arg4,arg5,arg6) ACE_LOGINFO(FORMAT_6(message,arg1,arg2,arg3,arg4,arg5,arg6)) +#define ACE_LOGINFO_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ACE_LOGINFO(FORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7)) +#define ACE_LOGINFO_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ACE_LOGINFO(FORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)) + +#define ACE_INFOFORMAT(message) ACE_LOGFORMAT(COMPONENT,"INFO",message) +#define ACE_INFOFORMAT_1(message,arg1) ACE_INFOFORMAT(FORMAT_1(message,arg1)) +#define ACE_INFOFORMAT_2(message,arg1,arg2) ACE_INFOFORMAT(FORMAT_2(message,arg1,arg2)) +#define ACE_INFOFORMAT_3(message,arg1,arg2,arg3) ACE_INFOFORMAT(FORMAT_3(message,arg1,arg2,arg3)) +#define ACE_INFOFORMAT_4(message,arg1,arg2,arg3,arg4) ACE_INFOFORMAT(FORMAT_4(message,arg1,arg2,arg3,arg4)) +#define ACE_INFOFORMAT_5(message,arg1,arg2,arg3,arg4,arg5) ACE_INFOFORMAT(FORMAT_5(message,arg1,arg2,arg3,arg4,arg5)) +#define ACE_INFOFORMAT_6(message,arg1,arg2,arg3,arg4,arg5,arg6) ACE_INFOFORMAT(FORMAT_6(message,arg1,arg2,arg3,arg4,arg5,arg6)) +#define ACE_INFOFORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ACE_INFOFORMAT(FORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7)) +#define ACE_INFOFORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ACE_INFOFORMAT(FORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)) + +#define ACE_LOGDEBUG(message) ACE_LOG_FILELINENUMBERS(COMPONENT,"DEBUG",message) +#define ACE_LOGDEBUG_1(message,arg1) ACE_LOGDEBUG(FORMAT_1(message,arg1)) +#define ACE_LOGDEBUG_2(message,arg1,arg2) ACE_LOGDEBUG(FORMAT_2(message,arg1,arg2)) +#define ACE_LOGDEBUG_3(message,arg1,arg2,arg3) ACE_LOGDEBUG(FORMAT_3(message,arg1,arg2,arg3)) +#define ACE_LOGDEBUG_4(message,arg1,arg2,arg3,arg4) ACE_LOGDEBUG(FORMAT_4(message,arg1,arg2,arg3,arg4)) +#define ACE_LOGDEBUG_5(message,arg1,arg2,arg3,arg4,arg5) ACE_LOGDEBUG(FORMAT_5(message,arg1,arg2,arg3,arg4,arg5)) +#define ACE_LOGDEBUG_6(message,arg1,arg2,arg3,arg4,arg5,arg6) ACE_LOGDEBUG(FORMAT_6(message,arg1,arg2,arg3,arg4,arg5,arg6)) +#define ACE_LOGDEBUG_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ACE_LOGDEBUG(FORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7)) +#define ACE_LOGDEBUG_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ACE_LOGDEBUG(FORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)) + +#define ACE_DEBUGFORMAT(message) ACE_LOGFORMAT_FILELINENUMBERS(COMPONENT,"DEBUG",message) +#define ACE_DEBUGFORMAT_1(message,arg1) ACE_DEBUGFORMAT(FORMAT_1(message,arg1)) +#define ACE_DEBUGFORMAT_2(message,arg1,arg2) ACE_DEBUGFORMAT(FORMAT_2(message,arg1,arg2)) +#define ACE_DEBUGFORMAT_3(message,arg1,arg2,arg3) ACE_DEBUGFORMAT(FORMAT_3(message,arg1,arg2,arg3)) +#define ACE_DEBUGFORMAT_4(message,arg1,arg2,arg3,arg4) ACE_DEBUGFORMAT(FORMAT_4(message,arg1,arg2,arg3,arg4)) +#define ACE_DEBUGFORMAT_5(message,arg1,arg2,arg3,arg4,arg5) ACE_DEBUGFORMAT(FORMAT_5(message,arg1,arg2,arg3,arg4,arg5)) +#define ACE_DEBUGFORMAT_6(message,arg1,arg2,arg3,arg4,arg5,arg6) ACE_DEBUGFORMAT(FORMAT_6(message,arg1,arg2,arg3,arg4,arg5,arg6)) +#define ACE_DEBUGFORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ACE_DEBUGFORMAT(FORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7)) +#define ACE_DEBUGFORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ACE_DEBUGFORMAT(FORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)) + +#define ACE_DEPRECATED(arg1,arg2,arg3) ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3",arg1,arg2,arg3) #define PFORMAT_10(MESSAGE,A,B,C,D,E,F,G,H,I,J) \ format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6, F=%7, G=%8, H=%9, I=%10 J=%11', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E), RETNIL(F), RETNIL(G), RETNIL(H), RETNIL(I), RETNIL(J)] diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index a21034f277..56add6aead 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -3,14 +3,17 @@ #define MAINPREFIX z #define PREFIX ace -#include "script_version.hpp" +#define MAJOR 3 +#define MINOR 6 +#define PATCHLVL 2 +#define BUILD 0 #define VERSION MAJOR.MINOR.PATCHLVL.BUILD #define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD // MINIMAL required version for the Mod. Components can specify others.. -#define REQUIRED_VERSION 1.70 -#define REQUIRED_CBA_VERSION {3,3,1} +#define REQUIRED_VERSION 1.62 +#define REQUIRED_CBA_VERSION {2,4,1} #ifdef COMPONENT_BEAUTIFIED #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp deleted file mode 100644 index eb701f7f48..0000000000 --- a/addons/main/script_version.hpp +++ /dev/null @@ -1,4 +0,0 @@ -#define MAJOR 3 -#define MINOR 10 -#define PATCHLVL 1 -#define BUILD 21 diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml index d312264cf6..225d61a51d 100644 --- a/addons/main/stringtable.xml +++ b/addons/main/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -11,9 +11,6 @@ ACE Logística Logistica ACE ACE Logistique - ACE ロジスティクス - ACE 后勤 - ACE 後勤 http://ace3mod.com/ @@ -27,8 +24,6 @@ http://ace3mod.com/ http://ace3mod.com/ http://ace3mod.com/ - http://ace3mod.com/ - http://ace3mod.com/ diff --git a/addons/map/Cfg3DEN.hpp b/addons/map/Cfg3DEN.hpp deleted file mode 100644 index bf230829f4..0000000000 --- a/addons/map/Cfg3DEN.hpp +++ /dev/null @@ -1,21 +0,0 @@ - -class Cfg3DEN { - class Group { - class AttributeCategories { - class ace_attributes { - class Attributes { - class GVAR(hideBlueForceMarker) { - property = QGVAR(hideBlueForceMarker); - control = "Checkbox"; - displayName = CSTRING(disableBFT); - tooltip = CSTRING(disableBFT_description); - // groups are kaputt. have to delay setVariable public for it to work. - expression = QUOTE(if (_value) then {[ARR_2({(_this select 0) setVariable [ARR_3('%s',_this select 1,true)];},[ARR_2(_this,_value)])] call CBA_fnc_execNextFrame};); - typeName = "BOOL"; - defaultValue = "(false)"; // fix pbo project preprocessing bug - }; - }; - }; - }; - }; -}; diff --git a/addons/map/CfgLights.hpp b/addons/map/CfgLights.hpp index c5ebc8e054..bd69f9acbf 100644 --- a/addons/map/CfgLights.hpp +++ b/addons/map/CfgLights.hpp @@ -1,7 +1,7 @@ class CfgLights { - + class Chemlight_Blue; - + class ACE_FlashlightLight_White: Chemlight_Blue { brightness = 100; color[] = {1,1,1,1}; @@ -16,24 +16,20 @@ class CfgLights { start = 0.075; }; }; - + class ACE_FlashlightLight_Red: ACE_FlashlightLight_White { diffuse[] = {1,0,0}; }; - + class ACE_FlashlightLight_Blue: ACE_FlashlightLight_White { diffuse[] = {0.25,0.25,1}; }; - + class ACE_FlashlightLight_Green: ACE_FlashlightLight_White { diffuse[] = {0,1,0}; }; - + class ACE_FlashlightLight_Yellow: ACE_FlashlightLight_White { diffuse[] = {1,1,0.4}; }; - - class ACE_FlashlightLight_Orange: ACE_FlashlightLight_White { - diffuse[] = {1,0.65,0}; - }; -}; +}; \ No newline at end of file diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index f022e2c81e..683b7b1eda 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -63,9 +63,9 @@ call FUNC(determineZoom); setCurrentChannel GVAR(DefaultChannel); if (currentChannel == GVAR(DefaultChannel)) then { - // INFO_1("Channel Set - %1", currentChannel); + // ACE_LOGINFO_1("Channel Set - %1", currentChannel); } else { - ERROR_2("Failed To Set Channel %1 (is %2)", GVAR(DefaultChannel), currentChannel); + ACE_LOGERROR_2("Failed To Set Channel %1 (is %2)", GVAR(DefaultChannel), currentChannel); }; }, 0, []] call CBA_fnc_addPerFrameHandler; }; @@ -116,13 +116,12 @@ call FUNC(determineZoom); GVAR(hasWatch) = true; ["loadout", { - params ["_unit"]; - if (isNull _unit) exitWith { + if (isNull (_this select 0)) exitWith { GVAR(hasWatch) = true; }; GVAR(hasWatch) = false; { if (_x isKindOf ["ItemWatch", configFile >> "CfgWeapons"]) exitWith {GVAR(hasWatch) = true;}; false - } count (assignedItems _unit); -}, true] call CBA_fnc_addPlayerEventHandler; + } count (assignedItems ACE_player); +}] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/map/XEH_preInit.sqf b/addons/map/XEH_preInit.sqf index 7fe826a174..7d00e938cf 100644 --- a/addons/map/XEH_preInit.sqf +++ b/addons/map/XEH_preInit.sqf @@ -3,8 +3,6 @@ ADDON = false; LOG(MSG_INIT); -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/map/config.cpp b/addons/map/config.cpp index aab52c3536..b619d96d10 100644 --- a/addons/map/config.cpp +++ b/addons/map/config.cpp @@ -26,7 +26,6 @@ class RscButtonMenu; class RscEdit; #include "ACE_Settings.hpp" -#include "Cfg3DEN.hpp" #include "CfgEventHandlers.hpp" #include "CfgMarkers.hpp" #include "CfgVehicles.hpp" diff --git a/addons/map/functions/fnc_blueForceTrackingModule.sqf b/addons/map/functions/fnc_blueForceTrackingModule.sqf index a892bf72cd..fd839cbb38 100644 --- a/addons/map/functions/fnc_blueForceTrackingModule.sqf +++ b/addons/map/functions/fnc_blueForceTrackingModule.sqf @@ -1,18 +1,13 @@ /* - * Author: KoffeinFlummi - * Initializes the blue force tracking module. - * - * Arguments: - * Whatever the module provides. (I dunno.) - * - * Return Value: - * None - * - * Example: - * call ACE_map_fnc_blueForceTrackingModule - * - * Public: No - */ +* Author: KoffeinFlummi +* Initializes the blue force tracking module. +* +* Arguments: +* Whatever the module provides. (I dunno.) +* +* Return Value: +* None +*/ #include "script_component.hpp" @@ -25,4 +20,4 @@ params ["_logic"]; [_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_ShowPlayerNames), "ShowPlayerNames"] call EFUNC(common,readSettingFromModule); -INFO_3("Blue Force Tracking Module Initialized:", GVAR(BFT_Enabled), GVAR(BFT_Interval), GVAR(BFT_HideAiGroups)); +ACE_LOGINFO_3("Blue Force Tracking Module Initialized:", GVAR(BFT_Enabled), GVAR(BFT_Interval), GVAR(BFT_HideAiGroups)); diff --git a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf index 46e7833cc1..9f37252331 100644 --- a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf +++ b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf @@ -1,20 +1,3 @@ -/* - * Author: ACE-Team - * Update the blue force tracking. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ACE_map_fnc_blueForceTrackingUpdate - * - * Public: No - */ - - // #define ENABLE_PERFORMANCE_COUNTERS #include "script_component.hpp" // BEGIN_COUNTER(blueForceTrackingUpdate); diff --git a/addons/map/functions/fnc_compileFlashlightMenu.sqf b/addons/map/functions/fnc_compileFlashlightMenu.sqf index f271cd723f..fb33b59682 100644 --- a/addons/map/functions/fnc_compileFlashlightMenu.sqf +++ b/addons/map/functions/fnc_compileFlashlightMenu.sqf @@ -39,7 +39,7 @@ _unitLight params ["_flashlight", ""]; {[_player, _this select 2] call FUNC(switchFlashlight)} }; - private _action = [_x, _displayName, _icon, _statement, {true}, {}, _x] call EFUNC(interact_menu,createAction); + _action = [_x, _displayName, _icon, _statement, {true}, {}, _x] call EFUNC(interact_menu,createAction); _actions pushBack [_action, [], _player]; } forEach _flashlightItems; diff --git a/addons/map/functions/fnc_determineMapLight.sqf b/addons/map/functions/fnc_determineMapLight.sqf index 89a2f6f606..3269c5a056 100644 --- a/addons/map/functions/fnc_determineMapLight.sqf +++ b/addons/map/functions/fnc_determineMapLight.sqf @@ -9,9 +9,6 @@ * 0: Does the map needs shading? * 1: Color of the overlay * - * Example: - * call ACE_map_fnc_determineMapLight - * * Public: No */ diff --git a/addons/map/functions/fnc_determineZoom.sqf b/addons/map/functions/fnc_determineZoom.sqf index fd9cc24264..efe20a0e52 100644 --- a/addons/map/functions/fnc_determineZoom.sqf +++ b/addons/map/functions/fnc_determineZoom.sqf @@ -1,19 +1,15 @@ /* - * Author: Rocko - * Calculate the maximum zoom level allowed for the current map - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ACE_map_fnc_determineZoom - * - * Public: No - */ - +* Author: Rocko +* Calculate the maximum zoom level allowed for the current map +* +* Arguments: +* None +* +* Return Value: +* None +* +* Public: No +*/ #include "script_component.hpp" private _grids = (configFile >> "CfgWorlds" >> worldName >> "Grid"); diff --git a/addons/map/functions/fnc_moduleMap.sqf b/addons/map/functions/fnc_moduleMap.sqf index 3dead784ca..605c15127e 100644 --- a/addons/map/functions/fnc_moduleMap.sqf +++ b/addons/map/functions/fnc_moduleMap.sqf @@ -3,15 +3,10 @@ * Initializes the Map module. * * Arguments: - * Whatever the module provides. (I dunno.) + * Whatever the module provides. (I dunno.) * * Return Value: * None - * - * Example: - * call ACE_map_fnc_moduleMap - * - * Public: No */ #include "script_component.hpp" @@ -29,4 +24,4 @@ if !(_activated) exitWith {}; [_logic, QGVAR(mapShowCursorCoordinates), "MapShowCursorCoordinates"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(DefaultChannel), "DefaultChannel" ] call EFUNC(common,readSettingFromModule); -INFO("Map Module Initialized."); +ACE_LOGINFO("Map Module Initialized."); diff --git a/addons/map/functions/fnc_onDrawMap.sqf b/addons/map/functions/fnc_onDrawMap.sqf index dff79d694a..37ec5a7000 100644 --- a/addons/map/functions/fnc_onDrawMap.sqf +++ b/addons/map/functions/fnc_onDrawMap.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * Something - * - * Return Value: - * None - * - * Example: - * call ACE_map_fnc_onDrawMap - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" ((_this select 0) displayCtrl 1016) ctrlShow GVAR(mapShowCursorCoordinates); diff --git a/addons/map/functions/fnc_simulateMapLight.sqf b/addons/map/functions/fnc_simulateMapLight.sqf index 94c0853b23..ba03c421a7 100644 --- a/addons/map/functions/fnc_simulateMapLight.sqf +++ b/addons/map/functions/fnc_simulateMapLight.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * [CONTROL, 5, [5, 4, 6], []] call ACE_map_fnc_simulateMapLights - * * Public: No */ diff --git a/addons/map/functions/fnc_updateMapEffects.sqf b/addons/map/functions/fnc_updateMapEffects.sqf index e8ebcbd884..23e97114a8 100644 --- a/addons/map/functions/fnc_updateMapEffects.sqf +++ b/addons/map/functions/fnc_updateMapEffects.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * call ACE_map_fnc_updateMapEffects - * * Public: No */ diff --git a/addons/map/script_component.hpp b/addons/map/script_component.hpp index 172a0fe838..414d4d17c9 100644 --- a/addons/map/script_component.hpp +++ b/addons/map/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MAP diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 9108f088bf..364f595637 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Térkép Карта Mappa - 地図 - 지도 - 地图 - 地圖 Map illumination? @@ -28,10 +24,6 @@ Térkép megvilágítása? Освещение карты? Illuminazione Mappa? - 地図に照明? - 지도에 조명? - 地图照明? - 地圖照明? Simulate map lighting based on ambient lighting and player's items? @@ -43,10 +35,6 @@ Simular iluminación de mapa basada en la iluminación ambiente y los elementos de los jugadores? Simulovat nasvícení mapy v závisloti na okolí a předmětů hráče? Simula illuminazione della mappa in base alla luce ambientale e agli oggetti del giocatore? - 環境光やプレイヤーのアイテムにより、地図へ光のシミュレーションをおこないますか? - 주변 환경및 플레이어 조명에 의한 빛 변화를 지도에 반영할까요? - 透过环境光与玩家的物品来决定地图亮度? - 透過環境光與玩家的物品來決定地圖亮度? Map flashlight glow? @@ -58,10 +46,6 @@ Nasvícení mapy pomocí baterky? Luce della torcia in mappa? Lumière de la lampe de carte ? - 地図をフラッシュライトで照らしますか? - 지도 조명이 빛이 납니까? - 增加地图亮度? - 增加地圖亮度? Add external glow to players who use flashlight on map? @@ -73,10 +57,6 @@ Añadir resplandor externo a los jugadores que utilizan la linterna en el mapa? Přidat externí záři hráči který používá baterku v mapě? Aggiungi luce esterna a giocatori che usano la torcia in mappa? - プレイヤが地図上でフラッシュライトを使うと、照らすようにしますか? - 지도에 불빛을 비치는 플레이어를 조금 더 밝게 합니까? - 当玩家拥有手电筒时, 增加地图亮度? - 當玩家擁有手電筒時, 增加地圖亮度? Map shake? @@ -89,10 +69,6 @@ Térkép-rázkódás? Тряска карты? Scuoti la mappa? - 地図を揺らしますか? - 지도 흔들림? - 地图震动? - 地圖震動? Make map shake when walking? @@ -105,10 +81,6 @@ Rázkódjon-e a térkép mozgáskor? Заставлять карту трястись при ходьбе? Far scuotere la mappa mentre cammini? - 歩いているときは地図を揺らしますか? - 걸을때 지도보면 흔들리게 합니까? - 走路时让地图有震动的感觉? - 走路時讓地圖有震動的感覺? Limit map zoom? @@ -121,10 +93,6 @@ Térkép-nagyítás korlátozása? Ограничить приближение карты? Limita lo zoom in mappa? - 地図の拡大を制限しますか? - 지도 확대 제한? - 限制地图缩放倍率? - 限制地圖縮放倍率? Limit the amount of zoom available for the map? @@ -137,10 +105,6 @@ Korlátozva legyen-e a nagyítás mennyisége a térképnél? Ограничить максимальное приближение, доступное на карте? Limita l'ammontare di zoom disponibile per la mappa? - 地図上で利用できる拡大倍率を制限しますか? - 지도 확대에 제한을 둡니까? - 限制地图上可允许缩放的倍率? - 限制地圖上可允許縮放的倍率? Show cursor coordinates? @@ -153,10 +117,6 @@ Kurzor-koordináták mutatása? Показывать координаты курсора? Mostra coordinate sul cursore? - カーソル先で座標を表示しますか? - 커서에 좌표를 보이게 합니까? - 显示游标的座标? - 顯示游標的座標? Show the grid coordinates on the mouse pointer? @@ -169,10 +129,6 @@ Mutatva legyen-e a kurzornál található rész rácskoordinátája? Показывать координаты около курсора мыши? Mostra la griglia coordinate sul cursore mouse? - カーソルに合わせた先の地図座標を表示しますか? - 지도에서 커서 옆에 좌표가 뜨게 합니까? - 显示滑鼠游标所在的网格座标? - 顯示滑鼠游標所在的網格座標? This module allows you to customize the map screen. @@ -185,10 +141,6 @@ Этот модуль позволяет настроить отображение карты. Este módulo permite personalizar la pantalla del mapa. Questo modulo ti permette di customizzare lo schermo della mappa. - モジュールは地図画面をカスタマイズできます。 - 이 모듈은 지도 화면을 임의로 설정할 수 있게 해줍니다. - 此模块允许自定地图的相关效果. - 此模塊允許自定地圖的相關效果. Blue Force Tracking @@ -201,10 +153,6 @@ Blue Force követés Система слежения Blue Force Tracking Blue Force Tracking - ブルー フォース トラッキング - GPS피아식별기 - 显示蓝方踪迹 - 顯示藍方蹤跡 BFT Enable @@ -217,10 +165,6 @@ BFT engedélyezése Включить BFT Abilita BFT - BFT を有効化 - GPS피아식별기 켜기 - 蓝方踪迹启用 - 藍方蹤跡啟用 Enable Blue Force Tracking. Default: No @@ -233,10 +177,6 @@ Blue Force követés engedélyezése. Alapértelmezett: Nem Включает систему служения BFT. По-умолчанию: Нет Abilita Blue Force Tracking. Default: No - ブルー フォース トラッキングを有効化します。標準:無効 - GPS피아식별기 켭니다. 기본설정: 아니요 - 启用显示蓝方踪迹. 预设: 否 - 啟用顯示藍方蹤跡. 預設: 否 Interval @@ -249,10 +189,6 @@ Intervallum Интервал Intervallo - 間隔 - 간격 - 间隔 - 間隔 How often the markers should be refreshed (in seconds) @@ -265,10 +201,6 @@ Milyen gyakran frissüljenek a jelölők (másodpercben) Как часто должны обновляться маркеры (в секундах) Quanto spesso vengono aggiornati i marker (in secondi) - マーカが再描画される間隔を設定できます(秒) - 몇 초마다 마커를 새로 갱신합니까? - 设定每多少时间重新标示出单位位置 (秒) - 設定每多少時間重新標示出單位位置 (秒) Hide AI groups? @@ -281,10 +213,6 @@ AI csoportok elrejtése? Скрыть группы ботов? Nascondere gruppi IA? - AI グループを非表示にしますか? - 인공지능 그룹을 숨깁니까? - 隐藏AI小队? - 隱藏AI小隊? Hide markers for 'AI only' groups? @@ -297,10 +225,6 @@ Jelölők elrejtése "csak AI" csoportoknál? Скрыть маркеры групп, которые состоят полностью из ботов? Nascondi markers per gruppi di sole IA? - 'AI のみ'グループのマーカを隠しますか? - 인공지능만 있는 그룹의 마커를 숨깁니까? - 隐藏'AI小队'的踪迹? - 隱藏'AI小隊'的蹤跡? Show player names? @@ -313,10 +237,6 @@ Itt található az a játékos nevét? Показать имена игроков? Mostra i nomi dei giocatori? - プレイヤ名を表示しますか? - 플레이어 이름을 표시합니까? - 显示玩家名称? - 顯示玩家名稱? Show individual player names? @@ -329,10 +249,6 @@ Itt található az adott játékos neveket? Показать отдельные имена игроков? Mostra i nomi dei giocatori singoli? - プレイヤの名前を表示しますか? - 각 플레이어의 이름을 표시합니까? - 显示玩家的个别名称? - 顯示玩家的個別名稱? This module allows the tracking of allied units with BFT map markers. @@ -345,10 +261,6 @@ Этот модуль позволяет отслеживать перемещение союзных войск по карте при помощи маркеров BFT. Este módulo permite el seguimiento de las unidades aliadas con marcadores de mapa BFT. Questo modulo permette il tracciamento di unità alleate con i marker BFT in mappa - モジュールは BFT マップ マーカとともに、同勢力ユニットの追跡を許可します。 - 이 모듈은 아군을 지도상에서 추적할 수 있게 해줍니다. - 此模块将使你能在地图上看见友方单位的踪迹. - 此模塊將使你能在地圖上看見友方單位的蹤跡. Flashlights @@ -360,10 +272,6 @@ Svítilny Linternas Torcia - フラッシュライト - 손전등 - 手电筒 - 手電筒 NVG @@ -375,10 +283,6 @@ NVG NVG NVG - 夜間暗視装置 - 야투경 - 夜视镜 - 夜視鏡 On @@ -390,10 +294,6 @@ Zapnout Encendido Acceso - 起動 - 켜기 - 开启 - 開啟 Off @@ -405,10 +305,6 @@ Vypnout Apagado Spento - 停止 - 끄기 - 关闭 - 關閉 Increase Brightness @@ -420,10 +316,6 @@ Zvýšit jas Aumentar brillo Aumenta Luminosità - 感度を上げる - 밝기 올리기 - 增加亮度 - 增加亮度 Decrease Brightness @@ -435,10 +327,6 @@ Snížit jas Reducir brillo Diminuisci Luminosità - 感度を下げる - 밝기 내리기 - 降低亮度 - 降低亮度 Turn On %1 @@ -451,10 +339,6 @@ %1 Bekapcsolása Ativar %1 Активировать %1 - %1 を点ける - %1 켜기 - 开启%1 - 開啟%1 Turn Off %1 @@ -467,10 +351,6 @@ %1 Kikapcsolása Desativar %1 Деактивировать %1 - %1 を消す - %1 끄기 - 关闭%1 - 關閉%1 Set Channel At Start @@ -482,10 +362,6 @@ Imposta Canale all'Avvio Setear canal al comenzar Mettre un canal par défaut - 開始時のチャンネルを決定 - 시작시 채널 - 设定游戏开始时的聊天频道 - 設定遊戲開始時的聊天頻道 Change the starting marker channel at mission start @@ -497,32 +373,6 @@ Cambia il canale marker iniziale all'avvio di missione 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. - ミッション開始時にあらかじめ設定されているマーカ チャンネルを変更します - 미션시작시 마커채널을 변경합니다 - 更改任务启动时的聊天频道 - 更改任務啟動時的聊天頻道 - - - Disable BFT - BFT deaktivieren - BFTを無効化 - GPS피아식별기 끄기 - Wyłącz BFT - Désactive le BFT - Disablita BFT - 关闭友军踪迹 - 關閉友軍蹤跡 - - - Always disable Blue Force Tracking for this group. - Blue Force Tracking für diese Gruppe immer deaktivieren. - このグループへのブルー フォース トラッキングを常に無効化します。 - 이 그룹에 한해 GPS피아식별기를 항상 끕니다. - Zawsze wyłączaj Blue Force Tracking dla tej grupy. - Désactive en permanence le Blue Force Tracking pour ce groupe. - Disabilita sempre il Blue Force Tracking per questo gruppo. - 对此小队永远关闭友军踪迹显示. - 對此小隊永遠關閉友軍蹤跡顯示. - + \ No newline at end of file diff --git a/addons/map_gestures/ACE_Settings.hpp b/addons/map_gestures/ACE_Settings.hpp index bb01592230..3730c08c58 100644 --- a/addons/map_gestures/ACE_Settings.hpp +++ b/addons/map_gestures/ACE_Settings.hpp @@ -44,4 +44,18 @@ class ACE_Settings { typeName = "COLOR"; value[] = {1, 0.88, 0, 0.7}; }; + class GVAR(groupColorConfigurations) { + displayName = CSTRING(groupColorConfigurations_displayName); + description = CSTRING(groupColorConfigurations_description); + category = CSTRING(mapGestures_category); + typeName = "ARRAY"; + value[] = {}; + }; + class GVAR(groupColorConfigurationMapping) { + displayName = CSTRING(groupColorConfigurationMapping_displayName); + description = CSTRING(groupColorConfigurationMapping_description); + category = CSTRING(mapGestures_category); + typeName = "ARRAY"; + value[] = {{}, {}}; + }; }; diff --git a/addons/map_gestures/CfgEventHandlers.hpp b/addons/map_gestures/CfgEventHandlers.hpp index becf395052..b0848d0248 100644 --- a/addons/map_gestures/CfgEventHandlers.hpp +++ b/addons/map_gestures/CfgEventHandlers.hpp @@ -14,5 +14,6 @@ class Extended_PreInit_EventHandlers { class Extended_PostInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_postInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_serverPostInit)); }; }; diff --git a/addons/map_gestures/CfgVehicles.hpp b/addons/map_gestures/CfgVehicles.hpp index 0745c70a16..5593d66181 100644 --- a/addons/map_gestures/CfgVehicles.hpp +++ b/addons/map_gestures/CfgVehicles.hpp @@ -47,7 +47,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(moduleGroupSettings_displayName); function = QFUNC(moduleGroupSettings); - isGlobal = 2; + isGlobal = 0; author = ECSTRING(common,ACETeam); icon = QPATHTOF(ui\icon_module_map_gestures_ca.paa); class Arguments { diff --git a/addons/map_gestures/XEH_PREP.hpp b/addons/map_gestures/XEH_PREP.hpp index 8d457bd7e0..eba9f5bfe8 100644 --- a/addons/map_gestures/XEH_PREP.hpp +++ b/addons/map_gestures/XEH_PREP.hpp @@ -1,5 +1,5 @@ -PREP(addGroupColorMapping); +PREP(assignClientIDOnServer); PREP(drawMapGestures); PREP(endTransmit); PREP(getProximityPlayers); diff --git a/addons/map_gestures/XEH_postInit.sqf b/addons/map_gestures/XEH_postInit.sqf index cc3daf6a06..185eaf97f0 100644 --- a/addons/map_gestures/XEH_postInit.sqf +++ b/addons/map_gestures/XEH_postInit.sqf @@ -1,24 +1,13 @@ #include "script_component.hpp" if (["STMapGestures"] call EFUNC(common,isModLoaded)) exitWith { - WARNING("st_map_gestures is installed - exiting [remove st_map_gestures.pbo to allow ace version]"); + ACE_LOGWARNING("st_map_gestures is installed - exiting [remove st_map_gestures.pbo to allow ace version]"); }; if (!hasInterface) exitWith {}; ["ace_settingsInitialized", { if (!GVAR(enabled)) exitWith {}; - - // This will set QEGVAR(common,playerOwner) var on player objects - [] call EFUNC(common,setPlayerOwner); - - GVAR(pointPosition) = [0,0,0]; - - [QGVAR(syncPos), { - params ["_unit", "_pointPos"]; - _unit setVariable [QGVAR(pointPosition), _pointPos]; - }] call CBA_fnc_addEventHandler; - [{ if (isNull (findDisplay 12)) exitWith {}; diff --git a/addons/map_gestures/XEH_preInit.sqf b/addons/map_gestures/XEH_preInit.sqf index 92387036e4..a7feade1c3 100644 --- a/addons/map_gestures/XEH_preInit.sqf +++ b/addons/map_gestures/XEH_preInit.sqf @@ -2,10 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; - -GVAR(GroupColorCfgMappingNew) = call CBA_fnc_createNamespace; ADDON = true; diff --git a/addons/map_gestures/XEH_serverPostInit.sqf b/addons/map_gestures/XEH_serverPostInit.sqf new file mode 100644 index 0000000000..1b70e24149 --- /dev/null +++ b/addons/map_gestures/XEH_serverPostInit.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +[QGVAR(noOwnerID), FUNC(assignClientIDOnServer)] call CBA_fnc_addEventHandler; diff --git a/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf b/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf deleted file mode 100644 index e02403b323..0000000000 --- a/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Author: Dslyecxi, MikeMatrix, PabstMirror - * Adds a group id color mapping. - * - * Arguments: - * 0: Group ID or group - * 1: Leader color array (4 numbers including alpha) - * 2: Unit (non-leader) color array (4 numbers including alpha) - * - * Return Value: - * None - * - * Example: - * ["Alpha 1-1", [1,0,0,1], [0,1,0,1]] call ace_map_gestures_fnc_addGroupColorMapping - * - * Public: Yes - */ -#include "script_component.hpp" - -if (!params [["_group", "", [grpNull, ""]], ["_leadColor", [1,1,1,1], [[]], 4], ["_unitColor", [1,1,1,1], [[]], 4]]) exitWith { - ERROR_1("Bad Params: %1",_this); -}; -TRACE_3("params",_group,_leadColor,_unitColor); - -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.")}; -if (!([_unitColor] call FUNC(isValidColorArray))) exitWith {ERROR("color is not a valid color array.")}; - -GVAR(GroupColorCfgMappingNew) setVariable [_group, [_leadColor, _unitColor]]; diff --git a/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf b/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf new file mode 100644 index 0000000000..92b1e95ab5 --- /dev/null +++ b/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf @@ -0,0 +1,24 @@ +/* + * Author: Dslyecxi, MikeMatrix + * Assign readable client ID to unit on the server. + * + * Arguments: + * 0: Unit name + * + * Return Value: + * None + * + * Example: + * ["MikeMatrix"] call ace_map_gestures_fnc_assignClientIDOnServer + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unitName"]; + +{ + if (name _x == _unitName) exitWith { + _x setVariable [QGVAR(owner_id), owner _x, true]; + }; +} count playableUnits; diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index 237d0537f5..728126531e 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -15,8 +15,6 @@ */ #include "script_component.hpp" -BEGIN_COUNTER(draw); - #define ICON_RENDER_SIZE 55 #define ICON_TEXT_ALIGN "left" #define ICON_ANGLE 0 @@ -28,34 +26,36 @@ BEGIN_COUNTER(draw); if (!GVAR(enabled) || !visibleMap) exitWith {}; +private ["_color", "_drawPosVariableName", "_group", "_grpName", "_pos", "_unitUID"]; + params ["_mapHandle"]; // Iterate over all nearby players and render their pointer if player is transmitting. { + // Data variable name for unit + _unitUID = getPlayerUID _x; + _drawPosVariableName = if (!isNil "_unitUID" && _unitUID != "") then {format [QGVAR(%1_DrawPos), _unitUID]} else {nil}; - // Only render if the unit is alive and transmitting - if (alive _x && {_x getVariable [QGVAR(Transmit), false]}) then { + if (!isNil "_drawPosVariableName") then { + if (isNil {missionNamespace getVariable _drawPosVariableName}) then {missionNamespace setVariable [_drawPosVariableName, [1, 1, 1]];}; + _pos = missionNamespace getVariable _drawPosVariableName; - private _pos = _x getVariable [QGVAR(pointPosition), [0,0,0]]; + // Only render if the unit is alive and transmitting + if (alive _x && {_x getVariable QGVAR(Transmit)}) then { + _group = group _x; + _grpName = groupID _group; - private _group = group _x; - private _grpName = groupID _group; + // If color settings for the group exist, then use those, otherwise fall back to the default colors + _color = if ([GVAR(GroupColorConfigurationMapping), _grpName] call CBA_fnc_hashHasKey) then { + (GVAR(GroupColorConfigurations) select ([GVAR(GroupColorConfigurationMapping), _grpName] call CBA_fnc_hashGet)) select (_x != leader _group) + } else { + if (_x == leader _group) then {GVAR(defaultLeadColor)} else {GVAR(defaultColor)}; + }; - // If color settings for the group exist, then use those, otherwise fall back to the default colors - private _colorMap = GVAR(GroupColorCfgMappingNew) getVariable _grpName; - private _color = if (isNil "_colorMap") then { - [GVAR(defaultLeadColor), GVAR(defaultColor)] select (_x != leader _group); - } else { - _colorMap select (_x != leader _group); + // Render icon and player name + _mapHandle drawIcon ["\a3\ui_f\data\gui\cfg\Hints\icon_text\group_1_ca.paa", _color, _pos, ICON_RENDER_SIZE, ICON_RENDER_SIZE, ICON_ANGLE, "", ICON_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; + _mapHandle drawIcon ["#(argb,8,8,3)color(0,0,0,0)", GVAR(nameTextColor), _pos, TEXT_ICON_RENDER_SIZE, TEXT_ICON_RENDER_SIZE, ICON_ANGLE, name _x, TEXT_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; }; - - TRACE_2("",_colorMap,_color); - - // Render icon and player name - _mapHandle drawIcon ["\a3\ui_f\data\gui\cfg\Hints\icon_text\group_1_ca.paa", _color, _pos, ICON_RENDER_SIZE, ICON_RENDER_SIZE, ICON_ANGLE, "", ICON_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; - _mapHandle drawIcon ["#(argb,8,8,3)color(0,0,0,0)", GVAR(nameTextColor), _pos, TEXT_ICON_RENDER_SIZE, TEXT_ICON_RENDER_SIZE, ICON_ANGLE, name _x, TEXT_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; }; nil } count ([ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers)); - -END_COUNTER(draw); diff --git a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf index ea058f0f7e..e4ec44837b 100644 --- a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf +++ b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf @@ -10,7 +10,7 @@ * All units in proximity * * Example: - * [player, 7] call ace_map_gestures_fnc_getProximityPlayers + * ["example value"] call ace_module_fnc_functionName * * Public: No */ @@ -21,5 +21,4 @@ params ["_unit", "_range"]; private _proximityPlayers = (getPos _unit) nearEntities [["CAMAnBase"], _range]; _proximityPlayers deleteAt (_proximityPlayers find _unit); _proximityPlayers append (crew vehicle _unit); - -_proximityPlayers select {[_x, false] call EFUNC(common,isPlayer);} +_proximityPlayers diff --git a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf index 8f44cf5732..52ae6d0a49 100644 --- a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf @@ -17,18 +17,29 @@ */ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; -TRACE_3("params",_logic,_units,_activated); +private ["_color", "_configurationGroupMappings", "_configurationIndex", "_configurations", "_leadColor"]; -if (!_activated) exitWith {}; +params ["_logic", "_units", "_activated"]; + +if (!_activated || !isServer) exitWith {}; // Transcode string setting into usable array. Example: "1,1,1,1" -> [1, 1, 1, 1] -private _leadColor = call compile ("[" + (_logic getVariable ["leadColor", ""]) + "]"); +_leadColor = call compile ("[" + (_logic getVariable ["leadColor", ""]) + "]"); if (!([_leadColor] call FUNC(isValidColorArray))) exitWith {ERROR("leadColor is not a valid color array.")}; -private _color = call compile ("[" + (_logic getVariable ["color", ""]) + "]"); +_color = call compile ("[" + (_logic getVariable ["color", ""]) + "]"); if (!([_color] call FUNC(isValidColorArray))) exitWith {ERROR("color is not a valid color array.")}; +// If we already have color configurations from another source, use those, otherwise use default. +_configurations = if (isNil QGVAR(GroupColorConfigurations)) then { [] } else { +GVAR(GroupColorConfigurations) }; +_configurationGroupMappings = if(isNil QGVAR(GroupColorConfigurationMapping)) then { [] call CBA_fnc_hashCreate } else { +GVAR(GroupColorConfigurationMapping) }; + +// Save custom color configuration and keep the index of the entry. +_configurationIndex = _configurations pushBack [_leadColor, _color]; + // Add all synchronized groups and reference custom configuration for them { - [group _x, _leadColor, _color] call FUNC(addGroupColorMapping); + [_configurationGroupMappings, groupID group _x, _configurationIndex] call CBA_fnc_hashSet; } forEach _units; + +[QGVAR(GroupColorConfigurations), _configurations, false, true] call EFUNC(common,setSetting); +[QGVAR(GroupColorConfigurationMapping), _configurationGroupMappings, false, true] call EFUNC(common,setSetting); diff --git a/addons/map_gestures/functions/fnc_moduleSettings.sqf b/addons/map_gestures/functions/fnc_moduleSettings.sqf index 6e292ce75e..56d3235d03 100644 --- a/addons/map_gestures/functions/fnc_moduleSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleSettings.sqf @@ -40,4 +40,4 @@ if (_defaultColor != "") then { [QGVAR(defaultColor), _defaultColor, true, true] call EFUNC(common,setSetting); }; -INFO("Map Gestures Module Initialized."); +ACE_LOGINFO("Map Gestures Module Initialized."); diff --git a/addons/map_gestures/functions/fnc_receiverInit.sqf b/addons/map_gestures/functions/fnc_receiverInit.sqf index 9386523340..b132dad1d7 100644 --- a/addons/map_gestures/functions/fnc_receiverInit.sqf +++ b/addons/map_gestures/functions/fnc_receiverInit.sqf @@ -22,4 +22,4 @@ if (!isNil QGVAR(DrawMapHandlerID)) then { (findDisplay 12 displayCtrl 51) ctrlRemoveEventHandler ["Draw", GVAR(DrawMapHandlerID)]; GVAR(DrawMapHandlerID) = nil; }; -GVAR(DrawMapHandlerID) = findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", {call FUNC(drawMapGestures)}]; +GVAR(DrawMapHandlerID) = findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", FUNC(drawMapGestures)]; diff --git a/addons/map_gestures/functions/fnc_transmit.sqf b/addons/map_gestures/functions/fnc_transmit.sqf index 166b1cb375..aacff9e679 100644 --- a/addons/map_gestures/functions/fnc_transmit.sqf +++ b/addons/map_gestures/functions/fnc_transmit.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -BEGIN_COUNTER(transmit); +private ["_ownerID", "_unitUID", "_drawPosVariableName", "_playerOwnerID"]; params ["", "_pfhId"]; @@ -29,14 +29,17 @@ if (!GVAR(EnableTransmit) || !visibleMap) exitWith { }; { - private _owner = _x getVariable [QEGVAR(common,playerOwner), -1]; - if (_owner > -1) then { - private _remotePos = _x getVariable [QGVAR(remotePos), [0,0,0]]; - if ((_remotePos distance2d GVAR(pointPosition)) > 1) then { // Only transmit when actually moving - [QGVAR(syncPos), [ACE_Player, GVAR(pointPosition)], _owner] call CBA_fnc_ownerEvent; - _x setVariable [QGVAR(remotePos), GVAR(pointPosition)]; + _ownerID = _x getVariable QGVAR(owner_id); + if (isNil "_ownerID") then { + [QGVAR(noOwnerID), [name _x]] call CBA_fnc_serverEvent; + } else { + _playerOwnerID = ACE_player getVariable QGVAR(owner_id); + if (!isNil "_playerOwnerID" && _ownerID != _playerOwnerID) then { + _unitUID = getPlayerUID ACE_Player; + _drawPosVariableName = if (!isNil "_unitUID" && _unitUID != "") then {format [QGVAR(%1_DrawPos), _unitUID]} else {nil}; + if (!isNil "_drawPosVariableName") then { + _ownerID publicVariableClient _drawPosVariableName; + }; }; }; } count ([ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers)); - -END_COUNTER(transmit); diff --git a/addons/map_gestures/functions/fnc_transmitterInit.sqf b/addons/map_gestures/functions/fnc_transmitterInit.sqf index 3c363d6f04..d115fb22c5 100644 --- a/addons/map_gestures/functions/fnc_transmitterInit.sqf +++ b/addons/map_gestures/functions/fnc_transmitterInit.sqf @@ -15,9 +15,11 @@ */ #include "script_component.hpp" +private ["_mapCtrl", "_unitUID", "_drawPosVariableName"]; + disableSerialization; -private _mapCtrl = findDisplay 12 displayCtrl 51; +_mapCtrl = findDisplay 12 displayCtrl 51; // MouseMoving EH. if (!isNil QGVAR(MouseMoveHandlerID)) then { @@ -26,7 +28,7 @@ if (!isNil QGVAR(MouseMoveHandlerID)) then { }; GVAR(MouseMoveHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseMoving", { // Don't transmit any data if we're using the map tools - if (!GVAR(EnableTransmit) || {(["ace_maptools"] call EFUNC(common,isModLoaded)) && {EGVAR(maptools,mapTool_isDragging) || EGVAR(maptools,mapTool_isRotating)}}) exitWith {}; + if (!GVAR(EnableTransmit) || EGVAR(maptools,mapTool_isDragging) || EGVAR(maptools,mapTool_isRotating)) exitWith {}; params ["_control", "_posX", "_posY"]; @@ -34,7 +36,11 @@ GVAR(MouseMoveHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseMoving", { ACE_player setVariable [QGVAR(Transmit), true, true]; }; - GVAR(pointPosition) = _control ctrlMapScreenToWorld [_posX, _posY]; + _unitUID = getPlayerUID ACE_player; + _drawPosVariableName = if (!isNil "_unitUID" && _unitUID != "") then {format [QGVAR(%1_DrawPos), _unitUID]} else {nil}; + if (!isNil "_drawPosVariableName") then { + missionNamespace setVariable [_drawPosVariableName, _control ctrlMapScreenToWorld [_posX, _posY]]; + }; }]; // MouseDown EH diff --git a/addons/map_gestures/script_component.hpp b/addons/map_gestures/script_component.hpp index ca428f8725..96189555f9 100644 --- a/addons/map_gestures/script_component.hpp +++ b/addons/map_gestures/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MAP_GESTURES diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml index feebdb7a08..e89d6c07a3 100644 --- a/addons/map_gestures/stringtable.xml +++ b/addons/map_gestures/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -11,10 +11,6 @@ Kartenzeichen Gestos en mapa Gestes de carte - マップ ジェスチャ - 지도 신호 - 地图指示器 - 地圖指示器 Enabled @@ -26,10 +22,6 @@ Aktiviert Activado Activer - 有効化 - 켜기 - 启用 - 啟用 Map Gesture Max Range @@ -41,10 +33,6 @@ Maximale Reichweite der Kartenzeichen Máx. dist. para gestos en mapa Distance max. des gestes de carte - マップ ジェスチャの最大範囲 - 지도 신호 최대 거리 - 地图指示器最大范围 - 地圖指示器最大範圍 Max range between players to show the map gesture indicator [default: 7 meters] @@ -56,10 +44,6 @@ Maximale Reichweite zwischen Spielern um Kartenzeichen anzuzeigen (Standard: 7 Meter) Máxima distancia a la cual pueden verse el indicador de gestos [defecto: 7 m] Distance max. entre les joueurs pour montrer le pointage sur carte. (Défaut : 7m) - プレイヤのマップ ジェスチャによる表示範囲を設定します [標準:7 メートル] - 플레이어간에 지도 신호 표시거리를 설정합니다. [기본: 7 미터] - 设定地图指示器显示的最大范围距离 [预设: 7公尺] - 設定地圖指示器顯示的最大範圍距離 [預設: 7公尺] Lead Default Color @@ -71,10 +55,6 @@ Gruppenführer-Standardfarbe Color por defecto para el lider Couleur principale de commandement. - リーダー用標準の色 - 리더 기본 색상 - 队长预设颜色 - 隊長預設顏色 Fallback Color value for group leaders when there is no group setting. [Module: leave blank to not force on clients] @@ -85,10 +65,6 @@ Ersatz-Farbwert für Gruppenführer wenn keine Gruppeneinstellung vorhanden ist. [Modul: leer lassen um Anwendung bei Clients nicht zu erzwingen] Color por defecto para líderes cuando no está configurado [Módulo: dejar en blanco para no forzar] Couleur par défaut pour les chefs de groupe quand il n'y a pas de réglage pour le groupe. (Module : laisser vide pour ne pas forcer chez les clients) - グループ設定が存在しない場合に、グループ リーダーへ設定される色の値を設定します。[モジュール:空の場合はクライアントへ強制しません] - 그룹 설정이 없는 경우 리더의 예비 색상 값입니다. [모듈: 클라이언트에서 강체치 않기 위해 공백으로 비워둘것] - 当没有设定小队颜色时, 此功能会定义队长的指示器颜色. [模块: 此栏留空来保持预设颜色] - 當沒有設定小隊顏色時, 此功能會定義隊長的指示器顏色. [模塊: 此欄留空來保持預設顏色] Default Color @@ -100,10 +76,6 @@ Standardfarbe Color por defecto Couleur par défaut - 標準色 - 기본 색상 - 预设颜色 - 預設顏色 Fallback Color value when there is no group setting. [Module: leave blank to not force on clients] @@ -114,10 +86,6 @@ Ersatz-Farbwert wenn keine Gruppeneinstellung vorhanden ist. [Modul: leer lassen um Anwendung bei Clients nicht zu erzwingen] Color por defecto cuando no está configurado [Módulo: dejar en blanco para no forzar] Couleur par défaut quand il n'y a pas de réglage pour le groupe. (Module : laisser vide pour ne pas forcer chez les clients) - グループ設定が存在しない場合に、グループ リーダーへ設定される色の値を設定します。[モジュール:空の場合はクライアントへ強制しません] - 그룹 설정이 없을 경우의 예비 색상입니다. [모듈: 클라이언트에서 강체치 않기 위해 공백으로 비워둘것] - 当没有设定小队颜色时, 此功能会定义玩家的指示器颜色. [模块: 此栏留空来保持预设颜色] - 當沒有設定小隊顏色時, 此功能會定義玩家的指示器顏色. [模塊: 此欄留空來保持預設顏色] Lead Color @@ -129,10 +97,6 @@ Gruppenführer-Farbe Color para el líder Couleur de commandement - リーダー用の色 - 리더 색상 - 队长颜色 - 隊長顏色 Color value for group leaders of groups synced with this module. @@ -143,10 +107,6 @@ Farbwert für Gruppenführer, die mit diesem Modul synchronisiert werden. Color para los líderes de los grupos sincronizados al módulo. Couleur pour les chefs de groupe des groupes synchronisés avec le module. - モジュールで同期されたグループのリーダー用に色の値を決定します。 - 그룹이 이 모듈에 동기화 됐을때의 리더 색상입니다. - 改变与此同步小队队长的指示器颜色. - 改變與此同步小隊隊長的指示器顏色. Color @@ -158,10 +118,6 @@ Farbe Color Couleur - - 색상 - 颜色 - 顏色 Color value for group members of groups synced with this module. @@ -172,10 +128,6 @@ Farbwert für Gruppenmitglieder, die mit diesem Modul synchronisiert werden. Color para los miembros de los grupos sincronizados al módulo. Couleur pour les membres du groupe synchronisé avec ce module. - モジュールで同期されたグループのメンバ用に色の値を決定します。 - 그룹이 이 모듈에 동기화 됐을때의 멤버 색상입니다. - 改变与此同步小队队员的指示器颜色 - 改變與此同步小隊隊員的指示器顏色 Map Gestures - Group Settings @@ -187,10 +139,6 @@ Kartenzeichen - Gruppeneinstellungen Gestos en mapas - Configuración de grupos Gestes de carte - réglages de groupe - マップ ジェスチャ - グループ設定 - 지도 신호 - 그룹 설정 - 地图指示器 - 队伍设定 - 地圖指示器 - 隊伍設定 Update Interval @@ -202,10 +150,6 @@ Update-Intervall Período de actualización Intervalle de mise à jour - 更新間隔 - 갱신 간격 - 更新间隔 - 更新間隔 Time between data updates. @@ -217,10 +161,47 @@ Zeit zwischen Datenupdates. Tiempo entre actualizaciones sucesivas. Temps entre les actualisations de données - データの更新間隔 - 데이터 갱신 간격 - 定义每次更新数据的时间. - 定義每次更新數據的時間. + + + Group color configurations + Configurações de cores de grupo + Konf. koloru grup + Конфигурация цвета групп + Konfigurace barvy pro skupinu + Configurazioni colori dei gruppi + Konfiguration der Gruppenfarbe + Configuración de color de grupo + Configuration des couleurs de groupe + + + Group color configuration containing arrays of color pairs ([leadColor, color]). + Configuração de cores de grupo contendo arrays com pares de cores ([leadColor, color]). + Konfiguracja kolorów grup zawierająca tablice par kolorów ([kolorLidera, kolor]). + Конфигурация цвета групп содержит массив цветовых пар ([лид. цвет, цвет]). + Configurazioni colori gruppi contenenti array di coppie di colori ([leadColor, color]). + Konfiguration der Gruppenfarbe mit zugeordneten Farbpaaren der Aufstellung ([leadColor, color]). + Configuración de color de grupo conteniendo una lista de pares de colores ([colorLider, colo]). + Configuration des couleurs de groupe contenant des tableaux de paires de couleurs ([couleurDeCommandement, couleur]). + + + Hash of Group ID mapped to the Group color configuration index. + Hashes de ID de grupos mapeados para o índice de configuração de cor de grupos. + Hasz ID grup zmapowanych w indeksie konfiguracji koloru grup. + Хеш ID групп, соответствующих индексам конфигурации цвета групп. + Hash degli ID Gruppi mappati nell'indice configurazioni colori gruppi. + Hashwert der Gruppen-ID, die dem Konfigurations-Index der Gruppenfarbe zugeordnet werden. + ID de Grupo mapeado al índice de la configuración de color de grupo. + Hash de l'identifiant du groupe mappé à l'index de la configuration de la couleur du groupe. + + + GroupID Color configuration mapping + Mapeamento de configuração para cores de GroupID + Mapowanie kolorów poprzez GroupID + Соответствие ID групп конфигурации цвета групп + Mappatura configurazioni colori GroupID + Gruppen-ID-Farbe Konfigurationszuordnung + Mapeado de ID de Grupo + Configuration du mappage de l'identifiant de la couleur du groupe. Enables the Map Gestures. @@ -232,10 +213,6 @@ Aktiviert die Kartenzeichen. Activar Gestos en Mapa Activer les gestes de carte - マップ ジェスチャを有効化 - 지도 신호 활성화 - 启用地图指示器 - 啟用地圖指示器 Name Text Color @@ -247,10 +224,6 @@ Farbe der Namenstexte. Color de los nombres Couleur du texte du nom - 名前への色 - 글 색상 명칭 - 名称文字颜色 - 名稱文字顏色 Color of the name tag text besides the map gestures mark. @@ -261,10 +234,6 @@ Farbe der Namenstexte neben der Kartenzeichen-Markierung. Color de los nombres dibujados al lado del marcados de gestos. Couleur des tags de nom à côté de marqueur de pointage sur carte. - マップ ジェスチャに表示される、名前の色を決定します。 - 지도 색상에 표시되는 이름의 색상을 결정합니다. - 定义名称文字颜色. 使其与地图指示器颜色有所区别. - 定義名稱文字顏色. 使其與地圖指示器顏色有所區別. Map Gestures @@ -276,10 +245,6 @@ Kartenzeichen Gestos en mapa Gestes de carte - マップ ジェスチャ - 지도 신호 - 地图指示器 - 地圖指示器 diff --git a/addons/maptools/ACE_Settings.hpp b/addons/maptools/ACE_Settings.hpp index cb2d98e1ce..0da43b64ca 100644 --- a/addons/maptools/ACE_Settings.hpp +++ b/addons/maptools/ACE_Settings.hpp @@ -7,11 +7,4 @@ class ACE_Settings { description = CSTRING(rotateModifierKey_description); values[] = {"$STR_A3_OPTIONS_DISABLED", "ALT", "CTRL", "SHIFT"}; }; - class GVAR(drawStaightLines) { - value = 1; - typeName = "BOOL"; - isClientSettable = 1; - displayName = CSTRING(drawStaightLines_displayName); - description = CSTRING(drawStaightLines_description); - }; }; diff --git a/addons/maptools/MapGpsUI.hpp b/addons/maptools/MapGpsUI.hpp index cd0a418465..c5b230f163 100644 --- a/addons/maptools/MapGpsUI.hpp +++ b/addons/maptools/MapGpsUI.hpp @@ -40,8 +40,7 @@ class RscTitles { colorBackground[] = {0,0,0,0}; colorText[] = {0.247,0.251,0.157,1}; shadowColo[] = {0,0,0,0}; - // EtelkaNarrowMediumPro broke with 1.72 hotfix, can revert back to that font if fixed (following 3 uses of PuristaSemibold) - font = "PuristaSemibold"; + font = "EtelkaNarrowMediumPro"; shadow = 0; sizeEx = 0.042; }; @@ -56,7 +55,7 @@ class RscTitles { colorBackground[] = {0,0,0,0}; colorText[] = {0.247,0.251,0.157,1}; shadowColo[] = {0,0,0,0}; - font = "PuristaSemibold"; + font = "EtelkaNarrowMediumPro"; shadow = 0; sizeEx = 0.042; }; @@ -71,7 +70,7 @@ class RscTitles { colorBackground[] = {0,0,0,0}; colorText[] = {0.247,0.251,0.157,1}; shadowColo[] = {0,0,0,0}; - font = "PuristaSemibold"; + font = "EtelkaNarrowMediumPro"; shadow = 0; sizeEx = 0.1; }; diff --git a/addons/maptools/XEH_PREP.hpp b/addons/maptools/XEH_PREP.hpp index eac6947431..1670c59593 100644 --- a/addons/maptools/XEH_PREP.hpp +++ b/addons/maptools/XEH_PREP.hpp @@ -1,7 +1,6 @@ PREP(calculateMapScale); PREP(canUseMapGPS); PREP(canUseMapTools); -PREP(drawLinesOnRoamer); PREP(handleMouseButton); PREP(handleMouseMove); PREP(isInsideMapTool); diff --git a/addons/maptools/XEH_postInitClient.sqf b/addons/maptools/XEH_postInitClient.sqf index ddde7063cc..8569f0eb9f 100644 --- a/addons/maptools/XEH_postInitClient.sqf +++ b/addons/maptools/XEH_postInitClient.sqf @@ -30,13 +30,5 @@ GVAR(mapTool_isRotating) = false; } else { // Hide GPS [false] call FUNC(openMapGps); - - // Handle closing map in middle of line drawing (it's never created) - GVAR(freedrawing) = false; }; }] call CBA_fnc_addPlayerEventHandler; - - -GVAR(freeDrawingData) = []; -GVAR(freedrawing) = false; - diff --git a/addons/maptools/XEH_preInit.sqf b/addons/maptools/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/maptools/XEH_preInit.sqf +++ b/addons/maptools/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/maptools/functions/fnc_calculateMapScale.sqf b/addons/maptools/functions/fnc_calculateMapScale.sqf index d5148893d5..926ed558fe 100644 --- a/addons/maptools/functions/fnc_calculateMapScale.sqf +++ b/addons/maptools/functions/fnc_calculateMapScale.sqf @@ -6,10 +6,7 @@ * None * * Return Value: - * None - * - * Example: - * call ACE_maptools_fnc_calculateMapScale + * No * * Public: No */ diff --git a/addons/maptools/functions/fnc_canUseMapGPS.sqf b/addons/maptools/functions/fnc_canUseMapGPS.sqf index 7333c1f9e0..a327c2bc8d 100644 --- a/addons/maptools/functions/fnc_canUseMapGPS.sqf +++ b/addons/maptools/functions/fnc_canUseMapGPS.sqf @@ -6,10 +6,7 @@ * None * * Return Value: - * Boolean - * - * Example: - * call ACE_map_fnc_canUseMapGPS + * * * Public: No */ diff --git a/addons/maptools/functions/fnc_canUseMapTools.sqf b/addons/maptools/functions/fnc_canUseMapTools.sqf index bc3c7fbb8a..8c16425082 100644 --- a/addons/maptools/functions/fnc_canUseMapTools.sqf +++ b/addons/maptools/functions/fnc_canUseMapTools.sqf @@ -6,10 +6,7 @@ * None * * Return Value: - * Boolean - * - * Example: - * call ACE_maptools_fnc_canUseMapTools + * * * Public: No */ diff --git a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf deleted file mode 100644 index ba9363c68f..0000000000 --- a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Author: PabstMirror - * Prevents the cursor from entering the roamer when drawing lines and records the positions - * - * Arguments: - * 0: The Map - * 1: Roamer Width - * - * Return Value: - * None - * - * Example: - * [map, 300] call ace_maptools_fnc_drawLinesOnRoamer - * - * Public: No - */ -#include "script_component.hpp" - -if (!GVAR(drawStaightLines)) exitWith {}; - -params ["_theMap", "_roamerWidth"]; -GVAR(mapTool_pos) params ["_roamerPosX", "_roamerPosY"]; - -private _posCenter = [_roamerPosX, _roamerPosY, 0]; - -private _posTopRight = [ -_roamerPosX + (cos GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (sin GVAR(mapTool_angle)) * DIST_TOP_TO_CENTER_PERC * _roamerWidth, -_roamerPosY + (-sin GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (cos GVAR(mapTool_angle)) * DIST_TOP_TO_CENTER_PERC * _roamerWidth, -0]; - -private _posTopLeft = [ -_roamerPosX + (-cos GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (sin GVAR(mapTool_angle)) * DIST_TOP_TO_CENTER_PERC * _roamerWidth, -_roamerPosY + (sin GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (cos GVAR(mapTool_angle)) * DIST_TOP_TO_CENTER_PERC * _roamerWidth, -0]; - -private _posBottomLeft = [ -_roamerPosX + (-cos GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (sin GVAR(mapTool_angle)) * DIST_BOTTOM_TO_CENTER_PERC * _roamerWidth, -_roamerPosY + (sin GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (cos GVAR(mapTool_angle)) * DIST_BOTTOM_TO_CENTER_PERC * _roamerWidth, -0]; - -private _posBottomRight = [ -_roamerPosX + (cos GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (sin GVAR(mapTool_angle)) * DIST_BOTTOM_TO_CENTER_PERC * _roamerWidth, -_roamerPosY + (-sin GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (cos GVAR(mapTool_angle)) * DIST_BOTTOM_TO_CENTER_PERC * _roamerWidth, -0]; - -private _fnc_Distance = { // Get distance point _p is from a line made from _a to _b (uses 3d array commands, but z should be 0) - // Ref: https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Vector_formulation - params ["_a", "_b", "_p"]; - private _n = _b vectorDiff _a; - private _pa = _a vectorDiff _p; - private _c = _n vectorMultiply ((_pa vectorDotProduct _n) / (_n vectorDotProduct _n)); - private _d = _pa vectorDiff _c; - sqrt (_d vectorDotProduct _d); -}; - -private _currentMousePos = _theMap ctrlMapScreenToWorld getMousePosition; -_currentMousePos set [2, 0]; - -// Break the roamer rectangle into 4 triangle, one for each side -switch (true) do { - case (_currentMousePos inPolygon [_posCenter, _posTopLeft, _posBottomLeft]): { // Left - private _distanceToRoamerLine = ([_posTopLeft, _posBottomLeft, _currentMousePos] call _fnc_Distance); - _currentMousePos = _currentMousePos vectorAdd ([_distanceToRoamerLine, (GVAR(mapTool_angle) - 90) ,0] call CBA_fnc_polar2vect); - if (GVAR(freeDrawingData) isEqualTo []) then { // We start drawing on the line - 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 { - GVAR(freeDrawingData) set [1, _currentMousePos]; - }; - if ((_currentMousePos distance2d _posBottomLeft) < ((GVAR(freeDrawingData) select 2) distance2d _posBottomLeft)) then { - GVAR(freeDrawingData) set [2, _currentMousePos]; - }; - }; - }; - private _screenPosOfCorrectedPos = _theMap ctrlMapWorldToScreen _currentMousePos; - setMousePosition _screenPosOfCorrectedPos; - }; - case (_currentMousePos inPolygon [_posCenter, _posTopLeft, _posTopRight]): { // Top - private _distanceToRoamerLine = ([_posTopLeft, _posTopRight, _currentMousePos] call _fnc_Distance); - _currentMousePos = _currentMousePos vectorAdd ([_distanceToRoamerLine, (GVAR(mapTool_angle) + 0) ,0] call CBA_fnc_polar2vect); - if (GVAR(freeDrawingData) isEqualTo []) then { // We start drawing on the line - 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 { - GVAR(freeDrawingData) set [1, _currentMousePos]; - }; - if ((_currentMousePos distance2d _posTopRight) < ((GVAR(freeDrawingData) select 2) distance2d _posTopRight)) then { - GVAR(freeDrawingData) set [2, _currentMousePos]; - }; - }; - }; - private _screenPosOfCorrectedPos = _theMap ctrlMapWorldToScreen _currentMousePos; - setMousePosition _screenPosOfCorrectedPos; - }; - case (_currentMousePos inPolygon [_posCenter, _posTopRight, _posBottomRight]): { // Right - private _distanceToRoamerLine = ([_posTopRight, _posBottomRight, _currentMousePos] call _fnc_Distance); - _currentMousePos = _currentMousePos vectorAdd ([_distanceToRoamerLine, (GVAR(mapTool_angle) + 90) ,0] call CBA_fnc_polar2vect); - if (GVAR(freeDrawingData) isEqualTo []) then { // We start drawing on the line - 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 { - GVAR(freeDrawingData) set [1, _currentMousePos]; - }; - if ((_currentMousePos distance2d _posBottomRight) < ((GVAR(freeDrawingData) select 2) distance2d _posBottomRight)) then { - GVAR(freeDrawingData) set [2, _currentMousePos]; - }; - }; - }; - private _screenPosOfCorrectedPos = _theMap ctrlMapWorldToScreen _currentMousePos; - setMousePosition _screenPosOfCorrectedPos; - }; - case (_currentMousePos inPolygon [_posCenter, _posBottomLeft, _posBottomRight]): { // Bottom - private _distanceToRoamerLine = ([_posBottomLeft, _posBottomRight, _currentMousePos] call _fnc_Distance); - _currentMousePos = _currentMousePos vectorAdd ([_distanceToRoamerLine, (GVAR(mapTool_angle) + 180) ,0] call CBA_fnc_polar2vect); - if (GVAR(freeDrawingData) isEqualTo []) then { // We start drawing on the line - 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 { - GVAR(freeDrawingData) set [1, _currentMousePos]; - }; - if ((_currentMousePos distance2d _posBottomRight) < ((GVAR(freeDrawingData) select 2) distance2d _posBottomRight)) then { - GVAR(freeDrawingData) set [2, _currentMousePos]; - }; - }; - }; - private _screenPosOfCorrectedPos = _theMap ctrlMapWorldToScreen _currentMousePos; - setMousePosition _screenPosOfCorrectedPos; - }; -}; - -#ifdef DEBUG_MODE_FULL -_theMap drawIcon ['iconStaticMG',[1,0,0,1],_posTopRight,24,24,getDir player,'1,1',1,0.03,'TahomaB','right']; -_theMap drawIcon ['iconStaticMG',[1,0,0,1],_posTopLeft,24,24,getDir player,'-1,1',1,0.03,'TahomaB','right']; -_theMap drawIcon ['iconStaticMG',[1,0,0,1],_posBottomLeft,24,24,getDir player,'-1,-1',1,0.03,'TahomaB','right']; -_theMap drawIcon ['iconStaticMG',[1,0,0,1],_posBottomRight,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right']; -if !(GVAR(freeDrawingData) isEqualTo []) then { - _theMap drawIcon ['iconStaticMG',[0,0,1,1],GVAR(freeDrawingData) select 1,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right']; - _theMap drawIcon ['iconStaticMG',[0,0,1,1],GVAR(freeDrawingData) select 2,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right']; -}; -#endif diff --git a/addons/maptools/functions/fnc_handleMouseButton.sqf b/addons/maptools/functions/fnc_handleMouseButton.sqf index 143289447e..bf30a32ce1 100644 --- a/addons/maptools/functions/fnc_handleMouseButton.sqf +++ b/addons/maptools/functions/fnc_handleMouseButton.sqf @@ -3,69 +3,18 @@ * Handle mouse buttons. * * Arguments: - * 0: 1 if mouse down down, 0 if mouse button up - * 1: Parameters of the mouse button event + * 0: 1 if mouse down down, 0 if mouse button up (Number) + * 1: Parameters of the mouse button event * * Return Value: - * true if event was handled - * - * Example: - * [0, [array]] call ACE_maptools_fnc_handleMouseButton - * - * Public: No + * Boolean, true if event was handled */ - #include "script_component.hpp" params ["_dir", "_params"]; _params params ["_control", "_button", "_screenPosX", "_screenPosY", "_shiftKey", "_ctrlKey", "_altKey"]; TRACE_2("params",_dir,_params); -// Using line drawing -if ((_button == 0) && {GVAR(freedrawing) || _ctrlKey}) exitWith { - if (GVAR(freedrawing) && {_dir == 0}) then { - GVAR(freedrawing) = false; - GVAR(drawPosEnd) = _control ctrlMapScreenToWorld [_screenPosX, _screenPosY]; - TRACE_1("Ending Line",GVAR(freedrawing),GVAR(drawPosEnd)); - [{ - if (allMapMarkers isEqualTo []) exitWith {}; - private _markerName = allMapMarkers select (count allMapMarkers - 1); - private _markerPos = getMarkerPos _markerName; - private _distanceCheck = _markerPos distance2d GVAR(drawPosStart); - - TRACE_3("Line Drawn",_markerName,_markerPos,_distanceCheck); - - if (_distanceCheck > 1) exitWith {WARNING("Wrong Marker!");}; - if ((count GVAR(freeDrawingData)) != 3) exitWith {TRACE_1("never touched roamer",GVAR(freeDrawingData));}; - - GVAR(freeDrawingData) params ["", "_startStraightPos", "_endStraightPos"]; - _startStraightPos set [2, 0]; - _endStraightPos set [2, 0]; - - // Convert marker to rectangle and change it's pos/size/dir - _markerName setMarkerShape "RECTANGLE"; - - private _difPos = _endStraightPos vectorDiff _startStraightPos; - private _mag = vectorMagnitude _difPos; - _markerName setMarkerPos (_startStraightPos vectorAdd (_difPos vectorMultiply 0.5)); - _markerName setMarkerSize [10, _mag / 2]; - _markerName setMarkerDir (_difPos call CBA_fnc_vectDir); - - }, []] call CBA_fnc_execNextFrame; - } else { - if (_ctrlKey && {_dir == 1}) then { - GVAR(freeDrawingData) = []; - GVAR(freedrawing) = true; - GVAR(drawPosStart) = _control ctrlMapScreenToWorld [_screenPosX, _screenPosY]; - TRACE_2("Starting Line",GVAR(freedrawing),GVAR(drawPosStart)); - } else { - GVAR(freedrawing) = false; - TRACE_1("weird - reseting",GVAR(freedrawing)); - }; - }; - false -}; - private _handled = false; // If it's not a left button event, exit diff --git a/addons/maptools/functions/fnc_handleMouseMove.sqf b/addons/maptools/functions/fnc_handleMouseMove.sqf index a7c48cfed4..a52163ba32 100644 --- a/addons/maptools/functions/fnc_handleMouseMove.sqf +++ b/addons/maptools/functions/fnc_handleMouseMove.sqf @@ -3,16 +3,11 @@ * Handle mouse movement over the map tool. * * Arguments: - * 0: Map Control - * 1: Mouse position on screen coordinates + * 0: Map Control + * 1: Mouse position on screen coordinates * * Return Value: - * true if event was handled - * - * Example: - * [CONTROL, [0, 5, 1]] call ACE_maptools_fnc_handleMouseMove - * - * Public: No + * Boolean, true if event was handled */ #include "script_component.hpp" diff --git a/addons/maptools/functions/fnc_isInsideMapTool.sqf b/addons/maptools/functions/fnc_isInsideMapTool.sqf index c54f831e8f..1bcb35f86a 100644 --- a/addons/maptools/functions/fnc_isInsideMapTool.sqf +++ b/addons/maptools/functions/fnc_isInsideMapTool.sqf @@ -7,16 +7,15 @@ * 1: y Position (in meters) * * Return Value: - * Boolean - * - * Example: - * [0, 5] call ACE_maptools_fnc_isInsideMapTool - * - * Public: No + * Boolean */ - #include "script_component.hpp" +#define TEXTURE_WIDTH_IN_M 6205 +#define DIST_BOTTOM_TO_CENTER_PERC -0.33 +#define DIST_TOP_TO_CENTER_PERC 0.65 +#define DIST_LEFT_TO_CENTER_PERC 0.30 + if (GVAR(mapTool_Shown) == 0) exitWith {false}; private _textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapTool_Shown) - 1); diff --git a/addons/maptools/functions/fnc_openMapGps.sqf b/addons/maptools/functions/fnc_openMapGps.sqf index 7e8d923661..c3e2a8bfee 100644 --- a/addons/maptools/functions/fnc_openMapGps.sqf +++ b/addons/maptools/functions/fnc_openMapGps.sqf @@ -6,10 +6,7 @@ * 0: Open GPS? * * Return Value: - * None - * - * Example: - * [true] call ACE_maptools_fnc_openMapGps + * Nothing * * Public: No */ diff --git a/addons/maptools/functions/fnc_openMapGpsUpdate.sqf b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf index 63ecae81ec..719bf37763 100644 --- a/addons/maptools/functions/fnc_openMapGpsUpdate.sqf +++ b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf @@ -1,18 +1,5 @@ -/* - * Author: esteldunedain - * update gps display - * - * Arguments: - * Something - * - * Return Value: - * None - * - * Example: - * call ACE_maptools_fnc_openMapGpsUpdate - * - * Public: No - */ +//esteldunedain +//update gps display #include "script_component.hpp" diff --git a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf index 026a4037d1..47688cdb91 100644 --- a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf +++ b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf @@ -6,15 +6,16 @@ * 0: The Map * * Return Value: - * None - * - * Example: - * [CONTROL] call ACE_maptools_fnc_updateMapToolMarkers + * Nothing * * Public: No */ #include "script_component.hpp" +#define TEXTURE_WIDTH_IN_M 6205 +#define CENTER_OFFSET_Y_PERC 0.1606 +#define CONSTANT_SCALE 0.2 + params ["_theMap"]; if ((GVAR(mapTool_Shown) == 0) || {!("ACE_MapTools" in items ACE_player)}) exitWith {}; @@ -29,8 +30,6 @@ if (GVAR(mapTool_Shown) == 1) then { _textureWidth = TEXTURE_WIDTH_IN_M / 2; }; -if (GVAR(freedrawing)) then {[_theMap, _textureWidth] call FUNC(drawLinesOnRoamer);}; - // Update scale of both parts getResolution params ["_resWidth", "_resHeight", "", "", "_aspectRatio"]; private _scaleX = 32 * _textureWidth * CONSTANT_SCALE * (call FUNC(calculateMapScale)); diff --git a/addons/maptools/script_component.hpp b/addons/maptools/script_component.hpp index 4710caa7a3..d5f5b0f2d7 100644 --- a/addons/maptools/script_component.hpp +++ b/addons/maptools/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MAPTOOLS @@ -15,10 +16,3 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" - -#define TEXTURE_WIDTH_IN_M 6205 -#define CENTER_OFFSET_Y_PERC 0.1606 -#define CONSTANT_SCALE 0.2 -#define DIST_BOTTOM_TO_CENTER_PERC -0.33 -#define DIST_TOP_TO_CENTER_PERC 0.65 -#define DIST_LEFT_TO_CENTER_PERC 0.30 diff --git a/addons/maptools/stringtable.xml b/addons/maptools/stringtable.xml index 20397d70eb..e15135dcfd 100644 --- a/addons/maptools/stringtable.xml +++ b/addons/maptools/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Ferramentas de Mapa Térképészeti eszközök Инструменты карты - マップ ツール - 독도용 도구 - 地图工具 - 地圖工具 The Map Tools allow you to measure distances and angles on the map. @@ -28,10 +24,6 @@ As Ferramentas de Mapa permitem que você meça distâncias e ângulos no mapa. A térképészeti eszközökkel távolságokat és szögeket tudsz mérni a térképen. Картографические инструменты позволяют измерять расстояния и углы на карте. - マップ ツールは地図上で距離や角度を測れます。 - 독도용 도구는 지도상에서 거리나 각도를 잴 수 있게 해줍니다. - 地图工具能够让你在地图上测量距离与角度 - 地圖工具能夠讓你在地圖上測量距離與角度 Map Tools @@ -44,10 +36,6 @@ Ferramentas de Mapa Térképészeti eszközök Инструменты карты - マップ ツール - 독도용 도구 - 地图工具 - 地圖工具 Hide Map Tool @@ -60,10 +48,6 @@ Ukryj narzędzia nawigacyjne Schovat pomůcky k mapě Скрыть инструменты - マップ ツールを隠す - 독도용 도구 숨기기 - 隐藏地图工具 - 隱藏地圖工具 Show Normal Map Tool @@ -76,10 +60,6 @@ Pokaż normalne narzędzia nawigacyjne Zobrazit pomůcku k mapě (Velkou) Показать инструменты (средн. размер) - マップ ツールを表示する - 보통 독도용 도구로 보기 - 显示地图工具 - 顯示地圖工具 Show Small Map Tool @@ -92,10 +72,6 @@ Pokaż pomniejszone narzędzia nawigacyjne Zobrazit pomůcku k mapě (Malou) Показать инструменты (малый размер) - 小さいマップ ツールを表示する - 작은 독도용 도구로 보기 - 显示小的地图工具 - 顯示小的地圖工具 Align Map Tool to North @@ -108,10 +84,6 @@ Wyrównaj linijkę do północy Srovnat pomůcku k mapě na sever Выровнять инструменты на север - マップ ツールを北に合わせる - 독도용 도구를 북쪽으로 정렬 - 地图工具对准北方 - 地圖工具對準北方 Align Map Tool to Compass @@ -124,10 +96,6 @@ Wyrównaj linijkę do kompasu Srovnat pomůcku k mapě ke kompasu Выровнять инструменты по компасу - マップ ツールを方位磁石に合わせる - 독도용 도구를 나침반에 정렬 - 地图工具对准指北针 - 地圖工具對準指北針 Show GPS on Map @@ -140,10 +108,6 @@ Pokaż GPS na mapie Zobrazit GPS na mapě Показать GPS на карте - 地図上に GPS を表示する - GPS를 지도상에 꺼내기 - 在地图上显示GPS - 在地圖上顯示GPS Hide GPS on Map @@ -156,10 +120,6 @@ Ukryj GPS na mapie Schovat GPS na mapě Скрыть GPS на карте - 地図上から GPS を隠す - GPS를 지도상에서 숨기기 - 在地图上隐藏GPS - 在地圖上隱藏GPS Direction: %1° @@ -172,56 +132,16 @@ Направление: %1° Direzione: %1° Direção: %1 - 方位:%1° - 방위: %1° - 方位: %1° - 方位: %1° Rotate Map Tools Key Touche de rotation des outils de naviguation Клавиша поворота инструментов карты - マップ ツールの回転キー - Klawisz obrotu narzędzi nawigacyjnych - Taste zum Drehen des Kartenwerkzeugs - 독도용 도구 돌리기 키 - Ruota Strumenti di Mappatura - 选转地图工具的按键 - 選轉地圖工具的按鍵 Modifier key to allow rotating map tools Touche modificatrice permettant la rotation des outils de naviguation Клавиша-модификатор, позволяющая поворачивать инструменты карты - マップ ツールを回転させるキーを編集できます。 - Modyfikator pozwalający na obracanie narzędzi nawigacyjnych - Steuerungstaste, um Drehung des Kartenwerkzeugs zu ermöglichen. - 독도용 도구를 돌리기 위한 키를 변경할 수 있습니다. - Tasto modifica per consentire strumenti di mappatura rotanti - 修改旋转地图工具的按键 - 修改旋轉地圖工具的按鍵 - - - Draw straight lines with maptools - マップ ツールを使って直線を書く - Zeichne gerade Linien mit dem Kartenwerkzeug - 독도용 도구로 직선 그리기 - Rysuj proste linie przy użyciu narzędzi nawigacyjnych - Tracer des lignes droites - Disegna linee dritte con gli strumenti di mappatura - 使用地图工具来绘制直线 - 使用地圖工具來繪製直線 - - - Draw on the edge of maptools to draw straight lines. Note: Must hover at midpoint to delete. - マップ ツールの端から直線を書きます。メモ:線の中央ホバーすると削除します。 - Zeichne gerade Linien am Rand des Kartenwerkzeugs. Hinweis: zum Löschen über den Mittelpunkt der Linie fahren - 독도용 도구 가장자리에 직선을 그립니다. 주의: 삭제하기 위해선 선의 중앙에 가져다 대십시요 - Przeciągnij po krawędzi narzędzi nawigacyjnych by narysować prostą linię. Uwaga: aby usunąć linię - nalezy ustawić kursor nad jej środkiem. - Utiliser le bord des outils de navigation pour tracer des lignes droites. Note: l'on doit survoler le milieu du trait pour pouvoir le supprimer. - Disegna sul bordo degli strumenti di mappatura per disegnare linee dritte. Nota: Deve spostarsi al centro per essere cancellato. - 使用地图工具的边缘来绘制直线. 备注: 要删除直线时, 请把滑鼠移动到该线条的中央即可删除该线. - 使用地圖工具的邊緣來繪製直線. 備註: 要刪除直線時, 請把滑鼠移動到該線條的中央即可刪除該線. - + \ No newline at end of file diff --git a/addons/markers/XEH_preInit.sqf b/addons/markers/XEH_preInit.sqf index 7ee91d67e5..da62205b51 100644 --- a/addons/markers/XEH_preInit.sqf +++ b/addons/markers/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; // init marker types if (isNil QGVAR(MarkersCache)) then { diff --git a/addons/markers/functions/fnc_getEnabledChannels.sqf b/addons/markers/functions/fnc_getEnabledChannels.sqf index eb4bcfd5ce..9a64ff06d4 100644 --- a/addons/markers/functions/fnc_getEnabledChannels.sqf +++ b/addons/markers/functions/fnc_getEnabledChannels.sqf @@ -8,9 +8,6 @@ * Return Value: * Enabled Channels * - * Example: - * [false] call ACE_markers_fnc_getEnabledChannels - * * Public: No */ #include "script_component.hpp" diff --git a/addons/markers/functions/fnc_onLBSelChangedChannel.sqf b/addons/markers/functions/fnc_onLBSelChangedChannel.sqf index 8c7ac11046..f63c4e5cf4 100644 --- a/addons/markers/functions/fnc_onLBSelChangedChannel.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedChannel.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [CONTROL, 5] call ACE_markers_fnc_onLBSelChangedChannel - * * Public: No */ #include "script_component.hpp" diff --git a/addons/markers/script_component.hpp b/addons/markers/script_component.hpp index 80256466e9..458f5cfabf 100644 --- a/addons/markers/script_component.hpp +++ b/addons/markers/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MARKERS diff --git a/addons/markers/stringtable.xml b/addons/markers/stringtable.xml index 1c87546a5e..44d64eb1e0 100644 --- a/addons/markers/stringtable.xml +++ b/addons/markers/stringtable.xml @@ -1,10 +1,10 @@ - + Direction: %1° Drehung: %1° - Direction : %1° + Direction: %1° Směr: %1° Kierunek: %1° Dirección: %1° @@ -12,10 +12,6 @@ Irány: %1° Direzione: %1° Direção %1 - 方位:%1° - 방위: %1° - 方位: %1° - 方位: %1° diff --git a/addons/medical/CfgEden.hpp b/addons/medical/CfgEden.hpp index bebfdb9549..e4d034a413 100644 --- a/addons/medical/CfgEden.hpp +++ b/addons/medical/CfgEden.hpp @@ -9,8 +9,8 @@ class Cfg3DEN { }; }; class GVAR(isMedicControl): Title { - attributeLoad = "(_this controlsGroupCtrl 100) lbSetCurSel (((_value + 1) min 3) max 0);"; - attributeSave = "(lbCurSel (_this controlsGroupCtrl 100)) - 1"; + attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);"; + attributeSave = "(missionnamespace getvariable ['ace_isMeidc_temp',0]) - 1;"; class Controls: Controls { class Title: Title{}; class Value: ctrlToolbox { @@ -22,6 +22,7 @@ class Cfg3DEN { rows = 1; columns = 4; strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignMedicRoles_role_none), CSTRING(AssignMedicRoles_role_medic), CSTRING(AssignMedicRoles_role_doctorShort)}; + onToolboxSelChanged = "missionnamespace setvariable ['ace_isMeidc_temp',_this select 1];"; }; }; }; @@ -35,7 +36,7 @@ class Cfg3DEN { control = QGVAR(isMedicControl); displayName = CSTRING(AssignMedicRoles_role_DisplayName); tooltip = CSTRING(Attributes_isMedic_Description); - expression = QUOTE(if (_value > -1) then {_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];};); + expression = QUOTE(if (_value != -1) then {_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];};); typeName = "NUMBER"; condition = "objectBrain"; defaultValue = "-1"; diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 979f3c47bc..bf2030e6e7 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -289,7 +289,7 @@ GVAR(lastHeartBeatSound) = CBA_missionTime; if (hasInterface) then { ["ace_playerJIP", { - INFO("JIP Medical init for player."); + ACE_LOGINFO("JIP Medical init for player."); [player] call FUNC(init); }] call CBA_fnc_addEventHandler; }; diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index 6d09e9427c..17e570ae92 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -2,18 +2,16 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(injuredUnitCollection) = []; private _versionEx = "ace_medical" callExtension "version"; DFUNC(handleDamage_assignWounds) = if (_versionEx == "") then { - INFO_1("Extension %1.dll not installed.","ace_medical"); + ACE_LOGINFO_1("Extension %1.dll not installed.","ace_medical"); DFUNC(handleDamage_woundsOld) } else { - INFO_2("Extension version: %1: %2","ace_medical",_versionEx); + ACE_LOGINFO_2("Extension version: %1: %2","ace_medical",_versionEx); DFUNC(handleDamage_wounds) }; @@ -50,9 +48,6 @@ addMissionEventHandler ["Loaded",{ TRACE_1("preload done",_this); }, [_x]] call CBA_fnc_waitUntilAndExecute; } forEach GVAR(fixedStatics); - - // Reload configs into extension (handle full game restart) - call FUNC(parseConfigForInjuries); }]; diff --git a/addons/medical/functions/fnc_actionCheckBloodPressure.sqf b/addons/medical/functions/fnc_actionCheckBloodPressure.sqf index 207e2bb90d..9e66eda263 100644 --- a/addons/medical/functions/fnc_actionCheckBloodPressure.sqf +++ b/addons/medical/functions/fnc_actionCheckBloodPressure.sqf @@ -1,19 +1,16 @@ /* - * Author: Glowbal - * Action for checking the blood pressure of the patient - * - * Arguments: - * 0: The medic - * 1: The patient - * - * Return Value: - * None - * - * Example: - * [bob, kevin] call ACE_medical_fnc_actionCheckBloodPressure - * - * Public: No - */ +* Author: Glowbal +* Action for checking the blood pressure of the patient +* +* Arguments: +* 0: The medic +* 1: The patient +* +* Return Value: +* None +* +* Public: No +*/ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf index 0497b559b8..184110265a 100644 --- a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, kevin] call ACE_medical_fnc_actionCheckBloodPressureLocal - * * Public: No */ diff --git a/addons/medical/functions/fnc_actionCheckPulse.sqf b/addons/medical/functions/fnc_actionCheckPulse.sqf index 7654f24d78..39f196a0a5 100644 --- a/addons/medical/functions/fnc_actionCheckPulse.sqf +++ b/addons/medical/functions/fnc_actionCheckPulse.sqf @@ -1,19 +1,16 @@ /* - * Author: Glowbal - * Action for checking the pulse or heart rate of the patient - * - * Arguments: - * 0: The medic - * 1: The patient - * - * Return Value: - * None - * - * Example: - * [bob, kevin] call ACE_medical_fnc_actionCheckPulse - * - * Public: No - */ +* Author: Glowbal +* Action for checking the pulse or heart rate of the patient +* +* Arguments: +* 0: The medic +* 1: The patient +* +* Return Value: +* None +* +* Public: No +*/ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf index 7f4fe176da..cf84df075e 100644 --- a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, kevin] call ACE_medical_fnc_actionCheckPulseLocal - * * Public: No */ diff --git a/addons/medical/functions/fnc_actionCheckResponse.sqf b/addons/medical/functions/fnc_actionCheckResponse.sqf index a56c8191c6..c47dc5dd64 100644 --- a/addons/medical/functions/fnc_actionCheckResponse.sqf +++ b/addons/medical/functions/fnc_actionCheckResponse.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, kevin] call ACE_medical_fnc_actionCheckResponse - * * Public: No */ diff --git a/addons/medical/functions/fnc_actionDiagnose.sqf b/addons/medical/functions/fnc_actionDiagnose.sqf index 81e73699a8..d86d90db7d 100644 --- a/addons/medical/functions/fnc_actionDiagnose.sqf +++ b/addons/medical/functions/fnc_actionDiagnose.sqf @@ -1,19 +1,16 @@ /* - * Author: Glowbal - * Action for diagnosing in basic medical - * - * Arguments: - * 0: The medic - * 1: The patient - * - * Return Value: - * None - * - * Example: - * [bob, kevin] call ACE_medical_fnc_actionDiagnose - * - * Public: No - */ +* Author: Glowbal +* Action for diagnosing in basic medical +* +* Arguments: +* 0: The medic +* 1: The patient +* +* Return Value: +* None +* +* Public: No +*/ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_actionLoadUnit.sqf b/addons/medical/functions/fnc_actionLoadUnit.sqf index 11a875bf2f..55a7a9ba51 100644 --- a/addons/medical/functions/fnc_actionLoadUnit.sqf +++ b/addons/medical/functions/fnc_actionLoadUnit.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, kevin] call ACE_medical_fnc_actionLoadUnit - * * Public: No */ diff --git a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf index e32fd09f69..bf0a3e5ae4 100644 --- a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf +++ b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [bob, kevin, "selection"] call ace_medical_fnc_actionRemoveTourniquet - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_actionUnloadUnit.sqf b/addons/medical/functions/fnc_actionUnloadUnit.sqf index 061355fdc8..75fe76bce9 100644 --- a/addons/medical/functions/fnc_actionUnloadUnit.sqf +++ b/addons/medical/functions/fnc_actionUnloadUnit.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [bob, kevin, false] call ACE_medical_fnc_actionUnloadUnit - * * Public: No */ diff --git a/addons/medical/functions/fnc_addDamageToUnit.sqf b/addons/medical/functions/fnc_addDamageToUnit.sqf index 1c3d06d215..1969e3ff74 100644 --- a/addons/medical/functions/fnc_addDamageToUnit.sqf +++ b/addons/medical/functions/fnc_addDamageToUnit.sqf @@ -26,9 +26,9 @@ params [["_unit", objNull, [objNull]], ["_damageToAdd", -1, [0]], ["_selection", TRACE_4("params",_unit,_damageToAdd,_selection,_typeOfDamage); _selection = toLower _selection; -if ((isNull _unit) || {!local _unit} || {!alive _unit}) exitWith {ERROR_1("addDamageToUnit - badUnit %1", _this); -1}; -if (_damageToAdd < 0) exitWith {ERROR_1("addDamageToUnit - bad damage %1", _this); -1}; -if (!(_selection in GVAR(SELECTIONS))) exitWith {ERROR_1("addDamageToUnit - bad selection %1", _this); -1}; +if ((isNull _unit) || {!local _unit} || {!alive _unit}) exitWith {ACE_LOGERROR_1("addDamageToUnit - badUnit %1", _this); -1}; +if (_damageToAdd < 0) exitWith {ACE_LOGERROR_1("addDamageToUnit - bad damage %1", _this); -1}; +if (!(_selection in GVAR(SELECTIONS))) exitWith {ACE_LOGERROR_1("addDamageToUnit - bad selection %1", _this); -1}; //Get the hitpoint and the index private _hitpoint = [_unit, _selection, true] call ace_medical_fnc_translateSelections; @@ -37,7 +37,7 @@ private _hitpointIndex = -1; { //case insensitive find if (_x == _hitpoint) exitWith {_hitpointIndex = _forEachIndex;}; } forEach _allHitPoints; -if (_hitpointIndex < 0) exitWith {ERROR_1("addDamageToUnit - bad hitpointIndex %1", _this); -1}; +if (_hitpointIndex < 0) exitWith {ACE_LOGERROR_1("addDamageToUnit - bad hitpointIndex %1", _this); -1}; private _currentDamage = _unit getHitIndex _hitpointIndex; @@ -49,15 +49,15 @@ private _debugCode = { params ["", "_unit", "_startDmg", "_damageToAdd", "_partNumber"]; private _endDmg = (_unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _partNumber; if ((!alive _unit) || {_endDmg > _startDmg}) then { - INFO_6("addDamageToUnit - PASSED - [unit:%1, partNo:%2, addDmg:%3] results:[alive:%4 old:%5 new:%6]", _unit, _partNumber, _damageToAdd, alive _unit, _startDmg, _endDmg); + ACE_LOGINFO_6("addDamageToUnit - PASSED - [unit:%1, partNo:%2, addDmg:%3] results:[alive:%4 old:%5 new:%6]", _unit, _partNumber, _damageToAdd, alive _unit, _startDmg, _endDmg); } else { - ERROR_6("addDamageToUnit - FAILED - [unit:%1, partNo:%2, addDmg:%3] results:[alive:%4 old:%5 new:%6]", _unit, _partNumber, _damageToAdd, alive _unit, _startDmg, _endDmg); + ACE_LOGERROR_6("addDamageToUnit - FAILED - [unit:%1, partNo:%2, addDmg:%3] results:[alive:%4 old:%5 new:%6]", _unit, _partNumber, _damageToAdd, alive _unit, _startDmg, _endDmg); }; }; [{diag_frameno > (_this select 0)}, _debugCode, [_checkAtFrame, _unit, _startDmg, _damageToAdd, _partNumber]] call CBA_fnc_waitUntilAndExecute; #endif -private _return = [_unit, _selection, (_currentDamage + _damageToAdd), _unit, _typeOfDamage, _hitpointIndex, objNull] call FUNC(handleDamage); +private _return = [_unit, _selection, (_currentDamage + _damageToAdd), _unit, _typeOfDamage, _hitpointIndex] call FUNC(handleDamage); TRACE_1("handleDamage called",_return); _return diff --git a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf index de3d2c4204..a23ea45023 100644 --- a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf +++ b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * [bob, 1, 5, {callback}] call ace_medical_fnc_addHeartRateAdjustment - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_addToInjuredCollection.sqf b/addons/medical/functions/fnc_addToInjuredCollection.sqf index 2da3ca34a1..77d2378d0d 100644 --- a/addons/medical/functions/fnc_addToInjuredCollection.sqf +++ b/addons/medical/functions/fnc_addToInjuredCollection.sqf @@ -1,19 +1,15 @@ /* * Author: Glowbal - * Enabled the vitals loop for a unit. Deprecated! + * Enabled the vitals loop for a unit. * * Arguments: * 0: The Unit * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob] call ACE_medical_fnc_addToInjuredCollection - * - * Public: No + * Deprecated */ - #include "script_component.hpp" ACE_DEPRECATED("ace_medical_fnc_addToInjuredCollection","3.7.0","ace_medical_fnc_addVitalLoop"); diff --git a/addons/medical/functions/fnc_addToLog.sqf b/addons/medical/functions/fnc_addToLog.sqf index 2a5e77fd1b..f0c6b9c622 100644 --- a/addons/medical/functions/fnc_addToLog.sqf +++ b/addons/medical/functions/fnc_addToLog.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * [bob, "type", "message", [_args]] call ace_medical_fnc_addToLog - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_addToTriageCard.sqf b/addons/medical/functions/fnc_addToTriageCard.sqf index 720a435d68..0e11f38f77 100644 --- a/addons/medical/functions/fnc_addToTriageCard.sqf +++ b/addons/medical/functions/fnc_addToTriageCard.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, "bandage"] call ace_medical_fnc_addToTriageCard - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_addUnconsciousCondition.sqf b/addons/medical/functions/fnc_addUnconsciousCondition.sqf index b3b7f7747b..195cd557d7 100644 --- a/addons/medical/functions/fnc_addUnconsciousCondition.sqf +++ b/addons/medical/functions/fnc_addUnconsciousCondition.sqf @@ -5,12 +5,9 @@ * Arguments: * 0-N: Code, should return a boolean * - * Return Value: + * ReturnValue: * None * - * Example: - * [[{bob}]] call ace_medical_fnc_addUnconsciousCondition - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_addUnloadPatientActions.sqf b/addons/medical/functions/fnc_addUnloadPatientActions.sqf index 20399c67c1..596a536de6 100644 --- a/addons/medical/functions/fnc_addUnloadPatientActions.sqf +++ b/addons/medical/functions/fnc_addUnloadPatientActions.sqf @@ -10,9 +10,6 @@ * Return Value: * Children actions * - * Example: - * [car, kevin, [params]] call ACE_medical_fnc_addUnloadPatientActions - * * Public: No */ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_addVitalLoop.sqf b/addons/medical/functions/fnc_addVitalLoop.sqf index 4045c188f5..aa3d6608d0 100644 --- a/addons/medical/functions/fnc_addVitalLoop.sqf +++ b/addons/medical/functions/fnc_addVitalLoop.sqf @@ -5,12 +5,9 @@ * Arguments: * 0: The Unit * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob] call ace_medical_fnc_addVitalLoop - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_bodyCleanupLoop.sqf b/addons/medical/functions/fnc_bodyCleanupLoop.sqf index 9f59f32a25..af17ffcd34 100644 --- a/addons/medical/functions/fnc_bodyCleanupLoop.sqf +++ b/addons/medical/functions/fnc_bodyCleanupLoop.sqf @@ -5,12 +5,9 @@ * Arguments: * None * - * Return Value: + * ReturnValue: * None * - * Example: - * call ACE_medical_fnc_bodyCleanupLoop - * * Public: No */ diff --git a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf index d31c03db1d..53707ae65c 100644 --- a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf +++ b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf @@ -6,12 +6,9 @@ * 0: The caller * 1: The target * - * Return Value: + * ReturnValue: * Can Treat * - * Example: - * [bob, target] call ace_medical_fnc_canAccessMedicalEquipment - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_canTreat.sqf b/addons/medical/functions/fnc_canTreat.sqf index 765df301c7..1c78eb1e43 100644 --- a/addons/medical/functions/fnc_canTreat.sqf +++ b/addons/medical/functions/fnc_canTreat.sqf @@ -8,7 +8,7 @@ * 2: Selection name * 3: ACE_Medical_Treatments Classname * - * Return Value: + * ReturnValue: * Can Treat * * Example: diff --git a/addons/medical/functions/fnc_canTreatCached.sqf b/addons/medical/functions/fnc_canTreatCached.sqf index dd7711936f..76d4897b74 100644 --- a/addons/medical/functions/fnc_canTreatCached.sqf +++ b/addons/medical/functions/fnc_canTreatCached.sqf @@ -8,12 +8,9 @@ * 2: Selection name * 3: ACE_Medical_Treatments Classname * - * Return Value: + * ReturnValue: * Can Treat * - * Example: - * [bob, kevin, "selection", "classname"] call ACE_medical_fnc_canTreatCached - * * Public: No */ diff --git a/addons/medical/functions/fnc_copyDeadBody.sqf b/addons/medical/functions/fnc_copyDeadBody.sqf index da7fb16cff..af601d9f33 100644 --- a/addons/medical/functions/fnc_copyDeadBody.sqf +++ b/addons/medical/functions/fnc_copyDeadBody.sqf @@ -9,9 +9,6 @@ * Return Value: * Returns the copy of the unit. If no copy could be made, returns the oldBody * - * Example: - * [bob, kevin] call ACE_medical_fnc_copyDeadBody - * * Public: No */ diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf index 85e852d927..2780642056 100644 --- a/addons/medical/functions/fnc_createLitter.sqf +++ b/addons/medical/functions/fnc_createLitter.sqf @@ -7,16 +7,13 @@ * 1: The target * 2: The treatment Selection Name * 3: The treatment classname - * 4: ? - * 5: Users of Items + * 4: ? + * 5: Users of Items * 6: Blood Loss on selection (previously called _previousDamage) * * Return Value: * None * - * Example: - * [bob, kevin, "selection", "classname", , , 5] call ACE_medical_fnc_createLitter - * * Public: No */ diff --git a/addons/medical/functions/fnc_determineIfFatal.sqf b/addons/medical/functions/fnc_determineIfFatal.sqf index 9d1940a80a..9dbbcce9a6 100644 --- a/addons/medical/functions/fnc_determineIfFatal.sqf +++ b/addons/medical/functions/fnc_determineIfFatal.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [bob, 2, 5] call ACE_medical_fnc_determineIfFatal - * * Public: No */ #include "script_component.hpp" @@ -33,7 +30,7 @@ if (_part < 0 || _part > 5) exitWith {false}; // Find the correct Damage threshold for unit. private _damageThreshold = [1,1,1]; -if ([_unit, GVAR(remoteControlledAI)] call EFUNC(common,isPlayer)) then { +if ([_unit] call EFUNC(common,IsPlayer)) then { _damageThreshold =_unit getVariable[QGVAR(unitDamageThreshold), [GVAR(playerDamageThreshold), GVAR(playerDamageThreshold), GVAR(playerDamageThreshold) * 1.7]]; } else { _damageThreshold =_unit getVariable[QGVAR(unitDamageThreshold), [GVAR(AIDamageThreshold), GVAR(AIDamageThreshold), GVAR(AIDamageThreshold) * 1.7]]; diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 334db62613..1489e27288 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -7,12 +7,9 @@ * 1: Show (default: true) * 2: Selection (default: 0) * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob, true, 2] call ACE_medical_fnc_displayPatientInformation - * * Public: No */ @@ -71,7 +68,7 @@ if (_show) then { }; private _totalIvVolume = 0; - private _bloodBags = _target getVariable [QGVAR(ivBags), []]; + private _bloodBags = _unit getVariable [QGVAR(ivBags), []]; { _x params ["_bagVolumeRemaining"]; _totalIvVolume = _totalIvVolume + _bagVolumeRemaining; diff --git a/addons/medical/functions/fnc_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf index c273b1d0f0..1633853214 100644 --- a/addons/medical/functions/fnc_displayTriageCard.sqf +++ b/addons/medical/functions/fnc_displayTriageCard.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, true] call ace_medical_fnc_displayTriageCard - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_dropDownTriageCard.sqf b/addons/medical/functions/fnc_dropDownTriageCard.sqf index 3e52d3efc5..c499283446 100644 --- a/addons/medical/functions/fnc_dropDownTriageCard.sqf +++ b/addons/medical/functions/fnc_dropDownTriageCard.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [true] call ace_medical_fnc_dropDownTriageCard - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_getBloodLoss.sqf b/addons/medical/functions/fnc_getBloodLoss.sqf index e584b4cd0d..8f2f968e99 100644 --- a/addons/medical/functions/fnc_getBloodLoss.sqf +++ b/addons/medical/functions/fnc_getBloodLoss.sqf @@ -5,12 +5,9 @@ * Arguments: * 0: The Unit * - * Return Value: + * ReturnValue: * Total blood loss of unit * - * Example: - * [bob] call ACE_medical_fnc_getBloodLoss - * * Public: No */ diff --git a/addons/medical/functions/fnc_getBloodPressure.sqf b/addons/medical/functions/fnc_getBloodPressure.sqf index 076d42c286..63908eecc7 100644 --- a/addons/medical/functions/fnc_getBloodPressure.sqf +++ b/addons/medical/functions/fnc_getBloodPressure.sqf @@ -5,13 +5,10 @@ * Arguments: * 0: The Unit * - * Return Value: + * ReturnValue: * 0: BloodPressure Low * 1: BloodPressure High * - * Example: - * [bob, kevin] call ACE_medical_fnc_getBloodPressure - * * Public: No */ diff --git a/addons/medical/functions/fnc_getBloodVolumeChange.sqf b/addons/medical/functions/fnc_getBloodVolumeChange.sqf index fcabcd53cf..396d058140 100644 --- a/addons/medical/functions/fnc_getBloodVolumeChange.sqf +++ b/addons/medical/functions/fnc_getBloodVolumeChange.sqf @@ -6,12 +6,9 @@ * 0: The Unit * 1: Global Sync Values (bloodbags) * - * Return Value: + * ReturnValue: * Blood volume change (in % total) * - * Example: - * [bob, true] call ACE_medical_fnc_getBloodVolumeChange - * * Public: No */ diff --git a/addons/medical/functions/fnc_getCardiacOutput.sqf b/addons/medical/functions/fnc_getCardiacOutput.sqf index ef6e75cde4..74da98012b 100644 --- a/addons/medical/functions/fnc_getCardiacOutput.sqf +++ b/addons/medical/functions/fnc_getCardiacOutput.sqf @@ -5,12 +5,9 @@ * Arguments: * 0: The Unit * - * Return Value: + * ReturnValue: * Current cardiac output * - * Example: - * [bob] call ACE_medical_fnc_getCardiacOutput - * * Public: No */ diff --git a/addons/medical/functions/fnc_getHeartRateChange.sqf b/addons/medical/functions/fnc_getHeartRateChange.sqf index ac659622b8..4f0b19f80c 100644 --- a/addons/medical/functions/fnc_getHeartRateChange.sqf +++ b/addons/medical/functions/fnc_getHeartRateChange.sqf @@ -5,12 +5,9 @@ * Arguments: * 0: The Unit * - * Return Value: + * ReturnValue: * Change in heart Rate * - * Example: - * [bob] call ACE_medical_fnc_getHeartRateChange - * * Public: No */ diff --git a/addons/medical/functions/fnc_getTriageStatus.sqf b/addons/medical/functions/fnc_getTriageStatus.sqf index 5174b92139..79af660407 100644 --- a/addons/medical/functions/fnc_getTriageStatus.sqf +++ b/addons/medical/functions/fnc_getTriageStatus.sqf @@ -10,9 +10,6 @@ * 1: Status ID * 2: Color > * - * Example: - * [bob] call ace_medical_fnc_getTriageStatus - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_getTypeOfDamage.sqf b/addons/medical/functions/fnc_getTypeOfDamage.sqf index b026f41ded..56cb8f75ef 100644 --- a/addons/medical/functions/fnc_getTypeOfDamage.sqf +++ b/addons/medical/functions/fnc_getTypeOfDamage.sqf @@ -5,12 +5,9 @@ * Arguments: * 0: The projectile classname or object * - * Return Value: + * ReturnValue: * Type of damage * - * Example: - * ["bullet"] call ACE_medical_fnc_getTypeOfDamage - * * Public: No */ diff --git a/addons/medical/functions/fnc_getUnconsciousCondition.sqf b/addons/medical/functions/fnc_getUnconsciousCondition.sqf index f5cb4444bc..ad366b5ab2 100644 --- a/addons/medical/functions/fnc_getUnconsciousCondition.sqf +++ b/addons/medical/functions/fnc_getUnconsciousCondition.sqf @@ -5,12 +5,9 @@ * Arguments: * 0: The Unit * - * Return Value: + * ReturnValue: * Should the unit stay unconscious? * - * Example: - * [bob] call ace_medical_fnc_getUnconsciousCondition - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_handleBandageOpening.sqf b/addons/medical/functions/fnc_handleBandageOpening.sqf index 6f8f0c05fe..f2a5a45af2 100644 --- a/addons/medical/functions/fnc_handleBandageOpening.sqf +++ b/addons/medical/functions/fnc_handleBandageOpening.sqf @@ -13,9 +13,6 @@ * Return Value: * None * - * Example: - * [bob, 5, 5, 1, [injury], "bandage"] call ACE_medical_fnc_handleBandageOpening - * * Public: No */ @@ -40,7 +37,7 @@ if (isClass (_config >> _bandage)) then { _reopeningMinDelay = getNumber (_config >> "reopeningMinDelay"); _reopeningMaxDelay = getNumber (_config >> "reopeningMaxDelay") max _reopeningMinDelay; } else { - WARNING_2("No config for bandage [%1] config base [%2]", _bandage, _config); + ACE_LOGWARNING_2("No config for bandage [%1] config base [%2]", _bandage, _config); }; if (isClass (_config >> _className)) then { @@ -55,7 +52,7 @@ if (isClass (_config >> _className)) then { _reopeningMaxDelay = getNumber (_woundTreatmentConfig >> "reopeningMaxDelay") max _reopeningMinDelay; }; } else { - WARNING_2("No config for wound type [%1] config base [%2]", _className, _config); + ACE_LOGWARNING_2("No config for wound type [%1] config base [%2]", _className, _config); }; TRACE_5("configs",_bandage,_className,_reopeningChance,_reopeningMinDelay,_reopeningMaxDelay); diff --git a/addons/medical/functions/fnc_handleCollisionDamage.sqf b/addons/medical/functions/fnc_handleCollisionDamage.sqf index a101f9b1f9..191a91cb6a 100644 --- a/addons/medical/functions/fnc_handleCollisionDamage.sqf +++ b/addons/medical/functions/fnc_handleCollisionDamage.sqf @@ -1,20 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * 0: Unit - * 1: New Damage - * - * Return Value: - * None - * - * Example: - * [bob, 2] call ACE_medical_fnc_handleCollisionDamage - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" params ["_unit", "_newDamage"]; diff --git a/addons/medical/functions/fnc_handleCreateLitter.sqf b/addons/medical/functions/fnc_handleCreateLitter.sqf index 45ea452782..2c701a2917 100644 --- a/addons/medical/functions/fnc_handleCreateLitter.sqf +++ b/addons/medical/functions/fnc_handleCreateLitter.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * ["litter", [2, 5, 6], bob] call ACE_medical_fnc_handleCreateLitter - * * Public: No */ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index 242b9a7997..abb91ff1c3 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -1,4 +1,4 @@ -/* + /* * Author: KoffeinFlummi, Glowbal, commy2 * Main HandleDamage EH function. * @@ -7,21 +7,16 @@ * 1: Name Of Hit Selection * 2: Amount Of Damage * 3: Shooter - * 4: Projectile + * 4: Projectile * 5: HitPointIndex (-1 for structural) - * 6: Shooter * * Return Value: * Damage To Be Inflicted * - * Example: - * [bob, "leg", 2, kevin, "bullet", -1, kevin] call ACE_medical_fnc_handleDamage - * * Public: No */ #include "script_component.hpp" -_this = _this select [0, 7]; params ["_unit", "_selection", "_damage", "_shooter", "_projectile", "_hitPointIndex"]; TRACE_5("ACE_DEBUG: HandleDamage Called",_unit, _selection, _damage, _shooter, _projectile); diff --git a/addons/medical/functions/fnc_handleDamage_advanced.sqf b/addons/medical/functions/fnc_handleDamage_advanced.sqf index 77d78b94dd..724958dfbc 100644 --- a/addons/medical/functions/fnc_handleDamage_advanced.sqf +++ b/addons/medical/functions/fnc_handleDamage_advanced.sqf @@ -15,9 +15,6 @@ * Return Value: * None * - * Example: - * [bob, "leg", 2, kevin, "bullet", 2, kevin, 2] call ACE_medical_fnc_handleDamage_advanced - * * Public: No */ @@ -30,10 +27,10 @@ params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeO if ((_typeOfProjectile == "") && {_newDamage < 0.15} && { _newDamage = _newDamage + (_unit getVariable [QGVAR(trivialDamage), 0]); - if (_newDamage > 0.15) then { + if (_newDamage > 0.15) then { // if the new sum is large enough, reset variable and continue with it added in _unit setVariable [QGVAR(trivialDamage), 0]; - false + false } else { // otherwise just save the new sum into the variable and exit _unit setVariable [QGVAR(trivialDamage), _newDamage]; diff --git a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf index 561a929133..b18604f133 100644 --- a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ACE_medical_fnc_handleDamage_advancedSetDamage - * * Public: No */ diff --git a/addons/medical/functions/fnc_handleDamage_airway.sqf b/addons/medical/functions/fnc_handleDamage_airway.sqf index 7ff2610de3..fb4c9fe83c 100644 --- a/addons/medical/functions/fnc_handleDamage_airway.sqf +++ b/addons/medical/functions/fnc_handleDamage_airway.sqf @@ -12,9 +12,6 @@ * Return Value: * None * - * Example: - * [bob, "leg", 2, kevin, "shot"] call ACE_medical_fnc_airway - * * Public: No */ diff --git a/addons/medical/functions/fnc_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf index c9499361a4..792f09e75d 100644 --- a/addons/medical/functions/fnc_handleDamage_caching.sqf +++ b/addons/medical/functions/fnc_handleDamage_caching.sqf @@ -11,10 +11,7 @@ * 5: HitPointIndex (-1 for structural) * * Return Value: - * None - * - * Example: - * [bob, "leg", 2, kevin, "bullet", -1] call ACE_medical_fnc_handleDamage_caching + * * * Public: No */ diff --git a/addons/medical/functions/fnc_handleDamage_fractures.sqf b/addons/medical/functions/fnc_handleDamage_fractures.sqf index 1681acbe6d..5292781420 100644 --- a/addons/medical/functions/fnc_handleDamage_fractures.sqf +++ b/addons/medical/functions/fnc_handleDamage_fractures.sqf @@ -12,9 +12,6 @@ * Return Value: * None * - * Example: - * [bob, "leg", 2, kevin, "shot"] call ACE_medical_fnc_handleDamage_fractures - * * Public: No */ diff --git a/addons/medical/functions/fnc_handleDamage_internalInjuries.sqf b/addons/medical/functions/fnc_handleDamage_internalInjuries.sqf index 97499c53c6..8e249eee8f 100644 --- a/addons/medical/functions/fnc_handleDamage_internalInjuries.sqf +++ b/addons/medical/functions/fnc_handleDamage_internalInjuries.sqf @@ -12,9 +12,6 @@ * Return Value: * None * - * Example: - * [bob, "leg", 2, kevin, "shot"] call ACE_medical_fnc_handleDamage_internalInjuries - * * Public: No */ diff --git a/addons/medical/functions/fnc_handleDamage_wounds.sqf b/addons/medical/functions/fnc_handleDamage_wounds.sqf index 1ab223d14a..170880ce34 100644 --- a/addons/medical/functions/fnc_handleDamage_wounds.sqf +++ b/addons/medical/functions/fnc_handleDamage_wounds.sqf @@ -12,9 +12,6 @@ * Return Value: * None * - * Example: - * [bob, "leg", 2, kevin, "shot"] call ACE_medical_fnc_handleDamage_wounds - * * Public: No */ @@ -41,7 +38,7 @@ call compile _extensionOutput; { _x params ["", "_compareId", "_comparyBodyPartN"]; // Check if we have an id of the given class on the given bodypart already - if (_compareId == _toAddClassID && {_comparyBodyPartN == _bodyPartNToAdd}) exitWith { + if (_compareId == _toAddClassID && {_comparyBodyPartN2 == _bodyPartNToAdd}) exitWith { _foundIndex = _forEachIndex; }; } forEach _openWounds; diff --git a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf index 18c4d76d19..c6ccd1c2b5 100644 --- a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf +++ b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf @@ -12,9 +12,6 @@ * Return Value: * None * - * Example: - * [bob, "leg", 1, kevin, "shot"] call ACE_medical_fnc_handleDamage_woundsOld - * * Public: No */ diff --git a/addons/medical/functions/fnc_handleKilled.sqf b/addons/medical/functions/fnc_handleKilled.sqf index 52b79f8760..6ca05a4228 100644 --- a/addons/medical/functions/fnc_handleKilled.sqf +++ b/addons/medical/functions/fnc_handleKilled.sqf @@ -5,12 +5,9 @@ * Arguments: * 0: The Unit * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob] call ACE_medical_fnc_handleKilled - * * Public: No */ diff --git a/addons/medical/functions/fnc_handleLocal.sqf b/addons/medical/functions/fnc_handleLocal.sqf index b9282ef9ee..8bf3cd5e69 100644 --- a/addons/medical/functions/fnc_handleLocal.sqf +++ b/addons/medical/functions/fnc_handleLocal.sqf @@ -6,12 +6,9 @@ * 0: The Unit * 1: Is local * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob, true] call ACE_medical_fnc_handleLocal - * * Public: No */ diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index 3bb40dd134..78c1cc9dfe 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -5,11 +5,8 @@ * Arguments: * 0: The Unit * - * Return Value: - * None - * - * Example: - * [bob] call ACE_medical_fnc_handleUnitVitals + * ReturnValue: + * * * Public: No */ diff --git a/addons/medical/functions/fnc_hasItem.sqf b/addons/medical/functions/fnc_hasItem.sqf index c1b84a940a..cebe02e6c6 100644 --- a/addons/medical/functions/fnc_hasItem.sqf +++ b/addons/medical/functions/fnc_hasItem.sqf @@ -7,11 +7,8 @@ * 1: Patient * 2: Item * - * Return Value: - * None - * - * Example: - * [bob, patient, "bandage"] call ace_medical_fnc_hasItem + * ReturnValue: + * * * Public: Yes */ diff --git a/addons/medical/functions/fnc_hasItems.sqf b/addons/medical/functions/fnc_hasItems.sqf index e251f22174..d3e79c0a54 100644 --- a/addons/medical/functions/fnc_hasItems.sqf +++ b/addons/medical/functions/fnc_hasItems.sqf @@ -7,12 +7,9 @@ * 1: Patient * 2: Items > * - * Return Value: + * ReturnValue: * Has the items * - * Example: - * [bob, patient, ["bandage", "morphine"]] call ace_medical_fnc_hasItems - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_hasMedicalEnabled.sqf b/addons/medical/functions/fnc_hasMedicalEnabled.sqf index d6150e13a1..5cc5b60aa3 100644 --- a/addons/medical/functions/fnc_hasMedicalEnabled.sqf +++ b/addons/medical/functions/fnc_hasMedicalEnabled.sqf @@ -1,3 +1,4 @@ + /* * Author: Glowbal * Check if unit has CMS enabled @@ -13,7 +14,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_unit"]; diff --git a/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf b/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf index ba4aecefa3..abbe512d74 100644 --- a/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf +++ b/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf @@ -6,12 +6,9 @@ * 0: The Unit * 1: SelectionName * - * Return Value: + * ReturnValue: * Has tourniquet applied * - * Example: - * [bob, "leg"] call ace_medical_fnc_hasTourniquetAppliedTo - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_init.sqf b/addons/medical/functions/fnc_init.sqf index 82b6b435e6..d6db3db392 100644 --- a/addons/medical/functions/fnc_init.sqf +++ b/addons/medical/functions/fnc_init.sqf @@ -5,11 +5,8 @@ * Arguments: * 0: The Unit * - * Return Value: - * None - * - * Example: - * [bob] call ACE_medical_fnc_init + * ReturnValue: + * nil * * Public: No */ diff --git a/addons/medical/functions/fnc_isInMedicalFacility.sqf b/addons/medical/functions/fnc_isInMedicalFacility.sqf index 12e52ada19..313ee8eca4 100644 --- a/addons/medical/functions/fnc_isInMedicalFacility.sqf +++ b/addons/medical/functions/fnc_isInMedicalFacility.sqf @@ -5,7 +5,7 @@ * Arguments: * 0: The Unit * - * Return Value: + * ReturnValue: * Is in medical facility * * Example: diff --git a/addons/medical/functions/fnc_isInStableCondition.sqf b/addons/medical/functions/fnc_isInStableCondition.sqf index 078079e46e..a11e40dd31 100644 --- a/addons/medical/functions/fnc_isInStableCondition.sqf +++ b/addons/medical/functions/fnc_isInStableCondition.sqf @@ -1,18 +1,15 @@ /* - * Author: Glowbal - * Check if a unit is in a stable condition - * - * Arguments: - * 0: The patient - * - * Return Value: - * Is in stable condition - * - * Example: - * [bob] call ACE_medical_fnc_isInStableCondition - * - * Public: No - */ +* Author: Glowbal +* Check if a unit is in a stable condition +* +* Arguments: +* 0: The patient +* +* Return Value: +* Is in stable condition +* +* Public: No +*/ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_isMedic.sqf b/addons/medical/functions/fnc_isMedic.sqf index f09fe88dbb..ff5a1b24a9 100644 --- a/addons/medical/functions/fnc_isMedic.sqf +++ b/addons/medical/functions/fnc_isMedic.sqf @@ -6,7 +6,7 @@ * 0: The Unit * 1: Class (default: 1) * - * Return Value: + * ReturnValue: * Is in of medic class * * Example: @@ -19,7 +19,7 @@ params ["_unit", ["_medicN", 1]]; -private _class = _unit getVariable [QGVAR(medicClass), [0, 1] select (_unit getUnitTrait "medic")]; +private _class = _unit getVariable [QGVAR(medicClass), getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "attendant")]; if (_class >= _medicN min GVAR(medicSetting)) exitWith {true}; if (!GVAR(increaseTrainingInLocations)) exitWith {false}; diff --git a/addons/medical/functions/fnc_isMedicalVehicle.sqf b/addons/medical/functions/fnc_isMedicalVehicle.sqf index 66ecf84a07..14499cb241 100644 --- a/addons/medical/functions/fnc_isMedicalVehicle.sqf +++ b/addons/medical/functions/fnc_isMedicalVehicle.sqf @@ -5,15 +5,11 @@ * Arguments: * 0: The Vehicle * - * Return Value: + * ReturnValue: * Is in of medic class * - * Example: - * [car] call ace_medical_fnc_isMedicalVehicle - * * Public: Yes */ - #include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/medical/functions/fnc_itemCheck.sqf b/addons/medical/functions/fnc_itemCheck.sqf index 6ab1e490c3..d49e04e774 100644 --- a/addons/medical/functions/fnc_itemCheck.sqf +++ b/addons/medical/functions/fnc_itemCheck.sqf @@ -5,12 +5,9 @@ * Arguments: * 0: The unit * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob] call ace_medical_fnc_itemCheck - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_litterCleanupLoop.sqf b/addons/medical/functions/fnc_litterCleanupLoop.sqf index 6f546b47ed..417144dd64 100644 --- a/addons/medical/functions/fnc_litterCleanupLoop.sqf +++ b/addons/medical/functions/fnc_litterCleanupLoop.sqf @@ -5,12 +5,9 @@ * Arguments: * None * - * Return Value: + * ReturnValue: * None * - * Example: - * call ACE_medical_fnc_litterCleanupLoop - * * Public: No */ diff --git a/addons/medical/functions/fnc_medicationEffectLoop.sqf b/addons/medical/functions/fnc_medicationEffectLoop.sqf index c1690806fe..00ef00a82c 100644 --- a/addons/medical/functions/fnc_medicationEffectLoop.sqf +++ b/addons/medical/functions/fnc_medicationEffectLoop.sqf @@ -10,12 +10,9 @@ * 4: Viscosity adjustment rate * 5: Pain reduction rate * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob, "leg", 1, 2, 3, 4] call ACE_medical_fnc_medicationEffectLoop - * * Public: No */ diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf index 1da4ed20c0..4d0db7af34 100644 --- a/addons/medical/functions/fnc_modifyMedicalAction.sqf +++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf @@ -9,12 +9,9 @@ * 2: Selection Number * 3: The action to modify * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob, kevin, 2, "action"] call ACE_medical_fnc_modifyMedicalAction - * * Public: No */ diff --git a/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf b/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf index b884e8b82d..b54196d75f 100644 --- a/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf +++ b/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ACE_medical_fnc_moduleAdvancedMedicalSettings - * * Public: No */ diff --git a/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf b/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf index 51a4be7461..5bdaccff93 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ACE_medical_fnc_moduleAssignMedicRoles - * * Public: No */ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf b/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf index 97dcc35a6b..368b065908 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [kevin, bob], true] call ACE_medical_fnc_moduleAssignMedicalFacility - * * Public: No */ diff --git a/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf b/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf index 4d7576f2c2..60a46f8420 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ACE_medical_fnc_moduleAssignMedicalVehicle - * * Public: No */ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf b/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf index c73d49458b..08076878f2 100644 --- a/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf +++ b/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [Logic, [bob, kevin], true] call ACE_medical_fnc_moduleBasicMedicalSettings - * * Public: No */ diff --git a/addons/medical/functions/fnc_moduleMedicalSettings.sqf b/addons/medical/functions/fnc_moduleMedicalSettings.sqf index 148183ea22..29398bbc35 100644 --- a/addons/medical/functions/fnc_moduleMedicalSettings.sqf +++ b/addons/medical/functions/fnc_moduleMedicalSettings.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ACE_medical_fnc_moduleMedicalSettings - * * Public: No */ diff --git a/addons/medical/functions/fnc_moduleReviveSettings.sqf b/addons/medical/functions/fnc_moduleReviveSettings.sqf index de9e53820c..19aa9579dd 100644 --- a/addons/medical/functions/fnc_moduleReviveSettings.sqf +++ b/addons/medical/functions/fnc_moduleReviveSettings.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ACE_medical_fnc_moduleReviveSettings - * * Public: No */ diff --git a/addons/medical/functions/fnc_onMedicationUsage.sqf b/addons/medical/functions/fnc_onMedicationUsage.sqf index 95e7d0bf5e..019abd094c 100644 --- a/addons/medical/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical/functions/fnc_onMedicationUsage.sqf @@ -13,9 +13,6 @@ * Return Value: * None * - * Example: - * [bob, "classname", "varname", 5, 6, ["stuff"]] call ACE_medical_fnc_onMedicationUsage - * * Public: No */ diff --git a/addons/medical/functions/fnc_parseConfigForInjuries.sqf b/addons/medical/functions/fnc_parseConfigForInjuries.sqf index c3ef815e74..42dd98dc1f 100644 --- a/addons/medical/functions/fnc_parseConfigForInjuries.sqf +++ b/addons/medical/functions/fnc_parseConfigForInjuries.sqf @@ -4,13 +4,9 @@ * * Arguments: * None - * - * Return Value: + * ReturnValue: * None * - * Example: - * call ACE_medical_fnc_parseConfigForInjuries - * * Public: No */ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_playInjuredSound.sqf b/addons/medical/functions/fnc_playInjuredSound.sqf index 629b600d49..2e5ec2ab5f 100644 --- a/addons/medical/functions/fnc_playInjuredSound.sqf +++ b/addons/medical/functions/fnc_playInjuredSound.sqf @@ -8,12 +8,9 @@ * 0: The Unit * 1: Amount of Pain * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob, 5] call ACE_medical_fnc_playInjuredSound - * * Public: No */ diff --git a/addons/medical/functions/fnc_reviveStateLoop.sqf b/addons/medical/functions/fnc_reviveStateLoop.sqf index 0ec5f78c85..5dcaad09c4 100644 --- a/addons/medical/functions/fnc_reviveStateLoop.sqf +++ b/addons/medical/functions/fnc_reviveStateLoop.sqf @@ -5,12 +5,9 @@ * Arguments: * 0: Unit * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob] call ACE_medical_fnc_reviveStateLoop - * * Public: No */ diff --git a/addons/medical/functions/fnc_selectionNameToNumber.sqf b/addons/medical/functions/fnc_selectionNameToNumber.sqf index 441f4bb31e..1e8d79183f 100644 --- a/addons/medical/functions/fnc_selectionNameToNumber.sqf +++ b/addons/medical/functions/fnc_selectionNameToNumber.sqf @@ -5,12 +5,9 @@ * Arguments: * 0: The selection name of a unit * - * Return Value: + * ReturnValue: * Number representation. -1 if invalid. * - * Example: - * ["head"] call ace_medical_fnc_selectionNameToNumber - * * Public: yes */ diff --git a/addons/medical/functions/fnc_serverRemoveBody.sqf b/addons/medical/functions/fnc_serverRemoveBody.sqf index 3c1bfe90a1..f68ffd95cd 100644 --- a/addons/medical/functions/fnc_serverRemoveBody.sqf +++ b/addons/medical/functions/fnc_serverRemoveBody.sqf @@ -7,7 +7,7 @@ * 0: Mr Body * * Return Value: - * None + * Nothing * * Example: * [cursorTarget] call ace_medical_fnc_serverRemoveBody diff --git a/addons/medical/functions/fnc_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf index 5b97b3d50b..69bda192dd 100644 --- a/addons/medical/functions/fnc_setCardiacArrest.sqf +++ b/addons/medical/functions/fnc_setCardiacArrest.sqf @@ -6,12 +6,9 @@ * Arguments: * 0: The unit that will be put in cardiac arrest state * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob] call ace_medical_fnc_setCardiacArrest - * * Public: yes */ diff --git a/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf index fcc8b42235..0e5fd884f4 100644 --- a/addons/medical/functions/fnc_setDead.sqf +++ b/addons/medical/functions/fnc_setDead.sqf @@ -4,15 +4,12 @@ * * Arguments: * 0: The unit that will be killed - * 1: Force Dead (ignore revive setting) (default: false) - * 1: Delay setDamage for a frame (default: false) + * 1: Force Dead (ignore revive setting) + * 1: Delay setDamage for a frame * - * Return Value: + * ReturnValue: * Did he died? * - * Example: - * [bob, false, false] call ace_medical_fnc_setDead - * * Public: yes */ diff --git a/addons/medical/functions/fnc_setHitPointDamage.sqf b/addons/medical/functions/fnc_setHitPointDamage.sqf index 16daee5e5d..b1dfe59d29 100644 --- a/addons/medical/functions/fnc_setHitPointDamage.sqf +++ b/addons/medical/functions/fnc_setHitPointDamage.sqf @@ -12,9 +12,6 @@ * Return Value: * None * - * Example: - * [medic, "Leg", 2, false] call ace_medical_fnc_setHitPointDamage - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_setStructuralDamage.sqf b/addons/medical/functions/fnc_setStructuralDamage.sqf index 4f8c6e2613..ba30b08153 100644 --- a/addons/medical/functions/fnc_setStructuralDamage.sqf +++ b/addons/medical/functions/fnc_setStructuralDamage.sqf @@ -5,11 +5,8 @@ * Arguments: * 0: The unit * - * Return Value: - * None - * - * Example: - * [bob] call ACE_medical_fnc_setStructuralDamage + * ReturnValue: + * * * Public: no? */ diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index c2d503ceee..5bee0967ba 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -8,8 +8,8 @@ * 2: Minimum unconscious time (default: (round(random(10)+5))) * 3: Force AI Unconscious (skip random death chance) (default: false) * - * Return Value: - * None + * ReturnValue: + * nil * * Example: * [bob, true] call ace_medical_fnc_setUnconscious; diff --git a/addons/medical/functions/fnc_showBloodEffect.sqf b/addons/medical/functions/fnc_showBloodEffect.sqf index 2e2a282884..8ed77714cb 100644 --- a/addons/medical/functions/fnc_showBloodEffect.sqf +++ b/addons/medical/functions/fnc_showBloodEffect.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [2] call ace_medical_fnc_showBloodEffect - * * Public: Yes */ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf index f5c0d6a1bb..453d074f98 100644 --- a/addons/medical/functions/fnc_treatment.sqf +++ b/addons/medical/functions/fnc_treatment.sqf @@ -11,9 +11,6 @@ * Return Value: * Succesful treatment started * - * Example: - * [medic, patient, "SelectionName","bandage"] call ace_medical_fnc_treatment - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf index aedcffdb49..0ce1f7d4d9 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf @@ -11,9 +11,6 @@ * Return Value: * Succesful treatment started * - * Example: - * [medic, patient, "selectionName", "bandage"] call ace_medical_fnc_treatmentAdvanced_CPR - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf index a893feedef..fbc7aac601 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf @@ -9,9 +9,6 @@ * Return Value: * Succesful treatment started * - * Example: - * [medic, patient] call ace_medical_fnc_treatmentAdvanced_CPRLocal - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf index 0dd9742c08..0db3e641b3 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf @@ -13,9 +13,6 @@ * Return Value: * Succesful treatment started * - * Example: - * [medic, patient, "Selectionname", "bandage", "bandage", -1] call ace_medical_fnc_treatmentAdvanced_bandage - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf index c581d4ddbe..d7d19d6e53 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf @@ -10,9 +10,6 @@ * Return Value: * Succesful treatment started * - * Example: - * [bob, "classname"] call ACE_medical_fnc_treatmentAdvanced_bandageLocal - * * Public: No */ @@ -62,7 +59,7 @@ private _exit = false; } else { //Basic medical bandage just has a base level config (same effectivenes for all wound types) if (_bandage != "Bandage") then { - WARNING_2("No config for wound type [%1] config base [%2]", _className, _config); + ACE_LOGWARNING_2("No config for wound type [%1] config base [%2]", _className, _config); }; }; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHeal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHeal.sqf index 5b20863338..18bd0468d2 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_fullHeal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHeal.sqf @@ -1,21 +1,11 @@ -/* - * Author: Glowbal +/** + * fn_heal.sqf + * @Descr: N/A + * @Author: Glowbal * - * - * Arguments: - * 0: Caller - * 1: Target - * 2: SelectionName - * 3: ClassName - * 4: Item - * - * Return Value: - * Boolean - * - * Example: - * [bob, kevin, "selection", "classname", ] call ACE_medical_fnc_treatmentAdvanced_fullHeal - * - * Public: No + * @Arguments: [] + * @Return: + * @PublicAPI: false */ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf index bd31e58ba9..7517f235e7 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf @@ -1,18 +1,11 @@ -/* - * Author: Glowbal +/** + * fn_healLocal.sqf + * @Descr: N/A + * @Author: Glowbal * - * - * Arguments: - * 0: Caller - * 1: Target - * - * Return Value: - * Boolean - * - * Example: - * [bob, kevin] call ACE_medical_fnc_treatmentAdvanced_fullHealLocal - * - * Public: No + * @Arguments: [] + * @Return: + * @PublicAPI: false */ #include "script_component.hpp" @@ -54,6 +47,7 @@ if (alive _target) exitWith { _target setVariable [QGVAR(airwayCollapsed), false, true]; // generic medical admin + _target setVariable [QGVAR(addedToUnitLoop), false, true]; _target setVariable [QGVAR(inCardiacArrest), false, true]; _target setVariable [QGVAR(inReviveState), false, true]; _target setVariable ["ACE_isUnconscious", false, true]; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf index a58ded3de3..ceb788f571 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf @@ -12,9 +12,6 @@ * Return Value: * Succesful treatment started * - * Example: - * [medic, patient, "selectionName", "bandage", 2] call ace_medical_fnc_treatmentAdvanced_medication - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf index 32b7e9d2c1..46a8b9c2a8 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf @@ -10,9 +10,6 @@ * Return Value: * Succesful treatment started * - * Example: - * [medic, "bandage", 2] call ace_medical_fnc_treatmentAdvanced_medicationLocal - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_treatmentAdvanced_surgicalKit_onProgress.sqf b/addons/medical/functions/fnc_treatmentAdvanced_surgicalKit_onProgress.sqf index a73661ac77..0a1e48288f 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_surgicalKit_onProgress.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_surgicalKit_onProgress.sqf @@ -12,9 +12,6 @@ * Return Value: * Succesful treatment started * - * Example: - * [[bob, kevin], 5, 5] call ACE_medical_fnc_treatmentAdvanced_surgicalKit_onProgress - * * Public: No */ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf b/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf index 5ef368922d..6989ac14b8 100644 --- a/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * [bob, kevin, "selection", "classname"] call ACE_medical_fnc_treatmentBasic_bloodbag - * * Public: No */ diff --git a/addons/medical/functions/fnc_treatmentBasic_bloodbagLocal.sqf b/addons/medical/functions/fnc_treatmentBasic_bloodbagLocal.sqf index 1e56eb3d88..cb4dcf032c 100644 --- a/addons/medical/functions/fnc_treatmentBasic_bloodbagLocal.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_bloodbagLocal.sqf @@ -7,10 +7,7 @@ * 1: Treatment Classname * * Return Value: - * None - * - * Example: - * [bob, "classname"] call ACE_medical_fnc_treatmentBasic_bloodbagLocal + * nil * * Public: No */ diff --git a/addons/medical/functions/fnc_treatmentBasic_epipen.sqf b/addons/medical/functions/fnc_treatmentBasic_epipen.sqf index 161626bb41..1abee1cd58 100644 --- a/addons/medical/functions/fnc_treatmentBasic_epipen.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_epipen.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * [bob, kevin, "selection", "classname"] call ACE_medical_fnc_treatmentBasic_epipen - * * Public: No */ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_treatmentBasic_morphine.sqf b/addons/medical/functions/fnc_treatmentBasic_morphine.sqf index f011ab41a2..f704a67042 100644 --- a/addons/medical/functions/fnc_treatmentBasic_morphine.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_morphine.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * [bob, kevin, "selection", "classname"] call ACE_medical_fnc_treatmentBasic_morphine - * * Public: No */ diff --git a/addons/medical/functions/fnc_treatmentBasic_morphineLocal.sqf b/addons/medical/functions/fnc_treatmentBasic_morphineLocal.sqf index f24719d352..bb670c75bd 100644 --- a/addons/medical/functions/fnc_treatmentBasic_morphineLocal.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_morphineLocal.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, kevin] call ACE_medical_fnc_treatmentBasic_morphineLocal - * * Public: No */ diff --git a/addons/medical/functions/fnc_treatmentIV.sqf b/addons/medical/functions/fnc_treatmentIV.sqf index a393acbb13..7b16fad650 100644 --- a/addons/medical/functions/fnc_treatmentIV.sqf +++ b/addons/medical/functions/fnc_treatmentIV.sqf @@ -11,9 +11,6 @@ * Return Value: * Succesful treatment started * - * Example: - * [medic, patient, "SelectionName", "bandage"] call ace_medical_fnc_treatmentIV - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_treatmentIVLocal.sqf b/addons/medical/functions/fnc_treatmentIVLocal.sqf index 63d8292b0f..1324d5aac2 100644 --- a/addons/medical/functions/fnc_treatmentIVLocal.sqf +++ b/addons/medical/functions/fnc_treatmentIVLocal.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [medic, "Classname"] call ace_medical_fnc_treatmentIVLocal - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_treatmentTourniquet.sqf b/addons/medical/functions/fnc_treatmentTourniquet.sqf index cb7e6d21d0..3fa34a58aa 100644 --- a/addons/medical/functions/fnc_treatmentTourniquet.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquet.sqf @@ -12,9 +12,6 @@ * Return Value: * Succesful treatment started * - * Example: - * [bob, kevin, "selection", "classname"] call ACE_medical_fnc_treatmentTourniquet - * * Public: No */ diff --git a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf index e7e9ff7ca1..ab24a94a23 100644 --- a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, "classname"] call ACE_medical_fnc_treatmentTourniquetLocal - * * Public: No */ #include "script_component.hpp" diff --git a/addons/medical/functions/fnc_treatment_failure.sqf b/addons/medical/functions/fnc_treatment_failure.sqf index 8ddd8c5cf2..d81c576feb 100644 --- a/addons/medical/functions/fnc_treatment_failure.sqf +++ b/addons/medical/functions/fnc_treatment_failure.sqf @@ -12,9 +12,6 @@ * Return Value: * None * - * Example: - * [bob, kevin, "selectionname", "classname", ["bandage"]] call ACE_medical_fnc_treatment_failure - * * Public: No */ @@ -44,14 +41,14 @@ _caller setVariable [QGVAR(treatmentPrevAnimCaller), nil]; private _weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnTreatment), []]); if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then { - for "_index" from 0 to 299 do { + for "_index" from 0 to 99 do { _caller action ["SwitchWeapon", _caller, _caller, _index]; //Just check weapon, muzzle and mode (ignore ammo in case they were reloading) if (((weaponState _caller) select [0,3]) isEqualTo (_weaponSelect select [0,3])) exitWith {TRACE_1("Restoring", (weaponState _caller));}; if ((weaponState _caller) isEqualTo ["","","","",0]) exitWith {ERROR("weaponState not found");}; }; } else { - _caller action ["SwitchWeapon", _caller, _caller, 299]; + _caller action ["SwitchWeapon", _caller, _caller, 99]; }; { diff --git a/addons/medical/functions/fnc_treatment_success.sqf b/addons/medical/functions/fnc_treatment_success.sqf index 3984606e5f..eb52d20e3c 100644 --- a/addons/medical/functions/fnc_treatment_success.sqf +++ b/addons/medical/functions/fnc_treatment_success.sqf @@ -12,9 +12,6 @@ * Return Value: * None * - * Example: - * [bob, kevin, "selectionname", "classname", ["bandage"]] call ACE_medical_fnc_treatment_success - * * Public: No */ @@ -44,14 +41,14 @@ _caller setVariable [QGVAR(treatmentPrevAnimCaller), nil]; private _weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnTreatment), []]); if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then { - for "_index" from 0 to 299 do { + for "_index" from 0 to 99 do { _caller action ["SwitchWeapon", _caller, _caller, _index]; //Just check weapon, muzzle and mode (ignore ammo in case they were reloading) if (((weaponState _caller) select [0,3]) isEqualTo (_weaponSelect select [0,3])) exitWith {TRACE_1("Restoring", (weaponState _caller));}; if ((weaponState _caller) isEqualTo ["","","","",0]) exitWith {ERROR("weaponState not found");}; }; } else { - _caller action ["SwitchWeapon", _caller, _caller, 299]; + _caller action ["SwitchWeapon", _caller, _caller, 99]; }; // Record specific callback diff --git a/addons/medical/functions/fnc_unconsciousPFH.sqf b/addons/medical/functions/fnc_unconsciousPFH.sqf index 3c5609d85a..37d54a2ad6 100644 --- a/addons/medical/functions/fnc_unconsciousPFH.sqf +++ b/addons/medical/functions/fnc_unconsciousPFH.sqf @@ -3,7 +3,7 @@ * PFH logic for unconscious state * * Arguments: - * 0: PFEH - + * 0: PFEH - Args * 0: The unit that will be put in an unconscious state * 1: unitPos (stance) * 2: Starting Time @@ -12,15 +12,11 @@ * 5: Parachute Check * 1: PFEH ID * - * Return Value: + * ReturnValue: * None * - * Example: - * [[unit,"pos", 5, 5, true, false], 5], "classname"] call ace_medical_fnc_unconsciousPFH - * * Public: yes */ - #include "script_component.hpp" private ["_unit", "_minWaitingTime", "_slotInfo", "_hasMovedOut", "_parachuteCheck", "_args", "_originalPos", "_startingTime", "_awakeInVehicleAnimation", "_oldVehicleAnimation", "_vehicle"]; diff --git a/addons/medical/functions/fnc_useItem.sqf b/addons/medical/functions/fnc_useItem.sqf index ec032a279f..63b3f2a696 100644 --- a/addons/medical/functions/fnc_useItem.sqf +++ b/addons/medical/functions/fnc_useItem.sqf @@ -7,13 +7,10 @@ * 1: Patient * 2: Item * - * Return Value: + * ReturnValue: * 0: success * 1: Unit * - * Example: - * [unit, patient, "bandage"] call ace_repair_fnc_useItem - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_useItems.sqf b/addons/medical/functions/fnc_useItems.sqf index f898ea72f5..aac7b0623a 100644 --- a/addons/medical/functions/fnc_useItems.sqf +++ b/addons/medical/functions/fnc_useItems.sqf @@ -7,12 +7,9 @@ * 1: Patient * 2: Items > * - * Return Value: + * ReturnValue: * None * - * Example: - * [unit, patient, ["bandage"]] call ace_medical_fnc_useItems - * * Public: Yes */ diff --git a/addons/medical/functions/fnc_vitalLoop.sqf b/addons/medical/functions/fnc_vitalLoop.sqf index a9efa81719..6e5bb7fb2b 100644 --- a/addons/medical/functions/fnc_vitalLoop.sqf +++ b/addons/medical/functions/fnc_vitalLoop.sqf @@ -6,12 +6,9 @@ * 0: The Unit * 1: Time of last computation * - * Return Value: + * ReturnValue: * None * - * Example: - * [bob, 5] call ACE_medical_fnc_vitalLoop - * * Public: No */ diff --git a/addons/medical/script_component.hpp b/addons/medical/script_component.hpp index 5735f940f4..bb0db0cd74 100644 --- a/addons/medical/script_component.hpp +++ b/addons/medical/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MEDICAL diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index d94fe3ae5a..8c639ccd86 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,26 +12,18 @@ SÉRÜLÉSEK ZRANĚNÍ FERIMENTOS - 負傷 - 부상 - 受伤 - 受傷 No injuries on this bodypart... Körperteil nicht verletzt... Non ci sono lesioni in questa parte del corpo... Данная часть тела не повреждена... - Aucune blessure ici... + Aucune blessures sur cette partie du corps... Brak obrażeń na tej części ciała... Sin heridas en esta parte del cuerpo... Ezen a testrészen nincs sérülés... Žádné zranění na této části těla... Nenhum ferimento nesta parte do corpo... - 怪我をしていない - 이 부위에는 부상이 없습니다... - 此身体部位没有受伤 - 此身體部位沒有受傷 Litter Simulation Detail @@ -44,10 +36,6 @@ Hulladékszimuláció részletessége Detalhe da simulação de sujeira Počet zobrazených předmětů po použití zdravotnického materiálu - 医療廃棄物を再現する詳細度 - 의료폐기물 재현 상세도 - 医疗废弃物模拟细节 - 醫療廢棄物模擬細節 Litter simulation detail level sets the number of litter items which will be locally spawned in the client. Excessive amounts in local areas could cause FPS lag, so this is a client only setting. @@ -60,25 +48,17 @@ A hulladékszimuláció részletessége megszabja a kliens által megjelenített hulladékobjektumok mennyiségét. Súlyos mennyiségek izolált területeken alacsony FPS-t okozhatnak, így ez egy kliensoldali beállítás. O nível de detalhe de sujeira determina o número de itens que irão aparecer no cliente. Quantidades excessivas em áreas locais podem aumentar o lag do FPS, então esta é uma opção somente para o cliente. Počet zobrazených předmětů po použití zdravotnického materiálu ovlivňuje počet objektů, které budou zobrazeny klientovi v místě použití zdravotnického materiálu. Vyšší množství objektů může způsobovat poklesy FPS a proto je toto nastavení čistě na klientovi. - 医療廃棄物再現度は各クライアントでローカルに作成される、医療廃棄物への詳細度を決定できます。ローカルで多くのアイテムがあると FPS の低下を引き起こすため、クライアント側のみの設定です。 - 의료폐기물 재현 상세도의 경우 얼마나 많은 수의 폐기물이 클라이언트 주변에 생성되는지를 정합니다. 매우 많은 수의 지역은 프레임드랍을 유발할 수 있습니다, 고로 이는 클라이언트 전용 설정입니다. - 设定医疗废弃物的最大产生数量, 过多的数量会导致画面更新率延迟, 因此这由用户端来设定 - 設定醫療廢棄物的最大產生數量, 過多的數量會導致畫面更新率延遲, 因此這由用戶端來設定 Inject Adenosine Adenosin injizieren Inyectar Adenosina Wstrzyknij adenozynę - Adénosine + Injecter de l'adénosine Inietta andenosina Aplikovat adenosine Injetar Adenosina Ввести аденозин - アデノシンを投与 - 아데노신 주사 - 注射腺苷 - 注射腺苷 Inject Atropine @@ -86,15 +66,11 @@ Inyectar Atropina Aplikovat atropin Wstrzyknij atropinę - Atropine + Injecter de l'atropine Ввести атропин Atropin beadása Inietta atropina Injetar Atropina - アトロピンを投与 - 아트로핀 주사 - 注射阿托品 - 注射阿托品 Inject Epinephrine @@ -102,15 +78,11 @@ Inyectar Epinefrina Wstrzyknij adrenalinę Aplikovat adrenalin - Épinéphrine + Injecter épinéphrine Ввести адреналин Epinefrin beadása Injetar Epinefrina Inietta adrenalina - アドレナリンを投与 - 에피네프린 주사 - 注射肾上腺素 - 注射腎上腺素 Inject Morphine @@ -119,14 +91,10 @@ Wstrzyknij morfinę Aplikovat morfin Ввести морфин - Morphine + Injecter morphine Morfium beadása Injetar Morfina Inietta morfina - モルヒネを投与 - 모르핀 주사 - 注射吗啡 - 注射嗎啡 Transfuse Blood @@ -135,14 +103,10 @@ Przetocz krew Transfúze krve Перелить кровь - Transfuser (sang) + Transfuser du sang Infúzió (vér) Transfundir Sangue Trasfusione di sangue - 輸血する - 혈액 수혈 - 输血液 - 輸血液 Transfuse Plasma @@ -150,15 +114,11 @@ Transfundir plasma Transfúze plazmy Przetocz osocze - Transfuser (plasma) + Transfuser du Plasma Перелить плазму Infúzió (vérplazma) Trasfusione di plasma Transfundir Plasma - 血しょうを投与 - 혈장 수혈 - 输血浆 - 輸血漿 Transfuse Saline @@ -166,15 +126,11 @@ Transfundir salino Transfúze fyziologického roztoku Przetocz sól fizjologiczną - Transfuser (saline) + Transfuser de la solution saline Перелить физраствор Infúzió (sós víz) Trasfusione di soluzione salina Transfundir Soro - 生理食塩水を投与 - 생리식염수 수혈 - 注射生理食盐水 - 注射生理食鹽水 Apply Tourniquet @@ -182,15 +138,11 @@ Aplicar torniquete Aplikovat škrtidlo Załóż stazę - Poser garrot + Appliquer un garrot Наложить жгут Applica laccio emostatico Aplicar Torniquete Érszorító alkalmazása - 止血帯を巻く - 지혈대 적용 - 使用军用止血带 - 使用軍用止血帶 Bandage @@ -203,10 +155,6 @@ Kötözés Atadura Перевязать - 包帯 - 붕대 - 绷带 - 繃帶 Bandage Head @@ -219,10 +167,6 @@ Fej kötözése Atar Cabeça Benda la testa - 包帯を頭へ - 머리에 붕대감기 - 绷带包扎 头部 - 繃帶包紮 頭部 Bandage Torso @@ -235,10 +179,6 @@ Testtörzs kötözése Atar Tronco Benda il torso - 包帯を胴体へ - 몸통에 붕대감기 - 绷带包扎 身体 - 繃帶包紮 身體 Bandage Left Arm @@ -251,10 +191,6 @@ Bal kar kötözése Atar Braço Esquerdo Benda il braccio sinistro - 包帯を左腕に - 왼팔에 붕대감기 - 绷带包扎 左手 - 繃帶包紮 左手 Bandage Right Arm @@ -267,10 +203,6 @@ Jobb kar kötözése Atar Braço Direito Benda il braccio destro - 包帯を右腕に - 오른팔에 붕대감기 - 绷带包扎 右手 - 繃帶包紮 右手 Bandage Left Leg @@ -283,10 +215,6 @@ Bal láb kötözése Atar Perna Esquerda Benda la gamba sinistra - 包帯を左足へ - 왼쪽 다리에 붕대감기 - 绷带包扎 左脚 - 繃帶包紮 左腳 Bandage Right Leg @@ -299,10 +227,6 @@ Jobb láb kötözése Atar Perna Direita Benda la gamba destra - 包帯を右足へ - 오른쪽 다리에 붕대감기 - 绷带包扎 右脚 - 繃帶包紮 右腳 Injecting Morphine... @@ -311,14 +235,10 @@ Wstrzykiwanie morfiny... Aplikuji morfin... Введение морфина... - Injection (morphine)... + Injection de Morphine... Morfium beadása... Injetando Morfina... Inietto la morfina... - モルヒネを投与中・・・ - 모르핀 주사중... - 吗啡注射中... - 嗎啡注射中... Injecting Epinephrine... @@ -327,29 +247,21 @@ Wstrzykiwanie adrenaliny... Aplikuji adrenalin... Введение адреналина... - Injection (épinéphrine)... + Injection d'Adrénaline... Epinefrin beadása... Injetando Epinefrina... Inietto l'adrenalina... - アドレナリンを投与中・・・ - 에피네프린 주사중... - 肾上腺素注射中... - 腎上腺素注射中... Injecting Adenosine... Adenosin injizieren... Inyectando Adenosina... Wstrzykiwanie adenozyny... - Injection (adénosine)... + Injection d'adénosine... Inietto l'andenosina Aplikuji adenosine... Injetando Adenosina... Введение аденозина... - アドネシンを投与中・・・ - 아데노신 주사중... - 腺苷注射中... - 腺苷注射中... Injecting Atropine... @@ -357,15 +269,11 @@ Inyectando Atropina... Aplikuji atropin... Wstrzykiwanie atropiny... - Injection (atropine)... + Injection d'Atropine... Введение атропина... Atropin beadása... Inietto l'atropina... Injetando Atropina - アトロピンを投与中・・・ - 아트리핀 주사중... - 阿托品注射中 ... - 阿托品注射中 ... Transfusing Blood... @@ -374,14 +282,10 @@ Przetaczanie krwi... Probíhá transfúze krve... Переливание крови... - Transfusion (sang)... + Transfusion Sanguine... Infúzió vérrel... Transfundindo Sangue... Effettuo la trasfusione di sangue... - 輸血中・・・ - 혈액 수혈중... - 输血液中 ... - 輸血液中 ... Transfusing Saline... @@ -389,15 +293,11 @@ Transfusión de salino... Probíha transfúze fyziologického roztoku... Przetaczanie soli fizjologicznej... - Transfusion (solution saline)... + Transfusion de saline... Переливание физраствора... Infúzió sós vizzel... Effettuo la rasfusione di soluzione salina Transfundindo Soro... - 生理食塩水を投与中・・・ - 생리식염수 수혈중... - 施打生理食盐水中 ... - 施打生理食鹽水中 ... Transfusing Plasma... @@ -405,15 +305,11 @@ Transfusión de plasma... Probíha transfúze plazmy... Przetaczanie osocza... - Transfusion (plasma)... + Transfusion de Plasma... Переливание плазмы... Infúzió vérplazmával... Effettu la trasfusione di plasma... Transfundindo Plasma... - 血しょうを投与中・・・ - 혈장 수혈중... - 输血浆中 ... - 輸血漿中 ... Bandaging... @@ -426,10 +322,6 @@ Bekötözés... Atando... Перевязывание... - 包帯を巻いています・・・ - 붕대감는중... - 绷带包扎中 ... - 繃帶包紮中 ... Applying Tourniquet... @@ -437,15 +329,11 @@ Aplicando torniquete... Aplikuji škrtidlo... Zakładanie stazy... - Pose du garrot... + Mise en place du Garrot... Наложение жгута... Érszorító felhelyezése... Sto applicando il laccio emostatico... Applicando Torniquete - 止血帯を巻いています・・・ - 지혈대 적용중... - 使用军用止血带中 ... - 使用軍用止血帶中 ... Medical @@ -458,10 +346,6 @@ Медик Médico Orvosi - 治療 - 치료 - 医疗 - 醫療 Field Dressing @@ -470,14 +354,10 @@ Бинтовая повязка Obinadlo Bandaż jałowy - Pansement individuel + Bandage rapide Zárókötszer Bendaggio rapido Curativo de Campo - 緊急圧迫包帯 - 필드 드레싱 - 基础绷带 - 基礎繃帶 Packing Bandage @@ -487,13 +367,9 @@ Bandaż uciskowy Nyomókötszer Bendaggio compressivo - Bande extensible + Bandage gauze Bandagem de Compressão Obvaz Tlakový - 弾性包帯 - 거즈 붕대 - 包扎绷带 - 包紮繃帶 Elastic Bandage @@ -502,14 +378,10 @@ Давящая повязка Obavaz Elastický Bandaż elastyczny - Bande compressive + Pansement élastique Rögzitő kötszer Bendaggio elastico Bandagem Elástica - 伸縮包帯 - 압박 붕대 - 弹性绷带 - 彈性繃帶 QuikClot @@ -518,14 +390,10 @@ QuikClot Opatrunek QuikClot QuikClot - Bandage hémostatique + Hémostatique QuikClot QuikClot (polvere emostatica) QuikClot - クイッククロット - 퀵 클롯 - 止血粉 - 止血粉 Check Pulse @@ -534,14 +402,10 @@ Проверить пульс Zkontrolovat puls Sprawdź tętno - Prendre le pouls + Vérifier le pouls Pulzus ellenőrzése Controlla il polso Checar Pulso - 心拍数をはかる - 맥박 확인 - 检查脉搏 - 檢查脈搏 Check Blood Pressure @@ -550,14 +414,10 @@ Проверить давление Zkontrolovat krevní tlak Sprawdź ciśnienie krwi - Prendre la tension + Vérification de la tension Vérnyomás megmérése Controlla pressionsa sanguigna Chegar Pressão Sanguínea - 血圧をはかる - 혈압 확인 - 检查血压 - 檢查血壓 Triage Card @@ -566,30 +426,22 @@ Медкарта Karta segregacyjna Štítek - Fiche de triage + Carte de triage Orvosi lap Triage Card Cartão de Triagem - トリアージ カード - 부상자 분류 카드 - 检伤分类卡 - 檢傷分類卡 No entries on this triage card. Keine Einträge auf der Triagekarte Nessuna voce sulla Triage Card Нет записей. - Fiche vide + Aucune entrée sur cette carte de triage Brak wpisów w tej karcie segregacyjnej. Sin entradas en esta tarjeta de clasificación. Ez az orvosi lap nem tartalmaz bejegyzést. Žádné záznamy na tomto štítku Nenhuma entrada neste cartão de triagem - トリアージ カードには何も無い - 부상자 분류 카드에 쓰여있는것이 없습니다. - 此检伤分类卡上没有任何资料 - 此檢傷分類卡上沒有任何資料 Tourniquet @@ -602,10 +454,6 @@ Érszorító Laccio emostatico Torniquete - 止血帯 - 지혈대 - 军用止血带 - 軍用止血帶 Remove Tourniquet @@ -614,14 +462,10 @@ Снять жгут Sundat škrtidlo Zdejmij stazę - Enlever garrot + Enlever le garrot Érszorító leszedése Rimuovi laccio emostatico Remover Torniquete - 止血帯をはずす - 지혈대 제거 - 移除军用止血带 - 移除軍用止血帶 Diagnose @@ -634,10 +478,6 @@ Diagnosztizálás Diagnóza Diagnosticar - 診断する - 진단 - 诊断 - 診斷 Diagnosing... @@ -650,42 +490,30 @@ Diagnózis folyamatban... Diagnostika... Diagnosticando... - 診断中・・・ - 진단중... - 诊断中... - 診斷中... CPR HLW RCP Сердечно-лёгочная реанимация - RCP + RPC RKO RCP Újraélesztés CPR SBV - 心肺蘇生 - 심폐소생술 - 心肺复苏术 - 心肺復甦術 Performing CPR... HLW durchführen... Eseguendo RCP... Сердечно-лёгочная реанимация... - RCP en cours + RPC en cours Przeprowadzanie RKO... Realizando RCP... Újraélesztés folyamatban... Provádím CPR... Realizando o SBV... - 心肺蘇生を実行中・・・ - 심폐소생중... - 进行心肺复苏术中... - 進行心肺復甦術中... Give Blood IV (1000ml) @@ -693,15 +521,11 @@ Dar Sangre IV (1000ml) Перелить пакет крови (1000 мл) Podaj krew IV (1000ml) - Sang en IV (1000ml) + Administrer du sang en IV (1000ml) Podat krev. transfúzi (1000ml) Vér adása intravénásan (1000ml) Effettua trasfusione sangue EV (1˙000ml) Administrar Sangue IV (1000ml) - 血液 IV (1000ml) をあたえる - IV 혈액 수혈 (1000ml) - 输血液 (1000ml) - 輸血液 (1000ml) Give Blood IV (500ml) @@ -709,15 +533,11 @@ Dar Sangre IV (500ml) Перелить пакет крови (500 мл) Podaj krew IV (500ml) - Sang en IV (500ml) - Podat krev. transfúzi (500ml) + Administrer du sang en IV (500ml) + Podat krev. transfúzi (500ml) Vér adása intravénásan (500ml) Effettua trasfusione sangue EV (500ml) Administrar Sangue IV (500ml) - 血液 IV (500ml) をあたえる - IV 혈액 수혈 (500ml) - 输血液 (500ml) - 輸血液 (500ml) Give Blood IV (250ml) @@ -725,15 +545,11 @@ Dar Sangre IV (250ml) Перелить пакет крови (250 мл) Podaj krew IV (250ml) - Sang en IV (250ml) + Administrer du sang en IV (250ml) Podat krev. transfúzi (250ml) Vér adása intravénásan (250ml) Effettua trasfusione sangue EV (250ml) Administrar Sangue IV (250ml) - 血液 IV (250ml) をあたえる - IV 혈액 수혈 (250ml) - 输血液 (250ml) - 輸血液 (250ml) Give Plasma IV (1000ml) @@ -741,15 +557,11 @@ Dar Plasma IV (1000ml) Перелить пакет плазмы (1000 мл) Podaj osocze IV (1000ml) - Plasma en IV (1000ml) + Administrer du plasma en IV (1000ml) Podat plazmu (1000ml) Vérplazma adása intravénásan (1000ml) Effettua trasfusione plasma EV (1˙000ml) Administrar Plasma IV (1000ml) - 血しょう IV (1000ml) をあたえる - IV 혈장 수혈 (1000ml) - 输血浆 (1000ml) - 輸血漿 (1000ml) Give Plasma IV (500ml) @@ -757,15 +569,11 @@ Dar Plasma IV (500ml) Перелить пакет плазмы (500 мл) Podaj osocze IV (500ml) - Plasma en IV (500ml) + Administrer du plasma en IV (500ml) Podat plazmu (500ml) Vérplazma adása intravénásan (500ml) Effettua trasfusione plasma EV (500ml) Administrar Plasma IV (500ml) - 血しょう IV (500ml) をあたえる - IV 혈장 수혈 (500ml) - 输血浆 (500ml) - 輸血漿 (500ml) Give Plasma IV (250ml) @@ -773,15 +581,11 @@ Dar Plasma IV (250ml) Перелить пакет плазмы (250 мл) Podaj osocze IV (250ml) - Plasma en IV (250ml) + Administrer du plasma en IV (250ml) Podat plazmu (250ml) Vérplazma adása intravénásan (250ml) Effettua trasfusione plasma EV (250ml) Administrar Plasma IV (250ml) - 血しょう IV (250ml) をあたえる - IV 혈장 수혈 (250ml) - 输血浆 (250ml) - 輸血漿 (250ml) Give Saline IV (1000ml) @@ -789,15 +593,11 @@ Dar Salino IV (1000ml) Перелить пакет физраствора (1000 мл) Podaj sól fizjologiczną IV (1000ml) - Solution saline en IV (1000ml) + Administrer de la solution saline en IV (1000ml) Podaz fyz. roztok (1000ml) Sós víz adása intravénásan (1000ml) Effettua trasfusione salina EV (1˙000ml) Administrar Soro IV (1000ml) - 生理食塩水 IV (1000ml) をあたえる - IV 생리식염수 수혈 (1000ml) - 注射生理食盐水 (1000ml) - 注射生理食鹽水 (1000ml) Give Saline IV (500ml) @@ -805,15 +605,11 @@ Dar Salino IV (500ml) Перелить пакет физраствора (500 мл) Podaj sól fizjologiczną IV (500ml) - Solution saline en IV (500ml) + Administrer de la solution saline en IV (500ml) Podaz fyz. roztok (500ml) Sós víz adása intravénásan (500ml) Effettua trasfusione salina EV (500ml) Administrar Soro IV (500ml) - 生理食塩水 IV (500ml) をあたえる - IV 생리식염수 수혈 (500ml) - 注射生理食盐水 (500ml) - 注射生理食鹽水 (500ml) Give Saline IV (250ml) @@ -821,15 +617,11 @@ Dar Salino IV (250ml) Перелить пакет физраствора (250 мл) Podaj sól fizjologiczną IV (250ml) - Solution saline en IV (250ml) + Administrer de la solution saline en IV (250ml) Podaz fyz. roztok (250ml) Sós víz adása intravénásan (250ml) Effettua trasfusione salina EV (250ml) Administrar Soro IV (250ml) - 生理食塩水 IV (250ml) をあたえる - IV 생리식염수 수혈 (250ml) - 注射生理食盐水 (250ml) - 注射生理食鹽水 (250ml) Minor @@ -837,47 +629,35 @@ Menor Несрочная помощь Normalny - Traitement en attente + Mineur Minimální Enyhe Minore Leve - 保留群 - 경미 - 轻微 - 輕微 Delayed Retrasado Срочная помощь Opóźniony - Traitement urgent + Différé Verzögert Odložitelný Késleltetett Differito Atrasado - 待機的治療群 - 늦어짐 - 延后 - 延後 Immediate Inmediato Неотложная помощь Natychmiastowy - Traitement immédiat + Urgence Immédiate Sofort Okamžitý Azonnali Immediata Imediato - 再優先治療群 - 긴급 - 紧急 - 緊急 Deceased @@ -890,26 +670,18 @@ Elhalálozott Deceduto Falecido - 死亡群 - 사망 - 死亡 - 死亡 None Ninguno Отсутствует Brak - Pas de fiche + Aucun Keine Nic Semmi Nessuna Nenhum - なし - 없음 - 未分类 - 未分類 Normal breathing @@ -922,42 +694,30 @@ Normális légzés Respiro normale Respiração normal - 通常の呼吸 - 정상 호흡 - 呼吸正常 - 呼吸正常 No breathing Keine Atmung Дыхание отсутствует No respira - Pas de respiration + Aucune respiration Brak oddechu Nedýchá Nincs légzés Mancanza di respiro Não respira - 息をしていない - 호흡 불가 - 没有呼吸 - 沒有呼吸 Difficult breathing Дыхание затруднено Dificultad para respirar - Difficulté respiratoire + Difficultée respiratoire Trudności z oddychaniem Schwere Atmung Dýchá s obtížemi Nehéz légzés Difficoltà a respirare Dificuldade para respirar - 呼吸が苦しそうだ - 호흡 곤란 - 呼吸困难 - 呼吸困難 Almost no breathing @@ -970,10 +730,6 @@ Alig van légzés Respira a fatica Quase não respira - ほとんど呼吸をしていない - 호흡이 없음 - 快要没呼吸 - 快要沒呼吸 Bleeding @@ -986,26 +742,18 @@ Vérzik Sanguinando Sangrando - 出血している - 출혈 - 流血中 - 流血中 - In pain + In Pain Hat Schmerzen Испытывает боль Con dolor - Douleur moyenne + Ressent de la douleur W bólu V bolestech Fájdalom alatt Con dolore Com dor - 痛みがある - 고통 - 疼痛中 - 疼痛中 Lost a lot of Blood @@ -1018,10 +766,6 @@ Sok vért vesztett Ha perso parecchio sangue Perdeu muito sangue - 大量出血している - 많은 양의 혈액을 잃음 - 大量失血中 - 大量失血中 Tourniquet [CAT] @@ -1034,10 +778,6 @@ Érszorító [CAT] Laccio emostatico [CAT] Torniquete [CAT] - 止血帯 [CAT] - 지혈대 [CAT] - 军用止血带 - 軍用止血帶 Receiving IV [%1ml] @@ -1045,31 +785,23 @@ Recibiendo IV [%1ml] Принимается переливание [%1 мл] Otrzymywanie IV [pozostało %1ml] - Transfusion : [%1ml] + Transfusion en IV [%1ml] Přijímání transfúze [%1ml] Infúzióra kötve [%1ml] Ricevendo EV [%1ml] Recebendo IV [%1ml] - IV [%1ml] を投与されている - IV로 [%1ml] 수혈중 - 接收静脉注射液中 [%1ml] - 接收靜脈注射液中 [%1ml] Bandage (Basic) Bandage (Einfach) Повязка (обычная) Vendaje (Básico) - Pansement adhésif + Bandage (Standard) Bandaż (jałowy) Obvaz (Standartní) Kötszer (Általános) Bendaggio (base) Bandagem(Básico) - 包帯 (緊急圧迫) - 붕대 (기본) - 基础绷带 - 基礎繃帶 Used to cover a wound @@ -1082,58 +814,42 @@ Usato per coprire una ferita Usado para cobrir um ferimento Slouží k překrytí poranění - 傷口をおおう - 상처를 덮을때 씁니다 - 用于覆盖伤口 - 用於覆蓋傷口 A dressing, that is a particular material used to cover a wound, which is applied over the wound once bleeding has been stemmed. Ein Verband, der aus einem besonderen Material besteht um die Wunde zu schützen, nachdem die Blutung gestoppt wurde. Повязка, накладываемая поверх раны после остановки кровотечения. Un apósito, material específico utilizado para cubrir una herida, se aplica sobre la herida una vez ha dejado de sangrar. - Pansement utilisé pour couvrir une blessure lorsque le saignement a été stoppé. + Bandage fait d'un matériel spécial utilisé pour couvrir une blessure, qui peut etre appliqué dès que le saignement a été stoppé. Opatrunek materiałowy, używany do przykrywania ran, zakładany na ranę po zatamowaniu krwawienia. Egy különleges anyagú kötszer sebek betakarására, amelyet a vérzés elállítása után helyeznek fel. Una benda apposita, utilizzata per coprire una ferita, la quale viene applicata su di essa una volta fermata l'emorragia. Uma curativo, material específico para cobrir um ferimento que é aplicado assim que o sangramento é estancando. Obvaz je vhodným způsobem upravený sterilní materiál, určený k překrytí rány, případně k fixaci poranění. - 緊急圧迫包帯は、傷口を血液凝固剤でおおうようにできていて、つかうと出血の原因を取りさります。 - 드레싱, 출혈을 막고서 상처를 덮기위해 쓰는 물건입니다. - 用于覆盖伤口以防止出血, 透过敷料的止血剂来让出血慢慢停止. - 用於覆蓋傷口以防止出血, 透過敷料的止血劑來讓出血慢慢停止. Packing Bandage Mullbinde Тампонирующая повязка Vendaje compresivo - Bande extensible + Bandage gauze Bandaż (uciskowy) Nyomókötszer Bendaggio compressivo Bandagem de Compressão Obvaz (Tlakový) - 弾性包帯 - 거즈 붕대 - 包扎绷带 - 包紮繃帶 Used to pack medium to large wounds and stem the bleeding Wird verwendet, um mittlere bis große Wunden abzudecken und Blutungen zu stoppen Для тампонирования ран среднего и большого размера и остановки кровотечения. Se utiliza para vendar heridas medianas o grandes y detener el sangrado - Utilisé pour couvrir des blessures moyennes et grandes, ralentit le saignement. + Utilisé pour couvrir des blessures de taille moyenne à grande. Arrête l'hémorragie. Używany w celu opatrywania średnich i dużych ran oraz tamowania krwawienia. Dobrze radzi sobie z tamowaniem ran płatowych oraz postrzałowych. Közepestől nagyig terjedő sebek betakarására és vérzés elállítására használt kötszer Usato su ferite medie o larghe per fermare emorragie. Usado para o preenchimento de cavidades geradas por ferimentos médios e grandes e estancar o sangramento. Používá se k zastavení středních až silnějších krvácení - 弾性包帯は粘着フィルム状で、普通から大きめなケガにつかい止血します。 - 중형 또는 대형 상처를 채우고 출혈을 막기위해 쓰입니다 - 用于包扎中到大型伤口, 并防止出血 - 用於包紮中到大型傷口, 並防止出血 A bandage used to pack the wound to stem bleeding and facilitate wound healing. Packing a wound is an option in large polytrauma injuries. @@ -1146,42 +862,30 @@ Ein Verband, um die Wunde abzudecken und die Wundheilung zu fördern. Wunden abdecken ist eine Option bei größeren Polytraumen Uma bandagem usada para preencher o ferimento para estancar o sangramento e facilitar a cicatrização. Preenchimento de feridas é uma opção em ferimentos de politrauma grandes. Tlakový obvaz se skládá se ze sterilní krycí vrstvy, na kterou je přiložena silná vrstva savého materiálu stlačující cévu v ráně a která je přitlačována k ráně a připevněna obinadlem. Slouží k zastavení silnějších krvácení. - 包帯をつかうと出血の原因を取りのぞき、それを促進させます。また大きめな多発性外傷にたいしても使えます。 - 출혈을 막고 상처를 치유하기 위한 붕대. 다발성외상의 경우 상처를 채우는것도 한 가지 방법입니다. - 用于包扎中到大型伤口, 并防止出血, 为在大型多处性伤口的选项之一! - 用於包紮中到大型傷口, 並防止出血, 為在大型多處性傷口的選項之一! Bandage (Elastic) Bandage (Elastisch) Повязка (давящая) Vendaje (Elástico) - Bande compressive + Bandage (Élastique) Bandaż (elastyczny) Obvaz (Elastický) Rögzító kötszer Benda (elastica) Bandagem (Elástica) - 包帯 (伸縮) - 붕대 (압박) - 弹性绷带 - 彈性繃帶 Bandage kit, Elastic Elastische Binde (Kompressionsbinde) Давящая повязка Kit de vendaje (Elástico) - Bande compressive + Bandage compressif élastique Bandaż elastyczny służy do opatrywania ran ciętych oraz kłutych. Dobrze radzi sobie również ze zgniecieniami tkanek miękkich oraz rozerwaniami powierzchni skóry. Rugalmas kötszercsomag, "rögzítő" Kit di bendaggio, elastico Kit de Bandagem, Elástica Sada obvazů, Elastická - 包帯キット (伸縮) - 붕대, 압박 - 弹性绷带 - 彈性繃帶 Allows an even compression and extra support to the injured area. @@ -1194,10 +898,6 @@ Permette di comprimere e aiutare la zone ferita. Esta bandagem pode ser utilizada para comprimir o ferimento e diminuir o sangramento e garantir que o ferimento não abra em movimento. Hodí se k fixačním účelům a to i v oblastech kloubů. - 負傷部分へ最大の対応と止血を続けられます。 - 부상 부위를 골고루 압박해주면서 동시에 고정시켜 줍니다. - 可对伤口持续压迫并固定以防止伤口情况变严重. - 可對傷口持續壓迫並固定以防止傷口情況變嚴重. Tourniquet (CAT) @@ -1210,58 +910,42 @@ Érszorító (CAT) Laccio emostatico (CAT) Torniquete (CAT) - 止血帯 (CAT) - 지혈대 [CAT] - 军用止血带 - 軍用止血帶 Slows down blood loss when bleeding Замедляет кровопотерю при кровотечении Reduce la velocidad de pérdida de sangre - Ralentit l'hémorragie + Ralentit le saignement Zmniejsza ubytek krwi z kończyn w przypadku krwawienia. Nie może być noszony zbyt długo ze względu na narastający ból z kończyny. Verringert den Blutverlust Lelassítja a vérvesztést vérzés esetén Rallenta la perdita di sangue in caso di sanguinamento Reduz a velocidade da perda de sangue Zpomaluje ztráty krve při krvácení - 出血しているときに、流れ出る量をへらします。 - 출혈 시 혈액손실을 늦춰줍니다 - 减缓失血的速度 - 減緩失血的速度 A constricting device used to compress venous and arterial circulation in effect inhibiting or slowing blood flow and therefore decreasing loss of blood. Жгут используется для прижатия сосудов к костным выступам, которое приводит к остановке или значительному уменьшению кровотечения Dispositivo utilizado para eliminar el pulso distal y de ese modo controlar la pérdida de sangre - Un dispositif permettant de compresser les artères et veines afin de ralentir l'hémorragie. + Un dispositif permettant de compresser les artères et veines afin de réduire la perte de sang. Opaska uciskowa CAT służy do tamowanie krwotoków w sytuacji zranienia kończyn z masywnym krwawieniem tętniczym lub żylnym. Ein Hilfsmittel, das Druck auf Venen und Arterien ausübt und so den Blutfluss verringert. Egy szűkítőeszköz, mely a vénás és artériás nyomás keringés helyi összenyomására szolgál, ezzel lelassítva vagy megállítva az adott területen a vérkeringést. Ez csökkenti a vérvesztés mértékét. Un laccio emostatico usato per comprimere le vene e arterie per bloccare o rallentare la circolazione del sangue e quindi rallentare dissanguamenti. A aparelho que comprime as artérias e veias para diminuir a perda de sangue. Zařízení používané ke stlačení venózního a arteriálního oběhu. V důsledku dochází ke zpomalení toku krve a tedy i snížení ztrát krve. - 止血帯は静脈や動脈へ圧力をかけ、循環を遅らせることで血液の流れをおそくし、失血を防ぎます。 - 정맥과 동맥을 압축시키켜 혈액순환을 억제 혹은 늦추게하여 혈액손실을 줄이는 도구입니다. - 用于压迫静脉与动脉的血液流动, 达到减缓失血速度的目的. - 用於壓迫靜脈與動脈的血液流動, 達到減緩失血速度的目的. Morphine autoinjector Morphium-Autoinjektor Морфин в пневмошприце Morfina auto-inyectable - Auto-injecteur de morphine + Auto-injecteur de Morphine Autostrzykawka z morfiną Auto-morfin Morfium autoinjektor Autoiniettore di morfina Auto-injetor de morfina - モルヒネ - 모르핀 자동주사기 - 吗啡自动注射器 - 嗎啡自動注射器 Used to combat moderate to severe pain experiences @@ -1274,10 +958,6 @@ Usato per combattere il dolore. Usado para combater dores moderadas e severas Slouží k tlumení středně těžkých a těžkých bolestí - 戦闘が収まったとき、痛みにたいしてつかいます。 - 심한 통증을 완화하는데 쓰입니다 - 减低中度至重度的疼痛感 - 減低中度至重度的疼痛感 An analgesic used to combat moderate to severe pain experiences. @@ -1290,71 +970,51 @@ Un analgesico usato per combattere il dolore. Um analgésico usado para combater dores moderadas e fortes. Analgetikum slouží k tlumení středně těžkých a těžkých bolestí - 戦闘が収まったとき、モルヒネを痛みにたいしてつかいます。 - 심한 통증을 완화하기 위해 쓰이는 진통제입니다. - 止痛药的一种, 用于减低中度至重度的疼痛感. - 止痛藥的一種, 用於減低中度至重度的疼痛感. Adenosine autoinjector Adenosin-Autoinjektor Asenosina auto-inyectable Autostrzykawka z adenozyną - Auto-injecteur d'adénosine + Auto-injécteur d'adénosine Autoiniettore di adenosina Auto-adenosine Auto-injetor de Adenosina Аденозин в пневмошприце - アデノシン - 아데노신 자동주사기 - 腺苷自动注射器 - 腺苷自動注射器 Used to counter effects of Epinephrine Wird verwendet um die Symptome von Epiniphrin zu lindern Utilizada para contrarrestar los effectos de la Epinefrina Adenozyna. Stosowana do zwalczania efektów działania adrenaliny. - Utilisé pour contrer les effets de l'épinéphrine + Utilisé pour contrer les effets de l'adrénaline Usato per contrastare l'effetto dell'epinefrina Slouží jako protiváha Adrenalinu Usado para combater os efeitos da Epinefrina Используется для купирования эффектов адреналина - アドレナリンの反対の効果としてつかいます。 - 에피네프린 대응책으로 쓰입니다 - 用来对付肾上腺素的影响 - 用來對付腎上腺素的影響 A drug used to counter the effects of Epinephrine Ein Medikament, das die Symptome von Epiniphrin bekämpft. Medicamento usado para contrarrestar los efectos de la Epinefrina. Organiczny związek chemiczny z grupy nukleozydów. Skuteczna w leczeniu częstoskurczu komorowego. Działa rozszerzająco na naczynia krwionośne. - Un composé utilisé pour contrer les effets de l'épinéphrine + Un composé utilisé pour contrer les effets de l'adrénaline Medicamento usato per contrastare l'effetto dell'epinefrina Droga používaná k tlumení efektu Adrenalinu Uma droga usada para combater os efeitos da Epinefrina Препарат используется для купирования эффектов адреналина - つかうと、アドレナリンと反対の効果がでます。 - 에피네프린에 대응용으로 쓰이는 약품 - 一种药物用于减低肾上腺素的效果 - 一種藥物用於減低腎上腺素的效果 Atropine autoinjector Атропин в пневмошприце Atropina auto-inyectable - Auto-injecteur d'atropine + Auto-injecteur d'Atropine Autostrzykawka AtroPen Atropin-Autoinjektor Auto-atropine Atropin autoinjektor Autoiniettore di atropina Auto-injetor de Atropina - アトロピン - 아트로핀 자동주사기 - 阿托品自动注射器 - 阿托品自動注射器 Used in NBC scenarios @@ -1367,10 +1027,6 @@ Usato in situazioni con gas nervino. Usado em casos de ataque QBRN Používá se v přítomnosti nervových plynů - 核・生物・化学兵器がつかわれている条件下にてつかいます。 - 핵,생물,화학 상황에 쓰입니다 - 使用于核生化污染的情况 - 使用於核生化汙染的情況 A drug used by the Military in NBC scenarios. @@ -1383,10 +1039,6 @@ E' un farmaco usato in ambito militare in scenari con presenza di gas nervino. Uma droga usada por militares em casos de ataque QBRN. Atropin slouží jako protijed na otravu organofosfátovými insekticidy (diazinon) a nervovými plyny. - 核・生物・化学兵器がつかわれている条件下にてつかいます。 - 핵,생물,화학 상황에 쓰이는 군용 약품 - 军用神经解毒针, 用来应付核生化污染的情况. - 軍用神經解毒針, 用來應付核生化汙染的情況. Epinephrine autoinjector @@ -1399,10 +1051,6 @@ Epinefrin autoinjektor Autoiniettore di adrenalina Auto-injetor de epinefrina - アドレナリン - 에피네프린 자동주사기 - 肾上腺素自动注射器 - 腎上腺素自動注射器 Increase heart rate and counter effects given by allergic reactions @@ -1415,10 +1063,6 @@ Aumenta il battito cardiaco e combatte gli effetti di reazioni allergiche. Aumenta a frequência cardíaca e combate efeitos causados por reações alérgicas Zvyšuje srdeční frekvenci a chrání před alergickými reakcemi - 心拍数を増加させたり、アレルギー反応を収める効果もあります。 - 심박수를 높이며 알러지반응의 대응책입니다 - 增加心跳速率的一种药物 - 增加心跳速率的一種藥物 A drug that works on a sympathetic response to dilate the bronchi, increase heart rate and counter such effects given by allergic reactions (anaphylaxis). Used in sudden cardiac arrest scenarios with decreasing positive outcomes. @@ -1431,122 +1075,90 @@ Uma droga trabalha dilatando os bronquios, aumentando a frequência cardíaca e combate efeitos de reações alérgicas(anáfilaticas). Usado em casos de parada cardiaca com poucas changes de recuperação. Egy hormon, mely a szimpatikus idegrendszer által kitágítja a hörgőket, valamint megnöveli a szívverést, ezzel ellensúlyozva ilyen jellegű allergiás reakciókat (anafilaxiás sokk). Hirtelen szívmegállás esetén is használt, idő alatt csökkenő hatásfokkal. Zúžení periferních cév díky působení na alfa receptory a následné kontrakci hladkých svalů, tím dochází k tzv. centralizaci oběhu, krev se soustřeďuje v životně důležitých centrálních orgánech (srdce, mozek, plíce), působí také pozitivně na srdeční činnost a dochází ke zvýšení krevního tlaku a tepu. Dále se používá při náhlé srdeční zástavě. - 薬は気管支を拡張するよう交感神経を拡張させ、心拍数を増加させます。それにアレルギー反応を収める効果もあります(アナフィラキシー ショック)。得られる効果は少ないですが、心停止している場合などにつかわれます。 - 기관지를 확장시키는 교감 신경 반응을 이끌어내는 약물로써, 심박을 높이고 알러지 효과에 대응합니다(아나필락시스). 심폐가 정지하는 경우 호전이 되지않을때 사용합니다. - 俗称强心针, 为一种支气管扩张药物, 会增加心跳速率并减缓过敏反应(过敏性休克), 在心跳骤停时有恢复心跳的效果! - 俗稱強心針, 為一種支氣管擴張藥物, 會增加心跳速率並減緩過敏反應(過敏性休克), 在心跳驟停時有恢復心跳的效果! Plasma IV (1000ml) Плазма для в/в вливания (1000 мл) Plasma IV (1000ml) - Plasma IV (1000ml) + Plasma Sanguin IV (1000ml) Osocze IV (1000ml) Plasma IV (1000ml) Vérplazma-infúzió (1000ml) Plasma EV (1000ml) Plasma IV (1000ml) Krevní plazma (1000ml) - 血しょう IV (1000ml) - 혈장 IV (250ml) - 血浆 (1000ml) - 血漿 (1000ml) A volume-expanding blood supplement. Дополнительный препарат, применяемый при возмещении объема крови. Suplemento para expandir el volumen sanguíneo. - Supplément sanguin visant à remplacer les volumes perdus. + Supplément visant à remplacer les volumes sanguin Składnik krwi, używany do zwiększenia jej objętości. Egy térfogatnövelő vérkiegészítmény. Aiuta ad aumentare il volume sanguigno. Volumenerweiterungsmittel (künstliches Blutvolumen) Suplemento para expandir o volume sanguíneo. - Intravenózně podávaný doplněk k zvětšení objemu krve - 血液量を増加させる補助です。 - 혈액량을 늘리기위한 보조수단 입니다. - 可快速得到血液补充 - 可快速得到血液補充 + Intravenózně podávaný doplněk k zvětšení objemu krve A volume-expanding blood supplement. Дополнительный препарат, применяемый при возмещении объема крови. Suplemento para expandir el volumen sanguíneo. - Supplément visant à remplacer le volume sanguin perdu et remplace les plaquettes. + Supplément visant à remplacer le volume sanguin et remplace les plaquettes. Składnik krwi, używany do zwiększenia jej objętości. Egy térfogatnövelő vérkiegészítmény. Aiuta ad aumentare il volume sanguigno. Volumenerweiterungsmittel (künstliches Blutvolumen) Suplemento para expandir o volume sanguíneo. - Intravenózně podávaný doplněk k zvětšení objemu krve - 血液量を増加させる補助です。 - 혈액량을 늘리기위한 보조수단 입니다. - 可快速得到血液补充 - 可快速得到血液補充 + Intravenózně podávaný doplněk k zvětšení objemu krve Plasma IV (500ml) Плазма для в/в вливания (500 мл) Plasma IV (500ml) - Plasma IV (500ml) + Plasma sanguin IV (500ml) Osocze IV (500ml) Plasma IV (500ml) Vérplazma-infúzió (500ml) Plasma EV (500ml) Plasma IV (500ml) Krevní plazma (500ml) - 血しょう IV (500ml) - 혈장 IV (500ml) - 血浆 (500ml) - 血漿 (500ml) Plasma IV (250ml) Плазма для в/в вливания (250 мл) Plasma IV (250ml) - Plasma (250ml) + Plasma sanguin (250ml) Osocze IV (250ml) Plasma IV (250ml) Vérplazma-infúzió (250ml) Plasma EV (250ml) Plasma IV (250ml) Krevní plazma (250ml) - 血しょう IV (250ml) - 혈장 IV (250ml) - 血浆 (250ml) - 血漿 (250ml) Blood IV (1000ml) Кровь для переливания (1000 мл) Sangre IV (1000ml) - Culot sanguin IV (1000ml) + Cullot sanguin IV (1000ml) Krew IV (1000ml) Blut IV (1000ml) Vér-infúzió (1000ml) Sangue EV (1000ml) Sangue IV (1000ml) Krevní transfúze (1000ml) - 血液 IV (1000ml) - 혈액 IV (1000ml) - 血液 (1000ml) - 血液 (1000ml) Blood IV, for restoring a patients blood (keep cold) Пакет крови для возмещения объёма потерянной крови (хранить в холодильнике) Sangre intravenosa, para restarurar el volumen sanguíneo (mantener frío) - Culot sanguin O-, utilisé seulement lors de perte sanguine majeure afin de remplacer le volume sanguin perdu. Habituellement utilisé lors du transport ou dans un établissement de soins. + Cullot sanguin O-, utilisé seulement lors de perte sanguine majeure afin de remplacer le volume sanguin perdu. Habituelment utilisé lors du transport ou dans un etablisement de soins. Krew IV, używana do uzupełnienia krwi u pacjenta, trzymać w warunkach chłodniczych. Vér-infúzió, intravénás bejuttatásra egy páciensnek (hidegen tárolandó) Sangue usato per ripristinare pazienti in cui si è verificata una perdita di sangue (conservare al fresco) Blut IV, Bluthaushalt des Patienten wiederherstellen. (Kühl halten) Sangue intravenoso, para restaurar o volume sanguinio do paciente.(Manter frio) Krevní transfuze pro doplnění pacientovi krve (skladujte v chladu) - 血液 IV は、患者へ血液を補給します。(要低温保存) - 혈액 IV, 환자에게 혈액을 공급합니다. (차갑게 할것) - 血液, 用于补充伤者流失的血液 (需冷藏) - 血液, 用於補充傷者流失的血液 (需冷藏) O Negative infusion blood used in strict and rare events to replenish blood supply usually conducted in the transport phase of medical care. @@ -1554,79 +1166,59 @@ Krew 0 Rh-, używana w rzadkich i szczególnych przypadkach do uzupełnienia krwi u pacjenta, zazwyczaj w trakcie fazie transportu rannej osoby do szpitala. Utilice sólo durante gran pérdida de sangre para reemplazar el volumen de sangre perdida. Uso habitual durante el transporte de heridos. Sangue 0 negativo usato per ripristinare sangue in pazienti in cui si è verificata una perdita di sangue. - Culot sanguin O- utilisé dans de rares et stricts cas pour compléter une perte de sang importante. Administré normalement lors d'un MEDEVAC. + Cullot sanguin O- utilisé dans de rares et stricts cas pour compléter une perte de sang importante. Administré normalement lors d'un MEDEVAC. O Negative Blutinfusion wird nur in seltenen Fällen verwendet, um den Bluthaushalt des Patienten zu ergänzen. Wird in der Regel wärend der Transportphase durchgeführt. - Sangue O- , utilizado em casos raros para rapidamente repor o sangue. Uso habitual ocorre durante o transporte ou em estações de tratamento. + Sangue O- , utilizado em casos raros para rapidamente repor o sangue. Uso habitual ocorre durante o transporte ou em estações de tratamento. Nullás vércsoportú, Rh-negatív vér-infúzió, melyet kritikus és ritka helyzetekben vérutánpótlásra használnak, jellemzően az orvosi ellátás szállítási fázisa közben. 0 Rh negativní krev se používá v vzácných případech k doplnění pacientovy hladiny krve, obvykle při převozu zraněné osoby do nemocnice. - O 型への輸血はまれで厳格であり、通常は治療のための輸送段階で輸血をおこないます。 - O- 형 혈액 투여는 매우 엄격하고 드문 혈액보급의 경우에 쓰이는데 주로 치료의 운송단계에서 사용됩니다. - O型负值注射用血液, 在紧急情况时使用, 用于补充伤者流失的血液 - O型負值注射用血液, 在緊急情況時使用, 用於補充傷者流失的血液 Blood IV (500ml) Кровь для переливания (500 мл) Sangre IV (500ml) - Culot sanguin IV (500ml) + Cullot sanguin IV (500ml) Krew IV (500ml) Blut IV (500ml) Vér-infúzió (500ml) Sangue EV (500ml) Sangue IV (500ml) Krevní transfúze (500ml) - 血液 IV (500ml) - 혈액 IV (500ml) - 血液 (500ml) - 血液 (500ml) Blood IV (250ml) Кровь для переливания (250 мл) Sangre IV (250ml) - Culot sanguin IV (250ml) + Cullot sanguin IV (250ml) Krew IV (250ml) Blut IV (250ml) Vér-infúzió (250ml) Sangue EV (250ml) Sangue IV (250ml) Krevní transfúze (250ml) - 血液 IV (250ml) - 혈액 IV (250ml) - 血液 (250ml) - 血液 (250ml) Saline IV (1000ml) Физраствор для в/в вливания (1000 мл) Salino IV (1000ml) - Solution saline IV (1000ml) + Solution saline 0.9% IV (1000ml) Sól fizjologiczna IV (1000ml) Kochsalzlösung (1000ml) 0,9%-os sósvíz-infúzió (1000ml) Soluzione salina EV (1˙000ml) Soro IV (1000ml) Fyziologický roztok (1000ml) - 生理食塩水 IV (1000ml) - 생리식염수 IV (1000ml) - 生理食盐水 (1000ml) - 生理食鹽水 (1000ml) Saline IV, for restoring a patients blood Пакет физраствора для возмещения объёма потерянной крови Solución salina intravenosa, para restaurar el volumen sanguíneo - Solution saline, pour rétablir temporairement la tension artérielle + Solution saline 0.9% IV, pour rétablir temporairement la tension artérielle Używany w medycynie w formie płynu infuzyjnego jako środek nawadniający i uzupełniający niedobór elektrolitów, podawany dożylnie (IV). 0,9%-os sósvíz-infúzió, a páciens vérmennyiségének helyreállítására Soluzione salina, usata per ripristinare sangue nei pazienti. Kochsalzlösung, ein medizinisches Volumenersatzmittel Solução Salina Intravenosa 0.9%, para restaurar o volume de sangue temporariamente. Fyziologický roztok se aplikuje intravenózně a slouží k obnově pacientovi krve - 生理食塩水 IV は、患者の血液量を補助します - 생리식염수, 환자의 혈액량을 보충할때 쓰입니다 - 生理食盐水, 用于恢复伤者血液 - 生理食鹽水, 用於恢復傷者血液 A medical volume-replenishing agent introduced into the blood system through an IV infusion. @@ -1636,45 +1228,33 @@ Używany w medycynie w formie płynu infuzyjnego jako środek nawadniający i uzupełniający niedobór elektrolitów, podawany dożylnie (IV). Egy orvosi térfogat-helyreállító készítmény, melyet intravénás módon lehet a szervezetbe juttatni. Una soluzione medica per ripristinare il volume del sangue introdotta tramite trasfusione EV. - Ein medizinisches Volumenersatzmittel, dass durch einen intravenösen Zugang in den Blutkreislauf verabreicht wird. - Uma reposição temporaria para restaurar a pressão arterial perdida por perda de sangue. + Ein medizinisches Volumenersatzmittel, dass durch einen intravenösen Zugang in den Blutkreislauf verabreicht wird. + Uma reposição temporaria para restaurar a pressão arterial perdida por perda de sangue. Fyziologický roztok se využívá nejčastěji jako infuze při dehydrataci organismu. - 生理食塩水 IV を静脈へ投与し、血液量を増加させることができます。 - 혈류에 IV로 투여되는 의료 용적 대체 요법 - 利用静脉注射进入人体血液系统, 帮助伤者血液恢复 - 利用靜脈注射進入人體血液系統, 幫助傷者血液恢復 Saline IV (500ml) Физраствор для в/в вливания (500 мл) Salino IV (500ml) - Solution saline IV (500ml) + Solution saline 0.9% IV (500ml) Sól fizjologiczna IV (500ml) Kochsalzlösung (500ml) 0,9%-os sósvíz-infúzió (500ml) Soluzione salina EV (500ml) Soro IV (1000ml) Fyziologický roztok (500ml) - 生理食塩水 IV (500ml) - 생리식염수 IV (500ml) - 生理食盐水 (500ml) - 生理食鹽水 (500ml) Saline IV (250ml) Физраствор для в/в вливания (250 мл) Salino IV (250ml) - Solution saline IV (250ml) + Solution saline 0.9% IV (250ml) Sól fizjologiczna IV (250ml) Kochsalzlösung (250ml) 0,9%-os sósvíz-infúzió (250ml) Soluzione salina EV (250ml) Soro IV (1000ml) Fyziologický roztok (250ml) - 生理食塩水 IV (250ml) - 생리식염수 IV (250ml) - 生理食盐水 (250ml) - 生理食鹽水 (250ml) Basic Field Dressing (QuikClot) @@ -1687,10 +1267,6 @@ Bendaggio emostatico (QuikClot) Bandagem básica (Coagulante) Hemostatický obvaz (QuikClot) - 緊急圧迫止血包帯 (クイッククロット) - 필드 드레싱 (퀵 클롯) - 基本战地包扎 (止血粉) - 基本戰地包紮 (止血粉) QuikClot bandage @@ -1703,10 +1279,6 @@ Bendaggio emostatico (QuikClot) Bandagem com agente coagulante Hemostatický obvaz (QuikClot) - クイッククロット - 퀵 클롯 붕대 - 止血粉绷带 - 止血粉繃帶 Hemostatic bandage with coagulant that stops bleeding. @@ -1717,17 +1289,13 @@ Verband mit Gerinnungsmittel, um starke Blutung zu behandeln. Hemostatikus kötszer egy vérzésgátló anyaggal. Bendaggio emostatico con coagulante che permette di arrestare perdite di sangue - Bandagem Hemostática com coagulante que controla hemorragia médias e grandes com risco de vida. + Bandagem Hemostática com coagulante que controla hemorragia médias e grandes com risco de vida. Hemostatický obvaz určený k zástavě krvácení - 血液凝固剤をふくむ包帯により、止血できます。 - 지혈시 사용하는 붕대로 혈액 응고제를 포함하고있습니다. - 包含止血粉成分的止血绷带, 可用于止血 - 包含止血粉成分的止血繃帶, 可用於止血 Personal Aid Kit Аптечка - Trousse sanitaire + Trousse de premiers soins Equipo de primeros auxilios Apteczka osobista Persönliches Erste-Hilfe-Set @@ -1735,58 +1303,42 @@ Pronto soccorso personale Kit De Primeiros Socorros Pessoal Osobní lékárnička (PAK) - 応急処置キット - 개인응급키트 - 个人急救包 - 個人急救包 Includes various treatment kit needed for stitching or advanced treatment Содержит различные материалы и инструменты для зашивания ран и оказания специальной медпомощи. Incluye material médico para tratamientos avanzados - Inclut du matériel medical pour les traitements délicats, tel les points de suture. + Inclue du matériel medical pour les traitements avancés, tel les points de suture. Zestaw środków medycznych do opatrywania ran i dodatkowego leczenia po-urazowego. Beinhaltet medizinisches Material für fortgeschrittene Behandlung und zum Nähen. Változatos segédfelszereléseket tartalmaz sebvarráshoz és haladó elsősegélynyújtáshoz Include vario materiale medico per trattamenti avanzati. Inclui vários tratamentos materiais para custura e tratamento avançado - Osobní lékárnička obsahuje zdravotnický materiál umožňující šití a pokročilejší ošetřování raněných - 縫合や高度な処置に必要とされる、さまざまな治療器具が含まれています。 - 봉합및 고급 조치에 필요한 다양한 치료 도구가 있습니다. - 包含各种医疗套件, 以及进阶伤口系统需要的缝合用品. - 包含各種醫療套件, 以及進階傷口系統需要的縫合用品. + Osobní lékárnička obsahuje zdravotnický materiál umožňující šití a pokročilejší ošetřování raněných Personal Aid Kit for in field stitching or advanced treatment W znacznym stopniu poprawia stan pacjenta Полевая аптчека для продвинутого лечения и зашивания ран Persönliches Erste-Hilfe-Set zum ambulanten Nähen und fortgeschrittener Behandlung. - Inclut du matériel medical pour les traitements délicats, tel les points de suture. + Trousse de premiers soins pour coudre sur le terrain et traitements avancés. Equipo de primeros auxilios para sutura de campaña o tratamientos avanzados Elsősegélycsomag, terepen való sebvarráshoz és haladó ellátáshoz Kit de primeiros socorros para sutura ou tratamentos avançados - Osobní lékárnička obsahuje zdravotnický materiál umožňující šití a pokročilejší ošetřování raněných v poli + Osobní lékárnička obsahuje zdravotnický materiál umožňující šití a pokročilejší ošetřování raněných v poli Pronto soccorso personale da campo per mettersi i punti o per trattamenti avanzati. - 戦場で縫合や高度な処置に必要とされる、さまざまな治療器具が含まれています。 - 야전에서 봉합및 고급 조치를 위한 개인응급키트 - 个人急救包可用于战地缝合手术或进阶伤口系统使用. - 個人急救包可用於戰地縫合手術或進階傷口系統使用. Use Personal Aid Kit Erste-Hilfe-Set benutzen Использовать аптечку - Utiliser la trousse sanitaire + Utiliser la Trousse de premier soins Użyj apteczki osobistej Usar equipo de primeros auxilios Elsősegélycsomag használata Usar o kit de primeiros socorros Použít osobní lékárničku (PAK) Usa il pronto soccorso personale - 応急処置キットをつかう - 개인 응급 키트사용하기 - 使用个人急救包 - 使用個人急救包 Surgical Kit @@ -1799,10 +1351,6 @@ Kit chirurgico Kit Cirurgico Chirurgická sada - 縫合キット - 봉합 키트 - 手术包 - 手術包 Surgical Kit for in field advanced medical treatment @@ -1815,10 +1363,6 @@ Kit chirurgico per trattamenti avanzati sul campo. Kit Cirurgico para uso de tratamento médico avançado em campo Chirurgická sada určená k pokročilejším zdravotnickým zákrokům v poli - 縫合キットは戦場で高度な処置をするためにつかわれます。 - 야전 상황에서 고급 의료 처치를 위해 사용되는 봉합 키트 - 用于在战场上为伤口进行缝合(需要开启进阶伤口系统). - 用於在戰場上為傷口進行縫合(需要開啟進階傷口系統). Surgical Kit for in field advanced medical treatment @@ -1831,10 +1375,6 @@ Kit chirurgico per trattamenti avanzati sul campo. Kit Cirurgico para uso de tratamento médico avançado em campo. Chirurgická sada určená k pokročilejším zdravotnickým zákrokům v poli - 縫合キットは戦場で高度な処置をするためにつかわれます。 - 야전 상황에서 고급 의료 처치를 위해 사용되는 봉합 키트 - 用于在战场上为伤口进行缝合(需要开启进阶伤口系统). - 用於在戰場上為傷口進行縫合(需要開啟進階傷口系統). Use Surgical Kit @@ -1847,10 +1387,6 @@ Sebészeti készlet használata Použít chirurgickou sadu Usar kit cirúrgico - 縫合キットをつかう - 봉합키트 사용하기 - 使用手术包 - 使用手術包 Bodybag @@ -1863,10 +1399,6 @@ Sacca per corpi Saco para cadáver Pytel na mrtvoly - 死体袋 - 시체 가방 - 尸袋 - 屍袋 A bodybag for dead bodies @@ -1879,10 +1411,6 @@ Una sacca nera per trasportare cadaveri. Um saco para corpos mortos Pytel na mrtvoly - 死体袋は死体を入れるためにつかいます - 시체를 운반할때 쓰는 가방입니다 - 用来装尸体用 - 用來裝屍體用 A bodybag for dead bodies @@ -1895,10 +1423,6 @@ Una sacca nera per trasportare cadaveri. Um saco para corpos mortos. Pytel na mrtvoly - 死体袋は死体を入れるためにつかいます - 시체를 운반할때 쓰는 가방입니다 - 用来装尸体用 - 用來裝屍體用 Blood Pressure @@ -1911,14 +1435,10 @@ Pressione sanguigna Pressão Arterial Krevní tlak - 血圧を測る - 혈압 - 血压 - 血壓 Checking Blood Pressure.. - Prise de la tension... + Mesure de la tension... Проверка артериального давления... Comprobando presión arterial... Sprawdzanie ciśnienia krwi... @@ -1927,30 +1447,22 @@ Controllando la pressione sanguigna.. Aferindo Pressão Arterial... Měřím krevní tlak... - 血圧を測定中・・・ - 혈압 측정증... - 检查血压中... - 檢查血壓中... %1 checked Blood Pressure: %2 %1 kontrollierte Blutdruck: %2 %1 controllata pressione sanguigna: %2 %1 проверил артериальное давление: %2 - %1 a mesuré la tension: %2 + %1 à vérifié la tension: %2 %1 sprawdził ciśnienie krwi: %2 %1 verificada la presión arterial: %2 %1 ellenőrizte a vérnyomást: %2 %1 zkontroloval krevní tlak: %2 %1 verificou pressão arterial: %2 - %1 が測った血圧は: %2 - %1 (이)가 혈압을 측정했습니다: %2 - 已由%1确认血压: %2 - 已由%1確認血壓: %2 You checked %1 - Vous examinez %1 + Vous diagnostiquez %1 Вы осмотрели раненого %1 Examinando a %1 Zbadałeś %1 @@ -1959,14 +1471,10 @@ Hai diagnosticato %1 Você verificou o paciente %1 Zkontroloval jsi %1 - 自分の血圧は %1 - 나의 혈압은 %1 이다 - 你已经检查 %1 - 你已經檢查 %1 You find a blood pressure of %2/%3 - Vous avez mesuré une tension de %2/%3 + Vous avez trouvé une tension de %2/%3 Артериальное давление %2/%3 La Presión Arterial es %2/%3 A vérnyomás %2/%3 @@ -1975,10 +1483,6 @@ Der Blutdruck liegt bei %2/%3 A Pressão Arterial é de %2/%3 Naměřil si krevní tlak u %2/%3 - 血圧は %2/%3 - 혈압이 %2/%3 이다 - 血压为%2/%3 - 血壓為%2/%3 You find a low blood pressure @@ -1991,10 +1495,6 @@ La pressione sanguigna è bassa Pressão Arterial baixa Naměřil si nízký krevní tlak - 血圧はかなり低い - 혈압이 매우 낮다 - 发现到低血压 - 發現到低血壓 You find a normal blood pressure @@ -2007,14 +1507,10 @@ La pressione sanguigna è normale Pressão Arterial normal Naměřil si normální krevní tlak - 血圧は通常 - 혈압이 정상이다 - 发现到正常血压 - 發現到正常血壓 You find a high blood pressure - Tension élevée + Tension haute Давление высокое La presión arterial es alta Wyczuwasz wysokie ciśnienie krwi @@ -2023,10 +1519,6 @@ La pressione sanguigna è alta Pressão Arterial Alta Naměřil si vysoký krevní tlak - 血圧はかなり高い - 혈압이 매우 높다 - 发现到高血压 - 發現到高血壓 You find no blood pressure @@ -2039,10 +1531,6 @@ La pressione sanguigna è assente Sem Pressão Arterial Nenaměřil si žádný krevní tlak - 血圧は測れなかった - 혈압이 잡히지 않는다 - 量不到血压 - 量不到血壓 You fail to find a blood pressure @@ -2055,74 +1543,54 @@ Manca strumento per misurare pressione sanguigna Você falhou em aferir a Pressão Arterial Nedokázal si změřit krevní tlak - 血圧を測るのに失敗 - 혈압을 잡을 수 없었다 - 检查血压的动作失败 - 檢查血壓的動作失敗 Low Niedrig Bassa Низкое - basse + Faible Niskie Baja Alacsony Nízký Baixa - 低い - 낮음 - - Normal Normal Normale Нормальное - normale + Normale Normalne Normal Normális Normální Normal - 通常 - 보통 - 正常 - 正常 High Hoch Alta Высокое - élevée + Haute Wysokie Alta Magas Vysoký Alta - 高い - 높음 - - No Blood Pressure Kein Blutdruck Nessuna Pressione Sanguigna Артериальное давление отсутствует - pas de tension + Aucune tension Brak ciśnienia krwi Sin presión arterial Nincs vérnyomás Žádný krevní tlak Sem pressão arterial - 血圧なし - 혈압 없음 - 无血压 - 無血壓 Pulse @@ -2135,14 +1603,10 @@ Polso Pulso Puls - 心拍数 - 맥박 - 脉搏 - 脈搏 Checking Heart Rate... - Vérification du pouls... + Vérification du rythme cardiaque... Проверка пульса... Comprobando ritmo cardíaco... Sprawdzanie tętna... @@ -2151,10 +1615,6 @@ Controllando il battito cardiaco... Aferindo Pulso... Kontroluji srdeční tep... - 心拍数を測定中・・・ - 맥박 확인중... - 检查心跳中... - 檢查心跳中... You checked %1 @@ -2167,26 +1627,18 @@ Hai diagnosticato %1 Você aferiu o paciente %1 Zkontroloval si %1 - 心拍数は %1 - 나의 맥박은 %1 이다 - 你已经检查 %1 - 你已經檢查 %1 %1 checked Heart Rate: %2 %1 kontrollierte Herzfrequenz: %2 %1 Controllata Frequenza Cardiaca: %2 %1 проверил пульс: %2 - %1 a vérifié le pouls de : %2 + %1 à vérifié le rythme cardiaque: %2 %1 sprawdził tętno: %2 %1 verificado el ritmo cardíaco: %2 %1 ellenőrizte a szívverés-számot: %2 %1 zkontroloval srdeční tep: %2 %1 verificou a frequência cardíaca: %2 - %1 が測った心拍数は: %2 - %1 (이)가 맥박을 측정했습니다: %2 - 已由%1确认心跳: %2 - 已由%1確認心跳: %2 None @@ -2196,65 +1648,49 @@ Keine Žádný Nada - aucun + Aucun Nincs Niente - なし - 없음 - - Weak Schwach Lento Слабый - lent + Faible Słabe Débil Gyenge Slabý Fraca - 弱い - 약함 - 微弱 - 微弱 Normal Normal Normale Нормальный - normal + Normal Normalne Normal Normális Normální Normal - 通常 - 보통 - 正常 - 正常 Strong Stark Veloce Сильный - rapide + Fort Silne Fuerte Erős Silný Forte - 強い - 강함 - 过快 - 過快 You find a Heart Rate of %2 - %2 battements par minute + Rythme cardiaque de %2 Пульс %2 уд./мин. El ritmo cardíaco es de %2 Wyczuwasz tętno o wartości %2 @@ -2263,14 +1699,10 @@ Il battito cardiaco è %2 A Freqüência Cardíaca é de %2 Nahmatal jsi srdeční tep u %2 - 心拍数は %2 - 맥박이 %2 이다 - 心跳为%2 - 心跳為%2 You find a weak Heart Rate - Poulslent + Rythme cardiaque faible Пульс слабый El ritmo cardíaco es débil Wyczuwasz słabe tętno @@ -2279,14 +1711,10 @@ Hai riscontrato un debole battito cardiaco Freqüência Cardíaca baixa Nahmatal si slabý srdeční puls - 自分の心拍数は低い - 약한 맥박이다 - 心跳微弱 - 心跳微弱 You find a strong Heart Rate - pouls rapide + Rythme cardiaque élevé Пульс учащенный El ritmo cardíaco está acelerado Wyczuwasz silne tętno @@ -2295,14 +1723,10 @@ Hai riscontrato un forte battito cardiaco Freqüência Cardíaca normal Nahmatal si silný srdeční puls - 自分の心拍数は強い - 강한 맥박이다 - 心跳过快 - 心跳過快 You find a normal Heart Rate - pouls normal + Rythme cardiaque normal Пульс в норме El ritmo cardíaco es bueno Wyczuwasz normalne tętno @@ -2311,14 +1735,10 @@ Hai riscontrato un normale battito cardiaco Freqüência Cardíaca alta Nahmatal si normální srdeční puls - 自分の心拍数は通常 - 보통 맥박이다 - 心跳正常 - 心跳正常 You find no Heart Rate - pas de pouls + Pas de rythme cardiaque Пульс не прощупывается No tiene ritmo cardíaco Wyczuwasz brak tętna @@ -2327,14 +1747,10 @@ Hai riscontrato una assenza di battito cardiaco Sem Freqüência Cardíaca Žádný puls - 心拍数を測れなかった - 맥박을 찾을 수가 없다 - 量不到心跳 - 量不到心跳 Response - Conscience + Etat de Conscience Реакция Respuesta Przytomność @@ -2343,14 +1759,10 @@ Risposta Reação Odezva - 反応を見る - 반응 - 反应 - 反應 You check response of patient - Vous évaluez l'état de conscience + Vous vérifiez la réponse du patient Вы проверяете реакцию раненого Compruebas si el paciente reacciona Sprawdzasz przytomność pacjenta @@ -2359,10 +1771,6 @@ Controlli la risposta del paziente Aferindo se o paciente tem reação Zkontroloval jsi reakci pacienta - 患者からの反応をみる - 대상의 반응 확인중 - 检查伤者的反应 - 檢查傷者的反應 %1 is responsive @@ -2375,10 +1783,6 @@ %1 e' cosciente %1 está respondendo %1 odpovídá - %1 は反応あり - %1 은 반응이있다 - %1 有反应 - %1 有反應 %1 is not responsive @@ -2391,10 +1795,6 @@ %1 e' incosciente %1 não está respondendo %1 neodpovídá - %1 の反応なし - %1 은 반응이없다 - %1 没有反应 - %1 沒有反應 You checked %1 @@ -2407,10 +1807,6 @@ Hai controllato %1 Você aferiu o paciente %1 Zkontroloval jsi %1 - %1 を見た - %1 을 확인함 - 你已经检查 %1 - 你已經檢查 %1 Patient %1<br/>is %2.<br/>%3.<br/>%4 @@ -2423,10 +1819,6 @@ A páciens, %1,<br/>%2.<br/>%3.<br/>%4 Pacient %1<br/>je %2.<br/>%3.<br/>%4 Paciente %1<br/>é %2.<br/>%3.<br/>%4 - 痛み %1<br/>は %2.<br/>%3.<br/>%4 - 환자 %1<br/>는 %2.<br/>%3.<br/>%4 - 伤者 %1<br/>is %2.<br/>%3.<br/>%4 - 傷者 %1<br/>is %2.<br/>%3.<br/>%4 alive @@ -2439,10 +1831,6 @@ élő naživu vivo - 生存 - 생존 - 活着 - 活著 dead @@ -2450,15 +1838,11 @@ мёртв muerto tot - décédé + mort martwy halott mrtev morto - 死亡 - 사망 - 死亡 - 死亡 He's lost some blood @@ -2471,10 +1855,6 @@ Valamennyi vért vesztett Ztratil trochu krve Ele perdeu um pouco de sangue - 彼は出血している - 적은 양의 피를 잃었다 - 他流失一些血液 - 他流失一些血液 He's lost a lot of blood @@ -2487,10 +1867,6 @@ Ztratil hodně krve Ele perdeu muito sangue Ha perso molto sangue - 彼は大量出血している - 많은 양의 피를 잃었다 - 他流失大量血液 - 他流失大量血液 He hasn't lost blood @@ -2503,10 +1879,6 @@ Nem vesztett vért Neztratil žádnou krev Ele não perdeu sangue - 彼は出血していない - 피를 잃지 않았다 - 他并没有失血 - 他並沒有失血 He is in pain @@ -2519,10 +1891,6 @@ Fájdalmai vannak Je v bolestech Ele está com dor - 彼には痛みがあるようだ - 통증이 있다 - 他感到疼痛 - 他感到疼痛 He is not in pain @@ -2535,14 +1903,10 @@ Nincsenek fájdalmai Nemá žádné bolesti Ele não está com dor - 彼には痛みがないようだ - 통증이 없다 - 他不会疼痛 - 他不會疼痛 Bandaged - Pansé + Bandé Повязка наложена Vendado Zabandażowano @@ -2551,14 +1915,10 @@ verbunden Enfaixado Obvázaný - 包帯 - 붕대 감음 - 绷带 - 繃帶 You bandage %1 (%2) - Vous pansez %1 (%2) + Vous bandez %1 (%2) Вы перевязали раненого %1 (%2) Aplicas vendaje a %1 en %2 Bandażujesz %1 (%2) @@ -2567,14 +1927,10 @@ Du verbindest %1 (%2) Você aplica bandagem no paciente %1 (%2) Obvazuješ %1 (%2) - %1 (%2) 包帯をつかった - %1 (%2) 붕대를 감았다 - 你正在对 %1 (%2) 包扎绷带中 - 你正在對 %1 (%2) 包紮繃帶中 %1 is bandaging you - %1 vous panse + %1 vous bande %1 перевязывает вас %1 te está vendando %1 bandażuje Ciebie @@ -2583,10 +1939,6 @@ %1 verbindet dich %1 está aplicando uma bandagem em você %1 tě obvazuje - %1 は自分に包帯を巻いている - %1 (이)가 나에게 붕대를 감고있다 - %1 正在对你包扎绷带中 - %1 正在對你包紮繃帶中 You start stitching injuries from %1 (%2) @@ -2599,10 +1951,6 @@ Stai suturando le ferite di %1 (%2) Você começa a suturar os ferimentos do %1 (%2) Zašíváš rány %1 (%2) - あなたは %1 (%2) の外傷へ縫合をはじめた - 나는 %1(%2) 상처로부터 봉합을 시작했다 - 你正开始对 %1 (%2) 缝合伤口中 - 你正開始對 %1 (%2) 縫合傷口中 Stitching @@ -2615,10 +1963,6 @@ Suturando Suturando Šití - 縫合 - 붕합중 - 缝合中 - 縫合中 You treat the airway of %1 @@ -2631,10 +1975,6 @@ Controlli le vie respiratorie di %1 Você entuba o %1 Ošetřuješ dýchací cesty %1 - %1 の気道を診断する - %1의 기도를 확보했다 - 你治疗 %1 的呼吸道 - 你治療 %1 的呼吸道 Airway @@ -2647,10 +1987,6 @@ Vie respiratorie Vias Aéreas Dýchací cesty - 気道 - 기도 - 呼吸道 - 呼吸道 %1 is treating your airway @@ -2663,10 +1999,6 @@ %1 ti sta trattando le vie respiratorie %1 está te entubando %1 ošetřuje tvoje dýchací cesty - %1 はあなたの気道を見ている - %1 (이)가 나의 기도를 확보중이다 - %1 正在治疗你的呼吸道 - %1 正在治療你的呼吸道 Drag @@ -2675,14 +2007,10 @@ Ciągnij Táhnout Тащить - Traîner + Trainer Húzás Arrastar Trascina - 引きずる - 끌다 - 拖拉 - 拖拉 Carry @@ -2695,10 +2023,6 @@ Cipelés Carregar Trasporta - 運ぶ - 업다 - 背起 - 背起 Release @@ -2711,10 +2035,6 @@ Elengedés Soltar Rrilascia - 離す - 내려놓기 - 放下 - 放下 Load Patient Into @@ -2727,10 +2047,6 @@ Sebesült berakása Carregar Paciente Em Carica paziente nel - 患者を載せる - 환자 싣기 - 将伤者放入 - 將傷者放入 Unload Patient @@ -2743,10 +2059,6 @@ Sebesült kihúzása Descarregar Paciente Scarica il paziente - 患者を降ろす - 환자 내리기 - 将伤者背出 - 將傷者背出 Unload patient @@ -2754,15 +2066,11 @@ Выгрузить пациента Patient ausladen Wyładuj pacjenta - Le patient débarque + Débarquer le patient Sebesült kihúzása Scarica il paziente Descarregar Paciente Vyložit pacienta - 患者を降ろす - 환자 내리기 - 将伤者背出 - 將傷者背出 Load patient @@ -2775,10 +2083,6 @@ Carica il paziente Carregar Paciente Em Naložit pacienta - 患者を載せる - 환자 싣기 - 将伤者放入 - 將傷者放入 Place body in bodybag @@ -2791,10 +2095,6 @@ Metti il corpo nella sacca per cadaveri Colocar corpo dentro do saco para cadáver Umístni tělo do pytle na mrtvoly - 死体袋に入れる - 시체 가방에 담기 - 将尸体放入尸袋 - 將屍體放入屍袋 Placing body in bodybag... @@ -2807,10 +2107,6 @@ Stai mettendo il corpo nella sacca... Colocando corpo dentro do saco para cadáver... Umístňuji tělo do pytle na mrtvoly... - 死体袋へ梱包中・・・ - 시체 가방에 담는중... - 将尸体放入尸袋中... - 將屍體放入屍袋中... %1 has bandaged patient @@ -2823,10 +2119,6 @@ %1 ha bendato il paziente %1 aplicou bandagem no paciente %1 již obvázal pacienta - %1 は包帯を巻いた - %1 (이)가 붕대를 감아줬다 - %1 已包扎伤者 - %1 已包紮傷者 %1 performed CPR @@ -2837,11 +2129,7 @@ %1 realizou RCP %1 провел сердечно-легочную реанимацию %1 realicó RCP - %1 à fait une RCP - %1 は心肺蘇生をした - %1 (이)가 심폐소생술을 실시했다 - %1 已执行心肺复苏术 - %1 已執行心肺復甦術 + %1 à fait une RPC %1 used %2 @@ -2854,10 +2142,6 @@ %1 ha usato %2 %1 usou %2 %1 použil %2 - %1 は %2 をつかった - %1 (이)가 %2 을 썼다 - %1 已使用 %2 - %1 已使用 %2 %1 has given an IV @@ -2865,15 +2149,11 @@ %1 ha puesto una IV %1 hat eine Infusion verabreicht %1 podał IV - %1 a plaçé une IV + %1 a administré une IV %1 infúziót adott %1 ha somministrato una EV %1 aplicou um intravenoso %1 již aplikoval IV - %1 は IV を与えた - %1 (이)가 IV를 실시했다 - %1 已经给予静脉注射液 - %1 已經給予靜脈注射液 %1 applied a tourniquet @@ -2881,15 +2161,11 @@ %1 наложил жгут %1 hat ein Tourniquet angelegt %1 założył stazę - %1 a plaçé un garrot + %1 a appliqué un garrot %1 felhelyezett egy érszorítót %1 ha applicato un laccio emostatico %1 aplicou um torniquete %1 použil škrtidlo - %1 は止血帯を巻いた - %1 (이)가 지혈대를 적용했다 - %1 已经绑上止血带 - %1 已經綁上止血帶 %1 used Personal Aid Kit @@ -2900,11 +2176,7 @@ %1 использовал аптечку %1 ha usato Kit Pronto Soccorso Personale %1 usó Kit de Primeros Auxilios - %1 a utilisé une trousse - %1 は応急処置キットをつかった - %1 (이)가 개인응급키트를 사용했다 - %1 已使用了个人急救包 - %1 已使用了個人急救包 + %1 à utilisé un PAK Heavily wounded @@ -2913,14 +2185,10 @@ Тяжелые ранения Gravemente ferito Gravemente herido - Gravement blessé + Lourdement blessé Erősen sérült Těžce raněn Gravemente ferido - 重傷 - 중상 - 重伤 - 重傷 Lightly wounded @@ -2933,10 +2201,6 @@ Enyhén sérült Lehce raněn Levemente ferido - 軽傷 - 경상 - 轻伤 - 輕傷 Very lightly wounded @@ -2949,10 +2213,6 @@ Nagyon enyhén sérült Velmi lehce raněn Muito levemente ferido - かなり浅い傷 - 매우 가벼운 부상 - 小伤 - 小傷 Head @@ -2965,10 +2225,6 @@ Fej Hlava Cabeça - 頭部 - 머리 - 头部 - 頭部 Torso @@ -2981,10 +2237,6 @@ Testtörzs Trup Torso - 胴体 - 몸통 - 身体 - 身體 Left Arm @@ -2993,14 +2245,10 @@ Левой руки Braccio sinistro Brazo izquierdo - Bras gauche + Bras gouche Bal kar Levá ruka Braço Esquerdo - 左腕 - 왼쪽 팔 - 左手 - 左手 Right Arm @@ -3013,10 +2261,6 @@ Jobb kar Pravá ruka Braço Direito - 右腕 - 오른쪽 팔 - 右手 - 右手 Left Leg @@ -3029,10 +2273,6 @@ Bal láb Levá noha Perna Esquerda - 左足 - 왼쪽 다리 - 左脚 - 左腳 Right Leg @@ -3045,10 +2285,6 @@ Jobb láb Pravá noha Perna Direita - 右足 - 오른쪽 다리 - 右脚 - 右腳 Heal fully bandaged hitpoints @@ -3058,12 +2294,8 @@ Curar hitpoints totalmente enfaixados Heal fully bandaged hitpoints Cura hitpoints completamente bendati - Soigner les plaies entièrement bandées + Soigner les plaies entièrement bandées. Heilt vollständig bandagierte Trefferpunkte - 包帯は体力を完全に回復する - 붕대를 감은후 체력을 회복함 - 完全医疗包扎的部位至痊愈 - 完全醫療包紮的部位至痊癒 Pain is only temporarily suppressed @@ -3072,14 +2304,10 @@ Bolest je potlačena pouze dočasně El dolor se suprime solo temporalmente Dor é suprimida somente temporáriamente - La douleur est temporairement calmée + La douleur est seulement supprimée temporairement A fájdalom csak ideiglenesen csökken Боль приглушается только временно Dolore è soppresso solo temporaneamente - 痛みは一時的な影響 - 고통은 일시적으로만 회복가능 - 疼痛只会暂时性压制 - 疼痛只會暫時性壓制 Pain Effect Type @@ -3092,10 +2320,6 @@ Fájdalom-effekt típusa Tipo do efeito de dor Typ bolesti - efekt - 痛みの種類 - 고통 효과 종류 - 疼痛效果类型 - 疼痛效果類型 Colour Flashing @@ -3108,10 +2332,6 @@ Színvillódzás Flash de cor Blikající barva - 色の点滅 - 색 반짝임 - 闪烁颜色 - 閃爍顏色 Chromatic Aberration @@ -3124,15 +2344,11 @@ Kromatikus aberráció Chromatická aberace Aberração Cromática - 色の収差 - 색수차 - 色差 - 色差 Style of menu (Medical) Styl menu medycznego - Style de menu (médical) + Style de menu (Médical) Menüstil (Medizin) Вид меню (медицина) Tipo de menú (Medico) @@ -3140,15 +2356,11 @@ Estilo do menu (Médico) Menü stílusa (Orvosi) Stile del menù (medico) - メニューの表示形式 (治療) - 메뉴의 스타일 (의료) - 选单样式 (医疗) - 選單樣式 (醫療) Select the type of menu you prefer; default 3d selections or radial. Wybierz rodzaj menu, który preferujesz: domyślne pozycje 3D lub radialne - Sélectionne le type de menu préféré; par défaut la sélection 3D ou radiale + Selctionne le type de menu préféré; par défaut la sélection 3D ou radiale Wähle den Menüstil: Standard 3D-Auswahl oder kreisförmig. Выберите тип меню: стандартный вариант (3D) или радиальный Selecciona el tipo de menú que prefieres: selecciones 3d por defecto o radial. @@ -3156,15 +2368,11 @@ Válaszd ki a neked megfelelő menüt: Alapértelmezett 3D válogatás, vagy kerek. Zvolte typ menu: základní 3D výběr nebo kruhový Seleziona il tipo di menù che preferisci: selezione (3D), radiale o disabilitata. - 好みに応じてメニューの表示形式を選んでください。標準では 3D 選択か円状です。 - 선호하는 종류의 메뉴를 고르세요; 기본 3d 선택형 혹은 다이얼형 - 选择你喜欢的选单样式; 预设为3D选项或放射状 - 選擇你喜歡的選單樣式; 預設為3D選項或放射狀 Selections (3d) Pozycje (3D) - Sélection (3D) + sélections (3D) 3D-Auswahl Стандартный (3D) Selecciones (3d) @@ -3172,15 +2380,11 @@ Választékok (3D) 3D výběr Selezione (3D) - 選択 (3d) - 선택 (3d) - 选择 (3D) - 選擇 (3D) Radial Radialne - Radial + Radiale Kreisförmig Радиальный Radial @@ -3188,74 +2392,54 @@ Kerek Kruhový Radiale - 円状 - 다이얼형 - 放射状 - 放射狀 Scrape Kratzer Scorticatura Ссадина - Abrasion + Eraflure Draśnięcie Arañazo Horzsolás Raspão Odřenina - 擦り傷 - 찰과상 - 擦伤 - 擦傷 Minor Scrape Kleiner Kratzer Minima Scorticatura Малая ссадина - Petite abrasion + Petite éraflure Pomniejsze draśnięcie Arañazo menor Kis horzsolás Raspão leve Malá odřenina - 小さな擦り傷 - 소형 찰과상 - 小擦伤 - 小擦傷 Medium Scrape Mittlerer Kratzer Media Scorticatura Средняя ссадина - Moyenne abrasion + Moyenne éraflure Średnie draśnięcie Arañazo medio Közepes horzsolás Raspão médio Středně velká odřenina - 中くらいの擦り傷 - 중형 찰과상 - 中擦伤 - 中擦傷 Large Scrape Großer Kratzer Alta Scorticatura Большая ссадина - Grande abrasion + Grande éraflure Duże draśnięcie Arañazo severo Nagy horzsolás Raspão grave Velká odřenina - 大きな擦り傷 - 대형 찰과상 - 大擦伤 - 大擦傷 Avulsion @@ -3268,10 +2452,6 @@ Leszakadás Avulsão Avulze - 剥離傷 - 열상 - 撕脱伤 - 撕脫傷 Minor Avulsion @@ -3284,10 +2464,6 @@ Kis leszakadás Avulsão leve Malá avulze - 小さな剥離傷 - 소형 열상 - 小撕脱伤 - 小撕脫傷 Medium Avulsion @@ -3300,10 +2476,6 @@ Közepes leszakadás Avulsão média Střední avulze - 中くらいの剥離傷 - 중형 열상 - 中撕脱伤 - 中撕脫傷 Large Avulsion @@ -3316,138 +2488,102 @@ Nagy leszakadás Avulsão grave Velká avulze - 大きな剥離傷 - 대형 열상 - 大撕脱伤 - 大撕脫傷 Bruise Prellung Contusione Ушиб - Contusion + Hématome Stłuczenie Contusión Zúzódás Contusão Modřina - 打ち傷 - 타박상 - 挫伤 - 挫傷 Minor Bruise Kleine Prellung Minima Contusione Малый ушиб - Petite contusion + Petit hématome Pomniejsze stłuczenie Contusión menor Kis zúzódás Contusão leve Malá modřina - 小さな打ち傷 - 소형 타박상 - 小挫伤 - 小挫傷 Medium Bruise Mittlere Prellung Media Contusione Средний ушиб - Moyenne contusion + Hématome moyen Średnie stłuczenie Contusión media Közepes zúzódás Contusão média Středně velká modřina - 中くらいの打ち傷 - 중형 타박상 - 中挫伤 - 中挫傷 Large Bruise Große Prellung Alta Contusione Большой ушиб - Grande contusion + Hématome important Duże stłuczenie Contusión severa Nagy zúzódás Contusão grave Velká modřina - 大きな打撲傷 - 대형 타박상 - 大挫伤 - 大挫傷 Crushed tissue Quetschverletzung Tessuto Schiacciato Компресионная травма - Écrasement + Tissu écrasé Zgniecienie tkanek miękkich Tejido triturado Zúzott szövet Tecido esmagado Zhmoždění měkkých tkání - 圧挫傷 - 좌상 - 撞伤 - 撞傷 Minor crushed tissue Kleine Quetschverletzung Minimo Tessuto Schiacciato Малая компрессионная травма - Petit écrasement + Tissu écrasé léger Pomniejsze zgniecienie tkanek miękkich Tejido triturado menor Kis zúzott szövet Tecido esmagado leve Malé zhmoždění měkkých tkání - 小さな圧挫傷 - 소형 좌상 - 小撞伤 - 小撞傷 Medium crushed tissue Mittlere Quetschverletzung Medio Tessuto Schiacciato Средняя компрессионная травма - Moyen écrasement + Tissu écrasé moyen Średnie zgniecienie tkanek miękkich Tejido triturado medio Közepes zúzott szövet Tecido esmagado médio Střední zhmoždění měkkých tkání - 中くらいの圧挫傷 - 중형 좌상 - 中撞伤 - 中撞傷 Large crushed tissue Große Quetschverletzung Alto Tessuto Schiacciato Большая компрессионная травма - Grand écrasement + Tissu écrasé large Duże zgniecienie tkanek miękkich Tejido triturado severo Nagy zúzött szövet Tecido esmagado grave Velké zhmoždění měkkých tkání - 大きな圧挫傷 - 대형 좌상 - 大撞伤 - 大撞傷 Cut @@ -3460,10 +2596,6 @@ Vágás Corte Řezná rána - 切り傷 - 절상 - 割伤 - 割傷 Small Cut @@ -3476,10 +2608,6 @@ Petite coupure Corte leve Malá řezná rána - 小さな切り傷 - 소형 절상 - 小割伤 - 小割傷 Medium Cut @@ -3492,10 +2620,6 @@ Moyenne coupure Corte médio Střední řezná rána - 中くらいの切り傷 - 중형 절상 - 中割伤 - 中割傷 Large Cut @@ -3505,13 +2629,9 @@ Duża rana cięta Corte severo Nagy vágás - Grande coupure + Large coupure Corte grave Velká řezná rána - 大きな切り傷 - 대형 절상 - 大割伤 - 大割傷 Tear @@ -3519,15 +2639,11 @@ Strappo Рваная рана Rozerwanie skóry - Lacération + Déchirure Desgarro Szakadás Ruptura Tržná rána - 裂傷 - 창상 - 撕裂伤 - 撕裂傷 Small Tear @@ -3535,15 +2651,11 @@ Piccolo Strappo Малая рваная рана Pomniejsze rozerwanie skóry - Petite lacération + Petite Déchirure Desgarro menor Kis szakadás Ruptura leve Malá tržná rána - 小さな裂傷 - 소형 창상 - 小撕裂伤 - 小撕裂傷 Medium Tear @@ -3553,13 +2665,9 @@ Średnie rozerwanie skóry Desgarro medio Közepes szakadás - Moyenne lacération + Moyenne déchirure Ruptura média Střední tržná rána - 中くらいの裂傷 - 중형 창상 - 中撕裂伤 - 中撕裂傷 Large Tear @@ -3569,13 +2677,9 @@ Duże rozerwanie skóry Desgarro severo Nagy szakadás - Grande lacération + Large déchirure Ruptura grave Velká tržná rána - 大きな裂傷 - 대형 창상 - 大撕裂伤 - 大撕裂傷 Velocity Wound @@ -3583,15 +2687,11 @@ Velocità Ferita Огнестрельная рана Rana postrzałowa - Plaie pénétrante + Blessure de vélocité Herida de bala Lőtt seb Ferimento por projétil de arma de fogo Střelné poranění - 銃創 - 총상 - 穿透伤 - 穿透傷 Small Velocity Wound @@ -3601,13 +2701,9 @@ Pomniejsza rana postrzałowa Herida de bala menor Kis lőtt seb - Petite plaie pénétrante + Petite blessure de vélocité Ferimento leve por projétil de arma de fogo Malé střelné poranění - 小さな銃創 - 소형 총상 - 小穿透伤 - 小穿透傷 Medium Velocity Wound @@ -3617,13 +2713,9 @@ Średnia rana postrzałowa Herida de bala media Közepes lőtt seb - Moyenne plaie pénétrante + Moyenne blessure de vélocité Ferimento médio por projétil de arma de fogo Střední střelné poranění - 中くらいの銃創 - 중형 총상 - 中穿透伤 - 中穿透傷 Large Velocity Wound @@ -3633,13 +2725,9 @@ Duża rana postrzałowa Herida de bala severa Nagy lőtt seb - Grande plaie pénétrante + Large blessure de vélocité Ferimento grave por projétil de arma de fogo Velké střelné poranění - 大きな銃創 - 대형 총상 - 大穿透伤 - 大穿透傷 Puncture Wound @@ -3647,15 +2735,11 @@ Puntura Ferita Колотая рана Rana kłuta - Perforation + Blessure de perforation Herida punzante Szúrt seb Ferimento por perfuração Bodná rána - 刺し傷 - 관통상 - 穿刺伤 - 穿刺傷 Minor Puncture Wound @@ -3665,13 +2749,9 @@ Pomniejsza rana kłuta Herida punzante menor Kis szúrt seb - Petite perforation + Légère blessure de perforation Ferimento leve por perfuração Malá bodná rána - 小さな刺し傷 - 소형 관통상 - 小穿刺伤 - 小穿刺傷 Medium Puncture Wound @@ -3681,13 +2761,9 @@ Średnia rana kłuta Herida punzante media Közepes szúrt seb - Moyenne perforation + Moyenne blessure de perforation Ferimento médio por perfuração Střední bodná rána - 中くらいの刺し傷 - 중형 관통상 - 中穿刺伤 - 中穿刺傷 Large Puncture Wound @@ -3697,13 +2773,9 @@ Duża rana kłuta Herida punzante severa Nagy szúrt seb - Grande perforation + Large blessure de perforation Ferimento grave por perfuração Velká bodná rána - 大きな刺し傷 - 대형 관통상 - 大穿刺伤 - 大穿刺傷 Broken Femur @@ -3716,10 +2788,6 @@ Törött combcsont Fêmur quebrado Zlomená stehenní kost - 大腿骨の骨折 - 대퇴골 골절 - 大腿骨骨折 - 大腿骨骨折 Treating... @@ -3732,10 +2800,6 @@ Tratando... Ošetřuji... Curando... - 治療中・・・ - 치료중... - 治疗中... - 治療中... Removing Tourniquet... @@ -3748,10 +2812,6 @@ Sundavám škrtidlo... Снятие жгута... Togliendo il laccio emostatico... - 止血帯を外している・・・ - 지혈대 제거중... - 移除军用止血带中... - 移除軍用止血帶中... ACE Medical @@ -3764,10 +2824,6 @@ ACE Médical ACE Orvosi Rendszer ACE Medical - ACE 医療 - ACE 의료 - ACE 医疗系统 - ACE 醫療系統 Medical Settings [ACE] @@ -3777,13 +2833,9 @@ Sanitätseinstellungen [ACE] Lékařské nastavení [ACE] Ajustes médicos [ACE] - Options médicales [ACE] + Option médicale [ACE] Orvosi beállítások [ACE] Impostazioni Mediche [ACE] - 医療設定 [ACE] - 의료 설정 [ACE] - 医疗设定 [ACE] - 醫療設定 [ACE] Medical Level @@ -3796,10 +2848,6 @@ Niveau de simulation médicale Orvosi szint Livello Medico - 医療レベル - 의료 수준 - 医疗等级 - 醫療等級 What is the medical simulation level? @@ -3809,13 +2857,9 @@ Wie hoch soll das medizinische Simulationslevel sein? Jaká je úroveň lékařské simulace? Qual o nível de simulação médica? - Quel niveau de simulation médicale choisissez-vous? + Quel niveau de simulation médicale choisissez vous? Milyen komplex legyen az orvosi szimuláció? Qual'è il livello di simulazione medica? - 治療の再現度は? - 의료 시뮬레이션의 수준 - 选择需要的医疗模拟等级 - 選擇需要的醫療模擬等級 Basic @@ -3828,10 +2872,6 @@ Basique Alap Basico - ベーシック - 기본 - 基本 - 基本 Advanced @@ -3841,13 +2881,9 @@ Erweitert Pokročilé Avançada - Avancé + Avancée Fejlett Avanzato - アドバンスド - 고급 - 进阶 - 進階 Medics setting @@ -3857,13 +2893,9 @@ Sanitätseinstellungen Úroveň zdravotníků Configuração médica - Règlage des infirmiers + Paramètre des infirmiers Orvosok beállítása Parametri Medici - 治療の設定 - 의료 설정 - 医护兵等级 - 醫護兵等級 What is the level of detail prefered for medics? @@ -3873,13 +2905,9 @@ ¿Cuál es el nivel de detalle preferido para los médicos? Jaká úroveň detailů je preferována pro zdravotníky? Qual o nível de detalhe preferido para os médicos? - Quel niveau de détail voulez-vous pour les infirmiers? + Quel niveau de détail voullez vous pour les infirmier? Mi a javasolt részletesség orvosok számára? Qual'è il livello di dettagli preferito per i medici? - >衛生兵への再現度をどのくらいに設定しますか? - 의무병의 시뮬레이션 정도? - 设定医护兵的预设医疗水平(医疗兵, 军医) - 設定醫護兵的預設醫療水平(醫療兵, 軍醫) Locations boost training @@ -3889,27 +2917,19 @@ Ubicación mejora entrenamiento. Miejsca zwiększają wyszkolenie Localização melhora treinamento - Le lieu améliore l'efficacité + Locations boost l'entraînement de médecin Места ускоренного обучения - 衛生兵としての能力を与える場所 - 교육 증가 지역 - 受所在位置影响提升医疗能力 - 受所在位置影響提升醫療能力 Boost medic rating in medical vehicles or near medical facilities [untrained becomes medic, medic becomes doctor] - Zlepšit zkušenosti zdravotníka v medickém vozidle nebo poblíž zdravotního zařízení [nezkušení se stane zdravotníkem, zdravotník se stane doktorem] + Zlepšit zkušenosti zdravotníka v medickém vozidle nebo poblíž zdravotního zařízení [nezkušení se stane zdravotníkem, zdravotník se stane doktorem] Aumenta il rating medico in veicoli medici o vicino strutture mediche [non addestrato diventa medico, medico diventa dottore] Steigert die medizinische Einstufung eines Soldaten in Sanitätsfarhzeugen oder in der Nähe von Sanitätseinrichtungen [untrainiert wird zu Sanitäter, Sanitäter zu Doktor] Mejora el entrenamiento médico dentro de vehículos médicos o cerca de instalaciones médicas (no entrenados se convierten en médicos, médicos se convierten en doctores) Zwiększa poziom wyszkolenia medyków wewnątrz pojazdów medycznych lub w pobliżu budynków medycznych [niedoświadczony zostaje medykiem, medyk zostaje doktorem] Aumenta a classificação do médico dentro de veículos médicos ou perto de instalações médicas [sem treinamento vira médico, médico vira doutor] - Améliore l'efficacité des soins dans les véhicules ou structures de soins [non formés deviennent médecins, médecins deviennent docteurs] + Boost le rang médical dans les véhicules ou bâtiments médicaux [non entraînés deviennent médecins, médecins deviennent docteurs] Улучшает медицинскую подготовку в мед. транспорте и около мед. строений [нетренированные становятся медиками, медики становятся врачами] - 医療車両や医療施設の近くは衛生兵としての能力を与える場所となり、衛生兵の訓練を受けていないのに衛生兵としてなる(未訓練は衛生兵に、衛生兵は医師に) - 의무병의 수준이 주변의 차량이나 의료시설에 따라 증가합니다. [비교육자가 의무병이되고, 의무병이 의사가 됩니다] - 当人员在医疗载具或是医护设施旁进行医疗时, 该员医疗能力将会有所提升 (未受训人员提升为医疗兵, 医疗兵提升为军医) - 當人員在醫療載具或是醫護設施旁進行醫療時, 該員醫療能力將會有所提升 (未受訓人員提升為醫療兵, 醫療兵提升為軍醫) Disable medics @@ -3922,10 +2942,6 @@ Désactiver les infirmiers Orvosok letiltása Disabilita medici - 衛生兵を無効化 - 의무병 비활성화 - 关闭医护兵 - 關閉醫護兵 Enable Litter @@ -3938,10 +2954,6 @@ Activer les détritus Szemét engedélyezése Abilita Barella - 医療廃棄物の表示を有効化 - 의료폐기물 활성화 - 启用医疗废弃物 - 啟用醫療廢棄物 Enable litter being created upon treatment @@ -3954,10 +2966,6 @@ Activer la création de détrimus au début des traitements Engedélyezi a szemét keletkezését ellátáskor Abilita la creazione della barella dopo trattamento - 治療を始めると、医療廃棄物の作成を有効化する - 의료폐기물이 치료중 주변에 생성되는것을 활성화 합니다 - 本功能启用后, 当每次医疗动作结束时, 地上会产生相应的医疗废弃物 - 本功能啟用後, 當每次醫療動作結束時, 地上會產生相應的醫療廢棄物 Life time of litter objects @@ -3970,10 +2978,6 @@ Durée d'affichage des détritus Szemétobjektumok élettartama Tempo di vita delle barelle - 医療廃棄物の作成限界数を設定 - 의료폐기물 시간제한 - 医疗废弃物存在时间 - 醫療廢棄物存在時間 How long should litter objects stay? In seconds. -1 is forever. @@ -3986,10 +2990,6 @@ Combien de temps doivent rester affiché les détritus? En secondes. -1 pour tout le temps Milyen sokáig legyenek jelen a szemétobjektumok (másodpercben)? A -1 végtelen időt jelent. Per quanto devono restare le barelle? In secondi. -1 è permanente - 医療廃棄物オブジェクトが表示されつづける時間を設定しますか?-1 は永遠です。 - 얼마동안 폐기물이 존재합니까? 초 단위. -1 은 영구적. - 定义医疗废弃物存在时间, 以秒为单位, -1为永远存在. - 定義醫療廢棄物存在時間, 以秒為單位, -1為永遠存在. Enable Screams @@ -4002,13 +3002,9 @@ Activer les hurlements Kiáltások engedélyezése Abilita Grida - 叫びを有効化 - 비명 활성화 - 启用尖叫 - 啟用尖叫 - Enable screaming by injured units + Enable screaming by injuried units Включить крики раненных бойцов Aktywuj wrzeszczenie z bólu przez ranne jednostki Activar gritos para unidades heridas @@ -4018,10 +3014,6 @@ Active les hurlements d'unités blessées Engedélyezi a sérült egységek kiáltásait Abilita Grida da parte delle unità ferite - 負傷したユニットが叫ぶように - 부상당한 인원이 소리지르는것을 활성화합니다 - 启用伤者的尖叫声 - 啟用傷者的尖叫聲 Player Damage @@ -4031,13 +3023,9 @@ Spielerschaden Poškození hráče Dano do jogador - Dégats du joueur + Dégats des joueurs Játékos sérülés Danno Giocatore - プレイヤーへの損傷 - 플레이어 부상 - 玩家伤害 - 玩家傷害 What is the damage a player can take before being killed? @@ -4047,13 +3035,9 @@ Wie viel Schaden kann ein Spieler erleiden, bevor er getötet wird? Jaké poškození může hráč dostat než bude zabit? Qal é o dano que um jogador pode sofrer antes de morrer? - Quels dégâts peut subir un joueur avant d'être tué + Quels dégats peut subir un joueur avant d'être tué Mennyi sérülést szenvedhet el egy játékos, mielőtt meghal? Quanto è il danno che un giocatore può sostenere prima di essere ucciso? - プレイヤーが死に始める前に損傷を受けるようにしますか? - 얼마정도의 부상을 플레이어가 죽기 전까지 버틸 수 있습니까? - 玩家死亡前所能承受的伤害程度 - 玩家死亡前所能承受的傷害程度 AI Damage @@ -4063,13 +3047,9 @@ KI-Schaden Poškození AI Dano da IA - Dégâts des IA + Dégats des IA AI sérülés Danno AI - AI への損傷 - 인공지능 부상 - AI伤害 - AI傷害 What is the damage an AI can take before being killed? @@ -4079,13 +3059,9 @@ Wie viel Schaden kann eine KI erleiden, bis sie getötet wird? Jaké poškození může AI dostat než bude zabito? Qual é o dano que uma IA pode sofrer antes de morrer? - Quels dégâts peut subir une IA avant d'être tuée + Quels dégats peut subir une IA avant d'être tuée Mennyi sérülést szenvedhet el egy AI, mielőtt meghal? Quanto è il danno che un'IA può sostenere prima di essere uccisa? - AI が死に始める前に損傷を受けるようにしますか? - 얼마정도의 부상을 인공지능이 죽기 전까지 버틸 수 있습니까? - AI 死亡前所能承受的伤害程度 - AI 死亡前所能承受的傷害程度 AI Unconsciousness @@ -4098,10 +3074,6 @@ Inconscience des IA AI eszméletlenség Incoscienza IA - AI の気絶 - 인공지능 기절 - AI无意识 - AI無意識 Allow AI to go unconscious @@ -4114,10 +3086,6 @@ Autoriser les IA à tomber inconscients Engedélyezi az AI eszméletének elvesztését Permetti alle IA di diventare incoscienti - AI が気絶をするように - 인공지능도 기절에 빠지게 합니다 - 允许AI进入无意识状态 - 允許AI進入無意識狀態 Remote Controlled AI @@ -4130,10 +3098,6 @@ Távvezérelt AI Зевса считать ботом IA Controllate in Remoto - 遠隔操作された AI - 인공지능 원격조종 - 遥控AI - 遙控AI Treat remote controlled units as AI not players? @@ -4146,10 +3110,6 @@ Távvezérelt egységek AI-ként, nem játékosként való kezelése? Обрабатывать дистанционно управляемых юнитов как ботов, а не как игроков? Considera le unità controllate in remoto come IA e non come giocatori? - 遠隔操作された AI は、非プレイヤーとして扱いますか? - 원격 조작하는 AI는 비 플레이어로 취급합니까? - 以医疗AI的方式医疗被遥控的单位 - 以醫療AI的方式醫療被遙控的單位 Prevent instant death @@ -4162,10 +3122,6 @@ Empêcher la mort instantanée Azonnali halál kiiktatása Previeni morte istantanea - 即死の防止 - 즉사 방지 - 防止当场死亡 - 防止當場死亡 Have a unit move to unconscious instead of death @@ -4178,10 +3134,6 @@ Forcer l'inconscience au lieu de la mort instantanée Egy egység kerüljön eszméletlen állapotba a halott helyett Imposta un'unità come incosciente invece di morta - ユニットの即死を防止するために、気絶へ移行させます - 인원의 즉사를 방지코자 즉사 대신 기절시킵니다 - 伤者最严重只会立即进入昏迷, 而非立即死亡 - 傷者最嚴重只會立即進入昏迷, 而非立即死亡 Bleeding coefficient @@ -4191,13 +3143,9 @@ Verblutungsmultiplikator Koeficient krvácení Coeficiente de sangramento - Coéfficient de saignement + Coefficient de saignement Vérzési koefficiens Coefficiente sanguinamento - 出血の係数 - 출혈 계수 - 流血系数 - 流血係數 Coefficient to modify the bleeding speed @@ -4207,13 +3155,9 @@ Multiplikator um die Verblutungsgeschwindigkeit zu verändern Koeficient rychlosti krvácení Coeficiente para modificar a velocidade do sangramento - Modifie le débit des saignements + Coefficient modifiant la vitesse de saignement Egy szorzó a vérzés sebességének szabályozására Coefficiente che modifica la velocità di sanguinamento - この係数では出血速度を変更できます - 출혈의 속도를 계수만큼 변경합니다 - 修改流血速度 - 修改流血速度 Pain coefficient @@ -4223,13 +3167,9 @@ Schmerzmultiplikator Koeficient bolesti Coeficiente de dor - Coéfficient de douleur + Coefficient de douleur Fájdalmi koefficiens Coefficiente dolore - 痛みの係数 - 고통 계수 - 疼痛系数 - 疼痛係數 Coefficient to modify the pain intensity @@ -4239,13 +3179,9 @@ Multiplikator um die Schmerzintensität zu verändern Koeficient intenzity bolesti Coeficiente para modificar a instensidade de dor - Modifie l'intensité de la douleur + Coefficient modifiant l'intensité de la douleur Egy szorzó a fájdalom erősségének szabályozására Coefficiente che modifica l'intensità del dolore - この係数では痛みの強さを変更できます - 고통의 정도를 계수만큼 변경합니다 - 修改疼痛强度的系数 - 修改疼痛強度的係數 Sync status @@ -4255,13 +3191,9 @@ Status synchronisieren Synchronizovat status Sincronizar estado - Synchronisation du status + Status de la synchronisation Szinkronizációs állapot Sincronizza stato - 同期状態 - 상태 동기화 - 同步状态 - 同步狀態 Keep unit status synced. Recommended on. @@ -4271,13 +3203,9 @@ Status der Einheit synchron halten. Sollte aktiviert bleiben. Udržuje status jednotky synchronizovaný. Doporučeno zapnout. Mater o estado da unidade sincronizado. Recomendado ativado. - Garder l'unité synchronisée. Activation recommandée. + Garder l'unité synchronisée, Recommandé sur oui. Egységállapotok szinkronizálása. Javasolt a bekapcsolása. Mantieni lo stato delle unità sincronizzato. Consigliato attivo. - ユニット状態の同期を続けます。有効化を推奨。 - 인원의 상태를 동기화합니다. 켜기를 권장합니다. - 保持单位状态同步, 建议启用! - 保持單位狀態同步, 建議啟用! Provides a medical system for both players and AI. @@ -4287,28 +3215,20 @@ Aktiviert ein Sanitätssystem für Spieler und KI. Poskytuje zdravotní systém pro hráče a AI. Proporciona o sistema médico para os jogadores e a IA. - Fourni un système médical pour les joueurs et les IA. + Fourni un système médical pour les joueurs tout comme pour les IA. Egy orvosi rendszert ad játékosok és AI-k számára. Fornisce un sistema medico sia per giocatori che IA. - プレイヤーと AI の両方へ医療システムを提供します。 - 의료 시스템을 플레이어 및 인공지능에게 제공합니다. - 医疗系统将同时对玩家与AI发生作用 - 醫療系統將同時對玩家與AI發生作用 Basic Medical Settings [ACE] Standard Sanitätseinstellungen [ACE] Podstawowe ustawienia medyczne Ajustes médicos básicos [ACE] - Paramètres des soins basiques [ACE] + Réglages du système médical basic [ACE] Impostazioni Mediche Di Base [ACE] Základní zdravotnické nastavení [ACE] Ajustes médicos básicos [ACE] Настройки базовой медицины [ACE] - ベーシック医療設定 [ACE] - 기본 의료 설정 [ACE] - 基本医疗设定 [ACE] - 基本醫療設定 [ACE] Advanced Medical Settings [ACE] @@ -4321,10 +3241,6 @@ Paramètres des soins avancés Fejlett orvosi beállítások [ACE] Impostazioni Mediche Avanzate [ACE] - アドバンスド医療設定 [ACE] - 고급 의료 설정 [ACE] - 进阶医疗设定 [ACE] - 進階醫療設定 [ACE] Enabled for @@ -4337,10 +3253,6 @@ Activer pour Engedélyezve Abilitato per - 次を有効化 - 활성 - 被启用给 - 被啟用給 Select what units the advanced medical system will be enabled for @@ -4350,13 +3262,9 @@ Wähle aus, welche Einheiten unter das erweiterte Sanitätssystem fallen Vyberte, pro jaké jednotky bude pokročilý zdravotní systém povolen Selecione quais unidades o sistema médico avançado será habilitado - Sélectionne pour quelles unités les soins avancés seront activés + Sélectionne pour quelle unité le système de soin avancé est activé Kiválasztható, mely egységek számára legyen engedélyezve a fejlett orvosi rendszer Seleziona per quali unità verrà abilitato i sistema medico avanzato - 選択されたユニットが、アドバンスド医療が使えるようになります - 어느 인원에게 고급 의료 시스템을 적용시킬지 선택하십시요. - 选择进阶医疗系统影响的对象 - 選擇進階醫療系統影響的對象 Players only @@ -4366,13 +3274,9 @@ Nur Spieler Pouze hráči Somente jogadores - Joueurs uniquement + Joueur uniquement Csak játékosok Solo giocatori - プレイヤーのみ - 플레이어만 - 只限玩家 - 只限玩家 Players and AI @@ -4382,13 +3286,9 @@ Spieler und KI Hráči a AI Jogadores e IA - Joueurs et IA + Joueur et IA Játékosok és AI Giocatori ed IA - プレイヤーと AI - 플레이어 및 인공지능 - 玩家与AI - 玩家與AI Enable Advanced wounds @@ -4398,13 +3298,9 @@ Aktiviere erweiterte Wunden Povolit pokročilé zranění Ativar ferimentos avançados - Activer les plaies compliquées + Activer les blessures avancées Komplex sebek engedélyezése Abilita ferite Avanzate - アドバンスドな傷を有効化 - 고급 부상 활성화 - 启用进阶伤口系统 - 啟用進階傷口系統 Allow reopening of bandaged wounds? @@ -4414,13 +3310,9 @@ Erlaube das Öffnen von bandagierten Wunden? Umožnit znovuotevření zavázané rány? Permitr reabertura de ferimentos enfaixados? - Les plaies peuvent se rouvrir + Permettre la réouverture des bandages Visszanyílhatnak a bekötözött sebek? Permetti la riapertura di ferite bendate? - 包帯で巻かれた傷を再び開くようにしますか? - 붕대가 풀리는것을 활성화합니까? - 启用进阶伤口系统会使已被包扎的伤口有机率裂开 - 啟用進階傷口系統會使已被包紮的傷口有機率裂開 Vehicle Crashes @@ -4433,10 +3325,6 @@ Accident en véhicule Járműbalesetek Schianto Veicoli - 車両の衝突 - 차량 사고 - 载具碰撞 - 載具碰撞 Do units take damage from a vehicle crash? @@ -4449,25 +3337,17 @@ Les unités subissent des dégats lors d'accident Sérülnek-e az egységek autós ütközés során? Le unità sostengono danni da incidenti con veicoli? - ユニットは車両の衝突による損傷を受けるようにしますか? - 차량 사고시 인원들이 부상을 입습니까? - 设定人员是否会因为载具冲撞别的物件而产生伤害? - 設定人員是否會因為載具衝撞別的物件而產生傷害? Allow Epinephrine Erlaube Epiniphrin Permitir Epinefrina Ograniczenia adrenaliny - Activer l'épinéphrine + Autoriser l'adrénaline Permette epinefrina Povolit adrenalin Permitir Epinefrina Разрешить Адреналин - アドレナリンの許可 - 에피네프린 활성화 - 允许使用肾上腺素 - 允許使用腎上腺素 Who can use Epinephrine for full heal? (Basic medical only) @@ -4479,10 +3359,6 @@ Kdo může použít adrenalin k úplnému vyléčení? (Pouze základní zdravotní systém) Quem pode usar Epinefrina para cura completa? (Somente sistema médico básico) Кому разрешено использовать адреналин для полного излечения? (Только для базовой медицины) - 完全に回復できるよう誰しもがアドレナリンを使えるようにしますか?(ベーシック医療のみ) - 완전한 체력회복을 위해 어느 인원이 에피네프린을 쓸 수 있습니까? (기본 의료 전용) - 谁可以使用肾上腺素完整医治? (仅适用于基本医疗) - 誰可以使用腎上腺素完整醫治? (僅適用於基本醫療) Allow PAK @@ -4492,13 +3368,9 @@ Erlaube Erste-Hilfe-Set Povolit osobní lékárničky (PAK) Permitir Kit de Primeiros Socorros - Activer la trousse sanitaire + Permettre le kit de premier secours Elsősegélycsomag engedélyezése Consenti Kit di Pronto Soccorso - 応急処置キットの許可 - 개인응급키트 활성화 - 允许使用个人急救包 - 允許使用個人急救包 Who can use the PAK for full heal? @@ -4508,13 +3380,9 @@ Wer kann das Erste-Hilfe-Set für eine Endheilung verwenden? Kdo může použít osobní lékárničku pro plné vyléčení? Quem pode usar o KPS para cura completa? - Qui peut utilier la trousse sanitaire pour des soins complets? + Qui peut utilier les kit de premier secours pour soigner Ki használhatja az elsősegélycsomagot teljes gyógyításra? Chi può usare il KPS per cura completa? - 完全に回復できるよう誰しもが応急処置キットを使えるようにしますか? - 완전한 체력회복을 위해 어느 인원이 개인응급키트을 쓸 수 있습니까? (기본 의료 전용) - 谁能够使用个人急救包来达到完整医疗? - 誰能夠使用個人急救包來達到完整醫療? Anyone @@ -4524,13 +3392,9 @@ Jeder Kdokoliv Qualquer um - Tous + Tout le monde Akárki Chiunque - だれでも - 모두 - 任何人 - 任何人 Medics only @@ -4540,13 +3404,9 @@ Nur Sanitäter Pouze zdravotník Somente médicos - Infirmiers uniquement + Infirmier uniquement Csak orvosok Solo medici - 衛生兵のみ - 의무병만 - 只限医疗兵 - 只限醫療兵 Doctors only @@ -4556,13 +3416,9 @@ Nur Ärzte Pouze doktor Somente doutores - Médecins uniquement + Médecin uniquement Csak doktorok Solo dottori - 医師のみ - 의사만 - 只限军医 - 只限軍醫 Remove PAK on use @@ -4572,13 +3428,9 @@ Entf. Erste-Hilfe-Set bei Verwendung Odebrat osobní lékárničku po použití Remover o KPS depois do uso - Utilisation unique de la trousse sanitaire + Enlever le KPS à l'utilisation Elsősegélycsomag eltávolítása használatkor Rimuovi Kit Pronto Soccorso dopo l'uso - 応急処置キットの削除 - 개인응급키트 사용후 사라짐 - 在使用后删除个人急救包 - 在使用後刪除個人急救包 Should PAK be removed on usage? @@ -4588,43 +3440,31 @@ Sollen Erste-Hilfe-Sets bei Verwendung entfernt werden? Má se osobní lékárnička odstranit po použití? Deve o KPS ser removido depois do uso? - La trousse sanitaire doit être consommée à l'utilisation? + Le Kit de Premier Secours doit il être enlevé à l'utilisation? Eltávolítódjon az elsősegélycsomag használatkor? Il Kit Pronto Soccorso dev'essere rimosso dopo l'utilizzo? - 応急処置キットを使うと削除しますか? - 개인응급키트를 사용하고 나서 제거합니까? - 要在使用后删除个人急救包吗? - 要在使用後刪除個人急救包嗎? Locations Epinephrine Orte für Epiniphrin Ubicaciones epinefrina Ograniczenia adrenaliny - Utilisation de l'épinéphrine + Position des adrénalines Ubicazione epinefrina Oblast k použití adrenalinu Localizações de Epinefrina Место использования адреналина - アドレナリンをつかう場所 - 에피네프린 사용 장소 - 肾上腺素使用地点 - 腎上腺素使用地點 Where can the Epinephrine be used? (Basic Medical) Wo kann Epiniphrin verwendet werden? (Standard Sanitätseinstellungen) Configura donde puede usarse Epinefrina (Solo sistema médico básico) Gdzie można korzystać z adrenaliny? (Podstawowy system medyczny) - Où peut être utilisé l'épinéphrine ? (Médical basique) + Où peuvent être utilisées les adrénalines ? (Médical basique) Dove si può usare l'epinefrina? (Sistema medico di base) Kde může být použit adrenalin? (Pouze základní zdravotní systém) Onde pode-se usar a Epinefrina? (Somente sistema médico básico) Где может использоваться адреналин? (Базовая медицина) - どこでもアドレナリンをつかえるようにしますか?(ベーシック医療のみ) - 어디에서 에피네프린을 사용할 수 있습니까? (기본 의료) - 在哪里可以使用肾上腺素? (基本医疗) - 在哪裡可以使用腎上腺素? (基本醫療) Locations PAK @@ -4634,13 +3474,9 @@ Orte für Erste-Hilfe-Set Oblast k použití PAK Localizações do KPS - Lieu d'utilisation da trousse sanitaire + Lieu d'utilisation du KPS Elsősegélycsomag helyek Locazioni Kit Pronto Soccorso - 応急処置キットをつかう場所 - 개인응급키트 사용 장소 - 个人急救包使用地点 - 個人急救包使用地點 Where can the PAK be used? @@ -4650,45 +3486,33 @@ Wo kann das Erste-Hilfe-Set verwendet werden? Kde může být použita osobní lékárnička (PAK)? Onde o kit de primeiros socorros pode ser utilizado? - Où la trousse sanitaire peut être utilisée ? + Où le Kit de Premier Secour peut être utilisé Hol lehet az elsősegélycsomagot használni? Dove può essere usato il Kit Pronto Soccorso? - どこでも応急処置キットをつかえるようにしますか? - 어디에서 개인응급키트를 사용할 수 있습니까? - 在哪里可以使用个人急救包? - 在哪裡可以使用個人急救包? Condition PAK Bedingungen für d. Erste-Hilfe-Set Podmínky pro použití osobní lékárničky Condición EPA - Condition d'utilisation de la trousse sanitaire + Condition d'utilisation du KPS Warunek apteczek Elsősegélycsomag állapot Condição do KPS Условие использования аптечки Condizioni Kit Pronto Soccorso - 応急処置キットの状態 - 개인응급키트 상태 - 个人急救包使用条件 - 個人急救包使用條件 When can the PAK be used? Wann kann das Erste-Hilfe-Set verwendet werden? Kdy může být použita osobní lékárnička? ¿Cuando se puede utilizar el Equipo de primeros auxilios? - Quand peut être utilisé la trousse sanitaire? + Quand peut être utilisé le Kit de Premier Secours Po spełnieniu jakich warunków apteczka osobista może zostać zastosowana na pacjencie? Mikor lehet az elsősegélycsomagot használni? Onde o kit de primeiros socorros pode ser utilizado? Когда может использоваться аптечка? Quando può essere usato il Kit Pronto Soccorso? - どこでも応急処置キットをつかえるようにしますか? - 언제 개인응급키트를 사용할 수 있습니까? - 何时可以使用个人急救包? - 何時可以使用個人急救包? Anywhere @@ -4698,13 +3522,9 @@ Überall Kdekoliv Qualquer lugar - Partout + PArtout Akárhol Ovunque - どこでも - 어디서나 - 任何地方 - 任何地方 Medical vehicles @@ -4714,13 +3534,9 @@ Sanitätsfahrzeuge Zdravotnická vozidla Veículos médcos - Dans les véhicules sanitaires + Dans les véhicules médicals Orvosi járművek Veicoli medici - 医療車両のみ - 의료차량 - 医疗载具 - 醫療載具 Medical facility @@ -4730,13 +3546,9 @@ Medizinische Einrichtungen Zdravotnické zařízení Instalação médica - Dans les structures sanitaires + Dans les installations médicales Orvosi létesítmény Strutture mediche - 医療施設でのみ - 의료시설 - 医疗设施 - 醫療設施 Vehicles & facility @@ -4746,13 +3558,9 @@ Fahrzeuge & Einrichtungen Vozidla a zařízení Veículos e instalações - Dans les véhicules et les structures sanitaires + Dans les véhicules et les installations médicals Járművek & létesítmény Veicoli e Strutture - 車両 & 施設 - 차량 및 시설 - 医疗载具 & 医疗设施 - 醫療載具 & 醫療設施 Allow Surgical Kit (Adv) @@ -4762,13 +3570,9 @@ Erlaube Operationskasten Povolit chirurgickou soupravu (Pokr.) Permite kit cirúrgico (avançado) - Permettre les trousses chirurgicales (Avancé) + Permettre les kit de chirurgie (Avancé) Sebészkészlet (Fejlett) engedélyezése Permetti Kit Chirurgico (Avanzato) - 縫合キットの許可 (アド) - 봉합키트 활성화 (고급) - 允许使用手术包 (进阶伤口) - 允許使用手術包 (進階傷口) Who can use the Surgical Kit? @@ -4778,13 +3582,9 @@ Wer kann den Operationskasten verwenden? Kdo může použít chirurgickou soupravu? Quem pode usar o kit cirúrgico? - Qui peut utiliser les trousses chirurgicales? + Qui peut utiliser les kit de chirurgie Ki használhatja a sebészkészletet? Chi può usare il Kit Chirurgico? - だれでも縫合キットをつかえるようにしますか? - 어느 인원이 봉합키트를 사용할 수 있습니까? - 谁能够使用手术包? - 誰能夠使用手術包? Remove Surgical Kit (Adv) @@ -4794,13 +3594,9 @@ Entferne Operationskasten (erweitert) Odebrat chirurgickou soupravu (Pokr.) Remover kit cirúrgico (avançado) - Consommer les trousses chirurgicales (Av.) + Supprimer les kit de chirurgie (Avancé) Sebészkészlet (Fejlett) eltávolítása Rimuovi Kit Chirurgico (Avanzato) - 縫合キットを削除 (アド) - 봉합키트 제거 (고급) - 在使用后删除手术包 (进阶伤口) - 在使用後刪除手術包 (進階傷口) Should Surgical kit be removed on usage? @@ -4810,13 +3606,9 @@ Entferne Operationskästen bei Verwendung? Odebrat chirurgickou soupravu po použití? Deve o kit cirúrgico ser removido após o uso? - La trousse chirurgicale doit être consommée à l'utilisation? + Le kit de chirurgie doit il être supprimé à l'utilisation Eltávolítódjon a sebészkészlet használatkor? Il Kit Chirurgico dev'essere rimosso dopo l'uso? - 縫合キットをつかった後に削除しますか? - 봉합키트를 사용하고 나서 제거합니까? - 手术包会在使用后被删除吗? - 手術包會在使用後被刪除嗎? Locations Surgical Kit (Adv) @@ -4826,13 +3618,9 @@ Orte für Operationskästen (erweitert) Lokace chirurgické soupravy (Pokr.) Localizações do kit cirúrgico (avançado) - Lieu d'utilisation des trousses chirurgicales + Lieu d'utilisation du kit de chirurgie Sebészkészlet (Fejlett) helyei Località Kit Chirurgico (Avanzato) - 縫合キットをつかう場所 (アド) - 봉합키트 사용 장소 (고급) - 手术包使用地点 (进阶伤口) - 手術包使用地點 (進階傷口) Where can the Surgical Kit be used? @@ -4842,45 +3630,33 @@ Wo kann der Operationskasten verwendet werden? Kde může být použita chirurgická souprava? Onde o kit cirúrgico pode ser utilizado? - Où peut être utilisé les trousses chirurgicales? + Où peut être utilisé les kit de chirurgie Hol lehet a sebészkészletet használni? Dove può essere usato il Kit Chirurgico? - どこでも縫合キットをつかえるようにしますか? - 어디에서 봉합키트를 사용할 수 있게 합니까? - 定义手术包可被使用的地方? - 定義手術包可被使用的地方? Condition Surgical Kit (Adv) Beding. für d. Operationskasten (erw.) Podmínka chirurgické soupravy (Pokr.) Condición de equipo quirúrgico (Av) - Conditions d'utilisation de la trousse chirurgicale (Av.) + Conditions d'utilisation du kit de chirurgie Warunek zestawu chirurgicznego Sebészkészlet állapot Condição do Kit Cirúrgico (Avançado) Условие использования хирургического набора (усл.) Condizioni Kit Chirurgico (Avanzato) - 縫合キットの状態 (アド) - 봉합키트 상태 (고급) - 使用手术包的条件 (进阶伤口) - 使用手術包的條件 (進階傷口) When can the Surgical Kit be used? Wann kann der Operationskasten verwendet werden? Kde může být použita chirurgická souprava? ¿Cuando se puede utilizar el equipo quirúrgico? - Quand peut être utilisé la trousse chirurgicale + Quand peut être utilisé les kit de chirurgie Po spełnieniu jakich warunków zestaw chirurgiczny może zostać zastosowany na pacjencie? Mikor lehet a sebészkészletet használni? Onde o kit cirúrgico pode ser utilizado? Когда может использоваться хирургический набор? Quando può essere usato il Kit Chirurgico? - いつでも縫合キットをつかえるようにしますか? - 언제 봉합키트를 사용할 수 있습니까? - 何时可以使用手术工具包? - 何時可以使用手術工具包? Heal hitpoints @@ -4891,11 +3667,7 @@ Curar hitpoints Léčit hitponty Cura Hitpoints - Soigner les blessures - ヒットポイントの回復 - 체력 회복 - 完整治疗 - 完整治療 + Soigner les dommages Heal fully bandaged hitpoints @@ -4907,10 +3679,6 @@ Heal fully bandaged hitpoints Cura Hitpoints completamente bendati Soigner les plaies entièrement bandées. - 包帯によりヒットポイントを完全に回復する - 붕대를 감아서 체력을 회복 - 完全医疗包扎的部位至痊愈 - 完全醫療包紮的部位至痊癒 Pain suppression @@ -4919,14 +3687,10 @@ Potlačení bolesti Supresión del dolor Supressão de dor - Traitement de la douleur + Suppression de la douleur Fájdalomcsillapítás Приглушение боли Soppressione dolore - 痛みの継続 - 고통 억제 - 疼痛抑制 - 疼痛抑制 Pain is only temporarily suppressed, not removed @@ -4935,14 +3699,10 @@ Bolest je potlačena, ale jen dočastně El dolor se suprime solo temporalmente, no se elimina. Dor é somente temporáriamente suprimida, não removida - La douleur est seulement temporairement calmée + La douleur est temporairement supprimée, pas enlevée A fájdalom csak ideiglenesen csökken, nem távolítódik el Боль приглушается только временно Dolore è solo temporaneamente soppresso, non rimosso - 痛みを一時的に継続させ、取り除かない - 고통은 제거가 아닌 일시적으로 억제만 가능합니다. - 疼痛只会被暂时抑制, 而不能完全消除 - 疼痛只會被暫時抑制, 而不能完全消除 Configure the treatment settings from ACE Basic Medical @@ -4953,10 +3713,6 @@ Configura le impostazioni trattamenti per ACE Medical di base Configura as opções de tratamento do sistema médico básico do ACE Настройка лечения в базовой медицинской системе ACE - ACE ベーシック医療による設定で、治療を設定する - ACE 기본 의료에 대한 치료 설정 수정 - 设定ACE基本医疗的规则 - 設定ACE基本醫療的規則 Configure the treatment settings from ACE Advanced Medical @@ -4966,13 +3722,9 @@ Behandlungseinstellungen vom ACE-Medizin konfigurieren Konfigurace nastavení léčby ze zdravotnické systému ACE Configure as opções de tratamento do ACE Médico - Configure les réglages de traitement dans dans ACE médical avancé + Configure les paramètres de traitement du système de soin ACE Kezelési lehetőségek konfigurálása az ACE Orvosi rendszerből Configura le impostazioni trattamenti per ACE Medical - ACE アドバンスド医療による設定で、治療を設定する - ACE 고급 의료에 대한 치료 설정 수정 - 设定ACE进阶医疗的规则 - 設定ACE進階醫療的規則 Revive Settings [ACE] @@ -4985,10 +3737,6 @@ Paramètre du revive [ACE] Újraélesztés beállításai [ACE] Impostazioni Revive [ACE] - リバイブ設定 [ACE] - 소생 설정 [ACE] - 复苏设定 [ACE] - 復甦設定 [ACE] Enable Revive @@ -5001,10 +3749,6 @@ Activer le revive Újraélesztés engedélyezése Abilita Revive - リバイブを有効化 - 소생 활성화 - 启用复苏 - 啟用復甦 Enable a basic revive system @@ -5014,13 +3758,9 @@ Aktiviere Standard-Wiederbelebungssystem Povolit základní systém oživení Habilitar um sistema básico de reavivamento - Active un système de revive basique + Active un sytème de revive basique Egy alap újraélesztési rendszer engedélyezése Abilita un sistema revive basico - ベーシックなリバイブを有効化 - 기본 소생 시스템 활성화 - 启用基本复苏系统 - 啟用基本復甦系統 Max Revive time @@ -5030,13 +3770,9 @@ Maximale Wiederbelebungszeit Maximální čas pro oživení Tempo máximo de reavivamento - Délai maximum pour le revive + Temps maximum pour le revive Maximum újraélesztési idő Tempo massimo Revive - 最大リバイブ時間 - 최대 소생 시간 - 最大复苏时间 - 最大復甦時間 Max amount of seconds a unit can spend in revive state @@ -5046,13 +3782,9 @@ Maximale Zeitspanne in Sekunden die eine Einheit im Wiederbelebungszustand verbringen kann Maximální doba v agónii v sekundách Quantidade máxima de segundos que uma unidade pode gastar em um estado de reavivamento - Délai d'attente maximum pour un revive + Nombre de seconde maximum qu'une unité peut être en attente d'un revive Maximum másodperc, amit egy egység újraélesztési állapotban tölthet Numero massimo di secondi che un'unità può spendere in stato revive - ユニットがリバイブ状態になっている最大時間を設定できます - 소생상태에서 인원이 버틸 수 있는 최대 시간을 초 단위로 정합니다 - 人员在等待复苏状态下能够等待的最大时间(秒) - 人員在等待復甦狀態下能夠等待的最大時間(秒) Max Revive lives @@ -5065,10 +3797,6 @@ Nombre maximum de revive Maximum újraélesztési lehetőségek Numero massimo Revives - 最大リバイブ数 - 최대 소생 횟수 - 最大被救活次数 - 最大被救活次數 Max amount of lives a unit. 0 or -1 is disabled. @@ -5078,13 +3806,9 @@ Anzahl der Leben einer Einheit. 0 oder -1 bedeutet deaktiviert. Maximální počet životu pro jednotku. 0 nebo -1 je zakázáno. Quantidade máxima de vidas por unidade. 0 ou -1 é desativado. - Nombre de vie maximum d'une unité. 0 ou -1 désactive + Nombre de vie maximale d'une unité. 0 ou -1 désactive Egy egység maximum "életei". 0 vagy -1 letiltja. Numero massimo di vite di un'unità. 0 o -1 per disabilitare. - ユニットの最大リバイブ数を設定できます。0 または -1 は無効化になります - 소생 가능한 횟수입니다. 0 혹은 -1 로 비활성화 합니다 - 一个人员最大可被救活次数, 0或-1为关闭 (无限救活). - 一個人員最大可被救活次數, 0或-1為關閉 (無限救活). Provides a medical system for both players and AI. @@ -5094,13 +3818,9 @@ Aktiviert das Sanitätssystem für Spieler und KI. Poskytuje zdravotní systém pro hráče a AI. Proporciona um sistema médico para jogadores e IA. - Fourni un sytème médical pour les joueurs et les IA. + Fourni un sytème médical pour les joueurs et les IAs Egy orvosi rendszert ad játékosok és AI-k számára. Fornisce un sistema medico sia per giocatori che IA - プレイヤーと AI の両方へ医療システムを提供します。 - 플레이어와 인공지능 모두에게 의료 시스템을 지원합니다. - 医疗系统将同时作用在玩家与AI - 醫療系統將同時作用在玩家與AI Set Medic Class [ACE] @@ -5110,13 +3830,9 @@ Setze Sanitäterklassen [ACE] Určit třídu medika [ACE] Definir classe médica [ACE] - Définir classe médicale [ACE] + Définir comme unité médicale [ACE] Orvos beállítása [ACE] Imposta Classe Medico [ACE] - 衛生兵クラスとして設定 [ACE] - 의무병 보직 설정 [ACE] - 设定医疗兵单位 [ACE] - 設定醫療兵單位 [ACE] List @@ -5129,10 +3845,6 @@ Liste Lista Lista - 一覧 - 목록 - 列表 - 列表 List of unit names that will be classified as medic, separated by commas. @@ -5142,13 +3854,9 @@ Aufzählung von Einheiten, die als Sanitäter gelten. Werden durch Kommata getrennt. Seznam osob které budou klasifikovány jako zdravotník, oddělené čárkami. Lista dos nomes das unidades que se classificam como médicos, separados por vírgulas. - Liste d'unité qui seront qualifiés comme infirmier, séparation par virgule. + Liste d'unité qui seront listées comme infirmier, séparation par virgule Azon egységek nevei, melyek orvosként vannak meghatározva, vesszővel elválasztva. Lista di nomi unità che verranno classificati come medici, separati da virgole. - 衛生兵として設定されるユニット名を一覧で指定でき、コンマで区切りを付けられます。 - 보직 이름 목록으로 의무병이 구분됩니다, 쉼표로 구분. - 列出的单位名字将被指派为医疗兵, 记得用逗号隔开! - 列出的單位名字將被指派為醫療兵, 記得用逗號隔開! Is Medic @@ -5161,10 +3869,6 @@ Est infirmier Orvos-e E' Medico - 衛生兵として - 의무병 - 是医疗兵 - 是醫療兵 This module allows you to assign the medic class to selected units. @@ -5177,10 +3881,6 @@ Этот модуль позволяет назначить класс медика выбранным юнитам. Este módulo permite asignar la clase médico a las unidades seleccionadas. Questo modulo ti permette di assegnare la classe Medico alle unità selezionate. - 選択されたユニットを衛生兵として指定します。 - 이 모듈은 선택한 보직이 의무병을 할 수 있게 해줍니다. - 本模块可让被同步的单位成为医疗兵. - 本模塊可讓被同步的單位成為醫療兵. None @@ -5193,10 +3893,6 @@ Aucun Nincs Nessuno - なし - 없음 - - Regular medic @@ -5206,13 +3902,9 @@ Normaler Sanitäter Řadový zdravotník Médico regular - Infirmier + Infirmier standard Hagyományos orvos Medico Regolare - 通常の衛生兵 - 일반 의무병 - 普通医疗兵 - 普通醫療兵 Doctor (Only Advanced Medics) @@ -5225,10 +3917,6 @@ Médecin (traitements avancés uniquement) Doktor (csak fejlett orvosok) Dottore (Solo Medici Avanzati) - 医師 (アドバンスド医療のみ) - 의사 (오직 고급 의료에서만) - 军医 (只限进阶医疗系统) - 軍醫 (只限進階醫療系統) Doctor @@ -5241,10 +3929,6 @@ Médecin Doktor Dottore - 医師 - 의사 - 军医 - 軍醫 Assigns the ACE medic class to a unit @@ -5257,10 +3941,6 @@ Assigner la classe médicale à une unité Az ACE orvosi jelző hozzárendelése egy egységhez Assegna la classe medico ACE ad un'unità - ユニットを ACE の衛生兵として割り当てる - 인원에게 ACE 의무병 보직 선정 - 指派ACE医疗职位给该单位 - 指派ACE醫療職位給該單位 Set Medical Vehicle [ACE] @@ -5273,10 +3953,6 @@ Définir comme véhicule médical [ACE] Orvosi jármű beállítása [ACE] Imposta Veicolo Medico [ACE] - 医療車両を設定 [ACE] - 의료 차랑 선정 [ACE] - 设定医疗载具 [ACE] - 設定醫療載具 [ACE] List @@ -5289,10 +3965,6 @@ Liste Lista Lista - 一覧 - 목록 - 列表 - 列表 List of vehicles that will be classified as medical vehicle, separated by commas. @@ -5305,10 +3977,6 @@ Liste de véhicule classé comme véhicule médical, séparation par virgule. Orvosi járműveknek tekintett járművek listája, vesszővel elválasztva. Lista di veicoli che verranno classificati come veicoli medici, separati da virgole. - 医療車両として設定されるクラス名を一覧で指定でき、コンマで区切りを付けられます - 차량 명칭 목록으로 의료차량이 구분됩니다, 쉼표로 구분. - 列出的载具将被指定为医疗载具, 记得用逗号隔开! - 列出的載具將被指定為醫療載具, 記得用逗號隔開! Is Medical Vehicle @@ -5321,10 +3989,6 @@ Véhicule médical Orvosi jármű-e E' Veicolo Medico - 医療車両として - 의료 차량 - 是医疗载具 - 是醫療載具 Whatever or not the objects in the list will be a medical vehicle. @@ -5337,10 +4001,6 @@ Quoi qu'il arrive les objets de la liste seront des véhicules médical A listában lévő objektumok orvosi járművek-e, vagy sem. Gli oggetti nella lista verranno considerati veicoli medici o meno. - どれでも、またはこの一覧にないオブジェクトを医療車両として割り当てる。 - 무엇이 되었던간에 이 목록에 있는 물체는 의료 차량이 됩니다. - 列表中的载具将会变成医疗载具 - 列表中的載具將會變成醫療載具 Assigns the ACE medic class to a unit @@ -5353,10 +4013,6 @@ Assigne la classe médicale à une unité Hozzárendeli az ACE orvosi jelzőt egy egységhez Assegna la classe medico ACE ad un'unità - ユニットを ACE の衛生兵として割り当てる - 차량에 ACE 의무병 보직 선정 - 指派ACE医疗职位给该单位 - 指派ACE醫療職位給該單位 Set Medical Facility [ACE] @@ -5366,13 +4022,9 @@ Setze medizinische Einrichtung [ACE] Určit zdravotnické zařízení [ACE] Definir instalação médica [ACE] - Définir comme installation médical [ACE] + Définir comme équipement médical [ACE] Orvosi létesítmény beállítása [ACE] Imposta Struttura Medica [ACE] - 医療施設を設定 [ACE] - 의료시설 선정 [ACE] - 设定医疗设施 [ACE] - 設定醫療設施 [ACE] Is Medical Facility @@ -5382,13 +4034,9 @@ Ist eine medizinische Einrichtung Zdravotnické zařízení É uma instalação médica - Est une installation médical + Est un équipement médical Orvosi létesítmény-e E' Struttura Medica - 医療施設として - 의료시설 - 是医疗设施 - 是醫療設施 Registers an object as a medical facility @@ -5398,13 +4046,9 @@ Definiert ein Objekt als medizinische Einrichtung Registruje objekt jako zdravotnické zařízení Registra um objeto como instalacão médica - Enregistrer un objet comme une installation médical + Enregistrer un objet comme un équipement médical Egy objektum orvosi létesítményként való regisztrálása Registra un oggetto come struttura medica - オブジェクトを医療施設として割り当てる - 물체를 의료시설로 등록합니다 - 指定一个物件作为医疗设施 - 指定一個物件作為醫療設施 Defines an object as a medical facility. This allows for more advanced treatments. Can be used on buildings and vehicles. @@ -5414,13 +4058,9 @@ Definiert ein Objekt als medizinische Einrichtung. Hier werden weitere, tiefgreifende Behandlungen ermöglicht. Kann Fahrzeugen oder Gebäuden zugewiesen werden. Definuje objekt jako zdravotnické zařízení. To umožňuje více pokročilé léčení. Může být použito na budovy nebo na vozidla. Define um objeto como instalação médica. Isso permite tratamentos mais avançados. Pode ser utilizado em edifícios e veículos. - Définir un objet comme installation médical. Cela permet les traitements avancés. Peut être utilisé sur les batiments et les véhicules + Définir un objet comme équipement médical. Cela permet les traitements avancés. Peut être utilisé sur les batiments et les véhicules Egy objektumot orvosi létesítményként határoz meg. Ez fejlett ellátási lehetőségeket engedélyez. Használható járműveken és épületeken. Definisce un oggetto come struttura medica. Questo permette cure più avanzate. Può essere usato su edifici e veicoli. - オブジェクトを医療施設として割り当てます。建物と車両へ割り当てられた場合、より高度な治療が可能になります。 - 물체를 의료시설로 정의합니다. 건물 혹은 차량이 될 수 있습니다. 이는 고급 의료 조치를 할 수 있게해줍니다. - 定义一个物件作为医疗设施, 此医疗设施将被允许使用更进阶的医疗方法. 此功能可用于建筑物或是载具上! - 定義一個物件作為醫療設施, 此醫療設施將被允許使用更進階的醫療方法. 此功能可用於建築物或是載具上! [ACE] Medical Supply Crate (Basic) @@ -5433,10 +4073,6 @@ [ACE] Caisse médicale (basique) [ACE] Orvosi láda (Alap) [ACE] Cassa Rifornimenti Medici (Basico) - [ACE] 医療物資箱 (ベーシック) - [ACE] 의료 물자 (기본) - [ACE] 医疗补给箱(基本) - [ACE] 醫療補給箱(基本) [ACE] Medical Supply Crate (Advanced) @@ -5449,10 +4085,6 @@ [ACE] Caisse médicale (avancée) [ACE] Orvosi láda (Fejlett) [ACE] Cassa Rifornimenti Medici (Avanzato) - [ACE] 医療物資箱 (アドバンスド) - [ACE] 의료 물자 (고급) - [ACE] 医疗补给箱(进阶) - [ACE] 醫療補給箱(進階) Anytime @@ -5465,10 +4097,6 @@ Sempre В любое время Sempre - いつでも - 언제나 - 任何时间 - 任何時間 Stable @@ -5481,10 +4109,6 @@ Estável После стабилизации Stabile - 安定 - 안정된 - 稳定状态下 - 穩定狀態下 Medical @@ -5497,10 +4121,6 @@ Медик Médico Orvosi - 治療 - 의료 - 医疗设定 - 醫療設定 Distance to %1 has become to far for treatment @@ -5512,10 +4132,6 @@ %1 je příliš daleko, léčba není možná Distanza da %1 è diventata troppo alta per permettere trattamento %1 est trop loin pour être soigné - %1 は治療をできない所まで離れた - %1 부터의 거리가 너무 멀어 치료할 수 없습니다 - 设定当距离超过%1将不能使用治疗动作 - 設定當距離超過%1將不能使用治療動作 This person (%1) is awake and cannot be loaded @@ -5526,11 +4142,7 @@ Esta pessoa (%1) está acordada e não pode ser carregada Tato osoba (%1) je vzhůru a nemůže být naložena Questa persona (%1) è sveglia e non può essere caricata. - %1 est conscient et ne peut être embarqué. - 患者 (%1) は意識があり、積み込めない - 이 사람 (%1) 은(는) 의식이 있어 태우지 못합니다 - 此人(%1)是清醒且不能被装载 - 此人(%1)是清醒且不能被裝載 + Cette personne (%1) est consciente et ne peut être chargées. There is no tourniquet on this body part! @@ -5542,10 +4154,6 @@ Žádné škrtidlo na této části těla! Non c'è nessun laccio emostatico su questa parte del corpo! Il n'y a pas de garrot sur ce membre ! - 身体には止血帯が無い! - 이 부위에는 지혈대가 없습니다! - 这部位没有止血带! - 這部位沒有止血帶! Medical training @@ -5557,24 +4165,16 @@ Lékařský výcvik Treino médico Медицинская подготовка - 治療の訓練 - 의료 훈련 - 医疗训练 - 醫療訓練 Whether or not the object will be a medical vehicle. - Czy pojazd ma być pojazdem medycznym? + Czy pojazdy ma być pojazdem medycznym? L'oggetto in questione sarà un veicolo medico o meno. Legt fest, ob das Objekt ein Sanitätsfahrzeug ist. Es un vehículo médico? - Détermine si c'est un véhicule sanitaire. + Définit si le véhicule est un véhicule médical ou non. Se o objeto será ou não um veículo médico Будет ли объект считаться медицинским транспортом. - どれでも、またはオブジェクトを医療車両として割り当てます。 - 무엇이 되었던간에 이 목록에 있는 물체는 의료 차량이 됩니다. - 是否使该载具为医疗载具? - 是否使該載具為醫療載具? Delay cease fire of AI while player is unconscious for medical reasons. @@ -5582,28 +4182,19 @@ Ritarda il cessate il fuoco dell'IA quando il giocatore è svenuto per motivi medici. Prodleva zastavení palby pro AI, pokud je hráč v bezvědomí ze zdravotních důvodů. Atraso durante cessar fogo da AI durante inconsciência médica - Délai de cessez le feu pour l'IA pendant que le joueur est inconscient pour des raisons médicales. + Délai de cessez le feu pour l'IA pendant que le joueur est inconscient pour des raisons médicales Задержка прекращения огня ботами, когда игрок теряет сознание по медицинским причинам. - AI はプレイヤーが医療的な理由で気絶している場合にかぎり、撃つのをためらいます。 - Opóźnij stan wstrzymania ognia u AI kiedy gracz jest nieprzytomny z powodów medycznych. - 의료상의 이유로 플레이어가 기절할 경우 인공지능이 발사를 지연합니다. - 当玩家为无意识的状态时, 延长AI的停火时间 - 當玩家為無意識的狀態時, 延長AI的停火時間 Delay cease fire of AI for unconsciousness Verzögert Ende des KI-Beschusses bei medizinischer Bewustlosigkeit Demora antes de volverse neutral al caer inconsciente - Opóźnij wstrzymanie ognia AI dla nieprzytomnych osób + Opóźnij status captive u nieprzytomnych osób Ritarda il cessate il fuoco dell'IA quando si è svenuti Prodleva zastavení palby AI na bezvědomé Atraso durante cessar fogo da AI durante inconsciência Délai de cessez le feu de l'IA pour la perte de conscience Задержка прекращения огня ботами при потере сознания - AI は気絶している人へ、ためらってから射撃します - 기절할 경우 인공지능이 발사를 지연합니다 - 延长AI对已无意识玩家的停火时间 - 延長AI對已無意識玩家的停火時間 - + \ No newline at end of file diff --git a/addons/medical_ai/ACE_Settings.hpp b/addons/medical_ai/ACE_Settings.hpp index 8a43c34484..a4962dfbc8 100644 --- a/addons/medical_ai/ACE_Settings.hpp +++ b/addons/medical_ai/ACE_Settings.hpp @@ -1,6 +1,5 @@ class ACE_Settings { class GVAR(enabledFor) { - category = ECSTRING(medical,Category_Medical); value = 2; typeName = "SCALAR"; values[] = {ECSTRING(Common,Disabled), CSTRING(enabledFor_OnlyServerAndHC), ECSTRING(Common,Enabled)}; diff --git a/addons/medical_ai/XEH_preInit.sqf b/addons/medical_ai/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/medical_ai/XEH_preInit.sqf +++ b/addons/medical_ai/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/medical_ai/functions/fnc_canRequestMedic.sqf b/addons/medical_ai/functions/fnc_canRequestMedic.sqf index 39a5063f24..a73b7a7822 100644 --- a/addons/medical_ai/functions/fnc_canRequestMedic.sqf +++ b/addons/medical_ai/functions/fnc_canRequestMedic.sqf @@ -8,9 +8,6 @@ * Return Value: * Can request medic * - * Example: - * call ACE_medical_ai_fnc_canRequestMedic - * * Public: No */ #include "script_component.hpp" @@ -22,7 +19,7 @@ if ([_this] call EFUNC(medical,isMedic) || {vehicle _this != _this}) exitWith {false}; { - if ([_x] call EFUNC(medical,isMedic) && {!([_x] call EFUNC(common,isPlayer))}) exitWith { + if ([_x] call EFUNC(medical,isMedic)) exitWith { _this setVariable [QGVAR(assignedMedic), _x]; true }; diff --git a/addons/medical_ai/functions/fnc_healSelf.sqf b/addons/medical_ai/functions/fnc_healSelf.sqf index 253dcd2a45..7a1091b315 100644 --- a/addons/medical_ai/functions/fnc_healSelf.sqf +++ b/addons/medical_ai/functions/fnc_healSelf.sqf @@ -6,17 +6,14 @@ * None * * Return Value: - * None - * - * Example: - * call ACE_medical_ai_fnc_healSelf + * Nothing * * Public: No */ #include "script_component.hpp" // Player will have to do this manually of course -if ([_this] call EFUNC(common,isPlayer)) exitWith {}; +if (isPlayer _this) exitWith {}; // Can't heal self when unconscious if (_this getVariable ["ACE_isUnconscious", false]) exitWith {}; // Check if we're still treating diff --git a/addons/medical_ai/functions/fnc_healUnit.sqf b/addons/medical_ai/functions/fnc_healUnit.sqf index 569d62f890..52b0c51e6e 100644 --- a/addons/medical_ai/functions/fnc_healUnit.sqf +++ b/addons/medical_ai/functions/fnc_healUnit.sqf @@ -6,10 +6,7 @@ * None * * Return Value: - * None - * - * Example: - * call ACE_medical_ai_fnc_healUnit + * Nothing * * Public: No */ @@ -32,7 +29,6 @@ if (isNull _target || {!alive _target} || {!(_target call FUNC(isInjured))}) exi _this forceSpeed -1; // return to formation instead of going where the injured unit was if it healed itself in the mean time _this doFollow leader _this; - _this setVariable [QGVAR(movingToInjured), false]; #ifdef DEBUG_MODE_FULL systemChat format ["%1 finished healing %2", _this, _target]; diff --git a/addons/medical_ai/functions/fnc_isInjured.sqf b/addons/medical_ai/functions/fnc_isInjured.sqf index 4c25ba72a1..6852fc1c58 100644 --- a/addons/medical_ai/functions/fnc_isInjured.sqf +++ b/addons/medical_ai/functions/fnc_isInjured.sqf @@ -8,9 +8,6 @@ * Return Value: * Does unit need treatment * - * Example: - * call ACE_medical_ai_fnc_isInjured - * * Public: No */ #include "script_component.hpp" diff --git a/addons/medical_ai/functions/fnc_isSafe.sqf b/addons/medical_ai/functions/fnc_isSafe.sqf index de7d9667cc..92bbc60587 100644 --- a/addons/medical_ai/functions/fnc_isSafe.sqf +++ b/addons/medical_ai/functions/fnc_isSafe.sqf @@ -8,9 +8,6 @@ * Return Value: * Is unit safe enough * - * Example: - * call ACE_medical_ai_fnc_isSafe - * * Public: No */ #include "script_component.hpp" diff --git a/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf b/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf index de2c0ee30e..93a784922d 100644 --- a/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf +++ b/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf @@ -8,10 +8,7 @@ * 2: Is self treatment * * Return Value: - * None - * - * Example: - * [bob, true, true] call ACE_medical_ai_fnc_playTreatmentAnim + * Nothing * * Public: No */ @@ -35,12 +32,7 @@ if (stance _unit == "PRONE") then { }; private _anim = getText (_animConfig >> _configProperty); -private _wpn = switch (true) do { - case ((currentWeapon _unit) == ""): {"non"}; - case ((currentWeapon _unit) == (primaryWeapon _unit)): {"rfl"}; - case ((currentWeapon _unit) == (handgunWeapon _unit)): {"pst"}; - default {"non"}; -}; +private _wpn = ["non", "rfl", "pst"] select (1 + ([primaryWeapon _unit, handgunWeapon _unit] find (currentWeapon _unit))); _anim = [_anim, "[wpn]", _wpn] call CBA_fnc_replace; [_unit, _anim] call EFUNC(common,doAnimation); diff --git a/addons/medical_ai/functions/fnc_requestMedic.sqf b/addons/medical_ai/functions/fnc_requestMedic.sqf index 6bb3229e9a..f669b06975 100644 --- a/addons/medical_ai/functions/fnc_requestMedic.sqf +++ b/addons/medical_ai/functions/fnc_requestMedic.sqf @@ -6,10 +6,7 @@ * None * * Return Value: - * None - * - * Example: - * call ACE_medical_ai_fnc_requestMedic + * Nothing * * Public: No */ diff --git a/addons/medical_ai/functions/fnc_wasRequested.sqf b/addons/medical_ai/functions/fnc_wasRequested.sqf index c340ff7b9e..2b86423be8 100644 --- a/addons/medical_ai/functions/fnc_wasRequested.sqf +++ b/addons/medical_ai/functions/fnc_wasRequested.sqf @@ -8,9 +8,6 @@ * Return Value: * Was requested * - * Example: - * call ACE_medical_ai_fnc_wasRequested - * * Public: No */ #include "script_component.hpp" diff --git a/addons/medical_ai/script_component.hpp b/addons/medical_ai/script_component.hpp index cd0c047751..f50197ee67 100644 --- a/addons/medical_ai/script_component.hpp +++ b/addons/medical_ai/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_ENABLED_MEDICAL_AI // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MEDICAL_AI diff --git a/addons/medical_ai/stringtable.xml b/addons/medical_ai/stringtable.xml index 8a8068e7d6..3bec1c3824 100644 --- a/addons/medical_ai/stringtable.xml +++ b/addons/medical_ai/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -6,12 +6,6 @@ Nur Server und HC Sólo Server y HC Нур сервера унд HC - サーバーと HC のみ - Tylko serwer i HC - Seulement sur le server ou le HC - Solo Server e HC - 只在伺服器或无头客户端 - 只在伺服器或無頭客戶端 diff --git a/addons/medical_blood/$PBOPREFIX$ b/addons/medical_blood/$PBOPREFIX$ deleted file mode 100644 index 352725c3fd..0000000000 --- a/addons/medical_blood/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\medical_blood diff --git a/addons/medical_blood/ACE_Settings.hpp b/addons/medical_blood/ACE_Settings.hpp deleted file mode 100644 index b5e1f0db21..0000000000 --- a/addons/medical_blood/ACE_Settings.hpp +++ /dev/null @@ -1,10 +0,0 @@ -class ACE_Settings { - class GVAR(enabledFor) { - category = ECSTRING(medical,Category_Medical); - displayName = CSTRING(MedicalBloodSettings_enabledFor_DisplayName); - description = CSTRING(MedicalBloodSettings_enabledFor_Description); - value = 2; - typeName = "SCALAR"; - values[] = {ECSTRING(Common,Disabled), CSTRING(enabledFor_OnlyPlayers), ECSTRING(Common,Enabled)}; - }; -}; diff --git a/addons/medical_blood/CfgEventHandlers.hpp b/addons/medical_blood/CfgEventHandlers.hpp deleted file mode 100644 index becf395052..0000000000 --- a/addons/medical_blood/CfgEventHandlers.hpp +++ /dev/null @@ -1,18 +0,0 @@ - -class Extended_PreStart_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); - }; -}; - -class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); - }; -}; - -class Extended_PostInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); - }; -}; diff --git a/addons/medical_blood/README.md b/addons/medical_blood/README.md deleted file mode 100644 index 29632ffd29..0000000000 --- a/addons/medical_blood/README.md +++ /dev/null @@ -1,11 +0,0 @@ -ace_medical_blood -=============== - -Adds blood visual effect on the ground near a bleeding player. - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Glowbal](https://github.com/Glowbal) -- [commy2](https://github.com/commy2) diff --git a/addons/medical_blood/XEH_PREP.hpp b/addons/medical_blood/XEH_PREP.hpp deleted file mode 100644 index 64ebbae911..0000000000 --- a/addons/medical_blood/XEH_PREP.hpp +++ /dev/null @@ -1,6 +0,0 @@ - -PREP(hit); -PREP(isBleeding); -PREP(onBleeding); -PREP(createBlood); -PREP(spurt); diff --git a/addons/medical_blood/XEH_postInit.sqf b/addons/medical_blood/XEH_postInit.sqf deleted file mode 100644 index ceff7f074c..0000000000 --- a/addons/medical_blood/XEH_postInit.sqf +++ /dev/null @@ -1,46 +0,0 @@ -#include "script_component.hpp" - -GVAR(useAceMedical) = ["ace_medical"] call EFUNC(common,isModLoaded); - -// To support public API regardless of component settings -[QGVAR(spurt), { - _this call FUNC(spurt); -}] call CBA_fnc_addEventHandler; - -if (isServer) then { - GVAR(bloodDrops) = []; - - [QGVAR(bloodDropCreated), { - params ["_bloodDrop"]; - GVAR(bloodDrops) pushBack _bloodDrop; - if (count GVAR(bloodDrops) >= MAX_BLOOD_OBJECTS) then { - private _deletedBloodDrop = GVAR(bloodDrops) deleteAt 0; - deleteVehicle _deletedBloodDrop; - }; - - [{deleteVehicle _this}, _bloodDrop, BLOOD_OBJECT_LIFETIME] call CBA_fnc_waitAndExecute; - }] call CBA_fnc_addEventHandler; -}; - -["ace_settingsInitialized", { - TRACE_1("settingsInitialized", GVAR(enabledFor)); - if (GVAR(enabledFor) == 0) exitWith {}; // 0: disabled - if ((GVAR(enabledFor) == 1) && {!hasInterface}) exitWith {}; // 1: enabledFor_OnlyPlayers - - private _listcode = if (GVAR(enabledFor) == 1) then { - {[ACE_player] select {[_x] call FUNC(isBleeding)}} // ace_player is only possible local player - } else { - {allUnits select {(local _x) && {[_x] call FUNC(isBleeding)}}}; // filter all local bleeding units - }; - - private _stateMachine = [_listcode, true] call CBA_statemachine_fnc_create; - [_stateMachine, {call FUNC(onBleeding)}, {}, {}, "Bleeding"] call CBA_statemachine_fnc_addState; - - - ["CAManBase", "hit", { - params ["_unit"]; - if (GVAR(enabledFor) == 1 && {!isPlayer _unit && {_unit != ACE_player}}) exitWith {}; - _this call FUNC(hit); - }] call CBA_fnc_addClassEventHandler; - -}] call CBA_fnc_addEventHandler; diff --git a/addons/medical_blood/XEH_preInit.sqf b/addons/medical_blood/XEH_preInit.sqf deleted file mode 100644 index 9cf50a1b60..0000000000 --- a/addons/medical_blood/XEH_preInit.sqf +++ /dev/null @@ -1,29 +0,0 @@ -#include "script_component.hpp" - -ADDON = false; - -PREP_RECOMPILE_START; -#include "XEH_PREP.hpp" -PREP_RECOMPILE_END; - -// blood object model namespace -GVAR(models) = [] call CBA_fnc_createNamespace; - -{ - _x params ["_name", "_model"]; - - // createSimpleObject expects a path without the leading slash - if ((_model select [0,1]) isEqualTo "\") then { - _model = _model select [1]; - }; - - GVAR(models) setVariable [_name, _model]; -} forEach [ - // higher number means bigger model - ["blooddrop_1", QPATHTOF(data\ace_drop_1.p3d)], - ["blooddrop_2", QPATHTOF(data\ace_drop_2.p3d)], - ["blooddrop_3", QPATHTOF(data\ace_drop_3.p3d)], - ["blooddrop_4", QPATHTOF(data\ace_drop_4.p3d)] -]; - -ADDON = true; diff --git a/addons/medical_blood/data/ace_drop_1.p3d b/addons/medical_blood/data/ace_drop_1.p3d deleted file mode 100644 index b72f206a6f..0000000000 Binary files a/addons/medical_blood/data/ace_drop_1.p3d and /dev/null differ diff --git a/addons/medical_blood/data/ace_drop_2.p3d b/addons/medical_blood/data/ace_drop_2.p3d deleted file mode 100644 index bb155f3e65..0000000000 Binary files a/addons/medical_blood/data/ace_drop_2.p3d and /dev/null differ diff --git a/addons/medical_blood/data/ace_drop_3.p3d b/addons/medical_blood/data/ace_drop_3.p3d deleted file mode 100644 index de564cfd0b..0000000000 Binary files a/addons/medical_blood/data/ace_drop_3.p3d and /dev/null differ diff --git a/addons/medical_blood/data/ace_drop_4.p3d b/addons/medical_blood/data/ace_drop_4.p3d deleted file mode 100644 index fd9e0de0a0..0000000000 Binary files a/addons/medical_blood/data/ace_drop_4.p3d and /dev/null differ diff --git a/addons/medical_blood/data/blood.rvmat b/addons/medical_blood/data/blood.rvmat deleted file mode 100644 index 691515d6b4..0000000000 --- a/addons/medical_blood/data/blood.rvmat +++ /dev/null @@ -1,91 +0,0 @@ -class StageTI { - texture = "z\ace\addons\medical_blood\data\blood_ti_ca.paa"; -}; - -ambient[] = {1.0,1.0,1.0,1.0}; -diffuse[] = {1.0,1.0,1.0,1.0}; -forcedDiffuse[] = {0.0,0.0,0.0,0.0}; -emmisive[] = {0.0,0.0,0.0,1.0}; -specular[] = {0.0,0.0,0.0,1.0}; -specularPower = 1.0; -PixelShaderID = "Super"; -VertexShaderID = "Super"; -renderFlags[] = {"NoZWrite"}; - -class Stage1 { - texture = "z\ace\addons\medical_blood\data\blood_nohq.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {1.0,0.0,0.0}; - up[] = {0.0,1.0,0.0}; - dir[] = {0.0,0.0,0.0}; - pos[] = {0.0,0.0,0.0}; - }; -}; - -class Stage2 { - texture = "#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1.0,0.0,0.0}; - up[] = {0.0,1.0,0.0}; - dir[] = {0.0,0.0,0.0}; - pos[] = {0.0,0.0,0.0}; - }; -}; - -class Stage3 { - texture = "#(argb,8,8,3)color(0.0,0.0,0.0,0.0,MC)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1.0,0.0,0.0}; - up[] = {0.0,1.0,0.0}; - dir[] = {0.0,0.0,0.0}; - pos[] = {0.0,0.0,0.0}; - }; -}; - -class Stage4 { - texture = "#(argb,8,8,3)color(1.0,1.0,1.0,1.0,AS)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1.0,0.0,0.0}; - up[] = {0.0,1.0,0.0}; - dir[] = {0.0,0.0,0.0}; - pos[] = {0.0,0.0,0.0}; - }; -}; - -class Stage5 { - texture = "z\ace\addons\medical_blood\data\blood_smdi.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {1.0,0.0,0.0}; - up[] = {0.0,1.0,0.0}; - dir[] = {0.0,0.0,0.0}; - pos[] = {0.0,0.0,0.0}; - }; -}; - -class Stage6 { - texture = "#(ai,64,64,1)fresnel(0.7,0.001)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1.0,0.0,0.0}; - up[] = {0.0,1.0,0.0}; - dir[] = {0.0,0.0,0.0}; - pos[] = {0.0,0.0,0.0}; - }; -}; - -class Stage7 { - texture = "a3\data_f\env_land_co.paa"; - useWorldEnvMap = "false"; - uvSource = "tex"; - class uvTransform { - aside[] = {1.0,0.0,0.0}; - up[] = {0.0,1.0,0.0}; - dir[] = {0.0,0.0,0.0}; - pos[] = {0.0,0.0,0.0}; - }; -}; diff --git a/addons/medical_blood/data/blood_ca.paa b/addons/medical_blood/data/blood_ca.paa deleted file mode 100644 index 9ae34f8eb0..0000000000 Binary files a/addons/medical_blood/data/blood_ca.paa and /dev/null differ diff --git a/addons/medical_blood/data/blood_nohq.paa b/addons/medical_blood/data/blood_nohq.paa deleted file mode 100644 index bae0ed1075..0000000000 Binary files a/addons/medical_blood/data/blood_nohq.paa and /dev/null differ diff --git a/addons/medical_blood/data/blood_smdi.paa b/addons/medical_blood/data/blood_smdi.paa deleted file mode 100644 index 36e4728b16..0000000000 Binary files a/addons/medical_blood/data/blood_smdi.paa and /dev/null differ diff --git a/addons/medical_blood/data/blood_ti_ca.paa b/addons/medical_blood/data/blood_ti_ca.paa deleted file mode 100644 index 9172b23d5f..0000000000 Binary files a/addons/medical_blood/data/blood_ti_ca.paa and /dev/null differ diff --git a/addons/medical_blood/data/model.cfg b/addons/medical_blood/data/model.cfg deleted file mode 100644 index 9f1696ab51..0000000000 --- a/addons/medical_blood/data/model.cfg +++ /dev/null @@ -1,19 +0,0 @@ -class CfgSkeletons { - class Default { - isDiscrete = 1; - skeletonInherit = ""; - skeletonBones[] = {}; - }; -}; - -class CfgModels { - class Default { - sectionsInherit = ""; - sections[] = {""}; - skeletonName = "Default"; - }; - class ace_drop_1: Default {}; - class ace_drop_2: Default {}; - class ace_drop_3: Default {}; - class ace_drop_4: Default {}; -}; diff --git a/addons/medical_blood/functions/fnc_createBlood.sqf b/addons/medical_blood/functions/fnc_createBlood.sqf deleted file mode 100644 index 88d35ca7a6..0000000000 --- a/addons/medical_blood/functions/fnc_createBlood.sqf +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Author: Glowbal - * Spawn a blood drop. - * Available blood drop classes are blooddrop_1 through blooddrop_4. - * - * Arguments: - * 0: classname of blood drop - * 1: Position - * - * Return Value: - * Created blood drop - * - * Example: - * ["blooddrop_2", getPos player] call ace_medical_blood_fnc_createBlood - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_type", "_pos"]; -TRACE_2("creating blood",_type,_pos); - -private _model = GVAR(models) getVariable _type; - -private _object = createSimpleObject [_model, [0,0,0]]; -_object setDir random 360; -_object setPos _pos; - -[QGVAR(bloodDropCreated), [_object]] call CBA_fnc_serverEvent; - -_object diff --git a/addons/medical_blood/functions/fnc_hit.sqf b/addons/medical_blood/functions/fnc_hit.sqf deleted file mode 100644 index 3c0251a437..0000000000 --- a/addons/medical_blood/functions/fnc_hit.sqf +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Author: Glowbal - * Handle unit hit eventhandler - * - * Arguments: - * 0: unit - * 1: caused by - * 2: damage - * - * Return Value: - * None - * - * Example: - * [bob, kevin, 5] call ACE_medical_blood_fnc_hit - * - * Public: No - */ -#include "script_component.hpp" - -params ["_unit", "_causedBy", "_damage"]; - -if (((vehicle _unit) != _unit) && {!((vehicle _unit) isKindOf "StaticWeapon")}) exitWith {}; // Don't bleed on ground if mounted - -if (isNull _causedBy) exitWith { // won't be able to calculate the direction properly, so instead we pick something at random - [QGVAR(spurt), [_unit, random 360, _damage]] call CBA_fnc_serverEvent; -}; - -// Calculate bulletDirection -private _bulletDir = _unit getDir _causedBy; - -[QGVAR(spurt), [_unit, _bulletDir, _damage]] call CBA_fnc_serverEvent; diff --git a/addons/medical_blood/functions/fnc_isBleeding.sqf b/addons/medical_blood/functions/fnc_isBleeding.sqf deleted file mode 100644 index 57f68c7c8d..0000000000 --- a/addons/medical_blood/functions/fnc_isBleeding.sqf +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Author: Glowbal - * Check if is bleeding - * - * Arguments: - * 0: unit - * - * Return Value: - * is Bleeding - * - * Example: - * [UNIT] call ace_medical_blood_fnc_isBleeding - * - * Public: No - */ -#include "script_component.hpp" - -params ["_unit"]; - -if (GVAR(useAceMedical)) exitWith { - _unit getVariable [QEGVAR(medical,isBleeding), false]; -}; -alive _unit && {getDammage _unit > 0.3}; diff --git a/addons/medical_blood/functions/fnc_onBleeding.sqf b/addons/medical_blood/functions/fnc_onBleeding.sqf deleted file mode 100644 index 4357bc382a..0000000000 --- a/addons/medical_blood/functions/fnc_onBleeding.sqf +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Author: Glowbal - * handle bleeding state (state machine) - * - * Arguments: - * 0: unit - * - * Return Value: - * is Bleeding - * - * Example: - * [UNIT] call ace_medical_blood_fnc_onBleeding - * - * Public: No - */ -#include "script_component.hpp" - -params ["_unit"]; - -if (((vehicle _unit) != _unit) && {!((vehicle _unit) isKindOf "StaticWeapon")}) exitWith {}; // Don't bleed on ground if mounted - -private _lastTime = _unit getVariable [QGVAR(lastTime), -10]; -private _bloodLoss = (if (GVAR(useAceMedical)) then {([_unit] call EFUNC(medical,getBloodLoss)) * 2.5} else {getDammage _unit * 2}) min 6; - -if ((CBA_missionTime - _lastTime) + _bloodLoss >= 8 + random 2) then { - _unit setVariable [QGVAR(lastTime), CBA_missionTime]; - - private _position = getPosASL _unit; - _position = _position vectorAdd [ - random 0.4 - 0.2, - random 0.4 - 0.2, - 0 - ]; - _position set [2, 0]; - - private _bloodDrop = ["blooddrop_1", "blooddrop_2", "blooddrop_3", "blooddrop_4"] select floor (_bloodLoss min 3); - [_bloodDrop, _position, getDir _unit] call FUNC(createBlood); -}; diff --git a/addons/medical_blood/functions/fnc_spurt.sqf b/addons/medical_blood/functions/fnc_spurt.sqf deleted file mode 100644 index aaaa75894e..0000000000 --- a/addons/medical_blood/functions/fnc_spurt.sqf +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Author: Sickboy - * Spurt blood on the ground - * - * Arguments: - * 0: unit - * 1: direction - * 2: damage - * - * Return Value: - * None - * - * Example: - * [UNIT, random 360, 1] call ace_medical_blood_fnc_spurt - * - * Public: No - */ - -#include "script_component.hpp" - -#define MAXIMUM_DROPS 4 -#define DISTANCE_BETWEEN_DROPS 0.20 -#define OFFSET 0.25 - -params ["_unit", "_dir", "_damage"]; -_damage = _damage min 1; - -private _distanceBetweenDrops = DISTANCE_BETWEEN_DROPS * _damage; -private _offset = OFFSET + _distanceBetweenDrops; -private _pos = _unit getPos [_offset, _dir]; -["blooddrop_2", _pos, _dir] call FUNC(createBlood); - -private _dropAmount = ceil (MAXIMUM_DROPS * _damage); -if (_dropAmount > 1) then { - for "_i" from 2 to _dropAmount do { - _pos = _pos getPos [_distanceBetweenDrops, _dir]; - ["blooddrop_1", _pos, _dir] call FUNC(createBlood); - }; -}; diff --git a/addons/medical_blood/functions/script_component.hpp b/addons/medical_blood/functions/script_component.hpp deleted file mode 100644 index 8f2dd066de..0000000000 --- a/addons/medical_blood/functions/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\ace\addons\medical_blood\script_component.hpp" diff --git a/addons/medical_blood/script_component.hpp b/addons/medical_blood/script_component.hpp deleted file mode 100644 index 335cdc44c5..0000000000 --- a/addons/medical_blood/script_component.hpp +++ /dev/null @@ -1,20 +0,0 @@ -#define COMPONENT medical_blood -#define COMPONENT_BEAUTIFIED Medical Blood -#include "\z\ace\addons\main\script_mod.hpp" - -// #define DEBUG_ENABLED_MEDICAL_BLOOD -// #define DISABLE_COMPILE_CACHE -// #define ENABLE_PERFORMANCE_COUNTERS - -#ifdef DEBUG_ENABLED_MEDICAL_BLOOD - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_SETTINGS_MEDICAL_BLOOD - #define DEBUG_SETTINGS DEBUG_SETTINGS_MEDICAL_BLOOD -#endif - -#include "\z\ace\addons\main\script_macros.hpp" - -#define MAX_BLOOD_OBJECTS 500 -#define BLOOD_OBJECT_LIFETIME 900 diff --git a/addons/medical_blood/stringtable.xml b/addons/medical_blood/stringtable.xml deleted file mode 100644 index 1e61151d0d..0000000000 --- a/addons/medical_blood/stringtable.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - Only Players - プレイヤーのみ - Nur Spieler - 오직 플레이어만 - Tylko gracze - Joueurs seulement - Solo Giocatori - 只有玩家 - 只有玩家 - - - Enable Blood Drops - 血痕を有効化 - Aktiviere Blutspritzer - 피흘리기 활성화 - Włącz ślady krwi na ziemi - Active les gouttes de sang - Abilita Perdite di Sangue - 开启血液滴落效果 - 開啟血液滴落效果 - - - Enable or disable Blood Drops created on bleeding and taking damage - ダメージを受けたり、出血していると出る血痕の有効か無効化 - Aktiviere oder deaktiviere Blutspritzer, die durch Blutungen oder bei Schadensnahme entstehen. - Włącz lub wyłącz pozostawianie śladów krwi na ziemi kiedy postać odnosi obrażenia bądź krwawi - (Dés)active les gouttes de sang lors d'un saignement ou de blessure - Abilita o disabilita la Perdite di Sangue create sanguinando e prendendo danno - 开启后, 会让受伤时伤口有血液滴落的效果. - 開啟後, 會讓受傷時傷口有血液滴落的效果. - - - diff --git a/addons/medical_menu/XEH_preInit.sqf b/addons/medical_menu/XEH_preInit.sqf index 16e448fc38..009a9ed1a6 100644 --- a/addons/medical_menu/XEH_preInit.sqf +++ b/addons/medical_menu/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(INTERACTION_TARGET) = objNull; GVAR(actionsOther) = []; diff --git a/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf index 80b43bae3c..6fed994671 100644 --- a/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf +++ b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf @@ -10,7 +10,7 @@ * Return Value: * Available actions * - * Example: + * Exmaple: * [ACE_player, poor_dude, "some category"] call ace_medical_menu_fnc_getTreatmentOptions * * Public: No diff --git a/addons/medical_menu/functions/fnc_module.sqf b/addons/medical_menu/functions/fnc_module.sqf index f056082743..666440e208 100644 --- a/addons/medical_menu/functions/fnc_module.sqf +++ b/addons/medical_menu/functions/fnc_module.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ACE_medical_menu_fnc_module - * * Public: No */ diff --git a/addons/medical_menu/functions/fnc_setTriageStatus.sqf b/addons/medical_menu/functions/fnc_setTriageStatus.sqf index 66efd6ac0c..8a85eeb950 100644 --- a/addons/medical_menu/functions/fnc_setTriageStatus.sqf +++ b/addons/medical_menu/functions/fnc_setTriageStatus.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, 2] call ACE_medical_menu_fnc_setTriageStatus - * * Public: No */ #include "script_component.hpp" diff --git a/addons/medical_menu/functions/fnc_updateInformationLists.sqf b/addons/medical_menu/functions/fnc_updateInformationLists.sqf index d6ff631df8..28818465bc 100644 --- a/addons/medical_menu/functions/fnc_updateInformationLists.sqf +++ b/addons/medical_menu/functions/fnc_updateInformationLists.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [DISPLAY, [messagecollection], [injurycollection]] call ACE_medical_menu_fnc_updateInformationLists - * * Public: No */ #include "script_component.hpp" diff --git a/addons/medical_menu/functions/fnc_updateUIInfo.sqf b/addons/medical_menu/functions/fnc_updateUIInfo.sqf index 4994ad2acf..130f76af2f 100644 --- a/addons/medical_menu/functions/fnc_updateUIInfo.sqf +++ b/addons/medical_menu/functions/fnc_updateUIInfo.sqf @@ -46,11 +46,12 @@ if (_target getVariable [QEGVAR(medical,hasPain), false]) then { }; _totalIvVolume = 0; -private _bloodBags = _target getVariable [QEGVAR(medical,ivBags), []]; { - _x params ["_bagVolumeRemaining"]; - _totalIvVolume = _totalIvVolume + _bagVolumeRemaining; -} foreach _bloodBags; + private _value = _target getVariable _x; + if (!isNil "_value") then { + _totalIvVolume = _totalIvVolume + (_target getVariable [_x, 0]); + }; +} count EGVAR(medical,IVBags); if (_totalIvVolume >= 1) then { _genericMessages pushBack [format [localize ELSTRING(medical,receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]]; diff --git a/addons/medical_menu/script_component.hpp b/addons/medical_menu/script_component.hpp index 28ab0311b3..cb437060a3 100644 --- a/addons/medical_menu/script_component.hpp +++ b/addons/medical_menu/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MEDICAL_MENU diff --git a/addons/medical_menu/stringtable.xml b/addons/medical_menu/stringtable.xml index 20180d3b91..a5b75c00e2 100644 --- a/addons/medical_menu/stringtable.xml +++ b/addons/medical_menu/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -11,10 +11,6 @@ Zdravotnikcá nabídka Menù Medico Menu médical - 治療メニュー - 의료 메뉴 - 医疗选单 - 醫療選單 Allow Medical Menu @@ -26,10 +22,6 @@ Povolit zdravotnickou nabídku Consenti Menù Medico Autoriser le menu médical - 治療メニューを有効化 - 의료 메뉴 활성화 - 允许医疗选单 - 允許醫療選單 Allow clients to use the medical menu @@ -41,10 +33,6 @@ Povolit klientům používat zdravotnickou nabídku Consenti ai clients di usare il Menù Medico Autoriser les clients à utiliser le menu médical - すべてのクライアントが治療メニューをつかえるようにする - 클라이언트가 의료 메뉴를 쓰는것을 허락합니다 - 允许客户端使用医疗选单 - 允許客戶端使用醫療選單 Use Medical menu @@ -56,10 +44,6 @@ Použít zdravotnickou nabídku Usa Menù Medico Utiliser le menu médical - 治療メニューをつかう - 의료 메뉴 사용 - 使用医疗选单 - 使用醫療選單 If allowed by server, enable the option to use the Medical Menu through keybinding and interaction menu @@ -71,10 +55,6 @@ Pokud je povoleno serverem, umožní použít zdravotnickou nabídku skrze kláv. zkratku a interakční menu Se consentito dal server, abilita l'opzione di usare il Menù Medico attraverso hotkeys e menù interazione Si autorisé par le serveur, active l'option d'utiliser le menu médical à travers les raccourcis clavier et le menu d'interaction. - サーバーが有効化を許可している場合は、オプションから有効化でき治療メニューはキー割り当てとインタラクション メニューを無視できます - 서버 허가하에 단축키와 상호작용 메뉴로 의료 메뉴사용을 허가합니다 - 如果伺服器允许, 只需透过按键即可叫出医疗选单 - 如果伺服器允許, 只需透過按鍵即可叫出醫療選單 Re-open Medical menu @@ -86,10 +66,6 @@ Znovu otevřít zdravotnickou nabídku Ri-apri Menù Medico Ré-ouvrir le menu médical - 治療メニューを再びひらく - 의료 메뉴 다시 열기 - 重新开启医疗选单 - 重新開啟醫療選單 Re-open the medical menu after succesful treatment @@ -101,10 +77,6 @@ Znovu otevřít zdravotnickou nabídku po úspěšné léčbě Ri-Apri il Menù Medico dopo un trattamento riuscito Ré-ouvrir le menu médical après un traitement réussi - 治療が終わったあと、再び治療メニューをひらく - 성공적으로 치료한후에 의료 메뉴를 다시 엽니다 - 当治疗成功后重新打开医疗选单 - 當治療成功後重新打開醫療選單 Open Medical Menu @@ -116,10 +88,6 @@ Otevřít zdravotnickou nabídku Apri Menù Medico Ouvir le menu médical - 治療メニューをひらく - 의료 메뉴 열기 - 开起医疗选单 - 開起醫療選單 Medical Menu Settings @@ -131,10 +99,6 @@ Nastavení zdravotnické nabídky Impostazioni Menù Medico Réglages du menu médical - 治療メニューの設定 - 의료 메뉴 설정 - 医疗选单设定 - 醫療選單設定 Configure the usage of the Medical Menu @@ -146,10 +110,6 @@ Konfigurace využití zdravotnické nabídky Configura l'uso del Menù Medico Configurer l'utilisation du menu médical - 治療メニューを使うための設定 - 의료 메뉴 사용의 설정 - 设置医疗选单的使用 - 設置醫療選單的使用 EXAMINE & TREATMENT @@ -161,10 +121,6 @@ EXAMINAR & TRATAMENTO VYŠETŘENÍ & LÉČBA ESAMINA & TRATTA - 診断 & 治療 - 검사 / 치료 - 检查 & 治疗 - 檢查 & 治療 STATUS @@ -176,10 +132,6 @@ ESTADO STAV STATO - 状態 - 상태 - 状态 - 狀態 OVERVIEW @@ -191,10 +143,6 @@ VISÃO GERAL PŘEHLED PANORAMICA - オーバービュー - 개요 - 概述 - 概述 ACTIVITY LOG @@ -206,10 +154,6 @@ REGISTRO DE ATIVIDADE PROTOKOL LOG ATTIVITA' - 治療履歴 - 활동 로그 - 医疗纪录 - 醫療紀錄 QUICK VIEW @@ -221,10 +165,6 @@ VISÃO RÁPIDA RYCHLÝ NÁHLED VISTA RAPIDA - クイック ビュー - 퀵 뷰 - 快速检查 - 快速檢查 View triage Card @@ -236,10 +176,6 @@ Ver cartão de triagem Zkontrolovat štítek Guarda Triage Card - トリアージ カードを見る - 부상자 카드 보기 - 查看诊断卡 - 查看診斷卡 Examine Patient @@ -251,10 +187,6 @@ Examinar paciente Zkontrolovat pacienta Esamina Paziente - 患者を調べる - 환자 검사하기 - 检查伤者 - 檢查傷者 Bandage / Fractures @@ -266,10 +198,6 @@ Bandagens / Fraturas Bandáž / Zlomeniny Bendaggi/Fratture - 包帯 / 骨折 - 붕대 / 골절 - 绷带 / 骨折 - 繃帶 / 骨折 Medication @@ -281,10 +209,6 @@ Medicação Léky Medicazione - 薬物による治療 - 약물 치료 - 药物 - 藥物 Airway Management @@ -296,10 +220,6 @@ Dýchací systém Gestione Vie Respiratorie Atemwegssicherung - 気道を確保 - 기도 관리 - 呼吸道管理 - 呼吸道管理 Advanced Treatments @@ -311,10 +231,6 @@ Tratamentos avançados Pokročilé ošetření Trattamenti Avanzati - 高度な治療 - 고급 치료 - 进阶治疗 - 進階治療 Drag/Carry @@ -326,10 +242,6 @@ Arrastar/Carregar Táhnout/Nést Trascina/Trasporta - 引きずる / 運ぶ - 끌기 / 들기 - 拖 / 背 - 拖 / 背 Toggle (Self) @@ -341,115 +253,83 @@ Alternar (Si mesmo) Přepnout (na sebe) Attiva (Te Stesso) - トグル (自分) - 토글 (자신) - 切换 (自己) - 切換 (自己) Select triage status Setze Status auf der Triagekarte Сортировка Seleccionar estado de Triage - Sélectionner l'état de triage + Selectioner l'état de triage Wybierz priorytet Selecionar estado de triagem Vybrat prioritu Seleziona stato Triage - トリアージによる状態を選択 - 부상 상태 고르기 - 选择分诊状态 - 選擇分診狀態 Select Head Wähle Kopf Выбрать голову Seleccionar Cabeza - Sélectionner la tête + Selectioner Tête Wybierz głowę Selecionar Cabeça Vybrat Hlavu Seleziona Testa - 頭部を選ぶ - 머리 선택 - 选择头部 - 選擇頭部 Select Torso Wähle Torso Выбрать торс Seleccionar Torso - Sélectionner le torse + Selectioner Torse Wybierz tors Selecionar Torso Vybrat Trup Seleziona Torso - 胴体を選ぶ - 몸통 선택 - 选择身体 - 選擇身體 Select Left Arm Wähle linken Arm Выбрать левую руку Seleccionar Brazo Izquierdo - Sélectionner le bras gauche + Selectioner Bras Gauche Wybierz lewą rękę Selecionar Braço Esquerdo Vybrat Levou ruku Seleziona Braccio Sinistro - 左腕を選ぶ - 왼쪽 팔 선택 - 选择左手 - 選擇左手 Select Right Arm Wähle rechten Arm Выбрать правую руку Seleccionar Brazo Derecho - Sélectionner le bras droit + Selectioner Bras Droit Wybierz prawą rękę Selecionar Braço Direito Vybrat Pravou ruku Seleziona Braccio Destro - 右腕を選ぶ - 오른쪽 팔 선택 - 选择右手 - 選擇右手 Select Left Leg Wähle linkes Bein Выбрать левую ногу Seleccionar Pierna Izquierda - Sélectionner la jambe gauche + Selectioner Jambe Gauche Wybierz lewą nogę Selecionar Perna Esquerda Vybrat Levou nohu Seleziona Gamba Sinistra - 左足を選ぶ - 왼쪽 다리 선택 - 选择左脚 - 選擇左腳 Select Right Leg Wähle rechtes Bein Выбрать правую ногу Seleccionar Pierna Derecha - Sélectionner la jambe droite + Selectioner Jambe Droite Wybierz prawą nogę Selecionar Perna Direita Vybrat Pravou nohu Seleziona Gamba Destra - 右足を選ぶ - 오른쪽 다리 선택 - 选择右脚 - 選擇右腳 Head @@ -461,10 +341,6 @@ Caebça Hlava Testa - 頭部 - 머리 - 头部 - 頭部 Torso @@ -476,85 +352,61 @@ Trup Torso Torso - 胴体 - 몸통 - 身体 - 身體 Left Arm Linker Arm Левая рука Brazo Izquierdo - Bras gauche + Bras Gauche Lewa ręka Braço Esquerdo Levá Ruka Braccio Sinistro - 左腕 - 왼쪽 팔 - 左手 - 左手 Right Arm Rechter Arm Правая рука Brazo Derecho - Bras droit + Bras Droit Prawa ręka Braço Direito Pravá Ruka Braccio Destro - 右腕 - 오른쪽 팔 - 右手 - 右手 Left Leg Linkes Bein Левая нога Pierna Izquierda - Jambe gauche + Jambe Gauche Lewa noga Perna Esquerda Levá Noha Gamba Sinistra - 左足 - 왼쪽 다리 - 左脚 - 左腳 Right Leg Rechtes Bein Правая нога Pierna Derecha - Jambe droite + Jambe Droite Prawa noga Perna Direita Pravá Noha Gamba Destra - 右足 - 오른쪽 다리 - 右脚 - 右腳 Body Part: %1 Körperteil: %1 Часть тела: %1 Parte del cuerpo: %1 - Partie du corps : %1 + Partie du corps: %1 Część ciała: %1 Parte do corpo: %1 Část těla: %1 Parte del Corpo: %1 - 身体の一部: %1 - 신체 부위: %1 - 身体部位: %1 - 身體部位: %1 Small @@ -566,10 +418,6 @@ Pequeno Malý Piccolo - 小さい - - - Medium @@ -581,10 +429,6 @@ Médio Střední Medio - 中くらい - - - Large @@ -596,25 +440,17 @@ Grande Velký Grande - 大きい - - - There are %2 %1 Open Wounds Er hat %2 offene Wunden (%1) %2 открытые раны %1 Hay %2 Heridas Abiertas %1 - Il y a %2 %1 blessure(s) ouverte(s) + Il y a %2 %1 Blessure(s) Ouverte(s) Widzisz otwarte rany w ilości %2 o %1 rozmiarze Existem %2 ferimentos abertos %1 Jsou zde %2 %1 otevřené rány Ci sono %2 %1 Ferite Aperte - 開いている傷口が %2 %1 ほどあるようだ - 여기 %2 %1 크기의 열린 상처가 있다 - 有 %2 %1 开放性伤口 - 有 %2 %1 開放性傷口 There is 1 %1 Open Wound @@ -626,70 +462,50 @@ Existe 1 %1 ferimento aberto Je zde 1 %1 otevřená rána C'è 1 %1 Ferita Aperta - 1 つの空いている %1 傷口 - 여기 %1 크기의 열린 상처가 있다 - 有 1 %1 开放性伤口 - 有 1 %1 開放性傷口 There is a partial %1 Open wound Er hat eine zum Teil offene Wunde (%1) Частично открытая рана %1 Hay una herida parcial abierta %1 - Il y a une blessure partiellement ouverte %1 + Il y a une Blessure Patiellement Ouverte %1 Widzisz częściowo otwartą ranę o %1 rozmiarze Existe um ferimento parcial aberto %1 Je zde částečně %1 otevřená rána C'è 1 parziale %1 Ferita Aperta - 部分的に開いている %1 の傷口がある - 여기 부분적으로 %1 크기의 상처가 있다 - 有部分 %1 开放性伤口 - 有部分 %1 開放性傷口 There are %2 %1 Bandaged Wounds Er hat %2 verbundene Wunden (%1) %2 перевязанные раны %1 Hay %2 Heridas %1 Vendadas - Il y a %2 %1 blessure(s) bandée(s) + Il y a %2 %1 Blessure(s) Bandée(s) Widzisz %2 zabandażowanych ran o %1 rozmiarze Existem %2 ferimentos %1 tratados Jsou zde %2 %1 ovázané rány Ci sono %2 %1 Ferite Bendate - ここには %2 %1 の処置された傷がある - 여기에 붕대를 감은 %2 %1 크기의 상처가 있다 - 有 %2 %1 包扎过伤口 - 有 %2 %1 包紮過傷口 There is 1 %1 Bandaged Wound Er hat 1 verbundene Wunde (%1) 1 перевязанная рана %1 Hay 1 Herida Vendada %1 - Il y a 1 %1 blessure bandée + Il y a 1 %1 Blessure Bandée Widzisz 1 zabandażowaną ranę o %1 rozmiarze Existe 1 ferimento %1 tratado Je zde 1 %1 ovázaná rána C'è 1 %1 Ferita Bendata - 1 つの包帯で巻かれている %1 傷 - 여기에 붕대를 감은 %1 크기의 상처가 있다 - 有 1 %1 包扎过伤口 - 有 1 %1 包紮過傷口 There is a partial %1 Bandaged wound Er hat eine zum Teil verbundene Wunde (%1) Частично перевязанная рана %1 Hay una Herida parcial %1 Vendada - Il y a %1 blessure partiellement bandée + Il y a %1 Blessure Partielment Bandée Widzisz 1 częściowo zabandażowaną ranę o %1 rozmiarze Existe um ferimento parcial tratado %1 Je zde částěčně %1 ovázaná rána C'è 1 parziale %1 Ferita Bendata - 患者には %1 の包帯で処置された傷がある - 여기 부분적으로 붕대질한 %1 크기의 상처가 있다 - 有部分 %1 包扎过伤口 - 有部分 %1 包紮過傷口 Normal breathing @@ -701,10 +517,6 @@ Respiração normal Normální dýchání Respirazione Normale - 通常の呼吸 - 정상 호흡 - 正常呼吸 - 正常呼吸 No breathing @@ -716,10 +528,6 @@ Sem respiração Nedýchá Nessuna Respirazione - 息をしていない - 호흡이 없음 - 没有呼吸 - 沒有呼吸 Difficult breathing @@ -731,10 +539,6 @@ Dificuldade para respirar Potíže s dýcháním Difficoltà Respiratorie - 呼吸が難しそうだ - 호흡 곤란 - 呼吸困难 - 呼吸困難 Almost no breathing @@ -746,10 +550,6 @@ Quase sem respiração Téměř nedýchá Quasi nessuna Respirazione - ほとんど呼吸していない - 호흡이 거의 없음 - 几乎没有呼吸 - 幾乎沒有呼吸 Bleeding @@ -761,10 +561,6 @@ Sangrando Krvácí Sanguinamento - 出血 - 출혈 - 出血中 - 出血中 in Pain @@ -776,25 +572,17 @@ Com dor v bolestech in Dolore - 痛みがある - 고통 - 疼痛中 - 疼痛中 Lost a lot of Blood hat sehr viel Blut verloren Большая кровопотеря Mucha Sangre perdida - A perdu beaucoup de sang + A Perdu Bcp de Sang Stracił dużo krwi Perdeu muito sangue Ztratil hodně krve Perso molto Sangue - 大量出血している - 많은 피를 흘림 - 大量失血 - 大量失血 Tourniquet [CAT] @@ -806,10 +594,6 @@ Torniquete [CAT] Škrtidlo [CAT] Laccio Emostatico [CAT] - 止血帯 [CAT] - 지혈대 [CAT] - 军用止血带 - 軍用止血帶 Nasopharyngeal Tube [NPA] @@ -821,10 +605,6 @@ Tubo nasofaríngeo [NPA] Nasofaryngeální trubice [NPA] Tubo Nasofaringeo [NPA] - 鼻咽頭チューブ [NPA] - 비-인두 기도기 [NPA] - 鼻咽管 - 鼻咽管 - + \ No newline at end of file diff --git a/addons/microdagr/CfgUIGrids.hpp b/addons/microdagr/CfgUIGrids.hpp deleted file mode 100644 index 5d7b921800..0000000000 --- a/addons/microdagr/CfgUIGrids.hpp +++ /dev/null @@ -1,21 +0,0 @@ -class CfgUIGrids { - class IGUI { - 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)"}; - }; - }; - }; - - class Variables { - class grid_ACE_microDagr { - displayName = COMPONENT_NAME; - description = "ACE MicroDagr"; - preview = QPATHTOF(ui\IGUI_preview_ca.paa); - saveToProfile[] = {0,1,2,3}; - canResize = 1; - }; - }; - }; -}; diff --git a/addons/microdagr/UI/IGUI_preview_ca.paa b/addons/microdagr/UI/IGUI_preview_ca.paa deleted file mode 100644 index 12cbdb5f9b..0000000000 Binary files a/addons/microdagr/UI/IGUI_preview_ca.paa and /dev/null differ diff --git a/addons/microdagr/XEH_preInit.sqf b/addons/microdagr/XEH_preInit.sqf index c6cdd0bbef..ba262ec8c5 100644 --- a/addons/microdagr/XEH_preInit.sqf +++ b/addons/microdagr/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; //Functions that are called for each draw of the map: GVAR(miniMapDrawHandlers) = []; diff --git a/addons/microdagr/config.cpp b/addons/microdagr/config.cpp index a138a194d5..5d33c073e1 100644 --- a/addons/microdagr/config.cpp +++ b/addons/microdagr/config.cpp @@ -18,5 +18,8 @@ class CfgPatches { #include "CfgWeapons.hpp" #include "CfgVehicles.hpp" #include "gui.hpp" -#include "CfgUIGrids.hpp" #include "ACE_Settings.hpp" + +class ACE_newEvents { + RangerfinderData = QEGVAR(vector,rangefinderData); +}; diff --git a/addons/microdagr/functions/fnc_mapOnDrawEH.sqf b/addons/microdagr/functions/fnc_mapOnDrawEH.sqf index b3b28775d9..92d647f348 100644 --- a/addons/microdagr/functions/fnc_mapOnDrawEH.sqf +++ b/addons/microdagr/functions/fnc_mapOnDrawEH.sqf @@ -42,7 +42,7 @@ if (GVAR(currentApplicationPage) == 1) then { }; }; if ((count _targetPos) == 3) then { - _relBearing = (ACE_player getDir _targetPos) - (([ACE_player] call CBA_fnc_headDir) select 0); + _relBearing = [ACE_player, _targetPos] call BIS_fnc_relativeDirTo; _theMap drawIcon [QUOTE(PATHTO_R(images\compass_needle.paa)), [1,0.564,0.564,1], DUMMY_POS, _size, _size, _relBearing, '', 0 ]; }; }; diff --git a/addons/microdagr/gui.hpp b/addons/microdagr/gui.hpp index 1404f6b81d..fe15bb7bb2 100644 --- a/addons/microdagr/gui.hpp +++ b/addons/microdagr/gui.hpp @@ -59,10 +59,10 @@ class GVAR(TheDialog) { //Redfine Scaling for the RscTitle -#define PROFILE_X (profilenamespace getVariable ['IGUI_grid_ACE_microDagr_X', 0]) -#define PROFILE_Y (profilenamespace getVariable ['IGUI_grid_ACE_microDagr_Y', 0]) -#define PROFILE_W (profilenamespace getVariable ['IGUI_grid_ACE_microDagr_W', 1]) -#define PROFILE_H ((16/9) * (profilenamespace getVariable ['IGUI_grid_ACE_microDagr_W', 1])) +#define PROFILE_X (profilenamespace getVariable ['IGUI_GRID_GPS_X', 0]) +#define PROFILE_Y (profilenamespace getVariable ['IGUI_GRID_GPS_Y', 0]) +#define PROFILE_W (profilenamespace getVariable ['IGUI_GRID_GPS_W', 1]) +#define PROFILE_H ((16/9) * (profilenamespace getVariable ['IGUI_GRID_GPS_W', 1])) //Need undef's for pboProject #undef X_PART diff --git a/addons/microdagr/script_component.hpp b/addons/microdagr/script_component.hpp index 56966b345d..60d7caaa80 100644 --- a/addons/microdagr/script_component.hpp +++ b/addons/microdagr/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MICRODAGR diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml index af18c39c03..c20ea7aede 100644 --- a/addons/microdagr/stringtable.xml +++ b/addons/microdagr/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ MicroDAGR GPS GPS MicroDAGR GPS MicroDAGR - MicroDAGR GPS - MicroDAGR GPS - 微型军用GPS接收器 - 微型軍用GPS接收器 MicroDAGR advanced GPS receiver @@ -28,10 +24,6 @@ MicroDAGR fejlett GPS vevőegység Ricevitore GPS avanzato MicroDAGR Recepitor GPS avançado MicroDAGR - MicroDAGR は改良された GPS 受信機です - MicroDAGR 고급 위성항법 수신기 - 微型军用高级防御GPS接收器 - 微型軍用高級防禦GPS接收器 Angular Unit: @@ -44,10 +36,6 @@ Szögmértékegység: Unità angolare: Unidade Angular: - 角度の種類: - 각도의 단위: - 角密位: - 角密位: Mils @@ -60,10 +48,6 @@ Mil Mils Mils: - ミリ ラジアン - - 密位 - 密位 Show Waypoints On Map: @@ -76,10 +60,6 @@ Útvonalpontok mutatása a térképen: Mostra waypoint sulla mappa: Mostrar Waypoints no mapa: - 地図へウェイポイントを表示: - 웨이포인트를 지도에 보이기: - 显示路径点在地图上: - 顯示路徑點在地圖上: Degrees @@ -92,10 +72,6 @@ Fok Gradi Graus - 角度 - 각도 - - On @@ -108,10 +84,6 @@ Вкл. Encendido Be - 有効 - 켜기 - 开启 - 開啟 Off @@ -124,10 +96,6 @@ Выкл. Apagado Ki - 無効 - 끄기 - 关闭 - 關閉 Enter Grid Cords: @@ -140,10 +108,6 @@ Add meg a rácskoordinátákat: Introduci griglia coordinate: Digite as Ccords. do Grid - 座標を入力: - 망 좌표 입력: - 输入网格座标: - 輸入網格座標: Name of [%1] @@ -156,10 +120,6 @@ [%1] neve Nome di [%1] Nome do [%1] - [%1] の名前 - [%1] 의 이름 - 名称 [%1] - 名稱 [%1] MGRS-New @@ -172,10 +132,6 @@ MGRS-új Nuovo MGRS MGRS-Novo - MGRS-New - MGRS-새 것 - 军事网格座标系统-新型 - 軍事網格座標系統-新型 WGD @@ -188,10 +144,6 @@ WGD WGD WGD - WGD - WGD - 世界座标 - 世界座標 Range: @@ -204,10 +156,6 @@ Távolság: Distanza: Distância: - 距離: - 거리: - 范围: - 範圍: Compass Direction @@ -220,10 +168,6 @@ Irányszög Azimut Direção na bússula - 方位磁石での方位 - 방위 - 指北针方位 - 指北針方位 Mark @@ -236,10 +180,6 @@ Jelölés Marca Marca - マーク - 표시 - 标记 - 標記 Waypoints @@ -252,10 +192,6 @@ Útvonalpontok waypoints Waypoints - ウェイポイント - 웨이포인트 - 路径点 - 路徑點 Connect To @@ -268,10 +204,6 @@ Csatlakozás Collega a Conectar à - 次に接続 - 연결 - 连接到 - 連接到 Settings @@ -284,10 +216,6 @@ Beállítások Impostaizoni Opções - 設定 - 설정 - 设定 - 設定 SetWP @@ -300,10 +228,6 @@ UP Beállítása Definisci WayPoints Definir WP - ウェイポイント設定 - 웨이포인트 설정 - 设置路径点 - 設置路徑點 Add @@ -316,10 +240,6 @@ Hozzáadás Aggiungi Adicionar - 追加 - 더하기 - 新增 - 新增 Delete @@ -332,10 +252,6 @@ Удалить Borrar Törlés - 削除 - 지우기 - 删除 - 刪除 Toggle MicroDAGR Display Mode @@ -348,10 +264,6 @@ MicroDAGR kijelzési mód váltása Alterna modalità display MicroDAGR Alternar Modo de Display do MicroDAGR - MicroDAGR の表示モード - MicroDAGR 화면 모드 토글 - 切换微型军用GPS接收器显示模式 - 切換微型軍用GPS接收器顯示模式 Show MicoDAGR @@ -364,10 +276,6 @@ MicroDAGR mutatása Mostra MicroDAGR Mostrar MicroDAGR - MicoDAGR を表示 - MicroDAGR 꺼내기 - 显示微型军用GPS接收器 - 顯示微型軍用GPS接收器 Configure MicroDAGR @@ -380,10 +288,6 @@ MicroDAGR konfigurálása ConfiguraMicroDAGR Configurar MicroDAGR - MicroDAGR を設定 - MicroDAGR 설정하기 - 设定微型军用GPS接收器 - 設定微型軍用GPS接收器 Close MicroDAGR @@ -396,10 +300,6 @@ MicroDAGR elrejtése Chiudi MicroDAGR Fechar MicroDAGR - MicroDAGR を閉じる - MicroDAGR 집어넣기 - 关闭微型军用GPS接收器 - 關閉微型軍用GPS接收器 MicroDAGR Map Fill @@ -412,10 +312,6 @@ MicroDAGR térképkitöltés Заполнение карты MicroDAGR Riempimento Mappa MicroDAGR - MicroDAGR での地図情報 - MicroDAGR - 지도채우기 - 微型军用GPS接收器地图资料 - 微型軍用GPS接收器地圖資料 MicroDAGR Map Fill @@ -428,10 +324,6 @@ MicroDAGR térképkitöltés Заполнение карты MicroDAGR Riempimento Mappa MicroDAGR - MicroDAGR での地図情報 - MicroDAGR - 지도채우기 - 微型军用GPS接收器地图资料 - 微型軍用GPS接收器地圖資料 How much map data is filled on MicroDAGR's @@ -444,10 +336,6 @@ Mennyi térképadatot tartalmaz a MicroDAGR Сколько данных должно отображаться на карте MicroDAGR Quanti dati sono trasferiti nella mappa del MicroDAGR - MicroDAGR で表示する地図情報を決定します - 얼마나 많은 데이터가 MicroDAGR에 있는지에 대한 정보 - 有多少地图数据会显示在微型军用GPS接收器 - 有多少地圖數據會顯示在微型軍用GPS接收器 Full Satellite + Buildings @@ -460,10 +348,6 @@ Teljes műholdas + épületek Спутник + Здания Satellite Completo + Edifici - 完全な衛星画像と建物 - 위성 사진 + 건물 - 完整卫星画面 + 建筑物位置 - 完整衛星畫面 + 建築物位置 Topographical + Roads @@ -476,10 +360,6 @@ Topográfia + utak Топография + Дороги Topografico + Strade - 地形と道路 - 지형학 도표 + 도로 - 地形 + 道路 - 地形 + 道路 None (Cannot use map view) @@ -492,10 +372,6 @@ Semmi (nem használható a térképnézet) Не показывать (запрещает использовать режим карты) Nessuno (Non puoi usare la vista mappa) - なし(地図表示を使えません) - 없음 (지도를 볼 수 없음) - 无 (无法检视地图) - 無 (無法檢視地圖) Controls how much data is filled on the microDAGR items. Less data restricts the map view to show less on the minimap. @@ -508,10 +384,6 @@ Meghatárroza a MicroDAGR objektumok térképének tartalmát. A kevesebb adat korlátozza a térképnézeti módot az eszközön. Контролирует, сколько данных должно отображаться на карте устройств MicroDAGR. Ограничивает объем отображаемых данных на миникарте. Controlla quanti dati sono presenti negli oggetti MicroDAGR. Meno dati costringono la vista mappa a mostrare meno informazioni nella minimappa. - アイテム上で表示されるデータ量を決定します。設定を減らすと地図上での情報が少なくなります。 - MicroDAGR에 얼마나 많은 데이터가 들어있는지 정합니다. 적을 수록 지도상에도 비춰지는게 적어집니다. - 设定有多少数据会显示在微型军用GPS接收器上. 这些资料的多寡会反映在迷你地图的显示上. - 設定有多少數據會顯示在微型軍用GPS接收器上. 這些資料的多寡會反映在迷你地圖的顯示上. - + \ No newline at end of file diff --git a/addons/minedetector/CfgVehicles.hpp b/addons/minedetector/CfgVehicles.hpp index ab6c06b4cb..14273b108c 100644 --- a/addons/minedetector/CfgVehicles.hpp +++ b/addons/minedetector/CfgVehicles.hpp @@ -1,9 +1,9 @@ class CfgVehicles { class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { - class TransportWeapons { - MACRO_ADDWEAPON(ACE_VMM3,4); - MACRO_ADDWEAPON(ACE_VMH3,4); + class TransportItems { + MACRO_ADDITEM(ACE_VMM3,4); + MACRO_ADDITEM(ACE_VMH3,4); }; }; diff --git a/addons/minedetector/XEH_postInit.sqf b/addons/minedetector/XEH_postInit.sqf index 7ea04b5a5d..4b842e3488 100644 --- a/addons/minedetector/XEH_postInit.sqf +++ b/addons/minedetector/XEH_postInit.sqf @@ -27,7 +27,7 @@ addMissionEventHandler ["Draw3D", { GVAR(debugDetector) params ["_detectorPointAGL", "_mines"]; drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [0,0,1,1], _detectorPointAGL, 1, 1, 0, "detector", 1, 0.02, "PuristaMedium"]; { - private _name = format ["%1@%2", typeOf _x, (floor ((_x distance _detectorPointAGL) * 10)) / 10]; + _name = format ["%1@%2", typeOf _x, (floor ((_x distance _detectorPointAGL) * 10)) / 10]; if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _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"]; } else { diff --git a/addons/minedetector/XEH_preInit.sqf b/addons/minedetector/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/minedetector/XEH_preInit.sqf +++ b/addons/minedetector/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/minedetector/functions/fnc_detectorLoop.sqf b/addons/minedetector/functions/fnc_detectorLoop.sqf index ef05046881..e5fd4d5bd3 100644 --- a/addons/minedetector/functions/fnc_detectorLoop.sqf +++ b/addons/minedetector/functions/fnc_detectorLoop.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [[args], 2] call ACE_minedetector_fnc_detectorLoop - * * Public: No */ diff --git a/addons/minedetector/functions/fnc_getDetectorConfig.sqf b/addons/minedetector/functions/fnc_getDetectorConfig.sqf index 8b78a0b9ee..ccafa83edd 100644 --- a/addons/minedetector/functions/fnc_getDetectorConfig.sqf +++ b/addons/minedetector/functions/fnc_getDetectorConfig.sqf @@ -18,8 +18,6 @@ params ["_detectorType"]; -if (_detectorType isEqualTo "") exitWith {[]}; - private _detectorConfig = GVAR(detectorConfigs) getVariable _detectorType; if (isNil "_detectorConfig") then { private _cfgEntry = (configFile >> "ACE_detector" >> "detectors" >> _detectorType); diff --git a/addons/minedetector/functions/fnc_playDetectorSound.sqf b/addons/minedetector/functions/fnc_playDetectorSound.sqf index 3c7a9aaf45..dc57532b8c 100644 --- a/addons/minedetector/functions/fnc_playDetectorSound.sqf +++ b/addons/minedetector/functions/fnc_playDetectorSound.sqf @@ -20,10 +20,10 @@ params ["_unit", "_soundClass"]; if (isNull _unit) exitWith { - ERROR_1("unit does not exist [%1]",_unit); + ACE_LOGERROR_1("unit does not exist [%1]",_unit); }; if (!alive _unit) exitWith { - ERROR_1("unit is not alive [%1]",_unit); + ACE_LOGERROR_1("unit is not alive [%1]",_unit); }; if (_unit getVariable [QGVAR(isUsingHeadphones), false] && {_unit == ACE_player}) then { diff --git a/addons/minedetector/script_component.hpp b/addons/minedetector/script_component.hpp index 154f1a05e2..f6a1d05dfc 100644 --- a/addons/minedetector/script_component.hpp +++ b/addons/minedetector/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MINEDETECTOR diff --git a/addons/minedetector/stringtable.xml b/addons/minedetector/stringtable.xml index 0e2e31e5a6..46c0d8c3b9 100644 --- a/addons/minedetector/stringtable.xml +++ b/addons/minedetector/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -6,104 +6,44 @@ Détecteur de métaux Детектор металла Detektor kovů - 地雷探知機 - Wykrywacz metali - Metalldetektor - 지뢰탐지기 - Metal detector - 金属探测器 - 金屬探測器 Metal detector Détecteur de métaux Детектор металла Detektor kovů - 地雷探知機 - Wykrywacz metali - Metalldetektor - 지뢰탐지기 - Metal detector - 金属探测器 - 金屬探測器 Activate Activer Включить Aktivovat - 起動 - Aktywuj - Aktivieren - 작동 - Attiva - 启用探测器 - 啟用探測器 Deactivate Désactiver Выключить Deaktivovat - 停止 - Deaktywuj - Deaktivieren - 끄기 - Disattiva - 停用探测器 - 停用探測器 Connect Headphones Подключить наушники Připojit sluchátka - ヘッドホンへつなぐ - Podłącz słuchawki - Kopfhörer verbinden - 헤드폰에 연결 - Connecter les écouteurs - Connetti Auricolari - 连接耳机 - 連接耳機 Disconnect Headphones Отключить наушники Odpojit sluchátka - ヘッドホンからはずす - Odłącz słuchawki - Kopfhörer trennen - 헤드폰 연결끊기 - Déconnecter les écouteurs - Disconnetti Auricolari - 断开耳机 - 斷開耳機 Headphones Connected Наушники подключены Sluchátka připojena - ヘッドホンへ接続された - Słuchawki podpięte - Kopfhörer verbunden - 헤드폰 연결됨 - Écouteurs connectés - Auricolari Connessi - 已连接耳机 - 已連接耳機 Headphones Disconnected Наушники отключены Sluchátka odpojena - ヘッドホンから外された - Słuchawki odpięte - Kopfhörer getrennt - 헤드폰 연결끊김 - Écouteurs déconnectés - Auricolari Disconnessi - 已断开耳机 - 已斷開耳機 - + \ No newline at end of file diff --git a/addons/missileguidance/ACE_Settings.hpp b/addons/missileguidance/ACE_Settings.hpp index 6394e75390..e73d533c08 100644 --- a/addons/missileguidance/ACE_Settings.hpp +++ b/addons/missileguidance/ACE_Settings.hpp @@ -2,8 +2,9 @@ class ACE_Settings { class GVAR(enabled) { value = 2; typeName = "SCALAR"; + isClientSettable = 1; displayName = CSTRING(Title); description = CSTRING(Desc); values[] = {CSTRING(Off), CSTRING(PlayerOnly), CSTRING(PlayerAndAi)}; }; -}; +}; \ No newline at end of file diff --git a/addons/missileguidance/CfgAmmo.hpp b/addons/missileguidance/CfgAmmo.hpp index 7c2fb90d22..592cf6d996 100644 --- a/addons/missileguidance/CfgAmmo.hpp +++ b/addons/missileguidance/CfgAmmo.hpp @@ -1,7 +1,44 @@ +enum { + ACE_LOBL = 1, + ACE_LOAL = 2 +}; + class CfgAmmo { class MissileBase; - class M_PG_AT: MissileBase {}; + class M_PG_AT: MissileBase { + model = "\A3\Weapons_F\Ammo\Rocket_01_fly_F"; + proxyShape = "\A3\Weapons_F\Ammo\Rocket_01_F"; + + // Reenable this settings when ACE laser targeting and missile guidance is reenabled + //laserLock = 1; + //airLock = 0; + //irLock = 0; + //weaponLockSystem = "4 + 16"; + //fuseDistance = 2; + //timeToLive = 60; + // Turn off arma crosshair-guidance + //manualControl = 0; + // ACE uses these values + //trackOversteer = 1; + //trackLead = 0; + + maxSpeed = 720; + maxControlRange = 5000; + maneuvrability = 8; + + simulationStep = 0.01; + airFriction = 0.1; + sideAirFriction = 0.16; + initTime = 0.002; + thrustTime = 1.07; + thrust = 530; + + effectsMissileInit = "MissileDAR1"; + effectsMissile = "missile2"; + whistleDist = 4; + muzzleEffect = ""; + }; class ACE_Hydra70_DAGR: M_PG_AT { displayName = CSTRING(Hydra70_DAGR); @@ -10,18 +47,13 @@ class CfgAmmo { description = CSTRING(Hydra70_DAGR_Desc); descriptionShort = CSTRING(Hydra70_DAGR_Desc); - irLock = 0; - laserLock = 0; - manualControl = 0; - maxSpeed = 300; - EGVAR(rearm,caliber) = 70; class ADDON { enabled = 1; - minDeflection = 0.0005; // Minium flap deflection for guidance - maxDeflection = 0.0025; // Maximum flap deflection for guidance + minDeflection = 0.00025; // Minium flap deflection for guidance + maxDeflection = 0.001; // Maximum flap deflection for guidance incDeflection = 0.0005; // The incrmeent in which deflection adjusts. canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode @@ -45,11 +77,31 @@ class CfgAmmo { }; }; + class ACE_Hellfire_AGM114K: ACE_Hydra70_DAGR { + displayName = CSTRING(Hellfire_AGM114K); + displayNameShort = CSTRING(Hellfire_AGM114K_Short); + + description = CSTRING(Hellfire_AGM114K_desc); + descriptionShort = CSTRING(Hellfire_AGM114K_desc); + + // @TODO: placeholder model to at least make it look different + model = "\A3\Weapons_F\Ammo\Missile_AT_03_fly_F"; + proxyShape = "\A3\Weapons_F\Ammo\Missile_AT_03_F"; + + hit = 1400; + indirectHit = 71; + indirectHitRange = 4.5; + effectsMissile = "missile2"; + + //Explicity add guidance config + class ADDON: ADDON {}; + }; + // Titan class M_Titan_AT: MissileBase {}; class ACE_Javelin_FGM148: M_Titan_AT { - irLock = 1; + irLock = 0; laserLock = 0; airLock = 0; @@ -88,8 +140,6 @@ class CfgAmmo { 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" }; diff --git a/addons/missileguidance/CfgMagazines.hpp b/addons/missileguidance/CfgMagazines.hpp index 7cc33b17a3..e4a84862ae 100644 --- a/addons/missileguidance/CfgMagazines.hpp +++ b/addons/missileguidance/CfgMagazines.hpp @@ -24,4 +24,30 @@ class CfgMagazines { descriptionShort = "24 Round DAGR"; weight = 72; }; + + // Hellfires + class 6Rnd_ACE_Hellfire_AGM114K : 12Rnd_PG_missiles { + count = 12; + ammo = "ACE_Hellfire_AGM114K"; + displayName = "6Rnd_ACE_Hellfire_AGM114K"; + displayNameShort = "6Rnd_ACE_Hellfire_AGM114K"; + descriptionShort = "6Rnd_ACE_Hellfire_AGM114K"; + weight = 36; + + }; + class 12Rnd_ACE_Hellfire_AGM114K : 6Rnd_ACE_Hydra70_DAGR { + count = 12; + displayName = "12Rnd_ACE_Hellfire_AGM114K"; + displayNameShort = "12Rnd_ACE_Hellfire_AGM114K"; + descriptionShort = "12Rnd_ACE_Hellfire_AGM114K"; + weight = 72; + }; + class 24Rnd_ACE_Hellfire_AGM114K : 6Rnd_ACE_Hydra70_DAGR { + count = 24; + displayName = "24Rnd_ACE_Hellfire_AGM114K"; + displayNameShort = "24Rnd_ACE_Hellfire_AGM114K"; + descriptionShort = "24Rnd_ACE_Hellfire_AGM114K"; + weight = 72; + }; + }; diff --git a/addons/missileguidance/CfgVehicles.hpp b/addons/missileguidance/CfgVehicles.hpp new file mode 100644 index 0000000000..be5c31a3f6 --- /dev/null +++ b/addons/missileguidance/CfgVehicles.hpp @@ -0,0 +1,36 @@ +class CfgVehicles { + + class AllVehicles; + class Air: AllVehicles { + class Turrets; + }; + + class Helicopter: Air { + class Turrets { + class MainTurret; + }; + }; + class Helicopter_Base_F: Helicopter {}; + class Heli_Attack_01_base_F: Helicopter_Base_F {}; + class B_Heli_Attack_01_F : Heli_Attack_01_base_F { + class Turrets: Turrets { + class MainTurret; + }; + }; + + class ACE_Comanche_Test : B_Heli_Attack_01_F { + scope = 1; + scopeCurator = 0; + displayName = "ACE_Comanche_Test"; + author = "ACE Team"; + class Library { + libTextDesc = "ACE_Comanche_Test"; + }; + class Turrets: Turrets { + class MainTurret: MainTurret { + magazines[] = {"ACE_500Rnd_20mm_shells_Comanche", "24Rnd_ACE_Hellfire_AGM114K"}; + }; + }; + }; + +}; diff --git a/addons/missileguidance/CfgWeapons.hpp b/addons/missileguidance/CfgWeapons.hpp index b03628e777..f57e3ab0df 100644 --- a/addons/missileguidance/CfgWeapons.hpp +++ b/addons/missileguidance/CfgWeapons.hpp @@ -1,10 +1,12 @@ +class Mode_SemiAuto; class CfgWeapons { - class missiles_DAGR; + class CannonCore; + class LauncherCore; - class GVAR(dagr): missiles_DAGR { - canLock = 0; - magazines[] = {"6Rnd_ACE_Hydra70_DAGR","12Rnd_ACE_Hydra70_DAGR","24Rnd_ACE_Hydra70_DAGR"}; - lockingTargetSound[] = {"",0,1}; - lockedTargetSound[] = {"",0,1}; + class RocketPods: LauncherCore { + // canLock = 1; + }; + class missiles_DAGR : RocketPods { + canLock = 2; }; }; diff --git a/addons/missileguidance/XEH_PREP.hpp b/addons/missileguidance/XEH_PREP.hpp index ee2b7328cb..55948e7171 100644 --- a/addons/missileguidance/XEH_PREP.hpp +++ b/addons/missileguidance/XEH_PREP.hpp @@ -1,6 +1,6 @@ -LOG("prep"); -PREP(cycleAttackProfileKeyDown); +PREP(rotateVectLineGetMap); +PREP(rotateVectLine); PREP(changeMissileDirection); PREP(checkSeekerAngle); @@ -17,11 +17,11 @@ PREP(doHandoff); PREP(handleHandoff); // Attack Profiles -PREP(attackProfile_AIR); -PREP(attackProfile_DIR); -PREP(attackProfile_HI); PREP(attackProfile_LIN); +PREP(attackProfile_DIR); PREP(attackProfile_MID); +PREP(attackProfile_HI); +PREP(attackProfile_AIR); // Javelin profiles PREP(attackProfile_JAV_DIR); diff --git a/addons/missileguidance/XEH_post_init.sqf b/addons/missileguidance/XEH_post_init.sqf index cc09b1f0ac..282aac5503 100644 --- a/addons/missileguidance/XEH_post_init.sqf +++ b/addons/missileguidance/XEH_post_init.sqf @@ -1,13 +1,3 @@ #include "script_component.hpp" [QGVAR(handoff), {_this call FUNC(handleHandoff)}] call CBA_fnc_addEventHandler; - -["ACE3 Weapons", QGVAR(cycleFireMode), localize LSTRING(CycleFireMode), -{ - [] call FUNC(cycleAttackProfileKeyDown); - false -}, -{ - false -}, -[15, [false, true, false]], false] call CBA_fnc_addKeybind; //Ctrl+Tab Key diff --git a/addons/missileguidance/XEH_pre_init.sqf b/addons/missileguidance/XEH_pre_init.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/missileguidance/XEH_pre_init.sqf +++ b/addons/missileguidance/XEH_pre_init.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/missileguidance/config.cpp b/addons/missileguidance/config.cpp index ce75e277b4..c97a542a7f 100644 --- a/addons/missileguidance/config.cpp +++ b/addons/missileguidance/config.cpp @@ -20,3 +20,4 @@ class CfgPatches { #include "CfgAmmo.hpp" #include "CfgMagazines.hpp" #include "CfgWeapons.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf index 3d2b5f36b8..9909124e2f 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf @@ -1,22 +1,4 @@ -/* - * Author: jaynus / nou - * Attack profile: AIR - * TODO: falls back to Linear - * - * Arguments: - * 0: Seeker Target PosASL - * 1: Guidance Arg Array - * 2: Seeker State - * - * Return Value: - * Missile Aim PosASL - * - * Example: - * [[1,2,3], [], []] call ace_missileguidance_fnc_attackProfile_AIR; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" -_this call FUNC(attackProfile_LIN); +_this call FUNC(attackProfile_LIN); \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_attackProfile_DIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_DIR.sqf index 8e049a9fe2..9909124e2f 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_DIR.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_DIR.sqf @@ -1,22 +1,4 @@ -/* - * Author: jaynus / nou - * Attack profile: DIR - * TODO: falls back to Linear - * - * Arguments: - * 0: Seeker Target PosASL - * 1: Guidance Arg Array - * 2: Seeker State - * - * Return Value: - * Missile Aim PosASL - * - * Example: - * [[1,2,3], [], []] call ace_missileguidance_fnc_attackProfile_DIR; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" -_this call FUNC(attackProfile_LIN); +_this call FUNC(attackProfile_LIN); \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_attackProfile_HI.sqf b/addons/missileguidance/functions/fnc_attackProfile_HI.sqf index 279196a888..9909124e2f 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_HI.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_HI.sqf @@ -1,22 +1,4 @@ -/* - * Author: jaynus / nou - * Attack profile: HI - * TODO: falls back to Linear - * - * Arguments: - * 0: Seeker Target PosASL - * 1: Guidance Arg Array - * 2: Attack Profile State - * - * Return Value: - * Missile Aim PosASL - * - * Example: - * [[1,2,3], [], []] call ace_missileguidance_fnc_attackProfile_HI; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" -_this call FUNC(attackProfile_LIN); +_this call FUNC(attackProfile_LIN); \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf index e709aed112..1fec6b1ee0 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf @@ -1,21 +1,4 @@ -/* - * Author: jaynus / nou - * Attack profile: Javelin Dir - * - * Arguments: - * 0: Seeker Target PosASL - * 1: Guidance Arg Array - * 2: Attack Profile State - * - * Return Value: - * Missile Aim PosASL - * - * Example: - * [[1,2,3], [], []] call ace_missileguidance_fnc_attackProfile_JAV_DIR; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" #define STAGE_LAUNCH 1 @@ -23,45 +6,50 @@ #define STAGE_COAST 3 #define STAGE_TERMINAL 4 -params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; -_args params ["_firedEH"]; -_firedEH params ["_shooter","","","","","","_projectile"]; +EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); +private ["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"]; +private ["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos", "_state"]; +private ["_cruisAlt", "_distanceShooterToTarget", "_shooterPos"]; +_seekerTargetPos = _this select 0; +_launchParams = _this select 1; -if (_seekerTargetPos isEqualTo [0,0,0]) exitWith {_seekerTargetPos}; +_target = _launchParams select 0; +_targetLaunchParams = _launchParams select 1; -if (_attackProfileStateParams isEqualTo []) then { - _attackProfileStateParams set [0, STAGE_LAUNCH]; +_state = _this select 2; +if( (count _state) < 1) then { + _state set[0, STAGE_LAUNCH]; }; -private _shooterPos = getPosASL _shooter; -private _projectilePos = getPosASL _projectile; +_shooterPos = getPosASL _shooter; +_projectilePos = getPosASL _projectile; -private _distanceToTarget = _projectilePos vectorDistance _seekerTargetPos; -private _distanceToShooter = _projectilePos vectorDistance _shooterPos; -private _distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos; +_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos; +_distanceToShooter = _projectilePos vectorDistance _shooterPos; +_distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos; TRACE_2("", _distanceToTarget, _distanceToShooter); // Add height depending on distance for compensate -private _returnTargetPos = _seekerTargetPos; +_returnTargetPos = _seekerTargetPos; -switch (_attackProfileStateParams select 0) do { +switch( (_state select 0) ) do { case STAGE_LAUNCH: { TRACE_1("STAGE_LAUNCH",""); - if (_distanceToShooter < 10) then { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2]; + if(_distanceToShooter < 10) then { + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget * 2]; } else { - _attackProfileStateParams set [0, STAGE_CLIMB]; + _state set [0, STAGE_CLIMB]; }; }; case STAGE_CLIMB: { TRACE_1("STAGE_CLIMB",""); - private _cruisAlt = 60 * (_distanceShooterToTarget/2000); + _cruisAlt = 60 * (_distanceShooterToTarget/2000); - if ( ((ASLToAGL _projectilePos) select 2) - ((ASLToAGL _seekerTargetPos) select 2) >= _cruisAlt) then { - _attackProfileStateParams set [0, STAGE_TERMINAL]; + if( ((ASLToATL _projectilePos) select 2) - ((ASLToATL _seekerTargetPos) select 2) >= _cruisAlt) then { + _state set [0, STAGE_TERMINAL]; } else { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*1.5]; + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget * 1.5]; }; }; case STAGE_TERMINAL: { @@ -70,5 +58,9 @@ switch (_attackProfileStateParams select 0) do { }; }; +#ifdef DEBUG_MODE_FULL +drawLine3D [(ASLtoATL _returnTargetPos), (ASLtoATL _seekerTargetPos), [0, 1, 0, 1]]; +#endif + 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 34871cba8e..9a5a64f255 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf @@ -1,21 +1,4 @@ -/* - * Author: jaynus / nou - * Attack profile: Javelin Top - * - * Arguments: - * 0: Seeker Target PosASL - * 1: Guidance Arg Array - * 2: Attack Profile State - * - * Return Value: - * Missile Aim PosASL - * - * Example: - * [[1,2,3], [], []] call ace_missileguidance_fnc_attackProfile_JAV_TOP; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" #define STAGE_LAUNCH 1 @@ -23,69 +6,79 @@ #define STAGE_COAST 3 #define STAGE_TERMINAL 4 -params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; -_args params ["_firedEH"]; -_firedEH params ["_shooter","","","","","","_projectile"]; +EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); +private ["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"]; +private ["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos", "_state"]; +private ["_cruisAlt", "_distanceShooterToTarget", "_shooterPos"]; -if (_seekerTargetPos isEqualTo [0,0,0]) exitWith {_seekerTargetPos}; +_seekerTargetPos = _this select 0; +_launchParams = _this select 1; -if (_attackProfileStateParams isEqualTo []) then { - _attackProfileStateParams set [0, STAGE_LAUNCH]; +_target = _launchParams select 0; +_targetLaunchParams = _launchParams select 1; + +_state = _this select 2; +if( (count _state) < 1) then { + _state set[0, STAGE_LAUNCH]; }; -private _shooterPos = getPosASL _shooter; -private _projectilePos = getPosASL _projectile; +_shooterPos = getPosASL _shooter; +_projectilePos = getPosASL _projectile; -private _distanceToTarget = _projectilePos vectorDistance _seekerTargetPos; -private _distanceToShooter = _projectilePos vectorDistance _shooterPos; -private _distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos; +_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos; +_distanceToShooter = _projectilePos vectorDistance _shooterPos; +_distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos; TRACE_2("", _distanceToTarget, _distanceToShooter); // Add height depending on distance for compensate -private _returnTargetPos = _seekerTargetPos; +_returnTargetPos = _seekerTargetPos; -switch( (_attackProfileStateParams select 0) ) do { +switch( (_state select 0) ) do { case STAGE_LAUNCH: { TRACE_1("STAGE_LAUNCH",""); - if (_distanceToShooter < 10) then { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2]; + if(_distanceToShooter < 10) then { + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget * 2]; } else { - _attackProfileStateParams set [0, STAGE_CLIMB]; + _state set[0, STAGE_CLIMB]; }; }; case STAGE_CLIMB: { TRACE_1("STAGE_CLIMB",""); - private _cruisAlt = 140; - if (_distanceShooterToTarget < 1250) then { + _cruisAlt = 140; + if(_distanceShooterToTarget < 1250) then { _cruisAlt = 140 * (_distanceShooterToTarget/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]; + if(((ASLToATL _projectilePos) select 2) - ((ASLToATL _seekerTargetPos) select 2) >= _cruisAlt) then { + if(_cruisAlt < 140) then { + _state set[0, STAGE_TERMINAL]; } else { - _attackProfileStateParams set [0, STAGE_COAST]; + _state set[0, STAGE_COAST]; }; } else { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*1.5]; + _returnTargetPos = _seekerTargetPos vectorAdd [0, 0, _distanceToTarget * 1.5]; }; }; 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 { - _attackProfileStateParams set [0, STAGE_TERMINAL]; + TRACE_1("", ((ASLToATL _projectilePos) select 2) - (( ASLToATL _seekerTargetPos) select 2) ); + if(_distanceToTarget < (((ASLToATL _projectilePos) select 2) - (( ASLToATL _seekerTargetPos) select 2)) * 1.5) then { + _state set[0, STAGE_TERMINAL]; } else { - _returnTargetPos = _seekerTargetPos vectorAdd [0,0,(_projectilePos select 2)]; + _returnTargetPos = _seekerTargetPos vectorAdd [0, 0, (_projectilePos select 2)]; }; }; case STAGE_TERMINAL: { TRACE_1("STAGE_TERMINAL",""); - //_returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget * 0.02]; + //_returnTargetPos = _seekerTargetPos vectorAdd [0, 0, _distanceToTarget * 0.02]; _returnTargetPos = _seekerTargetPos; }; }; +#ifdef DEBUG_MODE_FULL +drawLine3D [(ASLtoATL _returnTargetPos), (ASLtoATL _seekerTargetPos), [0, 1, 0, 1]]; +#endif + 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 de8061a27c..f85643a8e2 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf @@ -1,65 +1,50 @@ -/* - * Author: jaynus / nou - * Attack profile: Linear (used by DAGR) - * - * Arguments: - * 0: Seeker Target PosASL - * 1: Guidance Arg Array - * 2: Attack Profile State - * - * Return Value: - * Missile Aim PosASL - * - * Example: - * [[1,2,3], [], []] call ace_missileguidance_fnc_attackProfile_LIN; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" -params ["_seekerTargetPos", "_args"]; -_args params ["_firedEH"]; -_firedEH params ["_shooter","","","","","","_projectile"]; +EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); +private ["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"]; +private ["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos", "_shooterPos"]; +_seekerTargetPos = _this select 0; +_launchParams = _this select 1; -if (_seekerTargetPos isEqualTo [0,0,0]) exitWith {_seekerTargetPos}; +_target = _launchParams select 0; +_targetLaunchParams = _launchParams select 1; -private _shooterPos = getPosASL _shooter; -private _projectilePos = getPosASL _projectile; +_shooterPos = getPosASL _shooter; +_projectilePos = getPosASL _projectile; -private _distanceToTarget = _projectilePos vectorDistance _seekerTargetPos; -private _distanceToShooter = _projectilePos vectorDistance _shooterPos; -private _distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos; +_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos; +_distanceToShooter = _projectilePos vectorDistance _shooterPos; -TRACE_2("", _distanceToTarget, _distanceToShooter); +TRACE_3("", _distanceToTarget, _distanceToShooter, _seekerTargetPos); // Add height depending on distance for compensate -private _addHeight = [0,0,0]; +_addHeight = [0,0,0]; // Always climb an arc on initial launch if we are close to the round -if ((((ASLtoAGL _projectilePos) select 2) < 5) && {_distanceToShooter < 15}) then { - _addHeight = _addHeight vectorAdd [0,0,_distanceToTarget]; - TRACE_1("climb - near shooter",_addHeight); +if( ((ASLtoATL _projectilePos) select 2) < 5 && _distanceToShooter < 15) then { + _addHeight = _addHeight vectorAdd [0,0,_distanceToTarget]; } else { // If we are below the target, increase the climbing arc - if (((_projectilePos select 2) < (_seekerTargetPos select 2)) && {_distanceToTarget > 100}) then { + if((_projectilePos select 2) < (_seekerTargetPos select 2) && _distanceToTarget > 100) then { _addHeight = _addHeight vectorAdd [0,0, ((_seekerTargetPos select 2) - (_projectilePos select 2))]; - TRACE_1("climb - below target and far",_addHeight); }; }; -// Handle arcing terminal low for high decent (when projectile above target) -if ((_projectilePos select 2) > (_seekerTargetPos select 2)) then { - if (_distanceToTarget < 100) then { - _addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5]; - TRACE_1("above - close",_addHeight); - } else { - TRACE_1("above - far",_addHeight); +// Handle arcing terminal low for high decent +if( (_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget < 100) then { + _addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5]; +} else { + if((_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget > 100) then { _addHeight = _addHeight vectorAdd [0,0, _distanceToTarget*0.02]; }; }; -private _returnTargetPos = _seekerTargetPos vectorAdd _addHeight; +_returnTargetPos = _seekerTargetPos vectorAdd _addHeight; -TRACE_2("Adjusted target position",_returnTargetPos,_addHeight); -_returnTargetPos; +#ifdef DEBUG_MODE_FULL +drawLine3D [(ASLtoATL _returnTargetPos) vectorAdd _addHeight, ASLtoATL _returnTargetPos, [0,1,0,1]]; +#endif + +TRACE_1("Adjusted target position", _returnTargetPos); +_returnTargetPos; \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_attackProfile_MID.sqf b/addons/missileguidance/functions/fnc_attackProfile_MID.sqf index 0349a101e4..9909124e2f 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_MID.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_MID.sqf @@ -1,22 +1,4 @@ -/* - * Author: jaynus / nou - * Attack profile: MID - * TODO: falls back to Linear - * - * Arguments: - * 0: Seeker Target PosASL - * 1: Guidance Arg Array - * 2: Attack Profile State - * - * Return Value: - * Missile Aim PosASL - * - * Example: - * [[1,2,3], [], []] call ace_missileguidance_fnc_attackProfile_MID; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" -_this call FUNC(attackProfile_LIN); +_this call FUNC(attackProfile_LIN); \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_changeMissileDirection.sqf b/addons/missileguidance/functions/fnc_changeMissileDirection.sqf index 28fb46fe28..f5fdee95a0 100644 --- a/addons/missileguidance/functions/fnc_changeMissileDirection.sqf +++ b/addons/missileguidance/functions/fnc_changeMissileDirection.sqf @@ -1,26 +1,11 @@ -/* - * Author: jaynus / nou - * Change a projectile's direction, maintaing speed - * - * Arguments: - * 0: Projectile - * 1: Direction (unit vector) - * - * Return Value: - * None - * - * Example: - * [missile, [0,1,0]] call ace_missileguidance_fnc_changeMissileDirection; - * - * Public: No - */ -// #define DEBUG_MODE_FULL #include "script_component.hpp" +private ["_projectile", "_v", "_l", "_r"]; -params ["_projectile", "_v"]; +_projectile = _this select 0; +_v = _this select 1; -private _l = sqrt ((_v select 0) ^ 2 + (_v select 1) ^ 2); -private _r = -(_v select 2) / _l; +_l = sqrt ((_v select 0) ^ 2 + (_v select 1) ^ 2); +_r = -(_v select 2) / _l; _projectile setVectorDirAndUp [ _v, [(_v select 0) * _r,(_v select 1) * _r, _l] ]; -_projectile setVelocity (_v vectorMultiply (vectorMagnitude (velocity _projectile))); +_projectile setVelocity (_v vectorMultiply (vectorMagnitude (velocity _projectile))); \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_checkLos.sqf b/addons/missileguidance/functions/fnc_checkLos.sqf index 1e1d3c7d3e..d41554dc65 100644 --- a/addons/missileguidance/functions/fnc_checkLos.sqf +++ b/addons/missileguidance/functions/fnc_checkLos.sqf @@ -3,25 +3,17 @@ * Returns whether the seeker object can see the target position with lineIntersect * * Arguments: - * 0: Seeker - * 1: Target + * 0: Seeker [Object] + * 1: Target [Object] * * Return Value: - * Has LOS - * - * Example: - * [player, cursorTarget] call ace_missileguidance_fnc_checkLOS; - * - * Public: No + * Boolean */ #include "script_component.hpp" params ["_seeker", "_target"]; -if ((isNil "_seeker") || {isNil "_target"}) exitWith { - ERROR_2("nil",_seeker,_target); - false -}; +if ((isNil "_seeker") || {isNil "_target"}) exitWith {false}; private _targetPos = getPosASL _target; private _targetAimPos = aimPos _target; @@ -29,11 +21,11 @@ private _seekerPos = getPosASL _seeker; private _return = true; if (!((terrainIntersectASL [_seekerPos, _targetPos]) && {terrainIntersectASL [_seekerPos, _targetAimPos]})) then { - if (lineIntersects [_seekerPos, _targetPos, _seeker, _target]) then { + if(lineIntersects [_seekerPos, _targetPos, _seeker, _target]) then { _return = false; }; } else { _return = false; }; -_return; +_return; \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf b/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf index 8ddc848594..9415f347b6 100644 --- a/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf +++ b/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf @@ -1,35 +1,31 @@ /* * Author: jaynus - * Returns whether the target position is within the maximum angle FOV of the provided seeker + * Returns whether the target position is within the maximum angle FOV of the provided seeker * objects current direction. * * Arguments: - * 0: Seeker - * 1: Target PosASL - * 2: Max Angle (degrees) - * + * 0: Seeker [Object] + * 1: Target [Position] + * 2: Max Angle [Degrees] + * * Return Value: - * Can See - * - * Example: - * [player, cursorTarget, 45] call ace_missileguidance_fnc_checkSeekerAngle; - * - * Public: No + * Boolean */ -// #define DEBUG_MODE_FULL + #include "script_component.hpp" +private ["_seeker", "_targetPos", "_seekerMaxAngle", "_sensorPos", "_testPointVector", "_testDotProduct"]; -params ["_seeker", "_targetPos", "_seekerMaxAngle"]; +_seeker = _this select 0; +_targetPos = _this select 1; +_seekerMaxAngle = _this select 2; -private _sensorPos = getPosASL _seeker; +_sensorPos = getPosASL _seeker; -private _testPointVector = vectorNormalized (_targetPos vectorDiff _sensorPos); -private _testDotProduct = (vectorNormalized (velocity _seeker)) vectorDotProduct _testPointVector; +_testPointVector = vectorNormalized (_targetPos vectorDiff _sensorPos); +_testDotProduct = (vectorNormalized (velocity _seeker)) vectorDotProduct _testPointVector; -TRACE_2("fov",acos _testDotProduct,_seekerMaxAngle); - -if (_testDotProduct < (cos _seekerMaxAngle)) exitWith { - false +if(_testDotProduct < (cos _seekerMaxAngle)) exitWith { + false }; -true +true \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf b/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf deleted file mode 100644 index a878924ed5..0000000000 --- a/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Author: PabstMirror - * Cycles fire mode for any missileGuidance enabled ammo that has multiple attack profiles - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ace_missileguidance_fnc_cycleAttackProfileKeyDown - * - * Public: No - */ - -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - -TRACE_1("cycle fire mode",_this); - -if (!alive ACE_player) exitWith {}; -if (!([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {}; - - -private ["_currentShooter", "_currentMagazine"]; -if (((vehicle ACE_player) == ACE_player) || {ACE_player call CBA_fnc_canUseWeapon}) then { - _currentShooter = ACE_player; - _currentMagazine = currentMagazine ACE_player; -} else { - _currentShooter = vehicle ACE_player; - private _turretPath = if (ACE_player == (driver _currentShooter)) then {[-1]} else {ACE_player call CBA_fnc_turretPath}; - _currentMagazine = _currentShooter currentMagazineTurret _turretPath; -}; -if (_currentMagazine == "") exitWith {TRACE_1("no magazine",_currentMagazine)}; - -private _ammo = getText (configFile >> "CfgMagazines" >> _currentMagazine >> "ammo"); - -TRACE_3("",_currentShooter,_currentMagazine,_ammo); - -// Bail if guidance is disabled for this ammo -if ((getNumber (configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON) >> "enabled")) != 1) exitWith {TRACE_1("not enabled",_ammo)}; - -// Verify ammo has explicity added guidance config (ignore inheritances) -private _configs = configProperties [(configFile >> "CfgAmmo" >> _ammo), QUOTE(configName _x == QUOTE(QUOTE(ADDON))), false]; -if ((count _configs) < 1) exitWith {TRACE_2("not explicity enabled",_ammo,_configs)}; - -private _attackProfiles = getArray (configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON) >> "attackProfiles"); -if ((count _attackProfiles) <= 1) exitWith {TRACE_1("no choices for attack profile",_attackProfiles)}; - -private _currentFireMode = _currentShooter getVariable [QGVAR(attackProfile), "#undefined"]; - -// Just like onFired, this is case sensitive! -private _index = _attackProfiles find _currentFireMode; -if (_index == -1) then { - _index = _attackProfiles find (getText (configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON) >> "defaultAttackProfile")); -}; -_index = (_index + 1) % (count _attackProfiles); -private _nextFireMode = _attackProfiles select _index; -TRACE_4("",_currentFireMode,_nextFireMode,_index,_attackProfiles); - -_currentShooter setVariable [QGVAR(attackProfile), _nextFireMode, false]; - -playSound "ACE_Sound_Click"; - -if ((getNumber (configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON) >> "showHintOnCycle")) == 1) then { - private _localizedName = getText (configFile >> QGVAR(AttackProfiles) >> _nextFireMode >> "name"); - [_localizedName] call EFUNC(common,displayTextStructured); -}; diff --git a/addons/missileguidance/functions/fnc_doAttackProfile.sqf b/addons/missileguidance/functions/fnc_doAttackProfile.sqf index 0d8de543ee..1c589838f5 100644 --- a/addons/missileguidance/functions/fnc_doAttackProfile.sqf +++ b/addons/missileguidance/functions/fnc_doAttackProfile.sqf @@ -1,40 +1,29 @@ -/* - * Author: jaynus / nou, PabstMirror - * Do attack profile with a valid seeker target location - * - * Arguments: - * 0: Seeker Target PosASL - * 1: Guidance Arg Array - * 2: Seeker State - * - * Return Value: - * Missile Aim PosASL - * - * Example: - * [[1,2,3], [], []] call ace_missileguidance_fnc_doAttackProfile; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" -params ["_seekerTargetPos", "_args"]; -_args params ["", "_launchParams"]; -_launchParams params ["", "", "", "_attackProfileName"]; +EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); +private ["_testName", "_attackProfilePos", "_attackProfile", "_attackProfileName", "_attackProfilesCfg", "_i", "_launchParams", "_testame", "_testProfile"]; +_launchParams = ((_this select 1) select 1); +_attackProfileName = _launchParams select 3; -private _attackProfileFunction = getText (configFile >> QGVAR(AttackProfiles) >> _attackProfileName >> "functionName"); +TRACE_1("Attacking profile", _attackProfileName); -private _attackProfilePos = _this call (missionNamespace getVariable _attackProfileFunction); +_attackProfilesCfg = ( configFile >> QGVAR(AttackProfiles) ); -if ((isNil "_attackProfilePos") || {_attackProfilePos isEqualTo [0,0,0]}) exitWith { - ERROR_1("attack profile returned bad pos",_attackProfilePos); - [0,0,0] +_attackProfile = nil; +for [{_i=0}, {_i< (count _attackProfilesCfg) }, {_i=_i+1}] do { + _testProfile = _attackProfilesCfg select _i; + _testName = configName _testProfile; + TRACE_3("", _testName, _testProfile, _attackProfilesCfg); + + if( _testName == _attackProfileName) exitWith { + _attackProfile = _attackProfilesCfg select _i; + }; }; -#ifdef DRAW_GUIDANCE_INFO -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"]; -#endif +_attackProfilePos = [0,0,0]; +if(!isNil "_attackProfile") then { + _attackProfilePos = _this call (missionNamespace getVariable (getText (_attackProfile >> "functionName"))); +}; -TRACE_2("return",_attackProfilePos,_attackProfileName); _attackProfilePos; diff --git a/addons/missileguidance/functions/fnc_doHandoff.sqf b/addons/missileguidance/functions/fnc_doHandoff.sqf index 2145b4e585..011c3d52d1 100644 --- a/addons/missileguidance/functions/fnc_doHandoff.sqf +++ b/addons/missileguidance/functions/fnc_doHandoff.sqf @@ -1,21 +1,4 @@ -/* - * Author: ACE - * Not currently used - * - * Arguments: - * 0: Target - * 1: Args - * - * Return Value: - * None - * - * Example: - * [target, [args]] call ace_missileguidance_fnc_doHandoff - * - * Public: No - */ - #include "script_component.hpp" PARAMS_2(_target,_args); -[QGVAR(handoff), [_target, _args]] call CBA_fnc_globalEvent; +[QGVAR(handoff), [_target, _args]] call CBA_fnc_globalEvent; \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf index 8dd70f0163..4eaefb6656 100644 --- a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf +++ b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf @@ -1,53 +1,30 @@ -/* - * Author: jaynus / nou, PabstMirror - * Do seeker search - * Handles a nil/bad return and will attempt to use last known position if enabled on ammo - * - * Arguments: - * 1: Guidance Arg Array - * 3: Last known pos state array - * - * Return Value: - * Missile Aim PosASL - * - * Example: - * [[], [], []] call ace_missileguidance_fnc_seekerType_Optic; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" -params ["", "_args", "", "_lastKnownPosState"]; -_args params ["", "_launchParams"]; -_launchParams params ["", "", "_seekerTypeName"]; -_lastKnownPosState params ["_seekLastTargetPos", "_lastKnownPos"]; +EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); +private ["_seekerProfilePos", "_i", "_launchParams", "_seekerType", "_seekerTypeName", "_seekerTypesCfg", "_testName", "_testProfile"]; -private _seekerFunction = getText (configFile >> QGVAR(SeekerTypes) >> _seekerTypeName >> "functionName"); +_launchParams = ((_this select 1) select 1); +_seekerTypeName = _launchParams select 2; -private _seekerTargetPos = _this call (missionNamespace getVariable _seekerFunction); +TRACE_1("Seeker type", _seekerTypeName); -if ((isNil "_seekerTargetPos") || {_seekerTargetPos isEqualTo [0,0,0]}) then { // A return of nil or [0,0,0] indicates the seeker has no target - if (_seekLastTargetPos && {!(_lastKnownPos isEqualTo [0,0,0])}) then { // if enabled for the ammo, use last known position if we have one stored - TRACE_2("seeker returned bad pos - using last known",_seekLastTargetPos,_lastKnownPos); - _seekerTargetPos = _lastKnownPos; - #ifdef DRAW_GUIDANCE_INFO - 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"]; - #endif - } else { - TRACE_1("seeker returned no pos",_seekerTargetPos); - _seekerTargetPos = [0,0,0]; - }; -} else { - if (_seekLastTargetPos) then { // if enabled for the ammo, store last known position - TRACE_1("saving current pos",_seekLastTargetPos); - _lastKnownPosState set [1, _seekerTargetPos]; +_seekerTypesCfg = ( configFile >> QGVAR(SeekerTypes) ); + +_seekerType = nil; +for [{_i = 0}, {_i< (count _seekerTypesCfg) }, {_i=_i + 1}] do { + _testProfile = _seekerTypesCfg select _i; + _testName = configName _testProfile; + TRACE_3("", _testName, _testProfile, _seekerTypesCfg); + + if( _testName == _seekerTypeName) exitWith { + _seekerType = _seekerTypesCfg select _i; }; }; -#ifdef DRAW_GUIDANCE_INFO -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"]; -#endif +_seekerProfilePos = [0, 0, 0]; +if(!isNil "_seekerType") then { + _seekerProfilePos = _this call (missionNamespace getVariable (getText (_seekerType >> "functionName"))); +}; -TRACE_2("return",_seekerTargetPos,_seekerTypeName); -_seekerTargetPos; +_seekerProfilePos; diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index 5ecb9c6dfe..a007d333f1 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -1,41 +1,33 @@ -/* - * Author: jaynus / nou - * Guidance Per Frame Handler - * - * Arguments: - * 0: Guidance Arg Array - * 1: PFID - * - * Return Value: - * None - * - * Example: - * [[], 0] call ace_missileguidance_fnc_guidancePFH; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" -BEGIN_COUNTER(guidancePFH); - #define TIMESTEP_FACTOR 0.01 -params ["_args", "_pfID"]; -_args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams"]; -_firedEH params ["_shooter","","","","_ammo","","_projectile"]; -_launchParams params ["","_targetLaunchParams"]; -_stateParams params ["_lastRunTime", "_seekerStateParams", "_attackProfileStateParams", "_lastKnownPosState"]; +private ["_launchParams", "_targetLaunchParams", "_flightParams", "_seekerParams", "_stateParams"]; +private ["_lastRunTime", "_runtimeDelta", "_adjustTime", "_args", "_seekerTargetPos", "_projectilePos"]; +private ["_profileAdjustedTargetPos", "_incDeflection", "_minDeflection", "_maxDeflection"]; +private ["_targetVector", "_adjustVector", "_finalAdjustVector", "_changeVector", "_pitch", "_yaw", "_roll"]; +private ["_PS", "_distanceToTarget", "_targetRelativeVector", "_vectorTo"]; -if (!alive _projectile || isNull _projectile || isNull _shooter) exitWith { - [_pfID] call CBA_fnc_removePerFrameHandler; - END_COUNTER(guidancePFH); +_args = _this select 0; +EXPLODE_7_PVT((_args select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); + +if(!alive _projectile || isNull _projectile || isNull _shooter) exitWith { + [(_this select 1)] call CBA_fnc_removePerFrameHandler; }; -private _runtimeDelta = diag_tickTime - _lastRunTime; -private _adjustTime = 1; +_launchParams = _args select 1; +_targetLaunchParams = _launchParams select 1; +_flightParams = _args select 2; +_seekerParams = _args select 3; -if (accTime > 0) then { +_stateParams = _args select 4; + +_lastRunTime = _stateParams select 0; +_runtimeDelta = diag_tickTime - _lastRunTime; +_adjustTime = 1; + +if(accTime > 0) then { _adjustTime = 1/accTime; _adjustTime = _adjustTime * (_runtimeDelta / TIMESTEP_FACTOR); TRACE_4("Adjust timing", 1/accTime, _adjustTime, _runtimeDelta, (_runtimeDelta / TIMESTEP_FACTOR) ); @@ -43,72 +35,72 @@ if (accTime > 0) then { _adjustTime = 0; }; -private _minDeflection = ((_flightParams select 0) - ((_flightParams select 0) * _adjustTime)) max 0; -private _maxDeflection = (_flightParams select 1) * _adjustTime; -// private _incDeflection = _flightParams select 2; // todo +_minDeflection = ((_flightParams select 0) - ((_flightParams select 0) * _adjustTime)) max 0; +_maxDeflection = (_flightParams select 1) * _adjustTime; +_incDeflection = _flightParams select 2; -private _projectilePos = getPosASL _projectile; +_projectilePos = getPosASL _projectile; -// Run seeker function: -private _seekerTargetPos = [[0,0,0], _args, _seekerStateParams, _lastKnownPosState] call FUNC(doSeekerSearch); - -// Run attack profile function: -private _profileAdjustedTargetPos = [_seekerTargetPos, _args, _attackProfileStateParams] call FUNC(doAttackProfile); - -// If we have no seeker target, then do not change anything -if (!(_profileAdjustedTargetPos isEqualTo [0,0,0])) then { - - private _targetVector = _projectilePos vectorFromTo _profileAdjustedTargetPos; - private _adjustVector = _targetVector vectorDiff (vectorDir _projectile); - _adjustVector params ["_adjustVectorX", "_adjustVectorY", "_adjustVectorZ"]; - - private _yaw = 0; - private _pitch = 0; - private _roll = 0; - - if (_adjustVectorX < 0) then { - _yaw = - ( (_minDeflection max ((abs _adjustVectorX) min _maxDeflection) ) ); - } else { - if (_adjustVectorX > 0) then { - _yaw = ( (_minDeflection max (_adjustVectorX min _maxDeflection) ) ); - }; - }; - if (_adjustVectorY < 0) then { - _roll = - ( (_minDeflection max ((abs _adjustVectorY) min _maxDeflection) ) ); - } else { - if (_adjustVectorY > 0) then { - _roll = ( (_minDeflection max (_adjustVectorY min _maxDeflection) ) ); - }; - }; - if (_adjustVectorZ < 0) then { - _pitch = - ( (_minDeflection max ((abs _adjustVectorZ) min _maxDeflection) ) ); - } else { - if (_adjustVectorZ > 0) then { - _pitch = ( (_minDeflection max (_adjustVectorZ min _maxDeflection) ) ); - }; - }; - private _finalAdjustVector = [_yaw, _roll, _pitch]; - - TRACE_3("", _pitch, _yaw, _roll); - TRACE_3("", _targetVector, _adjustVector, _finalAdjustVector); - - if (accTime > 0) then { - private _changeVector = (vectorDir _projectile) vectorAdd _finalAdjustVector; - TRACE_2("",_projectile,_changeVector); - [_projectile, _changeVector] call FUNC(changeMissileDirection); +// @TODO: placeholder for "last seek target position" +// Last target pos should be optional based on the seeker unit +_seekerTargetPos = [ [0,0,0], _args, (_stateParams select 1)] call FUNC(doSeekerSearch); +if(isNil "_seekerTargetPos") then { + _seekerTargetPos = _seekerTargetPos vectorAdd ((velocity _projectile) vectorMultiply 5); +} else { + if( (vectorMagnitude _seekerTargetPos) == 0) then { + _seekerTargetPos = _seekerTargetPos vectorAdd ((velocity _projectile) vectorMultiply 5); }; }; -#ifdef DRAW_GUIDANCE_INFO -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"]; +_profileAdjustedTargetPos = [_seekerTargetPos,_args, (_stateParams select 2)] call FUNC(doAttackProfile); +_targetVector = _projectilePos vectorFromTo _profileAdjustedTargetPos; +_adjustVector = _targetVector vectorDiff (vectorDir _projectile); -private _ps = "#particlesource" createVehicleLocal (ASLtoAGL _projectilePos); +_yaw = 0; +_pitch = 0; +_roll = 0; +if((_adjustVector select 0) < 0) then { + _yaw = - ( (_minDeflection max (abs(_adjustVector select 0) min _maxDeflection) ) ); +} else { + if((_adjustVector select 0) > 0) then { + _yaw = ( (_minDeflection max ((_adjustVector select 0) min _maxDeflection) ) ); + }; +}; +if((_adjustVector select 1) < 0) then { + _roll = - ( (_minDeflection max (abs(_adjustVector select 1) min _maxDeflection) ) ); +} else { + if((_adjustVector select 1) > 0) then { + _roll = ( (_minDeflection max ((_adjustVector select 1) min _maxDeflection) ) ); + }; +}; +if((_adjustVector select 2) < 0) then { + _pitch = - ( (_minDeflection max (abs(_adjustVector select 2) min _maxDeflection) ) ); +} else { + if((_adjustVector select 2) > 0) then { + _pitch = ( (_minDeflection max ((_adjustVector select 2) min _maxDeflection) ) ); + }; +}; +_finalAdjustVector = [_yaw, _roll, _pitch]; +TRACE_2("", _pitch, _yaw); +TRACE_4("", _targetVector, _targetRelativeVector, _adjustVector, _finalAdjustVector); + +if(accTime > 0) then { + _changeVector = (vectorDir _projectile) vectorAdd _finalAdjustVector; + [_projectile, _changeVector] call FUNC(changeMissileDirection); +}; + +#ifdef DEBUG_MODE_FULL +drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,1,1,1], ASLtoATL _projectilePos, 0.75, 0.75, 0, str _vectorTo, 1, 0.025, "TahomaB"]; +drawLine3D [ASLtoATL _projectilePos, ASLtoATL _profileAdjustedTargetPos, [1,0,0,1]]; + +_ps = "#particlesource" createVehicleLocal (ASLtoATL _projectilePos); _PS setParticleParams [["\A3\Data_f\cl_basic", 8, 3, 1], "", "Billboard", 1, 3.0141, [0, 0, 2], [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 3.0; + +hintSilent format["d: %1", _distanceToTarget]; #endif -_stateParams set [0, diag_tickTime]; - -END_COUNTER(guidancePFH); +_stateParams set[0, diag_tickTime]; +_args set[4, _stateParams]; +_this set[0, _args]; \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_handleHandoff.sqf b/addons/missileguidance/functions/fnc_handleHandoff.sqf index 63af6d6901..af23ed84d8 100644 --- a/addons/missileguidance/functions/fnc_handleHandoff.sqf +++ b/addons/missileguidance/functions/fnc_handleHandoff.sqf @@ -1,23 +1,6 @@ -/* - * Author: ACE-Team - * Not currently used - * - * Arguments: - * 0: TARGET - * 1: ARGS - * - * Return Value: - * Boolean - * - * Example: - * [bob, kevin] call ACE_missileguidance_fnc_handleHandoff - * - * Public: No - */ - #include "script_component.hpp" PARAMS_2(_target,_args); -if (isNil "_target" || {isNull _target} || {!local _target} ) exitWith { false }; +if(isNil "_target" || {isNull _target} || {!local _target} ) exitWith { false }; -[FUNC(guidancePFH), 0, _args] call CBA_fnc_addPerFrameHandler; +[FUNC(guidancePFH), 0, _args] call CBA_fnc_addPerFrameHandler; \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_onFired.sqf b/addons/missileguidance/functions/fnc_onFired.sqf index bf256cbba0..2269810b94 100644 --- a/addons/missileguidance/functions/fnc_onFired.sqf +++ b/addons/missileguidance/functions/fnc_onFired.sqf @@ -1,58 +1,44 @@ -/* - * Author: jaynus / nou - * Fired event handler, starts guidance if enabled for ammo - * - * Arguments: - * 0: Shooter (Man/Vehicle) - * 4: Ammo - * 6: Projectile - * - * Return Value: - * None - * - * Example: - * [player, "", "", "", "ACE_Javelin_FGM148", "", theMissile] call ace_missileguidance_fnc_onFired; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" -params ["_shooter","","","","_ammo","","_projectile"]; +PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); + +// Bail if guidance is disabled +// Bail on locality of the projectile, it should be local to us +if(GVAR(enabled) < 1 || {!local _projectile} ) exitWith { false }; + +//Bail if shooter isn't player AND system not enabled for AI: +if( !isPlayer _shooter && { GVAR(enabled) < 2 } ) exitWith { false }; // Bail on not missile -if (!(_ammo isKindOf "MissileBase")) exitWith {}; +if(! (_ammo isKindOf "MissileBase") ) exitWith { false }; -// Bail if guidance is disabled for this ammo -if ((getNumber (configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON) >> "enabled")) != 1) exitWith {}; +private ["_config", "_configs", "_enabled", "_target", "_seekerType", "_attackProfile"]; +private ["_args", "_canUseLock", "_guidingUnit", "_launchPos", "_lockMode", "_targetPos", "_vanillaTarget"]; -// Bail on locality of the projectile, it should be local to us -if (GVAR(enabled) < 1 || {!local _projectile} ) exitWith {}; +//Verify ammo has explicity added guidance config (ignore inheritances) +_configs = configProperties [(configFile >> "CfgAmmo" >> _ammo), QUOTE(configName _x == QUOTE(QUOTE(ADDON))), false]; +if( (count _configs) < 1) exitWith {}; -// Bail if shooter isn't player AND system not enabled for AI: -if ( !isPlayer _shooter && { GVAR(enabled) < 2 } ) exitWith {}; +_config = (configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON)); +_enabled = getNumber ( _config >> "enabled"); -// Verify ammo has explicity added guidance config (ignore inheritances) -private _configs = configProperties [(configFile >> "CfgAmmo" >> _ammo), QUOTE(configName _x == QUOTE(QUOTE(ADDON))), false]; -if ((count _configs) < 1) exitWith {}; +// Bail if guidance is not enabled +if(isNil "_enabled" || {_enabled != 1}) exitWith { false }; -// MissileGuidance is enabled for this shot -TRACE_4("enabled",_shooter,_ammo,_projectile,typeOf _shooter); +_target = (vehicle _shooter) getVariable [QGVAR(target), nil]; +_targetPos = (vehicle _shooter) getVariable [QGVAR(targetPosition), nil]; +_seekerType = (vehicle _shooter) getVariable [QGVAR(seekerType), nil]; +_attackProfile = (vehicle _shooter) getVariable [QGVAR(attackProfile), nil]; +_lockMode = (vehicle _shooter) getVariable [QGVAR(lockMode), nil]; -private _config = configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON); +// @TODO: make this vehicle shooter, but we need to differentiate where its set in ace_laser +_laserCode = _shooter getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE]; +_laserInfo = [_laserCode, ACE_DEFAULT_LASER_WAVELENGTH, ACE_DEFAULT_LASER_WAVELENGTH]; -private _target = _shooter getVariable [QGVAR(target), nil]; -private _targetPos = _shooter getVariable [QGVAR(targetPosition), nil]; -private _seekerType = _shooter getVariable [QGVAR(seekerType), nil]; -private _attackProfile = _shooter getVariable [QGVAR(attackProfile), nil]; -private _lockMode = _shooter getVariable [QGVAR(lockMode), nil]; +_launchPos = getPosASL (vehicle _shooter); -private _laserCode = _shooter getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE]; -private _laserInfo = [_laserCode, ACE_DEFAULT_LASER_WAVELENGTH, ACE_DEFAULT_LASER_WAVELENGTH]; - -TRACE_6("getVars",_target,_targetPos,_seekerType,_attackProfile,_lockMode,_laserCode); - -private _launchPos = getPosASL (vehicle _shooter); +TRACE_3("Begin guidance", _target, _seekerType, _attackProfile); if (isNil "_seekerType" || {!(_seekerType in (getArray (_config >> "seekerTypes")))}) then { _seekerType = getText (_config >> "defaultSeekerType"); @@ -65,37 +51,28 @@ if (isNil "_lockMode" || {!(_lockMode in (getArray (_config >> "seekerLockModes" }; // If we didn't get a target, try to fall back on tab locking -if (isNil "_target") then { - if (!isPlayer _shooter) then { +if(isNil "_target") then { + if(!isPlayer _shooter) then { // This was an AI shot, lets still guide it on the AI target - _target = _shooter getVariable [QGVAR(vanilla_target), nil]; + _target = _shooter getVariable[QGVAR(vanilla_target), nil]; TRACE_1("Detected AI Shooter!", _target); } else { - private _canUseLock = getNumber (_config >> "canVanillaLock"); + _canUseLock = getNumber (_config >> "canVanillaLock"); // @TODO: Get vanilla target - if (_canUseLock > 0 || difficulty < 1) then { - private _vanillaTarget = cursorTarget; + if(_canUseLock > 0 || difficulty < 1) then { + _vanillaTarget = cursorTarget; TRACE_1("Using Vanilla Locking", _vanillaTarget); - if (!isNil "_vanillaTarget") then { + if(!isNil "_vanillaTarget") then { _target = _vanillaTarget; }; }; }; }; -// Array for seek last target position -private _seekLastTargetPos = (getNumber ( _config >> "seekLastTargetPos")) == 1; -private _lastKnownPosState = [_seekLastTargetPos]; -if (_seekLastTargetPos && {!isNil "_target"}) then { - _lastKnownPosState set [1, (getPosASL _target)]; -} else { - _lastKnownPosState set [1, [0,0,0]]; -}; - TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile); -private _args = [_this, - [ _shooter, +_args = [_this, + [_shooter, [_target, _targetPos, _launchPos], _seekerType, _attackProfile, @@ -112,50 +89,30 @@ private _args = [_this, getNumber ( _config >> "seekerAccuracy" ), getNumber ( _config >> "seekerMaxRange" ) ], - [ diag_tickTime, [], [], _lastKnownPosState] + [ diag_tickTime, [], [] ] ]; - -// Run the "onFired" function passing the full guidance args array -private _onFiredFunc = getText (_config >> "onFired"); -TRACE_1("",_onFiredFunc); -if (_onFiredFunc != "") then { - _args call (missionNamespace getVariable _onFiredFunc); -}; - - -// Reverse: -// _args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams"]; -// _firedEH params ["_shooter","","","","_ammo","","_projectile"]; -// _launchParams params ["_shooter","_targetLaunchParams","_seekerType","_attackProfile","_lockMode","_laserInfo"]; -// _targetLaunchParams params ["_target", "_targetPos", "_launchPos"]; -// _stateParams params ["_lastRunTime", "_seekerStateParams", "_attackProfileStateParams", "_lastKnownPosState"]; -// _seekerParams params ["_seekerAngle", "_seekerAccuracy", "_seekerMaxRange"]; - - // Hand off to the guiding unit. We just use local player so local PFH fires for now // Laser code needs to give us a shooter for LOBL, or the seeker unit needs to be able to shift locality // Based on its homing laser // Lasers need to be handled in a special LOAL/LOBL case -//if (isPlayer _shooter) then { -// private _guidingUnit = ACE_player; +//if(isPlayer _shooter) then { +// _guidingUnit = ACE_player; // -// if (local _guidingUnit) then { +// if(local _guidingUnit) then { // [FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler; // } else { // [QGVAR(handoff), [_guidingUnit, _args] ] call FUNC(doHandoff); // }; //} else { - // [FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler; + [FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler; //}; -[FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler; - /* Clears locking settings (vehicle _shooter) setVariable [QGVAR(target), nil]; (vehicle _shooter) setVariable [QGVAR(seekerType), nil]; (vehicle _shooter) setVariable [QGVAR(attackProfile), nil]; (vehicle _shooter) setVariable [QGVAR(lockMode), nil]; - */ +*/ diff --git a/addons/missileguidance/functions/fnc_onIncomingMissile.sqf b/addons/missileguidance/functions/fnc_onIncomingMissile.sqf index 2dcc93b793..14902c32a5 100644 --- a/addons/missileguidance/functions/fnc_onIncomingMissile.sqf +++ b/addons/missileguidance/functions/fnc_onIncomingMissile.sqf @@ -1,27 +1,8 @@ -/* - * Author: jaynus / nou - * Handles AI shooting a locking missile - * - * Arguments: - * 0: Target - * 1: Ammo - * 2: Shooter - * - * Return Value: - * None - * - * Example: - * [cursorTarget, "x", player] call ace_missileguidance_fnc_changeMissileDirection; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" +PARAMS_3(_target,_ammo,_shooter); -params ["_target", "_ammo", "_shooter"]; - -if (GVAR(enabled) < 1) exitWith {}; // bail if enabled +if(GVAR(enabled) < 1) exitWith {}; // bail if enabled if !(local (gunner _shooter) || {local _shooter}) exitWith {}; // bail if not shooter -_shooter setVariable [QGVAR(vanilla_target),_target, false]; -TRACE_2("setting vanilla target",_shooter,_target); +_shooter setVariable [QGVAR(vanilla_target),_target, false]; \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_rotateVectLine.sqf b/addons/missileguidance/functions/fnc_rotateVectLine.sqf new file mode 100644 index 0000000000..9adb283cae --- /dev/null +++ b/addons/missileguidance/functions/fnc_rotateVectLine.sqf @@ -0,0 +1,39 @@ +#include "script_component.hpp" +private ["_d", "_map", "_p", "_theta", "_u"]; + +_map = _this select 0; +_theta = _this select 1; + +_p = _map select 0; +_p1 = _map select 1; +_p2 = _map select 2; + +_q1 = +(_map select 3); +_q2 = +(_map select 4); +_u = _map select 5; +_d = _map select 6; + +/* Step 4 */ +_q2 set[0, (_q1 select 0) * cos(_theta) - (_q1 select 1) * sin(_theta)]; +_q2 set[1, (_q1 select 0) * sin(_theta) + (_q1 select 1) * cos(_theta)]; +_q2 set[2, (_q1 select 2)]; + +/* Inverse of step 3 */ +_q1 set[0, (_q2 select 0) * _d + (_q2 select 2) * (_u select 0)]; +_q1 set[1, (_q2 select 1)]; +_q1 set[2, - (_q2 select 0) * (_u select 0) + (_q2 select 2) * _d]; + +/* Inverse of step 2 */ +if (_d != 0) then { + _q2 set[0, (_q1 select 0)]; + _q2 set[1, (_q1 select 1) * (_u select 2) / _d + (_q1 select 2) * (_u select 1) / _d]; + _q2 set[2, - (_q1 select 1) * (_u select 1) / _d + (_q1 select 2) * (_u select 2) / _d]; +} else { + _q2 = _q1; +}; + +/* Inverse of step 1 */ +_q1 set[0, (_q2 select 0) + (_p1 select 0)]; +_q1 set[1, (_q2 select 1) + (_p1 select 1)]; +_q1 set[2, (_q2 select 2) + (_p1 select 2)]; +_q1; \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_rotateVectLineGetMap.sqf b/addons/missileguidance/functions/fnc_rotateVectLineGetMap.sqf new file mode 100644 index 0000000000..258cc93ae2 --- /dev/null +++ b/addons/missileguidance/functions/fnc_rotateVectLineGetMap.sqf @@ -0,0 +1,37 @@ +#include "script_component.hpp" + +private ["_p", "_theta", "_p1", "_p2", "_q1", "_q2", "_u", "_d"]; +_p = _this select 0; +_p1 = _this select 1; +_p2 = _this select 2; + +_q1 = []; +_q2 = []; +_u = []; + +/* Step 1 */ +_q1 set[0, (_p select 0) - (_p1 select 0)]; +_q1 set[1, (_p select 1) - (_p1 select 1)]; +_q1 set[2, (_p select 2) - (_p1 select 2)]; + +_u set[0, (_p2 select 0) - (_p1 select 0)]; +_u set[1, (_p2 select 1) - (_p1 select 1)]; +_u set[2, (_p2 select 2) - (_p1 select 2)]; +_u = _u call BIS_fnc_unitVector; +_d = sqrt((_u select 1)*(_u select 1) + (_u select 2)*(_u select 2)); + +/* Step 2 */ +if (_d != 0) then { + _q2 set[0, (_q1 select 0)]; + _q2 set[1, (_q1 select 1) * (_u select 2) / _d - (_q1 select 2) * (_u select 1) / _d]; + _q2 set[2, (_q1 select 1) * (_u select 1) / _d + (_q1 select 2) * (_u select 2) / _d]; +} else { + _q2 = _q1; +}; + +/* Step 3 */ +_q1 set[0, (_q2 select 0) * _d - (_q2 select 2) * (_u select 0)]; +_q1 set[1, (_q2 select 1)]; +_q1 set[2, (_q2 select 0) * (_u select 0) + (_q2 select 2) * _d]; + +[_p, _p1, _p2, _q1, _q2, _u, _d] \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf index 173b6ba708..b491110ac6 100644 --- a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf @@ -1,54 +1,52 @@ -/* - * Author: jaynus / nou - * Seeker Type: Optic - * - * Arguments: - * 1: Guidance Arg Array - * 2: Seeker State - * - * Return Value: - * Missile Aim PosASL - * - * Example: - * [[], [], []] call ace_missileguidance_fnc_seekerType_Optic; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" -params ["", "_args"]; -_args params ["_firedEH", "_launchParams", "", "_seekerParams", "_stateParams"]; -_firedEH params ["","","","","","","_projectile"]; -_launchParams params ["", "_targetParams"]; -_targetParams params ["_target"]; -_seekerParams params ["_seekerAngle", "", "_seekerMaxRange"]; +EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); +private ["_targets", "_foundTargetPos", "_launchParams", "_seekerParams", "_targetLaunchParams"]; +private ["_angleFov", "_angleOkay", "_losOkay", "_seekerTargetPos", "_sensorPos", "_target"]; -if (isNil "_target") exitWith {[0,0,0]}; +_seekerTargetPos = _this select 0; -private _foundTargetPos = aimPos _target; +_launchParams = _this select 1; +_target = (((_launchParams select 1) select 1) select 0); +_seekerParams = _launchParams select 3; + +TRACE_1("", _this); +TRACE_1("", _launchParams); + +// TODO:: Make sure the missile maintains LOS +_foundTargetPos = [0,0,0]; +if(!isNil "_target") then { + _foundTargetPos = aimPos _target ; + //_foundTargetPos = (_target modelToWorldVisual (getCenterOfMass _target)); +}; // @TODO: This is seeker LOS and angle checks for LOAL only; LOBL does not need visual -private _angleOkay = [_projectile, _foundTargetPos, _seekerAngle] call FUNC(checkSeekerAngle); +_angleFov = _seekerParams select 0; +_angleOkay = [_projectile, _foundTargetPos, _angleFov] call FUNC(checkSeekerAngle); -private _losOkay = false; -if (_angleOkay) then { +_losOkay = false; +if(_angleOkay) then { _losOkay = [_projectile, _target] call FUNC(checkLos); }; TRACE_2("", _angleOkay, _losOkay); -// Can't see target, return [0,0,0] and let doSeekerSearch handle it -if (!_angleOkay || !_losOkay) exitWith {[0,0,0]}; +// If we got here, it was an invalid target, just return a spot 5m in front of the missile +if(!_angleOkay || !_losOkay) then { + _foundTargetPos = _sensorPos vectorAdd ((velocity _projectile) vectorMultiply 5); +} else { + TRACE_2("", _target, _foundTargetPos); + private ["_projectileSpeed", "_distanceToTarget", "_eta", "_adjustDistance"]; + // @TODO: Configurable lead for seekers + _projectileSpeed = (vectorMagnitude velocity _projectile); + _distanceToTarget = (getPosASL _projectile) vectorDistance _foundTargetPos; -TRACE_2("", _target, _foundTargetPos); -// @TODO: Configurable lead for seekers -private _projectileSpeed = (vectorMagnitude velocity _projectile); -private _distanceToTarget = (getPosASL _projectile) vectorDistance _foundTargetPos; -private _eta = _distanceToTarget / _projectileSpeed; + _eta = _distanceToTarget / _projectileSpeed; -private _adjustDistance = (velocity _target) vectorMultiply _eta; -TRACE_3("leading target",_distanceToTarget,_eta,_adjustDistance); -_foundTargetPos = _foundTargetPos vectorAdd _adjustDistance; + _adjustDistance = (velocity _target) vectorMultiply _eta; + TRACE_3("leading target",_distanceToTarget,_eta,_adjustDistance); + _foundTargetPos = _foundTargetPos vectorAdd _adjustDistance; +}; TRACE_2("return",_foundTargetPos,(aimPos _target) distance _foundTargetPos); _foundTargetPos; diff --git a/addons/missileguidance/functions/fnc_seekerType_SALH.sqf b/addons/missileguidance/functions/fnc_seekerType_SALH.sqf index 3f78f5d3c5..034fc03e45 100644 --- a/addons/missileguidance/functions/fnc_seekerType_SALH.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_SALH.sqf @@ -1,33 +1,32 @@ -/* - * Author: jaynus / nou - * Seeker Type: SALH (Laser) - * Wrapper for ace_laser_fnc_seekerFindLaserSpot - * - * Arguments: - * 1: Guidance Arg Array - * 2: Seeker State - * - * Return Value: - * Missile Aim PosASL - * - * Example: - * [[], [], []] call ace_missileguidance_fnc_seekerType_SALH; - * - * Public: No - */ -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" -params ["", "_args"]; -_args params ["_firedEH", "_launchParams", "", "_seekerParams"]; -_firedEH params ["","","","","","","_projectile"]; -_launchParams params ["","","","","","_laserParams"]; -_seekerParams params ["_seekerAngle", "", "_seekerMaxRange"]; -_laserParams params ["_code", "_wavelengthMin", "_wavelengthMax"]; +EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); +private ["_angleFov", "_canSeeTarget", "_foundTargetPos", "_laserResult", "_launchParams", "_seekerParams", "_laserCode", "_laserParams", "_seekerTargetPos", "_sensorPos", "_target"]; +_seekerTargetPos = _this select 0; +_launchParams = _this select 1; +_seekerParams = _launchParams select 3; +_angleFov = _seekerParams select 0; +_laserParams = (_launchParams select 1) select 5; +TRACE_2("", _launchParams, _laserParams); +if(!isNil "_target") then { + // Handle AI or moving vanilla lasers + _foundTargetPos = getPosASL _target; +} else { + _laserResult = [(getPosASL _projectile), (velocity _projectile), _angleFov, [(_laserParams select 1),(_laserParams select 2)], (_laserParams select 0)] call EFUNC(laser,seekerFindLaserSpot); + _foundTargetPos = _laserResult select 0; + TRACE_1("Search", _laserResult); +}; -private _laserResult = [(getPosASL _projectile), (velocity _projectile), _seekerAngle, _seekerMaxRange, [_wavelengthMin, _wavelengthMax], _code, _projectile] call EFUNC(laser,seekerFindLaserSpot); -private _foundTargetPos = _laserResult select 0; -TRACE_1("Search", _laserResult); +if(!isNil "_foundTargetPos") then { + //_canSeeTarget = [_projectile, _foundTargetPos, _angleFov] call FUNC(checkSeekerAngle); -_foundTargetPos; + // If we got here, it was an invalid target, just return a spot 5m in front of the missile + if(!_canSeeTarget) then { + _foundTargetPos = _sensorPos vectorAdd ((velocity _projectile) vectorMultiply 5); + }; + +}; + +_foundTargetPos; \ No newline at end of file diff --git a/addons/missileguidance/script_component.hpp b/addons/missileguidance/script_component.hpp index 298de3a051..beac3e318d 100644 --- a/addons/missileguidance/script_component.hpp +++ b/addons/missileguidance/script_component.hpp @@ -2,9 +2,9 @@ #define COMPONENT_BEAUTIFIED Missile Guidance #include "\z\ace\addons\main\script_mod.hpp" -// #define DRAW_GUIDANCE_INFO // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MISSILEGUIDANCE @@ -16,3 +16,5 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" + +#define FIREMODE_DIRECT_LOAL 1 diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml index 72de552422..35b947ce97 100644 --- a/addons/missileguidance/stringtable.xml +++ b/addons/missileguidance/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Avançado Missile Guidance Fejlett rakétairányító Продвинутое наведение ракет - 高度なミサイルの誘導 - 고급 미사일 유도 - 进阶飞弹制导 - 進階飛彈制導 Advanced missile guidance, or AMG, provides multiple enhancements to missile locking and firing. It is also a framework required for missile weapon types. @@ -28,10 +24,6 @@ A fejlett rakétairányító (vagy AMG) többféle módosítást tartalmaz a rakéták célkövetéséhez és tüzeléséhez. Ez egy szükséges keresztrendszer a rakéta-alapú fegyverekhez. Orientação avançada de mísseis ou OAM, fornece vários aprimoramentos para travamento de mísseis e disparos. Também é um sistema requerido para disparar armas que utilizem mísseis. Pokočilé navádění raket (AMG) poskytuje několik vylepšení pro lepší zaměření a následnou střelbu. Je to prvek vyžadovaný u typu zbraní jako jsou rakety. - 高度なミサイルの誘導、または AMG はミサイルの捕捉と発射に複数の強化をあたえます。これはミサイルの種類によって、枠組みを必要とします。 - 고급 미사일 유도 혹은 AMG 는 표적 획득 및 발사를 위한 여러 기능을 제공합니다. 미사일 종류에따라 체계가 필요합니다. - 进阶飞弹制导增强了多种导弹锁定和射击的能力. 此系统适用于所有飞弹类型的武器. - 進階飛彈制導增強了多種導彈鎖定和射擊的能力. 此系統適用於所有飛彈類型的武器. Hydra-70 DAGR Missile @@ -44,10 +36,6 @@ Míssil Hydra-70 DAGR Hydra-70 DAGR rakéta Hydra-70 DAGR - Hydra-70 DAGR ミサイル - Hydra-70 DAGR 미사일 - 九头蛇-70 直接攻击导引飞弹 - 九頭蛇-70 直接攻擊導引飛彈 DAGR @@ -60,10 +48,6 @@ DAGR DAGR DAGR - DAGR - DAGR - 直接攻击导引飞弹 - 直接攻擊導引飛彈 Hydra-70 DAGR Laser Guided Missile @@ -76,10 +60,6 @@ Míssil guiado a laser Hydra-70 DAGR Hydra-70 DAGR lézer-irányított rakéta Управляемая ракета лазерного наведения Hydra-70 DAGR - Hydra-70 DAGR レーザ誘導ミサイル - Hydra-70 DAGR 레이저 유도 미사일 - 九头蛇-70 直接攻击雷射导引飞弹e - 九頭蛇-70 直接攻擊雷射導引飛彈e Hellfire II AGM-114K Missile @@ -92,10 +72,6 @@ Míssil Hellfire II AGM-114K Hellfire II AGM-114K rakéta Hellfire II AGM-114K - Hellfire II AGM-114K ミサイル - Hellfire II AGM-114K 미사일 - 地狱火II型 AGM-114K 导弹 - 地獄火II型 AGM-114K 導彈 AGM-114K @@ -108,10 +84,6 @@ AGM-114K AGM-114K AGM-114K - AGM-114K - AGM-114K - AGM-114K - AGM-114K Hellfire II AGM-114K Laser Guided Missile @@ -124,10 +96,6 @@ Míssil guiado a laser Hellfire II AGM-114K Hellfire II AGM-114K lézer-irányított rakéta Управляемая ракета лазерного наведения Hellfire II AGM-114K - Hellfire II AGM-114K レーザ誘導ミサイル - Hellfire II AGM-114K 레이저 유도 미사일 - 地狱火II型 AGM-114K 雷射导引飞弹 - 地獄火II型 AGM-114K 雷射導引飛彈 Off @@ -140,10 +108,6 @@ Ki Выкл. Spento - 無効 - 끄기 - 关闭 - 關閉 Player Only @@ -156,10 +120,6 @@ Csak játékosok Только игрок Solo Giocatore - プレイヤーのみ - 오직 플레이어만 - 只有玩家 - 只有玩家 Player and AI @@ -172,25 +132,6 @@ Játékosok és AI Игрок и боты Giocatore ed IA - プレイヤーと AI - 玩家和AI - 玩家和AI - - - Cycle Fire Mode - Wechsle Feuermodus - Переключение режимов огня - Přepínání režimů palby - Przełącz tryb ognia - Cycle mode de tir - Tüzelési mód váltása - Alterna le modalità di fuoco - Cambiar modo de disparo - Alterar Modo de Disparo - 発射モード切り替え - 발사 방식 순환 - 循环切换开火模式 - 循環切換開火模式 - + \ No newline at end of file diff --git a/addons/missionmodules/XEH_preInit.sqf b/addons/missionmodules/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/missionmodules/XEH_preInit.sqf +++ b/addons/missionmodules/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf index dc6ca4c7b1..eb44a68f15 100644 --- a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf +++ b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf @@ -8,10 +8,10 @@ * 2: Activated * * Return Value: - * None + * Nothing * * Example: - * [LOGIC, [bob, kevin], true] call ace_missionmodules_fnc_moduleAmbianceSound + * N/A * * Public: No */ @@ -36,7 +36,7 @@ if (_activated && local _logic) then { _missionRoot = str missionConfigFile select [0, count str missionConfigFile - 15]; { - _x = [_x] call CBA_fnc_removeWhitespace; + _x = [_x] call EFUNC(common,stringRemoveWhiteSpace); if (isClass (missionConfigFile >> "CfgSounds" >> _x)) then { // CfgSounds accepts a leading backslash, but a double backslash @@ -49,11 +49,9 @@ if (_activated && local _logic) then { }; } else { if (isClass (configFile >> "CfgSounds" >> _x)) then { - _soundPath = (getArray(configFile >> "CfgSounds" >> _x >> "sound")) param [0, ""]; - if ((_soundPath select [0, 1]) == "\") then {_soundPath = _soundPath select [1];}; - _ambianceSounds pushBack _soundPath; + _ambianceSounds pushBack ((getArray(configFile >> "CfgSounds" >> _x >> "sound") select 0)); } else { - ERROR_1("Ambient Sounds: Sound ""%1"" not found.",_x); + ACE_LOGERROR_1("Ambient Sounds: Sound ""%1"" not found.",_x); }; }; @@ -67,9 +65,8 @@ if (_activated && local _logic) then { }; } forEach _ambianceSounds; - TRACE_1("",_ambianceSounds); - [{ + private ["_newPos", "_allUnits", "_targetUnit"]; params ["_args", "_pfhHandle"]; _args params ["_logic", "_ambianceSounds", "_minimalDistance", "_maximalDistance", "_minDelayBetweensounds", "_maxDelayBetweenSounds", "_volume", "_followPlayers", "_lastTimePlayed"]; @@ -80,28 +77,39 @@ if (_activated && local _logic) then { if (CBA_missionTime - _lastTimePlayed >= ((_minDelayBetweensounds + random(_maxDelayBetweenSounds)) min _maxDelayBetweenSounds)) then { // Find all players in session. - private _allUnits = if (isMultiplayer) then {playableUnits} else {[ACE_player]}; + _allUnits = if (isMultiplayer) then {playableUnits} else {[ACE_player]}; // Check if there are enough players to even start playing this sound. if (count _allUnits > 0) then { + + // Select a target unit at random. + _targetUnit = _allUnits call BIS_fnc_selectRandom; + // find the position from which we are going to play this sound from. - private _newPosASL = if (_followPlayers) then { - // Select a target unit at random. - private _targetUnit = selectRandom _allUnits; - AGLtoASL (_targetUnit getPos [_minimalDistance + random (_maximalDistance - _minimalDistance), random 360]); - } else { - AGLtoASL (_logic getPos [_minimalDistance + random (_maximalDistance - _minimalDistance), random 360]); + _newPos = (getPos _targetUnit); + if (!_followPlayers) then { + _newPos = getPos _logic; }; - TRACE_1("",_newPosASL); - // If no unit is to close to this position, we will play the sound. - if ({(_newPosASL distance _x < (_minimalDistance / 2))}count _allUnits == 0) then { - private _soundFile = selectRandom _ambianceSounds; - TRACE_2("playing file",_soundFile,_newPosASL); - playSound3D [_soundFile, objNull, false, _newPosASL, _volume, 1, 1000]; - _args set [8, CBA_missionTime]; + // Randomize this position. + if (random(1) >= 0.5) then { + if (random(1) >= 0.5) then { + _newPos set [0, (_newPos select 0) + (_minimalDistance + random(_maximalDistance))]; + } else { + _newPos set [0, (_newPos select 0) - (_minimalDistance + random(_maximalDistance))]; + }; } else { - TRACE_1("pos is too close to a player",_newPosASL); + if (random(1) >= 0.5) then { + _newPos set [1, (_newPos select 1) + (_minimalDistance + random(_maximalDistance))]; + } else { + _newPos set [1, (_newPos select 1) - (_minimalDistance + random(_maximalDistance))]; + }; + }; + + // If no unit is to close to this position, we will play the sound. + if ({(_newPos distance _x < (_minimalDistance / 2))}count _allUnits == 0) then { + playSound3D [selectRandom _ambianceSounds, objNull, false, _newPos, _volume, 1, 1000]; + _args set [8, CBA_missionTime]; }; }; }; diff --git a/addons/missionmodules/script_component.hpp b/addons/missionmodules/script_component.hpp index 0d447899f7..d1fdd10580 100644 --- a/addons/missionmodules/script_component.hpp +++ b/addons/missionmodules/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MISSIONMODULES diff --git a/addons/missionmodules/stringtable.xml b/addons/missionmodules/stringtable.xml index f69fbad1ec..1043d99f64 100644 --- a/addons/missionmodules/stringtable.xml +++ b/addons/missionmodules/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ ACE küldetési modulok Модули миссий ACE Moduli Missione ACE - ACE ミッション モジュール - ACE 미션 모듈 - ACE 任务模块 - ACE 任務模塊 Ambiance Sounds [ACE] @@ -28,10 +24,6 @@ Ambiens hangok [ACE] Звук окружения [ACE] Souni Ambientali [ACE] - 環境音 [ACE] - 환경 효과음 [ACE] - 环境声音 [ACE] - 環境聲音 [ACE] Sounds @@ -44,10 +36,6 @@ Hangok Звуки Suoni - 効果音 - 효과음 - 声音 - 聲音 Class names of the ambiance sounds to be played. Seperated by ',' @@ -59,10 +47,6 @@ Имена классов звуков окружения, которые должны проигрываться. Разделенные ',' ClassNames des sons d'ambiances. Séparation par "," Nomi classi dei suoni ambientali da eseguire. Separati da ',' - 再生する環境音のクラスネームを記載。','で複数指定できます。 - 재생되는 환경 효과음의 단위와 이름입니다. ','로 구분됩니다. - 输入想使用的环境声音classname. 每个classname用','做区隔 - 輸入想使用的環境聲音classname. 每個classname用','做區隔 Minimal Distance @@ -75,10 +59,6 @@ Minimális távolság Минимальная дистанция Distanza Minimale - 最低距離 - 최소 거리 - 最小距离 - 最小距離 Used for calculating a random position and sets the minimal distance between the players and the played sound file(s) @@ -91,10 +71,6 @@ Egy véletlenszerű pozíció számításához használt érték, amihez megadja a minimum távolságot a játékosok és a lejátszott hangfájl(ok) között Используется для расчета случайной позиции и указывает минимальное расстояние между игроками и источниками звука Usati per calcolare una posizione casuale ed impostare la distanza minima tra i giocatori ed il file suono eseguito - 無作為な位置への計算や、プレイヤーと再生されるファイルの間へ最低距離を設定します - 무작위 위치 계산에 사용되며 플레이어와 재생 된 사운드 파일 간의 최소 거리를 설정합니다. - 声音将随机产生在玩家附近, 此选项定义该声音最近会距离玩家多少公尺. - 聲音將隨機產生在玩家附近, 此選項定義該聲音最近會距離玩家多少公尺. Maximum Distance @@ -107,10 +83,6 @@ Maximális távolság Максимальная дистанция Distanza Massima - 最大距離 - 최대 거리 - 最大距离 - 最大距離 Used for calculating a random position and sets the maximum distance between the players and the played sound file(s) @@ -123,10 +95,6 @@ Egy véletlenszerű pozíció számításához használt érték, amihez megadja a maximum távolságot a játékosok és a lejátszott hangfájl(ok) között Используется для расчета случайной позиции и указывает максимальное расстояние между игроками и источниками звука Usato per calcolare una posizione casuale ed impostare la distanza massima tra giocatori e il file suono eseguito - 無作為な位置への計算や、プレイヤーと再生されるファイルの間へ最大距離を設定します - 무작위 위치 계산에 사용되며 플레이어와 재생 된 사운드 파일 간의 최대 거리를 설정합니다. - 声音将随机产生在玩家附近, 此选项定义该声音最远会距离玩家多少公尺. - 聲音將隨機產生在玩家附近, 此選項定義該聲音最遠會距離玩家多少公尺. Minimal Delay @@ -139,10 +107,6 @@ Minimum késleltetés Минимальная задержка Pausa Minima - 最低遅延 - 최소 지연 - 最小延迟 - 最小延遲 Minimal delay between sounds played @@ -155,10 +119,6 @@ Minimum késleltetés a lejátszott hangok között Минимальная задержка между воспроизведением звуков Pausa Minima tra suoni eseguiti - 再生されるまでの最低遅延 - 재생된 소리간 최소 지연시간 - 设定每个声音档案中间最少间隔多久再进行播放 - 設定每個聲音檔案中間最少間隔多久再進行播放 Maximum Delay @@ -171,10 +131,6 @@ Maximum késleltetés Максимальная задержка Pausa Massima - 最大遅延 - 최대 지연 - 最大延迟 - 最大延遲 Maximum delay between sounds played @@ -187,10 +143,6 @@ Maximum késleltetés a lejátszott hangok között Максимальная задержка между воспроизведением звуков Pausa Massima tra suoni eseguiti - 再生されるまでの最大遅延 - 재생된 소리간 최대 지연시간 - 设定每个声音档案中间最多间隔多久再进行播放 - 設定每個聲音檔案中間最多間隔多久再進行播放 Follow Players @@ -203,10 +155,6 @@ Játékosok követése Следовать за игроками Segui Giocatori - プレイヤーを追随 - 플레이어 따라가기 - 跟随玩家 - 跟隨玩家 Follow players. If set to false, loop will play sounds only nearby logic position. @@ -219,10 +167,6 @@ Játékosok követése. Ha le van tiltva, az ismétlés csak a legközelebbi logikai ponton játszik le hangokat. Следовать за игроками. Если установить в Ложь, звуки будут циклически проигрываться только около позиции Логики. Segui Giocatori. Se impostato su falso, il ciclo eseguirà i suoni solo vicino ad una posizione logica. - プレイヤーを追随します。False に設定するとロジックの近くで延々と再生します。 - 플레이어를 따라갑니다. 거짓으로 설정될경우 오직 한 자리에서만 반복해서 소리를 재생합니다. - 设定声音是否会在玩家的附近产生. 假如关闭此功能, 声音只会在模块的位置产生. - 設定聲音是否會在玩家的附近產生. 假如關閉此功能, 聲音只會在模塊的位置產生. Volume @@ -235,10 +179,6 @@ Hangerő Громкость Volume - 音量 - 볼륨 - 音量 - 音量 The volume of the sounds played @@ -251,10 +191,6 @@ A lejátszott hangok hangereje Громкость воспроизводимых звуков Il volume dei suoni eseguiti - 再生される音の大きさ - 재생되는 소리의 볼륨 - 调整声音的音量 - 調整聲音的音量 Ambiance sounds loop (synced across MP) @@ -267,10 +203,6 @@ Ambiens hangok folyamatossága (MP alatt szinkronizálva) Циклически воспроизводимые звуки окружения (синх. между игроками) Ciclo Suoni Ambientali (sincronizzato in MP) - 環境音の繰り返し (MP 間で同期させます) - 환경 효과음 반복 (멀티플레이 전반적으로 동기화됨) - 循环的环境声音 (在多人游戏中会同步所有玩家的播放状态) - 循環的環境聲音 (在多人遊戲中會同步所有玩家的播放狀態) - + \ No newline at end of file diff --git a/addons/mk6mortar/XEH_postInit.sqf b/addons/mk6mortar/XEH_postInit.sqf index e3169b6dba..aceb721d70 100644 --- a/addons/mk6mortar/XEH_postInit.sqf +++ b/addons/mk6mortar/XEH_postInit.sqf @@ -17,25 +17,7 @@ ["ace_initMortar", {_this call FUNC(mortarInit);}] call CBA_fnc_addEventHandler; -if (hasInterface) then { - ["ace_infoDisplayChanged", FUNC(turretDisplayLoaded)] call CBA_fnc_addEventHandler; -}; +if (!hasInterface) exitWith {}; -["ace_settingsInitialized", { - TRACE_1("ace_settingsInitialized",GVAR(useAmmoHandling)); - - ["vehicle", FUNC(handlePlayerVehicleChanged), true] call CBA_fnc_addPlayerEventHandler; - - if (GVAR(useAmmoHandling)) then { - ["Mortar_01_base_F", "init", { - TRACE_2("mortar init",_this,(_this select 0) turretLocal [0]); - - //wait for proper turret locality change - [{ - TRACE_2("after delay",_this,(_this select 0) turretLocal [0]); - ["ace_initMortar", _this] call CBA_fnc_localEvent; - }, _this, 0.5] call CBA_fnc_waitAndExecute; - - }, true, [], true] call CBA_fnc_addClassEventHandler; - }; -}] call CBA_fnc_addEventHandler; +["vehicle", FUNC(handlePlayerVehicleChanged)] call CBA_fnc_addPlayerEventHandler; +["ace_infoDisplayChanged", FUNC(turretDisplayLoaded)] call CBA_fnc_addEventHandler; diff --git a/addons/mk6mortar/XEH_preInit.sqf b/addons/mk6mortar/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/mk6mortar/XEH_preInit.sqf +++ b/addons/mk6mortar/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/mk6mortar/config.cpp b/addons/mk6mortar/config.cpp index f387632446..a63f7086f9 100644 --- a/addons/mk6mortar/config.cpp +++ b/addons/mk6mortar/config.cpp @@ -34,3 +34,7 @@ class RscStructuredText; #include "RscInGameUI.hpp" #include "RscRangeTable.hpp" + +class ACE_newEvents { + initMortar = "ace_initMortar"; +}; diff --git a/addons/mk6mortar/functions/fnc_dev_buildTable.sqf b/addons/mk6mortar/functions/fnc_dev_buildTable.sqf index 1f648ead4a..84184fcb51 100644 --- a/addons/mk6mortar/functions/fnc_dev_buildTable.sqf +++ b/addons/mk6mortar/functions/fnc_dev_buildTable.sqf @@ -7,7 +7,7 @@ * 1: Air Friction * * Return Value: - * None + * * * Example: * [100, -0.0001] spawn ace_mk6mortar_fnc_dev_buildTable; //spawn (scheduled) is slower @@ -84,4 +84,4 @@ _outputString = format ["case ((abs(_muzzleVelocity - %1) < 0.00001) && {(abs(_a copyToClipboard _outputString; rangeTableOutput = _outputString; -hint "done"; +hint "done"; \ No newline at end of file diff --git a/addons/mk6mortar/functions/fnc_dev_formatNumber.sqf b/addons/mk6mortar/functions/fnc_dev_formatNumber.sqf index 3e70e0f917..f89c3a1b8f 100644 --- a/addons/mk6mortar/functions/fnc_dev_formatNumber.sqf +++ b/addons/mk6mortar/functions/fnc_dev_formatNumber.sqf @@ -1,19 +1,19 @@ /* - * Author: Pabst Mirror - * Converts numbers into nicely formated strings. - * - * Arguments: - * 0: Input number - * 1: Output type (see case statement) - * 2: If output type is mil, convert input type from deg->mil - * - * Return Value: - * Formatted number - * - * Example: - * [45, "mil4", true] call ace_mk6mortar_fnc_dev_formatNumber = "0800" - * - * Public: No +Author: Pabst Mirror + +Description: +Converts numbers into nicely formated strings. + +Parameters: +0: NUMBER - Input number +1: STRING - Output type (see case statement) +2: BOOL - If output type is mil, convert input type from deg->mil + +Returns: +STRING - Formatted number + +Example: +[45, "mil4", true] call ace_mk6mortar_fnc_dev_formatNumber = "0800" */ #include "script_component.hpp" diff --git a/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf b/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf index 8a9c6d1a98..d1e0a8dd05 100644 --- a/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf +++ b/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf @@ -1,19 +1,19 @@ /* - * Author: Pabst Mirror - * Builds a rangeTable line for a certian range, given muzzle velocity and air friction, returns [] if out of range. - * - * Arguments: - * 0: Muzzle Velocity - * 1: Air Friction - * 2: Range To Hit - * - * Return Value: - * Range Table Line Data (see return line) - * - * Example: - * [300, -0.0001, 3000] call ace_mk6mortar_fnc_simulateCalcRangeTableLine - * - * Public: No +Author: Pabst Mirror + +Description: +Builds a rangeTable line for a certian range, given muzzle velocity and air friction, returns [] if out of range. + +Parameters: +0: NUMBER - Muzzle Velocity +1: NUMBER - Air Friction +2: NUMBER - Range To Hit + +Returns: +ARRAY - Range Table Line Data (see return line) + +Example: +[300, -0.0001, 3000] call ace_mk6mortar_fnc_simulateCalcRangeTableLine */ #include "script_component.hpp" diff --git a/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf b/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf index 29ac0c010a..d302a40f40 100644 --- a/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf +++ b/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf @@ -3,14 +3,14 @@ * DEV to find a firing solution for a given range * * Arguments: - * 0: Range to Hit (Meters) - * 1: Height To Hit (Meters) - * 2: Muzzle Velocity (M/S) + * 0: Range to Hit (Meters) + * 1: Height To Hit (Meters) + * 2: Muzzle Velocity (M/S) * 3: Air Friction * 4: Time Step (seconds) (eg 1/50 will simulate 50 cycles per second) * * Return Value: - * [NUMBER - Elevation In Degrees, NUMBER - Shot Durration] + * ARRAY - [NUMBER - Elevation In Degrees, NUMBER - Shot Durration] * * Example: * [_rangeToHit, _heightToHit, _muzzleVelocity, _airFriction, TIME_STEP] call ace_mk6mortar_fnc_dev_simulateFindSolution; diff --git a/addons/mk6mortar/functions/fnc_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf index 98fa8eebdf..483a69d42b 100644 --- a/addons/mk6mortar/functions/fnc_handleFired.sqf +++ b/addons/mk6mortar/functions/fnc_handleFired.sqf @@ -12,7 +12,7 @@ * 6: projectile - Object of the projectile that was shot * * Return Value: - * None + * Nothing * * Example: * [clientFiredBIS-XEH] call ace_mk6mortar_fnc_handleFired diff --git a/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf index db56f71691..5c74927e46 100644 --- a/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf +++ b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf @@ -7,7 +7,7 @@ * 1: New Vehicle * * Return Value: - * None + * No * * Example: * [bob, mortar] call ace_mk6mortar_fnc_handlePlayerVehicleChanged; @@ -46,8 +46,8 @@ if (_lastFireMode != -1) then { [{ private ["_chargeText", "_currentChargeMode", "_currentFireMode", "_display", "_elevDeg", "_elevationDiff", "_lookVector", "_notGunnerView", "_realAzimuth", "_realElevation", "_upVectorDir", "_useMils", "_weaponDir"]; - params ["_args", "_pfID"]; - _args params ["_mortarVeh", "_fireModes"]; + PARAMS_2(_args,_pfID); + EXPLODE_2_PVT(_args,_mortarVeh,_fireModes); if ((vehicle ACE_player) != _mortarVeh) then { [_pfID] call CBA_fnc_removePerFrameHandler; @@ -80,19 +80,7 @@ if (_lastFireMode != -1) then { //(looking at the sky VS looking at ground will radicaly change fire direction because BIS) _realAzimuth = -1; _realElevation = -1; - - private _useRealWeaponDir = (ctrlText (_display displayCtrl 173)) == "--"; - if (_useRealWeaponDir && {(_mortarVeh ammo (currentWeapon _mortarVeh)) == 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 _testSeekerDir = _testSeekerPosASL vectorFromTo (AGLtoASL (positionCameraToWorld [0,0,1])); - private _testPoint = _testSeekerPosASL vectorAdd (_testSeekerDir vectorMultiply viewDistance); - if ((terrainIntersectASL [_testSeekerPosASL, _testPoint]) || {lineIntersects [_testSeekerPosASL, _testPoint]}) then { - _useRealWeaponDir = false; // If we are not looking at infinity (based on viewDistance) - }; - }; - - if (_useRealWeaponDir) then { + if ((ctrlText (_display displayCtrl 173)) == "--") then { //No range (looking at sky), it will follow weaponDir: _weaponDir = _mortarVeh weaponDirection (currentWeapon _mortarVeh); _realAzimuth = (_weaponDir select 0) atan2 (_weaponDir select 1); diff --git a/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf b/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf index 0f237e1a37..07e0536d24 100644 --- a/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf +++ b/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf @@ -3,10 +3,10 @@ * Opens the rangetable and fills the charge listbox. * * Arguments: - * None + * No * * Return Value: - * None + * No * * Example: * [] call ace_mk6mortar_fnc_rangeTableOpen diff --git a/addons/mk6mortar/functions/fnc_rangeTablePageChange.sqf b/addons/mk6mortar/functions/fnc_rangeTablePageChange.sqf index 1090967e5a..c0cc40ccdc 100644 --- a/addons/mk6mortar/functions/fnc_rangeTablePageChange.sqf +++ b/addons/mk6mortar/functions/fnc_rangeTablePageChange.sqf @@ -3,10 +3,10 @@ * Called when listbox selection changes. Updates the rangetable with new values. * * Arguments: - * None + * No * * Return Value: - * None + * No * * Example: * [] call ace_mk6mortar_fnc_rangeTablePageChange diff --git a/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf b/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf index d035959da4..db87cb6000 100644 --- a/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf +++ b/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf @@ -8,7 +8,7 @@ * 1: Air Friction * * Return Value: - * Array + * * * Example: * [200, 0] call ace_mk6mortar_fnc_rangeTablePreCalculatedValues @@ -268,4 +268,4 @@ case ((abs(_muzzleVelocity - 200) < 0.00001) && {(abs(_airFriction - 0) < 0.0000 ERROR("MuzzleVelocity not found in LUT"); [] }; -}; +}; \ No newline at end of file diff --git a/addons/mk6mortar/functions/fnc_toggleMils.sqf b/addons/mk6mortar/functions/fnc_toggleMils.sqf index 075c7c3143..5c27bf64e4 100644 --- a/addons/mk6mortar/functions/fnc_toggleMils.sqf +++ b/addons/mk6mortar/functions/fnc_toggleMils.sqf @@ -7,7 +7,7 @@ * 1: Player * * Return Value: - * None + * No * * Example: * [mortar,bob] call ace_mk6mortar_fnc_toggleMils; diff --git a/addons/mk6mortar/script_component.hpp b/addons/mk6mortar/script_component.hpp index b892893850..d7f0b92cee 100644 --- a/addons/mk6mortar/script_component.hpp +++ b/addons/mk6mortar/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MK6MORTAR diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml index 58c0af47d6..29db72fa65 100644 --- a/addons/mk6mortar/stringtable.xml +++ b/addons/mk6mortar/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Tabela de distâncias de para 82mm 82mm Rangetable Tavola di tiro 82mm - 82mm 射表 - 82mm 사거리표 - 82mm迫击炮射表 - 82mm迫擊炮射表 Range Table for the Mk6 82mm Mortar @@ -28,10 +24,6 @@ Tabela de distâncias para morteiro Mk6 82mm Rangetable pro Mk6 82mm minomet Tavola di tiro per il mortaio calibro 82mm Mk6 - Mk6 82mm 迫撃砲の射表 - Mk6 82mm 박격포 사격을 위한 사거리표 - MK6 82mm迫击炮射表 - MK6 82mm迫擊炮射表 Open 82mm Rangetable @@ -44,10 +36,6 @@ Abrir tabela de distâncias para 82mm Otevřít 82mm Rangetable Apri la tavola di tiro 82mm - 82mm 射表を開く - 82mm 사거리표 열기 - 开启82mm迫击炮射表 - 開啟82mm迫擊炮射表 Charge @@ -60,10 +48,6 @@ Carregar Charge Carica - 装薬 - 장약 - 装药 - 裝藥 Mk6 Settings @@ -76,10 +60,6 @@ Mk6 beállítások Настройки Mk6 Impostazioni Mk6 - Mk6 設定 - Mk6 설정 - MK6设定 - MK6設定 Air Resistance @@ -92,10 +72,6 @@ Légellenállás Сопротивление воздуха Resistenza dell'Aria - 空気抵抗 - 공기저항 - 空气阻力 - 空氣阻力 For Player Shots, Model Air Resistance and Wind Effects @@ -108,10 +84,6 @@ Játékos általi lövésekhez, legyen-e számított légellenállás és szélhatás Для выстрелов игрока. Моделирует сопротивление воздуха и эффект ветра Per Proiettili dei Giocatori, simula la Resistenza dell'Aria e gli Effetti del Vento - プレイヤが射撃すると、空気抵抗モデルと風による影響をあたえます。 - 플레이어 사격시 공기저항과 바람에 영향을 받습니다 - 设定由玩家射击的迫击炮, 将会受到空气阻力与风力的影响 - 設定由玩家射擊的迫擊砲, 將會受到空氣阻力與風力的影響 Allow Mk6 Computer @@ -124,10 +96,6 @@ Mk6 számítógép engedélyezése Разрешить компьютер Mk6 Consenti Computer Mk6 - Mk6 コンピュータを許可 - Mk6 탄도계산컴퓨터 허가 - 允许使用MK6射控电脑 - 允許使用MK6射控電腦 Show the Computer and Rangefinder (these NEED to be removed if you enable air resistance) @@ -140,10 +108,6 @@ A távmérő és számítógép megjelenítése (ezeket el KELL távolítani ha a légellenállás engedélyezve van) Показывает компьютер и дальномер (это НУЖНО отключить, если вы включаете сопротивление воздуха) Mostra il Computer e Distaziometro (questi DEVONO essere rimossi se vuoi abilitare la resistenza dell'aria) - コンピュータと距離を表示します (空気抵抗を有効化している場合は必ず削除してください) - 탄도계산컴퓨터와 거리측정기를 보여줍니다(공기저항을 활성화했을경우 이 항목은 비활성화 되어야만 합니다) - 显示射控电脑和测距仪 (如果有启用空气阻力功能时, 须停用此项功能) - 顯示射控電腦和測距儀 (如果有啟用空氣阻力功能時, 須停用此項功能) Allow Mk6 Compass @@ -156,10 +120,6 @@ Mk6 iránytű engedélyezése Разрешить компас Mk6 Consenti Bussola Mk6 - Mk6 への方位磁石を有効化 - Mk6 나침반 허용 - 允许使用MK6指北针 - 允許使用MK6指北針 Show the Mk6 Digital Compass @@ -172,10 +132,6 @@ Az Mk6 digitális iránytű megjelenítése Показывает цифровой компас Mk6 Mostra la Bussola Digitale Mk6 - Mk6 のデジタル方位磁石を表示 - Mk6 에서 전자 나침반을 보여줍니다 - 显示MK6的数位指北针 - 顯示MK6的數位指北針 This module allows you to setup Mk6 mortar settings. @@ -187,10 +143,6 @@ Ce module permet de régler les options du mortier Mk6 Questo modulo ti consente di impostare i parametri del mortaio Mk6. Este módulo permite configurar los parámetros del mortero Mk6. - Mk6 迫撃砲への設定をできます。 - 이 모듈은 Mk6 설치 설정을 가능케 합니다. - 这个模块允许你设定MK6迫击炮的相关功能. - 這個模塊允許你設定MK6迫擊砲的相關功能. Use Ammunition handling @@ -201,10 +153,6 @@ Utilizza la gestione delle munizioni Usar manejo de munição Использовать манипуляции с боеприпасами - 弾薬の取り扱い - 탄약 관리 활성화 - 使用手动弹药装卸 - 使用手動彈藥裝卸 Removes mortar magazines, requiring individual rounds to be loaded by the gunner or loader. Does not affect AI mortars. @@ -215,10 +163,6 @@ Toglie i proiettili dal mortaio. I colpi singoli devono essere caricati dall'operatore. Non cambia quado l'IA spara. Elimina os carregadores do morteiro, requerendo que o atirador ou carregador utilize de forma individual a munição. Não afeta os morteiros controlados pela IA. Удаляет артиллерийские магазины, требует загрузку отдельных снарядов стрелком или заряжащим. Не влияет на артиллерию ИИ. - 迫撃砲から弾薬を除去します。射手か装填手により予め装填されている必要があります。AI 迫撃砲へ影響を与えません。 - 박격포 탄창을 제거합니다, 사수나 장전수가 개별적으로 탄환을 넣어줘야만 합니다. 인공지능은 영향을 받지 않습니다. - 开启此功能时. 迫击炮的弹药需由炮手与装填手共同合作来进行装填. 此功能并不影响由AI射击的迫击炮. - 開啟此功能時. 迫擊砲的彈藥需由砲手與裝填手共同合作來進行裝填. 此功能並不影響由AI射擊的迫擊砲. Remove Round @@ -230,10 +174,6 @@ Odstranit náboj Remover munição Извлечь снаряд - 弾薬を除去 - 탄약 제거 - 卸除弹头 - 卸除彈頭 Load Mortar @@ -245,10 +185,6 @@ Nabít minomet Carregar morteiro Зарядить миномет - 弾薬を装填 - 탄약 장전 - 装载弹头 - 裝載彈頭 Unloading Round @@ -259,10 +195,6 @@ Scarica proiettile Descarregar munição Извлечение снаряда - 弾薬を除去しています - 탄약 제거중 - 卸除弹头中 - 卸除彈頭中 Preparing Round @@ -274,10 +206,6 @@ Připavuji náboj Preparar munição Подготовка снаряда - 事前に装填 - 탄약 준비중 - 准备弹头中 - 準備彈頭中 Load HE @@ -289,10 +217,6 @@ Nabít HE Carregar HE Зарядить фугасный - りゅう弾を装填 - 고폭탄 장전 - 装载高爆弹 - 裝載高爆彈 Load Smoke @@ -304,10 +228,6 @@ Nabít Dýmovnici Carregar Fumaça Зарядить дымовой - 煙幕弾を装填 - 연막탄 장전 - 装载烟雾弹 - 裝載煙霧彈 Load Illumination @@ -319,10 +239,6 @@ Nabít Světlici Carregar Iluminação Зарядить осветительный - 照明弾を装填 - 조명탄 장전 - 装载照明弹 - 裝載照明彈 Load Guided HE @@ -334,10 +250,6 @@ Nabít HE (Naváděné) Carregar HE Guiada Зарядить фугасный управляемый - 誘導りゅう弾を装填 - 유도 고폭탄 장전 - 装载导引高爆弹 - 裝載導引高爆彈 Load Laser Guided HE @@ -349,10 +261,6 @@ Nabít HE (Naváděné laserem) Carregar HE Guiada por Laser Зарядить фугасный управляемый по ЛЦУ - レーザ誘導りゅう弾を装填 - 레이저 유도 고폭탄 장전 - 装载雷射导引高爆弹 - 裝載雷射導引高爆彈 82mm HE Round @@ -364,10 +272,6 @@ 82mm HE náboj Munição 82mm HE Фугасный снаряд 82мм - 82mm りゅう弾 - 82mm 고폭탄 - 82mm高爆弹 - 82mm高爆彈 82mm Smoke Round @@ -379,10 +283,6 @@ 82mm Kouřový náboj Munição 82mm Fumaça Дымовой снаряд 82мм - 82mm 煙幕弾 - 82mm 연막탄 - 82mm烟雾弹 - 82mm煙霧彈 82mm Illumination Round @@ -394,10 +294,6 @@ 82mm Osvětlovací náboj Munição 82mm Iluminação Осветительный снаряд 82мм - 82mm 照明弾 - 82mm 조명탄 - 82mm照明弹 - 82mm照明彈 82mm Guided HE Round @@ -409,10 +305,6 @@ 82mm HE náboj (naváděný) Munição 82mm HE Guiada Фугасный снаряд управляемый 82мм - 82mm 誘導りゅう弾 - 82mm 유도 고폭탄 - 82mm导引高爆弹 - 82mm導引高爆彈 82mm Laser Guided HE Round @@ -424,10 +316,6 @@ 82mm HE náboj (naváděný laserem) Munição 82mm HE Guiada por Laser Фугасный снаряд управляемый по ЛЦУ 82мм - 82mm レーザ誘導りゅう弾 - 82mm 레이저 유도 고폭탄 - 82mm雷射导引高爆弹 - 82mm雷射導引高爆彈 Used in Mk6 mortar @@ -439,10 +327,6 @@ Používá se u minometu Mk6 Usada no Morteiro MK6 Использовался в миномете Mk6 - Mk6 mortar で使います - Mk6 박격포에 사용됨 - 用于Mk6迫击炮 - 用於Mk6迫擊砲 [ACE] 82mm HE Rounds Box @@ -454,10 +338,6 @@ [ACE] Bedna s municí (82mm HE) [ACE] Caixa de Munição 82mm HE [ACE] Ящик фугасных снарядов 82мм - [ACE] 82mm りゅう弾入り弾薬箱 - [ACE] 82mm 고폭탄 상자 - [ACE] 82mm高爆弹药箱 - [ACE] 82mm高爆彈藥箱 [ACE] 82mm Smoke Rounds Box @@ -469,10 +349,6 @@ [ACE] Bedna s municí (82mm Dýmovnice) [ACE] Caixa de Munição 82mm Fumaça [ACE] Ящик дымовых снарядов 82мм - [ACE] 82mm 煙幕弾入り弾薬箱 - [ACE] 82mm 연막탄 상자 - [ACE] 82mm烟雾弹药箱 - [ACE] 82mm煙霧彈藥箱 [ACE] 82mm Illumination Rounds Box @@ -484,10 +360,6 @@ [ACE] Bedna s municí (82mm Světlice) [ACE] Caixa de Munição 82mm Iluminação [ACE] Ящик осветительных снарядов 82мм - [ACE] 82mm 照明弾入り弾薬箱 - [ACE] 82mm 조명탄 상자 - [ACE] 82mm照明弹药箱 - [ACE] 82mm照明彈藥箱 [ACE] 82mm Default Loadout Box @@ -499,10 +371,6 @@ [ACE] Bedna se standardní 82mm municí [ACE] Caixa de Munição 82mm Padrão [ACE] Ящик снарядов 82мм (стандартный) - [ACE] 82mm 梱包箱 - [ACE] 82mm 기본 장비 상자 - [ACE] 82mm预设弹药箱 - [ACE] 82mm預設彈藥箱 - + \ No newline at end of file diff --git a/addons/modules/CfgEventHandlers.hpp b/addons/modules/CfgEventHandlers.hpp index dc1da95f37..cd12d1938e 100644 --- a/addons/modules/CfgEventHandlers.hpp +++ b/addons/modules/CfgEventHandlers.hpp @@ -1,3 +1,4 @@ + class Extended_PreStart_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preStart)); @@ -10,6 +11,7 @@ class Extended_PreInit_EventHandlers { }; }; + class Extended_PostInit_EventHandlers { class _ACE_modules { // using a _ so it is the first postInit to be executed init = QUOTE(call COMPILE_FILE(XEH_postInit)); diff --git a/addons/modules/XEH_PREP.hpp b/addons/modules/XEH_PREP.hpp index ab0c69eab9..66edc4e817 100644 --- a/addons/modules/XEH_PREP.hpp +++ b/addons/modules/XEH_PREP.hpp @@ -1 +1,2 @@ + PREP(moduleInit); diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index dcd6277aed..293b946897 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -1,3 +1,4 @@ + #include "script_component.hpp" [QEGVAR(common,initSettingsFromModules), { @@ -9,7 +10,7 @@ [_x] call { params ["_logic"]; private _logicType = typeOf _logic; - _logic hideObject true; + _logic hideobject true; if (_logic getVariable [QGVAR(initalized), false]) exitWith {}; private _config = (configFile >> "CfgVehicles" >> _logicType); @@ -17,7 +18,7 @@ private _isGlobal = getNumber (_config >> "isGlobal") > 0; private _isDisposable = getNumber (_config >> "isDisposable") > 0; - private _isPersistent = getNumber (_config >> "isPersistent") > 0 || getNumber (_config >> "isGlobal") > 1; + private _isPersistent = getNumber (_config >> "isPersistent") > 0 || getnumber (_config >> "isGlobal") > 1; private _isSingular = getNumber (_config >> "isSingular") > 0; private _function = getText (_config >> "function"); if (isNil _function) then { @@ -26,7 +27,7 @@ _function = missionNamespace getVariable _function; }; if (_isSingular && {_logicType in _uniqueModulesHandled}) then { //ToDo: should this be an exit? - WARNING_1("Module [%1] - More than 1 singular module placed", _logicType); + ACE_LOGWARNING_1("Module [%1] - More than 1 singular module placed", _logicType); }; if (_isSingular) then {_uniqueModulesHandled pushBack _logicType;}; diff --git a/addons/modules/XEH_preInit.sqf b/addons/modules/XEH_preInit.sqf index cb884af1f5..419cd902b5 100644 --- a/addons/modules/XEH_preInit.sqf +++ b/addons/modules/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(moduleInitCollection) = []; diff --git a/addons/modules/config.cpp b/addons/modules/config.cpp index 6475b90cf4..662b1cb349 100644 --- a/addons/modules/config.cpp +++ b/addons/modules/config.cpp @@ -14,7 +14,6 @@ class CfgPatches { }; }; -class CBA_Extended_EventHandlers; class CfgVehicles { class Logic; class Module_F: Logic { @@ -24,7 +23,6 @@ class CfgVehicles { class ACE_Module: Module_F { class EventHandlers { init = QUOTE(_this call DFUNC(moduleInit)); - class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; }; }; }; diff --git a/addons/modules/functions/fnc_moduleInit.sqf b/addons/modules/functions/fnc_moduleInit.sqf index e4ab737db3..5d42b4fa87 100644 --- a/addons/modules/functions/fnc_moduleInit.sqf +++ b/addons/modules/functions/fnc_moduleInit.sqf @@ -7,10 +7,7 @@ * * * Return Value: - * None - * - * Example: - * [LOGIC] call ace_modules_fnc_moduleInit + * nil * * Public: No */ diff --git a/addons/modules/script_component.hpp b/addons/modules/script_component.hpp index 9c15587f72..0ba8e441e8 100644 --- a/addons/modules/script_component.hpp +++ b/addons/modules/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MODULES diff --git a/addons/movement/XEH_preInit.sqf b/addons/movement/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/movement/XEH_preInit.sqf +++ b/addons/movement/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/movement/functions/fnc_addLoadToUnitContainer.sqf b/addons/movement/functions/fnc_addLoadToUnitContainer.sqf index fa788c92a2..a79b2ab917 100644 --- a/addons/movement/functions/fnc_addLoadToUnitContainer.sqf +++ b/addons/movement/functions/fnc_addLoadToUnitContainer.sqf @@ -10,9 +10,6 @@ * Return Value: * Success? * - * Example: - * [bob, box, 5] call ace_movement_fnc_addLoadToUnitContainer - * * Public: No */ #include "script_component.hpp" diff --git a/addons/movement/functions/fnc_climb.sqf b/addons/movement/functions/fnc_climb.sqf index 1f2ecf72f4..57df4e5991 100644 --- a/addons/movement/functions/fnc_climb.sqf +++ b/addons/movement/functions/fnc_climb.sqf @@ -6,7 +6,7 @@ * 0: The Unit (usually the player) * * Return Value: - * None + * Nothing * * Example: * [player] call ace_movement_fnc_climb diff --git a/addons/movement/functions/fnc_handleClimb.sqf b/addons/movement/functions/fnc_handleClimb.sqf index ed3ff93d7e..e6d8fed12c 100644 --- a/addons/movement/functions/fnc_handleClimb.sqf +++ b/addons/movement/functions/fnc_handleClimb.sqf @@ -7,7 +7,7 @@ * 1: The finisehd animation * * Return Value: - * None + * Nothing * * Example: * [player, "ACE_climb"] call ace_movement_fnc_handleClimb diff --git a/addons/movement/functions/fnc_handleVirtualMass.sqf b/addons/movement/functions/fnc_handleVirtualMass.sqf index 814a0eeecb..8e33197089 100644 --- a/addons/movement/functions/fnc_handleVirtualMass.sqf +++ b/addons/movement/functions/fnc_handleVirtualMass.sqf @@ -6,10 +6,7 @@ * 0: The Unit (usually the player) * * Return Value: - * None - * - * Example: - * [bob] call ace_movement_fnc_handleVirtualMass + * Nothing * * Public: No */ @@ -31,8 +28,6 @@ private _virtualLoad = 0; backpackContainer _unit ]; -_unit setVariable [QGVAR(totalLoad), (loadAbs _unit + _virtualLoad)]; - // get absolute vanilla load private _absLoad = getNumber (configFile >> "CfgInventoryGlobalVariable" >> "maxSoldierLoad"); diff --git a/addons/movement/script_component.hpp b/addons/movement/script_component.hpp index 5876fa7e8f..f64f10fdd4 100644 --- a/addons/movement/script_component.hpp +++ b/addons/movement/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MOVEMENT diff --git a/addons/movement/stringtable.xml b/addons/movement/stringtable.xml index 5bba66974a..af5ce71af4 100644 --- a/addons/movement/stringtable.xml +++ b/addons/movement/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,26 +12,18 @@ Mostrar peso em libras Súly megjelenítése fontban. Показывать вес в фунтах - ポンドで重量を表示する - 무게를 파운드(lb)로 보여줍니다 - 使用磅来显示重量 - 使用磅來顯示重量 Weight: Gewicht: Peso: - Poids : + Poids: Waga: Váha: Peso: Peso: Súly: Вес: - 重量: - 무게: - 重量: - 重量: Climb @@ -44,10 +36,6 @@ Mászás Arrampicati Subir - 登る - 오르기 - 攀爬 - 攀爬 Can't climb here @@ -60,9 +48,6 @@ Itt nem tudsz mászni Non puoi arrampicarti qui Não se pode subir aqui - ここは登れない - 这里无法攀爬 - 這裡無法攀爬 diff --git a/addons/mx2a/CfgVehicles.hpp b/addons/mx2a/CfgVehicles.hpp index 51038b9625..c450133ba7 100644 --- a/addons/mx2a/CfgVehicles.hpp +++ b/addons/mx2a/CfgVehicles.hpp @@ -6,15 +6,15 @@ class CfgVehicles { scopeCurator = 2; displayName = CSTRING(DisplayName); vehicleClass = "Items"; - class TransportItems { - MACRO_ADDITEM(ACE_MX2A,1); + class TransportWeapons { + MACRO_ADDWEAPON(ACE_MX2A,1); }; }; class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { - class TransportItems { - MACRO_ADDITEM(ACE_MX2A,6); + class TransportWeapons { + MACRO_ADDWEAPON(ACE_MX2A,6); }; }; }; diff --git a/addons/mx2a/script_component.hpp b/addons/mx2a/script_component.hpp index 95ddda7f1c..c2fc0e12e6 100644 --- a/addons/mx2a/script_component.hpp +++ b/addons/mx2a/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_MX2A diff --git a/addons/mx2a/stringtable.xml b/addons/mx2a/stringtable.xml index 3239aef1ed..e2c7ed2dc7 100644 --- a/addons/mx2a/stringtable.xml +++ b/addons/mx2a/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ MX-2A MX-2A MX-2A - MX-2A - MX-2A - MX-2A - MX-2A Thermal imaging device @@ -28,10 +24,6 @@ Hőleképező készülék Тепловизионный прибор Dispositivo di visione termica - サーマル画像表示双眼鏡 - 열영상 장치 - 热成像装置 - 熱成像裝置 - + \ No newline at end of file diff --git a/addons/nametags/XEH_PREP.hpp b/addons/nametags/XEH_PREP.hpp index a27102a4e5..5d99258d27 100644 --- a/addons/nametags/XEH_PREP.hpp +++ b/addons/nametags/XEH_PREP.hpp @@ -2,7 +2,6 @@ PREP(canShow); PREP(doShow); PREP(drawNameTagIcon); -PREP(getCachedFlags); PREP(getVehicleData); PREP(initIsSpeaking); PREP(moduleNameTags); diff --git a/addons/nametags/XEH_postInit.sqf b/addons/nametags/XEH_postInit.sqf index 2df7565cd6..bebe840b47 100644 --- a/addons/nametags/XEH_postInit.sqf +++ b/addons/nametags/XEH_postInit.sqf @@ -15,7 +15,7 @@ GVAR(showNamesTime) = -10; // Statement GVAR(showNamesTime) = CBA_missionTime; - // if (call FUNC(canShow)) then{ call FUNC(doShow); }; // This code doesn't work (canShow has a nil / has never worked??) + if (call FUNC(canShow)) then{ call FUNC(doShow); }; // Return false so it doesn't block other actions false }, @@ -34,14 +34,4 @@ GVAR(showNamesTime) = -10; if (_name == QGVAR(showPlayerNames)) then { call FUNC(updateSettings); }; - // Reset nametag flag cache on setting change: - ACE_player setVariable [QGVAR(flagsCache), nil]; }] call CBA_fnc_addEventHandler; - -["cba_events_visionModeEvent", { - // Reset nametag flag cache on vision mode change: - ACE_player setVariable [QGVAR(flagsCache), nil]; -}] call CBA_fnc_addEventHandler; - -// civilians don't use military ranks -["CIV_F", ["","","","","","",""]] call FUNC(setFactionRankIcons); diff --git a/addons/nametags/XEH_preInit.sqf b/addons/nametags/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/nametags/XEH_preInit.sqf +++ b/addons/nametags/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/nametags/functions/fnc_doShow.sqf b/addons/nametags/functions/fnc_doShow.sqf index c21d587c0b..1f689704b9 100644 --- a/addons/nametags/functions/fnc_doShow.sqf +++ b/addons/nametags/functions/fnc_doShow.sqf @@ -14,7 +14,7 @@ * Public: No */ #include "script_component.hpp" -#include "common.hpp" +#include "common.hpp"; private ["_roleImages", "_player", "_vehicle", "_type", "_config", "_text", "_data", "_isAir", "_turretUnits", "_turretRoles", "_index", "_roleType", "_unit", "_toShow"]; diff --git a/addons/nametags/functions/fnc_getCachedFlags.sqf b/addons/nametags/functions/fnc_getCachedFlags.sqf deleted file mode 100644 index 6e1223c8be..0000000000 --- a/addons/nametags/functions/fnc_getCachedFlags.sqf +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Author: - * Get's flags used for onDraw3D that can be cached - * - * Arguments: - * None - * - * Return Value: - * [_drawName,_drawRank,_enabledTagsNearby,_enabledTagsCursor,_maxDistance] - * - * Example: - * call ace_nametags_fnc_getCachedFlags - * - * Public: No - */ -#include "script_component.hpp" - -// Determine flags from current settings -private _drawName = true; -private _enabledTagsNearby = false; -private _enabledTagsCursor = false; - -switch (GVAR(showPlayerNames)) do { - case 0: { - // Player names Disabled [Note: this should be unreachable as the drawEH will be removed] - _drawName = false; - _enabledTagsNearby = (GVAR(showSoundWaves) == 2); - }; - case 1: { - // Player names Enabled - _enabledTagsNearby = true; - }; - case 2: { - // Player names Only cursor - _enabledTagsNearby = (GVAR(showSoundWaves) == 2); - _enabledTagsCursor = true; - }; - case 3: { - // Player names Only Keypress - _enabledTagsNearby = GVAR(showSoundWaves) == 2; // non-cached: || _onKeyPressAlphaMax) > 0 - }; - case 4: { - // Player names Only Cursor and Keypress - _enabledTagsNearby = (GVAR(showSoundWaves) == 2); - // non-cached: _enabledTagsCursor = _onKeyPressAlphaMax > 0; - }; - case 5: { - // Fade on border - _enabledTagsNearby = true; - }; -}; - -private _ambientBrightness = ((([] call EFUNC(common,ambientBrightness)) + ([0, 0.4] select ((currentVisionMode ace_player) != 0))) min 1) max 0; -private _maxDistance = _ambientBrightness * GVAR(PlayerNamesViewDistance); - -[_drawName, GVAR(showPlayerRanks),_enabledTagsNearby,_enabledTagsCursor,_maxDistance] diff --git a/addons/nametags/functions/fnc_getVehicleData.sqf b/addons/nametags/functions/fnc_getVehicleData.sqf index 59f5284faf..1c916f81aa 100644 --- a/addons/nametags/functions/fnc_getVehicleData.sqf +++ b/addons/nametags/functions/fnc_getVehicleData.sqf @@ -18,7 +18,7 @@ * Public: No */ #include "script_component.hpp" -#include "common.hpp" +#include "common.hpp"; params ["_type"]; diff --git a/addons/nametags/functions/fnc_initIsSpeaking.sqf b/addons/nametags/functions/fnc_initIsSpeaking.sqf index 9428768ec8..08a72e57b3 100644 --- a/addons/nametags/functions/fnc_initIsSpeaking.sqf +++ b/addons/nametags/functions/fnc_initIsSpeaking.sqf @@ -37,14 +37,14 @@ if (!hasInterface) exitWith {}; }] call CBA_fnc_addPlayerEventHandler; if (isClass (configFile >> "CfgPatches" >> "acre_api")) then { - INFO("ACRE Detected."); + ACE_LOGINFO("ACRE Detected."); DFUNC(isSpeaking) = { params ["_unit"]; ([_unit] call acre_api_fnc_isSpeaking) && {!(_unit getVariable ["ACE_isUnconscious", false])} }; } else { if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then { - INFO("TFR Detected."); + ACE_LOGINFO("TFR Detected."); DFUNC(isSpeaking) = { params ["_unit"]; (_unit getVariable ["tf_isSpeaking", false]) && {!(_unit getVariable ["ACE_isUnconscious", false])} diff --git a/addons/nametags/functions/fnc_moduleNameTags.sqf b/addons/nametags/functions/fnc_moduleNameTags.sqf index e1fa1a5dc7..079e4aa704 100644 --- a/addons/nametags/functions/fnc_moduleNameTags.sqf +++ b/addons/nametags/functions/fnc_moduleNameTags.sqf @@ -7,11 +7,6 @@ * * Return Value: * None - * - * Example: - * [] call ace_nametags_fnc_moduleNameTags - * - * Public: No */ #include "script_component.hpp" @@ -38,4 +33,4 @@ if ((_logic getVariable "showVehicleCrewInfo") != -1) then { [_logic, QGVAR(showVehicleCrewInfo), "showVehicleCrewInfo" ] call EFUNC(common,readSettingFromModule); }; -INFO("Nametags Module Initialized."); +ACE_LOGINFO("Nametags Module Initialized."); diff --git a/addons/nametags/functions/fnc_onDraw3d.sqf b/addons/nametags/functions/fnc_onDraw3d.sqf index f937b230b3..7f3f04a0c4 100644 --- a/addons/nametags/functions/fnc_onDraw3d.sqf +++ b/addons/nametags/functions/fnc_onDraw3d.sqf @@ -15,33 +15,65 @@ */ #include "script_component.hpp" +private ["_defaultIcon", "_distance", "_alpha", "_icon", "_targets", "_relPos", "_projDist", "_target"]; + BEGIN_COUNTER(GVAR(onDraw3d)); // Don't show nametags in spectator or if RscDisplayMPInterrupt is open if ((isNull ACE_player) || {!alive ACE_player} || {!isNull (findDisplay 49)}) exitWith {}; -private _flags = [[], DFUNC(getCachedFlags), ACE_player, QGVAR(flagsCache), 2] call EFUNC(common,cachedCall); - -_flags params ["_drawName", "_drawRank", "_enabledTagsNearby", "_enabledTagsCursor", "_maxDistance"]; - +// Determine flags from current settings +private _drawName = true; +private _drawRank = GVAR(showPlayerRanks); +private _enabledTagsNearby = false; +private _enabledTagsCursor = false; private _onKeyPressAlphaMax = 1; -if (GVAR(showPlayerNames) == 3) then { - _onKeyPressAlphaMax = 2 + (GVAR(showNamesTime) - CBA_missionTime); - _enabledTagsNearby = _enabledTagsNearby || {_onKeyPressAlphaMax > 0} -}; -if (GVAR(showPlayerNames) == 4) then { - _onKeyPressAlphaMax = 2 + (GVAR(showNamesTime) - CBA_missionTime); - _enabledTagsCursor = _onKeyPressAlphaMax > 0; +switch (GVAR(showPlayerNames)) do { + case 0: { + // Player names Disabled + _drawName = false; + _enabledTagsNearby = (GVAR(showSoundWaves) == 2); + _enabledTagsCursor = false; + }; + case 1: { + // Player names Enabled + _enabledTagsNearby = true; + _enabledTagsCursor = false; + }; + case 2: { + // Player names Only cursor + _enabledTagsNearby = (GVAR(showSoundWaves) == 2); + _enabledTagsCursor = true; + }; + case 3: { + // Player names Only Keypress + _onKeyPressAlphaMax = 2 + (GVAR(showNamesTime) - CBA_missionTime); + _enabledTagsNearby = (_onKeyPressAlphaMax) > 0 || (GVAR(showSoundWaves) == 2); + _enabledTagsCursor = false; + }; + case 4: { + // Player names Only Cursor and Keypress + _onKeyPressAlphaMax = 2 + (GVAR(showNamesTime) - CBA_missionTime); + _enabledTagsNearby = (GVAR(showSoundWaves) == 2); + _enabledTagsCursor = _onKeyPressAlphaMax > 0; + }; + case 5: { + // Fade on border + _enabledTagsNearby = true; + _enabledTagsCursor = false; + }; }; +private _ambientBrightness = ((([] call EFUNC(common,ambientBrightness)) + ([0, 0.4] select ((currentVisionMode ace_player) != 0))) min 1) max 0; +private _maxDistance = _ambientBrightness * GVAR(PlayerNamesViewDistance); + private _camPosAGL = positionCameraToWorld [0, 0, 0]; -if !((_camPosAGL select 0) isEqualType 0) exitWith {}; // handle RHS / bugged vehicle slots - private _camPosASL = AGLtoASL _camPosAGL; +private _vecy = (AGLtoASL positionCameraToWorld [0, 0, 1]) vectorDiff _camPosASL; // Show nametag for the unit behind the cursor or its commander if (_enabledTagsCursor) then { - private _target = cursorTarget; + _target = cursorTarget; if !(_target isKindOf "CAManBase") then { // When cursorTarget is on a vehicle show the nametag for the commander. if !(_target in allUnitsUAV) then { @@ -58,7 +90,7 @@ if (_enabledTagsCursor) then { {lineIntersectsSurfaces [_camPosASL, eyePos _target, ACE_player, _target] isEqualTo []} && {!isObjectHidden _target}) then { - private _distance = ACE_player distance _target; + _distance = ACE_player distance _target; private _drawSoundwave = (GVAR(showSoundWaves) > 0) && {[_target] call FUNC(isSpeaking)}; // Alpha: @@ -103,9 +135,6 @@ if (_enabledTagsNearby) then { private _target = _x; if !(isNull _target) then { - private _drawSoundwave = (GVAR(showSoundWaves) > 0) && {[_target] call FUNC(isSpeaking)}; - if (_enabledTagsCursor && {!_drawSoundwave}) exitWith {}; // (Cursor Only && showSoundWaves==2) - quick exit - private _relPos = (visiblePositionASL _target) vectorDiff _camPosASL; private _distance = vectorMagnitude _relPos; @@ -121,6 +150,7 @@ if (_enabledTagsNearby) then { }; }; + private _drawSoundwave = (GVAR(showSoundWaves) > 0) && {[_target] call FUNC(isSpeaking)}; private _alphaMax = _onKeyPressAlphaMax; if ((GVAR(showSoundWaves) == 2) && _drawSoundwave) then { _drawName = _drawSoundwave; diff --git a/addons/nametags/script_component.hpp b/addons/nametags/script_component.hpp index 29dce66096..fff9a31de3 100644 --- a/addons/nametags/script_component.hpp +++ b/addons/nametags/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_NAMETAGS diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index fde54a8607..c248dba636 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Показать имена Mostra i nomi Mostrar nomes - 名前の表示 - 이름 표시 - 显示名称 - 顯示名稱 Show player names @@ -28,10 +24,6 @@ Mostrar nomes de jogadores Mostra i nomi dei giocatori Показывать имена игроков (включить имена) - プレイヤ名を表示 - 플레이어 이름 표시 - 显示玩家名称 - 顯示玩家名稱 Show player name only on cursor (requires player names) @@ -44,10 +36,6 @@ Mostrar nome de jogador somente no cursor (requer nome de jogadores) Játékosok nevének mutatása csak a kurzoron (a nevek mutatása szükséges) Показать имена игроков только под курсором (при включенных именах) - カーソルを合わせた時だけプレイヤ名を表示 (プレイヤ名が必要 - 커서로 지시할때만 플레이어 이름 표시(플레이어 이름 필요) - 仅在准心指到后显示玩家名称 (玩家必须有设定名称) - 僅在準心指到後顯示玩家名稱 (玩家必須有設定名稱) Show player name only on keypress (requires player names) @@ -60,10 +48,6 @@ Показать имена игроков только по нажатию клавиши (при включенных именах) Mostra i nomi solo se si preme il tasto (insieme ai nomi) Mostrar nomes somente ao pressionar teclar (requer nome de jogadores) - キーを押した時だけプレイヤ名を表示 (プレイヤ名が必要) - 키를 누를때만 플레이어 이름 표시(플레이어 이름 필요) - 仅在按按键后显示玩家名称 (玩家必须有设定名称) - 僅在按按鍵後顯示玩家名稱 (玩家必須有設定名稱) Show player ranks (requires player names) @@ -76,10 +60,6 @@ Mostrar patente de jogadores (requer nome de jogadores) Játékosok rendfokozatának mutatása (a nevek mutatása szükséges) Показывать звания игроков (при вкл. именах) - プレイヤの階級を表示 (プレイヤ名が必要) - 플레이어 계급 표시 (플레이어 이름 필요) - 显示玩家军阶 (玩家必须有设定名称) - 顯示玩家軍階 (玩家必須有設定名稱) Show vehicle crew info @@ -92,10 +72,6 @@ Jármű-legénység adatainak mutatása Mostrar tripulantes Mostra l'elenco del personale a bordo - 車両の乗員を表示 - 차량 승무원 정보 표시 - 显示载具成员信息 - 顯示載具成員信息 Show name tags for AI units @@ -108,10 +84,6 @@ Névcímkék mutatása MI-egységeknél Mostra i nomi delle le unità AI Mostrar nomes para unidades de IA - AI ユニットの名札を表示 - 인공지능 인원 이름 표시 - 显示AI单位名称 - 顯示AI單位名稱 Show SoundWaves (requires player names) @@ -124,10 +96,6 @@ "Hanghullámok" mutatása (a nevek mutatása szükséges) Mostra movimento audio (insieme ai nomi) Mostrar onda sonora (requer nome de jogadores) - 音波形を表示 (プレイヤ名が必要) - 음파 표시 (플레이어 이름 필요) - 当玩家讲话时, 显示声波图案 (玩家必须有设定名称) - 當玩家講話時, 顯示聲波圖案 (玩家必須有設定名稱) Default Nametag Color (Non Group Members) @@ -140,10 +108,6 @@ Alap névcímke-szín (csoporton kívüli személyek) Colore dei nomi non appartenenti al gruppo Cor padrão do nome (unidades fora do grupo) - 標準の名札の色(グループ メンバ以外) - 기본 이름표 색상 (비-그룹 멤버) - 预设名称颜色 (非同小队队友) - 預設名稱顏色 (非同小隊隊友) Name Tags @@ -156,10 +120,6 @@ Névcímkék Имена игроков Etichette Nomi - 名札 - 이름표 - 玩家名称 - 玩家名稱 Player Names View Dist. @@ -172,10 +132,6 @@ Játékosok nevének látótávja Дистанция отображения имен Distanza Visiva Etichette Nomi - プレイヤ名が見える範囲 - 플레이어 이름 표시 거리 - 玩家名称显示距离 - 玩家名稱顯示距離 Distance in meters at which player names are shown. Default: 5 @@ -188,10 +144,6 @@ Méterben megadott érték a játékosok nevének mutatására. Alapértelmezett: 5 Дистанция в метрах, на которой отображаются имена игроков. По-умолчанию: 5 Distanza in metri a cui sono visibili i nomi giocatori. Default: 5 - プレイヤの周り何メートルまで名札を表示できます。標準:5 - 플레이어 이름이 표시되는 미터. 기본설정: 5 - 设定名称在多少距离以内显示. 预设:5公尺 - 設定名稱在多少距離以內顯示. 預設:5公尺 Show name tags for AI? @@ -204,10 +156,6 @@ Névcímkék megjelenítése AI-nál? Показывать имена ботов? Mostra etichette nomi per IA? - AI の名札も表示しますか? - 인공지능의 이름도 표시합니까? - 显示AI名称? - 顯示AI名稱? Show the name and rank tags for friendly AI units? Default: Do not force @@ -220,10 +168,6 @@ Mutassa-e a szövetséges AI egységek nevét és rangját? Alapértelmezett: Nincs felülbírálás Показывать имена и звания дружественных ботов? По-умолчанию: Не обязывать Mostra etichette nomi ed etichette gradi per unità IA alleate? Default: Non forzare - 友軍の AI にも名前と階級を表示しますか?標準:強制しない - 아군 인공지능의 계급을 표시합니까? 기본설정: 강제하지 않음 - 显示友军AI的名称和军阶? 预设: 不显示 - 顯示友軍AI的名稱和軍階? 預設: 不顯示 Force Hide @@ -236,10 +180,6 @@ Erőltetett rejtett Обязательно: Скрывать Forza Nascosto - 強制で非表示 - 강제로 숨기기 - 强迫隐藏 - 強迫隱藏 Force Show @@ -252,10 +192,6 @@ Erőltetett látható Обязательно: Показывать Forza Mostra - 強制で表示 - 강제로 표시 - 强迫显示 - 強迫顯示 Show crew info? @@ -268,10 +204,6 @@ Legénységi adatok megjelenítése? Показывать экипаж? Mostra informazioni equipaggio? - 乗員の情報を表示 - 승무원 정보 표시? - 显示载具成员讯息? - 顯示載具成員訊息? Show vehicle crew info, or by default allows players to choose it on their own. Default: Do Not Force @@ -284,10 +216,6 @@ A legénységi adatok mutatása, alapértelmezett esetben a játékos által kiválasztható. Alapértelmezett: Nincs felülbírálás Показывать информацию об экипаже техники, или по-умолчанию, позволяет игрокам выбрать свою настройку. По-умолчанию: Не обязывать Mostra informazioni sull'equipaggio del veicolo, oppure consenti di default di lasciare che siano i giocatori a scegliere. Default: Non Forzare - 車両の乗員を表示します。標準ではプレイヤ各々が選べられます。標準:強制しない - 승무원 정보를 표시하거나 플레이어가 직접 고르게 냅둡니다. 기본설정: 강제하지 않음 - 显示载具成员讯息. 在预设的情况下, 系统允许玩家自己决定开关此讯息. 预设: 不显示 - 顯示載具成員訊息. 在預設的情況下, 系統允許玩家自己決定開關此訊息. 預設: 不顯示 Show for Vehicles @@ -300,10 +228,6 @@ Mutatás járműveknél Показывать для техники Mostra per Veicoli - 車両への表示 - 차량 표시 - 显示给载具指挥官 - 顯示給載具指揮官 Show cursor NameTag for vehicle commander (only if client has name tags enabled) Default: No @@ -315,10 +239,6 @@ Показывать имя командира техники (только, если клиент включил отображение имен). По-умолчанию: Нет Afficher les étiquettes de nom pour les commandants de véhicule (uniquement si l'affichage est activé pour le client). Défaut: non Mostra il nome sul cursore per il comandante del veicolo (solo se il client ha le Etichette Nomi attive) Default: No - 車長の名札をカーソルを当てて表示します (クライアント側で名札を有効化する必要があります) 標準:無効 - 차량의 사령관의 이름표를 표시합니다 (오직 클라이언트가 이름표를 활성화 할시에만 보입니다) 기본설정: 아니요 - 使载具指挥官能透过准心指到别的单位来显示其名称 (仅当客户端的名称功能已启用). 预设: 关闭 - 使載具指揮官能透過準心指到別的單位來顯示其名稱 (僅當客戶端的名稱功能已啟用). 預設: 關閉 This module allows you to customize settings and range of Name Tags. @@ -331,10 +251,6 @@ Ez a modul lehetővé teszi a névcímkék beállításainak testreszabását. Этот модуль позволяет настроить опции и дистанцию отображения имен игроков. Questo modulo ti consente di personalizzare le impostazioni ed il raggio delle Etichette Nomi - このモジュールは名札の表示範囲と設定を変更できます。 - 이 모듈은 당신이 이름표의 범위를 임의로 수정할 수 있게 해줍니다. - 这个模块允许您设定名称和显示范围等设定. - 這個模塊允許您設定名稱和顯示範圍等設定. Only on Cursor @@ -347,10 +263,6 @@ Csak kurzorra Только под курсором Solo su Cursore - カーソルでのみ - 커서만 해당 - 只有准心指到时 - 只有準心指到時 Only on Keypress @@ -363,10 +275,6 @@ Csak gombnyomásra Только по нажатию клавиши Solo quando Premi Tasto - キー押下のみ - 키를 누를경우만 - 只有按按键时 - 只有按按鍵時 Only on Cursor and Keypress @@ -379,10 +287,6 @@ Csak kurzorra és gombnyomásra Под курсором или по нажатию клавиши Solo su Cursore e quando Premi Tasto - カーソルとキー押下のみ - 커서와 키를 누를경우만 - 只有在准心指到和按按键时 - 只有在準心指到和按按鍵時 Force Show Only on Cursor @@ -395,10 +299,6 @@ Erőltetett látható, csak kurzorra Обязательно: Только под курсором Forza Mostra solo su Cursore - カーソルでのみに強制する - 커서만 강제로 해당 - 强制仅显示在准心指到时 - 強制僅顯示在準心指到時 Force Show Only on Keypress @@ -411,10 +311,6 @@ Erőltetett látható, csak gombnyomásra Обязательно: Только по нажатию клавиши Forza Mostra solo quando Premi Tasto - キー押下のみに強制する - 키를 누를경우만 강제로 해당 - 强制仅显示在按按键时 - 強制僅顯示在按按鍵時 Force Show Only on Cursor and Keypress @@ -427,10 +323,6 @@ Erőltetett látható, csak kurzorra és gombnyomásra Обязательно: Под курсором или по нажатию клавиши Forza Mostra solo su Cursore e quando Premi Tasto - カーソルとキー押下のみに強制する - 커서와 키를 누를경우만 강제로 해당 - 强制显示在准心指到和按按键时 - 強制顯示在準心指到和按按鍵時 Use Nametag settings @@ -443,10 +335,6 @@ Névcímkék beállításának használata Так же, как имена Usa impostazioni Etichette Nomi - 名札の設定 - 이름표 설정 사용 - 玩家名称设定 - 玩家名稱設定 Always Show All @@ -459,10 +347,6 @@ Mindig minden mutatása Всегда показывать Mostra Sempre Tutto - 常に表示する - 항상 모두 표시 - 永远显示全部 - 永遠顯示全部 Show player names and set their activation. Default: Enabled @@ -475,10 +359,6 @@ Mutassa a játékosok nevét és kezelje az aktivációjukat. Alapértelmezett: Engedélyezve Показывать имена игроков и установить их активацию. По-умолчанию: Включено Mostra nomi giocatori ed imposta la loro attivazione. Default: Abilitato - プレイヤ名の表示と設定を有効化します。標準:有効 - 플레이어 이름의 표시와 설정을 활성화합니다. 기본설정: 활성화 - 显示玩家的名称并设置其启动方式. 预设: 启用 - 顯示玩家的名稱並設置其啟動方式. 預設: 啟用 Effect of sound waves above the heads of speaking players after holding the PTT key. This option works with TFAR and ACRE2. @@ -491,10 +371,6 @@ Hanghullám-effekt a beszélő játékosok feje felett a PTT-gomb lenyomásakor. Ez a beállítás TFAR és ACRE2 alatt működik. Эффект звуковой волны над головами говорящих игроков при удерживании кнопки push-to-talk. Эта опация работает также с рациями TFAR и ACRE2. Effetto delle onde sonore sopra la testa dei giocatori parlanti quando premono il tasto PTT. Questa opzione funziona con TFAR ed ACRE2 - プレイヤーが PTT キーを押している間は、音波形を表示します。このオプションは TFAR と ACRE2 で動作します。 - 플레이어가 PTT로 말할시 머리위에 음파효과를 적용합니다. 이 옵션은 TFAR과 ACRE2가 있을때만 적용됩니다. - 当玩家使用按键发话时, 其头上的角色名称旁会显示声波的图案. 此功能可搭配TFAR、ACRE2等模组使用. - 當玩家使用按鍵發話時, 其頭上的角色名稱旁會顯示聲波的圖案. 此功能可搭配TFAR、ACRE2等模組使用. Nametags Size @@ -507,10 +383,6 @@ Névcímkék mérete Размер имен игроков Dimensione Etichette Nome - 名札の大きさ - 이름표 크기 - 玩家名称标记大小 - 玩家名稱標記大小 Text and Icon Size Scaling @@ -523,21 +395,10 @@ Szöveg és ikon méretének skálázása Масштабирование размера текста и иконок Proporzione Dimensioni Testo ed Icone - 文字とアイコンの大きさ - 글자와 아이콘 크기 비례 - 文字和图示大小设定 - 文字和圖示大小設定 Fade on screen border Am Bildschirmrand ausblenden - 画面端では非表示 - Ukryj na brzegach ekranu - 화면 가장자리에서 사라짐 - Estomper sur les bords de l'écran - Sfocatura nei bordi dello schermo - 在荧幕边框旁淡出 - 在螢幕邊框旁淡出 diff --git a/addons/nightvision/XEH_preInit.sqf b/addons/nightvision/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/nightvision/XEH_preInit.sqf +++ b/addons/nightvision/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/nightvision/functions/fnc_blending.sqf b/addons/nightvision/functions/fnc_blending.sqf index 4a858838d3..2616cb83f5 100644 --- a/addons/nightvision/functions/fnc_blending.sqf +++ b/addons/nightvision/functions/fnc_blending.sqf @@ -6,7 +6,7 @@ * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: - * Noneg + * Nothing * * Example: * [clientFiredBIS-XEH] call ace_nightvision_fnc_blending diff --git a/addons/nightvision/functions/fnc_changeNVGBrightness.sqf b/addons/nightvision/functions/fnc_changeNVGBrightness.sqf index 5bb5d52721..04cea0f214 100644 --- a/addons/nightvision/functions/fnc_changeNVGBrightness.sqf +++ b/addons/nightvision/functions/fnc_changeNVGBrightness.sqf @@ -7,7 +7,7 @@ * 1: Change in brightness (1 or -1) * * Return Value: - * None + * Nothing * * Example: * [player, 1] call ace_nightvision_fnc_changeNVGBrightness diff --git a/addons/nightvision/functions/fnc_updatePPEffects.sqf b/addons/nightvision/functions/fnc_updatePPEffects.sqf index 7f4f660bd7..9bf8321353 100644 --- a/addons/nightvision/functions/fnc_updatePPEffects.sqf +++ b/addons/nightvision/functions/fnc_updatePPEffects.sqf @@ -3,10 +3,10 @@ * Update the ppEffects everytime something changes * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * [someEvent] call ace_nightvision_fnc_updatePPEffects diff --git a/addons/nightvision/script_component.hpp b/addons/nightvision/script_component.hpp index 142983ebdc..32ded9ac5a 100644 --- a/addons/nightvision/script_component.hpp +++ b/addons/nightvision/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_NIGHTVISION diff --git a/addons/nightvision/stringtable.xml b/addons/nightvision/stringtable.xml index 8e4e1fafde..708860d134 100644 --- a/addons/nightvision/stringtable.xml +++ b/addons/nightvision/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ ПНВ (Gen1) Gafas de visión nocturna (Gen1) Éjjellátó szemüveg (1. Gen.) - 夜間暗視装置つきゴーグル (第1世代) - 야투경 (1세대) - 夜视镜 (初代) - 夜視鏡 (初代) NV Goggles (Gen2) @@ -28,10 +24,6 @@ ПНВ (Gen2) Gafas de visión nocturna (Gen2) Éjjellátó szemüveg (2. Gen.) - 夜間暗視装置つきゴーグル (第2世代) - 야투경 (2세대) - 夜视镜 (二代) - 夜視鏡 (二代) NV Goggles (Gen3) @@ -44,10 +36,6 @@ ПНВ (Gen3) Gafas de visión nocturna (Gen3) Éjjellátó szemüveg (3. Gen.) - 夜間暗視装置つきゴーグル (第3世代) - 야투경 (3세대) - 夜视镜 (三代) - 夜視鏡 (三代) NV Goggles (Gen3, Brown) @@ -60,10 +48,6 @@ ПНВ (Gen3, Коричневый) Gafas de visión nocturna (Gen3, marrón) Éjjellátó szemüveg (3. Gen., barna) - 夜間暗視装置つきゴーグル (第3世代、ブラウン) - 야투경 (3세대, 갈색) - 夜视镜 (三代, 棕色) - 夜視鏡 (三代, 棕色) NV Goggles (Gen3, Green) @@ -76,10 +60,6 @@ ПНВ (Gen3, Зелёный) Gafas de visión nocturna (Gen3, verde) Éjjellátó szemüveg (3. Gen., zöld) - 夜間暗視装置つきゴーグル (第3世代、グリーン) - 야투경 (3세대, 녹색) - 夜视镜 (三代, 绿色) - 夜視鏡 (三代, 綠色) NV Goggles (Gen3, Black) @@ -92,10 +72,6 @@ ПНВ (Gen3, Чёрный) Gafas de visión nocturna (Gen3, negro) Éjjellátó szemüveg (3. Gen., fekete) - 夜間暗視装置つきゴーグル (第3世代、ブラック) - 야투경 (3세대, 검정색) - 夜视镜 (三代, 黑色) - 夜視鏡 (三代, 黑色) NV Goggles (Gen4) @@ -108,10 +84,6 @@ ПНВ (Gen4) Gafas de visión nocturna (Gen4) Éjjellátó szemüveg (4. Gen.) - 夜間暗視装置つきゴーグル (第4世代) - 야투경 (4세대) - 夜视镜 (四代) - 夜視鏡 (四代) NV Goggles (Wide) @@ -124,10 +96,6 @@ Éjjellátó szemüveg (széles látószögű) Óculos de visão noturna (Panorâmico) Occhiali notturni (Larghi) - 夜間暗視装置つきゴーグル (ワイド) - 야투경 (넓음) - 夜视镜 (宽版) - 夜視鏡 (寬版) Brightness: %1 @@ -140,10 +108,6 @@ Fényerő: %1 Luminosidade: %1 Luminosità: %1 - 光度:%1 - 밝기: %1 - 亮度: %1 - 亮度: %1 Increase NVG Brightness @@ -156,10 +120,6 @@ Éjjellátó fényerejének növelése Aumentar Luminosidade do EVN Aumenta la luminosità dell'NVG - 夜間暗視装置の光度を上げる - 야투경 밝기 높이기 - 增加夜视镜亮度 - 增加夜視鏡亮度 Decrease NVG Brightness @@ -172,10 +132,6 @@ Éjjellátó fényerejének csökkentése Diminuir Luminosidade do EVN Riduci la luminosità dell'NVG - 夜間暗視装置の光度を下げる - 야투경 밝기 줄이기 - 减少夜视镜亮度 - 減少夜視鏡亮度 Nightvision @@ -187,10 +143,6 @@ Visione Notturna Visión Nocturna Vision nocturne - 夜間暗視装置 - 야간투시경 - 夜视 - 夜視 Settings for night vision. @@ -202,10 +154,6 @@ Impostazioni per visione notturna. Parámetros para visión nocturna Réglage pour la vision nocturne - 夜間暗視装置の設定。 - 야간투시경 설정 - 设定夜视选项. - 設定夜視選項. Disable NVGs in scope @@ -217,10 +165,6 @@ Disabilita NVG nei mirini Desactivar NVG en miras Desactiver les JVN dans les viseurs. - スコープを覗くと夜間暗視装置を無効化 - 조준경 사용시 야투경 비활성화 - 使用瞄准镜时关闭夜视镜 - 使用瞄準鏡時關閉夜視鏡 Blocks the usage of night vision goggles whilst aiming down the sight. @@ -232,10 +176,6 @@ Blocca l'uso di visori notturni mentre miri con ottiche. Desactiva el uso de gafas visión nocturna cuando se utilizan miras normales. Bloque l'usage des JVN pendant la visée. - スコープを使い狙いを付けると、夜間暗視装置を無効化します。 - 조준시 야투경의 사용을 제한합니다. - 此功能开启后, 当要使用瞄准镜时, 为避免夜视镜镜头碰撞到瞄准镜, 会先拿开夜视镜后再进行瞄准镜瞄准. - 此功能開啟後, 當要使用瞄準鏡時, 為避免夜視鏡鏡頭碰撞到瞄準鏡, 會先拿開夜視鏡後再進行瞄準鏡瞄準. - + \ No newline at end of file diff --git a/addons/nlaw/$PBOPREFIX$ b/addons/nlaw/$PBOPREFIX$ deleted file mode 100644 index cbcdbb46de..0000000000 --- a/addons/nlaw/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\nlaw diff --git a/addons/nlaw/ACE_GuidanceConfig.hpp b/addons/nlaw/ACE_GuidanceConfig.hpp deleted file mode 100644 index e04753d681..0000000000 --- a/addons/nlaw/ACE_GuidanceConfig.hpp +++ /dev/null @@ -1,14 +0,0 @@ -class EGVAR(missileguidance,AttackProfiles) { - class GVAR(directAttack) { - name = CSTRING(directAttack); - functionName = QFUNC(attackProfile); - }; - class GVAR(overflyTopAttack): GVAR(directAttack) { - name = CSTRING(overflyTopAttack); - }; -}; -class EGVAR(missileguidance,SeekerTypes) { - class GVAR(seeker) { - functionName = QFUNC(seeker); - }; -}; diff --git a/addons/nlaw/CfgAmmo.hpp b/addons/nlaw/CfgAmmo.hpp deleted file mode 100644 index f0649b2ba4..0000000000 --- a/addons/nlaw/CfgAmmo.hpp +++ /dev/null @@ -1,55 +0,0 @@ -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 { - enabled = 1; - - minDeflection = 0.0005; // Minium flap deflection for guidance - maxDeflection = 0.01; // Maximum flap deflection for guidance - incDeflection = 0.0005; // The incrmeent in which deflection adjusts. - - 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"}; - - 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)}; - showHintOnCycle = 1; - - // Run once at fired event - onFired = QFUNC(onFired); - }; - }; - - // Sub ammos used in OTA mode (see fnc_seeker.sqf) - class ACE_NLAW_Explosion: ACE_NLAW { // Based on FCS-Airburst, will explode right away - timeToLive = 0; - model = ""; - }; - class ACE_NLAW_ShapedCharge: ACE_NLAW { // Shaped charge from rocket explosion, no effects - timeToLive = 1; - model = ""; - hit = 750; - indirectHit = 0; - indirectHitRange = 0; - explosionSoundEffect = ""; - explosionEffects = ""; - CraterEffects = ""; - muzzleEffect = ""; - }; -}; diff --git a/addons/nlaw/CfgEventhandlers.hpp b/addons/nlaw/CfgEventhandlers.hpp deleted file mode 100644 index 0d3301d6e0..0000000000 --- a/addons/nlaw/CfgEventhandlers.hpp +++ /dev/null @@ -1,17 +0,0 @@ -class Extended_PreStart_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); - }; -}; - -class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); - }; -}; - -class Extended_PostInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); - }; -}; diff --git a/addons/nlaw/CfgMagazines.hpp b/addons/nlaw/CfgMagazines.hpp deleted file mode 100644 index fe2e2ecf8d..0000000000 --- a/addons/nlaw/CfgMagazines.hpp +++ /dev/null @@ -1,6 +0,0 @@ -class CfgMagazines { - class CA_LauncherMagazine; - class NLAW_F: CA_LauncherMagazine { - ammo = "ACE_NLAW"; - }; -}; diff --git a/addons/nlaw/CfgWeapons.hpp b/addons/nlaw/CfgWeapons.hpp deleted file mode 100644 index 35f5b17122..0000000000 --- a/addons/nlaw/CfgWeapons.hpp +++ /dev/null @@ -1,13 +0,0 @@ -class CfgWeapons { - class Launcher_Base_F; - class launch_NLAW_F: Launcher_Base_F { - GVAR(enabled) = 1; - canLock = 1; - class OpticsModes { - class optic { - distanceZoomMin = 0; - distanceZoomMax = 0; - }; - }; - }; -}; diff --git a/addons/nlaw/XEH_PREP.hpp b/addons/nlaw/XEH_PREP.hpp deleted file mode 100644 index aad1e57efb..0000000000 --- a/addons/nlaw/XEH_PREP.hpp +++ /dev/null @@ -1,6 +0,0 @@ -LOG("prep"); - -PREP(attackProfile); -PREP(keyDown); -PREP(onFired); -PREP(seeker); diff --git a/addons/nlaw/XEH_postInit.sqf b/addons/nlaw/XEH_postInit.sqf deleted file mode 100644 index 885e2d5e2f..0000000000 --- a/addons/nlaw/XEH_postInit.sqf +++ /dev/null @@ -1,46 +0,0 @@ -#include "script_component.hpp" - -if (!hasInterface) exitWith {}; - -GVAR(isLockKeyDown) = false; - -// Degrees per second -GVAR(yawChange) = 0; -GVAR(pitchChange) = 0; - -// Add keybind -["ACE3 Weapons", QGVAR(trackTarget), localize LSTRING(trackTarget), { - call FUNC(keyDown); - false // Return false so it doesn't block the rest weapon action -}, { - TRACE_1("lock key up",GVAR(isLockKeyDown)); - GVAR(isLockKeyDown) = false; - false -}, [15, [false, false, false]], false] call CBA_fnc_addKeybind; //Tab Key - - - -// Visual debuging, idealy used with a moving vehicle called "testTarget" -#ifdef DRAW_NLAW_INFO -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"]; - } 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 _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"]; - } forEach [0, 1, 2, 3]; - }; -}]; -#endif diff --git a/addons/nlaw/config.cpp b/addons/nlaw/config.cpp deleted file mode 100644 index 7109459066..0000000000 --- a/addons/nlaw/config.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - name = COMPONENT_NAME; - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_missileguidance"}; - author = ECSTRING(common,ACETeam); - url = ECSTRING(main,URL); - VERSION_CONFIG; - }; -}; - -#include "CfgEventhandlers.hpp" - -#include "CfgAmmo.hpp" -#include "CfgMagazines.hpp" -#include "CfgWeapons.hpp" - -#include "ACE_GuidanceConfig.hpp" diff --git a/addons/nlaw/functions/fnc_attackProfile.sqf b/addons/nlaw/functions/fnc_attackProfile.sqf deleted file mode 100644 index 778a1924b3..0000000000 --- a/addons/nlaw/functions/fnc_attackProfile.sqf +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Author: PabstMirror - * NLAW missile guidance attack profile. - * - * Arguments: - * 0: Seeker Target PosASL - * 1: Guidance Arg Array - * 2: Attack Profile State - * - * Return Value: - * Missile Aim PosASL - * - * Example: - * [[1,2,3], [], []] call ace_nlaw_fnc_attackProfile - * - * Public: No - */ -#include "script_component.hpp" - -params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; -_args params ["_firedEH", "_launchParams"]; -_launchParams params ["","_targetLaunchParams", "", "_attackProfile"]; -_targetLaunchParams params ["", "", "_launchPos"]; -_firedEH params ["","","","","","","_projectile"]; - -// Use seeker (if terminal) -if (!(_seekerTargetPos isEqualTo [0,0,0])) exitWith {_seekerTargetPos}; - -_attackProfileStateParams params ["_startTime", "_startLOS", "_yawChange", "_pitchChange"]; -(_startLOS call CBA_fnc_vect2Polar) params ["", "_yaw", "_pitch"]; - -private _projectilePos = getPosASL _projectile; -private _distanceFromLaunch = (_launchPos distance _projectilePos) + 10; -private _flightTime = CBA_missionTime - _startTime; - -private _realYaw = _yaw + _yawChange * _flightTime; -private _realPitch = _pitch + _pitchChange * _flightTime; - -private _returnTargetPos = _launchPos vectorAdd ([_distanceFromLaunch, _realYaw, _realPitch] call CBA_fnc_polar2vect); - -if (_attackProfile == QGVAR(overflyTopAttack)) then { // Add 2m height in OTA attack mode - _returnTargetPos = _returnTargetPos vectorAdd [0,0,2]; -}; - - -#ifdef DRAW_NLAW_INFO -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); - 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 - -// TRACE_1("Adjusted target position", _returnTargetPos); -_returnTargetPos; diff --git a/addons/nlaw/functions/fnc_keyDown.sqf b/addons/nlaw/functions/fnc_keyDown.sqf deleted file mode 100644 index 82dfbbcc2e..0000000000 --- a/addons/nlaw/functions/fnc_keyDown.sqf +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Author: PabstMirror - * Handles the track key being held down. - * Tracks change in direction of weapon and computes angle change per second. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ace_nlaw_fnc_keyDown - * - * Public: No - */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - -TRACE_1("lock key down",GVAR(isLockKeyDown)); - -if (!alive ACE_player) exitWith {}; -if (!([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {}; -if (!(ACE_player call CBA_fnc_canUseWeapon)) exitWith {}; -if ((getNumber (configFile >> "CfgWeapons" >> (currentWeapon ACE_player) >> QGVAR(enabled))) == 0) exitWith {}; -if (GVAR(isLockKeyDown)) exitWith {ERROR("already running?");}; - -GVAR(isLockKeyDown) = true; -playSound "ACE_Sound_Click"; - -// Get starting weapon dir -((ACE_player weaponDirection (currentWeapon ACE_player)) call CBA_fnc_vect2Polar) params ["", "_yaw", "_pitch"]; - -[{ - params ["_args", "_pfID"]; - _args params ["_lastTime", "_lastYaw", "_lastPitch", "_initPhase"]; - - if ((!alive ACE_player) || - {!([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))} || - {!GVAR(isLockKeyDown)} || - {!(ACE_player call CBA_fnc_canUseWeapon)} || - {(getNumber (configFile >> "CfgWeapons" >> (currentWeapon ACE_player) >> QGVAR(enabled))) == 0}) - exitWith { - TRACE_1("ending track",_pfID); - [_pfID] call CBA_fnc_removePerFrameHandler; - playSound "ACE_Sound_Click"; - - [{ // reset gvars after a short delay - TRACE_1("reset vars",_this); - GVAR(yawChange) = 0; - GVAR(pitchChange) = 0; - }, [], 0.5] call CBA_fnc_waitAndExecute; - }; - - private _deltaT = CBA_missionTime - _lastTime; - if (_deltaT == 0) exitWith {}; - if (_initPhase && {_deltaT < 0.75}) exitWith {}; - - ((ACE_player weaponDirection (currentWeapon ACE_player)) call CBA_fnc_vect2Polar) params ["", "_yaw", "_pitch"]; - private _yawChange = ([_yaw - _lastYaw] call CBA_fnc_simplifyAngle180) / _deltaT; - private _pitchChange = ([_pitch - _lastPitch] call CBA_fnc_simplifyAngle180) / _deltaT; - - if (_initPhase) then { // initial value will use first 0.75 seconds of input - GVAR(yawChange) = _yawChange; - GVAR(pitchChange) = _pitchChange; - _args set [3, false]; - } else { - // smoothing factor alpha - higher values will be more responsive to change, but also spike higher on jerky mouse movmeent - private _alpha = _deltaT / 3; - GVAR(yawChange) = (_yawChange * _alpha) + GVAR(yawChange) * (1 - _alpha); - GVAR(pitchChange) = (_pitchChange * _alpha) + GVAR(pitchChange) * (1 - _alpha); - }; - - _args set [0, CBA_missionTime]; - _args set [1, _yaw]; - _args set [2, _pitch]; - - #ifdef DEBUG_MODE_FULL - hintSilent format ["Instantaneous\nYaw: %1\n Pitch: %2\nGVAR\nYaw: %3\nPitch: %4", _yawChange, _pitchChange, GVAR(yawChange), GVAR(pitchChange)]; - #endif -}, .25, [CBA_missionTime, _yaw, _pitch, true]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/nlaw/functions/fnc_onFired.sqf b/addons/nlaw/functions/fnc_onFired.sqf deleted file mode 100644 index 7049dfb918..0000000000 --- a/addons/nlaw/functions/fnc_onFired.sqf +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Author: PabstMirror - * Sets up missile guidance state arrays (called from missileGuidance's onFired). - * - * Arguments: - * Guidance Arg Array - * - * Return Value: - * None - * - * Example: - * [] call ace_nlaw_fnc_onFired - * - * Public: No - */ -#include "script_component.hpp" - -params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams"]; -_firedEH params ["_shooter","","","","","","_projectile"]; -_launchParams params ["","_targetLaunchParams","","_attackProfile"]; -_targetLaunchParams params ["_target"]; -_stateParams params ["", "", "_attackProfileStateParams"]; - -// Reset _launchPos origin as projectile's height instead of player's foot -_targetLaunchParams set [2, getPosASL _projectile]; - -// Get state params: -TRACE_3("start of attack profile",_attackProfile,_shooter,vectorDir _projectile); - -private _firedLOS = _shooter weaponDirection (currentWeapon _shooter); -private _yawChange = 0; -private _pitchChange = 0; - -if (_shooter == ACE_player) then { - TRACE_2("isPlayer",GVAR(yawChange),GVAR(pitchChange)); - _yawChange = GVAR(yawChange); - _pitchChange = GVAR(pitchChange); - TRACE_1("los check",_firedLOS call CBA_fnc_vect2Polar); -} else { - if ((!isNil "_target") && {!isNull _target}) then { - _firedLOS = (getPosASL _projectile) vectorFromTo (aimPos _target); - (((eyePos _shooter) vectorFromTo (aimPos _target)) call CBA_fnc_vect2Polar) params ["", "_startYaw", "_startPitch"]; - // Add some random error to AI's velocity prediction: - private _random = random [(_shooter skillFinal "aimingAccuracy") min 0.9, 1, 2-((_shooter skillFinal "aimingAccuracy") min 0.9)]; - (((eyePos _shooter) vectorFromTo ((aimPos _target) vectorAdd ((velocity _target) vectorMultiply (_random)))) call CBA_fnc_vect2Polar) params ["", "_predictedYaw", "_predictedPitch"]; - _yawChange = ([_predictedYaw - _startYaw] call CBA_fnc_simplifyAngle180); - _pitchChange = ([_predictedPitch - _startPitch] call CBA_fnc_simplifyAngle180); - TRACE_1("AI",_target); - } else { - TRACE_1("AI - no target",_target); - }; -}; - -// Limit Max Deflection -_yawChange = -10 max _yawChange min 10; -_pitchChange = -10 max _pitchChange min 10; - -TRACE_3("attackProfileStateParams",_firedLOS,_yawChange,_pitchChange); -_attackProfileStateParams set [0, CBA_missionTime]; -_attackProfileStateParams set [1, _firedLOS]; -_attackProfileStateParams set [2, _yawChange]; -_attackProfileStateParams set [3, _pitchChange]; diff --git a/addons/nlaw/functions/fnc_seeker.sqf b/addons/nlaw/functions/fnc_seeker.sqf deleted file mode 100644 index 850c966f56..0000000000 --- a/addons/nlaw/functions/fnc_seeker.sqf +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Author: PabstMirror - * Handles the top down attack seeker for missile guidance. - * Has a very short range (IR/Magnetic?) seeker that will trigger the shaped charge midair above the target. - * - * Arguments: - * 1: Guidance Arg Array - * 2: Seeker State - * - * Return Value: - * Seeker Pos - * - * Example: - * [] call ace_nlaw_fnc_seeker - * - * Public: No - */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - -params ["", "_args", "_seekerStateParams"]; -_args params ["_firedEH", "_launchParams", "", "_seekerParams", "_stateParams"]; -_firedEH params ["","","","","","","_projectile"]; -_launchParams params ["", "_targetLaunchParams", "", "_attackProfile"]; -_targetLaunchParams params ["", "", "_launchPos"]; - -if (_attackProfile == QGVAR(directAttack)) exitWith {[0,0,0]}; - -private _projPos = getPosASL _projectile; - -// Arm seeker after 20 meters -if ((_projPos distance _launchPos) >= 20) then { - scopeName "targetScan"; - BEGIN_COUNTER(targetScan); - - if (_seekerStateParams isEqualTo []) then { - TRACE_2("Seeker Armed",_projPos distance _launchPos,diag_fps); - _seekerStateParams set [0, _projPos]; // Set _lastPos to current position - }; - - _seekerStateParams params ["_lastPos", "_terminal"]; - if (_terminal) exitWith {}; - - private _vectorDir = _lastPos vectorFromTo _projPos; - private _frameDistance = _lastPos vectorDistance _projPos; - - // Distance traveled depends on velocity and FPS - at 60fps it will be ~4m - // Step size will effect accuracy and performance costs - for "_stepSize" from 0 to _frameDistance step 0.5 do { - // 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]]; - #endif - - // Limit scan to 5 meters directly down (shaped charge jet has a very limited range) - private _res = lineIntersectsSurfaces [_virtualPos, (_virtualPos vectorAdd [0,0,-5]), _projectile]; - if (!(_res isEqualTo [])) 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); - _virtualPos = _virtualPos vectorAdd (_vectorDir vectorMultiply 1.25); - - deleteVehicle _projectile; - - // Damage and effects of missile exploding (timeToLive is 0 so should happen next frame) - private _explosion = "ACE_NLAW_Explosion" createVehicle _virtualPos; - _explosion setPosASL _virtualPos; - - // Just damage from shaped charge - private _shapedCharage = "ACE_NLAW_ShapedCharge" createVehicle _virtualPos; - _shapedCharage setPosASL _virtualPos; - _shapedCharage setVectorDirAndUp [[0,0,-1], [1,0,0]]; - _shapedCharage setVelocity [0,0,-300]; - - _seekerStateParams set [1, true]; - - END_COUNTER(targetScan); - breakOut "targetScan"; - }; - }; - }; - _seekerStateParams set [0, _projPos]; - END_COUNTER(targetScan); -}; - -// Exploded, return dummy value -if (_seekerStateParams param [1, false]) exitWith { - [0,0,1] -}; - -// return: -[0,0,0] diff --git a/addons/nlaw/functions/script_component.hpp b/addons/nlaw/functions/script_component.hpp deleted file mode 100644 index 50d8cac4c1..0000000000 --- a/addons/nlaw/functions/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\ace\addons\nlaw\script_component.hpp" diff --git a/addons/nlaw/stringtable.xml b/addons/nlaw/stringtable.xml deleted file mode 100644 index 74de6d21d8..0000000000 --- a/addons/nlaw/stringtable.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - NLAW Track Target (Hold) - NLAW Traccia Bersaglio (Mantieni) - NALW 目標の追跡 (押しっぱ) - 次世代轻型反坦克导弹发射器追踪目标 (按住) - 次世代輕型反坦克導彈發射器追蹤目標 (按住) - - - Direct Attack - Attacco Diretto - ダイレクト アタック - 直射模式 - 直射模式 - - - Overfly Top Attack - Attacco dall'alto - オーバーフライ トップ アタック - 攻顶模式 - 攻頂模式 - - - diff --git a/addons/noidle/script_component.hpp b/addons/noidle/script_component.hpp index cdc905afac..4931efb771 100644 --- a/addons/noidle/script_component.hpp +++ b/addons/noidle/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_NOIDLE diff --git a/addons/noradio/script_component.hpp b/addons/noradio/script_component.hpp index 0cf8f1f1d4..d55efd222b 100644 --- a/addons/noradio/script_component.hpp +++ b/addons/noradio/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_NORADIO diff --git a/addons/norearm/script_component.hpp b/addons/norearm/script_component.hpp index e73a77236e..f5b481fe0d 100644 --- a/addons/norearm/script_component.hpp +++ b/addons/norearm/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_NOREARM diff --git a/addons/optics/XEH_preInit.sqf b/addons/optics/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/optics/XEH_preInit.sqf +++ b/addons/optics/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/optics/functions/fnc_handleFired.sqf b/addons/optics/functions/fnc_handleFired.sqf index 10b21b5042..f1216fb15d 100644 --- a/addons/optics/functions/fnc_handleFired.sqf +++ b/addons/optics/functions/fnc_handleFired.sqf @@ -1,5 +1,5 @@ /* - * Author: Taosenai + * Original Author: Taosenai * Adapted By: KoffeinFlummi, commy2 * * Animates the scope when firing. Called from the unified fired EH only for the local player. @@ -9,13 +9,7 @@ * * Return Value: * None - * - * Example: - * call ace_optics_fnc_handleFired - * - * Public: No */ - #include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; diff --git a/addons/optics/functions/fnc_onDrawScope.sqf b/addons/optics/functions/fnc_onDrawScope.sqf index e3114c8c84..fd899b5a02 100644 --- a/addons/optics/functions/fnc_onDrawScope.sqf +++ b/addons/optics/functions/fnc_onDrawScope.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * 0: Display - * - * Return Value: - * None - * - * Example: - * [DISPLAY] call ace_optics_fnc_onDrawScope - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" disableSerialization; diff --git a/addons/optics/functions/fnc_onDrawScope2D.sqf b/addons/optics/functions/fnc_onDrawScope2D.sqf index c429740de0..e8b26dca65 100644 --- a/addons/optics/functions/fnc_onDrawScope2D.sqf +++ b/addons/optics/functions/fnc_onDrawScope2D.sqf @@ -7,7 +7,7 @@ * 0: Display (RscInGameUI for a weapon) * * Return Value: - * None + * Nothing * * Example: * [ACE_RscWeapon_Arco's Display] call ace_optics_fnc_onDrawScope2D diff --git a/addons/optics/script_component.hpp b/addons/optics/script_component.hpp index 6cc168aea0..428017bda8 100644 --- a/addons/optics/script_component.hpp +++ b/addons/optics/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_OPTICS diff --git a/addons/optics/stringtable.xml b/addons/optics/stringtable.xml index 377cca28bc..a6818a90d3 100644 --- a/addons/optics/stringtable.xml +++ b/addons/optics/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ RCO (2D) RCO (2D) RCO (2D) - RCO (2D) - RCO (2D) - 步枪战斗光学瞄准镜(2D) - 步槍戰鬥光學瞄準鏡(2D) RCO (PIP) @@ -28,10 +24,6 @@ RCO (PIP) RCO (PIP) RCO (PIP) - RCO (PIP) - RCO (PIP) - 步枪战斗光学瞄准镜(拟真版) - 步槍戰鬥光學瞄準鏡(擬真版) ARCO (2D) @@ -44,10 +36,6 @@ ARCO (2D) ARCO (2D) ARCO (2D) - ARCO (2D) - ARCO (2D) - 先进步枪战斗光学瞄准镜(2D) - 先進步槍戰鬥光學瞄準鏡(2D) ARCO (PIP) @@ -60,10 +48,6 @@ ARCO (PIP) ARCO (PIP) ARCO (PIP) - ARCO (PIP) - ARCO (PIP) - 先进步枪战斗光学瞄准镜(拟真版) - 先進步槍戰鬥光學瞄準鏡(擬真版) MRCO (2D) @@ -76,10 +60,6 @@ MRCO (2D) MRCO (2D) MRCO (2D) - MRCO (2D) - MRCO (2D) - 多距离战斗瞄准镜(2D) - 多距離戰鬥瞄準鏡(2D) MRCO (PIP) @@ -92,10 +72,6 @@ MRCO (PIP) MRCO (PIP) MRCO (PIP) - MRCO (PIP) - MRCO (PIP) - 多距离战斗瞄准镜(拟真版) - 多距離戰鬥瞄準鏡(擬真版) MOS (2D) @@ -108,10 +84,6 @@ MOS (2D) MOS (2D) MOS (2D) - MOS (2D) - MOS (2D) - 精准光学瞄准镜(2D) - 精準光學瞄準鏡(2D) MOS (PIP) @@ -124,10 +96,6 @@ MOS (PIP) MOS (PIP) MOS (PIP) - MOS (PIP) - MOS (PIP) - 精准光学瞄准镜(拟真版) - 精準光學瞄準鏡(擬真版) LRPS (2D) @@ -140,10 +108,6 @@ LRPS (2D) MPLD (2D) LRPS (2D) - LRPS (2D) - LRPS (2D) - 长距离精确瞄准镜(2D) - 長距離精確瞄準鏡(2D) LRPS (PIP) @@ -156,10 +120,6 @@ LRPS (PIP) MPLD (PIP) LRPS (PIP) - LRPS (PIP) - LRPS (PIP) - 长距离精确瞄准镜(拟真版) - 長距離精確瞄準鏡(擬真版) - + \ No newline at end of file diff --git a/addons/optionsmenu/CfgEventHandlers.hpp b/addons/optionsmenu/CfgEventHandlers.hpp index dc5816df05..d6451e638d 100644 --- a/addons/optionsmenu/CfgEventHandlers.hpp +++ b/addons/optionsmenu/CfgEventHandlers.hpp @@ -20,5 +20,8 @@ class Extended_PostInit_EventHandlers { class Extended_DisplayLoad_EventHandlers { class RscDisplayMain { GVAR(loadMainMenuBox) = QUOTE(_this call COMPILE_FILE(init_loadMainMenuBox)); + + //Hide the button if there is no world (-world=empty) + GVAR(hideButtonEmptyWorld) = "((_this select 0) displayCtrl 80085) ctrlShow (missionName != '');"; }; }; diff --git a/addons/optionsmenu/XEH_preInit.sqf b/addons/optionsmenu/XEH_preInit.sqf index 57e017e054..8b6f55a0ca 100644 --- a/addons/optionsmenu/XEH_preInit.sqf +++ b/addons/optionsmenu/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(clientSideOptions) = []; GVAR(clientSideColors) = []; diff --git a/addons/optionsmenu/config.cpp b/addons/optionsmenu/config.cpp index 650f9eb74a..a239e55498 100644 --- a/addons/optionsmenu/config.cpp +++ b/addons/optionsmenu/config.cpp @@ -22,6 +22,7 @@ class CfgAddons { }; }; + #include "CfgEventHandlers.hpp" #include "gui\define.hpp" #include "gui\settingsMenu.hpp" @@ -34,8 +35,9 @@ class ACE_Extensions { extensions[] += {"ace_clipboard"}; }; + class CfgCommands { allowedHTMLLoadURIs[] += { - "https://ace3mod.com/version.html" + "http://ace3mod.com/version.html" }; }; diff --git a/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf b/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf index 2426bb2f26..633a9aa162 100644 --- a/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf +++ b/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf @@ -3,14 +3,11 @@ * * * Arguments: - * None + * none * * Return Value: * None * - * Example: - * call ace_optionsmenu_fnc_moduleAllowConfigExport - * * Public: No */ diff --git a/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf b/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf index ed64ebde69..4ab0bf83fa 100644 --- a/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf +++ b/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf @@ -40,7 +40,7 @@ switch (GVAR(optionMenu_openTab)) do { } else { private _values = _x select 5; if !((!isNil "_values") && {_values isEqualType []} && {_settingsValue >= 0} && {_settingsValue < (count _values)}) exitWith { - ERROR_3("Setting (%1) has bad values (%2) for index (%3)", _settingName, _values, _settingsValue); + ACE_LOGERROR_3("Setting (%1) has bad values (%2) for index (%3)", _settingName, _values, _settingsValue); "ERROR" }; _values select _settingsValue; diff --git a/addons/optionsmenu/functions/fnc_toggleIncludeClientSettings.sqf b/addons/optionsmenu/functions/fnc_toggleIncludeClientSettings.sqf index 2256620cf6..8fd52d8d72 100644 --- a/addons/optionsmenu/functions/fnc_toggleIncludeClientSettings.sqf +++ b/addons/optionsmenu/functions/fnc_toggleIncludeClientSettings.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * call ace_optionsmenu_fnc_toggleIncludeClientSettings - * * Public: No */ diff --git a/addons/optionsmenu/gui/pauseMenu.hpp b/addons/optionsmenu/gui/pauseMenu.hpp index 304cd7e8d1..75177fa3b6 100644 --- a/addons/optionsmenu/gui/pauseMenu.hpp +++ b/addons/optionsmenu/gui/pauseMenu.hpp @@ -45,7 +45,7 @@ class ACE_Open_SettingsMenu_BtnBase : ACE_gui_buttonBase { colorDisabled[] = {1,1,1,0.25}; colorFocused[] = {0,0,0,1}; colorText[] = {1,1,1,1}; - //default = 0; + default = 0; font = "RobotoCondensed"; idc = -1; period = 1.2; @@ -77,63 +77,77 @@ class ACE_Open_SettingsMenu_BtnBase : ACE_gui_buttonBase { class RscStandardDisplay; class RscDisplayMPInterrupt: RscStandardDisplay { class controls { - class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {}; + class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {}; }; }; - class RscDisplayInterruptEditorPreview: RscStandardDisplay { class controls { - class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {}; + class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {}; }; }; - class RscDisplayInterrupt: RscStandardDisplay { class controls { - class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {}; + class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {}; }; }; - class RscDisplayInterruptEditor3D: RscStandardDisplay { class controls { - class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {}; + class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {}; }; }; - class RscDisplayMovieInterrupt: RscStandardDisplay { class controls { - class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {}; + class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {}; }; }; - class RscDisplayMain: RscStandardDisplay { class controls { - class InfoMods: RscControlsGroupNoHScrollbars { - class Controls; + class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase { + action = "if (missionName != '') then {createDialog 'ACE_settingsMenu';};"; + x = "safezoneX"; + y = "safezoneY"; + idc = 80085; }; - class InfoNews: InfoMods { - class Controls: Controls { - class Background; - class BackgroundIcon; - class Icon; - class News; - class Notification; - class Button; - }; - }; - class ACE_news_apex: InfoNews { - idc = IDC_MAIN_INFO; - y = "safezoneY + safezoneH - (3 * 2 + 1) * (pixelH * pixelGrid * 2) - 4 * (4 * pixelH)"; - - class Controls: Controls { - class Background: Background {}; - class BackgroundIcon: BackgroundIcon {}; - class Icon: Icon { + class ACE_news_apex: RscControlsGroupNoHScrollbars { + idc = 80090; + x = "safezoneX + safezoneW - 10 * (pixelW * pixelGrid * 2) - (4 * pixelH)"; + y = "safezoneY + safezoneH - (3 * 2 + 1) * (pixelH * pixelGrid * 2) - 3 * (4 * pixelH)"; + w = "10 * (pixelW * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 2)"; + class Controls { + class Background: RscPicture { + idc = 80091; + text = "\a3\Ui_f\data\GUI\Rsc\RscDisplayMain\gradientMods_ca.paa"; + colorText[] = {0,0,0,0.75}; + x = "(10 - 4 * 2) * (pixelW * pixelGrid * 2)"; + y = 0; + w = "4 * 2 * (pixelW * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 2)"; + angle = 180; + }; + class BackgroundIcon: RscPicture { + idc = 80092; + text = "\a3\Ui_f\data\GUI\Rsc\RscDisplayMain\backgroundModsIcon_ca.paa"; + colorText[] = {0,0,0,0.75}; + x = "(10 - 2 * 2) * (pixelW * pixelGrid * 2)"; + y = 0; + w = "2 * 2 * (pixelW * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 2)"; + angle = 180; + }; + class Icon: RscPicture { + idc = 80093; text = QPATHTOF(gui\aceMenuIcon_ca.paa); + colorText[] = {1,1,1,0.5}; + x = "(10 - 2) * (pixelW * pixelGrid * 2)"; + y = 0; + w = "2 * (pixelW * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 2)"; }; class CurrentVersionInfo: RscText { - idc = IDC_MAIN_INFO_CURRENT_VERSION_INFO; + idc = 80094; style = 1; text = ""; sizeEx = "(pixelH * pixelGrid * 1.5)"; @@ -143,13 +157,12 @@ class RscDisplayMain: RscStandardDisplay { x = 0; y = 0; w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)"; - h = "1 * (pixelH * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 1)"; onLoad = "(_this select 0) ctrlenable false;"; }; class HTTPVersionInfo: RscHTML { - idc = IDC_MAIN_INFO_NEWEST_VERSION_INFO; + idc = 80095; shadow = 0; - class H1 { sizeEx = "(pixelH * pixelGrid * 1.5)"; font = "RobotoCondensedLight"; @@ -162,16 +175,24 @@ class RscDisplayMain: RscStandardDisplay { class P: H1 { sizeEx = "(pixelH * pixelGrid * 1.5)"; }; - x = 0; - y = "1 * (pixelH * pixelGrid * 2)"; + y = "2 * (pixelH * pixelGrid * 1)"; w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)"; - h = "1 * (pixelH * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 1)"; onLoad = "(_this select 0) ctrlenable false;"; }; - class Button: Button { + class Button: RscButtonMenu { + idc = 80096; + colorBackground[] = {0,0,0,0}; + colorBackgroundFocused[] = {0,0,0,0}; + colorBackground2[] = {0,0,0,0}; + x = 0; + y = 0; + w = "10 * (pixelW * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 2)"; + tooltip = "Download latest and report issues:"; - url = "https://github.com/acemod/ACE3/releases"; + url = "https://github.com/acemod/ACE3"; }; }; }; diff --git a/addons/optionsmenu/init_loadMainMenuBox.sqf b/addons/optionsmenu/init_loadMainMenuBox.sqf index 894bd45124..a9b8f5a02a 100644 --- a/addons/optionsmenu/init_loadMainMenuBox.sqf +++ b/addons/optionsmenu/init_loadMainMenuBox.sqf @@ -13,47 +13,17 @@ * * Public: No */ -#include "\a3\ui_f\hpp\defineResinclDesign.inc" #include "script_component.hpp" -params ["_display"]; -private _controlsGroup = _display displayCtrl IDC_MAIN_INFO; - //Need to load from profileNamespace because ace_settings might not be init if world = empty if (profileNamespace getVariable [QGVAR(showNewsOnMainMenu), true]) then { - _controlsGroup ctrlShow true; + ((_this select 0) displayCtrl 80090) ctrlShow true; - private _fnc_onSetFocus = { - params ["_control"]; - private _controlsGroup = ctrlParentControlsGroup _control; - - (_controlsGroup controlsGroupCtrl IDC_MAIN_INFO_BACKGROUND) ctrlSetTextColor [1,1,1,1]; - (_controlsGroup controlsGroupCtrl IDC_MAIN_INFO_BACKGROUND_ICON) ctrlSetTextColor [1,1,1,1]; - (_controlsGroup controlsGroupCtrl IDC_MAIN_INFO_ICON) ctrlSetTextColor [0,0,0,1]; - }; - - private _fnc_onKillFocus = { - params ["_control"]; - private _controlsGroup = ctrlParentControlsGroup _control; - - (_controlsGroup controlsGroupCtrl IDC_MAIN_INFO_BACKGROUND) ctrlSetTextColor [0,0,0,0.75]; - (_controlsGroup controlsGroupCtrl IDC_MAIN_INFO_BACKGROUND_ICON) ctrlSetTextColor [0,0,0,0.75]; - (_controlsGroup controlsGroupCtrl IDC_MAIN_INFO_ICON) ctrlSetTextColor [1,1,1,0.5]; - }; - - (_controlsGroup controlsGroupCtrl IDC_MAIN_INFO_BUTTON) ctrlAddEventHandler ["MouseEnter", _fnc_onSetFocus]; - (_controlsGroup controlsGroupCtrl IDC_MAIN_INFO_BUTTON) ctrlAddEventHandler ["SetFocus", _fnc_onSetFocus]; - (_controlsGroup controlsGroupCtrl IDC_MAIN_INFO_BUTTON) ctrlAddEventHandler ["MouseExit", _fnc_onKillFocus]; - (_controlsGroup controlsGroupCtrl IDC_MAIN_INFO_BUTTON) ctrlAddEventHandler ["KillFocus", _fnc_onKillFocus]; - - private _versionStr = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr") splitString "."; - _versionStr resize 3; // MAJOR, MINOR, PATCH - _versionStr = _versionStr joinString "."; - - (_display displayCtrl IDC_MAIN_INFO_CURRENT_VERSION_INFO) ctrlSetText format ["Version: %1", _versionStr]; - (_display displayCtrl IDC_MAIN_INFO_NEWEST_VERSION_INFO) htmlLoad "https://ace3mod.com/version.html"; + private _ace3VersionStr = (getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr")) select [0,5]; + ((_this select 0) displayCtrl 80094) ctrlSetText format ["Version: %1", _ace3VersionStr]; + ((_this select 0) displayCtrl 80095) htmlLoad "http://ace3mod.com/version.html"; } else { - _controlsGroup ctrlShow false; + ((_this select 0) displayCtrl 80090) ctrlShow false; }; /* diff --git a/addons/optionsmenu/script_component.hpp b/addons/optionsmenu/script_component.hpp index c13e915702..2bb7482252 100644 --- a/addons/optionsmenu/script_component.hpp +++ b/addons/optionsmenu/script_component.hpp @@ -3,6 +3,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #include "\z\ace\addons\main\script_mod.hpp" @@ -17,10 +18,6 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define IDC_MAIN_INFO 80090 -#define IDC_MAIN_INFO_CURRENT_VERSION_INFO 80091 -#define IDC_MAIN_INFO_NEWEST_VERSION_INFO 80092 - #define MENU_TAB_OPTIONS 0 #define MENU_TAB_COLORS 1 diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index 5b43574561..b051e3f219 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Opções do ACE ACE Beállítások Opzioni ACE - ACE オプション - ACE 옵션 - ACE 设定 - ACE 設定 Fix Animation @@ -26,12 +22,8 @@ Napraw animację Corriger animation Animációk kijavítása - Sistema l'animazione + Fixa l'animazione Arrumar Animação - アニメーションを修正 - 동작 고정 - 修复动作BUG - 修復動作BUG Reset All @@ -44,10 +36,6 @@ Minden visszaállítása Resetta tutto Resetar Tudo - すべて初期化 - 모두 초기화 - 重置为预设值 - 重置為預設值 Colors @@ -60,10 +48,6 @@ Színek Colori Cores - - 색상 - 颜色 - 顏色 Options @@ -76,10 +60,6 @@ Opções Beállítások Opzioni - オプション - 옵션 - 中文化由[MR]Diss制作 - 設定 Values @@ -92,10 +72,6 @@ Értékek Valori Valores - - - 数值 - 數值 Setting: @@ -108,10 +84,6 @@ Opció: Parametri: Opção: - 設定: - 설정: - 设定: - 設定: Export @@ -124,10 +96,6 @@ Exportálás Esporta Exportar - 出力 - 내보내기 - 输出 - 輸出 Open Export Menu @@ -140,10 +108,6 @@ Exportálási menü megnyitása Apri menù esportazione Abrir menu de exportação - 出力メニューを開く - 내보내기 메뉴 열기 - 开启输出选单 - 開啟輸出選單 String input. @@ -156,10 +120,6 @@ String bevitel. Stringa di unput. Input de String - 文字列の入力 - 문자열 입력 - 输入数值 - 輸入數值 Array. Seperate elements by using ,. @@ -170,12 +130,8 @@ Tableau. Séparation par ,. Tabulka. Odděl elementy použitím ,. Array. Válasszad el az elemeket vesszővel. - Vettor. Separa gli elementi usando ,. + Array. Separa gli elementi usando ,. Vetor. Separe elementos usando *,*. - アライ。,を使うことで区別できます。 - 배열. 요소를 ,. 로 나눔 - 阵列. 使用','来做每个值的区隔. - 陣列. 使用','來做每個值的區隔. Number @@ -188,10 +144,6 @@ Szám Numero Número - - 숫자 - 数字 - 數字 Uknown input type @@ -204,10 +156,6 @@ Ismeretlen beviteli típus Input inserito sconosciuto Tipo desonhecido de input - 不明な入力です - 불분명한 입력입니다 - 未知输入类型 - 未知輸入類型 Save input @@ -220,10 +168,6 @@ Bevitel elmentése Salva input Salvar input - 入力を保存 - 입력 저장 - 储存输入 - 儲存輸入 Include Client Settings @@ -236,10 +180,6 @@ Kliens-beállítások melléklése Includi i parametri del client Incluir opções do cliente - クライアント設定を含む - 클라이언트 설정 포함 - 包含客户端设定 - 包含客戶端設定 Exclude Client Settings @@ -252,10 +192,6 @@ Kliens-beállítások elhagyása Escludi i parametri del client Excluir opções do cliente - クライアント設定を実行する - 클라이언트 설정 제외 - 不包含客户端设定 - 不包含客戶端設定 Settings exported to clipboard @@ -268,10 +204,6 @@ Beállítások exportálva a vágólapba Parametri esportati alla clipboard Opções exportadas para o clipboard. - クリップボードに設定を出力する - 클립보드로 설정 내보내기 - 设定输出至剪贴簿 - 設定輸出至剪貼簿 Option Menu UI Scaling @@ -284,10 +216,6 @@ Beállításmenü kezelőfelületének skálázása Escalar o menu de opções Proporzioni della interfaccia utente - オプション メニューにあるユーザ インタフェイスの大きさ - 옵션메뉴 UI 비례도 - 调整设定选单视窗大小 - 調整設定選單視窗大小 Allow Config Export [ACE] @@ -300,10 +228,6 @@ Konfiguráció-exportálás engedélyezése [ACE] Разрешить экспорт настроек [ACE] Consenti Esportazione del Config [ACE] - 設定の出力を許可 [ACE] - 설정 내보내기 허가 [ACE] - 允许配置导出 [ACE] - 允許配置導出 [ACE] Allow @@ -316,10 +240,6 @@ Engedélyezés Разрешить Consenti - 許可 - 허가 - 允许 - 允許 Allow export of all settings to a server config formatted. @@ -332,10 +252,6 @@ Az összes beállítás szerver-konfigurációba való exportálásának engedélyezése. Разрешить экспорт всех настроек в формате серверного конфига. Consenti esportazione di tutti i parametri ad config formato per server. - 全ての設定をサーバ用設定の形式へと出力できるようにします。 - 모든 설정을 서버 설정 형식으로 내보내는것을 허락합니다. - 允许导出所有设定成伺服器配置格式的档案. - 允許導出所有設定成伺服器配置格式的檔案. When allowed, you have access to the settings modification and export in SP. Clicking export will place the formated config on your clipboard. @@ -348,10 +264,6 @@ Engedélyezéskor hozzáférést kapsz a beállítások módosításához és exportálásához egyjátékos módban. Exportáláskor a formázott konfiguráció a vágólapra kerül. Когда разршен, у вас появляется доступ к модификации настроек и экспорту их в одинночном режиме. Нажатие на кнопку Экспорт поместит форматированные настройки в буфер обмена. Quando consentito, hai accesso alle modifiche delle impostazioni ed esportazione in SP. Cliccando Esporta piazzera il config formattato sul tuo Blocco Note. - 許可の場合、あなたは設定の変更と出力をシングルプレイで可能です。出力をクリックすると、サーバ用設定の形式となっている設定がクリップボードに保存されます。 - 허락하는 경우 싱글플레이에서 설정의 변경과 내보내기가 가능해집니다. 내보내기를 눌러서 서버 형성의 설정을 클립보드로 보냅니다. - 当本功能开启时, 你将能在单人模式中调整并输出设定. 点击输出按钮后将会让相关设定参数复制到剪贴簿上. - 當本功能開啟時, 你將能在單人模式中調整並輸出設定. 點擊輸出按鈕後將會讓相關設定參數複製到剪貼簿上. Hide @@ -364,10 +276,6 @@ Elrejtés Скрыть Nascondi - 非表示 - 숨기기 - 隐藏 - 隱藏 Top right, downwards @@ -380,10 +288,6 @@ Jobb felül, lefele Справа — сверху вниз In Alto a Destra, verso il Basso - 右上、下側 - 오른쪽 위에서 아래로 - 右上角, 向下 - 右上角, 向下 Top right, to the left @@ -396,10 +300,6 @@ Jobb felül, balra Сверху — справа налево In Alto a Destra, verso Sinistra - 右上、左詰 - 오른쪽 위에서 왼쪽으로 - 右上角, 向左 - 右上角, 向左 Top left, downwards @@ -412,10 +312,6 @@ Bal felül, lefele Слева - сверху вниз In Alto a Sinistra, verso il Basso - 左上、下側 - 왼쪽 위에서 아래로 - 左上角, 向下 - 左上角, 向下 Top left, to the right @@ -428,10 +324,6 @@ Bal felül, jobbra Сверху — слева направо In Alto a Sinistra, verso Destra - 右上、右詰 - 왼쪽 위에서 오른쪽으로 - 左上角, 向右 - 左上角, 向右 Top @@ -444,10 +336,6 @@ Fent Сверху Alto - 上側 - 상단 - 上方 - 上方 Bottom @@ -460,10 +348,6 @@ Alul Снизу Basso - 下側 - 하단 - 下方 - 下方 Debug To Clipboard @@ -476,10 +360,6 @@ Debug a vágólapra Отладка в буфер обмена Debug su Blocco Note - クリップボードへデバッグ - 디버그를 클립보드로 - 复制除错讯息至剪贴簿 - 複製除錯訊息至剪貼簿 Sends debug information to RPT and clipboard. @@ -492,10 +372,6 @@ Debug információt küld az RPT-be és a vágólapra. Отправляет отладочную информацию в RPT и буфер обмена. Invia informazioni di debug all'RPT e al Blocco Note - デバッグ情報の RPT とクリップボードに送ります。 - 디버그 정보를 보고하기 및 클립보드에 복사하기 위해 보냅니다. - 复制除错讯息至剪贴簿与RPT报告档中. - 複製除錯訊息至剪貼簿與RPT報告檔中. Headbug Fix @@ -507,11 +383,7 @@ Fix Headbug Fix Headbug Corregir error de cabeza (headbug) - Sistema Bug della Testa - ヘッドバグ修正 - 헤드버그 수정 - 修复动作BUG - 修復動作BUG + Sistema Headbug Resets your animation state. @@ -524,10 +396,6 @@ Resetovat aktuální animaci. Restablece tu estado de animación. Resetta il tuo stato animazione - 現在のアニメーションの状況を初期化します。 - 자신의 동작 상태 초기화 - 当ACE发生动作BUG时, 点此修复. - 當ACE發生動作BUG時, 點此修復. ACE News @@ -539,11 +407,7 @@ Nouveautés ACE ACE hírek Новости ACE - Novità ACE - ACE からのお知らせ - ACE 새소식 - ACE新闻 - ACE新聞 + News ACE Show News on Main Menu @@ -556,10 +420,6 @@ Показывать новости в Главном Меню Zobrazit zprávy v hlavním menu Mostra News nel Menù Princinpale - メイン メニュにお知らせを表示します - 메인메뉴에 새소식을 표시합니다 - 显示新闻消息于主选单 - 顯示新聞消息於主選單 All Categories @@ -571,10 +431,6 @@ Todas las categorías Tutte le Categorie Toutes les catégories - 全カテゴリ - 모든 카테고리 - 全局设定 - 全局設定 Logistics @@ -586,10 +442,6 @@ Logística Logistica Logistique - ロジスティクス - 보급 - 后勤设定 - 後勤設定 - + \ No newline at end of file diff --git a/addons/overheating/CfgVehicles.hpp b/addons/overheating/CfgVehicles.hpp index 2d6a48b7b3..a096754ce3 100644 --- a/addons/overheating/CfgVehicles.hpp +++ b/addons/overheating/CfgVehicles.hpp @@ -68,62 +68,62 @@ class CfgVehicles { class FIA_Box_Base_F; class Box_NATO_Support_F: NATO_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); + class TransportItems { + MACRO_ADDITEM(ACE_SpareBarrel,2); }; }; class B_supplyCrate_F: ReammoBox_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); + class TransportItems { + MACRO_ADDITEM(ACE_SpareBarrel,2); }; }; class Box_East_Support_F: EAST_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); + class TransportItems { + MACRO_ADDITEM(ACE_SpareBarrel,2); }; }; class O_supplyCrate_F: B_supplyCrate_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); + class TransportItems { + MACRO_ADDITEM(ACE_SpareBarrel,2); }; }; class Box_IND_Support_F: IND_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); + class TransportItems { + MACRO_ADDITEM(ACE_SpareBarrel,2); }; }; class Box_FIA_Support_F: FIA_Box_Base_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); + class TransportItems { + MACRO_ADDITEM(ACE_SpareBarrel,2); }; }; class I_supplyCrate_F: B_supplyCrate_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); + class TransportItems { + MACRO_ADDITEM(ACE_SpareBarrel,2); }; }; class IG_supplyCrate_F: ReammoBox_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); + class TransportItems { + MACRO_ADDITEM(ACE_SpareBarrel,2); }; }; class C_supplyCrate_F: ReammoBox_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_SpareBarrel,2); + class TransportItems { + MACRO_ADDITEM(ACE_SpareBarrel,2); }; }; class ACE_Box_Misc: Box_NATO_Support_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_SpareBarrel,6); + class TransportItems { + MACRO_ADDITEM(ACE_SpareBarrel,6); }; }; }; diff --git a/addons/overheating/XEH_preInit.sqf b/addons/overheating/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/overheating/XEH_preInit.sqf +++ b/addons/overheating/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/overheating/config.cpp b/addons/overheating/config.cpp index bedd96fa30..8ef1ac2d51 100644 --- a/addons/overheating/config.cpp +++ b/addons/overheating/config.cpp @@ -52,3 +52,10 @@ class CfgGesturesMale { }; }; }; +class ACE_newEvents { + initiateSwapBarrelAssisted = QGVAR(initiateSwapBarrelAssisted); + showWeaponTemperature = QGVAR(showWeaponTemperature); + loadCoolestSpareBarrel = QGVAR(loadCoolestSpareBarrel); + sendSpareBarrelTemperatureHint = QGVAR(sendSpareBarrelTemperatureHint); + weaponJammed = "ace_weaponJammed"; +}; diff --git a/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf b/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf index ae0dc760d3..29c08275ef 100644 --- a/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf +++ b/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf @@ -6,16 +6,12 @@ * 0: Player * * Return Value: - * Bool - * - * Example: - * [bob] call ace_overheating_fnc_canCheckSpareBarrelsTemperatures + * Bool * * Public: No */ #include "script_component.hpp" - -params ["_player"]; +params ["_unit"]; //Get the classname of the spare barrel for the weapon private _weaponBarrelClass = getText (configFile >> 'CfgWeapons' >> currentWeapon _player >> QGVAR(barrelClassname)); @@ -26,4 +22,4 @@ if(_weaponBarrelClass == "") then { //Check if the player has the barrel and the weapon can have its barrel swapped private _canCheckTemperature = GVAR(enabled) && {_weaponBarrelClass in magazines _player}; -_canCheckTemperature; +_canCheckTemperature; \ No newline at end of file diff --git a/addons/overheating/functions/fnc_canSwapBarrel.sqf b/addons/overheating/functions/fnc_canSwapBarrel.sqf index 560183e382..e183490439 100644 --- a/addons/overheating/functions/fnc_canSwapBarrel.sqf +++ b/addons/overheating/functions/fnc_canSwapBarrel.sqf @@ -5,12 +5,8 @@ * Arguments: * 0: Player * 1: Weapon - * * Return Value: - * Bool - * - * Example: - * [bob, "weapon"] call ace_overheating_fnc_canSwapBarrel + * Bool * * Public: No */ @@ -27,4 +23,4 @@ if(_weaponBarrelClass == "") then { _weaponBarrelClass = "ACE_SpareBarrel"; }; //If the player has the spare barrel then it can be swapped -(_weaponBarrelClass in magazines _unit) +(_weaponBarrelClass in magazines _unit) \ No newline at end of file diff --git a/addons/overheating/functions/fnc_canUnjam.sqf b/addons/overheating/functions/fnc_canUnjam.sqf index f2ab7e8cc6..610fa9ca22 100644 --- a/addons/overheating/functions/fnc_canUnjam.sqf +++ b/addons/overheating/functions/fnc_canUnjam.sqf @@ -6,10 +6,7 @@ * 0: Player * * Return Value: - * Bool - * - * Example: - * [bob] call ace_overheating_fnc_canUnjam + * Bool * * Public: No */ diff --git a/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf b/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf index a0c0ba12de..8a634409ee 100644 --- a/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf +++ b/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_overheating_fnc_checkSpareBarrelsTemperature - * * * Public: No */ diff --git a/addons/overheating/functions/fnc_firedEH.sqf b/addons/overheating/functions/fnc_firedEH.sqf index d690b85aa7..b7409355a2 100644 --- a/addons/overheating/functions/fnc_firedEH.sqf +++ b/addons/overheating/functions/fnc_firedEH.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * call ace_overheating_fnc_firedEH - * * Public: No */ #include "script_component.hpp" @@ -43,7 +40,7 @@ TRACE_4("weapon data from cache",_weapon,_dispersion,_slowdownFactor,_jamChance) // Dispersion and bullet slow down if (GVAR(overheatingDispersion)) then { // Exit if GVAR(pseudoRandomList) isn't synced yet - if (isNil QGVAR(pseudoRandomList)) exitWith {ERROR("No pseudoRandomList sync");}; + if (isNil QGVAR(pseudoRandomList)) exitWith {ACE_LOGERROR("No pseudoRandomList sync");}; //Dispersion: 0 mils @ 0°C, 0.5 mils @ 333°C, 2.2 mils @ 666°C, 5 mils at 1000°C _dispersion = _dispersion * 0.28125 * (_scaledTemperature^2); @@ -97,7 +94,7 @@ if (GVAR(showParticleEffects) && {(CBA_missionTime > ((_unit getVariable [QGVAR( // Only compute jamming for the local player if (_unit != ACE_player) exitWith {END_COUNTER(firedEH);}; -_jamChance = _jamChance * ([[0.5, 1, 2, 8, 20, 150], 5 * _scaledTemperature] call EFUNC(common,interpolateFromArray)); +_jamChance = _jamChance * ([[0.5, 1.5, 15, 150], 3 * _scaledTemperature] call EFUNC(common,interpolateFromArray)); // increase jam chance on dusty grounds if prone (and at ground level) if ((stance _unit == "PRONE") && {((getPosATL _unit) select 2) < 1}) then { diff --git a/addons/overheating/functions/fnc_getWeaponData.sqf b/addons/overheating/functions/fnc_getWeaponData.sqf index 21f6f156b8..b1525f0f41 100644 --- a/addons/overheating/functions/fnc_getWeaponData.sqf +++ b/addons/overheating/functions/fnc_getWeaponData.sqf @@ -10,15 +10,10 @@ * 1: slowdownFactor * 2: jamChance * - * Example: - * ["gun"] call ace_overheating_fnc_getWeaponData - * * Public: No */ #include "script_component.hpp" -params ["_weapon"]; - // Look in the cache first private _weaponData = GVAR(cacheWeaponData) getVariable _weapon; if (!isNil "_weaponData") exitWith {_weaponData}; diff --git a/addons/overheating/functions/fnc_handleTakeEH.sqf b/addons/overheating/functions/fnc_handleTakeEH.sqf index 0196629a45..b4eecbf236 100644 --- a/addons/overheating/functions/fnc_handleTakeEH.sqf +++ b/addons/overheating/functions/fnc_handleTakeEH.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * [bob, thing, "thing"] call ace_overheating_fnc_handleTakeEH - * * Public: No */ #include "script_component.hpp" diff --git a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf index 6a155a29b7..fa5cdd1c43 100644 --- a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf +++ b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf @@ -13,9 +13,6 @@ * Return Value: * None * - * Example: - * [bob, bob, "weapon",5, 2] call ace_overheating_fnc_loadCoolestSpareBarrel - * * * Public: No */ diff --git a/addons/overheating/functions/fnc_overheat.sqf b/addons/overheating/functions/fnc_overheat.sqf index c29f2d5dd1..84ab7e152f 100644 --- a/addons/overheating/functions/fnc_overheat.sqf +++ b/addons/overheating/functions/fnc_overheat.sqf @@ -13,9 +13,6 @@ * Return Value: * None * - * Example: - * [bob, "weapon", "muzzle", "ammo", "magazine", bullet] call ace_overheating_fnc_overheat - * * Public: No */ #include "script_component.hpp" diff --git a/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf b/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf index 0486dd5208..3855f96d3f 100644 --- a/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf +++ b/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [bob, "bob"] call ace_overheating_fnc_sendSpareBarrelsIsTemperaturesHint - * * * Public: No */ diff --git a/addons/overheating/functions/fnc_swapBarrelCallback.sqf b/addons/overheating/functions/fnc_swapBarrelCallback.sqf index 99cf8298f5..0e4326cfea 100644 --- a/addons/overheating/functions/fnc_swapBarrelCallback.sqf +++ b/addons/overheating/functions/fnc_swapBarrelCallback.sqf @@ -31,7 +31,7 @@ if (_assistant isEqualTo _gunner) then { [localize LSTRING(SwappedBarrel), QPATHTOF(UI\spare_barrel_ca.paa)] call EFUNC(common,displayTextPicture); private _temp = _gunner getVariable [format [QGVAR(%1_temp), _weapon], 0]; -private _barrelMass = METAL_MASS_RATIO * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0; +private _barrelMass = 0.50 * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0; // Instruct the server to load the coolest spare barrel into the weapon and // store the removed barrel with the former weapon temperature. The server diff --git a/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf index aaefe4f037..0bb240533c 100644 --- a/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf +++ b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf @@ -18,10 +18,7 @@ private _pairs = []; TRACE_1("updateSpareBarrelsTemperaturesThread1",GVAR(storedSpareBarrels)); -[GVAR(storedSpareBarrels), { - //IGNORE_PRIVATE_WARNING ["_key", "_value"]; - _pairs pushBack [_key, _value]; -}] call CBA_fnc_hashEachPair; +[GVAR(storedSpareBarrels), {_pairs pushBack [_key, _value];}] call CBA_fnc_hashEachPair; TRACE_1("updateSpareBarrelsTemperaturesThread2",_pairs); { _x params ["_barrelMagazineID","_value"]; diff --git a/addons/overheating/functions/fnc_updateTemperature.sqf b/addons/overheating/functions/fnc_updateTemperature.sqf index f56fc05e92..51b4b13ae3 100644 --- a/addons/overheating/functions/fnc_updateTemperature.sqf +++ b/addons/overheating/functions/fnc_updateTemperature.sqf @@ -27,7 +27,7 @@ private _timeVarName = format [QGVAR(%1_time), _weapon]; private _temperature = _unit getVariable [_tempVarName, 0]; private _lastTime = _unit getVariable [_timeVarName, 0]; -private _barrelMass = METAL_MASS_RATIO * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0; +private _barrelMass = 0.50 * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0; // Calculate cooling _temperature = [_temperature, _barrelMass, CBA_missionTime - _lastTime] call FUNC(calculateCooling); diff --git a/addons/overheating/script_component.hpp b/addons/overheating/script_component.hpp index d7dde59da2..6d2db895aa 100644 --- a/addons/overheating/script_component.hpp +++ b/addons/overheating/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_OVERHEATING @@ -17,7 +18,6 @@ #include "\z\ace\addons\main\script_macros.hpp" #define TEMP_TOLERANCE 50 -#define METAL_MASS_RATIO 0.55 #ifdef DEBUG_MODE_FULL #define TRACE_PROJECTILE_INFO(BULLET) _vdir = vectorNormalized velocity BULLET; _dir = (_vdir select 0) atan2 (_vdir select 1); _up = asin (_vdir select 2); _mv = vectorMagnitude velocity BULLET; TRACE_3("adjusted projectile",_dir,_up,_mv); diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml index 37e40c2dc1..822e84f044 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Szöveges értesítés kijelzése a fegyver elakadásakor Mostrar texto quando trava acontecer Visualizza testo in caso di inceppamento - 弾詰りを文章で表示 - 탄걸림의 경우 화면에 표시 - 在卡弹时显示提示讯息 - 在卡彈時顯示提示訊息 Display a notification whenever your weapon gets jammed @@ -28,10 +24,6 @@ Egy szöveges értesítés jelenik meg, amikor a fegyver megakad Mostra uma notificação quando sua arma sofre um travamento. Visualizza una notifica in caso la tua arma si inceppasse - 持っている武器が弾詰りをすると、通知を表示します - 총알이 무기에 걸릴경우 화면에 알림을 띄웁니다 - 当武器卡弹时显示提示讯息 - 當武器卡彈時顯示提示訊息 Overheating Particle Effects @@ -43,10 +35,6 @@ Částicové efekty přehřívání Efeito de parícula de superaquecimento Эффект частиц при перегреве - 過熱の視覚効果 - 과열 입자 효과 - 枪管过热特效 - 槍管過熱特效 Show particle effects when weapon overheats @@ -58,10 +46,6 @@ Mostra efeitos de párticula quando a arma superaquece Показывать эффект частиц, когда оружие перегревается Zobrazit částicové efekty když se zbraň přehřije - 武器を過熱すると視覚表現を表示します - 무기가 과열되면 입자 효과를 보여줍니다 - 显示枪管过热特效 - 顯示槍管過熱特效 Overheating Particle Effects for everyone @@ -73,10 +57,6 @@ Částicové efekty přehřívání pro všechny Efeito de partícula de superaquecimento para todos Эффект частиц при перегреве для всех - 過熱の視覚表現を全体に与えます - 모두에게 과열 입자 효과 적용 - 显示其他玩家的枪管过热特效 - 顯示其他玩家的槍管過熱特效 Show particle effects when other players weapon overheats @@ -88,10 +68,6 @@ Mostra efeito de partículas quando a arma de outros jogadores superaquece Показывать эффект частиц, когда оружие других игроков перегревается Zobrazit částicové efekty když se zbraň přehřije jinému hráči - 他のプレイヤの過熱の視覚表現を表示します - 모든 인원이 무기가 과열될시 입자 효과가 나타납니다. - 当其他玩家的武器过热时显示特效 - 當其他玩家的武器過熱時顯示特效 Overheating Dispersion @@ -103,10 +79,6 @@ Disperção de superaquecimento Разброс при перегреве Důsledky přehřátí zbraně - 過熱による精度の低下 - 과열 명중률 저하 - 过热散射 - 過熱散射 Overheated weapons will be less accurate and have decreased muzzle velocity. Applys for all players. @@ -118,10 +90,6 @@ Armas superaquecidas irão ser menos precisas e ter velocidade de disparo reduzidas. Aplica a todos os jogadores. Перегретое оружие будет менее точным, а дульная скорость будет снижена. Применяется ко всем игрокам. Přehřátá zbraň bude méně přesná a bude mít menší úsťovou rychlost. Platí pro všechny hráče. - 過熱は精度を減少させたり、初速を低下させます、これは全プレイヤに適用します。 - 무기 과열시 무기의 명중률이 저하되고 총구속도가 감소합니다. 이는 모든 플레이어에게 적용됩니다. - 过热的武器将会有打不准和减少射击初速的情况. 适用于所有玩家 - 過熱的武器將會有打不準和減少射擊初速的情況. 適用於所有玩家 Unjam weapon on reload @@ -133,10 +101,6 @@ Uvolnit zbraň při přebití Desemperrar arma no recarregamento Исправлять клин при перезарядке - 再装填による弾詰りの解消 - 재장전시 탄걸림 해결 - 重装弹匣以解决卡弹 - 重裝彈匣以解決卡彈 Reloading clears a weapon jam. @@ -148,10 +112,6 @@ Přebití uvolní zaseknutou zbraň. Recarregar desemperra arma. Перезарядка устраняет заклинивание оружия. - 再装填により、弾詰りを除去します。 - 탄걸림이 재장전시 해결됩니다. - 利用重装弹匣来解决卡弹 - 利用重裝彈匣來解決卡彈 Chance of unjam failing @@ -163,10 +123,6 @@ Šance, že uvolnění zbraně selže Chance de falha de desemperramento Шанс неудачи при устранении клина - 弾詰りの除去を失敗する可能性 - 탄걸림 해결 시도 실패확률 - 解决卡弹失败机率 - 解決卡彈失敗機率 Probability that an unjam action might fail, requiring to be repeated. @@ -178,10 +134,6 @@ Probabilidade que uma ação de desemperramento falhe, tendo que ser repetida Вертоятность того, что устранение заклинивания не сработает, и его придется повторить. Pravděpodobnost, že uvolnění zbraně selže, je proto nutné tuto akci opakovat. - 弾詰りの除去を失敗する可能性が生まれ、もう一度動作を行う必要があります。 - 탄걸림 해결 시도시 실패할 확률이 있습니다. 이는 다시 탄걸림 해결을 시도해야함을 의미합니다. - 清除卡弹时有可能会失败, 需要反覆进行清枪 - 清除卡彈時有可能會失敗, 需要反覆進行清槍 Spare barrel @@ -194,10 +146,6 @@ Tartalék cső Cano Reserva Canna di ricambio - 予備銃身 - 예비 총열 - 备用枪管 - 備用槍管 Use to swap barrel. @@ -210,10 +158,6 @@ Használd a cső kicseréléséhez. Use para trocar o cano/estriamento. Usata per cambiare la canna. - 予備銃身に交換する。 - 총열을 바꿀때 사용합니다. - 用来更换枪管 - 用來更換槍管 Weapon jammed! @@ -226,10 +170,6 @@ Megakadt a fegyver! Arma travada! Arma inceppata! - 武器が詰まった! - 탄걸림! - 武器卡弹! - 武器卡彈! Clear jam @@ -242,10 +182,6 @@ Akadás elhárítása Destravar arma Ripulisci l'arma - 弾詰りを除去する - 탄걸림 해결 - 清除卡弹 - 清除卡彈 Jam cleared @@ -258,10 +194,6 @@ Akadás elhárítva Arma destravada Arma pronta al fuoco - 弾詰りが除去された - 탄걸림 해결됨 - 卡弹已清除 - 卡彈已清除 Jam failed to clear @@ -273,10 +205,6 @@ Zbrań se nepodařilo uvolnit Falha no desemperramento Не удалось исправить клин - 弾詰りの除去に失敗した - 탄걸림 해결 실패 - 卡弹未能清除 - 卡彈未能清除 Swap barrel @@ -289,14 +217,10 @@ Cső cserélése Substituir cano Sostiuisci la canna - 銃身を交換 - 총열 교체 - 换枪管 - 換槍管 Swapping barrel... - Lauf wird gewechselt ... + Lauf wird gewechselt... Cambiando el cañón... Wymienianie lufy... Měním hlaveň... @@ -304,11 +228,7 @@ Смена ствола... Cső kicserélése folyamatban... Substituindo cano... - Sostituendo la canna... - 銃身を交換中・・・ - 총열 교체중... - 换枪管中... - 換槍管中... + Sto sostituendo la canna... Swapped barrel @@ -321,10 +241,6 @@ Cső kicserélve Cano substituído Canna sostituita - 銃身を交換した - 교체된 총열 - 完成换枪管 - 完成換槍管 Check weapon temperature @@ -337,10 +253,6 @@ Conferir temperatura da arma Controlla la temperatura della canna Проверить температуру оружия - 武器の温度を測る - 무기 온도 확인 - 检查枪管温度 - 檢查槍管溫度 Check weapon temperature @@ -353,26 +265,18 @@ Проверить температуру оружия Conferir temperatura Controlla la temperatura della canna - 武器の温度を測る - 무기 온도 확인 - 检查枪管温度 - 檢查槍管溫度 Checking temperature... - Prüfe Temperatur ... + Prüfe Temperatur... Verificando temperatura... Sprawdzanie temperatury... Vérification de la température... Hőmérséklet ellenőrzése... Zjišťuju teplotu... Conferindo temperatura... - Controllando la temperatura... + Sto controllando la temperatura... Проверка температуры... - 温度を測っている・・・ - 무기 온도 확인중... - 检查枪管温度中... - 檢查槍管溫度中... Check spare barrels temperatures @@ -380,13 +284,6 @@ Vérifier la température des canons de rechange Проверить температуру запасных стволов Zkontrolovat teplotu náhradní hlavně - 予備銃身の温度を測る - Sprawdź temperaturę zapasowych luf - Temperatur der Wechselläufe prüfen - 총열 온도 확인 - Controlla la temperatura della canna di ricambio - 检查备用枪管温度 - 檢查備用槍管溫度 Checking spare barrels temperatures... @@ -394,13 +291,6 @@ Vérification de la température des canons de rechange... Проверка температуры запасных стволов... Kontroluji teplotu náhradní hlavně... - 予備銃身の温度を測っている・・・ - Sprawdzanie temperatury zapasowych luf... - Prüfe Temperatur der Wechselläufe ... - 총열 온도 확인중... - Controllando la temperatura della canna di ricambio... - 检查枪管温度中... - 檢查槍管溫度中... Temperature @@ -413,10 +303,6 @@ Temperatura Temperatura Температура - 温度 - 온도 - 温度 - 溫度 Cool Spare Barrel/s @@ -424,13 +310,6 @@ Canon(s) de rechange froid Прохладные Studená náhrandí hlaveň - 予備銃身は冷たい - Zimne zapasowe lufy - Kalte Wechselläufe - 차가운 예비 총열 - Canna/e di Ricambio Fredda - 备用枪管温度正常 - 備用槍管溫度正常 Warm Spare Barrel/s @@ -438,13 +317,6 @@ Canon(s) de rechange tiède Теплые Teplá náhrandí hlaveň - 予備銃身は温かい - Ciepłe zapasowe lufy - Warme Wechselläufe - 따뜻한 예비 총열 - Canna/e di Ricambio Calda - 备用枪管温度偏温 - 備用槍管溫度偏溫 Hot Spare Barrel/s @@ -452,13 +324,6 @@ Canon(s) de rechange chaud Горячие Horká náhrandí hlaveň - 予備銃身は熱い - Gorące zapasowe lufy - Heiße Wechselläufe - 뜨거운 예비 총열 - Canna/e di Ricambio Molto Calda - 备用枪管温度偏热 - 備用槍管溫度偏熱 Very Hot Spare Barrel/s @@ -466,13 +331,6 @@ Canon(s) de rechange très chaud Очень горячие Velmi horká náhrandí hlaveň - 予備銃身はとても熱い - Bardzo gorące zapasowe lufy - Sehr heiße Wechselläufe - 매우 뜨거운 예비 총열 - Canna/e di Ricambio Estremamente Calda - 备用枪管温度过热 - 備用槍管溫度過熱 Extremely Hot Spare Barrel/s @@ -480,41 +338,21 @@ Canon(s) de rechange extrêmement chaud Запредельно горячие Extrémně horká náhrandí hlaveň - 予備銃身は極めて熱い - Ekstremalnie gorące zapasowe lufy - Extrem heiße Wechselläufe - 엄청나게 뜨거운 예비 총열 - Canna/e di Ricambio Rovente - 备用枪管温度超级热 - 備用槍管溫度超級熱 Overheating Enabled - Überhitzung aktiviert + Überhitzen Aktiviert Activada Sobrecalentamiento Superaquecimento ativado Surchauffe activée Перегрев включен Přehřívání povoleno - 過熱を有効化 - Przegrzewanie włączone - 과열 활성화 - Surriscaldamento Abilitato - 启用过热 - 啟用過熱 Master enable for the overheating/jamming module Chave mestra para o módulo de superaquecimento/emperramento Activateur maître pour le module de surchauffe / enrayement Главный включатель для модуля перегрева/заклинивания - 過熱と弾詰まりモジュールを全て有効化します - Główny włącznik modułu przegrzewania/zacinania się broni - Hauptschalter, um die Überhitzung-/Ladehemmung-Module zu aktivieren - 과열/탄걸림 최종 활성화 - Abilitazione master per il modulo di surriscaldamento / inceppamento - 启用枪管过热/干扰模块 - 啟用槍管過熱/干擾模塊 - + \ No newline at end of file diff --git a/addons/overpressure/ACE_Settings.hpp b/addons/overpressure/ACE_Settings.hpp deleted file mode 100644 index f2ddb5e302..0000000000 --- a/addons/overpressure/ACE_Settings.hpp +++ /dev/null @@ -1,8 +0,0 @@ -class ACE_Settings { - class GVAR(distanceCoefficient) { - displayName = CSTRING(distanceCoefficient_displayName); - description = CSTRING(distanceCoefficient_toolTip); - typeName = "SCALAR"; - value = 1; - }; -}; diff --git a/addons/overpressure/XEH_postInit.sqf b/addons/overpressure/XEH_postInit.sqf index 02b0e71bb6..dd74ec5c3a 100644 --- a/addons/overpressure/XEH_postInit.sqf +++ b/addons/overpressure/XEH_postInit.sqf @@ -1,12 +1,7 @@ #include "script_component.hpp" -["ace_settingsInitialized", { - TRACE_1("settingsInit eh",GVAR(distanceCoefficient)); - if (GVAR(distanceCoefficient) <= 0) exitWith {}; +["ace_overpressure", FUNC(overpressureDamage)] call CBA_fnc_addEventHandler; - ["ace_overpressure", LINKFUNC(overpressureDamage)] call CBA_fnc_addEventHandler; - - // Register fire event handler - ["ace_firedPlayer", LINKFUNC(firedEHBB)] call CBA_fnc_addEventHandler; - ["ace_firedPlayerVehicle", LINKFUNC(firedEHOP)] call CBA_fnc_addEventHandler; -}] call CBA_fnc_addEventHandler; +// Register fire event handler +["ace_firedPlayer", DFUNC(firedEHBB)] call CBA_fnc_addEventHandler; +["ace_firedPlayerVehicle", DFUNC(firedEHOP)] call CBA_fnc_addEventHandler; diff --git a/addons/overpressure/XEH_preInit.sqf b/addons/overpressure/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/overpressure/XEH_preInit.sqf +++ b/addons/overpressure/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/overpressure/config.cpp b/addons/overpressure/config.cpp index d99cbb1cc7..0aa455de7d 100644 --- a/addons/overpressure/config.cpp +++ b/addons/overpressure/config.cpp @@ -14,6 +14,9 @@ class CfgPatches { }; }; -#include "ACE_Settings.hpp" #include "CfgEventHandlers.hpp" #include "CfgWeapons.hpp" + +class ACE_newEvents { + overpressure = "ace_overpressure"; +}; diff --git a/addons/overpressure/functions/fnc_cacheOverPressureValues.sqf b/addons/overpressure/functions/fnc_cacheOverPressureValues.sqf index 96d45ffe04..4b447b5012 100644 --- a/addons/overpressure/functions/fnc_cacheOverPressureValues.sqf +++ b/addons/overpressure/functions/fnc_cacheOverPressureValues.sqf @@ -46,7 +46,7 @@ TRACE_1("ConfigPath",_config); // get the Variables out of the Configes and create a array with then private _return = [ (getNumber (_config >> QGVAR(angle))), - (getNumber (_config >> QGVAR(range))) * GVAR(distanceCoefficient), + (getNumber (_config >> QGVAR(range))), (getNumber (_config >> QGVAR(damage))) ]; diff --git a/addons/overpressure/functions/fnc_getDistance.sqf b/addons/overpressure/functions/fnc_getDistance.sqf index 5f76c12d1a..febb4ea747 100644 --- a/addons/overpressure/functions/fnc_getDistance.sqf +++ b/addons/overpressure/functions/fnc_getDistance.sqf @@ -3,9 +3,9 @@ * Calculate the distance to the first intersection of a line * * Arguments: - * 0: Pos ASL of origin + * 0: Pos ASL of origin (ARRAY> * 1: Direction - * 2: Max distance to search + * 2: Max distance to search * 3: Shooter * * Return Value: @@ -38,7 +38,7 @@ private _distance = 999; if (isNull _intersectObject) then { //Terrain: // Calculate the angle between the terrain and the back blast direction - private _angle = 90 - acos (- (_surfaceNormal vectorDotProduct _direction)); + _angle = 90 - acos (- (_surfaceNormal vectorDotProduct _direction)); TRACE_3("Terrain Intersect",_surfaceNormal,_direction,_angle); // Angles is below 25deg, no backblast at all if (_angle < 25) exitWith {_distance = 999}; diff --git a/addons/overpressure/functions/fnc_overpressureDamage.sqf b/addons/overpressure/functions/fnc_overpressureDamage.sqf index f75568e29b..75286a968b 100644 --- a/addons/overpressure/functions/fnc_overpressureDamage.sqf +++ b/addons/overpressure/functions/fnc_overpressureDamage.sqf @@ -51,7 +51,6 @@ TRACE_3("cache",_overpressureAngle,_overpressureRange,_overpressureDamage); private _beta = sqrt (1 - _angle / _overpressureAngle); private _damage = _alpha * _beta * _overpressureDamage; - TRACE_1("",_damage); // If the target is the ACE_player if (_x == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect}; diff --git a/addons/overpressure/script_component.hpp b/addons/overpressure/script_component.hpp index c0fcb82dd2..c9e5ff587d 100644 --- a/addons/overpressure/script_component.hpp +++ b/addons/overpressure/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_OVERPRESSURE diff --git a/addons/overpressure/stringtable.xml b/addons/overpressure/stringtable.xml deleted file mode 100644 index 7a9edc06e5..0000000000 --- a/addons/overpressure/stringtable.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - Overpressure Distance Coefficient - 過圧の距離係数 - 초과압력 거리 계수 - Mnożnik dystansu nadciśnienia - Coéfficient de distance pour la surpression - Coefficente Distanza Sovrapressione - 高压影响距离系数 - 高壓影響距離係數 - - - Scales the overpressure effect [Default: 1] - 過圧効果の範囲 [標準: 1] - 초과압력의 효과 크기 [기본설정: 1] - Skaluje efekt nadciśnienia [Domyślne: 1] - Échelonne les effets de la surpression [Par défaut : 1] - Scala l'effetto di sovrapressione [Predefinito: 1] - 高压影响的范围 [预设: 1] - 高壓影響的範圍 [預設: 1] - - - diff --git a/addons/parachute/XEH_preInit.sqf b/addons/parachute/XEH_preInit.sqf index 227fa9e38c..bffa5623b8 100644 --- a/addons/parachute/XEH_preInit.sqf +++ b/addons/parachute/XEH_preInit.sqf @@ -17,8 +17,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/parachute/functions/fnc_checkCutParachute.sqf b/addons/parachute/functions/fnc_checkCutParachute.sqf index 67fd842f92..94137ed67c 100644 --- a/addons/parachute/functions/fnc_checkCutParachute.sqf +++ b/addons/parachute/functions/fnc_checkCutParachute.sqf @@ -3,10 +3,10 @@ * Reset the parachute system. * * Arguments: - * 0: Object + * 0: Object * * Return Value: - * Boolean + * Boolean * * Example: * [player] call FUNC(checkCutParachute); @@ -15,4 +15,4 @@ */ #include "script_component.hpp" params ["_unit"]; -(vehicle _unit isKindOf 'ParachuteBase' && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getVariable [QGVAR(hasReserve),false])) +(vehicle _unit isKindOf 'ParachuteBase' && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getVariable [QGVAR(hasReserve),false])) \ No newline at end of file diff --git a/addons/parachute/functions/fnc_cutParachute.sqf b/addons/parachute/functions/fnc_cutParachute.sqf index 34b808d9d8..f7aa86991b 100644 --- a/addons/parachute/functions/fnc_cutParachute.sqf +++ b/addons/parachute/functions/fnc_cutParachute.sqf @@ -3,10 +3,10 @@ * Cut Parachute and delete Old * * Arguments: - * 0: Object + * 0: Object * * Return Value: - * None + * Nothing * * Example: * [player] call FUNC(cutParachute); diff --git a/addons/parachute/functions/fnc_handleInfoDisplayChanged.sqf b/addons/parachute/functions/fnc_handleInfoDisplayChanged.sqf index 7bb500912e..b27849a0c8 100644 --- a/addons/parachute/functions/fnc_handleInfoDisplayChanged.sqf +++ b/addons/parachute/functions/fnc_handleInfoDisplayChanged.sqf @@ -3,14 +3,11 @@ * Hides the height and velocity display while freefalling or parachuting on higher difficulties. * * Arguments: - * Stuff from infoDisplayChanged eventhandler. + * Stuff from infoDisplayChanged eventhandler. * * Return Value: * None * - * Example: - * [?] call ACE_parachute_fnc_handleInfoDisplayChanged - * * Public: No */ #include "script_component.hpp" diff --git a/addons/parachute/functions/fnc_storeParachute.sqf b/addons/parachute/functions/fnc_storeParachute.sqf index adc513fbf9..8980a8ff82 100644 --- a/addons/parachute/functions/fnc_storeParachute.sqf +++ b/addons/parachute/functions/fnc_storeParachute.sqf @@ -1,19 +1,18 @@ /* - * Author: joko // Jonas - * Add the Reserve Parachute to Units or Save Backpack if is a Parachute in Unit - * - * Arguments: - * None - * - * Return Value: - * 0: Unit - * - * Example: - * call ace_parachute_fnc_storeParachute - * - * Public: No - */ - + * Author: joko // Jonas + * Add the Reserve Parachute to Units or Save Backpack if is a Parachute in Unit + * + * Arguments: + * None + * + * Return Value: + * 0: Unit + * + * Example: + * None + * + * Public: No + */ #include "script_component.hpp" params ["_unit"]; diff --git a/addons/parachute/script_component.hpp b/addons/parachute/script_component.hpp index e43f330e49..cb341ba5ce 100644 --- a/addons/parachute/script_component.hpp +++ b/addons/parachute/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_PARACHUTE diff --git a/addons/parachute/stringtable.xml b/addons/parachute/stringtable.xml index c57f50b54f..880cc55e5f 100644 --- a/addons/parachute/stringtable.xml +++ b/addons/parachute/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Высотомер Altimetro Altímetro - 高度計 - 고도계 - 高度计 - 高度計 Altimeter Watch @@ -28,10 +24,6 @@ Часы с высотомером Controlla l'altimetro Relógio Altímetro - 時計型高度計 - 고도계 시계 - 高度计手表 - 高度計手錶 Used to show height, descent rate and the time. @@ -44,10 +36,6 @@ Используется для определения высоты, скорости снижения и времени. Usato per mostrare l'altitudine, la velocità di discesa e l'ora. Usado para mostrar altura, taxa de descida e o tempo. - 高度や降下率、時間を見るのに使います。 - 높이와, 하강속도 그리고 시간을 보여줍니다. - 用于显示高度, 下降率和时间. - 用於顯示高度, 下降率和時間. Non-Steerable Parachute @@ -60,10 +48,6 @@ Неуправляемый парашют Paracadute non manovrabile Para-querdas não controlável - 非操作型パラシュート - 비-조종 낙하산 - 非可操控降落伞 - 非可操控降落傘 Cut Parachute @@ -76,10 +60,6 @@ Odžíznout padák Cortar paracaídas Taglia Paracadute - パラシュートを切断 - 낙하산 자르기 - 剪断降落伞 - 剪斷降落傘 Reserve Parachute @@ -92,10 +72,6 @@ Záložní padák Paracaídas de reserva Paracadute di Riserva - 予備パラシュート - 예비 낙하산 - 备用降落伞 - 備用降落傘 - + \ No newline at end of file diff --git a/optionals/particles/$PBOPREFIX$ b/addons/particles/$PBOPREFIX$ similarity index 100% rename from optionals/particles/$PBOPREFIX$ rename to addons/particles/$PBOPREFIX$ diff --git a/optionals/particles/CfgAmmo.hpp b/addons/particles/CfgAmmo.hpp similarity index 98% rename from optionals/particles/CfgAmmo.hpp rename to addons/particles/CfgAmmo.hpp index 361475778b..6065a0b818 100644 --- a/optionals/particles/CfgAmmo.hpp +++ b/addons/particles/CfgAmmo.hpp @@ -63,7 +63,7 @@ class CfgAmmo { // - Artillery smoke submunition ------------------------------------------ class SmokeShellArty: SmokeShell { - explosionTime = 0.1; + explosionTime = 0; effectsSmoke = "ACE_ArtillerySmoke"; }; diff --git a/optionals/particles/CfgCloudlets.hpp b/addons/particles/CfgCloudlets.hpp similarity index 100% rename from optionals/particles/CfgCloudlets.hpp rename to addons/particles/CfgCloudlets.hpp diff --git a/optionals/particles/Effects.hpp b/addons/particles/Effects.hpp similarity index 100% rename from optionals/particles/Effects.hpp rename to addons/particles/Effects.hpp diff --git a/optionals/particles/README.md b/addons/particles/README.md similarity index 100% rename from optionals/particles/README.md rename to addons/particles/README.md diff --git a/optionals/particles/config.cpp b/addons/particles/config.cpp similarity index 100% rename from optionals/particles/config.cpp rename to addons/particles/config.cpp diff --git a/optionals/particles/data/smoke.p3d b/addons/particles/data/smoke.p3d similarity index 100% rename from optionals/particles/data/smoke.p3d rename to addons/particles/data/smoke.p3d diff --git a/optionals/particles/data/smoke_ca.paa b/addons/particles/data/smoke_ca.paa similarity index 100% rename from optionals/particles/data/smoke_ca.paa rename to addons/particles/data/smoke_ca.paa diff --git a/optionals/particles/script_component.hpp b/addons/particles/script_component.hpp similarity index 98% rename from optionals/particles/script_component.hpp rename to addons/particles/script_component.hpp index 82729c42da..6d7065a31d 100644 --- a/optionals/particles/script_component.hpp +++ b/addons/particles/script_component.hpp @@ -3,6 +3,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_PARTICLES diff --git a/addons/quickmount/$PBOPREFIX$ b/addons/quickmount/$PBOPREFIX$ deleted file mode 100644 index 2251bc0b6e..0000000000 --- a/addons/quickmount/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\quickmount diff --git a/addons/quickmount/ACE_Settings.hpp b/addons/quickmount/ACE_Settings.hpp deleted file mode 100644 index bcb45f8c43..0000000000 --- a/addons/quickmount/ACE_Settings.hpp +++ /dev/null @@ -1,41 +0,0 @@ -class ACE_Settings { - class GVAR(enabled) { - value = 0; - typeName = "BOOL"; - category = CSTRING(Category); - displayName = ECSTRING(common,Enabled); - description = CSTRING(KeybindDescription); - isClientSettable = 1; - force = 0; - }; - class GVAR(distance) { - value = DEFAULT_DISTANCE; - typeName = "SCALAR"; - category = CSTRING(Category); - displayName = CSTRING(Distance); - description = CSTRING(DistanceDescription); - isClientSettable = 0; - force = 0; - values[] = {"0m", "1m", "2m", "3m", "4m", "5m", "6m", "7m", "8m", "9m", "10m"}; - }; - class GVAR(speed) { - value = DEFAULT_SPEED; - typeName = "SCALAR"; - category = CSTRING(Category); - displayName = CSTRING(Speed); - description = CSTRING(SpeedDescription); - isClientSettable = 0; - force = 0; - values[] = {"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"}; - }; - class GVAR(priority) { - value = DEFAULT_PRIORITY; - typeName = "SCALAR"; - category = CSTRING(Category); - displayName = CSTRING(Priority); - description = CSTRING(PriorityDescription); - isClientSettable = 1; - force = 0; - values[] = {"Driver", "Gunner", "Commander", "Passenger"}; - }; -}; diff --git a/addons/quickmount/CfgEventHandlers.hpp b/addons/quickmount/CfgEventHandlers.hpp deleted file mode 100644 index 9426fa861e..0000000000 --- a/addons/quickmount/CfgEventHandlers.hpp +++ /dev/null @@ -1,17 +0,0 @@ -class Extended_PreStart_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); - }; -}; - -class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); - }; -}; - -class Extended_PostInit_EventHandlers { - class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient)); - }; -}; diff --git a/addons/quickmount/CfgVehicles.hpp b/addons/quickmount/CfgVehicles.hpp deleted file mode 100644 index 758e462900..0000000000 --- a/addons/quickmount/CfgVehicles.hpp +++ /dev/null @@ -1,37 +0,0 @@ -class CfgVehicles { - class ACE_Module; - class GVAR(module): ACE_Module { - author = ECSTRING(common,ACETeam); - category = "ACE"; - displayName = CSTRING(Category); - function = QFUNC(moduleInit); - scope = 2; - isGlobal = 1; - isTriggerActivated = 0; - isDisposable = 0; - icon = QPATHTOF(UI\Icon_Module_QuickMount_ca.paa); - class Arguments { - class enabled { - displayName = ECSTRING(common,Enabled); - description = CSTRING(KeybindDescription); - typeName = "BOOL"; - defaultValue = 1; - }; - class distance { - displayName = CSTRING(Distance); - description = CSTRING(DistanceDescription); - typeName = "NUMBER"; - defaultValue = DEFAULT_DISTANCE; - }; - class speed { - displayName = CSTRING(Speed); - description = CSTRING(SpeedDescription); - typeName = "NUMBER"; - defaultValue = DEFAULT_SPEED; - }; - }; - class ModuleDescription { - description = CSTRING(KeybindDescription); - }; - }; -}; diff --git a/addons/quickmount/README.md b/addons/quickmount/README.md deleted file mode 100644 index 6e11fc8ae4..0000000000 --- a/addons/quickmount/README.md +++ /dev/null @@ -1,9 +0,0 @@ -ace_quickmount -============ -Adds a keybind to quickly enter the vehicle you are directly looking at. - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Kingsley](https://github.com/jameslkingsley) diff --git a/addons/quickmount/UI/Icon_Module_QuickMount_ca.paa b/addons/quickmount/UI/Icon_Module_QuickMount_ca.paa deleted file mode 100644 index 425f744a47..0000000000 Binary files a/addons/quickmount/UI/Icon_Module_QuickMount_ca.paa and /dev/null differ diff --git a/addons/quickmount/XEH_PREP.hpp b/addons/quickmount/XEH_PREP.hpp deleted file mode 100644 index eba2f68296..0000000000 --- a/addons/quickmount/XEH_PREP.hpp +++ /dev/null @@ -1,2 +0,0 @@ -PREP(getInNearest); -PREP(moduleInit); diff --git a/addons/quickmount/XEH_postInitClient.sqf b/addons/quickmount/XEH_postInitClient.sqf deleted file mode 100644 index 718c08b843..0000000000 --- a/addons/quickmount/XEH_postInitClient.sqf +++ /dev/null @@ -1,10 +0,0 @@ -#include "script_component.hpp" - -if (!hasInterface) exitWith {}; - -["ACE3 Movement", QGVAR(mount), [localize LSTRING(KeybindName), localize LSTRING(KeybindDescription)], "", { - if (!dialog) then { - call FUNC(getInNearest); - }; - false -}] call CBA_fnc_addKeybind; diff --git a/addons/quickmount/XEH_preInit.sqf b/addons/quickmount/XEH_preInit.sqf deleted file mode 100644 index b47cf6628d..0000000000 --- a/addons/quickmount/XEH_preInit.sqf +++ /dev/null @@ -1,9 +0,0 @@ -#include "script_component.hpp" - -ADDON = false; - -PREP_RECOMPILE_START; -#include "XEH_PREP.hpp" -PREP_RECOMPILE_END; - -ADDON = true; diff --git a/addons/quickmount/config.cpp b/addons/quickmount/config.cpp deleted file mode 100644 index 063897aebc..0000000000 --- a/addons/quickmount/config.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - author = ECSTRING(common,ACETeam); - authors[] = {"Kingsley"}; - url = ECSTRING(main,URL); - VERSION_CONFIG; - }; -}; - -#include "CfgEventHandlers.hpp" -#include "ACE_Settings.hpp" -#include "CfgVehicles.hpp" diff --git a/addons/quickmount/functions/fnc_getInNearest.sqf b/addons/quickmount/functions/fnc_getInNearest.sqf deleted file mode 100644 index 43e66e648c..0000000000 --- a/addons/quickmount/functions/fnc_getInNearest.sqf +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Author: Kingsley - * Mount the player in the vehicle they are directly looking at based on their distance. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ace_quickmount_fnc_getInNearest; - * - * Public: No - */ -#include "script_component.hpp" - -if (!GVAR(enabled) || - {isNull ACE_player} || - {vehicle ACE_player != ACE_player} || - {!alive ACE_player} || - {ACE_player getVariable ["ace_unconscious", false]} -) exitWith {}; - -private _start = AGLtoASL (ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot")); -private _end = (_start vectorAdd (getCameraViewDirection ACE_player vectorMultiply GVAR(distance))); -private _objects = lineIntersectsSurfaces [_start, _end, ACE_player]; -private _target = (_objects param [0, []]) param [2, objNull]; - -if (locked _target in [2,3]) exitWith { - [localize LSTRING(VehicleLocked)] call EFUNC(common,displayTextStructured); - true -}; - -TRACE_1("",_target); - -if (!isNull _target && - {alive _target} && - {{_target isKindOf _x} count ["Air","LandVehicle","Ship","StaticMortar"] > 0} && - {([ACE_player, _target] call EFUNC(common,canInteractWith))} && - {speed _target <= GVAR(speed)} - ) then { - - - if (GVAR(priority) > 3 || GVAR(priority) < 0) then { - GVAR(priority) = 0; - }; - - private _seats = ["Driver", "Gunner", "Commander", "Cargo"]; - private _sortedSeats = [_seats select GVAR(priority)]; - _seats deleteAt GVAR(priority); - _sortedSeats append _seats; - - - private _hasAction = false; - scopeName "SearchForSeat"; - { - private _desiredRole = _x; - { - _x params ["_unit", "_role", "_cargoIndex", "_turretPath"]; - if ((isNull _unit) || {!alive _unit}) then { - private _effectiveRole = toLower _role; - - if ((_effectiveRole in ["driver", "gunner"]) && {unitIsUAV _target}) exitWith {}; // Ignoring UAV Driver/Gunner - if ((_effectiveRole == "driver") && {(getNumber (([_target] call CBA_fnc_getObjectConfig) >> "hasDriver")) == 0}) exitWith {}; // Ignoring Non Driver (static weapons) - if (_effectiveRole == "turret") then { - if ((getNumber (([_target, _turretPath] call CBA_fnc_getTurret) >> "isCopilot")) == 1) exitWith { - _effectiveRole = "driver"; - }; - if (_cargoIndex < 0) exitWith { - _effectiveRole = "gunner"; // door gunners / 2nd turret - }; - _effectiveRole = "cargo"; // probably a FFV - }; - TRACE_2("",_effectiveRole,_x); - if (_effectiveRole != _desiredRole) exitWith {}; - - if (_role == "Turret") then { - ACE_player action ["GetIn" + _role, _target, _turretPath]; - TRACE_3("Geting In",_x,_role,_turretPath); - } else { - ACE_player action ["GetIn" + _role, _target]; - TRACE_3("Geting In",_x,_role); - }; - - _hasAction = true; - breakTo "SearchForSeat"; - }; - } forEach (fullCrew [_target, "", true]); - } forEach _sortedSeats; - - if (!_hasAction) then { - TRACE_1("no empty seats",_hasAction); - [localize LSTRING(VehicleFull)] call EFUNC(common,displayTextStructured); - }; -}; - -true diff --git a/addons/quickmount/functions/fnc_moduleInit.sqf b/addons/quickmount/functions/fnc_moduleInit.sqf deleted file mode 100644 index 92df787737..0000000000 --- a/addons/quickmount/functions/fnc_moduleInit.sqf +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Author: Kingsley - * Initializes the quick-mount module. - * - * Arguments: - * 0: The module logic - * 1: Units (Unused) - * 2: Activated - * - * Return Value: - * None - * - * Public: No - */ -#include "script_component.hpp" - -if (!isServer) exitWith {}; - -params ["_logic", "", "_activated"]; - -if (!_activated) exitWith {}; - -[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(distance), "distance"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(speed), "speed"] call EFUNC(common,readSettingFromModule); diff --git a/addons/quickmount/functions/script_component.hpp b/addons/quickmount/functions/script_component.hpp deleted file mode 100644 index a91c3e1665..0000000000 --- a/addons/quickmount/functions/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\ace\addons\quickmount\script_component.hpp" diff --git a/addons/quickmount/script_component.hpp b/addons/quickmount/script_component.hpp deleted file mode 100644 index a0ec1debd0..0000000000 --- a/addons/quickmount/script_component.hpp +++ /dev/null @@ -1,21 +0,0 @@ -#define COMPONENT quickmount -#define COMPONENT_BEAUTIFIED Quick Mount -#include "\z\ace\addons\main\script_mod.hpp" - -// #define DEBUG_MODE_FULL -// #define DISABLE_COMPILE_CACHE -// #define ENABLE_PERFORMANCE_COUNTERS - -#ifdef DEBUG_ENABLED_QUICKMOUNT - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_SETTINGS_QUICKMOUNT - #define DEBUG_SETTINGS DEBUG_SETTINGS_QUICKMOUNT -#endif - -#include "\z\ace\addons\main\script_macros.hpp" - -#define DEFAULT_DISTANCE 3 -#define DEFAULT_SPEED 18 -#define DEFAULT_PRIORITY 0 diff --git a/addons/quickmount/stringtable.xml b/addons/quickmount/stringtable.xml deleted file mode 100644 index 057e6482a7..0000000000 --- a/addons/quickmount/stringtable.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - Quick Mount - Entrata Rapida - クイック マウント - 快速搭乘 - 快速搭乘 - - - Vehicle quick mount - Fahrzeug schnell montieren - Pojazd szybkie mocowanie - Entrata rapida veicolo - 車両クイック マウント - 快速搭乘载具 - 快速搭乘載具 - - - Quickly enter the vehicle you are directly looking at. - Entra velocemente nel veicolo che stai guardando. - 直接見ている車両へ迅速に搭乗します。 - 快速进入你正在看的载具之中. - 快速進入你正在看的載具之中. - - - Vehicle Full - Veicolo Pieno - 車両は満員 - 载具已满 - 載具已滿 - - - Distance - Distanza - 距離 - 距离 - 距離 - - - Maximum distance to check for vehicles. - Distanza massima per controllare i veicoli. - 車両を確認できる最大距離 - 最大可检查载具的距离. - 最大可檢查載具的距離. - - - Vehicle Locked - Veicolo Bloccato. - 車両は施錠されている - 载具已上锁 - 載具已上鎖 - - - Maximum Speed (km/h) - Velocità Massima (km/h) - 最高速度 (km/h) - 最高速度 (公里/小时) - 最高速度 (公里/小時) - - - Maximum vehicle speed (km/h) allowed for player entry - Velocità massima del veicolo (km/h) consentita per far salire un giocatore - プレイヤーが搭乗できる限界速度 (km/h) - 设置玩家能在最高多少的速度之下进入载具. - 設置玩家能在最高多少的速度之下進入載具. - - - Prioritize Seat - Priorità Sedile - 優先席 - 优先座位 - 優先座位 - - - Seat priority on entry - Priorità del sedile in entrata - 搭乗の際の優先順位 - 优先想进入哪个座位. - 優先想進入哪個座位. - - - diff --git a/addons/rangecard/CfgVehicles.hpp b/addons/rangecard/CfgVehicles.hpp index 7abc8d979b..e7df701409 100644 --- a/addons/rangecard/CfgVehicles.hpp +++ b/addons/rangecard/CfgVehicles.hpp @@ -34,7 +34,7 @@ class CfgVehicles { class GVAR(makeCopy) { displayName = CSTRING(CopyRangeCard); condition = QUOTE(call FUNC(canShow) && !GVAR(RangeCardOpened)); - statement = QUOTE(GVAR(zeroRangeCopy)=GVAR(zeroRange); GVAR(boreHeightCopy)=GVAR(boreHeight); GVAR(ammoClassCopy)=GVAR(ammoClass); GVAR(magazineClassCopy)=GVAR(magazineClass); GVAR(weaponClassCopy)=GVAR(weaponClass);); + statement = QUOTE(GVAR(ammoClassCopy) = GVAR(ammoClass); GVAR(magazineClassCopy) = GVAR(magazineClass); GVAR(weaponClassCopy) = GVAR(ammoClass);); showDisabled = 0; priority = 0.1; icon = QPATHTOF(UI\RangeCard_Icon.paa); diff --git a/addons/rangecard/XEH_PREP.hpp b/addons/rangecard/XEH_PREP.hpp index abbeaa2803..6b13dcc45a 100644 --- a/addons/rangecard/XEH_PREP.hpp +++ b/addons/rangecard/XEH_PREP.hpp @@ -1,5 +1,5 @@ -PREP(calculateRangeCard); +PREP(calculateSolution); PREP(canCopy); PREP(canShow); PREP(canShowCopy); diff --git a/addons/rangecard/XEH_postInit.sqf b/addons/rangecard/XEH_postInit.sqf index 9e60821fc1..8396d76b39 100644 --- a/addons/rangecard/XEH_postInit.sqf +++ b/addons/rangecard/XEH_postInit.sqf @@ -6,14 +6,10 @@ GVAR(RangeCardOpened) = false; GVAR(controls) = []; -GVAR(zeroRange) = 100; -GVAR(boreHeight) = 3.81; GVAR(ammoClass) = "B_65x39_Caseless"; GVAR(magazineClass) = "30Rnd_65x39_caseless_mag"; GVAR(weaponClass) = "arifle_MXM_F"; -GVAR(zeroRangeCopy) = 100; -GVAR(boreHeightCopy) = 3.81; GVAR(ammoClassCopy) = "";//"ACE_762x51_Ball_M118LR"; GVAR(magazineClassCopy) = "";//"ACE_20Rnd_762x51_M118LR_Mag"; GVAR(weaponClassCopy) = "";//srifle_DMR_06_olive_F"; diff --git a/addons/rangecard/XEH_preInit.sqf b/addons/rangecard/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/rangecard/XEH_preInit.sqf +++ b/addons/rangecard/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/rangecard/config.cpp b/addons/rangecard/config.cpp index f300fb1a30..9017583606 100644 --- a/addons/rangecard/config.cpp +++ b/addons/rangecard/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {"ACE_Item_RangeCard"}; weapons[] = {"ACE_RangeCard"}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ACE_Advanced_Ballistics","ace_scopes"}; + requiredAddons[] = {"ACE_Advanced_Ballistics"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg"}; url = ECSTRING(main,URL); diff --git a/addons/rangecard/functions/fnc_calculateRangeCard.sqf b/addons/rangecard/functions/fnc_calculateRangeCard.sqf deleted file mode 100644 index 67952f27f4..0000000000 --- a/addons/rangecard/functions/fnc_calculateRangeCard.sqf +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Author: Ruthberg - * Calculates the range card data - * - * Arguments: - * 0: Scope base angle - * 1: Bore height - * 2: air friction - * 3: muzzle velocity - * 4: temperature - * 5: barometric pressure - * 6: relative humidity - * 7: simulation steps - * 8: wind speed - * 9: target speed - * 10: target range - * 11: ballistic coefficient - * 12: drag model - * 13: atmosphere model - * 14: transonicStabilityCoef - * 15: Range Card Slot - * 16: Use advanced ballistics config? - * - * Return Value: - * None - * - * Example: - * [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 ,14, 15, 16, true] call ace_rangecard_fnc_calculateRangeCard - * - * Public: No - */ -#include "script_component.hpp" -params [ - "_scopeBaseAngle", "_boreHeight", "_airFriction", "_muzzleVelocity", - "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", - "_windSpeed", "_targetSpeed", "_targetRange", "_bc", "_dragModel", "_atmosphereModel", - "_transonicStabilityCoef", "_rangeCardSlot", "_useABConfig" -]; - -GVAR(rangeCardDataMVs) set [_rangeCardSlot, format[" %1", round(_muzzleVelocity)]]; - -private ["_tx", "_tz", "_lastBulletPos", "_bulletPos", "_bulletVelocity", "_bulletAccel", "_bulletSpeed", "_gravity", "_deltaT", "_speedOfSound"]; -_tx = 0; -_tz = 0; -_lastBulletPos = [0, 0, 0]; -_bulletPos = [0, 0, 0]; -_bulletVelocity = [0, 0, 0]; -_bulletAccel = [0, 0, 0]; -_bulletSpeed = 0; -_gravity = [0, sin(_scopeBaseAngle) * -9.80665, cos(_scopeBaseAngle) * -9.80665]; -_deltaT = 1 / _simSteps; -_speedOfSound = 0; -if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - _speedOfSound = _temperature call EFUNC(weather,calculateSpeedOfSound); -}; - -private ["_elevation", "_windage", "_lead", "_TOF", "_trueVelocity", "_trueSpeed"]; -_elevation = 0; -_windage = 0; -_lead = 0; -_TOF = 0; -_trueVelocity = [0, 0, 0]; -_trueSpeed = 0; - -private ["_n", "_range"]; -_n = 0; -_range = 0; - -if (_useABConfig) then { - _bc = parseNumber(("ace_advanced_ballistics" callExtension format["atmosphericCorrection:%1:%2:%3:%4:%5", _bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel])); -}; - -private ["_airFrictionCoef", "_airDensity"]; -_airFrictionCoef = 1; -if (!_useABConfig && (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) then { - _airDensity = [_temperature, _barometricPressure, _relativeHumidity] call EFUNC(weather,calculateAirDensity); - _airFrictionCoef = _airDensity / 1.22498; -}; - -private ["_speedTotal", "_stepsTotal", "_speedAverage"]; -_speedTotal = 0; -_stepsTotal = 0; -_speedAverage = 0; - -_bulletPos set [0, 0]; -_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]; - -while {_TOF < 6 && (_bulletPos select 1) < _targetRange} do { - _bulletSpeed = vectorMagnitude _bulletVelocity; - - _speedTotal = _speedTotal + _bulletSpeed; - _stepsTotal = _stepsTotal + 1; - _speedAverage = (_speedTotal / _stepsTotal); - - if (_transonicStabilityCoef < 1.0 && _speedAverage > 450 && _bulletSpeed < _speedOfSound) exitWith {}; - - _trueVelocity = _bulletVelocity vectorDiff [-_windSpeed, 0, 0]; - _trueSpeed = vectorMagnitude _trueVelocity; - - if (_useABConfig) then { - private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _trueSpeed])); - _bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (-1 * _drag); - } else { - _bulletAccel = _trueVelocity vectorMultiply (_trueSpeed * _airFriction * _airFrictionCoef); - }; - - _bulletAccel = _bulletAccel vectorAdd _gravity; - - _lastBulletPos = _bulletPos; - _bulletPos = _bulletPos vectorAdd (_bulletVelocity vectorMultiply (_deltaT * 0.5)); - _bulletVelocity = _bulletVelocity vectorAdd (_bulletAccel vectorMultiply _deltaT); - _bulletPos = _bulletPos vectorAdd (_bulletVelocity vectorMultiply (_deltaT * 0.5)); - - if (atan((_bulletPos select 2) / (abs(_bulletPos select 1) + 1)) < -2.254) exitWith {}; - - _TOF = _TOF + _deltaT; - - _range = GVAR(rangeCardStartRange) + _n * GVAR(rangeCardIncrement); - if ((_bulletPos select 1) >= _range && _range <= GVAR(rangeCardEndRange)) then { - if (_range != 0) then { - _tx = (_lastBulletPos select 0) + (_range - (_lastBulletPos select 1)) * ((_bulletPos select 0) - (_lastBulletPos select 0)) / ((_bulletPos select 1) - (_lastBulletPos select 1)); - _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(3.38 / 60) * _range); - }; - private ["_elevationString", "_windageString", "_leadString"]; - _elevationString = Str(round(-_elevation * 60 / 3.38 * 10) / 10); - if (_elevationString == "0") then { - _elevationString = "-0.0"; - }; - if (_elevationString find "." == -1) then { - _elevationString = _elevationString + ".0"; - }; - _windageString = Str(round(_windage * 60 / 3.38 * 10) / 10); - if (_windageString find "." == -1) then { - _windageString = _windageString + ".0"; - }; - _leadString = Str(round(_lead * 10) / 10); - if (_leadString find "." == -1) then { - _leadString = _leadString + ".0"; - }; - (GVAR(rangeCardDataElevation) select _rangeCardSlot) set [_n, _elevationString]; - (GVAR(rangeCardDataWindage) select _rangeCardSlot) set [_n, _windageString]; - (GVAR(rangeCardDataLead) select _rangeCardSlot) set [_n, _leadString]; - _n = _n + 1; - }; -}; diff --git a/addons/rangecard/functions/fnc_calculateSolution.sqf b/addons/rangecard/functions/fnc_calculateSolution.sqf new file mode 100644 index 0000000000..945c2aa512 --- /dev/null +++ b/addons/rangecard/functions/fnc_calculateSolution.sqf @@ -0,0 +1,199 @@ +/* + * Author: Ruthberg + * Calculates the range card data + * + * Arguments: + * 0: Scope base angle + * 1: Bullet mass + * 2: Bore height + * 3: air friction + * 4: muzzle velocity + * 5: temperature + * 6: barometric pressure + * 7: relative humidity + * 8: simulation steps + * 9: wind speed + * 10: wind direction + * 11: inclination angle + * 12: target speed + * 13: target range + * 14: ballistic coefficient + * 15: drag model + * 16: atmosphere model + * 17: Store range card data? + * 18: Stability factor + * 19: Twist Direction + * 20: Latitude + * 21: Direction of Fire + * 22: Range Card Slot + * 23: Use advanced ballistics config? + * + * Return Value: + * 0: Elevation (MOA) + * 1: Windage (MOA) + * 2: Lead (MOA) + * 3: Time of fligth (SECONDS) + * 4: Remaining velocity (m/s) + * 5: Remaining kinetic energy (ft·lb) + * 6: Vertical coriolis drift (MOA) + * 7: Horizontal coriolis drift (MOA) + * 8: Spin drift (MOA) + * + * Example: + * call ace_rangecard_fnc_calculateSolution + * + * Public: No + */ +#include "script_component.hpp" +params [ + "_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", + "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed", + "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_bc", "_dragModel", + "_atmosphereModel", "_storeRangeCardData", "_stabilityFactor", "_twistDirection", "_latitude", + "_directionOfFire", "_rangeCardSlot", "_useABConfig" +]; +_windSpeed params ["_windSpeed1", "_windSpeed2"]; + +if (_storeRangeCardData) then { + GVAR(rangeCardDataMVs) set [_rangeCardSlot, format[" %1", round(_muzzleVelocity)]]; +}; + +private ["_bulletPos", "_bulletVelocity", "_bulletAccel", "_bulletSpeed", "_gravity", "_deltaT", "_speedOfSound"]; +_bulletPos = [0, 0, 0]; +_bulletVelocity = [0, 0, 0]; +_bulletAccel = [0, 0, 0]; +_bulletSpeed = 0; +_gravity = [0, sin(_scopeBaseAngle + _inclinationAngle) * -9.80665, cos(_scopeBaseAngle + _inclinationAngle) * -9.80665]; +_deltaT = 1 / _simSteps; +_speedOfSound = 0; +if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { + _speedOfSound = _temperature call EFUNC(weather,calculateSpeedOfSound); +}; + +private ["_elevation", "_windage1", "_windage2", "_lead", "_TOF", "_trueVelocity", "_trueSpeed", "_kineticEnergy", "_verticalCoriolis", "_verticalDeflection", "_horizontalCoriolis", "_horizontalDeflection", "_spinDrift", "_spinDeflection"]; +_elevation = 0; +_windage1 = 0; +_windage2 = 0; +_lead = 0; +_TOF = 0; +_trueVelocity = [0, 0, 0]; +_trueSpeed = 0; +_verticalCoriolis = 0; +_verticalDeflection = 0; +_horizontalCoriolis = 0; +_horizontalDeflection = 0; +_spinDrift = 0; +_spinDeflection = 0; + +private ["_n", "_range"]; +_n = 0; +_range = 0; + +private ["_wind1", "_wind2", "_windDrift"]; +_wind1 = [cos(270 - _windDirection * 30) * _windSpeed1, sin(270 - _windDirection * 30) * _windSpeed1, 0]; +_wind2 = [cos(270 - _windDirection * 30) * _windSpeed2, sin(270 - _windDirection * 30) * _windSpeed2, 0]; +_windDrift = 0; +if (_useABConfig) then { + _bc = [_bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel] call EFUNC(advanced_ballistics,calculateAtmosphericCorrection); +}; + +private ["_airFrictionCoef", "_airDensity"]; +_airFrictionCoef = 1; +if (!_useABConfig && (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) then { + _airDensity = [_temperature, _barometricPressure, _relativeHumidity] call EFUNC(weather,calculateAirDensity); + _airFrictionCoef = _airDensity / 1.22498; +}; + +private ["_speedTotal", "_stepsTotal", "_speedAverage"]; +_speedTotal = 0; +_stepsTotal = 0; +_speedAverage = 0; + +_bulletPos set [0, 0]; +_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]; + +while {_TOF < 6 && (_bulletPos select 1) < _targetRange} do { + _bulletSpeed = vectorMagnitude _bulletVelocity; + + _speedTotal = _speedTotal + _bulletSpeed; + _stepsTotal = _stepsTotal + 1; + _speedAverage = (_speedTotal / _stepsTotal); + + if (_speedAverage > 450 && _bulletSpeed < _speedOfSound) exitWith {}; + if (atan((_bulletPos select 2) / (abs(_bulletPos select 1) + 1)) < -2.254) exitWith {}; + + _trueVelocity = _bulletVelocity vectorDiff _wind1; + _trueSpeed = vectorMagnitude _trueVelocity; + + if (_useABConfig) then { + private _drag = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,extensionAvailable), false]) then { + parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _trueSpeed])) + } else { + ([_dragModel, _bc, _trueSpeed] call EFUNC(advanced_ballistics,calculateRetardation)) + }; + _bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (-1 * _drag); + } else { + _bulletAccel = _trueVelocity vectorMultiply (_trueSpeed * _airFriction * _airFrictionCoef); + }; + + _bulletAccel = _bulletAccel vectorAdd _gravity; + + _bulletVelocity = _bulletVelocity vectorAdd (_bulletAccel vectorMultiply _deltaT); + _bulletPos = _bulletPos vectorAdd (_bulletVelocity vectorMultiply _deltaT); + + _TOF = _TOF + _deltaT; + + if (_storeRangeCardData) then { + _range = GVAR(rangeCardStartRange) + _n * GVAR(rangeCardIncrement); + if ((_bulletPos select 1) >= _range && _range <= GVAR(rangeCardEndRange)) then { + if ((_bulletPos select 1) > 0) then { + _elevation = - atan((_bulletPos select 2) / (_bulletPos select 1)); + _windage1 = - atan((_bulletPos select 0) / (_bulletPos select 1)); + }; + if (_range != 0) then { + _lead = (_targetSpeed * _TOF) / (Tan(3.38 / 60) * _range); + }; + private ["_elevationString", "_windageString", "_leadString"]; + _elevationString = Str(round(-_elevation * 60 / 3.38 * 10) / 10); + if (_elevationString == "0") then { + _elevationString = "-0.0"; + }; + if (_elevationString find "." == -1) then { + _elevationString = _elevationString + ".0"; + }; + _windageString = Str(round(_windage1 * 60 / 3.38 * 10) / 10); + if (_windageString find "." == -1) then { + _windageString = _windageString + ".0"; + }; + _leadString = Str(round(_lead * 10) / 10); + if (_leadString find "." == -1) then { + _leadString = _leadString + ".0"; + }; + (GVAR(rangeCardDataElevation) select _rangeCardSlot) set [_n, _elevationString]; + (GVAR(rangeCardDataWindage) select _rangeCardSlot) set [_n, _windageString]; + (GVAR(rangeCardDataLead) select _rangeCardSlot) set [_n, _leadString]; + _n = _n + 1; + }; + }; +}; + +if ((_bulletPos select 1) > 0) then { + _elevation = - atan((_bulletPos select 2) / (_bulletPos select 1)); + _windage1 = - atan((_bulletPos select 0) / (_bulletPos select 1)); + _windDrift = (_wind2 select 0) * (_TOF - _targetRange / _muzzleVelocity); + _windage2 = - atan(_windDrift / (_bulletPos select 1)); +}; + +if (_targetRange != 0) then { + _lead = (_targetSpeed * _TOF) / (Tan(3.38 / 60) * _targetRange); +}; + +_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); +_kineticEnergy = _kineticEnergy * 0.737562149; + +[_elevation * 60, [_windage1 * 60, _windage2 * 60], _lead, _TOF, _bulletSpeed, _kineticEnergy, _verticalCoriolis * 60, _horizontalCoriolis * 60, _spinDrift * 60] diff --git a/addons/rangecard/functions/fnc_canCopy.sqf b/addons/rangecard/functions/fnc_canCopy.sqf index 8984192669..c9e0a05d0e 100644 --- a/addons/rangecard/functions/fnc_canCopy.sqf +++ b/addons/rangecard/functions/fnc_canCopy.sqf @@ -6,10 +6,10 @@ * unit * * Return Value: - * canShow + * canShow (bool) * * Example: - * [bob] call ace_rangecard_fnc_canCopy + * [] call ace_rangecard_fnc_canCopy * * Public: No */ diff --git a/addons/rangecard/functions/fnc_canShow.sqf b/addons/rangecard/functions/fnc_canShow.sqf index d81bba9485..330788ee7c 100644 --- a/addons/rangecard/functions/fnc_canShow.sqf +++ b/addons/rangecard/functions/fnc_canShow.sqf @@ -6,7 +6,7 @@ * Nothing * * Return Value: - * canShow + * canShow (bool) * * Example: * [] call ace_rangecard_fnc_canShow diff --git a/addons/rangecard/functions/fnc_canShowCopy.sqf b/addons/rangecard/functions/fnc_canShowCopy.sqf index b6e2d8d68d..e78c64cc89 100644 --- a/addons/rangecard/functions/fnc_canShowCopy.sqf +++ b/addons/rangecard/functions/fnc_canShowCopy.sqf @@ -6,7 +6,7 @@ * Nothing * * Return Value: - * canShow + * canShow (bool) * * Example: * [] call ace_rangecard_fnc_canShowCopy diff --git a/addons/rangecard/functions/fnc_onCloseDialog.sqf b/addons/rangecard/functions/fnc_onCloseDialog.sqf index 68d12c8c84..f5d971f22f 100644 --- a/addons/rangecard/functions/fnc_onCloseDialog.sqf +++ b/addons/rangecard/functions/fnc_onCloseDialog.sqf @@ -1,19 +1,3 @@ -/* - * Author: joko // Jonas - * Add the Reserve Parachute to Units or Save Backpack if is a Parachute in Unit - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * None - * - * Public: No - */ - #include "script_component.hpp" uiNamespace setVariable ['RangleCard_Display', nil]; diff --git a/addons/rangecard/functions/fnc_openRangeCard.sqf b/addons/rangecard/functions/fnc_openRangeCard.sqf index 5801b594be..ea085ed5b1 100644 --- a/addons/rangecard/functions/fnc_openRangeCard.sqf +++ b/addons/rangecard/functions/fnc_openRangeCard.sqf @@ -6,10 +6,10 @@ * Open copy? * * Return Value: - * None + * Nothing * * Example: - * [true] call ace_rangecard_fnc_openRangeCard + * call ace_rangecard_fnc_openRangeCard * * Public: No */ @@ -23,7 +23,7 @@ if (_this) then { createDialog "ACE_RangeCard_Dialog"; - [GVAR(zeroRangeCopy), GVAR(boreHeightCopy), GVAR(ammoClassCopy), GVAR(magazineClassCopy), GVAR(weaponClassCopy)] call FUNC(updateRangeCard); + [GVAR(ammoClassCopy), GVAR(magazineClassCopy), GVAR(weaponClassCopy)] call FUNC(updateRangeCard); }; } else { if (ACE_player call FUNC(updateClassNames)) then { @@ -31,6 +31,6 @@ if (_this) then { createDialog "ACE_RangeCard_Dialog"; - [GVAR(zeroRange), GVAR(boreHeight), GVAR(ammoClass), GVAR(magazineClass), GVAR(weaponClass)] call FUNC(updateRangeCard); + [GVAR(ammoClass), GVAR(magazineClass), GVAR(weaponClass)] call FUNC(updateRangeCard); }; }; diff --git a/addons/rangecard/functions/fnc_updateClassNames.sqf b/addons/rangecard/functions/fnc_updateClassNames.sqf index 12f9c5c2e8..70cf25825e 100644 --- a/addons/rangecard/functions/fnc_updateClassNames.sqf +++ b/addons/rangecard/functions/fnc_updateClassNames.sqf @@ -37,14 +37,10 @@ if (_weaponClass == "") exitWith { (GVAR(ammoClass) != "" && GVAR(magazineClass) if (_ammoClass == "") exitWith { (GVAR(ammoClass) != "" && GVAR(magazineClass) != "" && GVAR(weaponClass) != "") }; if (_unit == ACE_player) then { - GVAR(zeroRange) = [_unit] call EFUNC(scopes,getCurrentZeroRange); - GVAR(boreHeight) = [_unit, 0] call EFUNC(scopes,getBoreHeight); GVAR(ammoClass) = _ammoClass; GVAR(magazineClass) = _magazineClass; GVAR(weaponClass) = _weaponClass; } else { - GVAR(zeroRangeCopy) = [_unit] call EFUNC(scopes,getCurrentZeroRange); - GVAR(boreHeightCopy) = [_unit, 0] call EFUNC(scopes,getBoreHeight); GVAR(ammoClassCopy) = _ammoClass; GVAR(magazineClassCopy) = _magazineClass; GVAR(weaponClassCopy) = _weaponClass; diff --git a/addons/rangecard/functions/fnc_updateRangeCard.sqf b/addons/rangecard/functions/fnc_updateRangeCard.sqf index 3328600dc3..a7b0b996e2 100644 --- a/addons/rangecard/functions/fnc_updateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_updateRangeCard.sqf @@ -3,17 +3,15 @@ * Updates the range card data * * Arguments: - * 0: zero range - * 1: bore height - * 2: ammo class - * 3: magazine class - * 4: weapon class + * 0: ammo class + * 1: magazine class + * 2: weapon class * * Return Value: - * None + * Nothing * * Example: - * [1, 2, "ammo", "magazine", "weapon"] call ace_rangecard_fnc_openRangeCard + * [mode] call ace_rangecard_fnc_openRangeCard * * Public: No */ @@ -22,9 +20,10 @@ disableSerialization; #define __dsp (uiNamespace getVariable "RangleCard_Display") -private ["_airFriction", "_ammoConfig", "_atmosphereModel", "_transonicStabilityCoef", "_barrelLength", "_barrelTwist", "_bc", "_cacheEntry", "_column", "_control", "_dragModel", "_i", "_muzzleVelocity", "_offset", "_row", "_weaponConfig", "_initSpeed", "_initSpeedCoef"]; +private ["_airFriction", "_ammoConfig", "_atmosphereModel", "_barometricPressure", "_barrelLength", "_barrelTwist", "_bc", "_bulletMass", "_boreHeight", "_cacheEntry", "_column", "_control", "_dragModel", "_i", "_muzzleVelocity", "_mv", "_mvShift", "_offset", "_relativeHumidity", "_result", "_row", "_scopeBaseAngle", "_weaponConfig", "_zeroRange", "_initSpeed", "_initSpeedCoef", "_useABConfig"]; +_useABConfig = (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]); -params ["_zeroRange", "_boreHeight", "_ammoClass", "_magazineClass", "_weaponClass"]; +PARAMS_3(_ammoClass,_magazineClass,_weaponClass); if (_ammoClass == "" || _magazineClass == "" || _weaponClass == "") exitWith {}; @@ -104,11 +103,12 @@ _bc = 0; if (count (_ammoConfig select 6) > 0) then { _bc = (_ammoConfig select 6) select 0; }; -_transonicStabilityCoef = _ammoConfig select 4; _dragModel = _ammoConfig select 5; _atmosphereModel = _ammoConfig select 8; +_bulletMass = 5; +_boreHeight = 3.81; +_zeroRange = 100; -private _useABConfig = (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]); if (_bc == 0) then { _useABConfig = false; }; @@ -147,34 +147,33 @@ if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) t lnbAddRow [770300, ["-15°C", " 10°C", " 35°C", "-15°C", " 10°C", " 35°C"]]; }; -ctrlSetText [77003, format["%1m ZERO", round(_zeroRange)]]; +_barometricPressure = 1013.25; +if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { + _barometricPressure = 1013.25 * (1 - (0.0065 * EGVAR(common,mapAltitude)) / 288.15) ^ 5.255754495; +}; +_relativeHumidity = 0.5; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - ctrlSetText [770001, format["Drop Tables for B.P.: %1mb; Corrected for MVV at Air/Ammo Temperatures -15-35 °C", round(EGVAR(scopes,zeroReferenceBarometricPressure) * 100) / 100]]; - ctrlSetText [77004 , format["B.P.: %1mb", round(EGVAR(scopes,zeroReferenceBarometricPressure) * 100) / 100]]; + ctrlSetText [770001, format["Drop Tables for B.P.: %1mb; Corrected for MVV at Air/Ammo Temperatures -15-35 °C", round(_barometricPressure * 100) / 100]]; + ctrlSetText [77004 , format["B.P.: %1mb", round(_barometricPressure * 100) / 100]]; } else { ctrlSetText [770001, ""]; ctrlSetText [77004 , ""]; }; -_cacheEntry = missionNamespace getVariable format[QGVAR(%1_%2_%3_%4_%5), _zeroRange, _boreHeight, _ammoClass, _weaponClass, missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]]; +_cacheEntry = missionNamespace getVariable format[QGVAR(%1_%2_%3), _ammoClass, _weaponClass, missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]]; if (isNil {_cacheEntry}) then { - private _scopeBaseAngle = if (!_useABConfig) then { - private _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngleVanilla:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight]; - (parseNumber _zeroAngle) - } else { - private _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngle:%1:%2:%3:%4:%5:%6:%7:%8:%9", _zeroRange, _muzzleVelocity, _boreHeight, EGVAR(scopes,zeroReferenceTemperature), EGVAR(scopes,zeroReferenceBarometricPressure), EGVAR(scopes,zeroReferenceHumidity), _bc, _dragModel, _atmosphereModel]; - (parseNumber _zeroAngle) - }; - if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false] && missionNamespace getVariable [QEGVAR(advanced_ballistics,ammoTemperatureEnabled), false]) then { + _result = [0, 0, _boreHeight, _airFriction, _muzzleVelocity, 15, 1013.25, 0.5, 1000, [0, 0], 0, 0, 0, _zeroRange, _bc, _dragModel, _atmosphereModel, false, 1.5, 0, 0, 0, 0, _useABConfig] call FUNC(calculateSolution); + _scopeBaseAngle = (_result select 0) / 60; + if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { { - private _mvShift = [_ammoConfig select 9, _x] call EFUNC(advanced_ballistics,calculateAmmoTemperatureVelocityShift); - private _mv = _muzzleVelocity + _mvShift; + _mvShift = [_ammoConfig select 9, _x] call EFUNC(advanced_ballistics,calculateAmmoTemperatureVelocityShift); + _mv = _muzzleVelocity + _mvShift; - [_scopeBaseAngle,_boreHeight,_airFriction,_mv,_x,EGVAR(scopes,zeroReferenceBarometricPressure),EGVAR(scopes,zeroReferenceHumidity),100,4,1,GVAR(rangeCardEndRange),_bc,_dragModel,_atmosphereModel,_transonicStabilityCoef,_forEachIndex,_useABConfig] call FUNC(calculateRangeCard); + [_scopeBaseAngle,_bulletMass,_boreHeight,_airFriction,_mv,_x,_barometricPressure,_relativeHumidity,1000,[4,0],3,0,1,GVAR(rangeCardEndRange),_bc,_dragModel,_atmosphereModel,true,1.5,1,46,23,_forEachIndex,_useABConfig] call FUNC(calculateSolution); } forEach [-15, -5, 5, 10, 15, 20, 25, 30, 35]; } else { - [_scopeBaseAngle,_boreHeight,_airFriction,_muzzleVelocity,15,EGVAR(scopes,zeroReferenceBarometricPressure),EGVAR(scopes,zeroReferenceHumidity),100,4,1,GVAR(rangeCardEndRange),_bc,_dragModel,_atmosphereModel,_transonicStabilityCoef,3,_useABConfig] call FUNC(calculateRangeCard); + [_scopeBaseAngle,_bulletMass,_boreHeight,_airFriction,_muzzleVelocity,15,_barometricPressure,_relativeHumidity,1000,[4,0],3,0,1,GVAR(rangeCardEndRange),_bc,_dragModel,_atmosphereModel,true,1.5,1,46,23,3,_useABConfig] call FUNC(calculateSolution); }; for "_i" from 0 to 9 do { @@ -192,7 +191,7 @@ if (isNil {_cacheEntry}) then { }; }; - missionNamespace setVariable [format[QGVAR(%1_%2_%3_%4_%5), _zeroRange, _boreHeight, _ammoClass, _weaponClass, missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]], [GVAR(rangeCardDataElevation), GVAR(rangeCardDataWindage), GVAR(rangeCardDataLead), GVAR(rangeCardDataMVs), GVAR(lastValidRow)]]; + missionNamespace setVariable [format[QGVAR(%1_%2_%3), _ammoClass, _weaponClass, missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]], [GVAR(rangeCardDataElevation), GVAR(rangeCardDataWindage), GVAR(rangeCardDataLead), GVAR(rangeCardDataMVs), GVAR(lastValidRow)]]; } else { GVAR(rangeCardDataElevation) = _cacheEntry select 0; GVAR(rangeCardDataWindage) = _cacheEntry select 1; @@ -243,7 +242,7 @@ for "_column" from 0 to 8 do { if (_useABConfig) then { ctrlSetText [770020, "For best results keep ammunition at ambient air temperature. Tables calculated for the above listed barrel"]; - ctrlSetText [770021, format["and load with optic mounted %1'' above line of bore.", round((_boreHeight / 2.54) * 10) / 10]]; + ctrlSetText [770021, "and load with optic mounted 1.5'' above line of bore."]; } else { ctrlSetText [770020, ""]; ctrlSetText [770021, ""]; diff --git a/addons/rangecard/script_component.hpp b/addons/rangecard/script_component.hpp index a83f40931f..95344973fe 100644 --- a/addons/rangecard/script_component.hpp +++ b/addons/rangecard/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_RANGECARD diff --git a/addons/rangecard/stringtable.xml b/addons/rangecard/stringtable.xml index 5862981e16..e97a31195e 100644 --- a/addons/rangecard/stringtable.xml +++ b/addons/rangecard/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Távolsági kártya Таблица поправок Tavola Balistica - 射表 - 사거리표 - 弹道射表 - 彈道射表 50 METER increments -- MRAD/MRAD (reticle/turrets) @@ -28,10 +24,6 @@ 50 MÉTERES lépések - MRAD/MRAD (célzó/lövegek) Шаг 50 МЕТРОВ - MRAD/MRAD (сетка/маховички) Incrementi per 50 METRI - MRAD/MRAD (reticolo/torrette) - 50 メートル増やす -- MRAD/MRAD (照準線/砲塔) - 50 미터 늘리기 -- MRAD/MRAD (조준선/포탑) - 50公尺增量 -- 毫弧度/毫弧度 (瞄镜分划线/调整纽) - 50公尺增量 -- 毫弧度/毫弧度 (瞄鏡分劃線/調整紐) Open Range Card @@ -44,10 +36,6 @@ Távolsági kártya kinyitása Открыть таблицу поправок Apri Tavola Balistica - 射表を開く - 사거리표 열기 - 开启弹道射表 - 開啟彈道射表 Open Range Card Copy @@ -60,10 +48,6 @@ Távolsági kártya-másolat kinyitása Открыть копию таблицы поправок Apri Copia Tavola Balistica - 複製された射表を開く - 복제 사거리표 열기 - 开启弹道射表副本 - 開啟彈道射表副本 Open Range Card @@ -76,10 +60,6 @@ Távolsági kártya kinyitása Открыть таблицу поправок Apri Tavola Balistica - 射表を開く - 사거리표 열기 - 开启弹道射表 - 開啟彈道射表 Open Range Card Copy @@ -92,10 +72,6 @@ Távolsági kártya-másolat kinyitása Открыть копию таблицы поправок Apri Copia Tavola Balistica - 複製された射表を開く - 복제 사거리표 열기 - 开启弹道射表副本 - 開啟彈道射表副本 Copy Range Card @@ -108,10 +84,6 @@ Távolsági kártya másolása Скопировать таблицу поправок Copia Tavola Balistica - 射表を複製する - 사거리표 복제 - 复制弹道射表 - 複製彈道射表 - + \ No newline at end of file diff --git a/addons/realisticnames/CfgMagazines.hpp b/addons/realisticnames/CfgMagazines.hpp index d32ee3ec2c..a6a64a4a15 100644 --- a/addons/realisticnames/CfgMagazines.hpp +++ b/addons/realisticnames/CfgMagazines.hpp @@ -417,65 +417,4 @@ class CfgMagazines { class SmokeShellYellow: SmokeShell { displayName = CSTRING(SmokeShellYellow_Name); }; - - - // 1.70 Pylon Magazines (Should Match Weapon Name) - class 2Rnd_Missile_AA_04_F; - class PylonRack_1Rnd_Missile_AA_04_F: 2Rnd_Missile_AA_04_F { - displayName = "AIM-9 Sidewinder"; // [vanilla: Falchion-22 - Missile_AA_04_Plane_CAS_01_F] - }; - class 4Rnd_AAA_missiles; - class PylonRack_1Rnd_AAA_missiles: 4Rnd_AAA_missiles { - displayName = "AIM-132 ASRAAM"; // [vanilla: ASRAAM - missiles_ASRAAM] - }; - class 4Rnd_GAA_missiles; - class PylonRack_1Rnd_GAA_missiles: 4Rnd_GAA_missiles { - displayName = "AIM-120A AMRAAM"; // [vanilla: Zephyr - missiles_Zephyr] - }; - class 6Rnd_Missile_AGM_02_F; - class PylonRack_1Rnd_Missile_AGM_02_F: 6Rnd_Missile_AGM_02_F { - displayName = "AGM-65 Maverick"; // [vanilla: Macer - Missile_AGM_02_Plane_CAS_01_F] - }; - class PylonRack_3Rnd_Missile_AGM_02_F: PylonRack_1Rnd_Missile_AGM_02_F { - displayName = "AGM-65 Maverick 3x"; // [vanilla: Macer 3x - Missile_AGM_02_Plane_CAS_01_F] - }; - class 2Rnd_LG_scalpel; - class PylonRack_1Rnd_LG_scalpel: 2Rnd_LG_scalpel { - displayName = "9K121 Vikhr"; // [vanilla: Scalpel - missiles_SCALPEL] - }; - class PylonRack_3Rnd_LG_scalpel: PylonRack_1Rnd_LG_scalpel { - displayName = "9K121 Vikhr 3x"; // [vanilla: Scalpel 3x - missiles_SCALPEL] - }; - class PylonRack_4Rnd_LG_scalpel: PylonRack_1Rnd_LG_scalpel { - displayName = "9K121 Vikhr 4x"; // [vanilla: Scalpel 4x - missiles_SCALPEL] - }; - class PylonRack_7Rnd_Rocket_04_HE_F: 7Rnd_Rocket_04_HE_F { - displayName = "Hydra 70 7x HE"; // [vanilla: Shrieker 7x HE - Rocket_04_HE_Plane_CAS_01_F] - }; - class PylonRack_7Rnd_Rocket_04_AP_F: 7Rnd_Rocket_04_AP_F { - displayName = "Hydra 70 7x AP"; // [vanilla: Shrieker 7x AP - Rocket_04_AP_Plane_CAS_01_F] - }; - class 12Rnd_missiles; - class PylonRack_12Rnd_missiles: 12Rnd_missiles { - displayName = "Hydra 70"; // [vanilla: DAR - missiles_DAR] - }; - class PylonRack_20Rnd_Rocket_03_HE_F: 20Rnd_Rocket_03_HE_F { - displayName = "S-8 20x HE"; // [vanilla: Tratnyr 20x HE - Rocket_03_HE_Plane_CAS_02_F] - }; - class PylonRack_20Rnd_Rocket_03_AP_F: 20Rnd_Rocket_03_AP_F { - displayName = "S-8 20x AP"; // [vanilla: Tratnyr 20x AP - Rocket_03_AP_Plane_CAS_02_F] - }; - class 2Rnd_Missile_AA_03_F; - class PylonRack_1Rnd_Missile_AA_03_F: 2Rnd_Missile_AA_03_F { - displayName = "Wympel R-73"; // [vanilla: Sahr-3 - Missile_AA_03_Plane_CAS_02_F] - }; - class 4Rnd_Missile_AGM_01_F; - class PylonRack_1Rnd_Missile_AGM_01_F: 4Rnd_Missile_AGM_01_F { - displayName = "Kh-25MTP"; // [vanilla: Sharur - Missile_AGM_01_Plane_CAS_02_F] - }; - class 2Rnd_Bomb_03_F; - class PylonMissile_1Rnd_Bomb_03_F: 2Rnd_Bomb_03_F { - displayName = "FAB-250M-54"; // [vanilla: LOM-250G - Bomb_03_Plane_CAS_02_F] - }; - }; diff --git a/addons/realisticnames/CfgVehicles.hpp b/addons/realisticnames/CfgVehicles.hpp index 3d217164e5..f53465b08f 100644 --- a/addons/realisticnames/CfgVehicles.hpp +++ b/addons/realisticnames/CfgVehicles.hpp @@ -251,18 +251,6 @@ class CfgVehicles { class I_Truck_02_medical_F: Truck_02_medical_base_F { displayName = CSTRING(Truck_02_medical_Name); }; - class C_Truck_02_transport_F: Truck_02_transport_base_F { - displayName = CSTRING(Truck_02_transport_Name); - }; - class C_Truck_02_covered_F: Truck_02_base_F { - displayName = CSTRING(Truck_02_covered_Name); - }; - class C_Truck_02_fuel_F: Truck_02_fuel_base_F { - displayName = CSTRING(Truck_02_fuel_Name); - }; - class C_Truck_02_box_F: Truck_02_box_base_F { - displayName = CSTRING(Truck_02_box_Name); - }; class Truck_03_base_F; class O_Truck_03_transport_F: Truck_03_base_F { @@ -293,27 +281,18 @@ class CfgVehicles { displayName = CSTRING(Heli_Attack_01_Name); }; - class Heli_Attack_01_dynamicLoadout_base_F; - class B_Heli_Attack_01_dynamicLoadout_F: Heli_Attack_01_dynamicLoadout_base_F { - displayName = CSTRING(Heli_Attack_01_Name); - }; - class Heli_Light_01_unarmed_base_F; class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F { displayName = CSTRING(Heli_Light_01_Name); }; - class Heli_Light_01_civil_base_F: Heli_Light_01_unarmed_base_F { - displayName = CSTRING(Heli_Light_01_civil_Name); - }; class Heli_Light_01_armed_base_F; class B_Heli_Light_01_armed_F: Heli_Light_01_armed_base_F { displayName = CSTRING(Heli_Light_01_armed_Name); }; - class Heli_Light_01_dynamicLoadout_base_F; - class B_Heli_Light_01_dynamicLoadout_F: Heli_Light_01_dynamicLoadout_base_F { - displayName = CSTRING(Heli_Light_01_armed_Name); + class Heli_Light_01_civil_base_F: Heli_Light_01_unarmed_base_F { + displayName = CSTRING(Heli_Light_01_civil_Name); }; class Heli_Transport_03_base_F; @@ -337,11 +316,6 @@ class CfgVehicles { displayName = CSTRING(Heli_Light_02_unarmed_Name); }; - class Heli_Light_02_dynamicLoadout_base_F; - class O_Heli_Light_02_dynamicLoadout_F: Heli_Light_02_dynamicLoadout_base_F { - displayName = CSTRING(Heli_Light_02_Name); - }; - class Heli_light_03_base_F; class I_Heli_light_03_F: Heli_light_03_base_F { displayName = CSTRING(Heli_light_03_Name); @@ -352,11 +326,6 @@ class CfgVehicles { displayName = CSTRING(Heli_light_03_unarmed_Name); }; - class Heli_light_03_dynamicLoadout_base_F; - class I_Heli_light_03_dynamicLoadout_F: Heli_light_03_dynamicLoadout_base_F { - displayName = CSTRING(Heli_light_03_Name); - }; - class Heli_Transport_02_base_F; class I_Heli_Transport_02_F: Heli_Transport_02_base_F { displayName = CSTRING(Heli_Transport_02_Name); @@ -368,21 +337,11 @@ class CfgVehicles { displayName = CSTRING(Plane_CAS_01_Name); }; - class Plane_CAS_01_dynamicLoadout_base_F; - class B_Plane_CAS_01_dynamicLoadout_F: Plane_CAS_01_dynamicLoadout_base_F { - displayName = CSTRING(Plane_CAS_01_Name); - }; - class Plane_CAS_02_base_F; class O_Plane_CAS_02_F: Plane_CAS_02_base_F { displayName = CSTRING(Plane_CAS_02_Name); }; - class Plane_CAS_02_dynamicLoadout_base_F; - class O_Plane_CAS_02_dynamicLoadout_F: Plane_CAS_02_dynamicLoadout_base_F { - displayName = CSTRING(Plane_CAS_02_Name); - }; - class Plane_Fighter_03_base_F; class I_Plane_Fighter_03_CAS_F: Plane_Fighter_03_base_F { displayName = CSTRING(Plane_Fighter_03_CAS_Name); @@ -392,11 +351,6 @@ class CfgVehicles { displayName = CSTRING(Plane_Fighter_03_AA_Name); }; - class Plane_Fighter_03_dynamicLoadout_base_F; - class I_Plane_Fighter_03_dynamicLoadout_F: Plane_Fighter_03_dynamicLoadout_base_F { - displayName = CSTRING(Plane_Fighter_03_Name); - }; - // uavs class UAV_02_base_F; class B_UAV_02_F: UAV_02_base_F { @@ -409,7 +363,7 @@ class CfgVehicles { displayName = CSTRING(UAV_02_Name); }; - class UAV_02_CAS_base_F; + class UAV_02_CAS_base_F: UAV_02_base_F {}; class B_UAV_02_CAS_F: UAV_02_CAS_base_F { displayName = CSTRING(UAV_02_CAS_Name); }; @@ -420,17 +374,6 @@ class CfgVehicles { displayName = CSTRING(UAV_02_CAS_Name); }; - class UAV_02_dynamicLoadout_base_F; - class B_UAV_02_dynamicLoadout_F: UAV_02_dynamicLoadout_base_F { - displayName = CSTRING(UAV_02_Name); - }; - class O_UAV_02_dynamicLoadout_F: UAV_02_dynamicLoadout_base_F { - displayName = CSTRING(UAV_02_Name); - }; - class I_UAV_02_dynamicLoadout_F: UAV_02_dynamicLoadout_base_F { - displayName = CSTRING(UAV_02_Name); - }; - // pistols class Pistol_Base_F; class Weapon_hgun_P07_F: Pistol_Base_F { @@ -570,11 +513,11 @@ class CfgVehicles { class Weapon_SMG_02_F: Weapon_Base_F { displayName = CSTRING(SMG_02_Name); }; - + class Weapon_SMG_05_F: Weapon_Base_F { displayName = CSTRING(SMG_05); }; - + class Weapon_hgun_PDW2000_F: Weapon_Base_F { displayName = CSTRING(hgun_PDW2000_Name); }; diff --git a/addons/realisticnames/CfgWeapons.hpp b/addons/realisticnames/CfgWeapons.hpp index 6aa3c7c3c8..2654dc0df7 100644 --- a/addons/realisticnames/CfgWeapons.hpp +++ b/addons/realisticnames/CfgWeapons.hpp @@ -319,7 +319,7 @@ class CfgWeapons { }; }; - class gatling_30mm_base: CannonCore { // This is a fictional version of the GSh-6-30, with 3 barrels + class gatling_30mm: CannonCore { // This is a fictional veresion of the GSh-6-30, with 3 barrels displayName = "GSh-3-30"; class LowROF: Mode_FullAuto { displayName = "GSh-3-30"; @@ -586,33 +586,14 @@ class CfgWeapons { class arifle_CTAR_blk_F: arifle_CTAR_base_F { displayName = CSTRING(arifle_CTAR_blk); }; - class arifle_CTAR_ghex_F: arifle_CTAR_base_F { - displayName = CSTRING(arifle_CTAR_ghex); - }; - class arifle_CTAR_hex_F: arifle_CTAR_base_F { - displayName = CSTRING(arifle_CTAR_hex); - }; class arifle_CTAR_GL_base_F; class arifle_CTAR_GL_blk_F: arifle_CTAR_GL_base_F { displayName = CSTRING(arifle_CTAR_GL_blk); }; - class arifle_CTAR_GL_ghex_F: arifle_CTAR_GL_base_F { - displayName = CSTRING(arifle_CTAR_GL_ghex); - }; - class arifle_CTAR_GL_hex_F: arifle_CTAR_GL_base_F { - displayName = CSTRING(arifle_CTAR_GL_hex); - }; - class arifle_CTARS_base_F; class arifle_CTARS_blk_F: arifle_CTARS_base_F { displayName = CSTRING(arifle_CTARS_blk); }; - class arifle_CTARS_ghex_F: arifle_CTARS_base_F { - displayName = CSTRING(arifle_CTARS_ghex); - }; - class arifle_CTARS_hex_F: arifle_CTARS_base_F { - displayName = CSTRING(arifle_CTARS_hex); - }; // QBU-88 class DMR_07_base_F; diff --git a/addons/realisticnames/dev_dumpPylon.sqf b/addons/realisticnames/dev_dumpPylon.sqf deleted file mode 100644 index df0d7ea4a5..0000000000 --- a/addons/realisticnames/dev_dumpPylon.sqf +++ /dev/null @@ -1,29 +0,0 @@ -// [] execVM "z\ace\addons\realisticnames\dev_dumpPylon.sqf"; - -private _justLog = true; - -diag_log text format ["[Dumping Pylons] --------------------"]; -private _magazines = configProperties [configFile >> "CfgMagazines", "isClass _x", true]; -{ - private _pylonWeapon = getText (_x >> "pylonWeapon"); - if (_pylonWeapon != "") then { - private _weaponConfig = configFile >> "CfgWeapons" >> _pylonWeapon; - private _weaponName = getText (_weaponConfig >> "displayName"); - private _inherit = (configProperties [_x, "configName _x == 'displayName'", false]) isEqualTo []; - private _pylonMagName = getText (_x >> "displayName"); - if (_justLog) then { - if (!_inherit) then { - diag_log text format ["%1: [%2 vs %3]", configName _x, _pylonMagName, _weaponName]; - } else { - diag_log text format [" - %1: [%2 vs %3]", configName _x, _pylonMagName, _weaponName]; - }; - } else { - if (!_inherit) then { - diag_log text format ['class %1;', configName inheritsFrom _x]; - diag_log text format ['class %1: %2 {', configName _x, configName inheritsFrom _x]; - diag_log text format ['displayName = "%1"; [vanilla: %2 - %3]', _weaponName, _pylonMagName, _pylonWeapon]; - diag_log text format ['};', configName _x, configName inheritsFrom _x, _weaponName, _pylonMagName]; - }; - }; - }; -} forEach _magazines; diff --git a/addons/realisticnames/script_component.hpp b/addons/realisticnames/script_component.hpp index e873ddee0c..dda1fc93c5 100644 --- a/addons/realisticnames/script_component.hpp +++ b/addons/realisticnames/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_REALISTICNAMES diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index 6ea746a671..8f8134e5a5 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ XM312 XM312 XM312A - XM312 - XM312 - XM312重機槍 - XM312重机枪 XM312A @@ -28,10 +24,6 @@ XM312A XM312A XM312A - XM312A - XM312A - XM312A重機槍 - XM312A重机枪 XM312 (High) @@ -44,10 +36,6 @@ XM312 (Alta) XM312 (Magasított) XM312 (Alta) - XM312 (高) - XM312 (높음) - XM312重機槍 (高射腳架) - XM312重机枪 (高射脚架) XM307 @@ -60,10 +48,6 @@ XM307 XM307 XM307 - XM307 - XM307 - XM307榴彈機槍 - XM307榴弹机枪 XM307A @@ -76,10 +60,6 @@ XM307A XM307A XM307A - XM307A - XM307A - XM307A榴彈機槍 - XM307A榴弹机枪 XM307 (High) @@ -92,10 +72,6 @@ XM307 (Alta) XM307 (Magasított) XM307 (Alta) - XM307 (高) - XM307 (높음) - XM307榴彈機槍 (高射腳架) - XM307榴弹机枪 (高射脚架) Mini-Spike Launcher (AT) @@ -108,10 +84,6 @@ Lança-mísseis Mini-Spike (AC) Mini-Spike rakétarendszer (Tankelhárító) Lanciatore Mini-Spike (AC) - ミニスパイク ランチャー (対戦) - Mini-Spike Launcher (대전차) - "迷你長釘"導彈發射器 (反坦克) - "迷你长钉"导弹发射器 (反坦克) Mini-Spike Launcher (AA) @@ -124,10 +96,6 @@ Lança-mísseis Mini-Spike (AA) Mini-Spike rakétarendszer (Repülő-elhárító) Lanciatore Mini-Spike (AA) - ミニスパイク ランチャー (対空) - Mini-Spike Launcher (대공) - "迷你長釘"導彈發射器 (防空) - "迷你长钉"导弹发射器 (防空) YABHON-R3 @@ -140,10 +108,6 @@ YABHON-R3 YABHON-R3 YABHON-R3 - YABHON-R3 - YABHON-R3 - "亞伯罕-R3型"空中無人載具 - "亚伯罕-R3型"空中无人载具 YABHON-R3 (CAS) @@ -156,10 +120,6 @@ YABHON-R3 (Légitámogató) YABHON-R3 (CAS) YABHON-R3 (CAS) - YABHON-R3 (対地) - YABHON-R3 (근접지원) - "亞伯罕-R3型"空中無人載具 (近空支援) - "亚伯罕-R3型"空中无人载具 (近空支援) M-ATV @@ -172,10 +132,6 @@ M-ATV M-ATV M-ATV - M-ATV - M-ATV - 防地雷反伏擊全地形車 - 防地雷反伏击全地形车 M-ATV (HMG) @@ -188,10 +144,6 @@ M-ATV (HMG) M-ATV (nehézgéppuska) M-ATV (HMG) - M-ATV (HMG) - M-ATV (HMG) - 防地雷反伏擊全地形車 (重機槍) - 防地雷反伏击全地形车 (重机枪) M-ATV (GMG) @@ -204,10 +156,6 @@ M-ATV (GMG) M-ATV (gránátgéppuska) M-ATV (GMG) - M-ATV (GMG) - M-ATV (GMG) - 防地雷反伏擊全地形車 (榴彈機槍) - 防地雷反伏击全地形车 (榴弹机枪) Merkava Mk IV M @@ -220,10 +168,6 @@ Merkava Mk IV M Merkava Mk IV M Merkava Mk IV M - メルカバ Mk IV M - Merkava Mk IV M - "梅卡瓦4代"主戰坦克 - "梅卡瓦4代"主战坦克 Merkava Mk IV LIC @@ -236,10 +180,6 @@ Merkava Mk IV LIC Merkava Mk IV LIC Merkava Mk IV LIC - メルカバ Mk IV LIC - Merkava Mk IV LIC - "梅卡瓦4代"主戰坦克 城市版 - "梅卡瓦4代"主战坦克 城市版 Sholef @@ -252,10 +192,6 @@ Sholef Sholef Sholef - ショルフ - Sholef - "神槍"自走炮 - "神枪"自走炮 Seara @@ -268,10 +204,6 @@ Seara Seara Seara - シアラ - Seara - "希拉"多管火箭車 - "希拉"多管火箭车 Namer @@ -284,10 +216,6 @@ Namer Namer Namer - ネイマー - Namer - "花豹"裝甲運兵車 - "花豹"装甲运兵车 Bardelas @@ -300,10 +228,6 @@ Bardelas Bardelas Bardelas - バーラデラス - Bardelas - "布萊德斯"防空車 - "布莱德斯"防空车 Badger IFV @@ -316,10 +240,6 @@ Badger IFV Badger IFV Badger IFV - バッジ IFV - Badger IFV - "蜜獾"步兵戰車 - "蜜獾"步兵战车 Nemmera @@ -332,10 +252,6 @@ Nemmera Nemmera Nemmera - ネマラ - Nemmera - "雌豹"戰鬥工程車 - "雌豹"战斗工程车 HEMTT Transport @@ -348,10 +264,6 @@ HEMTT Transporte HEMTT szállítójármű HEMTT da trasporto - HEMTT 輸送型 - HEMTT 수송 - 重型增程機動戰術卡車 (運輸) - 重型增程机动战术卡车 (运输) HEMTT Transport (covered) @@ -364,10 +276,6 @@ HEMTT Transporte (coberto) HEMTT szállítójármű (ponyvás) HEMTT da trasporto (coperto) - HEMTT 輸送型 (幌) - HEMTT 수송 (덮개) - 重型增程機動戰術卡車 (運輸, 棚布) - 重型增程机动战术卡车 (运输, 棚布) HEMTT @@ -380,10 +288,6 @@ HEMTT HEMTT HEMTT - HEMTT - HEMTT - 重型增程機動戰術卡車 - 重型增程机动战术卡车 HEMTT Container @@ -396,10 +300,6 @@ HEMTT Contêiner HEMTT (konténer) HEMTT portacontainer - HEMTT コンテナ型 - HEMTT 컨테이너 - 重型增程機動戰術卡車 (貨櫃) - 重型增程机动战术卡车 (货柜) HEMTT Medical @@ -412,10 +312,6 @@ HEMTT Médico HEMTT (egészségügyi) HEMTT Medico - HEMTT 救急車 - HEMTT 의료 - 重型增程機動戰術卡車 (醫療) - 重型增程机动战术卡车 (医疗) HEMTT Ammo @@ -428,10 +324,6 @@ HEMTT Munições HEMTT (lőszerszállító) HEMTT di rifornimento munizioni - HEMTT 弾薬給弾型 - HEMTT 탄약 - 重型增程機動戰術卡車 (彈藥) - 重型增程机动战术卡车 (弹药) HEMTT Fuel @@ -444,10 +336,6 @@ HEMTT Combustível HEMTT (üzemanyag-szállító) HEMTT di rifornimento carburante - HEMTT 燃料給油車 - HEMTT 연료 - 重型增程機動戰術卡車 (燃油) - 重型增程机动战术卡车 (燃油) HEMTT Repair @@ -460,10 +348,6 @@ HEMTT Reparador HEMTT (szerelő-jármű) HEMTT Riparatore - HEMTT 修理型 - HEMTT 수리 - 重型增程機動戰術卡車 (維修) - 重型增程机动战术卡车 (维修) Fennek @@ -476,10 +360,6 @@ Fennek Fennek Fennek - フェネック - Fennek - "非洲小狐"防地雷反伏擊車 - "非洲小狐"防地雷反伏击车 Fennek (HMG) @@ -492,10 +372,6 @@ Fennek (HMG) Fennek (nehézgéppuska) Fennek (HMG) - フェネック (HMG) - Fennek (HMG) - "非洲小狐"防地雷反伏擊車 (重機槍) - "非洲小狐"防地雷反伏击车 (重机枪) Fennek (GMG) @@ -508,10 +384,6 @@ Fennek (GMG) Fennek (gránátgéppuska) Fennek (GMG) - フェネック (GMG) - Fennek (GMG) - "非洲小狐"防地雷反伏擊車 (榴彈機槍) - "非洲小狐"防地雷反伏击车 (榴弹机枪) Leopard 2SG @@ -524,10 +396,6 @@ Leopard 2SG Leopard 2SG Leopard 2SG - レオパルド 2SG - Leopard 2SG - "豹2型新加坡版"主戰坦克 - "豹2型新加坡版"主战坦克 FV510 Warrior @@ -540,10 +408,6 @@ FV510 Warrior FV510 Warrior FV510 Warrior - FV510 ウォーリアー - FV510 Warrior - FV510"戰士"步兵戰車 - FV510"战士"步兵战车 Pandur II @@ -556,10 +420,6 @@ Pandur II Pandur II Pandur II - パンデュール II - Pandur II - "潘德2型"裝甲運兵車 - "潘德2型"装甲运兵车 KamAZ Transport @@ -572,10 +432,6 @@ KamAZ Transporte KamAZ szállítójármű KamAZ da trasporto - KamAZ 輸送型 - KamAZ 수송 - "卡瑪斯"卡車 (運輸) - "卡玛斯"卡车 (运输) KamAZ Transport (covered) @@ -588,10 +444,6 @@ KamAZ Transporte (coberto) KamAZ szállítójármű (ponyvás) KamAZ da trasporto (coperto) - KamAZ 輸送型 (幌) - KamAZ 수송 (덮개) - "卡瑪斯"卡車 (運輸, 棚布) - "卡玛斯"卡车 (运输, 棚布) KamAZ Ammo @@ -604,10 +456,6 @@ KamAZ Munições KamAZ (lőszerszállító) KamAZ di rifornimento munizioni - KamAZ 弾薬給弾型 - KamAZ 탄약 - "卡瑪斯"卡車 (彈藥) - "卡玛斯"卡车 (弹药) KamAZ Fuel @@ -620,10 +468,6 @@ KamAZ Combustível KamAZ (üzemanyag-szállító) KamAZ di rifornimento carburante - KamzAZ 燃料給油車 - KamAZ 연료 - "卡瑪斯"卡車 (燃油) - "卡玛斯"卡车 (燃油) KamAZ Repair @@ -636,10 +480,6 @@ KamAZ Reparador KamAZ (szerelő-jármű) KamAZ riparatore - KamzAZ 修理型 - KamAZ 수리 - "卡瑪斯"卡車 (維修) - "卡玛斯"卡车 (维修) KamAZ Medical @@ -652,10 +492,6 @@ KamAZ Médico KamAZ (egészségügyi) KamAZ Medico - KamAZ 救急車 - KamAZ 의료 - "卡瑪斯"卡車 (醫療) - "卡玛斯"卡车 (医疗) Punisher @@ -668,10 +504,6 @@ Punisher Punisher Punisher - パニッシャー - Punisher - "懲罰者"防地雷反伏擊車 - "惩罚者"防地雷反伏击车 Punisher (HMG) @@ -684,10 +516,6 @@ Punisher (HMG) Punisher (nehézgéppuska) Punisher (HMG) - パニッシャー (HMG) - Punisher (HMG) - "懲罰者"防地雷反伏擊車 (重機槍) - "惩罚者"防地雷反伏击车 (重机枪) Punisher (GMG) @@ -700,10 +528,6 @@ Punisher (GMG) Punisher (gránátgéppuska) Punisher (GMG) - パニッシャー (GMG) - Punisher (GMG) - "懲罰者"防地雷反伏擊車 (榴彈機槍) - "惩罚者"防地雷反伏击车 (榴弹机枪) T100 Black Eagle @@ -716,10 +540,6 @@ T100 Black Eagle T100 Fekete Sas T100 Black Eagle - T100 ブラック イーグル - T100 Black Eagle - T100"黑鷹"主戰坦克 - T100"黑鹰"主战坦克 2S9 Sochor @@ -732,10 +552,6 @@ 2S9 Sochor 2S9 Sochor 2S9 Sochor - 2S9 ソーカー - 2S9 Sochor - 2S9"薩克爾"自走砲 - 2S9"萨克尔"自走炮 BM-2T Stalker @@ -748,10 +564,6 @@ BM-2T Stalker BM-2T Stalker BM-2T Stalker - BM-2T ストーカー - BM-2T Stalker - BM-2T"潛行者"步兵戰車 - BM-2T"潜行者"步兵战车 ZSU-35 Tigris @@ -764,10 +576,6 @@ ZSU-35 Tigris ZSU-35 Tigris ZSU-35 Tigris - ZSU-35 - ZSU-35 Tigris - ZSU-35"虎式"防空車 - ZSU-35"虎式"防空车 Otokar ARMA @@ -780,10 +588,6 @@ Otokar ARMA Otokar ARMA Otokar ARMA - ティグリスOtokar アルマ - Otokar ARMA - "奧托卡-阿爾默"裝甲運兵車 - "奥托卡-阿尔默"装甲运兵车 Typhoon Transport @@ -796,10 +600,6 @@ Typhoon Transporte Typhoon szállítójármű Typhoon da trasporto - Typhoon 輸送型 - Typhoon 수송 - "颱風"卡車 (運輸) - "台风"卡车 (运输) Typhoon Transport (covered) @@ -812,10 +612,6 @@ Typhoon Transporte (coberto) Typhoon szállítójármű (ponyvás) Typhoon da trasporto (coperto) - Typhoon 輸送型 (幌) - Typhoon 수송 (덮개) - "颱風"卡車 (運輸, 棚布) - "台风"卡车 (运输, 棚布) Typhoon Device @@ -828,10 +624,6 @@ Typhoon Dispositivo Typhoon (eszköz) Typhoon per dispositivo - Typhoon デバイス型 - Typhoon 장치 - "颱風"卡車 (精密設備) - "台风"卡车 (精密设备) Typhoon Ammo @@ -844,10 +636,6 @@ Typhoon Munições Typhoon (lőszerszállító) Typhoon di rifornimento munizioni - Typhoon 弾薬給弾型 - Typhoon 탄약 - "颱風"卡車 (彈藥) - "台风"卡车 (弹药) Typhoon Fuel @@ -860,10 +648,6 @@ Typhoon Combustível Typhoon (üzemanyag-szállító) Typhoon di rifornimento carburante - Typhoon 燃料給油車 - Typhoon 연료 - "颱風"卡車 (燃油) - "台风"卡车 (燃油) Typhoon Repair @@ -876,10 +660,6 @@ Typhoon Reparador Typhoon (szerelő-jármű) Typhoon riparatore - Typhoon 修理型 - Typhoon 수리 - "颱風"卡車 (維修) - "台风"卡车 (维修) Typhoon Medical @@ -892,10 +672,6 @@ Typhoon Médico Typhoon (egészségügyi) Typhoon medico - Typhoon 救急車 - Typhoon 의료 - "颱風"卡車 (醫療) - "台风"卡车 (医疗) RAH-66 Comanche @@ -908,10 +684,6 @@ RAH-66 Comanche RAH-66 Comanche RAH-66 Comanche - RAH-66 コマンチ - RAH-66 Comanche - RAH-66"卡曼契"攻擊直升機 - RAH-66"卡曼契"攻击直升机 MH-6 Little Bird @@ -924,10 +696,6 @@ MH-6 Little Bird MH-6 Little Bird MH-6 Little Bird - MH-6 リトル バード - MH-6 Little Bird - MH-6"小鳥"運輸直升機 - MH-6"小鸟"运输直升机 AH-6 Little Bird @@ -940,10 +708,6 @@ AH-6 Little Bird AH-6 Little Bird AH-6 Little Bird - AH-6 リトル バード - AH-6 Little Bird - AH-6"小鳥"武裝直升機 - AH-6"小鸟"武装直升机 CH-47I Chinook @@ -956,10 +720,6 @@ CH-47I Chinook CH-47I Chinook CH-47I Chinook - CH-47I チヌーク - CH-47I Chinook - CH-47I"契努克"運輸直升機 - CH-47I"契努克"运输直升机 CH-47I Chinook (unarmed) @@ -972,10 +732,6 @@ CH-47I Chinook (fegyvertelen) CH-47I Chinook (disarmato) CH-47I Chinook (desarmado) - CH-47I チヌーク (非武装) - CH-47I Chinook (비무장) - CH-47I"契努克"運輸直升機 (無武裝) - CH-47I"契努克"运输直升机 (无武装) A-10D Thunderbolt II @@ -988,10 +744,6 @@ A-10D Thunderbolt II A-10D Thunderbolt II A-10D Thunderbolt II - A-10D サンダーボルト II - A-10D Thunderbolt II - A-10D"雷霆二式"攻擊機 - A-10D"雷霆二式"攻击机 AW159 Wildcat @@ -1004,10 +756,6 @@ AW159 Wildcat AW159 Wildcat AW159 Wildcat - AW159 ワイルドキャット - AW159 Wildcat - AW159"野貓"直升機 - AW159"野猫"直升机 AW159 Wildcat (unarmed) @@ -1020,10 +768,6 @@ AW159 Wildcat (desarmado) AW159 Wildcat (fegyvertelen) AW159 Wildcat (disarmato) - AW159 ワイルドキャット (非武装) - AW159 Wildcat (비무장) - AW159"野貓"直升機 (無武裝) - AW159"野猫"直升机 (无武装) AW101 Merlin @@ -1036,26 +780,6 @@ AW101 Merlin AW101 Merlin AW101 Merlin - AW101 マーリン - AW101 Merlin - AW101"灰背隼"運輸直升機 - AW101"灰背隼"运输直升机 - - - L-159 ALCA - L-159 ALCA - L-159 ALCA - L-159 ALCA - L-159 ALCA - L-159 ALCA - L-159 Альбатрос - L-159 ALCA - L-159 ALCA - L-159 ALCA - L-159 アルカ - L-159 ALCA - L-159先進輕型戰鬥機 - L-159先进轻型战斗机 L-159 ALCA (CAS) @@ -1068,10 +792,6 @@ L-159 ALCA (CAS) L-159 ALCA (Légitámogató) L-159 ALCA (CAS) - L-159 アルカ (対地) - L-159 ALCA (근접지원) - L-159先進輕型戰鬥機 (近空支援) - L-159先进轻型战斗机 (近空支援) L-159 ALCA (AA) @@ -1084,10 +804,6 @@ L-159 ALCA (ВВ) L-159 ALCA (Repülő-elhárító) L-159 ALCA (AA) - L-159 アルカ (対空) - L-159 ALCA (대공) - L-159先進輕型戰鬥機 (空對空) - L-159先进轻型战斗机 (空对空) Ka-60 Kasatka @@ -1100,10 +816,6 @@ Ka-60 Kasatka Ka-60 Kasatka Ka-60 Kasatka - Ka-60 カサートカ - Ka-60 Kasatka - Ka-60"逆戟鯨"直升機 - Ka-60"逆戟鲸"直升机 Ka-60 Kasatka (Black & White) @@ -1115,10 +827,6 @@ Ka-60 Kasatka (preto e branco) Ka-60 Касатка (белый и черный) Ka-60 Kasatka (blanco y negro) - Ka-60 カサートカ (黒&白) - Ka-60 Kasatka (검정 및 하양) - Ka-60"逆戟鯨"直升機 (黑&白) - Ka-60"逆戟鲸"直升机 (黑&白) Ka-60 Kasatka (unarmed) @@ -1131,10 +839,6 @@ Ka-60 Kasatka (desarmado) Ka-60 Kasatka (fegyvertelen) Ka-60 Kasatka (disarmato) - Ka-60 カサートカ (非武装) - Ka-60 Kasatka (비무장) - Ka-60"逆戟鯨"直升機 (無武裝) - Ka-60"逆戟鲸"直升机 (无武装) Yak-130 @@ -1147,10 +851,6 @@ Yak-130 Jak-130 Yak-130 - Yak-130 ミトン - Yak-130 - Yak-130"手套"攻擊機 - Yak-130"手套"攻击机 MD 500 @@ -1163,10 +863,6 @@ MD 500 MD 500 MD 500 - MD 500 - MD 500 - MD 500"防衛者"直升機 - MD 500"防卫者"直升机 M4A1 SLAM @@ -1179,10 +875,6 @@ M4A1 SLAM M4A1 SLAM M4A1 SLAM - M4A1 SLAM - M4A1 SLAM - M4A1指向性反裝甲地雷 - M4A1指向性反装甲地雷 M18A1 Claymore @@ -1195,10 +887,6 @@ M18A1 Claymore M18A1 Claymore akna M18A1 Claymore Mina antiuomo - M18A1 クレイモア - M18A1 클레이모어 - M18A1"闊刀"地雷 - M18A1"阔刀"地雷 M183 Demolition Charge Assembly @@ -1211,10 +899,6 @@ M183 Sacola de Demolição M183 romboló töltet M183 Demolition Charge Assembly - M183 梱包爆薬 - M183 폭파 장약 조립 - M183炸藥包 - M183炸药包 M112 Demolition Block @@ -1227,10 +911,6 @@ M112 Carga de Demolição M112 romboló tömb M112 Demolition Block - M113 爆薬ブロック - M112 폭파 블럭 - M112塑性炸藥 - M112塑性炸药 M67 Fragmentation Grenade @@ -1243,10 +923,6 @@ M67 Granada de fragmentação M67 repeszgránát M67 Granata a frammentazione - M67 破片手榴弾 - M67 세열 수류탄 - M67破片手榴彈 - M67破片手榴弹 M83 Smoke Grenade (White) @@ -1259,10 +935,6 @@ M83 Granada de fumaça (Branca) M83 füstgránát (Fehér) M83 Granata fumogena (Bianco) - M18 煙幕手榴弾 (白) - M83 연막탄 (하양) - M83煙霧彈 (白色) - M83烟雾弹 (白色) M18 Smoke Grenade (Blue) @@ -1275,10 +947,6 @@ M18 Granada de fumaça (Azul) M18 füstgránát (Kék) M18 Granata fumogena (Blu) - M18 煙幕手榴弾 (青) - M18 연막탄 (파랑) - M18煙霧彈 (藍色) - M18烟雾弹 (蓝色) M18 Smoke Grenade (Green) @@ -1291,10 +959,6 @@ M18 Granada de fumaça (Verde) M18 füstgránát (Zöld) M18 Granata fumogena (Verde) - M18 煙幕手榴弾 (緑) - M18 연막탄 (초록) - M18煙霧彈 (綠色) - M18烟雾弹 (绿色) M18 Smoke Grenade (Orange) @@ -1307,10 +971,6 @@ M18 Granada de fumaça (Laranja) M18 füstgránát (Narancssárga) M18 Granata fumogena (Arancione) - M18 煙幕手榴弾 (橙) - M18 연막탄 (주황) - M18煙霧彈 (橘色) - M18烟雾弹 (橘色) M18 Smoke Grenade (Purple) @@ -1323,10 +983,6 @@ M18 Granada de fumaça (Roxa) M18 füstgránát (Lila) M18 Granata fumogena (Viola) - M18 煙幕手榴弾 (紫) - M18 연막탄 (보라) - M18煙霧彈 (紫色) - M18烟雾弹 (紫色) M18 Smoke Grenade (Red) @@ -1339,10 +995,6 @@ M18 Granada de fumaça (Vermelha) M18 füstgránát (Piros) M18 Granata fumogena (Rosso) - M18 煙幕手榴弾 (赤) - M18 연막탄 (빨강) - M18煙霧彈 (紅色) - M18烟雾弹 (红色) M18 Smoke Grenade (Yellow) @@ -1355,10 +1007,6 @@ M18 Granada de fumaça (Amarela) M18 füstgránát (Sárga) M18 Granata fumogena (Giallo) - M18 煙幕手榴弾 (黄) - M18 연막탄 (노랑) - M18煙霧彈 (黃色) - M18烟雾弹 (黄色) M15 Anti-Tank Mine @@ -1371,10 +1019,6 @@ M15 Mina anticarro M15 harckocsiakna M15 Mine anticarro - M15 対戦車地雷 - M15 대전차지뢰 - M15反坦克地雷 - M15反坦克地雷 VS-50 Anti-Personnel Mine @@ -1387,10 +1031,6 @@ VS-50 Mina antipessoal VS-50 gyalogsági taposóakna VS-50 Mine antiuomo - VS-50 対人地雷 - VS-50 대인지뢰 - VS-50反人員地雷 - VS-50反人员地雷 M26 Anti-Personnel Bounding Mine @@ -1403,10 +1043,6 @@ M26 Mina saltadora antipessoal M26 gyalogsági ugróakna M26 Mine saltanti antiuomo - M26 対人跳躍地雷 - M26 대인도약지뢰 - M26反人員彈跳雷 - M26反人员弹跳雷 PMR-3 Anti-Personnel Tripwire Mine @@ -1419,10 +1055,6 @@ PMR-3 Mina antipessoal (armadilha) PMR-3 botlódrótos gyalogsági akna PMR-3 Mine antiuomo - PMR-3 仕掛け型対人地雷 - PMR-3 대인인계철선지뢰 - PMR-3反人員絆線雷 - PMR-3反人员绊线雷 P99 @@ -1435,10 +1067,6 @@ P99 P99 P99 - P99 - P99 - P99手槍 - P99手枪 MP-443 Grach @@ -1451,10 +1079,6 @@ МР-443 "Грач" MP-443 Grach MP-443 Grach - MP-433 グラッチ - MP-443 Grach - MP-443"烏鴉"手槍 - MP-443"乌鸦"手枪 Custom Covert II @@ -1467,10 +1091,6 @@ Custom Covert II Custom Covert II ACP-C2 - カスタム コンバート II - Custom Covert II - 特裝隱蔽Ⅱ型手槍 - 特装隐蔽Ⅱ型手枪 FNX-45 Tactical @@ -1483,10 +1103,6 @@ FNX-45 Tactical FNX-45 Tactical FNX-45 Tactical - FNX-45 タクティカル - FNX-45 Tactical - FNX-45戰術型手槍 - FNX-45战术型手枪 Chiappa Rhino 60DS @@ -1499,10 +1115,6 @@ Chiappa Rhino 60DS Chiappa Rhino 60DS Chiappa Rhino 6DS - チアッパ ライノ 60DS - Chiappa Rhino 60DS - 齊亞帕"犀牛"60DS左輪手槍 - 齐亚帕"犀牛"60DS左轮手枪 Taurus Judge @@ -1515,10 +1127,6 @@ Taurus Judge Taurus Judge Taurus Judge - タウルス ジャッジ - Taurus Judge - 金牛座"法官"信號槍 - 金牛座"法官"信号枪 NLAW @@ -1531,10 +1139,6 @@ NLAW NLAW NLAW - NLAW - NLAW - 次世代輕型反坦克導彈發射器 - 次世代轻型反坦克导弹发射器 RPG-32 @@ -1547,10 +1151,6 @@ РПГ-32 RPG-32 RPG-32 - RPG-32 - RPG-32 - RPG-32"哈希姆"火箭發射器 - RPG-32"哈希姆"火箭发射器 Mini-Spike (AA) @@ -1563,10 +1163,6 @@ Mini-Spike (AA) Mini-Spike (AA) Mini-Spike (AA) - ミニスパイク (対空) - Mini-Spike (대공) - "迷你長釘"導彈發射器 (防空) - "迷你长钉"导弹发射器 (防空) Mini-Spike (AT) @@ -1579,10 +1175,6 @@ Mini-Spike (AT) Mini-Spike (AT) Mini-Spike (AT) - ミニスパイク (対地) - Mini-Spike (대전차) - "迷你長釘"導彈發射器 (反坦克) - "迷你长钉"导弹发射器 (反坦克) MX @@ -1595,10 +1187,6 @@ MX MX MX - MX - MX - MX突擊步槍 - MX突击步枪 MX (Black) @@ -1611,10 +1199,6 @@ MX (Чёрный) MX (Preto) MX (Nero) - MX (黒) - MX (검정) - MX突擊步槍 (黑色) - MX突击步枪 (黑色) MXC @@ -1627,10 +1211,6 @@ MXC MXC MXC - MXC - MXC - MXC卡賓步槍 - MXC卡宾步枪 MXC (Black) @@ -1643,10 +1223,6 @@ MXC (Чёрный) MXC (Preto) MXC (Nero) - MXC (黒) - MXC (검정) - MXC卡賓步槍 (黑色) - MXC卡宾步枪 (黑色) MX 3GL @@ -1659,10 +1235,6 @@ MX 3GL MX 3GL MX 3GL - MX 3GL - MX 3GL - MX突擊步槍 (3連裝榴彈) - MX突击步枪 (3连装榴弹) MX 3GL (Black) @@ -1675,10 +1247,6 @@ MX 3GL (Чёрный) MX 3GL (Preto) MX 3GL (Nero) - MX 3GL (黒) - MX 3GL (검정) - MX突擊步槍 (3連裝榴彈-黑色) - MX突击步枪 (3连装榴弹-黑色) MX LSW @@ -1691,10 +1259,6 @@ MX LSW MX LSW MX LSW - MX LSW - MX LSW - MX輕型機槍 - MX轻型机枪 MX LSW (Black) @@ -1707,10 +1271,6 @@ MX LSW (Чёрный) MX LSW (Preto) MX LSW (Nero) - MX LSW (黒) - MX LSW (검정) - MX輕型機槍 (黑色) - MX轻型机枪 (黑色) MXM @@ -1723,10 +1283,6 @@ MXM MXM MXM - MXM - MXM - MXM精準步槍 - MXM精准步枪 MXM (Black) @@ -1739,10 +1295,6 @@ MXM (Чёрный) MXM (Preto) MXM (Nero) - MXM (黒) - MXM (검정) - MXM精準步槍 (黑色) - MXM精准步枪 (黑色) KH2002 Sama @@ -1755,10 +1307,6 @@ KH2002 Сама KT2002 Sama KT2002 Katiba - KH2002 サマ - KH2002 Sama - KH2002"海白爾"突擊步槍 - KH2002"海白尔"突击步枪 KH2002C Sama @@ -1771,10 +1319,6 @@ KH2002C Сама KT2002C Sama KT2002C Katiba - KH2002C サマ - KH2002C Sama - KH2002C"海白爾"卡賓步槍 - KH2002C"海白尔"卡宾步枪 KH2002 Sama KGL @@ -1787,10 +1331,6 @@ KH2002 Сама KGL KT2002 Sama KGL KT2002 Katiba KGL - KH2002 サマ KGL - KH2002 Sama KGL - KH2002"海白爾"突擊步槍 (榴彈) - KH2002"海白尔"突击步枪 (榴弹) F2000 (Camo) @@ -1803,10 +1343,6 @@ F2000 (Камо) F2000 (Camo) F2000 (Camo) - F2000 (迷彩) - F2000 (위장) - F2000突擊步槍 (迷彩) - F2000突击步枪 (迷彩) F2000 @@ -1819,10 +1355,6 @@ F2000 F2000 F2000 - F2000 - F2000 - F2000突擊步槍 - F2000突击步枪 F2000 Tactical (Camo) @@ -1835,10 +1367,6 @@ F2000 Tactical (Камо) F2000 Tactical (Camo) F2000 Tactical (Camo) - F2000 タクティカル (迷彩) - F2000 Tactical (위장) - F2000戰術型突擊步槍 (迷彩) - F2000战术型突击步枪 (迷彩) F2000 Tactical @@ -1851,10 +1379,6 @@ F2000 Tactical F2000 Tactical F2000 Tactical - F2000 タクティカル - F2000 Tactical - F2000戰術型突擊步槍 - F2000战术型突击步枪 F2000 EGLM (Camo) @@ -1867,10 +1391,6 @@ F2000 EGLM (Камо) F2000 EGLM (Camo) F2000 EGLM (Camo) - F2000 EGLM (迷彩) - F2000 EGLM (위장) - F2000突擊步槍 (榴彈-迷彩) - F2000突击步枪 (榴弹-迷彩) F2000 EGLM @@ -1883,10 +1403,6 @@ F2000 EGLM F2000 EGLM F2000 EGLM - F2000 EGLM - F2000 EGLM - F2000突擊步槍 (榴彈) - F2000突击步枪 (榴弹) TAR-21 @@ -1899,10 +1415,6 @@ TAR-21 TAR-21 TAR-21 - TAR-21 - TAR-21 - TAR-21突擊步槍 - TAR-21突击步枪 CTAR-21 @@ -1915,10 +1427,6 @@ CTAR-21 CTAR-21 CTAR-21 - CTAR-21 - CTAR-21 - CTAR-21卡賓步槍 - CTAR-21卡宾步枪 TAR-21 EGLM @@ -1931,10 +1439,6 @@ TAR-21 EGLM TAR-21 EGLM TAR-21 EGLM - TAR-21 EGLM - TAR-21 EGLM - TAR-21突擊步槍 (榴彈) - TAR-21突击步枪 (榴弹) Vector SMG @@ -1947,10 +1451,6 @@ Vector SMG Vector SMG Vector SMG - ベクター SMG - Vector SMG - "維克特"衝鋒槍 - "维克特"冲锋枪 Scorpion Evo 3 A1 @@ -1963,10 +1463,6 @@ Scorpion Evo 3 A1 Scorpion Evo 3 A1 Scorpion Evo 3 A1 - スコーピオン エボ 3 A1 - Scorpion Evo 3 A1 - "蠍式"Evo 3 A1衝鋒槍 - "蝎式"Evo 3 A1冲锋枪 CPW @@ -1979,10 +1475,6 @@ CPW CPW CPW - CPW - CPW - 緊湊型個人衝鋒槍 - 紧凑型个人冲锋枪 RFB SDAR @@ -1995,10 +1487,6 @@ RFB SDAR RFB SDAR RFB SDAR - RFB SDAR - RFB SDAR - 犢牛式水陸兩用步槍 - 犊牛式水陆两用步枪 Stoner 99 LMG @@ -2011,10 +1499,6 @@ Stoner 99 LMG Stoner 99 LMG Stoner 99 LMG - ストーナー 99 LMG - Stoner 99 LMG - 斯通納99輕機槍 - 斯通纳99轻机枪 Negev NG7 @@ -2027,10 +1511,6 @@ Negev NG7 Negev NG7 Negev NG7 - ネゲフ NG7 - Negev NG7 - 內蓋夫NG7機槍 - 内盖夫NG7机枪 Mk14 Mod 1 EBR @@ -2043,10 +1523,6 @@ Mk14 Mod 1 EBR Mk14 Mod 1 EBR Mk14 Mod 1 EBR - Mk14 Mod 1 EBR - Mk14 Mod 1 EBR - Mk14一型增強型戰鬥步槍 - Mk14一型增强型战斗步枪 GM6 Lynx @@ -2059,10 +1535,6 @@ GM6 Lynx GM6 Lynx GM6 Lynx - GM6 リンクス - GM6 Lynx - GM6"天貓"反器材狙擊步槍 - GM6"天猫"反器材狙击步枪 GM6 Lynx (Camo) @@ -2075,10 +1547,6 @@ GM6 Lynx (Камо) GM6 Lynx (Camo) GM6 Lynx (Camo) - GM6 リンクス (迷彩) - GM6 Lynx (위장) - GM6"天貓"反器材狙擊步槍 (迷彩) - GM6"天猫"反器材狙击步枪 (迷彩) M200 Intervention @@ -2091,10 +1559,6 @@ M200 Intervention M200 Intervention M200 Intervention - M200 インターベンション - M200 Intervention - M200干預型狙擊步槍 - M200干预型狙击步枪 M200 Intervention (Camo) @@ -2107,10 +1571,6 @@ M200 Intervention (Камо) M200 Intervention (Camo) M200 Intervention (Camo) - M200 インターベンション (迷彩) - M200 Intervention (위장) - M200干預型狙擊步槍 (迷彩) - M200干预型狙击步枪 (迷彩) VS-121 @@ -2123,10 +1583,6 @@ VS-121 VS-121 VS-121 - VS-121 - VS-121 - VS-121狙擊步槍 - VS-121狙击步枪 Noreen "Bad News" ULR @@ -2139,10 +1595,6 @@ Noreen "Bad News" ULR Noreen "Bad News"ULR Noreen "Bad News" ULR - ノレーン "バッド ニュース" ULR - Noreen "Bad News" ULR - 諾琳"壞消息"極距狙擊步槍 - 诺琳"坏消息"极距狙击步枪 Noreen "Bad News" ULR (Black) @@ -2155,10 +1607,6 @@ Noreen "Bad News" ULR (Nero) Noreen "Bad News"ULR (Fekete) Noreen "Bad News" ULR (Preto) - ノレーン "バッド ニュース" ULR (黒) - Noreen "Bad News" ULR (검정) - 諾琳"壞消息"極距狙擊步槍 (黑色) - 诺琳"坏消息"极距狙击步枪 (黑色) Noreen "Bad News" ULR (Camo) @@ -2171,10 +1619,6 @@ Noreen "Bad News" ULR (Camo) Noreen "Bad News"ULR (Terepmintás) Noreen "Bad News" ULR (Camuflagem) - ノレーン "バッド ニュース" ULR (迷彩) - Noreen "Bad News" ULR (위장) - 諾琳"壞消息"極距狙擊步槍 (迷彩) - 诺琳"坏消息"极距狙击步枪 (迷彩) Noreen "Bad News" ULR (Sand) @@ -2187,10 +1631,6 @@ Noreen "Bad News" ULR (Sabbia) Noreen "Bad News"ULR (Homok) Noreen "Bad News" ULR (Deserto) - ノレーン "バッド ニュース" ULR (砂地) - Noreen "Bad News" ULR (모래) - 諾琳"壞消息"極距狙擊步槍 (沙色) - 诺琳"坏消息"极距狙击步枪 (沙色) SIG 556 @@ -2203,10 +1643,6 @@ SIG 556 SIG 556 SIG 556 - SIG 556 - SIG 556 - SIG 556精準步槍 - SIG 556精准步枪 SIG 556 (Black) @@ -2219,10 +1655,6 @@ SIG 556 (Nero) SIG 556 (Fekete) SIG 556 (Preto) - SIG 556 (黒) - SIG 556 (검정) - SIG 556精準步槍 (黑色) - SIG 556精准步枪 (黑色) SIG 556 (Khaki) @@ -2235,10 +1667,6 @@ SIG 556 (Khaki) SIG 556 (Khaki) SIG 556 (Caqui) - SIG 556 (土埃) - SIG 556 (카키) - SIG 556精準步槍 (卡其色) - SIG 556精准步枪 (卡其色) SIG 556 (Sand) @@ -2251,10 +1679,6 @@ SIG 556 (Sabbia) SIG 556 (Homok) SIG 556 (Deserto) - SIG 556 (砂地) - SIG 556 (모래) - SIG 556精準步槍 (沙色) - SIG 556精准步枪 (沙色) SIG 556 (Camo) @@ -2267,10 +1691,6 @@ SIG 556 (Camo) SIG 556 (Terepmintás) SIG 556 (Camuflagem) - SIG 556 (迷彩) - SIG 556 (위장) - SIG 556精準步槍 (迷彩) - SIG 556精准步枪 (迷彩) SIG 556 (Woodland) @@ -2283,10 +1703,6 @@ SIG 556 (Woodland) SIG 556 (Erdőmintás) SIG 556 (Floresta) - SIG 556 (森林) - SIG 556 (우드랜드) - SIG 556精準步槍 (森林迷彩) - SIG 556精准步枪 (森林迷彩) SIG 556 (provisional) spotter @@ -2299,10 +1715,6 @@ SIG 556 (provisional) spotter SIG 556 (Ellátmányi) Megfigyelő SIG 556 (provisional) observador - SIG 556 (仮) スポッター - SIG 556 (임시) spotter - SIG 556精準步槍 (暫定) 觀測手 - SIG 556精准步枪 (暂定) 观测手 ASP-1 Kir @@ -2315,10 +1727,6 @@ ASP-1 Kir ASP-1 Kir ASP-1 Kir - ASP-1 Kir - ASP-1 Kir - ASP-1"基爾"消音狙擊步槍 - ASP-1"基尔"消音狙击步枪 ASP-1 Kir (Black) @@ -2331,10 +1739,6 @@ ASP-1 Kir (Nero) ASP-1 Kir (Fekete) ASP-1 Kir (Preto) - ASP-1 Kir (黒) - ASP-1 Kir (검정) - ASP-1"基爾"消音狙擊步槍 (黑色) - ASP-1"基尔"消音狙击步枪 (黑色) ASP-1 Kir (Tan) @@ -2347,10 +1751,6 @@ ASP-1 Kir (Tan) ASP-1 Kir (Cserszín) ASP-1 Kir (Deserto) - ASP-1 Kir (黄褐) - ASP-1 Kir (황갈) - ASP-1"基爾"消音狙擊步槍 (黃褐色) - ASP-1"基尔"消音狙击步枪 (黄褐色) Cyrus @@ -2363,10 +1763,6 @@ Cyrus Cyrus Cyrus - サイラス - Cyrus - "居鲁士"狙擊步槍 - "居鲁士"狙击步枪 Cyrus (Black) @@ -2379,10 +1775,6 @@ Cyrus (Nero) Cyrus (Fekete) Cyrus (Preto) - サイラス (黒) - Cyrus (검정) - "居鲁士"狙擊步槍 (黑色) - "居鲁士"狙击步枪 (黑色) Cyrus (Hex) @@ -2395,10 +1787,6 @@ Cyrus (Hex) Cyrus (Hex) Cyrus (Hex) - サイラス (蜂巣) - Cyrus (육각) - "居鲁士"狙擊步槍 (數位蜂巢迷彩) - "居鲁士"狙击步枪 (数位蜂巢迷彩) Cyrus (Tan) @@ -2411,10 +1799,6 @@ Cyrus (Tan) Cyrus (Cserszín) Cyrus (Deserto) - サイラス (黄褐) - Cyrus (황갈) - "居鲁士"狙擊步槍 (黃褐色) - "居鲁士"狙击步枪 (黄褐色) M14 @@ -2427,10 +1811,6 @@ M14 M14 M14 - M14 - M14 - M14精準步槍 - M14精准步枪 M14 (Camo) @@ -2443,10 +1823,6 @@ M14 (Camo) M14 (Terepmintás) M14 (Camuflagem) - M14 (迷彩) - M14 (위장) - M14精準步槍 (迷彩) - M14精准步枪 (迷彩) M14 (Olive) @@ -2459,10 +1835,6 @@ M14 (Olive) M14 (Olíva) M14 (Oliva) - M14 (オリーブド ラブ) - M14 (올리브) - M14精準步槍 (橄欖色) - M14精准步枪 (橄榄色) HK121 @@ -2475,10 +1847,6 @@ HK121 HK121 HK121 - HK 121 - HK121 - HK121中型機槍 - HK121中型机枪 HK121 (Hex) @@ -2491,10 +1859,6 @@ HK121 (Hex) HK121 (Hex) HK121 (Hex) - HK 121 (蜂巣) - HK121 (육각) - HK121中型機槍 (數位蜂巢迷彩) - HK121中型机枪 (数位蜂巢迷彩) HK121 (Tan) @@ -2507,10 +1871,6 @@ HK121 (Tan) HK121 (Cserszín) HK121 (Deserto) - HK 121 (黄褐) - HK121 (황갈) - HK121機槍 (黃褐色) - HK121机枪 (黄褐色) LWMMG @@ -2523,10 +1883,6 @@ LWMMG LWMMG LWMMG - LWMMG - LWMMG - 輕量化中型機槍 - 轻量化中型机枪 LWMMG (MTP) @@ -2539,10 +1895,6 @@ LWMMG (MTP) LWMMG (MTP) LWMMG (MTP) - LWMMG (マルチカモ) - LWMMG (MTP) - 輕量化中型機槍 (多地形迷彩) - 轻量化中型机枪 (多地形迷彩) LWMMG (Black) @@ -2555,10 +1907,6 @@ LWMMG (Nero) LWMMG (Fekete) LWMMG (Preto) - LWMMG (黒) - LWMMG (검정) - 輕量化中型機槍 (黑色) - 轻量化中型机枪 (黑色) LWMMG (Sand) @@ -2571,10 +1919,6 @@ LWMMG (Sabbia) LWMMG (Homok) LWMMG (Deserto) - LWMMG (砂地) - LWMMG (모래) - 輕量化中型機槍 (沙色) - 轻量化中型机枪 (沙色) Jeep Wrangler @@ -2587,10 +1931,6 @@ Jeep Wrangler Jeep Wrangler Jeep Wrangler - ジープ ラングラー - Jeep Wrangler - "牧馬人"吉普車 - "牧马人"吉普车 Jeep Wrangler (Black) @@ -2603,10 +1943,6 @@ Jeep Wrangler (Nero) Jeep Wrangler (Fekete) Jeep Wrangler (Preto) - ジープ ラングラー (黒) - Jeep Wrangler (검정) - "牧馬人"吉普車 (黑色) - "牧马人"吉普车 (黑色) Jeep Wrangler (Blue) @@ -2619,10 +1955,6 @@ Jeep Wrangler (Azul) Jeep Wrangler (Kék) Jeep Wrangler (Blu) - ジープ ラングラー (青) - Jeep Wrangler (파랑) - "牧馬人"吉普車 (藍色) - "牧马人"吉普车 (蓝色) Jeep Wrangler (Green) @@ -2635,10 +1967,6 @@ Jeep Wrangler (Verde) Jeep Wrangler (Zöld) Jeep Wrangler (Verde) - ジープ ラングラー (緑) - Jeep Wrangler (초록) - "牧馬人"吉普車 (綠色) - "牧马人"吉普车 (绿色) Jeep Wrangler (Orange) @@ -2651,10 +1979,6 @@ Jeep Wrangler (Laranja) Jeep Wrangler (Narancssárga) Jeep Wrangler (Arancione) - ジープ ラングラー (橙) - Jeep Wrangler (주황) - "牧馬人"吉普車 (橘色) - "牧马人"吉普车 (橘色) Jeep Wrangler (Red) @@ -2667,10 +1991,6 @@ Jeep Wrangler (Vermelha) Jeep Wrangler (Piros) Jeep Wrangler (Rosso) - ジープ ラングラー (赤) - Jeep Wrangler (빨강) - "牧馬人"吉普車 (紅色) - "牧马人"吉普车 (红色) Jeep Wrangler (White) @@ -2683,10 +2003,6 @@ Jeep Wrangler (Branca) Jeep Wrangler (Fehér) Jeep Wrangler (Bianco) - ジープ ラングラー (白) - Jeep Wrangler (하양) - "牧馬人"吉普車 (白色) - "牧马人"吉普车 (白色) Cessna TTx @@ -2699,10 +2015,6 @@ Cessna TTx Cessna TTx Cessna TTx - セスナ TTx - Cessna TTx - "賽斯納"TTx單引擎飛機 - "赛斯纳"TTx单引擎飞机 Cessna TTx (Racing) @@ -2715,10 +2027,6 @@ Cessna TTx (Racing) Cessna TTx (Racing) Cessna TTx (Racing) - セスナ TTx (レース仕様) - Cessna TTx (경주용) - "賽斯納"TTx單引擎飛機 (競速) - "赛斯纳"TTx单引擎飞机 (竞速) Burraq UCAV @@ -2731,10 +2039,6 @@ Burraq UCAV Burraq UCAV Burraq UCAV - ブラーク UCAV - Burraq UCAV - "柏拉格"空中無人戰鬥載具 - "柏拉格"空中无人战斗载具 QBZ-95-1 (Black) @@ -2747,42 +2051,6 @@ QBZ-95-1 (Nero) QBZ-95-1 (Fekete) QBZ-95-1 (Preto) - QBZ-95-1 (黒) - QBZ-95-1 (검정) - QBZ-95-1式自動步槍 (黑色) - QBZ-95-1式自动步枪 (黑色) - - - QBZ-95-1 (Green Hex) - QBZ-95-1 (Hex Grün) - QBZ-95-1 (Hex Verde) - QBZ-95-1 (zielony hex) - QBZ-95-1 (Zelený Hex) - QBZ-95-1 (Hex Verte) - QBZ-95-1 (Зелёный Hex) - QBZ-95-1 (Verde Hex) - QBZ-95-1 (Zöld Hex) - QBZ-95-1 (Hex Verde) - QBZ-95-1 (緑蜂巣) - QBZ-95-1 (초록육각) - QBZ-95-1式自動步槍 (綠色數位蜂巢迷彩) - QBZ-95-1式自动步枪 (绿色数位蜂巢迷彩) - - - QBZ-95-1 (Hex) - QBZ-95-1 (Hex) - QBZ-95-1 (Hex) - QBZ-95-1 (hex) - QBZ-95-1 (Hex) - QBZ-95-1 (Hex) - QBZ-95-1 (Hex) - QBZ-95-1 (Hex) - QBZ-95-1 (Hex) - QBZ-95-1 (Hex) - QBZ-95-1 (蜂巣) - QBZ-95-1 (육각) - QBZ-95-1式自動步槍 (數位蜂巢迷彩) - QBZ-95-1式自动步枪 (数位蜂巢迷彩) QBZ-95-1 GL (Black) @@ -2795,42 +2063,6 @@ QBZ-95-1 GL (Nero) QBZ-95-1 GL (Fekete) QBZ-95-1 GL (Preto) - QBZ-95-1 GL (黒) - QBZ-95-1 GL (검정) - QBZ-95-1式自動步槍 (榴彈-黑色) - QBZ-95-1式自动步枪 (榴弹-黑色) - - - QBZ-95-1 GL (Green Hex) - QBZ-95-1 GL (Hex Grün) - QBZ-95-1 GL (Hex Verde) - QBZ-95-1 GL (zielony hex) - QBZ-95-1 GL (Zelený Hex) - QBZ-95-1 GL (Hex Verte) - QBZ-95-1 GL (Зелёный Hex) - QBZ-95-1 GL (Verde Hex) - QBZ-95-1 GL (Zöld Hex) - QBZ-95-1 GL (Hex Verde) - QBZ-95-1 GL (緑蜂巣) - QBZ-95-1 GL (초록육각) - QBZ-95-1式自動步槍 (榴彈-綠色數位蜂巢迷彩) - QBZ-95-1式自动步枪 (榴弹-绿色数位蜂巢迷彩) - - - QBZ-95-1 GL (Hex) - QBZ-95-1 GL (Hex) - QBZ-95-1 GL (Hex) - QBZ-95-1 GL (hex) - QBZ-95-1 GL (Hex) - QBZ-95-1 GL (Hex) - QBZ-95-1 GL (Hex) - QBZ-95-1 GL (Hex) - QBZ-95-1 GL (Hex) - QBZ-95-1 GL (Hex) - QBZ-95-1 GL (蜂巣) - QBZ-95-1 GL (육각) - QBZ-95-1式自動步槍 (榴彈-數位蜂巢迷彩) - QBZ-95-1式自动步枪 (榴弹-数位蜂巢迷彩) QBZ-95-1 LSW (Black) @@ -2843,42 +2075,6 @@ QBZ-95-1 LSW (Nero) QBZ-95-1 LSW (Fekete) QBZ-95-1 LSW (Preto) - QBZ-95-1 LSW (黒) - QBZ-95-1 LSW (검정) - QBZ-95-1式輕機槍 (黑色) - QBZ-95-1式轻机枪 (黑色) - - - QBZ-95-1 LSW (Green Hex) - QBZ-95-1 LSW (Hex Grün) - QBZ-95-1 LSW (Hex Verde) - QBZ-95-1 LSW (zielony hex) - QBZ-95-1 LSW (Zelený Hex) - QBZ-95-1 LSW (Hex Verte) - QBZ-95-1 LSW (Зелёный Hex) - QBZ-95-1 LSW (Verde Hex) - QBZ-95-1 LSW (Zöld Hex) - QBZ-95-1 LSW (Hex Verde) - QBZ-95-1 LSW (緑蜂巣) - QBZ-95-1 LSW (초록육각) - QBZ-95-1式輕機槍 (綠色數位蜂巢迷彩) - QBZ-95-1式轻机枪 (绿色数位蜂巢迷彩) - - - QBZ-95-1 LSW (Hex) - QBZ-95-1 LSW (Hex) - QBZ-95-1 LSW (Hex) - QBZ-95-1 LSW (hex) - QBZ-95-1 LSW (Hex) - QBZ-95-1 LSW (Hex) - QBZ-95-1 LSW (Hex) - QBZ-95-1 LSW (Hex) - QBZ-95-1 LSW (Hex) - QBZ-95-1 LSW (Hex) - QBZ-95-1 LSW (蜂巣) - QBZ-95-1 LSW (육각) - QBZ-95-1式輕機槍 (數位蜂巢迷彩) - QBZ-95-1式轻机枪 (数位蜂巢迷彩) QBU-88 (Black) @@ -2891,10 +2087,6 @@ QBU-88 (Nero) QBU-88 (Fekete) QBU-88 (Preto) - QBU-88 (黒) - QBU-88 (검정) - QBU-88式狙擊步槍 (黑色) - QBU-88式狙击步枪 (黑色) QBU-88 (Green Hex) @@ -2907,10 +2099,6 @@ QBU-88 (Verde Hex) QBU-88 (Zöld Hex) QBU-88 (Hex Verde) - QBU-88 (緑蜂巣) - QBU-88 (초록육각) - QBU-88式狙擊步槍 (綠色數位蜂巢迷彩) - QBU-88式狙击步枪 (绿色数位蜂巢迷彩) QBU-88 (Hex) @@ -2923,10 +2111,6 @@ QBU-88 (Hex) QBU-88 (Hex) QBU-88 (Hex) - QBU-88 (蜂巣) - QBU-88 (육각) - QBU-88式狙擊步槍 (數位蜂巢迷彩) - QBU-88式狙击步枪 (数位蜂巢迷彩) GM6 Lynx (Green Hex) @@ -2939,10 +2123,6 @@ GM6 Lynx (Verde Hex) GM6 Lynx (Zöld Hex) GM6 Lynx (Hex Verde) - GM6 リンクス (緑蜂巣) - GM6 Lynx (초록육각) - GM6"天貓"反器材狙擊步槍 (綠色數位蜂巢迷彩) - GM6"天猫"反器材狙击步枪 (绿色数位蜂巢迷彩) M249 SPW @@ -2955,10 +2135,6 @@ M249 SPW M249 SPW M249 SPW - M249 SPW - M249 SPW - M249班用自動機槍 - M249班用自动机枪 M200 Intervention (Tropic) @@ -2971,10 +2147,6 @@ M200 Intervention (тропик) M200 Intervention (Trópico) M200 Intervention (Tropico) - M200 インターベンション (熱帯) - M200 Intervention (열대) - M200干預型狙擊步槍 (熱帶迷彩) - M200干预型狙击步枪 (热带迷彩) MP5K @@ -2987,106 +2159,78 @@ MP5K MP5K MP5K - MP5K - MP5K - MP5K衝鋒槍 - MP5K冲锋枪 - HK416A5 11" (Black) - HK416A5 11" (Černá) - HK416A5 11" (Noir) - HK416A5 11" (Negro) - HK416A5 11" (Чёрный) - HK416A5 11" (czarny) - HK416A5 11" (Schwarz) - HK416A5 11" (Nero) - HK416A5 11" (Fekete) - HK416A5 11" (Preto) - HK416A5 11" (黒) - HK416A5 11" (검정) - HK416A5 11"突擊步槍 (黑色) - HK416A5 11"突击步枪 (黑色) + HK416A5 10" (Black) + HK416A5 10" (Černá) + HK416A5 10" (Noir) + HK416A5 10" (Negro) + HK416A5 10" (Чёрный) + HK416A5 10" (czarny) + HK416A5 10" (Schwarz) + HK416A5 10" (Nero) + HK416A5 10" (Fekete) + HK416A5 10" (Preto) - HK416A5 11" (Khaki) - HK416A5 11" (Khaki) - HK416A5 11" (Kaki) - HK416A5 11" (Caqui) - HK416A5 11" (Хаки) - HK416A5 11" (khaki) - HK416A5 11" (Khaki) - HK416A5 11" (Khaki) - HK416A5 11" (Khaki) - HK416A5 11" (Caqui) - HK416A5 11" (土埃) - HK416A5 11" (카키) - HK416A5 11"突擊步槍 (卡其色) - HK416A5 11"突击步枪 (卡其色) + HK416A5 10" (Khaki) + HK416A5 10" (Khaki) + HK416A5 10" (Kaki) + HK416A5 10" (Caqui) + HK416A5 10" (Хаки) + HK416A5 10" (khaki) + HK416A5 10" (Khaki) + HK416A5 10" (Khaki) + HK416A5 10" (Khaki) + HK416A5 10" (Caqui) - HK416A5 11" (Sand) - HK416A5 11" (Písková) - HK416A5 11" (Beige) - HK416A5 11" (Arena) - HK416A5 11" (Песочный) - HK416A5 11" (Sand) - HK416A5 11" (piaskowy) - HK416A5 11" (Sabbia) - HK416A5 11" (Homok) - HK416A5 11" (Deserto) - HK416A5 11" (砂地) - HK416A5 11" (모래) - HK416A5 11"突擊步槍 (沙色) - HK416A5 11"突击步枪 (沙色) + HK416A5 10" (Sand) + HK416A5 10" (Písková) + HK416A5 10" (Beige) + HK416A5 10" (Arena) + HK416A5 10" (Песочный) + HK416A5 10" (Sand) + HK416A5 10" (piaskowy) + HK416A5 10" (Sabbia) + HK416A5 10" (Homok) + HK416A5 10" (Deserto) - HK416A5 11" GL (Black) - HK416A5 11" GL (Černá) - HK416A5 11" GL (Noir) - HK416A5 11" GL (Negro) - HK416A5 11" GL (Чёрный) - HK416A5 11" GL (czarny) - HK416A5 11" GL (Schwarz) - HK416A5 11" GL (Nero) - HK416A5 11" GL (Fekete) - HK416A5 11" GL (Preto) - HK416A5 11" GL (黒) - HK416A5 11" GL (검정) - HK416A5 11"突擊步槍 (榴彈-黑色) - HK416A5 11"突击步枪 (榴弹-黑色) + HK416A5 10" GL (Black) + HK416A5 10" GL (Černá) + HK416A5 10" GL (Noir) + HK416A5 10" GL (Negro) + HK416A5 10" GL (Чёрный) + HK416A5 10" GL (czarny) + HK416A5 10" GL (Schwarz) + HK416A5 10" GL (Nero) + HK416A5 10" GL (Fekete) + HK416A5 10" GL (Preto) - HK416A5 11" GL (Khaki) - HK416A5 11" GL (Khaki) - HK416A5 11" GL (Kaki) - HK416A5 11" GL (Caqui) - HK416A5 11" GL (Хаки) - HK416A5 11" GL (khaki) - HK416A5 11" GL (Khaki) - HK416A5 11" GL (Khaki) - HK416A5 11" GL (Khaki) - HK416A5 11" GL (Caqui) - HK416A5 11" GL (土埃) - HK416A5 11" GL (카키) - HK416A5 11"突擊步槍 (榴彈-卡其色) - HK416A5 11"突击步枪 (榴弹-卡其色) + HK416A5 10" GL (Khaki) + HK416A5 10" GL (Khaki) + HK416A5 10" GL (Kaki) + HK416A5 10" GL (Caqui) + HK416A5 10" GL (Хаки) + HK416A5 10" GL (khaki) + HK416A5 10" GL (Khaki) + HK416A5 10" GL (Khaki) + HK416A5 10" GL (Khaki) + HK416A5 10" GL (Caqui) - HK416A5 11" GL (Sand) - HK416A5 11" GL (Písková) - HK416A5 11" GL (Beige) - HK416A5 11" GL (Arena) - HK416A5 11" GL (Песочный) - HK416A5 11" GL (Sand) - HK416A5 11" GL (piaskowy) - HK416A5 11" GL (Sabbia) - HK416A5 11" GL (Homok) - HK416A5 11" GL (Deserto) - HK416A5 11" GL (砂地) - HK416A5 11" GL (모래) - HK416A5 11"突擊步槍 (榴彈-沙色) - HK416A5 11"突击步枪 (榴弹-沙色) + HK416A5 10" GL (Sand) + HK416A5 10" GL (Písková) + HK416A5 10" GL (Beige) + HK416A5 10" GL (Arena) + HK416A5 10" GL (Песочный) + HK416A5 10" GL (Sand) + HK416A5 10" GL (piaskowy) + HK416A5 10" GL (Sabbia) + HK416A5 10" GL (Homok) + HK416A5 10" GL (Deserto) HK416A5 14.5" (Black) @@ -3099,10 +2243,6 @@ HK416A5 14.5" (Nero) HK416A5 14.5" (Fekete) HK416A5 14.5" (Preto) - HK416A5 14.5" (黒) - HK416A5 14.5" (검정) - HK416A5 14.5"突擊步槍 (黑色) - HK416A5 14.5"突击步枪 (黑色) HK416A5 14.5" (Khaki) @@ -3115,10 +2255,6 @@ HK416A5 14.5" (Khaki) HK416A5 14.5" (Khaki) HK416A5 14.5" (Caqui) - HK416A5 14.5" (土埃) - HK416A5 14.5" (카키) - HK416A5 14.5"突擊步槍 (卡其色) - HK416A5 14.5"突击步枪 (卡其色) HK416A5 14.5" (Sand) @@ -3131,10 +2267,6 @@ HK416A5 14.5" (Sabbia) HK416A5 14.5" (Homok) HK416A5 14.5" (Deserto) - HK416A5 14.5" (砂地) - HK416A5 14.5" (모래) - HK416A5 14.5"突擊步槍 (沙色) - HK416A5 14.5"突击步枪 (沙色) HK417A2 20" (Black) @@ -3147,10 +2279,6 @@ HK417A2 20" (Nero) HK417A2 20" (Fekete) HK417A2 20" (Preto) - HK417A2 20" (黒) - HK417A2 20" (검정) - HK417A2 20"突擊步槍 (黑色) - HK417A2 20"突击步枪 (黑色) HK417A2 20" (Khaki) @@ -3163,10 +2291,6 @@ HK417A2 20" (Khaki) HK417A2 20" (Khaki) HK417A2 20" (Caqui) - HK417A2 20" (土埃) - HK417A2 20" (카키) - HK417A2 20"突擊步槍 (卡其色) - HK417A2 20"突击步枪 (卡其色) HK417A2 20" (Sand) @@ -3179,10 +2303,6 @@ HK417A2 20" (Sabbia) HK417A2 20" (Homok) HK417A2 20" (Deserto) - HK417A2 20" (砂地) - HK417A2 20" (모래) - HK417A2 20"突擊步槍 (沙色) - HK417A2 20"突击步枪 (沙色) RPG-32 (Green Hex) @@ -3195,10 +2315,6 @@ RPG-32 (Verde Hex) RPG-32 (Zöld Hex) RPG-32 (Hex Verde) - RPG-32 (緑蜂巣) - RPG-32 (초록육각) - RPG-32火箭發射器 (綠色數位蜂巢迷彩) - RPG-32火箭发射器 (绿色数位蜂巢迷彩) P99 (Khaki) @@ -3211,10 +2327,6 @@ P99 (Khaki) P99 (Khaki) P99 (Caqui) - P99 (カーキ) - P99 (카키) - P99半自動手槍 (卡其色) - P99半自动手枪 (卡其色) Makarov PM @@ -3227,10 +2339,6 @@ Makarov PM Makarov PM Makarov PM - マカロフ PM - Makarov PM - "馬卡洛夫"手槍 - "马卡洛夫"手枪 - + \ No newline at end of file diff --git a/addons/realisticweights/CfgWeapons.hpp b/addons/realisticweights/CfgWeapons.hpp index 25b83815b4..5c60f8d464 100644 --- a/addons/realisticweights/CfgWeapons.hpp +++ b/addons/realisticweights/CfgWeapons.hpp @@ -3,9 +3,6 @@ class CfgWeapons { class Rifle_Long_Base_F: Rifle_Base_F { class WeaponSlotsInfo; }; - class Rifle_Short_Base_F: Rifle_Base_F { - class WeaponSlotsInfo; - }; class Launcher; class Launcher_Base_F: Launcher { class WeaponSlotsInfo; @@ -179,7 +176,7 @@ class CfgWeapons { // - SMGs --------------------------------------------------------------------- // - CPW ------------------------------------------------------------------ - class pdw2000_base_F: Rifle_Short_Base_F { + class pdw2000_base_F: Rifle_Base_F { class WeaponSlotsInfo; }; class hgun_PDW2000_F: pdw2000_base_F { @@ -189,7 +186,7 @@ class CfgWeapons { }; // - KRISS Vector --------------------------------------------------------- - class SMG_01_Base: Rifle_Short_Base_F { + class SMG_01_Base: Rifle_Base_F { class WeaponSlotsInfo; }; class SMG_01_F: SMG_01_Base { @@ -199,7 +196,7 @@ class CfgWeapons { }; // - CZ Scorpion ---------------------------------------------------------- - class SMG_02_base_F: Rifle_Short_Base_F { + class SMG_02_base_F: Rifle_Base_F { class WeaponSlotsInfo; }; class SMG_02_F: SMG_02_base_F { @@ -289,16 +286,6 @@ class CfgWeapons { }; }; - // - Cyrus ------------------------------------------------------ - class DMR_05_base_F: Rifle_Long_Base_F { - class WeaponSlotsInfo; - }; - class srifle_DMR_05_blk_F: DMR_05_base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - mass = 140; - }; - }; - // - SIG 556 -------------------------------------------------------------- class DMR_03_base_F: Rifle_Long_Base_F { class WeaponSlotsInfo; diff --git a/addons/realisticweights/script_component.hpp b/addons/realisticweights/script_component.hpp index fcdb345068..e933b6220c 100644 --- a/addons/realisticweights/script_component.hpp +++ b/addons/realisticweights/script_component.hpp @@ -3,6 +3,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_REALISTICWEIGHTS diff --git a/addons/rearm/ACE_Settings.hpp b/addons/rearm/ACE_Settings.hpp index 2e0fae277f..798bbd7650 100644 --- a/addons/rearm/ACE_Settings.hpp +++ b/addons/rearm/ACE_Settings.hpp @@ -7,11 +7,4 @@ class ACE_Settings { typeName = "SCALAR"; values[] = {CSTRING(RearmSettings_vehicle), CSTRING(RearmSettings_magazine), CSTRING(RearmSettings_caliber)}; }; - class GVAR(supply) { - displayName = CSTRING(RearmSettings_supply_DisplayName); - description = CSTRING(RearmSettings_supply_Description); - value = 0; - typeName = "SCALAR"; - values[] = {CSTRING(RearmSettings_unlimited), CSTRING(RearmSettings_limited), CSTRING(RearmSettings_magazineSupply)}; - }; }; diff --git a/addons/rearm/CfgVehicles.hpp b/addons/rearm/CfgVehicles.hpp index de141c2837..44b7fe38af 100644 --- a/addons/rearm/CfgVehicles.hpp +++ b/addons/rearm/CfgVehicles.hpp @@ -1,16 +1,41 @@ + #define MACRO_REARM_ACTIONS \ - class ACE_Actions { \ - class ACE_MainActions { \ - class GVAR(Rearm) { \ - displayName = CSTRING(Rearm); \ - distance = REARM_ACTION_DISTANCE; \ - condition = QUOTE(_this call FUNC(canRearm)); \ - statement = QUOTE(_this call FUNC(rearm)); \ - exceptions[] = {"isNotInside"}; \ - icon = QPATHTOF(ui\icon_rearm_interact.paa); \ + class ACE_Actions { \ + class ACE_MainActions { \ + class GVAR(Rearm) { \ + displayName = CSTRING(Rearm); \ + distance = REARM_ACTION_DISTANCE; \ + condition = QUOTE(_this call FUNC(canRearm)); \ + statement = QUOTE(_player call FUNC(rearm)); \ + exceptions[] = {"isNotInside"}; \ + icon = QPATHTOF(ui\icon_rearm_interact.paa); \ + }; \ }; \ - }; \ - }; + }; + +#define MACRO_REARM_TRUCK_ACTIONS \ + class ACE_Actions: ACE_Actions { \ + class ACE_MainActions: ACE_MainActions { \ + class GVAR(TakeAmmo) { \ + displayName = CSTRING(TakeAmmo); \ + distance = REARM_ACTION_DISTANCE; \ + condition = QUOTE(_this call FUNC(canTakeAmmo)); \ + insertChildren = QUOTE(_target call FUNC(addRearmActions)); \ + exceptions[] = {"isNotInside"}; \ + showDisabled = 0; \ + priority = 2; \ + icon = QPATHTOF(ui\icon_rearm_interact.paa); \ + }; \ + class GVAR(StoreAmmo) { \ + displayName = CSTRING(StoreAmmo); \ + distance = REARM_ACTION_DISTANCE; \ + condition = QUOTE(_this call FUNC(canStoreAmmo)); \ + statement = QUOTE(_this call FUNC(storeAmmo)); \ + exceptions[] = {"isNotInside"}; \ + icon = QPATHTOF(ui\icon_rearm_interact.paa); \ + }; \ + }; \ + }; class CBA_Extended_EventHandlers; @@ -47,26 +72,6 @@ class CfgVehicles { }; }; }; - class supply { - displayName = CSTRING(RearmSettings_supply_DisplayName); - description = CSTRING(RearmSettings_supply_Description); - typeName = "NUMBER"; - class values { - class unlimited { - name = CSTRING(RearmSettings_unlimited); - value = 0; - default = 1; - }; - class magazine { - name = CSTRING(RearmSettings_limited); - value = 1; - }; - class caliber { - name = CSTRING(RearmSettings_magazineSupply); - value = 2; - }; - }; - }; }; class ModuleDescription { description = CSTRING(RearmSettings_Module_Description); @@ -100,71 +105,66 @@ class CfgVehicles { MACRO_REARM_ACTIONS }; - class Truck_03_base_F; + + // Ammo Vehicles (with full inheritance for granted ACE_Actions) + class Car_F: Car {}; + class Truck_F: Car_F {}; + + class Truck_03_base_F: Truck_F {}; class O_Truck_03_ammo_F: Truck_03_base_F { transportAmmo = 0; - GVAR(defaultSupply) = 1200; + MACRO_REARM_TRUCK_ACTIONS }; - class Truck_02_Ammo_base_F; + class Truck_02_base_F: Truck_F {}; + class Truck_02_Ammo_base_F: Truck_02_base_F {}; class I_Truck_02_ammo_F: Truck_02_Ammo_base_F { transportAmmo = 0; - GVAR(defaultSupply) = 1200; + MACRO_REARM_TRUCK_ACTIONS }; class O_Truck_02_Ammo_F: Truck_02_Ammo_base_F { transportAmmo = 0; - GVAR(defaultSupply) = 1200; + MACRO_REARM_TRUCK_ACTIONS }; - class B_Truck_01_mover_F; + class Truck_01_base_F: Truck_F {}; + class B_Truck_01_transport_F: Truck_01_base_F {}; + class B_Truck_01_mover_F: B_Truck_01_transport_F {}; class B_Truck_01_ammo_F: B_Truck_01_mover_F { transportAmmo = 0; - GVAR(defaultSupply) = 1200; + MACRO_REARM_TRUCK_ACTIONS }; - class B_APC_Tracked_01_base_F; - class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F { - transportAmmo = 0; - GVAR(defaultSupply) = 1200; - }; - - class Heli_Transport_04_base_F; + class Helicopter_Base_F: Helicopter {}; + class Helicopter_Base_H: Helicopter_Base_F {}; + class Heli_Transport_04_base_F: Helicopter_Base_H {}; class O_Heli_Transport_04_ammo_F: Heli_Transport_04_base_F { transportAmmo = 0; - GVAR(defaultSupply) = 1200; + MACRO_REARM_TRUCK_ACTIONS }; - class Pod_Heli_Transport_04_base_F; + class ThingX; + class ReammoBox_F: ThingX { + class ACE_Actions { + class ACE_MainActions {}; + }; + }; + class Slingload_base_F: ReammoBox_F {}; + class Slingload_01_Base_F: Slingload_base_F {}; + + class Pod_Heli_Transport_04_base_F: Slingload_base_F {}; class Land_Pod_Heli_Transport_04_ammo_F: Pod_Heli_Transport_04_base_F { transportAmmo = 0; - GVAR(defaultSupply) = 1200; + MACRO_REARM_TRUCK_ACTIONS }; - class Slingload_01_Base_F; class B_Slingload_01_Ammo_F: Slingload_01_Base_F { transportAmmo = 0; - GVAR(defaultSupply) = 1200; + MACRO_REARM_TRUCK_ACTIONS }; - class ReammoBox_F; - class NATO_Box_Base: ReammoBox_F{}; - class Box_NATO_AmmoVeh_F: NATO_Box_Base { - transportAmmo = 0; - GVAR(defaultSupply) = 1200; - }; - class EAST_Box_Base: ReammoBox_F{}; - class Box_East_AmmoVeh_F: EAST_Box_Base { - transportAmmo = 0; - GVAR(defaultSupply) = 1200; - }; - class IND_Box_Base: ReammoBox_F{}; - class Box_IND_AmmoVeh_F: IND_Box_Base { - transportAmmo = 0; - GVAR(defaultSupply) = 1200; - }; // Dummy Vehicles - class ThingX; class GVAR(defaultCarriedObject): ThingX { class EventHandlers { class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; diff --git a/addons/rearm/XEH_PREP.hpp b/addons/rearm/XEH_PREP.hpp index 59a43b4b29..8e3c10cd2c 100644 --- a/addons/rearm/XEH_PREP.hpp +++ b/addons/rearm/XEH_PREP.hpp @@ -1,37 +1,26 @@ -PREP(addMagazineToSupply); PREP(addRearmActions); -PREP(addVehicleMagazinesToSupply); -PREP(canReadSupplyCounter); PREP(canRearm); PREP(canStoreAmmo); PREP(canTakeAmmo); PREP(createDummy); PREP(disable); PREP(dropAmmo); -PREP(getCaliber); -PREP(getHardpointMagazines); +PREP(getConfigMagazines); PREP(getMaxMagazines); PREP(getNeedRearmMagazines); -PREP(getSupplyCount); -PREP(getVehicleMagazines); PREP(grabAmmo); PREP(handleKilled); PREP(handleUnconscious); -PREP(hasEnoughSupply); -PREP(initSupplyVehicle); PREP(makeDummy); PREP(moduleRearmSettings); PREP(pickUpAmmo); -PREP(readSupplyCounter); PREP(rearm); PREP(rearmEntireVehicle); PREP(rearmEntireVehicleSuccess); PREP(rearmEntireVehicleSuccessLocal); PREP(rearmSuccess); PREP(rearmSuccessLocal); -PREP(removeMagazineFromSupply); -PREP(setSupplyCount); PREP(storeAmmo); PREP(takeAmmo); PREP(takeSuccess); diff --git a/addons/rearm/XEH_postInit.sqf b/addons/rearm/XEH_postInit.sqf index 50ab97cb07..cfbbdf9d4d 100644 --- a/addons/rearm/XEH_postInit.sqf +++ b/addons/rearm/XEH_postInit.sqf @@ -1,14 +1,6 @@ #include "script_component.hpp" -GVAR(hardpointGroupsCache) = [] call CBA_fnc_createNamespace; -GVAR(configTypesAdded) = []; -["ace_settingsInitialized", { - TRACE_2("settingsInit",GVAR(level),GVAR(supply)); - ["LandVehicle", "Init", {_this call FUNC(initSupplyVehicle)}, true, ["StaticWeapon"], true] call CBA_fnc_addClassEventHandler; - ["ReammoBox_F", "Init", {_this call FUNC(initSupplyVehicle)}, true, [], true] call CBA_fnc_addClassEventHandler; -}] call CBA_fnc_addEventHandler; - -["ace_unconscious", LINKFUNC(handleUnconscious)] call CBA_fnc_addEventHandler; +["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler; ["vehicle", { params ["_unit"]; [_unit] call FUNC(dropAmmo); @@ -18,14 +10,6 @@ if (isServer) then { addMissionEventHandler ["HandleDisconnect", {params ["_unit"]; [_unit] call FUNC(dropAmmo)}]; }; -[QGVAR(makeDummyEH), LINKFUNC(makeDummy)] call CBA_fnc_addEventHandler; -[QGVAR(rearmEntireVehicleSuccessLocalEH), LINKFUNC(rearmEntireVehicleSuccessLocal)] call CBA_fnc_addEventHandler; -[QGVAR(rearmSuccessLocalEH), LINKFUNC(rearmSuccessLocal)] call CBA_fnc_addEventHandler; - - -#ifdef DEBUG_MODE_FULL -INFO("Showing CfgVehicles with vanilla transportAmmo"); -{ - WARNING_2("Type [%1] needs config [transportAmmo: %2]", configName _x, getNumber (_x >> 'transportAmmo')); -} forEach (configProperties [configFile >> "CfgVehicles", "(isClass _x) && {(getNumber (_x >> 'transportAmmo')) > 0}", true]); -#endif +[QGVAR(makeDummyEH), FUNC(makeDummy)] call CBA_fnc_addEventHandler; +[QGVAR(rearmEntireVehicleSuccessLocalEH), FUNC(rearmEntireVehicleSuccessLocal)] call CBA_fnc_addEventHandler; +[QGVAR(rearmSuccessLocalEH), FUNC(rearmSuccessLocal)] call CBA_fnc_addEventHandler; diff --git a/addons/rearm/XEH_preInit.sqf b/addons/rearm/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/rearm/XEH_preInit.sqf +++ b/addons/rearm/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/rearm/XEH_respawn.sqf b/addons/rearm/XEH_respawn.sqf index 5148894f98..33ac042e7c 100644 --- a/addons/rearm/XEH_respawn.sqf +++ b/addons/rearm/XEH_respawn.sqf @@ -10,4 +10,4 @@ if !(isNull _dummy) then { detach _dummy; deleteVehicle _dummy; }; -_unit setVariable [QGVAR(dummy), nil]; +_unit setVariable [QGVAR(dummy), nil]; \ No newline at end of file diff --git a/addons/rearm/functions/fnc_addMagazineToSupply.sqf b/addons/rearm/functions/fnc_addMagazineToSupply.sqf deleted file mode 100644 index 0a3be574f8..0000000000 --- a/addons/rearm/functions/fnc_addMagazineToSupply.sqf +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Author: GitHawk - * Adds magazines to the supply. [Global Effects] - * - * Arguments: - * 0: Ammo Truck - * 1: Magazine Classname - * 2: Only partial (default: false) - * - * Return Value: - * None - * - * Example: - * [ammo_truck, "32Rnd_155mm_Mo_shells"] call ace_rearm_fnc_addMagazineToSupply - * - * Public: Yes - */ -#include "script_component.hpp" - -if !(EGVAR(common,settingsInitFinished)) exitWith { // only run this after the settings are initialized - EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addMagazineToSupply), _this]; -}; - -params [["_truck", objNull, [objNull]], ["_magazineClass", "", [""]], ["_partial", false, [false]]]; -TRACE_3("addMagazineToSupply",_truck,_magazineClass,_partial); - -if (GVAR(supply) == 0) exitWith {WARNING("supply setting is set to unlimited");}; - -if (isNull _truck || {_magazineClass isEqualTo ""}) exitWith {}; - -([_magazineClass] call FUNC(getCaliber)) params ["_cal", "_idx"]; - -// With limited supply, we add the caliber to the supply count -if (GVAR(supply) == 1) then { - private _supply = [_truck] call FUNC(getSupplyCount); - private _amountToAdd = if (!_partial || {GVAR(level) == 1}) then { - _cal - } else { - private _magazinePart = ((REARM_COUNT select _idx) / (getNumber (configFile >> "CfgMagazines" >> _magazineClass >> "count"))) min 1; - _cal * _magazinePart - }; - TRACE_1("Adding",_amountToAdd); - [_truck, (_supply + _amountToAdd)] call FUNC(setSupplyCount); -}; - -// With magazine specific supply, we add or update the magazineSupply array -if (GVAR(supply) == 2) then { - private _magazineSupply = _truck getVariable [QGVAR(magazineSupply), []]; - private _magazineIdx = -1; - { - _x params ["_magazine", "_rounds"]; - if ((_magazine isEqualTo _magazineClass)) exitWith { - _magazineIdx = _forEachIndex; - }; - } forEach _magazineSupply; - - private _roundsPerTransaction = getNumber (configFile >> "CfgMagazines" >> _magazineClass >> "count"); - if (_partial) then { - _roundsPerTransaction = _roundsPerTransaction min (REARM_COUNT select _idx); - }; - if (_magazineIdx == -1) then { - if (_magazineSupply isEqualTo []) then { - _magazineSupply = [[_magazineClass, _roundsPerTransaction]]; - } else { - _magazineSupply append [[_magazineClass, _roundsPerTransaction]]; - } - } else { - (_magazineSupply select _magazineIdx) params ["", "_rounds"]; - _magazineSupply set [_magazineIdx, [_magazineClass, (_rounds + _roundsPerTransaction)]]; - }; - _truck setVariable [QGVAR(magazineSupply), _magazineSupply, true]; -}; diff --git a/addons/rearm/functions/fnc_addRearmActions.sqf b/addons/rearm/functions/fnc_addRearmActions.sqf index c017c93509..db92df470d 100644 --- a/addons/rearm/functions/fnc_addRearmActions.sqf +++ b/addons/rearm/functions/fnc_addRearmActions.sqf @@ -15,102 +15,79 @@ */ #include "script_component.hpp" -params [["_truck", objNull, [objNull]]]; +private ["_vehicleActions", "_actions", "_action", "_vehicles", "_vehicle", "_needToAdd", "_magazineHelper", "_turretPath", "_magazines", "_magazine", "_icon", "_cnt"]; +params [["_target", objNull, [objNull]]]; -private _vehicles = nearestObjects [_truck, ["AllVehicles"], 20]; -_vehicles = _vehicles select {(_x != _truck) && {!(_x isKindOf "CAManBase")} && {!(_x getVariable [QGVAR(disabled), false])}}; +_vehicles = nearestObjects [_target, ["AllVehicles"], 20]; +if (count _vehicles < 2) exitWith {false}; // Rearming needs at least 2 vehicles -private _vehicleActions = []; +_vehicleActions = []; { - private _vehicle = _x; - private _magazineHelper = []; - { - private _turretPath = _x; - private _magazines = [_vehicle, _turretPath] call FUNC(getVehicleMagazines); + _actions = []; + _vehicle = _x; + _needToAdd = false; + _action = []; + if !((_vehicle == _target) || (_vehicle isKindOf "CAManBase")) then { + _magazineHelper = []; { - private _magazine = _x; - if (!(_magazine in _magazineHelper)) then { - private _currentMagazines = { _x == _magazine } count (_vehicle magazinesTurret _turretPath); - private _maxMagazines = [_vehicle, _turretPath, _magazine] call FUNC(getMaxMagazines); - - if ((_currentMagazines < _maxMagazines) || {(_vehicle magazineTurretAmmo [_magazine, _turretPath]) < getNumber (configFile >> "CfgMagazines" >> _magazine >> "count")}) then { - _magazineHelper pushBack _magazine; - }; - }; - false - } count _magazines; - false - } count REARM_TURRET_PATHS; - - // 1.70 pylons - private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]; - { - private _pylonName = configName _x; - private _pylonAmmo = _vehicle ammoOnPylon _pylonName; - private _pylonMagazine = (getPylonMagazines _vehicle) select _forEachIndex; - TRACE_3("",_pylonName,_pylonAmmo,_pylonMagazine); - - if (_pylonAmmo > 0) then { - // Try to refill current pylon: - private _magAmmo = getNumber (configFile >> "CfgMagazines" >> _pylonMagazine >> "count"); - if ((!(_pylonMagazine in _magazineHelper)) && {_pylonAmmo < _magAmmo}) then { - _magazineHelper pushBack _pylonMagazine; - }; - } else { - // See what we magazines can add to the empty pylon: - private _hardpointMags = [_x] call FUNC(getHardpointMagazines); + _turretPath = _x; + _magazines = [_vehicle, _turretPath] call FUNC(getConfigMagazines); { - if (!(_x in _magazineHelper)) then { - _magazineHelper pushBack _x; + _magazine = _x; + _currentMagazines = { _x == _magazine } count (_vehicle magazinesTurret _turretPath); + if ((_currentMagazines < ([_vehicle, _turretPath, _magazine] call FUNC(getMaxMagazines))) && !(_magazine in _magazineHelper)) then { + _action = [_magazine, + getText(configFile >> "CfgMagazines" >> _magazine >> "displayName"), + getText(configFile >> "CfgMagazines" >> _magazine >> "picture"), + {_this call FUNC(takeAmmo)}, + {true}, + {}, + [_magazine, _vehicle]] call EFUNC(interact_menu,createAction); + _actions pushBack [_action, [], _target]; + _magazineHelper pushBack _magazine; + _needToAdd = true; + } else { + if (((_vehicle magazineTurretAmmo [_magazine, _turretPath]) < getNumber (configFile >> "CfgMagazines" >> _magazine >> "count")) && !(_magazine in _magazineHelper)) then { + _action = [_magazine, + getText(configFile >> "CfgMagazines" >> _magazine >> "displayName"), + getText(configFile >> "CfgMagazines" >> _magazine >> "picture"), + {_this call FUNC(takeAmmo)}, + {true}, + {}, + [_magazine, _vehicle]] call EFUNC(interact_menu,createAction); + _actions pushBack [_action, [], _target]; + _magazineHelper pushBack _magazine; + _needToAdd = true; + }; }; - } forEach _hardpointMags; - }; - } forEach _pylonConfigs; - - _magazineHelper = _magazineHelper select {[_truck, _x] call FUNC(hasEnoughSupply)}; - TRACE_2("can add",_x,_magazineHelper); - - if (!(_magazineHelper isEqualTo [])) then { - private _icon = getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Icon"); + } forEach _magazines; + } forEach REARM_TURRET_PATHS; + }; + if (_needToAdd && !(_vehicle getVariable [QGVAR(disabled), false])) then { + _icon = getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Icon"); if !((_icon select [0, 1]) == "\") then { _icon = ""; }; if (GVAR(level) == 0) then { - // [Level 0] adds a single action to rearm the entire vic - private _action = [_vehicle, - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName"), - _icon, - {_this call FUNC(rearmEntireVehicle)}, - {true}, - {}, - _vehicle] call EFUNC(interact_menu,createAction); - _vehicleActions pushBack [_action, [], _truck]; - } else { - // [Level 1,2] - Add actions for each magazine - private _actions = []; - { - private _action = [_x, - getText(configFile >> "CfgMagazines" >> _x >> "displayName"), - getText(configFile >> "CfgMagazines" >> _x >> "picture"), - {_this call FUNC(takeAmmo)}, + _action = [_vehicle, + getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName"), + _icon, + {_this call FUNC(rearmEntireVehicle)}, {true}, {}, - [_x, _vehicle]] call EFUNC(interact_menu,createAction); - - _actions pushBack [_action, [], _truck]; - } forEach _magazineHelper; - - private _action = [_vehicle, + _vehicle] call EFUNC(interact_menu,createAction); + _vehicleActions pushBack [_action, [], _target]; + } else { + _action = [_vehicle, getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName"), _icon, {}, {true}, {}, []] call EFUNC(interact_menu,createAction); - _vehicleActions pushBack [_action, _actions, _truck]; + _vehicleActions pushBack [_action, _actions, _target]; }; }; - false -} count _vehicles; +} forEach _vehicles; _vehicleActions diff --git a/addons/rearm/functions/fnc_addVehicleMagazinesToSupply.sqf b/addons/rearm/functions/fnc_addVehicleMagazinesToSupply.sqf deleted file mode 100644 index 087ea7fddd..0000000000 --- a/addons/rearm/functions/fnc_addVehicleMagazinesToSupply.sqf +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Author: GitHawk - * Adds all magazines of a vehicle to the supply. - * - * Arguments: - * 0: Ammo Truck - * 1: Vehicle object or Vehicle class - * - * Return Value: - * None - * - * Example: - * [ammo_truck, tank] call ace_rearm_fnc_addVehicleMagazinesToSupply - * [ammo_truck, "B_MBT_01_arty_F"] call ace_rearm_fnc_addVehicleMagazinesToSupply - * - * Public: Yes - */ -#include "script_component.hpp" - -if !(EGVAR(common,settingsInitFinished)) exitWith { // only run this after the settings are initialized - EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addVehicleMagazinesToSupply), _this]; -}; - -params [["_truck", objNull, [objNull]], ["_vehicle", objNull, [objNull, ""]]]; -TRACE_2("addVehicleMagazinesToSupply",_truck,_vehicle); - -if (isNull _truck) exitWith {}; -if (_vehicle isEqualType objNull) then {_vehicle = typeOf _vehicle}; -if (_vehicle == "") exitWith { - ERROR_1("VehicleType [%1] is empty in ace_rearm_fnc_addVehicleMagazinesToSupply",_string); -}; -{ - private _turretPath = _x; - private _magazines = [_vehicle, _turretPath] call FUNC(getVehicleMagazines); - TRACE_2("",_turretPath,_magazines); - { - [_truck, _x] call FUNC(addMagazineToSupply); - false - } count _magazines; - false -} count REARM_TURRET_PATHS; - -// 1.70 pylons -private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]; -{ - private _defaultMag = getText (_x >> "attachment"); - TRACE_3("",_defaultMag,configName _x,_forEachIndex); - [_truck, _defaultMag] call FUNC(addMagazineToSupply); -} forEach _pylonConfigs; diff --git a/addons/rearm/functions/fnc_canReadSupplyCounter.sqf b/addons/rearm/functions/fnc_canReadSupplyCounter.sqf deleted file mode 100644 index 80b5d35cd7..0000000000 --- a/addons/rearm/functions/fnc_canReadSupplyCounter.sqf +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Author: GitHawk - * Checks if unit can read supply counter. [Only for GVAR(supply) > 0] - * - * Arguments: - * 0: Ammo Truck - * 1: Unit - * - * Return Value: - * Can read supply counter - * - * Example: - * [ammo_truck, player] call ace_rearm_fnc_canReadSupplyCounter - * - * Public: No - */ -#include "script_component.hpp" - -params [ - ["_truck", objNull, [objNull]], - ["_unit", objNull, [objNull]] -]; - -(alive _unit) -&& {_unit isKindOf "CAManBase"} -&& {local _unit} -&& {alive _truck} -&& {(_truck distance _unit) < REARM_ACTION_DISTANCE} -&& {GVAR(supply) > 0} -&& {[_unit, _truck, ["IsNotInside"]] call EFUNC(common,canInteractWith)} // manually added actions need this - diff --git a/addons/rearm/functions/fnc_canRearm.sqf b/addons/rearm/functions/fnc_canRearm.sqf index ea41cae5a9..202524dd10 100644 --- a/addons/rearm/functions/fnc_canRearm.sqf +++ b/addons/rearm/functions/fnc_canRearm.sqf @@ -3,30 +3,27 @@ * Check if a unit can rearm. * * Arguments: - * 0: Vehicle + * 0: Target * 1: Unit * * Return Value: * Can Rearm * * Example: - * [tank, player] call ace_rearm_fnc_canRearm + * [player, tank] call ace_rearm_fnc_canRearm * * Public: No */ #include "script_component.hpp" -params [ - ["_vehicle", objNull, [objNull]], - ["_unit", objNull, [objNull]] -]; +private ["_dummy","_magazineClass"]; +params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]]; -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}; +if (GVAR(level) == 0 || {isNull _unit} || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {_target distance _unit > REARM_ACTION_DISTANCE} || {_target getVariable [QGVAR(disabled), false]}) exitWith {false}; -private _dummy = _unit getVariable [QGVAR(dummy), objNull]; +_dummy = _unit getVariable [QGVAR(dummy), objNull]; if (isNull _dummy) exitwith {false}; -private _magazineClass = _dummy getVariable QGVAR(magazineClass); +_magazineClass = _dummy getVariable QGVAR(magazineClass); if (isNil "_magazineClass") exitWith {false}; -([_vehicle, _magazineClass] call FUNC(getNeedRearmMagazines)) select 0 +([_target, _magazineClass] call FUNC(getNeedRearmMagazines)) select 0 diff --git a/addons/rearm/functions/fnc_canStoreAmmo.sqf b/addons/rearm/functions/fnc_canStoreAmmo.sqf index b303af372c..a3139d6f11 100644 --- a/addons/rearm/functions/fnc_canStoreAmmo.sqf +++ b/addons/rearm/functions/fnc_canStoreAmmo.sqf @@ -10,21 +10,16 @@ * Can Store Ammo * * Example: - * [ammo_truck, player] call ace_rearm_fnc_canStoreAmmo + * [player, tank] call ace_rearm_fnc_canStoreAmmo * * Public: No */ #include "script_component.hpp" -params [ - ["_truck", objNull, [objNull]], - ["_unit", objNull, [objNull]] -]; - -(alive _unit) -&& {_unit isKindOf "CAManBase"} -&& {local _unit} -&& {!isNull (_unit getVariable [QGVAR(dummy), objNull])} -&& {alive _truck} -&& {(_truck distance _unit) < REARM_ACTION_DISTANCE} -&& {[_unit, _truck, ["IsNotInside"]] call EFUNC(common,canInteractWith)} // manually added actions need this +params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]]; + +!(isNull _unit || + {!(_unit isKindOf "CAManBase")} || + {!local _unit} || + {(_target distance _unit) > REARM_ACTION_DISTANCE} || + {isNull (_unit getVariable [QGVAR(dummy), objNull])}) diff --git a/addons/rearm/functions/fnc_canTakeAmmo.sqf b/addons/rearm/functions/fnc_canTakeAmmo.sqf index 6f15f46eb0..496e7a12a4 100644 --- a/addons/rearm/functions/fnc_canTakeAmmo.sqf +++ b/addons/rearm/functions/fnc_canTakeAmmo.sqf @@ -10,21 +10,16 @@ * Can Pick Up Ammo * * Example: - * [ammo_truck, player] call ace_rearm_fnc_canTakeAmmo + * [player, tank] call ace_rearm_fnc_canTakeAmmo * * Public: No */ #include "script_component.hpp" -params [ - ["_truck", objNull, [objNull]], - ["_unit", objNull, [objNull]] -]; +params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]]; -(alive _unit) -&& {_unit isKindOf "CAManBase"} -&& {local _unit} -&& {alive _truck} -&& {(_truck distance _unit) < REARM_ACTION_DISTANCE} -&& {isNull (_unit getVariable [QGVAR(dummy), objNull])} -&& {[_unit, _truck, ["IsNotInside"]] call EFUNC(common,canInteractWith)} // manually added actions need this +!(isNull _unit || + {!(_unit isKindOf "CAManBase")} || + {!local _unit} || + {(_target distance _unit) > REARM_ACTION_DISTANCE} || + {!isNull (_unit getVariable [QGVAR(dummy), objNull])}) diff --git a/addons/rearm/functions/fnc_createDummy.sqf b/addons/rearm/functions/fnc_createDummy.sqf index ecdaf9ff55..38955fb806 100644 --- a/addons/rearm/functions/fnc_createDummy.sqf +++ b/addons/rearm/functions/fnc_createDummy.sqf @@ -10,20 +10,18 @@ * Created Dummy * * Example: - * [player, "500Rnd_127x99_mag_Tracer_Red"] call ace_rearm_fnc_createDummy + * ["500Rnd_127x99_mag_Tracer_Red"] call ace_rearm_fnc_createDummy * * Public: No */ #include "script_component.hpp" -params [ - ["_unit", objNull, [objNull]], - ["_magazineClass", "", [""]] -]; +private ["_ammo", "_dummyName", "_dummy"]; +params [["_unit", objNull, [objNull]], ["_magazineClass", "", [""]]]; -private _ammo = getText (configFile >> "CfgMagazines" >> _magazineClass >> "ammo"); -private _dummyName = getText (configFile >> "CfgAmmo" >> _ammo >> QGVAR(dummy)); -private _dummy = objNull; +_ammo = getText (configFile >> "CfgMagazines" >> _magazineClass >> "ammo"); +_dummyName = getText (configFile >> "CfgAmmo" >> _ammo >> QGVAR(dummy)); +_dummy = objNull; if !(_dummyName == "") then { _dummy = _dummyName createVehicle (position _unit); } else { @@ -32,6 +30,4 @@ if !(_dummyName == "") then { _dummy allowDamage false; _dummy setVariable [QGVAR(magazineClass), _magazineClass, true]; -TRACE_4("createdDummy",_unit,_magazineClass,_dummyName,_dummy); - _dummy diff --git a/addons/rearm/functions/fnc_disable.sqf b/addons/rearm/functions/fnc_disable.sqf index 0bfe9f2b3d..b5e8b77d04 100644 --- a/addons/rearm/functions/fnc_disable.sqf +++ b/addons/rearm/functions/fnc_disable.sqf @@ -1,10 +1,10 @@ /* * Author: GitHawk - * Disables being able to rearm a vehicle's turrets. [Global Effects] + * Disables rearm for a vehicle. * * Arguments: - * 0: Vehicle - * 1: Disable (optional) + * 0: Target + * 1: Disable * * Return Value: * None @@ -17,9 +17,5 @@ */ #include "script_component.hpp" -params [ - ["_vehicle", objNull, [objNull]], - ["_disable", true, [true]] -]; - -_vehicle setVariable [QGVAR(disabled), _disable, true]; +params [["_target", objNull, [objNull]], ["_disable", true, [true]]]; +_target setVariable [QGVAR(disabled), _disable, true]; diff --git a/addons/rearm/functions/fnc_dropAmmo.sqf b/addons/rearm/functions/fnc_dropAmmo.sqf index 8c1336476d..eafc8bee50 100644 --- a/addons/rearm/functions/fnc_dropAmmo.sqf +++ b/addons/rearm/functions/fnc_dropAmmo.sqf @@ -4,8 +4,8 @@ * * Arguments: * 0: Unit - * 1: Delete dummy object (optional) - * 2: Unholster Weapon (optional) + * 1: Delete dummy object (optional) + * 2: Unholster Weapon (optional) * * Return Value: * None @@ -17,13 +17,12 @@ */ #include "script_component.hpp" -params [ - ["_unit", objNull, [objNull]], - ["_delete", false, [false]], - ["_unholster", true, [true]] -]; +private ["_dummy", "_actionID"]; +params [["_unit", objNull, [objNull]], ["_delete", false, [false]], ["_unholster", true, [true]]]; -private _dummy = _unit getVariable [QGVAR(dummy), objNull]; +if (isNull _unit) exitWith {}; + +_dummy = _unit getVariable [QGVAR(dummy), objNull]; if !(isNull _dummy) then { detach _dummy; if (_delete) then { @@ -32,8 +31,9 @@ if !(isNull _dummy) then { _dummy setVelocity [0,0,-0.1]; }; _unit setVariable [QGVAR(dummy), objNull]; + //_unit setVariable [QEGVAR(dragging,isCarrying), false, true]; // breaks things, since it hides interact menu on _target }; -private _actionID = _unit getVariable [QGVAR(ReleaseActionID), -1]; +_actionID = _unit getVariable [QGVAR(ReleaseActionID), -1]; if (_actionID != -1) then { _unit removeAction _actionID; _unit setVariable [QGVAR(ReleaseActionID), nil]; diff --git a/addons/rearm/functions/fnc_getCaliber.sqf b/addons/rearm/functions/fnc_getCaliber.sqf deleted file mode 100644 index 7a07b9a1db..0000000000 --- a/addons/rearm/functions/fnc_getCaliber.sqf +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Author: GitHawk - * Get the caliber of the ammo in a magazine and return its parameters. - * - * Arguments: - * 0: Magazine Classname - * - * Return Value: - * 0: Caliber information - * 0: Rounded caliber - * 1: Caliber index - * - * Example: - * ["500Rnd_127x99_mag_Tracer_Red"] call ace_rearm_fnc_getCaliber - * - * Public: No - */ -#include "script_component.hpp" - -params [ - ["_magazineClass", "", [""]] -]; - -if (_magazineClass isEqualTo "") exitWith {[8, 2]}; - -private _ammo = getText (configFile >> "CfgMagazines" >> _magazineClass >> "ammo"); -private _tmpCal = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ace_caliber"); -private _cal = 8; -if (_tmpCal > 0) then { - _cal = _tmpCal; -} else { - _tmpCal = getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(caliber)); - if (_tmpCal > 0) then { - _cal = _tmpCal; - } else { - diag_log format ["[ACE] ERROR: Undefined Ammo [%1 : %2]", _ammo, inheritsFrom (configFile >> "CfgAmmo" >> _ammo)]; - if (_ammo isKindOf "BulletBase") then { - _cal = 8; - } else { - _cal = 100; - }; - }; -}; -_cal = round _cal; -private _idx = REARM_CALIBERS find _cal; -if (_idx == -1 ) then { - _idx = 2; -}; - -[_cal, _idx] diff --git a/addons/rearm/functions/fnc_getConfigMagazines.sqf b/addons/rearm/functions/fnc_getConfigMagazines.sqf new file mode 100644 index 0000000000..dce6c5da64 --- /dev/null +++ b/addons/rearm/functions/fnc_getConfigMagazines.sqf @@ -0,0 +1,53 @@ +/* + * Author: GitHawk, Jonpas + * Returns all magazines a turret can hold according to config. + * + * Arguments: + * 0: Target + * 1: Turret Path + * + * Return Value: + * Magazine classes in TurretPath + * + * Example: + * [vehicle, [0]] call ace_rearm_fnc_getConfigMagazines + * + * Public: No + */ +#include "script_component.hpp" + +params [["_target", objNull, [objNull]], ["_turretPath", [], [[]]]]; + +if (isNull _target) exitWith {[]}; + +_cfg = configFile >> "CfgVehicles" >> (typeOf _target) >> "Turrets"; + +if (count _turretPath == 1) then { + _turretPath params ["_subPath"]; + + if (_subPath == -1) exitWith { + _cfg = configFile >> "CfgVehicles" >> (typeOf _target); + }; + + if (count _cfg > _subPath) then { + _cfg = _cfg select _subPath; + } else { + _cfg = nil; + }; +} else { + _turretPath params ["", "_subPath"]; + if (count _cfg > 0) then { + _cfg = (_cfg select 0) >> "Turrets"; + if (count _cfg > _subPath) then { + _cfg = _cfg select _subPath; + } else { + _cfg = nil; + }; + } else { + _cfg = nil; + }; +}; + +if !(isClass _cfg) exitWith {[]}; + +getArray (_cfg >> "magazines") diff --git a/addons/rearm/functions/fnc_getHardpointMagazines.sqf b/addons/rearm/functions/fnc_getHardpointMagazines.sqf deleted file mode 100644 index 2a00fa8eb6..0000000000 --- a/addons/rearm/functions/fnc_getHardpointMagazines.sqf +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Author: PabstMirror - * Gets possible magazines that can be added to a pylon. - * - * Arguments: - * 0: Pylon config - * - * Return Value: - * Magazines - * - * Example: - * [config] call ace_rearm_fnc_getHardpointMagazines - * - * Public: No - */ -#include "script_component.hpp" - -params ["_pylonConfig"]; - -private _return = GVAR(hardpointGroupsCache) getVariable (str _pylonConfig); -if (isNil "_return") then { - _return = []; - private _hardpoints = (getArray (_pylonConfig >> "hardpoints")) apply {toLower _x}; - private _maxWeight = if (isNumber (_pylonConfig >> "maxWeight")) then {getNumber (_pylonConfig >> "maxWeight")} else {1e5}; - private _mags = configProperties [configFile >> "CfgMagazines", "(isClass _x) && {isArray (_x >> 'hardpoints')}"]; - { - if ((getNumber (_x >> "mass")) < _maxWeight) then { - private _magHardpoints = (getArray (_x >> "hardpoints")) apply {toLower _x}; - if (!((_hardpoints arrayIntersect _magHardpoints) isEqualTo [])) then { - _return pushBack configName _x; - }; - }; - } forEach _mags; - if ((str _pylonConfig) != "") then { - GVAR(hardpointGroupsCache) setVariable [(str _pylonConfig), _return]; - }; -}; - -_return; diff --git a/addons/rearm/functions/fnc_getMaxMagazines.sqf b/addons/rearm/functions/fnc_getMaxMagazines.sqf index c747714d86..4b92431ed9 100644 --- a/addons/rearm/functions/fnc_getMaxMagazines.sqf +++ b/addons/rearm/functions/fnc_getMaxMagazines.sqf @@ -3,7 +3,7 @@ * Calculates the maximum number of magazines a turret can hold according to config. * * Arguments: - * 0: Vehicle + * 0: Target * 1: Turret Path * 2: Magazine Classname * @@ -17,13 +17,9 @@ */ #include "script_component.hpp" -params [ - ["_vehicle", objNull, [objNull]], - ["_turretPath", [], [[]]], - ["_magazineClass", "", [""]] -]; +params [["_target", objNull, [objNull]], ["_turretPath", [], [[]]], ["_magazineClass", "", [""]]]; -if (isNull _vehicle) exitWith {0}; +if (isNull _target) exitWith {0}; -private _count = {_x == _magazineClass} count ([_vehicle, _turretPath] call FUNC(getVehicleMagazines)); +private _count = {_x == _magazineClass} count ([_target, _turretPath] call FUNC(getConfigMagazines)); _count diff --git a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf index 6b2620a99a..f56b437708 100644 --- a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf +++ b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf @@ -3,7 +3,7 @@ * Get rearm return value. * * Arguments: - * 0: Vehicle + * 0: Target * 1: Magazine Classname * * Return Value: @@ -11,68 +11,34 @@ * 0: Can Rearm * 1: TurretPath * 2: Number of current magazines in turret path - * 3: Pylon Index (-1 if not a pylon) * * Example: - * [tank, "500Rnd_127x99_mag_Tracer_Red"] call ace_rearm_fnc_getNeedRearmMagazines + * [tank, "mag"] call ace_rearm_fnc_getNeedRearmMagazines * * Public: No */ #include "script_component.hpp" -params [["_vehicle", objNull, [objNull]], ["_magazineClass", "", [""]]]; +private ["_return", "_magazines", "_currentMagazines"]; +params ["_target", "_magazineClass"]; -private _return = [false, [], 0, -1]; +_return = [false, [], 0]; { - private _magazines = [_vehicle, _x] call FUNC(getVehicleMagazines); + _magazines = [_target, _x] call FUNC(getConfigMagazines); if (_magazineClass in _magazines) then { - private _currentMagazines = {_x == _magazineClass} count (_vehicle magazinesTurret _x); + _currentMagazines = {_x == _magazineClass} count (_target magazinesTurret _x); - if ((_vehicle magazineTurretAmmo [_magazineClass, _x]) < getNumber (configFile >> "CfgMagazines" >> _magazineClass >> "count")) exitWith { - _return = [true, _x, _currentMagazines, -1]; + if ((_target magazineTurretAmmo [_magazineClass, _x]) < getNumber (configFile >> "CfgMagazines" >> _magazineClass >> "count")) exitWith { + _return = [true, _x, _currentMagazines]; }; - if (_currentMagazines < ([_vehicle, _x, _magazineClass] call FUNC(getMaxMagazines))) exitWith { - _return = [true, _x, _currentMagazines, -1]; + if (_currentMagazines < ([_target, _x, _magazineClass] call FUNC(getMaxMagazines))) exitWith { + _return = [true, _x, _currentMagazines]; }; }; if (_return select 0) exitWith {}; - false -} count REARM_TURRET_PATHS; +} forEach REARM_TURRET_PATHS; -if (!(_return select 0)) then { - // 1.70 pylons - private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]; - { - private _pylonName = configName _x; - private _pylonIndex = _forEachIndex + 1; // WTF BIS - private _pylonAmmo = _vehicle ammoOnPylon _pylonName; - private _pylonMagazine = (getPylonMagazines _vehicle) select _forEachIndex; - private _pylonTurret = getArray (_x >> "turret"); - if (_pylonTurret isEqualTo []) then {_pylonTurret = [-1];}; // convert to expected array for driver - TRACE_4("",_pylonName,_pylonAmmo,_pylonMagazine,_pylonTurret); - - if (_pylonAmmo > 0) then { - if (_magazineClass == _pylonMagazine) then { // Try to refill current pylon: - private _magAmmo = getNumber (configFile >> "CfgMagazines" >> _pylonMagazine >> "count"); - if (_pylonAmmo < _magAmmo) then { - _return = [true, _pylonTurret, 0, _pylonIndex]; - }; - }; - } else { - // See what we magazines can add to the empty pylon: - private _hardpointMags = [_x] call FUNC(getHardpointMagazines); - { - if (_x == _magazineClass) then { - _return = [true, _pylonTurret, 0, _pylonIndex]; - }; - } forEach _hardpointMags; - }; - if (_return select 0) exitWith {}; - } forEach _pylonConfigs; -}; - -TRACE_3("getNeedRearmMagazines",_vehicle,_magazineClass,_return); _return diff --git a/addons/rearm/functions/fnc_getSupplyCount.sqf b/addons/rearm/functions/fnc_getSupplyCount.sqf deleted file mode 100644 index 082ad7ab5c..0000000000 --- a/addons/rearm/functions/fnc_getSupplyCount.sqf +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Author: GitHawk - * Get the supply count. - * - * Arguments: - * 0: Ammo Truck - * - * Return Value: - * Supply count - * - * Example: - * [ammo_truck] call ace_rearm_fnc_getSupplyCount - * - * Public: Yes - */ -#include "script_component.hpp" - -params [["_truck", objNull, [objNull]]]; - -if (GVAR(supply) != 1) exitWith { - WARNING("supply setting is not set to limited"); // func shouldn't have been called - -1 -}; - -private _supply = _truck getVariable QGVAR(currentSupply); - -if (isNil "_supply") then { - if (isNumber (configFile >> "CfgVehicles" >> typeOf _truck >> QGVAR(defaultSupply))) then { - _supply = getNumber (configFile >> "CfgVehicles" >> typeOf _truck >> QGVAR(defaultSupply)); - } else { - _supply = 1200; - }; - if (_supply > 0) then { - _truck setVariable [QGVAR(currentSupply), _supply, true]; - }; -}; - -_supply diff --git a/addons/rearm/functions/fnc_getVehicleMagazines.sqf b/addons/rearm/functions/fnc_getVehicleMagazines.sqf deleted file mode 100644 index 6a0932d908..0000000000 --- a/addons/rearm/functions/fnc_getVehicleMagazines.sqf +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Author: GitHawk, Jonpas - * Returns all magazines a turret of a vehicle object can hold according to config. - * - * Arguments: - * 0: Vehicle object or typeOf - * 1: Turret Path - * - * Return Value: - * Magazine classes in TurretPath - * - * Example: - * [vehicle, [0]] call ace_rearm_fnc_getVehicleMagazines - * - * Public: No - */ -#include "script_component.hpp" - -getArray ((_this call CBA_fnc_getTurret) >> "magazines") diff --git a/addons/rearm/functions/fnc_grabAmmo.sqf b/addons/rearm/functions/fnc_grabAmmo.sqf index a77a17284b..9573ac85a5 100644 --- a/addons/rearm/functions/fnc_grabAmmo.sqf +++ b/addons/rearm/functions/fnc_grabAmmo.sqf @@ -16,19 +16,15 @@ */ #include "script_component.hpp" -params [ - ["_dummy", objNull, [objNull]], - ["_unit", objNull, [objNull]] -]; +params [["_dummy", objNull, [objNull]], ["_unit", objNull, [objNull]]]; -REARM_HOLSTER_WEAPON; +REARM_HOLSTER_WEAPON [_unit, "forceWalk", QGVAR(vehRearm), true] call EFUNC(common,statusEffect_set); [ - TIME_PROGRESSBAR(5), + 5, [_dummy, _unit], { - private ["_actionID"]; params ["_args"]; _args params ["_dummy", "_unit"]; [_dummy, _unit] call FUNC(pickUpAmmo); diff --git a/addons/rearm/functions/fnc_handleKilled.sqf b/addons/rearm/functions/fnc_handleKilled.sqf index 3e39dc727e..5f80246f52 100644 --- a/addons/rearm/functions/fnc_handleKilled.sqf +++ b/addons/rearm/functions/fnc_handleKilled.sqf @@ -15,9 +15,7 @@ */ #include "script_component.hpp" -params [ - ["_unit", objNull, [objNull]] -]; +params [["_unit", objNull, [objNull]]]; if (!local _unit) exitWith {}; diff --git a/addons/rearm/functions/fnc_handleUnconscious.sqf b/addons/rearm/functions/fnc_handleUnconscious.sqf index 0fbf1b8f06..eab25fcf64 100644 --- a/addons/rearm/functions/fnc_handleUnconscious.sqf +++ b/addons/rearm/functions/fnc_handleUnconscious.sqf @@ -16,10 +16,7 @@ */ #include "script_component.hpp" -params [ - ["_unit", objNull, [objNull]], - ["_isUnconscious", false, [false]] -]; +params [["_unit", objNull, [objNull]], ["_isUnconscious", false, [false]]]; if (!local _unit || {!_isUnconscious}) exitWith {}; diff --git a/addons/rearm/functions/fnc_hasEnoughSupply.sqf b/addons/rearm/functions/fnc_hasEnoughSupply.sqf deleted file mode 100644 index a2944db014..0000000000 --- a/addons/rearm/functions/fnc_hasEnoughSupply.sqf +++ /dev/null @@ -1,52 +0,0 @@ -/* -* Author: GitHawk -* Check whether enough supply is left to take the magazine. -* -* Arguments: -* 0: Ammo Truck -* 1: Magazine Classname -* -* Return Value: -* Enough supply -* -* Example: -* [ammo_truck, "500Rnd_127x99_mag_Tracer_Red"] call ace_rearm_fnc_hasEnoughSupply -* -* Public: No -*/ -#include "script_component.hpp" - -params [["_truck", objNull, [objNull]], ["_magazineClass", "", [""]]]; - -if (isNull _truck || {_magazineClass isEqualTo ""}) exitWith {false}; - -// With infinite supply, there is always enough -if (GVAR(supply) == 0) exitWith {true}; - - -// With limited supply, we need to check supply -if (GVAR(supply) == 1) exitWith { - private _supply = [_truck] call FUNC(getSupplyCount); - ([_magazineClass] call FUNC(getCaliber)) params ["_cal", "_idx"]; - - // With caliber based rearming, we only need partial supply - if (GVAR(level) == 2) exitWith { - // If REARM_COUNT is bigger than the magazine size, we might get a bigger number than 1 - private _magazinePart = ((REARM_COUNT select _idx) / (getNumber (configFile >> "CfgMagazines" >> _magazineClass >> "count"))) min 1; - (_cal * _magazinePart <= _supply) - }; - (_cal <= _supply) -}; - - -// With magazine specific supply, we need to check stored magazines -if (GVAR(supply) == 2) exitWith { - private _magazineSupply = _truck getVariable [QGVAR(magazineSupply), []]; - private _magazinePresent = false; - { - _x params ["_magazine", "_rounds"]; - if ((_magazine isEqualTo _magazineClass) && (_rounds > 0)) exitWith {_magazinePresent = true; }; - false - } count _magazineSupply; - _magazinePresent -}; diff --git a/addons/rearm/functions/fnc_initSupplyVehicle.sqf b/addons/rearm/functions/fnc_initSupplyVehicle.sqf deleted file mode 100644 index ad1b914328..0000000000 --- a/addons/rearm/functions/fnc_initSupplyVehicle.sqf +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Author: Githawk, PabstMirror - * Adds rearm supply actions to a vehicle or ammo container. - * - * Arguments: - * 0: Object - * - * Return Value: - * None - * - * Example: - * [ammoTruck] call ace_rearm_fnc_initSupplyVehicle; - * - * Public: No - */ -#include "script_component.hpp" - -if (!hasInterface) exitWith {}; // For now we just add actions, so no need non-clients - -params ["_vehicle"]; -private _typeOf = typeOf _vehicle; -TRACE_2("initSupplyVehicle",_vehicle,_typeOf); - -if (!alive _vehicle) exitWith {}; - -private _configSupply = getNumber (configFile >> "CfgVehicles" >> _typeOf >> QGVAR(defaultSupply)); -private _isSupplyVehicle = _vehicle getVariable [QGVAR(isSupplyVehicle), false]; -private _oldRearmConfig = isClass (configFile >> "CfgVehicles" >> _typeOf >> "ACE_Actions" >> "ACE_MainActions" >> QGVAR(takeAmmo)); -TRACE_3("",_configSupply,_isSupplyVehicle,_oldRearmConfig); - -if ((_configSupply <= 0) && {!_isSupplyVehicle} && {!_oldRearmConfig}) exitWith {}; // Ignore if not enabled -if ((_oldRearmConfig || {_configSupply > 0}) && {_typeOf in GVAR(configTypesAdded)}) exitWith {}; // Only add class actions once -if (_oldRearmConfig || {_configSupply > 0}) then {GVAR(configTypesAdded) pushBack _typeOf}; - - -private _actionReadSupplyCounter = [ // GVAR(supply) > 0 - QGVAR(ReadSupplyCounter), - localize LSTRING(ReadSupplyCounter), // Check remaining ammunition - QPATHTOF(ui\icon_rearm_interact.paa), - {_this call FUNC(readSupplyCounter)}, - {_this call FUNC(canReadSupplyCounter)} -] call EFUNC(interact_menu,createAction); - -private _actionTakeAmmo = [ - QGVAR(takeAmmo), - localize ([LSTRING(Rearm), LSTRING(TakeAmmo)] select (GVAR(level) > 0)), - QPATHTOF(ui\icon_rearm_interact.paa), - {}, - {_this call FUNC(canTakeAmmo)}, - {_this call FUNC(addRearmActions)} -] call EFUNC(interact_menu,createAction); - -private _actionStoreAmmo = [ - QGVAR(StoreAmmo), - localize LSTRING(StoreAmmo), // "Store ammo" - QPATHTOF(ui\icon_rearm_interact.paa), - {_this call FUNC(storeAmmo)}, - {_this call FUNC(canStoreAmmo)} -] call EFUNC(interact_menu,createAction); - -if (_oldRearmConfig || {_configSupply > 0}) then { - TRACE_1("Adding Class Actions",_typeOf); - [_typeOf, 0, ["ACE_MainActions"], _actionReadSupplyCounter] call EFUNC(interact_menu,addActionToClass); - if (!_oldRearmConfig) then { - [_typeOf, 0, ["ACE_MainActions"], _actionTakeAmmo] call EFUNC(interact_menu,addActionToClass); - [_typeOf, 0, ["ACE_MainActions"], _actionStoreAmmo] call EFUNC(interact_menu,addActionToClass); - } else { - WARNING_1("Actions already present on [%1]. Old Compat PBO?",_typeOf); - }; -} else { - TRACE_1("Adding Object Actions",_typeOf); - [_vehicle, 0, ["ACE_MainActions"], _actionReadSupplyCounter] call EFUNC(interact_menu,addActionToObject); - [_vehicle, 0, ["ACE_MainActions"], _actionTakeAmmo] call EFUNC(interact_menu,addActionToObject); - [_vehicle, 0, ["ACE_MainActions"], _actionStoreAmmo] call EFUNC(interact_menu,addActionToObject); -}; - diff --git a/addons/rearm/functions/fnc_makeDummy.sqf b/addons/rearm/functions/fnc_makeDummy.sqf index fbdd336a0d..5c19f8f12d 100644 --- a/addons/rearm/functions/fnc_makeDummy.sqf +++ b/addons/rearm/functions/fnc_makeDummy.sqf @@ -16,10 +16,7 @@ */ #include "script_component.hpp" -params [ - ["_obj", objNull, [objNull]], - ["_dirAndUp", [[1,0,0],[0,0,1]], [[]]] -]; +params [["_obj", objNull, [objNull]], ["_dirAndUp", [[1,0,0],[0,0,1]], [[]]]]; _obj setVectorDirAndUp _dirAndUp; _obj allowDamage false; diff --git a/addons/rearm/functions/fnc_moduleRearmSettings.sqf b/addons/rearm/functions/fnc_moduleRearmSettings.sqf index 2d498c8b57..af627862da 100644 --- a/addons/rearm/functions/fnc_moduleRearmSettings.sqf +++ b/addons/rearm/functions/fnc_moduleRearmSettings.sqf @@ -10,22 +10,17 @@ * Return Value: * None * - * Example: + * Example; * function = "ace_rearm_fnc_moduleRearmSettings" * * Public: No */ #include "script_component.hpp" -params [ - "_logic", - "", - ["_activated", false, [false]] -]; +params ["_logic", "", ["_activated", false, [false]]]; if (!_activated) exitWith {}; [_logic, QGVAR(level), "level"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(supply), "supply"] call EFUNC(common,readSettingFromModule); -INFO_2("Module Initialized [level: %1][supply: %2]", GVAR(level), GVAR(supply)); +diag_log text format ["[ACE]: Rearm Module Initialized on level: %1", GVAR(level)]; diff --git a/addons/rearm/functions/fnc_pickUpAmmo.sqf b/addons/rearm/functions/fnc_pickUpAmmo.sqf index ee2845336b..653c131586 100644 --- a/addons/rearm/functions/fnc_pickUpAmmo.sqf +++ b/addons/rearm/functions/fnc_pickUpAmmo.sqf @@ -16,18 +16,15 @@ */ #include "script_component.hpp" -params [ - ["_dummy", objNull, [objNull]], - ["_unit", objNull, [objNull]] -]; +params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]]; -private _attachedDummy = _unit getVariable [QGVAR(dummy), objNull]; -if !(isNull _attachedDummy) exitWith {}; +_dummy = _unit getVariable [QGVAR(dummy), objNull]; +if !(isNull _dummy) exitWith {}; -_dummy attachTo [_unit, [0,1,0], "pelvis"]; - -private _nearUnits = _unit nearObjects ["CAManBase", 100]; -// disableCollisionWith damage with the nearby units: -[QGVAR(makeDummyEH), [_dummy, [[-1,0,0],[0,0,1]]], _nearUnits] call CBA_fnc_targetEvent; - -_unit setVariable [QGVAR(dummy), _dummy]; +//_target attachTo [_unit, [0,0.7,0], "pelvis"]; +_target attachTo [_unit, [0,1,0], "pelvis"]; +{ + [QGVAR(makeDummyEH), [_dummy, [[-1,0,0],[0,0,1]]], _x] call CBA_fnc_targetEvent; +} count (position _unit nearObjects ["CAManBase", 100]); +_unit setVariable [QGVAR(dummy), _target]; +//_unit setVariable [QEGVAR(dragging,isCarrying), true, true]; // breaks things, since it hides interact menu on _target diff --git a/addons/rearm/functions/fnc_readSupplyCounter.sqf b/addons/rearm/functions/fnc_readSupplyCounter.sqf deleted file mode 100644 index cfcdb1b865..0000000000 --- a/addons/rearm/functions/fnc_readSupplyCounter.sqf +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Author: GitHawk - * Get the remaining ammunition amount. - * - * Arguments: - * 0: Ammo Truck - * 1: Unit - * - * Return Value: - * None - * - * Example: - * [ammo_truck, player] call ace_rearm_fnc_readSupplyCounter - * - * Public: No - */ -#include "script_component.hpp" - -params [["_truck", objNull, [objNull]],["_unit", objNull, [objNull]]]; -TRACE_2("readSupplyCounter",_truck,_unit); - -if (GVAR(supply) == 0) exitWith {WARNING("Supply is unlimited");}; - -if (GVAR(supply) == 1) then { - [ - TIME_PROGRESSBAR(5), - [_unit, _truck, [_truck] call FUNC(getSupplyCount)], - { - params ["_args"]; - _args params [["_unit", objNull, [objNull]], ["_truck", objNull, [objNull]], ["_supplyCount", 0, [0]]]; - if (_supplyCount > 0 ) then { - [[LSTRING(Hint_RemainingSupplyPoints), _supplyCount], 2, _unit] call EFUNC(common,displayTextStructured); - } else { - [LSTRING(Hint_EmptySupplyPoints), 2, _unit] call EFUNC(common,displayTextStructured); - }; - true - }, - {true}, - localize LSTRING(ReadSupplyCounterAction), - {true}, - ["isnotinside"] - ] call EFUNC(common,progressBar); -} else { - [ - TIME_PROGRESSBAR(5), - [_unit, _truck], - { - params ["_args"]; - _args params [["_unit", objNull, [objNull]], ["_truck", objNull, [objNull]]]; - private _supply = 1.5; - private _numChars = count (localize LSTRING(Hint_RemainingAmmo)); - private _text = ""; - private _magazines = _truck getVariable QGVAR(magazineSupply); - if !(isNil "_magazines") then { - { - _x params ["_magazineClass", "_rounds"]; - private _line = format ["%1: %2", getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), _rounds]; - _numChars = _numChars max (count _line); - _text = format ["%1
%2", _text, _line]; - _supply = _supply + 0.5; - false - } count _magazines; - }; - if (_supply > 1.5) then { - [[LSTRING(Hint_RemainingAmmo), _text], _supply, _unit, (_numChars/2.9)] call EFUNC(common,displayTextStructured); - } else { - [LSTRING(Hint_Empty), 2, _unit] call EFUNC(common,displayTextStructured); - }; - true - }, - {true}, - localize LSTRING(ReadSupplyCounterAction), - {true}, - ["isnotinside"] - ] call EFUNC(common,progressBar); -}; diff --git a/addons/rearm/functions/fnc_rearm.sqf b/addons/rearm/functions/fnc_rearm.sqf index 363a4905c7..61009b085d 100644 --- a/addons/rearm/functions/fnc_rearm.sqf +++ b/addons/rearm/functions/fnc_rearm.sqf @@ -3,46 +3,71 @@ * Starts progress bar for rearming a vehicle. * * Arguments: - * 0: Target Vehicle - * 1: Unit + * 0: Unit * * Return Value: * None * * Example: - * [tank, player] call ace_rearm_fnc_rearm + * [player] call ace_rearm_fnc_rearm * * Public: No */ #include "script_component.hpp" -params [["_target", objNull, [objNull]],["_unit", objNull, [objNull]]]; -TRACE_2("rearm",_target,_unit); +private ["_magazineClass", "_ammo", "_tmpCal", "_cal", "_idx", "_needRearmMags", "_magazineDisplayName"]; +params [["_unit", objNull, [objNull]]]; -private _attachedDummy = _unit getVariable [QGVAR(dummy), objNull]; -if (isNull _attachedDummy) exitwith {ERROR_1("attachedDummy null",_attachedDummy);}; -private _magazineClass = _attachedDummy getVariable QGVAR(magazineClass); -if (isNil "_magazineClass") exitWith {ERROR_1("magazineClass nil",_attachedDummy);}; +_dummy = _unit getVariable [QGVAR(dummy), objNull]; +if (isNull _dummy) exitwith {false}; +_magazineClass = _dummy getVariable QGVAR(magazineClass); +if (isNil "_magazineClass") exitWith {false}; -([_magazineClass] call FUNC(getCaliber)) params ["_cal", "_idx"]; +_ammo = getText (configFile >> "CfgMagazines" >> _magazineClass >> "ammo"); +_tmpCal = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ace_caliber"); +_cal = 8; +if (_tmpCal > 0) then { + _cal = _tmpCal; +} else { + _tmpCal = getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(caliber)); + if (_tmpCal > 0) then { + _cal = _tmpCal; + } else { + diag_log format ["[ACE] ERROR: Undefined Ammo [%1 : %2]", _ammo, inheritsFrom (configFile >> "CfgAmmo" >> _ammo)]; + if (_ammo isKindOf "BulletBase") then { + _cal = 8; + } else { + _cal = 100; + }; + }; +}; +_cal = round _cal; +_idx = REARM_CALIBERS find _cal; +if (_idx == -1) then { + _idx = 2; +}; // Get magazines that can be rearmed -private _needRearmMags = [_target, _magazineClass] call FUNC(getNeedRearmMagazines); -_needRearmMags params ["_needRearm", "_turretPath", "_cnt", "_pylon"]; +_needRearmMags = [_target, _magazineClass] call FUNC(getNeedRearmMagazines); +_needRearmMags params ["_needRearm", "_turretPath", "_cnt"]; // Exit if no magazines need rearming -if (!_needRearm) exitWith {ERROR_2("Could not find turret for %1 in %2", _magazineClass, typeOf _target);}; +if (!_needRearm) exitWith { + diag_log format ["[ACE] ERROR: Could not find turret for %1 in %2", _magazineClass, typeOf _target]; +}; -private _magazineDisplayName = getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"); +//hint format ["Magazine: %1\nAmmo: %2\nCaliber: %3\nIndex: %4\nTurretPath: %5\nREARM_DURATION_REARM: %6\nCount: %7", _magazine, _ammo, _cal, _idx, _turretPath, (REARM_DURATION_REARM select _idx), (REARM_COUNT select _idx)]; + +_magazineDisplayName = getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"); if (_magazineDisplayName == "") then { _magazineDisplayName = _magazineClass; - ERROR_1("Magazine is missing display name [%1]", _magazineClass); + diag_log format ["[ACE] ERROR: Magazine is missing display name [%1]", _magazineClass]; }; [ - TIME_PROGRESSBAR(REARM_DURATION_REARM select _idx), - [_target, _unit, _turretPath, _cnt, _magazineClass, (REARM_COUNT select _idx), _pylon], - {(_this select 0) call FUNC(rearmSuccess)}, + (REARM_DURATION_REARM select _idx), + [_target, _unit, _turretPath, _cnt, _magazineClass, (REARM_COUNT select _idx)], + FUNC(rearmSuccess), "", format [localize LSTRING(RearmAction), getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName"), _magazineDisplayName], {true}, diff --git a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf index 8fddb4ab85..27fd20c528 100644 --- a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf +++ b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf @@ -16,16 +16,11 @@ * Public: No */ #include "script_component.hpp" - -params [ - ["_truck", objNull, [objNull]], - "", - ["_vehicle", objNull, [objNull]] -]; +params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]], ["_vehicle", objNull, [objNull]]]; // _target is for future possible finite ammo, _unit placeholder [ - TIME_PROGRESSBAR(10), - [_truck, _vehicle], + 10, + _vehicle, FUNC(rearmEntireVehicleSuccess), "", format [localize LSTRING(BasicRearmAction), getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], diff --git a/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf b/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf index a2a23d7357..2eb0b408f9 100644 --- a/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf +++ b/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf @@ -3,36 +3,41 @@ * Rearm an entire vehicle. * * Arguments: - * 0: Rearm information - * 0: Ammo Truck - * 1: Vehicle * * Return Value: * None * * Example: - * [[ammo_truck, tank]] call ace_rearm_fnc_rearmEntireVehicleSuccess + * [tank] call ace_rearm_fnc_rearmEntireVehicleSuccess * * Public: No */ #include "script_component.hpp" -params ["_args"]; -_args params [ - ["_truck", objNull, [objNull]], - ["_vehicle", objNull, [objNull]] -]; +private ["_turretPath", "_magazines", "_magazine", "_currentMagazines", "_maxMagazines", "_maxRounds", "_currentRounds"]; +params [["_vehicle", objNull, [objNull]]]; +TRACE_1("params",_vehicle); + +//ToDo: Cleanup with CBA_fnc_ownerEvent in CBA 2.4.2 +{ + [QGVAR(rearmEntireVehicleSuccessLocalEH), [_vehicle, _x]] call CBA_fnc_globalEvent; +} forEach REARM_TURRET_PATHS; + + +/* if (isServer) then { { - private _turretOwnerID = _vehicle turretOwner _x; + _turretOwnerID = _vehicle turretOwner _x; if (_turretOwnerID == 0) then { + //wtf is _truck from??? [QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _truck] call CBA_fnc_targetEvent; } else { - [QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _turretOwnerID] call CBA_fnc_ownerEvent; + [QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _turretOwnerID] call CBA_fnc_targetEvent; }; - false } count REARM_TURRET_PATHS; } else { [QGVAR(rearmEntireVehicleSuccessLocalEH), _this] call CBA_fnc_serverEvent; }; +*/ diff --git a/addons/rearm/functions/fnc_rearmEntireVehicleSuccessLocal.sqf b/addons/rearm/functions/fnc_rearmEntireVehicleSuccessLocal.sqf index 01901fdf87..7d81aa6345 100644 --- a/addons/rearm/functions/fnc_rearmEntireVehicleSuccessLocal.sqf +++ b/addons/rearm/functions/fnc_rearmEntireVehicleSuccessLocal.sqf @@ -3,51 +3,33 @@ * Rearm an entire turret locally. * * Arguments: - * 0: Ammo Truck - * 1: Vehicle - * 2: TurretPath + * 0: Vehicle + * 1: TurretPath * * Return Value: * None * * Example: - * [ammo_truck, tank, [0]] call ace_rearm_fnc_rearmEntireVehicleSuccessLocal + * [tank, [0]] call ace_rearm_fnc_rearmEntireVehicleSuccessLocal * * Public: No */ #include "script_component.hpp" -params [["_truck", objNull, [objNull]], ["_vehicle", objNull, [objNull]], ["_turretPath", [], [[]]]]; -TRACE_3("rearmEntireVehicleSuccessLocal",_truck,_vehicle,_turretPath); +private ["_magazines", "_magazine", "_currentMagazines", "_maxMagazines", "_maxRounds", "_currentRounds"]; +params [["_vehicle", objNull, [objNull]], ["_turretPath", [], [[]]]]; +TRACE_2("params",_vehicle,_turretPath); -// 1.70 pylons -private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]; -{ - private _pylonTurret = getArray (_x >> "turret"); - if (_pylonTurret isEqualTo []) then {_pylonTurret = [-1];}; // convert to expected array for driver - if (_pylonTurret isEqualTo _turretPath) then { - private _pylonIndex = _forEachIndex + 1; // GJ BIS - private _pylonAmmo = _vehicle ammoOnPylon _pylonIndex; - private _pylonMagazine = (getPylonMagazines _vehicle) select _forEachIndex; - private _maxRounds = getNumber (configFile >> "CfgMagazines" >> _pylonMagazine >> "count"); - TRACE_4("",_pylonIndex,_pylonAmmo,_maxRounds,_pylonMagazine); - if (_pylonAmmo < _maxRounds) then { - if ((GVAR(supply) == 0) || {[_truck, _pylonMagazine, (_maxRounds - _pylonAmmo)] call FUNC(removeMagazineFromSupply)}) then { - TRACE_3("Adding Rounds",_vehicle,_pylonIndex,_maxRounds); - _vehicle setAmmoOnPylon [_pylonIndex, _maxRounds]; - }; - }; - }; -} forEach _pylonConfigs; +//ToDo: Cleanup with CBA_fnc_ownerEvent in CBA 2.4.2 +if (!(_vehicle turretLocal _turretPath)) exitWith {TRACE_1("not local turret",_turretPath);}; -private _magazines = [_vehicle, _turretPath] call FUNC(getVehicleMagazines); -if (isNil "_magazines") exitWith {}; +_magazines = [_vehicle, _turretPath] call FUNC(getConfigMagazines); { - private _magazine = _x; - private _currentMagazines = { _x == _magazine } count (_vehicle magazinesTurret _turretPath); - private _maxMagazines = [_vehicle, _turretPath, _magazine] call FUNC(getMaxMagazines); - private _maxRounds = getNumber (configFile >> "CfgMagazines" >> _magazine >> "count"); - private _currentRounds = _vehicle magazineTurretAmmo [_magazine, _turretPath]; + _magazine = _x; + _currentMagazines = { _x == _magazine } count (_vehicle magazinesTurret _turretPath); + _maxMagazines = [_vehicle, _turretPath, _magazine] call FUNC(getMaxMagazines); + _maxRounds = getNumber (configFile >> "CfgMagazines" >> _magazine >> "count"); + _currentRounds = _vehicle magazineTurretAmmo [_magazine, _turretPath]; TRACE_7("Rearmed Turret",_vehicle,_turretPath,_currentMagazines,_maxMagazines,_currentRounds,_maxRounds,_magazine); @@ -56,21 +38,11 @@ if (isNil "_magazines") exitWith {}; _currentMagazines = _currentMagazines + 1; }; if (_currentMagazines < _maxMagazines) then { - private _success = true; - if ((GVAR(supply) == 0) || {[_truck, _magazine, (_maxRounds - _currentRounds)] call FUNC(removeMagazineFromSupply)}) then { - _vehicle setMagazineTurretAmmo [_magazine, _maxRounds, _turretPath]; - }; - + _vehicle setMagazineTurretAmmo [_magazine, _maxRounds, _turretPath]; for "_idx" from 1 to (_maxMagazines - _currentMagazines) do { - if ((GVAR(supply) == 0) || {[_truck, _magazine, _maxRounds] call FUNC(removeMagazineFromSupply)}) then { - _vehicle addMagazineTurret [_magazine, _turretPath]; - }; + _vehicle addMagazineTurret [_magazine, _turretPath]; }; } else { - if ((GVAR(supply) == 0) || {[_truck, _magazine, (_maxRounds - _currentRounds)] call FUNC(removeMagazineFromSupply)}) then { - _vehicle setMagazineTurretAmmo [_magazine, _maxRounds, _turretPath]; - }; + _vehicle setMagazineTurretAmmo [_magazine, _maxRounds, _turretPath]; }; - false -} count _magazines; - +} foreach _magazines; diff --git a/addons/rearm/functions/fnc_rearmSuccess.sqf b/addons/rearm/functions/fnc_rearmSuccess.sqf index e49a236ea2..4a8e4972ed 100644 --- a/addons/rearm/functions/fnc_rearmSuccess.sqf +++ b/addons/rearm/functions/fnc_rearmSuccess.sqf @@ -1,42 +1,49 @@ /* * Author: GitHawk - * Rearms a vehicle, after progress bar finishes, pass args to machine where turret is local. + * Rearms a vehicle. * * Arguments: - * 0: Vehicle - * 1: Unit - * 2: Turret Path - * 3: Number of magazines - * 4: Magazine Classname - * 5: Number of rounds - * 6: Pylon Index + * 0: Params + * 0: Target + * 1: Unit + * 2: Turret Path + * 3: Number of magazines + * 4: Magazine Classname + * 5: Number of rounds * * Return Value: * None * * Example: - * [vehicle, player, [-1], 2, "5000Rnd_762x51_Belt", 500, -1] call ace_rearm_fnc_rearmSuccess + * [[vehicle, player, [-1], 2, "5000Rnd_762x51_Belt", 500]] call ace_rearm_fnc_rearmSuccess * * Public: No */ #include "script_component.hpp" -params [["_vehicle", objNull, [objNull]], ["_unit", objNull, [objNull]], "_turretPath", "_numMagazines", "_magazineClass", "_numRounds", "_pylon"]; -TRACE_7("rearmSuccess",_vehicle,_unit,_turretPath,_numMagazines,_magazineClass,_numRounds,_pylon); +private ["_dummy", "_weaponSelect", "_turretOwnerID"]; +params [["_args", [objNull, objNull, [], 0, "", 0], [[]], [6]]]; +_args params ["_target", "_unit", "_turretPath", "_numMagazines", "_magazineClass", "_numRounds"]; +TRACE_6("params",_target,_unit,_turretPath,_numMagazines,_magazineClass,_numRounds); + +//hint format ["Target: %1\nTurretPath: %2\nNumMagazines: %3\nMagazine: %4\nNumRounds: %5", _target, _turretPath, _numMagazines, _magazineClass, _numRounds]; if (local _unit) then { [_unit, true, true] call FUNC(dropAmmo); }; -if (!alive _vehicle) exitWith {WARNING("vehicle dead/null");}; +//ToDo: Cleanup with CBA_fnc_ownerEvent in CBA 2.4.2 +[QGVAR(rearmSuccessLocalEH), _this] call CBA_fnc_globalEvent; +/* if (isServer) then { - private _turretOwnerID = _vehicle turretOwner _turretPath; + _turretOwnerID = _target turretOwner _turretPath; if (_turretOwnerID == 0) then { - [QGVAR(rearmSuccessLocalEH), _this, [_vehicle]] call CBA_fnc_targetEvent; + [QGVAR(rearmSuccessLocalEH), _this, _vehicle] call CBA_fnc_targetEvent; } else { - [QGVAR(rearmSuccessLocalEH), _this, _turretOwnerID] call CBA_fnc_ownerEvent; + [QGVAR(rearmSuccessLocalEH), _this, _turretOwnerID] call CBA_fnc_targetEvent; }; } else { - [QGVAR(rearmSuccessLocalEH), _this] call EFUNC(common,serverEvent); + [QGVAR(rearmSuccessLocalEH), _this] call CBA_fnc_serverEvent; }; + */ \ No newline at end of file diff --git a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf index 5ba5492ad4..dc4afbc886 100644 --- a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf +++ b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf @@ -3,96 +3,108 @@ * Rearms a vehicle on the turret owner. * * Arguments: - * 0: Vehicle - * 1: Unit - * 2: Turret Path - * 3: Number of magazines - * 4: Magazine Classname - * 5: Number of rounds - * 6: Pylon Index + * 0: Params + * 0: Target + * 1: Unit + * 2: Turret Path + * 3: Number of magazines + * 4: Magazine Classname + * 5: Number of rounds * * Return Value: * None * * Example: - * [vehicle, player, [-1], 2, "5000Rnd_762x51_Belt", 500, ""] call ace_rearm_fnc_rearmSuccessLocal + * [[vehicle, player, [-1], 2, "5000Rnd_762x51_Belt", 500]] call ace_rearm_fnc_rearmSuccess * * Public: No */ #include "script_component.hpp" -params ["_vehicle", "_unit", "_turretPath", "_numMagazines", "_magazineClass", "_numRounds", "_pylon"]; -TRACE_7("rearmSuccessLocal",_vehicle,_unit,_turretPath,_numMagazines,_magazineClass,_numRounds,_pylon); +private ["_rounds", "_currentRounds", "_maxMagazines", "_currentMagazines", "_dummy", "_weaponSelect"]; +params [["_args", [objNull, objNull, [], 0, "", 0], [[]], [6]]]; +_args params ["_target", "_unit", "_turretPath", "_numMagazines", "_magazineClass", "_numRounds"]; +TRACE_6("params",_target,_unit,_turretPath,_numMagazines,_magazineClass,_numRounds); -private _rounds = getNumber (configFile >> "CfgMagazines" >> _magazineClass >> "count"); +//ToDo: Cleanup with CBA_fnc_ownerEvent in CBA 2.4.2 +if (!(_target turretLocal _turretPath)) exitWith {TRACE_1("not local turret",_turretPath);}; -if (_pylon > 0) exitWith { - if (_turretPath isEqualTo [-1]) then {_turretPath = [];}; // Convert back to pylon turret format - private _currentCount = _vehicle ammoOnPylon _pylon; - private _newCount = ((_currentCount max 0) + _numRounds) min _rounds; - TRACE_2("",_pylon,_magazineClass,_newCount); - _vehicle setPylonLoadOut [_pylon, _magazineClass, false, _turretPath]; - _vehicle setAmmoOnPylon [_pylon, _newCount]; -}; +//hint format ["Target: %1\nTurretPath: %2\nNumMagazines: %3\nMagazine: %4\nNumRounds: %5\nUnit: %6", _target, _turretPath, _numMagazines, _magazineClass, _numRounds, _unit]; -private _currentRounds = 0; -private _maxMagazines = [_vehicle, _turretPath, _magazineClass] call FUNC(getMaxMagazines); +_rounds = getNumber (configFile >> "CfgMagazines" >> _magazineClass >> "count"); +_currentRounds = 0; +_maxMagazines = [_target, _turretPath, _magazineClass] call FUNC(getMaxMagazines); if (_maxMagazines == 1) then { - private _currentMagazines = { _x == _magazineClass } count (_vehicle magazinesTurret _turretPath); + _currentMagazines = { _x == _magazineClass } count (_target magazinesTurret _turretPath); if (_currentMagazines == 0 && {!(_turretPath isEqualTo [-1])}) then { // Driver gun will always retain it's magazines - _vehicle addMagazineTurret [_magazineClass, _turretPath]; - _vehicle setMagazineTurretAmmo [_magazineClass, 0, _turretPath]; + _target addMagazineTurret [_magazineClass, _turretPath]; }; if (GVAR(level) == 1) then { // Fill magazine completely - _vehicle setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath]; - [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _rounds, + _target setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath]; + [QEGVAR(common,displayTextStructured), + [ + [LSTRING(Hint_RearmedTriple), _rounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; + getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName")], 3, _unit + ], + [_unit]] call CBA_fnc_targetEvent; } else { // Fill only at most _numRounds - _vehicle setMagazineTurretAmmo [_magazineClass, ((_vehicle magazineTurretAmmo [_magazineClass, _turretPath]) + _numRounds) min _rounds, _turretPath]; - [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _numRounds, + _target setMagazineTurretAmmo [_magazineClass, ((_target magazineTurretAmmo [_magazineClass, _turretPath]) + _numRounds) min _rounds, _turretPath]; + [QEGVAR(common,displayTextStructured), + [ + [LSTRING(Hint_RearmedTriple), _numRounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; + getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName")], 3, _unit + ], + [_unit]] call CBA_fnc_targetEvent; }; } else { for "_idx" from 1 to (_maxMagazines+1) do { - _currentRounds = _vehicle magazineTurretAmmo [_magazineClass, _turretPath]; + _currentRounds = _target magazineTurretAmmo [_magazineClass, _turretPath]; if (_currentRounds > 0 || {_idx == (_maxMagazines+1)}) exitWith { if (_idx == (_maxMagazines+1) && {!(_turretPath isEqualTo [-1])}) then { - _vehicle addMagazineTurret [_magazineClass, _turretPath]; + _target addMagazineTurret [_magazineClass, _turretPath]; }; if (GVAR(level) == 2) then { - //hint format ["Target: %1\nTurretPath: %2\nNumMagazines: %3\nMaxMagazines %4\nMagazine: %5\nNumRounds: %6\nMagazine: %7", _vehicle, _turretPath, _numMagazines, _maxMagazines, _currentRounds, _numRounds, _magazineClass]; + //hint format ["Target: %1\nTurretPath: %2\nNumMagazines: %3\nMaxMagazines %4\nMagazine: %5\nNumRounds: %6\nMagazine: %7", _target, _turretPath, _numMagazines, _maxMagazines, _currentRounds, _numRounds, _magazineClass]; // Fill only at most _numRounds if ((_currentRounds + _numRounds) > _rounds) then { - _vehicle setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath]; + _target setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath]; if (_numMagazines < _maxMagazines) then { - _vehicle addMagazineTurret [_magazineClass, _turretPath]; - _vehicle setMagazineTurretAmmo [_magazineClass, _currentRounds + _numRounds - _rounds, _turretPath]; + _target addMagazineTurret [_magazineClass, _turretPath]; + _target setMagazineTurretAmmo [_magazineClass, _currentRounds + _numRounds - _rounds, _turretPath]; }; } else { - _vehicle setMagazineTurretAmmo [_magazineClass, _currentRounds + _numRounds, _turretPath]; + _target setMagazineTurretAmmo [_magazineClass, _currentRounds + _numRounds, _turretPath]; }; - [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _numRounds, + [QEGVAR(common,displayTextStructured), + [ + [LSTRING(Hint_RearmedTriple), _numRounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; + getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName")], 3, _unit + ], + [_unit]] call CBA_fnc_targetEvent; } else { // Fill current magazine completely and fill next magazine partially - _vehicle setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath]; + _target setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath]; if (_numMagazines < _maxMagazines) then { - _vehicle addMagazineTurret [_magazineClass, _turretPath]; - _vehicle setMagazineTurretAmmo [_magazineClass, _currentRounds, _turretPath]; + _target addMagazineTurret [_magazineClass, _turretPath]; + _target setMagazineTurretAmmo [_magazineClass, _currentRounds, _turretPath]; }; - [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _rounds, + [QEGVAR(common,displayTextStructured), + [ + [LSTRING(Hint_RearmedTriple), _rounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; + getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName")], 3, _unit + ], + [_unit]] call CBA_fnc_targetEvent; }; }; - _vehicle removeMagazineTurret [_magazineClass, _turretPath]; + _target removeMagazineTurret [_magazineClass, _turretPath]; _numMagazines = _numMagazines - 1; }; }; diff --git a/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf b/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf deleted file mode 100644 index 056ed26f48..0000000000 --- a/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Author: GitHawk - * Removes a magazine from the supply. - * - * Arguments: - * 0: Ammo Truck - * 1: Magazine Classname - * 2: Number of Rounds to withdraw (default: -1) - * - * Return Value: - * Magazine was removed - * - * Example: - * [ammo_truck, "500Rnd_127x99_mag_Tracer_Red"] call ace_rearm_fnc_removeMagazineFromSupply - * - * Public: Yes - */ -#include "script_component.hpp" - -params [["_truck", objNull, [objNull]], ["_magazineClass", "", [""]], ["_numRounds", -1, [0]]]; -TRACE_3("removeMagazineFromSupply",_truck,_magazineClass,_numRounds); - -if (isNull _truck || {_magazineClass isEqualTo ""}) exitWith {false}; - -private _return = false; -([_magazineClass] call FUNC(getCaliber)) params ["_cal", "_idx"]; - -if (GVAR(supply) == 0) then { - WARNING("supply setting is set to unlimited"); // func shouldn't have been called - _return = true; -}; - -if (GVAR(supply) == 1) then { - private _supply = [_truck] call FUNC(getSupplyCount); - if (GVAR(level) == 2) then { - // Remove partial magazine supply count - private _rearmAmount = (REARM_COUNT select _idx); - if (_numRounds > 0) then { - _rearmAmount = _numRounds; - }; - private _magazinePart = (_rearmAmount / (getNumber (configFile >> "CfgMagazines" >> _magazineClass >> "count"))) min 1; - if (_supply >= (_cal * _magazinePart)) then { - [_truck, (_supply - (_cal * _magazinePart))] call FUNC(setSupplyCount); - _return = true; - }; - } else { - // Remove entire magazine supply count - if (_supply >= _cal) then { - [_truck, (_supply - _cal)] call FUNC(setSupplyCount); - _return = true; - }; - }; -}; - -if (GVAR(supply) == 2) then { - private _magazineSupply = _truck getVariable [QGVAR(magazineSupply), []]; - private _magazineIdx = -1; - { - _x params ["_magazine"]; - if ((_magazine isEqualTo _magazineClass)) exitWith { - _magazineIdx = _forEachIndex; - }; - } forEach _magazineSupply; - if (_magazineIdx == -1) exitWith {false}; - - (_magazineSupply select _magazineIdx) params ["", "_rounds"]; - - private _configRounds = getNumber (configFile >> "CfgMagazines" >> _magazineClass >> "count"); - if (GVAR(level) == 2) then { - // With caliber based rearming, we need to remove the correct amount - private _rearmAmount = (REARM_COUNT select _idx); - if (_numRounds > 0) then { - if (_numRounds > _rearmAmount) then { - _rearmAmount = ceil (_numRounds / _rearmAmount); - }; - }; - private _roundsPerTransaction = _rearmAmount min _configRounds; - if (_rounds >= _roundsPerTransaction) then { - _magazineSupply set [_magazineIdx, [_magazineClass, (_rounds - _roundsPerTransaction)]]; - _truck setVariable [QGVAR(magazineSupply), _magazineSupply, true]; - _return = true; - }; - } else { - // Remove entire magazine - if (_rounds >= _configRounds) then { - _magazineSupply set [_magazineIdx, [_magazineClass, (_rounds - _configRounds)]]; - _truck setVariable [QGVAR(magazineSupply), _magazineSupply, true]; - _return = true; - }; - }; -}; -_return diff --git a/addons/rearm/functions/fnc_setSupplyCount.sqf b/addons/rearm/functions/fnc_setSupplyCount.sqf deleted file mode 100644 index d9d5194550..0000000000 --- a/addons/rearm/functions/fnc_setSupplyCount.sqf +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Author: GitHawk - * Sets the supply count. [Global Effects] - * - * Arguments: - * 0: Ammo Truck - * 1: Supply Count - * - * Return Value: - * None - * - * Example: - * [ammo_truck, 1000] call ace_rearm_fnc_setSupplyCount - * - * Public: Yes - */ -#include "script_component.hpp" - -if !(EGVAR(common,settingsInitFinished)) exitWith { // only run this after the settings are initialized - EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(setSupplyCount), _this]; -}; - -params [["_truck", objNull, [objNull]], ["_supply", 0, [0]]]; - -if (GVAR(supply) != 1) exitWith {WARNING("supply setting is not set to limited");}; -if (isNull _truck) exitWith {WARNING_1("Truck is null [%1]", _truck);}; - -_truck setVariable [QGVAR(currentSupply), (_supply max 0), true]; diff --git a/addons/rearm/functions/fnc_storeAmmo.sqf b/addons/rearm/functions/fnc_storeAmmo.sqf index c056421bba..b94616652e 100644 --- a/addons/rearm/functions/fnc_storeAmmo.sqf +++ b/addons/rearm/functions/fnc_storeAmmo.sqf @@ -3,38 +3,30 @@ * Stores ammo in an ammo truck. * * Arguments: - * 0: Ammo Truck + * 0: Target * 1: Unit * * Return Value: * None * * Example: - * [ammo_truck, player] call ace_rearm_fnc_storeAmmo + * [player, dummy] call ace_rearm_fnc_storeAmmo * * Public: No */ #include "script_component.hpp" -params [ - ["_truck", objNull, [objNull]], - ["_unit", objNull, [objNull]] -]; +params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]]; -private _attachedDummy = _unit getVariable [QGVAR(dummy), objNull]; -if (isNull _attachedDummy) exitwith {}; +private _dummy = _unit getVariable [QGVAR(dummy), objNull]; +if (isNull _dummy) exitwith {}; [ - TIME_PROGRESSBAR(5), - [_unit, _truck, _attachedDummy], - { - params ["_args"]; - _args params ["_unit", "_truck", "_attachedDummy"]; - [_truck, (_attachedDummy getVariable [QGVAR(magazineClass), ""]), true] call FUNC(addMagazineToSupply); - [_unit, true, true] call FUNC(dropAmmo); - }, + 5, + _unit, + {params ["_unit"]; [_unit, true, true] call FUNC(dropAmmo)}, "", - format [localize LSTRING(StoreAmmoAction), getText(configFile >> "CfgMagazines" >> (_attachedDummy getVariable QGVAR(magazineClass)) >> "displayName"), getText(configFile >> "CfgVehicles" >> (typeOf _truck) >> "displayName")], + format [localize LSTRING(StoreAmmoAction), getText(configFile >> "CfgMagazines" >> (_dummy getVariable QGVAR(magazineClass)) >> "displayName"), getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName")], {true}, ["isnotinside"] ] call EFUNC(common,progressBar); diff --git a/addons/rearm/functions/fnc_takeAmmo.sqf b/addons/rearm/functions/fnc_takeAmmo.sqf index 23f19fedf4..d2de1e1b59 100644 --- a/addons/rearm/functions/fnc_takeAmmo.sqf +++ b/addons/rearm/functions/fnc_takeAmmo.sqf @@ -19,21 +19,40 @@ */ #include "script_component.hpp" -params [ - ["_truck", objNull, [objNull]], - ["_unit", objNull, [objNull]], - ["_args", ["", objNull], [[]]] -]; +private ["_ammo", "_tmpCal", "_cal", "_idx"]; + +params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]], ["_args", ["", objNull], [[]]]]; _args params ["_magazineClass", "_vehicle"]; -TRACE_5("takeAmmo",_truck,_unit,_args,_magazineClass,_vehicle); -([_magazineClass] call FUNC(getCaliber)) params ["_cal", "_idx"]; +_ammo = getText (configFile >> "CfgMagazines" >> _magazineClass >> "ammo"); +_tmpCal = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ace_caliber"); +_cal = 8; +if (_tmpCal > 0) then { + _cal = _tmpCal; +} else { + _tmpCal = getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(caliber)); + if (_tmpCal > 0) then { + _cal = _tmpCal; + } else { + diag_log format ["[ACE] ERROR: Undefined Ammo [%1 : %2]", _ammo, inheritsFrom (configFile >> "CfgAmmo" >> _ammo)]; + if (_ammo isKindOf "BulletBase") then { + _cal = 8; + } else { + _cal = 100; + }; + }; +}; +_cal = round _cal; +_idx = REARM_CALIBERS find _cal; +if (_idx == -1 ) then { + _idx = 2; +}; -REARM_HOLSTER_WEAPON; +REARM_HOLSTER_WEAPON [ - TIME_PROGRESSBAR(REARM_DURATION_TAKE select _idx), - [_unit, _magazineClass, _truck], + (REARM_DURATION_TAKE select _idx), + [_unit, _magazineClass, _target], FUNC(takeSuccess), "", format [localize LSTRING(TakeAction), getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], diff --git a/addons/rearm/functions/fnc_takeSuccess.sqf b/addons/rearm/functions/fnc_takeSuccess.sqf index e458036176..6d5966c9f9 100644 --- a/addons/rearm/functions/fnc_takeSuccess.sqf +++ b/addons/rearm/functions/fnc_takeSuccess.sqf @@ -18,21 +18,15 @@ */ #include "script_component.hpp" -params [["_args", [objNull, "", objNull], [[]], 3]]; -_args params ["_unit", "_magazineClass", "_truck"]; -TRACE_3("takeSuccess",_unit,_magazineClass,_truck); - -private _success = true; -if (GVAR(supply) > 0) then { - _success = [_truck, _magazineClass] call FUNC(removeMagazineFromSupply); -}; -if !(_success) exitWith {WARNING_2("takeSuccess failed to take [%1] from [%2]",_magazineClass,_truck);}; +private ["_ammo", "_dummyName", "_dummy", "_actionID"]; +params [["_args", [objNull, "", objNull], [[]]]]; +_args params ["_unit", "_magazineClass", "_target"]; // _target is for future possible finite ammo [_unit, "forceWalk", QGVAR(vehRearm), true] call EFUNC(common,statusEffect_set); -private _dummy = [_unit, _magazineClass] call FUNC(createDummy); +_dummy = [_unit, _magazineClass] call FUNC(createDummy); [_dummy, _unit] call FUNC(pickUpAmmo); -private _actionID = _unit addAction [ +_actionID = _unit addAction [ format ["%1", localize ELSTRING(dragging,Drop)], '(_this select 0) call FUNC(dropAmmo)', nil, diff --git a/addons/rearm/script_component.hpp b/addons/rearm/script_component.hpp index 3edfeda3f1..43b9a8bb5f 100644 --- a/addons/rearm/script_component.hpp +++ b/addons/rearm/script_component.hpp @@ -4,8 +4,8 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS -// #define FAST_PROGRESSBARS #ifdef DEBUG_ENABLED_REARM #define DEBUG_MODE_FULL @@ -29,19 +29,12 @@ #define REARM_HOLSTER_WEAPON \ _unit setVariable [QGVAR(selectedWeaponOnRearm), currentWeapon _unit]; \ - TRACE_2("REARM_HOLSTER_WEAPON",_unit,currentWeapon _unit); \ - _unit action ["SwitchWeapon", _unit, _unit, 299]; + _unit action ["SwitchWeapon", _unit, _unit, 99]; #define REARM_UNHOLSTER_WEAPON \ _weaponSelect = _unit getVariable QGVAR(selectedWeaponOnRearm); \ + TRACE_2("REARM_UNHOLSTER_WEAPON",_unit,_weaponSelect); \ if (!isNil "_weaponSelect") then { \ - TRACE_2("REARM_UNHOLSTER_WEAPON",_unit,_weaponSelect); \ _unit selectWeapon _weaponSelect; \ _unit setVariable [QGVAR(selectedWeaponOnRearm), nil]; \ }; - -#ifdef FAST_PROGRESSBARS - #define TIME_PROGRESSBAR(X) ((X) * 0.075) -#else - #define TIME_PROGRESSBAR(X) (X) -#endif diff --git a/addons/rearm/stringtable.xml b/addons/rearm/stringtable.xml index 05aecd1102..7806735c57 100644 --- a/addons/rearm/stringtable.xml +++ b/addons/rearm/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -11,10 +11,6 @@ Impostazioni Riarmo Parámetros de rearme Options de réarmement - 再武装設定 - 재보급 설정 - 整装设定 - 整裝設定 This module allows you to tweak rearm system settings. @@ -26,10 +22,6 @@ Questo modulo ti consente di cambiare le impostazioni del sistema Riarmo. Este módulo permite cambiar los parámetros de rearme. Ce module autorise l'amélioration du système de réarmement. - 再武装システムの設定を微調整します。 - 이 모듈은 재보급시의 설정을 바꿀수 있게해줍니다. - 此模块允许你调整整装系统设定 - 此模塊允許你調整整裝系統設定 Rearm Amount @@ -41,10 +33,6 @@ Ammontare Riarmo Velocidad de rearme Quantité à réarmer - 再武装できる量 - 재보급 양 - 整装所需时间 - 整裝所需時間 How fast should a vehicle be rearmed? @@ -56,10 +44,6 @@ Quanto velocemente dovrebbe essere riarmato un veicolo? Cuán rápido es el proceso de rearme? A quelle vitesse devrait être réarmé un véhicule ? - 車両を再武装する速さを設定しますか? - 차량을 얼마나 빨리 재보급 시킵니까? - 载具多快会整装完毕? - 載具多快會整裝完畢? Entire Vehicle @@ -71,10 +55,6 @@ Tutto il Veicolo Vehículo completo Véhicule entier - 対象の車両 - 모든 차량 - 整个载具 - 整個載具 Entire Magazine @@ -86,10 +66,6 @@ Tutto il Caricatore Cargador completo Chargeur entier - 対象の弾薬 - 모든 탄창 - 整个弹匣 - 整個彈匣 Amount based on caliber @@ -101,90 +77,6 @@ Ammontare basato sul calibro Cantidad basada en el calibre Quantité basée sur le calibre - 口径に基づいた量 - 구경에 따라 수량 설정 - 基于口径决定所耗时间 - 基於口徑決定所耗時間 - - - Ammunition supply - Munitionsvorat - Scorta munizioni - 弾薬の供給 - 弹药补给 - 彈藥補給 - - - How much ammunition does an ammo truck carry? - Wie viel Munition transportiert ein Munitionslaster? - Quante munizioni può trasportare un camion? - 弾薬トラックがどの位の弾薬を供給できるようにしますか? - 弹药卡车会携带多少的弹药? - 彈藥卡車會攜帶多少的彈藥? - - - Unlimited ammo supply - Unbegrenzter Munitionsvorat - Scorta munizioni infinita - 無制限供給 - 无限弹药 - 無限彈藥 - - - Limited ammo supply based on caliber - Begrenzter, kaliberabhängiger Munitionsvorat - Scorta munizioni limitata in base al calibro - 口径に基づいた限定的供給 - 基于口径限制弹药数量 - 基於口徑限制彈藥數量 - - - Only specific Magazines - Nur bestimmte Magazine - Solo specifici caricatori - 特定の弾薬のみ - 只有指定的弹药 - 只有指定的彈藥 - - - Check remaining ammunition - Verbleibende Munition prüfen - Controlla munizioni rimanenti - 残弾薬を確認 - 检查剩余的弹药 - 檢查剩餘的彈藥 - - - Checking remaining ammunition... - Überprüfe verbleibende Munition... - Controllando le munizioni rimanenti - 残弾薬を確認しています・・・ - 正在检查剩余的弹药中... - 正在檢查剩餘的彈藥中... - - - There is ammunition worth %1 points left. - Es ist noch Munition für %1 Punkte übrig. - E' presente una penalità delle munizioni %1 punti rimanenti. - この弾薬は%1残っている - 还剩下%1多的弹药. - 還剩下%1多的彈藥. - - - The following ammunition is left:%1 - Folgende Munition ist übrig:%1 - Mancano le seguenti:%1 - この弾薬の残りは:%1 - 以下剩余的弹药:%1 - 以下剩餘的彈藥:%1 - - - There is no ammunition left. - Es ist keine Munition übrig. - Non ci sono munizioni rimanenti. - 弾薬は残っていません。 - 已经没有剩余的弹药了. - 已經沒有剩餘的彈藥了. Rearm @@ -196,10 +88,6 @@ Riarma Rearmar Réarmer - 再武装 - 재보급 - 整装 - 整裝 Rearming %1 with %2... @@ -208,13 +96,9 @@ Перевооружается %1 снарядами %2... Rearmando %1 com %2... Přezbrojuji %1 za pomoci %2... - Riarmando %1 con %2... + Sto Riarmando %1 con %2... Rearmando %1 con %2... Réarmement de %1 avec %2... - %1を%2により再武装する。 - %2을 %1에 재보급중... - %2正整装到%1中... - %2正整裝到%1中... Rearming %1... @@ -226,10 +110,6 @@ Riarmando %1... Rearmando %1... Réarmement de %1... - %1を再武装中・・・ - %1 재보급중... - 整装%1中... - 整裝%1中... Taking %1 for %2... @@ -241,10 +121,6 @@ Sto prendendo %1 per %2... Tomando %1 para %2... Prend %1 pour %2... - %1を%2のために取得しています・・・ - %2를 위해 %1 가져오는중... - 拿取%1给%2中... - 拿取%1給%2中... Take ammo @@ -256,10 +132,6 @@ Prendi munizioni Tomar munición Prendre la munition - 弾薬をとる - 탄약 가지기 - 取得弹药 - 取得彈藥 Pick up ammo @@ -271,10 +143,6 @@ Raccogli munizioni Levantar munición Ramasser la munition - 弾薬を拾う - 탄약 줍기 - 捡起弹药 - 撿起彈藥 Store ammo @@ -286,10 +154,6 @@ Riponi munizioni Guardar munición Stocker la munition - 弾薬を戻す - 탄약 보관하기 - 储存弹药 - 儲存彈藥 Storing %1 in %2... @@ -301,10 +165,6 @@ Sto riponendo %1 in %2... Guardando %1 en %2... Stocke %1 dans %2... - %1を%2へ戻しています・・・ - %2에 %1 보관중... - 储存%1到%2中... - 儲存%1到%2中... Picking up ammo... @@ -315,10 +175,6 @@ Sto raccogliendo le munizioni... Levantando munición... Ramassage des munitions... - 弾薬を拾っている・・・ - 탄약 줍는중... - 捡起弹药中... - 撿起彈藥中... Rearmed %1 rounds of %2 on %3 @@ -330,10 +186,6 @@ Riarmati %1 colpi di %2 su %3 Rearmadas %1 rondas de %2 en %3 %1 balles réarmées de %2 dans %3 - %1発の%2を%3から装填した - %3에 2%의 %1 탄약 재보급 - 整装了%1发%2到%3上 - 整裝了%1發%2到%3上 Smoke Screen @@ -345,10 +197,6 @@ Cortina de fumaça Дым. завеса Pantalla de humo - 煙幕弾 - 연막 차장 - 烟幕弹 - 煙幕彈 Flares @@ -360,10 +208,6 @@ Sinalizadores ЛТЦ Bengalas - フレア - 기만체 - 热焰弹 - 熱焰彈 30mm HEI @@ -375,10 +219,6 @@ 30mm HEI 30mm HEI 30mm HEI - 30mm 焼夷りゅう弾 - 30mm 고폭소이탄 - 30mm 高爆燃烧弹 - 30mm 高爆燃燒彈 30mm HEI-T @@ -390,10 +230,6 @@ 30mm HEI-T 30mm HEI-T 30mm HEI-T - 30mm 焼夷曳光りゅう弾 - 30mm 고폭소이예광탄 - 30mm 高爆燃烧曳光弹 - 30mm 高爆燃燒曳光彈 AIM-9 Sidewinder @@ -405,10 +241,6 @@ AIM-9 Sidewinder AIM-9 Sidewinder AIM-9 Sidewinder - AIM-9 サイドワインダー - AIM-9 Sidewinder - AIM-9 响尾蛇 - AIM-9 響尾蛇 Wympel R-73 @@ -420,10 +252,6 @@ Wympel R-73 Wympel R-73 Wympel R-73 - ヴィンペル R-73 - Vympel R-73 - Wympel R-73 - Wympel R-73 AGM-65 Maverick @@ -435,10 +263,6 @@ AGM-65 Maverick AGM-65 Maverick AGM-65 Maverick - AGM-65 マーベリック - AGM-65 Maverick - AGM-65 小牛 - AGM-65 小牛 Kh-25MTP @@ -450,10 +274,6 @@ Kh-25MTP Kh-25MTP Kh-25MTP - Kh-25MTP - Kh-25MTP - Kh-25MTP - Kh-25MTP Hydra 70 HE @@ -465,10 +285,6 @@ Hydra 70 HE Hydra 70 HE Hydra 70 HE - ハイドラ 70 りゅう弾 - Hydra 70 고폭탄 - 九头蛇 70 高爆弹 - 九頭蛇 70 高爆彈 S-8 HE @@ -480,10 +296,6 @@ S-8 HE S-8 HE S-8 HE - S-8 りゅう弾 - S-8 고폭탄 - S-8 高爆弹 - S-8 高爆彈 Hydra 70 AP @@ -495,10 +307,6 @@ Hydra 70 AP Hydra 70 AP Hydra 70 AP - ハイドラ 70 徹甲弾 - Hydra 70 철갑탄 - 九头蛇 70 反人员弹 - 九頭蛇 70 反人員彈 S-8 AP @@ -510,10 +318,6 @@ S-8 AP S-8 AP S-8 AP - S-8 徹甲弾 - S-8 철갑탄 - S-8 反人员弹 - S-8 反人員彈 GBU-12 @@ -525,10 +329,6 @@ GBU-12 GBU-12 GBU-12 - GBU-12 - GBU-12 - GBU-12 - GBU-12 FAB-250M-54 @@ -540,10 +340,6 @@ FAB-250M-54 FAB-250M-54 FAB-250M-54 - FAB-250M-54 - FAB-250M-54 - FAB-250M-54 - FAB-250M-54 - + \ No newline at end of file diff --git a/addons/recoil/XEH_preInit.sqf b/addons/recoil/XEH_preInit.sqf index ffd1bfc414..c503c2edbc 100644 --- a/addons/recoil/XEH_preInit.sqf +++ b/addons/recoil/XEH_preInit.sqf @@ -3,8 +3,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/recoil/functions/fnc_camshake.sqf b/addons/recoil/functions/fnc_camshake.sqf index 8b600f41ae..deb454df71 100644 --- a/addons/recoil/functions/fnc_camshake.sqf +++ b/addons/recoil/functions/fnc_camshake.sqf @@ -7,7 +7,7 @@ * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: - * None + * Nothing * * Example: * [player, (currentWeapon player), (currentMuzzle player)] call ace_recoil_fnc_camShake; diff --git a/addons/recoil/script_component.hpp b/addons/recoil/script_component.hpp index 99fdf02a94..d3147f056b 100644 --- a/addons/recoil/script_component.hpp +++ b/addons/recoil/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_RECOIL diff --git a/addons/refuel/ACE_Settings.hpp b/addons/refuel/ACE_Settings.hpp index a25c36a2ba..b38a880641 100644 --- a/addons/refuel/ACE_Settings.hpp +++ b/addons/refuel/ACE_Settings.hpp @@ -6,10 +6,4 @@ class ACE_Settings { value = 1; typeName = "SCALAR"; }; - class GVAR(hoseLength) { - category = ECSTRING(OptionsMenu,CategoryLogistics); - displayName = CSTRING(RefuelSettings_hoseLength_DisplayName); - value = 12; - typeName = "SCALAR"; - }; }; diff --git a/addons/refuel/CfgVehicles.hpp b/addons/refuel/CfgVehicles.hpp index 3a28762b79..1fd63bb461 100644 --- a/addons/refuel/CfgVehicles.hpp +++ b/addons/refuel/CfgVehicles.hpp @@ -5,7 +5,7 @@ class GVAR(Refuel) { \ displayName = CSTRING(Refuel); \ distance = REFUEL_ACTION_DISTANCE; \ - condition = "alive _target"; \ + condition = "true"; \ statement = ""; \ showDisabled = 0; \ priority = 2; \ @@ -31,6 +31,13 @@ exceptions[] = {"isNotInside"}; \ icon = QPATHTOF(ui\icon_refuel_interact.paa); \ }; \ + class GVAR(Connect) { \ + displayName = CSTRING(Connect); \ + condition = QUOTE([ARR_2(_player,_target)] call FUNC(canConnectNozzle)); \ + statement = QUOTE([ARR_2(_player,_target)] call DFUNC(connectNozzle)); \ + exceptions[] = {"isNotInside"}; \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ + }; \ class GVAR(Return) { \ displayName = CSTRING(Return); \ condition = QUOTE([ARR_2(_player,_target)] call FUNC(canReturnNozzle)); \ @@ -70,7 +77,7 @@ class GVAR(PickUpNozzle) { \ displayName = CSTRING(TakeNozzle); \ condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeNozzle)); \ - statement = QUOTE([ARR_3(_player,objNull,_target)] call FUNC(takeNozzle)); \ + statement = QUOTE([ARR_3(_player,objNull,_target)] call FUNC(TakeNozzle)); \ exceptions[] = {"isNotInside"}; \ icon = QPATHTOF(ui\icon_refuel_interact.paa); \ }; \ @@ -119,11 +126,6 @@ class CfgVehicles { typeName = "NUMBER"; defaultValue = 10; }; - class hoseLength { - displayName = CSTRING(RefuelSettings_hoseLength_DisplayName); - typeName = "NUMBER"; - defaultValue = 12; - }; }; }; @@ -149,11 +151,13 @@ class CfgVehicles { class House_F: House {}; class House_Small_F: House_F { + class EventHandlers; + class ACE_Actions { class ACE_MainActions { displayName = ECSTRING(interaction,MainAction); selection = ""; - distance = 5; + distance = 10; condition = "true"; }; }; @@ -183,13 +187,18 @@ class CfgVehicles { class Helicopter: Air { MACRO_CONNECT_ACTIONS + GVAR(fuelCapacity) = 1500; }; class Helicopter_Base_F: Helicopter {}; - class Helicopter_Base_H: Helicopter_Base_F {}; + + class Helicopter_Base_H: Helicopter_Base_F { + GVAR(fuelCapacity) = 3000; + }; class Plane: Air { MACRO_CONNECT_ACTIONS + GVAR(fuelCapacity) = 2000; GVAR(flowRate) = 16; }; @@ -199,6 +208,7 @@ class CfgVehicles { class Ship_F: Ship { MACRO_CONNECT_ACTIONS + GVAR(fuelCapacity) = 2000; GVAR(flowRate) = 4; }; @@ -312,7 +322,7 @@ class CfgVehicles { class I_G_Van_01_fuel_F: Van_01_fuel_base_F { transportFuel = 0; //1k }; - + class Tank_F: Tank { GVAR(fuelCapacity) = 1200; }; @@ -370,6 +380,19 @@ class CfgVehicles { GVAR(fuelCapacity) = 830; }; + class Heli_Attack_01_base_F: Helicopter_Base_F { + // Commanche + }; + + class Heli_Attack_02_base_F: Helicopter_Base_F { + // Mi-48 Kajman + }; + + class Heli_Light_01_base_F: Helicopter_Base_H { + // MH-6 + GVAR(fuelCapacity) = 242; + }; + class Heli_Light_02_base_F: Helicopter_Base_H { // Ka-60 Kasatka GVAR(fuelCapacity) = 1450; @@ -423,6 +446,11 @@ class CfgVehicles { GVAR(fuelCapacity) = 270; }; + class UGV_01_base_F: Car_F { + // Stomper + GVAR(fuelCapacity) = 100; + }; + class Plane_Fighter_03_base_F: Plane_Base_F { // L-159 ALCA GVAR(fuelCapacity) = 1914; @@ -504,6 +532,10 @@ class CfgVehicles { // Vanilla buildings class Land_Fuelstation_Feed_F: House_Small_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + transportFuel = 0; //50k MACRO_REFUEL_ACTIONS GVAR(hooks)[] = {{0,0,-0.5}}; @@ -511,28 +543,16 @@ class CfgVehicles { }; class Land_fs_feed_F: House_Small_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + transportFuel = 0; //50k MACRO_REFUEL_ACTIONS GVAR(hooks)[] = {{-0.4,0.022,-.23}}; GVAR(fuelCargo) = REFUEL_INFINITE_FUEL; }; - // Helper object for non-AllVehicles objects - class GVAR(helper): Helicopter_Base_F { - scope = 1; - displayName = "Refuel Helper"; - model = "\A3\Weapons_f\empty"; - class ACE_Actions {}; - class ACE_SelfActions {}; - EGVAR(cargo,hasCargo) = 0; - EGVAR(cargo,space) = 0; - damageEffect = ""; - destrType = ""; - class HitPoints {}; - class Turrets {}; - class TransportItems {}; - }; - /* // Barrels found in config \ BarrelHelper: Misc_thing 100 BarrelBase: BarrelHelper 100 diff --git a/addons/refuel/XEH_PREP.hpp b/addons/refuel/XEH_PREP.hpp index 282b008fca..dac451da17 100644 --- a/addons/refuel/XEH_PREP.hpp +++ b/addons/refuel/XEH_PREP.hpp @@ -14,10 +14,8 @@ PREP(dropNozzle); PREP(getFuel); PREP(handleDisconnect); PREP(handleKilled); -PREP(handlePlayerWeaponChanged); PREP(handleUnconscious); PREP(makeJerryCan); -PREP(maxDistanceDropNozzle); PREP(moduleRefuelSettings); PREP(readFuelCounter); PREP(refuel); diff --git a/addons/refuel/XEH_postInit.sqf b/addons/refuel/XEH_postInit.sqf index 3f20e5d30d..89a1f3dc45 100644 --- a/addons/refuel/XEH_postInit.sqf +++ b/addons/refuel/XEH_postInit.sqf @@ -1,7 +1,6 @@ #include "script_component.hpp" ["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler; -["weapon", FUNC(handlePlayerWeaponChanged)] call CBA_fnc_addPlayerEventHandler; if (isServer) then { addMissionEventHandler ["HandleDisconnect", {_this call FUNC(handleDisconnect)}]; @@ -11,20 +10,6 @@ if (isServer) then { _this call FUNC(resetLocal); }] call CBA_fnc_addEventHandler; -// workaround for static fuel stations -if (hasInterface) then { - { - if ( - configName _x isKindOf "Building" && - {isClass (_x >> "ACE_Actions" >> "ACE_MainActions" >> QGVAR(Refuel))} && - {getNumber (_x >> "scope") == 2} - ) then { - TRACE_1("Compiling menu",configName _x); - [configName _x] call EFUNC(interact_menu,compileMenu); - }; - } count ('true' configClasses (configFile >> "CfgVehicles")); -}; - #ifdef DEBUG_MODE_FULL diag_log text format ["[ACE-refuel] Showing CfgVehicles with vanilla transportFuel"]; diff --git a/addons/refuel/XEH_preInit.sqf b/addons/refuel/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/refuel/XEH_preInit.sqf +++ b/addons/refuel/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/refuel/functions/fnc_canCheckFuel.sqf b/addons/refuel/functions/fnc_canCheckFuel.sqf index 57514e4b8f..e0046dea3d 100644 --- a/addons/refuel/functions/fnc_canCheckFuel.sqf +++ b/addons/refuel/functions/fnc_canCheckFuel.sqf @@ -22,5 +22,5 @@ params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]]]; {!(_unit isKindOf "CAManBase")} || {!local _unit} || {!alive _target} || - {([_unit, _target] call EFUNC(interaction,getInteractionDistance)) > REFUEL_ACTION_DISTANCE} || + {(_target distance _unit) > REFUEL_ACTION_DISTANCE} || {(_target call FUNC(getFuel) == REFUEL_INFINITE_FUEL)}) diff --git a/addons/refuel/functions/fnc_canConnectNozzle.sqf b/addons/refuel/functions/fnc_canConnectNozzle.sqf index 03cd79d3c6..396931d9ba 100644 --- a/addons/refuel/functions/fnc_canConnectNozzle.sqf +++ b/addons/refuel/functions/fnc_canConnectNozzle.sqf @@ -26,7 +26,6 @@ if (_target isKindOf "AllVehicles") then { }; !(isNull _nozzle || - {!alive _target} || {_engine} || - {([_unit, _target] call EFUNC(interaction,getInteractionDistance)) > REFUEL_ACTION_DISTANCE} || - {!isNull (_target getVariable [QGVAR(nozzle), objNull])}) + {(_target distance _unit) > REFUEL_ACTION_DISTANCE} || + {!isNull (_target getVariable [QGVAR(nozzle), objNull])}) // TODO verify cant connect multiple fuel lines diff --git a/addons/refuel/functions/fnc_canDisconnect.sqf b/addons/refuel/functions/fnc_canDisconnect.sqf index 8ded3f3fb9..8bb24a8df2 100644 --- a/addons/refuel/functions/fnc_canDisconnect.sqf +++ b/addons/refuel/functions/fnc_canDisconnect.sqf @@ -22,7 +22,6 @@ if (isNull _unit || {isNull _nozzle} || {!(_unit isKindOf "CAManBase")} || {!local _unit} || - {!isNull (_unit getVariable [QGVAR(nozzle), objNull])} || {(_nozzle distance _unit) > REFUEL_ACTION_DISTANCE}) exitWith {false}; private _sink = _nozzle getVariable [QGVAR(sink), objNull]; diff --git a/addons/refuel/functions/fnc_canReturnNozzle.sqf b/addons/refuel/functions/fnc_canReturnNozzle.sqf index 04849c5ca0..4f3abe1d30 100644 --- a/addons/refuel/functions/fnc_canReturnNozzle.sqf +++ b/addons/refuel/functions/fnc_canReturnNozzle.sqf @@ -18,8 +18,6 @@ params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]]]; -private _nozzle = _unit getVariable [QGVAR(nozzle), objNull]; +private _nozzle = _unit getVariable QGVAR(nozzle); -(!isNull _nozzle) && -{([_unit, _target] call EFUNC(interaction,getInteractionDistance)) < REFUEL_ACTION_DISTANCE} && -{_target == (_nozzle getVariable [QGVAR(source), objNull])} +(_this call FUNC(canConnectNozzle)) && {_target == (_nozzle getVariable [QGVAR(source), objNull])} diff --git a/addons/refuel/functions/fnc_canTakeNozzle.sqf b/addons/refuel/functions/fnc_canTakeNozzle.sqf index b7ed8f0cb1..0ed998993b 100644 --- a/addons/refuel/functions/fnc_canTakeNozzle.sqf +++ b/addons/refuel/functions/fnc_canTakeNozzle.sqf @@ -22,7 +22,6 @@ if (isNull _unit || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {!alive _target} || - {!isNull (_unit getVariable [QGVAR(nozzle), objNull])} || - {([_unit, _target] call EFUNC(interaction,getInteractionDistance)) > REFUEL_ACTION_DISTANCE}) exitWith {false}; + {(_target distance _unit) > REFUEL_ACTION_DISTANCE}) exitWith {false}; !(_target getVariable [QGVAR(isConnected), false]) && {!(_unit getVariable [QGVAR(isRefueling), false])} diff --git a/addons/refuel/functions/fnc_checkFuel.sqf b/addons/refuel/functions/fnc_checkFuel.sqf index 081f344732..49d62b1e44 100644 --- a/addons/refuel/functions/fnc_checkFuel.sqf +++ b/addons/refuel/functions/fnc_checkFuel.sqf @@ -21,7 +21,7 @@ params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]]]; private _fuel = [_target] call FUNC(getFuel); [ - TIME_PROGRESSBAR(REFUEL_PROGRESS_DURATION * 2), + 5, [_unit, _target, _fuel], { params ["_args"]; diff --git a/addons/refuel/functions/fnc_connectNozzle.sqf b/addons/refuel/functions/fnc_connectNozzle.sqf index 807960977e..a124a331d5 100644 --- a/addons/refuel/functions/fnc_connectNozzle.sqf +++ b/addons/refuel/functions/fnc_connectNozzle.sqf @@ -41,6 +41,7 @@ private _actionID = _unit addAction [format ["%1", locali if (cameraView == "EXTERNAL") then { _virtualPosASL = _virtualPosASL vectorAdd ((positionCameraToWorld [0.3,0,0]) vectorDiff (positionCameraToWorld [0,0,0])); }; + private _virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition); private _lineInterection = lineIntersects [eyePos ace_player, _virtualPosASL, ace_player]; //Don't allow placing in a bad position: @@ -56,7 +57,7 @@ private _actionID = _unit addAction [format ["%1", locali _unit removeAction _actionID; if (GVAR(placeAction) == PLACE_APPROVE) then { - [_unit, _target, _virtualPosASL, _nozzle] call FUNC(ConnectNozzleAction); + [_unit, _target, _virtualPos, _nozzle] call FUNC(ConnectNozzleAction); }; }; // TODO add model like in attach/functions/fnc_attach }, 0, [_unit, _target, _nozzle, _actionID] ] call cba_fnc_addPerFrameHandler; diff --git a/addons/refuel/functions/fnc_connectNozzleAction.sqf b/addons/refuel/functions/fnc_connectNozzleAction.sqf index 31ebe1bfdc..250da51e21 100644 --- a/addons/refuel/functions/fnc_connectNozzleAction.sqf +++ b/addons/refuel/functions/fnc_connectNozzleAction.sqf @@ -6,7 +6,7 @@ * Arguments: * 0: Unit * 1: Target - * 2: Visual Position ASL + * 2: Visual Position * 3: Nozzle * * Return Value: @@ -20,55 +20,60 @@ #include "script_component.hpp" private ["_closeInDistance", "_endPosTestOffset"]; -params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_startingPosASL", [0,0,0], [[]], 3], ["_nozzle", objNull, [objNull]]]; +params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_startingPosition", [0,0,0], [[]], 3], ["_nozzle", objNull, [objNull]]]; +private _startingOffset = _target worldToModel _startingPosition; +private _startDistanceFromCenter = vectorMagnitude _startingOffset; +private _closeInUnitVector = vectorNormalized (_startingOffset vectorFromTo [0,0,0]); -private _bestPosASL = []; -private _bestPosDistance = 1e99; -private _viewPos = _startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [0,0,1])) vectorMultiply 3); -private _modelVector = _startingPosASL vectorFromTo (AGLtoASL (_target modelToWorld [0,0,0])); -private _modelVectorLow = _startingPosASL vectorFromTo (AGLtoASL (_target modelToWorld [0,0,-1])); +private _closeInMax = _startDistanceFromCenter; +private _closeInMin = 0; -{ - private _endPosASL = _x; - // [_startingPosASL, _endPosASL, [1,0,0,1]] call EFUNC(common,addLineToDebugDraw); // Debug scan lines - private _intersections = lineIntersectsSurfaces [_startingPosASL, _endPosASL, _unit]; +while {(_closeInMax - _closeInMin) > 0.01} do { + _closeInDistance = (_closeInMax + _closeInMin) / 2; + _endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _closeInDistance); + _endPosTestOffset set [2, (_startingOffset select 2)]; + private _endPosTest = _target modelToWorldVisual _endPosTestOffset; + + private _doesIntersect = false; { - _x params ["_intersectPosASL", "", "_intersectObject"]; - if (_intersectObject == _target) then { - private _distance = _startingPosASL distance _intersectPosASL; - if (_distance < _bestPosDistance) then { - _bestPosDistance = _distance; - _bestPosASL = _intersectPosASL; - }; - }; - } forEach _intersections; -} forEach [ - // Shoot rays towards player's view angle and see which spot is closest - _startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [0,0,1])) vectorMultiply 3), - _startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [-0.25,0,1])) vectorMultiply 3), - _startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [0.25,0,1])) vectorMultiply 3), - _startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [0,-0.25,1])) vectorMultiply 3), - _startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [-0.25,-0.25,1])) vectorMultiply 3), - _startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [0.25,-0.25,1])) vectorMultiply 3), - AGLtoASL (_target modelToWorld [0,0,0]), // Try old method of just using model center - AGLtoASL (_target modelToWorld [0,0,-0.5]) -]; + if (_doesIntersect) exitWith {}; + private _startingPosShifted = _startingPosition vectorAdd _x; + _startASL = if (surfaceIsWater _startingPosShifted) then {_startingPosShifted} else {ATLtoASL _startingPosShifted}; + { + _endPosShifted = _endPosTest vectorAdd _x; + private _endASL = if (surfaceIsWater _startingPosShifted) then {_endPosShifted} else {ATLtoASL _endPosShifted}; + + //Uncomment to see the lazor show, and see how the scanning works: + // drawLine3D [_startingPosShifted, _endPosShifted, [1,0,0,1]]; + if (_target in lineIntersectsWith [_startASL, _endASL, _unit]) exitWith {_doesIntersect = true}; + } forEach [[0,0,0.045], [0,0,-0.045], [0,0.045,0], [0,-0.045,0], [0.045,0,0], [-0.045,0,0]]; + } forEach [[0,0,0], [0,0,0.05], [0,0,-0.05]]; + + if (_doesIntersect) then { + _closeInMax = _closeInDistance; + } else { + _closeInMin = _closeInDistance; + }; +}; + +_closeInDistance = (_closeInMax + _closeInMin) / 2; //Checks (too close to center or can't attach) -if (_bestPosASL isEqualTo []) exitWith { +if ((_startDistanceFromCenter - _closeInDistance) < 0.1) exitWith { TRACE_2("no valid spot found",_closeInDistance,_startDistanceFromCenter); [localize LSTRING(Failed)] call EFUNC(common,displayTextStructured); }; //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); +_closeInDistance = (_closeInDistance - 0.05); -private _attachPosModel = _target worldToModel (ASLtoAGL _bestPosASL); +_endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _closeInDistance); +_endPosTestOffset set [2, (_startingOffset select 2)]; [ - TIME_PROGRESSBAR(REFUEL_PROGRESS_DURATION), - [_unit, _nozzle, _target, _attachPosModel], + 2, + [_unit, _nozzle, _target, _endPosTestOffset], { params ["_args"]; _args params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_target", objNull, [objNull]], ["_endPosTestOffset", [0,0,0], [[]], 3]]; diff --git a/addons/refuel/functions/fnc_dropNozzle.sqf b/addons/refuel/functions/fnc_dropNozzle.sqf index 21b700a757..575d318068 100644 --- a/addons/refuel/functions/fnc_dropNozzle.sqf +++ b/addons/refuel/functions/fnc_dropNozzle.sqf @@ -19,26 +19,13 @@ #include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_disconnectOnly", false, [false]]]; -TRACE_3("dropNozzle",_unit,_nozzle,_disconnectOnly); detach _nozzle; _nozzle setVariable [QGVAR(isRefueling), false, true]; if (_disconnectOnly) exitWith {}; _nozzle setVelocity [0, 0, 0]; - -private _groundPosition = getPosASL _nozzle; -private _posA = (getPosASL _nozzle) vectorAdd [0,0,0.05]; -private _posB = (getPosASL _nozzle) vectorAdd [0,0,-1000]; -private _intersections = lineIntersectsSurfaces [_posA, _posB, _unit, _nozzle, true, 1, "GEOM"]; -TRACE_1("",_intersections); -if (_intersections isEqualTo []) then { - _groundPosition set [2, (getTerrainHeightASL _groundPosition) + 0.005]; -} else { - _groundPosition = ((_intersections select 0) select 0) vectorAdd [0,0,0.005]; -}; -_nozzle setPosASL _groundPosition; -TRACE_1("finalPos",getPosATL _nozzle); +_nozzle setPosATL [(getPosATL _nozzle) select 0, (getPosATL _nozzle) select 1, 0.05]; if (isNull _unit) exitWith {}; _unit setVariable [QGVAR(isRefueling), false, true]; diff --git a/addons/refuel/functions/fnc_handlePlayerWeaponChanged.sqf b/addons/refuel/functions/fnc_handlePlayerWeaponChanged.sqf deleted file mode 100644 index 57897aef89..0000000000 --- a/addons/refuel/functions/fnc_handlePlayerWeaponChanged.sqf +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Author: Jonpas - * Drops nozzle or jerry can when selecting a weapon. - * - * Arguments: - * 0: Unit - * 1: Weapon (unused) - * - * Return Value: - * None - * - * Example: - * [_unit, "gun"] call ace_refuel_fnc_handlePlayerWeaponChanged; - * - * Public: No -*/ -#include "script_component.hpp" - -params ["_unit"]; - -// Drop nozzle/jerry can when selecting a non-primary weapon -if (_unit getVariable [QGVAR(isRefueling), false]) then { - private _nozzle = _unit getVariable [QGVAR(nozzle), objNull]; - if !(isNull _nozzle) then { - [_unit, _nozzle] call FUNC(dropNozzle); - _unit setVariable [QGVAR(selectedWeaponOnRefuel), nil]; - [_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set); - }; -}; diff --git a/addons/refuel/functions/fnc_makeJerryCan.sqf b/addons/refuel/functions/fnc_makeJerryCan.sqf index f42808d40a..c826948fa2 100644 --- a/addons/refuel/functions/fnc_makeJerryCan.sqf +++ b/addons/refuel/functions/fnc_makeJerryCan.sqf @@ -22,11 +22,9 @@ if (isNull _target || {_target isKindOf "AllVehicles"} || {_target getVariable [QGVAR(jerryCan), false]}) exitWith {}; -if (isServer) then { - [_target, _fuelAmount] call FUNC(setFuel); // has global effects -}; -_target setVariable [QGVAR(jerryCan), true]; -_target setVariable [QGVAR(source), _target]; +[_target, _fuelAmount] call FUNC(setFuel); +_target setVariable [QGVAR(jerryCan), true, true]; +_target setVariable [QGVAR(source), _target, true]; // Main Action private _action = [QGVAR(Refuel), @@ -38,7 +36,7 @@ private _action = [QGVAR(Refuel), [], [0, 0, 0], REFUEL_ACTION_DISTANCE] call EFUNC(interact_menu,createAction); -[_target, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToObject); +[_target, 0, [], _action] call EFUNC(interact_menu,addActionToObject); // Add pickup _action = [QGVAR(PickUpNozzle), @@ -50,7 +48,7 @@ _action = [QGVAR(PickUpNozzle), [], [0, 0, 0], REFUEL_ACTION_DISTANCE] call EFUNC(interact_menu,createAction); -[_target, 0, ["ACE_MainActions", QGVAR(Refuel)], _action] call EFUNC(interact_menu,addActionToObject); +[_target, 0, [QGVAR(Refuel)], _action] call EFUNC(interact_menu,addActionToObject); // Add turnOn _action = [QGVAR(TurnOn), @@ -62,7 +60,7 @@ _action = [QGVAR(TurnOn), [], [0, 0, 0], REFUEL_ACTION_DISTANCE] call EFUNC(interact_menu,createAction); -[_target, 0, ["ACE_MainActions", QGVAR(Refuel)], _action] call EFUNC(interact_menu,addActionToObject); +[_target, 0, [QGVAR(Refuel)], _action] call EFUNC(interact_menu,addActionToObject); // Add turnOff _action = [QGVAR(TurnOff), @@ -74,7 +72,7 @@ _action = [QGVAR(TurnOff), [], [0, 0, 0], REFUEL_ACTION_DISTANCE] call EFUNC(interact_menu,createAction); -[_target, 0, ["ACE_MainActions", QGVAR(Refuel)], _action] call EFUNC(interact_menu,addActionToObject); +[_target, 0, [QGVAR(Refuel)], _action] call EFUNC(interact_menu,addActionToObject); // Add disconnect _action = [QGVAR(Disconnect), @@ -86,4 +84,4 @@ _action = [QGVAR(Disconnect), [], [0, 0, 0], REFUEL_ACTION_DISTANCE] call EFUNC(interact_menu,createAction); -[_target, 0, ["ACE_MainActions", QGVAR(Refuel)], _action] call EFUNC(interact_menu,addActionToObject); +[_target, 0, [QGVAR(Refuel)], _action] call EFUNC(interact_menu,addActionToObject); diff --git a/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf b/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf deleted file mode 100644 index 0f83f48fbb..0000000000 --- a/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Author: GitHawk, Jonpas - * Drops the nozzle at maximum hose distance. - * - * Arguments: - * 0: Unit - * 1: Fuel Truck - * 2: End Pos Offset - * 3: Nozzle (optional) - * - * Return Value: - * None - * - * Example: - * [player, fuelTruck, [0, 0, 0], nozzle] call ace_refuel_fnc_maxDistanceDropNozzle - * - * Public: No - */ -#include "script_component.hpp" - -params ["_unit", "_source", "_endPosOffset", "_nozzle"]; - -// Exit if jerry can (no maximum distance there as it's not connected to anything) -if (_nozzle getVariable [QGVAR(jerryCan), false]) exitWith {}; - -// Check distance periodically to drop it at maximum hose length -[{ - params ["_args", "_pfID"]; - _args params [ - ["_unit", player, [objNull]], - ["_source", objNull, [objNull]], - ["_endPosOffset", [0, 0, 0], [[]], 3], - ["_nozzle", (_args select 0) getVariable [QGVAR(nozzle), objNull], [objNull]] - ]; - - if (!(_unit getVariable [QGVAR(isRefueling), false])) exitWith { - TRACE_1("player not isRefueling",_unit); - [_pfID] call CBA_fnc_removePerFrameHandler; - }; - - private _hoseLength = _source getVariable [QGVAR(hoseLength), GVAR(hoseLength)]; - if (isNull _source || {_unit distance (_source modelToWorld _endPosOffset) > (_hoseLength - 2)} || {!alive _source}) exitWith { - if !(isNull _nozzle) then { - [_unit, _nozzle] call FUNC(dropNozzle); - REFUEL_UNHOLSTER_WEAPON - - [_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set); - if (isNull _source || {!alive _source}) then { - private _rope = _nozzle getVariable [QGVAR(rope), objNull]; - if !(isNull _rope) then { - ropeDestroy _rope; - }; - private _helper = _nozzle getVariable [QGVAR(helper), objNull]; - if !(isNull _helper) then { - deleteVehicle _helper; - }; - deleteVehicle _nozzle; - } else { - [LSTRING(Hint_TooFar), 2, _unit] call EFUNC(common,displayTextStructured); - }; - }; - [_pfID] call CBA_fnc_removePerFrameHandler; - }; -}, 0, [_unit, _target, _endPosOffset, _nozzle]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/refuel/functions/fnc_moduleRefuelSettings.sqf b/addons/refuel/functions/fnc_moduleRefuelSettings.sqf index 9e3e953160..4d8f89425e 100644 --- a/addons/refuel/functions/fnc_moduleRefuelSettings.sqf +++ b/addons/refuel/functions/fnc_moduleRefuelSettings.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ace_refuel_fnc_moduleRefuelSettings - * * Public: No */ @@ -23,6 +20,5 @@ params ["_logic", "", ["_activated", false, [false]]]; if !(_activated) exitWith {}; [_logic, QGVAR(rate), "rate"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(hoseLength), "hoseLength"] call EFUNC(common,readSettingFromModule); -INFO_2("Refuel Module Initialized with flow rate: %1 - hoseLength: %2",GVAR(rate), GVAR(hoseLength)) +diag_log text format ["[ACE]: Refuel Module Initialized with flow rate: %1", GVAR(rate)]; diff --git a/addons/refuel/functions/fnc_readFuelCounter.sqf b/addons/refuel/functions/fnc_readFuelCounter.sqf index 98393e69ea..519b07897d 100644 --- a/addons/refuel/functions/fnc_readFuelCounter.sqf +++ b/addons/refuel/functions/fnc_readFuelCounter.sqf @@ -19,7 +19,7 @@ params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]]]; [ - TIME_PROGRESSBAR(REFUEL_PROGRESS_DURATION), + 2, [_unit, _target], { params ["_args"]; diff --git a/addons/refuel/functions/fnc_refuel.sqf b/addons/refuel/functions/fnc_refuel.sqf index 15fef426d2..ae17ce8d02 100644 --- a/addons/refuel/functions/fnc_refuel.sqf +++ b/addons/refuel/functions/fnc_refuel.sqf @@ -11,9 +11,6 @@ * Return Value: * None * - * Example: - * [bob, kevin, nozzle, [2, 1, 5]] call ace_refuel_fnc_refuel - * * Public: No */ @@ -21,16 +18,8 @@ params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_connectToPoint", [0,0,0], [[]], 3]]; -private _config = configFile >> "CfgVehicles" >> typeOf _target; - -private _rate = getNumber (_config >> QGVAR(flowRate)) * GVAR(rate); -private _maxFuel = getNumber (_config >> QGVAR(fuelCapacity)); - -// Fall back to vanilla fuelCapacity value (only air and sea vehicles don't have this defined by default by us) -// Air and sea vehicles have that value properly defined in liters, unlike ground vehicles which is is formula of (range * tested factor) - different fuel consumption system than ground vehicles -if (_maxFuel == 0) then { - _maxFuel = getNumber (_config >> "fuelCapacity"); -}; +private _rate = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(flowRate)) * GVAR(rate); +private _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(fuelCapacity)); [{ params ["_args", "_pfID"]; @@ -47,8 +36,7 @@ if (_maxFuel == 0) then { _sink setVariable [QGVAR(nozzle), objNull, true]; [_pfID] call CBA_fnc_removePerFrameHandler; }; - private _hoseLength = _source getVariable [QGVAR(hoseLength), GVAR(hoseLength)]; - private _tooFar = ((_sink modelToWorld _connectToPoint) distance (_source modelToWorld _connectFromPoint)) > (_hoseLength - 2); + private _tooFar = ((_sink modelToWorld _connectToPoint) distance (_source modelToWorld _connectFromPoint)) > (REFUEL_HOSE_LENGTH - 2); if (_tooFar && {!(_nozzle getVariable [QGVAR(jerryCan), false])}) exitWith { [LSTRING(Hint_TooFar), 2, _unit] call EFUNC(common,displayTextStructured); diff --git a/addons/refuel/functions/fnc_reset.sqf b/addons/refuel/functions/fnc_reset.sqf index 480beb6ca0..d58f0a48ad 100644 --- a/addons/refuel/functions/fnc_reset.sqf +++ b/addons/refuel/functions/fnc_reset.sqf @@ -31,10 +31,6 @@ if !(isNil "_nozzle") then { if !(isNull _rope) then { ropeDestroy _rope; }; - private _helper = _nozzle getVariable [QGVAR(helper), objNull]; - if !(isNull _helper) then { - deleteVehicle _helper; - }; { [QGVAR(resetLocal), [_x, _nozzle], _x] call CBA_fnc_targetEvent; diff --git a/addons/refuel/functions/fnc_returnNozzle.sqf b/addons/refuel/functions/fnc_returnNozzle.sqf index 2b1ac64f8b..1bd364eafb 100644 --- a/addons/refuel/functions/fnc_returnNozzle.sqf +++ b/addons/refuel/functions/fnc_returnNozzle.sqf @@ -24,7 +24,7 @@ private _source = _nozzle getVariable QGVAR(source); if (isNull _nozzle || {_source != _target}) exitWith {false}; [ - TIME_PROGRESSBAR(REFUEL_PROGRESS_DURATION), + 2, [_unit, _nozzle, _target], { params ["_args"]; @@ -46,10 +46,6 @@ if (isNull _nozzle || {_source != _target}) exitWith {false}; if !(isNull _rope) then { ropeDestroy _rope; }; - private _helper = _nozzle getVariable [QGVAR(helper), objNull]; - if !(isNull _helper) then { - deleteVehicle _helper; - }; deleteVehicle _nozzle; [_target, "blockEngine", "ACE_Refuel", false] call EFUNC(common,statusEffect_set); diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 1b0baac80c..9548b2ed2f 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -39,7 +39,7 @@ if (isNull _nozzle) then { // func is called on fuel truck _endPosOffset = _endPosOffset select 0; }; [ - TIME_PROGRESSBAR(REFUEL_PROGRESS_DURATION), + 2, [_unit, _target, _endPosOffset], { params ["_args"]; @@ -53,23 +53,11 @@ if (isNull _nozzle) then { // func is called on fuel truck _newNozzle attachTo [_unit, [-0.02,0.05,-0.12], "righthandmiddle1"]; _unit setVariable [QGVAR(nozzle), _newNozzle, true]; - private _ropeTarget = _target; - if (!(_target isKindOf "AllVehicles")) then { - private _helper = QGVAR(helper) createVehicle [0,0,0]; - [QEGVAR(common,hideObjectGlobal), [_helper, true]] call CBA_fnc_serverEvent; - if ((getText (configFile >> "CfgVehicles" >> typeOf _target >> "simulation")) isEqualTo "thingX") then { - _helper attachTo [_target, [0,0,0]]; - } else { - _helper setPosWorld (getPosWorld _target); - _helper setDir (getDir _target); - _helper setVectorUp (vectorUp _target); - }; - _newNozzle setVariable [QGVAR(helper), _helper, true]; - _ropeTarget = _helper; + if (_target isKindOf "AllVehicles") then { + // Currently ropeCreate requires its first parameter to be a real vehicle + private _rope = ropeCreate [_target, _endPosOffset, _newNozzle, [0, -0.20, 0.12], REFUEL_HOSE_LENGTH]; + _newNozzle setVariable [QGVAR(rope), _rope, true]; }; - private _hoseLength = _target getVariable [QGVAR(hoseLength), GVAR(hoseLength)]; - private _rope = ropeCreate [_ropeTarget, _endPosOffset, _newNozzle, [0, -0.20, 0.12], _hoseLength]; - _newNozzle setVariable [QGVAR(rope), _rope, true]; _newNozzle setVariable [QGVAR(attachPos), _endPosOffset, true]; _newNozzle setVariable [QGVAR(source), _target, true]; @@ -94,9 +82,6 @@ if (isNull _nozzle) then { // func is called on fuel truck '!isNull (_target getVariable [QGVAR(nozzle), objNull])' ]; _unit setVariable [QGVAR(ReleaseActionID), _actionID]; - - // Drop nozzle at maximum hose distance - [_unit, _target, _endPosOffset, _nozzle] call FUNC(maxDistanceDropNozzle); }, "", localize LSTRING(TakeNozzleAction), @@ -105,7 +90,7 @@ if (isNull _nozzle) then { // func is called on fuel truck ] call EFUNC(common,progressBar); } else { // func is called on muzzle either connected or on ground [ - TIME_PROGRESSBAR(REFUEL_PROGRESS_DURATION), + 2, [_unit, _nozzle], { params ["_args"]; @@ -138,15 +123,43 @@ if (isNull _nozzle) then { // func is called on fuel truck '!isNull (_target getVariable [QGVAR(nozzle), objNull])' ]; _unit setVariable [QGVAR(ReleaseActionID), _actionID]; - - // Drop nozzle at maximum hose distance - private _target = _nozzle getVariable QGVAR(source); - private _endPosOffset = _nozzle getVariable QGVAR(attachPos); - [_unit, _target, _endPosOffset, _nozzle] call FUNC(maxDistanceDropNozzle); }, "", localize LSTRING(TakeNozzleAction), {true}, ["isnotinside"] ] call EFUNC(common,progressBar); + + _target = _nozzle getVariable QGVAR(source); + _endPosOffset = _nozzle getVariable QGVAR(attachPos); +}; +if !(_nozzle getVariable [QGVAR(jerryCan), false]) then { + [{ + params ["_args", "_pfID"]; + _args params [ + ["_unit", player, [objNull]], + ["_source", objNull, [objNull]], + ["_endPosOffset", [0, 0, 0], [[]], 3], + ["_nozzle", _unit getVariable [QGVAR(nozzle), objNull], [objNull]] + ]; + + if (isNull _source || {_unit distance (_source modelToWorld _endPosOffset) > (REFUEL_HOSE_LENGTH - 2)} || {!alive _source}) exitWith { + if !(isNull _nozzle) then { + [_unit, _nozzle] call FUNC(dropNozzle); + REFUEL_UNHOLSTER_WEAPON + + [_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set); + if (isNull _source || {!alive _source}) then { + private _rope = _nozzle getVariable [QGVAR(rope), objNull]; + if !(isNull _rope) then { + ropeDestroy _rope; + }; + deleteVehicle _nozzle; + } else { + [LSTRING(Hint_TooFar), 2, _unit] call EFUNC(common,displayTextStructured); + }; + }; + [_pfID] call cba_fnc_removePerFrameHandler; + }; + }, 0, [_unit, _target, _endPosOffset]] call cba_fnc_addPerFrameHandler; }; diff --git a/addons/refuel/functions/fnc_turnOff.sqf b/addons/refuel/functions/fnc_turnOff.sqf index 2c2b8de158..7ce3d9c874 100644 --- a/addons/refuel/functions/fnc_turnOff.sqf +++ b/addons/refuel/functions/fnc_turnOff.sqf @@ -19,7 +19,7 @@ params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; [ - TIME_PROGRESSBAR(REFUEL_PROGRESS_DURATION), + 2, [_unit, _nozzle], { params ["_args"]; diff --git a/addons/refuel/functions/fnc_turnOn.sqf b/addons/refuel/functions/fnc_turnOn.sqf index cf8656f558..7a69de9b6f 100644 --- a/addons/refuel/functions/fnc_turnOn.sqf +++ b/addons/refuel/functions/fnc_turnOn.sqf @@ -19,7 +19,7 @@ params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; [ - TIME_PROGRESSBAR(REFUEL_PROGRESS_DURATION), + 2, [_unit, _nozzle], { params ["_args"]; diff --git a/addons/refuel/script_component.hpp b/addons/refuel/script_component.hpp index 3f85277a99..124b5acd64 100644 --- a/addons/refuel/script_component.hpp +++ b/addons/refuel/script_component.hpp @@ -4,8 +4,8 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS -// #define FAST_PROGRESSBARS #ifdef DEBUG_ENABLED_REFUEL #define DEBUG_MODE_FULL @@ -19,20 +19,14 @@ #define REFUEL_INFINITE_FUEL -10 #define REFUEL_ACTION_DISTANCE 7 -#define REFUEL_PROGRESS_DURATION 2 +#define REFUEL_HOSE_LENGTH 12 #define REFUEL_HOLSTER_WEAPON \ _unit setVariable [QGVAR(selectedWeaponOnRefuel), currentWeapon _unit]; \ _unit call EFUNC(common,fixLoweredRifleAnimation); \ - _unit action ["SwitchWeapon", _unit, _unit, 299]; + _unit action ["SwitchWeapon", _unit, _unit, 99]; #define REFUEL_UNHOLSTER_WEAPON \ _weaponSelect = _unit getVariable QGVAR(selectedWeaponOnRefuel); \ _unit selectWeapon _weaponSelect; \ _unit setVariable [QGVAR(selectedWeaponOnRefuel), nil]; - -#ifdef FAST_PROGRESSBARS - #define TIME_PROGRESSBAR(X) ((X) * 0.075) -#else - #define TIME_PROGRESSBAR(X) (X) -#endif diff --git a/addons/refuel/stringtable.xml b/addons/refuel/stringtable.xml index e2a4c45cd3..2df51ea540 100644 --- a/addons/refuel/stringtable.xml +++ b/addons/refuel/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -11,10 +11,6 @@ Impostazioni Rifornimento Parámetros de reabastecimiento Réglages de ravitaillement - 給油設定 - 재급유 설정 - 加油设定 - 加油設定 Flow Rate @@ -23,13 +19,9 @@ Скорость заправки Velocidade da vazão Rychlost tankování - Portata Flusso + Rateo Flusso Caudal de llenado Vitesse du ravitaillement - 流量 - 주유량 - 油料流量 - 油料流量 How fast should a vehicle be refueled? @@ -41,10 +33,6 @@ Quanto velocemente dovrebbe essere rifornito un veicolo? Cuán rápido se reabastecen los vehículos? A quelle vitesse devrait être ravitaillé un véhicule ? - どのくらいの速さで車両へ給油しますか? - 차량이 얼마나 빨리 재급유될 수 있습니까? - 载具多快会加油完毕? - 載具多快會加油完畢? Refuel @@ -56,10 +44,6 @@ Rifornisci Reabastecer Ravitaillement - 給油 - 재급유 - 加油 - 加油 Take fuel nozzle @@ -68,13 +52,9 @@ Взять топливный шланг Pegar o bocal de combustível Vzít výdejní pistoli - Prendi manica benzina + Prenti manica benzina Tomar surtidor Prendre la pompe - 給油ノズルを取る - 주유기 획득 - 拿取燃料喷嘴 - 拿取燃料噴嘴 Taking fuel nozzle... @@ -83,13 +63,9 @@ Берем топливный шланг... Pegando o bocal de combustível... Beru výdejní pistoli... - Prendendo manicotto benzina... + Sto prendendo manica benzina... Tomando surtidor... Prise de la pompe... - 給油ノズルを取っている・・・ - 주유기 획득중... - 拿取燃料喷嘴中... - 拿取燃料噴嘴中... Connect fuel nozzle @@ -101,10 +77,6 @@ Collega manica benzina Conectar surtidor Connecter la pompe - 給油ノズルを接続する - 주유기 꼽기 - 连接燃料喷嘴 - 連接燃料噴嘴 Connecting fuel nozzle... @@ -113,13 +85,9 @@ Присоединяем топливный шланг... Conectando o bocal de combustível... Připojuji výdejní pistoli... - Collegando manicotto benzina... + Sto collegando la manica benzina... Conectando surtidor... Connection de la pompe... - 給油ノズルを接続している・・・ - 주유기 꼽는중... - 连结燃料喷嘴中... - 連結燃料噴嘴中... Disconnect fuel nozzle @@ -128,13 +96,9 @@ Отсоединить топливный шланг Desconectar o bocal de combustível Odpojit výdejní pistoli - Scollega manicotto benzina + Scollega manica benzina Desconectar surtidor Déconnecter la pompe - 給油ノズルを外した - 주유기 뽑기 - 断开燃料喷嘴 - 斷開燃料噴嘴 Connect @@ -146,10 +110,6 @@ Collega Conectar Connecter - 接続 - 꼽기 - 连结 - 連結 Check remaining fuel @@ -161,10 +121,6 @@ Controlla benzina rimanente Verificar combustible remanente Vérifier le carburant restant - 残燃料を見る - 남은 연료 확인 - 检查剩余燃料 - 檢查剩餘燃料 Checking remaining fuel... @@ -173,13 +129,9 @@ Проверяем остаток топлива... Verificando combustível restante... Kontroluji zůstatek paliva... - Controllando la benzina rimanente... + Sto controllando la benzina rimanente... Verificando combustible remanente,,, Vérifie le carburant restant... - 残燃料を見ている・・・ - 남은 연료 확인중... - 检查剩余燃料中... - 檢查剩餘燃料中... There are %1 liters left. @@ -191,10 +143,6 @@ Sono rimasti %1 litri. Quedan %1 litros. Il reste %1 litres. - 後 %1 リットル残っている。 - %1 리터 남음 - 剩下%1公升的燃料. - 剩下%1公升的燃料. There is no fuel left. @@ -206,10 +154,6 @@ Non è rimasta più benzina. No queda combustible. Il n'y a plus de carburant. - もう燃料は残っていない。 - 연료 없음. - 没有剩余的燃料 - 沒有剩餘的燃料 Cancel @@ -221,10 +165,6 @@ Cancella Cancelar Annuler - 中止 - 취소 - 取消 - 取消 Failed @@ -236,10 +176,6 @@ Fallito Falló Echoué - 失敗 - 실패 - 失败 - 失敗 Stop fueling @@ -251,10 +187,6 @@ Ferma rifornimento Detener reabastecimiento Arrêter le ravitaillement - 給油をやめる - 그만 재급유하기 - 停止加油 - 停止加油 Stopping fueling... @@ -263,13 +195,9 @@ Останавливаем заправку... Parando reabastecimento... Zastavuji tankování... - Fermando il rifornimento... + Sto fermando il rifornimento... Deteniendo reabastecimiento... Arrête le ravitaillement... - 給油をやめている・・・ - 재급유 그만하는중... - 停止加油中... - 停止加油中... Start fueling @@ -281,10 +209,6 @@ Inizia rifornimento Comenzar reabastecimiento Débute le ravitaillement - 給油を始める - 재급유 시작 - 开始加油 - 開始加油 Starting fueling... @@ -293,13 +217,9 @@ Начинаем заправку... Começando reabastecimento... Spouštím tankování... - Iniziando il rifornimento... + Sto iniziando il rifornimento... Comenzando reabastecimiento... Début du ravitaillement... - 給油を始めている・・・ - 재급유 시작중... - 开始加油中... - 開始加油中... %1 Liters fueled @@ -311,10 +231,6 @@ %1 litri riforniti %1 lt reabastecido %1 litres ravitaillés - %1 リッターを給油した - %1 리터 재급유됨 - 已加入%1公升的燃料 - 已加入%1公升的燃料 The fuel source is empty. @@ -323,13 +239,9 @@ Источник топлива пустой. A fonte de combustível está vazia. Zdroj paliva je prázdný. - La fonte di benzina è vuota. + La fonte di benzina èvuota. La fuente de combustible está vacía. La source de carburant est vide. - 給油元は空です。 - 재급유처가 비었음. - 燃料来源已空. - 燃料來源已空. Maximum fuel hose length reached. @@ -338,13 +250,9 @@ Достигнута максимальная длина шланга. Distância máxima da mangueira de combustível alcançada. Dosažena maximální délka hadice - Distanza massima della pompa raggiunta. + Distanza massima della manica raggiunta. Máxima longitud de manguera alcanzada. Tuyau tendu au maximum - 給油ホースはもうこれ以上届かない。 - 주유기 호스 최대 거리에 도달함. - 已加满至最大油量. - 已加滿至最大油量. Fueling completed @@ -356,10 +264,6 @@ Rifornimento completato Reabastecimiento completado Ravitaillement terminé - 給油完了 - 재급유 완료함 - 加油完毕 - 加油完畢 Fueling stopped @@ -371,10 +275,6 @@ Rifornimento fermato Reabastecimiento detenido Ravitaillement stoppé - 給油を止めた - 재급유 멈춤 - 已停止加油 - 已停止加油 Fueling started @@ -386,10 +286,6 @@ Rifornimento iniziato Comenzó el reabastecimiento Ravitaillement débuté - 給油を始めた - 재급유 시작함 - 已开始加油 - 已開始加油 Return fuel nozzle @@ -398,13 +294,9 @@ Вернуть топливный шланг Retornar bocal de combustível Vrátit výdejní pistoli - Riponi manicotto benzina + Riponi manica benzina Devolver surtidor Retourner la pompe - 給油ノズルを戻す - 주유기 반환 - 放回燃料喷嘴 - 放回燃料噴嘴 Returning fuel nozzle... @@ -413,13 +305,9 @@ Возвращаем топливный шланг... Retornando bocal de combustível... Vracím výdejní pistoli... - Riponendo la manica della benzina... + Sto riponendo la manica della benzina... Devolviendo el surtidor... Retourne la pompe - 給油ノズルを戻している・・・ - 주유기 반환중 - 放回燃料喷嘴中... - 放回燃料噴嘴中... Check fuel counter @@ -431,10 +319,6 @@ Controlla indicatore livello benzina Verificar el contador de combustible Vérifier le compteur - 燃料計を見る - 연로카운터 확인 - 检查燃料表 - 檢查燃料表 Checking fuel counter... @@ -443,13 +327,9 @@ Проверяем счетчик топлива... Verificando contador de combustível... Konroluji palivoměr... - Controllando l'indicatore del livello benzina... + Sto controllando l'indicatore del livello benzina... Verificando el contador de combustible Vérification du compteur... - 燃料計を見ている・・・ - 연료카운터 확인중... - 检查燃料表中... - 檢查燃料表中... %1 liters have been fueled. @@ -461,19 +341,6 @@ %1 litri sono stati riforniti. Se reabastecieron %1 lt %1 litres ont été écoulés. - %1 リッターがある - %1 리터가 재급유되었습니다. - 已加入%1公升. - 已加入%1公升. - - - Refuel hose length - Betankung Schlauchlänge - Reabastecer longitud de manguera - Rifiuta lungezza tubo - 給油ホースの長さ - 加油软管长度 - 加油軟管長度 diff --git a/addons/reload/ACE_UI.hpp b/addons/reload/ACE_UI.hpp index cfc2a26f9c..8164d04b17 100644 --- a/addons/reload/ACE_UI.hpp +++ b/addons/reload/ACE_UI.hpp @@ -1,7 +1,7 @@ class ACE_UI { class ammoCount { class conditions { - ADDON = "cameraOn == (getConnectedUAV ACE_player)"; + ADDON = "(false)"; }; }; }; diff --git a/addons/reload/CfgVehicles.hpp b/addons/reload/CfgVehicles.hpp index 05ac18ea70..a9fa4deadd 100644 --- a/addons/reload/CfgVehicles.hpp +++ b/addons/reload/CfgVehicles.hpp @@ -6,7 +6,7 @@ class CfgVehicles { class GVAR(LinkBelt) { displayName = CSTRING(LinkBelt); distance = 2.0; - condition = QUOTE(([ARR_2(_player, _target)] call FUNC(getAmmoToLinkBelt)) > 0); + condition = QUOTE([ARR_2(_player, _target)] call FUNC(canLinkBelt)); statement = QUOTE([ARR_2(_player, _target)] call FUNC(startLinkingBelt)); }; class GVAR(CheckAmmo) { diff --git a/addons/reload/XEH_PREP.hpp b/addons/reload/XEH_PREP.hpp index f2b386ac37..bfd89b098e 100644 --- a/addons/reload/XEH_PREP.hpp +++ b/addons/reload/XEH_PREP.hpp @@ -1,6 +1,6 @@ PREP(canCheckAmmo); -PREP(getAmmoToLinkBelt); +PREP(canLinkBelt); PREP(checkAmmo); PREP(displayAmmo); PREP(startLinkingBelt); diff --git a/addons/reload/XEH_preInit.sqf b/addons/reload/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/reload/XEH_preInit.sqf +++ b/addons/reload/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/reload/config.cpp b/addons/reload/config.cpp index 21e28d35f5..9c66dd4828 100644 --- a/addons/reload/config.cpp +++ b/addons/reload/config.cpp @@ -20,3 +20,9 @@ class CfgPatches { #include "CfgActions.hpp" #include "ACE_Settings.hpp" #include "ACE_UI.hpp" + +class ACE_newEvents { + setAmmoSync = QGVAR(syncAmmo); + returnedAmmo = QGVAR(ammoReturned); + linkedAmmo = QGVAR(ammoLinked); +}; diff --git a/addons/reload/functions/fnc_getAmmoToLinkBelt.sqf b/addons/reload/functions/fnc_canLinkBelt.sqf similarity index 73% rename from addons/reload/functions/fnc_getAmmoToLinkBelt.sqf rename to addons/reload/functions/fnc_canLinkBelt.sqf index decb922d80..d29dc6efd6 100644 --- a/addons/reload/functions/fnc_getAmmoToLinkBelt.sqf +++ b/addons/reload/functions/fnc_canLinkBelt.sqf @@ -1,5 +1,5 @@ /* - * Author: esteldunedain, phyma + * Author: esteldunedain * Check if the target has an MG equiped with belt system that the player can link * * Arguments: @@ -7,10 +7,10 @@ * 1: Target * * Return Value: - * Maximum ammo of magazine (-1 on error) + * Can link belt * * Example: - * [player, cursorObject] call ace_reload_fnc_getAmmoToLinkBelt; + * [player, cursorObject] call ace_reload_fnc_canLinkBelt; * * Public: No */ @@ -18,18 +18,18 @@ params ["_player", "_target"]; -if (vehicle _target != _target) exitWith {-1}; +if (vehicle _target != _target) exitWith {false}; private _magazineType = currentMagazine _target; private _magazineCfg = configFile >> "CfgMagazines" >> _magazineType; -if (getNumber (_magazineCfg >> "ACE_isBelt") == 0) exitWith {-1}; +if (getNumber (_magazineCfg >> "ACE_isBelt") == 0) exitWith {false}; // Check if the ammo is not empty or full private _ammoCount = _target ammo currentWeapon _target; // Exit if the belt is full or empty -if (_ammoCount == 0 || getNumber (_magazineCfg >> "count") - _ammoCount == 0) exitWith {-1}; +if (_ammoCount == 0 || getNumber (_magazineCfg >> "count") - _ammoCount == 0) exitWith {false}; // Check if the player has any of the same magazines // Calculate max ammo @@ -39,4 +39,4 @@ private _maxAmmo = 0; _maxAmmo = _maxAmmo max (_x select 1); } forEach (magazinesAmmo _player select {_x select 0 == _magazineType}); -_maxAmmo +_maxAmmo > 0 diff --git a/addons/reload/functions/fnc_checkAmmo.sqf b/addons/reload/functions/fnc_checkAmmo.sqf index 90500b867f..baa0754f80 100644 --- a/addons/reload/functions/fnc_checkAmmo.sqf +++ b/addons/reload/functions/fnc_checkAmmo.sqf @@ -7,12 +7,7 @@ * 1: Target. Optional, if not suplied the player counts his personal or static weapon ammo * * Return Value: - * None - * - * Example: - * [bob, kevin] call ace_reload_fnc_checkAmmo - * - * Public: No + * Nothing */ #include "script_component.hpp" diff --git a/addons/reload/functions/fnc_displayAmmo.sqf b/addons/reload/functions/fnc_displayAmmo.sqf index f48bbb1e0a..6aa8f013d9 100644 --- a/addons/reload/functions/fnc_displayAmmo.sqf +++ b/addons/reload/functions/fnc_displayAmmo.sqf @@ -6,14 +6,8 @@ * 0: Target * * Return Value: - * None - * - * Example: - * [bob] call ace_reload_fnc_displayAmmo - * - * Public: No + * Nothing */ - #include "script_component.hpp" #define COUNT_BARS 12 diff --git a/addons/reload/functions/fnc_startLinkingBelt.sqf b/addons/reload/functions/fnc_startLinkingBelt.sqf index 4e64bfc154..a1cc73635d 100644 --- a/addons/reload/functions/fnc_startLinkingBelt.sqf +++ b/addons/reload/functions/fnc_startLinkingBelt.sqf @@ -8,13 +8,7 @@ * * Return Value: * None - * - * Example: - * [bob, kevin] call ace_reload_fnc_startLinkingBelt - * - * Public: No */ - #include "script_component.hpp" params ["_player", "_target"]; @@ -22,12 +16,25 @@ params ["_player", "_target"]; if (vehicle _target != _target) exitWith {false}; private _magazineType = currentMagazine _target; +private _magazineCfg = configFile >> "CfgMagazines" >> _magazineType; +if (getNumber (_magazineCfg >> "ACE_isBelt") == 0) exitWith {false}; -private _maxAmmo = [_player, _target] call FUNC(getAmmoToLinkBelt); +// Check if the ammo is not empty or full +private _ammoCount = _target ammo currentWeapon _target; -//if _maxAmmo is below 0 we quit -if (_maxAmmo <= 0) exitWith {}; +// Exit if the belt is full or empty +if ((_ammoCount == 0) || (getNumber (_magazineCfg >> "count") - _ammoCount) == 0) exitWith {false}; + +// Check if the player has any of the same same magazines +// Calculate max ammo it can link +private _maxAmmo = 0; + +{ + _maxAmmo = _maxAmmo max (_x select 1); +} forEach (magazinesAmmo _player select {_x select 0 == _magazineType}); + +if (_maxAmmo == 0) exitWith {}; // Condition to call each frame private _condition = { diff --git a/addons/reload/script_component.hpp b/addons/reload/script_component.hpp index 4cce82a013..c2dc3b55a1 100644 --- a/addons/reload/script_component.hpp +++ b/addons/reload/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_RELOAD diff --git a/addons/reload/stringtable.xml b/addons/reload/stringtable.xml index 5cdbe3e9ba..647322e8e6 100644 --- a/addons/reload/stringtable.xml +++ b/addons/reload/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -10,12 +10,8 @@ Sprawdź stan amunicji przy przeładowaniu broni Vérification des munitions au rechargement Lőszer ellenőrzése a fegyver újratöltésekor - Controlla le munizioni durante il ricaricamento + Controlla le munizioni ricaricando Conferir munição ao recarregar a arma - 再装填された武器の弾薬を確認 - 재장전시 장탄수 확인 - 在重新装填时检查弹药 - 在重新裝填時檢查彈藥 Check the ammo in your new magazine on magazine reload. @@ -28,10 +24,6 @@ A lőszer ellenőrzése az új tárad behelyezésekor újratöltés közben. Controlla le munizioni rimanenti nel caricatore in fase di cambio caricatore. Confere a munição no seu novo carregador ao recarregar a arma - あたらしく装填された弾倉の弾薬を確認します。 - 재장전시 새탄창에 있는 탄약을 확인합니다. - 在重新装填时检查新弹匣上的弹药. - 在重新裝填時檢查新彈匣上的彈藥. Check Ammo @@ -44,10 +36,6 @@ Controlla le munizioni Conferir munições Проверить боеприпасы - 弾薬を確認 - 장탄수 확인 - 检查弹药 - 檢查彈藥 Ammo @@ -60,10 +48,6 @@ Munizioni Munições Боеприпасы - 弾薬 - 장탄수 - 弹药 - 彈藥 Link belt @@ -76,10 +60,6 @@ Töltényheveder összekötése Attacca la tracolla Ligar cintos de munição - ベルト リンク - 벨트 연결 - 连接弹链 - 連接彈鏈 Linking belt... @@ -90,12 +70,8 @@ Podłączanie taśmy... Gurt anhängen... Töltényheveder összekötése folyamatban... - Attaccando la tracolla... + Attacco la tracolla... Ligando cintos... - ベルトをつなげている・・・ - 벨트 연결중... - 连接弹链中... - 連接彈鏈中... diff --git a/addons/reloadlaunchers/XEH_preInit.sqf b/addons/reloadlaunchers/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/reloadlaunchers/XEH_preInit.sqf +++ b/addons/reloadlaunchers/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/reloadlaunchers/config.cpp b/addons/reloadlaunchers/config.cpp index 09f01e0594..16ae8cb867 100644 --- a/addons/reloadlaunchers/config.cpp +++ b/addons/reloadlaunchers/config.cpp @@ -18,3 +18,7 @@ class CfgPatches { #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" + +class ACE_newEvents { + reloadLauncher = QGVAR(reloadLauncher); +}; diff --git a/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf b/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf index 1597654847..6a9d779d02 100644 --- a/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf +++ b/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf @@ -3,14 +3,11 @@ * Create one action per reloadable missile * * Arguments: - * 1: Target - * 0: Player + * 1: Target (Object) + * 0: Player (Object) * * Return Value: - * Children actions - * - * Example: - * [bob, kevin] call ace_reloadlaunchers_fnc_addMissileReloadActions + * Children actions (Array) * * Public: No * diff --git a/addons/reloadlaunchers/functions/fnc_canLoad.sqf b/addons/reloadlaunchers/functions/fnc_canLoad.sqf index 9f76cab49a..5072d44a48 100644 --- a/addons/reloadlaunchers/functions/fnc_canLoad.sqf +++ b/addons/reloadlaunchers/functions/fnc_canLoad.sqf @@ -3,16 +3,13 @@ * Check of the unit can reload the launcher of target unit. * * Arguments: - * 0: Unit to do the reloading - * 1: Unit eqipped with launcher - * 2: weapon name - * 3: missile name + * 0: Unit to do the reloading (Object) + * 1: Unit eqipped with launcher (Object) + * 2: weapon name (String) + * 3: missile name (String) * * Return Value: - * None - * - * Example: - * [bob, kevin, "weapon", "missile"] call ace_reloadlaunchers_fnc_canLoad + * NONE * * Public: No */ diff --git a/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf index 2dc8cf5925..40766a5905 100644 --- a/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf +++ b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf @@ -3,14 +3,11 @@ * Return all magazine types from reloaders inventory that are compatible with given weapon. * * Arguments: - * 0: Unit to to the reload - * 1: A launcher + * 0: Unit to to the reload (Object) + * 1: A launcher (String) * * Return Value: - * Reloable magazines - * - * Example: - * [bob, launcher] call ace_reloadlaunchers_fnc_getLoadableMissiles + * Reloable magazines (Array) * * Public: No */ diff --git a/addons/reloadlaunchers/functions/fnc_load.sqf b/addons/reloadlaunchers/functions/fnc_load.sqf index 8330b111b7..2f822bb6d7 100644 --- a/addons/reloadlaunchers/functions/fnc_load.sqf +++ b/addons/reloadlaunchers/functions/fnc_load.sqf @@ -3,16 +3,13 @@ * Reload a launcher * * Arguments: - * 0: Unit with magazine - * 1: Unit with launcher - * 2: weapon name - * 3: missile name + * 0: Unit with magazine (Object) + * 1: Unit with launcher (Object) + * 2: weapon name (String) + * 3: missile name (String) * * Return Value: - * None - * - * Example: - * [bob, kevin, "weapon", "missile"] call ace_reloadlaunchers_fnc_load + * NONE * * Public: No */ diff --git a/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf b/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf index cd2295d7d0..96db7cdca5 100644 --- a/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf +++ b/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf @@ -3,16 +3,13 @@ * Reload a launcher * * Arguments: - * 0: Unit to do the reloading - * 1: Target to rload - * 2: weapon name - * 3: missile name + * 0: Unit to do the reloading (Object) + * 1: Target to rload (Object) + * 2: weapon name (String) + * 3: missile name (String) * * Return Value: - * None - * - * Example: - * [bob, kevin, "weapon", "missile"] call ace_reloadlaunchers_fnc_realoadLauncher + * NONE * * Public: No */ @@ -27,4 +24,4 @@ if (currentWeapon _target != _weapon) exitWith {}; if (currentMagazine _target != "") exitWith {}; // command is wip, reload time for launchers is not intended. -_target addWeaponItem [_weapon, _magazine]; +_target addWeaponItem [_weapon, _magazine]; diff --git a/addons/reloadlaunchers/script_component.hpp b/addons/reloadlaunchers/script_component.hpp index 30901ec53b..9051d0c36f 100644 --- a/addons/reloadlaunchers/script_component.hpp +++ b/addons/reloadlaunchers/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_RELOADLAUNCHERS diff --git a/addons/reloadlaunchers/stringtable.xml b/addons/reloadlaunchers/stringtable.xml index ccbca809f0..72193d48e2 100644 --- a/addons/reloadlaunchers/stringtable.xml +++ b/addons/reloadlaunchers/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Kilövö betöltése Carica lanciamissili Recarregar lançador - ランチャーを装填 - 무기 재장전 - 装载发射器 - 裝載發射器 Loading launcher... @@ -26,12 +22,8 @@ Nabíjím odpalovač... Ładowanie wyrzutni... Kilövő betöltés alatt... - Caricando il lanciamissili... + Carico il lanciamissili... Recarregando lançador... - ランチャーを装填している・・・ - 무기 재장전중... - 装载发射器中... - 裝載發射器中... Launcher loaded @@ -44,10 +36,6 @@ Kilövő betöltve Lanciamissili caricato Lançador Carregado - ランチャーの装填完了 - 무기 재장전됨 - 发射器装载完毕 - 發射器裝載完畢 Load %1 @@ -60,10 +48,6 @@ %1 betöltése Caricato %1 Recarregar %1 - %1 へ装填 - %1 장전 - 装载%1 - 裝載%1 diff --git a/addons/repair/ACE_Repair.hpp b/addons/repair/ACE_Repair.hpp index 3cea9ed7ca..6e5eac4fa8 100644 --- a/addons/repair/ACE_Repair.hpp +++ b/addons/repair/ACE_Repair.hpp @@ -72,7 +72,7 @@ class ACE_Repair { requiredEngineer = QGVAR(engineerSetting_fullRepair); repairLocations[] = {QGVAR(fullRepairLocation)}; repairingTime = 30; - condition = "0 < ({_x>0} count (getAllHitPointsDamage _target param [2,[]]))"; + condition = "damage _target > 0"; callbackSuccess = QUOTE(call FUNC(doFullRepair)); itemConsumed = QGVAR(consumeItem_ToolKit); }; diff --git a/addons/repair/ACE_Settings.hpp b/addons/repair/ACE_Settings.hpp index 0c05bc8459..46228e2e44 100644 --- a/addons/repair/ACE_Settings.hpp +++ b/addons/repair/ACE_Settings.hpp @@ -12,7 +12,7 @@ class ACE_Settings { description = CSTRING(enginerSetting_Repair_description); typeName = "SCALAR"; value = 1; - values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_AdvancedOnly)}; + values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_RepairSpecialistOnly)}; category = ECSTRING(OptionsMenu,CategoryLogistics); }; class GVAR(engineerSetting_wheel) { @@ -20,7 +20,7 @@ class ACE_Settings { description = CSTRING(enginerSetting_Wheel_description); typeName = "SCALAR"; value = 0; - values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_AdvancedOnly)}; + values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_RepairSpecialistOnly)}; category = ECSTRING(OptionsMenu,CategoryLogistics); }; class GVAR(repairDamageThreshold) { @@ -58,7 +58,7 @@ class ACE_Settings { description = CSTRING(engineerSetting_fullRepair_description); typeName = "SCALAR"; value = 2; - values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_AdvancedOnly)}; + values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_RepairSpecialistOnly)}; category = ECSTRING(OptionsMenu,CategoryLogistics); }; class GVAR(addSpareParts) { diff --git a/addons/repair/CfgEden.hpp b/addons/repair/CfgEden.hpp index 1c1263755b..eb7933fee4 100644 --- a/addons/repair/CfgEden.hpp +++ b/addons/repair/CfgEden.hpp @@ -9,8 +9,8 @@ class Cfg3DEN { }; }; class GVAR(isEngineerControl): Title { - attributeLoad = "(_this controlsGroupCtrl 100) lbSetCurSel (((_value + 1) min 3) max 0);"; - attributeSave = "(lbCurSel (_this controlsGroupCtrl 100)) - 1"; + attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);"; + attributeSave = "(missionnamespace getvariable ['ace_isEng_temp',0]) - 1;"; class Controls: Controls { class Title: Title{}; class Value: ctrlToolbox { @@ -21,7 +21,8 @@ class Cfg3DEN { h = "5 * (pixelH * pixelGrid * 0.50)"; rows = 1; columns = 4; - strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignEngineerRole_role_none), CSTRING(AssignEngineerRole_role_engineer), CSTRING(AssignEngineerRole_role_advanced)}; + strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignEngineerRole_role_none), CSTRING(AssignEngineerRole_role_engineer), CSTRING(AssignEngineerRole_role_specialist)}; + onToolboxSelChanged = "missionnamespace setvariable ['ace_isEng_temp',_this select 1];"; }; }; }; diff --git a/addons/repair/CfgEventHandlers.hpp b/addons/repair/CfgEventHandlers.hpp index 3e47f9f96f..559d2d4d7e 100644 --- a/addons/repair/CfgEventHandlers.hpp +++ b/addons/repair/CfgEventHandlers.hpp @@ -37,7 +37,7 @@ class Extended_InitPost_EventHandlers { class Helicopter { class ADDON { init = QUOTE(_this call DFUNC(addRepairActions)); - exclude[] = {QEGVAR(fastroping,helper), "ACE_friesBase", QEGVAR(refuel,helper)}; + exclude[] = {QEGVAR(fastroping,helper), "ACE_friesBase"}; }; }; class Plane { diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp index e06c18115b..c2f2bfacc7 100644 --- a/addons/repair/CfgVehicles.hpp +++ b/addons/repair/CfgVehicles.hpp @@ -15,7 +15,7 @@ }; \ }; -class CBA_Extended_EventHandlers_base; +class CBA_Extended_EventHandlers; class CfgVehicles { class ACE_Module; @@ -38,7 +38,7 @@ class CfgVehicles { class values { class anyone { name = CSTRING(engineerSetting_anyone); value = 0; }; class Engineer { name = CSTRING(engineerSetting_EngineerOnly); value = 1; default = 1; }; - class Advanced { name = CSTRING(engineerSetting_AdvancedOnly); value = 2; }; + class Special { name = CSTRING(engineerSetting_RepairSpecialistOnly); value = 2; }; }; }; class engineerSetting_Wheel { @@ -48,7 +48,7 @@ class CfgVehicles { class values { class anyone { name = CSTRING(engineerSetting_anyone); value = 0; default = 1; }; class Engineer { name = CSTRING(engineerSetting_EngineerOnly); value = 1; }; - class Advanced { name = CSTRING(engineerSetting_AdvancedOnly); value = 2; }; + class Special { name = CSTRING(engineerSetting_RepairSpecialistOnly); value = 2; }; }; }; class repairDamageThreshold { @@ -91,7 +91,7 @@ class CfgVehicles { class values { class anyone { name = CSTRING(engineerSetting_anyone); value = 0; }; class Engineer { name = CSTRING(engineerSetting_EngineerOnly); value = 1; }; - class Advanced { name = CSTRING(engineerSetting_AdvancedOnly); value = 2; default = 1;}; + class Special { name = CSTRING(engineerSetting_RepairSpecialistOnly); value = 2; default = 1;}; }; }; class addSpareParts { @@ -150,7 +150,7 @@ class CfgVehicles { default = 1; }; class doctor { - name = CSTRING(AssignEngineerRole_role_advanced); + name = CSTRING(AssignEngineerRole_role_specialist); value = 2; }; }; @@ -311,17 +311,14 @@ class CfgVehicles { class ThingX; class ACE_RepairItem_Base: ThingX { class EventHandlers { - class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers_base {}; - }; - class ACE_Actions { - class ACE_MainActions { - modifierFunction = QUOTE(_this call FUNC(modifyInteraction)); - }; + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; }; + icon = "iconObject_circle"; + mapSize = 0.7; accuracy = 0.2; vehicleClass = "ACE_Logistics_Items"; - destrType = "DesturctNo"; // scripted delayed destruction + destrType = "DesturctNo"; }; class ACE_Track: ACE_RepairItem_Base { @@ -331,25 +328,6 @@ class CfgVehicles { scope = 2; model = QPATHTOF(data\ace_track.p3d); displayName = CSTRING(SpareTrack); - icon = "iconObject_2x1"; - mapSize = 0.5; - - // damage handling - armor = 0.6; - armorStructural = 1; - minTotalDamageThreshold = 0.01; - explosionShielding = 1; - replaceDamagedLimit = 0.9; - selectionDamage = "mat_track"; - - class Damage { - tex[] = {}; - mat[] = { - QPATHTO_R(data\trailObjects_steel.rvmat), - QPATHTO_R(data\trailObjects_steel_damage.rvmat), - QPATHTO_R(data\trailObjects_steel_destruct.rvmat) - }; - }; }; class ACE_Wheel: ACE_RepairItem_Base { @@ -360,42 +338,6 @@ class CfgVehicles { model = QPATHTOF(data\ace_wheel.p3d); displayName = CSTRING(SpareWheel); picture = QPATHTOF(ui\tire_ca.paa); - icon = "iconObject_circle"; - mapSize = 0.7; - - // damage handling - armor = 0.05; - armorStructural = 1; - minTotalDamageThreshold = 0.01; - explosionShielding = 1; - replaceDamagedLimit = 0.9; - selectionDamage = "mat_tyre"; //"mat_rim" - - // necessary because only one "selectionDamage" (== "visual") is allowed for simple damage objects - // can not take damage individually though, because of limitations of the thingX simulation type - class HitPoints { - class HitBody { - armor = 0.6; - material = -1; - name = "mat_rim"; - visual = "mat_rim"; - passThrough = 1; - radius = 0.1; - explosionShielding = 1; - }; - }; - - class Damage { - tex[] = {}; - mat[] = { - QPATHTO_R(data\trailObjects_tyre.rvmat), - QPATHTO_R(data\trailObjects_tyre_damage.rvmat), - QPATHTO_R(data\trailObjects_tyre_damage.rvmat), - QPATHTO_R(data\trailObjects_steel.rvmat), - QPATHTO_R(data\trailObjects_steel_damage.rvmat), - QPATHTO_R(data\trailObjects_steel_destruct.rvmat) - }; - }; }; // disable vanilla repair @@ -471,7 +413,7 @@ class CfgVehicles { transportRepair = 0; }; - class Truck_02_medical_base_F: Truck_02_box_base_F { + class Truck_02_engineeral_base_F: Truck_02_box_base_F { GVAR(canRepair) = 0; }; diff --git a/addons/repair/XEH_PREP.hpp b/addons/repair/XEH_PREP.hpp index 692bee6112..e3604c95a7 100644 --- a/addons/repair/XEH_PREP.hpp +++ b/addons/repair/XEH_PREP.hpp @@ -23,7 +23,6 @@ PREP(isEngineer); PREP(isInRepairFacility); PREP(isNearRepairVehicle); PREP(isRepairVehicle); -PREP(modifyInteraction); PREP(moduleAddSpareParts); PREP(moduleAssignEngineer); PREP(moduleAssignRepairVehicle); diff --git a/addons/repair/XEH_preInit.sqf b/addons/repair/XEH_preInit.sqf index 8e6a606f0f..a7feade1c3 100644 --- a/addons/repair/XEH_preInit.sqf +++ b/addons/repair/XEH_preInit.sqf @@ -2,14 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; - -["ACE_RepairItem_Base", "killed", { - params ["_object"]; - - [{deleteVehicle _this}, _object, 5] call CBA_fnc_waitAndExecute; -}] call CBA_fnc_addClassEventHandler; ADDON = true; diff --git a/addons/repair/config.cpp b/addons/repair/config.cpp index a8904a0a0a..71a990ea73 100644 --- a/addons/repair/config.cpp +++ b/addons/repair/config.cpp @@ -20,3 +20,10 @@ class CfgPatches { #include "CfgActions.hpp" #include "CfgVehicles.hpp" #include "CfgEden.hpp" + +class ACE_newEvents { + setWheelHitPointDamage = QGVAR(setWheelHitPointDamage); + setVehicleHitPointDamage = QGVAR(setVehicleHitPointDamage); + setVehicleDamage = QGVAR(setVehicleDamage); + AddCargoByClass = "ace_addCargo"; +}; diff --git a/addons/repair/data/ace_track.p3d b/addons/repair/data/ace_track.p3d index 53ac8971a7..988499c32b 100644 Binary files a/addons/repair/data/ace_track.p3d and b/addons/repair/data/ace_track.p3d differ diff --git a/addons/repair/data/ace_wheel.p3d b/addons/repair/data/ace_wheel.p3d index aedbf291ce..c24f804b4f 100644 Binary files a/addons/repair/data/ace_wheel.p3d and b/addons/repair/data/ace_wheel.p3d differ diff --git a/addons/repair/data/material_dummy.p3d b/addons/repair/data/material_dummy.p3d deleted file mode 100644 index 0926cc0f73..0000000000 Binary files a/addons/repair/data/material_dummy.p3d and /dev/null differ diff --git a/addons/repair/data/model.cfg b/addons/repair/data/model.cfg deleted file mode 100644 index 5be2ddde24..0000000000 --- a/addons/repair/data/model.cfg +++ /dev/null @@ -1,40 +0,0 @@ -class CfgSkeletons { - class Default { - isDiscrete = 1; - skeletonInherit = ""; - skeletonBones[] = {}; - }; - - class ace_wheel: Default { - skeletonBones[] = {}; - }; - - class ace_track: Default { - skeletonBones[] = {}; - }; -}; - -class CfgModels { - class Default { - skeletonName = ""; - sectionsInherit = ""; - sections[] = {}; - }; - - class ace_wheel: Default { - skeletonName = "ace_wheel"; - sectionsInherit = ""; - sections[] = { - "mat_tyre", - "mat_rim" - }; - }; - - class ace_track: Default { - skeletonName = "ace_track"; - sectionsInherit = ""; - sections[] = { - "mat_track" - }; - }; -}; diff --git a/addons/repair/data/trailObjects.rvmat b/addons/repair/data/trailObjects.rvmat new file mode 100644 index 0000000000..8692493699 --- /dev/null +++ b/addons/repair/data/trailObjects.rvmat @@ -0,0 +1,100 @@ +#define _ARMA_ + +class StageTI +{ + texture = "a3\data_f\default_ti_ca.paa"; +}; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,0}; +specular[] = {0.0099999998,0.0099999998,0.0099999998,0.0099999998}; +specularPower = 500; +surfaceInfo="a3\data_f\penetration\metal.bisurf"; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 +{ + texture = "z\ace\addons\repair\data\trailObjects_nohq.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage2 +{ + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage3 +{ + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage4 +{ + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage5 +{ + texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage6 +{ + texture = "#(ai,64,64,1)fresnelGlass(2)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage7 +{ + useWorldEnvMap = "true"; + texture = "a3\data_f\env_land_ca.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/repair/data/trailObjects_steel.rvmat b/addons/repair/data/trailObjects_steel.rvmat deleted file mode 100644 index f92ea9113f..0000000000 --- a/addons/repair/data/trailObjects_steel.rvmat +++ /dev/null @@ -1,91 +0,0 @@ -class StageTI { - texture = "a3\data_f\default_ti_ca.paa"; -}; - -ambient[] = {1,1,1,1}; -diffuse[] = {1,1,1,1}; -forcedDiffuse[] = {0,0,0,0}; -emmisive[] = {0,0,0,0}; -specular[] = {0.01,0.01,0.01,0.01}; -specularPower = 500; -surfaceInfo = "a3\data_f\penetration\metal.bisurf"; -PixelShaderID = "Super"; -VertexShaderID = "Super"; - -class Stage1 { - texture = "z\ace\addons\repair\data\trailObjects_nohq.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage2 { - texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage3 { - texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage4 { - texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage5 { - texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage6 { - texture = "#(ai,64,64,1)fresnelGlass(2)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage7 { - useWorldEnvMap = "true"; - texture = "a3\data_f\env_land_ca.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; diff --git a/addons/repair/data/trailObjects_steel_damage.rvmat b/addons/repair/data/trailObjects_steel_damage.rvmat deleted file mode 100644 index 1850a7396c..0000000000 --- a/addons/repair/data/trailObjects_steel_damage.rvmat +++ /dev/null @@ -1,91 +0,0 @@ -class StageTI { - texture = "a3\data_f\default_ti_ca.paa"; -}; - -ambient[] = {1,1,1,1}; -diffuse[] = {1,1,1,1}; -forcedDiffuse[] = {0,0,0,0}; -emmisive[] = {0,0,0,0}; -specular[] = {0.01,0.01,0.01,0.01}; -specularPower = 500; -surfaceInfo = "a3\data_f\penetration\metal.bisurf"; -PixelShaderID = "Super"; -VertexShaderID = "Super"; - -class Stage1 { - texture = "z\ace\addons\repair\data\trailObjects_nohq.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage2 { - texture = "a3\data_f\destruct\damage_metal_cdt.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {5,0,0}; - up[] = {0,5,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; -}; - -class Stage3 { - texture = "a3\data_f\destruct\damage_metal_mc.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {3,0,0}; - up[] = {0,3,0}; - dir[] = {0,0,0}; - pos[] = {0.1,0.23,0}; - }; -}; - -class Stage4 { - texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage5 { - texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage6 { - texture = "#(ai,64,64,1)fresnelGlass(2)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage7 { - useWorldEnvMap = "true"; - texture = "a3\data_f\env_land_ca.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; diff --git a/addons/repair/data/trailObjects_steel_destruct.rvmat b/addons/repair/data/trailObjects_steel_destruct.rvmat deleted file mode 100644 index 5be6a7c912..0000000000 --- a/addons/repair/data/trailObjects_steel_destruct.rvmat +++ /dev/null @@ -1,91 +0,0 @@ -class StageTI { - texture = "a3\data_f\default_ti_ca.paa"; -}; - -ambient[] = {1,1,1,1}; -diffuse[] = {1,1,1,1}; -forcedDiffuse[] = {0,0,0,0}; -emmisive[] = {0,0,0,0}; -specular[] = {0.01,0.01,0.01,0.01}; -specularPower = 500; -surfaceInfo = "a3\data_f\penetration\metal.bisurf"; -PixelShaderID = "Super"; -VertexShaderID = "Super"; - -class Stage1 { - texture = "z\ace\addons\repair\data\trailObjects_nohq.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage2 { - texture = "a3\data_f\destruct\destruct_rust_cdt.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {8,8,0}; - up[] = {-8,8,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; -}; - -class Stage3 { - texture = "a3\data_f\destruct\destruct_rust_mca.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {2,0,0}; - up[] = {0,2,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; -}; - -class Stage4 { - texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage5 { - texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage6 { - texture = "#(ai,64,64,1)fresnelGlass(2)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage7 { - useWorldEnvMap = "true"; - texture = "a3\data_f\env_land_ca.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; diff --git a/addons/repair/data/trailObjects_tyre.rvmat b/addons/repair/data/trailObjects_tyre.rvmat deleted file mode 100644 index f92ea9113f..0000000000 --- a/addons/repair/data/trailObjects_tyre.rvmat +++ /dev/null @@ -1,91 +0,0 @@ -class StageTI { - texture = "a3\data_f\default_ti_ca.paa"; -}; - -ambient[] = {1,1,1,1}; -diffuse[] = {1,1,1,1}; -forcedDiffuse[] = {0,0,0,0}; -emmisive[] = {0,0,0,0}; -specular[] = {0.01,0.01,0.01,0.01}; -specularPower = 500; -surfaceInfo = "a3\data_f\penetration\metal.bisurf"; -PixelShaderID = "Super"; -VertexShaderID = "Super"; - -class Stage1 { - texture = "z\ace\addons\repair\data\trailObjects_nohq.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage2 { - texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage3 { - texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage4 { - texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage5 { - texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage6 { - texture = "#(ai,64,64,1)fresnelGlass(2)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage7 { - useWorldEnvMap = "true"; - texture = "a3\data_f\env_land_ca.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; diff --git a/addons/repair/data/trailObjects_tyre_damage.rvmat b/addons/repair/data/trailObjects_tyre_damage.rvmat deleted file mode 100644 index 00bb746293..0000000000 --- a/addons/repair/data/trailObjects_tyre_damage.rvmat +++ /dev/null @@ -1,91 +0,0 @@ -class StageTI { - texture = "a3\data_f\default_ti_ca.paa"; -}; - -ambient[] = {1,1,1,1}; -diffuse[] = {1,1,1,1}; -forcedDiffuse[] = {0,0,0,0}; -emmisive[] = {0,0,0,0}; -specular[] = {0.01,0.01,0.01,0.01}; -specularPower = 500; -surfaceInfo = "a3\data_f\penetration\metal.bisurf"; -PixelShaderID = "Super"; -VertexShaderID = "Super"; - -class Stage1 { - texture = "z\ace\addons\repair\data\trailObjects_nohq.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage2 { - texture = "a3\data_f\destruct\destr_rubber_half_dt.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {5,0,0}; - up[] = {0,5,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; -}; - -class Stage3 { - texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; - uvSource = "tex"; - class uvTransform { - aside[] = {3,0,0}; - up[] = {0,3,0}; - dir[] = {0,0,0}; - pos[] = {0.1,0.23,0}; - }; -}; - -class Stage4 { - texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage5 { - texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage6 { - texture = "#(ai,64,64,1)fresnelGlass(2)"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; - -class Stage7 { - useWorldEnvMap = "true"; - texture = "a3\data_f\env_land_ca.paa"; - uvSource = "tex"; - class uvTransform { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; -}; diff --git a/addons/repair/dev/draw_showRepairInfo.sqf b/addons/repair/dev/draw_showRepairInfo.sqf deleted file mode 100644 index 5701c172ea..0000000000 --- a/addons/repair/dev/draw_showRepairInfo.sqf +++ /dev/null @@ -1,69 +0,0 @@ -// PabstMirror -// [] execVM "\z\ace\addons\repair\dev\draw_showRepairInfo.sqf"; - -#include "\z\ace\addons\repair\script_component.hpp" - -addMissionEventHandler ["Draw3D", { - if !((cursorObject isKindOf "Car") || (cursorObject isKindOf "Tank") || (cursorObject isKindOf "Air")) exitWith {}; - private _config = configFile >> "CfgVehicles" >> (typeOf cursorObject); - - private _hitpointPositions = getArray (_config >> QGVAR(hitpointPositions)); - private _hitpointGroups = getArray (_config >> QGVAR(hitpointGroups)); - - (getAllHitPointsDamage cursorObject) params [["_hitPoints", []], ["_hitSelections", []]]; - ([cursorObject] call FUNC(getWheelHitPointsWithSelections)) params ["_wheelHitPoints", "_wheelHitSelections"]; - - private _output = []; - - { - private _selection = _x; - private _hitpoint = _hitPoints select _forEachIndex; - - if ((_selection != "") && {_hitPoint != ""}) then { - if (((toLower _hitPoint) find "glass") != -1) exitWith {}; - - private _info = ""; - private _color = [1,0,0,1]; - if (_selection in _wheelHitSelections) then { - _info = _info + "[Wheel]"; - _color = [0,1,0,1]; - }; - if (!((getText (_config>> "HitPoints" >> _hitpoint >> "depends")) in ["", "0"])) then { - _info = _info + format ["[depends: %1]", getText (_config>> "HitPoints" >> _hitpoint >> "depends")]; - _color = [0,0,1,1] - }; - - private _position = cursorObject selectionPosition [_selection, "HitPoints"]; - { - _x params ["_hit", "_pos"]; - if (_hitpoint == _hit) exitWith { - _info = _info + format ["[hitPos: %1]", _pos]; - if (_pos isEqualType []) exitWith { - _position = _pos; - }; - if (_pos isEqualType "") exitWith { - _position = cursorObject selectionPosition [_pos, "HitPoints"]; - }; - }; - } forEach _hitpointPositions; - - private _parentHitpoint = ""; - { - private _xParent = _x select 0; - { - if (_hitpoint == _x) exitWith { - _info = _info + format ["[Parent: %1]", _xParent]; - _parentHitpoint = _xParent; - }; - } forEach (_x select 1); - } forEach _hitpointGroups; - - if (_parentHitpoint == "") then { - drawIcon3D ["", _color, (cursorObject modelToWorld _position), 0.5, 0.5, 0, format ["%1 [%2]", _hitpoint, _selection], 0.5, 0.025, "TahomaB"]; - }; - _output pushBack format ["%1: %2[%3] = %4", _forEachIndex, _hitPoint, _selection, cursorObject getHitIndex _forEachIndex]; - _output pushBack format ["- %1 -",_info]; - }; - } forEach _hitPoints; - hintSilent (_output joinString "\n"); -}]; diff --git a/addons/repair/functions/fnc_addRepairActions.sqf b/addons/repair/functions/fnc_addRepairActions.sqf index 398083a080..8359850a3e 100644 --- a/addons/repair/functions/fnc_addRepairActions.sqf +++ b/addons/repair/functions/fnc_addRepairActions.sqf @@ -56,7 +56,7 @@ _processedHitpoints = []; // An action to remove the wheel is required _name = format ["Remove_%1_%2", _forEachIndex, _hitpoint]; - private _text = localize LSTRING(RemoveWheel); + _text = localize LSTRING(RemoveWheel); _condition = {[_this select 1, _this select 0, _this select 2 select 0, "RemoveWheel"] call DFUNC(canRepair)}; _statement = {[_this select 1, _this select 0, _this select 2 select 0, "RemoveWheel"] call DFUNC(repair)}; _action = [_name, _text, _icon, _statement, _condition, {}, [_hitpoint], _position, 2] call EFUNC(interact_menu,createAction); @@ -79,8 +79,7 @@ _processedHitpoints = []; if (_selection isEqualTo "") exitWith { TRACE_3("Selection Empty",_hitpoint,_forEachIndex,_selection); }; if (_hitpoint isEqualTo "") exitWith { TRACE_3("Hitpoint Empty",_hitpoint,_forEachIndex,_selection); }; //Depends hitpoints shouldn't be modified directly (will be normalized) - // Biki: Clearing 'depends' in case of inheritance cannot be an empty string (rpt warnings), but rather a "0" value. - if (!((getText (configFile >> "CfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "depends")) in ["", "0"])) exitWith { + if (isText (configFile >> "CfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "depends")) exitWith { TRACE_3("Skip Depends",_hitpoint,_forEachIndex,_selection); }; @@ -114,7 +113,7 @@ _processedHitpoints = []; if (_pos isEqualType "") exitWith { _position = compile format ["_target selectionPosition ['%1', 'HitPoints'];", _pos]; }; - ERROR_3("Invalid custom position %1 of hitpoint %2 in vehicle %3.",_position,_hitpoint,_type); + ACE_LOGERROR_3("Invalid custom position %1 of hitpoint %2 in vehicle %3.",_position,_hitpoint,_type); }; } forEach (getArray _positionsConfig); }; diff --git a/addons/repair/functions/fnc_doRepair.sqf b/addons/repair/functions/fnc_doRepair.sqf index ad944518f4..ede096a1fb 100644 --- a/addons/repair/functions/fnc_doRepair.sqf +++ b/addons/repair/functions/fnc_doRepair.sqf @@ -49,7 +49,7 @@ if (isArray _hitpointGroupConfig) then { { private _subHitIndex = _allHitPoints find _x; //convert hitpoint classname to index if (_subHitIndex == -1) then { - ERROR_2("Invalid hitpoint %1 in hitpointGroups of %2",_x,_vehicle); + ACE_LOGERROR_2("Invalid hitpoint %1 in hitpointGroups of %2",_x,_vehicle); } else { private _subPointCurDamage = _vehicle getHitIndex _hitPointIndex; private _subPointNewDamage = (_subPointCurDamage - 0.5) max _postRepairDamageMin; diff --git a/addons/repair/functions/fnc_doRepairTrack.sqf b/addons/repair/functions/fnc_doRepairTrack.sqf index c5c94fd6e8..34f29506a3 100644 --- a/addons/repair/functions/fnc_doRepairTrack.sqf +++ b/addons/repair/functions/fnc_doRepairTrack.sqf @@ -26,7 +26,7 @@ TRACE_4("params",_unit,_vehicle,_hitPoint,_claimedObjects); _claimedObjects params [["_track", objNull]]; if ((isNull _track) || {!([_unit, _track, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith))}) exitWith { - ERROR_1("Bad Track", _claimedObjects); + ACE_LOGERROR_1("Bad Track", _claimedObjects); }; // can't use a destroyed track diff --git a/addons/repair/functions/fnc_doReplaceTrack.sqf b/addons/repair/functions/fnc_doReplaceTrack.sqf index c85899e169..b0b71e5b61 100644 --- a/addons/repair/functions/fnc_doReplaceTrack.sqf +++ b/addons/repair/functions/fnc_doReplaceTrack.sqf @@ -26,7 +26,7 @@ TRACE_4("params",_unit,_vehicle,_hitPoint,_claimedObjects); _claimedObjects params [["_track", objNull]]; if ((isNull _track) || {!([_unit, _track, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith))}) exitWith { - ERROR_1("Bad Track", _claimedObjects); + ACE_LOGERROR_1("Bad Track", _claimedObjects); }; // get current hitpoint damage diff --git a/addons/repair/functions/fnc_doReplaceWheel.sqf b/addons/repair/functions/fnc_doReplaceWheel.sqf index 4bc3ca93dd..24b995a45f 100644 --- a/addons/repair/functions/fnc_doReplaceWheel.sqf +++ b/addons/repair/functions/fnc_doReplaceWheel.sqf @@ -26,7 +26,7 @@ TRACE_4("params",_unit,_vehicle,_hitPoint,_claimedObjects); _claimedObjects params [["_wheel", objNull]]; if ((isNull _wheel) || {!([_unit, _wheel, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith))}) exitWith { - WARNING_1("Bad Claimed Wheel", _claimedObjects); + ACE_LOGWARNING_1("Bad Claimed Wheel", _claimedObjects); }; // get current hitpoint damage diff --git a/addons/repair/functions/fnc_getHitPointString.sqf b/addons/repair/functions/fnc_getHitPointString.sqf index 31e4ed400f..fd108e4b1f 100644 --- a/addons/repair/functions/fnc_getHitPointString.sqf +++ b/addons/repair/functions/fnc_getHitPointString.sqf @@ -9,8 +9,8 @@ * 3: Track Added Hitpoints (default: false) * * Return Value: - * 0: Text - * 1: Added Hitpoint (default: []) + * 0: Text + * 1: Added Hitpoint (default: []) * * Example: * ["HitFuel", "Repairing %1 ...", "Repairing HitFuel"] call ace_repair_fnc_getHitPointString @@ -84,7 +84,7 @@ for "_i" from 0 to (count _hitPoint) do { // Don't display part name if no string is found in stringtable if (_text == LSTRING(Hit)) then { - if (_hitPoint != "") then { LOG_1("Hitpoint [%1] - could not be localized", _hitPoint); }; + if (_hitPoint != "") then { ACE_LOGWARNING_1("Hitpoint [%1] - could not be localized", _hitPoint); }; _text = _textDefault; }; diff --git a/addons/repair/functions/fnc_getPostRepairDamage.sqf b/addons/repair/functions/fnc_getPostRepairDamage.sqf index 22eaf7a5f9..9388f4474d 100644 --- a/addons/repair/functions/fnc_getPostRepairDamage.sqf +++ b/addons/repair/functions/fnc_getPostRepairDamage.sqf @@ -22,7 +22,7 @@ TRACE_1("params",_unit); if (([_unit] call FUNC(isInRepairFacility) || {[_unit] call FUNC(isNearRepairVehicle)})) exitWith {0}; private _class = _unit getVariable ["ACE_IsEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer")]; -//If advanced or more qualified than min, then use engineer threshold: +//If specialist or more qualified than min, then use engineer threshold: if ((_class isEqualTo 2) || {[_unit, GVAR(engineerSetting_Repair) + 1] call FUNC(isEngineer)}) exitWith { (GVAR(repairDamageThreshold_Engineer) min GVAR(repairDamageThreshold)) }; diff --git a/addons/repair/functions/fnc_isEngineer.sqf b/addons/repair/functions/fnc_isEngineer.sqf index d2ee71b913..d07c12af64 100644 --- a/addons/repair/functions/fnc_isEngineer.sqf +++ b/addons/repair/functions/fnc_isEngineer.sqf @@ -20,7 +20,7 @@ params ["_unit", ["_engineerN", 1]]; TRACE_2("params",_unit,_engineerN); private ["_class"]; -_class = _unit getVariable ["ACE_IsEngineer", _unit getUnitTrait "engineer"]; +_class = _unit getVariable ["ACE_IsEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer")]; // This if statement is here for copmatability with the common variant of isEngineer, which requires a bool. // We cannot move this function to common because we require the GVAR(engineerSetting_Repair), which only makes sense to include in the repair module. diff --git a/addons/repair/functions/fnc_isNearRepairVehicle.sqf b/addons/repair/functions/fnc_isNearRepairVehicle.sqf index b0bd4b3cd1..463e281faa 100644 --- a/addons/repair/functions/fnc_isNearRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isNearRepairVehicle.sqf @@ -18,9 +18,11 @@ params ["_unit"]; TRACE_1("params",_unit); -private _nearObjects = nearestObjects [_unit, ["Air", "LandVehicle", "Slingload_base_F"], 20]; +private ["_nearObjects", "_return"]; -private _return = false; +_nearObjects = nearestObjects [_unit, ["Air","LandVehicle"], 20]; + +_return = false; { if ([_x] call FUNC(isRepairVehicle)) exitWith {_return = true;}; } forEach _nearObjects; diff --git a/addons/repair/functions/fnc_isRepairVehicle.sqf b/addons/repair/functions/fnc_isRepairVehicle.sqf index f18ff0cd3e..2c0b5a1e21 100644 --- a/addons/repair/functions/fnc_isRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isRepairVehicle.sqf @@ -5,7 +5,7 @@ * Arguments: * 0: Vehicle * - * Return Value: + * ReturnValue: * Is engineering vehicle * * Example: diff --git a/addons/repair/functions/fnc_modifyInteraction.sqf b/addons/repair/functions/fnc_modifyInteraction.sqf deleted file mode 100644 index f1956ee384..0000000000 --- a/addons/repair/functions/fnc_modifyInteraction.sqf +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Author: PabstMirror - * Modifies the base interaction point for repair items to show it's current damage - * - * Arguments: - * 0: Target - * 1: Player - * 2: Args - * 3: Action Data - * - * Return Value: - * None - * - * Example: - * [cursorObject, player, [], []] call ace_repair_fnc_modifyInteraction; - * - * Public: No - */ -#include "script_component.hpp" - -params ["_target", "_player", "_args", "_actionData"]; -TRACE_4("params",_target,_player,_args,_actionData); - -// Interaction dots numbered 0..8, white to red. -// Convert damage to number (rounding up), so that even slight damage can bee seen - -private _fileName = format [QPATHTOF(ui\damage_%1_ca.paa), ceil (linearConversion [0, 1, damage _target, 0, 8, true])]; -_actionData set [2, _fileName]; diff --git a/addons/repair/functions/fnc_moduleRepairSettings.sqf b/addons/repair/functions/fnc_moduleRepairSettings.sqf index cfd363e99f..770af07449 100644 --- a/addons/repair/functions/fnc_moduleRepairSettings.sqf +++ b/addons/repair/functions/fnc_moduleRepairSettings.sqf @@ -33,4 +33,4 @@ if (!isServer) exitWith {}; [_logic, QGVAR(wheelRepairRequiredItems), "wheelRepairRequiredItems"] call EFUNC(common,readSettingFromModule); -INFO("Repair Module Initialized."); +ACE_LOGINFO("Repair Module Initialized."); diff --git a/addons/repair/functions/fnc_normalizeHitPoints.sqf b/addons/repair/functions/fnc_normalizeHitPoints.sqf index cb06eeaeae..a73dfcfe0d 100644 --- a/addons/repair/functions/fnc_normalizeHitPoints.sqf +++ b/addons/repair/functions/fnc_normalizeHitPoints.sqf @@ -19,7 +19,7 @@ params ["_vehicle"]; TRACE_2("params",_vehicle, typeOf _vehicle); // Can't execute all commands if the vehicle isn't local, exit if that's so -if !(local _vehicle) exitWith {ERROR_1("Vehicle Not Local %1", _vehicle);}; +if !(local _vehicle) exitWith {ACE_LOGERROR_1("Vehicle Not Local %1", _vehicle);}; (getAllHitPointsDamage _vehicle) params [["_allHitPoints", []]]; @@ -33,7 +33,7 @@ private _dependentHitPointScripts = []; { if ((_x != "") && {isClass (_config >> _x)} && {!(_x in _realHitPoints)}) then { _realHitPoints pushBack _x; - if (!((getText (_config >> _x >> "depends")) in ["", "0"])) then { + if (isText (_config >> _x >> "depends")) then { _dependentHitPoints pushBack _x; _dependentHitPointScripts pushBack compile getText (_config >> _x >> "depends"); }; diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index 3ee6d4097f..d4f5412e6f 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -177,31 +177,23 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { [_caller, _callerAnim] call EFUNC(common,doAnimation); }; -// Get repair time -_repairTime = [ - configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(repairTimes) >> configName _config, - "number", - -1 -] call CBA_fnc_getConfigEntry; - -if (_repairTime < 0) then { - _repairTime = if (isNumber (_config >> "repairingTime")) then { - getNumber (_config >> "repairingTime"); - } else { - if (isText (_config >> "repairingTime")) exitWith { - _repairTimeConfig = getText (_config >> "repairingTime"); - if (isNil _repairTimeConfig) then { - _repairTimeConfig = compile _repairTimeConfig; - } else { - _repairTimeConfig = missionNamespace getVariable _repairTimeConfig; - }; - if (_repairTimeConfig isEqualType 0) exitWith { - _repairTimeConfig; - }; - [_caller, _target, _hitPoint, _className] call _repairTimeConfig; +//Get repair time +_repairTime = if (isNumber (_config >> "repairingTime")) then { + getNumber (_config >> "repairingTime"); +} else { + if (isText (_config >> "repairingTime")) exitWith { + _repairTimeConfig = getText(_config >> "repairingTime"); + if (isNil _repairTimeConfig) then { + _repairTimeConfig = compile _repairTimeConfig; + } else { + _repairTimeConfig = missionNamespace getVariable _repairTimeConfig; }; - 0; + if (_repairTimeConfig isEqualType 0) exitWith { + _repairTimeConfig; + }; + [_caller, _target, _hitPoint, _className] call _repairTimeConfig; }; + 0; }; // Find localized string diff --git a/addons/repair/functions/fnc_repair_failure.sqf b/addons/repair/functions/fnc_repair_failure.sqf index db58c94448..8616dd4808 100644 --- a/addons/repair/functions/fnc_repair_failure.sqf +++ b/addons/repair/functions/fnc_repair_failure.sqf @@ -40,7 +40,7 @@ _weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnrepair), ""]); if (_weaponSelect != "") then { _caller selectWeapon _weaponSelect; } else { - _caller action ["SwitchWeapon", _caller, _caller, 299]; + _caller action ["SwitchWeapon", _caller, _caller, 99]; }; { diff --git a/addons/repair/functions/fnc_repair_success.sqf b/addons/repair/functions/fnc_repair_success.sqf index 5196075735..c18116f862 100644 --- a/addons/repair/functions/fnc_repair_success.sqf +++ b/addons/repair/functions/fnc_repair_success.sqf @@ -40,7 +40,7 @@ _weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnrepair), ""]); if (_weaponSelect != "") then { _caller selectWeapon _weaponSelect; } else { - _caller action ["SwitchWeapon", _caller, _caller, 299]; + _caller action ["SwitchWeapon", _caller, _caller, 99]; }; //Unclaim repair objects: diff --git a/addons/repair/functions/fnc_setHitPointDamage.sqf b/addons/repair/functions/fnc_setHitPointDamage.sqf index 57c65d1407..01a29eb377 100644 --- a/addons/repair/functions/fnc_setHitPointDamage.sqf +++ b/addons/repair/functions/fnc_setHitPointDamage.sqf @@ -24,13 +24,19 @@ TRACE_4("params",_vehicle,typeOf _vehicle,_hitPointIndex,_hitPointDamage); private ["_damageNew", "_damageOld", "_hitPointDamageRepaired", "_hitPointDamageSumOld", "_realHitpointCount", "_selectionName"]; // can't execute all commands if the vehicle isn't local. exit here. -if !(local _vehicle) exitWith {ERROR_1("Vehicle Not Local %1", _vehicle);}; +if !(local _vehicle) exitWith {ACE_LOGERROR_1("Vehicle Not Local %1", _vehicle);}; + +//Check for bad typeName (changed from orignal v3.3 that took string) +if (_hitPointIndex isEqualType "") then { + ACE_DEPRECATED("repair-setHitPointDamage (hit point name ","3.5.0","hit index "); + _hitPointIndex = _allHitPoints find _hitPointIndex; +}; // get all hitpoints and selections and damages (getAllHitPointsDamage _vehicle) params [["_allHitPoints", []], ["_allHitPointsSelections", []], ["_allHitPointDamages", []]]; // exit if the hitpoint is not valid -if ((_hitPointIndex < 0) || {_hitPointIndex >= (count _allHitPoints)}) exitWith {ERROR_2("NOT A VALID HITPOINT: %1-%2", _hitPointIndex,_vehicle);}; +if ((_hitPointIndex < 0) || {_hitPointIndex >= (count _allHitPoints)}) exitWith {ACE_LOGERROR_2("NOT A VALID HITPOINT: %1-%2", _hitPointIndex,_vehicle);}; // save structural damage and sum of hitpoint damages @@ -45,7 +51,7 @@ _hitPointDamageRepaired = 0; //positive for repairs : newSum = (oldSum - repaire if ((!isNil {_vehicle getHit _selectionName}) && {_x != ""}) then { _realHitpointCount = _realHitpointCount + 1; - if ((((toLower _x) find "glass") == -1) && {(getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "HitPoints" >> _x >> "depends")) in ["", "0"]}) then { + if ((((toLower _x) find "glass") == -1) && {!isText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "HitPoints" >> _x >> "depends")}) then { _hitPointDamageSumOld = _hitPointDamageSumOld + (_allHitPointDamages select _forEachIndex); if (_forEachIndex == _hitPointIndex) then { _hitPointDamageRepaired = (_allHitPointDamages select _forEachIndex) - _hitPointDamage; diff --git a/addons/repair/functions/fnc_useItem.sqf b/addons/repair/functions/fnc_useItem.sqf index de3950fa22..02daeed33e 100644 --- a/addons/repair/functions/fnc_useItem.sqf +++ b/addons/repair/functions/fnc_useItem.sqf @@ -6,7 +6,7 @@ * 0: Unit * 1: Item classname * - * Return Value: + * ReturnValue: * [Had Item to Use , Unit ] * * Example: diff --git a/addons/repair/functions/fnc_useItems.sqf b/addons/repair/functions/fnc_useItems.sqf index 859115b68c..14dcb6223c 100644 --- a/addons/repair/functions/fnc_useItems.sqf +++ b/addons/repair/functions/fnc_useItems.sqf @@ -6,7 +6,7 @@ * 0: Unit * 1: Item classnames * - * Return Value: + * ReturnValue: * [Had Item to Use , Array of units that used the items ] * * Example: diff --git a/addons/repair/script_component.hpp b/addons/repair/script_component.hpp index 879d6930e0..c2bad9328d 100644 --- a/addons/repair/script_component.hpp +++ b/addons/repair/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_REPAIR diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml index 7ab7788778..a5fabc0965 100644 --- a/addons/repair/stringtable.xml +++ b/addons/repair/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Cingolo di scorta Pót lánctalp Запасная гусеница - 予備履帯 - 예비 궤도 - 备用履带 - 備用履帶 Spare Wheel @@ -28,10 +24,6 @@ Ruota di scorta Pótkerék Запасное колесо - 予備タイヤ - 예비 바퀴 - 备用轮胎 - 備用輪胎 Change Wheel @@ -44,10 +36,6 @@ Kerék cseréje Поменять колесо Vyměnit kolo - タイヤを変える - 바퀴 교체 - 更换轮胎 - 更換輪胎 Replacing Wheel... @@ -57,12 +45,8 @@ Замена колеса... Měním kolo... Cambiando rueda... - Sostituendo la ruota... + Sto sostituendo la ruota... Remplacement de la roue... - タイヤを交換中・・・ - 바퀴 교체중... - 更换轮胎中... - 更換輪胎中... Wheel replaced @@ -74,10 +58,6 @@ Rueda cambiada Ruota sostituita Roue remplacée - タイヤを履き替え - 바퀴 교체됨 - 轮胎更换完毕 - 輪胎更換完畢 Remove Wheel @@ -90,10 +70,6 @@ Rimuovi la ruota Kerék leszerelése Снять колесо - タイヤを外す - 바퀴 제거 - 卸下轮胎 - 卸下輪胎 Removing Wheel... @@ -103,12 +79,8 @@ Снятие колеса... Odstraňuji kolo... Quitando rueda... - Rimuovendo la ruota... + Sto rimuovendo la ruota... Démontage de la roue... - タイヤを外している・・ - 바퀴 제거중... - 卸下轮胎中... - 卸下輪胎中... Wheel removed @@ -120,10 +92,6 @@ Rueda quitada Ruota rimossa Roue démontée - タイヤを外した - 바퀴 제거됨 - 轮胎卸下完毕 - 輪胎卸下完畢 Change Track @@ -135,10 +103,6 @@ Cambiar oruga Cambia cingolo Changer la chenille - 履帯を変える - 궤도 교체 - 更换履带 - 更換履帶 Replacing Track... @@ -148,12 +112,8 @@ Замена гусеницы... Měním pás... Cambiando oruga... - Sostituendo il cingolo... + Sto sostituendo il cingolo... Remplacement de la chenille... - 履帯を交換中・・・ - 궤도 교체중... - 更换履带中... - 更換履帶中... Track replaced @@ -165,10 +125,6 @@ Oruga cambiada Cingolo sostituito Chenille remplacée - 履帯を交換した - 궤도 교체됨 - 履带更换完毕 - 履帶更換完畢 Remove Track @@ -180,10 +136,6 @@ Quitar oruga Rimuovi cingolo Enlever la chenille - 履帯を外す - 궤도 제거 - 卸下履带 - 卸下履帶 Removing Track... @@ -193,12 +145,8 @@ Снятие гусеницы... Odstraňuji pás... Quitando oruga... - Rimuovendo il cingolo... + Sto rimuovendo il cingolo... Enlèvement de la chenille... - 履帯を外している・・・ - 궤도 제거중... - 卸下履带中... - 卸下履帶中... Track removed @@ -210,10 +158,6 @@ Oruga quitada Cingolo rimosso Chenille enlevée - 履帯を外した - 궤도 제거됨 - 履带卸下完毕 - 履帶卸下完畢 Full Repair @@ -225,10 +169,6 @@ Reparación completa Riparazione completa Réparations complètes - 完全に修理 - 완전수리 - 完整维修 - 完整維修 Repairing Vehicle... @@ -238,12 +178,8 @@ Ремонт транспорта... Opravuji vozidlo... Reparando vehículo... - Riparando il veicolo... + Sto riparando il veicolo... Réparation du véhicule... - 車両を修理中・・・ - 차량 수리중... - 维修载具中... - 維修載具中... Full Repair Locations @@ -255,10 +191,6 @@ Lugares de reparación completa Luoghi Riparazione Completa Lieu de réparation complète - 完全修理をできる場所 - 완전수리 구역 - 完整维修地点 - 完整維修地點 At what locations can a vehicle be fully repaired? @@ -270,10 +202,6 @@ V které oblasti může být vozidlo plně opraveno? In quali luoghi è possibile riparare completamente un veicolo? Où peuvent être réparés complètement les véhicules ? - どのような場所で車両の完全な修理を出来るようにしますか? - 어느 구역에서 차량을 완전히 수리할 수 있게 합니까? - 什么位置可以完整维修载具? - 什麼位置可以完整維修載具? Allow Full Repair @@ -285,10 +213,6 @@ Permitir reparación completa Consenti Riparazione Completa Autoriser les réparations complètes. - 完全な修理をさせる - 완전 수리 활성화 - 允许完整维修 - 允許完整維修 Who can perform a full repair on a vehicle? @@ -300,10 +224,6 @@ Kdo může provést úplné opravy na vozidle? Chi può eseguire una riparazione completa su un veicolo? Qui peut faire une réparation complète ? - 誰が車両の完全な修理を出来るようにしますか? - 누가 완전 수리를 할 수 있습니까? - 谁可以完整维修载具? - 誰可以完整維修載具? Add Spare Parts @@ -315,10 +235,6 @@ Přidat náhradní díly Aggiungi Parti di Ricambio Ajouter des pièces de rechange - 予備部品を追加 - 예비 부품 더하기 - 添加备件 - 添加備件 Add spare parts to vehicles (requires Cargo component)? @@ -330,10 +246,6 @@ Přidat náhradní díly do vozidla (vyžaduje úložný prostor)? Aggiungi parti di ricambio ai veicoli (richiede componente Cargo)? Ajouter des pièces de rechage aux véhicules ? (à besoin du système de cargaison) - 車両へ予備部品を追加しますか(カーゴ コンポーネントが必要)? - 차량에 예비 부품을 더합니까?(짐칸 요소 필요) - 添加载具备件 (需相关货物组件)? - 添加載具備件 (需相關貨物組件)? Repair @@ -346,10 +258,6 @@ Ripara Szerelés Ремонт - 修理 - 수리 - 维修 - 維修 Display text on repair @@ -361,10 +269,6 @@ Mostrar texto en la reparación Mostra testo mentre ripari Afficher du texte pendant la réparation - 修理時に文章で通知する - 수리시 화면에 글자 표시 - 显示维修文本 - 顯示維修文本 Display a notification whenever you repair a vehicle @@ -376,10 +280,6 @@ Zobrazit oznámení kdykoliv opravíš vozidlo Mostra una notifica quando stai riparando un veicolo Afficher une notification lorsque l'on répare un véhicule - あなたが車両の修理を始めると、画面に通知を出します - 수리시 화면에 글자로 알림이 뜹니다 - 每当维修载具时显示通知 - 每當維修載具時顯示通知 Repairing... @@ -389,13 +289,9 @@ Naprawianie... Opravuji... Reparando... - Riparando... + Sto riparando... javítása... Ремонтируем... - 修理中・・・ - 수리중... - 维修中... - 維修中... Repairing %1... @@ -405,13 +301,9 @@ Naprawianie %1... Opravuji %1... Reparando %1... - Riparando %1... + Sto riparando %1... %1 javítása... Ремонтируем %1... - %1 を修理中・・・ - %1 수리중... - 维修%1中... - 維修%1中... Repaired %1 @@ -424,10 +316,6 @@ %1 Riparata/o %1 megjavítva %1 отремонтирован - %1 を修理した - %1 수리됨 - 已维修%1 - 已維修%1 Fully repaired part @@ -439,10 +327,6 @@ Parte totalmente reparado Parte riparata completamente Pièce entièrement réparée - 部分的な完全な修理 - 부분 완벽히 수리됨 - 完整维修部分 - 完整維修部分 Partially repaired %1 @@ -454,10 +338,6 @@ %1 - částečně opraveno %1 parzialmente riparato %1 pratiquement réparée - %1 を部分的に修理した - %1 부분적으로 수리됨 - %1已完成部分维修 - %1已完成部分維修 Fully repaired %1 @@ -469,10 +349,6 @@ Totalmente reparada %1 %1 completamente riparato %1 entièrement réparée - %1 を完全に修理した - %1 완전히 수리됨 - %1已完整维修 - %1已完整維修 Partially repaired %1 @@ -484,10 +360,6 @@ %1 - částečně opraveno %1 parzialmente riparato %1 pratiquement réparée - %1 を部分的に修理した - %1 부분적으로 수리됨 - %1已完成部分维修 - %1已完成部分維修 Body @@ -500,10 +372,6 @@ Carrozzeria Test Кузов - 車体 - 몸체 - 车身 - 車身 Hull @@ -516,10 +384,6 @@ Scafo Test Корпус - 機体 - 선체 - 车壳 - 車殼 Engine @@ -532,10 +396,6 @@ Motore Motor Двигатель - エンジン - 엔진 - 引擎 - 引擎 Left Horizontal Stabilizer @@ -547,10 +407,6 @@ Stabilizzatore Orizzontale Sinistro Stabilisateur horizontal gauche Linkes Höhenleitwerk - 左側の水平安定機 - 왼쪽 수평안정판 - 左侧悬挂稳定 - 左側懸掛穩定 Right Horizontal Stabilizer @@ -562,10 +418,6 @@ Stabilizzatore Orizzontale Destro Stabilisateur horizontal droit Rechtes Höhenleitwerk - 右側の水平安定機 - 오른쪽 수평안정판 - 右侧悬挂稳定 - 右側懸掛穩定 Vertical Stabilizer @@ -577,10 +429,6 @@ Stabilizzatore Verticale Stabilisateur vertical Seitenleitwerk - 車両安定器 - 수직 안정판 - 垂直稳定 - 垂直穩定 Fuel Tank @@ -593,10 +441,6 @@ Serbatoio Üzemanyagtank Топливный бак - 燃料タンク - 연료 탱크 - 油箱 - 油箱 Transmission @@ -608,10 +452,6 @@ Transmisión Trasmissione Instruments - 変速機 - 변속기 - 变速箱 - 變速箱 Gear @@ -623,10 +463,6 @@ Podvozek Motore Trains d'attérissage - ギア - 기어 - 齿轮 - 齒輪 Starter @@ -638,10 +474,6 @@ Motor de arranque Motore d'avviamento Démarreur - スターター - 점화기 - 发动机 - 發動機 Tail @@ -653,10 +485,6 @@ Cauda Coda Queue - 尾翼 - 꼬리 - 尾翼 - 尾翼 Pitot Tube @@ -668,10 +496,6 @@ Tubo del pitot Tubo di Pitot Sonde pitot - ピトー管 - 동압관 - 空速管 - 空速管 Static Port @@ -683,10 +507,6 @@ Statický port Porta Statica Port statique - スタティック ポート - 정압공 - 静态端口 - 靜態端口 Ammo @@ -698,10 +518,6 @@ Munición Munizioni Munitions - 弾薬 - 탄약 - 弹药 - 彈藥 Turret @@ -714,10 +530,6 @@ Torretta Lövegtorony Башню - 砲塔 - 포탑 - 炮塔 - 砲塔 Gun @@ -730,10 +542,6 @@ Cannone Ágyú Пушку - - - - Missiles @@ -745,10 +553,6 @@ Misiles Missili Missiles - ミサイル - 미사일 - 导弹 - 導彈 Left Track @@ -761,10 +565,6 @@ Cingolo sinistro Bal lánctalp Левую гусеницу - 左の履帯 - 왼쪽 궤도 - 左履带 - 左履帶 Right Track @@ -777,10 +577,6 @@ Cingolo destro Jobb lánctalp Правую гусеницу - 右の履帯 - 오른쪽 궤도 - 右履带 - 右履帶 Left Front Wheel @@ -793,10 +589,6 @@ Ruota frontale sinistra Bal első kerék Левое переднее колесо - 左の前輪 - 왼쪽 앞바퀴 - 左前轮 - 左前輪 Right Front Wheel @@ -809,10 +601,6 @@ Ruota frontale destra Jobb első kerék Правое переднее колесо - 右の前輪 - 오른쪽 앞바퀴 - 右前轮 - 右前輪 Second Left Front Wheel @@ -825,10 +613,6 @@ Seconda ruota frontale sinistra Második bal első kerék Второе переднее левое колесо - 左の 2 つめの前輪 - 왼쪽 두번째 바퀴 - 第二左前轮 - 第二左前輪 Second Right Front Wheel @@ -841,10 +625,6 @@ Seconda ruota frontale destra Második jobb hátsó kerék Второе правое переднее колесо - 右の 2 つめの前輪 - 오른쪽 두번째 바퀴 - 第二右前轮 - 第二右前輪 Left Middle Wheel @@ -857,10 +637,6 @@ Ruota centrale sinistra Bal középső kerék Левое среднее колесо - 左の中央の前輪 - 왼쪽 가운데 바퀴 - 左中轮 - 左中輪 Right Middle Wheel @@ -873,10 +649,6 @@ Ruota centrale destra Jobb középső kerék Правое среднее колесо - 右の中央の前輪 - 오른족 가운데 바퀴 - 右中轮 - 右中輪 Left Rear Wheel @@ -889,10 +661,6 @@ Ruota posteriore sinistra Bal hátsó kerék Левое заднее колесо - 左の後輪 - 왼쪽 뒤쪽 바퀴 - 左后轮 - 左後輪 Right Rear Wheel @@ -905,10 +673,6 @@ Ruota posteriore destra Jobb hátsó kerék Правое заднее колесо - 右の後 - 오른쪽 뒤쪽 바퀴 - 右后轮 - 右後輪 Avionics @@ -921,10 +685,6 @@ Avionica Avionika Авионику - アビオニクス - 항공 전자 - 航电系统 - 航電系統 Main Rotor @@ -937,10 +697,6 @@ Rotore principale Főrotor Несущий винт - 主翼 - 주 로터 - 主旋翼 - 主旋翼 Tail Rotor @@ -953,10 +709,6 @@ Rotore di coda Farokrotor Рулевой винт - 尾翼ローター - 꼬리 로터 - 尾桨 - 尾槳 Winch @@ -968,10 +720,6 @@ Naviják Gancio Treuil - ウィンチ - 윈치 - 绞盘 - 絞盤 Glass (right) @@ -984,10 +732,6 @@ Vetro destro Jobb szélvédő Стекло (справа) - ガラス (右) - 유리 (오른쪽) - 玻璃 (右) - 玻璃 (右) Glass (left) @@ -1000,10 +744,6 @@ Vetro sinistro Bal szélvédő Стекло (слава) - ガラス (左) - 유리 (왼쪽) - 玻璃 (左) - 玻璃 (左) Glass @@ -1016,10 +756,6 @@ Vetro Üveg Стекло - ガラス - 유리 - 玻璃 - 玻璃 ERA @@ -1031,10 +767,6 @@ ERA ERA ДЗ - 爆発反応装甲 - 폭발반응장갑 - 爆炸式反应装甲 - 爆炸式反應裝甲 Repair Settings @@ -1046,10 +778,6 @@ Nastavení oprav Impostazioni Riparazioni Réglages de réparation - 修理設定 - 수리 설정 - 修复设定 - 修復設定 Provides a repair system for all types of vehicles. @@ -1061,10 +789,6 @@ Poskytuje rozsáhlý systém oprav pro všechny typy vozidel. Fornisce un sistema di riparazione per tutti i tipi di veicoli. Fournit un système de réparation pour tous les types de véhicules. - 車両の全種類に修理システムを適用しますか? - 모든 차량에 대해 수리 시스템을 제공합니다. - 提供修复系统给所有载具. - 提供修復系統給所有載具. Anyone @@ -1076,10 +800,6 @@ Cualquiera Chiunque Tout le monde - だれでも - 모두 - 任何人 - 任何人 Engineer only @@ -1091,17 +811,17 @@ Solo ingeniero Solo Geniere Ingénieurs seulement - 工兵のみ - 오직 정비공만 - 只有工兵 - 只有工兵 - - Advanced Engineer only - Solo Geniere avanzato - 上級工兵のみ - 只有维修专精兵 - 只有維修專精兵 + + Repair Specialist only + Nur Reparaturspezialist + Tylko inżynierowie + Somente especialista em reparos + Только ремонтные специалисты + Pouze specialista na opravování + Solo especialista en reparación + Solo Specialista Riparazioni + Spécialistes de réparation seulement Allow Wheel @@ -1113,10 +833,6 @@ Permitir rueda Consenti Ruota Autoriser les roues - タイヤを許可 - 바퀴 허가 - 允许轮胎 - 允許輪胎 Who can remove and replace wheels? @@ -1128,10 +844,6 @@ ¿Quién puede quitar y cambiar las ruedas? Chi può rimuovere e sostituire le ruote? Qui peut enlever et remplacer les roues ? - 誰がタイヤの除去と交換を出来るようにしますか? - 누가 바퀴를 제거 및 교체할 수 있습니까? - 谁可维修轮胎? - 誰可維修輪胎? Allow Repair @@ -1143,10 +855,6 @@ Permitir reparación Consenti Riparazioni Autoriser les réparations - 修理を許可 - 수리 허가 - 允许维修 - 允許維修 Who can perform repair actions? @@ -1158,10 +866,6 @@ ¿Quién puede realizar reparaciones? Chi può eseguire riparazioni? Qui peut réparer ? - 誰が修理を出来るようににしますか? - 누가 수리를 할 수 있습니까? - 谁可以进行维修操作? - 誰可以進行維修操作? Repair Threshold @@ -1173,10 +877,6 @@ Práh oprav Limite Riparazioni Seuil de réparation - 修理のしきい値 - 정비 한계치 - 维修门槛 - 維修門檻 What is the maximum damage that can be repaired with a toolkit? @@ -1188,10 +888,6 @@ Jaké maximální poškození může být opraveno pomocí opravárenské sady? Qual'è il danno massimo che può essere riparato con il Toolkit? Quel est le maximum de dommages réparable par une trousse à outils ? - ツールキットで修理できる、最大の損傷許容範囲を設定しますか? - 어느정도의 피해까지 툴킷으로 수리가 가능합니까? - 工具包可以修复的最大损坏值? - 工具包可以修復的最大損壞值? Repair Threshold (Engineer) @@ -1203,10 +899,6 @@ Práh oprav (Inženýr) Limite Riparazioni (Geniere) Seuil de réparatoin (ingénieur) - 修理のしきい値 (工兵) - 정비 한계치 (정비공) - 维修门槛 (工兵) - 維修門檻 (工兵) What is the maximum damage that can be repaired by an engineer? @@ -1218,10 +910,6 @@ Jaké maximální poškození může být opraveno pomoci inženýra? Qual'è il danno massimo che può essere riparato da un Geniere? Quel est le maximum de dommages qui peuvent être réparés par un ingénieur ? - 工兵が修理できる、最大の損傷許容範囲を設定しますか? - 정비공은 어느정도의 피해까지 수리할 수 있습니까? - 工兵可以修复的最大损坏值? - 工兵可以修復的最大損壞值? Remove toolkit on use @@ -1233,10 +921,6 @@ Odstranit sadu nástrojů po použití Rimuovi Toolkit dopo l'uso Enlever la trousse à outils après usage - ツールキットを使うと削除 - 툴킷 사용후 제거 - 使用后删除工具包 - 使用後刪除工具包 Should the toolkit be removed on usage? @@ -1248,10 +932,6 @@ Má být odstraněna sada nástroju po použití? Il Toolkit dev'essere rimosso dopo l'uso? La trousse à outils devrait-elle être enlevée après usage ? - ツールキットを使うと削除しますか? - 툴킷을 사용하면 제거를 합니까? - 要在使用后删除工具包吗? - 要在使用後刪除工具包嗎? Anywhere @@ -1263,10 +943,6 @@ En cualquier sitio Ovunque N'importe où - だれでも - 어디서나 - 任何地点 - 任何地點 Repair Vehicle only @@ -1278,10 +954,6 @@ Pouze opravárenské vozidlo Solo Veicoli Riparazioni Véhicule de réparation seulement - 修理車両のみ - 오직 수리 차량만 - 维修载具旁 - 維修載具旁 Repair Facility only @@ -1293,10 +965,6 @@ Pouze opravárenské zařízení Solo Strutture Riparazioni Installation de réparation seulement - 修理施設のみ - 오직 수리 시설만 - 维修设施旁 - 維修設施旁 Repair Facility or Vehicle @@ -1308,10 +976,6 @@ Opravárenské zařízení nebo vozidlo Strutture Riparazioni o Veicoli Installations ou véhicule de réparation - 修理施設または車両のみ - 수리 시설혹은 차량 - 维修设施或载具旁 - 維修設施或載具旁 Assign Engineer @@ -1323,10 +987,6 @@ Asignar ingeniero Assegna Geniere Assigner le rôle d'ingénieur - 工兵にする - 정비공 등록 - 指派工兵 - 指派工兵 List @@ -1338,10 +998,6 @@ Lista Lista Liste - 一覧 - 목록 - 名单 - 名單 List of unit names that will be classified as engineer, separated by commas. @@ -1353,10 +1009,6 @@ Seznam jmen jednotek, které budou klasifikovány jako inženýr, oddělit čárkami. Lista di unità che verranno classificate come genieri, separate da virgole. Liste des noms d'unités qui seront considérées ingénieurs. Séparé par des virgules - 一覧に記載されたユニット名を、工兵として指定します。コンマで複数を指定できます。 - 목록내 보직이름은 정비공으로 분류됩니다. 쉼표로 구분합니다. - 工兵名单, 把单位名称输入在这边即可定义其为工兵. 每个单位使用逗号以做区隔. - 工兵名單, 把單位名稱輸入在這邊即可定義其為工兵. 每個單位使用逗號以做區隔. Is Engineer @@ -1368,10 +1020,6 @@ Inženýr E' Geniere Est ingénieur - 工兵とする - 은 정비공이다 - 是工兵 - 是工兵 Select the engineering skill level of the unit @@ -1383,10 +1031,6 @@ Vyberte úroveň dovednosti inženýra pro jednotku Seleziona il livello di abilità geniere dell'unità Sélectionner le niveau d'habilité en réparation de l'unité - ユニットへの工兵スキルを選択 - 선택한 인원의 정비 실력을 고르십시요 - 选择工兵的技术水平 - 選擇工兵的技術水平 None @@ -1398,10 +1042,6 @@ Ningún Nessuna Aucun - 工兵 - 없음 - - Engineer @@ -1413,18 +1053,17 @@ Ingeniero Geniere Ingénieur - 専門兵 - 정비공 - 工兵 - 工兵 - - - Adv. Engineer - Adv. Geniere - 上級工兵 - 专精 - 專精 + + Specialist + Reparaturspezialist + Inżynier + Especialista + Специалист + Specialista + Especialista + Specialista Riparazioni + Spécialiste Assign one or multiple units as an engineer @@ -1436,10 +1075,6 @@ Přiřaďte jednu nebo více osob jako inženýra Assegna una o più unità come genieri Assigner un ou plusieurs unités comme ingénieur - 修理車両として指定 - 하나 혹은 여러 인원을 정비공으로 등록합니다 - 指定一个或多个单位为工兵 - 指定一個或多個單位為工兵 Assign Repair Vehicle @@ -1451,10 +1086,6 @@ Přiřaďte opraváresnké vozidlo Assegna Veicolo Riparazioni Assigner en tant que véhicule de réparation - 修理車両として指定 - 정비 차량 등록 - 指定维修载具 - 指定維修載具 List @@ -1466,10 +1097,6 @@ Lista Lista Liste - 一覧 - 목록 - 名单 - 名單 List of vehicles that will be classified as repair vehicle, separated by commas. @@ -1481,10 +1108,6 @@ Seznam vozidel, která budou klasifikována jako opravárenská, oddělit čárkami. Lista di Veicoli che verranno considerati veicoli riparazioni, separati da virgole. Liste de véhicules qui seront considérés comme véhicules de réparation. Séparé par des virgules. - 一覧に記載されたユニット名を、修理車両として指定します。コンマで複数を指定できます。 - 목록내 차량은 정비 차량으로 분류됩니다. 쉼표로 구분합니다. - 载具名单, 把载具名称输入在这边即可定义其为维修载具. 每个载具使用逗号以做区隔. - 載具名單, 把載具名稱輸入在這邊即可定義其為維修載具. 每個載具使用逗號以做區隔. Is Repair Vehicle @@ -1496,10 +1119,6 @@ Opravárenské vozidlo E' Veicolo Riparazioni Est un véhicule de réparation - 修理車両とする - 은 정비 차량이다 - 是维修载具 - 是維修載具 Is the vehicle classified as a repair vehicle? @@ -1511,10 +1130,6 @@ Je vozidlo klasifikováno jako opravárenské? Il veicolo è classificato dome veicolo riparazioni? Le véhicule est-il considéré comme un véhicule de réparation ? - 車両を修理車両と指定しますか? - 이 차량을 정비 차량으로 분류합니까? - 此载具是维修载具吗? - 此載具是維修載具嗎? Assign one or multiple vehicles as a repair vehicle @@ -1526,10 +1141,6 @@ Přiřaďte jedno nebo více vozidel jako opravárenské vozidlo Assegna uno o più veicoli come veicoli riparazioni Assigner un ou plusieurs véhicules en tant que véhicule de réparation - 単体、または複数の車両を修理車両とします - 하나 혹은 여러 차량을 정비 차량으로 등록합니다 - 指定一个或多个载具作为维修载具 - 指定一個或多個載具作為維修載具 Assign Repair Facility @@ -1541,10 +1152,6 @@ Přiřaďte opravárenské zařízení Assegna Struttura Riparazioni Assigner en tant qu'installation de réparation - 修理施設とする - 정비 시설 등록 - 指定维修设施 - 指定維修設施 List @@ -1556,10 +1163,6 @@ Lista Lista Liste - 一覧 - 목록 - 名单 - 名單 List of objects that will be classified as repair Facility, separated by commas. @@ -1571,10 +1174,6 @@ Seznam objektů, které budou klasifikovány jako opravárenské zařízení, oddělit čárkami. Lista di oggetti che verranno classificati come strutture riparazioni, separate da virgole. Liste des objets considérés comme installations de réparation. Séparé par des virgules - 一覧に記載されたユニット名を、修理施設として指定します。コンマで複数を指定できます。 - 목록내 시설은 정비 시설으로 분류됩니다. 쉼표로 구분합니다. - 设施名单, 把设施名称输入在这边即可定义其为维修设施. 每个设施使用逗号以做区隔. - 設施名單, 把設施名稱輸入在這邊即可定義其為維修設施. 每個設施使用逗號以做區隔. Is Repair Facility @@ -1586,10 +1185,6 @@ Opravárenské zařízení E' Struttura Riparazioni Est une installation de réparation - 修理施設とする - 은 정비 시설이다 - 是维修设施 - 是維修設施 Is the object classified as a repair Facility? @@ -1601,10 +1196,6 @@ Je objekt klasifikován jako opravárenské zařízení? L'oggetto è classificato come struttura riparazioni? L'objet est-il considéré comme une installation de réparation ? - オブジェクトを修理施設として指定しますか? - 이 시설을 정비 시설로 분류합니까? - 此设施是维修设施吗? - 此設施是維修設施嗎? Assign one or multiple objects as a repair Facility @@ -1616,10 +1207,6 @@ Přiřaďte jeden nebo více objektů jako opravárenské zařízení Assegna uno o più oggetti come strutture riparazioni Assigner un ou plusieurs objets en tant que véhicule de réparation - ひとつ、または複数オブジェクトに予備部品を追加 - 하나 혹은 여러 시설을 정비 시설로 등록합니다 - 指定一个或多个对象作为维修设施 - 指定一個或多個對象作為維修設施 Add Spare Parts @@ -1631,10 +1218,6 @@ Přidat náhradní díly Aggiungi Parti di Ricambio Ajouter des pièces de rechange - 予備部品を追加 - 예비 부품 더하기 - 添加备件 - 添加備件 Add spare parts to one or multiple objects @@ -1646,10 +1229,6 @@ Přidat náhradní díly do jednoho nebo více objektů Aggiungi parti di ricambio ad uno o più oggetti Ajouter des pièces de rechange à un ou plusieurs objets - 一覧に追加されたオブジェクトへ予備部品を与えます。コンマで複数を指定できます。 - 하나 혹은 여러 물체가 예비 부품을 더합니다 - 添加备件到一个或多个对象上 - 添加備件到一個或多個對象上 List @@ -1661,10 +1240,6 @@ Seznam Lista Liste - 一覧 - 목록 - 名单 - 名單 List of objects that will get spare parts added, separated by commas. @@ -1676,10 +1251,6 @@ Seznam objektů, které dostanou náhradní díly, oddělit čárkami. Lista di oggetti a cui verranno aggiunte parti di ricambio, separate da virgole. Liste des objets qui recevront des pièces de réparation en plus. Séparé par des virgules - 一覧に追加されたオブジェクトへ予備部品を与えます。コンマで複数を指定できます。 - 목록내 물체는 예비 부품을 받습니다, 쉼표로 구분합니다. - 添加备件到名单的载具上. 每个载具使用逗号以做区隔. - 添加備件到名單的載具上. 每個載具使用逗號以做區隔. Part @@ -1691,10 +1262,6 @@ Díl Parte Pièce - 部品 - 부품 - 零件 - 零件 Spare part. @@ -1706,10 +1273,6 @@ Náhradní díl. Parte di ricambio. Pièce de rechange - 予備部品 - 예비 부품 - 备用零件 - 備用零件 Amount @@ -1721,10 +1284,6 @@ Množství Quantità Quantité - - 수량 - 数量 - 數量 Number of selected spare parts. @@ -1736,10 +1295,6 @@ Počet vybraných náhradních dílů. Numero di parti di ricambio selezionate. Nombre de pièces de rechange séléctionnées - 選択された予備部品の数を選択します。 - 선택한 부품의 수 - 选择的备件数量 - 選擇的備件數量 Wheel repair requirements @@ -1751,10 +1306,6 @@ Vyžaduje opravu kol Requisiti riparazione ruote Exigences de réparation de roue - タイヤの修理を必要 - 바퀴 교체 요구사항 - 维修轮胎限制 - 維修輪胎限制 Items required to remove/replace wheels @@ -1766,10 +1317,6 @@ Položka vyžaduje odstraněná/vyměněná kola Oggetti richiesti per riparare/rimuovere ruote Items exigés pour enlever/remplacer les roues - タイヤの除去と交換にアイテムを必要としますか? - 바퀴를 제거/교체하는데 필요한 물건 - 需要特定物品来移除/更换车轮 - 需要特定物品來移除/更換車輪 Engine must be off to repair @@ -1779,12 +1326,6 @@ O motor deve estar desligado para manutenção Le moteur doit être éteins pour réparer Двигатель должен быть выключен для ремонта - 修理のためにエンジンを停止させる必要があります。 - Silnik musi być wyłączony w celu naprawy - 수리를 위해서는 엔진을 꺼야만 합니다 - Il motore deve essere spento per poter riparare - 引擎必须先关闭才能开始进行维修 - 引擎必須先關閉才能開始進行維修 - + \ No newline at end of file diff --git a/addons/repair/ui/damage_0_ca.paa b/addons/repair/ui/damage_0_ca.paa deleted file mode 100644 index f7c2348f29..0000000000 Binary files a/addons/repair/ui/damage_0_ca.paa and /dev/null differ diff --git a/addons/repair/ui/damage_1_ca.paa b/addons/repair/ui/damage_1_ca.paa deleted file mode 100644 index b143d3cb43..0000000000 Binary files a/addons/repair/ui/damage_1_ca.paa and /dev/null differ diff --git a/addons/repair/ui/damage_2_ca.paa b/addons/repair/ui/damage_2_ca.paa deleted file mode 100644 index 062c4e5a6c..0000000000 Binary files a/addons/repair/ui/damage_2_ca.paa and /dev/null differ diff --git a/addons/repair/ui/damage_3_ca.paa b/addons/repair/ui/damage_3_ca.paa deleted file mode 100644 index 88bc0b87ab..0000000000 Binary files a/addons/repair/ui/damage_3_ca.paa and /dev/null differ diff --git a/addons/repair/ui/damage_4_ca.paa b/addons/repair/ui/damage_4_ca.paa deleted file mode 100644 index 24584de084..0000000000 Binary files a/addons/repair/ui/damage_4_ca.paa and /dev/null differ diff --git a/addons/repair/ui/damage_5_ca.paa b/addons/repair/ui/damage_5_ca.paa deleted file mode 100644 index 41a7e5b42d..0000000000 Binary files a/addons/repair/ui/damage_5_ca.paa and /dev/null differ diff --git a/addons/repair/ui/damage_6_ca.paa b/addons/repair/ui/damage_6_ca.paa deleted file mode 100644 index 68dffc516f..0000000000 Binary files a/addons/repair/ui/damage_6_ca.paa and /dev/null differ diff --git a/addons/repair/ui/damage_7_ca.paa b/addons/repair/ui/damage_7_ca.paa deleted file mode 100644 index 087359e324..0000000000 Binary files a/addons/repair/ui/damage_7_ca.paa and /dev/null differ diff --git a/addons/repair/ui/damage_8_ca.paa b/addons/repair/ui/damage_8_ca.paa deleted file mode 100644 index 1e78785d0c..0000000000 Binary files a/addons/repair/ui/damage_8_ca.paa and /dev/null differ diff --git a/addons/respawn/XEH_preInit.sqf b/addons/respawn/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/respawn/XEH_preInit.sqf +++ b/addons/respawn/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/respawn/config.cpp b/addons/respawn/config.cpp index 79fbf69d74..cd87087e20 100644 --- a/addons/respawn/config.cpp +++ b/addons/respawn/config.cpp @@ -19,3 +19,8 @@ class CfgPatches { #include "CfgVehicleClasses.hpp" #include "CfgVehicles.hpp" #include "ACE_Settings.hpp" + +class ACE_newEvents { + rallypointMoved = "ace_rallypointMoved"; + killedByFriendly = "ace_killedByFriendly"; +}; diff --git a/addons/respawn/functions/fnc_handleInitPostServer.sqf b/addons/respawn/functions/fnc_handleInitPostServer.sqf index 107fbe444b..e8f4f1d110 100644 --- a/addons/respawn/functions/fnc_handleInitPostServer.sqf +++ b/addons/respawn/functions/fnc_handleInitPostServer.sqf @@ -39,9 +39,7 @@ _leaderVarName = _groupUnit getVariable [QGVAR(leaderVarName), ""]; if (_leaderVarName != "") exitWith { // assign JIP unit as rallypoint leader if (str _unit == _leaderVarName) then { - if (isNil {_unit getVariable "ACE_canMoveRallypoint"}) then { - _unit setVariable ["ACE_canMoveRallypoint", true, true]; - }; + _unit setVariable ["ACE_canMoveRallypoint", true, true]; }; }; @@ -63,6 +61,4 @@ if (_leaderVarName == "") then { // prevent group from getting multiple leaders; use this to assign rallypoint moving ability on JIP _groupUnit setVariable [QGVAR(leaderVarName), _leaderVarName]; -if (isNil {_unit getVariable "ACE_canMoveRallypoint"}) then { - _unit setVariable ["ACE_canMoveRallypoint", true, true]; -}; +_unit setVariable ["ACE_canMoveRallypoint", true, true]; diff --git a/addons/respawn/functions/fnc_initRallypoint.sqf b/addons/respawn/functions/fnc_initRallypoint.sqf index 4715783ba3..b012344379 100644 --- a/addons/respawn/functions/fnc_initRallypoint.sqf +++ b/addons/respawn/functions/fnc_initRallypoint.sqf @@ -35,7 +35,7 @@ if (isNil _name) then { }; } else { deleteVehicle _rallypoint; - ERROR("Multiple Rallypoints of same type."); + ACE_LOGERROR("Multiple Rallypoints of same type."); }; // init visible marker diff --git a/addons/respawn/functions/fnc_module.sqf b/addons/respawn/functions/fnc_module.sqf index 97e6e91ccc..bc4f197c07 100644 --- a/addons/respawn/functions/fnc_module.sqf +++ b/addons/respawn/functions/fnc_module.sqf @@ -24,4 +24,4 @@ if (!_activated) exitWith {}; [_logic, QGVAR(SavePreDeathGear), "SavePreDeathGear"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(RemoveDeadBodiesDisconnected), "RemoveDeadBodiesDisconnected"] call EFUNC(common,readSettingFromModule); -INFO("Respawn Module Initialized."); +ACE_LOGINFO("Respawn Module Initialized."); diff --git a/addons/respawn/functions/fnc_moduleFriendlyFire.sqf b/addons/respawn/functions/fnc_moduleFriendlyFire.sqf index 9709c85d66..3c3c02b3c9 100644 --- a/addons/respawn/functions/fnc_moduleFriendlyFire.sqf +++ b/addons/respawn/functions/fnc_moduleFriendlyFire.sqf @@ -30,4 +30,4 @@ if (isServer) then { [], 0.1] call CBA_fnc_waitAndExecute; }; -INFO("Friendly Fire Messages Module Initialized."); +ACE_LOGINFO("Friendly Fire Messages Module Initialized."); diff --git a/addons/respawn/functions/fnc_moduleRallypoint.sqf b/addons/respawn/functions/fnc_moduleRallypoint.sqf index 72744ba712..89baed660f 100644 --- a/addons/respawn/functions/fnc_moduleRallypoint.sqf +++ b/addons/respawn/functions/fnc_moduleRallypoint.sqf @@ -26,4 +26,4 @@ if !(_activated) exitWith {}; false } count _units; -INFO("Rallypoint Module Initialized."); +ACE_LOGINFO("Rallypoint Module Initialized."); diff --git a/addons/respawn/functions/fnc_restoreGear.sqf b/addons/respawn/functions/fnc_restoreGear.sqf index 1d234f16be..a035bdd52d 100644 --- a/addons/respawn/functions/fnc_restoreGear.sqf +++ b/addons/respawn/functions/fnc_restoreGear.sqf @@ -44,7 +44,7 @@ if (!isNil "_activeWeaponAndMuzzle") then { private _index = 0; while { - _index < 299 && {currentWeaponMode _unit != _activeWeaponMode} + _index < 100 && {currentWeaponMode _unit != _activeWeaponMode} } do { _unit action ["SwitchWeapon", _unit, _unit, _index]; _index = _index + 1; diff --git a/addons/respawn/script_component.hpp b/addons/respawn/script_component.hpp index 95428c3332..2fcd01ee37 100644 --- a/addons/respawn/script_component.hpp +++ b/addons/respawn/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_RESPAWN diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml index d298ef804a..e0d04aabfa 100644 --- a/addons/respawn/stringtable.xml +++ b/addons/respawn/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Kihelyezés 5 másodperc múlva... Dispiegamento in 5 secondi... Será posicionado em 5 segundos... - 設置まであと 5 秒・・・ - 5초 후 재배치... - 5秒后完成布署... - 5秒後完成佈署... Rallypoint deployed @@ -28,10 +24,6 @@ Gyülekezőpont elhelyezve Rallypoint dispiegato Rallypoints posicionado - ラリーポイントを設置した - 집결지 배치됨 - 集合点布署完成 - 集合點佈署完成 Teleport to Base @@ -44,10 +36,6 @@ Teletransportar para a Base Bázisra teleportálás Teleporta alla base - ベースへ移動 - 기지로 순간이동 - 传送至基地 - 傳送至基地 Teleport to Rallypoint @@ -60,10 +48,6 @@ Teletransportar para o ponto de encontro Gyülekezőpontra teleportálás Teleporta al rallypoint - ラリーポイントへ移動 - 집결지로 순간이동 - 传送至集合点 - 傳送至集合點 Teleported to Base @@ -76,10 +60,6 @@ Bázisra teleportálva Teleportato alla base Teletransportado para a Base - ベースへ移動した - 기지로 순간이동함 - 已传送至基地 - 已傳送至基地 Teleported to Rallypoint @@ -92,10 +72,6 @@ Gyülekezőpontra teleportálva Teleportato al rallypoint Teletransportado para o Rallypoints - ラリーポイントへ移動した - 집결지로 순간이동함 - 已传送至集合点 - 已傳送至集合點 Rallypoint West (Base) @@ -108,10 +84,6 @@ Gyülekezőpont, Nyugat (Bázis) Rallypoint Západ (Základna) Ponto de encontro Oeste (Base) - ラリーポイント ウエスト (ベース) - 서쪽 집결지 (기지) - 蓝方集合点 (基地) - 藍方集合點 (基地) Rallypoint East (Base) @@ -124,10 +96,6 @@ Gyülekezőpont, Kelet (Bázis) Ralllypoint Východ (Základna) Ponto de encontro Lest (Base) - ラリーポイント イースト (ベース) - 동쪽 집결지 (기지) - 红方集合点 (基地) - 紅方集合點 (基地) Rallypoint Independent (Base) @@ -140,10 +108,6 @@ Gyülekezőpont, Független (Bázis) Rallypoint Nezávislý (Základna) Ponto de encontro Independente (Base) - ラリーポイント インデペンデント (ベース) - 독립 집결지 (기지) - 独立方集合点 (基地) - 獨立方集合點 (基地) Rallypoint West @@ -156,10 +120,6 @@ Gyülekezőpont, Nyugat Rallypoint Západ Ponto de encontro Oeste - ラリーポイント ウエスト - 서쪽 집결지 - 蓝方集合点 - 藍方集合點 Rallypoint East @@ -172,10 +132,6 @@ Gyülekezőpont, Kelet Rallypoint Východ Ponto de encontro Leste - ラリーポイント イースト - 동쪽 집결지 - 红方集合点 - 紅方集合點 Rallypoint Independent @@ -188,10 +144,6 @@ Gyülekezőpont, Független Rallypoint Nezávislý Ponto de encontro Independente - ラリーポイント インデペンデント - 독립 집결지 - 独立方集合点 - 獨立方集合點 Respawn System @@ -204,10 +156,6 @@ Respawn-rendszer Возрождение Sistema Respawn - リスポン システム - 재배치 시스템 - 重生系统 - 重生系統 Save Gear? @@ -220,10 +168,6 @@ Felszerelés elmentése? Сохранять снаряжение? Salva Equipaggiamento? - 装備を保存? - 장비를 저장합니까? - 储存装备? - 儲存裝備? Respawn with the gear a soldier had just before his death? @@ -236,10 +180,6 @@ Az egység halála előtti felszerelésével való respawnolása? Возрождать солдата с тем же снаряжением, которое было на нем при смерти? Respawna con l'equipaggiamento che il soldato aveva appena prima di morire? - ユニットが死ぬ前に持っていた装備でリスポンしますか? - 죽기 전에 가지고 있던 장비로 재배치합니까? - 是否在重生时载入死亡前的装备? - 是否在重生時載入死亡前的裝備? Remove bodies? @@ -252,10 +192,6 @@ Holttestek eltávolítása? Удалять трупы? Rimuovi corpi? - 死体を削除? - 시체를 제거합니까? - 删除尸体? - 刪除屍體? Remove player bodies after disconnect? @@ -268,10 +204,6 @@ Játékosi testek eltávolítása távozás után? Удалять трупы игроков после дисконнекта? Rimuovi i corpi dei giocatori quando si disconnettono? - 切断後はプレイヤーの死体を削除しますか? - 접속이 끊긴 플레이어의 시체를 제거합니까? - 要删除已离线的玩家尸体吗? - 要刪除已離線的玩家屍體嗎? This module enables you to configure ACE functionality specific to respawns. @@ -283,10 +215,6 @@ Ce module permet de régler les options de Respawn Questo modulo ti permette di configurare le funzionalità ACE specifiche dei respawn. Este módulo permite configurar parámetros relacionados con la reaparición - あなたが設定した ACE 機能をリスポンへ設定できます。 - 이 모듈은 ACE 재배치의 자세한 설정을 변결할 수 있게 해줍니다. - 该模块使您可以设定ACE的重生功能. - 該模塊使您可以設定ACE的重生功能. Friendly Fire Messages @@ -299,10 +227,6 @@ Baráti tűz üzenetek Сообщения об огне по своим Messaggi Fuoco Amico - 友軍誤射の表示 - 아군사격 메세지 - 友军误击讯息 - 友軍誤擊訊息 Using this module in your mission will make it so any friendly fire kills will be displayed in form of a message in chat. @@ -314,10 +238,6 @@ Ce module permet l'affiche de message dans le chat lors d'un tir fraticide et indique qui a tué qui. Usando questo modulo nella tua missione farà in modo che ogni uccisione per fuoco amico venga mostrata in forma di messaggio in chat. El usar este módulo, todas las muertes por fuego amigo serán indicadas en el chat. - もし友軍誤射による死者が出た場合は、チャットにてその旨を表示します。 - 이 모듈은 미션 중 아군사격으로 인한 사망자 발생시 채팅창에 메세지를 표시해줍니다. - 摆放此模块后, 当有发生友军误击致死的事件, 会显示提示讯息在聊天视窗中. - 擺放此模塊後, 當有發生友軍誤擊致死的事件, 會顯示提示訊息在聊天視窗中. Rallypoint System @@ -330,10 +250,6 @@ Gyülekezőpont-rendszer Система точек сбора Sistema Punto di Raccolta - ラリーポイント システム - 집결지 시스템 - 集合点系统 - 集合點系統 This module allows you to use rally points in missions, to which you can quickly teleport from base flag. Requires placing special objects on map - base and flag. Both available in category Empty -> ACE Respawn. @@ -345,10 +261,6 @@ Questo modulo ti consente di usare Punti di Raccolta in missione, a cui ti puoi teleportare rapidamente dalla bandiera in base. Richiede il piazzamento di oggetti speciali in mappa - base e bandiera. Entrambi disponibili nella categoria Vuoto -> Respawn ACE Este módulo permite usar puntos de reunión en la misión, a los que pueden teletransportarse las unidades desde la bandera de base. Requiere colocar objetos especiales en el mapa: las banderas de base y de reunión, ambas disponibles en la categoría Vacio-> Reaparición ACE Ce module vous permet d'utiliser les "rally points" auxquels vous pouvez vous téléporter rapidement depuis un drapeau à la base. Il nécessite le placement d'objets spéciaux sur la carte - base et drapeau, disponibles dans la catégorie Vide -> ACE Respawn. - ミッションでベースから素早く移動できるラリーポイントを使えるようにします。ゲーム内に専用オブジェクトとなるベースとフラッグを設置している必要があります。両オブジェクトは Empty 下の ACE リスポンから設置できます。 - 이 모듈은 미션 중에 기지 깃발에서 집결지로 빠르게 텔레포트 시켜주는 역활을 합니다. 지도 상에 기지 및 깃발이 필요합니다. 두 가지 모두 Empty->ACE Respawn 카테고리에서 찾을 수 있습니다. - 摆放此模块后, 你将能在任务中布署集合点, 使你可以快速往返基地与前线. 要使用本功能, 请记得放上空物件->ACE 重生里面的基地与旗帜. - 擺放此模塊後, 你將能在任務中佈署集合點, 使你可以快速往返基地與前線. 要使用本功能, 請記得放上空物件->ACE 重生裡面的基地與旗幟. Move Rallypoint @@ -361,10 +273,6 @@ Gyülekezőpont mozgatása Двигать точку сбора Sposta Punto di Raccolta - ラリーポイントを移動 - 집결지 이동 - 移动集合点 - 移動集合點 ACE Respawn @@ -376,11 +284,7 @@ ACE Respawn ACE Respawn ACE Возрождение - Rigenerazione ACE - ACE リスポン - ACE 재배치 - ACE 重生 - ACE 重生 + Respawn ACE - + \ No newline at end of file diff --git a/addons/safemode/XEH_preInit.sqf b/addons/safemode/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/safemode/XEH_preInit.sqf +++ b/addons/safemode/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/safemode/functions/fnc_unlockSafety.sqf b/addons/safemode/functions/fnc_unlockSafety.sqf index da93bfa671..b1c2fda540 100644 --- a/addons/safemode/functions/fnc_unlockSafety.sqf +++ b/addons/safemode/functions/fnc_unlockSafety.sqf @@ -56,7 +56,7 @@ if (inputAction "nextWeapon" > 0) then { // switch to last mode _index = 0; while { - _index < 299 && {currentMuzzle _unit != _weapon || {currentWeaponMode _unit != _mode}} + _index < 100 && {currentMuzzle _unit != _weapon || {currentWeaponMode _unit != _mode}} } do { _unit action ["SwitchWeapon", _unit, _unit, _index]; _index = _index + 1; diff --git a/addons/safemode/script_component.hpp b/addons/safemode/script_component.hpp index 746510cdd5..d9972b6226 100644 --- a/addons/safemode/script_component.hpp +++ b/addons/safemode/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_SAFEMODE diff --git a/addons/safemode/stringtable.xml b/addons/safemode/stringtable.xml index fa9b951908..9717ba4dae 100644 --- a/addons/safemode/stringtable.xml +++ b/addons/safemode/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -10,12 +10,8 @@ Biztonságos mód Предохранитель Sécurité - Modalità Sicura + Sicura inserita Modo de segurança - 安全装置 - 안전 모드 - 保险模式 - 保險模式 Take off Safety @@ -28,10 +24,6 @@ Enlever sécurité Togli la sicura Tirar segurança - 安全装置を外す - 안전장치 해제 - 开保险 - 開保險 Put on Safety @@ -44,10 +36,6 @@ Sécurité mise Sicura inserita Colocar Segurança - 安全装置を掛けた - 안전장치 적용 - 关保险 - 關保險 Took off Safety @@ -60,10 +48,6 @@ Sécurité enlevée Sicura tolta Tirou Segurança - 安全装置を外した - 안전장치 해제됨 - 已开保险 - 已開保險 - + \ No newline at end of file diff --git a/addons/sandbag/XEH_preInit.sqf b/addons/sandbag/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/sandbag/XEH_preInit.sqf +++ b/addons/sandbag/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/sandbag/config.cpp b/addons/sandbag/config.cpp index 80e3f71808..9c28b948ac 100644 --- a/addons/sandbag/config.cpp +++ b/addons/sandbag/config.cpp @@ -17,3 +17,7 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" + +class ACE_newEvents { + interactMenuOpened = "ace_interactMenuOpened"; +}; diff --git a/addons/sandbag/functions/fnc_canDeploy.sqf b/addons/sandbag/functions/fnc_canDeploy.sqf index 426dde56f2..b9bd025dff 100644 --- a/addons/sandbag/functions/fnc_canDeploy.sqf +++ b/addons/sandbag/functions/fnc_canDeploy.sqf @@ -1,9 +1,9 @@ /* * Author: Ruthberg, commy2 - * Checks if the player can deploy a sandbag. + * Checks if the player can deploy a sandbag * * Arguments: - * 0: Unit + * None * * Return Value: * Can deploy @@ -15,8 +15,15 @@ */ #include "script_component.hpp" +#define SURFACE_BLACKLIST ["water", "concrete", "tarmac", "wood", "metal", "roof_tin", "roof_tiles", "wood_int", "concrete_int", "tiles_int", "metal_int", "stony", "rock", "int_concrete", "int_tiles", "int_wood", "tiling", "wavymetal", "int_metal"] + params ["_unit"]; if !("ACE_Sandbag_empty" in items _unit) exitWith {false}; -_unit call EFUNC(common,canDig) +private ["_surfaceClass", "_surfaceType"]; + +_surfaceClass = (surfaceType getPosASL _unit) select [1]; +_surfaceType = getText (configFile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron"); + +!(_surfaceType in SURFACE_BLACKLIST) diff --git a/addons/sandbag/functions/fnc_deployConfirm.sqf b/addons/sandbag/functions/fnc_deployConfirm.sqf index 68328cca67..47b74533a1 100644 --- a/addons/sandbag/functions/fnc_deployConfirm.sqf +++ b/addons/sandbag/functions/fnc_deployConfirm.sqf @@ -29,12 +29,14 @@ _unit removeItem "ACE_Sandbag_empty"; params ["_unit"]; - private _position = getPosASL GVAR(sandBag); - private _direction = getDir GVAR(sandBag); + private ["_position", "_direction", "_sandBag"]; + + _position = getPosASL GVAR(sandBag); + _direction = getDir GVAR(sandBag); deleteVehicle GVAR(sandBag); - private _sandBag = createVehicle ["ACE_SandbagObject", [0, 0, 0], [], 0, "NONE"]; + _sandBag = createVehicle ["ACE_SandbagObject", [0, 0, 0], [], 0, "NONE"]; _sandBag setPosASL _position; _sandBag setDir _direction; diff --git a/addons/sandbag/functions/fnc_handleInteractMenuOpened.sqf b/addons/sandbag/functions/fnc_handleInteractMenuOpened.sqf index 4aef8f7ec8..f4ea5891c7 100644 --- a/addons/sandbag/functions/fnc_handleInteractMenuOpened.sqf +++ b/addons/sandbag/functions/fnc_handleInteractMenuOpened.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_sandbag_fnc_handleInteractMenuOpened - * * Public: No */ #include "script_component.hpp" diff --git a/addons/sandbag/functions/fnc_handleKilled.sqf b/addons/sandbag/functions/fnc_handleKilled.sqf index b991af1e4b..63babd3f52 100644 --- a/addons/sandbag/functions/fnc_handleKilled.sqf +++ b/addons/sandbag/functions/fnc_handleKilled.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_sandbag_fnc_handleKilled - * * Public: No */ #include "script_component.hpp" diff --git a/addons/sandbag/functions/fnc_handlePlayerChanged.sqf b/addons/sandbag/functions/fnc_handlePlayerChanged.sqf index 2828979bc1..f27a295903 100644 --- a/addons/sandbag/functions/fnc_handlePlayerChanged.sqf +++ b/addons/sandbag/functions/fnc_handlePlayerChanged.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, kevin] call ace_sandbag_fnc_handlePlayerChanged - * * Public: No */ #include "script_component.hpp" diff --git a/addons/sandbag/functions/fnc_handlePlayerInventoryChanged.sqf b/addons/sandbag/functions/fnc_handlePlayerInventoryChanged.sqf index 50d2fdede0..9f5920edd1 100644 --- a/addons/sandbag/functions/fnc_handlePlayerInventoryChanged.sqf +++ b/addons/sandbag/functions/fnc_handlePlayerInventoryChanged.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, "weapon"] call ace_sandbag_fnc_handlePlayerInventoryChanged - * * Public: No */ #include "script_component.hpp" diff --git a/addons/sandbag/functions/fnc_handleUnconscious.sqf b/addons/sandbag/functions/fnc_handleUnconscious.sqf index 709e633377..7e0e257158 100644 --- a/addons/sandbag/functions/fnc_handleUnconscious.sqf +++ b/addons/sandbag/functions/fnc_handleUnconscious.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_sandbag_fnc_handleUnconscious - * * Public: No */ #include "script_component.hpp" diff --git a/addons/sandbag/script_component.hpp b/addons/sandbag/script_component.hpp index 6bd2e8a4ca..a7ce4ddb59 100644 --- a/addons/sandbag/script_component.hpp +++ b/addons/sandbag/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_SANDBAG diff --git a/addons/sandbag/stringtable.xml b/addons/sandbag/stringtable.xml index 555dcab416..99be2bddf1 100644 --- a/addons/sandbag/stringtable.xml +++ b/addons/sandbag/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Sacco di Sabbia Homokzsák Saco de Areia - 土のう - 모래주머니 - 沙包 - 沙包 Sandbag (empty) @@ -28,10 +24,6 @@ Sacco di Sabbia (Vuoto) Homokzsák (üres) Saco de Areia (vazio) - 土のう (空) - 모래주머니(비어있음) - 沙包 (空) - 沙包 (空) Cannot build here @@ -44,10 +36,6 @@ Impossibile costruire qui Nem teheted ide Não pode contruir aqui - ここでは作れない - 여기에 지을 수 없습니다 - 无法放置在此 - 無法放置在此 Pick up Sandbag @@ -60,10 +48,6 @@ Prendi Sacco di Sabbia Homokzsák felvétele Pegar saco de areia - 土のうを拾う - 모래주머니 줍기 - 捡起沙包 - 撿起沙包 Carry Sandbag @@ -76,10 +60,6 @@ Trasporta Sacco di Sabbia Homokzsák cipelése Carregar saco de areia - 土のうを運ぶ - 모래주머니 옮기기 - 搬运沙包 - 搬運沙包 End Carrying @@ -92,10 +72,6 @@ Fine Trasporto Cipelés abbahagyása Parar de carregar - 下ろす - 그만 옮기기 - 停止搬运 - 停止搬運 Drop Sandbag @@ -108,10 +84,6 @@ Lascia Sacco di Sabbia Homokzsák eldobása Derrubar saco de areia - 土のうを落とす - 여기에 놓기 - 放下沙包 - 放下沙包 Confirm Deployment @@ -124,10 +96,6 @@ Conferma Posizionamento Lerak Confirmar implantação - ここで作る - 설치 확인 - 确认布署 - 確認佈署 Cancel Deployment @@ -140,10 +108,6 @@ Cancella Posizionamento Visszavonás Cancelar implantação - 作るのをやめる - 설치 취소 - 取消布署 - 取消佈署 Deploy Sandbag @@ -156,10 +120,6 @@ Posiziona Sacco di Sabbia Homokzsák lerakása Implantar saco de areia - 土のうを設置 - 모래주머니 설치 - 布署沙包 - 佈署沙包 Sandbag Box @@ -172,10 +132,6 @@ Contenitore Sacchi di Sabbia Homokzsákos láda Caixa de saco de areia - 土のう入れ - 모래주머니 상자 - 沙包箱 - 沙包箱 Here is no sand @@ -188,10 +144,6 @@ Qui non cè Sabbia Itt nincs homok Aqui não tem areia - ここに土は無い - 흙이 없습니다 - 这里没有沙 - 這裡沒有沙 Rotate @@ -204,10 +156,6 @@ Obrót Rotaciona Bращать - 回転 - 돌리기 - 旋转 - 旋轉 diff --git a/addons/scopes/ACE_Settings.hpp b/addons/scopes/ACE_Settings.hpp deleted file mode 100644 index 6ff483cb50..0000000000 --- a/addons/scopes/ACE_Settings.hpp +++ /dev/null @@ -1,63 +0,0 @@ -class ACE_Settings { - class GVAR(enabled) { - typeName = "BOOL"; - value = 1; - displayName = CSTRING(enabled_displayName); - description = CSTRING(enabled_description); - }; - // ACE_ScopeAdjust_Vertical and ACE_ScopeAdjust_Horizontal will be populated with default values instead of [0,0] - class GVAR(forceUseOfAdjustmentTurrets) { - typeName = "BOOL"; - value = 0; - displayName = CSTRING(forceUseOfAdjustmentTurrets_displayName); - description = CSTRING(forceUseOfAdjustmentTurrets_description); - }; - - // Auto corrects the zeroing in both vanilla- and advanced ballistics - class GVAR(correctZeroing) { - typeName = "BOOL"; - value = 1; - displayName = CSTRING(correctZeroing_displayName); - description = CSTRING(correctZeroing_description); - }; - // Enables the use of the 'defaultZeroRange' setting to overwrite the discreteDistance[] config - class GVAR(overwriteZeroRange) { - typeName = "BOOL"; - value = 0; - displayName = CSTRING(overwriteZeroRange_displayName); - description = CSTRING(overwriteZeroRange_description); - }; - // Only affects scopes with elevation adjustment turrets (ACE_ScopeAdjust_Vertical != [0,0]) - class GVAR(defaultZeroRange) { - typeName = "SCALAR"; - value = 100; - displayName = CSTRING(defaultZeroRange_displayName); - description = CSTRING(defaultZeroRange_description); - }; - - // Only relevant when advanced ballistics is enabled - class GVAR(zeroReferenceTemperature) { - typeName = "SCALAR"; - value = 15; - displayName = CSTRING(zeroReferenceTemperature_displayName); - description = CSTRING(zeroReferenceTemperature_description); - }; - class GVAR(zeroReferenceBarometricPressure) { - typeName = "SCALAR"; - value = 1013.25; - displayName = CSTRING(zeroReferenceBarometricPressure_displayName); - description = CSTRING(zeroReferenceBarometricPressure_description); - }; - class GVAR(zeroReferenceHumidity) { - typeName = "SCALAR"; - value = 0.5; - displayName = CSTRING(zeroReferenceHumidity_displayName); - description = CSTRING(zeroReferenceHumidity_description); - }; - class GVAR(deduceBarometricPressureFromTerrainAltitude) { - typeName = "BOOL"; - value = 0; - displayName = CSTRING(deduceBarometricPressureFromTerrainAltitude_displayName); - description = CSTRING(deduceBarometricPressureFromTerrainAltitude_description); - }; -}; diff --git a/addons/scopes/CfgVehicles.hpp b/addons/scopes/CfgVehicles.hpp index fd2a7d01c6..8a17384933 100644 --- a/addons/scopes/CfgVehicles.hpp +++ b/addons/scopes/CfgVehicles.hpp @@ -16,75 +16,4 @@ class CfgVehicles { }; }; }; - class ACE_Module; - class GVAR(ModuleSettings): ACE_Module { - scope = 2; - displayName = CSTRING(DisplayName); - //icon = ""; // needs an icon - category = "ACE"; - function = QUOTE(DFUNC(initModuleSettings)); - functionPriority = 1; - isGlobal = 1; - isTriggerActivated = 0; - author = ECSTRING(common,ACETeam); - class Arguments { - class enabled { - displayName = CSTRING(enabled_DisplayName); - description = CSTRING(enabled_Description); - typeName = "BOOL"; - defaultValue = 1; - }; - class forceUseOfAdjustmentTurrets { - displayName = CSTRING(forceUseOfAdjustmentTurrets_DisplayName); - description = CSTRING(forceUseOfAdjustmentTurrets_Description); - typeName = "BOOL"; - defaultValue = 0; - }; - class correctZeroing { - displayName = CSTRING(correctZeroing_DisplayName); - description = CSTRING(correctZeroing_Description); - typeName = "BOOL"; - defaultValue = 1; - }; - class overwriteZeroRange { - displayName = CSTRING(overwriteZeroRange_DisplayName); - description = CSTRING(overwriteZeroRange_Description); - typeName = "BOOL"; - defaultValue = 0; - }; - class defaultZeroRange { - displayName = CSTRING(defaultZeroRange_DisplayName); - description = CSTRING(defaultZeroRange_Description); - typeName = "NUMBER"; - defaultValue = 100; - }; - class zeroReferenceTemperature { - displayName = CSTRING(zeroReferenceTemperature_DisplayName); - description = CSTRING(zeroReferenceTemperature_Description); - typeName = "NUMBER"; - defaultValue = 15; - }; - class zeroReferenceBarometricPressure { - displayName = CSTRING(zeroReferenceBarometricPressure_DisplayName); - description = CSTRING(zeroReferenceBarometricPressure_Description); - typeName = "NUMBER"; - defaultValue = 1013.25; - }; - class zeroReferenceHumidity { - displayName = CSTRING(zeroReferenceHumidity_DisplayName); - description = CSTRING(zeroReferenceHumidity_Description); - typeName = "NUMBER"; - defaultValue = 0.5; - }; - class deduceBarometricPressureFromTerrainAltitude { - displayName = CSTRING(deduceBarometricPressureFromTerrainAltitude_DisplayName); - description = CSTRING(deduceBarometricPressureFromTerrainAltitude_Description); - typeName = "BOOL"; - defaultValue = 0; - }; - }; - class ModuleDescription { - description = CSTRING(Description); - }; - }; }; diff --git a/addons/scopes/CfgWeapons.hpp b/addons/scopes/CfgWeapons.hpp index 43a4b24639..cd87167f22 100644 --- a/addons/scopes/CfgWeapons.hpp +++ b/addons/scopes/CfgWeapons.hpp @@ -1,105 +1,8 @@ class CfgWeapons { class ItemCore; class InventoryOpticsItem_Base_F; - - class optic_Yorris : ItemCore { - ACE_ScopeHeightAboveRail = 0.4; - }; - - class optic_MRD : ItemCore { - ACE_ScopeHeightAboveRail = 0.6; - }; - - class optic_Aco : ItemCore { - ACE_ScopeHeightAboveRail = 1.8; - }; - - class optic_ACO_grn : ItemCore { - ACE_ScopeHeightAboveRail = 1.8; - }; - - class optic_ACO_grn_smg : ItemCore { - ACE_ScopeHeightAboveRail = 1.8; - }; - - class optic_ACO_smg : ItemCore { - ACE_ScopeHeightAboveRail = 1.8; - }; - - class optic_Holosight : ItemCore { - ACE_ScopeHeightAboveRail = 2.4; - }; - - class optic_Holosight_smg : ItemCore { - ACE_ScopeHeightAboveRail = 2.4; - }; - - class optic_Arco : ItemCore { - ACE_ScopeHeightAboveRail = 3.0; - }; - - class optic_ERCO_blk_F : optic_Arco { - ACE_ScopeHeightAboveRail = 2.6; - }; - - class optic_Hamr : ItemCore { - ACE_ScopeHeightAboveRail = 3.2; - }; - - class optic_MRCO : ItemCore { - ACE_ScopeHeightAboveRail = 2.5; - }; - - class optic_Nightstalker : ItemCore { - ACE_ScopeHeightAboveRail = 4.2; - ACE_ScopeAdjust_Vertical[] = {-4, 30}; - ACE_ScopeAdjust_Horizontal[] = {-6, 6}; - ACE_ScopeAdjust_VerticalIncrement = 0.1; - ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { - class OpticsModes { - class NCTALKEP { - discreteDistance[] = {200}; - discreteDistanceInitIndex = 0; - }; - }; - }; - }; - - class optic_NVS : ItemCore { - ACE_ScopeHeightAboveRail = 4.2; - ACE_ScopeAdjust_Vertical[] = {-4, 30}; - ACE_ScopeAdjust_Horizontal[] = {-6, 6}; - ACE_ScopeAdjust_VerticalIncrement = 0.1; - ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { - class OpticsModes { - class NVS { - discreteDistance[] = {300}; - discreteDistanceInitIndex = 0; - }; - }; - }; - }; - - class optic_TWS : ItemCore { - ACE_ScopeHeightAboveRail = 4.2; - ACE_ScopeAdjust_Vertical[] = {-4, 30}; - ACE_ScopeAdjust_Horizontal[] = {-6, 6}; - ACE_ScopeAdjust_VerticalIncrement = 0.1; - ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { - class OpticsModes { - class TWS { - discreteDistance[] = {300}; - discreteDistanceInitIndex = 0; - }; - }; - }; - }; - + class optic_LRPS : ItemCore { - ACE_ScopeHeightAboveRail = 4.0; ACE_ScopeAdjust_Vertical[] = {-4, 30}; ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; @@ -119,7 +22,6 @@ class CfgWeapons { }; class optic_SOS : ItemCore { - ACE_ScopeHeightAboveRail = 3.8; ACE_ScopeAdjust_Vertical[] = {-4, 30}; ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; @@ -135,7 +37,6 @@ class CfgWeapons { }; class optic_DMS : ItemCore { - ACE_ScopeHeightAboveRail = 3.6; ACE_ScopeAdjust_Vertical[] = {-4, 20}; ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; @@ -151,7 +52,6 @@ class CfgWeapons { }; class optic_AMS_base : ItemCore { - ACE_ScopeHeightAboveRail = 3.6; ACE_ScopeAdjust_Vertical[] = {-4, 30}; ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; @@ -171,7 +71,6 @@ class CfgWeapons { }; class optic_KHS_base : ItemCore { - ACE_ScopeHeightAboveRail = 4.0; ACE_ScopeAdjust_Vertical[] = {-4, 30}; ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; @@ -191,7 +90,6 @@ class CfgWeapons { }; class optic_KHS_old : ItemCore { - ACE_ScopeHeightAboveRail = 4.0; ACE_ScopeAdjust_Vertical[] = {-4, 30}; ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; diff --git a/addons/scopes/XEH_PREP.hpp b/addons/scopes/XEH_PREP.hpp index a8489fe585..908d8064f0 100644 --- a/addons/scopes/XEH_PREP.hpp +++ b/addons/scopes/XEH_PREP.hpp @@ -2,12 +2,8 @@ PREP(adjustScope); PREP(adjustZero); PREP(applyScopeAdjustment); -PREP(calculateZeroAngleCorrection); PREP(canAdjustZero); PREP(firedEH); -PREP(getBoreHeight); -PREP(getCurrentZeroRange); PREP(getOptics); -PREP(initModuleSettings); PREP(inventoryCheck); PREP(showZeroing); diff --git a/addons/scopes/XEH_postInit.sqf b/addons/scopes/XEH_postInit.sqf index 0145bfcb66..bef16a0bc1 100644 --- a/addons/scopes/XEH_postInit.sqf +++ b/addons/scopes/XEH_postInit.sqf @@ -9,139 +9,122 @@ if (!hasInterface) exitWith {}; -GVAR(Optics) = ["", "", ""]; -GVAR(Guns) = ["", "", ""]; -GVAR(canAdjustElevation) = [false, false, false]; -GVAR(canAdjustWindage) = [false, false, false]; -GVAR(boreHeight) = [0, 0, 0]; -GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]]; +// Check inventory when it changes +["loadout", FUNC(inventoryCheck)] call CBA_fnc_addPlayerEventHandler; -["ace_settingsInitialized", { +// Instantly hide knobs when scoping in +["cameraView", { + params ["_player", "_newCameraView"]; - if (!GVAR(enabled)) exitWith {}; - - if (GVAR(deduceBarometricPressureFromTerrainAltitude)) then { - GVAR(zeroReferenceBarometricPressure) = 1013.25 * (1 - (0.0065 * EGVAR(common,mapAltitude)) / 288.15) ^ 5.255754495; - }; + if (_newCameraView == "GUNNER") then { + private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer; + _layer cutText ["", "PLAIN", 0]; - // Check inventory when it changes - ["loadout", FUNC(inventoryCheck), true] call CBA_fnc_addPlayerEventHandler; - - // Instantly hide knobs when scoping in - ["cameraView", { - params ["_player", "_newCameraView"]; - - if (_newCameraView == "GUNNER") then { - private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer; - _layer cutText ["", "PLAIN", 0]; - - if !(isNil QGVAR(fadePFH)) then { - [GVAR(fadePFH)] call CBA_fnc_removePerFrameHandler; - GVAR(fadePFH) = nil; - }; + if !(isNil QGVAR(fadePFH)) then { + [GVAR(fadePFH)] call CBA_fnc_removePerFrameHandler; + GVAR(fadePFH) = nil; }; - }] call CBA_fnc_addPlayerEventHandler; + }; +}] call CBA_fnc_addPlayerEventHandler; - // Add keybinds - ["ACE3 Scope Adjustment", QGVAR(AdjustUpMinor), localize LSTRING(AdjustUpMinor), { - // Conditions: canInteract - if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Conditions: specific - if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; +// Add keybinds +["ACE3 Scope Adjustment", QGVAR(AdjustUpMinor), localize LSTRING(AdjustUpMinor), { + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; - [ACE_player] call FUNC(inventoryCheck); + [ACE_player] call FUNC(inventoryCheck); - // Statement - [ACE_player, ELEVATION_UP, MINOR_INCREMENT] call FUNC(adjustScope); - }, {false}, [201, [false, false, false]], true] call CBA_fnc_addKeybind; + // Statement + [ACE_player, ELEVATION_UP, MINOR_INCREMENT] call FUNC(adjustScope); +}, {false}, [201, [false, false, false]], true] call CBA_fnc_addKeybind; - ["ACE3 Scope Adjustment", QGVAR(AdjustDownMinor), localize LSTRING(AdjustDownMinor), { - // Conditions: canInteract - if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Conditions: specific - if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; +["ACE3 Scope Adjustment", QGVAR(AdjustDownMinor), localize LSTRING(AdjustDownMinor), { + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; - [ACE_player] call FUNC(inventoryCheck); + [ACE_player] call FUNC(inventoryCheck); - // Statement - [ACE_player, ELEVATION_DOWN, MINOR_INCREMENT] call FUNC(adjustScope); - }, {false}, [209, [false, false, false]], true] call CBA_fnc_addKeybind; + // Statement + [ACE_player, ELEVATION_DOWN, MINOR_INCREMENT] call FUNC(adjustScope); +}, {false}, [209, [false, false, false]], true] call CBA_fnc_addKeybind; - ["ACE3 Scope Adjustment", QGVAR(AdjustLeftMinor), localize LSTRING(AdjustLeftMinor), { - // Conditions: canInteract - if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Conditions: specific - if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; +["ACE3 Scope Adjustment", QGVAR(AdjustLeftMinor), localize LSTRING(AdjustLeftMinor), { + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; - [ACE_player] call FUNC(inventoryCheck); + [ACE_player] call FUNC(inventoryCheck); - // Statement - [ACE_player, WINDAGE_LEFT, MINOR_INCREMENT] call FUNC(adjustScope); - }, {false}, [209, [false, true, false]], true] call CBA_fnc_addKeybind; + // Statement + [ACE_player, WINDAGE_LEFT, MINOR_INCREMENT] call FUNC(adjustScope); +}, {false}, [209, [false, true, false]], true] call CBA_fnc_addKeybind; - ["ACE3 Scope Adjustment", QGVAR(AdjustRightMinor), localize LSTRING(AdjustRightMinor), { - // Conditions: canInteract - if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Conditions: specific - if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; +["ACE3 Scope Adjustment", QGVAR(AdjustRightMinor), localize LSTRING(AdjustRightMinor), { + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; - [ACE_player] call FUNC(inventoryCheck); + [ACE_player] call FUNC(inventoryCheck); - // Statement - [ACE_player, WINDAGE_RIGHT, MINOR_INCREMENT] call FUNC(adjustScope); - }, {false}, [201, [false, true, false]], true] call CBA_fnc_addKeybind; + // Statement + [ACE_player, WINDAGE_RIGHT, MINOR_INCREMENT] call FUNC(adjustScope); +}, {false}, [201, [false, true, false]], true] call CBA_fnc_addKeybind; - ["ACE3 Scope Adjustment", QGVAR(AdjustUpMajor), localize LSTRING(AdjustUpMajor), { - // Conditions: canInteract - if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Conditions: specific - if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; +["ACE3 Scope Adjustment", QGVAR(AdjustUpMajor), localize LSTRING(AdjustUpMajor), { + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; - [ACE_player] call FUNC(inventoryCheck); + [ACE_player] call FUNC(inventoryCheck); - // Statement - [ACE_player, ELEVATION_UP, MAJOR_INCREMENT] call FUNC(adjustScope); - }, {false}, [201, [true, false, false]], true] call CBA_fnc_addKeybind; + // Statement + [ACE_player, ELEVATION_UP, MAJOR_INCREMENT] call FUNC(adjustScope); +}, {false}, [201, [true, false, false]], true] call CBA_fnc_addKeybind; - ["ACE3 Scope Adjustment", QGVAR(AdjustDownMajor), localize LSTRING(AdjustDownMajor), { - // Conditions: canInteract - if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Conditions: specific - if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; +["ACE3 Scope Adjustment", QGVAR(AdjustDownMajor), localize LSTRING(AdjustDownMajor), { + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; - [ACE_player] call FUNC(inventoryCheck); + [ACE_player] call FUNC(inventoryCheck); - // Statement - [ACE_player, ELEVATION_DOWN, MAJOR_INCREMENT] call FUNC(adjustScope); - }, {false}, [209, [true, false, false]], true] call CBA_fnc_addKeybind; + // Statement + [ACE_player, ELEVATION_DOWN, MAJOR_INCREMENT] call FUNC(adjustScope); +}, {false}, [209, [true, false, false]], true] call CBA_fnc_addKeybind; - ["ACE3 Scope Adjustment", QGVAR(AdjustLeftMajor), localize LSTRING(AdjustLeftMajor), { - // Conditions: canInteract - if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Conditions: specific - if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; +["ACE3 Scope Adjustment", QGVAR(AdjustLeftMajor), localize LSTRING(AdjustLeftMajor), { + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; - [ACE_player] call FUNC(inventoryCheck); + [ACE_player] call FUNC(inventoryCheck); - // Statement - [ACE_player, WINDAGE_LEFT, MAJOR_INCREMENT] call FUNC(adjustScope); - }, {false}, [209, [true, true, false]], true] call CBA_fnc_addKeybind; + // Statement + [ACE_player, WINDAGE_LEFT, MAJOR_INCREMENT] call FUNC(adjustScope); +}, {false}, [209, [true, true, false]], true] call CBA_fnc_addKeybind; - ["ACE3 Scope Adjustment", QGVAR(AdjustRightMajor), localize LSTRING(AdjustRightMajor), { - // Conditions: canInteract - if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Conditions: specific - if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; +["ACE3 Scope Adjustment", QGVAR(AdjustRightMajor), localize LSTRING(AdjustRightMajor), { + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; - [ACE_player] call FUNC(inventoryCheck); + [ACE_player] call FUNC(inventoryCheck); - // Statement - [ACE_player, WINDAGE_RIGHT, MAJOR_INCREMENT] call FUNC(adjustScope); - }, {false}, [201, [true, true, false]], true] call CBA_fnc_addKeybind; + // Statement + [ACE_player, WINDAGE_RIGHT, MAJOR_INCREMENT] call FUNC(adjustScope); +}, {false}, [201, [true, true, false]], true] call CBA_fnc_addKeybind; - // Register fire event handler - ["ace_firedPlayer", DFUNC(firedEH)] call CBA_fnc_addEventHandler; - ["ace_firedPlayerNonLocal", DFUNC(firedEH)] call CBA_fnc_addEventHandler; - -}] call CBA_fnc_addEventHandler; +// Register fire event handler +["ace_firedPlayer", DFUNC(firedEH)] call CBA_fnc_addEventHandler; +["ace_firedPlayerNonLocal", DFUNC(firedEH)] call CBA_fnc_addEventHandler; diff --git a/addons/scopes/XEH_preInit.sqf b/addons/scopes/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/scopes/XEH_preInit.sqf +++ b/addons/scopes/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/scopes/config.cpp b/addons/scopes/config.cpp index 85c870b97c..8388b2d04b 100644 --- a/addons/scopes/config.cpp +++ b/addons/scopes/config.cpp @@ -8,7 +8,7 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "ace_common" }; author = ECSTRING(common,ACETeam); - authors[] = {"KoffeinFlummi", "esteldunedain", "Ruthberg"}; + authors[] = {"KoffeinFlummi", "esteldunedain"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; @@ -19,4 +19,3 @@ class CfgPatches { #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" #include "RscTitles.hpp" -#include "ACE_Settings.hpp" diff --git a/addons/scopes/functions/fnc_adjustScope.sqf b/addons/scopes/functions/fnc_adjustScope.sqf index a16568b0d9..9a38ef40cb 100644 --- a/addons/scopes/functions/fnc_adjustScope.sqf +++ b/addons/scopes/functions/fnc_adjustScope.sqf @@ -23,21 +23,33 @@ params ["_unit", "_turretAndDirection", "_majorStep"]; if (!(_unit isKindOf "Man")) exitWith {false}; if (currentMuzzle _unit != currentWeapon _unit) exitWith {false}; -if (!GVAR(enabled)) exitWith {false}; _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith {false}; -_adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; +_adjustment = _unit getVariable QGVAR(Adjustment); +if (isNil "_adjustment") then { + _adjustment = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]; // [Windage, Elevation, Zero] +}; -if (!(GVAR(canAdjustElevation) select _weaponIndex) && (_turretAndDirection in [ELEVATION_UP, ELEVATION_DOWN])) exitWith {false}; -if (!(GVAR(canAdjustWindage) select _weaponIndex) && (_turretAndDirection in [WINDAGE_UP, WINDAGE_DOWN])) exitWith {false}; +if (isNil QGVAR(Optics)) then { + GVAR(Optics) = ["", "", ""]; +}; + +_optic = GVAR(Optics) select _weaponIndex; +_opticConfig = configFile >> "CfgWeapons" >> _optic; +_verticalIncrement = getNumber (_opticConfig >> "ACE_ScopeAdjust_VerticalIncrement"); +_horizontalIncrement = getNumber (_opticConfig >> "ACE_ScopeAdjust_HorizontalIncrement"); +_maxVertical = getArray (_opticConfig >> "ACE_ScopeAdjust_Vertical"); +_maxHorizontal = getArray (_opticConfig >> "ACE_ScopeAdjust_Horizontal"); + +if ((count _maxHorizontal < 2) || (count _maxVertical < 2)) exitWith {false}; +if ((_verticalIncrement == 0) && (_turretAndDirection in [ELEVATION_UP, ELEVATION_DOWN])) exitWith {false}; +if ((_horizontalIncrement == 0) && (_turretAndDirection in [WINDAGE_UP, WINDAGE_DOWN])) exitWith {false}; _zeroing = _adjustment select _weaponIndex; _zeroing params ["_elevation", "_windage", "_zero"]; -(GVAR(scopeAdjust) select _weaponIndex) params ["_maxVertical", "_verticalIncrement", "_maxHorizontal", "_horizontalIncrement"]; - switch (_turretAndDirection) do { case ELEVATION_UP: { _elevation = _elevation + _verticalIncrement }; case ELEVATION_DOWN: { _elevation = _elevation - _verticalIncrement }; diff --git a/addons/scopes/functions/fnc_adjustZero.sqf b/addons/scopes/functions/fnc_adjustZero.sqf index bc702a8c5f..9e953d0523 100644 --- a/addons/scopes/functions/fnc_adjustZero.sqf +++ b/addons/scopes/functions/fnc_adjustZero.sqf @@ -24,7 +24,12 @@ if (vehicle _unit != _unit) exitWith {false}; _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith {false}; -_adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; +_adjustment = _unit getVariable QGVAR(Adjustment); +if (isNil "_adjustment") then { + // [Windage, Elevation, Zero] + _adjustment = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]; +}; + _zeroing = _adjustment select _weaponIndex; _zeroing params ["_elevation", "_windage", "_zero"]; diff --git a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf index 2777df65b5..7067b0442c 100644 --- a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf +++ b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf @@ -24,7 +24,13 @@ params ["_unit", "_elevation", "_windage", "_zero"]; _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); -_adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; +_adjustment = _unit getVariable QGVAR(Adjustment); +if (isNil "_adjustment") then { + // [Windage, Elevation, Zero] + _adjustment = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]; + _unit setVariable [QGVAR(Adjustment), _adjustment]; +}; + _adjustmentDifference = (_adjustment select _weaponIndex) vectorDiff [_elevation, _windage, _zero]; if (_adjustmentDifference isEqualTo [0,0,0]) exitWith {false}; // Don't coninue if no adjustment is made diff --git a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf b/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf deleted file mode 100644 index 5197a94e70..0000000000 --- a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Author: Ruthberg - * Calculates the zero angle correction for the new zero range based on current zero range and bore height (distance between bore- and sight axis) - * - * Arguments: - * 0: Zero range - * 1: Bore height - * 2: Weapon - * 3: Ammo - * 4: Magazine - * 5: Advanced Ballistics enabled? - * - * Return Value: - * zeroAngleCorrection - * - * Example: - * [5, 6, gun, ammo, magazine, true] call ace_scopes_fnc_calculateZeroAngleCorrection - * - * Public: No - */ -#include "script_component.hpp" - -params ["_oldZeroRange", "_newZeroRange", "_boreHeight"/*in cm*/, "_weapon", "_ammo", "_magazine", "_advancedBallistics"]; - -private _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammo >> "airFriction"); -private _initSpeed = getNumber(configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); -private _initSpeedCoef = getNumber(configFile >> "CfgWeapons" >> _weapon >> "initSpeed"); -if (_initSpeedCoef > 0) then { - _initSpeed = _initSpeedCoef; -}; -if (_initSpeedCoef < 0) then { - _initSpeed = _initSpeed * (-1 * _initSpeedCoef); -}; - -private _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngleVanilla:%1:%2:%3:%4", _oldZeroRange, _initSpeed, _airFriction, 0]; -private _vanillaZero = parseNumber _zeroAngle; - -private _trueZero = if (!_advancedBallistics) then { - _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngleVanilla:%1:%2:%3:%4", _newZeroRange, _initSpeed, _airFriction, _boreHeight]; - (parseNumber _zeroAngle) -} else { - // Get Weapon and Ammo Configurations - private _AmmoCacheEntry = uiNamespace getVariable format[QEGVAR(advanced_ballistics,%1), _ammo]; - if (isNil "_AmmoCacheEntry") then { - _AmmoCacheEntry = _ammo call EFUNC(advanced_ballistics,readAmmoDataFromConfig); - }; - private _WeaponCacheEntry = uiNamespace getVariable format[QEGVAR(advanced_ballistics,%1), _weapon]; - if (isNil "_WeaponCacheEntry") then { - _WeaponCacheEntry = _weapon call EFUNC(advanced_ballistics,readWeaponDataFromConfig); - }; - - _AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable"]; - _WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"]; - - if (missionNamespace getVariable [QEGVAR(advanced_ballistics,barrelLengthInfluenceEnabled), false]) then { - private _barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _initSpeed] call EFUNC(advanced_ballistics,calculateBarrelLengthVelocityShift); - _initSpeed = _initSpeed + _barrelVelocityShift; - }; - - _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngle:%1:%2:%3:%4:%5:%6:%7:%8:%9", _newZeroRange, _initSpeed, _boreHeight, GVAR(zeroReferenceTemperature), GVAR(zeroReferenceBarometricPressure), GVAR(zeroReferenceHumidity), _ballisticCoefficients select 0, _dragModel, _atmosphereModel]; - (parseNumber _zeroAngle) -}; - -private _zeroAngleCorrection = _trueZero - _vanillaZero; - -missionNamespace setVariable [format[QGVAR(%1_%2_%3_%4_%5_%6_%7), _oldZeroRange, _newZeroRange, _boreHeight, _weapon, _ammo, _magazine, _advancedBallistics], _zeroAngleCorrection]; - -_zeroAngleCorrection diff --git a/addons/scopes/functions/fnc_canAdjustZero.sqf b/addons/scopes/functions/fnc_canAdjustZero.sqf index 30e2918805..477dc12635 100644 --- a/addons/scopes/functions/fnc_canAdjustZero.sqf +++ b/addons/scopes/functions/fnc_canAdjustZero.sqf @@ -26,7 +26,12 @@ if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith {false}; -_adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; +_adjustment = _unit getVariable QGVAR(Adjustment); +if (isNil "_adjustment") then { + // [Windage, Elevation, Zero] + _adjustment = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]; +}; + _elevation = (_adjustment select _weaponIndex) select 0; // You can only adjust your zero reference, if your relative elevation setting is not 0 diff --git a/addons/scopes/functions/fnc_firedEH.sqf b/addons/scopes/functions/fnc_firedEH.sqf index f83371ec13..5d3b975dbf 100644 --- a/addons/scopes/functions/fnc_firedEH.sqf +++ b/addons/scopes/functions/fnc_firedEH.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi, esteldunedain, Ruthberg + * Author: KoffeinFlummi, esteldunedain * Adjusts the flight path of the bullet according to the zeroing. Called from the unified fired EH only for local and non-local players on foot. * * Arguments: @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * call ace_scopes_fnc_firedEH - * * Public: No */ #include "script_component.hpp" @@ -18,32 +15,19 @@ //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 (!(_ammo isKindOf "BulletBase")) exitWith {}; +private _adjustment = _unit getVariable [QGVAR(Adjustment), []]; +if (_adjustment isEqualTo []) exitWith {}; private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith {}; -private _adjustment = ACE_player getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; -private _zeroing = +(_adjustment select _weaponIndex); +private _zeroing = _adjustment select _weaponIndex; TRACE_1("Adjusting With",_zeroing); -// Convert zeroing from mils to degrees -_zeroing = _zeroing vectorMultiply 0.05625; - -if (GVAR(correctZeroing)) then { - private _advancedBallistics = missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]; - private _boreHeight = GVAR(boreHeight) select _weaponIndex; - private _oldZeroRange = currentZeroing _unit; - private _newZeroRange = [_unit] call FUNC(getCurrentZeroRange); - private _zeroCorrection = missionNamespace getVariable format[QGVAR(%1_%2_%3_%4_%5_%6_%7), _oldZeroRange, _newZeroRange, _boreHeight, _weapon, _ammo, _magazine, _advancedBallistics]; - if (isNil "_zeroCorrection") then { - _zeroCorrection = [_oldZeroRange, _newZeroRange, _boreHeight, _weapon, _ammo, _magazine, _advancedBallistics] call FUNC(calculateZeroAngleCorrection); - }; - _zeroing = _zeroing vectorAdd [0, 0, _zeroCorrection]; -}; - if (_zeroing isEqualTo [0, 0, 0]) exitWith {}; +// Convert zeroing from mils to degrees +_zeroing = _zeroing vectorMultiply 0.05625; _zeroing params ["_elevation", "_windage", "_zero"]; [_projectile, _windage, _elevation + _zero, 0] call EFUNC(common,changeProjectileDirection); diff --git a/addons/scopes/functions/fnc_getBoreHeight.sqf b/addons/scopes/functions/fnc_getBoreHeight.sqf deleted file mode 100644 index fb061e5d46..0000000000 --- a/addons/scopes/functions/fnc_getBoreHeight.sqf +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Author: Ruthberg - * Gets the bore height of the weapon & optic combination with the given weapon index - * - * Arguments: - * 0: Unit - * 1: Weapon index - * - * Return Value: - * bore height - * - * Example: - * [player] call ace_scopes_fnc_getBoreHeight - * - * Public: Yes - */ -#include "script_component.hpp" - -params ["_player", "_weaponIndex"]; - -if (_weaponIndex < 0 || {_weaponIndex > 2}) exitWith { 0 }; - -private _weaponClass = [primaryWeapon _player, secondaryWeapon _player, handgunWeapon _player] select _weaponIndex; -private _opticsClass = ([_player] call FUNC(getOptics)) select _weaponIndex; - -if (_opticsClass == "") then { _opticsClass = _weaponClass; }; - -// Determine rail height above bore -private _railHeightAboveBore = 0; -private _weaponConfig = configFile >> "CfgWeapons" >> _weaponClass; -if (isNumber (_weaponConfig >> "ACE_RailHeightAboveBore")) then { - _railHeightAboveBore = getNumber(_weaponConfig >> "ACE_RailHeightAboveBore"); -} else { - switch (_weaponIndex) do { - case 0: { _railHeightAboveBore = 2.0; }; // Rifle - case 2: { _railHeightAboveBore = 0.7; }; // Pistol - }; -}; -// Determine scope height above rail -private _scopeHeightAboveRail = 0; -private _opticConfig = configFile >> "CfgWeapons" >> _opticsClass; -if (isNumber (_opticConfig >> "ACE_ScopeHeightAboveRail")) then { - _scopeHeightAboveRail = getNumber(_opticConfig >> "ACE_ScopeHeightAboveRail"); -} else { - switch (getNumber(_opticConfig >> "ItemInfo" >> "opticType")) do { - case 1: { _scopeHeightAboveRail = 3.0; }; // RCO or similar - case 2: { _scopeHeightAboveRail = 4.0; }; // High power scope - default { - switch (_weaponIndex) do { - case 0: { _scopeHeightAboveRail = 0.5; }; // Rifle iron sights - case 2: { _scopeHeightAboveRail = 0.3; }; // Pistol iron sights - }; - }; - }; -}; - -(_railHeightAboveBore + _scopeHeightAboveRail) diff --git a/addons/scopes/functions/fnc_getCurrentZeroRange.sqf b/addons/scopes/functions/fnc_getCurrentZeroRange.sqf deleted file mode 100644 index 7af8d2e3e9..0000000000 --- a/addons/scopes/functions/fnc_getCurrentZeroRange.sqf +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Author: Ruthberg - * Gets the zero range of the currently used optic - * - * Arguments: - * 0: Unit - * - * Return Value: - * current zero range - * - * Example: - * [player] call ace_scopes_fnc_getCurrentZeroRange - * - * Public: No - */ -#include "script_component.hpp" - -params ["_unit"]; - -if (!GVAR(enabled)) exitWith { currentZeroing _unit }; - -private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); -if (_weaponIndex < 0) exitWith { currentZeroing _unit }; - -private _optic = GVAR(Optics) select _weaponIndex; -private _opticConfig = if (_optic != "") then { - (configFile >> "CfgWeapons" >> _optic) -} else { - (configFile >> "CfgWeapons" >> (GVAR(Guns) select _weaponIndex)) -}; - -private _zeroRange = currentZeroing _unit; -if (GVAR(overwriteZeroRange) && {GVAR(canAdjustElevation) select _weaponIndex}) then { - _zeroRange = GVAR(defaultZeroRange); -}; -if (isNumber (_opticConfig >> "ACE_ScopeZeroRange")) then { - _zeroRange = getNumber(_opticConfig >> "ACE_ScopeZeroRange"); -}; - -_zeroRange diff --git a/addons/scopes/functions/fnc_initModuleSettings.sqf b/addons/scopes/functions/fnc_initModuleSettings.sqf deleted file mode 100644 index 92742afd14..0000000000 --- a/addons/scopes/functions/fnc_initModuleSettings.sqf +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Author: Glowbal, Ruthberg - * Module for adjusting the scopes settings - * - * Arguments: - * 0: The module logic - * 1: units - * 2: activated - * - * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_scopes_fnc_initModuleSettings - * - * Public: No - */ -#include "script_component.hpp" - -params ["_logic","_units", "_activated"]; - -if !(_activated) exitWith {}; - -[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(forceUseOfAdjustmentTurrets), "forceUseOfAdjustmentTurrets"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(correctZeroing), "correctZeroing"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(overwriteZeroRange), "overwriteZeroRange"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(defaultZeroRange), "defaultZeroRange"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(zeroReferenceTemperature), "zeroReferenceTemperature"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(zeroReferenceBarometricPressure), "zeroReferenceBarometricPressure"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(zeroReferenceHumidity), "zeroReferenceHumidity"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(deduceBarometricPressureFromTerrainAltitude), "deduceBarometricPressureFromTerrainAltitude"] call EFUNC(common,readSettingFromModule); - -GVAR(defaultZeroRange) = 0 max GVAR(defaultZeroRange) min 1000; -GVAR(zeroReferenceTemperature) = -55 max GVAR(zeroReferenceTemperature) max 55; -GVAR(zeroReferenceBarometricPressure) = 0 max GVAR(zeroReferenceBarometricPressure) min 1013.25; -GVAR(zeroReferenceHumidity) = 0 max GVAR(zeroReferenceHumidity) min 1.0; diff --git a/addons/scopes/functions/fnc_inventoryCheck.sqf b/addons/scopes/functions/fnc_inventoryCheck.sqf index 817d301221..1a79ef0418 100644 --- a/addons/scopes/functions/fnc_inventoryCheck.sqf +++ b/addons/scopes/functions/fnc_inventoryCheck.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi, Commy2, Ruthberg + * Author: KoffeinFlummi, Commy2 * Check if weapon optics changed and reset zeroing if needed * * Arguments: @@ -17,94 +17,28 @@ params ["_player"]; -private _adjustment = ACE_player getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; -private _updateAdjustment = false; - -private _newOptics = [_player] call FUNC(getOptics); -{ - if (_newOptics select _forEachIndex != _x) then { - private _opticConfig = configFile >> "CfgWeapons" >> (_newOptics select _forEachIndex); - private _opticType = getNumber(_opticConfig >> "ItemInfo" >> "opticType"); - private _verticalIncrement = -1; - if (isNumber (_opticConfig >> "ACE_ScopeAdjust_VerticalIncrement")) then { - _verticalIncrement = getNumber (_opticConfig >> "ACE_ScopeAdjust_VerticalIncrement"); - }; - private _horizontalIncrement = -1; - if (isNumber (_opticConfig >> "ACE_ScopeAdjust_HorizontalIncrement")) then { - _horizontalIncrement = getNumber (_opticConfig >> "ACE_ScopeAdjust_HorizontalIncrement"); - }; - private _maxVertical = []; - if (isArray (_opticConfig >> "ACE_ScopeAdjust_Vertical")) then { - _maxVertical = getArray (_opticConfig >> "ACE_ScopeAdjust_Vertical"); - }; - private _maxHorizontal = []; - if (isArray (_opticConfig >> "ACE_ScopeAdjust_Horizontal")) then { - _maxHorizontal = getArray (_opticConfig >> "ACE_ScopeAdjust_Horizontal"); - }; - if (GVAR(forceUseOfAdjustmentTurrets) && _opticType == 2) then { - if (_maxVertical isEqualTo []) then { _maxVertical = [-4, 30]; }; - if (_maxHorizontal isEqualTo []) then { _maxHorizontal = [-6, 6]; }; - if (_verticalIncrement == -1) then { _verticalIncrement = 0.1; }; - if (_horizontalIncrement == -1) then { _horizontalIncrement = 0.1; }; - } else { - if (_maxVertical isEqualTo []) then { _maxVertical = [0, 0]; }; - if (_maxHorizontal isEqualTo []) then { _maxHorizontal = [0, 0]; }; - if (_verticalIncrement == -1) then { _verticalIncrement = 0; }; - if (_horizontalIncrement == -1) then { _horizontalIncrement = 0; }; - }; - (GVAR(scopeAdjust) select _forEachIndex) set [0, _maxVertical]; - (GVAR(scopeAdjust) select _forEachIndex) set [1, _verticalIncrement]; - (GVAR(scopeAdjust) select _forEachIndex) set [2, _maxHorizontal]; - (GVAR(scopeAdjust) select _forEachIndex) set [3, _horizontalIncrement]; - GVAR(canAdjustElevation) set [_forEachIndex, (_verticalIncrement > 0) && !(_maxVertical isEqualTo [0, 0])]; - GVAR(canAdjustWindage) set [_forEachIndex, (_horizontalIncrement > 0) && !(_maxHorizontal isEqualTo [0, 0])]; - }; -} forEach GVAR(Optics); - -private _newGuns = [primaryWeapon _player, secondaryWeapon _player, handgunWeapon _player]; -{ - if ((_newOptics select _x) != (GVAR(Optics) select _x) || (_newGuns select _x != GVAR(Guns) select _x)) then { - // The optic or the weapon changed, set adjustment to zero - if (!((_adjustment select _forEachIndex) isEqualTo [0, 0, 0])) then { - _adjustment set [_forEachIndex, [0, 0, 0]]; - _updateAdjustment = true; - }; - - GVAR(boreHeight) set [_x, [_player, _x] call FUNC(getBoreHeight)]; - - if ((_newOptics select _x) == "") then { - // Check if the weapon comes with an integrated optic - private _weaponConfig = configFile >> "CfgWeapons" >> (_newGuns select _x); - private _verticalIncrement = 0; - if (isNumber (_weaponConfig >> "ACE_ScopeAdjust_VerticalIncrement")) then { - _verticalIncrement = getNumber (_weaponConfig >> "ACE_ScopeAdjust_VerticalIncrement"); - }; - private _horizontalIncrement = 0; - if (isNumber (_weaponConfig >> "ACE_ScopeAdjust_HorizontalIncrement")) then { - _horizontalIncrement = getNumber (_weaponConfig >> "ACE_ScopeAdjust_HorizontalIncrement"); - }; - private _maxVertical = [0, 0]; - if (isArray (_weaponConfig >> "ACE_ScopeAdjust_Vertical")) then { - _maxVertical = getArray (_weaponConfig >> "ACE_ScopeAdjust_Vertical"); - }; - private _maxHorizontal = [0, 0]; - if (isArray (_weaponConfig >> "ACE_ScopeAdjust_Horizontal")) then { - _maxHorizontal = getArray (_weaponConfig >> "ACE_ScopeAdjust_Horizontal"); - }; - TRACE_5("",_newGuns select _x,_verticalIncrement,_horizontalIncrement,_maxVertical,_maxHorizontal); - (GVAR(scopeAdjust) select _x) set [0, _maxVertical]; - (GVAR(scopeAdjust) select _x) set [1, _verticalIncrement]; - (GVAR(scopeAdjust) select _x) set [2, _maxHorizontal]; - (GVAR(scopeAdjust) select _x) set [3, _horizontalIncrement]; - GVAR(canAdjustElevation) set [_x, (_verticalIncrement > 0) && !(_maxVertical isEqualTo [0, 0])]; - GVAR(canAdjustWindage) set [_x, (_horizontalIncrement > 0) && !(_maxHorizontal isEqualTo [0, 0])]; - }; - } -} forEach [0, 1, 2]; - -if (_updateAdjustment) then { +private _adjustment = ACE_player getVariable QGVAR(Adjustment); +if (isNil "_adjustment") then { + // [Windage, Elevation, Zero] + _adjustment = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]; + ACE_player setVariable [QGVAR(Adjustment), _adjustment]; [ACE_player, QGVAR(Adjustment), _adjustment, 0.5] call EFUNC(common,setVariablePublic); }; +if (isNil QGVAR(Optics)) then { + GVAR(Optics) = ["", "", ""]; +}; +private _newOptics = [_player] call FUNC(getOptics); + +{ + if (_newOptics select _forEachIndex != _x) then { + // The optic for this weapon changed, set adjustment to zero + if (!((_adjustment select _forEachIndex) isEqualTo [0, 0, 0])) then { + _adjustment set [_forEachIndex, [0, 0, 0]]; + [ACE_player, QGVAR(Adjustment), _adjustment, 0.5] call EFUNC(common,setVariablePublic); + }; + }; +} forEach GVAR(Optics); + +_adjustment = ACE_player getVariable QGVAR(Adjustment); GVAR(Optics) = _newOptics; -GVAR(Guns) = _newGuns; diff --git a/addons/scopes/functions/fnc_showZeroing.sqf b/addons/scopes/functions/fnc_showZeroing.sqf index cf74e38842..530f5cb1d2 100644 --- a/addons/scopes/functions/fnc_showZeroing.sqf +++ b/addons/scopes/functions/fnc_showZeroing.sqf @@ -20,7 +20,11 @@ disableSerialization; private _weaponIndex = [ACE_player, currentWeapon ACE_player] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith {}; -private _adjustment = ACE_player getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; +private _adjustment = ACE_player getVariable QGVAR(Adjustment); +if (isNil "_adjustment") then { + // [Windage, Elevation, Zero] + _adjustment = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]; +}; // Display the adjustment knobs private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer; diff --git a/addons/scopes/script_component.hpp b/addons/scopes/script_component.hpp index a797b36191..402f390f63 100644 --- a/addons/scopes/script_component.hpp +++ b/addons/scopes/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #define ELEVATION_UP 0 diff --git a/addons/scopes/stringtable.xml b/addons/scopes/stringtable.xml index 16898757fd..8dc7a9eba0 100644 --- a/addons/scopes/stringtable.xml +++ b/addons/scopes/stringtable.xml @@ -1,196 +1,6 @@ - + - - Scopes - スコープ - 조준경 - Celowniki optyczne - Scopes - Mirini - 瞄准镜 - 瞄準鏡 - - - Enable ACE Scope adjustment - ACE スコープ調節を有効化 - ACE 조준경 영점조작 활성화 - Włącz ustawienia celowników optycznych ACE - Active ACE Scope adjustment - Abilita Regolazione mirino ACE - 开启ACE瞄准镜归零调节 - 開啟ACE瞄準鏡歸零調節 - - - Enable adjustmet turrets on high powered scopes - 高倍率スコープでACE スコープ調節を有効化 - 고성능 조준경 조절 나사 활성화 - Włącz pokrętła regulacyjne - Permet de régler la hausse et la dérive sur les optiques de visée à fort grossissement - Abilita la regolazione delle torrette nei mirini a lunga gittata - 开启高倍率瞄准镜归零调节 - 開啟高倍率瞄準鏡歸零調節 - - - Force adjustment turrets - ACE スコープ調節を有効化 - 조절 나사 강제 - Wymuś użycie pokręteł regulacyjnych - Impose le réglage de la hausse/dérive - Forza la regolazione delle torrette - 强制使用归零调节 - 強制使用歸零調節 - - - Force usage of adjustmet turrets on high powered scopes - 高倍率スコープで調整の使用を強制させます - 고성능 조준경의 조절 나사 사용을 강제합니다 - Wymuś użycie pokręteł regulacyjnych dla celowników o dużym powiększeniu - Impose le réglage de la hausse/dérive sur les optiques de visée à fort grossissement - Forza l'uso della regolazione nei mirini a lunga gittata - 强制为高倍率瞄准镜开启归零调节 - 強制為高倍率瞄準鏡開啟歸零調節 - - - Correct zeroing - ゼロイン調節 - 영점 고치기 - Poprawka zerowania - Corrige le zérotage - Correggi azzeramento - 修正归零 - 修正歸零 - - - Corrects the zeroing of all small arms sights - 全ての小口径用照準器のゼロインを調節します - 모든 소화기의 영점을 고칩니다 - Poprawia zerowanie wszystkich celowników broni ręcznej - Corrige le zérotage des optiques de visée des petites armes - Corregge l'azzeramento di tutti i mirini di bassa portata - 为所有小口径武器修正归零 - 為所有小口徑武器修正歸零 - - - Overwrite zero distance - ゼロイン距離を上書き - 영점거리 덮어쓰기 - Nadpisuje ustawienie dla zerowego dystansu - Remplace la distance de zérotage - Sovrascrivi la distanza zero - 覆写归零距离 - 覆寫歸零距離 - - - Uses the 'defaultZeroRange' setting to overwrite the zero range of high power scopes - 'defaultZeroRange'設定を使う高倍率スコープのゼロイン距離を上書きします - 기존 고성능 조준경의 영점거리에 '기본설정 영점거리' 를 덮어씌웁니다 - Używa 'defaultZeroRange' zamiast ustawionej odległości zerowania dla celowników o duzym przybliżeniu - Utilise le paramètre 'defaultZeroRange' pour remplacer la distance de zérotage sur les optiques de visée à fort grossissement - Usa le impostazioni di "defaultZeroRange" (Portata Zero Predefinita) per sovrascrivere la portata zero dei mirini a lunga gittata - 使用'defaultZeroRange'来为高倍率瞄准镜覆写预设归零距离 - 使用'defaultZeroRange'來為高倍率瞄準鏡覆寫預設歸零距離 - - - Default zero distance - 標準のゼロイン距離 - 기본설정 영점거리 - Domyślne zerowanie - Distance de zérotage par défaut - Distanza zero predefinita - 预设归零距离 - 預設歸零距離 - - - High power scopes will be zeroed at this distance - 高倍率スコープのゼロイン距離はこの設定になります - 고성능 조준경이 정해진 수만큼 영점거리를 맞추게 됩니다. - Celowniki o dużym powiększeniu będą zerowane dla tej odległości - Distance de zérotage par défaut des optiques de visée à fort grossissement - I mirini a lunga gittata verranno azzerrati a questa distanza - 高倍率瞄准镜将归零在这个距离上 - 高倍率瞄準鏡將歸零在這個距離上 - - - Reference temperature - 温度の参照 - 온도 기준 - Referencyjna temperatura - Température de référence - Temperatura di riferimento - 参考温度 - 參考溫度 - - - Temperature at which the scope was zeroed - スコープがゼロインされる温度 - 조준경 영점조준시 온도 - Temperatura, przy której celownik został wyzerowany - Température de référence pour le zérotage des optiques - Temperatura a cui è stato azzerato il mirino - 武器参考多少温度来进行归零. - 武器參考多少溫度來進行歸零. - - - Reference barometric pressure - 気圧の参照 - 기압 기준 - Referencyjne ciśnienie barometryczne - Pression barométrique de référence - Pressione barometrica di riferimento - 参考大气压力 - 參考大氣壓力 - - - Barometric pressure at which the scope was zeroed - 気圧の参照 - 조준경 영점조준시 기압 - Ciśnienie barometryczne, przy którym celownik został wyzerowany - Pression barométrique de référence pour le zérotage des optiques - Pressione barometrica a cui è stato azzerato il mirino - 武器参考多少大气压力来进行归零. - 武器參考多少大氣壓力來進行歸零. - - - Reference humidity - 湿度の参照 - 습도 기준 - Referencyjna wilgotność - Humidité de référence - Umidità di riferimento - 参考湿度 - 參考濕度 - - - Humidity at which the scope was zeroed - スコープがゼロインされる湿度 - 조준경 영점조준시 습도 - Wilgotność powietrza, przy której celownik został wyzerowany - Taux d'humidité de référence pour le zérotage des optiques - Umidità a cui è stato azzerato il mirino - 武器参考多少湿度来进行归零. - 武器參考多少濕度來進行歸零. - - - Deduce pressure from altitude - 高度により圧が減少 - 고도에 맞춰 기압 설정 - Ciśnienie określone na podstawie wysokości - Pression selon l'altitude - Ricava la pressione dall'altitudine - 高度影响大气压力 - 高度影響大氣壓力 - - - Deduce the barometric pressure from the terrain altitude - 標高により気圧が減少されます - 주변 고도에 맞춰 기압을 설정합니다 - Określ ciśnienie barometryczne na podstawie wysokości terenu - Détermine la pression barométrique selon l'altitude du terrain - Ricava la pressione barometrica dall'altitudine del terreno - 在不同高度上会有不同的大气压力 - 在不同高度上會有不同的大氣壓力 - Minor adjustment up Zerowanie powoli w górę @@ -202,10 +12,6 @@ Enyhe állítás fel Pequeno ajuste para cima Korekce nahoru (mírně) - 僅かに上へ調節 - 위로 조절 - 向上微调 - 向上微調 Minor adjustment down @@ -218,10 +24,6 @@ Enyhe állítás le Pequeno ajuste para baixo Korekce dolů (mírně) - 僅かに下へ調節 - 아래로 조절 - 向下微调 - 向下微調 Minor adjustment right @@ -234,10 +36,6 @@ Enyhe állítás jobbra Pequeno ajuste para direita Korekce doprava (mírně) - 僅かに右へ調節 - 오론쪽으로 조절 - 向右微调 - 向右微調 Minor adjustment left @@ -250,10 +48,6 @@ Enyhe állítás balra Pequeno ajuste para esquerda Korekce doleva (mírně) - 僅かに左へ調節 - 왼쪽으로 조절 - 向左微调 - 向左微調 Major adjustment up @@ -266,10 +60,6 @@ Nagy állítás fel Ajuste grande para cima Korekce nahoru - 大きく上へ調節 - 크게 위로 조절 - 向上调整 - 向上調整 Major adjustment down @@ -282,10 +72,6 @@ Nagy állítás le Ajuste grande para baixo Korekce dolů - 大きく下へ調節 - 크게 아래로 조절 - 向下调整 - 向下調整 Major adjustment right @@ -298,10 +84,6 @@ Nagy állítás jobbra Ajuste grande para direita Korekce doprava - 大きく右へ調節 - 크게 오른쪽으로 조절 - 向右调整 - 向右調整 Major adjustment left @@ -314,10 +96,6 @@ Nagy állítás balra Ajuste grande para esquerda Korekce doleva - 大きく左へ調節 - 크게 왼쪽으로 조절 - 向左调整 - 向左調整 Set zero adjustment @@ -330,20 +108,6 @@ Állítások nullázása Zerar ajuste Vynulovat korekci - ゼロインを調節 - 영점 초기화 - 设定归零 - 設定歸零 - - - This module adds windage and elevation adjustment turrets on high power rifle scopes. - モジュールは高倍率ライフル スコープにおいて横風と仰角の調節ができます。 - 이 모듈은 고성능 조준경에 조준 나사를 이용한 편차 및 고도 조절 기능을 더해줍니다. - Ten moduł włącza pokrętła kalibracyjne poprawki na wiatr oraz poprawki wysokości dla celowników o dużym powiększeniu. - Ce module ajoute les tambours de correction de la hausse et de dérive sur les optiques de visée à fort grossissement. - Questo modulo aggiunge lo spostamento dell'aria e la regolazione dell'elevazione delle torrette in mirini a lunga gittata - 此模块可为高倍率瞄准镜新增归零风偏, 距离用的调整纽. - 此模塊可為高倍率瞄準鏡新增歸零風偏, 距離用的調整紐. - + \ No newline at end of file diff --git a/addons/sitting/$PBOPREFIX$ b/addons/sitting/$PBOPREFIX$ new file mode 100644 index 0000000000..419bf892be --- /dev/null +++ b/addons/sitting/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\sitting \ No newline at end of file diff --git a/addons/sitting/ACE_Settings.hpp b/addons/sitting/ACE_Settings.hpp new file mode 100644 index 0000000000..49d3e27929 --- /dev/null +++ b/addons/sitting/ACE_Settings.hpp @@ -0,0 +1,7 @@ +class ACE_Settings { + class GVAR(enable) { + value = 0; + typeName = "BOOL"; + displayName = CSTRING(Enable); + }; +}; diff --git a/addons/sitting/CfgEventHandlers.hpp b/addons/sitting/CfgEventHandlers.hpp new file mode 100644 index 0000000000..0d7f0a3f64 --- /dev/null +++ b/addons/sitting/CfgEventHandlers.hpp @@ -0,0 +1,35 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit)); + }; +}; + +class Extended_Killed_EventHandlers { + class CAManBase { + class ADDON { + killed = QUOTE(_this call DFUNC(handleInterrupt)); + }; + }; +}; + +// Need initPost or there are problems with setVariable +class Extended_InitPost_EventHandlers { + class ThingX { + class ADDON { + init = QUOTE(_this call DFUNC(addSitActions)); + }; + }; +}; diff --git a/addons/sitting/CfgMoves.hpp b/addons/sitting/CfgMoves.hpp new file mode 100644 index 0000000000..f203203ed0 --- /dev/null +++ b/addons/sitting/CfgMoves.hpp @@ -0,0 +1,108 @@ +// Force free-look, prevent body rotating and leaning +#define MACRO_ANIMATION \ + head = "headDefault"; \ + aimingBody = "aimingNo"; \ + forceAim = 1; \ + static = 1; + +class CfgMovesBasic; +class CfgMovesMaleSdr: CfgMovesBasic { + class States { + class HubSittingChairA_idle1; + class GVAR(HubSittingChairA_idle1): HubSittingChairA_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairA_idle2; + class GVAR(HubSittingChairA_idle2): HubSittingChairA_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairA_idle3; + class GVAR(HubSittingChairA_idle3): HubSittingChairA_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairA_move1; + class GVAR(HubSittingChairA_move1): HubSittingChairA_move1 { + MACRO_ANIMATION + }; + class HubSittingChairB_idle1; + class GVAR(HubSittingChairB_idle1): HubSittingChairB_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairB_idle2; + class GVAR(HubSittingChairB_idle2): HubSittingChairB_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairB_idle3; + class GVAR(HubSittingChairB_idle3): HubSittingChairB_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairB_move1; + class GVAR(HubSittingChairB_move1): HubSittingChairB_move1 { + MACRO_ANIMATION + }; + class HubSittingChairC_idle1; + class GVAR(HubSittingChairC_idle1): HubSittingChairC_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairC_idle2; + class GVAR(HubSittingChairC_idle2): HubSittingChairC_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairC_idle3; + class GVAR(HubSittingChairC_idle3): HubSittingChairC_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairC_move1; + class GVAR(HubSittingChairC_move1): HubSittingChairC_move1 { + MACRO_ANIMATION + }; + class HubSittingChairUA_idle1; + class GVAR(HubSittingChairUA_idle1): HubSittingChairUA_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairUA_idle2; + class GVAR(HubSittingChairUA_idle2): HubSittingChairUA_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairUA_idle3; + class GVAR(HubSittingChairUA_idle3): HubSittingChairUA_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairUA_move1; + class GVAR(HubSittingChairUA_move1): HubSittingChairUA_move1 { + MACRO_ANIMATION + }; + class HubSittingChairUB_idle1; + class GVAR(HubSittingChairUB_idle1): HubSittingChairUB_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairUB_idle2; + class GVAR(HubSittingChairUB_idle2): HubSittingChairUB_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairUB_idle3; + class GVAR(HubSittingChairUB_idle3): HubSittingChairUB_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairUB_move1; + class GVAR(HubSittingChairUB_move1): HubSittingChairUB_move1 { + MACRO_ANIMATION + }; + class HubSittingChairUC_idle1; + class GVAR(HubSittingChairUC_idle1): HubSittingChairUC_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairUC_idle2; + class GVAR(HubSittingChairUC_idle2): HubSittingChairUC_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairUC_idle3; + class GVAR(HubSittingChairUC_idle3): HubSittingChairUC_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairUC_move1; + class GVAR(HubSittingChairUC_move1): HubSittingChairUC_move1 { + MACRO_ANIMATION + }; + }; +}; diff --git a/addons/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp new file mode 100644 index 0000000000..95deed0dd6 --- /dev/null +++ b/addons/sitting/CfgVehicles.hpp @@ -0,0 +1,123 @@ + +class CBA_Extended_EventHandlers; + +class CfgVehicles { + class ACE_Module; + class ACE_ModuleSitting: ACE_Module { + author = ECSTRING(common,ACETeam); + category = "ACE"; + displayName = CSTRING(ModuleDisplayName); + function = QFUNC(moduleInit); + scope = 1; + isGlobal = 1; + isSingular = 1; + icon = QPATHTOF(UI\Icon_Module_Sitting_ca.paa); + class Arguments { + class enable { + displayName = CSTRING(Enable); + description = CSTRING(Enable); + typeName = "BOOL"; + defaultValue = 1; + }; + }; + class ModuleDescription { + description = CSTRING(ModuleDescription); + }; + }; + + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class GVAR(Stand) { + displayName = CSTRING(Stand); + condition = QUOTE(_player call FUNC(canStand)); + exceptions[] = {"isNotSitting"}; + statement = QUOTE(_player call FUNC(stand)); + priority = 0; + icon = QPATHTOF(UI\stand_ca.paa); + }; + }; + }; + + // Folding Chair + class ThingX; + class Land_CampingChair_V1_F: ThingX { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition)[] = {0, -0.1, -0.45}; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; + }; + // Camping Chair + class Land_CampingChair_V2_F: ThingX { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition)[] = {0, -0.1, -0.45}; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; + }; + + // Chair (Plastic) + class Furniture_base_F: ThingX {}; + class Land_ChairPlastic_F: Furniture_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + + GVAR(canSit) = 1; + GVAR(sitDirection) = 90; + GVAR(sitPosition)[] = {0, 0, -0.5}; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 270; + }; + // Chair (Wooden) + class Land_ChairWood_F: Furniture_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition)[] = {0, -0.05, 0}; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; + }; + // Office Chair + class Land_OfficeChair_01_F: Furniture_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition)[] = {0, 0, -0.6}; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; + }; + // Rattan Chair + class Land_RattanChair_01_F: Furniture_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition)[] = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point) + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; + }; +}; diff --git a/addons/nlaw/README.md b/addons/sitting/README.md similarity index 54% rename from addons/nlaw/README.md rename to addons/sitting/README.md index dd62b36014..5237c7145e 100644 --- a/addons/nlaw/README.md +++ b/addons/sitting/README.md @@ -1,10 +1,11 @@ -ace_nlaw +ace_sitting =============== -Adds Predicted Line Of Sight guidance to the NLAW. +The Sitting module introduces ability to sit on chairs. + ## Maintainers The people responsible for merging changes to this component or answering potential questions. -- [PabstMirror](https://github.com/PabstMirror) +- [Jonpas](https://github.com/jonpas) diff --git a/addons/sitting/UI/Icon_Module_Sitting_ca.paa b/addons/sitting/UI/Icon_Module_Sitting_ca.paa new file mode 100644 index 0000000000..1d4bbccb70 Binary files /dev/null and b/addons/sitting/UI/Icon_Module_Sitting_ca.paa differ diff --git a/addons/sitting/UI/sit_ca.paa b/addons/sitting/UI/sit_ca.paa new file mode 100644 index 0000000000..1191c3b1e0 Binary files /dev/null and b/addons/sitting/UI/sit_ca.paa differ diff --git a/addons/sitting/UI/stand_ca.paa b/addons/sitting/UI/stand_ca.paa new file mode 100644 index 0000000000..08c136f668 Binary files /dev/null and b/addons/sitting/UI/stand_ca.paa differ diff --git a/addons/sitting/XEH_PREP.hpp b/addons/sitting/XEH_PREP.hpp new file mode 100644 index 0000000000..cb7f51cfd5 --- /dev/null +++ b/addons/sitting/XEH_PREP.hpp @@ -0,0 +1,9 @@ + +PREP(addSitActions); +PREP(canSit); +PREP(canStand); +PREP(getRandomAnimation); +PREP(handleInterrupt); +PREP(moduleInit); +PREP(sit); +PREP(stand); diff --git a/addons/sitting/XEH_clientInit.sqf b/addons/sitting/XEH_clientInit.sqf new file mode 100644 index 0000000000..3b6b0ba6c8 --- /dev/null +++ b/addons/sitting/XEH_clientInit.sqf @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +// Exit on Headless +if (!hasInterface) exitWith {}; + +["ace_settingsInitialized", { + if ([[QUOTE(ADDON), QGVAR(enable)], ["acex_sitting", "acex_sitting_enable"], "3.8.0"] call EFUNC(common,deprecateComponent)) exitwith {}; + //If not enabled, then do not add CanInteractWith Condition or event handlers: + if (!GVAR(enable)) exitWith {}; + + // Add interaction menu exception + ["isNotSitting", {isNil {(_this select 0) getVariable QGVAR(isSitting)}}] call EFUNC(common,addCanInteractWithCondition); + + // Handle interruptions + ["ace_unconscious", {_this call DFUNC(handleInterrupt)}] call CBA_fnc_addEventHandler; + [QEGVAR(captives,setHandcuffed), {_this call DFUNC(handleInterrupt)}] call CBA_fnc_addEventHandler; +}] call CBA_fnc_addEventHandler; diff --git a/optionals/nouniformrestrictions/XEH_preInit.sqf b/addons/sitting/XEH_preInit.sqf similarity index 67% rename from optionals/nouniformrestrictions/XEH_preInit.sqf rename to addons/sitting/XEH_preInit.sqf index b47cf6628d..ea21067b30 100644 --- a/optionals/nouniformrestrictions/XEH_preInit.sqf +++ b/addons/sitting/XEH_preInit.sqf @@ -2,8 +2,8 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; + +GVAR(initializedClasses) = []; ADDON = true; diff --git a/addons/medical_blood/XEH_preStart.sqf b/addons/sitting/XEH_preStart.sqf similarity index 100% rename from addons/medical_blood/XEH_preStart.sqf rename to addons/sitting/XEH_preStart.sqf diff --git a/addons/medical_blood/config.cpp b/addons/sitting/config.cpp similarity index 63% rename from addons/medical_blood/config.cpp rename to addons/sitting/config.cpp index 65b2a69809..785cb75aeb 100644 --- a/addons/medical_blood/config.cpp +++ b/addons/sitting/config.cpp @@ -6,9 +6,9 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_main"}; + requiredAddons[] = {"ace_interaction"}; author = ECSTRING(common,ACETeam); - authors[] = {"Glowbal","Sickboy","commy2"}; + authors[] = {"Jonpas"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; @@ -16,3 +16,9 @@ class CfgPatches { #include "ACE_Settings.hpp" #include "CfgEventHandlers.hpp" +#include "CfgMoves.hpp" +#include "CfgVehicles.hpp" + +class ACE_newEvents { + SetHandcuffed = QEGVAR(captives,setHandcuffed); +}; diff --git a/addons/sitting/functions/fnc_addSitActions.sqf b/addons/sitting/functions/fnc_addSitActions.sqf new file mode 100644 index 0000000000..4c449bac52 --- /dev/null +++ b/addons/sitting/functions/fnc_addSitActions.sqf @@ -0,0 +1,51 @@ +/* + * Author: Jonpas + * Adds sit actions. + * + * Arguments: + * 0: Seat + * + * Return Value: + * None + * + * Example: + * [seat] call ace_sitting_fnc_addSitActions + * + * Public: No + */ +#include "script_component.hpp" + +params ["_seat"]; + +private _type = typeOf _seat; + +// Exit if the object is not specified as a seat +if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canSit)) != 1) exitWith {}; + +// only run this after the settings are initialized +if !(EGVAR(common,settingsInitFinished)) exitWith { + EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addSitActions), _this]; +}; + +//If not enabled, don't add actions: +if (!GVAR(enable)) exitWith {}; + +// Exit if class already initialized +if (_type in GVAR(initializedClasses)) exitWith {}; + +GVAR(initializedClasses) pushBack _type; + +TRACE_1("Adding Sit Action",_type); + +private _sitAction = [ + QGVAR(Sit), + localize LSTRING(Sit), + QPATHTOF(UI\sit_ca.paa), + {_this call FUNC(sit)}, + {_this call FUNC(canSit)}, + {}, + [], + [0, 0, 0], + 1.5 +] call EFUNC(interact_menu,createAction); +[_type, 0, ["ACE_MainActions"], _sitAction] call EFUNC(interact_menu,addActionToClass); diff --git a/addons/sitting/functions/fnc_canSit.sqf b/addons/sitting/functions/fnc_canSit.sqf new file mode 100644 index 0000000000..0ea8f06bc8 --- /dev/null +++ b/addons/sitting/functions/fnc_canSit.sqf @@ -0,0 +1,23 @@ +/* + * Author: Jonpas + * Check if the player can sit down. + * + * Arguments: + * 0: Seat + * + * Return Value: + * Can Sit Down + * + * Example: + * [seat] call ace_sitting_fnc_canSit + * + * Public: No + */ +#include "script_component.hpp" + +params ["_seat"]; + +// Sitting enabled, is seat object, not occupied and standing up (or not on a big slope) +GVAR(enable) && +{!(_seat call EFUNC(common,owned))} && +{round (vectorUp _seat select 0) == 0 && {round (vectorUp _seat select 1) == 0} && {round (vectorUp _seat select 2) == 1}} diff --git a/addons/sitting/functions/fnc_canStand.sqf b/addons/sitting/functions/fnc_canStand.sqf new file mode 100644 index 0000000000..a051e1784e --- /dev/null +++ b/addons/sitting/functions/fnc_canStand.sqf @@ -0,0 +1,21 @@ +/* + * Author: Jonpas + * Check if the player can stand up (is in sitting position). + * + * Arguments: + * Player + * + * Return Value: + * Can Stand Up + * + * Example: + * player call ace_sitting_fnc_canStand; + * + * Public: No + */ +#include "script_component.hpp" + +params ["_player"]; + +// Sitting +!isNil {_player getVariable QGVAR(isSitting)} diff --git a/addons/sitting/functions/fnc_getRandomAnimation.sqf b/addons/sitting/functions/fnc_getRandomAnimation.sqf new file mode 100644 index 0000000000..8dfe4b8cb3 --- /dev/null +++ b/addons/sitting/functions/fnc_getRandomAnimation.sqf @@ -0,0 +1,44 @@ +/* + * Author: Jonpas + * Gets a random animations from the list. + * + * Arguments: + * None + * + * Return Value: + * Random Animation + * + * Example: + * _animation = call ace_sitting_fnc_getRandomAnimation + * + * Public: No + */ +#include "script_component.hpp" + +// Select random animation from Animations Pool +selectRandom [ + QGVAR(HubSittingChairA_idle1), + QGVAR(HubSittingChairA_idle2), + QGVAR(HubSittingChairA_idle3), + QGVAR(HubSittingChairA_move1), + QGVAR(HubSittingChairB_idle1), + QGVAR(HubSittingChairB_idle2), + QGVAR(HubSittingChairB_idle3), + QGVAR(HubSittingChairB_move1), + QGVAR(HubSittingChairC_idle1), + QGVAR(HubSittingChairC_idle2), + QGVAR(HubSittingChairC_idle3), + QGVAR(HubSittingChairC_move1), + QGVAR(HubSittingChairUA_idle1), + QGVAR(HubSittingChairUA_idle2), + QGVAR(HubSittingChairUA_idle3), + QGVAR(HubSittingChairUA_move1), + QGVAR(HubSittingChairUB_idle1), + QGVAR(HubSittingChairUB_idle2), + QGVAR(HubSittingChairUB_idle3), + QGVAR(HubSittingChairUB_move1), + QGVAR(HubSittingChairUC_idle1), + QGVAR(HubSittingChairUC_idle2), + QGVAR(HubSittingChairUC_idle3), + QGVAR(HubSittingChairUC_move1) +] diff --git a/addons/sitting/functions/fnc_handleInterrupt.sqf b/addons/sitting/functions/fnc_handleInterrupt.sqf new file mode 100644 index 0000000000..c7e0a545ff --- /dev/null +++ b/addons/sitting/functions/fnc_handleInterrupt.sqf @@ -0,0 +1,22 @@ +/* + * Author: Jonpas + * Handles interruptions of sitting, like killed or unconsciousness. + * + * Arguments: + * 0: Player + * + * Return Value: + * None + * + * Example: + * player call ace_sitting_fnc_handleInterrupt + * + * Public: No + */ +#include "script_component.hpp" + +params ["_player"]; + +if (!isNil {_player getVariable QGVAR(isSitting)}) then { + _player call FUNC(stand); +}; diff --git a/addons/sitting/functions/fnc_moduleInit.sqf b/addons/sitting/functions/fnc_moduleInit.sqf new file mode 100644 index 0000000000..c21d92afbb --- /dev/null +++ b/addons/sitting/functions/fnc_moduleInit.sqf @@ -0,0 +1,25 @@ +/* + * Author: Jonpas + * Initializes the Sitting module. + * + * Arguments: + * 0: The module logic + * 1: Units + * 2: Activated + * + * Return Value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +if !(isServer) exitWith {}; + +params ["_logic", "_units", "_activated"]; + +if (!_activated) exitWith {}; + +[_logic, QGVAR(enable), "enable"] call EFUNC(common,readSettingFromModule); + +ACE_LOGINFO("Sitting Module Initialized."); diff --git a/addons/sitting/functions/fnc_sit.sqf b/addons/sitting/functions/fnc_sit.sqf new file mode 100644 index 0000000000..c2ca725d5d --- /dev/null +++ b/addons/sitting/functions/fnc_sit.sqf @@ -0,0 +1,72 @@ +/* + * Author: Jonpas + * Sits down the player. + * + * Arguments: + * 0: Seat + * 1: Player + * + * Return Value: + * None + * + * Example: + * [seat, player] call ace_sitting_fnc_sit; + * + * Public: No + */ +#include "script_component.hpp" + +params ["_seat", "_player"]; + +// Overwrite weird position, because Arma decides to set it differently based on current animation/stance... +_player switchMove "amovpknlmstpsraswrfldnon"; + +// Add scroll-wheel action to release object +private _actionID = _player addAction [ + format ["%1", localize LSTRING(Stand)], + QUOTE((_this select 0) call FUNC(stand)), + nil, + 20, + false, + true, + "GetOut", + QUOTE(_this call FUNC(canStand)) +]; + +// Read config +private _configFile = configFile >> "CfgVehicles" >> typeOf _seat; +private _sitDirection = (getDir _seat) + getNumber (_configFile >> QGVAR(sitDirection)); +private _sitPosition = getArray (_configFile >> QGVAR(sitPosition)); + +// Get random animation and perform it (before moving player to ensure correct placement) +[_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation); // Correctly places when using non-transitional animations +[_player, "", 1] call EFUNC(common,doAnimation); // Correctly applies animation's config values (such as disallow throwing of grenades, intercept keybinds... etc). + +// Set direction and position +_player setDir _sitDirection; +//modelToWorld returns AGL +_player setPosASL (AGLtoASL (_seat modelToWorld _sitPosition)); + +// Set variables, save seat object on player +_player setVariable [QGVAR(isSitting), [_seat, _actionID]]; +[_player, _seat] call EFUNC(common,claim); // To prevent multiple people sitting on one seat + + +// Add automatical stand PFH in case of interruptions +private _seatPosOrig = getPosASL _seat; +[{ + params ["_args", "_pfhId"]; + _args params ["_player", "_seat", "_seatPosOrig"]; + + // Remove PFH if not sitting any more + if (isNil {_player getVariable QGVAR(isSitting)}) exitWith { + [_pfhId] call CBA_fnc_removePerFrameHandler; + TRACE_1("Remove PFH",_player getVariable [ARR_2(QGVAR(isSitting), false)]); + }; + + // Stand up if chair gets deleted or moved + if (isNull _seat || !((getPosASL _seat) isEqualTo _seatPosOrig)) exitWith { + _player call FUNC(stand); + TRACE_2("Chair moved",getPosASL _seat,_seatPosOrig); + }; +}, 0, [_player, _seat, _seatPosOrig]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/sitting/functions/fnc_stand.sqf b/addons/sitting/functions/fnc_stand.sqf new file mode 100644 index 0000000000..7c6a93c662 --- /dev/null +++ b/addons/sitting/functions/fnc_stand.sqf @@ -0,0 +1,38 @@ +/* + * Author: Jonpas + * Stands up the player. + * + * Arguments: + * Player + * + * Return Value: + * None + * + * Example: + * player call ace_sitting_fnc_stand; + * + * Public: No + */ +#include "script_component.hpp" + +params ["_player"]; + +(_player getVariable QGVAR(isSitting)) params ["_seat", "_actionID"]; + +// Remove scroll-wheel action +_player removeAction _actionID; + +// Restore animation +private _animation = switch (currentWeapon _player) do { + case "": {"amovpercmstpsnonwnondnon"}; + case (primaryWeapon _player): {"amovpercmstpslowwrfldnon"}; + case (handgunWeapon _player): {"amovpercmstpslowwpstdnon"}; + default {"amovpercmstpsnonwnondnon"}; +}; + +[_player, _animation, 2] call EFUNC(common,doAnimation); + +// Set variables to nil +_player setVariable [QGVAR(isSitting), nil]; +if (isNull _seat) exitWith {}; +[objNull, _seat] call EFUNC(common,claim); diff --git a/addons/sitting/functions/script_component.hpp b/addons/sitting/functions/script_component.hpp new file mode 100644 index 0000000000..1360c56284 --- /dev/null +++ b/addons/sitting/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\sitting\script_component.hpp" \ No newline at end of file diff --git a/addons/nlaw/script_component.hpp b/addons/sitting/script_component.hpp similarity index 53% rename from addons/nlaw/script_component.hpp rename to addons/sitting/script_component.hpp index 2cabaf7e47..7324da1875 100644 --- a/addons/nlaw/script_component.hpp +++ b/addons/sitting/script_component.hpp @@ -1,18 +1,18 @@ -#define COMPONENT nlaw -#define COMPONENT_BEAUTIFIED NLAW +#define COMPONENT sitting +#define COMPONENT_BEAUTIFIED Sitting #include "\z\ace\addons\main\script_mod.hpp" -// #define DRAW_NLAW_INFO // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS -#ifdef DEBUG_ENABLED_NLAW +#ifdef DEBUG_ENABLED_SITTING #define DEBUG_MODE_FULL #endif -#ifdef DEBUG_SETTINGS_NLAW - #define DEBUG_SETTINGS DEBUG_SETTINGS_NLAW +#ifdef DEBUG_SETTINGS_SITTING + #define DEBUG_SETTINGS DEBUG_SETTINGS_SITTING #endif #include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/sitting/stringtable.xml b/addons/sitting/stringtable.xml new file mode 100644 index 0000000000..f7c7b84b93 --- /dev/null +++ b/addons/sitting/stringtable.xml @@ -0,0 +1,65 @@ + + + + + Sit Down + Hinsetzen + Usiądź + Sentar + Sednout si + Sentarse + S'assoir + Leülés + Сесть + Siediti + + + Stand Up + Aufstehen + Wstań + Levantar + Vstát + Levantarse + Se lever + Felállás + Встать + Alzati + + + Enable Sitting + Sitzen ermöglichen + Habilitar opção para sentar + Aktywuj siadanie + Povolit sezení + Activar asiento + Permettre de s'assoir + Ülés engedélyezése + Разрешить сидение + Abilita seduta + + + Sitting + Hinsetzen + Sentado + Siadanie + Sezení + Sentarse + S'assoir + Ülés + Сидение + Sedersi + + + This module allows you to disable the ability to sit on chairs. + Dieses Modul eröffnet die Möglichkeit, sich auf Stühlen hinzusetzen. + Este módulo permite que você desabilite a capacidade de sentar-se em cadeiras e banheiros. + Moduł ten pozwala na włączenie lub wyłączenie możliwości siadania na krzesłach i toaletach. + Tento modul dovoluje zakázat možnost sedět na židlých a toaletách. + Este módulo te permite desactivar la capacidad de sentarse en sillas. + Ce module contrôle la capacité de s'assoir sur des chaises ou sur des toilettes + Ez a modul lehetővé teszi a székekre és toalettekre való leülés letiltását. + Этот модуль позволяет вам запретить возможность садиться на стулья и туалеты. + Questo modulo ti permette di disabilitare la possibilità di sederti sulle sedie. + + + \ No newline at end of file diff --git a/addons/slideshow/CfgVehicles.hpp b/addons/slideshow/CfgVehicles.hpp index 6c11ba866c..af3108eb59 100644 --- a/addons/slideshow/CfgVehicles.hpp +++ b/addons/slideshow/CfgVehicles.hpp @@ -35,12 +35,6 @@ class CfgVehicles { typeName = "STRING"; defaultValue = ""; }; - class SetName { - displayName = CSTRING(SetName_DisplayName); - description = CSTRING(SetName_Description); - typeName = "STRING"; - defaultValue = ""; - }; class Duration { displayName = CSTRING(Duration_DisplayName); description = CSTRING(Duration_Description); diff --git a/addons/slideshow/XEH_preInit.sqf b/addons/slideshow/XEH_preInit.sqf index fdd70d447b..8943a367f8 100644 --- a/addons/slideshow/XEH_preInit.sqf +++ b/addons/slideshow/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(slideshows) = 0; diff --git a/addons/slideshow/functions/fnc_createSlideshow.sqf b/addons/slideshow/functions/fnc_createSlideshow.sqf index 5eefbd39bc..42d1498b88 100644 --- a/addons/slideshow/functions/fnc_createSlideshow.sqf +++ b/addons/slideshow/functions/fnc_createSlideshow.sqf @@ -8,33 +8,32 @@ * 2: Image Paths * 3: Action Names * 4: Slide Duration (0 disables automatic transitions) - * 5: Set Name (default: localized "Slides") * * Return Value: * None * * Example: - * [[object1, object2, object3], [controller1], ["images\image1.paa", "images\image2.paa"], ["Action1", "Action2"], 5, "My Slides"] call ace_slideshow_fnc_createSlideshow + * [[object1, object2, object3], [controller1], ["images\image1.paa", "images\image2.paa"], ["Action1", "Action2"], 5] call ace_slideshow_fnc_createSlideshow * * Public: Yes */ #include "script_component.hpp" +private ["_currentSlideshow", "_slidesAction", "_varString"]; params [ ["_objects", [], [[]] ], ["_controllers", [], [[]] ], ["_images", [], [[]] ], ["_names", [], [[]] ], - ["_duration", 0, [0]], - ["_setName", localize LSTRING(Interaction), [""]] + ["_duration", 0, [0]] ]; // Verify data if (_objects isEqualTo []) exitWith { - ERROR("Slideshow Objects field must NOT be empty!"); + ACE_LOGERROR("Slideshow Objects field must NOT be empty!"); }; if (count _images != count _names || {_images isEqualTo []} || {_names isEqualTo []}) exitWith { - ERROR("Slideshow Images or Names fields must NOT be empty and must have equal number of items!"); + ACE_LOGERROR("Slideshow Images or Names fields must NOT be empty and must have equal number of items!"); }; // If no controllers use objects as controllers @@ -42,7 +41,7 @@ if (_controllers isEqualTo []) then { _controllers = _objects; }; -TRACE_5("Information",_objects,_controllers,_images,_names,_setName); +TRACE_4("Information",_objects,_controllers,_images,_names); if (isServer) then { // Default images on whiteboards (first image) @@ -54,33 +53,19 @@ if (isServer) then { GVAR(slideshows) = GVAR(slideshows) + 1; }; -private _currentSlideshow = GVAR(slideshows); // Local variable in case GVAR gets changed during execution of below code +_currentSlideshow = GVAR(slideshows); // Local variable in case GVAR gets changed during execution of below code // If interaction menu module is not present, set default duration value if !(["ace_interact_menu"] call EFUNC(common,isModLoaded)) then { _duration = NOINTERACTMENU_DURATION; - INFO_1("Interaction Menu module not present, defaulting duration value to %1",_duration); + ACE_LOGINFO_1("Interaction Menu module not present, defaulting duration value to %1",_duration); }; // Add interactions if automatic transitions are disabled, else setup automatic transitions if (_duration == 0) then { { - if (_setName == "") then { - _setName = localize LSTRING(Interaction); - }; - // Add Slides sub-action and populate with images - private _slidesAction = [ - format [QGVAR(slideshow%1), _currentSlideshow], - _setName, - "", - {}, - {true}, - {(_this select 2) call FUNC(addSlideActions)}, - [_objects, _images, _names, _x, _currentSlideshow], - [0, 0, 0], - 2 - ] call EFUNC(interact_menu,createAction); + _slidesAction = [QGVAR(Slides), localize LSTRING(Interaction), "", {}, {true}, {(_this select 2) call FUNC(addSlideActions)}, [_objects, _images, _names, _x, _currentSlideshow], [0, 0, 0], 2] call EFUNC(interact_menu,createAction); [_x, 0, ["ACE_MainActions"], _slidesAction] call EFUNC(interact_menu,addActionToObject); nil } count _controllers; @@ -88,7 +73,7 @@ if (_duration == 0) then { if !(isServer) exitWith {}; // Formatted GVAR string (multiple modules support) - private _varString = format [QGVAR(slideshow%1), _currentSlideshow]; + _varString = format [QGVAR(slideshow%1), _currentSlideshow]; TRACE_1("Current Slide",_varString); // Set formatted GVAR to first slide diff --git a/addons/slideshow/functions/fnc_moduleInit.sqf b/addons/slideshow/functions/fnc_moduleInit.sqf index caef4cb2d8..9c99d15a11 100644 --- a/addons/slideshow/functions/fnc_moduleInit.sqf +++ b/addons/slideshow/functions/fnc_moduleInit.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ace_slideshow_fnc_moduleInit - * * Public: No */ #include "script_component.hpp" @@ -20,18 +17,18 @@ // Exit on Headless Client if (!hasInterface && !isDedicated) exitWith {}; +private ["_objects", "_controllers", "_images", "_names", "_duration"]; params [["_logic", objNull, [objNull]], "_units", "_activated"]; if !(_activated) exitWith {}; if (isNull _logic) exitWith {}; // Extract variables from logic -private _objects = [_logic getVariable ["Objects", ""], true, true] call EFUNC(common,parseList); -private _controllers = [_logic getVariable ["Controllers", ""], true, true] call EFUNC(common,parseList); -private _images = [_logic getVariable ["Images", ""], false, false] call EFUNC(common,parseList); -private _names = [_logic getVariable ["Names", ""], false, false] call EFUNC(common,parseList); -private _setName = _logic getVariable ["SetName", ""]; -private _duration = _logic getVariable ["Duration", 0]; +_objects = [_logic getVariable ["Objects", ""], true, true] call EFUNC(common,parseList); +_controllers = [_logic getVariable ["Controllers", ""], true, true] call EFUNC(common,parseList); +_images = [_logic getVariable ["Images", ""], false, false] call EFUNC(common,parseList); +_names = [_logic getVariable ["Names", ""], false, false] call EFUNC(common,parseList); +_duration = _logic getVariable ["Duration", 0]; // Objects synced to the module { @@ -40,6 +37,6 @@ private _duration = _logic getVariable ["Duration", 0]; } count (synchronizedObjects _logic); // Prepare with actions -[_objects, _controllers, _images, _names, _duration, _setName] call FUNC(createSlideshow); +[_objects, _controllers, _images, _names, _duration] call FUNC(createSlideshow); -INFO_1("Slideshow Module Initialized on %1 Objects", count _objects); +ACE_LOGINFO_1("Slideshow Module Initialized on %1 Objects", count _objects); diff --git a/addons/slideshow/script_component.hpp b/addons/slideshow/script_component.hpp index a58ad27b46..eb8b8746ee 100644 --- a/addons/slideshow/script_component.hpp +++ b/addons/slideshow/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_SLIDESHOW diff --git a/addons/slideshow/stringtable.xml b/addons/slideshow/stringtable.xml index f563e62e53..4c45399ba6 100644 --- a/addons/slideshow/stringtable.xml +++ b/addons/slideshow/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Prezentace Presentación de diapositivas Mostra Diapositive - スライドショー - 슬라이드 쇼 - 幻燈片 - 幻灯片 This module allows you to set up slide-shows on different objects. One module per image list. Only objects with hiddenSelection 0 are supported. @@ -28,10 +24,6 @@ Este módulo permite configurar una presentación de diapositivas en diferentes objetos. Un módulo por lista de imágenes. Sólo son soportados objetos con hiddenSelection 0. Tento modul umožňuje nastavit prezentaci na různé objekty. Jeden modul na seznam s obrázky. Podporované jsou pouze objekty s hiddenSelection 0. Questo modulo ti permette di creare una presentazione con diapositive su vari oggetti. Un modulo per lista immagini. Solo oggetti con hiddenSelection 0 sono supportati. - さまざまなオブジェクトへスライドショーを設定することができます。1つのモジュールは各画像リストになっています。オブジェクトが hiddenSelection 0へ対応している必要があります。 - 이 모듈은 다른 물체에 대해 슬라이드 쇼를 놓을 수 있게 해줍니다. 한 모듈당 한 이미지목록만 가능합니다. 또한 물체가 hiddenSelection 0 를 지원해야만합니다. - 此模塊可讓圖片以幻燈片的形式顯示在物件上. 每個模塊都能設定一串幻燈片清單. 被設定的物件不能有隱藏部位(hiddenSelection). - 此模块可让图片以幻灯片的形式显示在物件上. 每个模块都能设定一串幻灯片清单. 被设定的物件不能有隐藏部位(hiddenSelection). Objects @@ -44,31 +36,23 @@ Objekty Objetos Oggetti - オブジェクト - 물체 - 物件 - 物件 - Object names (can also be synchronized objects) slide-show will be displayed on, separated by commas if multiple. - Objektnamen (können auch synchronisierte Objekte sein) auf denen die Diavorführung abgepielt wird. Werden ggf. durch Kommata getrennt. + Object names (can also be synchronized objects) slide-show will be displayed on, separated by commas if multiple. Reference INFO for object support. + Objektnamen (können auch synchronisierte Objekte sein) auf denen die Diavorführung abgepielt wird. Werden ggf. durch Kommata getrennt. Weiteres in der INFO für unterstützte Objekte. Nom d'objets (peuvent aussi être des objets synchronisés) sur lesquels les diaporamas vont être affichées, séparation par virgule si plusieurs. - Nazwy obiektów (mogą to też być zsynchronizowane obiekty) na których pokaz slajdów zostanie pokazany, oddzielony przecinkiem jeżeli jest ich więcej niż 1. - Objektum nevek (szinkronizált is lehet) amik a vetítésen megjelennek, több darab esetén vesszővel elválasztva. - Nomes dos objetos (também podem ser objetos sincronizados) em que a apresentação de slides será mostrada, separado por vírgulas se for mais de um. - Имена объектов (так же могут использоваться синхронизированные объекты), на которых будет отображаться слайд-шоу, разделенные запятыми. - Los nombres de objetos (también pueden ser objetos sincronizados) de diapositivas se mostrarán en, separados por comas. - Jména objektů (lze také použít synchronizované objekty) které se budou zobrazovat v prezentaci, oddělit čárkou pokud jich je více. - Nomi di oggetti (possono anche essere oggetti sincronizzati) che verranno usati per la presentazione di diapositive, separato da virgole se più di uno. - スライドショーを表示するオブジェクト名 (オブジェクトとの同期も可)。複数ある場合はコンマで区切れます - 슬라이드 쇼가 보여질 물체(동기화 되는 물체도 가능합니다) 명칭, 다수의 경우 쉼표로 구분합니다. - 物件名稱 (也可使用同步線來設定), 幻燈片將會顯示在該物件上, 如有多個物件, 請以逗號作區隔. - 物件名称 (也可使用同步线来设定), 幻灯片将会显示在该物件上, 如有多个物件, 请以逗号作区隔. + Nazwy obiektów (mogą to też być zsynchronizowane obiekty) na których pokaz slajdów zostanie pokazany, oddzielony przecinkiem jeżeli jest ich więcej niż 1. Sprawdź opis modułu aby dowiedzieć się jakie obiekty są wspierane przez moduł. + Objektum nevek (szinkronizált is lehet) amik a vetítésen megjelennek, több darab esetén vesszővel elválasztva. Objektumtámogatásért az INFO-t tekintsd meg. + Nomes dos objetos (também podem ser objetos sincronizados) em que a apresentação de slides será mostrada, separado por vírgulas se for mais de um. Referência INFO para suporte do objeto. + Имена объектов (так же могут использоваться синхронизированные объекты), на которых будет отображаться слайд-шоу, разделенные запятыми. Посмотрите описание, чтобы понять, какие объекты поддерживаются. + Los nombres de objetos (también pueden ser objetos sincronizados) de diapositivas se mostrarán en, separados por comas. Referencia INFO para el soporte del objeto. + Jména objektů (lze také použít synchronizované objekty) které se budou zobrazovat v prezentaci, oddělit čárkou pokud jich je více. Zkontrolujte POPIS abyste zjistili, zda je objekt podporován modulem. + Nomi di oggetti (possono anche essere oggetti sincronizzati) che verranno usati per la presentazione di diapositive, separato da virgole se più di uno. Fai riferimento ad INFO per gli oggetti supportati. Controllers Steuereinheit - Contrôleurs + Controleurs Kontroler Vezérlők Controles @@ -76,25 +60,17 @@ Controladores Kontrolor Controllori - コントローラ - 조종 장치 - 控制器 - 控制器 Controller object names, separated by commas if multiple. Objekte die als Steuereinheit fungieren. Werden ggf. durch Kommata getrennt. - Noms de contrôleur d'objets, séparation par virgule si plusieurs + Noms de controleur d'objets, séparation par virgule si plusieurs Nazwa obiektu - kontrolera, oddzielona przecinkami jeżeli jest ich więcej niż 1. Vezérlő objektum nevek, vesszővel elválasztva több darab esetén. Nome dos objetos de controle, separado por vírgula se mais de um. Имена объектов-контроллеров, разделенные запятыми. Nombres de objeto de controlador, separados por comas. Nomi di oggetti controllori, separati da virgole se multipli. - コントローラに指定するオブジェクト名を記入し、複数ある場合はコンマで区切れます。 - 조종 장치 물체 명칭, 다수의 경우 쉼표로 구분됩니다. - 指定是控制器的物件名稱, 如有多個物件, 請以逗號作區隔. - 指定是控制器的物件名称, 如有多个物件, 请以逗号作区隔. Images @@ -107,10 +83,6 @@ Obrázky Imágenes Immagini - 画像 - 사진 - 圖片 - 图片 List of images that will be used for the slide-show, separated by commas, with full path correctly formatted (eg. images\image.paa). @@ -123,10 +95,6 @@ Lista de imágenes que se utilizarán para la presentación de diapositivas, separadas por comas, con la ruta completa en formato correcto (ej. imágenes\image.paa). Seznam obrázků které budou použity v prezentaci, oddělené čárkami, s kompletní cestou ve správném formátu (např. image\image.paa). Lista di immagini che verranno usate durante la presentazione, separati da virgole, con il formato completo del percorso (es. images\image.paa) - 完全なパスでスライドショーに使う画像一覧を入力してください。コンマで区別できます。(例: images\image.paa) - 슬라이드 쇼에 쓰일 사진목록입니다, 쉼표로 구분됩니다, 경로설정을 정확히 하십시요. (예: 사진\사진.ppa) - 要做為幻燈片的圖片清單, 每個圖片請已逗號區隔, 並輸入完整路徑位址 (例如:images\image.paa). - 要做为幻灯片的图片清单, 每个图片请已逗号区隔, 并输入完整路径位址 (例如:images\image.paa). Interaction Names @@ -139,10 +107,6 @@ Nombres de interacción Nomi Interazioni Interaktionsnamen - インタラクション名 - 상호작용 명칭 - 互動鍵名稱 - 互动键名称 List of names that will be used for interaction entries, separated by commas, in order of images. @@ -154,32 +118,10 @@ Lista de nombres que se utilizarán para las entradas de interacción, separados por comas, en el orden de las imágenes. Lista di nomi che verranno usati per per le interazioni, separati da virgole, in ordine per immagini. Liste aller Namen, die für Interaktionseinträge genutzt werden. Mit Kommata getrennt, in Reihenfolge der Bilder. - 画像を操作できるインタラクション エントリ名の一覧を入力してください。コンマで区切り複数を指定できます。 - 상호작용 메세지에 쓰일 명칭입니다, 쉼표로 구분합니다, 이미지의 순서입니다. - 設定互動鍵切換圖片時的按鈕名稱, 多個按鈕請以逗號做區隔, 有多少圖片就輸入多少個按鈕, 以利切換圖片. - 设定互动键切换图片时的按钮名称, 多个按钮请以逗号做区隔, 有多少图片就输入多少个按钮, 以利切换图片. - - - Set Name - Ustaw nazwę - 名前設定 - Définir le nom - Imposta Nome - 設定名稱 - 设定名称 - - - Name that will be used for main interaction entry (to distinguish multiple slideshows). Default: "Slides" - Nazwa, która będzie użyta w głównym menu interakcji (w celu rozróżnienia różnych slajdów). Domyślnie: "Slides" - メイン インタラクション エントリで使われる名前を設定します。(複数のスライドショーを区別するため)。標準: "Slides" - Un nom qui sera utilisé pour interagir avec plusieurs diaporamas. Par défaut : "Slides" - Nome che sarà utilizzato per le principali interazioni (per distinguere le multiple diapositive). Predefinito: "Slides" - 設定該幻燈片的標題名稱 (用來區分多個不同標題的幻燈片.) 預設名稱: "幻燈片" - 设定该幻灯片的标题名称 (用来区分多个不同标题的幻灯片.) 预设名称: "幻灯片" Slide Duration - Durée d'un diaporama + Durée d'une diapositive Czas trwania slajdów Dia időtartam Duração do Slide @@ -188,14 +130,10 @@ Doba trvání snímku Durata Diapositiva Länge der Diavorführung pro Bild - スライドの持続時間 - 슬라이드 지속시간 - 幻燈片顯示時間 - 幻灯片显示时间 Duration of each slide. Default: 0 (Automatic Transitions Disabled) - Durée de chaque diaporama. Défaut: 0 (transition automatique désactivée) + Durée de chaque diapositive. Dafaut: 0 (transition automatique désactivée) Czas trwania poszczególnych slajdów. Domyślnie: 0 (Automatyczne przejścia wyłączone) A diák időtartama. Alapértelmezett: 0 (Automatikus váltás letiltva) Duração de cada slide. Padrão: 0 (Transição automática desabilitada) @@ -204,14 +142,10 @@ Doba trvání každého snímku. Výchozí: 0 (Automatické posouvání je zakázáno) Durata di ogni diapositiva. Default: 0 (Transizioni Automatiche Disabilitate) Länge der Diavorführung pro Bild. Standard: 0 (Automatischer Wechsel deaktiviert) - 各スライドの持続時間。標準:0 (自動的な切り替えは無効) - 매 슬라이드의 지속시간. 기본설정: 0 (자동 전환 비활성화) - 每張幻燈片顯示的時間. 預設:0 (自動換圖已禁用) - 每张幻灯片显示的时间. 预设:0 (自动换图已禁用) Slides - Diapo + Diapositives Slajdy Diák Slides @@ -220,10 +154,6 @@ Snímky Diapositive Dias - スライド - 슬라이드 - 幻燈片 - 幻灯片 - + \ No newline at end of file diff --git a/addons/smallarms/CfgWeapons.hpp b/addons/smallarms/CfgWeapons.hpp index cc7e3cbf2e..1cb7979d5b 100644 --- a/addons/smallarms/CfgWeapons.hpp +++ b/addons/smallarms/CfgWeapons.hpp @@ -4,8 +4,7 @@ class Mode_FullAuto; class CfgWeapons { class Rifle_Base_F; - class Rifle_Short_Base_F: Rifle_Base_F {}; - class Rifle_Long_Base_F: Rifle_Base_F {}; + class Rifle_Long_Base_F; /////////////////////////////////////////////////////////////////////////////// //////////// SMALL ARMS WEAPONS /////////////////////////////////////////////// @@ -92,7 +91,7 @@ class CfgWeapons { // SMG Vermin //////////////////////////////////////////////////// - class SMG_01_Base: Rifle_Short_Base_F { + class SMG_01_Base: Rifle_Base_F { // http://kriss-usa.com/pdf/operatormanual/ // 1200 rpm class Single: Mode_SemiAuto { @@ -111,7 +110,7 @@ class CfgWeapons { // SMG Scorpion //////////////////////////////////////////////////// - class SMG_02_base_F: Rifle_Short_Base_F { + class SMG_02_base_F: Rifle_Base_F { //http://www.czub.cz/zbrojovka/cz-manual/Instruction-Manual-Scorpion-EVO-3-A1_en.pdf // 1150 rpm @@ -132,7 +131,7 @@ class CfgWeapons { // SMG PDW2000 /////////////////////////////////////////////////// - class pdw2000_base_F: Rifle_Short_Base_F { + class pdw2000_base_F: Rifle_Base_F { modes[] = {"Single", "FullAuto"}; // No burst on this thing class Single: Mode_SemiAuto { diff --git a/addons/smallarms/script_component.hpp b/addons/smallarms/script_component.hpp index 9d6d48fa14..ebb2d1539d 100644 --- a/addons/smallarms/script_component.hpp +++ b/addons/smallarms/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_SMALLARMS diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index 8c566844ee..392cd9a43d 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -190,7 +190,7 @@ class GVAR(interface) { 1 }; multiselectEnabled = 0; - disableKeyboardSearch = 1; + maxHistoryDelay = 10e10; onTreeDblClick = QUOTE([ARR_2('onTreeDblClick',_this)] call FUNC(handleInterface)); }; class unitFrame: RscFrame { diff --git a/addons/spectator/XEH_preInit.sqf b/addons/spectator/XEH_preInit.sqf index 4bdf07b3a1..bdf0c72bd4 100644 --- a/addons/spectator/XEH_preInit.sqf +++ b/addons/spectator/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; // Reset the stored display SETUVAR(GVAR(interface),displayNull); diff --git a/addons/spectator/config.cpp b/addons/spectator/config.cpp index aee0eaaa76..cadde0db9d 100644 --- a/addons/spectator/config.cpp +++ b/addons/spectator/config.cpp @@ -21,9 +21,12 @@ class CfgPatches { class CfgRespawnTemplates { class ADDON { - displayName = CSTRING(DisplayName); onPlayerKilled = QFUNC(respawnTemplate); onPlayerRespawn = QFUNC(respawnTemplate); - respawnTypes[] = {2,3}; }; }; + +class ACE_newEvents { + spectatorStaged = "ace_spectatorStaged"; + spectatorSet = "ace_spectatorSet"; +}; \ No newline at end of file diff --git a/addons/spectator/functions/fnc_handleCamera.sqf b/addons/spectator/functions/fnc_handleCamera.sqf index f21581ea58..ce384c496c 100644 --- a/addons/spectator/functions/fnc_handleCamera.sqf +++ b/addons/spectator/functions/fnc_handleCamera.sqf @@ -64,7 +64,7 @@ if (GVAR(camMode) == 0) then { _vector = _vector vectorAdd [0,0,_distance*sin(-_tilt)]; // Update the position of the target camera (used for smooth unit tracking) - _target camSetPos ((ASLToAGL getPosASLVisual _unit) vectorAdd [0,0,1.5]); + _target camSetPos ((_unit modelToWorldVisual [0,0,0]) vectorAdd [0,0,1.5]); _target camCommit 0; // Update the relative position of the unit camera diff --git a/addons/spectator/functions/fnc_handleCompass.sqf b/addons/spectator/functions/fnc_handleCompass.sqf index 6f0f94b0ee..a65cc9ddce 100644 --- a/addons/spectator/functions/fnc_handleCompass.sqf +++ b/addons/spectator/functions/fnc_handleCompass.sqf @@ -46,12 +46,19 @@ _positions = [ [_compassW + _offset, 0] ]; -_sequence = [ - [_SW, _WN, _NE, _ES], - [_WN, _NE, _ES, _SW], - [_NE, _ES, _SW, _WN], - [_ES, _SW, _WN, _NE] -] select floor(_heading/90); +_sequence = if (_heading < 90) then { + [_SW, _WN, _NE, _ES] +} else { + if (_heading < 180) then { + [_WN, _NE, _ES, _SW] + } else { + if (_heading < 270) then { + [_NE, _ES, _SW, _WN] + } else { + [_ES, _SW, _WN, _NE] + }; + }; +}; { diff --git a/addons/spectator/functions/fnc_handleIcons.sqf b/addons/spectator/functions/fnc_handleIcons.sqf index 8f735c2a32..d1f83690ff 100644 --- a/addons/spectator/functions/fnc_handleIcons.sqf +++ b/addons/spectator/functions/fnc_handleIcons.sqf @@ -29,7 +29,7 @@ _drawVehicles = []; _color = GETVAR(_x,GVAR(gColor),[ARR_4(0,0,0,0)]); _txt = groupID _x; - drawIcon3D ["\A3\ui_f\data\map\markers\nato\b_inf.paa", _color, (_leader modelToWorldVisual (_leader selectionPosition "Head")) vectorAdd [0,0,28.5], 1, 1, 0, _txt, 2, 0.02]; + drawIcon3D ["\A3\ui_f\data\map\markers\nato\b_inf.paa", _color, _leader modelToWorldVisual [0,0,30], 1, 1, 0, _txt, 2, 0.02]; } else { _drawVehicles append (units _x); }; @@ -41,6 +41,6 @@ _drawVehicles = []; _color = GETVAR((group _x),GVAR(gColor),[ARR_4(0,0,0,0)]); _txt = ["", GETVAR(_x,GVAR(uName),"")] select (isPlayer _x); - drawIcon3D ["a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\UnitIcon_ca.paa", _color, (_x modelToWorldVisual (_x selectionPosition "Head")) vectorAdd [0,0,1.5], 0.7, 0.7, 0, _txt, 1, 0.02]; + drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", _color, _x modelToWorldVisual [0,0,3], 0.7, 0.7, 0, _txt, 1, 0.02]; false } count (_drawVehicles arrayIntersect GVAR(unitList)); diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 9ba64ec0f0..e5bb7498e0 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -34,7 +34,7 @@ switch (toLower _mode) do { [FUNC(handleUnits), 9, _display] call CBA_fnc_addPerFrameHandler; // Handle 3D unit icons - GVAR(iconHandler) = addMissionEventHandler ["Draw3D", {call FUNC(handleIcons)}]; + GVAR(iconHandler) = addMissionEventHandler ["Draw3D",FUNC(handleIcons)]; // Populate the help window private _help = (_display displayCtrl IDC_HELP) controlsGroupCtrl IDC_HELP_LIST; diff --git a/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf b/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf index 8224c77e57..52b6e5d8fa 100644 --- a/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf +++ b/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ace_spectator_fnc_moduleSpectatorSettings - * * Public: No */ diff --git a/addons/spectator/functions/fnc_respawnTemplate.sqf b/addons/spectator/functions/fnc_respawnTemplate.sqf index 59759d1371..1a36170202 100644 --- a/addons/spectator/functions/fnc_respawnTemplate.sqf +++ b/addons/spectator/functions/fnc_respawnTemplate.sqf @@ -13,9 +13,6 @@ * Return Value: * None * - * Example: - * [bob, kevin, 3, 6] call ace_spectator_fnc_respawnTemplate - * * Public: No */ diff --git a/addons/spectator/functions/fnc_stageSpectator.sqf b/addons/spectator/functions/fnc_stageSpectator.sqf index a7cc926d33..8e6c32f568 100644 --- a/addons/spectator/functions/fnc_stageSpectator.sqf +++ b/addons/spectator/functions/fnc_stageSpectator.sqf @@ -71,7 +71,7 @@ if !(_set isEqualTo (GETVAR(_unit,GVAR(isStaged),false))) then { if ((player in GVAR(unitList)) || {ACE_player in GVAR(unitList)}) then { [] call FUNC(updateUnits); //update list now if (!(isNull (findDisplay 12249))) then {//If display is open now, close it and restart - WARNING("Player in unitList, call ace_spectator_fnc_stageSpectator before ace_spectator_fnc_setSpectator"); + ACE_LOGWARNING("Player in unitList, call ace_spectator_fnc_stageSpectator before ace_spectator_fnc_setSpectator"); ["fixWeirdList", true] call FUNC(interrupt); [{["fixWeirdList", false] call FUNC(interrupt);}, []] call CBA_fnc_execNextFrame; }; diff --git a/addons/spectator/functions/fnc_toggleInterface.sqf b/addons/spectator/functions/fnc_toggleInterface.sqf index 4bf10fdbfe..31472702fc 100644 --- a/addons/spectator/functions/fnc_toggleInterface.sqf +++ b/addons/spectator/functions/fnc_toggleInterface.sqf @@ -3,7 +3,7 @@ * Correctly handles toggling of spectator interface elements for clean UX * * Arguments: - * 0: Display + * 0: Display * 1: Toogle compass * 2: Toogle help * 3: Toogle interface @@ -15,7 +15,7 @@ * None * * Example: - * [_display, nil, true] call ace_spectator_fnc_toggleInterface + * [_dsiplay, nil, true] call ace_spectator_fnc_toggleInterface * * Public: No */ diff --git a/addons/spectator/functions/fnc_updateCameraModes.sqf b/addons/spectator/functions/fnc_updateCameraModes.sqf index 819636ee22..de1611823b 100644 --- a/addons/spectator/functions/fnc_updateCameraModes.sqf +++ b/addons/spectator/functions/fnc_updateCameraModes.sqf @@ -21,10 +21,6 @@ #include "script_component.hpp" -if !(EGVAR(common,settingsInitFinished)) exitWith { - EGVAR(common,runAtSettingsInitialized) pushBack [DFUNC(updateCameraModes),_this]; -}; - params [["_addModes",[],[[]]], ["_removeModes",[],[[]]]]; private ["_newModes","_currentModes"]; diff --git a/addons/spectator/functions/fnc_updateUnits.sqf b/addons/spectator/functions/fnc_updateUnits.sqf index 418643be38..e5b15b6bc1 100644 --- a/addons/spectator/functions/fnc_updateUnits.sqf +++ b/addons/spectator/functions/fnc_updateUnits.sqf @@ -33,37 +33,43 @@ if !(_newUnits isEqualTo []) exitWith { }; }; +private ["_sides","_cond","_filteredUnits","_filteredGroups"]; + // Unit setting filter -private _newUnits = [[],allPlayers,playableUnits,allUnits] select GVAR(filterUnits); +_newUnits = [[],allPlayers,playableUnits,allUnits] select GVAR(filterUnits); // Side setting filter -private _sideFilter = [ - {_x == (side group player)}, - {(_x getFriend (side group player)) >= 0.6}, - {(_x getFriend (side group player)) < 0.6}, - {true} -] select GVAR(filterSides); - -private _filteredSides = GVAR(availableSides) select _sideFilter; +_sides = []; +_cond = [{_this == (side group player)},{(_this getFriend (side group player)) >= 0.6},{(_this getFriend (side group player)) < 0.6},{true}] select GVAR(filterSides); +{ + if (_x call _cond) then { + _sides pushBack _x; + }; +} forEach GVAR(availableSides); // Filter units and append to list -private _filteredUnits = (_newUnits - GVAR(unitBlacklist)) select { - (alive _x) && - {(_x isKindOf "CAManBase")} && - {(side group _x) in _filteredSides} && // Side filter - {simulationEnabled _x} && - {!(_x getVariable [QGVAR(isStaged), false])} // Who watches the watchmen? -}; +_filteredUnits = []; +{ + if ( + (alive _x) && + {(_x isKindOf "CAManBase")} && + {(side group _x) in _sides} && // Side filter + {simulationEnabled _x} && + {!(_x getVariable [QGVAR(isStaged), false])} // Who watches the watchmen? + ) then { + _filteredUnits pushBack _x; + }; +} forEach (_newUnits - GVAR(unitBlacklist)); _filteredUnits append GVAR(unitWhitelist); // Cache icons and colour for drawing -private _filteredGroups = []; +_filteredGroups = []; { // Intentionally re-applied to units in case their status changes [_x] call FUNC(cacheUnitInfo); - _filteredGroups pushBackUnique (group _x); + _filteredGroups pushBack (group _x); } forEach _filteredUnits; // Replace previous lists entirely (removes any no longer valid) -GVAR(groupList) = _filteredGroups; GVAR(unitList) = _filteredUnits arrayIntersect _filteredUnits; +GVAR(groupList) = _filteredGroups arrayIntersect _filteredGroups; diff --git a/addons/spectator/functions/fnc_updateVisionModes.sqf b/addons/spectator/functions/fnc_updateVisionModes.sqf index 6db965af3e..c2bbb09167 100644 --- a/addons/spectator/functions/fnc_updateVisionModes.sqf +++ b/addons/spectator/functions/fnc_updateVisionModes.sqf @@ -29,10 +29,6 @@ #include "script_component.hpp" -if !(EGVAR(common,settingsInitFinished)) exitWith { - EGVAR(common,runAtSettingsInitialized) pushBack [DFUNC(updateVisionModes),_this]; -}; - params [["_addModes",[],[[]]], ["_removeModes",[],[[]]]]; private ["_newModes","_currentModes"]; diff --git a/addons/spectator/script_component.hpp b/addons/spectator/script_component.hpp index 38561f3cdd..7084a88a6d 100644 --- a/addons/spectator/script_component.hpp +++ b/addons/spectator/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_SPECTATOR diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index ae65487d23..1a6fef2473 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -1,14 +1,6 @@ - + - - ACE Spectator - ACE スペクテイター - Spettatore ACE - Spectateur ACE - ACE 旁观者 - ACE 旁觀者 - Spectator Settings Zuschauer Einstellungen @@ -19,10 +11,6 @@ Ajustes de espectador Impostazioni Spettatore Réglages de spectateur - スペクテイター設定 - 관전자 설정 - 旁观者设定 - 旁觀者設定 Configure how the spectator system will operate by default. @@ -34,10 +22,6 @@ Konfigurovat výchozí nastavení pozorovatele Configura come il sistema spettatore si comporterà di default. Configure comment le système de spectateurs opère par défaut. - スペクテイター システムが標準でどのように動作するか設定できます。 - 어떻게 관전자 시스템이 기본적으로 작동되는지 설정합니다 - 设定旁观者系统相关配置. - 設定旁觀者系統相關配置. Unit filter @@ -49,10 +33,6 @@ Filtro de unidad Filtro Unità Filtre d'unités - ユニット フィルタ - 인원 필터 - 单位过滤器 - 單位過濾器 Method of filtering spectatable units. @@ -64,10 +44,6 @@ Metoda filtrování pozorovaných jednotek. Metodo di filtraggio delle unità osservabili. Méthode de filtration des unités regardables. - 観察できるユニットへのフィルタ設定ができます。 - 관전할 수 있는 인원을 고릅니다 - 过滤哪些单位可以使用旁观者系统. - 過濾哪些單位可以使用旁觀者系統. No units @@ -79,10 +55,6 @@ Ninguna Nessuna unità Pas d'unités - ユニットなし - 인원 없음 - 无单位 - 無單位 Only players @@ -94,10 +66,6 @@ Solo jugadores Solo giocatori Joueurs seulements - プレイヤのみ - 플레이어만 - 只有玩家 - 只有玩家 Playable Units @@ -109,10 +77,6 @@ Unidades jugables Unità giocabili Unités jouables - プレイ可能なユニットのみ - 플레이 가능한 인원 - 可扮演单位 - 可扮演單位 All units @@ -124,10 +88,6 @@ Todas las unidades Tutte le unità Toutes les unités - 全てのユニット - 모든 인원 - 所有单位 - 所有單位 Side filter @@ -139,10 +99,6 @@ Filtro de bando Filtro Lato Filtre de faction - 勢力フィルタ - 진영 필터 - 阵营过滤器 - 陣營過濾器 Method of filtering spectatable sides. @@ -154,10 +110,6 @@ Metoda filtrování pozorovaných stran. Metodo per filtrare i lati osservabili. Méthode de filtration des factions regardables - 観察できる勢力へのフィルタ設定ができます。 - 관전할 수 있는 진영을 고릅니다 - 过滤可旁观的阵营. - 過濾可旁觀的陣營. Player side @@ -169,10 +121,6 @@ Bando del jugador Lato giocatore Faction du joueur - プレイヤーと同じ勢力 - 플레이어 진영 - 玩家 - 玩家 Friendly sides @@ -184,10 +132,6 @@ Bandos amigos Lati alleati Factions amies - 友軍勢力 - 아군 진영 - 友军 - 友軍 Hostile sides @@ -199,10 +143,6 @@ Bandos enemigos Lati nemici Factions hostiles - 敵対勢力 - 적군 진영 - 敌方 - 敵方 All sides @@ -214,10 +154,6 @@ Todos los bandos Tutti i lati Toutes les factions - 全ての勢力 - 모든 진영 - 所有阵营 - 所有陣營 Camera modes @@ -229,10 +165,6 @@ Modos de cámara Modalità camera Mode de caméra - カメラ モード - 카메라 모드 - 摄影机模式 - 攝影機模式 Camera modes that can be used. @@ -244,10 +176,6 @@ Módy kamery které mohou být použity. Modalità che la camera può utilizzare. Modes de caméra qui peuvent être utilisés - カメラ モードを使えます。 - 사용할 수 있는 카메라 모드들 입니다 - 设定可使用的摄影机模式. - 設定可使用的攝影機模式. All @@ -259,10 +187,6 @@ Todos Tutte Tous - 全て - 모두 - 所有 - 所有 Free only @@ -274,19 +198,15 @@ Solo libre Solo libera Libre seulement - 自由視点のみ - 오직 자유만 - 只有自由模式 - 只有自由模式 Internal only Erste Person //Bitte überprüfen! - Tylko wewnętrznaSomente internaТолько внутренняяPouze pohled z první osobySolo internaSolo internaInterne seulement一人称視点のみ오직 내부만只有第一人称只有第一人稱 + Tylko wewnętrznaSomente internaТолько внутренняяPouze pohled z první osobySolo internaSolo internaInterne seulement External only Dritte Person //Bitte überpfüfen! - Tylko zewnętrznaSomente externaТолько внешняяPouze pohled z třetí osobySolo externaSolo esternaExterne seulement三人称視点のみ오직 외부만只有第三人称只有第三人稱 + Tylko zewnętrznaSomente externaТолько внешняяPouze pohled z třetí osobySolo externaSolo esternaExterne seulement Internal and external Erste und dritte Person @@ -297,10 +217,6 @@ Interna y externa Interna ed Esterna Interne et externe - 一人称と三人称視点 - 외부 및 내부 - 第一和第三人称 - 第一和第三人稱 Vision modes @@ -312,10 +228,6 @@ Módy zobrazení Modalità visuali Modes de vision - ビジョン モード - 시야 모드 - 视觉模式 - 視覺模式 Vision modes that can be used. @@ -327,10 +239,6 @@ Módy zobrazení které mohou být použity. Modalità visuali che possono essere usate. Modes de visions qui peuvent être utilisés - ビジョン モードを使えます。 - 사용할 수 있는 시야 모드들 입니다 - 设定可使用的视觉模式. - 設定可使用的視覺模式. Night vision @@ -342,10 +250,6 @@ Visión nocturna Visione Notturna Vision nocturne - 夜間暗視 - 야간투시경 - 夜视 - 夜視 Thermal imaging @@ -357,10 +261,6 @@ Imagen térmica Visione Termica Vision thermique - 熱源画像 - 열화상 - 热成像 - 熱成像 @@ -373,10 +273,6 @@ Jednotky pozorovatele Unità Osservabili Unités spectatrices - スペクテイター ユニット - 관전 인원 - 旁观者单位 - 旁觀者單位 Spectator Controls @@ -388,10 +284,6 @@ Ovládání pozorovatele Controlli Osservatore Contrôles de spectateur - スペクテイター操作 - 관전 조작 - 旁观者控制 - 旁觀者控制 Free @@ -403,19 +295,15 @@ Libre Libera Libre - 自由視点 - 자유 - 自由模式 - 自由模式 Internal Erste Person //Bitte überprüfen! - WewnętrznaInternaВнутренняяPohled z první osobyInternaInternaInterne一人称視点내부第一人称第一人稱 + WewnętrznaInternaВнутренняяPohled z první osobyInternaInternaInterne External Dritte Person //Bitte überprüfen! - ZewnętrznaExternaВнешняяPohled z třetí osobyExternaEsternaExterne三人称視点외부第三人称第三人稱 + ZewnętrznaExternaВнешняяPohled z třetí osobyExternaEsternaExterne Normal Normal @@ -426,10 +314,6 @@ Normal Normale Normale - 通常 - 정상 - 正常 - 正常 Night @@ -441,10 +325,6 @@ Nocturna Notturno Nuit - 暗視装置 - 야간 - 夜视 - 夜視 Thermal @@ -456,10 +336,6 @@ Térmica Termico Thermique - 熱源画像 - 열상 - 热成像 - 熱成像 @@ -472,10 +348,6 @@ Cámara libre Camera Libera Caméra libre - 自由視点 - 자유 카메라 - 自由摄影机 - 自由攝影機 Camera Forward @@ -487,10 +359,6 @@ Cámara delantera Camera Avanti Caméra en avant - カメラを前に - 카메라 앞으로 - 摄影机往前 - 攝影機往前 Camera Backward @@ -502,10 +370,6 @@ Cámara trasera Camera Indietro Caméra en arrière - カメラを後ろに - 카메라 뒤로 - 摄影机往后 - 攝影機往後 Camera Left @@ -517,10 +381,6 @@ Cámara izquierda Camera Sinistra Caméra à gauche - カメラを左に - 카메라 왼쪽으로 - 摄影机往左 - 攝影機往左 Camera Right @@ -532,10 +392,6 @@ Cámara derecha Camera Destra Caméra à droite - カメラを右に - 카메라 오른쪽으로 - 摄影机往右 - 攝影機往右 Camera Up @@ -547,10 +403,6 @@ Cámara arriba Camera Su Caméra en haut - カメラを上に - 카메라 위로 - 摄影机往上 - 攝影機往上 Camera Down @@ -562,10 +414,6 @@ Cámara abajo Camera Giù Caméra en bas - カメラを下に - 카메라 아래로 - 摄影机往下 - 攝影機往下 Pan Camera @@ -577,10 +425,6 @@ Otáčet kameru Camera Panoramica Tourner la caméra - カメラを振る - 카메라 돌리기 - 平移摄影机 - 平移攝影機 Dolly Camera @@ -592,10 +436,6 @@ Posouvat kameru Camera dolly Bouger la caméra - カメラを動かす - 카메라 추적 - 移动摄影机 - 移動攝影機 Lock Camera to Target @@ -607,10 +447,6 @@ Fijar cámara al objetivo Blocca la camera su obbiettivo Verrouiller la caméra sur la cible - カメラを目標に固定 - 목표에 카메라 고정 - 锁定摄影机观察单一目标 - 鎖定攝影機觀察單一目標 Speed Boost @@ -622,10 +458,6 @@ Zrychlení kamery Aumento Velocità Boost de vitesse - 速度の増加 - 속도 증가 - 速度提升 - 速度提升 Interface @@ -637,10 +469,6 @@ Interfaz Interfaccia Interface - インターフェイス - 인터페이스 - 介面 - 介面 Toggle Interface @@ -652,10 +480,6 @@ Conmutar Apri Interfaccia Bascule de l'interface - インターフェイスをトグル - 인터페이스 토글 - 切换介面 - 切換介面 Toggle Unit Icons @@ -667,10 +491,6 @@ Conmutar iconos de unidad Apri Icone Unità Bascule des icônes des unités - ユニット アイコンをトグル - 인원 아이콘 토글 - 切换单位图示 - 切換單位圖示 Toggle Unit List @@ -682,10 +502,6 @@ Conmutar lista de unidades Apri Lista Unità Bascule de la liste des unités - ユニット一覧をトグル - 인원 목록 토글 - 切换单位名单 - 切換單位名單 Toggle Toolbar @@ -697,10 +513,6 @@ Zobrazit/skrýt spodní panel Apri Barra degli Strumenti Bascule de la barre d'outils - ツールバーをトグル - 툴바 토글 - 切换工具栏 - 切換工具欄 Toggle Compass @@ -712,10 +524,6 @@ Conmutar brújula Apri Bussola Basculer le compas - 方位磁石をトグル - 나침반 토글 - 切换指北针 - 切換指北針 Toggle Map @@ -727,10 +535,6 @@ Conmutar map Apri Mappa Basculer la carte - 地図をトグル - 지도 토글 - 切换地图 - 切換地圖 Toggle Help @@ -742,10 +546,6 @@ Conmutar ayuda Apri Aiuti Basculer l'aide - ヘルプをトグル - 도움 토글 - 切换帮助 - 切換幫助 Camera Attributes @@ -757,10 +557,6 @@ Atributy kamery Attributi Camera Propriétés de la caméra - カメラ高度 - 카메라 속성 - 摄影机属性 - 攝影機屬性 Next Camera @@ -772,10 +568,6 @@ Siguiente cámara Prossima Camera Caméra suivante - 次のカメラ - 다음 카메라 - 下个镜头 - 下個鏡頭 Previous Camera @@ -787,10 +579,6 @@ Anterior cámara Precedente Camera Caméra précédente - 前のカメラ - 이전 카메라 - 上个镜头 - 上個鏡頭 Next Unit @@ -802,10 +590,6 @@ Siguiente unidad Prossima Unità Unité suivante - 次のユニット - 다음 인원 - 下个单位 - 下個單位 Previous Unit @@ -817,10 +601,6 @@ Anterior unidad Precedente Unità Unité précédente - 前のユニット - 이전 인원 - 上个单位 - 上個單位 Next Vision Mode @@ -832,10 +612,6 @@ Následující mód zobrazení Prossima Modalità Visiva Mode de vision suivant - 次のビジョン モード - 다음 시야 모드 - 下个视觉模式 - 下個視覺模式 Previous Vision Mode @@ -847,10 +623,6 @@ Předchozí mód zobrazení Precedente Modalità Visiva Mode de vision précédent - 前のビジョン モード - 이전 시야 모드 - 上个视觉模式 - 上個視覺模式 Adjust Zoom @@ -862,10 +634,6 @@ Ajustar aumento Aggiusta Zoom Ajuster le zoom - 拡大倍率を調節 - 줌 조절 - 调整倍率 - 調整倍率 Adjust Speed @@ -877,10 +645,6 @@ Ajustar velocidad Aggiusta Velocità Ajuster la vitesse - 速度を調節 - 속도 조절 - 调整速度 - 調整速度 Increment Zoom @@ -892,10 +656,6 @@ Regulovat přiblížení (pomalu) Aumenta Zoom Augmenter le zoom - 拡大倍率を増やす - 줌 증가 - 增加放大 - 增加放大 Increment Speed @@ -907,10 +667,6 @@ Regulovat rychlost (pomalu) Aumenta Velocità Augmenter la vitesse - 速度を増やす - 속도 증가 - 增加速度 - 增加速度 Reset Zoom @@ -922,10 +678,6 @@ Reiniciar aumento Resetta Zoom RAZ zoom - 拡大倍率を初期化 - 줌 초기화 - 重置缩放 - 重置縮放 Reset Speed @@ -937,10 +689,6 @@ Reiniciar velocidad Resetta Velocità RAZ vitesse - 速度を初期化 - 속도 초기화 - 重置速度 - 重置速度 - + \ No newline at end of file diff --git a/addons/spottingscope/CfgVehicles.hpp b/addons/spottingscope/CfgVehicles.hpp index fa2574cb8d..84ce5f177f 100644 --- a/addons/spottingscope/CfgVehicles.hpp +++ b/addons/spottingscope/CfgVehicles.hpp @@ -43,7 +43,7 @@ class CfgVehicles { class ACE_Actions: ACE_Actions{ class ACE_MainActions: ACE_MainActions { - selection = "main_turret_axis"; + selection = "main_gun"; class ACE_Pickup { selection = ""; displayName = CSTRING(PickUp); diff --git a/addons/spottingscope/XEH_preInit.sqf b/addons/spottingscope/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/spottingscope/XEH_preInit.sqf +++ b/addons/spottingscope/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/spottingscope/data/ace_spottingscope.p3d b/addons/spottingscope/data/ace_spottingscope.p3d index 2298b9c8f9..969d0b37f5 100644 Binary files a/addons/spottingscope/data/ace_spottingscope.p3d and b/addons/spottingscope/data/ace_spottingscope.p3d differ diff --git a/addons/spottingscope/functions/fnc_animateReticle.sqf b/addons/spottingscope/functions/fnc_animateReticle.sqf index 7fbf71fe23..10bbf9b564 100644 --- a/addons/spottingscope/functions/fnc_animateReticle.sqf +++ b/addons/spottingscope/functions/fnc_animateReticle.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [DISPLAY] call ace_spottingscope_fnc_animateReticle - * * Public: No */ #include "script_component.hpp" @@ -18,7 +15,7 @@ disableSerialization; params ["_display"]; -uinamespace setVariable [QGVAR(dlgSpottingScope), _display]; +uinamespace setVariable [QGVAR(dlgSpottingScope), _display]; private _ctrlReticle = _display displayCtrl IDC_RETICLE; private _ctrlBody = _display displayCtrl IDC_BODY; diff --git a/addons/spottingscope/script_component.hpp b/addons/spottingscope/script_component.hpp index 14e7867285..f6cc09af7a 100644 --- a/addons/spottingscope/script_component.hpp +++ b/addons/spottingscope/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_SPOTTINGSCOPE diff --git a/addons/spottingscope/stringtable.xml b/addons/spottingscope/stringtable.xml index fdf621a29e..3a0b89b857 100644 --- a/addons/spottingscope/stringtable.xml +++ b/addons/spottingscope/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Spotting Scope Megfigyelő távcső Luneta de observador - 観測用スコープ - 감적 망원경 - 观测镜 - 觀測鏡 Pick up Spotting Scope @@ -28,10 +24,6 @@ Raccogli spottingscope Mefgigy. távcső felvétele Pegar luneta de observador - 観測用スコープを拾う - 감적 망원경 줍기 - 捡起观测镜 - 撿起觀測鏡 Place Spotting Scope @@ -44,10 +36,6 @@ Posiziona spottingscope Megfigy. távcső elhelyezése Colocar luneta de observador - 観測用スコープを置く - 감적 망원경 배치 - 放置观测镜 - 放置觀測鏡 - + \ No newline at end of file diff --git a/addons/switchunits/XEH_preInit.sqf b/addons/switchunits/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/switchunits/XEH_preInit.sqf +++ b/addons/switchunits/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/switchunits/functions/fnc_handleMapClick.sqf b/addons/switchunits/functions/fnc_handleMapClick.sqf index db016ac8f3..b0984631d7 100644 --- a/addons/switchunits/functions/fnc_handleMapClick.sqf +++ b/addons/switchunits/functions/fnc_handleMapClick.sqf @@ -3,7 +3,7 @@ * Switches to a unit close to a clicked map position * * Arguments: - * 0: Faction + * 0: Faction * 0: unit * 1: sides * 1: Map Position diff --git a/addons/switchunits/functions/fnc_module.sqf b/addons/switchunits/functions/fnc_module.sqf index 5170cebfb9..9da63a9510 100644 --- a/addons/switchunits/functions/fnc_module.sqf +++ b/addons/switchunits/functions/fnc_module.sqf @@ -35,4 +35,4 @@ GVAR(Module) = true; [QGVAR(EnableSwitchUnits), true, false, true] call EFUNC(common,setSetting); -INFO("SwitchUnits Module Initialized."); +ACE_LOGINFO("SwitchUnits Module Initialized."); diff --git a/addons/switchunits/script_component.hpp b/addons/switchunits/script_component.hpp index ec34efc9cd..868fbc0a5d 100644 --- a/addons/switchunits/script_component.hpp +++ b/addons/switchunits/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_SWITCHUNITS diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml index b601d7bd12..31ba1f1c05 100644 --- a/addons/switchunits/stringtable.xml +++ b/addons/switchunits/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,25 +12,17 @@ Egység átváltva Cambia unità Trocado de unidade - ユニットを切り替え - 인원으로 전환 - 切换单位 - 切換單位 Trying to switch Versuche zu Wechseln Snažím se přehodit Próba zmiany - Provando a cambiare + Sto provando a cambiare Intentando cambiar Essaye de basculer Tentando trocar Попытка переключения - 切り替えを試す - 전환 시도중 - 尝试切换中 - 嘗試切換中 This unit is too close to the enemy. @@ -43,10 +35,6 @@ Ez az egység túl közel van az ellenséghez. Questa unità è troppo vicina al nemico. Essa unidade está muito perto do inimigo. - このユニットは敵に近すぎます。 - 그 인원은 적과 너무 가깝습니다. - 这单位太接近敌人了. - 這單位太接近敵人了. SwitchUnits System @@ -59,10 +47,6 @@ Egységváltó-rendszer Переключение между юнитами Sistema Cambio Unità - SwitchUnits システム - 인원전환 시스템 - 切换单位系统 - 切換單位系統 Switch to West? @@ -75,10 +59,6 @@ Átváltás BLUFOR-ra? На синих? Cambia per BLUFOR? - ウエストへ切り替えますか? - 서방으로 전환합니까? - 切换至蓝方? - 切換至藍方? Allow switching to west units? @@ -91,10 +71,6 @@ Nyugat-fakciós egységekre való váltás engedélyezése? Разрешить переключаться на синих юнитов? Consenti passaggio ad unità BLUFOR? - ウエスト側ユニットへ切り替えられるようにしますか? - 서방 인원으로 전환합니까? - 允许切换至蓝方? - 允許切換至藍方? Switch to East? @@ -107,10 +83,6 @@ Átváltás OPFOR-ra? На красных? Cambia per OPFOR? - イースト側へ切り替えますか? - 동방으로 전환합니까? - 切换至红方? - 切換至紅方? Allow switching to east units? @@ -123,10 +95,6 @@ Kelet-fakciós egységekre való váltás engedélyezése? Разрешить переключаться на красных юнитов? Consenti passaggio ad unità OPFOR? - イースト側ユニットへ切り替えられるようにしますか? - 동방인원으로 전환합니까? - 允许切换至红方? - 允許切換至紅方? Switch to Independent? @@ -139,10 +107,6 @@ Átváltás INDFOR-ra? На независимых? Cambia per INDFOR? - インデペンデントへ切り替えますか? - 중립으로 전환합니까? - 切换至独立方? - 切換至獨立方? Allow switching to independent units? @@ -155,10 +119,6 @@ Független egységekre való váltás engedélyezése? Разрешить переключаться на независимых юнитов? Consenti passaggio ad unità INDFOR? - インデペンデント側ユニットへ切り替えられるようにしますか? - 중립 인원으로 전환합니까? - 允许切换至独立方? - 允許切換至獨立方? Switch to Civilian? @@ -171,10 +131,6 @@ Átváltás civilre? На гражданских? Cambia per Civili? - シビリアンへ切り替えますか? - 민간인으로 전환합니까? - 切换至平民方? - 切換至平民方? Allow switching to civilian units? @@ -187,10 +143,6 @@ Civil egységekre való váltás engedélyezése? Разрешить переключаться на гражданских юнитов? Consenti passaggio ad unità civili? - シビリアン側ユニットへ切り替えられるようにしますか? - 민간인으로 전환하는걸 허가합니까? - 允许切换至平民方? - 允許切換至平民方? Enable Safe Zone? @@ -203,10 +155,6 @@ Biztonságos zóna engedélyezése? Безопасная зона Abilita Zona Sicura? - 安全地帯を有効にしますか? - 안전 지대 활성화? - 启用安全区? - 啟用安全區? Enable a safe zone around enemy units? Players can't switch to units inside of the safe zone. @@ -219,10 +167,6 @@ Engedélyezve legyen-e egy biztonságos zóna az ellenségek körül? A játékosok nem tudnak a biztonságos zónán belüli egységekre váltani. Включить безопасную зону вокруг вражеских юнитов? Игроки не могут переключаться на юнитов, находящихся в безопасной зоне. Abilita una zona sicura attorno ad unità nemiche? I giocatori non possono cambiare ad unità dentro la zona sicura. - 敵ユニットから逃れる安全地帯を有効にしますか?プレイヤーは安全地帯内のユニットへ切り替えできません。 - 적 주위로 안전 지대를 활성화합니까? 안전 지대 내에서는 플레이어가 인원 전환을 할 수 없습니다. - 启用敌方周围安全地带? 玩家不能切换到安全区内的单位. - 啟用敵方周圍安全地帶? 玩家不能切換到安全區內的單位. Safe Zone Radius @@ -235,10 +179,6 @@ Biztonságos zóna hatóköre Радиус безопасной зоны Raggio Zona Sicura - 安全地帯の半径 - 안전 지대 반경 - 安全区半径 - 安全區半徑 The safe zone around players from a different team. Default: 200 @@ -251,10 +191,6 @@ A biztonságos zóna más csapatból lévő játékosok körül. Alapértelmezett: 200 Радиус безопасной зоны вокруг ироков из противоположной команды. По-умолчанию: 200 La zona sicura attorno ai giocatori di un team diverso. Default: 200 - 別のチームへのプレイヤーの周囲にある安全地帯の範囲。標準:200 - 다른 진영으로 부터의 플레이어 안전 지대. 기본설정: 200 - 安全区的范围. 预设值:200 - 安全區的範圍. 預設值:200 Module allows you to switch side during the game. @@ -266,10 +202,6 @@ Ce module permet le changement de faction des joueurs Questo modulo ti permette di cambiare lato durante la partita. El módulo permite a las unidades cambiar de bando durante el juego. - モジュールはゲームにおいて、陣営の切り替えを有効にします。 - 이 모듈은 당신을 게임 중에 진영을 바꿀 수 있게 해줍니다. - 此模块允许你在游戏中切换至另一方. - 此模塊允許你在遊戲中切換至另一方. - + \ No newline at end of file diff --git a/addons/tacticalladder/XEH_preInit.sqf b/addons/tacticalladder/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/tacticalladder/XEH_preInit.sqf +++ b/addons/tacticalladder/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/tacticalladder/config.cpp b/addons/tacticalladder/config.cpp index def7b0ce96..eddca58449 100644 --- a/addons/tacticalladder/config.cpp +++ b/addons/tacticalladder/config.cpp @@ -16,3 +16,7 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" + +class ACE_newEvents { + interactMenuOpened = "ace_interactMenuOpened"; +}; diff --git a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf index f66dd79a25..b009028c93 100644 --- a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf @@ -31,7 +31,6 @@ GVAR(ladder) animate ["rotate", 0]; { GVAR(ladder) animate [_x, 0]; - true } count __ANIMS; // remove mouse buttons and hint diff --git a/addons/tacticalladder/functions/fnc_handleInteractMenuOpened.sqf b/addons/tacticalladder/functions/fnc_handleInteractMenuOpened.sqf index 4c46ea46c2..c7187acd55 100644 --- a/addons/tacticalladder/functions/fnc_handleInteractMenuOpened.sqf +++ b/addons/tacticalladder/functions/fnc_handleInteractMenuOpened.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_tacticalladder_fnc_handleInteractMenuOpened - * * Public: No */ #include "script_component.hpp" diff --git a/addons/tacticalladder/functions/fnc_handleKilled.sqf b/addons/tacticalladder/functions/fnc_handleKilled.sqf index 742231900c..c5d6aa1314 100644 --- a/addons/tacticalladder/functions/fnc_handleKilled.sqf +++ b/addons/tacticalladder/functions/fnc_handleKilled.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_tacticalladder_fnc_handleKilled - * * Public: No */ #include "script_component.hpp" diff --git a/addons/tacticalladder/functions/fnc_handlePlayerChanged.sqf b/addons/tacticalladder/functions/fnc_handlePlayerChanged.sqf index 713c75df7f..07118acbaf 100644 --- a/addons/tacticalladder/functions/fnc_handlePlayerChanged.sqf +++ b/addons/tacticalladder/functions/fnc_handlePlayerChanged.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, kevin] call ace_tacticalladder_fnc_handlePlayerChanged - * * Public: No */ #include "script_component.hpp" diff --git a/addons/tacticalladder/functions/fnc_handleUnconscious.sqf b/addons/tacticalladder/functions/fnc_handleUnconscious.sqf index 152f014602..e9ce28d524 100644 --- a/addons/tacticalladder/functions/fnc_handleUnconscious.sqf +++ b/addons/tacticalladder/functions/fnc_handleUnconscious.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_tacticalladder_fnc_handleUnconscious - * * Public: No */ #include "script_component.hpp" diff --git a/addons/tacticalladder/script_component.hpp b/addons/tacticalladder/script_component.hpp index 081ce8c473..b58aa42e38 100644 --- a/addons/tacticalladder/script_component.hpp +++ b/addons/tacticalladder/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_TACTICALLADDER diff --git a/addons/tacticalladder/stringtable.xml b/addons/tacticalladder/stringtable.xml index e94a292bc1..7a60933ceb 100644 --- a/addons/tacticalladder/stringtable.xml +++ b/addons/tacticalladder/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Telescopic Ladder Teleszkopikus létra Escada telescópica - タクティカル ラダー - 로프 사다리 - 伸缩梯子 - 伸縮梯子 Deploy ladder @@ -28,10 +24,6 @@ Deploy ladder Létra lerakása Implantar escada - ラダーを設置 - 사다리 배치 - 布署梯子 - 佈署梯子 Drop ladder @@ -44,10 +36,6 @@ Drop ladder Létra eldobása Derrubar escada - ラダーを落とす - 사다리 놓기 - 降下梯子 - 降下梯子 Extend @@ -59,10 +47,6 @@ Estendi, +Ctrl ruota Extender Déployer - 伸ばす - 늘리기 - 伸长梯子 - 伸長梯子 +Ctrl tilt @@ -74,10 +58,6 @@ +Ctrl inclinar +Ctrl incliner +Ctrl per inclinare - +Ctrl で傾ける - +컨트롤키 기울이기 - +Ctrl 倾斜 - +Ctrl 傾斜 Position ladder @@ -90,10 +70,6 @@ Position ladder Létra elhelyezése Posicionar escada - ラダーの位置 - 사다리 위치 - 梯子位置 - 梯子位置 Pickup ladder @@ -106,10 +82,6 @@ Pickup ladder Létra felvétele Pegar escada - ラダーを拾う - 사다리 줍기 - 捡起梯子 - 撿起梯子 - + \ No newline at end of file diff --git a/addons/tagging/XEH_postInit.sqf b/addons/tagging/XEH_postInit.sqf index 1e7003281a..ddac9b9ab9 100644 --- a/addons/tagging/XEH_postInit.sqf +++ b/addons/tagging/XEH_postInit.sqf @@ -3,7 +3,8 @@ // Cache for static objects -GVAR(cacheStaticModels) = [false] call CBA_fnc_createNamespace; +GVAR(cacheStaticModels) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0]; +GVAR(cacheStaticModels) setText QGVAR(cacheStaticModels); // Consider static everything vehicle that inherit from Static // This include houses (which we don't need), but also walls, that we do @@ -16,7 +17,7 @@ for "_index" from 0 to (_countOptions - 1) do { private _model = getText (_cfgClass >> "model"); if (_model != "") then { private _array = _model splitString "\"; - GVAR(cacheStaticModels) setVariable [(_array select ((count _array) - 1)), true]; + GVAR(cacheStaticModels) setVariable [toLower (_array select ((count _array) - 2)), _cfgClass]; }; }; }; @@ -32,7 +33,7 @@ for "_index" from 0 to (_countOptions - 1) do { private _model = getText (_cfgClass >> "model"); if (_model != "") then { private _array = _model splitString "\"; - GVAR(cacheStaticModels) setVariable [(_array select ((count _array) - 1)), true]; + GVAR(cacheStaticModels) setVariable [toLower (_array select ((count _array) - 2)), _cfgClass]; }; }; }; diff --git a/addons/tagging/XEH_preInit.sqf b/addons/tagging/XEH_preInit.sqf index e1487c671f..66458c6995 100644 --- a/addons/tagging/XEH_preInit.sqf +++ b/addons/tagging/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(cachedTags) = []; GVAR(cachedRequiredItems) = []; diff --git a/addons/tagging/config.cpp b/addons/tagging/config.cpp index 6ec32da0a6..e066bcafe5 100644 --- a/addons/tagging/config.cpp +++ b/addons/tagging/config.cpp @@ -19,3 +19,8 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" + +class ACE_newEvents { + createTag = QGVAR(createTag); + tagCreated = "ace_tagCreated"; +}; diff --git a/addons/tagging/functions/fnc_addCustomTag.sqf b/addons/tagging/functions/fnc_addCustomTag.sqf index b29fa7af88..455b33ffd8 100644 --- a/addons/tagging/functions/fnc_addCustomTag.sqf +++ b/addons/tagging/functions/fnc_addCustomTag.sqf @@ -29,25 +29,25 @@ params [ // Verify if (_identifier == "") exitWith { - ERROR("Failed adding custom tag - missing identifier"); + ACE_LOGERROR("Failed adding custom tag - missing identifier"); }; if (_displayName == "") exitWith { - ERROR_1("Failed adding custom tag: %1 - missing displayName",_identifier); + ACE_LOGERROR_1("Failed adding custom tag: %1 - missing displayName",_identifier); }; if (_requiredItem == "") exitWith { - ERROR_1("Failed adding custom tag: %1 - missing requiredItem",_identifier); + ACE_LOGERROR_1("Failed adding custom tag: %1 - missing requiredItem",_identifier); }; if (!isClass (configFile >> "CfgWeapons" >> _requiredItem)) exitWith { - ERROR_2("Failed adding custom tag: %1 - requiredItem %2 does not exist",_identifier,_requiredItem); + ACE_LOGERROR_2("Failed adding custom tag: %1 - requiredItem %2 does not exist",_identifier,_requiredItem); }; if (_textures isEqualTo []) exitWith { - ERROR_1("Failed adding custom tag: %1 - missing textures",_identifier); + ACE_LOGERROR_1("Failed adding custom tag: %1 - missing textures",_identifier); }; -_identifier = [_identifier] call CBA_fnc_removeWhitespace; +_identifier = [_identifier] call EFUNC(common,stringRemoveWhiteSpace); _requiredItem = toLower _requiredItem; // Add diff --git a/addons/tagging/functions/fnc_applyCustomTag.sqf b/addons/tagging/functions/fnc_applyCustomTag.sqf index f03230e9da..e2b91fe853 100644 --- a/addons/tagging/functions/fnc_applyCustomTag.sqf +++ b/addons/tagging/functions/fnc_applyCustomTag.sqf @@ -23,7 +23,7 @@ params ["_identifier", "_displayName", "_requiredItem"]; // Add only if tag not already added (compare identifiers) if !(GVAR(cachedTags) select {_x select 0 == _identifier} isEqualTo []) exitWith { - INFO_2("Tag with selected identifier already exists: %1 (%2)",_identifier,_displayName) + ACE_LOGINFO_2("Tag with selected identifier already exists: %1 (%2)",_identifier,_displayName) }; GVAR(cachedTags) pushBack _this; diff --git a/addons/tagging/functions/fnc_checkTaggable.sqf b/addons/tagging/functions/fnc_checkTaggable.sqf index e4328687a9..d739bbfec5 100644 --- a/addons/tagging/functions/fnc_checkTaggable.sqf +++ b/addons/tagging/functions/fnc_checkTaggable.sqf @@ -9,14 +9,16 @@ * Is surface taggable * * Example: - * [player] call ace_tagging_fnc_checkTaggable + * [unit] call ace_tagging_fnc_checkTaggable * * Public: No */ #include "script_component.hpp" -[_this, { +params ["_unit"]; + +[[_unit], { params ["_unit"]; // Exit if no required item in inventory @@ -43,11 +45,15 @@ if (_object isKindOf "Static") exitWith {false}; // If the class is not categorized correctly search the cache - private _modelName = (getModelInfo _object) select 0; - private _isStatic = GVAR(cacheStaticModels) getVariable [_modelName, false]; - TRACE_2("Object:",_modelName,_isStatic); + private _array = str(_object) splitString " "; + private _str = toLower (_array select 1); + TRACE_1("Object:",_str); + private _objClass = GVAR(cacheStaticModels) getVariable _str; // If the class in not on the cache, exit - (!_isStatic) + if (isNil "_objClass") exitWith { + false + }; + true }) exitWith { TRACE_1("Pointed object is non static",_object); false diff --git a/addons/tagging/functions/fnc_compileConfigTags.sqf b/addons/tagging/functions/fnc_compileConfigTags.sqf index 75e1cd2607..29f4acd1d4 100644 --- a/addons/tagging/functions/fnc_compileConfigTags.sqf +++ b/addons/tagging/functions/fnc_compileConfigTags.sqf @@ -21,24 +21,24 @@ private _displayName = getText (_x >> "displayName"); if (_displayName == "") then { - ERROR_1("Failed compiling ACE_Tags for tag: %1 - missing displayName",_class); + ACE_LOGERROR_1("Failed compiling ACE_Tags for tag: %1 - missing displayName",_class); _failure = true; }; private _requiredItem = toLower (getText (_x >> "requiredItem")); if (_requiredItem == "") then { - ERROR_1("Failed compiling ACE_Tags for tag: %1 - missing requiredItem",_class); + ACE_LOGERROR_1("Failed compiling ACE_Tags for tag: %1 - missing requiredItem",_class); _failure = true; } else { if (!isClass (configFile >> "CfgWeapons" >> _requiredItem)) then { - ERROR_2("Failed compiling ACE_Tags for tag: %1 - requiredItem %2 does not exist",_class,_requiredItem); + ACE_LOGERROR_2("Failed compiling ACE_Tags for tag: %1 - requiredItem %2 does not exist",_class,_requiredItem); _failure = true; }; }; private _textures = getArray (_x >> "textures"); if (_textures isEqualTo []) then { - ERROR_1("Failed compiling ACE_Tags for tag: %1 - missing textures",_class); + ACE_LOGERROR_1("Failed compiling ACE_Tags for tag: %1 - missing textures",_class); _failure = true; }; diff --git a/addons/tagging/functions/fnc_createTag.sqf b/addons/tagging/functions/fnc_createTag.sqf index c579c6e05f..20ca33bd2e 100644 --- a/addons/tagging/functions/fnc_createTag.sqf +++ b/addons/tagging/functions/fnc_createTag.sqf @@ -24,12 +24,13 @@ params ["_tagPosASL", "_vectorDirAndUp", "_texture", "_object", "_unit"]; TRACE_5("createTag:",_tagPosASL,_vectorDirAndUp,_texture,_object,_unit); if (_texture == "") exitWith { - ERROR_1("%1 is not a valid tag texture.",_texture); + ACE_LOGERROR_1("%1 is not a valid tag texture.",_texture); false }; -private _tag = createSimpleObject ["UserTexture1m_F", _tagPosASL]; +private _tag = "UserTexture1m_F" createVehicle [0,0,0]; _tag setObjectTextureGlobal [0, _texture]; +_tag setPosASL _tagPosASL; _tag setVectorDirAndUp _vectorDirAndUp; // Throw a global event for mision makers diff --git a/addons/tagging/functions/fnc_moduleInit.sqf b/addons/tagging/functions/fnc_moduleInit.sqf index 8b2d42a010..c9d3172d57 100644 --- a/addons/tagging/functions/fnc_moduleInit.sqf +++ b/addons/tagging/functions/fnc_moduleInit.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ace_tagging_fnc_moduleInit - * * Public: No */ #include "script_component.hpp" @@ -25,4 +22,4 @@ if (!_activated) exitWith {}; [_logic, QGVAR(quickTag), "quickTag"] call EFUNC(common,readSettingFromModule); -INFO("Tagging Module Initialized."); +ACE_LOGINFO("Tagging Module Initialized."); diff --git a/addons/tagging/functions/fnc_tag.sqf b/addons/tagging/functions/fnc_tag.sqf index 4893037117..b6e332e313 100644 --- a/addons/tagging/functions/fnc_tag.sqf +++ b/addons/tagging/functions/fnc_tag.sqf @@ -23,7 +23,7 @@ params [ ]; if (isNull _unit || {_texture == ""}) exitWith { - ERROR_2("Tag parameters invalid. Unit: %1, Texture: %2",_unit,_texture); + ACE_LOGERROR_2("Tag parameters invalid. Unit: %1, Texture: %2",_unit,_texture); }; private _startPosASL = eyePos _unit; @@ -49,11 +49,15 @@ if ((!isNull _object) && { if (_object isKindOf "Static") exitWith {false}; // If the class is not categorized correctly search the cache - private _modelName = (getModelInfo _object) select 0; - private _isStatic = GVAR(cacheStaticModels) getVariable [_modelName, false]; - TRACE_2("Object:",_modelName,_isStatic); + private _array = str(_object) splitString " "; + private _str = toLower (_array select 1); + TRACE_1("Object:",_str); + private _objClass = GVAR(cacheStaticModels) getVariable _str; // If the class in not on the cache, exit - (!_isStatic) + if (isNil "_objClass") exitWith { + false + }; + true }) exitWith { TRACE_1("Pointed object is non static",_object); false @@ -77,7 +81,7 @@ private _v3 = _v2 vectorCrossProduct _v1; TRACE_3("Reference:", _v1, _v2, _v3); -private _fnc_isOk = { +_fnc_isOk = { params ["_rx", "_ry"]; private _startPosASL2 = _touchingPoint vectorAdd (_v2 vectorMultiply _rx) vectorAdd (_v3 vectorMultiply _ry) vectorAdd (_v1 vectorMultiply (-0.06)); private _endPosASL2 = _startPosASL2 vectorAdd (_v1 vectorMultiply (0.12)); diff --git a/addons/tagging/functions/fnc_tagTestingThread.sqf b/addons/tagging/functions/fnc_tagTestingThread.sqf index a21cf69f2b..ead21f8d91 100644 --- a/addons/tagging/functions/fnc_tagTestingThread.sqf +++ b/addons/tagging/functions/fnc_tagTestingThread.sqf @@ -27,13 +27,12 @@ GVAR(tagsToTest) = GVAR(tagsToTest) select { private _intersections = lineIntersectsSurfaces [_tagPosASL, _endPosASL, _tag, objNull, true, 1, "GEOM", "FIRE"]; // If there's no intersections - if (_intersections isEqualTo []) then { + if (_intersections isEqualTo []) exitWith { TRACE_1("No intersections, deleting:",_tag); deleteVehicle _tag; false - } else { - true }; + true }; // If there's no more tag diff --git a/addons/tagging/script_component.hpp b/addons/tagging/script_component.hpp index 0509667dda..5eca5d92d7 100644 --- a/addons/tagging/script_component.hpp +++ b/addons/tagging/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_TAGGING diff --git a/addons/tagging/stringtable.xml b/addons/tagging/stringtable.xml index 4bf5707dcf..6fda8926ce 100644 --- a/addons/tagging/stringtable.xml +++ b/addons/tagging/stringtable.xml @@ -1,104 +1,44 @@ - + Tagging Маркировка - タグ付け - Tagowanie - Markierungssystem - 뿌리기 - Marquage - Marcamento - 喷漆 - 噴漆 Configure how the tagging system will operate by default. Настройка работы системы спрей-маркеров по-умолчанию. - 標準で開くタグ付けシステムの設定を行います。 - Skonfiguruj zachowanie systemu tagowania. - Konfiguriert, wie das Markierungssystem standardmäßig funktioniert. - 뿌리기 시스템의 기본사항을 설정합니다. - Configure le fonctionnement par défaut du système de marquage. - Configura quanto il sistema di marcamento agirà da se. - 定义喷漆系统预设设定. - 定義噴漆系統預設設定. Quick Tag Быстрый маркер - クイック タグ - Szybkie tagowanie - Schnelle Markierung - 빠른 뿌리기 - Marquage rapide - Marcamento Rapido - 快速喷漆 - 快速噴漆 Action performed on main tag interaction point. Действие, выполняемое при выборе главного пункта меню маркировки. - インタラクション ポインにむけてタグ付けをします。 - Akcja wykonywana na głównym punkcie interakcji tagu. - Aktion, die am Haupt-Interaktionspunkt ausgeführt werden soll. - 이 동작은 상호작용에서 뿌리기를 할 수 있게 해준다 - Action réalisé au point de marquage principal. - Azione eseguita sul punto di interazione dei tag principali. - 直接喷漆在互动选单瞄准的点上. - 直接噴漆在互動選單瞄準的點上. Last Used Повторить последний - 最後の使用 - Ostatnio użyte - Zuletzt benutzt - 최근 사용 - Dernier utilisé - Ultimo Usato - 上次最后使用 - 上次最後使用 Random X Случайный Х - 無作為な X印 - Losowy X - Zufällig X - 무작위 X - Aléatoire X - Random X - 随机X标记 - 隨機X標記 Random Случайный - 無作為 - Losowy - Zufällig - 무작위 - Aléatoire - Random - 随机 - 隨機 Tag Markieren Marcar Oznakuj + Tag Marca Označit Marcar Маркер - タグ - 뿌리기 - Tag - 喷漆 - 噴漆 X black @@ -110,10 +50,6 @@ X černě X em preto Черный Х - 黒の X印 - 검정 X - 黑色X标记 - 黑色X標記 X red @@ -125,10 +61,6 @@ X červeně X em vermelho Красный Х - 赤の X印 - 빨간 X - 红色X标记 - 紅色X標記 X green @@ -140,10 +72,6 @@ X zeleně X em verde Зеленый Х - 緑の X印 - 초록 X - 绿色X标记 - 綠色X標記 X blue @@ -155,10 +83,6 @@ X modře X em azul Синий Х - 青の X印 - 파랑 X - 蓝色X标记 - 藍色X標記 Black spray paint @@ -170,10 +94,6 @@ Černý sprej Spray de tinta preta Черный спрей - 黒のスプレー缶 - 검정 스프레이 - 黑色喷漆 - 黑色噴漆 Red spray paint @@ -185,10 +105,6 @@ Červený sprej Spray de tinta vermelha Красный спрей - 赤のスプレー缶 - 빨강 스프레이 - 红色喷漆 - 紅色噴漆 Green spray paint @@ -200,10 +116,6 @@ Zelený sprej Spray de tinta verde Зеленый спрей - 緑のスプレー缶 - 초록 스프레이 - 绿色喷漆 - 綠色噴漆 Blue spray paint @@ -215,25 +127,17 @@ Modrý sprej Spray de tinta azul Синий спрей - 青のスプレー缶 - 파랑 스프레이 - 蓝色喷漆 - 藍色噴漆 A can of spray paint for tagging walls. Eine Farbsprühdose um Wände zu markieren. Lata de pintura en aerosol para marcar. Farba w sprayu, służy do oznakowywania terenu. - Un spray de peinture pour marquer les murs. + Un spray de peinture pour taguer les murs. Una bomboletta di spay per contrassegnare i muri. Plechovka se sprejem k vytváření značek. Uma lata de tinta spray para marcar paredes. Балончик спрея для рисования маркеров на стенах. - スプレー缶は壁にタグ付できます。 - 벽에 뿌릴 수 있는 스프레이캔 입니다. - 喷漆可喷涂在墙壁上. - 噴漆可噴塗在牆壁上. - + \ No newline at end of file diff --git a/addons/thermals/script_component.hpp b/addons/thermals/script_component.hpp index fc3edae09b..c7ac2263ce 100644 --- a/addons/thermals/script_component.hpp +++ b/addons/thermals/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_THERMALS diff --git a/addons/trenches/XEH_preInit.sqf b/addons/trenches/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/trenches/XEH_preInit.sqf +++ b/addons/trenches/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/trenches/config.cpp b/addons/trenches/config.cpp index 3f76f012ed..2b4f3c9051 100644 --- a/addons/trenches/config.cpp +++ b/addons/trenches/config.cpp @@ -17,3 +17,7 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" + +class ACE_newEvents { + interactMenuOpened = "ace_interactMenuOpened"; +}; diff --git a/addons/trenches/functions/fnc_canDigTrench.sqf b/addons/trenches/functions/fnc_canDigTrench.sqf index a99c5c6b60..0cbed2d9b7 100644 --- a/addons/trenches/functions/fnc_canDigTrench.sqf +++ b/addons/trenches/functions/fnc_canDigTrench.sqf @@ -1,6 +1,6 @@ /* * Author: Ruthberg, commy2, esteldunedain - * Checks if a unit can dig a trench. + * Checks if a unit can dig a trench * * Arguments: * 0: Unit @@ -15,8 +15,17 @@ */ #include "script_component.hpp" +#define SURFACE_BLACKLIST ["water", "concrete", "tarmac", "wood", "metal", "roof_tin", "roof_tiles", "wood_int", "concrete_int", "tiles_int", "metal_int", "stony", "rock", "int_concrete", "int_tiles", "int_wood", "tiling", "wavymetal", "int_metal"] + params ["_unit"]; if !("ACE_EntrenchingTool" in items _unit) exitWith {false}; -_unit call EFUNC(common,canDig) +// Can't dig trench if above ground level +if ((getPosATL _unit) select 2 > 0.05) exitWith {false}; + +private _surfaceClass = (surfaceType getPosASL _unit) select [1]; +private _surfaceType = getText (configFile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron"); +TRACE_1("",_surfaceType); + +!(_surfaceType in SURFACE_BLACKLIST) diff --git a/addons/trenches/functions/fnc_handleInteractMenuOpened.sqf b/addons/trenches/functions/fnc_handleInteractMenuOpened.sqf index 5e68b6f60f..91d6b0140b 100644 --- a/addons/trenches/functions/fnc_handleInteractMenuOpened.sqf +++ b/addons/trenches/functions/fnc_handleInteractMenuOpened.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_trenches_fnc_handleInteractMenuOpened - * * Public: No */ #include "script_component.hpp" diff --git a/addons/trenches/functions/fnc_handleKilled.sqf b/addons/trenches/functions/fnc_handleKilled.sqf index 6b57e20c91..e9f0353cb1 100644 --- a/addons/trenches/functions/fnc_handleKilled.sqf +++ b/addons/trenches/functions/fnc_handleKilled.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_trenches_fnc_handleKilled - * * Public: No */ #include "script_component.hpp" diff --git a/addons/trenches/functions/fnc_handlePlayerChanged.sqf b/addons/trenches/functions/fnc_handlePlayerChanged.sqf index f4ebb8e2d5..684ccc22ce 100644 --- a/addons/trenches/functions/fnc_handlePlayerChanged.sqf +++ b/addons/trenches/functions/fnc_handlePlayerChanged.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, kevin] call ace_trenches_fnc_handlePlayerChanged - * * Public: No */ #include "script_component.hpp" diff --git a/addons/trenches/functions/fnc_handlePlayerInventoryChanged.sqf b/addons/trenches/functions/fnc_handlePlayerInventoryChanged.sqf index 11bdef6072..cbae02d07a 100644 --- a/addons/trenches/functions/fnc_handlePlayerInventoryChanged.sqf +++ b/addons/trenches/functions/fnc_handlePlayerInventoryChanged.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob, "weapon"] call ace_trenches_fnc_handlePlayerInverntoryChanged - * * Public: No */ #include "script_component.hpp" diff --git a/addons/trenches/functions/fnc_handleUnconscious.sqf b/addons/trenches/functions/fnc_handleUnconscious.sqf index 3407a5a029..e4fc2814b2 100644 --- a/addons/trenches/functions/fnc_handleUnconscious.sqf +++ b/addons/trenches/functions/fnc_handleUnconscious.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_trenches_fnc_handleUnconscious - * * Public: No */ #include "script_component.hpp" diff --git a/addons/trenches/script_component.hpp b/addons/trenches/script_component.hpp index 338347a1a7..f3e97493e5 100644 --- a/addons/trenches/script_component.hpp +++ b/addons/trenches/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_TRENCHES diff --git a/addons/trenches/stringtable.xml b/addons/trenches/stringtable.xml index 161e3eae39..84cae860a5 100644 --- a/addons/trenches/stringtable.xml +++ b/addons/trenches/stringtable.xml @@ -1,9 +1,9 @@ - + Entrenching Tool - Klappspaten + Schanzzeug Saperka Pala Pala para trincheras @@ -11,25 +11,17 @@ Polní lopatka Ferramenta de trincheira Саперная лопата - シャベル - 야전삽 - 战备锹 - 戰備鍬 Entrenching Tool Saperka, używana do budowy wnęk - Mit dem Klappspaten können Erdwälle oder Gräben ausgehoben werden. + Mit Schanzzeug können Erdwälle oder Gräben ausgehoben werden. Pala Pala para trincheras Outil de tranchée Polní lopatky se používají k zákopovým a jiným pracem. Ferramenta de trincheira Саперная лопата - シャベル - 야전용 삽. 군인들의 영원한 친구 - 战备锹 - 戰備鍬 Envelope - Small @@ -40,10 +32,6 @@ Envelope - petite Trincheira - Pequena Окоп - Малый - 塹壕 - 小型 - 참호 - 소형 - 掩体 - 小 - 掩體 - 小 Small Personal Trench @@ -55,10 +43,6 @@ Malý zákop pro jednoho Trincheira pessoal pequena Малый персональный окоп - 小型の個人用塹壕 - 소형 개인참호 - 小型个人掩体 - 小型個人掩體 Dig Small Trench @@ -70,10 +54,6 @@ Vykopat malý zákop Cavar trincheira pequena Вырыть малый окоп - 小型塹壕を掘る - 소형참호 파기 - 盖小掩体 - 蓋小掩體 Envelope - Big @@ -84,10 +64,6 @@ Enveloppe - grande Trincheira - Grande Окоп - Большой - 塹壕 - 大型 - 참호 - 대형 - 掩体 - 大 - 掩體 - 大 Large Personal Trench @@ -99,10 +75,6 @@ Velký zákop pro jednoho Trincheira pessoal grande Большой персональный окоп - 大型の塹壕を掘る - 대형 참호 - 大型个人掩体 - 大型個人掩體 Dig Big Trench @@ -114,10 +86,6 @@ Vykopat velký zákop Cavar trincheira grande Вырыть большой окоп - 大型の塹壕を掘る - 대형참호 파기 - 盖大掩体 - 蓋大掩體 Confirm Dig @@ -129,10 +97,6 @@ Potvrdit kopání Confirmar excavação Копать - ここに掘る - 여기에 파기 - 确认开工 - 確認開工 Cancel Dig @@ -144,10 +108,6 @@ Zrušit kopání Cancelar excavação Отменить копание - 掘るのを中止 - 취소하기 - 取消动作 - 取消動作 Rotate @@ -160,25 +120,17 @@ Obrót Rotaciona Bращать - 回転 - 돌리기 - 旋转 - 旋轉 Digging Trench Grabe Schützengraben Kopanie wnęki - Scavando la Trincea + Sto Scavando la Trincea Cavando trinchera Creuse la tranchée Vykopat zákop Cavando trincheira Копание окопа - 塹壕を掘っている - 참호 파는중 - 正在盖掩体中 - 正在蓋掩體中 Continue Digging Trench @@ -187,12 +139,6 @@ Continuer à creuser la tranchée Продолжить копание окопа Pokračovat v kopání - 塹壕を掘りつづける - Graben fortsetzen - 계속해서 참호파기 - Continua a Scavare la Trincea - 继续盖掩体 - 繼續蓋掩體 Remove Trench @@ -201,12 +147,6 @@ Retirer la tranchée Убрать окоп Odstranit zákop - 塹壕を消す - Schützengraben entfernen - 참호 제거 - Rimuove Trincea - 移除掩体 - 移除掩體 Removing Trench @@ -215,12 +155,6 @@ Retirement de la tranchée Убирание окопа Odstraňuji zákop - 塹壕を消している - Entferne Schützengraben - 참호 제거중... - Rimuovendo la Trincea - 移除掩体中 - 移除掩體中 - + \ No newline at end of file diff --git a/addons/tripod/XEH_preInit.sqf b/addons/tripod/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/tripod/XEH_preInit.sqf +++ b/addons/tripod/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/tripod/config.cpp b/addons/tripod/config.cpp index 8d068d2d9a..8251e0c469 100644 --- a/addons/tripod/config.cpp +++ b/addons/tripod/config.cpp @@ -17,3 +17,7 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" + +class ACE_newEvents { + interactMenuOpened = "ace_interactMenuOpened"; +}; diff --git a/addons/tripod/functions/fnc_handleInteractMenuOpened.sqf b/addons/tripod/functions/fnc_handleInteractMenuOpened.sqf index 014eed55d4..8c49359d96 100644 --- a/addons/tripod/functions/fnc_handleInteractMenuOpened.sqf +++ b/addons/tripod/functions/fnc_handleInteractMenuOpened.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_tripod_fnc_handleInteractMenuOpened - * * Public: No */ #include "script_component.hpp" diff --git a/addons/tripod/functions/fnc_handleKilled.sqf b/addons/tripod/functions/fnc_handleKilled.sqf index 90dd388617..ee28fc1f45 100644 --- a/addons/tripod/functions/fnc_handleKilled.sqf +++ b/addons/tripod/functions/fnc_handleKilled.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_tripod_fnc_handleKilled - * * Public: No */ #include "script_component.hpp" diff --git a/addons/tripod/functions/fnc_handlePlayerChanged.sqf b/addons/tripod/functions/fnc_handlePlayerChanged.sqf index 3d37b7949f..dd0cad6533 100644 --- a/addons/tripod/functions/fnc_handlePlayerChanged.sqf +++ b/addons/tripod/functions/fnc_handlePlayerChanged.sqf @@ -9,9 +9,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_tripod_fnc_handlePlayerChanged - * * Public: No */ #include "script_component.hpp" diff --git a/addons/tripod/functions/fnc_handleUnconscious.sqf b/addons/tripod/functions/fnc_handleUnconscious.sqf index 0b43bd4b6b..f81cecea58 100644 --- a/addons/tripod/functions/fnc_handleUnconscious.sqf +++ b/addons/tripod/functions/fnc_handleUnconscious.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [bob] call ace_tripod_fnc_handleUnconscious - * * Public: No */ #include "script_component.hpp" diff --git a/addons/tripod/script_component.hpp b/addons/tripod/script_component.hpp index 683cdf042d..28be9b780e 100644 --- a/addons/tripod/script_component.hpp +++ b/addons/tripod/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_TRIPOD diff --git a/addons/tripod/stringtable.xml b/addons/tripod/stringtable.xml index a63bda06b0..a57c6ca51d 100644 --- a/addons/tripod/stringtable.xml +++ b/addons/tripod/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ SSWT Kit SSWT Készlet Kit SSWT - SSWT キット - SSWT 키트 - 狙击手专用三脚架 - 狙擊手專用三腳架 Place SSWT Kit @@ -28,10 +24,6 @@ Place SSWT Kit SSWT készlet elhelyezése Colocar kit SSWT - SSWT キットを置く - SSWT 키트 배치 - 放置狙击手专用三脚架 - 放置狙擊手專用三腳架 Pick up SSWT Kit @@ -44,10 +36,6 @@ SSWT készlet felvétele Подобрать снайперский штатив Prendi Kit SSWT - SSWT キットを拾う - SSWT 키트 줍기 - 捡起狙击手专用三脚架 - 撿起狙擊手專用三腳架 Adjust SSWT Kit @@ -60,10 +48,6 @@ SSWT készlet állítása Выровнять снайперский штатив Aggiusta Kit SSWT - SSWT キットを調節 - SSWT 키트 조절 - 调整狙击手专用三脚架 - 調整狙擊手專用三腳架 Done @@ -76,10 +60,6 @@ Kész Готово Fatto - 完了 - 완료 - 完成 - 完成 adjust @@ -92,10 +72,6 @@ szabályzás подстройка aggiusta - 調節 - 조절 - 调整 - 調整 - + \ No newline at end of file diff --git a/addons/ui/XEH_preInit.sqf b/addons/ui/XEH_preInit.sqf index b937d5d81c..3dee364f02 100644 --- a/addons/ui/XEH_preInit.sqf +++ b/addons/ui/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; GVAR(interfaceInitialized) = false; diff --git a/addons/ui/functions/fnc_compileConfigUI.sqf b/addons/ui/functions/fnc_compileConfigUI.sqf index 3de21d8ff4..8bda2c3ce4 100644 --- a/addons/ui/functions/fnc_compileConfigUI.sqf +++ b/addons/ui/functions/fnc_compileConfigUI.sqf @@ -23,13 +23,13 @@ private _elements = getArray (_x >> "elements"); if (_elements isEqualTo []) then { - ERROR_1("Failed compiling ACE_UI for Element: %1 - missing elements",_class); + ACE_LOGERROR_1("Failed compiling ACE_UI for Element: %1 - missing elements",_class); _failure = true; }; private _location = getNumber (_x >> "location"); if !(_location in [ANYWHERE, GROUND_ONLY, VEHICLE_ONLY]) then { - ERROR_2("Failed compiling ACE_UI for Element: %1 - missing or invalid location %2",_class,_location); + ACE_LOGERROR_2("Failed compiling ACE_UI for Element: %1 - missing or invalid location %2",_class,_location); _failure = true; }; diff --git a/addons/ui/functions/fnc_moduleInit.sqf b/addons/ui/functions/fnc_moduleInit.sqf index 6a3e74aa67..6bfe29392f 100644 --- a/addons/ui/functions/fnc_moduleInit.sqf +++ b/addons/ui/functions/fnc_moduleInit.sqf @@ -9,11 +9,6 @@ * * Return Value: * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_ui_fnc_moduleInit - * - * Public: No */ #include "script_component.hpp" @@ -28,7 +23,7 @@ if (!_activated) exitWith {}; // Basic if (isArray (missionConfigFile >> "showHUD")) then { // HUD visibility is hardcoded in mission config and showHUD command is overriden - INFO("User Interface Module Failed to Initialize Basic settings - showHUD overriden in mission config!"); + ACE_LOGINFO("User Interface Module Failed to Initialize Basic settings - showHUD overriden in mission config!"); } else { [_logic, QGVAR(soldierVehicleWeaponInfo), "soldierVehicleWeaponInfo"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(vehicleRadar), "vehicleRadar"] call EFUNC(common,readSettingFromModule); @@ -68,4 +63,4 @@ if (isArray (missionConfigFile >> "showHUD")) then { [_logic, QGVAR(vehicleDamage), "vehicleDamage"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(vehicleInfoBackground), "vehicleInfoBackground"] call EFUNC(common,readSettingFromModule); -INFO_1("User Interface Module Initialized. Allow client modifications: %1",GVAR(allowSelectiveUI)); +ACE_LOGINFO_1("User Interface Module Initialized. Allow client modifications: %1",GVAR(allowSelectiveUI)); diff --git a/addons/ui/functions/fnc_setAdvancedElement.sqf b/addons/ui/functions/fnc_setAdvancedElement.sqf index 6e931894e6..0e46badd09 100644 --- a/addons/ui/functions/fnc_setAdvancedElement.sqf +++ b/addons/ui/functions/fnc_setAdvancedElement.sqf @@ -40,7 +40,7 @@ if ((_canUseWeapon && {_location == 2}) || {!_canUseWeapon && {_location == 1}}) // Display and print info which component forced the element except for default vehicle check if (_showHint) then { [LSTRING(Disabled), 2] call EFUNC(common,displayTextStructured); - INFO_2("Attempted modification of a forced User Interface element '%1' by '%2'.",_element,_x select 1); + ACE_LOGINFO_2("Attempted modification of a forced User Interface element '%1' by '%2'.",_element,_x select 1); }; _show = false; }; @@ -53,7 +53,7 @@ if (!_force) then { _setElement params ["_sourceSet", "_showSet"]; if (_showHint) then { [LSTRING(Disabled), 2] call EFUNC(common,displayTextStructured); - INFO_2("Attempted modification of a forced User Interface element '%1' by '%2'.",_element,_sourceSet); + ACE_LOGINFO_2("Attempted modification of a forced User Interface element '%1' by '%2'.",_element,_sourceSet); }; _show = _showSet; }; diff --git a/addons/ui/functions/fnc_setElementVisibility.sqf b/addons/ui/functions/fnc_setElementVisibility.sqf index 4cbdf1a0bc..efc73a681e 100644 --- a/addons/ui/functions/fnc_setElementVisibility.sqf +++ b/addons/ui/functions/fnc_setElementVisibility.sqf @@ -26,7 +26,7 @@ params [ ]; if (_source == "" || {_element == ""}) exitWith { - WARNING("Source or Element may not be empty strings!"); + ACE_LOGWARNING("Source or Element may not be empty strings!"); }; _element = toLower _element; @@ -34,7 +34,7 @@ _element = toLower _element; // Verify element is bound private _cachedElement = GVAR(configCache) getVariable _element; if (isNil "_cachedElement") exitWith { - WARNING_2("Element '%1' does not exist - modification by '%2' failed.",_element,_source); + ACE_LOGWARNING_2("Element '%1' does not exist - modification by '%2' failed.",_element,_source); }; private _setElement = GVAR(elementsSet) getVariable _element; @@ -53,7 +53,7 @@ if (isNil "_setElement") then { if (_set) then { if (GVAR(interfaceInitialized)) then { - WARNING_3("Element '%1' already set by '%2' - modification by '%3' failed.",_element,_sourceSet,_source); + ACE_LOGWARNING_3("Element '%1' already set by '%2' - modification by '%3' failed.",_element,_sourceSet,_source); }; } else { TRACE_3("Unsetting element",_sourceSet,_element,_show); diff --git a/addons/ui/script_component.hpp b/addons/ui/script_component.hpp index 11b0d08715..3666ad36c3 100644 --- a/addons/ui/script_component.hpp +++ b/addons/ui/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_UI diff --git a/addons/ui/stringtable.xml b/addons/ui/stringtable.xml index 6f3a3ecc2d..1327630551 100644 --- a/addons/ui/stringtable.xml +++ b/addons/ui/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -7,13 +7,6 @@ Interface do usuário Interface utilisateur Интерфейс - ユーザ インタフェイス - Interfejs użytkownika - Benutzeroberfläche - 사용자 인터페이스 - Interfaccia Utente - 使用者介面 - 使用者介面 User Interface @@ -21,26 +14,12 @@ Interface do usuário Interface utilisateur Пользовательский интерфейс - ユーザ インタフェイス - Interfejs użytkownika - Benutzeroberfläche - 사용자 인터페이스 - Interfaccia Utente - 使用者介面 - 使用者介面 This module allows toggling visible user interface parts. Este módulo permite ligar ou desligar partes da interface do usuário Ce module permet le basculement de parties visibles de l'interface utlisateur Этот модуль позволяет переключать видимость элементов пользовательского интерфейса. - モジュールではユーザ インタフェイスの一部をトグル表示できます。 - Moduł ten pozwala zmienić stan widoczności poszczególnych elementów UI. - Dieses Modul erlaubt es, Teile der Benutzeroberfläche (UI) an- oder auszuschalten. - 이 모듈은 사용자 인터페이스의 부분을 토글하는것을 가능케 해줍니다. - Questo modulo consente di commutare parti di interfaccia utente visibili. - 此模块允许你调整使用者介面的任何一个元件. - 此模塊允許你調整使用者介面的任何一個元件. Allow Selective UI @@ -48,13 +27,6 @@ Permitir IU Selecionável Permettre l'IU selective Включить настраиваемый интерфейс - 選択できるユーザ インタフェイスを有効化します - Zezwól na selektywne UI - Erlaube selektives UI - 선택적 사용자 인터페이스 허가 - Permette l'UI Selettiva - 允许调整使用者介面 - 允許調整使用者介面 Allow client to modify their UI. @@ -62,13 +34,6 @@ Permite o cliente modificar sua IU. Permet aux clients de modifier leur IU Позволить клиентам изменять их пользовательский интерфейс. - クライアントがユーザ インタフェイスを編集できるようにします。 - Zezwól klientowi na modyfikację UI. - Erlaube Clients, ihr UI zu modifizieren. - 클라이언트가 선택적 사용자 인터페이스 사용하는것을 허가합니다 - Permette al client di modificare la propria UI. - 允许客户端自行调整使用者介面. - 允許客戶端自行調整使用者介面. Soldier/Vehicle/Weapon Information @@ -76,13 +41,6 @@ Informação de Soldado/Veículo/Armamento Soldat/Véhicule/Arme/Informations Информация о Солдате/Технике/Оружии - 兵士/車両/武器の情報 - Informacje o żołnierzu/pojeździe/broni - Soldat/Fahrzeug/Waffe Information - 병사/차량/무기 정보 - Informazioni Soldato/Veicolo/Arma - 士兵/载具/武器资讯栏 - 士兵/載具/武器資訊欄 Vehicle Radar @@ -90,13 +48,6 @@ Radar de Veículo Radar de véhicule Радар в технике - 車両のレーダ - Radar w pojeździe - Fahrzeugradar - 차량 레이더 - Rada Veicolo - 载具雷达 - 載具雷達 Vehicle Compass @@ -104,13 +55,6 @@ Bússola de Veículo Compas de véhicule Компас в технике - 車両のレーダ - Kompas w pojeździe - Fahrzeugkompass - 차량 나침반 - Bussola Veicolo - 载具指北针 - 載具指北針 Command Menu @@ -118,13 +62,6 @@ Menu de Comando Menu de commandement Командное меню - 指揮メニュー - Menu dowodzenia - Kommandomenü - 지휘 메뉴 - Menù di Comando - 指挥选单 - 指揮選單 Group Bar @@ -132,13 +69,6 @@ Barra de Grupo Barre de groupe Панель командира - 指揮メニュー - Pasek grupy - Gruppenleiste - 그룹 막대 - Barra del Gruppo - 小队状态栏 - 小隊狀態欄 Weapon Name @@ -146,13 +76,6 @@ Nome do Armamento Nom de l''arme Название оружия - 武器名 - Nazwa broni - Waffenname - 무기 이름 - Nome Arma - 武器名称 - 武器名稱 Weapon Name Background @@ -160,13 +83,6 @@ Fundo do Nome do Armamento Arrière-plan du nom de l'arme Фон названия оружия - 武器名の背景表示 - Tło nazwy broni - Waffenname Hintergrund - 무기 이름 배경 - Nome Sfondo Arma - 武器名称背景 - 武器名稱背景 Firing Mode @@ -174,13 +90,6 @@ Modo de Disparo Mode de tir Режим стрельбы - 射撃モード - Tryb ognia - Feuermodus - 사격 모드 - Modalità di Fuoco - 射击模式 - 射擊模式 Ammo Type @@ -188,13 +97,6 @@ Tipo de Munição Type de munitions Тип боеприпасов - 弾種 - Typ amunicji - Munitionstyp - 탄종 - Tipo Munizioni - 弹药类型 - 彈藥類型 Ammo Count @@ -202,13 +104,6 @@ Quantidade de Munição Nombre de munitions Количество боеприпасов - 弾薬数 - Ilość amunicji - Munitionsanzahl - 탄약수 - Contatore Munizioni - 弹药数量 - 彈藥數量 Magazine Count @@ -216,13 +111,6 @@ Quantidade de Carregadores Nombre de chargeurs Количество магазинов - 弾倉装填数 - Ilość magazynków - Magazinanzahl - 탄창수 - Contatore Caricatore - 弹匣数量 - 彈匣數量 Throwable Type @@ -230,13 +118,6 @@ Tipo de Arremessável Type d'objets de lancer Тип гранаты - 投げる種類 - Typ granatu - Wurfobjekt-Typ - 투척물 종류 - Tipo Lanciabile - 投掷物类型 - 投擲物類型 Throwable Count @@ -244,13 +125,6 @@ Quantidade de Arremessável Nombre d'objets de lancer Количество гранат - 投げられる数 - Ilość granatów - Wurfobjekt-Anzahl - 투척물 개수 - Contatore Lanciabili - 投掷物数量 - 投擲物數量 Zeroing @@ -258,26 +132,12 @@ Zerar a mira Mise à zéro Дальность стрельбы - ゼロイン - Wyzerowanie broni - Nullung - 영점 - Azzeramento - 归零距离 - 歸零距離 Weapon Lower Info Background Informações na parte de baixo do fundo do Armamento Arrière-plan des informations inférieures de l'arme Фон ниформации об оружии снизу - 武器名の背景表示 (下側) - Tło dolnej części informacji o broni - Hintergrund der unteren Waffen-Info-Leiste - 무기 상세 정보 배경 - Informazioni Sfondo Arma Bassa - 武器底部资讯栏背景 - 武器底部資訊欄背景 Stance @@ -285,13 +145,6 @@ Postura Posture Стойка - 姿勢 - Postura - Haltung - 자세 - Postura - 姿态 - 姿態 Stamina Bar @@ -299,143 +152,66 @@ Barra de Energia Barre d'endurance Полоса выносливости - 体力バー - Pasek staminy - Ausdaueranzeige - 체력 막대 - Barra Stamina - 体力栏 - 體力欄 Gunner Weapon Name Nome da arma do fuzileiro Nom de l'arme du tireur Название орудия наводчика - 射手用の武器名 - Nazwa broni strzelca - Richtschütze Waffenname - 사수 무기 명칭 - Nome Arma Artigliere - 炮手武器名称 - 砲手武器名稱 Gunner Weapon Name Background Fundo do nome da arma do fuzileiro Arrière-plan du nom de l'arme (tireur) Фон названия орудия наводчика - 射手用の武器名の背景表示 - Tło nazwy broni strzelca - Richtschütze Waffenname Hintergrund - 사수 무기 명칭 배경 - Nome Sfondo Arma Artigliere - 炮手武器名称背景 - 砲手武器名稱背景 Gunner Firing Mode Modo de disparo do fuzileiro Mode de tir (tireur) Режим стрельбы наводчика - 射手用の発射モード - Tryb ognia strzelca - Richtschütze Feuermodus - 사수 사격 모드 - Modalità di Fuoco Artigliere - 炮手射击模式 - 砲手射擊模式 Gunner Ammo Type Tipo de Munição do fuzileiro Type de munitions (tireur) Тип боеприпасов наводчика - 射手用の弾種 - Typ amunicji strzelca - Richtschütze Munitionstyp - 사수 탄종 - Tipo Munizioni Artigliere - 炮手弹药类型 - 砲手彈藥類型 Gunner Ammo Count Quantidade de Munição do fuzileiro Nombre de munitions (tireur) Количество боеприпасов наводчика - 射手用の弾数 - Ilość amunicji strzelca - Richtschütze Munitionsanzahl - 사수 탄약 수량 - Contatore Munizioni Artigliere - 炮手弹药数量 - 砲手彈藥數量 Gunner Magazine Count Quantidade de Carregadores do fuzileiro Nombre de chargeurs (tireur) Количество магазинов наводчика - 射手用の弾倉数 - Ilość magazynków strzelca - Richtschütze Magazinanzahl - 사수 탄창 수량 - Contatore Caricatore Artigliere - 炮手弹匣数量 - 砲手彈匣數量 Gunner Launchable Type Tipo de Arremessável do fuzileiro Type d'objets jetable ( tireur) Тип пусковой установки наводчика - 射手用のランチャーの種類 - Typ rakiet strzelca - Richtschütze Raketentyp - 사수 발사체 종류 - Tipo Lanciabile Artigliere - 炮手发射物类型 - 砲手發射物類型 Gunner Launchable Count Quantidade de Arremessável do fuzileiro Nombre d'objets jetable (tireur) Количество снарядов пусковой установки наводчика - 射手用のランチャー弾薬数 - Ilość rakiet strzelca - Richtschütze Raketenanzahl - 사수 발사체 수량 - Contatore Lanciabili Artigliere - 炮手发射物数量 - 砲手發射物數量 Gunner Zeroing Zerar a mira do fuzileiro Mise à zéro ( tireur) Дальность стрельбы наводчика - 射手用ゼロイン - Wyzerowanie broni strzelca - Richtschütze Nullung - 사수 영점 - Azzeramento Artigliere - 炮手归零距离 - 砲手歸零距離 Gunner Weapon Lower Info Background Informações na parte de baixo do fundo do Armamento do fuzileiro Arrière-plan des informations inférieures (tireur) Фон ниформации об орудии наводчика снизу - 射手用の武器名の背景表示 (下側) - Tło dolnej części informacji o broni strzelca - Hintergrund der unteren Waffen-Info-Leiste (Richtschütze) - 사수 무기 상세 정보 배경 - Informazioni Sfondo Arma Artigliere Bassa - 炮手武器底部资讯栏背景 - 砲手武器底部資訊欄背景 Vehicle Name @@ -443,13 +219,6 @@ Nome do Veículo Nom du véhicule Название техники - 車両名 - Nazwa pojazdu - Fahrzeugname - 차량 명칭 - Nome Veicolo - 载具名称 - 載具名稱 Vehicle Name Background @@ -457,13 +226,6 @@ Fundo do Nome do Veículo Arrière-plan du nom du véhicule Фон названия техники - 車両名の背景 - Tło nazwy pojazdu - Fahrzeugname Hintergrund - 차량 명칭 배경 - Nome Sfondo Veicolo - 载具名称背景 - 載具名稱背景 Vehicle Fuel Bar @@ -471,13 +233,6 @@ Barra de Combustível do Veículo Barre d'éssence du véhicule Полоса топлива - 車両の給油計 - Pasek paliwa - Fahrzeug-Treibstoffleiste - 차량 연료 막대 - Barra Carburante Veicolo - 载具燃料栏 - 載具燃料欄 Vehicle Speed @@ -485,13 +240,6 @@ Velocidade do Veículo Vitesse du véhicule Скорость техники - 車両の速度計 - Prędkościomierz - Fahrzeuggeschwindigkeit - 차량 속도 - Velocità Veicolo - 载具速度 - 載具速度 Vehicle Altitude @@ -499,13 +247,6 @@ Altitude do Veículo Altitude du véhicule Высота полета - 車両の高度計 - Wysokościomierz radarowy - Fahrzeughöhe - 차량 고도 - Altitudine Veicolo - 载具高度 - 載具高度 Vehicle Damage @@ -513,13 +254,6 @@ Dano do Veículo Dégats du véhicule Повреждение техники - 車両の損傷表示 - Uszkodzenia pojazdu - Fahrzeugschaden - 차량 피해 - Danno Veicolo - 载具伤害 - 載具傷害 Vehicle Info Background @@ -527,13 +261,6 @@ Fundo das informações do veículo Arrière-plan des informations du véhicule Фон информации о технике - 車両状態の背景 - Tło informacji o pojeździe - Fahrzeug Info Hintergrund - 차량 정보 배경 - Informazioni Sfondo Veicolo - 载具资讯栏背景 - 載具資訊欄背景 Requires Soldier/Vehicle/Weapon Information. @@ -541,13 +268,6 @@ Requer informações de Soldado/Veículo/Armamento Requiert les informations de soldat/Vehicule/Arme. Требуется Информация о Солдате/Технике/Оружии. - 兵士/車両/武器の情報を必要とします。 - Wymaga informacji o żołnierzu/pojeździe/broni. - Benötigt Soldat/Fahrzeug/Waffe Information. - 병사/차량/무기의 정보가 필요합니다. - Richiede informazione Soldato/Veicolo/Arma. - 需要士兵/载具/武器的资讯. - 需要士兵/載具/武器的資訊. Modifying User Interface is disabled. @@ -555,26 +275,12 @@ A modificação da interface do usuário está desabilitada. Modifications de l'interface utilisateur désactivé. Изменение пользовательского интерфейса запрещено. - 変更されたユーザ インタフェイスを無効化します。 - Modyfikacja interfejsu użytkownika jest wyłączona. - Die Modifizierung des UI ist deaktiviert. - 사용자 인터페이스 변경이 비활성화 되어있습니다. - La modifica dell'Interfaccia Utente è disabilitata. - 自定使用者介面功能已关闭. - 自定使用者介面功能已關閉. Cannot modify a forced User Interface element. Não é possível modificar um elemento forçado da interface do usuário. - Impossible de modifier un élément de l'interface utilisateur forcé. + Impossible de modifier un élément de l'interface utilisateur forcé Невозможно изменить зафиксированный элемент пользовательского интерфейса. - ユーザー インタフェイス要素は変更できません。 - Nie można modyfikować wymuszonego elementu interfejsu użytkownika. - Gesperrte UI-Elemente können nicht modifiziert werden. - 강제 사용자 인터페이스는 변경하실 수 없습니다. - Impossibile modificare un elemento forzato d' Interfaccia Utente. - 无法编辑已被锁定的使用者介面元件. - 無法編輯已被鎖定的使用者介面元件. - + \ No newline at end of file diff --git a/addons/vector/CfgVehicles.hpp b/addons/vector/CfgVehicles.hpp index 23aa8d7412..f06f79aa12 100644 --- a/addons/vector/CfgVehicles.hpp +++ b/addons/vector/CfgVehicles.hpp @@ -6,15 +6,15 @@ class CfgVehicles { scopeCurator = 2; displayName = CSTRING(VectorName); vehicleClass = "Items"; - class TransportItems { - MACRO_ADDITEM(ACE_Vector,1); + class TransportWeapons { + MACRO_ADDWEAPON(ACE_Vector,1); }; }; class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { - class TransportItems { - MACRO_ADDITEM(ACE_Vector,6); + class TransportWeapons { + MACRO_ADDWEAPON(ACE_Vector,6); }; }; }; diff --git a/addons/vector/XEH_preInit.sqf b/addons/vector/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/vector/XEH_preInit.sqf +++ b/addons/vector/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/vector/config.cpp b/addons/vector/config.cpp index cf6f235a5e..2f2302d9af 100644 --- a/addons/vector/config.cpp +++ b/addons/vector/config.cpp @@ -20,3 +20,7 @@ class CfgPatches { #include "CfgWeapons.hpp" #include "RscInGameUI.hpp" + +class ACE_newEvents { + RangerfinderData = QGVAR(rangefinderData); +}; diff --git a/addons/vector/functions/fnc_adjustBrightness.sqf b/addons/vector/functions/fnc_adjustBrightness.sqf index b31cc5361c..da951322af 100644 --- a/addons/vector/functions/fnc_adjustBrightness.sqf +++ b/addons/vector/functions/fnc_adjustBrightness.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * 0: Number - * - * Return Value: - * None - * - * Example: - * [5] call ace_vector_fnc_adjustBrigthness - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" disableSerialization; diff --git a/addons/vector/functions/fnc_clearDisplay.sqf b/addons/vector/functions/fnc_clearDisplay.sqf index 3ec3ef7eb6..73ef7dfcc6 100644 --- a/addons/vector/functions/fnc_clearDisplay.sqf +++ b/addons/vector/functions/fnc_clearDisplay.sqf @@ -1,19 +1,10 @@ /* - * Author: commy2 - * Clears the vectors control items. - * - * Arguments: - * 0: String - * - * Return Value: - * None - * - * Example: - * [5] call ace_vector_fnc_clearDisplay - * - * Public: No - */ +by commy2 + +Clears the vectors control items. + +*/ #include "script_component.hpp" disableSerialization; diff --git a/addons/vector/functions/fnc_convertToTexturesDegree.sqf b/addons/vector/functions/fnc_convertToTexturesDegree.sqf index a7c81fe669..7e04cfccd2 100644 --- a/addons/vector/functions/fnc_convertToTexturesDegree.sqf +++ b/addons/vector/functions/fnc_convertToTexturesDegree.sqf @@ -1,18 +1,8 @@ -/* - * Author: commy2 - * converts azimuth into array of textures for the vectors scripted info control - * - * Arguments: - * 0: Number - * - * Return Value: - * None - * - * Example: - * [5] call ace_vector_fnc_convertToTexturesDegree - * - * Public: No - */ +/* by commy2 + +converts azimuth into array of textures for the vectors scripted info control + +*/ #include "script_component.hpp" diff --git a/addons/vector/functions/fnc_convertToTexturesDistance.sqf b/addons/vector/functions/fnc_convertToTexturesDistance.sqf index 5bad048022..eb39febfe8 100644 --- a/addons/vector/functions/fnc_convertToTexturesDistance.sqf +++ b/addons/vector/functions/fnc_convertToTexturesDistance.sqf @@ -1,19 +1,8 @@ -/* - * Author: commy2 - * converts rangefinder distance into array of textures for the vectors scripted info control - * - * Arguments: - * 0: Number - * - * Return Value: - * Array - * - * Example: - * [5] call ace_vector_fnc_convertToTexturesDistance - * - * Public: No - */ +/* by commy2 +converts rangefinder distance into array of textures for the vectors scripted info control + +*/ #include "script_component.hpp" diff --git a/addons/vector/functions/fnc_convertToTexturesFOS.sqf b/addons/vector/functions/fnc_convertToTexturesFOS.sqf index 3f5dd9a8da..7a77a3aab8 100644 --- a/addons/vector/functions/fnc_convertToTexturesFOS.sqf +++ b/addons/vector/functions/fnc_convertToTexturesFOS.sqf @@ -1,19 +1,8 @@ -/* - * Author: commy2 - * converts rangefinder distance into array of textures for the vectors scripted info control - * - * Arguments: - * 0: Number - * 1: Number - * - * Return Value: - * Array - * - * Example: - * [5, 6] call ace_vector_fnc_convertToTexturesFOS - * - * Public: No - */ +/* by commy2 + +converts rangefinder distance into array of textures for the vectors scripted info control + +*/ #include "script_component.hpp" diff --git a/addons/vector/functions/fnc_dataTransfer.sqf b/addons/vector/functions/fnc_dataTransfer.sqf index 06eab8803a..f99490f04c 100644 --- a/addons/vector/functions/fnc_dataTransfer.sqf +++ b/addons/vector/functions/fnc_dataTransfer.sqf @@ -3,10 +3,10 @@ * Data transfer over a connected cable. Based on page 14 of pdf. * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * [] call ace_vector_fnc_dataTransfer diff --git a/addons/vector/functions/fnc_getDirection.sqf b/addons/vector/functions/fnc_getDirection.sqf index 4b67cfed28..c34826e218 100644 --- a/addons/vector/functions/fnc_getDirection.sqf +++ b/addons/vector/functions/fnc_getDirection.sqf @@ -1,19 +1,3 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * Array - * - * Example: - * call ace_vector_fnc_getDirection - * - * Public: No - */ - // by commy2 #include "script_component.hpp" diff --git a/addons/vector/functions/fnc_getDistance.sqf b/addons/vector/functions/fnc_getDistance.sqf index d8e5d441df..f1312be511 100644 --- a/addons/vector/functions/fnc_getDistance.sqf +++ b/addons/vector/functions/fnc_getDistance.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * Array - * - * Example: - * call ace_vector_fnc_getDistance - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" #define MIN_DISTANCE 10 diff --git a/addons/vector/functions/fnc_getFallOfShot.sqf b/addons/vector/functions/fnc_getFallOfShot.sqf index 5a0af98a77..365a41518e 100644 --- a/addons/vector/functions/fnc_getFallOfShot.sqf +++ b/addons/vector/functions/fnc_getFallOfShot.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * Array - * - * Example: - * call ace_vector_fnc_getFallOfShot - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" private ["_distanceP1", "_directionP1", "_azimuthP1", "_inclinationP1", "_distanceP2", "_directionP2", "_azimuthP2", "_inclinationP2"]; diff --git a/addons/vector/functions/fnc_getHeightDistance.sqf b/addons/vector/functions/fnc_getHeightDistance.sqf index acae881928..9ec0919917 100644 --- a/addons/vector/functions/fnc_getHeightDistance.sqf +++ b/addons/vector/functions/fnc_getHeightDistance.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * Array - * - * Example: - * call ace_vector_fnc_getHeightDistance - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" private ["_distance", "_direction", "_azimuth", "_inclination"]; diff --git a/addons/vector/functions/fnc_getRelativeAzimuthDistance.sqf b/addons/vector/functions/fnc_getRelativeAzimuthDistance.sqf index a613e2e3ad..765d3d6ec4 100644 --- a/addons/vector/functions/fnc_getRelativeAzimuthDistance.sqf +++ b/addons/vector/functions/fnc_getRelativeAzimuthDistance.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * Array - * - * Example: - * call ace_vector_fnc_getRelativeAzimuthDistance - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" private ["_distanceP1", "_directionP1", "_azimuthP1", "_inclinationP1", "_distanceP2", "_directionP2", "_azimuthP2", "_inclinationP2"]; diff --git a/addons/vector/functions/fnc_getRelativeDistance.sqf b/addons/vector/functions/fnc_getRelativeDistance.sqf index 802a325848..9c6dc38943 100644 --- a/addons/vector/functions/fnc_getRelativeDistance.sqf +++ b/addons/vector/functions/fnc_getRelativeDistance.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * Number - * - * Example: - * call ace_vector_fnc_getRelativeDistance - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" private ["_distanceP1", "_directionP1", "_azimuthP1", "_inclinationP1", "_distanceP2", "_directionP2", "_azimuthP2", "_inclinationP2"]; diff --git a/addons/vector/functions/fnc_getRelativeHeightLength.sqf b/addons/vector/functions/fnc_getRelativeHeightLength.sqf index 3471fce2ca..319b11b6a6 100644 --- a/addons/vector/functions/fnc_getRelativeHeightLength.sqf +++ b/addons/vector/functions/fnc_getRelativeHeightLength.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * Array - * - * Example: - * call ace_vector_fnc_getRelativeHeightLength - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" private ["_distanceP1", "_directionP1", "_azimuthP1", "_inclinationP1", "_distanceP2", "_directionP2", "_azimuthP2", "_inclinationP2"]; diff --git a/addons/vector/functions/fnc_illuminate.sqf b/addons/vector/functions/fnc_illuminate.sqf index 8ecc10690f..03508aae9e 100644 --- a/addons/vector/functions/fnc_illuminate.sqf +++ b/addons/vector/functions/fnc_illuminate.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * 0: String - * - * Return Value: - * None - * - * Example: - * ["5"] call ace_vector_fnc_illuminate - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" disableSerialization; diff --git a/addons/vector/functions/fnc_nextMode.sqf b/addons/vector/functions/fnc_nextMode.sqf index 8e6d596f58..53054e85e6 100644 --- a/addons/vector/functions/fnc_nextMode.sqf +++ b/addons/vector/functions/fnc_nextMode.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * 0: String - * - * Return Value: - * Array - * - * Example: - * ["5"] call ace_vector_fnc_nextMode - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" switch (_this select 0) do { diff --git a/addons/vector/functions/fnc_onKeyDown.sqf b/addons/vector/functions/fnc_onKeyDown.sqf index 194a3b74af..830fb3c3c5 100644 --- a/addons/vector/functions/fnc_onKeyDown.sqf +++ b/addons/vector/functions/fnc_onKeyDown.sqf @@ -1,19 +1,10 @@ /* - * Author: commy2 - * Handles pressing the special vector keys. - * - * Arguments: - * 0: String - * - * Return Value: - * None - * - * Example: - * ["5"] call ace_vector_fnc_onKeyDown - * - * Public: No - */ +by commy2 + +Handles pressing the special vector keys. + +*/ #include "script_component.hpp" // set vector config settings diff --git a/addons/vector/functions/fnc_onKeyHold.sqf b/addons/vector/functions/fnc_onKeyHold.sqf index fdfa22d2b5..3fdd637b61 100644 --- a/addons/vector/functions/fnc_onKeyHold.sqf +++ b/addons/vector/functions/fnc_onKeyHold.sqf @@ -1,20 +1,10 @@ /* - * Author: commy2 - * PFH executed while holding a vector key down. - * - * Arguments: - * 0: String - * 1: Number - * - * Return Value: - * None - * - * Example: - * ["5", 5] call ace_vector_fnc_onKeyHold - * - * Public: No - */ +by commy2 + +PFH executed while holding a vector key down. + +*/ #include "script_component.hpp" if (!((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"])) exitWith { diff --git a/addons/vector/functions/fnc_onKeyUp.sqf b/addons/vector/functions/fnc_onKeyUp.sqf index 6896026b50..fc3d17700e 100644 --- a/addons/vector/functions/fnc_onKeyUp.sqf +++ b/addons/vector/functions/fnc_onKeyUp.sqf @@ -1,19 +1,10 @@ /* - * Author: commy2 - * Handles releasing the special vector keys. - * - * Arguments: - * 0: String - * - * Return Value: - * None - * - * Example: - * ["5"] call ace_vector_fnc_onKeyUp - * - * Public: No - */ +by commy2 + +Handles releasing the special vector keys. + +*/ #include "script_component.hpp" private _fnc_setPFH = { diff --git a/addons/vector/functions/fnc_showAzimuth.sqf b/addons/vector/functions/fnc_showAzimuth.sqf index 59166e1f4c..2bedd4bf52 100644 --- a/addons/vector/functions/fnc_showAzimuth.sqf +++ b/addons/vector/functions/fnc_showAzimuth.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_vector_fnc_showAzimuth - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" disableSerialization; diff --git a/addons/vector/functions/fnc_showAzimuthInclination.sqf b/addons/vector/functions/fnc_showAzimuthInclination.sqf index d6b8740e2a..b00c035890 100644 --- a/addons/vector/functions/fnc_showAzimuthInclination.sqf +++ b/addons/vector/functions/fnc_showAzimuthInclination.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_vector_fnc_showAzimuthInclination - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" disableSerialization; diff --git a/addons/vector/functions/fnc_showCenter.sqf b/addons/vector/functions/fnc_showCenter.sqf index 8142a2c3be..4870b10a69 100644 --- a/addons/vector/functions/fnc_showCenter.sqf +++ b/addons/vector/functions/fnc_showCenter.sqf @@ -1,19 +1,10 @@ /* - * Author: commy2 - * Shows or hides the vectors center square thingy. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_vector_fnc_showCenter - * - * Public: No - */ +by commy2 + +Shows or hides the vectors center square thingy. + +*/ #include "script_component.hpp" ((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1301) ctrlSetText (["", QPATHTOF(rsc\vector_center.paa)] select (_this select 0)); diff --git a/addons/vector/functions/fnc_showDistance.sqf b/addons/vector/functions/fnc_showDistance.sqf index ffabeb9824..380f784bbc 100644 --- a/addons/vector/functions/fnc_showDistance.sqf +++ b/addons/vector/functions/fnc_showDistance.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_vector_fnc_showDistance - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" disableSerialization; diff --git a/addons/vector/functions/fnc_showFallOfShot.sqf b/addons/vector/functions/fnc_showFallOfShot.sqf index 459f1dcaed..b7bed77a0b 100644 --- a/addons/vector/functions/fnc_showFallOfShot.sqf +++ b/addons/vector/functions/fnc_showFallOfShot.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * 0: Unknown - * - * Return Value: - * None - * - * Example: - * [?] call ace_vector_fnc_showFallOfShot - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" GVAR(FOSState) = _this select 0; diff --git a/addons/vector/functions/fnc_showHeightDistance.sqf b/addons/vector/functions/fnc_showHeightDistance.sqf index cbe0b7b86d..b34e8111bc 100644 --- a/addons/vector/functions/fnc_showHeightDistance.sqf +++ b/addons/vector/functions/fnc_showHeightDistance.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_vector_fnc_showHeightDistance - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" disableSerialization; diff --git a/addons/vector/functions/fnc_showP1.sqf b/addons/vector/functions/fnc_showP1.sqf index 3975399bcb..8d509d575f 100644 --- a/addons/vector/functions/fnc_showP1.sqf +++ b/addons/vector/functions/fnc_showP1.sqf @@ -1,19 +1,10 @@ /* - * Author: commy2 - * Shows or hides the 1-P text line. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_vector_fnc_showP1 - * - * Public: No - */ +by commy2 + +Shows or hides the 1-P text line. + +*/ #include "script_component.hpp" disableSerialization; diff --git a/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf b/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf index a9426be05c..95797b9d6c 100644 --- a/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf +++ b/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_vector_fnc_showRelativeAzimuthDistance - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" disableSerialization; diff --git a/addons/vector/functions/fnc_showRelativeDistance.sqf b/addons/vector/functions/fnc_showRelativeDistance.sqf index e0853efa03..74b778d8bf 100644 --- a/addons/vector/functions/fnc_showRelativeDistance.sqf +++ b/addons/vector/functions/fnc_showRelativeDistance.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_vector_fnc_showRelativeDistance - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" disableSerialization; diff --git a/addons/vector/functions/fnc_showRelativeHeightLength.sqf b/addons/vector/functions/fnc_showRelativeHeightLength.sqf index 13bd8061e1..0b9f5c1928 100644 --- a/addons/vector/functions/fnc_showRelativeHeightLength.sqf +++ b/addons/vector/functions/fnc_showRelativeHeightLength.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_vector_fnc_showRelativeHeightLength - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" disableSerialization; diff --git a/addons/vector/functions/fnc_showReticle.sqf b/addons/vector/functions/fnc_showReticle.sqf index aeecfc5ef3..bcd565774f 100644 --- a/addons/vector/functions/fnc_showReticle.sqf +++ b/addons/vector/functions/fnc_showReticle.sqf @@ -1,19 +1,10 @@ /* - * Author: commy2 - * Shows or hides the electronic reticle. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_vector_fnc_showReticle - * - * Public: No - */ +by commy2 + +Shows or hides the electronic reticle. + +*/ #include "script_component.hpp" ((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1302) ctrlSetText (["", QPATHTOF(rsc\vector_crosshair.paa)] select (_this select 0)); diff --git a/addons/vector/functions/fnc_showText.sqf b/addons/vector/functions/fnc_showText.sqf index 66628d8d44..b578269115 100644 --- a/addons/vector/functions/fnc_showText.sqf +++ b/addons/vector/functions/fnc_showText.sqf @@ -1,19 +1,4 @@ -/* - * Author: commy2 - * - * - * Arguments: - * 0: String - * - * Return Value: - * None - * - * Example: - * ["5"] call ace_vector_fnc_showText - * - * Public: No - */ - +// by commy2 #include "script_component.hpp" disableSerialization; diff --git a/addons/vector/script_component.hpp b/addons/vector/script_component.hpp index 15787b140f..091481fbcd 100644 --- a/addons/vector/script_component.hpp +++ b/addons/vector/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_VECTOR diff --git a/addons/vector/stringtable.xml b/addons/vector/stringtable.xml index 76feaa2b5c..fd8d73858c 100644 --- a/addons/vector/stringtable.xml +++ b/addons/vector/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Vector 21 Nite Vector 21 Nite Vector 21 Nite - ベクター 21 ナイト - Vector 21 Nite - Vector 21 Nite - Vector 21 Nite Vector 21 @@ -28,10 +24,6 @@ Vector 21 Vector 21 Vector 21 - ベクター 21 - Vector 21 - Vector 21 - Vector 21 Rangefinder @@ -44,10 +36,6 @@ Távolságmérő Medidor de Distância Дальномер - 測距機器 - 거리측정기 - 测距仪 - 測距儀 Vector - Azimuth Key @@ -60,10 +48,6 @@ Vector - Tecla de Azimute Vector - Irányszög gomb Vector – Азимут - ベクター - 方位角キー - Vector - 방위각 키 - Vector - 方位按键 - Vector - 方位按鍵 Vector - Distance Key @@ -76,10 +60,6 @@ Vector - Tecla de Distância Vector - Távolság gomb Vector – Расстояние - ベクター - 距離キー - Vector - 거리 키 - Vector - 距离按键 - Vector - 距離按鍵 diff --git a/addons/vehiclelock/XEH_preInit.sqf b/addons/vehiclelock/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/vehiclelock/XEH_preInit.sqf +++ b/addons/vehiclelock/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/vehiclelock/config.cpp b/addons/vehiclelock/config.cpp index 454fb4952a..52299ca512 100644 --- a/addons/vehiclelock/config.cpp +++ b/addons/vehiclelock/config.cpp @@ -20,3 +20,8 @@ class CfgPatches { #include "CfgMagazines.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" + +class ACE_newEvents { + VehicleLock_SetVehicleLock = QGVAR(setVehicleLock); + VehicleLock_SetupCustomKey = QGVAR(setupCustomKey); +}; diff --git a/addons/vehiclelock/functions/fnc_lockpick.sqf b/addons/vehiclelock/functions/fnc_lockpick.sqf index 2ce856dd37..bf15a6eadd 100644 --- a/addons/vehiclelock/functions/fnc_lockpick.sqf +++ b/addons/vehiclelock/functions/fnc_lockpick.sqf @@ -51,11 +51,8 @@ if (!([[_unit, _veh]] call _condition)) exitWith {false}; _returnValue = _funcType in ["canLockpick", "startLockpick", "finishLockpick"]; switch (_funcType) do { - case "canLockpick": { - _returnValue = !([_unit, _veh] call FUNC(hasKeyForVehicle)) && {(locked _veh) in [2, 3]}; - }; case "startLockpick": { - [_vehLockpickStrenth, [_unit, _veh, "finishLockpick"], {(_this select 0) call FUNC(lockpick)}, {}, (localize LSTRING(Action_LockpickInUse)), _condition, ["isNotInside"]] call EFUNC(common,progressBar); + [_vehLockpickStrenth, [_unit, _veh, "finishLockpick"], {(_this select 0) call FUNC(lockpick)}, {}, (localize LSTRING(Action_LockpickInUse)), _condition] call EFUNC(common,progressBar); }; case "finishLockpick": { [QGVAR(setVehicleLock), [_veh, false], [_veh]] call CBA_fnc_targetEvent; diff --git a/addons/vehiclelock/script_component.hpp b/addons/vehiclelock/script_component.hpp index 77b7186373..8846951780 100644 --- a/addons/vehiclelock/script_component.hpp +++ b/addons/vehiclelock/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_VEHICLELOCK diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml index 7b39b616de..32e9c762d0 100644 --- a/addons/vehiclelock/stringtable.xml +++ b/addons/vehiclelock/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Открыть машину Sblocca il veicolo Destravar veículo - 車両の鍵を開ける - 차량 잠금열기 - 载具解锁 - 載具解鎖 Lock Vehicle @@ -28,10 +24,6 @@ Закрыть машину Chiudi il veicolo a chiave Travar Veículo - 車両を施錠 - 차량 잠그기 - 载具上锁 - 載具上鎖 Lockpick Vehicle @@ -44,10 +36,6 @@ Взломать замок Scassina veicolo Usar mixa no Veículo - 鍵をこじ開ける - 차량 문따기 - 解锁载具 - 解鎖載具 Picking Lock... @@ -60,10 +48,6 @@ Взламываем замок... Scassino il veicolo... Usando Mixa... - 鍵をこじ開けている・・・ - 문따는중... - 解锁中... - 解鎖中... A custom key that will open a specific vehicle. @@ -76,10 +60,6 @@ Ключ от конкретной машины. Una chiave personalizzata che apre determinati veicoli. Uma chave específica que abre um veículo específico. - カスタム キーは特定車両を開けられます。 - 특정 차량을 여는 특수 열쇠 - 使用指定的钥匙来开启特定的载具. - 使用指定的鑰匙來開啟特定的載具. A Master Key will open any lock, no matter what! @@ -92,10 +72,6 @@ Универсальный ключ, открывающий любой замок. Un passe-partout che apre qualsiasi serratura! Uma chave mestre irá abrir qualquer fechadura, não importa qual! - マスター キーは全ての鍵を開けられます。 - 어떤 차량도 열 수 있는 마스터키 입니다! - 万用解锁钥匙, 能解锁任何载具. - 萬用解鎖鑰匙, 能解鎖任何載具. A lockpick set that can pick the locks of most vehicles. @@ -108,10 +84,6 @@ Набор отмычек, которым можно взломать почти любую машину. Un grimardello per forzare la maggior parte dei veicoli Um set de chave mixas que pode abrir a maioria dos veículos. - ピッキング ツールでは多くの車両をこじ開けられます。 - 거의 모든 차량을 열 수 있게 해주는 해정도구 모음입니다. - 一组解锁钥匙 (可解锁大部份载具). - 一組解鎖鑰匙 (可解鎖大部份載具). A key that should open most WEST vehicles. @@ -124,10 +96,6 @@ Ключ для открытия большинства машин Красных. Una chiave che apre la maggior parte dei veicoli occidentali Uma chave que abre a maioria dos veículos ocidentais - このキーは多くの WEST 車両を開けられます。 - 거의 모든 서방진영 차량을 여는 열쇠입니다. - 一组解锁钥匙 (可解锁大部份蓝方载具). - 一組解鎖鑰匙 (可解鎖大部份藍方載具). A key that should open most EAST vehicle. @@ -140,10 +108,6 @@ Ключ для открытия большинства машин Синих. Una chaive che apre la maggior parte dei veicoli orientali Uma chave que abre a maioria dos veículos orientais - このキーは多くの EAST 車両を開けられます。 - 거의 모든 동방진영 차량을 여는 열쇠입니다. - 一组解锁钥匙 (可解锁大部份红方载具). - 一組解鎖鑰匙 (可解鎖大部份紅方載具). A key that should open most INDEP vehicle. @@ -156,10 +120,6 @@ Ключ для открытия большинства машин Независимых. Una chaive che apre la maggior parte dei veicoli degli indipendenti Uma chave que abre a maioria dos veículos independentes - このキーは多くの INDEP 車両を開けられます。 - 거의 모든 중립진영 차량을 여는 열쇠입니다. - 一组解锁钥匙 (可解锁大部份独立方载具). - 一組解鎖鑰匙 (可解鎖大部份獨立方載具). A key that should open most CIV vehicle. @@ -172,10 +132,6 @@ Ключ для открытия большинства машин Гражданских. Una chaive che apr ela maggior parte dei veicoli civili Uma chave que abre a maioria dos veículos civis. - このキーは多くの CIV 車両を開けられます。 - 거의 모든 민간인 차량을 여는 열쇠입니다 - 一组解锁钥匙 (可解锁大部份平民载具). - 一組解鎖鑰匙 (可解鎖大部份平民載具). Vehicle Lock Setup @@ -188,10 +144,6 @@ Jármű-zár beállítás Запирание транспорта Impostazioni Blocco Veicolo - 車両の施錠の設定 - 차량 잠금 설정 - 载具上锁设置 - 載具上鎖設置 Lock Vehicle Inventory @@ -204,10 +156,6 @@ Jármű rakodótér zárás Закрывать инвентарь транспорта Blocca Inventario Veicolo - 施錠されている車両のインベントリ - 차량 소지품 잠금 - 上锁载具的车箱 - 上鎖載具的車箱 Locks the inventory of locked vehicles @@ -220,10 +168,6 @@ Bezárja a zárt járművek rakterét is Закрывать инвентарь транспорта, если транспорт закрыт Blocca l'inventario di un veicolo bloccato - 施錠されている車両の、開けないインベントリ - 잠긴 차량의 소지품을 뒤지지못하게 합니다. - 上锁载具的车箱, 使玩家不能拿取/查看载具内的装备 - 上鎖載具的車箱, 使玩家不能拿取/查看載具內的裝備 Vehicle Starting Lock State @@ -236,10 +180,6 @@ Jármű kezdő zár-állapot Начальное состояние замков Stato Iniziale del Blocco per Veicoli - 開始時における車両の鍵の状態 - 시작시 차량 잠금 상태 - 载具初始上锁状态 - 載具初始上鎖狀態 Set lock state for all vehicles (removes ambiguous lock states) @@ -252,10 +192,6 @@ Beállítja a zár-állapotot az összes járműhöz (eltávolítja az azonosíthatatlan zárállapotokat) Устанавливает начальное состояние замков всех транспортных средств (устраняет неоднозначные состояния) Imposta lo stato di blocco per tutti i veicoli (rimuove stati di blocco ambigui) - 全車両への鍵の状態を設定します。(あいまいな鍵の状態を削除) - 모든 차량의 잠금 상태를 정합니다. (애매한 잠금 상태는 모두 없앱니다.) - 设定所有载具的初始上锁状态 (移除不明确的锁定状态) - 設定所有載具的初始上鎖狀態 (移除不明確的鎖定狀態) As Is @@ -268,10 +204,6 @@ Úgy-ahogy Как есть Com'è - そのまま - 그대로 - 无变化 - 無變化 Locked @@ -284,10 +216,6 @@ Zárva Закрыт Bloccato - 施錠ずみ - 잠김 - 上锁 - 上鎖 Unlocked @@ -300,10 +228,6 @@ Nyitva Открыт Sbloccato - 開錠ずみ - 열림 - 解锁 - 解鎖 Default Lockpick Strength @@ -316,10 +240,6 @@ Alapértelmezett zártörő-erősség Сила отмычки по-умолчанию Durabilità Default del Grimaldello - ピッキング ツールの標準の有効度 - 기본 해정도구 설정 - 预设开锁能力 - 預設開鎖能力 Default Time to lockpick (in seconds). Default: 10 @@ -332,10 +252,6 @@ Alapértelmezett idő a zárfeltöréshez (másodpercben). Alapértelmezett: 10 Время для взлома замка отмычкой (в секундах). По-умолчанию: 10 Tempo Default richiesto per forzare serrature (in secondi). Default: 10 - ピッキング ツールに標準の時間を設定。(秒) 標準:10 - 해정을 위해 들이는 기본시간입니다(초 단위). 기본설정: 10 - 开锁时间(秒). 预设:10 - 開鎖時間(秒). 預設:10 Settings for lockpick strength and initial vehicle lock state. Removes ambiguous lock states. @@ -348,10 +264,6 @@ Beállítások a zártörő erősségére és alapértelmezett zár-állapotra a járműveken. Eltávolítja az azonosíthatatlan zár-állapotokat. Настройки силы отмычек и начальное состояние замков транспорта. Устраняет неоднозначные состояния замков. Impostazioni per resistenza iniziale delle serrature e stato di blocco dei veicoli. Rimuove stati di blocco ambigui. - ピッキング ツールの強さと車両の鍵の初期状態を設定できます。あいまいな鍵の状態を削除します。 - 해정도구 설정과 시작시 차량의 잠금 상태 그리고 애매한 잠금 상태를 지우는 설정입니다. - 设定开锁能力和初始载具上锁状态. 移除不明确的锁定状态. - 設定開鎖能力和初始載具上鎖狀態. 移除不明確的鎖定狀態. Vehicle Key Assign @@ -364,10 +276,6 @@ Járműkulcs-osztás Назначение ключей от транспорта Assegna Chiavi Veicoli - 車両の鍵を割り当て - 차량 열쇠 등록 - 指定载具钥匙 - 指定載具鑰匙 Sync with vehicles and players. Will handout custom keys to players for every synced vehicle. Only valid for objects present at mission start. @@ -380,10 +288,6 @@ Szinkronizál a járművekkel és játékosokkal. Egyedi kulcsokat oszt ki a játékosoknak minden szinkronizált járműhöz. Csak a küldetés indításakor jelenlévő járművekhez érvényes. Синхронизируйте с транспортом и игроком. Это выдаст игроку ключи от всех синхронизированных транспортных средств. Работает только для объектов, присутствующих на старте миссии Sincronizza con veicoli e giocatori. Distribuirà chiavi ai giocatori per ogni veicolo sincronizzato. Valido solo per oggetti presenti ad inizio missione. - 車両とプレイヤへ同期します。プレイヤへ同期された車両のカスタム キーを作ります。これはミッション開始時に作成されたオブジェクトでのみ有効です。 - 차량과 플레이어에게 동기화됩니다. 동기화된 차량은 플레이어에게 열쇠를 지급합니다. 오직 미션 시작시에 생긴 물체들만 유효합니다. - 可同步在载具与玩家身上. 将使被同步的玩家掌握其他被同步载具的钥匙. 此模块只会在任务刚开始时触发. - 可同步在載具與玩家身上. 將使被同步的玩家掌握其他被同步載具的鑰匙. 此模塊只會在任務剛開始時觸發. diff --git a/addons/vehicles/CfgWeapons.hpp b/addons/vehicles/CfgWeapons.hpp index 78a82abccf..c4d28c3e31 100644 --- a/addons/vehicles/CfgWeapons.hpp +++ b/addons/vehicles/CfgWeapons.hpp @@ -27,7 +27,7 @@ class CfgWeapons { }; class LMG_Minigun: LMG_RCWS { - magazines[] = {"PylonWeapon_2000Rnd_65x39_belt", "1000Rnd_65x39_Belt","1000Rnd_65x39_Belt_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Red","1000Rnd_65x39_Belt_Tracer_Yellow","1000Rnd_65x39_Belt_Yellow","2000Rnd_65x39_Belt","2000Rnd_65x39_Belt_Green","2000Rnd_65x39_Belt_Tracer_Green","2000Rnd_65x39_Belt_Tracer_Green_Splash","2000Rnd_65x39_Belt_Tracer_Red","2000Rnd_65x39_Belt_Tracer_Yellow","2000Rnd_65x39_Belt_Tracer_Yellow_Splash","2000Rnd_65x39_Belt_Yellow","2000Rnd_762x51_Belt_T_Green","2000Rnd_762x51_Belt_T_Red","2000Rnd_762x51_Belt_T_Yellow","200Rnd_65x39_Belt","200Rnd_65x39_Belt_Tracer_Green","200Rnd_65x39_Belt_Tracer_Red","200Rnd_65x39_Belt_Tracer_Yellow","5000Rnd_762x51_Belt","5000Rnd_762x51_Yellow_Belt","500Rnd_65x39_Belt","500Rnd_65x39_Belt_Tracer_Red_Splash","500Rnd_65x39_Belt_Tracer_Green_Splash","500Rnd_65x39_Belt_Tracer_Yellow_Splash"}; + magazines[] = {"1000Rnd_65x39_Belt","1000Rnd_65x39_Belt_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Red","1000Rnd_65x39_Belt_Tracer_Yellow","1000Rnd_65x39_Belt_Yellow","2000Rnd_65x39_Belt","2000Rnd_65x39_Belt_Green","2000Rnd_65x39_Belt_Tracer_Green","2000Rnd_65x39_Belt_Tracer_Green_Splash","2000Rnd_65x39_Belt_Tracer_Red","2000Rnd_65x39_Belt_Tracer_Yellow","2000Rnd_65x39_Belt_Tracer_Yellow_Splash","2000Rnd_65x39_Belt_Yellow","2000Rnd_762x51_Belt_T_Green","2000Rnd_762x51_Belt_T_Red","2000Rnd_762x51_Belt_T_Yellow","200Rnd_65x39_Belt","200Rnd_65x39_Belt_Tracer_Green","200Rnd_65x39_Belt_Tracer_Red","200Rnd_65x39_Belt_Tracer_Yellow","5000Rnd_762x51_Belt","5000Rnd_762x51_Yellow_Belt","500Rnd_65x39_Belt","500Rnd_65x39_Belt_Tracer_Red_Splash","500Rnd_65x39_Belt_Tracer_Green_Splash","500Rnd_65x39_Belt_Tracer_Yellow_Splash"}; }; class HMG_127: LMG_RCWS { diff --git a/addons/vehicles/XEH_preInit.sqf b/addons/vehicles/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/vehicles/XEH_preInit.sqf +++ b/addons/vehicles/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/vehicles/functions/fnc_speedLimiter.sqf b/addons/vehicles/functions/fnc_speedLimiter.sqf index d84bdfff9f..2d445be3c8 100644 --- a/addons/vehicles/functions/fnc_speedLimiter.sqf +++ b/addons/vehicles/functions/fnc_speedLimiter.sqf @@ -28,7 +28,7 @@ if (GVAR(isSpeedLimiter)) exitWith { playSound "ACE_Sound_Click"; GVAR(isSpeedLimiter) = true; -private _maxSpeed = speed _vehicle max 5; +private _maxSpeed = speed _vehicle max 10; [{ params ["_args", "_idPFH"]; diff --git a/addons/vehicles/script_component.hpp b/addons/vehicles/script_component.hpp index 49de85f0ba..d8143e3fdc 100644 --- a/addons/vehicles/script_component.hpp +++ b/addons/vehicles/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_VEHICLES diff --git a/addons/vehicles/stringtable.xml b/addons/vehicles/stringtable.xml index 36ff7f99e6..005bba53a3 100644 --- a/addons/vehicles/stringtable.xml +++ b/addons/vehicles/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Sebességkorlátozó bekapcsolva Limitador de Velocidade Ativo Limitatore Attivo - 速度制限を有効化 - 속도 제한기 켜짐 - 启用速度限制 - 啟用速度限制 Speed Limiter off @@ -28,10 +24,6 @@ Sebességkorlátozó kikapcsolva Limitador de Velocidade Desativado Limitatore Non Attivo - 速度制限を無効化 - 속도 제한기 꺼짐 - 停用速度限制 - 停用速度限制 Speed Limiter @@ -44,10 +36,6 @@ Sebességkorlátozó Limitador de Velocidade Limitatore di Velocità - 速度制限 - 속도 제한기 - 速度限制器 - 速度限制器 - + \ No newline at end of file diff --git a/addons/viewdistance/XEH_preInit.sqf b/addons/viewdistance/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/viewdistance/XEH_preInit.sqf +++ b/addons/viewdistance/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/viewdistance/functions/fnc_initModule.sqf b/addons/viewdistance/functions/fnc_initModule.sqf index 3afd3ccd6a..231cd74c7b 100644 --- a/addons/viewdistance/functions/fnc_initModule.sqf +++ b/addons/viewdistance/functions/fnc_initModule.sqf @@ -9,11 +9,6 @@ * * Return Value: * None - * - * Example: - * [LOGIC; [bob, kevin], true] call ace_viewdistance_fnc_initModule - * - * Public: No */ #include "script_component.hpp" @@ -23,10 +18,10 @@ if (!isServer) exitWith {}; params ["_logic", "_units", "_activated"]; if (!_activated) exitWith { - WARNING("View Distance Limit Module is placed but NOT active."); + ACE_LOGWARNING("View Distance Limit Module is placed but NOT active."); }; [_logic, QGVAR(enabled),"moduleViewDistanceEnabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(limitViewDistance),"moduleViewDistanceLimit"] call EFUNC(common,readSettingFromModule); -INFO_1("View Distance Limit Module Initialized. Limit set by module: %1",GVAR(limitViewDistance)); +ACE_LOGINFO_1("View Distance Limit Module Initialized. Limit set by module: %1",GVAR(limitViewDistance)); diff --git a/addons/viewdistance/script_component.hpp b/addons/viewdistance/script_component.hpp index d02d4ab691..f78bfcbc1c 100644 --- a/addons/viewdistance/script_component.hpp +++ b/addons/viewdistance/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_VIEWDISTANCE diff --git a/addons/viewdistance/stringtable.xml b/addons/viewdistance/stringtable.xml index 9985707422..a0f2bceb68 100644 --- a/addons/viewdistance/stringtable.xml +++ b/addons/viewdistance/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Látótáv-korlátozó Ограничитель дальности видимости Limitatore Distanza Visiva - 視界距離の制限 - 시야 제한기 - 视野距离限制器 - 視野距離限制器 Allows limiting maximum view distance that can be set by players. @@ -28,10 +24,6 @@ Lehetővé teszi a játékosok által a látótávolság maximumának korlátozását. Позволяет ограничить максимальную дальность видимости, которая может быть установлена игроками. Consente di limitare la distanza visiva massima che può essere impostata dai giocatori. - プレイヤーへ最大の視界距離を制限できます。 - 플레이어가 볼 수 있는 최대 시야를 제한합니다. - 允许玩家最大的可视距离. - 允許玩家最大的可視距離. Enable ACE viewdistance @@ -44,10 +36,6 @@ ACE látótávolság engedélyezése Ограничить дальность видимости Abilita distanza visiva ACE - ACE 視界距離を有効化 - ACE 시야 활성화 - 启用ACE视距 - 啟用ACE視距 Enables ACE viewdistance @@ -60,10 +48,6 @@ Engedélyezi az ACE látótávolságot Включает ограничитель дальности видимости ACE Abilita distanza visiva ACE - ACE 視界距離を有効化 - ACE 시야 활성화 - 启用ACE视距 - 啟用ACE視距 View Distance Limit @@ -76,10 +60,6 @@ Látótáv-korlát Дальность видимости Limite Distanza Visiva - 視界距離の制限 - 시야 제한기 - 视野距离限制 - 視野距離限制 Sets the limit for how high clients can raise their view distance (up to 10000) @@ -92,10 +72,6 @@ Korlátozza, mekkora látótávolságot állíthatnak be a kliensek (maximum 10000-ig) Устанавливает предел дальности, насколько клиенты могут увеличить свою дальность видимости (до 10000) Imposta il limite massimo a cui i client possono alzare la propria distanza visiva (massimo 10000) - 各クライアントが最大まで設定できる視界距離を設定します。(最大 10000) - 클라이언트가 최대 얼마나 멀리 볼 수 있는지 제한을 둡니다 (10000 까지 가능) - 设定客户端最高可显示的视野距离 (最高至10000) - 設定客戶端最高可顯示的視野距離 (最高至10000) Limit for client's view distance set here and can overridden by module @@ -108,10 +84,6 @@ A kliens látótávolsága itt állítható be, és felülbírálható modulok által Предел дальности видимости клиентов устанавливается здесь и может быть переопределен модулем Limite per la distanza visiva del client impostato qui e può essere scavalcato dal modulo - クライアントへの視界距離の設定や、それをモジュールにより上書きできます - 클라이언트의 시야를 이 모듈로 치환할 수 있습니다. - 玩家的视距限制可在此设定, 也可透过模块改写 - 玩家的視距限制可在此設定, 也可透過模塊改寫 Client View Distance (On Foot) @@ -124,10 +96,6 @@ Kliens látótáv (gyalog) Дальность видимости (Пешком) Distanza Visiva Client (a Piedi) - クライアント側視界距離 (地上) - 클라이언트 시야 (보병) - 客户端视野距离 (步行) - 客戶端視野距離 (步行) Changes in game view distance when the player is on foot. @@ -140,10 +108,6 @@ Megváltoztatja a játékon belüli látótávolságot, amennyiben a játékos gyalogosan van. Изменяет дальность видимости в игре, когда игрок перемещается пешком. Cambia la distanza visiva in gioco quando il giocatore è a piedi. - プレイヤーが地上にいる時の視界距離を変更します。 - 플레이어가 보병일 경우의 시야를 바꿀 수 있습니다. - 改变玩家步行时的视野距离. - 改變玩家步行時的視野距離. Client View Distance (Land Vehicle) @@ -156,10 +120,6 @@ Kliens látótáv (szárazföldi jármű) Дальность видимости (В наземном трансп.) Distanza Visiva Client (Veicolo Terrestre) - クライアント側視界距離 (車両) - 클라이언트 시야 (차량) - 客户端视野距离 (地面载具) - 客戶端視野距離 (地面載具) Changes in game view distance when the player is in a land vehicle. @@ -172,10 +132,6 @@ Megváltoztatja a játékon belüli látótávolságot, amennyiben a játékos szárazföldi járműben van. Изменяет дальность видимости в игре, когда игрок перемещается в наземном транспорте. Cambia la distanza visiva in gioco quando il giocatore è in un veicolo terrestre. - プレイヤーが車両の時の視界距離を変更します。 - 플레이어가 차량 내부일 경우의 시야를 바꿀 수 있습니다. - 改变玩家于地面载具内时的视野距离. - 改變玩家於地面載具內時的視野距離. Client View Distance (Air Vehicle) @@ -188,10 +144,6 @@ Kliens látótáv (légi jármű) Дальность видимости (В воздушном трансп.) Distanza Visiva Client (Veicoli d'Aria) - クライアント側視界距離 (航空機) - 클라이언트 시야 (항공기) - 客户端视野距离 (空中载具) - 客戶端視野距離 (空中載具) Changes in game view distance when the player is in an air vehicle. @@ -204,10 +156,6 @@ Megváltoztatja a játékon belüli látótávolságot, amennyiben a játékos légi járműben van. Изменяет дальность видимости в игре, когда игрок перемещается в воздушном транспорте. Cambia la distanza visiva in gioco quando il giocatore è in un mezzo aereo. - プレイヤーが航空機に乗っている時の視界距離を変更します。 - 플레이어가 항공기 내부일 경우의 시야를 바꿀 수 있습니다. - 改变玩家于空中载具内时的视野距离. - 改變玩家於空中載具內時的視野距離. Dynamic Object View Distance @@ -220,10 +168,6 @@ Dinamikus objektum-látótáv Динамич. дальность отрисовки объектов Distanza Visiva Oggetti Dinamica - 動的なオブジェクトの描画距離 - 동적 물체 시야 - 动态物件的视野距离 - 動態物件的視野距離 Sets the object view distance as a coefficient of the view distance or based on field of view. FoV Based's lowest and highest value is the value which is set when enabling the option. @@ -236,10 +180,6 @@ Beállítja az objektum-látótávot a megadott látótáv koefficienseként. Устанавливает дальность отрисовки объектов как коэффициент от общей дальности видимости. Imposta la distanza visiva degli oggetti come un coefficiente basato sulla distanza visiva oppure basato sul campo visivo. - 視野角を元にするか、視界距離によるオブジェクト描画距離を決定します。視野角を元にするオプションを有効化した場合、視野角により最低と最高値が変動します。 - 설정된 시야 혹은 시계(FoV)에 계수를 적용해 물체 시야를 적용합니다. 시계를 바탕으로 하는 옵션을 활성화할 경우 시계에 의한 최저와 최고치가 변동됩니다. - 设定物件可被观察的距离, 透过视野距离或是视野角度来决定. - 設定物件可被觀察的距離, 透過視野距離或是視野角度來決定. Off @@ -252,10 +192,6 @@ Kikapcsolva Выкл. Disabilitato - 無効 - 끄기 - 关闭 - 關閉 Very Low @@ -268,10 +204,6 @@ Minimális Очень низкая Molto Basso - 最低 - 매우 낮음 - 非常低 - 非常低 Low @@ -284,10 +216,6 @@ Alacsony Низкая Basso - - 낮음 - - Medium @@ -300,10 +228,6 @@ Közepes Средняя Medio - 通常 - 중간 - - High @@ -316,10 +240,6 @@ Magas Высокая Alto - - 높음 - - Very High @@ -332,10 +252,6 @@ Maximális Очень высокая Molto Alto - 最高 - 매우 높음 - 非常高 - 非常高 FoV Based @@ -347,10 +263,6 @@ Basato su Campo Visivo (FoV) Basada en campo de visión Champ de vision basé - 視野角を元にする - 시계(FoV) - 由视野角度决定 - 由視野角度決定 View Distance: @@ -363,10 +275,6 @@ Látótávolság: Дальность видимости: Distanza Visiva: - 視界距離: - 시야: - 视野距离: - 視野距離: Object View Distance is @@ -379,10 +287,6 @@ Az objektum-látótávolság: Дальность видимости объектов: Distanza Visiva Oggetti è - オブジェクト描画距離は - 동적 물체 시야는 - 物件视野距离为 - 物件視野距離為 That option is invalid! The limit is @@ -395,10 +299,6 @@ Ez a beállítás érvénytelen! A maximum mennyiség Настройка не верна! Текущий предел Questa opzione è invalida! Il limite è - このオプションは無効です!制限は - 이 옵션은 불가능합니다! 제한은 - 该选项是无效的! 限制是 - 該選項是無效的! 限制是 Video Settings @@ -411,10 +311,6 @@ Videobeállítások Видео настройки Impostazioni Video - 映像設定 - 영상 설정 - 影像设定 - 影像設定 diff --git a/addons/weaponselect/XEH_postInit.sqf b/addons/weaponselect/XEH_postInit.sqf index b19059cff1..7020b5dea5 100644 --- a/addons/weaponselect/XEH_postInit.sqf +++ b/addons/weaponselect/XEH_postInit.sqf @@ -72,8 +72,6 @@ if (!hasInterface) exitWith {}; ["ACE3 Weapons", QGVAR(SelectGrenadeFrag), localize LSTRING(SelectGrenadeFrag), { // Conditions: canInteract if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Don't change mode or show hint if advanced throwing is active - if (ACE_player getVariable [QEGVAR(advanced_throwing,inHand), false]) exitWith {false}; // Statement [ACE_player, 1] call FUNC(selectNextGrenade); @@ -85,8 +83,6 @@ if (!hasInterface) exitWith {}; ["ACE3 Weapons", QGVAR(SelectGrenadeOther), localize LSTRING(SelectGrenadeOther), { // Conditions: canInteract if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Don't change mode or show hint if advanced throwing is active - if (ACE_player getVariable [QEGVAR(advanced_throwing,inHand), false]) exitWith {false}; // Statement [ACE_player, 2] call FUNC(selectNextGrenade); diff --git a/addons/weaponselect/XEH_preInit.sqf b/addons/weaponselect/XEH_preInit.sqf index 0335ee5fda..4166247505 100644 --- a/addons/weaponselect/XEH_preInit.sqf +++ b/addons/weaponselect/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; // collect frag and other grenades separately GVAR(GrenadesAll) = []; diff --git a/addons/weaponselect/functions/fnc_putWeaponAway.sqf b/addons/weaponselect/functions/fnc_putWeaponAway.sqf index 0d7e93a429..d2747bf23f 100644 --- a/addons/weaponselect/functions/fnc_putWeaponAway.sqf +++ b/addons/weaponselect/functions/fnc_putWeaponAway.sqf @@ -19,4 +19,4 @@ params ["_unit"]; _unit call EFUNC(common,fixLoweredRifleAnimation); -_unit action ["SwitchWeapon", _unit, _unit, 299]; +_unit action ["SwitchWeapon", _unit, _unit, 99]; diff --git a/addons/weaponselect/functions/fnc_selectWeaponMode.sqf b/addons/weaponselect/functions/fnc_selectWeaponMode.sqf index c0a5f00a8a..80784778de 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponMode.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponMode.sqf @@ -42,7 +42,7 @@ private _mode = _modes select _index; _index = 0; while { - _index < 299 && {currentMuzzle _unit != _muzzle || {currentWeaponMode _unit != _mode}} + _index < 100 && {currentMuzzle _unit != _muzzle || {currentWeaponMode _unit != _mode}} } do { _unit action ["SwitchWeapon", _unit, _unit, _index]; _index = _index + 1; diff --git a/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf b/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf index 3d7f05e954..973d34f7c8 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf @@ -42,7 +42,7 @@ private _muzzle = _muzzles select _index; _index = 0; while { - _index < 299 && {currentMuzzle _unit != _muzzle} + _index < 100 && {currentMuzzle _unit != _muzzle} } do { _unit action ["SwitchWeapon", _unit, _unit, _index]; _index = _index + 1; diff --git a/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf b/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf index 883588ee4b..7435dd30d8 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf @@ -31,7 +31,7 @@ if (_turret isEqualTo [] && {_unit == driver _vehicle}) then { _index = 0; while { - _index < 299 && {currentWeapon _vehicle != _weapon} + _index < 100 && {currentWeapon _vehicle != _weapon} } do { _unit action ["SwitchWeapon", _vehicle, _unit, _index]; _index = _index + 1; @@ -46,7 +46,7 @@ if (_turret isEqualTo [] && {_unit == driver _vehicle}) then { _index = 0; while { - _index < 299 && {_vehicle currentWeaponTurret _turret != _weapon} + _index < 100 && {_vehicle currentWeaponTurret _turret != _weapon} } do { _unit action ["SwitchWeapon", _vehicle, _unit, _index]; _index = _index + 1; diff --git a/addons/weaponselect/functions/fnc_throwGrenade.sqf b/addons/weaponselect/functions/fnc_throwGrenade.sqf index 10a730f504..3f55e02f51 100644 --- a/addons/weaponselect/functions/fnc_throwGrenade.sqf +++ b/addons/weaponselect/functions/fnc_throwGrenade.sqf @@ -20,7 +20,7 @@ TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectil if (_weapon != "Throw") exitWith {}; -private _count = ({_x == _magazine} count uniformItems _unit) + ({_x == _magazine} count vestItems _unit) + ({_x == _magazine} count backpackItems _unit); +private _count = {_x == _magazine} count magazines _unit; [_magazine, _count] call FUNC(displayGrenadeTypeAndNumber); diff --git a/addons/weaponselect/script_component.hpp b/addons/weaponselect/script_component.hpp index 9988a67e94..743d471a2a 100644 --- a/addons/weaponselect/script_component.hpp +++ b/addons/weaponselect/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_WEAPONSELECT diff --git a/addons/weaponselect/stringtable.xml b/addons/weaponselect/stringtable.xml index 94f80158f9..c9a8e43f60 100644 --- a/addons/weaponselect/stringtable.xml +++ b/addons/weaponselect/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Szöveg mutatása gránát eldobásakor Mostra indicazioni nel lancio granate Mostrat texto ao lançar granada - 手榴弾を投げるときに通知 - 수류탄 투척시 화면에 문자 표시 - 投掷手榴弹时显示提示讯息 - 投擲手榴彈時顯示提示訊息 Display a hint or text on grenade throw. @@ -28,10 +24,6 @@ Jelez egy súgót vagy szöveget a gránát eldobásakor. Mostra una notifica quando si lanciano granate Mostra um hint ou texto ao lançar uma granada - 手榴弾を投げるときに、ヒントか文で通知します。 - 수류탄 투척시 화면에 문자나 힌트를 표시합니다. - 投掷手榴弹时显示提示讯息. - 投擲手榴彈時顯示提示訊息. Select Pistol @@ -44,10 +36,6 @@ Pisztoly Kiválasztása Selecionar Pistola Seleziona la Pistola - 拳銃を選択 - 권총 선택 - 选择手枪 - 選擇手槍 Select Rifle @@ -60,10 +48,6 @@ Puska Kiválasztása Selecionar Rifle Seleziona il fucile - 小銃を選択 - 소총 선택 - 选择步枪 - 選擇步槍 Select Launcher @@ -76,10 +60,6 @@ Rakétavető Kiválasztása Selecionar Lançador Seleziona il lanciamissili - ランチャーを選択 - 발사기 선택 - 选择发射器 - 選擇發射器 Select Grenade Launcher @@ -92,10 +72,6 @@ Gránátvető Kiválasztása Selecionar Lança-Granadas Seleziona il lanciagranate - グレネード ランチャーを選択 - 유탄발사기 선택 - 选择榴弹发射器 - 選擇榴彈發射器 Select Binoculars @@ -108,10 +84,6 @@ Távcső Kiválasztása Selecionar Binóculos Seleziona il Binocolo - 双眼鏡を選択 - 망원경 선택 - 选择望远镜 - 選擇望遠鏡 Holster Weapon @@ -124,10 +96,6 @@ Fegyvert tokba Guardar Arma Nascondi l'arma - 武器をしまう - 무기 집어넣기 - 武器套 - 武器套 Engine on @@ -140,10 +108,6 @@ Ligar Motor Motore acceso Включить двигатель - エンジン始動 - 엔진 켜기 - 引擎发动 - 引擎發動 Engine off @@ -156,10 +120,6 @@ Desligar Motor Motore spento Выключить двигатель - エンジン停止 - 엔진 끄기 - 引擎熄火 - 引擎熄火 Select Main Gun @@ -172,10 +132,6 @@ Selecionar Arma Principal Seleziona Arma Primaria Выбрать основное оружие - 主砲を選択 - 주포 선택 - 选择主武器 - 選擇主武器 Select Machine Gun @@ -188,10 +144,6 @@ Selecionar Metralhadora Seleziona Mitragliatrice Выбрать пулемёт - 機関砲を選択 - 기관총 선택 - 选择机枪 - 選擇機槍 Select Missiles @@ -204,10 +156,6 @@ Selecionar Mísseis Seleziona Missili Выбрать ракеты - ミサイルを選択 - 미사일 선택 - 选择导弹 - 選擇導彈 Grenade %1 @@ -220,10 +168,6 @@ Grenade %1 Granata %1 Granada %1 - %1 手榴弾 - %1 수류탄 - 手榴弹 %1 - 手榴彈 %1 Ready Grenade @@ -236,10 +180,6 @@ Grenade prête Granata pronta Granada pronta - 投てきよし - 투척물 준비 - 准备手榴弹 - 準備手榴彈 Select Frag Grenade @@ -252,10 +192,6 @@ Selecionar Granada de Fragmentação Seleziona Granata a Frammentazione Выбрать осколочную гранату - 破片手榴弾を選択 - 살상 투척물 선택 - 选择破片手榴弹 - 選擇破片手榴彈 Select Non-Frag Grenade @@ -268,10 +204,6 @@ Selecionar Granada Seleziona granate non a frammentazione Выбрать гранату - その他の手榴弾を選択 - 비살상 투척물 선택 - 选择非破片手榴弹 - 選擇非破片手榴彈 Throw Selected Grenade @@ -284,10 +216,6 @@ Lançar Granada Selecionada Lancia la Granata Selezionata Бросить выбранную гранату - 選択された手榴弾を投げる - 선택된 투척물 투척 - 投掷选择的手榴弹 - 投擲選擇的手榴彈 No grenades left @@ -300,10 +228,6 @@ Гранат не осталось Granate esaurite Sem mais granadas - もう手榴弾は無い - 투척물 없음 - 已无手榴弹 - 已無手榴彈 No frags left @@ -316,10 +240,6 @@ Não há granadas de fragmentação restantes Nessuna granata a frammentazione rimanente Осколочных гранат нет - もう破片手榴弾は無い - 세열 수류탄 없음 - 已无破片手榴弹 - 已無破片手榴彈 No misc. grenades left @@ -332,10 +252,6 @@ Não há outras granadas restantes Nessun'altra granata rimanente. Нелетальные гранаты закончились - もうその他の手榴弾は無い - 기타 투척물 없음 - 已无其他手榴弹 - 已無其他手榴彈 No grenade selected @@ -348,10 +264,6 @@ Nenhuma granada selecionada Nessuna granata selezionata Нет выбранной гранаты - 手榴弾は選択されていない - 선택된 수류탄 없음 - 未选择手榴弹 - 未選擇手榴彈 Fire Smoke Launcher @@ -364,10 +276,6 @@ Пустить дымовую завесу Lancia fumogeno Lançador de fumaça - 煙幕発射機を発射 - 연막발사기 박사 - 发射烟雾发射器 - 發射煙霧發射器 - + \ No newline at end of file diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf index d2c6f3b7df..569dd87dc4 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -62,9 +62,11 @@ simulWeatherSync; ["ace_settingsInitialized",{ TRACE_1("ace_settingsInitialized eh",GVAR(syncRain)); - // update rain every frame: + //Create a 0 sec delay PFEH to update rain every frame: if (GVAR(syncRain)) then { - addMissionEventHandler ["EachFrame", {0 setRain GVAR(ACE_rain)}]; + [{ + 0 setRain GVAR(ACE_rain); + }, 0, []] call CBA_fnc_addPerFrameHandler; }; //Create a 1 sec delay PFEH to update wind/rain/temp/humidity: diff --git a/addons/weather/XEH_preInit.sqf b/addons/weather/XEH_preInit.sqf index 1b551f133e..f0161c7173 100644 --- a/addons/weather/XEH_preInit.sqf +++ b/addons/weather/XEH_preInit.sqf @@ -3,9 +3,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; // Make sure this data is read before client/server postInit call FUNC(getMapData); diff --git a/addons/weather/functions/fnc_calculateAirDensity.sqf b/addons/weather/functions/fnc_calculateAirDensity.sqf index 61d18d7201..bda8410ddd 100644 --- a/addons/weather/functions/fnc_calculateAirDensity.sqf +++ b/addons/weather/functions/fnc_calculateAirDensity.sqf @@ -23,8 +23,7 @@ _pressure = _pressure * 100; // hPa to Pa if (_relativeHumidity > 0) then { // Saturation vapor pressure calculated according to: http://wahiduddin.net/calc/density_algorithms.htm - // 610.78 gives pressure in Pa - https://en.wikipedia.org/wiki/Density_of_air - private _pSat = 610.78 * 10 ^ ((7.5 * _temperature) / (_temperature + 237.3)); + private _pSat = 6.1078 * 10 ^ ((7.5 * _temperature) / (_temperature + 237.3)); private _vaporPressure = _relativeHumidity * _pSat; private _partialPressure = _pressure - _vaporPressure; diff --git a/addons/weather/functions/fnc_getMapData.sqf b/addons/weather/functions/fnc_getMapData.sqf index 2b222c2d8b..08a6f38568 100644 --- a/addons/weather/functions/fnc_getMapData.sqf +++ b/addons/weather/functions/fnc_getMapData.sqf @@ -15,11 +15,7 @@ */ #include "script_component.hpp" -private _worldName = toLower worldName; -TRACE_1("getting map data",_worldName); - -// Set default values - +// Assume default wind values // Source: https://weatherspark.com/averages/32194/Lemnos-Limnos-North-Aegean-Islands-Greece GVAR(WindSpeedMax) = [[8.8, 5.5], [8.8, 5], [8.6, 4.8], [7.6, 3.4], [7.0, 3.0], [7.1, 3.0], [7.5, 3.1], [8.0, 3.2], [7.6, 3.5], [7.8, 4.6], [7.9, 5.0], [8.2, 5.5]]; GVAR(WindSpeedMean) = [4.8, 4.9, 4.6, 4.1, 3.5, 3.5, 4.3, 4.4, 4.1, 4.5, 4.5, 5.0]; @@ -39,42 +35,23 @@ GVAR(WindDirectionProbabilities) = [ [0.06, 0.37, 0.05, 0.03, 0.18, 0.04, 0.02, 0.02] // December ]; -GVAR(TempDay) = [1, 3, 9, 14, 19, 23, 25, 24, 21, 13, 7, 2]; -GVAR(TempNight) = [-4, -3, 0, 4, 9, 12, 14, 14, 10, 6, 2, -2]; -GVAR(Humidity) = [82, 80, 78, 70, 71, 72, 70, 73, 78, 80, 83, 82]; +// Check if the wind data is defined in the map config +if (isArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMean")) then { + GVAR(WindSpeedMin) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMin"); + GVAR(WindSpeedMean) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMean"); + GVAR(WindSpeedMax) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMax"); + GVAR(WindDirectionProbabilities) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindDirectionProbabilities"); +}; -GVAR(currentTemperature) = 20; -GVAR(currentHumidity) = 0.5; - -// Get all non inherited arrays to filter maps that inherit from Stratis/Altis/Tanoa -private _nonInheritedArrays = configProperties [configFile >> "CfgWorlds" >> _worldName, "isArray _x", false]; -// And check if any custom non-inherited weather is defined through config and use that if so -if ((configFile >> "CfgWorlds" >> _worldName >> "ACE_TempDay") in _nonInheritedArrays) exitWith { - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_TempDay")) then { - GVAR(TempDay) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_TempDay"); - }; - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_TempNight")) then { - GVAR(TempNight) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_TempNight"); - }; - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_Humidity")) then { - GVAR(Humidity) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_Humidity"); - }; - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMin")) then { - GVAR(WindSpeedMin) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMin"); - }; - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMean")) then { - GVAR(WindSpeedMean) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMean"); - }; - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMax")) then { - GVAR(WindSpeedMax) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMax"); - }; - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindDirectionProbabilities")) then { - GVAR(WindDirectionProbabilities) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindDirectionProbabilities"); - }; +// Check if the weather data is defined in the map config +if (isArray (configFile >> "CfgWorlds" >> worldName >> "ACE_TempDay")) exitWith { + GVAR(TempDay) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_TempDay"); + GVAR(TempNight) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_TempNight"); + GVAR(Humidity) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_Humidity"); }; // Check if the map is among the most popular -if (_worldName in ["chernarus", "bootcamp_acr", "woodland_acr", "utes"]) then { +if (toLower worldName in ["chernarus", "bootcamp_acr", "woodland_acr", "utes"]) then { // Source: http://www.iten-online.ch/klima/europa/tschechien/prag.htm GVAR(TempDay) = [1, 3, 9, 14, 19, 23, 25, 24, 21, 13, 7, 2]; GVAR(TempNight) = [-4, -3, 0, 4, 9, 12, 14, 14, 10, 6, 2, -2]; @@ -101,7 +78,7 @@ if (_worldName in ["chernarus", "bootcamp_acr", "woodland_acr", "utes"]) then { ]; }; -if (_worldName in ["takistan", "zargabad", "mountains_acr", "shapur_baf", "provinggrounds_pmc"]) exitWith { +if (toLower worldName in ["takistan", "zargabad", "mountains_acr", "shapur_baf", "provinggrounds_pmc"]) exitWith { // Source: http://www.iten-online.ch/klima/asien/afghanistan/kabul.htm GVAR(TempDay) = [4.5, 5.5, 12.5, 19.2, 24.4, 30.2, 32.1, 32, 28.5, 22.4, 15, 8.3]; GVAR(TempNight) = [-7.1, -5.7, 0.7, 6, 8.8, 12.4, 15.3, 14.3, 9.4, 3.9, -1.2, -4.7]; @@ -128,7 +105,7 @@ if (_worldName in ["takistan", "zargabad", "mountains_acr", "shapur_baf", "provi ]; }; -if (_worldName in ["fallujah"]) exitWith { +if (toLower worldName in ["fallujah"]) exitWith { // Source: http://www.iten-online.ch/klima/asien/irak/bagdad.htm GVAR(TempDay) = [16, 19, 23, 29, 36, 41, 43, 43, 40, 33, 24, 17]; GVAR(TempNight) = [4, 6, 10, 15, 20, 23, 25, 25, 21, 16, 10, 5]; @@ -136,8 +113,8 @@ if (_worldName in ["fallujah"]) exitWith { GVAR(Humidity) = [69, 60, 55, 50, 36, 23, 21, 22, 29, 38, 58, 68]; }; -if (_worldName in ["fata", "abbottabad"]) exitWith { - // Source: http://www.iten-online.ch/klima/asien/pakistan/zhob.htm +if (toLower worldName in ["fata", "Abbottabad"]) exitWith { + // Source: http://www.iten-online.ch/klima/asien/pakistan/zhob.htm GVAR(TempDay) = [12.4, 15.8, 20.8, 26.9, 32.8, 37, 36.8, 35.9, 33.8, 28.2, 22.2, 16.2]; GVAR(TempNight) = [-0.6, 2.4, 7.4, 13.1, 18.2, 22.8, 23.8, 22.9, 19.2, 12, 5.6, 1.2]; // Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Zhob,Pakistan @@ -163,24 +140,24 @@ if (_worldName in ["fata", "abbottabad"]) exitWith { ]; }; -if (_worldName in ["sfp_wamako"]) exitWith { - // Source: http://www.iten-online.ch/klima/afrika/niger/tahoua.htm +if (worldName in ["sfp_wamako"]) exitWith { + // Source: http://www.iten-online.ch/klima/afrika/niger/tahoua.htm GVAR(TempDay) = [33.4, 35, 38.4, 41.5, 41.4, 40, 35.6, 32.9, 35.8, 38.2, 36.4, 33.1]; GVAR(TempNight) = [14.9, 16.3, 20.4, 23.7, 25.8, 24.8, 23.1, 22, 22.6, 21.6, 18.6, 15.3]; // Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Tahoua,Niger GVAR(Humidity) = [68, 60, 57, 50, 32, 22, 20, 21, 25, 38, 58, 69]; }; -if (_worldName in ["sfp_sturko"]) exitWith { - // Source: http://www.iten-online.ch/klima/afrika/niger/tahoua.htm +if (worldName in ["sfp_sturko"]) exitWith { + // Source: http://www.iten-online.ch/klima/afrika/niger/tahoua.htm GVAR(TempDay) = [2.2, 2.4, 5.1, 10.2, 16.1, 20.1, 21.1, 20.9, 17.2, 12.7, 7.4, 3.9]; GVAR(TempNight) = [-2, -2.3, -0.7, 2.6, 7.1, 11.4, 13.1, 12.7, 10, 6.9, 3.1, -0.1]; // Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,karlskrona,Sweden GVAR(Humidity) = [86, 85, 80, 72, 68, 69, 74, 77, 79, 81, 86, 88]; }; -if (_worldName in ["bornholm"]) exitWith { - // Source: http://www.iten-online.ch/klima/afrika/niger/tahoua.htm +if (worldName in ["Bornholm"]) exitWith { + // Source: http://www.iten-online.ch/klima/afrika/niger/tahoua.htm GVAR(TempDay) = [1.9, 1.7, 3.8, 8.1, 14, 18.1, 19.6, 19.8, 16.2, 11.9, 7.3, 3.9]; GVAR(TempNight) = [-1.6, -2.1, -0.7, 1.7, 6.2, 10.7, 13, 13.1, 10.6, 7.2, 3.5, 0.1]; // Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,allinge,Denmark @@ -205,15 +182,15 @@ if (_worldName in ["bornholm"]) exitWith { [0.08, 0.05, 0.06, 0.04, 0.10, 0.14, 0.19, 0.07] // December ]; }; -if (_worldName in ["imrali"]) exitWith { - // Source: http://www.iten-online.ch/klima/europa/tuerkei/bursa.htm +if (worldName in ["Imrali"]) exitWith { + // Source: http://www.iten-online.ch/klima/europa/tuerkei/bursa.htm GVAR(TempDay) = [9.3, 10.7, 13.6, 18.8, 23.5, 28.2, 30.3, 30.2, 27, 21.4, 16.5, 11.8]; GVAR(TempNight) = [1.4, 2.4, 3.7, 7.1, 10.9, 14.3, 16.5, 16.3, 13, 9.5, 6, 3.8]; // Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Bursa,Turkey GVAR(Humidity) = [78, 75, 70, 70, 71, 61, 58, 59, 63, 69, 77, 76]; }; -if (_worldName in ["kunduz"]) exitWith { - // Source: http://www.iten-online.ch/klima/asien/afghanistan/kunduz.htm +if (worldName in ["Kunduz"]) exitWith { + // Source: http://www.iten-online.ch/klima/asien/afghanistan/kunduz.htm GVAR(TempDay) = [6.3, 9.5, 15.8, 23, 29.8, 37.3, 39, 36.9, 31.8, 24.5, 16, 9.7]; GVAR(TempNight) = [-2.4, 0, 5.7, 11.6, 15.7, 20.9, 21.5, 21.5, 16.3, 10.6, 4.1, 0]; // Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Kabul,Afghanistan @@ -238,3 +215,11 @@ if (_worldName in ["kunduz"]) exitWith { [0.04, 0.02, 0.05, 0.14, 0.19, 0.07, 0.10, 0.07] // December ]; }; + +// Assume default values +GVAR(TempDay) = [1, 3, 9, 14, 19, 23, 25, 24, 21, 13, 7, 2]; +GVAR(TempNight) = [-4, -3, 0, 4, 9, 12, 14, 14, 10, 6, 2, -2]; +GVAR(Humidity) = [82, 80, 78, 70, 71, 72, 70, 73, 78, 80, 83, 82]; + +GVAR(currentTemperature) = 20; +GVAR(currentHumidity) = 0.5; diff --git a/addons/weather/functions/fnc_updateHumidity.sqf b/addons/weather/functions/fnc_updateHumidity.sqf index 79569e7367..acd103615b 100644 --- a/addons/weather/functions/fnc_updateHumidity.sqf +++ b/addons/weather/functions/fnc_updateHumidity.sqf @@ -3,10 +3,10 @@ * Updates GVAR(currentHumidity) * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * [] call ace_weather_fnc_updateHumidity diff --git a/addons/weather/functions/fnc_updateRain.sqf b/addons/weather/functions/fnc_updateRain.sqf index eefa72cd99..b073a6a24c 100644 --- a/addons/weather/functions/fnc_updateRain.sqf +++ b/addons/weather/functions/fnc_updateRain.sqf @@ -3,10 +3,10 @@ * Updates rain based on ACE_RAIN_PARAMS * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * [] call ace_weather_fnc_updateRain diff --git a/addons/weather/functions/fnc_updateTemperature.sqf b/addons/weather/functions/fnc_updateTemperature.sqf index 879e061574..6f2d911c15 100644 --- a/addons/weather/functions/fnc_updateTemperature.sqf +++ b/addons/weather/functions/fnc_updateTemperature.sqf @@ -3,10 +3,10 @@ * Updates GVAR(currentTemperature) based on the map data * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * [] call ace_weather_fnc_updateTemperature diff --git a/addons/weather/functions/fnc_updateWind.sqf b/addons/weather/functions/fnc_updateWind.sqf index a179c98dda..72ae0470ba 100644 --- a/addons/weather/functions/fnc_updateWind.sqf +++ b/addons/weather/functions/fnc_updateWind.sqf @@ -3,10 +3,10 @@ * Updates wind, gusts and waves based on ACE_wind * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: * [] call ace_weather_fnc_updateWind diff --git a/addons/weather/script_component.hpp b/addons/weather/script_component.hpp index ea2f61ce8b..7148fa4bb1 100644 --- a/addons/weather/script_component.hpp +++ b/addons/weather/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_WEATHER diff --git a/addons/weather/stringtable.xml b/addons/weather/stringtable.xml index 3849a49b07..908e73ea3d 100644 --- a/addons/weather/stringtable.xml +++ b/addons/weather/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Széladatok mutatása Zobrazit údaje o větru Mostrar informação do vento - 風速を表示 - 바람 정보 표시 - 显示风力资讯 - 顯示風力資訊 Show Wind Info (Toggle) @@ -28,10 +24,6 @@ Széladatok mutatása (pecek) Zobrazit údaje o větru (přep.) Mostrar informação do vento (alternar) - 風速を表示 (トグル) - 바람 정보 표시 (토글) - 显示风力资讯(切换) - 顯示風力資訊(切換) Weather @@ -44,10 +36,6 @@ Időjárás Погода Meteo - 天候 - 기후 - 天气 - 天氣 Multiplayer synchronized ACE weather module @@ -60,10 +48,6 @@ Többjátékos szinkronizált ACE időjárás modul ACE Модуль для синхронизации погоды в мультиплеере Modulo Sincronizzazione Meteo ACE Multiplayer - ACE 天候モジュールではマルチプレイで同期します。 - ACE 기후 모듈과 멀티플레이가 동기화됩니다. - 使用ACE天气模块来同步所有客户端的天气状态(多人游戏) - 使用ACE天氣模塊來同步所有客戶端的天氣狀態(多人遊戲) Weather propagation @@ -76,10 +60,6 @@ Időjárás-változás Единая погода для всех Propagazione Meteo - 天候の統一 - 기후 전파 - 天气状态广播 - 天氣狀態廣播 Enables server side weather propagation @@ -92,10 +72,6 @@ Engedélyezi a szerveroldali időjárás-változást Включает управление погодой на серверной стороне Abilita propagazione meteo lato server - サーバ側による天候の統一を有効化 - 서버의 기후를 전파합니다 - 启用伺服器的天气状态广播 - 啟用伺服器的天氣狀態廣播 ACE Weather @@ -108,10 +84,6 @@ ACE Időjárás Погода ACE Meteo ACE - ACE 天候 - ACE 기후 - ACE 天气 - ACE 天氣 Overrides the default weather (editor, mission settings) with ACE weather (map based) @@ -124,10 +96,6 @@ Felülbírálja az alapértelmezett időjárást (editor, küldetésbeállítások) az ACE időjárással (térkép-alapú) Заменяет погоду по-умолчанию (из редактора, настроек миссии) погодой ACE (на основе карты) Scavalca il meteo default (editor, parametri missione) con il meteo ACE (basato su mappa) - ACE 天候 (マップを元) による標準の天候 (エディタやミッション設定) を上書きします。 - 기존의 기후(에디터, 임무 설정)를 ACE 기후로 치환합니다. (지도에 따라) - 使ACE天气覆盖预设的天气 (编辑任务设置) - 使ACE天氣覆蓋預設的天氣 (編輯任務設置) Sync Rain @@ -140,10 +108,6 @@ Eső szinkronizálása Синхрониз. дождь Sincronizza Pioggia - 降雨の同期 - 비 동기화 - 同步雨 - 同步雨 Synchronizes rain @@ -156,10 +120,6 @@ Szinkronizálja az esőt Синхронизирует дождь Sincronizza Pioggia - 降雨の同期 - 비를 동기화 합니다 - 同步雨 - 同步雨 Sync Wind @@ -172,10 +132,6 @@ Szél szinkronizálása Синхрониз. ветер Sincronizza Vento - 風を同期 - 바람 동기화 - 同步风 - 同步風 Synchronizes wind @@ -188,10 +144,6 @@ Szinkronizálja a szelet Синхронизирует ветер Sincronizza Vento - 風を同期 - 바람을 동기화 합니다 - 同步风 - 同步風 Sync Misc @@ -204,10 +156,6 @@ Egyéb szinkronizálása Синхрониз. прочее Sincronizza Misto - その他を同期 - 기타 동기화 - 同步杂项 - 同步雜項 Synchronizes lightnings, rainbow, fog,... @@ -220,10 +168,6 @@ Szinkronizálja a villámokat, szivárványokat, ködöt,... Синхронизирует молнии, радугу, туман,... Sincronizza lampi, arcobaleni, nebbia,... - ライティングや虹、霧などを同期 - 번개라던가, 무지개, 안개등을 동기화 합니다 - 同步闪电, 彩虹, 雾等等... - 同步閃電, 彩虹, 霧等等... Update Interval @@ -236,10 +180,6 @@ Frissítési intervallum Интервал обновления Intervallo Aggiornamenti - 更新間隔 - 갱신 간격 - 更新间隔 - 更新間隔 Defines the interval (seconds) between weather updates @@ -252,10 +192,6 @@ Megadja az intervallumot (másodpercben) az időjárás-frissítések között Определяет интервал (в секундах) между обновлениями погоды Definisce l'intervallo (in secondi) tra aggiornamenti del meteo - 天候を更新する間隔を定義します。(秒) - 기후를 갱신 하는 간격을 초 단위로 정합니다. - 设定天气更新的时间间隔(秒) - 設定天氣更新的時間間隔(秒) diff --git a/addons/winddeflection/XEH_preInit.sqf b/addons/winddeflection/XEH_preInit.sqf index ad1c47f67c..9104abccdb 100644 --- a/addons/winddeflection/XEH_preInit.sqf +++ b/addons/winddeflection/XEH_preInit.sqf @@ -12,8 +12,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/winddeflection/functions/fnc_handleFired.sqf b/addons/winddeflection/functions/fnc_handleFired.sqf index 2411c608d4..e78620471d 100644 --- a/addons/winddeflection/functions/fnc_handleFired.sqf +++ b/addons/winddeflection/functions/fnc_handleFired.sqf @@ -6,7 +6,7 @@ * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: - * None + * Nothing * * Example: * [clientFiredBIS-XEH] call ace_advanced_ballistics_fnc_handleFired diff --git a/addons/winddeflection/functions/fnc_initModuleSettings.sqf b/addons/winddeflection/functions/fnc_initModuleSettings.sqf index 52847d15ee..037ce15c47 100644 --- a/addons/winddeflection/functions/fnc_initModuleSettings.sqf +++ b/addons/winddeflection/functions/fnc_initModuleSettings.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ace_winddeflection_fnc_initModuelSettings - * * Public: No */ diff --git a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf index 5920bbb3e4..acf8b2a9fa 100644 --- a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf +++ b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf @@ -7,10 +7,9 @@ * 1: airFriction - air friction of the bullet * * Return Value: - * None + * Nothing * * Example: - * [bullet, 2] call ace_winddeflection_fnc_updateTrajectoryPFH * * Public: No */ @@ -19,32 +18,34 @@ [{ // BEGIN_COUNTER(pfeh); + private ["_accel", "_accelRef", "_bulletSpeed", "_bulletVelocity", "_deleted", "_deltaT", "_drag", "_dragRef", "_isWind", "_trueSpeed", "_trueVelocity"]; params ["_args"]; _args params ["_lastTime"]; - private _deltaT = CBA_missionTime - _lastTime; + _deltaT = CBA_missionTime - _lastTime; _args set [0, CBA_missionTime]; - private _isWind = (vectorMagnitude ACE_wind > 0); + _deleted = 0; + _isWind = (vectorMagnitude ACE_wind > 0); { _x params ["_bullet", "_airFriction"]; - private _bulletVelocity = velocity _bullet; - private _bulletSpeedSqr = vectorMagnitudeSqr _bulletVelocity; + _bulletVelocity = velocity _bullet; + _bulletSpeed = vectorMagnitude _bulletVelocity; - if ((!alive _bullet) || {(_bullet isKindOf "BulletBase") && {_bulletSpeedSqr < 10000}}) then { + if ((!alive _bullet) || {(_bullet isKindOf "BulletBase") && {_bulletSpeed < 100}}) then { GVAR(trackedBullets) deleteAt (GVAR(trackedBullets) find _x); } else { if (_isWind) then { - private _trueVelocity = _bulletVelocity vectorDiff ACE_wind; - private _trueSpeed = vectorMagnitude _trueVelocity; + _trueVelocity = _bulletVelocity vectorDiff ACE_wind; + _trueSpeed = vectorMagnitude _trueVelocity; - private _dragRef = _deltaT * _airFriction * _bulletSpeedSqr; - private _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef); + _dragRef = _deltaT * _airFriction * _bulletSpeed * _bulletSpeed; + _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef); _bulletVelocity = _bulletVelocity vectorDiff _accelRef; - private _drag = _deltaT * _airFriction * _trueSpeed; - private _accel = _trueVelocity vectorMultiply (_drag); + _drag = _deltaT * _airFriction * _trueSpeed; + _accel = _trueVelocity vectorMultiply (_drag); _bulletVelocity = _bulletVelocity vectorAdd _accel; }; _bullet setVelocity _bulletVelocity; diff --git a/addons/winddeflection/script_component.hpp b/addons/winddeflection/script_component.hpp index d1a0c96c68..10deceddd8 100644 --- a/addons/winddeflection/script_component.hpp +++ b/addons/winddeflection/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_WINDDEFLECTION diff --git a/addons/winddeflection/stringtable.xml b/addons/winddeflection/stringtable.xml index a9290c8ab0..6cb4858d21 100644 --- a/addons/winddeflection/stringtable.xml +++ b/addons/winddeflection/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Szélinformáció Informazioni sul vento Informação do vento - 風の情報 - 바람 정보 - 风力资讯 - 風力資訊 Direction: %1 @@ -28,10 +24,6 @@ Irány: %1 Direzione: %1° Direção: %1 - 風向: %1 - 방향: %1 - 风向: %1 - 風向: %1 Speed: %1 m/s @@ -44,10 +36,6 @@ Sebesség: %1 m/s Velocità: %1 m/s Velocidade: %1 m/s - 風速: %1 m/s - 풍속: %1 m/s - 风速: %1 m/s - 風速: %1 m/s Weather Information @@ -60,10 +48,6 @@ Időjárás-Információ Meteo Informação Meteorológica - 天候の情報 - 기상 정보 - 天气资讯 - 天氣資訊 Humidity: %1% @@ -76,10 +60,6 @@ Páratartalom: %1% Umidità: %1% Humidade: %1% - 湿度: %1% - 습도: %1% - 湿度: %1% - 濕度: %1% Wind Deflection @@ -92,10 +72,6 @@ Szél-hárítás Отклонение ветром Deviazione del Vento - 風向による変化 - 풍향 변화 - 风偏 - 風偏 Wind Deflection @@ -108,10 +84,6 @@ Szél-hárítás Отклонение ветром Deviazione del Vento - 風向による変化 - 풍향 변화 - 风偏 - 風偏 Enables wind deflection @@ -124,10 +96,6 @@ Engedélyezi a szél-hárítást Включает отклонение ветром Abilita deviazione del vento - 風向による変化を有効化 - 풍향 변화를 적용합니다 - 开启风偏效果 - 開啟風偏效果 Vehicle Enabled @@ -140,10 +108,6 @@ Jármű engedélyezve Для техники Abilita per Veicoli - 車両へ有効化 - 차량 적용 - 启用风偏给载具 - 啟用風偏給載具 Enables wind deflection for static/vehicle gunners @@ -156,10 +120,6 @@ Engedélyezi a szél-hárítást a statikus/jármű-lövészeknél Включает отклонение ветром для стрелков стационарных орудий и техники Abilita deviazione del vento per artiglieri di statiche/veicoli - 重火器や車両へ、風による変化を有効化 - 차량이나 거치식 무기 사수에게 풍향 변화를 적용합니다 - 使风偏作用在固定式武器与载具炮手身上 - 使風偏作用在固定式武器與載具砲手身上 Simulation Interval @@ -172,10 +132,6 @@ Szimulációs intervallum Интервал симуляции Intervallo Simulazione - シミュレーションの間隔 - 재현 간격 - 模拟间隔 - 模擬間隔 Defines the interval between every calculation step @@ -188,10 +144,6 @@ Megszabja a számítási lépések közötti intervallumot Определяет временной интервал между расчетами Definisce l'intervallo tra ogni passaggio di calcolo - 各計算に適用させる間隔を定義します - 매 계산마다의 간격을 정의합니다 - 定义每个计算之间的时间间隔 - 定義每個計算之間的時間間隔 Simulation Radius @@ -204,10 +156,6 @@ Szimulációs hatókör Радиус симуляции Raggio Simulazione - シミュレーション半径 - 재현 범위 - 模拟半径 - 模擬半徑 Defines the radius around the player (in meters) at which projectiles are wind deflected @@ -220,10 +168,6 @@ Meghatározza a játékos körüli hatókört (méterben), ahol a lövedékeket háríthatja a szél Определяет радиус вокруг игрока (а метрах), в котором снаряды отклоняются ветром Definisce il raggio attorno al giocatore (in metri) dove viene applicata la deviazione del vento ai proiettili - プレイヤーの周囲に適用させる風による弾道の変化の半径を定義します (メートル) - 플레이어 주위로 발사체가 풍향 변화의 영향을 받는 범위를 정합니다 (미터) - 定义玩家多少半径范围内(单位公尺)子弹会受到风偏的引响 - 定義玩家多少半徑範圍內(單位公尺)子彈會受到風偏的引響 Wind influence on projectiles trajectory @@ -236,10 +180,6 @@ Szél hatása a lövedékek röppályájára Влияние втера на траекторию снарядов Influenza del vento sulla traiettoria dei proiettili - 風が弾道へ影響させます - 발사체의 궤도에 풍향 변화를 줍니다. - 风力的大小会引响到弹道的轨迹 - 風力的大小會引響到彈道的軌跡 - + \ No newline at end of file diff --git a/addons/yardage450/CfgVehicles.hpp b/addons/yardage450/CfgVehicles.hpp index 2dc52de68a..d8f2ccabe3 100644 --- a/addons/yardage450/CfgVehicles.hpp +++ b/addons/yardage450/CfgVehicles.hpp @@ -6,15 +6,15 @@ class CfgVehicles { scopeCurator = 2; displayName = CSTRING(DisplayName); vehicleClass = "Items"; - class TransportItems { - MACRO_ADDITEM(ACE_Yardage450,1); + class TransportWeapons { + MACRO_ADDWEAPON(ACE_Yardage450,1); }; }; class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { - class TransportItems { - MACRO_ADDITEM(ACE_Yardage450,4); + class TransportWeapons { + MACRO_ADDWEAPON(ACE_Yardage450,4); }; }; }; diff --git a/addons/yardage450/XEH_preInit.sqf b/addons/yardage450/XEH_preInit.sqf index b47cf6628d..a7feade1c3 100644 --- a/addons/yardage450/XEH_preInit.sqf +++ b/addons/yardage450/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; ADDON = true; diff --git a/addons/yardage450/functions/fnc_acquireTarget.sqf b/addons/yardage450/functions/fnc_acquireTarget.sqf index d3709186c9..a7e56e815d 100644 --- a/addons/yardage450/functions/fnc_acquireTarget.sqf +++ b/addons/yardage450/functions/fnc_acquireTarget.sqf @@ -3,13 +3,12 @@ * Fires the laser to acquire the target * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: - * call ace_yardage450_fnc_acquireTarget * * Public: No */ @@ -34,7 +33,7 @@ GVAR(distanceIndex) = -1; [_this select 1] call CBA_fnc_removePerFrameHandler; }; - _result = [eyePos ACE_player, ACE_player weaponDirection (currentWeapon ACE_player), ACE_player] call EFUNC(laser,shootRay); + _result = [eyePos ACE_player, ACE_player weaponDirection (currentWeapon ACE_player)] call EFUNC(laser,shootRay); _distance = _result select 1; _distance = _distance - 1 + (random 2); diff --git a/addons/yardage450/functions/fnc_turnOn.sqf b/addons/yardage450/functions/fnc_turnOn.sqf index 28e9c1da2d..a56bddb016 100644 --- a/addons/yardage450/functions/fnc_turnOn.sqf +++ b/addons/yardage450/functions/fnc_turnOn.sqf @@ -3,13 +3,12 @@ * Shows the Yardage 450 screen elements * * Arguments: - * None + * Nothing * * Return Value: - * None + * Nothing * * Example: - * call ace_yardage450_fnc_acquireTarget * * Public: No */ diff --git a/addons/yardage450/script_component.hpp b/addons/yardage450/script_component.hpp index 5aed3a836c..bb901a9b50 100644 --- a/addons/yardage450/script_component.hpp +++ b/addons/yardage450/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_YARDAGE450 diff --git a/addons/yardage450/stringtable.xml b/addons/yardage450/stringtable.xml index 6ab95aff7f..c9f1c94b1b 100644 --- a/addons/yardage450/stringtable.xml +++ b/addons/yardage450/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Yardage 450 Yardage 450 Yardage 450 - ヤードエイジ 450 - Yardage 450 - Yardage 450 - Yardage 450 Laser Rangefinder @@ -28,10 +24,6 @@ Лазерный дальномер Distanziometro Laser Télémètre laser - レーザー測距機 - 레이저 거리측정기 - 雷射测距仪 - 雷射測距儀 Yardage 450 - Power Button @@ -44,10 +36,6 @@ Yardage 450 - Кнопка питания Yardage 450 - Bottone Accensione Yardage 450 - bouton d'alimentation - ヤードエイジ 450 - 起動ボタン - Yardage 450 - 전원 버튼 - Yardage 450 - 电源按钮 - Yardage 450 - 電源按鈕 diff --git a/addons/zeus/CfgFactionClasses.hpp b/addons/zeus/CfgFactionClasses.hpp deleted file mode 100644 index 7d758adfc0..0000000000 --- a/addons/zeus/CfgFactionClasses.hpp +++ /dev/null @@ -1,27 +0,0 @@ -class CfgFactionClasses { - class GVAR(AI) { - displayName = "ACE AI"; - priority = 2; - side = 7; - }; - class GVAR(Captive) { - displayName = "ACE Captive"; - priority = 2; - side = 7; - }; - class GVAR(Medical) { - displayName = "ACE Medical"; - priority = 2; - side = 7; - }; - class GVAR(Repair) { - displayName = "ACE Repair"; - priority = 2; - side = 7; - }; - class GVAR(Utility) { - displayName = "ACE Utility"; - priority = 2; - side = 7; - }; -}; diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index 9918764462..4ab9ad871c 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -86,7 +86,6 @@ class CfgVehicles { class GVAR(moduleBase): Module_F { author = ECSTRING(common,ACETeam); category = "ACE"; - function = QEFUNC(common,dummy); functionPriority = 1; isGlobal = 1; isTriggerActivated = 0; @@ -95,135 +94,84 @@ class CfgVehicles { }; class GVAR(moduleAddSpareTrack): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(Repair); displayName = CSTRING(ModuleAddSpareTrack_DisplayName); function = QFUNC(moduleAddSpareTrack); icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);//@todo }; class GVAR(moduleAddSpareWheel): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(Repair); displayName = CSTRING(ModuleAddSpareWheel_DisplayName); function = QFUNC(moduleAddSpareWheel); icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);//@todo }; - class GVAR(moduleAddOrRemoveFRIES): GVAR(moduleBase) { - curatorCanAttach = 1; - category = QGVAR(Utility); - displayName = CSTRING(ModuleAddOrRemoveFRIES_DisplayName); - function = QFUNC(moduleAddOrRemoveFRIES); - }; class GVAR(moduleCaptive): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(Captive); displayName = CSTRING(ModuleCaptive_DisplayName); function = QFUNC(moduleCaptive); icon = QPATHTOF(UI\Icon_Module_Zeus_Captive_ca.paa); }; class GVAR(moduleDefendArea): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(AI); displayName = CSTRING(ModuleDefendArea_DisplayName); curatorInfoType = QGVAR(RscDefendArea); }; - class GVAR(moduleEditableObjects): GVAR(moduleBase) { - curatorCanAttach = 1; - category = QGVAR(Utility); - displayName = CSTRING(ModuleEditableObjects_DisplayName); - curatorInfoType = QGVAR(RscEditableObjects); - }; class GVAR(moduleGlobalSetSkill): GVAR(moduleBase) { - category = QGVAR(AI); displayName = CSTRING(ModuleGlobalSetSkill_DisplayName); curatorInfoType = QGVAR(RscGlobalSetSkill); }; class GVAR(moduleGroupSide): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(Utility); displayName = CSTRING(ModuleGroupSide_DisplayName); curatorInfoType = QGVAR(RscGroupSide); }; class GVAR(modulePatrolArea): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(AI); displayName = CSTRING(ModulePatrolArea_DisplayName); curatorInfoType = QGVAR(RscPatrolArea); }; class GVAR(moduleSearchArea): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(AI); displayName = CSTRING(ModuleSearchArea_DisplayName); curatorInfoType = QGVAR(RscSearchArea); }; class GVAR(moduleSearchNearby): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(AI); displayName = CSTRING(ModuleSearchNearby_DisplayName); function = QFUNC(moduleSearchNearby); }; - class GVAR(moduleSuppressiveFire): GVAR(moduleBase) { - curatorCanAttach = 1; - category = QGVAR(AI); - displayName = CSTRING(ModuleSuppressiveFire_DisplayName); - function = QFUNC(moduleSuppressiveFire); - }; class GVAR(moduleSetMedic): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(Medical); displayName = CSTRING(ModuleSetMedic_DisplayName); function = QFUNC(moduleSetMedic); icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa); }; class GVAR(moduleSetMedicalFacility): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(Medical); displayName = CSTRING(ModuleSetMedicalFacility_DisplayName); function = QFUNC(moduleSetMedicalFacility); icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa); }; class GVAR(moduleSetMedicalVehicle): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(Medical); displayName = CSTRING(ModuleSetMedicalVehicle_DisplayName); function = QFUNC(moduleSetMedicalVehicle); icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa); }; - class GVAR(moduleSimulation): GVAR(moduleBase) { - curatorCanAttach = 1; - category = QGVAR(Utility); - displayName = CSTRING(ModuleSimulation_DisplayName); - function = QFUNC(moduleSimulation); - }; class GVAR(moduleSurrender): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(Captive); displayName = CSTRING(ModuleSurrender_DisplayName); function = QFUNC(moduleSurrender); icon = QPATHTOF(UI\Icon_Module_Zeus_Surrender_ca.paa); }; class GVAR(moduleTeleportPlayers): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(Utility); displayName = CSTRING(ModuleTeleportPlayers_DisplayName); curatorInfoType = QGVAR(RscTeleportPlayers); }; class GVAR(moduleUnconscious): GVAR(moduleBase) { curatorCanAttach = 1; - category = QGVAR(Medical); displayName = CSTRING(ModuleUnconscious_DisplayName); function = QFUNC(moduleUnconscious); icon = QPATHTOF(UI\Icon_Module_Zeus_Unconscious_ca.paa); }; - class GVAR(AddFullArsenal): GVAR(moduleBase) { - curatorCanAttach = 1; - category = QGVAR(Utility); - displayName = CSTRING(moduleAddFullArsenal_displayName); - function = QFUNC(moduleAddArsenal); - }; - class GVAR(RemoveFullArsenal): GVAR(moduleBase) { - curatorCanAttach = 1; - category = QGVAR(Utility); - displayName = CSTRING(moduleRemoveArsenal_displayName); - function = QFUNC(moduleRemoveArsenal); - }; }; diff --git a/addons/zeus/XEH_PREP.hpp b/addons/zeus/XEH_PREP.hpp index a3f269f638..eb70a8529d 100644 --- a/addons/zeus/XEH_PREP.hpp +++ b/addons/zeus/XEH_PREP.hpp @@ -4,33 +4,24 @@ PREP(bi_moduleCurator); PREP(bi_moduleMine); PREP(bi_moduleProjectile); PREP(bi_moduleRemoteControl); -PREP(getModuleDestination); PREP(handleZeusUnitAssigned); -PREP(moduleAddArsenal); PREP(moduleAddSpareTrack); PREP(moduleAddSpareWheel); -PREP(moduleAddOrRemoveFRIES); PREP(moduleCaptive); PREP(moduleGlobalSetSkill); PREP(moduleGroupSide); -PREP(moduleRemoveArsenal); PREP(moduleSearchNearby); PREP(moduleSetMedic); PREP(moduleSetMedicalVehicle); PREP(moduleSetMedicalFacility); -PREP(moduleSimulation); -PREP(moduleSuppressiveFire); -PREP(moduleSuppressiveFireLocal); PREP(moduleSurrender); PREP(moduleTeleportPlayers); PREP(moduleUnconscious); PREP(moduleZeusSettings); -PREP(showMessage); PREP(ui_attributeCargo); //PREP(ui_attributePosition); PREP(ui_attributeRadius); PREP(ui_defendArea); -PREP(ui_editableObjects); PREP(ui_globalSetSkill); PREP(ui_groupSide); PREP(ui_patrolArea); diff --git a/addons/zeus/XEH_postInit.sqf b/addons/zeus/XEH_postInit.sqf index adf3d75a9b..9062ae5e9a 100644 --- a/addons/zeus/XEH_postInit.sqf +++ b/addons/zeus/XEH_postInit.sqf @@ -2,7 +2,7 @@ ["ace_settingsInitialized",{ // Only add an InitPost EH if setting is enabled (and apply retroactively) - if (isServer && {GVAR(autoAddObjects)}) then { + if (isServer && GVAR(autoAddObjects)) then { ["AllVehicles", "InitPost", FUNC(addObjectToCurator), true, [], true] call CBA_fnc_addClassEventHandler; }; }] call CBA_fnc_addEventHandler; @@ -10,33 +10,7 @@ // Global skill module PVs values for persistence, just listen for the PV QGVAR(GlobalSkillAI) addPublicVariableEventHandler FUNC(moduleGlobalSetSkill); -[QGVAR(moveToRespawnPosition), BIS_fnc_moveToRespawnPosition] call CBA_fnc_addEventHandler; [QGVAR(moduleDefendArea), CBA_fnc_taskDefend] call CBA_fnc_addEventHandler; [QGVAR(modulePatrolArea), CBA_fnc_taskPatrol] call CBA_fnc_addEventHandler; [QGVAR(moduleSearchNearby), CBA_fnc_searchNearby] call CBA_fnc_addEventHandler; [QGVAR(moduleSearchArea), CBA_fnc_taskSearchArea] call CBA_fnc_addEventHandler; -[QGVAR(suppressiveFire), LINKFUNC(moduleSuppressiveFireLocal)] call CBA_fnc_addEventHandler; - -// Editable object commands must be ran on server, this events are used in the respective module -if (isServer) then { - [QGVAR(equipFries), EFUNC(fastroping,equipFRIES)] call CBA_fnc_addEventHandler; - [QGVAR(addObjects), { - params ["_objects", ["_curator", objNull]]; - - if !(isNull _curator) exitWith { _curator addCuratorEditableObjects [_objects, true]; }; - - { - _x addCuratorEditableObjects [_objects, true]; - } forEach allCurators; - }] call CBA_fnc_addEventHandler; - - [QGVAR(removeObjects), { - params ["_objects", ["_curator", objNull]]; - - if !(isNull _curator) exitWith { _curator removeCuratorEditableObjects [_objects, true]; }; - - { - _x removeCuratorEditableObjects [_objects, true]; - } forEach allCurators; - }] call CBA_fnc_addEventHandler; -}; diff --git a/addons/zeus/XEH_preInit.sqf b/addons/zeus/XEH_preInit.sqf index a55f9c304e..47a1adefa3 100644 --- a/addons/zeus/XEH_preInit.sqf +++ b/addons/zeus/XEH_preInit.sqf @@ -2,9 +2,7 @@ ADDON = false; -PREP_RECOMPILE_START; #include "XEH_PREP.hpp" -PREP_RECOMPILE_END; if (isServer) then { [QGVAR(zeusUnitAssigned), FUNC(handleZeusUnitAssigned)] call CBA_fnc_addEventHandler; diff --git a/addons/zeus/config.cpp b/addons/zeus/config.cpp index d81ac5c074..4c9a831fd0 100644 --- a/addons/zeus/config.cpp +++ b/addons/zeus/config.cpp @@ -5,16 +5,11 @@ class CfgPatches { name = COMPONENT_NAME; units[] = { QGVAR(moduleDefendArea), - QGVAR(moduleEditableObjects), QGVAR(moduleGlobalSetSkill), QGVAR(moduleGroupSide), QGVAR(modulePatrolArea), QGVAR(moduleSearchArea), QGVAR(moduleSearchNearby), - QGVAR(moduleSimulation), - QGVAR(moduleSuppressiveFire), - QGVAR(AddFullArsenal), - QGVAR(RemoveFullArsenal), QGVAR(moduleTeleportPlayers) }; weapons[] = {}; @@ -25,7 +20,7 @@ class CfgPatches { url = ECSTRING(main,URL); VERSION_CONFIG; }; - // Use additional CfgPatches to contextually remove modules from zeus + // Use additional cfgPatches to contextually remove modules from zeus class GVAR(captives): ADDON { units[] = { QGVAR(moduleCaptive), @@ -46,22 +41,22 @@ class CfgPatches { QGVAR(moduleAddSpareWheel) }; }; - class GVAR(fastroping): ADDON { - units[] = { - QGVAR(moduleAddOrRemoveFRIES) - }; - }; }; class ACE_Curator { GVAR(captives) = "ace_captives"; GVAR(medical) = "ace_medical"; GVAR(cargoAndRepair)[] = {"ace_cargo", "ace_repair"}; - GVAR(fastroping) = "ace_fastroping"; }; -#include "CfgFactionClasses.hpp" #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "ACE_Settings.hpp" #include "ui\RscAttributes.hpp" + +class ACE_newEvents { + zeusUnitAssigned = QGVAR(zeusUnitAssigned); + SetSurrendered = QEGVAR(captives,setSurrendered); + SetHandcuffed = QEGVAR(captives,setHandcuffed); + AddCargoByClass = "ace_addCargo"; +}; diff --git a/addons/zeus/functions/fnc_addObjectToCurator.sqf b/addons/zeus/functions/fnc_addObjectToCurator.sqf index 230f035eb3..cab5b3da6f 100644 --- a/addons/zeus/functions/fnc_addObjectToCurator.sqf +++ b/addons/zeus/functions/fnc_addObjectToCurator.sqf @@ -8,9 +8,6 @@ * Return Value: * None * - * Example: - * [object] call ace_zeus_fnc_addObjectToCurator - * * Public: No */ diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index b556b08197..231f2cb08d 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -10,10 +10,7 @@ * 2: activated * * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_bi_moduleCurator + * nil * * Public: No */ @@ -101,7 +98,7 @@ if (_activated) then { //--- Handle ownership [_logic,_ownerVar,_ownerUID,_adminVar] spawn { scriptname "BIS_fnc_moduleCurator: Owner"; - + params ["_logic", "_ownerVar", "_ownerUID", "_adminVar"]; if (_adminVar != "") then {_ownerVar = _adminVar;}; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 434130ffe6..5a14fbe218 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -9,10 +9,7 @@ * 2: activated * * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_bi_moduleMine + * nil * * Public: No */ diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index eaad90c6d6..1a9da0ab02 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -10,10 +10,7 @@ * 2: activated * * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_bi_moduleProjectile + * nil * * Public: No */ diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index 6d2d3fd950..f32afef130 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -9,10 +9,7 @@ * 2: activated * * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_bi_moduleRemoteControl + * nil * * Public: No */ diff --git a/addons/zeus/functions/fnc_getModuleDestination.sqf b/addons/zeus/functions/fnc_getModuleDestination.sqf deleted file mode 100644 index d6a19d69b1..0000000000 --- a/addons/zeus/functions/fnc_getModuleDestination.sqf +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Author: PabstMirror - * Allows zeus to click to indicate a 3d position. - * - * Arguments: - * 0: The souce object - * 1: Code to run when position is ready - * - Code is passed [0: Successful , 1: Object , 2: Position ASL ] - * 2: Text - * 3: Icon image file - * 4: Icon color - * - * Return Value: - * None - * - * Example: - * [player, {systemChat format ["Done %1", _this]}] call ace_zeus_fnc_getModuleDestination - * - * Public: No - */ -#include "script_component.hpp" - -params ["_object", "_code", ["_text", ""], ["_icon", "\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa"], ["_color", [1,0,0,1]]]; - -if (missionNamespace getVariable [QGVAR(moduleDestination_running), false]) exitWith { - [false, _object, [0,0,0]] call _code; - ERROR("getModuleDestination already running"); -}; - -GVAR(moduleDestination_running) = true; - -// Add mouse button eh for the zeus display (triggered from 2d or 3d) -GVAR(moduleDestination_displayEH) = [(findDisplay 312), "mouseButtonDown", { - params ["", "_mouseButton"]; - if (_mouseButton != 0) exitWith {}; // Only watch for LMB - _thisArgs params ["_object", "_code"]; - private _mousePosASL = if (ctrlShown ((findDisplay 312) displayCtrl 50)) then { - private _pos2d = (((findDisplay 312) displayCtrl 50) ctrlMapScreenToWorld getMousePosition); - _pos2d set [2, getTerrainHeightASL _pos2d]; - _pos2d - } else { - AGLToASL (screenToWorld getMousePosition); - }; - TRACE_2("placed",_object,_mousePosASL); - [true, _object, _mousePosASL] call _code; - GVAR(moduleDestination_running) = false; -}, [_object, _code]] call CBA_fnc_addBISEventHandler; - -// Add draw eh for the zeus map - draws the 2d icon and line -GVAR(moduleDestination_mapDrawEH) = [((findDisplay 312) displayCtrl 50), "draw", { - params ["_mapCtrl"]; - _thisArgs params ["_object", "_text", "_icon", "_color"]; - - private _pos2d = (((findDisplay 312) displayCtrl 50) ctrlMapScreenToWorld getMousePosition); - _mapCtrl drawIcon [_icon, _color, _pos2d, 24, 24, 45, _text, 1, 0.03, "TahomaB", "right"]; - _mapCtrl drawLine [getPos _object, _pos2d, _color]; -}, [_object, _text, _icon, _color]] call CBA_fnc_addBISEventHandler; - -[{ - (_this select 0) params ["_object", "_code", "_text", "_icon", "_color"]; - if ((isNull _object) || {isNull findDisplay 312} || {!isNull findDisplay 49}) then { - TRACE_3("null-exit",isNull _object,isNull findDisplay 312,isNull findDisplay 49); - GVAR(moduleDestination_running) = false; - [false, _object, [0,0,0]] call _code; - }; - if (GVAR(moduleDestination_running)) then { - // Draw the 3d icon and line - private _mousePosAGL = screenToWorld getMousePosition; - drawIcon3D [_icon, _color, _mousePosAGL, 1.5, 1.5, 45, _text]; - drawLine3D [_mousePosAGL, ASLtoAGL (getPosASL _object), _color];; - } else { - TRACE_3("cleaning up",_this select 1, GVAR(moduleDestination_displayEH), GVAR(moduleDestination_mapDrawEH)); - (_this select 1) call CBA_fnc_removePerFrameHandler; - (findDisplay 312) displayRemoveEventHandler ["mouseButtonDown", GVAR(moduleDestination_displayEH)]; - ((findDisplay 312) displayCtrl 50) ctrlRemoveEventHandler ["draw", GVAR(moduleDestination_mapDrawEH)]; - GVAR(moduleDestination_displayEH) = nil; - GVAR(moduleDestination_mapDrawEH) = nil; - }; -}, 0, [_object, _code, _text, _icon, _color]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf index 8c0c4370d2..65663e65fd 100644 --- a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf +++ b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf @@ -12,10 +12,7 @@ * 1: The zeus player * * Return Value: - * None - * - * Example: - * [LOGIC, bob] call ace_zeus_fnc_handleZeusUnitAssigned + * nil * * Public: No */ diff --git a/addons/zeus/functions/fnc_moduleAddArsenal.sqf b/addons/zeus/functions/fnc_moduleAddArsenal.sqf deleted file mode 100644 index b8eed64d76..0000000000 --- a/addons/zeus/functions/fnc_moduleAddArsenal.sqf +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Author: alganthe - * Add a full arsenal to an object - * - * Arguments: - * 0: The module logic - * - * Return Value: - * None - * - * Public: No - */ -#include "script_component.hpp" - -params ["_logic"]; -if (!local _logic) exitWith {}; - -private _object = attachedTo _logic; -TRACE_3("moduleAddArsenal",_logic,_object,typeOf _object); - -switch (true) do { - case (isNull _object): { - [LSTRING(NothingSelected)] call FUNC(showMessage); - }; - case (isPlayer _object): { - ["str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer"] call FUNC(showMessage); - }; - case (!alive _object): { - [LSTRING(OnlyAlive)] call FUNC(showMessage); - }; - default { - TRACE_1("BIS_fnc_arsenal: AmmoboxInit",_object); - // Global Effects: "Action to access the Arsenal will be added automatically on all clients." - ["AmmoboxInit", [_object, true]] call BIS_fnc_arsenal; - }; -}; - -deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf b/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf deleted file mode 100644 index 5b05d256f4..0000000000 --- a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Author: 654wak654 - * Add/Removes FRIES from a helicopter. - * - * Arguments: - * 0: The module logic - * 1: Synchronized units - * 2: Activated - * - * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_moduleAddOrRemoveFRIES - * - * Public: No - */ -#include "script_component.hpp" - -params ["_logic", "_units", "_activated"]; - -if !(_activated && {local _logic}) exitWith {}; - -if !(["ace_fastroping"] call EFUNC(common,isModLoaded)) then { - [LSTRING(RequiresAddon)] call FUNC(showMessage); -} else { - (GETMVAR(BIS_fnc_curatorObjectPlaced_mouseOver,[""])) params ["_mouseOverType", "_mouseOverUnit"]; - - if (_mouseOverType != "OBJECT") then { - [LSTRING(NothingSelected)] call FUNC(showMessage); - } else { - if !(alive _mouseOverUnit) then { - [LSTRING(OnlyAlive)] call FUNC(showMessage); - } else { - private _config = configFile >> "CfgVehicles" >> typeOf _mouseOverUnit; - private _displayName = getText (_config >> "displayName"); - if !(isNumber (_config >> QEGVAR(fastroping,enabled))) then { - [LSTRING(NotFastRopeCompatible), _displayName] call FUNC(showMessage); - } else { - private _fries = GETVAR(_mouseOverUnit,EGVAR(fastroping,FRIES),objNull); - if (isNull _fries) then { - [QGVAR(equipFries), [_mouseOverUnit]] call CBA_fnc_serverEvent; - } else { - if ([_mouseOverUnit] call EFUNC(fastroping,canCutRopes)) then { - [LSTRING(CantRemoveFRIES), _displayName] call FUNC(showMessage); - } else { - [_mouseOverUnit] call EFUNC(fastroping,cutRopes); - deleteVehicle _fries; - }; - }; - }; - }; - }; -}; - -deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf b/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf index 56d3dca9d9..2926fafcf9 100644 --- a/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf +++ b/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_moduleAddSpareTrack - * * Public: No */ #include "script_component.hpp" @@ -22,18 +19,18 @@ params ["_logic", "_units", "_activated"]; if !(_activated && local _logic) exitWith {}; if !(["ace_cargo"] call EFUNC(common,isModLoaded) && ["ace_repair"] call EFUNC(common,isModLoaded)) then { - [LSTRING(RequiresAddon)] call FUNC(showMessage); + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { (GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""])) params ["_mouseOverType", "_mouseOverUnit"]; if (_mouseOverType != "OBJECT") then { - [LSTRING(NothingSelected)] call FUNC(showMessage); + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { if !(alive _mouseOverUnit) then { - [LSTRING(OnlyAlive)] call FUNC(showMessage); + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); } else { if (getNumber (configFile >> "CfgVehicles" >> "ACE_Track" >> QEGVAR(cargo,size)) > [_mouseOverUnit] call EFUNC(cargo,getCargoSpaceLeft)) then { - [LSTRING(OnlyEnoughCargoSpace)] call FUNC(showMessage); + [LSTRING(OnlyEnoughCargoSpace)] call EFUNC(common,displayTextStructured); } else { ["ace_addCargo", ["ACE_Track", _mouseOverUnit, 1, true]] call CBA_fnc_localEvent; }; diff --git a/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf b/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf index da9327af7a..2c051c94b6 100644 --- a/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf +++ b/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf @@ -10,9 +10,6 @@ * Return Value: * None * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_moduleAddSpareWheel - * * Public: No */ #include "script_component.hpp" @@ -22,18 +19,18 @@ params ["_logic", "_units", "_activated"]; if !(_activated && local _logic) exitWith {}; if !(["ace_cargo"] call EFUNC(common,isModLoaded) && ["ace_repair"] call EFUNC(common,isModLoaded)) then { - [LSTRING(RequiresAddon)] call FUNC(showMessage); + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { (GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""])) params ["_mouseOverType", "_mouseOverUnit"]; if (_mouseOverType != "OBJECT") then { - [LSTRING(NothingSelected)] call FUNC(showMessage); + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { if !(alive _mouseOverUnit) then { - [LSTRING(OnlyAlive)] call FUNC(showMessage); + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); } else { if (getNumber (configFile >> "CfgVehicles" >> "ACE_Wheel" >> QEGVAR(cargo,size)) > [_mouseOverUnit] call EFUNC(cargo,getCargoSpaceLeft)) then { - [LSTRING(OnlyEnoughCargoSpace)] call FUNC(showMessage); + [LSTRING(OnlyEnoughCargoSpace)] call EFUNC(common,displayTextStructured); } else { ["ace_addCargo", ["ACE_Wheel", _mouseOverUnit, 1, true]] call CBA_fnc_localEvent; }; diff --git a/addons/zeus/functions/fnc_moduleCaptive.sqf b/addons/zeus/functions/fnc_moduleCaptive.sqf index dc216e6289..7d1c46f873 100644 --- a/addons/zeus/functions/fnc_moduleCaptive.sqf +++ b/addons/zeus/functions/fnc_moduleCaptive.sqf @@ -8,10 +8,7 @@ * 2: Activated * * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_moduleCaptive + * None * * Public: No */ @@ -24,20 +21,20 @@ private ["_mouseOver", "_unit", "_captive"]; if !(_activated && local _logic) exitWith {}; if (isNil QEFUNC(captives,setHandcuffed)) then { - [LSTRING(RequiresAddon)] call FUNC(showMessage); + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); if ((_mouseOver select 0) != "OBJECT") then { - [LSTRING(NothingSelected)] call FUNC(showMessage); + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { _unit = effectivecommander (_mouseOver select 1); if !(_unit isKindOf "CAManBase") then { - [LSTRING(OnlyInfantry)] call FUNC(showMessage); + [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); } else { if !(alive _unit) then { - [LSTRING(OnlyAlive)] call FUNC(showMessage); + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); } else { _captive = GETVAR(_unit,EGVAR(captives,isHandcuffed),false); // Event initalized by ACE_Captives diff --git a/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf b/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf index ce864e85b0..35c6476cc0 100644 --- a/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf +++ b/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf @@ -7,10 +7,10 @@ * 1: Variable new value * * Return Value: - * None + * None * * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_moduleGlobalSetSkill + * "ace_zeus_GlobalSkillAI" addPublicVariableEventHandler ace_zeus_fnc_moduleGlobalSetSkill * * Public: No */ diff --git a/addons/zeus/functions/fnc_moduleGroupSide.sqf b/addons/zeus/functions/fnc_moduleGroupSide.sqf index 050b92a9fc..fa37ca3463 100644 --- a/addons/zeus/functions/fnc_moduleGroupSide.sqf +++ b/addons/zeus/functions/fnc_moduleGroupSide.sqf @@ -7,7 +7,7 @@ * 1: Chosen side * * Return Value: - * None + * None * * Example: * [this, west] call ace_zeus_fnc_moduleGroupSide diff --git a/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf b/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf deleted file mode 100644 index 9e267e4cf5..0000000000 --- a/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Author: alganthe - * Remove arsenal from an object - * - * Arguments: - * 0: The module logic - * - * Return Value: - * None - * - * Public: No -*/ - -#include "script_component.hpp" - -params ["_logic"]; -if (!local _logic) exitWith {}; - -private _object = attachedTo _logic; -TRACE_3("moduleRemoveArsenal",_logic,_object,typeOf _object); - -switch (true) do { - case (isNull _object): { - [LSTRING(NothingSelected)] call FUNC(showMessage); - }; - case (isPlayer _object): { - ["str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer"] call FUNC(showMessage); - }; - case (!alive _object): { - [LSTRING(OnlyAlive)] call FUNC(showMessage); - }; - default { - TRACE_1("Calling removeVirtualXXXCargo functions",_object); - [_object, (_object call BIS_fnc_getVirtualItemCargo), true] call BIS_fnc_removeVirtualItemCargo; - [_object, (_object call BIS_fnc_getVirtualWeaponCargo), true] call BIS_fnc_removeVirtualWeaponCargo; - [_object, (_object call BIS_fnc_getVirtualMagazineCargo), true] call BIS_fnc_removeVirtualMagazineCargo; - [_object, (_object call BIS_fnc_getVirtualBackpackCargo), true] call BIS_fnc_removeVirtualBackpackCargo; - }; -}; - -deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleSearchNearby.sqf b/addons/zeus/functions/fnc_moduleSearchNearby.sqf index 30d545e6d9..48f35bbfee 100644 --- a/addons/zeus/functions/fnc_moduleSearchNearby.sqf +++ b/addons/zeus/functions/fnc_moduleSearchNearby.sqf @@ -8,10 +8,7 @@ * 2: Activated * * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_moduleSearchNearby + * None * * Public: No */ @@ -30,7 +27,7 @@ scopeName "Main"; private _fnc_errorAndClose = { params ["_msg"]; deleteVehicle _logic; - [_msg] call FUNC(showMessage); + [_msg] call EFUNC(common,displayTextStructured); breakOut "Main"; }; diff --git a/addons/zeus/functions/fnc_moduleSetMedic.sqf b/addons/zeus/functions/fnc_moduleSetMedic.sqf index c9dba36e40..d4acda3f54 100644 --- a/addons/zeus/functions/fnc_moduleSetMedic.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedic.sqf @@ -8,10 +8,7 @@ * 2: Activated * * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_moduleSetMedic + * None * * Public: No */ @@ -24,23 +21,23 @@ private ["_mouseOver", "_unit", "_medicN"]; if !(_activated && local _logic) exitWith {}; if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { - [LSTRING(RequiresAddon)] call FUNC(showMessage); + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); if ((_mouseOver select 0) != "OBJECT") then { - [LSTRING(NothingSelected)] call FUNC(showMessage); + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { _unit = effectivecommander (_mouseOver select 1); if !(_unit isKindOf "CAManBase") then { - [LSTRING(OnlyInfantry)] call FUNC(showMessage); + [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); } else { if !(alive _unit) then { - [LSTRING(OnlyAlive)] call FUNC(showMessage); + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); } else { if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then { - [LSTRING(OnlyNonCaptive)] call FUNC(showMessage); + [LSTRING(OnlyNonCaptive)] call EFUNC(common,displayTextStructured); } else { _medicN = GETVAR(_unit,EGVAR(medical,medicClass),0); if (_medicN < 1) then { diff --git a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf index 479cfad803..1e710bf41b 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf @@ -8,10 +8,7 @@ * 2: Activated * * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_moduleSetMedicalFacility + * None * * Public: No */ @@ -24,23 +21,23 @@ private ["_mouseOver", "_unit"]; if !(_activated && local _logic) exitWith {}; if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { - [LSTRING(RequiresAddon)] call FUNC(showMessage); + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); if ((_mouseOver select 0) != "OBJECT") then { - [LSTRING(NothingSelected)] call FUNC(showMessage); + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { _unit = (_mouseOver select 1); if (_unit isKindOf "Man" || {!(_unit isKindOf "Building")}) then { - [LSTRING(OnlyStructures)] call FUNC(showMessage); + [LSTRING(OnlyStructures)] call EFUNC(common,displayTextStructured); } else { if !(alive _unit) then { - [LSTRING(OnlyAlive)] call FUNC(showMessage); + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); } else { if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then { - [LSTRING(OnlyNonCaptive)] call FUNC(showMessage); + [LSTRING(OnlyNonCaptive)] call EFUNC(common,displayTextStructured); } else { if (!(GETVAR(_unit,EGVAR(medical,isMedicalFacility),false))) then { _unit setVariable [QEGVAR(medical,isMedicalFacility), true, true]; diff --git a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf index c295b609d2..4ffec3460e 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf @@ -8,10 +8,7 @@ * 2: Activated * * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_moduleSetMedicalVehicle + * None * * Public: No */ @@ -24,23 +21,23 @@ private ["_mouseOver", "_unit", "_medicN"]; if !(_activated && local _logic) exitWith {}; if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { - [LSTRING(RequiresAddon)] call FUNC(showMessage); + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); if ((_mouseOver select 0) != "OBJECT") then { - [LSTRING(NothingSelected)] call FUNC(showMessage); + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { _unit = (_mouseOver select 1); if (_unit isKindOf "Man" || {_unit isKindOf "Building"}) then { - [LSTRING(OnlyVehicles)] call FUNC(showMessage); + [LSTRING(OnlyVehicles)] call EFUNC(common,displayTextStructured); } else { if !(alive _unit) then { - [LSTRING(OnlyAlive)] call FUNC(showMessage); + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); } else { if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then { - [LSTRING(OnlyNonCaptive)] call FUNC(showMessage); + [LSTRING(OnlyNonCaptive)] call EFUNC(common,displayTextStructured); } else { _medicN = GETVAR(_unit,EGVAR(medical,medicClass),0); if (_medicN < 1) then { diff --git a/addons/zeus/functions/fnc_moduleSimulation.sqf b/addons/zeus/functions/fnc_moduleSimulation.sqf deleted file mode 100644 index fc6d6e4a06..0000000000 --- a/addons/zeus/functions/fnc_moduleSimulation.sqf +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Author: Fisher, SilentSpike - * Toggle Simulation on object. - * - * Arguments: - * 0: The module logic - * - * Return Value: - * None - * - * Example: - * [LOGIC] call ace_zeus_fnc_moduleSimulation - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_logic"]; - -if !(local _logic) exitWith {}; - -private _object = attachedTo _logic; -if (isNull _object) then { - [LSTRING(NothingSelected)] call FUNC(showMessage); -} else { - [QEGVAR(common,enableSimulationGlobal), [_object, !(simulationEnabled _object)]] call CBA_fnc_serverEvent; -}; - -deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf deleted file mode 100644 index 1d510fec55..0000000000 --- a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Author: bux, PabstMirror - * Commands the selected unit or group to start suppressive fire on the unit, group or location the module is placed on - * - * Arguments: - * 0: The module logic - * 1: Synchronized units - * 2: Activated - * - * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_moduleSuppressiveFire - * - * Public: No - */ -// #define DRAW_ZEUS_INFO -#include "script_component.hpp" - -if (canSuspend) exitWith {[FUNC(moduleSuppressiveFire), _this] call CBA_fnc_directCall;}; - -params ["_logic", "_units", "_activated"]; - -if !(_activated && local _logic) exitWith {}; - -// Validate the module target -private _unit = effectiveCommander (attachedTo _logic); -TRACE_3("moduleSuppressiveFire placed",_unit,typeOf _unit,typeOf _logic); - -deleteVehicle _logic; // cleanup logic now, we just needed it to get the attached unit - -if (isNull _unit) exitWith { - [LSTRING(NothingSelected)] call FUNC(showMessage); -}; -if (!alive _unit) exitWith { - [localize LSTRING(OnlyAlive)] call FUNC(showMessage); -}; -if ([_unit] call EFUNC(common,isPlayer)) exitWith { - ["str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer"] call FUNC(showMessage); -}; - -[_unit, { - params ["_successful", "_unit", "_mousePosASL"]; - TRACE_3("getModuleDestination return",_successful,_unit,_mousePosASL); - if (!_successful) exitWith {}; - if (!alive _unit) exitWith {}; - private _vehicle = vehicle _unit; - - private _targetASL = _mousePosASL vectorAdd [0,0,0.6]; // mouse pos is at ground level zero, raise up a bit; - private _artilleryMag = ""; - - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "artilleryScanner")) == 1) then { - // Artillery - Get mortar ammo type and verify in range - if (isNull gunner _vehicle) exitWith {_targetASL = [];}; - { - private _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo"); - private _hit = getNumber (configFile >> "CfgAmmo" >> _ammo >> "hit"); - if (_hit > 20) exitWith {_artilleryMag = _x;}; - } forEach getArtilleryAmmo [_vehicle]; - TRACE_1("getArtilleryAmmo",_artilleryMag); - if (_artilleryMag == "") exitWith {_targetASL = [];}; - private _eta = _vehicle getArtilleryETA [ASLtoAGL _targetASL, _artilleryMag]; - TRACE_1("getArtilleryETA",_eta); - if (_eta < 0) exitWith { - [ELSTRING(Interaction,NotInRange)] call FUNC(showMessage); - _targetASL = []; - }; - ["TOF: %1 sec", _eta toFixed 1] call FUNC(showMessage); - } else { - // Direct fire - Get a target position that will work - private _lis = lineIntersectsSurfaces [eyePos _unit, _targetASL, _unit, _vehicle]; - if ((count _lis) > 0) then { // If point is hidden, unit won't fire, do a ray cast to find where they should shoot at - _targetASL = ((_lis select 0) select 0); - TRACE_1("using ray cast pos",_mousePosASL distance _targetASL); - }; - if (_unit isEqualTo _vehicle) then { // Max range a unit can fire seems to be based on the weapon's config - private _distance = _targetASL vectorDistance eyePos _unit; - private _maxWeaponRange = getNumber (configFile >> "CfgWeapons" >> (currentWeapon _unit) >> "maxRange"); - TRACE_3("",_distance,_maxWeaponRange,currentWeapon _unit); - if (_distance > (_maxWeaponRange - 50)) then { - if (_distance > (2.5 * _maxWeaponRange)) then { - _targetASL = []; - [ELSTRING(Interaction,NotInRange)] call FUNC(showMessage); - } else { - // 1-2.5x the weapon max range, find a virtual point the AI can shoot at (won't have accurate elevation, but it will put rounds downrange) - private _fakeElevation = (_distance / 100000) * (_distance - _maxWeaponRange); - _targetASL = (eyePos _unit) vectorAdd (((eyePos _unit) vectorFromTo _targetASL) vectorMultiply (_maxWeaponRange - 50)) vectorAdd [0,0,_fakeElevation]; - TRACE_2("using virtual halfway point",_mousePosASL distance _targetASL,_fakeElevation); - }; - }; - }; - }; - - if (_targetASL isEqualTo []) exitWith {}; - - private _units = [_unit]; - if (_unit == (leader _unit)) then {_units = units _unit;}; - if (_artilleryMag != "") then {_units = [gunner _vehicle];}; - - { - if (((_unit distance _x) < 30) && {!([_x] call EFUNC(common,isPlayer))} && {[_x] call EFUNC(common,isAwake)}) then { - TRACE_2("sending event",_x,_targetASL); - [QGVAR(suppressiveFire), [_x, _targetASL, _artilleryMag], _x] call CBA_fnc_targetEvent; - }; - } forEach _units; - -#ifdef DRAW_ZEUS_INFO - [eyePos _unit, _mousePosASL, [0,0,1,1]] call EFUNC(common,addLineToDebugDraw); - [eyePos _unit, _targetASL, [1,0,0,1]] call EFUNC(common,addLineToDebugDraw); - if (_unit != _vehicle) then { - [_vehicle] call CBA_fnc_addUnitTrackProjectiles; - } else { - { - [_x] call CBA_fnc_addUnitTrackProjectiles; - } forEach _units; - }; -#endif - -}, (localize LSTRING(ModuleSuppressiveFire_DisplayName))] call FUNC(getModuleDestination); diff --git a/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf b/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf deleted file mode 100644 index 7b11b7e18f..0000000000 --- a/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Author: bux, PabstMirror - * Commands the selected unit or group to start suppressive fire on the unit, group or location the module is placed on - * - * Arguments: - * 0: Unit - * 1: Fire Pos ASL - * 2: Artiller Magazine - * - * Return Value: - * None - * - * Example: - * [bob, [5, 6, 7], "bigmagazine"] call ace_zeus_fnc_moduleSuppressiveFireLocal - * - * Public: No - */ -#include "script_component.hpp" - -params ["_unit", "_targetASL", "_artilleryMag"]; -TRACE_4("moduleSuppressiveFireLocal",_unit,local _unit,_targetASL,_artilleryMag); - -if (_artilleryMag != "") exitWith { - (vehicle _unit) doArtilleryFire [ASLtoAGL _targetASL, _artilleryMag, 4]; - TRACE_3("doArtilleryFire",_unit,_targetASL,_artilleryMag); -}; - -[{ - params ["_unit", "_burstsLeft", "_nextRun", "_targetASL", "_artilleryMag"]; - if (!alive _unit) exitWith {true}; - if (CBA_missionTime >= _nextRun) then { - _burstsLeft = _burstsLeft - 1; - _this set [1, _burstsLeft]; - _this set [2, _nextRun + 4]; - _unit doSuppressiveFire _targetASL; - TRACE_2("doSuppressiveFire",_unit,_targetASL); - }; - (_burstsLeft <= 0) -}, { - TRACE_1("Done",_this); -}, [_unit, 11, CBA_missionTime, _targetASL, _artilleryMag]] call CBA_fnc_waitUntilAndExecute; - diff --git a/addons/zeus/functions/fnc_moduleSurrender.sqf b/addons/zeus/functions/fnc_moduleSurrender.sqf index b97d2715ff..e14501feb0 100644 --- a/addons/zeus/functions/fnc_moduleSurrender.sqf +++ b/addons/zeus/functions/fnc_moduleSurrender.sqf @@ -8,10 +8,7 @@ * 2: Activated * * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_moduleSurrender + * None * * Public: No */ @@ -24,23 +21,23 @@ private ["_mouseOver", "_unit", "_surrendering"]; if !(_activated && local _logic) exitWith {}; if (isNil QEFUNC(captives,setSurrendered)) then { - [LSTRING(RequiresAddon)] call FUNC(showMessage); + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); if ((_mouseOver select 0) != "OBJECT") then { - [LSTRING(NothingSelected)] call FUNC(showMessage); + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { _unit = effectivecommander (_mouseOver select 1); if !(_unit isKindOf "CAManBase") then { - [LSTRING(OnlyInfantry)] call FUNC(showMessage); + [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); } else { if !(alive _unit) then { - [LSTRING(OnlyAlive)] call FUNC(showMessage); + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); } else { if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then { - [LSTRING(OnlyNonCaptive)] call FUNC(showMessage); + [LSTRING(OnlyNonCaptive)] call EFUNC(common,displayTextStructured); } else { _surrendering = GETVAR(_unit,EGVAR(captives,isSurrendering),false); // Event initalized by ACE_Captives diff --git a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf index c52517a7d0..decdb21999 100644 --- a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf +++ b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf @@ -8,7 +8,7 @@ * 2: Teleport group * * Return Value: - * None + * None * * Example: * [player, "5854854754", false] call ace_zeus_fnc_moduleTeleportPlayers @@ -36,11 +36,8 @@ if (_group) then { private _attached = attachedTo _logic; if (isNull _attached) then { - // Function takes position AGL and must be ran where local - [QGVAR(moveToRespawnPosition), [_x, _logic modelToWorld [0,0,0]], _x] call CBA_fnc_targetEvent; + [_x, _logic] call BIS_fnc_moveToRespawnPosition; } else { - [QGVAR(moveToRespawnPosition), [_x, _attached], _x] call CBA_fnc_targetEvent; + [_x, _attached] call BIS_fnc_moveToRespawnPosition; }; } forEach _player; - -deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index d99ef6cd27..d9f9031cee 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -8,10 +8,7 @@ * 2: Activated * * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_moduleUnconscious + * None * * Public: No */ @@ -24,20 +21,20 @@ private ["_mouseOver", "_unit", "_conscious"]; if !(_activated && local _logic) exitWith {}; if (isNil QEFUNC(medical,setUnconscious)) then { - [LSTRING(RequiresAddon)] call FUNC(showMessage); + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); if ((_mouseOver select 0) != "OBJECT") then { - [LSTRING(NothingSelected)] call FUNC(showMessage); + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { _unit = effectivecommander (_mouseOver select 1); if !(_unit isKindOf "CAManBase") then { - [LSTRING(OnlyInfantry)] call FUNC(showMessage); + [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); } else { if !(alive _unit) then { - [LSTRING(OnlyAlive)] call FUNC(showMessage); + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); } else { _conscious = GETVAR(_unit,ACE_isUnconscious,false); // Function handles locality for me diff --git a/addons/zeus/functions/fnc_moduleZeusSettings.sqf b/addons/zeus/functions/fnc_moduleZeusSettings.sqf index b52c597c2c..0f3d720599 100644 --- a/addons/zeus/functions/fnc_moduleZeusSettings.sqf +++ b/addons/zeus/functions/fnc_moduleZeusSettings.sqf @@ -8,10 +8,7 @@ * 2: activated * * Return Value: - * None - * - * Example: - * [LOGIC, [bob, kevin], true] call ace_zeus_fnc_moduleZeusSettings + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_showMessage.sqf b/addons/zeus/functions/fnc_showMessage.sqf deleted file mode 100644 index c91c90093a..0000000000 --- a/addons/zeus/functions/fnc_showMessage.sqf +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Author: 654wak654 - * Shows a zeus message through the BIS function, handles localization. - * If multiple args are given, they get formatted. - * - * Arguments: - * 0: The message - * N: Anything - * - * Return Value: - * None - * - * Example: - * ["something"] call ace_zeus_fnc_showMessage - * ["something %1 in %2", "strange", getPos neighborhood] call ace_zeus_fnc_showMessage - * - * Public: Yes - */ -#include "script_component.hpp" - -if (!(_this isEqualTypeParams [""])) exitWith {ERROR_1("First arg must be string [%1]",_this);}; - -private _message = _this apply {if ((_x isEqualType "") && {isLocalized _x}) then {localize _x} else {_x}}; -[objNull, format _message] call BIS_fnc_showCuratorFeedbackMessage; diff --git a/addons/zeus/functions/fnc_ui_attributeCargo.sqf b/addons/zeus/functions/fnc_ui_attributeCargo.sqf index fb57362fa1..444fa5e7e2 100644 --- a/addons/zeus/functions/fnc_ui_attributeCargo.sqf +++ b/addons/zeus/functions/fnc_ui_attributeCargo.sqf @@ -7,10 +7,10 @@ * 0: ace_cargo controls group * * Return Value: - * None + * None * * Example: - * [CONTROL] call ace_zeus_fnc_ui_attributeCargo + * onSetFocus = "_this call ace_zeus_fnc_ui_vehCargo" * * Public: No */ @@ -20,7 +20,7 @@ params ["_control"]; TRACE_1("params",_control); -private _veh = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); +private _veh = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); TRACE_1("",_veh); private _loaded = _veh getVariable [QEGVAR(cargo,loaded), []]; diff --git a/addons/zeus/functions/fnc_ui_attributePosition.sqf b/addons/zeus/functions/fnc_ui_attributePosition.sqf index e0396e2c03..95557a891b 100644 --- a/addons/zeus/functions/fnc_ui_attributePosition.sqf +++ b/addons/zeus/functions/fnc_ui_attributePosition.sqf @@ -6,20 +6,19 @@ * 0: position controls group * * Return Value: - * None - * - * Example: - * [CONTROL] call ace_zeus_fnc_ui_attributePosition + * None * * Public: No */ #include "script_component.hpp" +disableSerialization; + //Generic Init: params ["_control"]; private _display = ctrlParent _control; -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); _control ctrlRemoveAllEventHandlers "setFocus"; diff --git a/addons/zeus/functions/fnc_ui_attributeRadius.sqf b/addons/zeus/functions/fnc_ui_attributeRadius.sqf index 3c4d296f91..c26f8ac97d 100644 --- a/addons/zeus/functions/fnc_ui_attributeRadius.sqf +++ b/addons/zeus/functions/fnc_ui_attributeRadius.sqf @@ -6,16 +6,15 @@ * 0: radius controls group * * Return Value: - * None - * - * Example: - * [CONTROL] call ace_zeus_fnc_ui_attributeRadius + * None * * Public: No */ #include "script_component.hpp" +disableSerialization; + //Generic Init: params ["_control"]; private _display = ctrlParent _control; diff --git a/addons/zeus/functions/fnc_ui_defendArea.sqf b/addons/zeus/functions/fnc_ui_defendArea.sqf index 13de25c2fa..6fcb4a17d5 100644 --- a/addons/zeus/functions/fnc_ui_defendArea.sqf +++ b/addons/zeus/functions/fnc_ui_defendArea.sqf @@ -6,20 +6,19 @@ * 0: dummy controls group * * Return Value: - * None - * - * Example: - * [CONTROL] call ace_zeus_fnc_ui_defendArea + * None * * Public: No */ #include "script_component.hpp" +disableSerialization; + //Generic Init: params ["_control"]; private _display = ctrlParent _control; -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); _control ctrlRemoveAllEventHandlers "setFocus"; @@ -31,7 +30,7 @@ private _fnc_errorAndClose = { params ["_msg"]; _display closeDisplay 0; deleteVehicle _logic; - [_msg] call FUNC(showMessage); + [_msg] call EFUNC(common,displayTextStructured); breakOut "Main"; }; diff --git a/addons/zeus/functions/fnc_ui_editableObjects.sqf b/addons/zeus/functions/fnc_ui_editableObjects.sqf deleted file mode 100644 index 8cb243849e..0000000000 --- a/addons/zeus/functions/fnc_ui_editableObjects.sqf +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Author: Fisher, SilentSpike - * Updated all/local curator with objects in the module radius. - * - * Arguments: - * 0: editableObjects controls group - * - * Return Value: - * None - * - * Example: - * [CONTROL] call ace_zeus_fnc_ui_editableObjects - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_control"]; - -//Generic Init: -private _display = ctrlParent _control; -private _ctrlButtonOK = _display displayCtrl 1; //IDC_OK -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); -TRACE_1("logicObject",_logic); - -_control ctrlRemoveAllEventHandlers "setFocus"; - -//Specific on-load stuff: -(_display displayCtrl 16188) cbSetChecked true; - -private _fnc_onUnload = { - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); - if (isNull _logic) exitWith {}; - - if (_this select 1 == 2) then { - deleteVehicle _logic; - }; -}; - -private _fnc_onConfirm = { - params [["_ctrlButtonOK", controlNull, [controlNull]]]; - - private _display = ctrlParent _ctrlButtonOK; - if (isNull _display) exitWith {}; - - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); - if (isNull _logic) exitWith {}; - - private _radius = GETVAR(_display,GVAR(radius),50); - private _position = GETVAR(_display,GVAR(position),getPos _logic); - private _allCurators = cbChecked (_display displayCtrl 16188); - private _removeObjects = cbChecked (_display displayCtrl 16189); - - private _objects = nearestObjects [_position, ["All"], _radius]; - private _localCurator = [getAssignedCuratorLogic player, objNull] select _allCurators; - - if (_removeObjects) then { - [QGVAR(removeObjects), [_objects, _localCurator]] call CBA_fnc_serverEvent; - } else { - [QGVAR(addObjects), [_objects, _localCurator]] call CBA_fnc_serverEvent; - }; - - deleteVehicle _logic; -}; - -_display displayAddEventHandler ["unload", _fnc_onUnload]; -_ctrlButtonOK ctrlAddEventHandler ["buttonClick", _fnc_onConfirm]; diff --git a/addons/zeus/functions/fnc_ui_globalSetSkill.sqf b/addons/zeus/functions/fnc_ui_globalSetSkill.sqf index edca781152..8dcac19bce 100644 --- a/addons/zeus/functions/fnc_ui_globalSetSkill.sqf +++ b/addons/zeus/functions/fnc_ui_globalSetSkill.sqf @@ -6,23 +6,25 @@ * 0: globalSetSkill controls group * * Return Value: - * None + * None * * Example: - * [CONTROL] call ace_zeus_fnc_ui_globalSetSkill + * onSetFocus = "_this call ace_zeus_fnc_ui_globalSetSkill" * * Public: No */ #include "script_component.hpp" +disableSerialization; + params ["_control"]; TRACE_1("params",_control); //Generic Init: -private _display = ctrlParent _control; -private _ctrlButtonOK = _display displayCtrl 1; //IDC_OK -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); +private _display = ctrlparent _control; +private _ctrlButtonOK = _display displayctrl 1; //IDC_OK +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); TRACE_1("logicObject",_logic); _control ctrlRemoveAllEventHandlers "setFocus"; diff --git a/addons/zeus/functions/fnc_ui_groupSide.sqf b/addons/zeus/functions/fnc_ui_groupSide.sqf index 90de9d06ca..be3298c8da 100644 --- a/addons/zeus/functions/fnc_ui_groupSide.sqf +++ b/addons/zeus/functions/fnc_ui_groupSide.sqf @@ -6,10 +6,10 @@ * 0: groupSide controls group * * Return Value: - * None + * NONE * * Example: - * [CONTROL] call ace_zeus_fnc_ui_groupSide + * onSetFocus = "_this call ace_zeus_fnc_ui_groupSide" * * Public: No */ @@ -17,12 +17,14 @@ #include "script_component.hpp" #define IDCs [31201,31200,31202,31203] +disableSerialization; + params ["_control"]; //Generic Init: -private _display = ctrlParent _control; -private _ctrlButtonOK = _display displayCtrl 1; //IDC_OK -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); +private _display = ctrlparent _control; +private _ctrlButtonOK = _display displayctrl 1; //IDC_OK +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); TRACE_1("logicObject",_logic); _control ctrlRemoveAllEventHandlers "setFocus"; @@ -36,7 +38,7 @@ private _fnc_errorAndClose = { params ["_msg"]; _display closeDisplay 0; deleteVehicle _logic; - [_msg] call FUNC(showMessage); + [_msg] call EFUNC(common,displayTextStructured); breakOut "Main"; }; diff --git a/addons/zeus/functions/fnc_ui_patrolArea.sqf b/addons/zeus/functions/fnc_ui_patrolArea.sqf index c026bbce6a..d4fbc092a0 100644 --- a/addons/zeus/functions/fnc_ui_patrolArea.sqf +++ b/addons/zeus/functions/fnc_ui_patrolArea.sqf @@ -6,20 +6,19 @@ * 0: dummy controls group * * Return Value: - * None - * - * Example: - * [CONTROL] call ace_zeus_fnc_ui_patrolArea + * None * * Public: No */ #include "script_component.hpp" +disableSerialization; + //Generic Init: params ["_control"]; private _display = ctrlParent _control; -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); _control ctrlRemoveAllEventHandlers "setFocus"; @@ -31,7 +30,7 @@ private _fnc_errorAndClose = { params ["_msg"]; _display closeDisplay 0; deleteVehicle _logic; - [_msg] call FUNC(showMessage); + [_msg] call EFUNC(common,displayTextStructured); breakOut "Main"; }; diff --git a/addons/zeus/functions/fnc_ui_searchArea.sqf b/addons/zeus/functions/fnc_ui_searchArea.sqf index 06393ca578..3da147b963 100644 --- a/addons/zeus/functions/fnc_ui_searchArea.sqf +++ b/addons/zeus/functions/fnc_ui_searchArea.sqf @@ -6,20 +6,19 @@ * 0: dummy controls group * * Return Value: - * None - * - * Example: - * [CONTROL] call ace_zeus_fnc_ui_searchArea + * None * * Public: No */ #include "script_component.hpp" +disableSerialization; + //Generic Init: params ["_control"]; private _display = ctrlParent _control; -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); _control ctrlRemoveAllEventHandlers "setFocus"; @@ -31,7 +30,7 @@ private _fnc_errorAndClose = { params ["_msg"]; _display closeDisplay 0; deleteVehicle _logic; - [_msg] call FUNC(showMessage); + [_msg] call EFUNC(common,displayTextStructured); breakOut "Main"; }; diff --git a/addons/zeus/functions/fnc_ui_teleportPlayers.sqf b/addons/zeus/functions/fnc_ui_teleportPlayers.sqf index d323a9a467..bdcd8ae93f 100644 --- a/addons/zeus/functions/fnc_ui_teleportPlayers.sqf +++ b/addons/zeus/functions/fnc_ui_teleportPlayers.sqf @@ -6,22 +6,24 @@ * 0: teleportPlayers controls group * * Return Value: - * None + * NONE * * Example: - * [CONTROL] call ace_zeus_fnc_ui_teleportPlayers + * onSetFocus = "_this call ace_zeus_fnc_ui_teleportPlayers" * * Public: No */ #include "script_component.hpp" +disableSerialization; + params ["_control"]; //Generic Init: -private _display = ctrlParent _control; -private _ctrlButtonOK = _display displayCtrl 1; //IDC_OK -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); +private _display = ctrlparent _control; +private _ctrlButtonOK = _display displayctrl 1; //IDC_OK +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); TRACE_1("logicObject",_logic); _control ctrlRemoveAllEventHandlers "setFocus"; @@ -32,7 +34,7 @@ private _listbox = _display displayCtrl 16189; if (alive _x) then { _listbox lbSetData [_listbox lbAdd (name _x), getPlayerUID _x]; }; -} forEach ([] call CBA_fnc_players); +} forEach allPlayers; _listbox lbSetCurSel 0; (_display displayCtrl 16188) cbSetChecked (_logic getVariable ["tpGroup",false]); diff --git a/addons/zeus/functions/fnc_zeusAttributes.sqf b/addons/zeus/functions/fnc_zeusAttributes.sqf index 5481120cd3..dcbef69510 100644 --- a/addons/zeus/functions/fnc_zeusAttributes.sqf +++ b/addons/zeus/functions/fnc_zeusAttributes.sqf @@ -9,7 +9,7 @@ * 2: Display class name * * Return Value: - * None + * None * * Example: * onLoad = "['onLoad',_this,'RscDisplayExample'] call ace_zeus_fnc_zeusAttributes" diff --git a/addons/zeus/script_component.hpp b/addons/zeus/script_component.hpp index 380c46e1c7..ba32164b87 100644 --- a/addons/zeus/script_component.hpp +++ b/addons/zeus/script_component.hpp @@ -4,6 +4,7 @@ // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_ZEUS diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 9cd71c135b..c800afa5f3 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,10 +12,6 @@ Zeus beállítások Настройки Зевса Impostazioni Zeus - Zeus 設定 - Zeus 설정 - 宙斯设定 - 宙斯設定 Provides control over various aspects of Zeus. @@ -24,18 +20,14 @@ Poskytuje kontrolu na různými aspekty Zeuse. Bietet die Steuerung verschiedener Zeus-Optionen an. Proporciona controle sobre diversos aspectos do Zeus. - Fourni le contrôle des différents aspects de Zeus. + Fourni le contrôle des différents aspects de Zeus Különböző beállítási lehetőségeket biztosít a Zeus részeihez. Позволяет контролировать различные аспекты Зевса. Fornisce controllo su vari aspetti di Zeus. - Zeus のさまざまな側面を強化します。 - Zeus에게 다양한 방면의 조작을 제공해줍니다 - 提供宙斯各个方面的控制权. - 提供宙斯各個方面的控制權. Ascension Messages - Wiadomość o nowym Zeusie + Wiad. o nowym Zeusie Mensajes de ascensión Zpráva o novém Zeusovi Aufstiegsnachrichten @@ -44,10 +36,6 @@ Felemelkedési üzenetek Сообщения о вознесении Messaggi di Ascesa - 転生表示 - 재림 메세지 - 上任宙斯讯息 - 上任宙斯訊息 Display global popup messages when a player is assigned as Zeus. @@ -56,14 +44,10 @@ Zobrazit globální zprávu když je hráč přiřazen jako Zeus. Zeige globale Popup-Nachrichten wenn ein Spieler zu Zeus wird. Mostra uma mensagem popup quando um jogador é atribuido ao Zeus. - Affiche un message global quand un joueur est assigné en tant que Zeus. + Affiche un message global quand un joueur est assigné en tant que Zeus Globális üzeneteket jelez ki, ha egy játékos Zeus-nak lesz beosztva. Отображает глобальное всплывающее сообщение, когда один из игроков становится Зевсом. Mostra messaggi popup globali quando un giocatore viene assegnato come Zeus. - プレイヤーが Zeus になるとき、全体へポップアップ表示をおこないます。 - 플레이어가 Zeus 될 시 서버에 이를 알리는 팝업이 등장합니다. - 当一位玩家被指定为宙斯时显示全球讯息. - 當一位玩家被指定為宙斯時顯示全球訊息. Zeus Eagle @@ -76,10 +60,6 @@ Zeus sas Орел Зевса Aquila Zeus - Zeus イーグル - Zeus 독수리 - 宙斯鹰眼模式 - 宙斯鷹眼模式 Spawn an eagle that follows the Zeus camera. @@ -92,10 +72,6 @@ Lerak egy sast, ami követi a Zeus kamerát. Спавнит орла, который следует за камерой Зевса. Crea un'aquila che segue la camera Zeus. - Zeus カメラを追うイーグルを出現します。 - Zeus의 카메라를 따라다니는 독수리를 생성합니다. - 生成一个老鹰跟着宙斯的摄影机 - 生成一個老鷹跟著宙斯的攝影機 Wind Sounds @@ -108,10 +84,6 @@ Szélhangok Звук ветра Suoni del Vento - 風の音 - 바람 소리 - 风声 - 風聲 Play wind sounds when Zeus remote controls a unit. @@ -120,18 +92,14 @@ Přehrát varování (vítr) když Zeus převezmě kontrolu nad jednotkou. Spiele Windgeräusche ab, wenn Zeus eine Einheit steuert. Reproduz sons de vento quando uma unidade é remotamente controlada pelo Zeus. - Joue des bruits de vent quand Zeus controle une unité. + Joue des bruits de vent quand Zeus controle une unité Szélhangokat játszik le, ha a Zeus távvezérel egy egységet. Проигрывает звук ветра каждый раз, когда Зевс вселяется в юнита. Esegui rumori di vento quando Zeus controlla un'unità in remoto. - ユニットが Zeus 遠隔操作になったとき、風の音がします。 - Zeus가 유닛을 조작할 때 바람소리가 납니다. - 当宙斯开始控制单位时利用风的声音提示 - 當宙斯開始控制單位時利用風的聲音提示 Ordnance Warning - Ostrzeżenie o ostrzale artyleryjskim + Ostrz. o ostrzale arty. Advertencia de artefactos explosivos Varování před dělostřelectvem Artilleriewarnung @@ -140,10 +108,6 @@ Tüzérségi figyelmeztetés Предупреждение об арте Allarme Esplosivi - 砲撃の警告 - 폭격 경고 - 武装警告 - 武裝警告 Play a radio warning when Zeus uses ordnance. @@ -152,14 +116,10 @@ Přehrát varování (rádio) když Zeus použije dělostřelectvo. Spiele eine Radiowarnung ab, wenn Zeus Artillerie verwendet. Reproduz uma aviso via rádio quando o Zeus usa um explosivo. - Joue un son radio quand le Zeus utilise du matériel militaire. + Joue un son radio quand le Zeus utilise du matériel militaire Rádiós figyelmeztetés kiadása, ha a Zeus tüzérséget használ. Проигрывает звук радио каждый раз, когда Зевс использует артиллерию. - Riproduci un messaggio radio quando Zeus usa esplosivi. - Zeus が砲撃をつかうときに、無線で警告を流します。 - Zeus가 폭격시 경고 무전을 재생합니다. - 当宙斯开始攻击时使用无线电警告 - 當宙斯開始攻擊時使用無線電警告 + Esegui un messaggio radio quando Zeus usa esplosivi. Reveal Mines @@ -172,10 +132,6 @@ Aknák feltárása Показывать мины Rivela Mine - 地雷の表示 - 지뢰 표시 - 显示地雷 - 顯示地雷 Reveal mines to allies and place map markers. @@ -184,14 +140,10 @@ Odhalí miny pro spojence a umístnit jejich značku na mapu. Melde Minen gegenüber Verbündeten und platziere entsprechende Kartenmarkierungen. Revelar minas para aliados e colocar marcadores no mapa. - Révéler les mines et placer un marqueur sur la carte. + Révéler les mines et placer un marqueur sur la carte Feltárja az aknákat a szövetségeseknek, és jelölőket helyez el a térképen. Показывает мины союзникам и отмечает их маркерами на карте. Rivela mine ad alleati e piazza marcatori in mappa. - 友軍に地雷と地図へ設置マーカーを表示します。 - 아군에게 지도 상의 모든 지뢰를 표시합니다. - 地图将标记队友放置的地雷 - 地圖將標記隊友放置的地雷 Reveal to Allies @@ -204,10 +156,6 @@ Feltárás a szövetségeseknek Показывать союзникам Rivela ad Alleati - 友軍へ表示 - 모든 아군에게 표시 - 透露给盟军 - 透露給盟軍 Allies + Map Markers @@ -220,10 +168,6 @@ Szövetségesek + térkép jelölők Союзники + Маркеры на карте Alleati + Marcatori Mappa - 友軍と地図マーカー - 아군 + 지도 마커 - 显示盟军+地图标记 - 顯示盟軍+地圖標記 Toggle Captive @@ -235,269 +179,103 @@ Basculer en captif Elfogott állapot váltása Пленный (вкл./выкл.) - Attivatore Prigioniero - 捕虜としてトグル - 포로 토글 - 切换俘虏 - 切換俘虜 + Apri Catturato Defend Area Défendre la zone Защитить зону Bránit oblast - 防衛範囲 - Broń obszaru - Verteidige Gebiet - 지역 방어 - Difendi Area - 防御区域 - 防禦區域 - - - Update Editable Objects - 編集可能なオブジェクトを更新 - Aktualizuj edytowalne obiekty - 수정 가능한 물체 갱신 - Màj les objets éditables - Aggiorna Oggetti Modificabili - 更新可编辑的物件 - 更新可編輯的物件 - - - All Curators - 全キュレーター - 모든 큐레이터 - Wszyscy kuratorzy - Tous curateurs - Tutti i Moderatori - 所有编辑者 - 所有編輯者 - - - Apply changes to all curators - 全キュレーターへ変更を適用 - 모든 큐레이터에 변화를 적용합니다 - Zatwierdź zmiany dla wszystkich kuratorów - Applique les changements à tous les curateurs - Applica i cambiamenti a tutti i moderatori - 确认变更给所有编辑者 - 確認變更給所有編輯者 - - - Remove Objects - オブジェクトの削除 - 물체 삭제 - Usuń obiekty - Enlève les objets - Rimuovi Oggetti - 移除物件 - 移除物件 - - - Remove existing instead of adding new - 新しく追加するために削除します - 물체를 삭제합니다 - Usuń istniejące zamiast dodawać nowe - Enlève les objets existants au lieu d'en ajouter de nouveaux - Rimuove gli esistenti e li sostituisce con i nuovi - 移除已存在的物件来新增新的物件 - 移除已存在的物件來新增新的物件 Global AI Skill Compétence global de l'IA Мастерство ботов Globální zkušenosti AI - 総合的な AI スキル - Globalne umiejętności AI - Globale KI-Fähigkeit - 서버 인공지능 실력 - Abilità AI Globale - AI技巧设定 - AI技巧設定 General Skill Compétence générale Общий уровень Primární zkušenosti - 総合スキル - Ogólne umiejętności - Allgemeine Fähigkeit - 전반적 실력 - Abilità Generale - 总体技巧 - 總體技巧 Changes: general, commanding, courage Change: general, commanding, courage Изменяет: general, commanding, courage Upravuje: general, commanding, courage - 変更:general, commanding, courage - Zmienia: ogólne, dowodzenie, odwaga - Ändert: general, commanding, courage - 변화: 전반적, 지휘, 사기 - Cambia: generale, comando, - 改变: 战斗技巧, 指挥技巧, 勇气大小 - 改變: 戰鬥技巧, 指揮技巧, 勇氣大小 Accuracy Précision Меткость Přesnost - 精度 - Precyzja - Genauigkeit - 명중률 - Precisione - 精确度 - 精確度 Changes: aimingAccuracy - Change : aimingAccuracy + Change: aimingAccuracy Изменяет: aimingAccuracy Upravuje: aimingAccuracy - 変更:aimingAccuracy - Zmienia: precyzję celowania - Ändert: aimingAccuracy - 변화: 조준 명중률 - Cambia: aimingAccuracy - 改变: 瞄准精确度 - 改變: 瞄準精確度 Weapon Handling Maniement d'armes Владение оружием Zacházení se zbraní - 武器の扱い - Obsługa broni - Waffenhandhabung - 무기 조작 - Uso dell'Arma - 武器掌握 - 武器掌握 Changes: aimingShake, aimingSpeed, reloadSpeed - Change : aimingShake, aimingSpeed, reloadSpeed + Change: aimingShake, aimingSpeed, reloadSpeed Изменяет: aimingShake, aimingSpeed, reloadSpeed Upravuje: aimingShake, aimingSpeed, reloadSpeed - 変更:aimingShake, aimingSpeed, reloadSpeed - Zmienia: drżenie broni, szybkość celowania, szybkość przeładowania - Ändert: aimingShake, aimingSpeed, reloadSpeed - 변화: 조준시 흔들림, 조준 속도, 재장전 속도 - Cambia: aimingShake, aimingSpeed, reloadSpeed - 改变: 手晃幅度, 瞄准速度, 重新装填速度 - 改變: 手晃幅度, 瞄準速度, 重新裝填速度 Spotting - Repérage + repérage Обнаружение Vnímavost - 索敵 - Rozpoznanie - Aufklärung - 탐지 - Ricognizione - 索敌能力 - 索敵能力 Changes: spotDistance, spotTime - Change : spotDistance, spotTime + Change: spotDistance, spotTime Изменяет: spotDistance, spotTime Upravuje: spotDistance, spotTime - 変更:spotDistance, spotTime - Zmienia: zasięg rozpoznawania, czas rozpoznawania - Ändert: spotDistance, spotTime - 변화: 탐지 거리, 탐지까지의 시간 - Cambia: spotDistance, spotTime - 改变: 搜索距离, 发现时间 - 改變: 搜索距離, 發現時間 Seek Cover - Chercher des couvertures + Chercher couverture Поиск укрытий Vyhledávat krytí - 遮蔽 - Szukaj osłon - Deckungssuche - 엄폐물 찾기 - Cerca Copertura - 寻找掩护 - 尋找掩護 Should AI seek cover - L'IA devrait elle chercher des couvertures + L'IA devrait elle chercher couverture Должны ли боты искать укрытия AI se bude snažit vyhledávat krytí - AI は遮蔽を取るようになります - Czy AI powinno szukać osłon - Soll KI nach Deckung suchen - 인공지능이 엄폐물을 찾아갑니다 - Le AI dovrebbero cercare una copertura - 决定AI是否会寻找掩护 - 決定AI是否會尋找掩護 Auto Combat Combat automatique Авто режим боя Automatický režim boje - 自動戦闘 - Auto walka - Automatischer Kampfmodus - 자동 교전 - Combattimento Automatico - 自动交战 - 自動交戰 Should AI automatically switch to combat mode L'IA devrait elle passer automatiquement en mode combat Должны ли боты автоматически переходить в режим боя AI se automaticky přepne do bojového režimu - AI は自動的に戦闘状態へ切り替えます - Czy AI powinno automatycznie przechodzić w tryb walki - Soll KI automatisch in Kampfmodus umschalten - 인공지능이 자동적으로 교전 상태에 돌입합니다 - Le AI dovrebbero passare in modalità di combattimento automaticamente - 决定AI是否会自动与敌人交战 - 決定AI是否會自動與敵人交戰 Group Side Côté du groupe Сторона группы Strana skupiny - グループ側 - Strona grupy - Gruppenseite - 진영 측 - Fazione del Gruppo - 小队阵营 - 小隊陣營 Patrol Area Zone de patrouille Патрулировать зону Oblast hlídkování - 哨戒範囲 - Patrol obszaru - Patrouillengebiet - 정찰 구역 - Area di Pattugliamento - 巡逻区域 - 巡邏區域 Toggle Surrender @@ -509,106 +287,37 @@ Basculer en capitulation Kapituláló állapot váltása Сдавшийся (вкл./выкл.) - Attivatore Resa - 捕虜としてトグル - 항복 토글 - 切换投降 - 切換投降 - - - Add/Remove FRIES - FRUES の追加と削除 - 패스트로프 추가/제거 - Dodaj/usuń FRIES - Aj./Enlève FRIES - Aggiungi/Rimuovi FRIES - 增加/移除快速垂降进场撤离系统 - 增加/移除快速垂降進場撤離系統 - - - %1 is not fastrope compatible. - %1 はファストロープに対応していません。 - %1은 패스트로프하기에 적합하지 않습니다. - %1 nie jest kompatybilny ze zjazdem linowym. - %1 n'est pas compatible. - %1 non è compatibile con il fastrope. - %1无法使用快速绳降系统. - %1無法使用快速繩降系統. - - - Unable to remove FRIES, ropes are deployed. - すでにロープが展開されているため、FRIES を削除できません。 - 패스트로프 제거 불가능, 줄이 이미 배치되었습니다. - Nie można usunąć FRIES, liny są wypuszczone. - Pas en mesure d'enlever le FRIES, les cordes ne sont pas déployées. - Impossibile rimuovere le FRIES, le corde sono ancora dispiegate - 无法移除快速绳降系统, 因为绳索已被释放出来. - 無法移除快速繩降系統, 因為繩索已被釋放出來. + Apri Resa Teleport Players Téléporter joueurs Телепортиваровать игроков Teleportovat hráče - プレイヤーを移動 - Teleportuj graczy - Spieler teleportieren - 플레이어 순간이동 - Teletrasporta Giocatori - 传送玩家 - 傳送玩家 Player Joueur Игрока Hráč - プレイヤー - Gracz - Spieler - 플레이어 - Giocatore - 玩家 - 玩家 Teleport selected player to module position Téléporter le joueur sélectionné à la position du module Телепортирует выбранного игрока к местоположению модуля Teleportuje vybraného hráče na pozici modulu - 選択したプレイヤーをプレイヤーをモジュール位置へ移動します - Teleportuje wybranego gracza na pozycję modułu - Teleportiert ausgewählten Spieler zur Position des Moduls - 모듈의 위치로 플레이어 순간이동 - Teletrasporta il giocatore selezionato nella posizione del modulo - 传送选定的玩家至模块位置 - 傳送選定的玩家至模塊位置 Teleport Group Téléporter le groupe Телепортировать Группу Teleportovat skupinu - グループを移動 - Teleport grupy - Gruppe teleportieren - 그룹 순간이동 - Teletrasporta Gruppo - 传送小队 - 傳送小隊 Teleports all units in group Téléporte toutes les unités du groupe Телепортирует всех юнитов в группе Teleportuje všechny jednotky ve skupině - グループ内の全ユニットを移動させます - Teleportuje wszystkie jednostki w grupie - Teleportiert alle Einheiten der Gruppe - 그룹내에 모든 인원을 순간이동 시킵니다 - Teletrasporta tutte le unità del gruppo - 传送全部小队成员 - 傳送全部小隊成員 Toggle Unconscious @@ -620,37 +329,19 @@ Basculer en inconscient Eszméletlen állapot váltása Без сознания (вкл./выкл.) - Attivatore Incoscienza - 気絶をトグル - 기절 토글 - 切换昏迷 - 切換昏迷 + Apri Incosciente Search Area Chercher la zone Обыскать зону Prohledat oblast - 捜索範囲 - Przeszukaj teren - Durchsuche Gebiet - 지역 수색 - Area di Ricerca - 搜索区域 - 搜索區域 Search Nearby Building Chercher le bâtiment proche Обыскать ближайшие здания Prohledat nejbližší budovu - 近くの建物を創作します - Przeszukaj najbliższy budynek - Durchsuche nahegelegenes Gebäude - 근처 건물 수색 - Cerca Edifici nelle Vicinanze - 搜索附近的建筑物 - 搜索附近的建築物 Assign Medic @@ -662,10 +353,6 @@ Asignar médico Assegna Medico Assigner médecin - 衛生兵に割り当て - 의무병 임명 - 指定医疗兵 - 指定醫療兵 Assign Medical Vehicle @@ -677,10 +364,6 @@ Asignar vehículo médico Assegna Veicolo Medico Assigner véhicule médical - 医療車両として割り当て - 의무 차량 임명 - 指定医疗载具 - 指定醫療載具 Assign Medical Facility @@ -692,20 +375,6 @@ Asignar instalación médica Assegna Struttura Medica Assigner installation médicale - 医療施設として割り当て - 의무 시설 임명 - 指定医疗设施 - 指定醫療設施 - - - Toggle Simulation - Przełącz symulację - シミュレーションをトグル - 재현 토글 - Bascule Simulation - Attivatore Simulazione - 切换模拟 - 切換模擬 Add Spare Wheel @@ -717,10 +386,6 @@ Ersatzrad hinzufügen Agregar rueda de auxilio Ajouter pièce de rechange - 予備タイヤを追加 - 예비 바퀴 추가 - 增加备用轮胎 - 增加備用輪胎 Add Spare Track @@ -732,10 +397,6 @@ Ersatzkette hinzufügen Agregar oruga de repuesto Ajouter une chenille de secours - 車両へ予備タイヤを追加します。 - 예비 궤도 추가 - 增加备用履带 - 增加備用履帶 Unit must be alive @@ -748,10 +409,6 @@ Csak élő egységeken használni Si può fare solo su persone vive Usar somente em unidades vivas - ユニットを生存させます - 대상이 반드시 살아있어야 합니다 - 单位必须是活着 - 單位必須是活著 Unit must be infantry @@ -764,10 +421,6 @@ Csak járműben kívül lévő egységeken használni Si può usare solo su fanteria a piedi Usar somente em infantaria desmontada - ユニットを歩兵にさせます - 대상이 반드시 보병이어야 합니다 - 单位必须是步兵 - 單位必須是步兵 Unit must be a structure @@ -779,10 +432,6 @@ Jednotka musí být budova Si può usare solo su strutture L'unité doit être une structure - ユニットを構造物とします - 대상이 반드시 건축물이어야만 합니다 - 单位必须是建筑 - 單位必須是建築 Unit must be a vehicle @@ -794,10 +443,6 @@ Jednotka musí být vozidlo Si può usare solo su veicoli L'unité doit être un véhicule - ユニットを車両とします - 대상이 반드시 차량이어야만 합니다 - 单位必须是载具 - 單位必須是載具 Unit must be a vehicle with cargo space @@ -809,10 +454,6 @@ Einheit muss ein Fahrzeug mit Ladekapazität sein La unidad debe ser un vehículo con espacio de carga L'unité doit être un véhicule avec de l'espace de cargaison - ユニットをカーゴ スペースがある車両にします - 대상이 반드시 화물을 실을 수 있는 차량이어야 합니다 - 单位必须是载具且有载货空间 - 單位必須是載具且有載貨空間 Unit must have cargo space left @@ -824,10 +465,6 @@ Einheit muss freie Ladekapazität haben La unidad debe tener espacio de carga disponible L'unité doit avoir de l'espace libre en cargaison - ユニットへカーゴ スペースを与えます - 대상의 화물공간이 남아있어야합니다 - 单位必须有剩余的载货空间 - 單位必須有剩餘的載貨空間 Unit must not be captive @@ -840,36 +477,18 @@ Csak elfogatlan egységeken használni Юнит не должен быть пленным L'unità non dev'essere un prigioniero - ユニットを捕虜にさせません - 대상이 포로면 안됩니다 - 单位不能被俘虏 - 單位不能被俘虜 Unit must belong to an appropriate side L'unité doit appartenir à un côté approprié Юнит должен принадлежать соответствующей стороне Jednotka musí patřit k příslušné straně - ユニットを適切な陣営にします - Jednostka musi należeć do odpowiedniej strony - Einheit muss einer passenden Seite angehören - 대상이 적절한 진영에 속해야만합니다 - L'unità deve appartenere ad una fazione coerente - 单位必须属于一个合适的一边 - 單位必須屬於一個合適的一邊 Nearest building is too far away Le bâtiment le plus proche est trop loin Ближайшие здания слишком далеко Nejbližší budova je příliš daleko - 近くに建物がありません。 - Najbliższy budynek jest zbyt daleko - Nächstgelegenes Gebäude ist zu weit entfernt - 가장가까운 건물이 너무 멈 - L'edificio più vicino è troppo lontano - 最近的房子离太远了 - 最近的房子離太遠了 Place on a unit @@ -882,10 +501,6 @@ Ничего не выделено Semmi sincs az egér alatt Piazza su una unità - ユニットの上に設置 - 대상에 배치하기 - 放置在一个单位上 - 放置在一個單位上 Requires an addon that is not present @@ -898,10 +513,6 @@ Egy jelenleg hiányzó bővítményt igényel Требуется аддон, который отсутствует Richiede un addon che non è presente - 要求されたアドオンは存在していません - 현재 없는 에드온을 필요로 합니다 - 需要一个不存在的插件 - 需要一個不存在的插件 Add Objects to Curator @@ -913,10 +524,6 @@ Aggiungi Oggetti al Curatore Ajouter des objets au curateur (Zeus) Fügt Objekte zum Kurator hinzu - キュレーターにオブジェクトを追加 - 큐레이터에 물체 추가 - 增加物件给任务策划人 - 增加物件給任務策劃人 Adds any spawned object to all curators in the mission @@ -928,109 +535,39 @@ Aggiungi ogni oggetto creato a tutti i Curatori in missione Ajoute n'importe quel objet spawné à tous les curateurs de la mission Fügt jedes gespawnte Objekt allen Kuratoren der Mission hinzu - ミッション内で作成されたオブジェクトに全キュレーターを追加 - 미션 내 큐레이터에 모든 생성 물체 추가 - 在任务中生成物件给所有的任务策划人 - 在任務中生成物件給所有的任務策劃人 Cargo: - Cargo : + Cargo: Груз: Náklad: - カーゴ: - Ładunek: - Ladung: - 화물: - Cargo: - 货物: - 貨物: Task Position Position de la tâche Местоположение задания Pozice úkolu - タスクの位置 - Pozycja zadania - Position der Aufgabe - 작업 위치 - Posizione Incarico - 目标位置 - 目標位置 Select a position to perform the task at Sélectionne une position où accomplir la tâche Выбрать местоположение для выполнения задания - 次の選択位置をタスクとして実行 - Wybierz pozycję na której wykonać zadanie - Wähle eine Position, an der die Aufgabe ausgeführt werden soll - 작업을 할 위치를 선택하십시요 - Seleziona una posizione per eseguire l'incarico - 选择要执行目标的位置 - 選擇要執行目標的位置 Task Radius Rayon de la tâche Радиус задания - タスク範囲 - Obszar zadania - Radius der Aufgabe - 작업 반경 - Raggio Incarico - 目标半径 - 目標半徑 Radius to perform the task within Rayon dans lequel la tâche prend place Радиус выполнения задания - 次の範囲をタスクとして実行 - Obszar na którym zadanie powinno zostać wykonane - Radius, in dem die Aufgabe ausgeführt werden soll - 다음 반경 내에서 작업 - Raggio per eseguire un incarico - 设定目标范围半径 - 設定目標範圍半徑 Invalid radius entered - Rayon invalide entré + rayon invalide entré Введен неправильный радиус Vložen neplatný parametr - 無効な半径が入力されました - Wpisano nieprawidłowy promień - Ungültiger Radius eingegeben - 알 수 없는 반경 입력됨 - Raggio Invalido Inserito - 错误的半径值 - 錯誤的半徑值 - - - Suppressive Fire - Fuoco di Soppressione - Tir de suppression - 制圧射撃 - 火力压制 - 火力壓制 - - - Add full arsenal to object - Ajouter arsenal complet à l'objet - Aggiunge arsenale completo all'oggetto - オブジェクトに完全なアーセナルを追加 - 增加完整的虚拟军火库到物件上 - 增加完整的虛擬軍火庫到物件上 - - - Remove arsenal from object - Retirer arsenal de l'objet - Rimuove arsenale completo dall'oggetto - オブジェクトからアーセナルを削除 - 移除物件上的虚拟军火库 - 移除物件上的虛擬軍火庫 - + \ No newline at end of file diff --git a/addons/zeus/ui/RscAttributes.hpp b/addons/zeus/ui/RscAttributes.hpp index 27f89d89c0..1efcde2c66 100644 --- a/addons/zeus/ui/RscAttributes.hpp +++ b/addons/zeus/ui/RscAttributes.hpp @@ -97,59 +97,6 @@ class GVAR(RscDefendArea): RscDisplayAttributes { }; }; -class GVAR(RscEditableObjects): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscEditableObjects))] call FUNC(zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscEditableObjects))] call FUNC(zeusAttributes)); - class Controls: Controls { - class Background: Background {}; - class Title: Title {}; - class Content: Content { - class Controls { - class radius: GVAR(AttributeRadius) {}; - //class position: GVAR(AttributePosition) {}; - class editableObjects: RscControlsGroupNoScrollbars { - onSetFocus = QUOTE(_this call FUNC(ui_editableObjects)); - idc = 26422; - x = 0; - y = 0; - w = W_PART(11.1); - h = H_PART(2.5); - class controls { - class Label: RscText { - idc = -1; - text = CSTRING(ModuleEditableObjects_curators); - toolTip = CSTRING(ModuleEditableObjects_curators_desc); - x = 0; - y = 0; - w = W_PART(10); - h = H_PART(1); - colorBackground[] = {0,0,0,0.5}; - }; - class AllCurators: RscCheckBox { - idc = 16188; - x = W_PART(10.1); - y = 0; - w = W_PART(1); - h = H_PART(1); - }; - class Label2: Label { - text = CSTRING(ModuleEditableObjects_removal); - toolTip = CSTRING(ModuleEditableObjects_removal_desc); - y = H_PART(1.1); - }; - class EditingMode: AllCurators { - idc = 16189; - y = H_PART(1.1); - }; - }; - }; - }; - }; - class ButtonOK: ButtonOK {}; - class ButtonCancel: ButtonCancel {}; - }; -}; - class GVAR(RscGlobalSetSkill): RscDisplayAttributes { onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscGlobalSetSkill)))] call FUNC(zeusAttributes)); onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscGlobalSetSkill)))] call FUNC(zeusAttributes)); diff --git a/docs/.dockerignore b/docs/.dockerignore deleted file mode 100644 index 85de9cf933..0000000000 --- a/docs/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -src diff --git a/docs/.gitignore b/docs/.gitignore index 7836aaf3f3..3232b5a935 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -18,5 +18,3 @@ addons CNAME tools/temp - -Gemfile.lock diff --git a/docs/Dockerfile b/docs/Dockerfile deleted file mode 100644 index 033cd89d67..0000000000 --- a/docs/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -# Build: -# docker build -t ace3mod/jekyll . -# -# Run: -# docker run -it -p 4000:4000 -v $(pwd):/usr/src/app ace3mod/jekyll -# -# Run with --incremental flag: -# docker run -it -p 4000:4000 -v $(pwd):/usr/src/app ace3mod/jekyll --incremental - -FROM starefossen/github-pages:latest -MAINTAINER bux - -COPY . /usr/src/app - -VOLUME "/usr/src/app" - -ENTRYPOINT ["jekyll", "serve", "--future", "--config", "_config_dev.yml", "-H", "0.0.0.0", "-P", "4000"] diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 0000000000..faafb3cd3d --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,135 @@ +GEM + remote: http://rubygems.org/ + specs: + RedCloth (4.2.9) + RedCloth (4.2.9-x86-mingw32) + activesupport (4.2.5.2) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.3.8) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + colorator (0.1) + ethon (0.8.1) + ffi (>= 1.3.0) + execjs (2.6.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + ffi (1.9.10) + ffi (1.9.10-x86-mingw32) + gemoji (2.1.0) + github-pages (52) + RedCloth (= 4.2.9) + github-pages-health-check (= 1.0.1) + jekyll (= 3.0.3) + jekyll-coffeescript (= 1.0.1) + jekyll-feed (= 0.4.0) + jekyll-gist (= 1.4.0) + jekyll-mentions (= 1.0.1) + jekyll-paginate (= 1.1.0) + jekyll-redirect-from (= 0.9.1) + jekyll-sass-converter (= 1.3.0) + jekyll-seo-tag (= 1.3.1) + jekyll-sitemap (= 0.10.0) + jekyll-textile-converter (= 0.1.0) + jemoji (= 0.5.1) + kramdown (= 1.9.0) + liquid (= 3.0.6) + mercenary (~> 0.3) + rdiscount (= 2.1.8) + redcarpet (= 3.3.3) + rouge (= 1.10.1) + terminal-table (~> 1.4) + github-pages-health-check (1.0.1) + addressable (~> 2.3) + net-dns (~> 0.8) + octokit (~> 4.0) + public_suffix (~> 1.4) + typhoeus (~> 0.7) + html-pipeline (2.3.0) + activesupport (>= 2, < 5) + nokogiri (>= 1.4) + i18n (0.7.0) + jekyll (3.0.3) + colorator (~> 0.1) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.1) + kramdown (~> 1.3) + liquid (~> 3.0) + mercenary (~> 0.3.3) + rouge (~> 1.7) + safe_yaml (~> 1.0) + jekyll-coffeescript (1.0.1) + coffee-script (~> 2.2) + jekyll-feed (0.4.0) + jekyll-gist (1.4.0) + octokit (~> 4.2) + jekyll-mentions (1.0.1) + html-pipeline (~> 2.3) + jekyll (~> 3.0) + jekyll-paginate (1.1.0) + jekyll-redirect-from (0.9.1) + jekyll (>= 2.0) + jekyll-sass-converter (1.3.0) + sass (~> 3.2) + jekyll-seo-tag (1.3.1) + jekyll (~> 3.0) + jekyll-sitemap (0.10.0) + jekyll-textile-converter (0.1.0) + RedCloth (~> 4.0) + jekyll-watch (1.3.1) + listen (~> 3.0) + jemoji (0.5.1) + gemoji (~> 2.0) + html-pipeline (~> 2.2) + jekyll (>= 2.0) + json (1.8.3) + kramdown (1.9.0) + liquid (3.0.6) + listen (3.0.6) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9.7) + mercenary (0.3.5) + mini_portile2 (2.0.0) + minitest (5.8.4) + multipart-post (2.0.0) + net-dns (0.8.0) + nokogiri (1.6.7.2) + mini_portile2 (~> 2.0.0.rc2) + nokogiri (1.6.7.2-x86-mingw32) + mini_portile2 (~> 2.0.0.rc2) + octokit (4.2.0) + sawyer (~> 0.6.0, >= 0.5.3) + public_suffix (1.5.3) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) + ffi (>= 0.5.0) + rdiscount (2.1.8) + redcarpet (3.3.3) + rouge (1.10.1) + safe_yaml (1.0.4) + sass (3.4.21) + sawyer (0.6.0) + addressable (~> 2.3.5) + faraday (~> 0.8, < 0.10) + terminal-table (1.5.2) + thread_safe (0.3.5) + typhoeus (0.8.0) + ethon (>= 0.8.0) + tzinfo (1.2.2) + thread_safe (~> 0.1) + +PLATFORMS + ruby + x86-mingw32 + +DEPENDENCIES + github-pages + +BUNDLED WITH + 1.12.5 diff --git a/docs/README.md b/docs/README.md index ee47a3cdd9..9c20ecb281 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,52 +1,10 @@ -# Source of https://ace3mod.com/ +# Source of http://ace3mod.com/ -## Updating compiled JavaScript and CSS files +## Setting up the development environment -- Install [Node.js](https://nodejs.org/download/) -- Open Command Prompt and navigate to `src` directory - ``` - cd /docs/src - ``` +### Installing prerequisites -- Install Node packages - ``` - npm install - ``` - _On Bash on Ubuntu on Windows also install `nodejs-legacy` in case of errors._ - -- Update files - ``` - grunt - ``` - -## Setting up the Jekyll environment - -### Using Docker - -We include files for [Docker](https://www.docker.com/) to run Jekyll in a separate container. This allows you to not having to install anything apart from Docker on your computer. - -#### Running the Dockerfile - -- Install [Docker](https://www.docker.com/) -- cd into the `/docs/` directory -- Open Command Prompt and navigate to this directory - ``` - cd /docs - ``` - -- Build and run the container - ``` - docker-compose up - ``` - -- Navigate to [http://localhost:4000](http://localhost:4000) - - -### Manually - -#### Installing prerequisites - -##### Windows (CMD) +#### Windows (CMD) - Install [Ruby 2.0.0-p648 (x64)](http://rubyinstaller.org/downloads/) - Install [Ruby DevKit for 2.0 (x64)](http://rubyinstaller.org/downloads/) @@ -65,7 +23,6 @@ We include files for [Docker](https://www.docker.com/) to run Jekyll in a separa bundle install ``` - #### Debian / Bash on Ubuntu on Windows - Open Bash and navigate to this directory @@ -75,14 +32,14 @@ We include files for [Docker](https://www.docker.com/) to run Jekyll in a separa - Install `make` and `gcc` ``` - sudo apt-get install make gcc + sudo apt-get make gcc ``` -- Install `ruby2.0`, `ruby2.0-dev` and `ruby-switch` +- Install `ruby 2.0`, `rbuy2.0-dev` and `ruby-switch` ``` sudo apt-add-repository ppa:brightbox/ruby-ng - sudo apt-get update - sudo apt-get install ruby2.0 ruby2.0-dev ruby-switch + sudo apt update + sudo apt install ruby2.0 ruby2.0-dev ruby-switch ``` - Set Ruby version @@ -105,7 +62,7 @@ We include files for [Docker](https://www.docker.com/) to run Jekyll in a separa find ~/.bundle/cache -type d -exec chmod 0755 {} + ``` -#### Running +### Running - Run Jekyll through bundler ``` @@ -115,3 +72,21 @@ We include files for [Docker](https://www.docker.com/) to run Jekyll in a separa - Navigate to http://localhost:4000 +### Updating compiled JavaScript and CSS files + +- Install [Node.js](https://nodejs.org/download/) +- Open Command Prompt and navigate to `src` directory + ``` + cd /docs/src + ``` + +- Install Node packages + ``` + npm install + ``` + _On Bash on Ubuntu on Windows also install `nodejs-legacy` in case of errors._ + +- Update files + ``` + grunt + ``` diff --git a/docs/README_DE.md b/docs/README_DE.md index b18759b3cd..9e1bcec8ab 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -4,7 +4,7 @@

- ACE3 Version + ACE3 Version ACE3 Fehlermeldungen @@ -15,8 +15,8 @@ ACE3 Lizenz - - ACE3 Slack + + ACE3 Slack ACE3 Build Status @@ -70,14 +70,14 @@ Die Mod ist **modular aufgebaut**. Beinahe jede PBO kann entfernt werden, sodass #### Anleitungen Du hast ACE3 installiert, hast aber keine Ahnung was und wie alles funktioniert und wo sich was befindet? -- [Erste Schritte](https://ace3mod.com/wiki/user/getting-started.html). +- [Erste Schritte](http://ace3mod.com/wiki/user/getting-started.html). #### Mitwirken Wenn du bei der Entwicklung von ACE3 mithelfen möchtest, kannst du dies tun, indem du nach Fehlern Ausschau hältst oder neue Funktionen vorschlägst. Um etwas beizutragen, "Forke" dieses Repository und erstelle deine "Pull-Requests", welche von anderen Entwicklern und Beiträgern überprüft werden. Bitte trage dich dabei in [`AUTHORS.txt`](https://github.com/acemod/ACE3/blob/master/AUTHORS.txt) mit deinem Nutzernamen und einer gültigen Email-Adresse ein. Um uns einen Fehler, Anregungen oder neue Funktionalitäten mitzuteilen: Nutze unseren [Issue Tracker](https://github.com/acemod/ACE3/issues). Besuche auch: -- [Wie kann ich ein Problem melden](https://ace3mod.com/wiki/user/how-to-report-an-issue.html) -- [Wie kann ich ein Wunsch zu einer neuen Funktion mitteilen?](https://ace3mod.com/wiki/user/how-to-make-a-feature-request.html) +- [Wie kann ich ein Problem melden](http://ace3mod.com/wiki/user/how-to-report-an-issue.html) +- [Wie kann ich ein Wunsch zu einer neuen Funktion mitteilen?](http://ace3mod.com/wiki/user/how-to-make-a-feature-request.html) #### Testen & Mod erstellen Wenn du die neusten Entwicklungen erleben und uns dabei helfen möchtest bestehende Fehler zu entdecken, lade dir die "Master Branch" herunter. Entweder nutzt du [Git](https://help.github.com/articles/fetching-a-remote/) - wenn die Schritte bekannt sind - oder du lädst es dir direkt über [diesen Link](https://github.com/acemod/ACE3/archive/master.zip) herunter. diff --git a/docs/README_PL.md b/docs/README_PL.md index 248627a6f1..703613142e 100644 --- a/docs/README_PL.md +++ b/docs/README_PL.md @@ -3,7 +3,7 @@

- ACE3 Wersja + ACE3 Wersja ACE3 Zagadnienia @@ -14,8 +14,8 @@ ACE3 Licencja - - ACE3 Slack + + ACE3 Slack ACE3 Build Status @@ -65,15 +65,15 @@ Modyfikacja ta jest **budowana modułowo**, dzięki temu prawie każdy dostarczo ### Poradniki i instrukcje Jeżeli zainstalowałeś ACE3 lecz masz problem ze zrozumieniem jak to wszystko działa, lub gdzie zacząć, zacznij od przeczytania tego: -- [Wprowadzenie](https://ace3mod.com/wiki/user/getting-started.html) +- [Wprowadzenie](http://ace3mod.com/wiki/user/getting-started.html) #### Współpraca Możesz pomóc w rozwoju addonu szukając potencjalnych bugów w naszym kodzie, lub zgłaszając nowe funkcje. Aby wnieść swój wkład do ACE3, po prostu zforkuj to repozytorium na swoje konto GitHub i zgłoś swoje pull requesty do przeglądu przez innych współpracowników. Pamiętaj, aby dodać siebie do listy autorów każdego PBO jakie edytujesz oraz do pliku ['AUTHORS.txt'](https://github.com/acemod/ACE3/blob/master/AUTHORS.txt) dodając także swój adres e-mail. Używaj naszego [Issue Tracker-a](https://github.com/acemod/ACE3/issues) aby zgłaszać bugi, proponować nowe funkcje lub sugerować zmiany do aktualnie istniejących. Zobacz także: -- [Jak zgłosić bug-a](https://ace3mod.com/wiki/user/how-to-report-an-issue.html) -- [Jak zgłosić feature request-a](https://ace3mod.com/wiki/user/how-to-make-a-feature-request.html) +- [Jak zgłosić bug-a](http://ace3mod.com/wiki/user/how-to-report-an-issue.html) +- [Jak zgłosić feature request-a](http://ace3mod.com/wiki/user/how-to-make-a-feature-request.html) #### Testowanie i budowanie Aby pomóc nam w testowaniu najnowszych zmian rozwojowych, pobierz nasz master branch ([bezpośrednio](https://github.com/acemod/ACE3/archive/master.zip), lub [korzystając z git](https://help.github.com/articles/fetching-a-remote/)), a następnie złóż testowego build-a: -- [Konfiguracja środowiska do testów](https://ace3mod.com/wiki/development/setting-up-the-development-environment.html) – intrukcja krok-po-kroku jak poprawnie ustawić i zbudować wersję ACE3 do celów testowych. +- [Konfiguracja środowiska do testów](http://ace3mod.com/wiki/development/setting-up-the-development-environment.html) – intrukcja krok-po-kroku jak poprawnie ustawić i zbudować wersję ACE3 do celów testowych. diff --git a/docs/_config.yml b/docs/_config.yml index 54ee5ad6d3..a1ee07ad0b 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,24 +1,26 @@ +#baseurl: /ACE3 + name: ACE3 description: ACE3 is a joint effort by the teams behind ACE 2, AGM and CSE to improve the realism and authenticity of Arma 3. keywords: Advanced Combat Enhancement 3, ACE, ACE3, Arma, Arma 3, Mod, Modification, Realism, AGM, CSE, Bohemia, Interactive -productionUrl: https://ace3mod.com +productionUrl: http://ace3mod.com ace: githubUrl: https://github.com/acemod/ACE3 version: major: 3 - minor: 10 - patch: 1 - build: 21 + minor: 6 + patch: 2 + build: 0 acex: githubUrl: https://github.com/acemod/ACEX version: major: 3 - minor: 2 + minor: 0 patch: 0 - build: 4 + build: 0 markdown: kramdown diff --git a/docs/_config_dev.yml b/docs/_config_dev.yml index 83046e74c0..65ce74e48c 100644 --- a/docs/_config_dev.yml +++ b/docs/_config_dev.yml @@ -10,17 +10,17 @@ ace: githubUrl: https://github.com/acemod/ACE3 version: major: 3 - minor: 10 - patch: 1 - build: 21 + minor: 6 + patch: 2 + build: 0 acex: githubUrl: https://github.com/acemod/ACEX version: major: 3 - minor: 2 + minor: 0 patch: 0 - build: 4 + build: 0 markdown: kramdown diff --git a/docs/_includes/_footer.html b/docs/_includes/_footer.html index 8763b6c35a..d391330c6e 100644 --- a/docs/_includes/_footer.html +++ b/docs/_includes/_footer.html @@ -3,22 +3,22 @@

ACE3

ACE3 is a joint effort by the teams behind ACE2, AGM and CSE to improve the realism and authenticity of Arma 3.

-

If you want to contribute something to ACE3, simply fork the GitHub repository and submit your pull requests for review.

+

If you want to contribute something to ACE3, simply fork the GitHub repository and submit your pull requests for review.

Issues / Feedback

-

Issues, feature requests and feedback are welcome at the ACE3 GitHub issue tracker.

-

Before reporting an issue, please read the wiki entry "How to report an issue".

-

We have created a single issue for feature requests.

+

Issues, feature requests and feedback are welcome at the ACE3 GitHub issue tracker.

+

Before reporting an issue, please read the wiki entry "How to report an issue".

+

We have created a single issue for feature requests.

Social Media

- +
diff --git a/docs/_includes/_header.html b/docs/_includes/_header.html index 84bcab8d2e..8737b505ae 100644 --- a/docs/_includes/_header.html +++ b/docs/_includes/_header.html @@ -8,7 +8,7 @@ - + @@ -19,11 +19,8 @@ - + - - - diff --git a/docs/_includes/dependencies_list.md b/docs/_includes/dependencies_list.md index 4e2a3dc141..115ebe34c8 100644 --- a/docs/_includes/dependencies_list.md +++ b/docs/_includes/dependencies_list.md @@ -23,7 +23,7 @@ {% endif %} {% if include.component == "atragmx" %} -`ACE_Advanced_Ballistics`, `ACE_common`, `ACE_weather` +`ACE_common`, `ACE_weather` {% endif %} {% if include.component == "attach" %} @@ -75,7 +75,7 @@ {% endif %} {% if include.component == "dogtags" %} -`ace_interaction` +`ace_common` {% endif %} {% if include.component == "dragging" %} @@ -138,10 +138,6 @@ `ace_interaction` {% endif %} -{% if include.component == "hellfire" %} -`ace_interaction`, `ace_missileguidance` -{% endif %} - {% if include.component == "hitreactions" %} `ace_common` {% endif %} @@ -174,6 +170,10 @@ `ace_common` {% endif %} +{% if include.component == "laser_selfdesignate" %} +`ace_laser` +{% endif %} + {% if include.component == "laserpointer" %} `ace_common` {% endif %} @@ -214,10 +214,6 @@ `ace_medical` {% endif %} -{% if include.component == "medical_blood" %} -`ace_main` -{% endif %} - {% if include.component == "medical_menu" %} `ace_medical` {% endif %} @@ -262,10 +258,6 @@ `ace_common` {% endif %} -{% if include.component == "nlaw" %} -`ace_missileguidance` -{% endif %} - {% if include.component == "noidle" %} `ace_common` {% endif %} @@ -298,12 +290,12 @@ `ace_common` {% endif %} -{% if include.component == "quickmount" %} +{% if include.component == "particles" %} `ace_common` {% endif %} {% if include.component == "rangecard" %} -`ACE_Advanced_Ballistics`, `ace_scopes` +`ACE_Advanced_Ballistics` {% endif %} {% if include.component == "realisticnames" %} @@ -354,6 +346,10 @@ `ace_common` {% endif %} +{% if include.component == "sitting" %} +`ace_interaction` +{% endif %} + {% if include.component == "slideshow" %} `ace_common` {% endif %} @@ -434,71 +430,3 @@ `ace_common` {% endif %} -{% if include.component == "compat_adr_97" %} -`A3_Weapons_F_Mod` -{% endif %} - -{% if include.component == "compat_r3f" %} -`r3f_armes_c`, `r3f_armes`, `r3f_acc` -{% endif %} - -{% if include.component == "compat_rh_acc" %} -`RH_acc` -{% endif %} - -{% if include.component == "compat_rh_de" %} -`RH_de_cfg` -{% endif %} - -{% if include.component == "compat_rh_m4" %} -`RH_m4_cfg` -{% endif %} - -{% if include.component == "compat_rh_pdw" %} -`RH_PDW` -{% endif %} - -{% if include.component == "compat_rhs_afrf3" %} -`ace_rearm`, `ace_refuel`, `ace_repair`, `rhs_c_weapons`, `rhs_c_troops`, `rhs_c_bmd`, `rhs_c_bmp`, `rhs_c_bmp3`, `rhs_c_a2port_armor`, `rhs_c_btr`, `rhs_c_sprut`, `rhs_c_t72`, `rhs_c_tanks`, `rhs_c_a2port_air`, `rhs_c_a2port_car`, `rhs_c_cars`, `rhs_c_trucks`, `rhs_c_2s3`, `rhs_c_rva`, `rhs_c_heavyweapons` -{% endif %} - -{% if include.component == "compat_rhs_gref3" %} -`rhsgref_main`, `rhsgref_c_weapons` -{% endif %} - -{% if include.component == "compat_rhs_usf3" %} -`ace_javelin`, `ace_rearm`, `ace_refuel`, `ace_repair`, `rhsusf_c_weapons`, `rhsusf_c_troops`, `rhsusf_c_m1a1`, `rhsusf_c_m1a2`, `RHS_US_A2_AirImport`, `rhsusf_c_m109`, `rhsusf_c_HEMTT_A4`, `rhsusf_c_hmmwv`, `rhsusf_c_rg33`, `rhsusf_c_fmtv`, `rhsusf_c_m113`, `RHS_US_A2Port_Armor`, `rhsusf_c_melb` -{% endif %} - -{% if include.component == "compat_rksl_pm_ii" %} -`RKSL_PMII` -{% endif %} - -{% if include.component == "compat_sma3_iansky" %} -`iansky_opt` -{% endif %} - -{% if include.component == "noactionmenu" %} -`ace_common` -{% endif %} - -{% if include.component == "nocrosshair" %} -`ace_common` -{% endif %} - -{% if include.component == "nouniformrestrictions" %} -`ace_common` -{% endif %} - -{% if include.component == "particles" %} -`ace_common` -{% endif %} - -{% if include.component == "server" %} -`ace_common` -{% endif %} - -{% if include.component == "tracers" %} -`ace_ballistics` -{% endif %} - diff --git a/docs/_posts/2015-07-30-ace3-version320.md b/docs/_posts/2015-07-30-ace3-version320.md index 850717f47c..8abb849250 100644 --- a/docs/_posts/2015-07-30-ace3-version320.md +++ b/docs/_posts/2015-07-30-ace3-version320.md @@ -29,7 +29,7 @@ While porting some of ACE 2's AGM's and CSE's features we've ported some of the Fixing errors we were additionally working on further optimizing existing code and we've managed to achieve a big performance boost in our wind deflection code. -Furthermore a problem with vanilla damage being applied to some units has been fixed. If you still encounter this issue please report it following this guideline: {{ site.baseurl }}/wiki/user/how-to-report-an-issue.html +Furthermore a problem with vanilla damage being applied to some units has been fixed. If you still encounter this issue please report it following this guideline: http://ace3mod.com/wiki/user/how-to-report-an-issue.html ### The Shiny Things diff --git a/docs/_posts/2015-09-17-ace3-version331.md b/docs/_posts/2015-09-17-ace3-version331.md index 2a4fbb46fe..13d6435d90 100644 --- a/docs/_posts/2015-09-17-ace3-version331.md +++ b/docs/_posts/2015-09-17-ace3-version331.md @@ -72,4 +72,4 @@ https://github.com/acemod/ACE3/releases/tag/v3.3.0 With the changes of 3.3.1 which can be found here: https://github.com/acemod/ACE3/releases/tag/v3.3.1 (Be sure to download v3.3.1) -If you want to chat with fellow ACE3 users or with a dev feel free to join our public slack chat. Registration is free and open for everyone: https://slackin.ace3mod.com/ +If you want to chat with fellow ACE3 users or with a dev feel free to join our public slack chat. Registration is free and open for everyone: http://slackin.ace3mod.com/ diff --git a/docs/_posts/2015-12-03-ace3-version340.md b/docs/_posts/2015-12-03-ace3-version340.md index 1382663470..ddaf1bd890 100644 --- a/docs/_posts/2015-12-03-ace3-version340.md +++ b/docs/_posts/2015-12-03-ace3-version340.md @@ -62,4 +62,4 @@ The complete change log of 3.4.0 can be found at: https://github.com/acemod/ACE3 And most important: If you want to chat with fellow ACE3 users or with a dev, if you have an idea or are in need of help feel free to join our public slack chat. -Registration is open for everyone: https://slackin.ace3mod.com/ +Registration is open for everyone: http://slackin.ace3mod.com/ diff --git a/docs/_posts/2016-03-02-ace3-version350.md b/docs/_posts/2016-03-02-ace3-version350.md index a6b6b89d8c..668e0adee5 100644 --- a/docs/_posts/2016-03-02-ace3-version350.md +++ b/docs/_posts/2016-03-02-ace3-version350.md @@ -82,4 +82,4 @@ Make sure to [follow us on twitter](https://twitter.com/intent/follow?screen_nam **And most important:** If you want to chat with fellow ACE3 users or with a dev, if you have an idea or are in need of help feel free to join our public slack chat. -**Registration is open for everyone: [https://slackin.ace3mod.com/](https://slackin.ace3mod.com/)** +**Registration is open for everyone: [http://slackin.ace3mod.com/](http://slackin.ace3mod.com/)** diff --git a/docs/_posts/2016-06-21-moving-ace3-frameworks-to-cba.md b/docs/_posts/2016-06-21-moving-ace3-frameworks-to-cba.md index e5effd04b2..1e7ccc8a1b 100644 --- a/docs/_posts/2016-06-21-moving-ace3-frameworks-to-cba.md +++ b/docs/_posts/2016-06-21-moving-ace3-frameworks-to-cba.md @@ -66,7 +66,7 @@ This update does not mean that if your mod depends on any of this functionality ### Replacing deprecated functionality -It is recommended to replace any functionality that is deprecated with its replacement as soon as possible. If you are in need of any help with moving from deprecated ACE3 functionality to it's replacement, please visit our [Public Slack team at https://slackin.ace3mod.com](https://slackin.ace3mod.com){:target="_blank"}. +It is recommended to replace any functionality that is deprecated with its replacement as soon as possible. If you are in need of any help with moving from deprecated ACE3 functionality to it's replacement, please visit our [Public Slack team at http://slackin.ace3mod.com](http://slackin.ace3mod.com){:target="_blank"}. ## ACE3 Events @@ -77,4 +77,4 @@ Any code currently using the old ACE3 event functions will still function correc --- -We hope you like the new frameworks made publicly available in CBA A3 and without needing a dependency on ACE3. Feel free to leave your feedback either on the [CBA BI forum thread](https://forums.bistudio.com/topic/168277-cba-community-base-addons-arma-3/){:target="_blank"}, the [ACE3 BI forum thread](https://forums.bistudio.com/topic/181341-ace3-a-collaborative-merger-between-agm-cse-and-ace/){:target="_blank"} or in our [public chat](https://slackin.ace3mod.com){:target="_blank"}. +We hope you like the new frameworks made publicly available in CBA A3 and without needing a dependency on ACE3. Feel free to leave your feedback either on the [CBA BI forum thread](https://forums.bistudio.com/topic/168277-cba-community-base-addons-arma-3/){:target="_blank"}, the [ACE3 BI forum thread](https://forums.bistudio.com/topic/181341-ace3-a-collaborative-merger-between-agm-cse-and-ace/){:target="_blank"} or in our [public chat](http://slackin.ace3mod.com){:target="_blank"}. diff --git a/docs/_posts/2016-06-30-ace3-version360.md b/docs/_posts/2016-06-30-ace3-version360.md index c8e4ed9a20..3471d85b3a 100644 --- a/docs/_posts/2016-06-30-ace3-version360.md +++ b/docs/_posts/2016-06-30-ace3-version360.md @@ -100,6 +100,6 @@ The full changelog for ACE3 v3.6.0 can be found here: [https://github.com/acemod We are still in need for translations for some languages within the ACE3 project. Please have a look at [this github issue to track the progress and what languages lack translations](https://github.com/acemod/ACE3/issues/367){:target="_blank"}. Any and all help with this is appreciated. And most finally, we would like to invite you to our ACE3 public Slack chat. Here you can chat with fellow ACE3 users and developers, ask questions and receive help. -Registration is open for everyone: [https://slackin.ace3mod.com](https://slackin.ace3mod.com){:target="_blank"}. +Registration is open for everyone: [http://slackin.ace3mod.com](http://slackin.ace3mod.com){:target="_blank"}. Make sure to [follow us on twitter](https://twitter.com/intent/follow?screen_name=ace3mod&tw_p=followbutton){:target="_blank"} and to [like our facebook page](https://www.facebook.com/ACE3Mod/){:target="_blank"}. diff --git a/docs/_posts/2016-09-17-ace3-version370.md b/docs/_posts/2016-09-17-ace3-version370.md deleted file mode 100644 index bd25b4c0fd..0000000000 --- a/docs/_posts/2016-09-17-ace3-version370.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: ACEREP #00006 -description: Status report on ACE3 version 3.7.0 -parent: posts -image: /img/news/160912_grenade.jpg -author: glowbal -layout: post ---- - -It is [here](https://github.com/acemod/ace3/releases/v3.7.0){:target="_blank"}! The new ACE 3.7.0 update. We've been hard at work adding in a couple of exciting new features. As is per usual for us, we have also worked on a large collection of bug fixes, optimizations and general improvements to existing functionality. - - - -At this stage, we'd like to take the opportunity to briefly look back to the past year. Almost a year ago, in December 2015, we released ACE 3.3.2. At that time we had over 31.000 Steam subscribers and over 23.000 downloads on Github for ACE3. - -Since then, we've introduced a large number of new functionality; trenches, fast roping, mine detectors and our initial release for ACEX are just a few. We have worked on stability and polishing existing functionality, and our team has grown with new members ([@jonpas](https://github.com/jonpas){:target="_blank"}, [@BaerMitUmlaut](https://github.com/BaerMitUmlaut){:target="_blank"}). - -Now, we are close to 150.000 subscribers on Steam, and nearly 193.000 downloads combined on Github. That's a huge growth. Thanks to all our supporters! - -## What's new - -It is time to tell you about some of the exciting new things that come with the new update. - -### Advanced Throwing - -Earlier this year, [@dslyecxi](https://twitter.com/Dslyecxi){:target="_blank"} posted a YouTube video showing his implementation of a grenade throwing system. He has kindly donated his proof of concept to ACE3. Since then we've been hard at work integrating it into ACE3. And the result pays off! - - - - - Here is a video showing it in action: - -
- -### Chemlight improvements - -One of the things we love about Arma 3 are the chemlights. With the 3.7.0 release, [@voiperr](https://github.com/voiperr){:target="_blank"}, one of our valued contributors has submitted his Chemlight enchancements. Here are some comparison screenshots: - -- [Vanilla Normal](http://i.imgur.com/zn61eiy.jpg){:target="_blank"} vs [ACE3 Normal](http://i.imgur.com/uOkzGwB.jpg){:target="_blank"} -- [Vanilla Night Vision](http://i.imgur.com/aR0p59M.jpg){:target="_blank"} vs [ACE3 Night Vision](http://i.imgur.com/QqM7iDI.jpg){:target="_blank"} - -### Cook off - -Back in the ACE2 days, this was one of the big features. And now it's back. Our own [@commy2](https://github.com/commy2){:target="_blank"} has implemented ammo cook off again. Here is a video: - - - - -### Medical AI - -Since the CBA release 2.5.1 the state machine implementation from [@BaerMitUmlaut](https://github.com/BaerMitUmlaut){:target="_blank"} has been available. Within ACE, we are using this to add our first implementation of medical AI. This means that AI medics will be able to treat themselves and members from their squad. - -For now, this is only enabled for Basic Medical. We are looking to expand this to Advanced Medical as well. - -## Future - -We are still at work on improving medical. Unfortunally we did not manage to finish our overhaul for the 3.7.0 release, but we hope to have the first stages completed and included before the end of the year. - -We are also working on new features such as Blue Force Tracking, Burning and more ports from ACE2, AGM and CSE. We are also open to any features submitted for ACE3. If you have exciting functionality that you feel could belong in ACE3, we are accepting pull requests. - -## The End Things - -The full changelog for ACE3 v3.7.0 can be found here: [https://github.com/acemod/ACE3/releases/v3.7.0](https://github.com/acemod/ACE3/releases/v3.7.0){:target="_blank"} - -We are still in need for translations for some languages within the ACE3 project. Please have a look at [this github issue to track the progress and what languages lack translations](https://github.com/acemod/ACE3/issues/367){:target="_blank"}. Any and all help with this is appreciated. - -
-
- Slack Monochrome black logo -
-
- -And most finally, we would like to invite you to our ACE3 public Slack chat. Here you can chat with fellow ACE3 users and developers, ask questions and receive help. -Registration is open for everyone: [https://slackin.ace3mod.com](https://slackin.ace3mod.com){:target="_blank"}. - -Make sure to [follow us on twitter](https://twitter.com/intent/follow?screen_name=ace3mod&tw_p=followbutton){:target="_blank"} and to [like our facebook page](https://www.facebook.com/ACE3Mod/){:target="_blank"}. diff --git a/docs/_posts/2016-11-04-ace3-version381.md b/docs/_posts/2016-11-04-ace3-version381.md deleted file mode 100644 index 0ba73a5c2d..0000000000 --- a/docs/_posts/2016-11-04-ace3-version381.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: ACEREP #00007 -description: Status report on ACE3 version 3.8.1 -parent: posts -image: /img/news/161104_blood.jpg -author: bux -layout: post ---- - -Just about two month ago we've released 3.7.0. A version that had most of the bugs fixed even before the official release. For the first time we were actively supplying users interested in helping us with pre release versions of the mod - so called release candidates. Quite a lot of communities tested the several release candidates and provided us with very valuable feedback. Especially on bugs and quirks that are near impossible to test alone. - - - -A big shoutout to those who helped testing! Thank you. - -We've used this approach for 3.8.0 as well and hope that again most of the bugs have been fixed already and that you can enjoy ACE3 without annoying interruptions. - -We will keep this approach for the future and invite you to join to test the release candidates. All information will be posted in our public chat to which you're invited too. You can access it here: [https://slackin.ace3mod.com](https://slackin.ace3mod.com){:target="_blank"} - -So, why didn't we release any minor releases for 3.7.0 (e.g. 3.7.1)? In short: We didn't feel that it was necessary. During and directly after the release we had already added new and awesome features so that we had to do a major release. - -Two new features have made it into 3.8.0 which are "blood splatters" and "ammo box cook off". -Wounded units will now leave more visible trails of blood on the ground which could make for interesting missions like escaping as a wounded soldier who is being tracked down by enemy combatants. -When ammo boxes are destroyed the contained ammunition now will cook off in a multitude of small explosions and the boxes won't just sink into the ground. - -
-
- A wounded insurgent in front of a damaged truck. -
-
- -With 3.8.0 the map tools will allow you to draw straight lines again. A feature that sadly is missing in vanilla Arma 3. - -## The Future things - -### Medical rewrite - -If you're following ACE3 development on GitHub closely you might already have spotted it: The medical system gets a huge rewrite. That's true, we're completely redoing the medical system. Until now the medical system has been a merge of the AGM and CSE medical systems. The AGM one kind of became what you know as the "basic system" and CSE's respectively the "advanced system". Being two separate systems it was always hard for us to improve one or the other without reworking the other one too. Not an ideal situation. Another issue we will address with this rewrite is the amount of influence a medical condition has on gameplay. An issue we've often heard from different communities as well. There's an [interesting discussion going on GitHub with a lot of different ideas and feature requests](https://github.com/acemod/ACE3/issues/3134){:target="_blank"}. Worth a read. - -With the state machine system that has been introduced in CBA we are now able to strictly define various health states of players such as unconsciousness or cardiac arrest and what can happen in those states. This allows us to massively declutter the code which will not only reduce the possibility of bugs, but also enable us to add more features and gameplay elements to the medical system - with no performance loss at all. - -We're really looking forward to the result and how you will like it. - -### Night Vision Googles Improvements - -If you've [watched dslyecxi's recent YouTube videos](https://www.youtube.com/user/Dslyecxi){:target="_blank"} or if you're [following us on twitter](https://twitter.com/intent/follow?screen_name=ace3mod&tw_p=followbutton){:target="_blank"} you might already have seen that dslyecxi has put together a mod vastly improving night vision googles and the resulting very limiting view. Check out his video with the explanation why vanilla Arma 3 NVGs are a bad representation of real life NVGs and what he has done to improve that. - - - - -dslyecxi has donated his mod to ACE3 and we're looking into integrating it for a future release. - -## The End Things - -The full changelog for ACE3 v3.8.1 can be found here: [https://github.com/acemod/ACE3/releases/v3.8.1](https://github.com/acemod/ACE3/releases/v3.8.1){:target="_blank"} - -We are still in need for translations for some languages within the ACE3 project. Please have a look at [this GitHub issue to track the progress and what languages lack translations](https://github.com/acemod/ACE3/issues/367){:target="_blank"}. Any and all help with this is very appreciated. - -Make sure to [follow us on twitter](https://twitter.com/intent/follow?screen_name=ace3mod&tw_p=followbutton){:target="_blank"} and to [like our facebook page](https://www.facebook.com/ACE3Mod/){:target="_blank"}. - diff --git a/docs/_posts/2017-02-21-ace3-version390.md b/docs/_posts/2017-02-21-ace3-version390.md deleted file mode 100644 index 42368de04e..0000000000 --- a/docs/_posts/2017-02-21-ace3-version390.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: ACEREP #00008 -description: Status report on ACE3 version 3.9.0 -parent: posts -image: /img/news/170221_csatconvoy.jpg -author: bux -layout: post ---- - -Another year, another release. 3.9.0 is the first release of 2017 and we'd like to thank everyone who has helped us to make it a smooth one. - - - - - - -The release candidate testing was very successful and we have received important feedback helping us to fix some issues beforehand. - -
-
- CSAT driving a convoy through one of Tanoa's villages while two CSAT soldiers are arresting two civilians. -
-
- -This update mainly features quite a lot of bug and compatibility fixes as well as necessary changes for the next Arma 3 update. In particular we've added the 64bit compatible DLL files. Though, don't expect any dramatic performance increases as the DLLs were just rebuilt to make them compatible. - -A new component has been added which removes the restriction for picking up and wearing enemy uniforms. You can find it in the `/optionals` folder in ACE3 and to use it you could e.g. copy it to the `/addons` folder. We've decided to put it into optionals because being able to wear an enemy's uniform isn't always the desired behavior for everyone. - -We have invested some time in polishing the ballistic features of ACE3. As an example the range cards and the ATragMX now respect the distance between the center of the bore and the center of the scope to more accurately calculate firing solutions. If you're an addon maker [we've added new config entries which can be added to your addon or a compatibility patch](/wiki/framework/scopes-framework.html). And as an added benefit, shooting with this change is even more accurate than in vanilla. -Speaking of the ATragMX it is now closer to the real life counter part than ever before: It now features a muzzle velocity/temperature interpolation, calculating muzzle velocity by factoring in powder burn rates at different temperatures and the "Truing Drop" feature which helps a shooter calculate a better flight path based on actual shooting results. And because "our" ATragMX is models closely to the real world one you could even use the [real manual to read about those features](https://www.horusvision.com/download/manual_Horus_ATrag-v385.pdf){:target="_blank"}. - -And even Zeus got a little love in this update. You can find new helper modules in the Zeus interface like teleporting players, adding FRIES to a helicopter, toggle the simulation of objects and more. The modules have been cleaned up into distinct categories to make them easier to find. - -
-
- Showcasing the Zeus interface with the new ACE3 sections and utility modules. A helicopter is getting FRIES attached using ACE3 Zeus. -
-
- -As mentioned in our [last ACEREP](/2016/11/04/ace3-version381.html) we're still working on our big medical rewrite. Progress though has stalled a little bit due to the holidays and real life occupations. But it's already in quite a good state. More on that will follow in a future ACEREP. - -## The End Things - -The full (and funny) changelog for ACE3 v3.9.0 can be found here: [https://github.com/acemod/ACE3/releases/v3.9.0](https://github.com/acemod/ACE3/releases/v3.9.0){:target="_blank"} - -We are still in need for translations for some languages within the ACE3 project. Please have a look at [this GitHub issue to track the progress and what languages lack translations](https://github.com/acemod/ACE3/issues/367){:target="_blank"}. Any and all help with this is very appreciated. - -Make sure to [follow us on twitter](https://twitter.com/intent/follow?screen_name=ace3mod&tw_p=followbutton){:target="_blank"} and to [like our facebook page](https://www.facebook.com/ACE3Mod/){:target="_blank"}. diff --git a/docs/css/app.css b/docs/css/app.css index 6621799c85..21f0120b27 100644 --- a/docs/css/app.css +++ b/docs/css/app.css @@ -1,4 +1,4 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}meta.foundation-version{font-family:"/5.5.1/"}meta.foundation-mq-small{font-family:"/only screen/";width:0em}meta.foundation-mq-small-only{font-family:"/only screen and (max-width: 40em)/";width:0em}meta.foundation-mq-medium{font-family:"/only screen and (min-width:40.0625em)/";width:40.0625em}meta.foundation-mq-medium-only{font-family:"/only screen and (min-width:40.0625em) and (max-width:64em)/";width:40.0625em}meta.foundation-mq-large{font-family:"/only screen and (min-width:64.0625em)/";width:64.0625em}meta.foundation-mq-large-only{font-family:"/only screen and (min-width:64.0625em) and (max-width:90em)/";width:64.0625em}meta.foundation-mq-xlarge{font-family:"/only screen and (min-width:90.0625em)/";width:90.0625em}meta.foundation-mq-xlarge-only{font-family:"/only screen and (min-width:90.0625em) and (max-width:120em)/";width:90.0625em}meta.foundation-mq-xxlarge{font-family:"/only screen and (min-width:120.0625em)/";width:120.0625em}meta.foundation-data-attribute-namespace{font-family:false}html,body{height:100%}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html,body{font-size:100%}body{background:#fff;color:#222;padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.5;position:relative;cursor:auto}a:hover{cursor:pointer}img{max-width:100%;height:auto}img{-ms-interpolation-mode:bicubic}#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none !important}.left{float:left !important}.right{float:right !important}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.hide{display:none}.invisible{visibility:hidden}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img{display:inline-block;vertical-align:middle}textarea{height:auto;min-height:50px}select{width:100%}[class*="block-grid-"]{display:block;padding:0;margin:0 -.625rem}[class*="block-grid-"]:before,[class*="block-grid-"]:after{content:" ";display:table}[class*="block-grid-"]:after{clear:both}[class*="block-grid-"]>li{display:block;height:auto;float:left;padding:0 .625rem 1.25rem}@media only screen{.small-block-grid-1>li{width:100%;list-style:none}.small-block-grid-1>li:nth-of-type(1n){clear:none}.small-block-grid-1>li:nth-of-type(1n+1){clear:both}.small-block-grid-2>li{width:50%;list-style:none}.small-block-grid-2>li:nth-of-type(1n){clear:none}.small-block-grid-2>li:nth-of-type(2n+1){clear:both}.small-block-grid-3>li{width:33.3333333333%;list-style:none}.small-block-grid-3>li:nth-of-type(1n){clear:none}.small-block-grid-3>li:nth-of-type(3n+1){clear:both}.small-block-grid-4>li{width:25%;list-style:none}.small-block-grid-4>li:nth-of-type(1n){clear:none}.small-block-grid-4>li:nth-of-type(4n+1){clear:both}.small-block-grid-5>li{width:20%;list-style:none}.small-block-grid-5>li:nth-of-type(1n){clear:none}.small-block-grid-5>li:nth-of-type(5n+1){clear:both}.small-block-grid-6>li{width:16.6666666667%;list-style:none}.small-block-grid-6>li:nth-of-type(1n){clear:none}.small-block-grid-6>li:nth-of-type(6n+1){clear:both}.small-block-grid-7>li{width:14.2857142857%;list-style:none}.small-block-grid-7>li:nth-of-type(1n){clear:none}.small-block-grid-7>li:nth-of-type(7n+1){clear:both}.small-block-grid-8>li{width:12.5%;list-style:none}.small-block-grid-8>li:nth-of-type(1n){clear:none}.small-block-grid-8>li:nth-of-type(8n+1){clear:both}.small-block-grid-9>li{width:11.1111111111%;list-style:none}.small-block-grid-9>li:nth-of-type(1n){clear:none}.small-block-grid-9>li:nth-of-type(9n+1){clear:both}.small-block-grid-10>li{width:10%;list-style:none}.small-block-grid-10>li:nth-of-type(1n){clear:none}.small-block-grid-10>li:nth-of-type(10n+1){clear:both}.small-block-grid-11>li{width:9.0909090909%;list-style:none}.small-block-grid-11>li:nth-of-type(1n){clear:none}.small-block-grid-11>li:nth-of-type(11n+1){clear:both}.small-block-grid-12>li{width:8.3333333333%;list-style:none}.small-block-grid-12>li:nth-of-type(1n){clear:none}.small-block-grid-12>li:nth-of-type(12n+1){clear:both}}@media only screen and (min-width: 40.0625em){.medium-block-grid-1>li{width:100%;list-style:none}.medium-block-grid-1>li:nth-of-type(1n){clear:none}.medium-block-grid-1>li:nth-of-type(1n+1){clear:both}.medium-block-grid-2>li{width:50%;list-style:none}.medium-block-grid-2>li:nth-of-type(1n){clear:none}.medium-block-grid-2>li:nth-of-type(2n+1){clear:both}.medium-block-grid-3>li{width:33.3333333333%;list-style:none}.medium-block-grid-3>li:nth-of-type(1n){clear:none}.medium-block-grid-3>li:nth-of-type(3n+1){clear:both}.medium-block-grid-4>li{width:25%;list-style:none}.medium-block-grid-4>li:nth-of-type(1n){clear:none}.medium-block-grid-4>li:nth-of-type(4n+1){clear:both}.medium-block-grid-5>li{width:20%;list-style:none}.medium-block-grid-5>li:nth-of-type(1n){clear:none}.medium-block-grid-5>li:nth-of-type(5n+1){clear:both}.medium-block-grid-6>li{width:16.6666666667%;list-style:none}.medium-block-grid-6>li:nth-of-type(1n){clear:none}.medium-block-grid-6>li:nth-of-type(6n+1){clear:both}.medium-block-grid-7>li{width:14.2857142857%;list-style:none}.medium-block-grid-7>li:nth-of-type(1n){clear:none}.medium-block-grid-7>li:nth-of-type(7n+1){clear:both}.medium-block-grid-8>li{width:12.5%;list-style:none}.medium-block-grid-8>li:nth-of-type(1n){clear:none}.medium-block-grid-8>li:nth-of-type(8n+1){clear:both}.medium-block-grid-9>li{width:11.1111111111%;list-style:none}.medium-block-grid-9>li:nth-of-type(1n){clear:none}.medium-block-grid-9>li:nth-of-type(9n+1){clear:both}.medium-block-grid-10>li{width:10%;list-style:none}.medium-block-grid-10>li:nth-of-type(1n){clear:none}.medium-block-grid-10>li:nth-of-type(10n+1){clear:both}.medium-block-grid-11>li{width:9.0909090909%;list-style:none}.medium-block-grid-11>li:nth-of-type(1n){clear:none}.medium-block-grid-11>li:nth-of-type(11n+1){clear:both}.medium-block-grid-12>li{width:8.3333333333%;list-style:none}.medium-block-grid-12>li:nth-of-type(1n){clear:none}.medium-block-grid-12>li:nth-of-type(12n+1){clear:both}}@media only screen and (min-width: 64.0625em){.large-block-grid-1>li{width:100%;list-style:none}.large-block-grid-1>li:nth-of-type(1n){clear:none}.large-block-grid-1>li:nth-of-type(1n+1){clear:both}.large-block-grid-2>li{width:50%;list-style:none}.large-block-grid-2>li:nth-of-type(1n){clear:none}.large-block-grid-2>li:nth-of-type(2n+1){clear:both}.large-block-grid-3>li{width:33.3333333333%;list-style:none}.large-block-grid-3>li:nth-of-type(1n){clear:none}.large-block-grid-3>li:nth-of-type(3n+1){clear:both}.large-block-grid-4>li{width:25%;list-style:none}.large-block-grid-4>li:nth-of-type(1n){clear:none}.large-block-grid-4>li:nth-of-type(4n+1){clear:both}.large-block-grid-5>li{width:20%;list-style:none}.large-block-grid-5>li:nth-of-type(1n){clear:none}.large-block-grid-5>li:nth-of-type(5n+1){clear:both}.large-block-grid-6>li{width:16.6666666667%;list-style:none}.large-block-grid-6>li:nth-of-type(1n){clear:none}.large-block-grid-6>li:nth-of-type(6n+1){clear:both}.large-block-grid-7>li{width:14.2857142857%;list-style:none}.large-block-grid-7>li:nth-of-type(1n){clear:none}.large-block-grid-7>li:nth-of-type(7n+1){clear:both}.large-block-grid-8>li{width:12.5%;list-style:none}.large-block-grid-8>li:nth-of-type(1n){clear:none}.large-block-grid-8>li:nth-of-type(8n+1){clear:both}.large-block-grid-9>li{width:11.1111111111%;list-style:none}.large-block-grid-9>li:nth-of-type(1n){clear:none}.large-block-grid-9>li:nth-of-type(9n+1){clear:both}.large-block-grid-10>li{width:10%;list-style:none}.large-block-grid-10>li:nth-of-type(1n){clear:none}.large-block-grid-10>li:nth-of-type(10n+1){clear:both}.large-block-grid-11>li{width:9.0909090909%;list-style:none}.large-block-grid-11>li:nth-of-type(1n){clear:none}.large-block-grid-11>li:nth-of-type(11n+1){clear:both}.large-block-grid-12>li{width:8.3333333333%;list-style:none}.large-block-grid-12>li:nth-of-type(1n){clear:none}.large-block-grid-12>li:nth-of-type(12n+1){clear:both}}button,.button{border-style:solid;border-width:0;cursor:pointer;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-weight:400;line-height:normal;margin:0 0 1.25rem;position:relative;text-decoration:none;text-align:center;-webkit-appearance:none;-moz-appearance:none;border-radius:0;display:inline-block;padding-top:1rem;padding-right:2rem;padding-bottom:1.0625rem;padding-left:2rem;font-size:1rem;background-color:#ba2619;border-color:#951e14;color:#fff;transition:background-color 300ms ease-out}button:hover,button:focus,.button:hover,.button:focus{background-color:#951e14}button:hover,button:focus,.button:hover,.button:focus{color:#fff}button.secondary,.button.secondary{background-color:#e7e7e7;border-color:#b9b9b9;color:#333}button.secondary:hover,button.secondary:focus,.button.secondary:hover,.button.secondary:focus{background-color:#b9b9b9}button.secondary:hover,button.secondary:focus,.button.secondary:hover,.button.secondary:focus{color:#333}button.success,.button.success{background-color:#43AC6A;border-color:#368a55;color:#fff}button.success:hover,button.success:focus,.button.success:hover,.button.success:focus{background-color:#368a55}button.success:hover,button.success:focus,.button.success:hover,.button.success:focus{color:#fff}button.alert,.button.alert{background-color:#f04124;border-color:#cf2a0e;color:#fff}button.alert:hover,button.alert:focus,.button.alert:hover,.button.alert:focus{background-color:#cf2a0e}button.alert:hover,button.alert:focus,.button.alert:hover,.button.alert:focus{color:#fff}button.warning,.button.warning{background-color:#f08a24;border-color:#cf6e0e;color:#fff}button.warning:hover,button.warning:focus,.button.warning:hover,.button.warning:focus{background-color:#cf6e0e}button.warning:hover,button.warning:focus,.button.warning:hover,.button.warning:focus{color:#fff}button.info,.button.info{background-color:#a0d3e8;border-color:#61b6d9;color:#333}button.info:hover,button.info:focus,.button.info:hover,.button.info:focus{background-color:#61b6d9}button.info:hover,button.info:focus,.button.info:hover,.button.info:focus{color:#fff}button.large,.button.large{padding-top:1.125rem;padding-right:2.25rem;padding-bottom:1.1875rem;padding-left:2.25rem;font-size:1.25rem}button.small,.button.small{padding-top:.875rem;padding-right:1.75rem;padding-bottom:.9375rem;padding-left:1.75rem;font-size:.8125rem}button.tiny,.button.tiny{padding-top:.625rem;padding-right:1.25rem;padding-bottom:.6875rem;padding-left:1.25rem;font-size:.6875rem}button.expand,.button.expand{padding-right:0;padding-left:0;width:100%}button.left-align,.button.left-align{text-align:left;text-indent:.75rem}button.right-align,.button.right-align{text-align:right;padding-right:.75rem}button.radius,.button.radius{border-radius:3px}button.round,.button.round{border-radius:1000px}button.disabled,button[disabled],.button.disabled,.button[disabled]{background-color:#ba2619;border-color:#951e14;color:#fff;cursor:default;opacity:.7;box-shadow:none}button.disabled:hover,button.disabled:focus,button[disabled]:hover,button[disabled]:focus,.button.disabled:hover,.button.disabled:focus,.button[disabled]:hover,.button[disabled]:focus{background-color:#951e14}button.disabled:hover,button.disabled:focus,button[disabled]:hover,button[disabled]:focus,.button.disabled:hover,.button.disabled:focus,.button[disabled]:hover,.button[disabled]:focus{color:#fff}button.disabled:hover,button.disabled:focus,button[disabled]:hover,button[disabled]:focus,.button.disabled:hover,.button.disabled:focus,.button[disabled]:hover,.button[disabled]:focus{background-color:#ba2619}button.disabled.secondary,button[disabled].secondary,.button.disabled.secondary,.button[disabled].secondary{background-color:#e7e7e7;border-color:#b9b9b9;color:#333;cursor:default;opacity:.7;box-shadow:none}button.disabled.secondary:hover,button.disabled.secondary:focus,button[disabled].secondary:hover,button[disabled].secondary:focus,.button.disabled.secondary:hover,.button.disabled.secondary:focus,.button[disabled].secondary:hover,.button[disabled].secondary:focus{background-color:#b9b9b9}button.disabled.secondary:hover,button.disabled.secondary:focus,button[disabled].secondary:hover,button[disabled].secondary:focus,.button.disabled.secondary:hover,.button.disabled.secondary:focus,.button[disabled].secondary:hover,.button[disabled].secondary:focus{color:#333}button.disabled.secondary:hover,button.disabled.secondary:focus,button[disabled].secondary:hover,button[disabled].secondary:focus,.button.disabled.secondary:hover,.button.disabled.secondary:focus,.button[disabled].secondary:hover,.button[disabled].secondary:focus{background-color:#e7e7e7}button.disabled.success,button[disabled].success,.button.disabled.success,.button[disabled].success{background-color:#43AC6A;border-color:#368a55;color:#fff;cursor:default;opacity:.7;box-shadow:none}button.disabled.success:hover,button.disabled.success:focus,button[disabled].success:hover,button[disabled].success:focus,.button.disabled.success:hover,.button.disabled.success:focus,.button[disabled].success:hover,.button[disabled].success:focus{background-color:#368a55}button.disabled.success:hover,button.disabled.success:focus,button[disabled].success:hover,button[disabled].success:focus,.button.disabled.success:hover,.button.disabled.success:focus,.button[disabled].success:hover,.button[disabled].success:focus{color:#fff}button.disabled.success:hover,button.disabled.success:focus,button[disabled].success:hover,button[disabled].success:focus,.button.disabled.success:hover,.button.disabled.success:focus,.button[disabled].success:hover,.button[disabled].success:focus{background-color:#43AC6A}button.disabled.alert,button[disabled].alert,.button.disabled.alert,.button[disabled].alert{background-color:#f04124;border-color:#cf2a0e;color:#fff;cursor:default;opacity:.7;box-shadow:none}button.disabled.alert:hover,button.disabled.alert:focus,button[disabled].alert:hover,button[disabled].alert:focus,.button.disabled.alert:hover,.button.disabled.alert:focus,.button[disabled].alert:hover,.button[disabled].alert:focus{background-color:#cf2a0e}button.disabled.alert:hover,button.disabled.alert:focus,button[disabled].alert:hover,button[disabled].alert:focus,.button.disabled.alert:hover,.button.disabled.alert:focus,.button[disabled].alert:hover,.button[disabled].alert:focus{color:#fff}button.disabled.alert:hover,button.disabled.alert:focus,button[disabled].alert:hover,button[disabled].alert:focus,.button.disabled.alert:hover,.button.disabled.alert:focus,.button[disabled].alert:hover,.button[disabled].alert:focus{background-color:#f04124}button.disabled.warning,button[disabled].warning,.button.disabled.warning,.button[disabled].warning{background-color:#f08a24;border-color:#cf6e0e;color:#fff;cursor:default;opacity:.7;box-shadow:none}button.disabled.warning:hover,button.disabled.warning:focus,button[disabled].warning:hover,button[disabled].warning:focus,.button.disabled.warning:hover,.button.disabled.warning:focus,.button[disabled].warning:hover,.button[disabled].warning:focus{background-color:#cf6e0e}button.disabled.warning:hover,button.disabled.warning:focus,button[disabled].warning:hover,button[disabled].warning:focus,.button.disabled.warning:hover,.button.disabled.warning:focus,.button[disabled].warning:hover,.button[disabled].warning:focus{color:#fff}button.disabled.warning:hover,button.disabled.warning:focus,button[disabled].warning:hover,button[disabled].warning:focus,.button.disabled.warning:hover,.button.disabled.warning:focus,.button[disabled].warning:hover,.button[disabled].warning:focus{background-color:#f08a24}button.disabled.info,button[disabled].info,.button.disabled.info,.button[disabled].info{background-color:#a0d3e8;border-color:#61b6d9;color:#333;cursor:default;opacity:.7;box-shadow:none}button.disabled.info:hover,button.disabled.info:focus,button[disabled].info:hover,button[disabled].info:focus,.button.disabled.info:hover,.button.disabled.info:focus,.button[disabled].info:hover,.button[disabled].info:focus{background-color:#61b6d9}button.disabled.info:hover,button.disabled.info:focus,button[disabled].info:hover,button[disabled].info:focus,.button.disabled.info:hover,.button.disabled.info:focus,.button[disabled].info:hover,.button[disabled].info:focus{color:#fff}button.disabled.info:hover,button.disabled.info:focus,button[disabled].info:hover,button[disabled].info:focus,.button.disabled.info:hover,.button.disabled.info:focus,.button[disabled].info:hover,.button[disabled].info:focus{background-color:#a0d3e8}button::-moz-focus-inner{border:0;padding:0}@media only screen and (min-width: 40.0625em){button,.button{display:inline-block}}.clearing-thumbs,[data-clearing]{margin-bottom:0;margin-left:0;list-style:none}.clearing-thumbs:before,.clearing-thumbs:after,[data-clearing]:before,[data-clearing]:after{content:" ";display:table}.clearing-thumbs:after,[data-clearing]:after{clear:both}.clearing-thumbs li,[data-clearing] li{float:left;margin-right:10px}.clearing-thumbs[class*="block-grid-"] li,[data-clearing][class*="block-grid-"] li{margin-right:0}.clearing-blackout{background:#333;position:fixed;width:100%;height:100%;top:0;left:0;z-index:998}.clearing-blackout .clearing-close{display:block}.clearing-container{position:relative;z-index:998;height:100%;overflow:hidden;margin:0}.clearing-touch-label{position:absolute;top:50%;left:50%;color:#aaa;font-size:0.6em}.visible-img{height:95%;position:relative}.visible-img img{position:absolute;left:50%;top:50%;transform:translateY(-50%) translateX(-50%);-webkit-transform:translateY(-50%) translateX(-50%);-ms-transform:translateY(-50%) translateX(-50%);max-height:100%;max-width:100%}.clearing-caption{color:#ccc;font-size:.875em;line-height:1.3;margin-bottom:0;text-align:center;bottom:0;background:#333;width:100%;padding:10px 30px 20px;position:absolute;left:0}.clearing-close{z-index:999;padding-left:20px;padding-top:10px;font-size:30px;line-height:1;color:#ccc;display:none}.clearing-close:hover,.clearing-close:focus{color:#ccc}.clearing-assembled .clearing-container{height:100%}.clearing-assembled .clearing-container .carousel>ul{display:none}.clearing-feature li{display:none}.clearing-feature li.clearing-featured-img{display:block}@media only screen and (min-width: 40.0625em){.clearing-main-prev,.clearing-main-next{position:absolute;height:100%;width:40px;top:0}.clearing-main-prev>span,.clearing-main-next>span{position:absolute;top:50%;display:block;width:0;height:0;border:solid 12px}.clearing-main-prev>span:hover,.clearing-main-next>span:hover{opacity:0.8}.clearing-main-prev{left:0}.clearing-main-prev>span{left:5px;border-color:transparent;border-right-color:#ccc}.clearing-main-next{right:0}.clearing-main-next>span{border-color:transparent;border-left-color:#ccc}.clearing-main-prev.disabled,.clearing-main-next.disabled{opacity:0.3}.clearing-assembled .clearing-container .carousel{background:rgba(51,51,51,0.8);height:120px;margin-top:10px;text-align:center}.clearing-assembled .clearing-container .carousel>ul{display:inline-block;z-index:999;height:100%;position:relative;float:none}.clearing-assembled .clearing-container .carousel>ul li{display:block;width:120px;min-height:inherit;float:left;overflow:hidden;margin-right:0;padding:0;position:relative;cursor:pointer;opacity:0.4;clear:none}.clearing-assembled .clearing-container .carousel>ul li.fix-height img{height:100%;max-width:none}.clearing-assembled .clearing-container .carousel>ul li a.th{border:none;box-shadow:none;display:block}.clearing-assembled .clearing-container .carousel>ul li img{cursor:pointer !important;width:100% !important}.clearing-assembled .clearing-container .carousel>ul li.visible{opacity:1}.clearing-assembled .clearing-container .carousel>ul li:hover{opacity:0.8}.clearing-assembled .clearing-container .visible-img{background:#333;overflow:hidden;height:85%}.clearing-close{position:absolute;top:10px;right:20px;padding-left:0;padding-top:0}}form{margin:0 0 1rem}form .row .row{margin:0 -.5rem}form .row .row .column,form .row .row .columns{padding:0 .5rem}form .row .row.collapse{margin:0}form .row .row.collapse .column,form .row .row.collapse .columns{padding:0}form .row .row.collapse input{-webkit-border-bottom-right-radius:0;-webkit-border-top-right-radius:0;border-bottom-right-radius:0;border-top-right-radius:0}form .row input.column,form .row input.columns,form .row textarea.column,form .row textarea.columns{padding-left:.5rem}label{font-size:.875rem;color:#4d4c4c;cursor:pointer;display:block;font-weight:400;line-height:1.5;margin-bottom:0}label.right{float:none !important;text-align:right}label.inline{margin:0 0 1rem 0;padding:.5625rem 0}label small{text-transform:capitalize;color:#676767}.prefix,.postfix{display:block;position:relative;z-index:2;text-align:center;width:100%;padding-top:0;padding-bottom:0;border-style:solid;border-width:1px;overflow:visible;font-size:.875rem;height:2.3125rem;line-height:2.3125rem}.postfix.button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;text-align:center;border:none}.prefix.button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;text-align:center;border:none}.prefix.button.radius{border-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}.postfix.button.radius{border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-right-radius:3px}.prefix.button.round{border-radius:0;-webkit-border-bottom-left-radius:1000px;-webkit-border-top-left-radius:1000px;border-bottom-left-radius:1000px;border-top-left-radius:1000px}.postfix.button.round{border-radius:0;-webkit-border-bottom-right-radius:1000px;-webkit-border-top-right-radius:1000px;border-bottom-right-radius:1000px;border-top-right-radius:1000px}span.prefix,label.prefix{background:#f2f2f2;border-right:none;color:#333;border-color:#ccc}span.postfix,label.postfix{background:#f2f2f2;border-left:none;color:#333;border-color:#ccc}input[type="text"],input[type="password"],input[type="date"],input[type="datetime"],input[type="datetime-local"],input[type="month"],input[type="week"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="time"],input[type="url"],input[type="color"],textarea{-webkit-appearance:none;border-radius:0;background-color:#fff;font-family:inherit;border-style:solid;border-width:1px;border-color:#ccc;box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);color:rgba(0,0,0,0.75);display:block;font-size:.875rem;margin:0 0 1rem 0;padding:.5rem;height:2.3125rem;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;transition:all .15s linear}input[type="text"]:focus,input[type="password"]:focus,input[type="date"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="month"]:focus,input[type="week"]:focus,input[type="email"]:focus,input[type="number"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="time"]:focus,input[type="url"]:focus,input[type="color"]:focus,textarea:focus{background:#fafafa;border-color:#999;outline:none}input[type="text"]:disabled,input[type="password"]:disabled,input[type="date"]:disabled,input[type="datetime"]:disabled,input[type="datetime-local"]:disabled,input[type="month"]:disabled,input[type="week"]:disabled,input[type="email"]:disabled,input[type="number"]:disabled,input[type="search"]:disabled,input[type="tel"]:disabled,input[type="time"]:disabled,input[type="url"]:disabled,input[type="color"]:disabled,textarea:disabled{background-color:#ddd;cursor:default}input[type="text"][disabled],input[type="text"][readonly],fieldset[disabled] input[type="text"],input[type="password"][disabled],input[type="password"][readonly],fieldset[disabled] input[type="password"],input[type="date"][disabled],input[type="date"][readonly],fieldset[disabled] input[type="date"],input[type="datetime"][disabled],input[type="datetime"][readonly],fieldset[disabled] input[type="datetime"],input[type="datetime-local"][disabled],input[type="datetime-local"][readonly],fieldset[disabled] input[type="datetime-local"],input[type="month"][disabled],input[type="month"][readonly],fieldset[disabled] input[type="month"],input[type="week"][disabled],input[type="week"][readonly],fieldset[disabled] input[type="week"],input[type="email"][disabled],input[type="email"][readonly],fieldset[disabled] input[type="email"],input[type="number"][disabled],input[type="number"][readonly],fieldset[disabled] input[type="number"],input[type="search"][disabled],input[type="search"][readonly],fieldset[disabled] input[type="search"],input[type="tel"][disabled],input[type="tel"][readonly],fieldset[disabled] input[type="tel"],input[type="time"][disabled],input[type="time"][readonly],fieldset[disabled] input[type="time"],input[type="url"][disabled],input[type="url"][readonly],fieldset[disabled] input[type="url"],input[type="color"][disabled],input[type="color"][readonly],fieldset[disabled] input[type="color"],textarea[disabled],textarea[readonly],fieldset[disabled] textarea{background-color:#ddd;cursor:default}input[type="text"].radius,input[type="password"].radius,input[type="date"].radius,input[type="datetime"].radius,input[type="datetime-local"].radius,input[type="month"].radius,input[type="week"].radius,input[type="email"].radius,input[type="number"].radius,input[type="search"].radius,input[type="tel"].radius,input[type="time"].radius,input[type="url"].radius,input[type="color"].radius,textarea.radius{border-radius:3px}form .row .prefix-radius.row.collapse input,form .row .prefix-radius.row.collapse textarea,form .row .prefix-radius.row.collapse select,form .row .prefix-radius.row.collapse button{border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-right-radius:3px}form .row .prefix-radius.row.collapse .prefix{border-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}form .row .postfix-radius.row.collapse input,form .row .postfix-radius.row.collapse textarea,form .row .postfix-radius.row.collapse select,form .row .postfix-radius.row.collapse button{border-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}form .row .postfix-radius.row.collapse .postfix{border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-right-radius:3px}form .row .prefix-round.row.collapse input,form .row .prefix-round.row.collapse textarea,form .row .prefix-round.row.collapse select,form .row .prefix-round.row.collapse button{border-radius:0;-webkit-border-bottom-right-radius:1000px;-webkit-border-top-right-radius:1000px;border-bottom-right-radius:1000px;border-top-right-radius:1000px}form .row .prefix-round.row.collapse .prefix{border-radius:0;-webkit-border-bottom-left-radius:1000px;-webkit-border-top-left-radius:1000px;border-bottom-left-radius:1000px;border-top-left-radius:1000px}form .row .postfix-round.row.collapse input,form .row .postfix-round.row.collapse textarea,form .row .postfix-round.row.collapse select,form .row .postfix-round.row.collapse button{border-radius:0;-webkit-border-bottom-left-radius:1000px;-webkit-border-top-left-radius:1000px;border-bottom-left-radius:1000px;border-top-left-radius:1000px}form .row .postfix-round.row.collapse .postfix{border-radius:0;-webkit-border-bottom-right-radius:1000px;-webkit-border-top-right-radius:1000px;border-bottom-right-radius:1000px;border-top-right-radius:1000px}input[type="submit"]{-webkit-appearance:none;border-radius:0}textarea[rows]{height:auto}textarea{max-width:100%}select{-webkit-appearance:none !important;border-radius:0;background-color:#FAFAFA;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMTJweCIgeT0iMHB4IiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzcHgiIHZpZXdCb3g9IjAgMCA2IDMiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDYgMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBvbHlnb24gcG9pbnRzPSI1Ljk5MiwwIDIuOTkyLDMgLTAuMDA4LDAgIi8+PC9zdmc+);background-position:100% center;background-repeat:no-repeat;border-style:solid;border-width:1px;border-color:#ccc;padding:.5rem;font-size:.875rem;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;color:rgba(0,0,0,0.75);line-height:normal;border-radius:0;height:2.3125rem}select::-ms-expand{display:none}select.radius{border-radius:3px}select:hover{background-color:#f3f2f2;border-color:#999}select:disabled{background-color:#ddd;cursor:default}select[multiple]{height:auto}input[type="file"],input[type="checkbox"],input[type="radio"],select{margin:0 0 1rem 0}input[type="checkbox"]+label,input[type="radio"]+label{display:inline-block;margin-left:.5rem;margin-right:1rem;margin-bottom:0;vertical-align:baseline}input[type="file"]{width:100%}fieldset{border:1px solid #ddd;padding:1.25rem;margin:1.125rem 0}fieldset legend{font-weight:700;background:#fff;padding:0 .1875rem;margin:0;margin-left:-.1875rem}[data-abide] .error small.error,[data-abide] .error span.error,[data-abide] span.error,[data-abide] small.error{display:block;padding:.375rem .5625rem .5625rem;margin-top:-1px;margin-bottom:1rem;font-size:.75rem;font-weight:400;font-style:italic;background:#f04124;color:#fff}[data-abide] span.error,[data-abide] small.error{display:none}span.error,small.error{display:block;padding:.375rem .5625rem .5625rem;margin-top:-1px;margin-bottom:1rem;font-size:.75rem;font-weight:400;font-style:italic;background:#f04124;color:#fff}.error input,.error textarea,.error select{margin-bottom:0}.error input[type="checkbox"],.error input[type="radio"]{margin-bottom:1rem}.error label,.error label.error{color:#f04124}.error small.error{display:block;padding:.375rem .5625rem .5625rem;margin-top:-1px;margin-bottom:1rem;font-size:.75rem;font-weight:400;font-style:italic;background:#f04124;color:#fff}.error>label>small{color:#676767;background:transparent;padding:0;text-transform:capitalize;font-style:normal;font-size:60%;margin:0;display:inline}.error span.error-message{display:block}input.error,textarea.error,select.error{margin-bottom:0}label.error{color:#f04124}.row{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5rem}.row:before,.row:after{content:" ";display:table}.row:after{clear:both}.row.collapse>.column,.row.collapse>.columns{padding-left:0;padding-right:0}.row.collapse .row{margin-left:0;margin-right:0}.row .row{width:auto;margin-left:-.9375rem;margin-right:-.9375rem;margin-top:0;margin-bottom:0;max-width:none}.row .row:before,.row .row:after{content:" ";display:table}.row .row:after{clear:both}.row .row.collapse{width:auto;margin:0;max-width:none}.row .row.collapse:before,.row .row.collapse:after{content:" ";display:table}.row .row.collapse:after{clear:both}.column,.columns{padding-left:.9375rem;padding-right:.9375rem;width:100%;float:left}[class*="column"]+[class*="column"]:last-child{float:right}[class*="column"]+[class*="column"].end{float:left}@media only screen{.small-push-0{position:relative;left:0%;right:auto}.small-pull-0{position:relative;right:0%;left:auto}.small-push-1{position:relative;left:8.3333333333%;right:auto}.small-pull-1{position:relative;right:8.3333333333%;left:auto}.small-push-2{position:relative;left:16.6666666667%;right:auto}.small-pull-2{position:relative;right:16.6666666667%;left:auto}.small-push-3{position:relative;left:25%;right:auto}.small-pull-3{position:relative;right:25%;left:auto}.small-push-4{position:relative;left:33.3333333333%;right:auto}.small-pull-4{position:relative;right:33.3333333333%;left:auto}.small-push-5{position:relative;left:41.6666666667%;right:auto}.small-pull-5{position:relative;right:41.6666666667%;left:auto}.small-push-6{position:relative;left:50%;right:auto}.small-pull-6{position:relative;right:50%;left:auto}.small-push-7{position:relative;left:58.3333333333%;right:auto}.small-pull-7{position:relative;right:58.3333333333%;left:auto}.small-push-8{position:relative;left:66.6666666667%;right:auto}.small-pull-8{position:relative;right:66.6666666667%;left:auto}.small-push-9{position:relative;left:75%;right:auto}.small-pull-9{position:relative;right:75%;left:auto}.small-push-10{position:relative;left:83.3333333333%;right:auto}.small-pull-10{position:relative;right:83.3333333333%;left:auto}.small-push-11{position:relative;left:91.6666666667%;right:auto}.small-pull-11{position:relative;right:91.6666666667%;left:auto}.column,.columns{position:relative;padding-left:.9375rem;padding-right:.9375rem;float:left}.small-1{width:8.3333333333%}.small-2{width:16.6666666667%}.small-3{width:25%}.small-4{width:33.3333333333%}.small-5{width:41.6666666667%}.small-6{width:50%}.small-7{width:58.3333333333%}.small-8{width:66.6666666667%}.small-9{width:75%}.small-10{width:83.3333333333%}.small-11{width:91.6666666667%}.small-12{width:100%}.small-offset-0{margin-left:0% !important}.small-offset-1{margin-left:8.3333333333% !important}.small-offset-2{margin-left:16.6666666667% !important}.small-offset-3{margin-left:25% !important}.small-offset-4{margin-left:33.3333333333% !important}.small-offset-5{margin-left:41.6666666667% !important}.small-offset-6{margin-left:50% !important}.small-offset-7{margin-left:58.3333333333% !important}.small-offset-8{margin-left:66.6666666667% !important}.small-offset-9{margin-left:75% !important}.small-offset-10{margin-left:83.3333333333% !important}.small-offset-11{margin-left:91.6666666667% !important}.small-reset-order{margin-left:0;margin-right:0;left:auto;right:auto;float:left}.column.small-centered,.columns.small-centered{margin-left:auto;margin-right:auto;float:none}.column.small-uncentered,.columns.small-uncentered{margin-left:0;margin-right:0;float:left}.column.small-centered:last-child,.columns.small-centered:last-child{float:none}.column.small-uncentered:last-child,.columns.small-uncentered:last-child{float:left}.column.small-uncentered.opposite,.columns.small-uncentered.opposite{float:right}.row.small-collapse>.column,.row.small-collapse>.columns{padding-left:0;padding-right:0}.row.small-collapse .row{margin-left:0;margin-right:0}.row.small-uncollapse>.column,.row.small-uncollapse>.columns{padding-left:.9375rem;padding-right:.9375rem;float:left}}@media only screen and (min-width: 40.0625em){.medium-push-0{position:relative;left:0%;right:auto}.medium-pull-0{position:relative;right:0%;left:auto}.medium-push-1{position:relative;left:8.3333333333%;right:auto}.medium-pull-1{position:relative;right:8.3333333333%;left:auto}.medium-push-2{position:relative;left:16.6666666667%;right:auto}.medium-pull-2{position:relative;right:16.6666666667%;left:auto}.medium-push-3{position:relative;left:25%;right:auto}.medium-pull-3{position:relative;right:25%;left:auto}.medium-push-4{position:relative;left:33.3333333333%;right:auto}.medium-pull-4{position:relative;right:33.3333333333%;left:auto}.medium-push-5{position:relative;left:41.6666666667%;right:auto}.medium-pull-5{position:relative;right:41.6666666667%;left:auto}.medium-push-6{position:relative;left:50%;right:auto}.medium-pull-6{position:relative;right:50%;left:auto}.medium-push-7{position:relative;left:58.3333333333%;right:auto}.medium-pull-7{position:relative;right:58.3333333333%;left:auto}.medium-push-8{position:relative;left:66.6666666667%;right:auto}.medium-pull-8{position:relative;right:66.6666666667%;left:auto}.medium-push-9{position:relative;left:75%;right:auto}.medium-pull-9{position:relative;right:75%;left:auto}.medium-push-10{position:relative;left:83.3333333333%;right:auto}.medium-pull-10{position:relative;right:83.3333333333%;left:auto}.medium-push-11{position:relative;left:91.6666666667%;right:auto}.medium-pull-11{position:relative;right:91.6666666667%;left:auto}.column,.columns{position:relative;padding-left:.9375rem;padding-right:.9375rem;float:left}.medium-1{width:8.3333333333%}.medium-2{width:16.6666666667%}.medium-3{width:25%}.medium-4{width:33.3333333333%}.medium-5{width:41.6666666667%}.medium-6{width:50%}.medium-7{width:58.3333333333%}.medium-8{width:66.6666666667%}.medium-9{width:75%}.medium-10{width:83.3333333333%}.medium-11{width:91.6666666667%}.medium-12{width:100%}.medium-offset-0{margin-left:0% !important}.medium-offset-1{margin-left:8.3333333333% !important}.medium-offset-2{margin-left:16.6666666667% !important}.medium-offset-3{margin-left:25% !important}.medium-offset-4{margin-left:33.3333333333% !important}.medium-offset-5{margin-left:41.6666666667% !important}.medium-offset-6{margin-left:50% !important}.medium-offset-7{margin-left:58.3333333333% !important}.medium-offset-8{margin-left:66.6666666667% !important}.medium-offset-9{margin-left:75% !important}.medium-offset-10{margin-left:83.3333333333% !important}.medium-offset-11{margin-left:91.6666666667% !important}.medium-reset-order{margin-left:0;margin-right:0;left:auto;right:auto;float:left}.column.medium-centered,.columns.medium-centered{margin-left:auto;margin-right:auto;float:none}.column.medium-uncentered,.columns.medium-uncentered{margin-left:0;margin-right:0;float:left}.column.medium-centered:last-child,.columns.medium-centered:last-child{float:none}.column.medium-uncentered:last-child,.columns.medium-uncentered:last-child{float:left}.column.medium-uncentered.opposite,.columns.medium-uncentered.opposite{float:right}.row.medium-collapse>.column,.row.medium-collapse>.columns{padding-left:0;padding-right:0}.row.medium-collapse .row{margin-left:0;margin-right:0}.row.medium-uncollapse>.column,.row.medium-uncollapse>.columns{padding-left:.9375rem;padding-right:.9375rem;float:left}.push-0{position:relative;left:0%;right:auto}.pull-0{position:relative;right:0%;left:auto}.push-1{position:relative;left:8.3333333333%;right:auto}.pull-1{position:relative;right:8.3333333333%;left:auto}.push-2{position:relative;left:16.6666666667%;right:auto}.pull-2{position:relative;right:16.6666666667%;left:auto}.push-3{position:relative;left:25%;right:auto}.pull-3{position:relative;right:25%;left:auto}.push-4{position:relative;left:33.3333333333%;right:auto}.pull-4{position:relative;right:33.3333333333%;left:auto}.push-5{position:relative;left:41.6666666667%;right:auto}.pull-5{position:relative;right:41.6666666667%;left:auto}.push-6{position:relative;left:50%;right:auto}.pull-6{position:relative;right:50%;left:auto}.push-7{position:relative;left:58.3333333333%;right:auto}.pull-7{position:relative;right:58.3333333333%;left:auto}.push-8{position:relative;left:66.6666666667%;right:auto}.pull-8{position:relative;right:66.6666666667%;left:auto}.push-9{position:relative;left:75%;right:auto}.pull-9{position:relative;right:75%;left:auto}.push-10{position:relative;left:83.3333333333%;right:auto}.pull-10{position:relative;right:83.3333333333%;left:auto}.push-11{position:relative;left:91.6666666667%;right:auto}.pull-11{position:relative;right:91.6666666667%;left:auto}}@media only screen and (min-width: 64.0625em){.large-push-0{position:relative;left:0%;right:auto}.large-pull-0{position:relative;right:0%;left:auto}.large-push-1{position:relative;left:8.3333333333%;right:auto}.large-pull-1{position:relative;right:8.3333333333%;left:auto}.large-push-2{position:relative;left:16.6666666667%;right:auto}.large-pull-2{position:relative;right:16.6666666667%;left:auto}.large-push-3{position:relative;left:25%;right:auto}.large-pull-3{position:relative;right:25%;left:auto}.large-push-4{position:relative;left:33.3333333333%;right:auto}.large-pull-4{position:relative;right:33.3333333333%;left:auto}.large-push-5{position:relative;left:41.6666666667%;right:auto}.large-pull-5{position:relative;right:41.6666666667%;left:auto}.large-push-6{position:relative;left:50%;right:auto}.large-pull-6{position:relative;right:50%;left:auto}.large-push-7{position:relative;left:58.3333333333%;right:auto}.large-pull-7{position:relative;right:58.3333333333%;left:auto}.large-push-8{position:relative;left:66.6666666667%;right:auto}.large-pull-8{position:relative;right:66.6666666667%;left:auto}.large-push-9{position:relative;left:75%;right:auto}.large-pull-9{position:relative;right:75%;left:auto}.large-push-10{position:relative;left:83.3333333333%;right:auto}.large-pull-10{position:relative;right:83.3333333333%;left:auto}.large-push-11{position:relative;left:91.6666666667%;right:auto}.large-pull-11{position:relative;right:91.6666666667%;left:auto}.column,.columns{position:relative;padding-left:.9375rem;padding-right:.9375rem;float:left}.large-1{width:8.3333333333%}.large-2{width:16.6666666667%}.large-3{width:25%}.large-4{width:33.3333333333%}.large-5{width:41.6666666667%}.large-6{width:50%}.large-7{width:58.3333333333%}.large-8{width:66.6666666667%}.large-9{width:75%}.large-10{width:83.3333333333%}.large-11{width:91.6666666667%}.large-12{width:100%}.large-offset-0{margin-left:0% !important}.large-offset-1{margin-left:8.3333333333% !important}.large-offset-2{margin-left:16.6666666667% !important}.large-offset-3{margin-left:25% !important}.large-offset-4{margin-left:33.3333333333% !important}.large-offset-5{margin-left:41.6666666667% !important}.large-offset-6{margin-left:50% !important}.large-offset-7{margin-left:58.3333333333% !important}.large-offset-8{margin-left:66.6666666667% !important}.large-offset-9{margin-left:75% !important}.large-offset-10{margin-left:83.3333333333% !important}.large-offset-11{margin-left:91.6666666667% !important}.large-reset-order{margin-left:0;margin-right:0;left:auto;right:auto;float:left}.column.large-centered,.columns.large-centered{margin-left:auto;margin-right:auto;float:none}.column.large-uncentered,.columns.large-uncentered{margin-left:0;margin-right:0;float:left}.column.large-centered:last-child,.columns.large-centered:last-child{float:none}.column.large-uncentered:last-child,.columns.large-uncentered:last-child{float:left}.column.large-uncentered.opposite,.columns.large-uncentered.opposite{float:right}.row.large-collapse>.column,.row.large-collapse>.columns{padding-left:0;padding-right:0}.row.large-collapse .row{margin-left:0;margin-right:0}.row.large-uncollapse>.column,.row.large-uncollapse>.columns{padding-left:.9375rem;padding-right:.9375rem;float:left}.push-0{position:relative;left:0%;right:auto}.pull-0{position:relative;right:0%;left:auto}.push-1{position:relative;left:8.3333333333%;right:auto}.pull-1{position:relative;right:8.3333333333%;left:auto}.push-2{position:relative;left:16.6666666667%;right:auto}.pull-2{position:relative;right:16.6666666667%;left:auto}.push-3{position:relative;left:25%;right:auto}.pull-3{position:relative;right:25%;left:auto}.push-4{position:relative;left:33.3333333333%;right:auto}.pull-4{position:relative;right:33.3333333333%;left:auto}.push-5{position:relative;left:41.6666666667%;right:auto}.pull-5{position:relative;right:41.6666666667%;left:auto}.push-6{position:relative;left:50%;right:auto}.pull-6{position:relative;right:50%;left:auto}.push-7{position:relative;left:58.3333333333%;right:auto}.pull-7{position:relative;right:58.3333333333%;left:auto}.push-8{position:relative;left:66.6666666667%;right:auto}.pull-8{position:relative;right:66.6666666667%;left:auto}.push-9{position:relative;left:75%;right:auto}.pull-9{position:relative;right:75%;left:auto}.push-10{position:relative;left:83.3333333333%;right:auto}.pull-10{position:relative;right:83.3333333333%;left:auto}.push-11{position:relative;left:91.6666666667%;right:auto}.pull-11{position:relative;right:91.6666666667%;left:auto}}.inline-list{margin:0 auto 1.0625rem auto;margin-left:-1.375rem;margin-right:0;padding:0;list-style:none;overflow:hidden}.inline-list>li{list-style:none;float:left;margin-left:1.375rem;display:block}.inline-list>li>*{display:block}.panel{border-style:solid;border-width:1px;border-color:#d8d8d8;margin-bottom:1.25rem;padding:1.25rem;background:#f2f2f2;color:#333}.panel>:first-child{margin-top:0}.panel>:last-child{margin-bottom:0}.panel h1,.panel h2,.panel h3,.panel h4,.panel h5,.panel h6,.panel p,.panel li,.panel dl{color:#333}.panel h1,.panel h2,.panel h3,.panel h4,.panel h5,.panel h6{line-height:1;margin-bottom:.625rem}.panel h1.subheader,.panel h2.subheader,.panel h3.subheader,.panel h4.subheader,.panel h5.subheader,.panel h6.subheader{line-height:1.4}.panel.callout{border-style:solid;border-width:1px;border-color:#f6c4bf;margin-bottom:1.25rem;padding:1.25rem;background:#fdf0ef;color:#333}.panel.callout>:first-child{margin-top:0}.panel.callout>:last-child{margin-bottom:0}.panel.callout h1,.panel.callout h2,.panel.callout h3,.panel.callout h4,.panel.callout h5,.panel.callout h6,.panel.callout p,.panel.callout li,.panel.callout dl{color:#333}.panel.callout h1,.panel.callout h2,.panel.callout h3,.panel.callout h4,.panel.callout h5,.panel.callout h6{line-height:1;margin-bottom:.625rem}.panel.callout h1.subheader,.panel.callout h2.subheader,.panel.callout h3.subheader,.panel.callout h4.subheader,.panel.callout h5.subheader,.panel.callout h6.subheader{line-height:1.4}.panel.callout a:not(.button){color:#ba2619}.panel.callout a:not(.button):hover,.panel.callout a:not(.button):focus{color:#a02116}.panel.radius{border-radius:3px}.side-nav{display:block;margin:0;padding:.875rem 0;list-style-type:none;list-style-position:outside;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif}.side-nav li{margin:0 0 .4375rem 0;font-size:.875rem;font-weight:400}.side-nav li a:not(.button){display:block;color:#ba2619;margin:0;padding:.4375rem .875rem}.side-nav li a:not(.button):hover,.side-nav li a:not(.button):focus{background:rgba(0,0,0,0.025);color:#e65346}.side-nav li.active>a:first-child:not(.button){color:#e65346;font-weight:400;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif}.side-nav li.divider{border-top:1px solid;height:0;padding:0;list-style:none;border-top-color:#fff}.side-nav li.heading{color:#ba2619;font-size:.875rem;font-weight:bold;text-transform:uppercase}table{background:#fff;margin-bottom:1.25rem;border:solid 1px #ddd;table-layout:auto}table caption{background:transparent;color:#222;font-size:1rem;font-weight:bold}table thead{background:#f5f5f5}table thead tr th,table thead tr td{padding:.5rem .625rem .625rem;font-size:.875rem;font-weight:700;color:#222}table tfoot{background:#f5f5f5}table tfoot tr th,table tfoot tr td{padding:.5rem .625rem .625rem;font-size:.875rem;font-weight:700;color:#222}table tr th,table tr td{padding:.5625rem .625rem;font-size:.875rem;color:#222;text-align:left}table tr.even,table tr.alt,table tr:nth-of-type(even){background:#F9F9F9}table thead tr th,table tfoot tr th,table tfoot tr td,table tbody tr th,table tbody tr td,table tr td{display:table-cell;line-height:1.125rem}.th{line-height:0;display:inline-block;border:solid 4px #fff;max-width:100%;box-shadow:0 0 0 1px rgba(0,0,0,0.2);transition:all 200ms ease-out}.th:hover,.th:focus{box-shadow:0 0 6px 1px rgba(186,38,25,0.5)}.th.radius{border-radius:3px}meta.foundation-mq-topbar{font-family:"/only screen and (min-width:40.0625em)/";width:40.0625em}.contain-to-grid{width:100%;background:#333}.contain-to-grid .top-bar{margin-bottom:0}.fixed{width:100%;left:0;position:fixed;top:0;z-index:99}.fixed.expanded:not(.top-bar){overflow-y:auto;height:auto;width:100%;max-height:100%}.fixed.expanded:not(.top-bar) .title-area{position:fixed;width:100%;z-index:99}.fixed.expanded:not(.top-bar) .top-bar-section{z-index:98;margin-top:2.8125rem}.top-bar{overflow:hidden;height:2.8125rem;line-height:2.8125rem;position:relative;background:#333;margin-bottom:0}.top-bar ul{margin-bottom:0;list-style:none}.top-bar .row{max-width:none}.top-bar form,.top-bar input{margin-bottom:0}.top-bar input{height:1.75rem;padding-top:.35rem;padding-bottom:.35rem;font-size:.75rem}.top-bar .button,.top-bar button{padding-top:0.4125rem;padding-bottom:0.4125rem;margin-bottom:0;font-size:.75rem}@media only screen and (max-width: 40em){.top-bar .button,.top-bar button{position:relative;top:-1px}}.top-bar .title-area{position:relative;margin:0}.top-bar .name{height:2.8125rem;margin:0;font-size:16px}.top-bar .name h1,.top-bar .name h2,.top-bar .name h3,.top-bar .name h4,.top-bar .name p,.top-bar .name span{line-height:2.8125rem;font-size:1.0625rem;margin:0}.top-bar .name h1 a,.top-bar .name h2 a,.top-bar .name h3 a,.top-bar .name h4 a,.top-bar .name p a,.top-bar .name span a{font-weight:400;color:#fff;width:75%;display:block;padding:0 .9375rem}.top-bar .toggle-topbar{position:absolute;right:0;top:0}.top-bar .toggle-topbar a{color:#fff;text-transform:uppercase;font-size:.8125rem;font-weight:700;position:relative;display:block;padding:0 .9375rem;height:2.8125rem;line-height:2.8125rem}.top-bar .toggle-topbar.menu-icon{top:50%;margin-top:-16px}.top-bar .toggle-topbar.menu-icon a{height:34px;line-height:33px;padding:0 2.5rem 0 .9375rem;color:#fff;position:relative}.top-bar .toggle-topbar.menu-icon a span::after{content:"";position:absolute;display:block;height:0;top:50%;margin-top:-8px;right:.9375rem;box-shadow:0 0 0 1px #fff,0 7px 0 1px #fff,0 14px 0 1px #fff;width:16px}.top-bar .toggle-topbar.menu-icon a span:hover:after{box-shadow:0 0 0 1px "",0 7px 0 1px "",0 14px 0 1px ""}.top-bar.expanded{height:auto;background:transparent}.top-bar.expanded .title-area{background:#333}.top-bar.expanded .toggle-topbar a{color:#888}.top-bar.expanded .toggle-topbar a span::after{box-shadow:0 0 0 1px #888,0 7px 0 1px #888,0 14px 0 1px #888}.top-bar-section{left:0;position:relative;width:auto;transition:left 300ms ease-out}.top-bar-section ul{padding:0;width:100%;height:auto;display:block;font-size:16px;margin:0}.top-bar-section .divider,.top-bar-section [role="separator"]{border-top:solid 1px #1a1919;clear:both;height:1px;width:100%}.top-bar-section ul li{background:#333}.top-bar-section ul li>a{display:block;width:100%;color:#fff;padding:12px 0 12px 0;padding-left:.9375rem;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-size:.8125rem;font-weight:400;text-transform:none}.top-bar-section ul li>a.button{font-size:.8125rem;padding-right:.9375rem;padding-left:.9375rem;background-color:#ba2619;border-color:#951e14;color:#fff}.top-bar-section ul li>a.button:hover,.top-bar-section ul li>a.button:focus{background-color:#951e14}.top-bar-section ul li>a.button:hover,.top-bar-section ul li>a.button:focus{color:#fff}.top-bar-section ul li>a.button.secondary{background-color:#e7e7e7;border-color:#b9b9b9;color:#333}.top-bar-section ul li>a.button.secondary:hover,.top-bar-section ul li>a.button.secondary:focus{background-color:#b9b9b9}.top-bar-section ul li>a.button.secondary:hover,.top-bar-section ul li>a.button.secondary:focus{color:#333}.top-bar-section ul li>a.button.success{background-color:#43AC6A;border-color:#368a55;color:#fff}.top-bar-section ul li>a.button.success:hover,.top-bar-section ul li>a.button.success:focus{background-color:#368a55}.top-bar-section ul li>a.button.success:hover,.top-bar-section ul li>a.button.success:focus{color:#fff}.top-bar-section ul li>a.button.alert{background-color:#f04124;border-color:#cf2a0e;color:#fff}.top-bar-section ul li>a.button.alert:hover,.top-bar-section ul li>a.button.alert:focus{background-color:#cf2a0e}.top-bar-section ul li>a.button.alert:hover,.top-bar-section ul li>a.button.alert:focus{color:#fff}.top-bar-section ul li>a.button.warning{background-color:#f08a24;border-color:#cf6e0e;color:#fff}.top-bar-section ul li>a.button.warning:hover,.top-bar-section ul li>a.button.warning:focus{background-color:#cf6e0e}.top-bar-section ul li>a.button.warning:hover,.top-bar-section ul li>a.button.warning:focus{color:#fff}.top-bar-section ul li>button{font-size:.8125rem;padding-right:.9375rem;padding-left:.9375rem;background-color:#ba2619;border-color:#951e14;color:#fff}.top-bar-section ul li>button:hover,.top-bar-section ul li>button:focus{background-color:#951e14}.top-bar-section ul li>button:hover,.top-bar-section ul li>button:focus{color:#fff}.top-bar-section ul li>button.secondary{background-color:#e7e7e7;border-color:#b9b9b9;color:#333}.top-bar-section ul li>button.secondary:hover,.top-bar-section ul li>button.secondary:focus{background-color:#b9b9b9}.top-bar-section ul li>button.secondary:hover,.top-bar-section ul li>button.secondary:focus{color:#333}.top-bar-section ul li>button.success{background-color:#43AC6A;border-color:#368a55;color:#fff}.top-bar-section ul li>button.success:hover,.top-bar-section ul li>button.success:focus{background-color:#368a55}.top-bar-section ul li>button.success:hover,.top-bar-section ul li>button.success:focus{color:#fff}.top-bar-section ul li>button.alert{background-color:#f04124;border-color:#cf2a0e;color:#fff}.top-bar-section ul li>button.alert:hover,.top-bar-section ul li>button.alert:focus{background-color:#cf2a0e}.top-bar-section ul li>button.alert:hover,.top-bar-section ul li>button.alert:focus{color:#fff}.top-bar-section ul li>button.warning{background-color:#f08a24;border-color:#cf6e0e;color:#fff}.top-bar-section ul li>button.warning:hover,.top-bar-section ul li>button.warning:focus{background-color:#cf6e0e}.top-bar-section ul li>button.warning:hover,.top-bar-section ul li>button.warning:focus{color:#fff}.top-bar-section ul li:hover:not(.has-form)>a{background-color:#555;background:#333;color:#fff}.top-bar-section ul li.active>a{background:#ba2619;color:#fff}.top-bar-section ul li.active>a:hover{background:#a02116;color:#fff}.top-bar-section .has-form{padding:.9375rem}.top-bar-section .has-dropdown{position:relative}.top-bar-section .has-dropdown>a:after{content:"";display:block;width:0;height:0;border:inset 5px;border-color:transparent transparent transparent rgba(255,255,255,0.4);border-left-style:solid;margin-right:.9375rem;margin-top:-4.5px;position:absolute;top:50%;right:0}.top-bar-section .has-dropdown.moved{position:static}.top-bar-section .has-dropdown.moved>.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important;width:100%}.top-bar-section .has-dropdown.moved>a:after{display:none}.top-bar-section .dropdown{padding:0;position:absolute;left:100%;top:0;z-index:99;display:block;position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}.top-bar-section .dropdown li{width:100%;height:auto}.top-bar-section .dropdown li a{font-weight:400;padding:8px .9375rem}.top-bar-section .dropdown li a.parent-link{font-weight:400}.top-bar-section .dropdown li.title h5,.top-bar-section .dropdown li.parent-link{margin-bottom:0;margin-top:0;font-size:1.125rem}.top-bar-section .dropdown li.title h5 a,.top-bar-section .dropdown li.parent-link a{color:#fff;display:block}.top-bar-section .dropdown li.title h5 a:hover,.top-bar-section .dropdown li.parent-link a:hover{background:none}.top-bar-section .dropdown li.has-form{padding:8px .9375rem}.top-bar-section .dropdown li .button,.top-bar-section .dropdown li button{top:auto}.top-bar-section .dropdown label{padding:8px .9375rem 2px;margin-bottom:0;text-transform:uppercase;color:#777;font-weight:700;font-size:.625rem}.js-generated{display:block}@media only screen and (min-width: 40.0625em){.top-bar{background:#333;overflow:visible}.top-bar:before,.top-bar:after{content:" ";display:table}.top-bar:after{clear:both}.top-bar .toggle-topbar{display:none}.top-bar .title-area{float:left}.top-bar .name h1 a,.top-bar .name h2 a,.top-bar .name h3 a,.top-bar .name h4 a,.top-bar .name h5 a,.top-bar .name h6 a{width:auto}.top-bar input,.top-bar .button,.top-bar button{font-size:.875rem;position:relative;height:1.75rem;top:.53125rem}.top-bar.expanded{background:#333}.contain-to-grid .top-bar{max-width:62.5rem;margin:0 auto;margin-bottom:0}.top-bar-section{transition:none 0 0;left:0 !important}.top-bar-section ul{width:auto;height:auto !important;display:inline}.top-bar-section ul li{float:left}.top-bar-section ul li .js-generated{display:none}.top-bar-section li.hover>a:not(.button){background-color:#555;background:#333;color:#fff}.top-bar-section li:not(.has-form) a:not(.button){padding:0 .9375rem;line-height:2.8125rem;background:#333}.top-bar-section li:not(.has-form) a:not(.button):hover{background-color:#555;background:#333}.top-bar-section li.active:not(.has-form) a:not(.button){padding:0 .9375rem;line-height:2.8125rem;color:#fff;background:#ba2619}.top-bar-section li.active:not(.has-form) a:not(.button):hover{background:#a02116;color:#fff}.top-bar-section .has-dropdown>a{padding-right:2.1875rem !important}.top-bar-section .has-dropdown>a:after{content:"";display:block;width:0;height:0;border:inset 5px;border-color:rgba(255,255,255,0.4) transparent transparent transparent;border-top-style:solid;margin-top:-2.5px;top:1.40625rem}.top-bar-section .has-dropdown.moved{position:relative}.top-bar-section .has-dropdown.moved>.dropdown{display:block;position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}.top-bar-section .has-dropdown.hover>.dropdown,.top-bar-section .has-dropdown.not-click:hover>.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important}.top-bar-section .has-dropdown>a:focus+.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important}.top-bar-section .has-dropdown .dropdown li.has-dropdown>a:after{border:none;content:"\00bb";top:1rem;margin-top:-1px;right:5px;line-height:1.2}.top-bar-section .dropdown{left:0;top:auto;background:transparent;min-width:100%}.top-bar-section .dropdown li a{color:#fff;line-height:2.8125rem;white-space:nowrap;padding:12px .9375rem;background:#333}.top-bar-section .dropdown li:not(.has-form):not(.active)>a:not(.button){color:#fff;background:#333}.top-bar-section .dropdown li:not(.has-form):not(.active):hover>a:not(.button){color:#fff;background-color:#555;background:#333}.top-bar-section .dropdown li label{white-space:nowrap;background:#333}.top-bar-section .dropdown li .dropdown{left:100%;top:0}.top-bar-section>ul>.divider,.top-bar-section>ul>[role="separator"]{border-bottom:none;border-top:none;border-right:solid 1px #4e4e4e;clear:none;height:2.8125rem;width:0}.top-bar-section .has-form{background:#333;padding:0 .9375rem;height:2.8125rem}.top-bar-section .right li .dropdown{left:auto;right:0}.top-bar-section .right li .dropdown li .dropdown{right:100%}.top-bar-section .left li .dropdown{right:auto;left:0}.top-bar-section .left li .dropdown li .dropdown{left:100%}.no-js .top-bar-section ul li:hover>a{background-color:#555;background:#333;color:#fff}.no-js .top-bar-section ul li:active>a{background:#ba2619;color:#fff}.no-js .top-bar-section .has-dropdown:hover>.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important}.no-js .top-bar-section .has-dropdown>a:focus+.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important}}.text-left{text-align:left !important}.text-right{text-align:right !important}.text-center{text-align:center !important}.text-justify{text-align:justify !important}@media only screen and (max-width: 40em){.small-only-text-left{text-align:left !important}.small-only-text-right{text-align:right !important}.small-only-text-center{text-align:center !important}.small-only-text-justify{text-align:justify !important}}@media only screen{.small-text-left{text-align:left !important}.small-text-right{text-align:right !important}.small-text-center{text-align:center !important}.small-text-justify{text-align:justify !important}}@media only screen and (min-width: 40.0625em) and (max-width: 64em){.medium-only-text-left{text-align:left !important}.medium-only-text-right{text-align:right !important}.medium-only-text-center{text-align:center !important}.medium-only-text-justify{text-align:justify !important}}@media only screen and (min-width: 40.0625em){.medium-text-left{text-align:left !important}.medium-text-right{text-align:right !important}.medium-text-center{text-align:center !important}.medium-text-justify{text-align:justify !important}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){.large-only-text-left{text-align:left !important}.large-only-text-right{text-align:right !important}.large-only-text-center{text-align:center !important}.large-only-text-justify{text-align:justify !important}}@media only screen and (min-width: 64.0625em){.large-text-left{text-align:left !important}.large-text-right{text-align:right !important}.large-text-center{text-align:center !important}.large-text-justify{text-align:justify !important}}@media only screen and (min-width: 90.0625em) and (max-width: 120em){.xlarge-only-text-left{text-align:left !important}.xlarge-only-text-right{text-align:right !important}.xlarge-only-text-center{text-align:center !important}.xlarge-only-text-justify{text-align:justify !important}}@media only screen and (min-width: 90.0625em){.xlarge-text-left{text-align:left !important}.xlarge-text-right{text-align:right !important}.xlarge-text-center{text-align:center !important}.xlarge-text-justify{text-align:justify !important}}@media only screen and (min-width: 120.0625em) and (max-width: 99999999em){.xxlarge-only-text-left{text-align:left !important}.xxlarge-only-text-right{text-align:right !important}.xxlarge-only-text-center{text-align:center !important}.xxlarge-only-text-justify{text-align:justify !important}}@media only screen and (min-width: 120.0625em){.xxlarge-text-left{text-align:left !important}.xxlarge-text-right{text-align:right !important}.xxlarge-text-center{text-align:center !important}.xxlarge-text-justify{text-align:justify !important}}div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}a{color:#ba2619;text-decoration:none;line-height:inherit}a:hover,a:focus{color:#a02116}a img{border:none}p{font-family:inherit;font-weight:400;font-size:1rem;line-height:1.6;margin-bottom:1.25rem;text-rendering:optimizeLegibility}p.lead{font-size:1.21875rem;line-height:1.6}p aside{font-size:.875rem;line-height:1.35;font-style:italic}h1,h2,h3,h4,h5,h6{font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-weight:700;font-style:normal;color:#222;text-rendering:optimizeLegibility;margin-top:.2rem;margin-bottom:.5rem;line-height:1.4}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-size:80%;color:#6f6f6f;line-height:0}h1{font-size:1.5625rem}h2{font-size:1.25rem}h3{font-size:1.0625rem}h4{font-size:.9375rem}h5{font-size:1rem}h6{font-size:1rem}.subheader{line-height:1.4;color:#6f6f6f;font-weight:400;margin-top:.2rem;margin-bottom:.5rem}hr{border:solid #ddd;border-width:1px 0 0;clear:both;margin:1.25rem 0 1.1875rem;height:0}em,i{font-style:italic;line-height:inherit}strong,b{font-weight:700;line-height:inherit}small{font-size:80%;line-height:inherit}code{font-family:Consolas,"Liberation Mono",Courier,monospace;font-weight:400;color:#333;background-color:rgba(0,0,0,0.04);border-width:1px;border-style:none;border-color:rgba(0,0,0,0.04);padding:.125rem .3125rem .0625rem}ul,ol,dl{font-size:1rem;line-height:1.6;margin-bottom:1.25rem;list-style-position:outside;font-family:inherit}ul{margin-left:1.1rem}ul.no-bullet{margin-left:0}ul.no-bullet li ul,ul.no-bullet li ol{margin-left:1.25rem;margin-bottom:0;list-style:none}ul li ul,ul li ol{margin-left:1.25rem;margin-bottom:0}ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}ul.square{list-style-type:square;margin-left:1.1rem}ul.circle{list-style-type:circle;margin-left:1.1rem}ul.disc{list-style-type:disc;margin-left:1.1rem}ul.no-bullet{list-style:none}ol{margin-left:1.4rem}ol li ul,ol li ol{margin-left:1.25rem;margin-bottom:0}dl dt{margin-bottom:.3rem;font-weight:700}dl dd{margin-bottom:.75rem}abbr,acronym{text-transform:uppercase;font-size:90%;color:#222;cursor:help}abbr{text-transform:none}abbr[title]{border-bottom:1px dotted #ddd}blockquote{margin:0 0 1.25rem;padding:.5625rem 1.25rem 0 1.1875rem;border-left:1px solid #ddd}blockquote cite{display:block;font-size:.8125rem;color:#555}blockquote cite:before{content:"\2014 \0020"}blockquote cite a,blockquote cite a:visited{color:#555}blockquote,blockquote p{line-height:1.6;color:#6f6f6f}.vcard{display:inline-block;margin:0 0 1.25rem 0;border:1px solid #ddd;padding:.625rem .75rem}.vcard li{margin:0;display:block}.vcard .fn{font-weight:700;font-size:.9375rem}.vevent .summary{font-weight:700}.vevent abbr{cursor:default;text-decoration:none;font-weight:700;border:none;padding:0 .0625rem}@media only screen and (min-width: 40.0625em){h1,h2,h3,h4,h5,h6{line-height:1.4}h1{font-size:1.875rem}h2{font-size:1.5625rem}h3{font-size:1.375rem}h4{font-size:1.25rem}h5{font-size:1rem}h6{font-size:1rem}}@media only screen{.show-for-small-only,.show-for-small-up,.show-for-small,.show-for-small-down,.hide-for-medium-only,.hide-for-medium-up,.hide-for-medium,.show-for-medium-down,.hide-for-large-only,.hide-for-large-up,.hide-for-large,.show-for-large-down,.hide-for-xlarge-only,.hide-for-xlarge-up,.hide-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.hide-for-small-only,.hide-for-small-up,.hide-for-small,.hide-for-small-down,.show-for-medium-only,.show-for-medium-up,.show-for-medium,.hide-for-medium-down,.show-for-large-only,.show-for-large-up,.show-for-large,.hide-for-large-down,.show-for-xlarge-only,.show-for-xlarge-up,.show-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.visible-for-small-only,.visible-for-small-up,.visible-for-small,.visible-for-small-down,.hidden-for-medium-only,.hidden-for-medium-up,.hidden-for-medium,.visible-for-medium-down,.hidden-for-large-only,.hidden-for-large-up,.hidden-for-large,.visible-for-large-down,.hidden-for-xlarge-only,.hidden-for-xlarge-up,.hidden-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.hidden-for-small-only,.hidden-for-small-up,.hidden-for-small,.hidden-for-small-down,.visible-for-medium-only,.visible-for-medium-up,.visible-for-medium,.hidden-for-medium-down,.visible-for-large-only,.visible-for-large-up,.visible-for-large,.hidden-for-large-down,.visible-for-xlarge-only,.visible-for-xlarge-up,.visible-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.show-for-small-only,table.show-for-small-up,table.show-for-small,table.show-for-small-down,table.hide-for-medium-only,table.hide-for-medium-up,table.hide-for-medium,table.show-for-medium-down,table.hide-for-large-only,table.hide-for-large-up,table.hide-for-large,table.show-for-large-down,table.hide-for-xlarge-only,table.hide-for-xlarge-up,table.hide-for-xlarge,table.show-for-xlarge-down,table.hide-for-xxlarge-only,table.hide-for-xxlarge-up,table.hide-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.show-for-small-only,thead.show-for-small-up,thead.show-for-small,thead.show-for-small-down,thead.hide-for-medium-only,thead.hide-for-medium-up,thead.hide-for-medium,thead.show-for-medium-down,thead.hide-for-large-only,thead.hide-for-large-up,thead.hide-for-large,thead.show-for-large-down,thead.hide-for-xlarge-only,thead.hide-for-xlarge-up,thead.hide-for-xlarge,thead.show-for-xlarge-down,thead.hide-for-xxlarge-only,thead.hide-for-xxlarge-up,thead.hide-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.show-for-small-only,tbody.show-for-small-up,tbody.show-for-small,tbody.show-for-small-down,tbody.hide-for-medium-only,tbody.hide-for-medium-up,tbody.hide-for-medium,tbody.show-for-medium-down,tbody.hide-for-large-only,tbody.hide-for-large-up,tbody.hide-for-large,tbody.show-for-large-down,tbody.hide-for-xlarge-only,tbody.hide-for-xlarge-up,tbody.hide-for-xlarge,tbody.show-for-xlarge-down,tbody.hide-for-xxlarge-only,tbody.hide-for-xxlarge-up,tbody.hide-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.show-for-small-only,tr.show-for-small-up,tr.show-for-small,tr.show-for-small-down,tr.hide-for-medium-only,tr.hide-for-medium-up,tr.hide-for-medium,tr.show-for-medium-down,tr.hide-for-large-only,tr.hide-for-large-up,tr.hide-for-large,tr.show-for-large-down,tr.hide-for-xlarge-only,tr.hide-for-xlarge-up,tr.hide-for-xlarge,tr.show-for-xlarge-down,tr.hide-for-xxlarge-only,tr.hide-for-xxlarge-up,tr.hide-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.show-for-small-only,td.show-for-small-only,th.show-for-small-up,td.show-for-small-up,th.show-for-small,td.show-for-small,th.show-for-small-down,td.show-for-small-down,th.hide-for-medium-only,td.hide-for-medium-only,th.hide-for-medium-up,td.hide-for-medium-up,th.hide-for-medium,td.hide-for-medium,th.show-for-medium-down,td.show-for-medium-down,th.hide-for-large-only,td.hide-for-large-only,th.hide-for-large-up,td.hide-for-large-up,th.hide-for-large,td.hide-for-large,th.show-for-large-down,td.show-for-large-down,th.hide-for-xlarge-only,td.hide-for-xlarge-only,th.hide-for-xlarge-up,td.hide-for-xlarge-up,th.hide-for-xlarge,td.hide-for-xlarge,th.show-for-xlarge-down,td.show-for-xlarge-down,th.hide-for-xxlarge-only,td.hide-for-xxlarge-only,th.hide-for-xxlarge-up,td.hide-for-xxlarge-up,th.hide-for-xxlarge,td.hide-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}@media only screen and (min-width: 40.0625em){.hide-for-small-only,.show-for-small-up,.hide-for-small,.hide-for-small-down,.show-for-medium-only,.show-for-medium-up,.show-for-medium,.show-for-medium-down,.hide-for-large-only,.hide-for-large-up,.hide-for-large,.show-for-large-down,.hide-for-xlarge-only,.hide-for-xlarge-up,.hide-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.show-for-small-only,.hide-for-small-up,.show-for-small,.show-for-small-down,.hide-for-medium-only,.hide-for-medium-up,.hide-for-medium,.hide-for-medium-down,.show-for-large-only,.show-for-large-up,.show-for-large,.hide-for-large-down,.show-for-xlarge-only,.show-for-xlarge-up,.show-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.hidden-for-small-only,.visible-for-small-up,.hidden-for-small,.hidden-for-small-down,.visible-for-medium-only,.visible-for-medium-up,.visible-for-medium,.visible-for-medium-down,.hidden-for-large-only,.hidden-for-large-up,.hidden-for-large,.visible-for-large-down,.hidden-for-xlarge-only,.hidden-for-xlarge-up,.hidden-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.visible-for-small-only,.hidden-for-small-up,.visible-for-small,.visible-for-small-down,.hidden-for-medium-only,.hidden-for-medium-up,.hidden-for-medium,.hidden-for-medium-down,.visible-for-large-only,.visible-for-large-up,.visible-for-large,.hidden-for-large-down,.visible-for-xlarge-only,.visible-for-xlarge-up,.visible-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.hide-for-small-only,table.show-for-small-up,table.hide-for-small,table.hide-for-small-down,table.show-for-medium-only,table.show-for-medium-up,table.show-for-medium,table.show-for-medium-down,table.hide-for-large-only,table.hide-for-large-up,table.hide-for-large,table.show-for-large-down,table.hide-for-xlarge-only,table.hide-for-xlarge-up,table.hide-for-xlarge,table.show-for-xlarge-down,table.hide-for-xxlarge-only,table.hide-for-xxlarge-up,table.hide-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.hide-for-small-only,thead.show-for-small-up,thead.hide-for-small,thead.hide-for-small-down,thead.show-for-medium-only,thead.show-for-medium-up,thead.show-for-medium,thead.show-for-medium-down,thead.hide-for-large-only,thead.hide-for-large-up,thead.hide-for-large,thead.show-for-large-down,thead.hide-for-xlarge-only,thead.hide-for-xlarge-up,thead.hide-for-xlarge,thead.show-for-xlarge-down,thead.hide-for-xxlarge-only,thead.hide-for-xxlarge-up,thead.hide-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.hide-for-small-only,tbody.show-for-small-up,tbody.hide-for-small,tbody.hide-for-small-down,tbody.show-for-medium-only,tbody.show-for-medium-up,tbody.show-for-medium,tbody.show-for-medium-down,tbody.hide-for-large-only,tbody.hide-for-large-up,tbody.hide-for-large,tbody.show-for-large-down,tbody.hide-for-xlarge-only,tbody.hide-for-xlarge-up,tbody.hide-for-xlarge,tbody.show-for-xlarge-down,tbody.hide-for-xxlarge-only,tbody.hide-for-xxlarge-up,tbody.hide-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.hide-for-small-only,tr.show-for-small-up,tr.hide-for-small,tr.hide-for-small-down,tr.show-for-medium-only,tr.show-for-medium-up,tr.show-for-medium,tr.show-for-medium-down,tr.hide-for-large-only,tr.hide-for-large-up,tr.hide-for-large,tr.show-for-large-down,tr.hide-for-xlarge-only,tr.hide-for-xlarge-up,tr.hide-for-xlarge,tr.show-for-xlarge-down,tr.hide-for-xxlarge-only,tr.hide-for-xxlarge-up,tr.hide-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.hide-for-small-only,td.hide-for-small-only,th.show-for-small-up,td.show-for-small-up,th.hide-for-small,td.hide-for-small,th.hide-for-small-down,td.hide-for-small-down,th.show-for-medium-only,td.show-for-medium-only,th.show-for-medium-up,td.show-for-medium-up,th.show-for-medium,td.show-for-medium,th.show-for-medium-down,td.show-for-medium-down,th.hide-for-large-only,td.hide-for-large-only,th.hide-for-large-up,td.hide-for-large-up,th.hide-for-large,td.hide-for-large,th.show-for-large-down,td.show-for-large-down,th.hide-for-xlarge-only,td.hide-for-xlarge-only,th.hide-for-xlarge-up,td.hide-for-xlarge-up,th.hide-for-xlarge,td.hide-for-xlarge,th.show-for-xlarge-down,td.show-for-xlarge-down,th.hide-for-xxlarge-only,td.hide-for-xxlarge-only,th.hide-for-xxlarge-up,td.hide-for-xxlarge-up,th.hide-for-xxlarge,td.hide-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}@media only screen and (min-width: 64.0625em){.hide-for-small-only,.show-for-small-up,.hide-for-small,.hide-for-small-down,.hide-for-medium-only,.show-for-medium-up,.hide-for-medium,.hide-for-medium-down,.show-for-large-only,.show-for-large-up,.show-for-large,.show-for-large-down,.hide-for-xlarge-only,.hide-for-xlarge-up,.hide-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.show-for-small-only,.hide-for-small-up,.show-for-small,.show-for-small-down,.show-for-medium-only,.hide-for-medium-up,.show-for-medium,.show-for-medium-down,.hide-for-large-only,.hide-for-large-up,.hide-for-large,.hide-for-large-down,.show-for-xlarge-only,.show-for-xlarge-up,.show-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.hidden-for-small-only,.visible-for-small-up,.hidden-for-small,.hidden-for-small-down,.hidden-for-medium-only,.visible-for-medium-up,.hidden-for-medium,.hidden-for-medium-down,.visible-for-large-only,.visible-for-large-up,.visible-for-large,.visible-for-large-down,.hidden-for-xlarge-only,.hidden-for-xlarge-up,.hidden-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.visible-for-small-only,.hidden-for-small-up,.visible-for-small,.visible-for-small-down,.visible-for-medium-only,.hidden-for-medium-up,.visible-for-medium,.visible-for-medium-down,.hidden-for-large-only,.hidden-for-large-up,.hidden-for-large,.hidden-for-large-down,.visible-for-xlarge-only,.visible-for-xlarge-up,.visible-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.hide-for-small-only,table.show-for-small-up,table.hide-for-small,table.hide-for-small-down,table.hide-for-medium-only,table.show-for-medium-up,table.hide-for-medium,table.hide-for-medium-down,table.show-for-large-only,table.show-for-large-up,table.show-for-large,table.show-for-large-down,table.hide-for-xlarge-only,table.hide-for-xlarge-up,table.hide-for-xlarge,table.show-for-xlarge-down,table.hide-for-xxlarge-only,table.hide-for-xxlarge-up,table.hide-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.hide-for-small-only,thead.show-for-small-up,thead.hide-for-small,thead.hide-for-small-down,thead.hide-for-medium-only,thead.show-for-medium-up,thead.hide-for-medium,thead.hide-for-medium-down,thead.show-for-large-only,thead.show-for-large-up,thead.show-for-large,thead.show-for-large-down,thead.hide-for-xlarge-only,thead.hide-for-xlarge-up,thead.hide-for-xlarge,thead.show-for-xlarge-down,thead.hide-for-xxlarge-only,thead.hide-for-xxlarge-up,thead.hide-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.hide-for-small-only,tbody.show-for-small-up,tbody.hide-for-small,tbody.hide-for-small-down,tbody.hide-for-medium-only,tbody.show-for-medium-up,tbody.hide-for-medium,tbody.hide-for-medium-down,tbody.show-for-large-only,tbody.show-for-large-up,tbody.show-for-large,tbody.show-for-large-down,tbody.hide-for-xlarge-only,tbody.hide-for-xlarge-up,tbody.hide-for-xlarge,tbody.show-for-xlarge-down,tbody.hide-for-xxlarge-only,tbody.hide-for-xxlarge-up,tbody.hide-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.hide-for-small-only,tr.show-for-small-up,tr.hide-for-small,tr.hide-for-small-down,tr.hide-for-medium-only,tr.show-for-medium-up,tr.hide-for-medium,tr.hide-for-medium-down,tr.show-for-large-only,tr.show-for-large-up,tr.show-for-large,tr.show-for-large-down,tr.hide-for-xlarge-only,tr.hide-for-xlarge-up,tr.hide-for-xlarge,tr.show-for-xlarge-down,tr.hide-for-xxlarge-only,tr.hide-for-xxlarge-up,tr.hide-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.hide-for-small-only,td.hide-for-small-only,th.show-for-small-up,td.show-for-small-up,th.hide-for-small,td.hide-for-small,th.hide-for-small-down,td.hide-for-small-down,th.hide-for-medium-only,td.hide-for-medium-only,th.show-for-medium-up,td.show-for-medium-up,th.hide-for-medium,td.hide-for-medium,th.hide-for-medium-down,td.hide-for-medium-down,th.show-for-large-only,td.show-for-large-only,th.show-for-large-up,td.show-for-large-up,th.show-for-large,td.show-for-large,th.show-for-large-down,td.show-for-large-down,th.hide-for-xlarge-only,td.hide-for-xlarge-only,th.hide-for-xlarge-up,td.hide-for-xlarge-up,th.hide-for-xlarge,td.hide-for-xlarge,th.show-for-xlarge-down,td.show-for-xlarge-down,th.hide-for-xxlarge-only,td.hide-for-xxlarge-only,th.hide-for-xxlarge-up,td.hide-for-xxlarge-up,th.hide-for-xxlarge,td.hide-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}@media only screen and (min-width: 90.0625em){.hide-for-small-only,.show-for-small-up,.hide-for-small,.hide-for-small-down,.hide-for-medium-only,.show-for-medium-up,.hide-for-medium,.hide-for-medium-down,.hide-for-large-only,.show-for-large-up,.hide-for-large,.hide-for-large-down,.show-for-xlarge-only,.show-for-xlarge-up,.show-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.show-for-small-only,.hide-for-small-up,.show-for-small,.show-for-small-down,.show-for-medium-only,.hide-for-medium-up,.show-for-medium,.show-for-medium-down,.show-for-large-only,.hide-for-large-up,.show-for-large,.show-for-large-down,.hide-for-xlarge-only,.hide-for-xlarge-up,.hide-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.hidden-for-small-only,.visible-for-small-up,.hidden-for-small,.hidden-for-small-down,.hidden-for-medium-only,.visible-for-medium-up,.hidden-for-medium,.hidden-for-medium-down,.hidden-for-large-only,.visible-for-large-up,.hidden-for-large,.hidden-for-large-down,.visible-for-xlarge-only,.visible-for-xlarge-up,.visible-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.visible-for-small-only,.hidden-for-small-up,.visible-for-small,.visible-for-small-down,.visible-for-medium-only,.hidden-for-medium-up,.visible-for-medium,.visible-for-medium-down,.visible-for-large-only,.hidden-for-large-up,.visible-for-large,.visible-for-large-down,.hidden-for-xlarge-only,.hidden-for-xlarge-up,.hidden-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.hide-for-small-only,table.show-for-small-up,table.hide-for-small,table.hide-for-small-down,table.hide-for-medium-only,table.show-for-medium-up,table.hide-for-medium,table.hide-for-medium-down,table.hide-for-large-only,table.show-for-large-up,table.hide-for-large,table.hide-for-large-down,table.show-for-xlarge-only,table.show-for-xlarge-up,table.show-for-xlarge,table.show-for-xlarge-down,table.hide-for-xxlarge-only,table.hide-for-xxlarge-up,table.hide-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.hide-for-small-only,thead.show-for-small-up,thead.hide-for-small,thead.hide-for-small-down,thead.hide-for-medium-only,thead.show-for-medium-up,thead.hide-for-medium,thead.hide-for-medium-down,thead.hide-for-large-only,thead.show-for-large-up,thead.hide-for-large,thead.hide-for-large-down,thead.show-for-xlarge-only,thead.show-for-xlarge-up,thead.show-for-xlarge,thead.show-for-xlarge-down,thead.hide-for-xxlarge-only,thead.hide-for-xxlarge-up,thead.hide-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.hide-for-small-only,tbody.show-for-small-up,tbody.hide-for-small,tbody.hide-for-small-down,tbody.hide-for-medium-only,tbody.show-for-medium-up,tbody.hide-for-medium,tbody.hide-for-medium-down,tbody.hide-for-large-only,tbody.show-for-large-up,tbody.hide-for-large,tbody.hide-for-large-down,tbody.show-for-xlarge-only,tbody.show-for-xlarge-up,tbody.show-for-xlarge,tbody.show-for-xlarge-down,tbody.hide-for-xxlarge-only,tbody.hide-for-xxlarge-up,tbody.hide-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.hide-for-small-only,tr.show-for-small-up,tr.hide-for-small,tr.hide-for-small-down,tr.hide-for-medium-only,tr.show-for-medium-up,tr.hide-for-medium,tr.hide-for-medium-down,tr.hide-for-large-only,tr.show-for-large-up,tr.hide-for-large,tr.hide-for-large-down,tr.show-for-xlarge-only,tr.show-for-xlarge-up,tr.show-for-xlarge,tr.show-for-xlarge-down,tr.hide-for-xxlarge-only,tr.hide-for-xxlarge-up,tr.hide-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.hide-for-small-only,td.hide-for-small-only,th.show-for-small-up,td.show-for-small-up,th.hide-for-small,td.hide-for-small,th.hide-for-small-down,td.hide-for-small-down,th.hide-for-medium-only,td.hide-for-medium-only,th.show-for-medium-up,td.show-for-medium-up,th.hide-for-medium,td.hide-for-medium,th.hide-for-medium-down,td.hide-for-medium-down,th.hide-for-large-only,td.hide-for-large-only,th.show-for-large-up,td.show-for-large-up,th.hide-for-large,td.hide-for-large,th.hide-for-large-down,td.hide-for-large-down,th.show-for-xlarge-only,td.show-for-xlarge-only,th.show-for-xlarge-up,td.show-for-xlarge-up,th.show-for-xlarge,td.show-for-xlarge,th.show-for-xlarge-down,td.show-for-xlarge-down,th.hide-for-xxlarge-only,td.hide-for-xxlarge-only,th.hide-for-xxlarge-up,td.hide-for-xxlarge-up,th.hide-for-xxlarge,td.hide-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}@media only screen and (min-width: 120.0625em){.hide-for-small-only,.show-for-small-up,.hide-for-small,.hide-for-small-down,.hide-for-medium-only,.show-for-medium-up,.hide-for-medium,.hide-for-medium-down,.hide-for-large-only,.show-for-large-up,.hide-for-large,.hide-for-large-down,.hide-for-xlarge-only,.show-for-xlarge-up,.hide-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.show-for-small-only,.hide-for-small-up,.show-for-small,.show-for-small-down,.show-for-medium-only,.hide-for-medium-up,.show-for-medium,.show-for-medium-down,.show-for-large-only,.hide-for-large-up,.show-for-large,.show-for-large-down,.show-for-xlarge-only,.hide-for-xlarge-up,.show-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.hidden-for-small-only,.visible-for-small-up,.hidden-for-small,.hidden-for-small-down,.hidden-for-medium-only,.visible-for-medium-up,.hidden-for-medium,.hidden-for-medium-down,.hidden-for-large-only,.visible-for-large-up,.hidden-for-large,.hidden-for-large-down,.hidden-for-xlarge-only,.visible-for-xlarge-up,.hidden-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.visible-for-small-only,.hidden-for-small-up,.visible-for-small,.visible-for-small-down,.visible-for-medium-only,.hidden-for-medium-up,.visible-for-medium,.visible-for-medium-down,.visible-for-large-only,.hidden-for-large-up,.visible-for-large,.visible-for-large-down,.visible-for-xlarge-only,.hidden-for-xlarge-up,.visible-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.hide-for-small-only,table.show-for-small-up,table.hide-for-small,table.hide-for-small-down,table.hide-for-medium-only,table.show-for-medium-up,table.hide-for-medium,table.hide-for-medium-down,table.hide-for-large-only,table.show-for-large-up,table.hide-for-large,table.hide-for-large-down,table.hide-for-xlarge-only,table.show-for-xlarge-up,table.hide-for-xlarge,table.hide-for-xlarge-down,table.show-for-xxlarge-only,table.show-for-xxlarge-up,table.show-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.hide-for-small-only,thead.show-for-small-up,thead.hide-for-small,thead.hide-for-small-down,thead.hide-for-medium-only,thead.show-for-medium-up,thead.hide-for-medium,thead.hide-for-medium-down,thead.hide-for-large-only,thead.show-for-large-up,thead.hide-for-large,thead.hide-for-large-down,thead.hide-for-xlarge-only,thead.show-for-xlarge-up,thead.hide-for-xlarge,thead.hide-for-xlarge-down,thead.show-for-xxlarge-only,thead.show-for-xxlarge-up,thead.show-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.hide-for-small-only,tbody.show-for-small-up,tbody.hide-for-small,tbody.hide-for-small-down,tbody.hide-for-medium-only,tbody.show-for-medium-up,tbody.hide-for-medium,tbody.hide-for-medium-down,tbody.hide-for-large-only,tbody.show-for-large-up,tbody.hide-for-large,tbody.hide-for-large-down,tbody.hide-for-xlarge-only,tbody.show-for-xlarge-up,tbody.hide-for-xlarge,tbody.hide-for-xlarge-down,tbody.show-for-xxlarge-only,tbody.show-for-xxlarge-up,tbody.show-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.hide-for-small-only,tr.show-for-small-up,tr.hide-for-small,tr.hide-for-small-down,tr.hide-for-medium-only,tr.show-for-medium-up,tr.hide-for-medium,tr.hide-for-medium-down,tr.hide-for-large-only,tr.show-for-large-up,tr.hide-for-large,tr.hide-for-large-down,tr.hide-for-xlarge-only,tr.show-for-xlarge-up,tr.hide-for-xlarge,tr.hide-for-xlarge-down,tr.show-for-xxlarge-only,tr.show-for-xxlarge-up,tr.show-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.hide-for-small-only,td.hide-for-small-only,th.show-for-small-up,td.show-for-small-up,th.hide-for-small,td.hide-for-small,th.hide-for-small-down,td.hide-for-small-down,th.hide-for-medium-only,td.hide-for-medium-only,th.show-for-medium-up,td.show-for-medium-up,th.hide-for-medium,td.hide-for-medium,th.hide-for-medium-down,td.hide-for-medium-down,th.hide-for-large-only,td.hide-for-large-only,th.show-for-large-up,td.show-for-large-up,th.hide-for-large,td.hide-for-large,th.hide-for-large-down,td.hide-for-large-down,th.hide-for-xlarge-only,td.hide-for-xlarge-only,th.show-for-xlarge-up,td.show-for-xlarge-up,th.hide-for-xlarge,td.hide-for-xlarge,th.hide-for-xlarge-down,td.hide-for-xlarge-down,th.show-for-xxlarge-only,td.show-for-xxlarge-only,th.show-for-xxlarge-up,td.show-for-xxlarge-up,th.show-for-xxlarge,td.show-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}.show-for-landscape,.hide-for-portrait{display:inherit !important}.hide-for-landscape,.show-for-portrait{display:none !important}table.hide-for-landscape,table.show-for-portrait{display:table !important}thead.hide-for-landscape,thead.show-for-portrait{display:table-header-group !important}tbody.hide-for-landscape,tbody.show-for-portrait{display:table-row-group !important}tr.hide-for-landscape,tr.show-for-portrait{display:table-row !important}td.hide-for-landscape,td.show-for-portrait,th.hide-for-landscape,th.show-for-portrait{display:table-cell !important}@media only screen and (orientation: landscape){.show-for-landscape,.hide-for-portrait{display:inherit !important}.hide-for-landscape,.show-for-portrait{display:none !important}table.show-for-landscape,table.hide-for-portrait{display:table !important}thead.show-for-landscape,thead.hide-for-portrait{display:table-header-group !important}tbody.show-for-landscape,tbody.hide-for-portrait{display:table-row-group !important}tr.show-for-landscape,tr.hide-for-portrait{display:table-row !important}td.show-for-landscape,td.hide-for-portrait,th.show-for-landscape,th.hide-for-portrait{display:table-cell !important}}@media only screen and (orientation: portrait){.show-for-portrait,.hide-for-landscape{display:inherit !important}.hide-for-portrait,.show-for-landscape{display:none !important}table.show-for-portrait,table.hide-for-landscape{display:table !important}thead.show-for-portrait,thead.hide-for-landscape{display:table-header-group !important}tbody.show-for-portrait,tbody.hide-for-landscape{display:table-row-group !important}tr.show-for-portrait,tr.hide-for-landscape{display:table-row !important}td.show-for-portrait,td.hide-for-landscape,th.show-for-portrait,th.hide-for-landscape{display:table-cell !important}}.show-for-touch{display:none !important}.hide-for-touch{display:inherit !important}.touch .show-for-touch{display:inherit !important}.touch .hide-for-touch{display:none !important}table.hide-for-touch{display:table !important}.touch table.show-for-touch{display:table !important}thead.hide-for-touch{display:table-header-group !important}.touch thead.show-for-touch{display:table-header-group !important}tbody.hide-for-touch{display:table-row-group !important}.touch tbody.show-for-touch{display:table-row-group !important}tr.hide-for-touch{display:table-row !important}.touch tr.show-for-touch{display:table-row !important}td.hide-for-touch{display:table-cell !important}.touch td.show-for-touch{display:table-cell !important}th.hide-for-touch{display:table-cell !important}.touch th.show-for-touch{display:table-cell !important}.print-only{display:none !important}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}.show-for-print{display:block}.hide-for-print{display:none}table.show-for-print{display:table !important}thead.show-for-print{display:table-header-group !important}tbody.show-for-print{display:table-row-group !important}tr.show-for-print{display:table-row !important}td.show-for-print{display:table-cell !important}th.show-for-print{display:table-cell !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.hide-on-print{display:none !important}.print-only{display:block !important}.hide-for-print{display:none !important}.show-for-print{display:inherit !important}}@media print{.show-for-print{display:block}.hide-for-print{display:none}table.show-for-print{display:table !important}thead.show-for-print{display:table-header-group !important}tbody.show-for-print{display:table-row-group !important}tr.show-for-print{display:table-row !important}td.show-for-print{display:table-cell !important}th.show-for-print{display:table-cell !important}}.slick-slider{position:relative;display:block;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-tap-highlight-color:transparent}.slick-list{position:relative;overflow:hidden;display:block;margin:0;padding:0}.slick-list:focus{outline:none}.slick-list.dragging{cursor:pointer;cursor:hand}.slick-slider .slick-track,.slick-slider .slick-list{-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.slick-track{position:relative;left:0;top:0;display:block}.slick-track:before,.slick-track:after{content:"";display:table}.slick-track:after{clear:both}.slick-loading .slick-track{visibility:hidden}.slick-slide{float:left;height:100%;min-height:1px;display:none}[dir="rtl"] .slick-slide{float:right}.slick-slide img{display:block}.slick-slide.slick-loading img{display:none}.slick-slide.dragging img{pointer-events:none}.slick-initialized .slick-slide{display:block}.slick-loading .slick-slide{visibility:hidden}.slick-vertical .slick-slide{display:block;height:auto;border:1px solid transparent}.slick-loading .slick-list{background:#fff url("../img/ajax-loader.gif") center center no-repeat}.slick-prev,.slick-next{position:absolute;display:block;height:20px;width:20px;line-height:0;font-size:0;cursor:pointer;background:transparent;color:transparent;top:50%;margin-top:-10px;padding:0;border:none;outline:none}.slick-prev:hover,.slick-prev:focus,.slick-next:hover,.slick-next:focus{outline:none;background:transparent;color:transparent}.slick-prev:hover:before,.slick-prev:focus:before,.slick-next:hover:before,.slick-next:focus:before{opacity:1}.slick-prev.slick-disabled:before,.slick-next.slick-disabled:before{opacity:.25}.slick-prev:before,.slick-next:before{font-family:"FontAwesome";font-size:20px;line-height:1;color:#ba2619;opacity:.75;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.slick-prev{left:15px}[dir="rtl"] .slick-prev{left:auto;right:15px}.slick-prev:before{content:""}[dir="rtl"] .slick-prev:before{content:""}.slick-next{right:15px}[dir="rtl"] .slick-next{left:15px;right:auto}.slick-next:before{content:""}[dir="rtl"] .slick-next:before{content:""}.slick-slider{margin-bottom:30px}.slick-dots{margin:0;position:absolute;bottom:30px;list-style:none;display:block;text-align:center;padding:0;width:100%}.slick-dots li{position:relative;display:inline-block;height:20px;width:20px;margin:0 5px;padding:0;cursor:pointer}.slick-dots li button{border:0;background:transparent;display:block;height:20px;width:20px;outline:none;line-height:0;font-size:0;color:transparent;padding:5px;cursor:pointer}.slick-dots li button:hover,.slick-dots li button:focus{outline:none}.slick-dots li button:hover:before,.slick-dots li button:focus:before{opacity:1}.slick-dots li button:before{position:absolute;top:0;left:0;content:"";width:20px;height:20px;font-family:"FontAwesome";font-size:12px;line-height:20px;text-align:center;color:#000;opacity:.25;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.slick-dots li.slick-active button:before{color:#ba2619;opacity:.75}/*! +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}meta.foundation-version{font-family:"/5.5.1/"}meta.foundation-mq-small{font-family:"/only screen/";width:0em}meta.foundation-mq-small-only{font-family:"/only screen and (max-width: 40em)/";width:0em}meta.foundation-mq-medium{font-family:"/only screen and (min-width:40.0625em)/";width:40.0625em}meta.foundation-mq-medium-only{font-family:"/only screen and (min-width:40.0625em) and (max-width:64em)/";width:40.0625em}meta.foundation-mq-large{font-family:"/only screen and (min-width:64.0625em)/";width:64.0625em}meta.foundation-mq-large-only{font-family:"/only screen and (min-width:64.0625em) and (max-width:90em)/";width:64.0625em}meta.foundation-mq-xlarge{font-family:"/only screen and (min-width:90.0625em)/";width:90.0625em}meta.foundation-mq-xlarge-only{font-family:"/only screen and (min-width:90.0625em) and (max-width:120em)/";width:90.0625em}meta.foundation-mq-xxlarge{font-family:"/only screen and (min-width:120.0625em)/";width:120.0625em}meta.foundation-data-attribute-namespace{font-family:false}html,body{height:100%}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html,body{font-size:100%}body{background:#fff;color:#222;padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.5;position:relative;cursor:auto}a:hover{cursor:pointer}img{max-width:100%;height:auto}img{-ms-interpolation-mode:bicubic}#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none !important}.left{float:left !important}.right{float:right !important}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.hide{display:none}.invisible{visibility:hidden}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img{display:inline-block;vertical-align:middle}textarea{height:auto;min-height:50px}select{width:100%}[class*="block-grid-"]{display:block;padding:0;margin:0 -0.625rem}[class*="block-grid-"]:before,[class*="block-grid-"]:after{content:" ";display:table}[class*="block-grid-"]:after{clear:both}[class*="block-grid-"]>li{display:block;height:auto;float:left;padding:0 0.625rem 1.25rem}@media only screen{.small-block-grid-1>li{width:100%;list-style:none}.small-block-grid-1>li:nth-of-type(1n){clear:none}.small-block-grid-1>li:nth-of-type(1n+1){clear:both}.small-block-grid-2>li{width:50%;list-style:none}.small-block-grid-2>li:nth-of-type(1n){clear:none}.small-block-grid-2>li:nth-of-type(2n+1){clear:both}.small-block-grid-3>li{width:33.3333333333%;list-style:none}.small-block-grid-3>li:nth-of-type(1n){clear:none}.small-block-grid-3>li:nth-of-type(3n+1){clear:both}.small-block-grid-4>li{width:25%;list-style:none}.small-block-grid-4>li:nth-of-type(1n){clear:none}.small-block-grid-4>li:nth-of-type(4n+1){clear:both}.small-block-grid-5>li{width:20%;list-style:none}.small-block-grid-5>li:nth-of-type(1n){clear:none}.small-block-grid-5>li:nth-of-type(5n+1){clear:both}.small-block-grid-6>li{width:16.6666666667%;list-style:none}.small-block-grid-6>li:nth-of-type(1n){clear:none}.small-block-grid-6>li:nth-of-type(6n+1){clear:both}.small-block-grid-7>li{width:14.2857142857%;list-style:none}.small-block-grid-7>li:nth-of-type(1n){clear:none}.small-block-grid-7>li:nth-of-type(7n+1){clear:both}.small-block-grid-8>li{width:12.5%;list-style:none}.small-block-grid-8>li:nth-of-type(1n){clear:none}.small-block-grid-8>li:nth-of-type(8n+1){clear:both}.small-block-grid-9>li{width:11.1111111111%;list-style:none}.small-block-grid-9>li:nth-of-type(1n){clear:none}.small-block-grid-9>li:nth-of-type(9n+1){clear:both}.small-block-grid-10>li{width:10%;list-style:none}.small-block-grid-10>li:nth-of-type(1n){clear:none}.small-block-grid-10>li:nth-of-type(10n+1){clear:both}.small-block-grid-11>li{width:9.0909090909%;list-style:none}.small-block-grid-11>li:nth-of-type(1n){clear:none}.small-block-grid-11>li:nth-of-type(11n+1){clear:both}.small-block-grid-12>li{width:8.3333333333%;list-style:none}.small-block-grid-12>li:nth-of-type(1n){clear:none}.small-block-grid-12>li:nth-of-type(12n+1){clear:both}}@media only screen and (min-width: 40.0625em){.medium-block-grid-1>li{width:100%;list-style:none}.medium-block-grid-1>li:nth-of-type(1n){clear:none}.medium-block-grid-1>li:nth-of-type(1n+1){clear:both}.medium-block-grid-2>li{width:50%;list-style:none}.medium-block-grid-2>li:nth-of-type(1n){clear:none}.medium-block-grid-2>li:nth-of-type(2n+1){clear:both}.medium-block-grid-3>li{width:33.3333333333%;list-style:none}.medium-block-grid-3>li:nth-of-type(1n){clear:none}.medium-block-grid-3>li:nth-of-type(3n+1){clear:both}.medium-block-grid-4>li{width:25%;list-style:none}.medium-block-grid-4>li:nth-of-type(1n){clear:none}.medium-block-grid-4>li:nth-of-type(4n+1){clear:both}.medium-block-grid-5>li{width:20%;list-style:none}.medium-block-grid-5>li:nth-of-type(1n){clear:none}.medium-block-grid-5>li:nth-of-type(5n+1){clear:both}.medium-block-grid-6>li{width:16.6666666667%;list-style:none}.medium-block-grid-6>li:nth-of-type(1n){clear:none}.medium-block-grid-6>li:nth-of-type(6n+1){clear:both}.medium-block-grid-7>li{width:14.2857142857%;list-style:none}.medium-block-grid-7>li:nth-of-type(1n){clear:none}.medium-block-grid-7>li:nth-of-type(7n+1){clear:both}.medium-block-grid-8>li{width:12.5%;list-style:none}.medium-block-grid-8>li:nth-of-type(1n){clear:none}.medium-block-grid-8>li:nth-of-type(8n+1){clear:both}.medium-block-grid-9>li{width:11.1111111111%;list-style:none}.medium-block-grid-9>li:nth-of-type(1n){clear:none}.medium-block-grid-9>li:nth-of-type(9n+1){clear:both}.medium-block-grid-10>li{width:10%;list-style:none}.medium-block-grid-10>li:nth-of-type(1n){clear:none}.medium-block-grid-10>li:nth-of-type(10n+1){clear:both}.medium-block-grid-11>li{width:9.0909090909%;list-style:none}.medium-block-grid-11>li:nth-of-type(1n){clear:none}.medium-block-grid-11>li:nth-of-type(11n+1){clear:both}.medium-block-grid-12>li{width:8.3333333333%;list-style:none}.medium-block-grid-12>li:nth-of-type(1n){clear:none}.medium-block-grid-12>li:nth-of-type(12n+1){clear:both}}@media only screen and (min-width: 64.0625em){.large-block-grid-1>li{width:100%;list-style:none}.large-block-grid-1>li:nth-of-type(1n){clear:none}.large-block-grid-1>li:nth-of-type(1n+1){clear:both}.large-block-grid-2>li{width:50%;list-style:none}.large-block-grid-2>li:nth-of-type(1n){clear:none}.large-block-grid-2>li:nth-of-type(2n+1){clear:both}.large-block-grid-3>li{width:33.3333333333%;list-style:none}.large-block-grid-3>li:nth-of-type(1n){clear:none}.large-block-grid-3>li:nth-of-type(3n+1){clear:both}.large-block-grid-4>li{width:25%;list-style:none}.large-block-grid-4>li:nth-of-type(1n){clear:none}.large-block-grid-4>li:nth-of-type(4n+1){clear:both}.large-block-grid-5>li{width:20%;list-style:none}.large-block-grid-5>li:nth-of-type(1n){clear:none}.large-block-grid-5>li:nth-of-type(5n+1){clear:both}.large-block-grid-6>li{width:16.6666666667%;list-style:none}.large-block-grid-6>li:nth-of-type(1n){clear:none}.large-block-grid-6>li:nth-of-type(6n+1){clear:both}.large-block-grid-7>li{width:14.2857142857%;list-style:none}.large-block-grid-7>li:nth-of-type(1n){clear:none}.large-block-grid-7>li:nth-of-type(7n+1){clear:both}.large-block-grid-8>li{width:12.5%;list-style:none}.large-block-grid-8>li:nth-of-type(1n){clear:none}.large-block-grid-8>li:nth-of-type(8n+1){clear:both}.large-block-grid-9>li{width:11.1111111111%;list-style:none}.large-block-grid-9>li:nth-of-type(1n){clear:none}.large-block-grid-9>li:nth-of-type(9n+1){clear:both}.large-block-grid-10>li{width:10%;list-style:none}.large-block-grid-10>li:nth-of-type(1n){clear:none}.large-block-grid-10>li:nth-of-type(10n+1){clear:both}.large-block-grid-11>li{width:9.0909090909%;list-style:none}.large-block-grid-11>li:nth-of-type(1n){clear:none}.large-block-grid-11>li:nth-of-type(11n+1){clear:both}.large-block-grid-12>li{width:8.3333333333%;list-style:none}.large-block-grid-12>li:nth-of-type(1n){clear:none}.large-block-grid-12>li:nth-of-type(12n+1){clear:both}}button,.button{border-style:solid;border-width:0;cursor:pointer;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-weight:400;line-height:normal;margin:0 0 1.25rem;position:relative;text-decoration:none;text-align:center;-webkit-appearance:none;-moz-appearance:none;border-radius:0;display:inline-block;padding-top:1rem;padding-right:2rem;padding-bottom:1.0625rem;padding-left:2rem;font-size:1rem;background-color:#ba2619;border-color:#951e14;color:#fff;transition:background-color 300ms ease-out}button:hover,button:focus,.button:hover,.button:focus{background-color:#951e14}button:hover,button:focus,.button:hover,.button:focus{color:#fff}button.secondary,.button.secondary{background-color:#e7e7e7;border-color:#b9b9b9;color:#333}button.secondary:hover,button.secondary:focus,.button.secondary:hover,.button.secondary:focus{background-color:#b9b9b9}button.secondary:hover,button.secondary:focus,.button.secondary:hover,.button.secondary:focus{color:#333}button.success,.button.success{background-color:#43AC6A;border-color:#368a55;color:#fff}button.success:hover,button.success:focus,.button.success:hover,.button.success:focus{background-color:#368a55}button.success:hover,button.success:focus,.button.success:hover,.button.success:focus{color:#fff}button.alert,.button.alert{background-color:#f04124;border-color:#cf2a0e;color:#fff}button.alert:hover,button.alert:focus,.button.alert:hover,.button.alert:focus{background-color:#cf2a0e}button.alert:hover,button.alert:focus,.button.alert:hover,.button.alert:focus{color:#fff}button.warning,.button.warning{background-color:#f08a24;border-color:#cf6e0e;color:#fff}button.warning:hover,button.warning:focus,.button.warning:hover,.button.warning:focus{background-color:#cf6e0e}button.warning:hover,button.warning:focus,.button.warning:hover,.button.warning:focus{color:#fff}button.info,.button.info{background-color:#a0d3e8;border-color:#61b6d9;color:#333}button.info:hover,button.info:focus,.button.info:hover,.button.info:focus{background-color:#61b6d9}button.info:hover,button.info:focus,.button.info:hover,.button.info:focus{color:#fff}button.large,.button.large{padding-top:1.125rem;padding-right:2.25rem;padding-bottom:1.1875rem;padding-left:2.25rem;font-size:1.25rem}button.small,.button.small{padding-top:0.875rem;padding-right:1.75rem;padding-bottom:0.9375rem;padding-left:1.75rem;font-size:0.8125rem}button.tiny,.button.tiny{padding-top:0.625rem;padding-right:1.25rem;padding-bottom:0.6875rem;padding-left:1.25rem;font-size:0.6875rem}button.expand,.button.expand{padding-right:0;padding-left:0;width:100%}button.left-align,.button.left-align{text-align:left;text-indent:0.75rem}button.right-align,.button.right-align{text-align:right;padding-right:0.75rem}button.radius,.button.radius{border-radius:3px}button.round,.button.round{border-radius:1000px}button.disabled,button[disabled],.button.disabled,.button[disabled]{background-color:#ba2619;border-color:#951e14;color:#fff;cursor:default;opacity:0.7;box-shadow:none}button.disabled:hover,button.disabled:focus,button[disabled]:hover,button[disabled]:focus,.button.disabled:hover,.button.disabled:focus,.button[disabled]:hover,.button[disabled]:focus{background-color:#951e14}button.disabled:hover,button.disabled:focus,button[disabled]:hover,button[disabled]:focus,.button.disabled:hover,.button.disabled:focus,.button[disabled]:hover,.button[disabled]:focus{color:#fff}button.disabled:hover,button.disabled:focus,button[disabled]:hover,button[disabled]:focus,.button.disabled:hover,.button.disabled:focus,.button[disabled]:hover,.button[disabled]:focus{background-color:#ba2619}button.disabled.secondary,button[disabled].secondary,.button.disabled.secondary,.button[disabled].secondary{background-color:#e7e7e7;border-color:#b9b9b9;color:#333;cursor:default;opacity:0.7;box-shadow:none}button.disabled.secondary:hover,button.disabled.secondary:focus,button[disabled].secondary:hover,button[disabled].secondary:focus,.button.disabled.secondary:hover,.button.disabled.secondary:focus,.button[disabled].secondary:hover,.button[disabled].secondary:focus{background-color:#b9b9b9}button.disabled.secondary:hover,button.disabled.secondary:focus,button[disabled].secondary:hover,button[disabled].secondary:focus,.button.disabled.secondary:hover,.button.disabled.secondary:focus,.button[disabled].secondary:hover,.button[disabled].secondary:focus{color:#333}button.disabled.secondary:hover,button.disabled.secondary:focus,button[disabled].secondary:hover,button[disabled].secondary:focus,.button.disabled.secondary:hover,.button.disabled.secondary:focus,.button[disabled].secondary:hover,.button[disabled].secondary:focus{background-color:#e7e7e7}button.disabled.success,button[disabled].success,.button.disabled.success,.button[disabled].success{background-color:#43AC6A;border-color:#368a55;color:#fff;cursor:default;opacity:0.7;box-shadow:none}button.disabled.success:hover,button.disabled.success:focus,button[disabled].success:hover,button[disabled].success:focus,.button.disabled.success:hover,.button.disabled.success:focus,.button[disabled].success:hover,.button[disabled].success:focus{background-color:#368a55}button.disabled.success:hover,button.disabled.success:focus,button[disabled].success:hover,button[disabled].success:focus,.button.disabled.success:hover,.button.disabled.success:focus,.button[disabled].success:hover,.button[disabled].success:focus{color:#fff}button.disabled.success:hover,button.disabled.success:focus,button[disabled].success:hover,button[disabled].success:focus,.button.disabled.success:hover,.button.disabled.success:focus,.button[disabled].success:hover,.button[disabled].success:focus{background-color:#43AC6A}button.disabled.alert,button[disabled].alert,.button.disabled.alert,.button[disabled].alert{background-color:#f04124;border-color:#cf2a0e;color:#fff;cursor:default;opacity:0.7;box-shadow:none}button.disabled.alert:hover,button.disabled.alert:focus,button[disabled].alert:hover,button[disabled].alert:focus,.button.disabled.alert:hover,.button.disabled.alert:focus,.button[disabled].alert:hover,.button[disabled].alert:focus{background-color:#cf2a0e}button.disabled.alert:hover,button.disabled.alert:focus,button[disabled].alert:hover,button[disabled].alert:focus,.button.disabled.alert:hover,.button.disabled.alert:focus,.button[disabled].alert:hover,.button[disabled].alert:focus{color:#fff}button.disabled.alert:hover,button.disabled.alert:focus,button[disabled].alert:hover,button[disabled].alert:focus,.button.disabled.alert:hover,.button.disabled.alert:focus,.button[disabled].alert:hover,.button[disabled].alert:focus{background-color:#f04124}button.disabled.warning,button[disabled].warning,.button.disabled.warning,.button[disabled].warning{background-color:#f08a24;border-color:#cf6e0e;color:#fff;cursor:default;opacity:0.7;box-shadow:none}button.disabled.warning:hover,button.disabled.warning:focus,button[disabled].warning:hover,button[disabled].warning:focus,.button.disabled.warning:hover,.button.disabled.warning:focus,.button[disabled].warning:hover,.button[disabled].warning:focus{background-color:#cf6e0e}button.disabled.warning:hover,button.disabled.warning:focus,button[disabled].warning:hover,button[disabled].warning:focus,.button.disabled.warning:hover,.button.disabled.warning:focus,.button[disabled].warning:hover,.button[disabled].warning:focus{color:#fff}button.disabled.warning:hover,button.disabled.warning:focus,button[disabled].warning:hover,button[disabled].warning:focus,.button.disabled.warning:hover,.button.disabled.warning:focus,.button[disabled].warning:hover,.button[disabled].warning:focus{background-color:#f08a24}button.disabled.info,button[disabled].info,.button.disabled.info,.button[disabled].info{background-color:#a0d3e8;border-color:#61b6d9;color:#333;cursor:default;opacity:0.7;box-shadow:none}button.disabled.info:hover,button.disabled.info:focus,button[disabled].info:hover,button[disabled].info:focus,.button.disabled.info:hover,.button.disabled.info:focus,.button[disabled].info:hover,.button[disabled].info:focus{background-color:#61b6d9}button.disabled.info:hover,button.disabled.info:focus,button[disabled].info:hover,button[disabled].info:focus,.button.disabled.info:hover,.button.disabled.info:focus,.button[disabled].info:hover,.button[disabled].info:focus{color:#fff}button.disabled.info:hover,button.disabled.info:focus,button[disabled].info:hover,button[disabled].info:focus,.button.disabled.info:hover,.button.disabled.info:focus,.button[disabled].info:hover,.button[disabled].info:focus{background-color:#a0d3e8}button::-moz-focus-inner{border:0;padding:0}@media only screen and (min-width: 40.0625em){button,.button{display:inline-block}}.clearing-thumbs,[data-clearing]{margin-bottom:0;margin-left:0;list-style:none}.clearing-thumbs:before,.clearing-thumbs:after,[data-clearing]:before,[data-clearing]:after{content:" ";display:table}.clearing-thumbs:after,[data-clearing]:after{clear:both}.clearing-thumbs li,[data-clearing] li{float:left;margin-right:10px}.clearing-thumbs[class*="block-grid-"] li,[data-clearing][class*="block-grid-"] li{margin-right:0}.clearing-blackout{background:#333;position:fixed;width:100%;height:100%;top:0;left:0;z-index:998}.clearing-blackout .clearing-close{display:block}.clearing-container{position:relative;z-index:998;height:100%;overflow:hidden;margin:0}.clearing-touch-label{position:absolute;top:50%;left:50%;color:#aaa;font-size:0.6em}.visible-img{height:95%;position:relative}.visible-img img{position:absolute;left:50%;top:50%;transform:translateY(-50%) translateX(-50%);-webkit-transform:translateY(-50%) translateX(-50%);-ms-transform:translateY(-50%) translateX(-50%);max-height:100%;max-width:100%}.clearing-caption{color:#ccc;font-size:0.875em;line-height:1.3;margin-bottom:0;text-align:center;bottom:0;background:#333;width:100%;padding:10px 30px 20px;position:absolute;left:0}.clearing-close{z-index:999;padding-left:20px;padding-top:10px;font-size:30px;line-height:1;color:#ccc;display:none}.clearing-close:hover,.clearing-close:focus{color:#ccc}.clearing-assembled .clearing-container{height:100%}.clearing-assembled .clearing-container .carousel>ul{display:none}.clearing-feature li{display:none}.clearing-feature li.clearing-featured-img{display:block}@media only screen and (min-width: 40.0625em){.clearing-main-prev,.clearing-main-next{position:absolute;height:100%;width:40px;top:0}.clearing-main-prev>span,.clearing-main-next>span{position:absolute;top:50%;display:block;width:0;height:0;border:solid 12px}.clearing-main-prev>span:hover,.clearing-main-next>span:hover{opacity:0.8}.clearing-main-prev{left:0}.clearing-main-prev>span{left:5px;border-color:transparent;border-right-color:#ccc}.clearing-main-next{right:0}.clearing-main-next>span{border-color:transparent;border-left-color:#ccc}.clearing-main-prev.disabled,.clearing-main-next.disabled{opacity:0.3}.clearing-assembled .clearing-container .carousel{background:rgba(51,51,51,0.8);height:120px;margin-top:10px;text-align:center}.clearing-assembled .clearing-container .carousel>ul{display:inline-block;z-index:999;height:100%;position:relative;float:none}.clearing-assembled .clearing-container .carousel>ul li{display:block;width:120px;min-height:inherit;float:left;overflow:hidden;margin-right:0;padding:0;position:relative;cursor:pointer;opacity:0.4;clear:none}.clearing-assembled .clearing-container .carousel>ul li.fix-height img{height:100%;max-width:none}.clearing-assembled .clearing-container .carousel>ul li a.th{border:none;box-shadow:none;display:block}.clearing-assembled .clearing-container .carousel>ul li img{cursor:pointer !important;width:100% !important}.clearing-assembled .clearing-container .carousel>ul li.visible{opacity:1}.clearing-assembled .clearing-container .carousel>ul li:hover{opacity:0.8}.clearing-assembled .clearing-container .visible-img{background:#333;overflow:hidden;height:85%}.clearing-close{position:absolute;top:10px;right:20px;padding-left:0;padding-top:0}}form{margin:0 0 1rem}form .row .row{margin:0 -0.5rem}form .row .row .column,form .row .row .columns{padding:0 0.5rem}form .row .row.collapse{margin:0}form .row .row.collapse .column,form .row .row.collapse .columns{padding:0}form .row .row.collapse input{-webkit-border-bottom-right-radius:0;-webkit-border-top-right-radius:0;border-bottom-right-radius:0;border-top-right-radius:0}form .row input.column,form .row input.columns,form .row textarea.column,form .row textarea.columns{padding-left:0.5rem}label{font-size:0.875rem;color:#4d4d4d;cursor:pointer;display:block;font-weight:400;line-height:1.5;margin-bottom:0}label.right{float:none !important;text-align:right}label.inline{margin:0 0 1rem 0;padding:0.5625rem 0}label small{text-transform:capitalize;color:#676767}.prefix,.postfix{display:block;position:relative;z-index:2;text-align:center;width:100%;padding-top:0;padding-bottom:0;border-style:solid;border-width:1px;overflow:visible;font-size:0.875rem;height:2.3125rem;line-height:2.3125rem}.postfix.button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;text-align:center;border:none}.prefix.button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;text-align:center;border:none}.prefix.button.radius{border-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}.postfix.button.radius{border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-right-radius:3px}.prefix.button.round{border-radius:0;-webkit-border-bottom-left-radius:1000px;-webkit-border-top-left-radius:1000px;border-bottom-left-radius:1000px;border-top-left-radius:1000px}.postfix.button.round{border-radius:0;-webkit-border-bottom-right-radius:1000px;-webkit-border-top-right-radius:1000px;border-bottom-right-radius:1000px;border-top-right-radius:1000px}span.prefix,label.prefix{background:#f2f2f2;border-right:none;color:#333;border-color:#ccc}span.postfix,label.postfix{background:#f2f2f2;border-left:none;color:#333;border-color:#ccc}input[type="text"],input[type="password"],input[type="date"],input[type="datetime"],input[type="datetime-local"],input[type="month"],input[type="week"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="time"],input[type="url"],input[type="color"],textarea{-webkit-appearance:none;border-radius:0;background-color:#fff;font-family:inherit;border-style:solid;border-width:1px;border-color:#ccc;box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);color:rgba(0,0,0,0.75);display:block;font-size:0.875rem;margin:0 0 1rem 0;padding:0.5rem;height:2.3125rem;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;transition:all 0.15s linear}input[type="text"]:focus,input[type="password"]:focus,input[type="date"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="month"]:focus,input[type="week"]:focus,input[type="email"]:focus,input[type="number"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="time"]:focus,input[type="url"]:focus,input[type="color"]:focus,textarea:focus{background:#fafafa;border-color:#999;outline:none}input[type="text"]:disabled,input[type="password"]:disabled,input[type="date"]:disabled,input[type="datetime"]:disabled,input[type="datetime-local"]:disabled,input[type="month"]:disabled,input[type="week"]:disabled,input[type="email"]:disabled,input[type="number"]:disabled,input[type="search"]:disabled,input[type="tel"]:disabled,input[type="time"]:disabled,input[type="url"]:disabled,input[type="color"]:disabled,textarea:disabled{background-color:#ddd;cursor:default}input[type="text"][disabled],input[type="text"][readonly],fieldset[disabled] input[type="text"],input[type="password"][disabled],input[type="password"][readonly],fieldset[disabled] input[type="password"],input[type="date"][disabled],input[type="date"][readonly],fieldset[disabled] input[type="date"],input[type="datetime"][disabled],input[type="datetime"][readonly],fieldset[disabled] input[type="datetime"],input[type="datetime-local"][disabled],input[type="datetime-local"][readonly],fieldset[disabled] input[type="datetime-local"],input[type="month"][disabled],input[type="month"][readonly],fieldset[disabled] input[type="month"],input[type="week"][disabled],input[type="week"][readonly],fieldset[disabled] input[type="week"],input[type="email"][disabled],input[type="email"][readonly],fieldset[disabled] input[type="email"],input[type="number"][disabled],input[type="number"][readonly],fieldset[disabled] input[type="number"],input[type="search"][disabled],input[type="search"][readonly],fieldset[disabled] input[type="search"],input[type="tel"][disabled],input[type="tel"][readonly],fieldset[disabled] input[type="tel"],input[type="time"][disabled],input[type="time"][readonly],fieldset[disabled] input[type="time"],input[type="url"][disabled],input[type="url"][readonly],fieldset[disabled] input[type="url"],input[type="color"][disabled],input[type="color"][readonly],fieldset[disabled] input[type="color"],textarea[disabled],textarea[readonly],fieldset[disabled] textarea{background-color:#ddd;cursor:default}input[type="text"].radius,input[type="password"].radius,input[type="date"].radius,input[type="datetime"].radius,input[type="datetime-local"].radius,input[type="month"].radius,input[type="week"].radius,input[type="email"].radius,input[type="number"].radius,input[type="search"].radius,input[type="tel"].radius,input[type="time"].radius,input[type="url"].radius,input[type="color"].radius,textarea.radius{border-radius:3px}form .row .prefix-radius.row.collapse input,form .row .prefix-radius.row.collapse textarea,form .row .prefix-radius.row.collapse select,form .row .prefix-radius.row.collapse button{border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-right-radius:3px}form .row .prefix-radius.row.collapse .prefix{border-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}form .row .postfix-radius.row.collapse input,form .row .postfix-radius.row.collapse textarea,form .row .postfix-radius.row.collapse select,form .row .postfix-radius.row.collapse button{border-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}form .row .postfix-radius.row.collapse .postfix{border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-right-radius:3px}form .row .prefix-round.row.collapse input,form .row .prefix-round.row.collapse textarea,form .row .prefix-round.row.collapse select,form .row .prefix-round.row.collapse button{border-radius:0;-webkit-border-bottom-right-radius:1000px;-webkit-border-top-right-radius:1000px;border-bottom-right-radius:1000px;border-top-right-radius:1000px}form .row .prefix-round.row.collapse .prefix{border-radius:0;-webkit-border-bottom-left-radius:1000px;-webkit-border-top-left-radius:1000px;border-bottom-left-radius:1000px;border-top-left-radius:1000px}form .row .postfix-round.row.collapse input,form .row .postfix-round.row.collapse textarea,form .row .postfix-round.row.collapse select,form .row .postfix-round.row.collapse button{border-radius:0;-webkit-border-bottom-left-radius:1000px;-webkit-border-top-left-radius:1000px;border-bottom-left-radius:1000px;border-top-left-radius:1000px}form .row .postfix-round.row.collapse .postfix{border-radius:0;-webkit-border-bottom-right-radius:1000px;-webkit-border-top-right-radius:1000px;border-bottom-right-radius:1000px;border-top-right-radius:1000px}input[type="submit"]{-webkit-appearance:none;border-radius:0}textarea[rows]{height:auto}textarea{max-width:100%}select{-webkit-appearance:none !important;border-radius:0;background-color:#FAFAFA;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMTJweCIgeT0iMHB4IiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzcHgiIHZpZXdCb3g9IjAgMCA2IDMiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDYgMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBvbHlnb24gcG9pbnRzPSI1Ljk5MiwwIDIuOTkyLDMgLTAuMDA4LDAgIi8+PC9zdmc+);background-position:100% center;background-repeat:no-repeat;border-style:solid;border-width:1px;border-color:#ccc;padding:0.5rem;font-size:0.875rem;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;color:rgba(0,0,0,0.75);line-height:normal;border-radius:0;height:2.3125rem}select::-ms-expand{display:none}select.radius{border-radius:3px}select:hover{background-color:#f3f3f3;border-color:#999}select:disabled{background-color:#ddd;cursor:default}select[multiple]{height:auto}input[type="file"],input[type="checkbox"],input[type="radio"],select{margin:0 0 1rem 0}input[type="checkbox"]+label,input[type="radio"]+label{display:inline-block;margin-left:0.5rem;margin-right:1rem;margin-bottom:0;vertical-align:baseline}input[type="file"]{width:100%}fieldset{border:1px solid #ddd;padding:1.25rem;margin:1.125rem 0}fieldset legend{font-weight:700;background:#fff;padding:0 0.1875rem;margin:0;margin-left:-0.1875rem}[data-abide] .error small.error,[data-abide] .error span.error,[data-abide] span.error,[data-abide] small.error{display:block;padding:0.375rem 0.5625rem 0.5625rem;margin-top:-1px;margin-bottom:1rem;font-size:0.75rem;font-weight:400;font-style:italic;background:#f04124;color:#fff}[data-abide] span.error,[data-abide] small.error{display:none}span.error,small.error{display:block;padding:0.375rem 0.5625rem 0.5625rem;margin-top:-1px;margin-bottom:1rem;font-size:0.75rem;font-weight:400;font-style:italic;background:#f04124;color:#fff}.error input,.error textarea,.error select{margin-bottom:0}.error input[type="checkbox"],.error input[type="radio"]{margin-bottom:1rem}.error label,.error label.error{color:#f04124}.error small.error{display:block;padding:0.375rem 0.5625rem 0.5625rem;margin-top:-1px;margin-bottom:1rem;font-size:0.75rem;font-weight:400;font-style:italic;background:#f04124;color:#fff}.error>label>small{color:#676767;background:transparent;padding:0;text-transform:capitalize;font-style:normal;font-size:60%;margin:0;display:inline}.error span.error-message{display:block}input.error,textarea.error,select.error{margin-bottom:0}label.error{color:#f04124}.row{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5rem}.row:before,.row:after{content:" ";display:table}.row:after{clear:both}.row.collapse>.column,.row.collapse>.columns{padding-left:0;padding-right:0}.row.collapse .row{margin-left:0;margin-right:0}.row .row{width:auto;margin-left:-0.9375rem;margin-right:-0.9375rem;margin-top:0;margin-bottom:0;max-width:none}.row .row:before,.row .row:after{content:" ";display:table}.row .row:after{clear:both}.row .row.collapse{width:auto;margin:0;max-width:none}.row .row.collapse:before,.row .row.collapse:after{content:" ";display:table}.row .row.collapse:after{clear:both}.column,.columns{padding-left:0.9375rem;padding-right:0.9375rem;width:100%;float:left}[class*="column"]+[class*="column"]:last-child{float:right}[class*="column"]+[class*="column"].end{float:left}@media only screen{.small-push-0{position:relative;left:0%;right:auto}.small-pull-0{position:relative;right:0%;left:auto}.small-push-1{position:relative;left:8.3333333333%;right:auto}.small-pull-1{position:relative;right:8.3333333333%;left:auto}.small-push-2{position:relative;left:16.6666666667%;right:auto}.small-pull-2{position:relative;right:16.6666666667%;left:auto}.small-push-3{position:relative;left:25%;right:auto}.small-pull-3{position:relative;right:25%;left:auto}.small-push-4{position:relative;left:33.3333333333%;right:auto}.small-pull-4{position:relative;right:33.3333333333%;left:auto}.small-push-5{position:relative;left:41.6666666667%;right:auto}.small-pull-5{position:relative;right:41.6666666667%;left:auto}.small-push-6{position:relative;left:50%;right:auto}.small-pull-6{position:relative;right:50%;left:auto}.small-push-7{position:relative;left:58.3333333333%;right:auto}.small-pull-7{position:relative;right:58.3333333333%;left:auto}.small-push-8{position:relative;left:66.6666666667%;right:auto}.small-pull-8{position:relative;right:66.6666666667%;left:auto}.small-push-9{position:relative;left:75%;right:auto}.small-pull-9{position:relative;right:75%;left:auto}.small-push-10{position:relative;left:83.3333333333%;right:auto}.small-pull-10{position:relative;right:83.3333333333%;left:auto}.small-push-11{position:relative;left:91.6666666667%;right:auto}.small-pull-11{position:relative;right:91.6666666667%;left:auto}.column,.columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.small-1{width:8.3333333333%}.small-2{width:16.6666666667%}.small-3{width:25%}.small-4{width:33.3333333333%}.small-5{width:41.6666666667%}.small-6{width:50%}.small-7{width:58.3333333333%}.small-8{width:66.6666666667%}.small-9{width:75%}.small-10{width:83.3333333333%}.small-11{width:91.6666666667%}.small-12{width:100%}.small-offset-0{margin-left:0% !important}.small-offset-1{margin-left:8.3333333333% !important}.small-offset-2{margin-left:16.6666666667% !important}.small-offset-3{margin-left:25% !important}.small-offset-4{margin-left:33.3333333333% !important}.small-offset-5{margin-left:41.6666666667% !important}.small-offset-6{margin-left:50% !important}.small-offset-7{margin-left:58.3333333333% !important}.small-offset-8{margin-left:66.6666666667% !important}.small-offset-9{margin-left:75% !important}.small-offset-10{margin-left:83.3333333333% !important}.small-offset-11{margin-left:91.6666666667% !important}.small-reset-order{margin-left:0;margin-right:0;left:auto;right:auto;float:left}.column.small-centered,.columns.small-centered{margin-left:auto;margin-right:auto;float:none}.column.small-uncentered,.columns.small-uncentered{margin-left:0;margin-right:0;float:left}.column.small-centered:last-child,.columns.small-centered:last-child{float:none}.column.small-uncentered:last-child,.columns.small-uncentered:last-child{float:left}.column.small-uncentered.opposite,.columns.small-uncentered.opposite{float:right}.row.small-collapse>.column,.row.small-collapse>.columns{padding-left:0;padding-right:0}.row.small-collapse .row{margin-left:0;margin-right:0}.row.small-uncollapse>.column,.row.small-uncollapse>.columns{padding-left:0.9375rem;padding-right:0.9375rem;float:left}}@media only screen and (min-width: 40.0625em){.medium-push-0{position:relative;left:0%;right:auto}.medium-pull-0{position:relative;right:0%;left:auto}.medium-push-1{position:relative;left:8.3333333333%;right:auto}.medium-pull-1{position:relative;right:8.3333333333%;left:auto}.medium-push-2{position:relative;left:16.6666666667%;right:auto}.medium-pull-2{position:relative;right:16.6666666667%;left:auto}.medium-push-3{position:relative;left:25%;right:auto}.medium-pull-3{position:relative;right:25%;left:auto}.medium-push-4{position:relative;left:33.3333333333%;right:auto}.medium-pull-4{position:relative;right:33.3333333333%;left:auto}.medium-push-5{position:relative;left:41.6666666667%;right:auto}.medium-pull-5{position:relative;right:41.6666666667%;left:auto}.medium-push-6{position:relative;left:50%;right:auto}.medium-pull-6{position:relative;right:50%;left:auto}.medium-push-7{position:relative;left:58.3333333333%;right:auto}.medium-pull-7{position:relative;right:58.3333333333%;left:auto}.medium-push-8{position:relative;left:66.6666666667%;right:auto}.medium-pull-8{position:relative;right:66.6666666667%;left:auto}.medium-push-9{position:relative;left:75%;right:auto}.medium-pull-9{position:relative;right:75%;left:auto}.medium-push-10{position:relative;left:83.3333333333%;right:auto}.medium-pull-10{position:relative;right:83.3333333333%;left:auto}.medium-push-11{position:relative;left:91.6666666667%;right:auto}.medium-pull-11{position:relative;right:91.6666666667%;left:auto}.column,.columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.medium-1{width:8.3333333333%}.medium-2{width:16.6666666667%}.medium-3{width:25%}.medium-4{width:33.3333333333%}.medium-5{width:41.6666666667%}.medium-6{width:50%}.medium-7{width:58.3333333333%}.medium-8{width:66.6666666667%}.medium-9{width:75%}.medium-10{width:83.3333333333%}.medium-11{width:91.6666666667%}.medium-12{width:100%}.medium-offset-0{margin-left:0% !important}.medium-offset-1{margin-left:8.3333333333% !important}.medium-offset-2{margin-left:16.6666666667% !important}.medium-offset-3{margin-left:25% !important}.medium-offset-4{margin-left:33.3333333333% !important}.medium-offset-5{margin-left:41.6666666667% !important}.medium-offset-6{margin-left:50% !important}.medium-offset-7{margin-left:58.3333333333% !important}.medium-offset-8{margin-left:66.6666666667% !important}.medium-offset-9{margin-left:75% !important}.medium-offset-10{margin-left:83.3333333333% !important}.medium-offset-11{margin-left:91.6666666667% !important}.medium-reset-order{margin-left:0;margin-right:0;left:auto;right:auto;float:left}.column.medium-centered,.columns.medium-centered{margin-left:auto;margin-right:auto;float:none}.column.medium-uncentered,.columns.medium-uncentered{margin-left:0;margin-right:0;float:left}.column.medium-centered:last-child,.columns.medium-centered:last-child{float:none}.column.medium-uncentered:last-child,.columns.medium-uncentered:last-child{float:left}.column.medium-uncentered.opposite,.columns.medium-uncentered.opposite{float:right}.row.medium-collapse>.column,.row.medium-collapse>.columns{padding-left:0;padding-right:0}.row.medium-collapse .row{margin-left:0;margin-right:0}.row.medium-uncollapse>.column,.row.medium-uncollapse>.columns{padding-left:0.9375rem;padding-right:0.9375rem;float:left}.push-0{position:relative;left:0%;right:auto}.pull-0{position:relative;right:0%;left:auto}.push-1{position:relative;left:8.3333333333%;right:auto}.pull-1{position:relative;right:8.3333333333%;left:auto}.push-2{position:relative;left:16.6666666667%;right:auto}.pull-2{position:relative;right:16.6666666667%;left:auto}.push-3{position:relative;left:25%;right:auto}.pull-3{position:relative;right:25%;left:auto}.push-4{position:relative;left:33.3333333333%;right:auto}.pull-4{position:relative;right:33.3333333333%;left:auto}.push-5{position:relative;left:41.6666666667%;right:auto}.pull-5{position:relative;right:41.6666666667%;left:auto}.push-6{position:relative;left:50%;right:auto}.pull-6{position:relative;right:50%;left:auto}.push-7{position:relative;left:58.3333333333%;right:auto}.pull-7{position:relative;right:58.3333333333%;left:auto}.push-8{position:relative;left:66.6666666667%;right:auto}.pull-8{position:relative;right:66.6666666667%;left:auto}.push-9{position:relative;left:75%;right:auto}.pull-9{position:relative;right:75%;left:auto}.push-10{position:relative;left:83.3333333333%;right:auto}.pull-10{position:relative;right:83.3333333333%;left:auto}.push-11{position:relative;left:91.6666666667%;right:auto}.pull-11{position:relative;right:91.6666666667%;left:auto}}@media only screen and (min-width: 64.0625em){.large-push-0{position:relative;left:0%;right:auto}.large-pull-0{position:relative;right:0%;left:auto}.large-push-1{position:relative;left:8.3333333333%;right:auto}.large-pull-1{position:relative;right:8.3333333333%;left:auto}.large-push-2{position:relative;left:16.6666666667%;right:auto}.large-pull-2{position:relative;right:16.6666666667%;left:auto}.large-push-3{position:relative;left:25%;right:auto}.large-pull-3{position:relative;right:25%;left:auto}.large-push-4{position:relative;left:33.3333333333%;right:auto}.large-pull-4{position:relative;right:33.3333333333%;left:auto}.large-push-5{position:relative;left:41.6666666667%;right:auto}.large-pull-5{position:relative;right:41.6666666667%;left:auto}.large-push-6{position:relative;left:50%;right:auto}.large-pull-6{position:relative;right:50%;left:auto}.large-push-7{position:relative;left:58.3333333333%;right:auto}.large-pull-7{position:relative;right:58.3333333333%;left:auto}.large-push-8{position:relative;left:66.6666666667%;right:auto}.large-pull-8{position:relative;right:66.6666666667%;left:auto}.large-push-9{position:relative;left:75%;right:auto}.large-pull-9{position:relative;right:75%;left:auto}.large-push-10{position:relative;left:83.3333333333%;right:auto}.large-pull-10{position:relative;right:83.3333333333%;left:auto}.large-push-11{position:relative;left:91.6666666667%;right:auto}.large-pull-11{position:relative;right:91.6666666667%;left:auto}.column,.columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.large-1{width:8.3333333333%}.large-2{width:16.6666666667%}.large-3{width:25%}.large-4{width:33.3333333333%}.large-5{width:41.6666666667%}.large-6{width:50%}.large-7{width:58.3333333333%}.large-8{width:66.6666666667%}.large-9{width:75%}.large-10{width:83.3333333333%}.large-11{width:91.6666666667%}.large-12{width:100%}.large-offset-0{margin-left:0% !important}.large-offset-1{margin-left:8.3333333333% !important}.large-offset-2{margin-left:16.6666666667% !important}.large-offset-3{margin-left:25% !important}.large-offset-4{margin-left:33.3333333333% !important}.large-offset-5{margin-left:41.6666666667% !important}.large-offset-6{margin-left:50% !important}.large-offset-7{margin-left:58.3333333333% !important}.large-offset-8{margin-left:66.6666666667% !important}.large-offset-9{margin-left:75% !important}.large-offset-10{margin-left:83.3333333333% !important}.large-offset-11{margin-left:91.6666666667% !important}.large-reset-order{margin-left:0;margin-right:0;left:auto;right:auto;float:left}.column.large-centered,.columns.large-centered{margin-left:auto;margin-right:auto;float:none}.column.large-uncentered,.columns.large-uncentered{margin-left:0;margin-right:0;float:left}.column.large-centered:last-child,.columns.large-centered:last-child{float:none}.column.large-uncentered:last-child,.columns.large-uncentered:last-child{float:left}.column.large-uncentered.opposite,.columns.large-uncentered.opposite{float:right}.row.large-collapse>.column,.row.large-collapse>.columns{padding-left:0;padding-right:0}.row.large-collapse .row{margin-left:0;margin-right:0}.row.large-uncollapse>.column,.row.large-uncollapse>.columns{padding-left:0.9375rem;padding-right:0.9375rem;float:left}.push-0{position:relative;left:0%;right:auto}.pull-0{position:relative;right:0%;left:auto}.push-1{position:relative;left:8.3333333333%;right:auto}.pull-1{position:relative;right:8.3333333333%;left:auto}.push-2{position:relative;left:16.6666666667%;right:auto}.pull-2{position:relative;right:16.6666666667%;left:auto}.push-3{position:relative;left:25%;right:auto}.pull-3{position:relative;right:25%;left:auto}.push-4{position:relative;left:33.3333333333%;right:auto}.pull-4{position:relative;right:33.3333333333%;left:auto}.push-5{position:relative;left:41.6666666667%;right:auto}.pull-5{position:relative;right:41.6666666667%;left:auto}.push-6{position:relative;left:50%;right:auto}.pull-6{position:relative;right:50%;left:auto}.push-7{position:relative;left:58.3333333333%;right:auto}.pull-7{position:relative;right:58.3333333333%;left:auto}.push-8{position:relative;left:66.6666666667%;right:auto}.pull-8{position:relative;right:66.6666666667%;left:auto}.push-9{position:relative;left:75%;right:auto}.pull-9{position:relative;right:75%;left:auto}.push-10{position:relative;left:83.3333333333%;right:auto}.pull-10{position:relative;right:83.3333333333%;left:auto}.push-11{position:relative;left:91.6666666667%;right:auto}.pull-11{position:relative;right:91.6666666667%;left:auto}}.inline-list{margin:0 auto 1.0625rem auto;margin-left:-1.375rem;margin-right:0;padding:0;list-style:none;overflow:hidden}.inline-list>li{list-style:none;float:left;margin-left:1.375rem;display:block}.inline-list>li>*{display:block}.panel{border-style:solid;border-width:1px;border-color:#d8d8d8;margin-bottom:1.25rem;padding:1.25rem;background:#f2f2f2;color:#333}.panel>:first-child{margin-top:0}.panel>:last-child{margin-bottom:0}.panel h1,.panel h2,.panel h3,.panel h4,.panel h5,.panel h6,.panel p,.panel li,.panel dl{color:#333}.panel h1,.panel h2,.panel h3,.panel h4,.panel h5,.panel h6{line-height:1;margin-bottom:0.625rem}.panel h1.subheader,.panel h2.subheader,.panel h3.subheader,.panel h4.subheader,.panel h5.subheader,.panel h6.subheader{line-height:1.4}.panel.callout{border-style:solid;border-width:1px;border-color:#f6c4bf;margin-bottom:1.25rem;padding:1.25rem;background:#fdf0ef;color:#333}.panel.callout>:first-child{margin-top:0}.panel.callout>:last-child{margin-bottom:0}.panel.callout h1,.panel.callout h2,.panel.callout h3,.panel.callout h4,.panel.callout h5,.panel.callout h6,.panel.callout p,.panel.callout li,.panel.callout dl{color:#333}.panel.callout h1,.panel.callout h2,.panel.callout h3,.panel.callout h4,.panel.callout h5,.panel.callout h6{line-height:1;margin-bottom:0.625rem}.panel.callout h1.subheader,.panel.callout h2.subheader,.panel.callout h3.subheader,.panel.callout h4.subheader,.panel.callout h5.subheader,.panel.callout h6.subheader{line-height:1.4}.panel.callout a:not(.button){color:#ba2619}.panel.callout a:not(.button):hover,.panel.callout a:not(.button):focus{color:#a02116}.panel.radius{border-radius:3px}.side-nav{display:block;margin:0;padding:0.875rem 0;list-style-type:none;list-style-position:outside;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif}.side-nav li{margin:0 0 0.4375rem 0;font-size:0.875rem;font-weight:400}.side-nav li a:not(.button){display:block;color:#ba2619;margin:0;padding:0.4375rem 0.875rem}.side-nav li a:not(.button):hover,.side-nav li a:not(.button):focus{background:rgba(0,0,0,0.025);color:#e65346}.side-nav li.active>a:first-child:not(.button){color:#e65346;font-weight:400;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif}.side-nav li.divider{border-top:1px solid;height:0;padding:0;list-style:none;border-top-color:#fff}.side-nav li.heading{color:#ba2619;font-size:0.875rem;font-weight:bold;text-transform:uppercase}table{background:#fff;margin-bottom:1.25rem;border:solid 1px #ddd;table-layout:auto}table caption{background:transparent;color:#222;font-size:1rem;font-weight:bold}table thead{background:#f5f5f5}table thead tr th,table thead tr td{padding:0.5rem 0.625rem 0.625rem;font-size:0.875rem;font-weight:700;color:#222}table tfoot{background:#f5f5f5}table tfoot tr th,table tfoot tr td{padding:0.5rem 0.625rem 0.625rem;font-size:0.875rem;font-weight:700;color:#222}table tr th,table tr td{padding:0.5625rem 0.625rem;font-size:0.875rem;color:#222;text-align:left}table tr.even,table tr.alt,table tr:nth-of-type(even){background:#F9F9F9}table thead tr th,table tfoot tr th,table tfoot tr td,table tbody tr th,table tbody tr td,table tr td{display:table-cell;line-height:1.125rem}.th{line-height:0;display:inline-block;border:solid 4px #fff;max-width:100%;box-shadow:0 0 0 1px rgba(0,0,0,0.2);transition:all 200ms ease-out}.th:hover,.th:focus{box-shadow:0 0 6px 1px rgba(186,38,25,0.5)}.th.radius{border-radius:3px}meta.foundation-mq-topbar{font-family:"/only screen and (min-width:40.0625em)/";width:40.0625em}.contain-to-grid{width:100%;background:#333}.contain-to-grid .top-bar{margin-bottom:0}.fixed{width:100%;left:0;position:fixed;top:0;z-index:99}.fixed.expanded:not(.top-bar){overflow-y:auto;height:auto;width:100%;max-height:100%}.fixed.expanded:not(.top-bar) .title-area{position:fixed;width:100%;z-index:99}.fixed.expanded:not(.top-bar) .top-bar-section{z-index:98;margin-top:2.8125rem}.top-bar{overflow:hidden;height:2.8125rem;line-height:2.8125rem;position:relative;background:#333;margin-bottom:0}.top-bar ul{margin-bottom:0;list-style:none}.top-bar .row{max-width:none}.top-bar form,.top-bar input{margin-bottom:0}.top-bar input{height:1.75rem;padding-top:.35rem;padding-bottom:.35rem;font-size:0.75rem}.top-bar .button,.top-bar button{padding-top:0.4125rem;padding-bottom:0.4125rem;margin-bottom:0;font-size:0.75rem}@media only screen and (max-width: 40em){.top-bar .button,.top-bar button{position:relative;top:-1px}}.top-bar .title-area{position:relative;margin:0}.top-bar .name{height:2.8125rem;margin:0;font-size:16px}.top-bar .name h1,.top-bar .name h2,.top-bar .name h3,.top-bar .name h4,.top-bar .name p,.top-bar .name span{line-height:2.8125rem;font-size:1.0625rem;margin:0}.top-bar .name h1 a,.top-bar .name h2 a,.top-bar .name h3 a,.top-bar .name h4 a,.top-bar .name p a,.top-bar .name span a{font-weight:400;color:#fff;width:75%;display:block;padding:0 0.9375rem}.top-bar .toggle-topbar{position:absolute;right:0;top:0}.top-bar .toggle-topbar a{color:#fff;text-transform:uppercase;font-size:0.8125rem;font-weight:700;position:relative;display:block;padding:0 0.9375rem;height:2.8125rem;line-height:2.8125rem}.top-bar .toggle-topbar.menu-icon{top:50%;margin-top:-16px}.top-bar .toggle-topbar.menu-icon a{height:34px;line-height:33px;padding:0 2.5rem 0 0.9375rem;color:#fff;position:relative}.top-bar .toggle-topbar.menu-icon a span::after{content:"";position:absolute;display:block;height:0;top:50%;margin-top:-8px;right:0.9375rem;box-shadow:0 0 0 1px #fff,0 7px 0 1px #fff,0 14px 0 1px #fff;width:16px}.top-bar .toggle-topbar.menu-icon a span:hover:after{box-shadow:0 0 0 1px "",0 7px 0 1px "",0 14px 0 1px ""}.top-bar.expanded{height:auto;background:transparent}.top-bar.expanded .title-area{background:#333}.top-bar.expanded .toggle-topbar a{color:#888}.top-bar.expanded .toggle-topbar a span::after{box-shadow:0 0 0 1px #888,0 7px 0 1px #888,0 14px 0 1px #888}.top-bar-section{left:0;position:relative;width:auto;transition:left 300ms ease-out}.top-bar-section ul{padding:0;width:100%;height:auto;display:block;font-size:16px;margin:0}.top-bar-section .divider,.top-bar-section [role="separator"]{border-top:solid 1px #1a1a1a;clear:both;height:1px;width:100%}.top-bar-section ul li{background:#333}.top-bar-section ul li>a{display:block;width:100%;color:#fff;padding:12px 0 12px 0;padding-left:0.9375rem;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-size:0.8125rem;font-weight:400;text-transform:none}.top-bar-section ul li>a.button{font-size:0.8125rem;padding-right:0.9375rem;padding-left:0.9375rem;background-color:#ba2619;border-color:#951e14;color:#fff}.top-bar-section ul li>a.button:hover,.top-bar-section ul li>a.button:focus{background-color:#951e14}.top-bar-section ul li>a.button:hover,.top-bar-section ul li>a.button:focus{color:#fff}.top-bar-section ul li>a.button.secondary{background-color:#e7e7e7;border-color:#b9b9b9;color:#333}.top-bar-section ul li>a.button.secondary:hover,.top-bar-section ul li>a.button.secondary:focus{background-color:#b9b9b9}.top-bar-section ul li>a.button.secondary:hover,.top-bar-section ul li>a.button.secondary:focus{color:#333}.top-bar-section ul li>a.button.success{background-color:#43AC6A;border-color:#368a55;color:#fff}.top-bar-section ul li>a.button.success:hover,.top-bar-section ul li>a.button.success:focus{background-color:#368a55}.top-bar-section ul li>a.button.success:hover,.top-bar-section ul li>a.button.success:focus{color:#fff}.top-bar-section ul li>a.button.alert{background-color:#f04124;border-color:#cf2a0e;color:#fff}.top-bar-section ul li>a.button.alert:hover,.top-bar-section ul li>a.button.alert:focus{background-color:#cf2a0e}.top-bar-section ul li>a.button.alert:hover,.top-bar-section ul li>a.button.alert:focus{color:#fff}.top-bar-section ul li>a.button.warning{background-color:#f08a24;border-color:#cf6e0e;color:#fff}.top-bar-section ul li>a.button.warning:hover,.top-bar-section ul li>a.button.warning:focus{background-color:#cf6e0e}.top-bar-section ul li>a.button.warning:hover,.top-bar-section ul li>a.button.warning:focus{color:#fff}.top-bar-section ul li>button{font-size:0.8125rem;padding-right:0.9375rem;padding-left:0.9375rem;background-color:#ba2619;border-color:#951e14;color:#fff}.top-bar-section ul li>button:hover,.top-bar-section ul li>button:focus{background-color:#951e14}.top-bar-section ul li>button:hover,.top-bar-section ul li>button:focus{color:#fff}.top-bar-section ul li>button.secondary{background-color:#e7e7e7;border-color:#b9b9b9;color:#333}.top-bar-section ul li>button.secondary:hover,.top-bar-section ul li>button.secondary:focus{background-color:#b9b9b9}.top-bar-section ul li>button.secondary:hover,.top-bar-section ul li>button.secondary:focus{color:#333}.top-bar-section ul li>button.success{background-color:#43AC6A;border-color:#368a55;color:#fff}.top-bar-section ul li>button.success:hover,.top-bar-section ul li>button.success:focus{background-color:#368a55}.top-bar-section ul li>button.success:hover,.top-bar-section ul li>button.success:focus{color:#fff}.top-bar-section ul li>button.alert{background-color:#f04124;border-color:#cf2a0e;color:#fff}.top-bar-section ul li>button.alert:hover,.top-bar-section ul li>button.alert:focus{background-color:#cf2a0e}.top-bar-section ul li>button.alert:hover,.top-bar-section ul li>button.alert:focus{color:#fff}.top-bar-section ul li>button.warning{background-color:#f08a24;border-color:#cf6e0e;color:#fff}.top-bar-section ul li>button.warning:hover,.top-bar-section ul li>button.warning:focus{background-color:#cf6e0e}.top-bar-section ul li>button.warning:hover,.top-bar-section ul li>button.warning:focus{color:#fff}.top-bar-section ul li:hover:not(.has-form)>a{background-color:#555;background:#333;color:#fff}.top-bar-section ul li.active>a{background:#ba2619;color:#fff}.top-bar-section ul li.active>a:hover{background:#a02116;color:#fff}.top-bar-section .has-form{padding:0.9375rem}.top-bar-section .has-dropdown{position:relative}.top-bar-section .has-dropdown>a:after{content:"";display:block;width:0;height:0;border:inset 5px;border-color:transparent transparent transparent rgba(255,255,255,0.4);border-left-style:solid;margin-right:0.9375rem;margin-top:-4.5px;position:absolute;top:50%;right:0}.top-bar-section .has-dropdown.moved{position:static}.top-bar-section .has-dropdown.moved>.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important;width:100%}.top-bar-section .has-dropdown.moved>a:after{display:none}.top-bar-section .dropdown{padding:0;position:absolute;left:100%;top:0;z-index:99;display:block;position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}.top-bar-section .dropdown li{width:100%;height:auto}.top-bar-section .dropdown li a{font-weight:400;padding:8px 0.9375rem}.top-bar-section .dropdown li a.parent-link{font-weight:400}.top-bar-section .dropdown li.title h5,.top-bar-section .dropdown li.parent-link{margin-bottom:0;margin-top:0;font-size:1.125rem}.top-bar-section .dropdown li.title h5 a,.top-bar-section .dropdown li.parent-link a{color:#fff;display:block}.top-bar-section .dropdown li.title h5 a:hover,.top-bar-section .dropdown li.parent-link a:hover{background:none}.top-bar-section .dropdown li.has-form{padding:8px 0.9375rem}.top-bar-section .dropdown li .button,.top-bar-section .dropdown li button{top:auto}.top-bar-section .dropdown label{padding:8px 0.9375rem 2px;margin-bottom:0;text-transform:uppercase;color:#777;font-weight:700;font-size:0.625rem}.js-generated{display:block}@media only screen and (min-width: 40.0625em){.top-bar{background:#333;overflow:visible}.top-bar:before,.top-bar:after{content:" ";display:table}.top-bar:after{clear:both}.top-bar .toggle-topbar{display:none}.top-bar .title-area{float:left}.top-bar .name h1 a,.top-bar .name h2 a,.top-bar .name h3 a,.top-bar .name h4 a,.top-bar .name h5 a,.top-bar .name h6 a{width:auto}.top-bar input,.top-bar .button,.top-bar button{font-size:0.875rem;position:relative;height:1.75rem;top:0.53125rem}.top-bar.expanded{background:#333}.contain-to-grid .top-bar{max-width:62.5rem;margin:0 auto;margin-bottom:0}.top-bar-section{transition:none 0 0;left:0 !important}.top-bar-section ul{width:auto;height:auto !important;display:inline}.top-bar-section ul li{float:left}.top-bar-section ul li .js-generated{display:none}.top-bar-section li.hover>a:not(.button){background-color:#555;background:#333;color:#fff}.top-bar-section li:not(.has-form) a:not(.button){padding:0 0.9375rem;line-height:2.8125rem;background:#333}.top-bar-section li:not(.has-form) a:not(.button):hover{background-color:#555;background:#333}.top-bar-section li.active:not(.has-form) a:not(.button){padding:0 0.9375rem;line-height:2.8125rem;color:#fff;background:#ba2619}.top-bar-section li.active:not(.has-form) a:not(.button):hover{background:#a02116;color:#fff}.top-bar-section .has-dropdown>a{padding-right:2.1875rem !important}.top-bar-section .has-dropdown>a:after{content:"";display:block;width:0;height:0;border:inset 5px;border-color:rgba(255,255,255,0.4) transparent transparent transparent;border-top-style:solid;margin-top:-2.5px;top:1.40625rem}.top-bar-section .has-dropdown.moved{position:relative}.top-bar-section .has-dropdown.moved>.dropdown{display:block;position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}.top-bar-section .has-dropdown.hover>.dropdown,.top-bar-section .has-dropdown.not-click:hover>.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important}.top-bar-section .has-dropdown>a:focus+.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important}.top-bar-section .has-dropdown .dropdown li.has-dropdown>a:after{border:none;content:"\00bb";top:1rem;margin-top:-1px;right:5px;line-height:1.2}.top-bar-section .dropdown{left:0;top:auto;background:transparent;min-width:100%}.top-bar-section .dropdown li a{color:#fff;line-height:2.8125rem;white-space:nowrap;padding:12px 0.9375rem;background:#333}.top-bar-section .dropdown li:not(.has-form):not(.active)>a:not(.button){color:#fff;background:#333}.top-bar-section .dropdown li:not(.has-form):not(.active):hover>a:not(.button){color:#fff;background-color:#555;background:#333}.top-bar-section .dropdown li label{white-space:nowrap;background:#333}.top-bar-section .dropdown li .dropdown{left:100%;top:0}.top-bar-section>ul>.divider,.top-bar-section>ul>[role="separator"]{border-bottom:none;border-top:none;border-right:solid 1px #4e4e4e;clear:none;height:2.8125rem;width:0}.top-bar-section .has-form{background:#333;padding:0 0.9375rem;height:2.8125rem}.top-bar-section .right li .dropdown{left:auto;right:0}.top-bar-section .right li .dropdown li .dropdown{right:100%}.top-bar-section .left li .dropdown{right:auto;left:0}.top-bar-section .left li .dropdown li .dropdown{left:100%}.no-js .top-bar-section ul li:hover>a{background-color:#555;background:#333;color:#fff}.no-js .top-bar-section ul li:active>a{background:#ba2619;color:#fff}.no-js .top-bar-section .has-dropdown:hover>.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important}.no-js .top-bar-section .has-dropdown>a:focus+.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important}}.text-left{text-align:left !important}.text-right{text-align:right !important}.text-center{text-align:center !important}.text-justify{text-align:justify !important}@media only screen and (max-width: 40em){.small-only-text-left{text-align:left !important}.small-only-text-right{text-align:right !important}.small-only-text-center{text-align:center !important}.small-only-text-justify{text-align:justify !important}}@media only screen{.small-text-left{text-align:left !important}.small-text-right{text-align:right !important}.small-text-center{text-align:center !important}.small-text-justify{text-align:justify !important}}@media only screen and (min-width: 40.0625em) and (max-width: 64em){.medium-only-text-left{text-align:left !important}.medium-only-text-right{text-align:right !important}.medium-only-text-center{text-align:center !important}.medium-only-text-justify{text-align:justify !important}}@media only screen and (min-width: 40.0625em){.medium-text-left{text-align:left !important}.medium-text-right{text-align:right !important}.medium-text-center{text-align:center !important}.medium-text-justify{text-align:justify !important}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){.large-only-text-left{text-align:left !important}.large-only-text-right{text-align:right !important}.large-only-text-center{text-align:center !important}.large-only-text-justify{text-align:justify !important}}@media only screen and (min-width: 64.0625em){.large-text-left{text-align:left !important}.large-text-right{text-align:right !important}.large-text-center{text-align:center !important}.large-text-justify{text-align:justify !important}}@media only screen and (min-width: 90.0625em) and (max-width: 120em){.xlarge-only-text-left{text-align:left !important}.xlarge-only-text-right{text-align:right !important}.xlarge-only-text-center{text-align:center !important}.xlarge-only-text-justify{text-align:justify !important}}@media only screen and (min-width: 90.0625em){.xlarge-text-left{text-align:left !important}.xlarge-text-right{text-align:right !important}.xlarge-text-center{text-align:center !important}.xlarge-text-justify{text-align:justify !important}}@media only screen and (min-width: 120.0625em) and (max-width: 99999999em){.xxlarge-only-text-left{text-align:left !important}.xxlarge-only-text-right{text-align:right !important}.xxlarge-only-text-center{text-align:center !important}.xxlarge-only-text-justify{text-align:justify !important}}@media only screen and (min-width: 120.0625em){.xxlarge-text-left{text-align:left !important}.xxlarge-text-right{text-align:right !important}.xxlarge-text-center{text-align:center !important}.xxlarge-text-justify{text-align:justify !important}}div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}a{color:#ba2619;text-decoration:none;line-height:inherit}a:hover,a:focus{color:#a02116}a img{border:none}p{font-family:inherit;font-weight:400;font-size:1rem;line-height:1.6;margin-bottom:1.25rem;text-rendering:optimizeLegibility}p.lead{font-size:1.21875rem;line-height:1.6}p aside{font-size:0.875rem;line-height:1.35;font-style:italic}h1,h2,h3,h4,h5,h6{font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-weight:700;font-style:normal;color:#222;text-rendering:optimizeLegibility;margin-top:0.2rem;margin-bottom:0.5rem;line-height:1.4}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-size:80%;color:#6f6f6f;line-height:0}h1{font-size:1.5625rem}h2{font-size:1.25rem}h3{font-size:1.0625rem}h4{font-size:0.9375rem}h5{font-size:1rem}h6{font-size:1rem}.subheader{line-height:1.4;color:#6f6f6f;font-weight:400;margin-top:0.2rem;margin-bottom:0.5rem}hr{border:solid #ddd;border-width:1px 0 0;clear:both;margin:1.25rem 0 1.1875rem;height:0}em,i{font-style:italic;line-height:inherit}strong,b{font-weight:700;line-height:inherit}small{font-size:80%;line-height:inherit}code{font-family:Consolas,"Liberation Mono",Courier,monospace;font-weight:400;color:#333;background-color:rgba(0,0,0,0.04);border-width:1px;border-style:none;border-color:rgba(0,0,0,0.04);padding:0.125rem 0.3125rem 0.0625rem}ul,ol,dl{font-size:1rem;line-height:1.6;margin-bottom:1.25rem;list-style-position:outside;font-family:inherit}ul{margin-left:1.1rem}ul.no-bullet{margin-left:0}ul.no-bullet li ul,ul.no-bullet li ol{margin-left:1.25rem;margin-bottom:0;list-style:none}ul li ul,ul li ol{margin-left:1.25rem;margin-bottom:0}ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}ul.square{list-style-type:square;margin-left:1.1rem}ul.circle{list-style-type:circle;margin-left:1.1rem}ul.disc{list-style-type:disc;margin-left:1.1rem}ul.no-bullet{list-style:none}ol{margin-left:1.4rem}ol li ul,ol li ol{margin-left:1.25rem;margin-bottom:0}dl dt{margin-bottom:0.3rem;font-weight:700}dl dd{margin-bottom:0.75rem}abbr,acronym{text-transform:uppercase;font-size:90%;color:#222;cursor:help}abbr{text-transform:none}abbr[title]{border-bottom:1px dotted #ddd}blockquote{margin:0 0 1.25rem;padding:0.5625rem 1.25rem 0 1.1875rem;border-left:1px solid #ddd}blockquote cite{display:block;font-size:0.8125rem;color:#555}blockquote cite:before{content:"\2014 \0020"}blockquote cite a,blockquote cite a:visited{color:#555}blockquote,blockquote p{line-height:1.6;color:#6f6f6f}.vcard{display:inline-block;margin:0 0 1.25rem 0;border:1px solid #ddd;padding:0.625rem 0.75rem}.vcard li{margin:0;display:block}.vcard .fn{font-weight:700;font-size:0.9375rem}.vevent .summary{font-weight:700}.vevent abbr{cursor:default;text-decoration:none;font-weight:700;border:none;padding:0 0.0625rem}@media only screen and (min-width: 40.0625em){h1,h2,h3,h4,h5,h6{line-height:1.4}h1{font-size:1.875rem}h2{font-size:1.5625rem}h3{font-size:1.375rem}h4{font-size:1.25rem}h5{font-size:1rem}h6{font-size:1rem}}@media only screen{.show-for-small-only,.show-for-small-up,.show-for-small,.show-for-small-down,.hide-for-medium-only,.hide-for-medium-up,.hide-for-medium,.show-for-medium-down,.hide-for-large-only,.hide-for-large-up,.hide-for-large,.show-for-large-down,.hide-for-xlarge-only,.hide-for-xlarge-up,.hide-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.hide-for-small-only,.hide-for-small-up,.hide-for-small,.hide-for-small-down,.show-for-medium-only,.show-for-medium-up,.show-for-medium,.hide-for-medium-down,.show-for-large-only,.show-for-large-up,.show-for-large,.hide-for-large-down,.show-for-xlarge-only,.show-for-xlarge-up,.show-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.visible-for-small-only,.visible-for-small-up,.visible-for-small,.visible-for-small-down,.hidden-for-medium-only,.hidden-for-medium-up,.hidden-for-medium,.visible-for-medium-down,.hidden-for-large-only,.hidden-for-large-up,.hidden-for-large,.visible-for-large-down,.hidden-for-xlarge-only,.hidden-for-xlarge-up,.hidden-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.hidden-for-small-only,.hidden-for-small-up,.hidden-for-small,.hidden-for-small-down,.visible-for-medium-only,.visible-for-medium-up,.visible-for-medium,.hidden-for-medium-down,.visible-for-large-only,.visible-for-large-up,.visible-for-large,.hidden-for-large-down,.visible-for-xlarge-only,.visible-for-xlarge-up,.visible-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.show-for-small-only,table.show-for-small-up,table.show-for-small,table.show-for-small-down,table.hide-for-medium-only,table.hide-for-medium-up,table.hide-for-medium,table.show-for-medium-down,table.hide-for-large-only,table.hide-for-large-up,table.hide-for-large,table.show-for-large-down,table.hide-for-xlarge-only,table.hide-for-xlarge-up,table.hide-for-xlarge,table.show-for-xlarge-down,table.hide-for-xxlarge-only,table.hide-for-xxlarge-up,table.hide-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.show-for-small-only,thead.show-for-small-up,thead.show-for-small,thead.show-for-small-down,thead.hide-for-medium-only,thead.hide-for-medium-up,thead.hide-for-medium,thead.show-for-medium-down,thead.hide-for-large-only,thead.hide-for-large-up,thead.hide-for-large,thead.show-for-large-down,thead.hide-for-xlarge-only,thead.hide-for-xlarge-up,thead.hide-for-xlarge,thead.show-for-xlarge-down,thead.hide-for-xxlarge-only,thead.hide-for-xxlarge-up,thead.hide-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.show-for-small-only,tbody.show-for-small-up,tbody.show-for-small,tbody.show-for-small-down,tbody.hide-for-medium-only,tbody.hide-for-medium-up,tbody.hide-for-medium,tbody.show-for-medium-down,tbody.hide-for-large-only,tbody.hide-for-large-up,tbody.hide-for-large,tbody.show-for-large-down,tbody.hide-for-xlarge-only,tbody.hide-for-xlarge-up,tbody.hide-for-xlarge,tbody.show-for-xlarge-down,tbody.hide-for-xxlarge-only,tbody.hide-for-xxlarge-up,tbody.hide-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.show-for-small-only,tr.show-for-small-up,tr.show-for-small,tr.show-for-small-down,tr.hide-for-medium-only,tr.hide-for-medium-up,tr.hide-for-medium,tr.show-for-medium-down,tr.hide-for-large-only,tr.hide-for-large-up,tr.hide-for-large,tr.show-for-large-down,tr.hide-for-xlarge-only,tr.hide-for-xlarge-up,tr.hide-for-xlarge,tr.show-for-xlarge-down,tr.hide-for-xxlarge-only,tr.hide-for-xxlarge-up,tr.hide-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.show-for-small-only,td.show-for-small-only,th.show-for-small-up,td.show-for-small-up,th.show-for-small,td.show-for-small,th.show-for-small-down,td.show-for-small-down,th.hide-for-medium-only,td.hide-for-medium-only,th.hide-for-medium-up,td.hide-for-medium-up,th.hide-for-medium,td.hide-for-medium,th.show-for-medium-down,td.show-for-medium-down,th.hide-for-large-only,td.hide-for-large-only,th.hide-for-large-up,td.hide-for-large-up,th.hide-for-large,td.hide-for-large,th.show-for-large-down,td.show-for-large-down,th.hide-for-xlarge-only,td.hide-for-xlarge-only,th.hide-for-xlarge-up,td.hide-for-xlarge-up,th.hide-for-xlarge,td.hide-for-xlarge,th.show-for-xlarge-down,td.show-for-xlarge-down,th.hide-for-xxlarge-only,td.hide-for-xxlarge-only,th.hide-for-xxlarge-up,td.hide-for-xxlarge-up,th.hide-for-xxlarge,td.hide-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}@media only screen and (min-width: 40.0625em){.hide-for-small-only,.show-for-small-up,.hide-for-small,.hide-for-small-down,.show-for-medium-only,.show-for-medium-up,.show-for-medium,.show-for-medium-down,.hide-for-large-only,.hide-for-large-up,.hide-for-large,.show-for-large-down,.hide-for-xlarge-only,.hide-for-xlarge-up,.hide-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.show-for-small-only,.hide-for-small-up,.show-for-small,.show-for-small-down,.hide-for-medium-only,.hide-for-medium-up,.hide-for-medium,.hide-for-medium-down,.show-for-large-only,.show-for-large-up,.show-for-large,.hide-for-large-down,.show-for-xlarge-only,.show-for-xlarge-up,.show-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.hidden-for-small-only,.visible-for-small-up,.hidden-for-small,.hidden-for-small-down,.visible-for-medium-only,.visible-for-medium-up,.visible-for-medium,.visible-for-medium-down,.hidden-for-large-only,.hidden-for-large-up,.hidden-for-large,.visible-for-large-down,.hidden-for-xlarge-only,.hidden-for-xlarge-up,.hidden-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.visible-for-small-only,.hidden-for-small-up,.visible-for-small,.visible-for-small-down,.hidden-for-medium-only,.hidden-for-medium-up,.hidden-for-medium,.hidden-for-medium-down,.visible-for-large-only,.visible-for-large-up,.visible-for-large,.hidden-for-large-down,.visible-for-xlarge-only,.visible-for-xlarge-up,.visible-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.hide-for-small-only,table.show-for-small-up,table.hide-for-small,table.hide-for-small-down,table.show-for-medium-only,table.show-for-medium-up,table.show-for-medium,table.show-for-medium-down,table.hide-for-large-only,table.hide-for-large-up,table.hide-for-large,table.show-for-large-down,table.hide-for-xlarge-only,table.hide-for-xlarge-up,table.hide-for-xlarge,table.show-for-xlarge-down,table.hide-for-xxlarge-only,table.hide-for-xxlarge-up,table.hide-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.hide-for-small-only,thead.show-for-small-up,thead.hide-for-small,thead.hide-for-small-down,thead.show-for-medium-only,thead.show-for-medium-up,thead.show-for-medium,thead.show-for-medium-down,thead.hide-for-large-only,thead.hide-for-large-up,thead.hide-for-large,thead.show-for-large-down,thead.hide-for-xlarge-only,thead.hide-for-xlarge-up,thead.hide-for-xlarge,thead.show-for-xlarge-down,thead.hide-for-xxlarge-only,thead.hide-for-xxlarge-up,thead.hide-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.hide-for-small-only,tbody.show-for-small-up,tbody.hide-for-small,tbody.hide-for-small-down,tbody.show-for-medium-only,tbody.show-for-medium-up,tbody.show-for-medium,tbody.show-for-medium-down,tbody.hide-for-large-only,tbody.hide-for-large-up,tbody.hide-for-large,tbody.show-for-large-down,tbody.hide-for-xlarge-only,tbody.hide-for-xlarge-up,tbody.hide-for-xlarge,tbody.show-for-xlarge-down,tbody.hide-for-xxlarge-only,tbody.hide-for-xxlarge-up,tbody.hide-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.hide-for-small-only,tr.show-for-small-up,tr.hide-for-small,tr.hide-for-small-down,tr.show-for-medium-only,tr.show-for-medium-up,tr.show-for-medium,tr.show-for-medium-down,tr.hide-for-large-only,tr.hide-for-large-up,tr.hide-for-large,tr.show-for-large-down,tr.hide-for-xlarge-only,tr.hide-for-xlarge-up,tr.hide-for-xlarge,tr.show-for-xlarge-down,tr.hide-for-xxlarge-only,tr.hide-for-xxlarge-up,tr.hide-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.hide-for-small-only,td.hide-for-small-only,th.show-for-small-up,td.show-for-small-up,th.hide-for-small,td.hide-for-small,th.hide-for-small-down,td.hide-for-small-down,th.show-for-medium-only,td.show-for-medium-only,th.show-for-medium-up,td.show-for-medium-up,th.show-for-medium,td.show-for-medium,th.show-for-medium-down,td.show-for-medium-down,th.hide-for-large-only,td.hide-for-large-only,th.hide-for-large-up,td.hide-for-large-up,th.hide-for-large,td.hide-for-large,th.show-for-large-down,td.show-for-large-down,th.hide-for-xlarge-only,td.hide-for-xlarge-only,th.hide-for-xlarge-up,td.hide-for-xlarge-up,th.hide-for-xlarge,td.hide-for-xlarge,th.show-for-xlarge-down,td.show-for-xlarge-down,th.hide-for-xxlarge-only,td.hide-for-xxlarge-only,th.hide-for-xxlarge-up,td.hide-for-xxlarge-up,th.hide-for-xxlarge,td.hide-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}@media only screen and (min-width: 64.0625em){.hide-for-small-only,.show-for-small-up,.hide-for-small,.hide-for-small-down,.hide-for-medium-only,.show-for-medium-up,.hide-for-medium,.hide-for-medium-down,.show-for-large-only,.show-for-large-up,.show-for-large,.show-for-large-down,.hide-for-xlarge-only,.hide-for-xlarge-up,.hide-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.show-for-small-only,.hide-for-small-up,.show-for-small,.show-for-small-down,.show-for-medium-only,.hide-for-medium-up,.show-for-medium,.show-for-medium-down,.hide-for-large-only,.hide-for-large-up,.hide-for-large,.hide-for-large-down,.show-for-xlarge-only,.show-for-xlarge-up,.show-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.hidden-for-small-only,.visible-for-small-up,.hidden-for-small,.hidden-for-small-down,.hidden-for-medium-only,.visible-for-medium-up,.hidden-for-medium,.hidden-for-medium-down,.visible-for-large-only,.visible-for-large-up,.visible-for-large,.visible-for-large-down,.hidden-for-xlarge-only,.hidden-for-xlarge-up,.hidden-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.visible-for-small-only,.hidden-for-small-up,.visible-for-small,.visible-for-small-down,.visible-for-medium-only,.hidden-for-medium-up,.visible-for-medium,.visible-for-medium-down,.hidden-for-large-only,.hidden-for-large-up,.hidden-for-large,.hidden-for-large-down,.visible-for-xlarge-only,.visible-for-xlarge-up,.visible-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.hide-for-small-only,table.show-for-small-up,table.hide-for-small,table.hide-for-small-down,table.hide-for-medium-only,table.show-for-medium-up,table.hide-for-medium,table.hide-for-medium-down,table.show-for-large-only,table.show-for-large-up,table.show-for-large,table.show-for-large-down,table.hide-for-xlarge-only,table.hide-for-xlarge-up,table.hide-for-xlarge,table.show-for-xlarge-down,table.hide-for-xxlarge-only,table.hide-for-xxlarge-up,table.hide-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.hide-for-small-only,thead.show-for-small-up,thead.hide-for-small,thead.hide-for-small-down,thead.hide-for-medium-only,thead.show-for-medium-up,thead.hide-for-medium,thead.hide-for-medium-down,thead.show-for-large-only,thead.show-for-large-up,thead.show-for-large,thead.show-for-large-down,thead.hide-for-xlarge-only,thead.hide-for-xlarge-up,thead.hide-for-xlarge,thead.show-for-xlarge-down,thead.hide-for-xxlarge-only,thead.hide-for-xxlarge-up,thead.hide-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.hide-for-small-only,tbody.show-for-small-up,tbody.hide-for-small,tbody.hide-for-small-down,tbody.hide-for-medium-only,tbody.show-for-medium-up,tbody.hide-for-medium,tbody.hide-for-medium-down,tbody.show-for-large-only,tbody.show-for-large-up,tbody.show-for-large,tbody.show-for-large-down,tbody.hide-for-xlarge-only,tbody.hide-for-xlarge-up,tbody.hide-for-xlarge,tbody.show-for-xlarge-down,tbody.hide-for-xxlarge-only,tbody.hide-for-xxlarge-up,tbody.hide-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.hide-for-small-only,tr.show-for-small-up,tr.hide-for-small,tr.hide-for-small-down,tr.hide-for-medium-only,tr.show-for-medium-up,tr.hide-for-medium,tr.hide-for-medium-down,tr.show-for-large-only,tr.show-for-large-up,tr.show-for-large,tr.show-for-large-down,tr.hide-for-xlarge-only,tr.hide-for-xlarge-up,tr.hide-for-xlarge,tr.show-for-xlarge-down,tr.hide-for-xxlarge-only,tr.hide-for-xxlarge-up,tr.hide-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.hide-for-small-only,td.hide-for-small-only,th.show-for-small-up,td.show-for-small-up,th.hide-for-small,td.hide-for-small,th.hide-for-small-down,td.hide-for-small-down,th.hide-for-medium-only,td.hide-for-medium-only,th.show-for-medium-up,td.show-for-medium-up,th.hide-for-medium,td.hide-for-medium,th.hide-for-medium-down,td.hide-for-medium-down,th.show-for-large-only,td.show-for-large-only,th.show-for-large-up,td.show-for-large-up,th.show-for-large,td.show-for-large,th.show-for-large-down,td.show-for-large-down,th.hide-for-xlarge-only,td.hide-for-xlarge-only,th.hide-for-xlarge-up,td.hide-for-xlarge-up,th.hide-for-xlarge,td.hide-for-xlarge,th.show-for-xlarge-down,td.show-for-xlarge-down,th.hide-for-xxlarge-only,td.hide-for-xxlarge-only,th.hide-for-xxlarge-up,td.hide-for-xxlarge-up,th.hide-for-xxlarge,td.hide-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}@media only screen and (min-width: 90.0625em){.hide-for-small-only,.show-for-small-up,.hide-for-small,.hide-for-small-down,.hide-for-medium-only,.show-for-medium-up,.hide-for-medium,.hide-for-medium-down,.hide-for-large-only,.show-for-large-up,.hide-for-large,.hide-for-large-down,.show-for-xlarge-only,.show-for-xlarge-up,.show-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.show-for-small-only,.hide-for-small-up,.show-for-small,.show-for-small-down,.show-for-medium-only,.hide-for-medium-up,.show-for-medium,.show-for-medium-down,.show-for-large-only,.hide-for-large-up,.show-for-large,.show-for-large-down,.hide-for-xlarge-only,.hide-for-xlarge-up,.hide-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.hidden-for-small-only,.visible-for-small-up,.hidden-for-small,.hidden-for-small-down,.hidden-for-medium-only,.visible-for-medium-up,.hidden-for-medium,.hidden-for-medium-down,.hidden-for-large-only,.visible-for-large-up,.hidden-for-large,.hidden-for-large-down,.visible-for-xlarge-only,.visible-for-xlarge-up,.visible-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.visible-for-small-only,.hidden-for-small-up,.visible-for-small,.visible-for-small-down,.visible-for-medium-only,.hidden-for-medium-up,.visible-for-medium,.visible-for-medium-down,.visible-for-large-only,.hidden-for-large-up,.visible-for-large,.visible-for-large-down,.hidden-for-xlarge-only,.hidden-for-xlarge-up,.hidden-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.hide-for-small-only,table.show-for-small-up,table.hide-for-small,table.hide-for-small-down,table.hide-for-medium-only,table.show-for-medium-up,table.hide-for-medium,table.hide-for-medium-down,table.hide-for-large-only,table.show-for-large-up,table.hide-for-large,table.hide-for-large-down,table.show-for-xlarge-only,table.show-for-xlarge-up,table.show-for-xlarge,table.show-for-xlarge-down,table.hide-for-xxlarge-only,table.hide-for-xxlarge-up,table.hide-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.hide-for-small-only,thead.show-for-small-up,thead.hide-for-small,thead.hide-for-small-down,thead.hide-for-medium-only,thead.show-for-medium-up,thead.hide-for-medium,thead.hide-for-medium-down,thead.hide-for-large-only,thead.show-for-large-up,thead.hide-for-large,thead.hide-for-large-down,thead.show-for-xlarge-only,thead.show-for-xlarge-up,thead.show-for-xlarge,thead.show-for-xlarge-down,thead.hide-for-xxlarge-only,thead.hide-for-xxlarge-up,thead.hide-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.hide-for-small-only,tbody.show-for-small-up,tbody.hide-for-small,tbody.hide-for-small-down,tbody.hide-for-medium-only,tbody.show-for-medium-up,tbody.hide-for-medium,tbody.hide-for-medium-down,tbody.hide-for-large-only,tbody.show-for-large-up,tbody.hide-for-large,tbody.hide-for-large-down,tbody.show-for-xlarge-only,tbody.show-for-xlarge-up,tbody.show-for-xlarge,tbody.show-for-xlarge-down,tbody.hide-for-xxlarge-only,tbody.hide-for-xxlarge-up,tbody.hide-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.hide-for-small-only,tr.show-for-small-up,tr.hide-for-small,tr.hide-for-small-down,tr.hide-for-medium-only,tr.show-for-medium-up,tr.hide-for-medium,tr.hide-for-medium-down,tr.hide-for-large-only,tr.show-for-large-up,tr.hide-for-large,tr.hide-for-large-down,tr.show-for-xlarge-only,tr.show-for-xlarge-up,tr.show-for-xlarge,tr.show-for-xlarge-down,tr.hide-for-xxlarge-only,tr.hide-for-xxlarge-up,tr.hide-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.hide-for-small-only,td.hide-for-small-only,th.show-for-small-up,td.show-for-small-up,th.hide-for-small,td.hide-for-small,th.hide-for-small-down,td.hide-for-small-down,th.hide-for-medium-only,td.hide-for-medium-only,th.show-for-medium-up,td.show-for-medium-up,th.hide-for-medium,td.hide-for-medium,th.hide-for-medium-down,td.hide-for-medium-down,th.hide-for-large-only,td.hide-for-large-only,th.show-for-large-up,td.show-for-large-up,th.hide-for-large,td.hide-for-large,th.hide-for-large-down,td.hide-for-large-down,th.show-for-xlarge-only,td.show-for-xlarge-only,th.show-for-xlarge-up,td.show-for-xlarge-up,th.show-for-xlarge,td.show-for-xlarge,th.show-for-xlarge-down,td.show-for-xlarge-down,th.hide-for-xxlarge-only,td.hide-for-xxlarge-only,th.hide-for-xxlarge-up,td.hide-for-xxlarge-up,th.hide-for-xxlarge,td.hide-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}@media only screen and (min-width: 120.0625em){.hide-for-small-only,.show-for-small-up,.hide-for-small,.hide-for-small-down,.hide-for-medium-only,.show-for-medium-up,.hide-for-medium,.hide-for-medium-down,.hide-for-large-only,.show-for-large-up,.hide-for-large,.hide-for-large-down,.hide-for-xlarge-only,.show-for-xlarge-up,.hide-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.show-for-small-only,.hide-for-small-up,.show-for-small,.show-for-small-down,.show-for-medium-only,.hide-for-medium-up,.show-for-medium,.show-for-medium-down,.show-for-large-only,.hide-for-large-up,.show-for-large,.show-for-large-down,.show-for-xlarge-only,.hide-for-xlarge-up,.show-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.hidden-for-small-only,.visible-for-small-up,.hidden-for-small,.hidden-for-small-down,.hidden-for-medium-only,.visible-for-medium-up,.hidden-for-medium,.hidden-for-medium-down,.hidden-for-large-only,.visible-for-large-up,.hidden-for-large,.hidden-for-large-down,.hidden-for-xlarge-only,.visible-for-xlarge-up,.hidden-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.visible-for-small-only,.hidden-for-small-up,.visible-for-small,.visible-for-small-down,.visible-for-medium-only,.hidden-for-medium-up,.visible-for-medium,.visible-for-medium-down,.visible-for-large-only,.hidden-for-large-up,.visible-for-large,.visible-for-large-down,.visible-for-xlarge-only,.hidden-for-xlarge-up,.visible-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.hide-for-small-only,table.show-for-small-up,table.hide-for-small,table.hide-for-small-down,table.hide-for-medium-only,table.show-for-medium-up,table.hide-for-medium,table.hide-for-medium-down,table.hide-for-large-only,table.show-for-large-up,table.hide-for-large,table.hide-for-large-down,table.hide-for-xlarge-only,table.show-for-xlarge-up,table.hide-for-xlarge,table.hide-for-xlarge-down,table.show-for-xxlarge-only,table.show-for-xxlarge-up,table.show-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.hide-for-small-only,thead.show-for-small-up,thead.hide-for-small,thead.hide-for-small-down,thead.hide-for-medium-only,thead.show-for-medium-up,thead.hide-for-medium,thead.hide-for-medium-down,thead.hide-for-large-only,thead.show-for-large-up,thead.hide-for-large,thead.hide-for-large-down,thead.hide-for-xlarge-only,thead.show-for-xlarge-up,thead.hide-for-xlarge,thead.hide-for-xlarge-down,thead.show-for-xxlarge-only,thead.show-for-xxlarge-up,thead.show-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.hide-for-small-only,tbody.show-for-small-up,tbody.hide-for-small,tbody.hide-for-small-down,tbody.hide-for-medium-only,tbody.show-for-medium-up,tbody.hide-for-medium,tbody.hide-for-medium-down,tbody.hide-for-large-only,tbody.show-for-large-up,tbody.hide-for-large,tbody.hide-for-large-down,tbody.hide-for-xlarge-only,tbody.show-for-xlarge-up,tbody.hide-for-xlarge,tbody.hide-for-xlarge-down,tbody.show-for-xxlarge-only,tbody.show-for-xxlarge-up,tbody.show-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.hide-for-small-only,tr.show-for-small-up,tr.hide-for-small,tr.hide-for-small-down,tr.hide-for-medium-only,tr.show-for-medium-up,tr.hide-for-medium,tr.hide-for-medium-down,tr.hide-for-large-only,tr.show-for-large-up,tr.hide-for-large,tr.hide-for-large-down,tr.hide-for-xlarge-only,tr.show-for-xlarge-up,tr.hide-for-xlarge,tr.hide-for-xlarge-down,tr.show-for-xxlarge-only,tr.show-for-xxlarge-up,tr.show-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.hide-for-small-only,td.hide-for-small-only,th.show-for-small-up,td.show-for-small-up,th.hide-for-small,td.hide-for-small,th.hide-for-small-down,td.hide-for-small-down,th.hide-for-medium-only,td.hide-for-medium-only,th.show-for-medium-up,td.show-for-medium-up,th.hide-for-medium,td.hide-for-medium,th.hide-for-medium-down,td.hide-for-medium-down,th.hide-for-large-only,td.hide-for-large-only,th.show-for-large-up,td.show-for-large-up,th.hide-for-large,td.hide-for-large,th.hide-for-large-down,td.hide-for-large-down,th.hide-for-xlarge-only,td.hide-for-xlarge-only,th.show-for-xlarge-up,td.show-for-xlarge-up,th.hide-for-xlarge,td.hide-for-xlarge,th.hide-for-xlarge-down,td.hide-for-xlarge-down,th.show-for-xxlarge-only,td.show-for-xxlarge-only,th.show-for-xxlarge-up,td.show-for-xxlarge-up,th.show-for-xxlarge,td.show-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}.show-for-landscape,.hide-for-portrait{display:inherit !important}.hide-for-landscape,.show-for-portrait{display:none !important}table.hide-for-landscape,table.show-for-portrait{display:table !important}thead.hide-for-landscape,thead.show-for-portrait{display:table-header-group !important}tbody.hide-for-landscape,tbody.show-for-portrait{display:table-row-group !important}tr.hide-for-landscape,tr.show-for-portrait{display:table-row !important}td.hide-for-landscape,td.show-for-portrait,th.hide-for-landscape,th.show-for-portrait{display:table-cell !important}@media only screen and (orientation: landscape){.show-for-landscape,.hide-for-portrait{display:inherit !important}.hide-for-landscape,.show-for-portrait{display:none !important}table.show-for-landscape,table.hide-for-portrait{display:table !important}thead.show-for-landscape,thead.hide-for-portrait{display:table-header-group !important}tbody.show-for-landscape,tbody.hide-for-portrait{display:table-row-group !important}tr.show-for-landscape,tr.hide-for-portrait{display:table-row !important}td.show-for-landscape,td.hide-for-portrait,th.show-for-landscape,th.hide-for-portrait{display:table-cell !important}}@media only screen and (orientation: portrait){.show-for-portrait,.hide-for-landscape{display:inherit !important}.hide-for-portrait,.show-for-landscape{display:none !important}table.show-for-portrait,table.hide-for-landscape{display:table !important}thead.show-for-portrait,thead.hide-for-landscape{display:table-header-group !important}tbody.show-for-portrait,tbody.hide-for-landscape{display:table-row-group !important}tr.show-for-portrait,tr.hide-for-landscape{display:table-row !important}td.show-for-portrait,td.hide-for-landscape,th.show-for-portrait,th.hide-for-landscape{display:table-cell !important}}.show-for-touch{display:none !important}.hide-for-touch{display:inherit !important}.touch .show-for-touch{display:inherit !important}.touch .hide-for-touch{display:none !important}table.hide-for-touch{display:table !important}.touch table.show-for-touch{display:table !important}thead.hide-for-touch{display:table-header-group !important}.touch thead.show-for-touch{display:table-header-group !important}tbody.hide-for-touch{display:table-row-group !important}.touch tbody.show-for-touch{display:table-row-group !important}tr.hide-for-touch{display:table-row !important}.touch tr.show-for-touch{display:table-row !important}td.hide-for-touch{display:table-cell !important}.touch td.show-for-touch{display:table-cell !important}th.hide-for-touch{display:table-cell !important}.touch th.show-for-touch{display:table-cell !important}.print-only{display:none !important}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}.show-for-print{display:block}.hide-for-print{display:none}table.show-for-print{display:table !important}thead.show-for-print{display:table-header-group !important}tbody.show-for-print{display:table-row-group !important}tr.show-for-print{display:table-row !important}td.show-for-print{display:table-cell !important}th.show-for-print{display:table-cell !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.hide-on-print{display:none !important}.print-only{display:block !important}.hide-for-print{display:none !important}.show-for-print{display:inherit !important}}@media print{.show-for-print{display:block}.hide-for-print{display:none}table.show-for-print{display:table !important}thead.show-for-print{display:table-header-group !important}tbody.show-for-print{display:table-row-group !important}tr.show-for-print{display:table-row !important}td.show-for-print{display:table-cell !important}th.show-for-print{display:table-cell !important}}.slick-slider{position:relative;display:block;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-tap-highlight-color:transparent}.slick-list{position:relative;overflow:hidden;display:block;margin:0;padding:0}.slick-list:focus{outline:none}.slick-list.dragging{cursor:pointer;cursor:hand}.slick-slider .slick-track,.slick-slider .slick-list{-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.slick-track{position:relative;left:0;top:0;display:block}.slick-track:before,.slick-track:after{content:"";display:table}.slick-track:after{clear:both}.slick-loading .slick-track{visibility:hidden}.slick-slide{float:left;height:100%;min-height:1px;display:none}[dir="rtl"] .slick-slide{float:right}.slick-slide img{display:block}.slick-slide.slick-loading img{display:none}.slick-slide.dragging img{pointer-events:none}.slick-initialized .slick-slide{display:block}.slick-loading .slick-slide{visibility:hidden}.slick-vertical .slick-slide{display:block;height:auto;border:1px solid transparent}.slick-loading .slick-list{background:#fff url("../img/ajax-loader.gif") center center no-repeat}.slick-prev,.slick-next{position:absolute;display:block;height:20px;width:20px;line-height:0;font-size:0;cursor:pointer;background:transparent;color:transparent;top:50%;margin-top:-10px;padding:0;border:none;outline:none}.slick-prev:hover,.slick-prev:focus,.slick-next:hover,.slick-next:focus{outline:none;background:transparent;color:transparent}.slick-prev:hover:before,.slick-prev:focus:before,.slick-next:hover:before,.slick-next:focus:before{opacity:1}.slick-prev.slick-disabled:before,.slick-next.slick-disabled:before{opacity:0.25}.slick-prev:before,.slick-next:before{font-family:"FontAwesome";font-size:20px;line-height:1;color:#ba2619;opacity:0.75;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.slick-prev{left:15px}[dir="rtl"] .slick-prev{left:auto;right:15px}.slick-prev:before{content:""}[dir="rtl"] .slick-prev:before{content:""}.slick-next{right:15px}[dir="rtl"] .slick-next{left:15px;right:auto}.slick-next:before{content:""}[dir="rtl"] .slick-next:before{content:""}.slick-slider{margin-bottom:30px}.slick-dots{margin:0;position:absolute;bottom:15px;list-style:none;display:block;text-align:center;padding:0;width:100%}.slick-dots li{position:relative;display:inline-block;height:20px;width:20px;margin:0 5px;padding:0;cursor:pointer}.slick-dots li button{border:0;background:transparent;display:block;height:20px;width:20px;outline:none;line-height:0;font-size:0;color:transparent;padding:5px;cursor:pointer}.slick-dots li button:hover,.slick-dots li button:focus{outline:none}.slick-dots li button:hover:before,.slick-dots li button:focus:before{opacity:1}.slick-dots li button:before{position:absolute;top:0;left:0;content:"";width:20px;height:20px;font-family:"FontAwesome";font-size:12px;line-height:20px;text-align:center;color:#000;opacity:0.25;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.slick-dots li.slick-active button:before{color:#ba2619;opacity:0.75}/*! * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("./fonts/fontawesome-webfont.eot?v=4.4.0");src:url("./fonts/fontawesome-webfont.eot?#iefix&v=4.4.0") format("embedded-opentype"),url("./fonts/fontawesome-webfont.woff2?v=4.4.0") format("woff2"),url("./fonts/fontawesome-webfont.woff?v=4.4.0") format("woff"),url("./fonts/fontawesome-webfont.ttf?v=4.4.0") format("truetype"),url("./fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857em;text-align:center}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em;text-align:center}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.maxWidth{width:100%}.hidden{display:none}*{transition:all 0.15s ease}body{background-color:#333}body>main{padding:2.5rem 0;background-color:#fff}@media only screen and (max-width: 40em){body>main{padding:1.25rem 0}}body>main img{margin-bottom:1.25rem}@media only screen and (max-width: 40em){aside{margin-bottom:1.5rem}}@media only screen and (max-width: 40em){.row{overflow:hidden}}body>footer{background-color:#333;padding:2.5rem 0;color:#999}body>footer p,body>footer h1,body>footer h2,body>footer h3,body>footer h4,body>footer h5,body>footer h6{color:inherit}body>footer a{color:#e23424}code{font-size:85%;color:inherit !important;overflow-x:scroll;-webkit-overflow-scrolling:touch}.highlight{border:solid 1px #ddd;background:#fff;padding:1em;line-height:23px;margin-bottom:30px;white-space:pre;overflow-x:auto;word-break:inherit;word-wrap:inherit;background:#ffffff}@media only screen and (max-width: 40em){.highlight{overflow-x:scroll;-webkit-overflow-scrolling:touch}}.highlight code{background-color:transparent;border:none;padding:0}.highlight td{padding:8px 15px}.highlight .gl{background:#fafafa;border-right:1px solid #ddd;color:#999;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.highlight .c{color:#999988;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k{font-weight:bold}.highlight .o{font-weight:bold}.highlight .cm{color:#999988;font-style:italic}.highlight .cp{color:#999999;font-weight:bold}.highlight .c1{color:#999988;font-style:italic}.highlight .cs{color:#999999;font-weight:bold;font-style:italic}.highlight .gd{color:#000000;background-color:#ffdddd}.highlight .gd .x{color:#000000;background-color:#ffaaaa}.highlight .ge{font-style:italic}.highlight .gr{color:#aa0000}.highlight .gh{color:#999999}.highlight .gi{color:#000000;background-color:#ddffdd}.highlight .gi .x{color:#000000;background-color:#aaffaa}.highlight .go{color:#888888}.highlight .gp{color:#555555}.highlight .gs{font-weight:bold}.highlight .gu{color:#aaaaaa}.highlight .gt{color:#aa0000}.highlight .kc{font-weight:bold}.highlight .kd{font-weight:bold}.highlight .kp{font-weight:bold}.highlight .kr{font-weight:bold}.highlight .kt{color:#445588;font-weight:bold}.highlight .m{color:#009999}.highlight .s{color:#d14}.highlight .na{color:#008080}.highlight .nb{color:#0086B3}.highlight .nc{color:#445588;font-weight:bold}.highlight .no{color:#008080}.highlight .ni{color:#800080}.highlight .ne{color:#990000;font-weight:bold}.highlight .nf{color:#990000;font-weight:bold}.highlight .nn{color:#555555}.highlight .nt{color:#000080}.highlight .nv{color:#008080}.highlight .ow{font-weight:bold}.highlight .w{color:#bbbbbb}.highlight .mf{color:#009999}.highlight .mh{color:#009999}.highlight .mi{color:#009999}.highlight .mo{color:#009999}.highlight .sb{color:#d14}.highlight .sc{color:#d14}.highlight .sd{color:#d14}.highlight .s2{color:#d14}.highlight .se{color:#d14}.highlight .sh{color:#d14}.highlight .si{color:#d14}.highlight .sx{color:#d14}.highlight .sr{color:#009926}.highlight .s1{color:#d14}.highlight .ss{color:#990073}.highlight .bp{color:#999999}.highlight .vc{color:#008080}.highlight .vg{color:#008080}.highlight .vi{color:#008080}.highlight .il{color:#009999}kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.social__icons{margin-bottom:10px}.social__icon{display:inline-block;margin-right:10px}.slider picture img{width:100%}.videoWrapper{position:relative;padding-top:56.25%;margin-bottom:1.25rem}.videoWrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}.icon{position:relative;top:1px;display:inline-block;width:16px;height:16px}.icon-color{border:1px solid #aaa}.icon-color-white{background-color:#fff}.icon-color-black{background-color:#000}.icon-color-red{background-color:#ba2619}.toc-header{margin-bottom:0}#toc{display:block;margin:1rem 0 0 0}#toc>ol{margin-left:0}#toc>ol>li{margin-bottom:0.5rem}#toc ol{list-style-type:none}.clickable-header{cursor:pointer}.clickable-header:hover{text-decoration:underline}.top-level-header{display:inline-block}.back-to-top{position:relative;margin-left:8px;cursor:pointer;top:-3px}.contentSearch{margin-bottom:30px}@media only screen and (max-width: 40em){.contentSearch{margin-bottom:5px}}.contentSearch-wrapper{position:relative}.contentSearch-wrapper.small-collapse{margin:0 !important}.liveSearch-field{margin-bottom:0 !important}.liveSearch-button{margin-bottom:0}.liveSearch-result-list{position:absolute;width:100%;height:auto;background:white;border:1px #ccc;border-style:none solid solid solid;z-index:99;margin:0;list-style-type:none}@media only screen and (max-width: 40em){.liveSearch-result-list{position:relative}}.liveSearch-result-list li a{-webkit-transition:all 0.15s ease;transition:all 0.15s ease;padding:4px 10px;display:block;width:100%;height:100%;line-height:1.2}.liveSearch-result-list li a:hover{background-color:#eee}.liveSearch-result-list li a:first-child{padding-top:8px}.liveSearch-result-list li a:last-child{padding-bottom:8px}.searchPage-result-list{line-height:1.2;list-style-type:none}.searchPage-result-list li{margin-bottom:20px}@media only screen and (max-width: 40em){.searchPage-result-list li{margin-bottom:15px}}.searchPage-result-list li a{font-weight:bold;color:#1a0dab}.searchPage-result-list li a:hover{color:#1a0dab;text-decoration:underline}.searchPage-result-list li .url{color:#006621}@media only screen and (max-width: 40em){.searchPage-result-list li .additionalInfo{display:none}}.article-list{margin:0;padding:0;list-style-type:none}.article-list header h1{font-size:1.5rem}article header{margin-bottom:0.5rem}article header h1{margin-bottom:0}article .meta{font-size:0.9em}.table-wrapper{width:100%;overflow-y:auto;_overflow:auto;margin:0 0 1em} + */@font-face{font-family:'FontAwesome';src:url("./fonts/fontawesome-webfont.eot?v=4.4.0");src:url("./fonts/fontawesome-webfont.eot?#iefix&v=4.4.0") format("embedded-opentype"),url("./fonts/fontawesome-webfont.woff2?v=4.4.0") format("woff2"),url("./fonts/fontawesome-webfont.woff?v=4.4.0") format("woff"),url("./fonts/fontawesome-webfont.ttf?v=4.4.0") format("truetype"),url("./fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px / 1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333em;line-height:0.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857em;text-align:center}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:0.1428571429em;text-align:center}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.maxWidth{width:100%}.hidden{display:none}*{transition:all 0.15s ease}body{background-color:#333}body>main{padding:2.5rem 0;background-color:#fff}@media only screen and (max-width: 40em){body>main{padding:1.25rem 0}}body>main img{margin-bottom:1.25rem}@media only screen and (max-width: 40em){aside{margin-bottom:1.5rem}}@media only screen and (max-width: 40em){.row{overflow:hidden}}body>footer{background-color:#333;padding:2.5rem 0;color:#999}body>footer p,body>footer h1,body>footer h2,body>footer h3,body>footer h4,body>footer h5,body>footer h6{color:inherit}body>footer a{color:#e23424}code{font-size:85%;color:inherit !important;overflow-x:scroll;-webkit-overflow-scrolling:touch}.highlight{border:solid 1px #ddd;background:#fff;padding:1em;line-height:23px;margin-bottom:30px;white-space:pre;overflow-x:auto;word-break:inherit;word-wrap:inherit;background:#ffffff}@media only screen and (max-width: 40em){.highlight{overflow-x:scroll;-webkit-overflow-scrolling:touch}}.highlight code{background-color:transparent;border:none;padding:0}.highlight td{padding:8px 15px}.highlight .gl{background:#fafafa;border-right:1px solid #ddd;color:#999;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.highlight .c{color:#999988;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k{font-weight:bold}.highlight .o{font-weight:bold}.highlight .cm{color:#999988;font-style:italic}.highlight .cp{color:#999999;font-weight:bold}.highlight .c1{color:#999988;font-style:italic}.highlight .cs{color:#999999;font-weight:bold;font-style:italic}.highlight .gd{color:#000000;background-color:#ffdddd}.highlight .gd .x{color:#000000;background-color:#ffaaaa}.highlight .ge{font-style:italic}.highlight .gr{color:#aa0000}.highlight .gh{color:#999999}.highlight .gi{color:#000000;background-color:#ddffdd}.highlight .gi .x{color:#000000;background-color:#aaffaa}.highlight .go{color:#888888}.highlight .gp{color:#555555}.highlight .gs{font-weight:bold}.highlight .gu{color:#aaaaaa}.highlight .gt{color:#aa0000}.highlight .kc{font-weight:bold}.highlight .kd{font-weight:bold}.highlight .kp{font-weight:bold}.highlight .kr{font-weight:bold}.highlight .kt{color:#445588;font-weight:bold}.highlight .m{color:#009999}.highlight .s{color:#d14}.highlight .na{color:#008080}.highlight .nb{color:#0086B3}.highlight .nc{color:#445588;font-weight:bold}.highlight .no{color:#008080}.highlight .ni{color:#800080}.highlight .ne{color:#990000;font-weight:bold}.highlight .nf{color:#990000;font-weight:bold}.highlight .nn{color:#555555}.highlight .nt{color:#000080}.highlight .nv{color:#008080}.highlight .ow{font-weight:bold}.highlight .w{color:#bbbbbb}.highlight .mf{color:#009999}.highlight .mh{color:#009999}.highlight .mi{color:#009999}.highlight .mo{color:#009999}.highlight .sb{color:#d14}.highlight .sc{color:#d14}.highlight .sd{color:#d14}.highlight .s2{color:#d14}.highlight .se{color:#d14}.highlight .sh{color:#d14}.highlight .si{color:#d14}.highlight .sx{color:#d14}.highlight .sr{color:#009926}.highlight .s1{color:#d14}.highlight .ss{color:#990073}.highlight .bp{color:#999999}.highlight .vc{color:#008080}.highlight .vg{color:#008080}.highlight .vi{color:#008080}.highlight .il{color:#009999}kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.social__icons{margin-bottom:10px}.social__icon{display:inline-block;margin-right:10px}.slider picture img{width:100%}.videoWrapper{position:relative;padding-top:56.25%;margin-bottom:1.25rem}.videoWrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}.icon{position:relative;top:1px;display:inline-block;width:16px;height:16px}.icon-color{border:1px solid #aaa}.icon-color-white{background-color:#fff}.icon-color-black{background-color:#000}.icon-color-red{background-color:#ba2619}.toc-header{margin-bottom:0}#toc{display:block;margin:1rem 0 0 0}#toc>ol{margin-left:0}#toc>ol>li{margin-bottom:0.5rem}#toc ol{list-style-type:none}.clickable-header{cursor:pointer}.clickable-header:hover{text-decoration:underline}.top-level-header{display:inline-block}.back-to-top{position:relative;margin-left:8px;cursor:pointer;top:-3px}.contentSearch{margin-bottom:30px}@media only screen and (max-width: 40em){.contentSearch{margin-bottom:5px}}.contentSearch-wrapper{position:relative}.contentSearch-wrapper.small-collapse{margin:0 !important}.liveSearch-field{margin-bottom:0 !important}.liveSearch-button{margin-bottom:0}.liveSearch-result-list{position:absolute;width:100%;height:auto;background:white;border:1px #ccc;border-style:none solid solid solid;z-index:99;margin:0;list-style-type:none}@media only screen and (max-width: 40em){.liveSearch-result-list{position:relative}}.liveSearch-result-list li a{-webkit-transition:all 0.15s ease;transition:all 0.15s ease;padding:4px 10px;display:block;width:100%;height:100%;line-height:1.2}.liveSearch-result-list li a:hover{background-color:#eee}.liveSearch-result-list li a:first-child{padding-top:8px}.liveSearch-result-list li a:last-child{padding-bottom:8px}.searchPage-result-list{line-height:1.2;list-style-type:none}.searchPage-result-list li{margin-bottom:20px}@media only screen and (max-width: 40em){.searchPage-result-list li{margin-bottom:15px}}.searchPage-result-list li a{font-weight:bold;color:#1a0dab}.searchPage-result-list li a:hover{color:#1a0dab;text-decoration:underline}.searchPage-result-list li .url{color:#006621}@media only screen and (max-width: 40em){.searchPage-result-list li .additionalInfo{display:none}}.article-list{margin:0;padding:0;list-style-type:none}.article-list header h1{font-size:1.5rem}article header{margin-bottom:0.5rem}article header h1{margin-bottom:0}article .meta{font-size:0.9em} diff --git a/docs/docker-compose.yml b/docs/docker-compose.yml deleted file mode 100644 index 9999a5b6e8..0000000000 --- a/docs/docker-compose.yml +++ /dev/null @@ -1,10 +0,0 @@ -version: '2' - -services: - docs: - build: . - restart: always - ports: - - "4000:4000" - volumes: - - ./:/usr/src/app diff --git a/docs/img/icons/icon-128x128.png b/docs/img/icons/icon-128x128.png deleted file mode 100644 index 611f8d1a5c..0000000000 Binary files a/docs/img/icons/icon-128x128.png and /dev/null differ diff --git a/docs/img/icons/icon-144x144.png b/docs/img/icons/icon-144x144.png deleted file mode 100644 index e56c7c1f65..0000000000 Binary files a/docs/img/icons/icon-144x144.png and /dev/null differ diff --git a/docs/img/icons/icon-256x256.png b/docs/img/icons/icon-256x256.png deleted file mode 100644 index 5e6e534e05..0000000000 Binary files a/docs/img/icons/icon-256x256.png and /dev/null differ diff --git a/docs/img/icons/icon-384x384.png b/docs/img/icons/icon-384x384.png deleted file mode 100644 index 004a24c094..0000000000 Binary files a/docs/img/icons/icon-384x384.png and /dev/null differ diff --git a/docs/img/icons/icon-48x48.png b/docs/img/icons/icon-48x48.png deleted file mode 100644 index 2eaecef162..0000000000 Binary files a/docs/img/icons/icon-48x48.png and /dev/null differ diff --git a/docs/img/icons/icon-512x512.png b/docs/img/icons/icon-512x512.png deleted file mode 100644 index 94192e6a23..0000000000 Binary files a/docs/img/icons/icon-512x512.png and /dev/null differ diff --git a/docs/img/icons/icon-96x96.png b/docs/img/icons/icon-96x96.png deleted file mode 100644 index 3d24b64374..0000000000 Binary files a/docs/img/icons/icon-96x96.png and /dev/null differ diff --git a/docs/img/news/160912_grenade.jpg b/docs/img/news/160912_grenade.jpg deleted file mode 100644 index 6b9a3ad00c..0000000000 Binary files a/docs/img/news/160912_grenade.jpg and /dev/null differ diff --git a/docs/img/news/160912_slack_monochrome_black-950x442.png b/docs/img/news/160912_slack_monochrome_black-950x442.png deleted file mode 100644 index 09446f582e..0000000000 Binary files a/docs/img/news/160912_slack_monochrome_black-950x442.png and /dev/null differ diff --git a/docs/img/news/161104_blood.jpg b/docs/img/news/161104_blood.jpg deleted file mode 100644 index 80af0fdd04..0000000000 Binary files a/docs/img/news/161104_blood.jpg and /dev/null differ diff --git a/docs/img/news/170221_Zeus.jpg b/docs/img/news/170221_Zeus.jpg deleted file mode 100644 index 8d52b28aee..0000000000 Binary files a/docs/img/news/170221_Zeus.jpg and /dev/null differ diff --git a/docs/img/news/170221_csatconvoy.jpg b/docs/img/news/170221_csatconvoy.jpg deleted file mode 100644 index b80b907468..0000000000 Binary files a/docs/img/news/170221_csatconvoy.jpg and /dev/null differ diff --git a/docs/img/scope_module.jpg b/docs/img/scope_module.jpg deleted file mode 100644 index 19629bddd7..0000000000 Binary files a/docs/img/scope_module.jpg and /dev/null differ diff --git a/docs/img/slider01.jpg b/docs/img/slider01.jpg old mode 100755 new mode 100644 index e19d19c848..2e5961d58a Binary files a/docs/img/slider01.jpg and b/docs/img/slider01.jpg differ diff --git a/docs/img/slider01_mobile.jpg b/docs/img/slider01_mobile.jpg old mode 100755 new mode 100644 index 7ccc2942c2..5034e8021b Binary files a/docs/img/slider01_mobile.jpg and b/docs/img/slider01_mobile.jpg differ diff --git a/docs/img/slider02.jpg b/docs/img/slider02.jpg old mode 100755 new mode 100644 index 87d6fc4cc9..63ca4cc676 Binary files a/docs/img/slider02.jpg and b/docs/img/slider02.jpg differ diff --git a/docs/img/slider02_mobile.jpg b/docs/img/slider02_mobile.jpg old mode 100755 new mode 100644 index d3d4c6744c..37989dfdf0 Binary files a/docs/img/slider02_mobile.jpg and b/docs/img/slider02_mobile.jpg differ diff --git a/docs/img/slider03.jpg b/docs/img/slider03.jpg old mode 100755 new mode 100644 index 18a6804e19..4249c163b3 Binary files a/docs/img/slider03.jpg and b/docs/img/slider03.jpg differ diff --git a/docs/img/slider03_mobile.jpg b/docs/img/slider03_mobile.jpg old mode 100755 new mode 100644 index 9ec4d304ff..eaaea83f60 Binary files a/docs/img/slider03_mobile.jpg and b/docs/img/slider03_mobile.jpg differ diff --git a/docs/img/wiki/feature/ab_ingame.png b/docs/img/wiki/feature/ab_ingame.png deleted file mode 100644 index 6f53d714d7..0000000000 Binary files a/docs/img/wiki/feature/ab_ingame.png and /dev/null differ diff --git a/docs/img/wiki/feature/ab_module.jpg b/docs/img/wiki/feature/ab_module.jpg deleted file mode 100644 index 70d2ec52b5..0000000000 Binary files a/docs/img/wiki/feature/ab_module.jpg and /dev/null differ diff --git a/docs/img/wiki/feature/abtools_inventory.png b/docs/img/wiki/feature/abtools_inventory.png deleted file mode 100644 index 72e1607689..0000000000 Binary files a/docs/img/wiki/feature/abtools_inventory.png and /dev/null differ diff --git a/docs/img/wiki/feature/ace_blood_screen.jpg b/docs/img/wiki/feature/ace_blood_screen.jpg deleted file mode 100644 index 89a07bdfb6..0000000000 Binary files a/docs/img/wiki/feature/ace_blood_screen.jpg and /dev/null differ diff --git a/docs/img/wiki/feature/atragmx1.png b/docs/img/wiki/feature/atragmx1.png deleted file mode 100644 index e32a31c899..0000000000 Binary files a/docs/img/wiki/feature/atragmx1.png and /dev/null differ diff --git a/docs/img/wiki/feature/atragmx2.png b/docs/img/wiki/feature/atragmx2.png deleted file mode 100644 index 6cdaabd3f8..0000000000 Binary files a/docs/img/wiki/feature/atragmx2.png and /dev/null differ diff --git a/docs/img/wiki/feature/atragmx3.png b/docs/img/wiki/feature/atragmx3.png deleted file mode 100644 index dd4a1800e1..0000000000 Binary files a/docs/img/wiki/feature/atragmx3.png and /dev/null differ diff --git a/docs/img/wiki/feature/atragmx3a.png b/docs/img/wiki/feature/atragmx3a.png deleted file mode 100644 index 9e18243d56..0000000000 Binary files a/docs/img/wiki/feature/atragmx3a.png and /dev/null differ diff --git a/docs/img/wiki/feature/atragmx4.png b/docs/img/wiki/feature/atragmx4.png deleted file mode 100644 index 7db5b69077..0000000000 Binary files a/docs/img/wiki/feature/atragmx4.png and /dev/null differ diff --git a/docs/img/wiki/feature/atragmx5.png b/docs/img/wiki/feature/atragmx5.png deleted file mode 100644 index 6cba04cdd5..0000000000 Binary files a/docs/img/wiki/feature/atragmx5.png and /dev/null differ diff --git a/docs/img/wiki/feature/rangecard_menu.jpg b/docs/img/wiki/feature/rangecard_menu.jpg deleted file mode 100644 index d41ba9fe6b..0000000000 Binary files a/docs/img/wiki/feature/rangecard_menu.jpg and /dev/null differ diff --git a/docs/img/wiki/feature/scope_module.jpg b/docs/img/wiki/feature/scope_module.jpg deleted file mode 100644 index 19629bddd7..0000000000 Binary files a/docs/img/wiki/feature/scope_module.jpg and /dev/null differ diff --git a/docs/index.html b/docs/index.html index 13bbd53fc1..3bc84a2b03 100644 --- a/docs/index.html +++ b/docs/index.html @@ -8,7 +8,7 @@ sitemap: exclude: "yes" --- -Fork me on GitHub +Fork me on GitHub @@ -64,7 +64,7 @@ sitemap:

Useful frameworks and features

@@ -81,11 +81,11 @@ sitemap:
Everything you need to know about using the mod or developing for it.

-

ACE3 on Github
Latest code, issue reports, feature requests +

ACE3 on Github
Latest code, issue reports, feature requests and more.

-

ACE3 Public Chat
+

ACE3 Public Chat
Join our public chat! We're glad to answer questions concerning ACE3, development or Arma things.
If you made something with this mod (screen shots, artwork, videos) we'd love to see it.

diff --git a/docs/js/footer.dev.js b/docs/js/footer.dev.js index b594d22c70..0981fbe843 100644 --- a/docs/js/footer.dev.js +++ b/docs/js/footer.dev.js @@ -2,1594 +2,743 @@ * Build: http://modernizr.com/download/#-shiv-cssclasses-load */ ;window.Modernizr=function(a,b,c){function u(a){j.cssText=a}function v(a,b){return u(prefixes.join(a+";")+(b||""))}function w(a,b){return typeof a===b}function x(a,b){return!!~(""+a).indexOf(b)}function y(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:w(f,"function")?f.bind(d||b):f}return!1}var d="2.8.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m={},n={},o={},p=[],q=p.slice,r,s={}.hasOwnProperty,t;!w(s,"undefined")&&!w(s.call,"undefined")?t=function(a,b){return s.call(a,b)}:t=function(a,b){return b in a&&w(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=q.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(q.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(q.call(arguments)))};return e});for(var z in m)t(m,z)&&(r=z.toLowerCase(),e[r]=m[z](),p.push((e[r]?"":"no-")+r));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)t(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},u(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+p.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f img._pfLastSize) { - img._pfLastSize = img.offsetWidth; - sizes = img.sizes; - img.sizes += ",100vw"; - setTimeout(function () { - img.sizes = sizes; - }); - } - }; - - var findPictureImgs = function () { - var i; - var imgs = document.querySelectorAll("picture > img, img[srcset][sizes]"); - for (i = 0; i < imgs.length; i++) { - fixRespimg(imgs[i]); - } - }; - var onResize = function () { - clearTimeout(timer); - timer = setTimeout(findPictureImgs, 99); - }; - var mq = window.matchMedia && matchMedia("(orientation: landscape)"); - var init = function () { - onResize(); - - if (mq && mq.addListener) { - mq.addListener(onResize); - } - }; - - dummySrc.srcset = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; - - if (/^[c|i]|d$/.test(document.readyState || "")) { - init(); - } else { - document.addEventListener("DOMContentLoaded", init); - } - - return onResize; - })()); - } -})(window); - -/*! Picturefill - v3.0.2 - * http://scottjehl.github.io/picturefill - * Copyright (c) 2015 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; - * License: MIT - */ - -(function (window, document, undefined) { - // Enable strict mode - "use strict"; - - // HTML shim|v it for old IE (IE9 will still need the HTML video tag workaround) - document.createElement("picture"); - - var warn, eminpx, alwaysCheckWDescriptor, evalId; - // local object for method references and testing exposure - var pf = {}; - var isSupportTestReady = false; - var noop = function () { - }; - var image = document.createElement("img"); - var getImgAttr = image.getAttribute; - var setImgAttr = image.setAttribute; - var removeImgAttr = image.removeAttribute; - var docElem = document.documentElement; - var types = {}; - var cfg = { - //resource selection: - algorithm: "" - }; - var srcAttr = "data-pfsrc"; - var srcsetAttr = srcAttr + "set"; - // ua sniffing is done for undetectable img loading features, - // to do some non crucial perf optimizations - var ua = navigator.userAgent; - var supportAbort = (/rident/).test(ua) || ((/ecko/).test(ua) && ua.match(/rv\:(\d+)/) && RegExp.$1 > 35 ); - var curSrcProp = "currentSrc"; - var regWDesc = /\s+\+?\d+(e\d+)?w/; - var regSize = /(\([^)]+\))?\s*(.+)/; - var setOptions = window.picturefillCFG; - /** - * Shortcut property for https://w3c.github.io/webappsec/specs/mixedcontent/#restricts-mixed-content ( for easy overriding in tests ) - */ - // baseStyle also used by getEmValue (i.e.: width: 1em is important) - var baseStyle = "position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)"; - var fsCss = "font-size:100%!important;"; - var isVwDirty = true; - - var cssCache = {}; - var sizeLengthCache = {}; - var DPR = window.devicePixelRatio; - var units = { - px: 1, - "in": 96 - }; - var anchor = document.createElement("a"); - /** - * alreadyRun flag used for setOptions. is it true setOptions will reevaluate - * @type {boolean} - */ - var alreadyRun = false; - - // Reusable, non-"g" Regexes - - // (Don't use \s, to avoid matching non-breaking space.) - var regexLeadingSpaces = /^[ \t\n\r\u000c]+/, - regexLeadingCommasOrSpaces = /^[, \t\n\r\u000c]+/, - regexLeadingNotSpaces = /^[^ \t\n\r\u000c]+/, - regexTrailingCommas = /[,]+$/, - regexNonNegativeInteger = /^\d+$/, - - // ( Positive or negative or unsigned integers or decimals, without or without exponents. - // Must include at least one digit. - // According to spec tests any decimal point must be followed by a digit. - // No leading plus sign is allowed.) - // https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number - regexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/; - - var on = function (obj, evt, fn, capture) { - if (obj.addEventListener) { - obj.addEventListener(evt, fn, capture || false); - } else if (obj.attachEvent) { - obj.attachEvent("on" + evt, fn); - } - }; - - /** - * simple memoize function: - */ - - var memoize = function (fn) { - var cache = {}; - return function (input) { - if (!(input in cache)) { - cache[input] = fn(input); - } - return cache[input]; - }; - }; - - // UTILITY FUNCTIONS - - // Manual is faster than RegEx - // http://jsperf.com/whitespace-character/5 - function isSpace(c) { - return (c === "\u0020" || // space - c === "\u0009" || // horizontal tab - c === "\u000A" || // new line - c === "\u000C" || // form feed - c === "\u000D"); // carriage return - } - - /** - * gets a mediaquery and returns a boolean or gets a css length and returns a number - * @param css mediaqueries or css length - * @returns {boolean|number} - * - * based on: https://gist.github.com/jonathantneal/db4f77009b155f083738 - */ - var evalCSS = (function () { - - var regLength = /^([\d\.]+)(em|vw|px)$/; - var replace = function () { - var args = arguments, index = 0, string = args[0]; - while (++index in args) { - string = string.replace(args[index], args[++index]); - } - return string; - }; - - var buildStr = memoize(function (css) { - - return "return " + replace((css || "").toLowerCase(), - // interpret `and` - /\band\b/g, "&&", - - // interpret `,` - /,/g, "||", - - // interpret `min-` as >= - /min-([a-z-\s]+):/g, "e.$1>=", - - // interpret `max-` as <= - /max-([a-z-\s]+):/g, "e.$1<=", - - //calc value - /calc([^)]+)/g, "($1)", - - // interpret css values - /(\d+[\.]*[\d]*)([a-z]+)/g, "($1 * e.$2)", - //make eval less evil - /^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/ig, "" - ) + ";"; - }); - - return function (css, length) { - var parsedLength; - if (!(css in cssCache)) { - cssCache[css] = false; - if (length && (parsedLength = css.match(regLength))) { - cssCache[css] = parsedLength[1] * units[parsedLength[2]]; - } else { - /*jshint evil:true */ - try { - cssCache[css] = new Function("e", buildStr(css))(units); - } catch (e) { - } - /*jshint evil:false */ - } - } - return cssCache[css]; - }; - })(); - - var setResolution = function (candidate, sizesattr) { - if (candidate.w) { // h = means height: || descriptor.type === 'h' do not handle yet... - candidate.cWidth = pf.calcListLength(sizesattr || "100vw"); - candidate.res = candidate.w / candidate.cWidth; - } else { - candidate.res = candidate.d; - } - return candidate; - }; - - /** - * - * @param opt - */ - var picturefill = function (opt) { - - if (!isSupportTestReady) { - return; - } - - var elements, i, plen; - - var options = opt || {}; - - if (options.elements && options.elements.nodeType === 1) { - if (options.elements.nodeName.toUpperCase() === "IMG") { - options.elements = [options.elements]; - } else { - options.context = options.elements; - options.elements = null; - } - } - - elements = options.elements || pf.qsa((options.context || document), ( options.reevaluate || options.reselect ) ? pf.sel : pf.selShort); - - if ((plen = elements.length)) { - - pf.setupRun(options); - alreadyRun = true; - - // Loop through all elements - for (i = 0; i < plen; i++) { - pf.fillImg(elements[i], options); - } - - pf.teardownRun(options); - } - }; - - /** - * outputs a warning for the developer - * @param {message} - * @type {Function} - */ - warn = ( window.console && console.warn ) ? - function (message) { - console.warn(message); - } : - noop - ; - - if (!(curSrcProp in image)) { - curSrcProp = "src"; - } - - // Add support for standard mime types. - types["image/jpeg"] = true; - types["image/gif"] = true; - types["image/png"] = true; - - function detectTypeSupport(type, typeUri) { - // based on Modernizr's lossless img-webp test - // note: asynchronous - var image = new window.Image(); - image.onerror = function () { - types[type] = false; - picturefill(); - }; - image.onload = function () { - types[type] = image.width === 1; - picturefill(); - }; - image.src = typeUri; - return "pending"; - } - - // test svg support - types["image/svg+xml"] = document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1"); - - /** - * updates the internal vW property with the current viewport width in px - */ - function updateMetrics() { - - isVwDirty = false; - DPR = window.devicePixelRatio; - cssCache = {}; - sizeLengthCache = {}; - - pf.DPR = DPR || 1; - - units.width = Math.max(window.innerWidth || 0, docElem.clientWidth); - units.height = Math.max(window.innerHeight || 0, docElem.clientHeight); - - units.vw = units.width / 100; - units.vh = units.height / 100; - - evalId = [units.height, units.width, DPR].join("-"); - - units.em = pf.getEmValue(); - units.rem = units.em; - } - - function chooseLowRes(lowerValue, higherValue, dprValue, isCached) { - var bonusFactor, tooMuch, bonus, meanDensity; - - //experimental - if (cfg.algorithm === "saveData") { - if (lowerValue > 2.7) { - meanDensity = dprValue + 1; - } else { - tooMuch = higherValue - dprValue; - bonusFactor = Math.pow(lowerValue - 0.6, 1.5); - - bonus = tooMuch * bonusFactor; - - if (isCached) { - bonus += 0.1 * bonusFactor; - } - - meanDensity = lowerValue + bonus; - } - } else { - meanDensity = (dprValue > 1) ? - Math.sqrt(lowerValue * higherValue) : - lowerValue; - } - - return meanDensity > dprValue; - } - - function applyBestCandidate(img) { - var srcSetCandidates; - var matchingSet = pf.getSet(img); - var evaluated = false; - if (matchingSet !== "pending") { - evaluated = evalId; - if (matchingSet) { - srcSetCandidates = pf.setRes(matchingSet); - pf.applySetCandidate(srcSetCandidates, img); - } - } - img[pf.ns].evaled = evaluated; - } - - function ascendingSort(a, b) { - return a.res - b.res; - } - - function setSrcToCur(img, src, set) { - var candidate; - if (!set && src) { - set = img[pf.ns].sets; - set = set && set[set.length - 1]; - } - - candidate = getCandidateForSrc(src, set); - - if (candidate) { - src = pf.makeUrl(src); - img[pf.ns].curSrc = src; - img[pf.ns].curCan = candidate; - - if (!candidate.res) { - setResolution(candidate, candidate.set.sizes); - } - } - return candidate; - } - - function getCandidateForSrc(src, set) { - var i, candidate, candidates; - if (src && set) { - candidates = pf.parseSet(set); - src = pf.makeUrl(src); - for (i = 0; i < candidates.length; i++) { - if (src === pf.makeUrl(candidates[i].url)) { - candidate = candidates[i]; - break; - } - } - } - return candidate; - } - - function getAllSourceElements(picture, candidates) { - var i, len, source, srcset; - - // SPEC mismatch intended for size and perf: - // actually only source elements preceding the img should be used - // also note: don't use qsa here, because IE8 sometimes doesn't like source as the key part in a selector - var sources = picture.getElementsByTagName("source"); - - for (i = 0, len = sources.length; i < len; i++) { - source = sources[i]; - source[pf.ns] = true; - srcset = source.getAttribute("srcset"); - - // if source does not have a srcset attribute, skip - if (srcset) { - candidates.push({ - srcset: srcset, - media: source.getAttribute("media"), - type: source.getAttribute("type"), - sizes: source.getAttribute("sizes") - }); - } - } - } - - /** - * Srcset Parser - * By Alex Bell | MIT License - * - * @returns Array [{url: _, d: _, w: _, h:_, set:_(????)}, ...] - * - * Based super duper closely on the reference algorithm at: - * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute - */ - - // 1. Let input be the value passed to this algorithm. - // (TO-DO : Explain what "set" argument is here. Maybe choose a more - // descriptive & more searchable name. Since passing the "set" in really has - // nothing to do with parsing proper, I would prefer this assignment eventually - // go in an external fn.) - function parseSrcset(input, set) { - - function collectCharacters(regEx) { - var chars, - match = regEx.exec(input.substring(pos)); - if (match) { - chars = match[0]; - pos += chars.length; - return chars; - } - } - - var inputLength = input.length, - url, - descriptors, - currentDescriptor, - state, - c, - - // 2. Let position be a pointer into input, initially pointing at the start - // of the string. - pos = 0, - - // 3. Let candidates be an initially empty source set. - candidates = []; - - /** - * Adds descriptor properties to a candidate, pushes to the candidates array - * @return undefined - */ - // (Declared outside of the while loop so that it's only created once. - // (This fn is defined before it is used, in order to pass JSHINT. - // Unfortunately this breaks the sequencing of the spec comments. :/ ) - function parseDescriptors() { - - // 9. Descriptor parser: Let error be no. - var pError = false, - - // 10. Let width be absent. - // 11. Let density be absent. - // 12. Let future-compat-h be absent. (We're implementing it now as h) - w, d, h, i, - candidate = {}, - desc, lastChar, value, intVal, floatVal; - - // 13. For each descriptor in descriptors, run the appropriate set of steps - // from the following list: - for (i = 0; i < descriptors.length; i++) { - desc = descriptors[i]; - - lastChar = desc[desc.length - 1]; - value = desc.substring(0, desc.length - 1); - intVal = parseInt(value, 10); - floatVal = parseFloat(value); - - // If the descriptor consists of a valid non-negative integer followed by - // a U+0077 LATIN SMALL LETTER W character - if (regexNonNegativeInteger.test(value) && (lastChar === "w")) { - - // If width and density are not both absent, then let error be yes. - if (w || d) { - pError = true; - } - - // Apply the rules for parsing non-negative integers to the descriptor. - // If the result is zero, let error be yes. - // Otherwise, let width be the result. - if (intVal === 0) { - pError = true; - } else { - w = intVal; - } - - // If the descriptor consists of a valid floating-point number followed by - // a U+0078 LATIN SMALL LETTER X character - } else if (regexFloatingPoint.test(value) && (lastChar === "x")) { - - // If width, density and future-compat-h are not all absent, then let error - // be yes. - if (w || d || h) { - pError = true; - } - - // Apply the rules for parsing floating-point number values to the descriptor. - // If the result is less than zero, let error be yes. Otherwise, let density - // be the result. - if (floatVal < 0) { - pError = true; - } else { - d = floatVal; - } - - // If the descriptor consists of a valid non-negative integer followed by - // a U+0068 LATIN SMALL LETTER H character - } else if (regexNonNegativeInteger.test(value) && (lastChar === "h")) { - - // If height and density are not both absent, then let error be yes. - if (h || d) { - pError = true; - } - - // Apply the rules for parsing non-negative integers to the descriptor. - // If the result is zero, let error be yes. Otherwise, let future-compat-h - // be the result. - if (intVal === 0) { - pError = true; - } else { - h = intVal; - } - - // Anything else, Let error be yes. - } else { - pError = true; - } - } // (close step 13 for loop) - - // 15. If error is still no, then append a new image source to candidates whose - // URL is url, associated with a width width if not absent and a pixel - // density density if not absent. Otherwise, there is a parse error. - if (!pError) { - candidate.url = url; - - if (w) { - candidate.w = w; - } - if (d) { - candidate.d = d; - } - if (h) { - candidate.h = h; - } - if (!h && !d && !w) { - candidate.d = 1; - } - if (candidate.d === 1) { - set.has1x = true; - } - candidate.set = set; - - candidates.push(candidate); - } - } // (close parseDescriptors fn) - - /** - * Tokenizes descriptor properties prior to parsing - * Returns undefined. - * (Again, this fn is defined before it is used, in order to pass JSHINT. - * Unfortunately this breaks the logical sequencing of the spec comments. :/ ) - */ - function tokenize() { - - // 8.1. Descriptor tokeniser: Skip whitespace - collectCharacters(regexLeadingSpaces); - - // 8.2. Let current descriptor be the empty string. - currentDescriptor = ""; - - // 8.3. Let state be in descriptor. - state = "in descriptor"; - - while (true) { - - // 8.4. Let c be the character at position. - c = input.charAt(pos); - - // Do the following depending on the value of state. - // For the purpose of this step, "EOF" is a special character representing - // that position is past the end of input. - - // In descriptor - if (state === "in descriptor") { - // Do the following, depending on the value of c: - - // Space character - // If current descriptor is not empty, append current descriptor to - // descriptors and let current descriptor be the empty string. - // Set state to after descriptor. - if (isSpace(c)) { - if (currentDescriptor) { - descriptors.push(currentDescriptor); - currentDescriptor = ""; - state = "after descriptor"; - } - - // U+002C COMMA (,) - // Advance position to the next character in input. If current descriptor - // is not empty, append current descriptor to descriptors. Jump to the step - // labeled descriptor parser. - } else if (c === ",") { - pos += 1; - if (currentDescriptor) { - descriptors.push(currentDescriptor); - } - parseDescriptors(); - return; - - // U+0028 LEFT PARENTHESIS (() - // Append c to current descriptor. Set state to in parens. - } else if (c === "\u0028") { - currentDescriptor = currentDescriptor + c; - state = "in parens"; - - // EOF - // If current descriptor is not empty, append current descriptor to - // descriptors. Jump to the step labeled descriptor parser. - } else if (c === "") { - if (currentDescriptor) { - descriptors.push(currentDescriptor); - } - parseDescriptors(); - return; - - // Anything else - // Append c to current descriptor. - } else { - currentDescriptor = currentDescriptor + c; - } - // (end "in descriptor" - - // In parens - } else if (state === "in parens") { - - // U+0029 RIGHT PARENTHESIS ()) - // Append c to current descriptor. Set state to in descriptor. - if (c === ")") { - currentDescriptor = currentDescriptor + c; - state = "in descriptor"; - - // EOF - // Append current descriptor to descriptors. Jump to the step labeled - // descriptor parser. - } else if (c === "") { - descriptors.push(currentDescriptor); - parseDescriptors(); - return; - - // Anything else - // Append c to current descriptor. - } else { - currentDescriptor = currentDescriptor + c; - } - - // After descriptor - } else if (state === "after descriptor") { - - // Do the following, depending on the value of c: - // Space character: Stay in this state. - if (isSpace(c)) { - - // EOF: Jump to the step labeled descriptor parser. - } else if (c === "") { - parseDescriptors(); - return; - - // Anything else - // Set state to in descriptor. Set position to the previous character in input. - } else { - state = "in descriptor"; - pos -= 1; - - } - } - - // Advance position to the next character in input. - pos += 1; - - // Repeat this step. - } // (close while true loop) - } - - // 4. Splitting loop: Collect a sequence of characters that are space - // characters or U+002C COMMA characters. If any U+002C COMMA characters - // were collected, that is a parse error. - while (true) { - collectCharacters(regexLeadingCommasOrSpaces); - - // 5. If position is past the end of input, return candidates and abort these steps. - if (pos >= inputLength) { - return candidates; // (we're done, this is the sole return path) - } - - // 6. Collect a sequence of characters that are not space characters, - // and let that be url. - url = collectCharacters(regexLeadingNotSpaces); - - // 7. Let descriptors be a new empty list. - descriptors = []; - - // 8. If url ends with a U+002C COMMA character (,), follow these substeps: - // (1). Remove all trailing U+002C COMMA characters from url. If this removed - // more than one character, that is a parse error. - if (url.slice(-1) === ",") { - url = url.replace(regexTrailingCommas, ""); - // (Jump ahead to step 9 to skip tokenization and just push the candidate). - parseDescriptors(); - - // Otherwise, follow these substeps: - } else { - tokenize(); - } // (close else of step 8) - - // 16. Return to the step labeled splitting loop. - } // (Close of big while loop.) - } - - /* - * Sizes Parser - * - * By Alex Bell | MIT License - * - * Non-strict but accurate and lightweight JS Parser for the string value - * - * Reference algorithm at: - * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-sizes-attribute - * - * Most comments are copied in directly from the spec - * (except for comments in parens). - * - * Grammar is: - * = # [ , ]? | - * = - * = - * http://www.w3.org/html/wg/drafts/html/master/embedded-content.html#attr-img-sizes - * - * E.g. "(max-width: 30em) 100vw, (max-width: 50em) 70vw, 100vw" - * or "(min-width: 30em), calc(30vw - 15px)" or just "30vw" - * - * Returns the first valid with a media condition that evaluates to true, - * or "100vw" if all valid media conditions evaluate to false. - * - */ - - function parseSizes(strValue) { - - // (Percentage CSS lengths are not allowed in this case, to avoid confusion: - // https://html.spec.whatwg.org/multipage/embedded-content.html#valid-source-size-list - // CSS allows a single optional plus or minus sign: - // http://www.w3.org/TR/CSS2/syndata.html#numbers - // CSS is ASCII case-insensitive: - // http://www.w3.org/TR/CSS2/syndata.html#characters ) - // Spec allows exponential notation for type: - // http://dev.w3.org/csswg/css-values/#numbers - var regexCssLengthWithUnits = /^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i; - - // (This is a quick and lenient test. Because of optional unlimited-depth internal - // grouping parens and strict spacing rules, this could get very complicated.) - var regexCssCalc = /^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i; - - var i; - var unparsedSizesList; - var unparsedSizesListLength; - var unparsedSize; - var lastComponentValue; - var size; - - // UTILITY FUNCTIONS - - // (Toy CSS parser. The goals here are: - // 1) expansive test coverage without the weight of a full CSS parser. - // 2) Avoiding regex wherever convenient. - // Quick tests: http://jsfiddle.net/gtntL4gr/3/ - // Returns an array of arrays.) - function parseComponentValues(str) { - var chrctr; - var component = ""; - var componentArray = []; - var listArray = []; - var parenDepth = 0; - var pos = 0; - var inComment = false; - - function pushComponent() { - if (component) { - componentArray.push(component); - component = ""; - } - } - - function pushComponentArray() { - if (componentArray[0]) { - listArray.push(componentArray); - componentArray = []; - } - } - - // (Loop forwards from the beginning of the string.) - while (true) { - chrctr = str.charAt(pos); - - if (chrctr === "") { // ( End of string reached.) - pushComponent(); - pushComponentArray(); - return listArray; - } else if (inComment) { - if ((chrctr === "*") && (str[pos + 1] === "/")) { // (At end of a comment.) - inComment = false; - pos += 2; - pushComponent(); - continue; - } else { - pos += 1; // (Skip all characters inside comments.) - continue; - } - } else if (isSpace(chrctr)) { - // (If previous character in loop was also a space, or if - // at the beginning of the string, do not add space char to - // component.) - if ((str.charAt(pos - 1) && isSpace(str.charAt(pos - 1)) ) || !component) { - pos += 1; - continue; - } else if (parenDepth === 0) { - pushComponent(); - pos += 1; - continue; - } else { - // (Replace any space character with a plain space for legibility.) - chrctr = " "; - } - } else if (chrctr === "(") { - parenDepth += 1; - } else if (chrctr === ")") { - parenDepth -= 1; - } else if (chrctr === ",") { - pushComponent(); - pushComponentArray(); - pos += 1; - continue; - } else if ((chrctr === "/") && (str.charAt(pos + 1) === "*")) { - inComment = true; - pos += 2; - continue; - } - - component = component + chrctr; - pos += 1; - } - } - - function isValidNonNegativeSourceSizeValue(s) { - if (regexCssLengthWithUnits.test(s) && (parseFloat(s) >= 0)) { - return true; - } - if (regexCssCalc.test(s)) { - return true; - } - // ( http://www.w3.org/TR/CSS2/syndata.html#numbers says: - // "-0 is equivalent to 0 and is not a negative number." which means that - // unitless zero and unitless negative zero must be accepted as special cases.) - if ((s === "0") || (s === "-0") || (s === "+0")) { - return true; - } +/*! Picturefill - v2.3.0 - 2015-03-23 +* http://scottjehl.github.io/picturefill +* Copyright (c) 2015 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT */ +/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */ + +window.matchMedia || (window.matchMedia = function() { + "use strict"; + + // For browsers that support matchMedium api such as IE 9 and webkit + var styleMedia = (window.styleMedia || window.media); + + // For those that don't support matchMedium + if (!styleMedia) { + var style = document.createElement('style'), + script = document.getElementsByTagName('script')[0], + info = null; + + style.type = 'text/css'; + style.id = 'matchmediajs-test'; + + script.parentNode.insertBefore(style, script); + + // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers + info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle; + + styleMedia = { + matchMedium: function(media) { + var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }'; + + // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers + if (style.styleSheet) { + style.styleSheet.cssText = text; + } else { + style.textContent = text; + } + + // Test if media query is true or false + return info.width === '1px'; + } + }; + } + + return function(media) { + return { + matches: styleMedia.matchMedium(media || 'all'), + media: media || 'all' + }; + }; +}()); +/*! Picturefill - Responsive Images that work today. +* Author: Scott Jehl, Filament Group, 2012 ( new proposal implemented by Shawn Jansepar ) +* License: MIT/GPLv2 +* Spec: http://picture.responsiveimages.org/ +*/ +(function( w, doc, image ) { + // Enable strict mode + "use strict"; + + function expose(picturefill) { + /* expose picturefill */ + if ( typeof module === "object" && typeof module.exports === "object" ) { + // CommonJS, just export + module.exports = picturefill; + } else if ( typeof define === "function" && define.amd ) { + // AMD support + define( "picturefill", function() { return picturefill; } ); + } + if ( typeof w === "object" ) { + // If no AMD and we are in the browser, attach to window + w.picturefill = picturefill; + } + } + + // If picture is supported, well, that's awesome. Let's get outta here... + if ( w.HTMLPictureElement ) { + expose(function() { }); + return; + } + + // HTML shim|v it for old IE (IE9 will still need the HTML video tag workaround) + doc.createElement( "picture" ); + + // local object for method references and testing exposure + var pf = w.picturefill || {}; + + var regWDesc = /\s+\+?\d+(e\d+)?w/; + + // namespace + pf.ns = "picturefill"; + + // srcset support test + (function() { + pf.srcsetSupported = "srcset" in image; + pf.sizesSupported = "sizes" in image; + })(); + + // just a string trim workaround + pf.trim = function( str ) { + return str.trim ? str.trim() : str.replace( /^\s+|\s+$/g, "" ); + }; + + /** + * Gets a string and returns the absolute URL + * @param src + * @returns {String} absolute URL + */ + pf.makeUrl = (function() { + var anchor = doc.createElement( "a" ); + return function(src) { + anchor.href = src; + return anchor.href; + }; + })(); + + /** + * Shortcut method for https://w3c.github.io/webappsec/specs/mixedcontent/#restricts-mixed-content ( for easy overriding in tests ) + */ + pf.restrictsMixedContent = function() { + return w.location.protocol === "https:"; + }; + /** + * Shortcut method for matchMedia ( for easy overriding in tests ) + */ + + pf.matchesMedia = function( media ) { + return w.matchMedia && w.matchMedia( media ).matches; + }; + + // Shortcut method for `devicePixelRatio` ( for easy overriding in tests ) + pf.getDpr = function() { + return ( w.devicePixelRatio || 1 ); + }; + + /** + * Get width in css pixel value from a "length" value + * http://dev.w3.org/csswg/css-values-3/#length-value + */ + pf.getWidthFromLength = function( length ) { + var cssValue; + // If a length is specified and doesn’t contain a percentage, and it is greater than 0 or using `calc`, use it. Else, abort. + if ( !(length && length.indexOf( "%" ) > -1 === false && ( parseFloat( length ) > 0 || length.indexOf( "calc(" ) > -1 )) ) { return false; } - // When asked to parse a sizes attribute from an element, parse a - // comma-separated list of component values from the value of the element's - // sizes attribute (or the empty string, if the attribute is absent), and let - // unparsed sizes list be the result. - // http://dev.w3.org/csswg/css-syntax/#parse-comma-separated-list-of-component-values + /** + * If length is specified in `vw` units, use `%` instead since the div we’re measuring + * is injected at the top of the document. + * + * TODO: maybe we should put this behind a feature test for `vw`? The risk of doing this is possible browser inconsistancies with vw vs % + */ + length = length.replace( "vw", "%" ); - unparsedSizesList = parseComponentValues(strValue); - unparsedSizesListLength = unparsedSizesList.length; + // Create a cached element for getting length value widths + if ( !pf.lengthEl ) { + pf.lengthEl = doc.createElement( "div" ); - // For each unparsed size in unparsed sizes list: - for (i = 0; i < unparsedSizesListLength; i++) { - unparsedSize = unparsedSizesList[i]; + // Positioning styles help prevent padding/margin/width on `html` or `body` from throwing calculations off. + pf.lengthEl.style.cssText = "border:0;display:block;font-size:1em;left:0;margin:0;padding:0;position:absolute;visibility:hidden"; - // 1. Remove all consecutive s from the end of unparsed size. - // ( parseComponentValues() already omits spaces outside of parens. ) + // Add a class, so that everyone knows where this element comes from + pf.lengthEl.className = "helper-from-picturefill-js"; + } - // If unparsed size is now empty, that is a parse error; continue to the next - // iteration of this algorithm. - // ( parseComponentValues() won't push an empty array. ) + pf.lengthEl.style.width = "0px"; - // 2. If the last component value in unparsed size is a valid non-negative - // , let size be its value and remove the component value - // from unparsed size. Any CSS function other than the calc() function is - // invalid. Otherwise, there is a parse error; continue to the next iteration - // of this algorithm. - // http://dev.w3.org/csswg/css-syntax/#parse-component-value - lastComponentValue = unparsedSize[unparsedSize.length - 1]; + try { + pf.lengthEl.style.width = length; + } catch ( e ) {} - if (isValidNonNegativeSourceSizeValue(lastComponentValue)) { - size = lastComponentValue; - unparsedSize.pop(); - } else { - continue; - } + doc.body.appendChild(pf.lengthEl); - // 3. Remove all consecutive s from the end of unparsed - // size. If unparsed size is now empty, return size and exit this algorithm. - // If this was not the last item in unparsed sizes list, that is a parse error. - if (unparsedSize.length === 0) { - return size; - } + cssValue = pf.lengthEl.offsetWidth; - // 4. Parse the remaining component values in unparsed size as a - // . If it does not parse correctly, or it does parse - // correctly but the evaluates to false, continue to the - // next iteration of this algorithm. - // (Parsing all possible compound media conditions in JS is heavy, complicated, - // and the payoff is unclear. Is there ever an situation where the - // media condition parses incorrectly but still somehow evaluates to true? - // Can we just rely on the browser/polyfill to do it?) - unparsedSize = unparsedSize.join(" "); - if (!(pf.matchesMedia(unparsedSize) )) { - continue; - } + if ( cssValue <= 0 ) { + cssValue = false; + } - // 5. Return size and exit this algorithm. - return size; - } + doc.body.removeChild( pf.lengthEl ); - // If the above algorithm exhausts unparsed sizes list without returning a - // size value, return 100vw. - return "100vw"; - } + return cssValue; + }; - // namespace - pf.ns = ("pf" + new Date().getTime()).substr(0, 9); - - // srcset support test - pf.supSrcset = "srcset" in image; - pf.supSizes = "sizes" in image; - pf.supPicture = !!window.HTMLPictureElement; - - // UC browser does claim to support srcset and picture, but not sizes, - // this extended test reveals the browser does support nothing - if (pf.supSrcset && pf.supPicture && !pf.supSizes) { - (function (image2) { - image.srcset = "data:,a"; - image2.src = "data:,a"; - pf.supSrcset = image.complete === image2.complete; - pf.supPicture = pf.supSrcset && pf.supPicture; - })(document.createElement("img")); - } - - // Safari9 has basic support for sizes, but does't expose the `sizes` idl attribute - if (pf.supSrcset && !pf.supSizes) { - - (function () { - var width2 = "data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw=="; - var width1 = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; - var img = document.createElement("img"); - var test = function () { - var width = img.width; - - if (width === 2) { - pf.supSizes = true; - } - - alwaysCheckWDescriptor = pf.supSrcset && !pf.supSizes; - - isSupportTestReady = true; - // force async - setTimeout(picturefill); - }; - - img.onload = test; - img.onerror = test; - img.setAttribute("sizes", "9px"); - - img.srcset = width1 + " 1w," + width2 + " 9w"; - img.src = width1; - })(); - - } else { - isSupportTestReady = true; - } - - // using pf.qsa instead of dom traversing does scale much better, - // especially on sites mixing responsive and non-responsive images - pf.selShort = "picture>img,img[srcset]"; - pf.sel = pf.selShort; - pf.cfg = cfg; - - /** - * Shortcut property for `devicePixelRatio` ( for easy overriding in tests ) - */ - pf.DPR = (DPR || 1 ); - pf.u = units; - - // container of supported mime types that one might need to qualify before using - pf.types = types; - - pf.setSize = noop; - - /** - * Gets a string and returns the absolute URL - * @param src - * @returns {String} absolute URL - */ - - pf.makeUrl = memoize(function (src) { - anchor.href = src; - return anchor.href; - }); - - /** - * Gets a DOM element or document and a selctor and returns the found matches - * Can be extended with jQuery/Sizzle for IE7 support - * @param context - * @param sel - * @returns {NodeList|Array} - */ - pf.qsa = function (context, sel) { - return ( "querySelector" in context ) ? context.querySelectorAll(sel) : []; - }; - - /** - * Shortcut method for matchMedia ( for easy overriding in tests ) - * wether native or pf.mMQ is used will be decided lazy on first call - * @returns {boolean} - */ - pf.matchesMedia = function () { - if (window.matchMedia && (matchMedia("(min-width: 0.1em)") || {}).matches) { - pf.matchesMedia = function (media) { - return !media || ( matchMedia(media).matches ); - }; - } else { - pf.matchesMedia = pf.mMQ; - } - - return pf.matchesMedia.apply(this, arguments); - }; - - /** - * A simplified matchMedia implementation for IE8 and IE9 - * handles only min-width/max-width with px or em values - * @param media - * @returns {boolean} - */ - pf.mMQ = function (media) { - return media ? evalCSS(media) : true; - }; - - /** - * Returns the calculated length in css pixel from the given sourceSizeValue - * http://dev.w3.org/csswg/css-values-3/#length-value - * intended Spec mismatches: - * * Does not check for invalid use of CSS functions - * * Does handle a computed length of 0 the same as a negative and therefore invalid value - * @param sourceSizeValue - * @returns {Number} - */ - pf.calcLength = function (sourceSizeValue) { - - var value = evalCSS(sourceSizeValue, true) || false; - if (value < 0) { - value = false; - } - - return value; - }; - - /** - * Takes a type string and checks if its supported - */ - - pf.supportsType = function (type) { - return ( type ) ? types[type] : true; - }; - - /** - * Parses a sourceSize into mediaCondition (media) and sourceSizeValue (length) - * @param sourceSizeStr - * @returns {*} - */ - pf.parseSize = memoize(function (sourceSizeStr) { - var match = ( sourceSizeStr || "" ).match(regSize); - return { - media: match && match[1], - length: match && match[2] + pf.detectTypeSupport = function( type, typeUri ) { + // based on Modernizr's lossless img-webp test + // note: asynchronous + var image = new w.Image(); + image.onerror = function() { + pf.types[ type ] = false; + picturefill(); }; - }); + image.onload = function() { + pf.types[ type ] = image.width === 1; + picturefill(); + }; + image.src = typeUri; - pf.parseSet = function (set) { - if (!set.cands) { - set.cands = parseSrcset(set.srcset, set); - } - return set.cands; + return "pending"; + }; + // container of supported mime types that one might need to qualify before using + pf.types = pf.types || {}; + + pf.initTypeDetects = function() { + // Add support for standard mime types + pf.types[ "image/jpeg" ] = true; + pf.types[ "image/gif" ] = true; + pf.types[ "image/png" ] = true; + pf.types[ "image/svg+xml" ] = doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1"); + pf.types[ "image/webp" ] = pf.detectTypeSupport("image/webp", "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="); }; - /** - * returns 1em in css px for html/body default size - * function taken from respondjs - * @returns {*|number} - */ - pf.getEmValue = function () { - var body; - if (!eminpx && (body = document.body)) { - var div = document.createElement("div"), - originalHTMLCSS = docElem.style.cssText, - originalBodyCSS = body.style.cssText; + pf.verifyTypeSupport = function( source ) { + var type = source.getAttribute( "type" ); + // if type attribute exists, return test result, otherwise return true + if ( type === null || type === "" ) { + return true; + } else { + var pfType = pf.types[ type ]; + // if the type test is a function, run it and return "pending" status. The function will rerun picturefill on pending elements once finished. + if ( typeof pfType === "string" && pfType !== "pending") { + pf.types[ type ] = pf.detectTypeSupport( type, pfType ); + return "pending"; + } else if ( typeof pfType === "function" ) { + pfType(); + return "pending"; + } else { + return pfType; + } + } + }; - div.style.cssText = baseStyle; + // Parses an individual `size` and returns the length, and optional media query + pf.parseSize = function( sourceSizeStr ) { + var match = /(\([^)]+\))?\s*(.+)/g.exec( sourceSizeStr ); + return { + media: match && match[1], + length: match && match[2] + }; + }; - // 1em in a media query is the value of the default font size of the browser - // reset docElem and body to ensure the correct value is returned - docElem.style.cssText = fsCss; - body.style.cssText = fsCss; + // Takes a string of sizes and returns the width in pixels as a number + pf.findWidthFromSourceSize = function( sourceSizeListStr ) { + // Split up source size list, ie ( max-width: 30em ) 100%, ( max-width: 50em ) 50%, 33% + // or (min-width:30em) calc(30% - 15px) + var sourceSizeList = pf.trim( sourceSizeListStr ).split( /\s*,\s*/ ), + winningLength; - body.appendChild(div); - eminpx = div.offsetWidth; - body.removeChild(div); + for ( var i = 0, len = sourceSizeList.length; i < len; i++ ) { + // Match ? length, ie ( min-width: 50em ) 100% + var sourceSize = sourceSizeList[ i ], + // Split "( min-width: 50em ) 100%" into separate strings + parsedSize = pf.parseSize( sourceSize ), + length = parsedSize.length, + media = parsedSize.media; - //also update eminpx before returning - eminpx = parseFloat(eminpx, 10); + if ( !length ) { + continue; + } + // if there is no media query or it matches, choose this as our winning length + if ( (!media || pf.matchesMedia( media )) && + // pass the length to a method that can properly determine length + // in pixels based on these formats: http://dev.w3.org/csswg/css-values-3/#length-value + (winningLength = pf.getWidthFromLength( length )) ) { + break; + } + } - // restore the original values - docElem.style.cssText = originalHTMLCSS; - body.style.cssText = originalBodyCSS; + //if we have no winningLength fallback to 100vw + return winningLength || Math.max(w.innerWidth || 0, doc.documentElement.clientWidth); + }; - } - return eminpx || 16; - }; + pf.parseSrcset = function( srcset ) { + /** + * A lot of this was pulled from Boris Smus’ parser for the now-defunct WHATWG `srcset` + * https://github.com/borismus/srcset-polyfill/blob/master/js/srcset-info.js + * + * 1. Let input (`srcset`) be the value passed to this algorithm. + * 2. Let position be a pointer into input, initially pointing at the start of the string. + * 3. Let raw candidates be an initially empty ordered list of URLs with associated + * unparsed descriptors. The order of entries in the list is the order in which entries + * are added to the list. + */ + var candidates = []; - /** - * Takes a string of sizes and returns the width in pixels as a number - */ - pf.calcListLength = function (sourceSizeListStr) { - // Split up source size list, ie ( max-width: 30em ) 100%, ( max-width: 50em ) 50%, 33% - // - // or (min-width:30em) calc(30% - 15px) - if (!(sourceSizeListStr in sizeLengthCache) || cfg.uT) { - var winningLength = pf.calcLength(parseSizes(sourceSizeListStr)); + while ( srcset !== "" ) { + srcset = srcset.replace( /^\s+/g, "" ); - sizeLengthCache[sourceSizeListStr] = !winningLength ? units.width : winningLength; - } + // 5. Collect a sequence of characters that are not space characters, and let that be url. + var pos = srcset.search(/\s/g), + url, descriptor = null; - return sizeLengthCache[sourceSizeListStr]; - }; + if ( pos !== -1 ) { + url = srcset.slice( 0, pos ); - /** - * Takes a candidate object with a srcset property in the form of url/ - * ex. "images/pic-medium.png 1x, images/pic-medium-2x.png 2x" or - * "images/pic-medium.png 400w, images/pic-medium-2x.png 800w" or - * "images/pic-small.png" - * Get an array of image candidates in the form of - * {url: "/foo/bar.png", resolution: 1} - * where resolution is http://dev.w3.org/csswg/css-values-3/#resolution-value - * If sizes is specified, res is calculated - */ - pf.setRes = function (set) { - var candidates; - if (set) { + var last = url.slice(-1); - candidates = pf.parseSet(set); + // 6. If url ends with a U+002C COMMA character (,), remove that character from url + // and let descriptors be the empty string. Otherwise, follow these substeps + // 6.1. If url is empty, then jump to the step labeled descriptor parser. - for (var i = 0, len = candidates.length; i < len; i++) { - setResolution(candidates[i], set.sizes); + if ( last === "," || url === "" ) { + url = url.replace( /,+$/, "" ); + descriptor = ""; + } + srcset = srcset.slice( pos + 1 ); + + // 6.2. Collect a sequence of characters that are not U+002C COMMA characters (,), and + // let that be descriptors. + if ( descriptor === null ) { + var descpos = srcset.indexOf( "," ); + if ( descpos !== -1 ) { + descriptor = srcset.slice( 0, descpos ); + srcset = srcset.slice( descpos + 1 ); + } else { + descriptor = srcset; + srcset = ""; + } + } + } else { + url = srcset; + srcset = ""; + } + + // 7. Add url to raw candidates, associated with descriptors. + if ( url || descriptor ) { + candidates.push({ + url: url, + descriptor: descriptor + }); + } + } + return candidates; + }; + + pf.parseDescriptor = function( descriptor, sizesattr ) { + // 11. Descriptor parser: Let candidates be an initially empty source set. The order of entries in the list + // is the order in which entries are added to the list. + var sizes = sizesattr || "100vw", + sizeDescriptor = descriptor && descriptor.replace( /(^\s+|\s+$)/g, "" ), + widthInCssPixels = pf.findWidthFromSourceSize( sizes ), + resCandidate; + + if ( sizeDescriptor ) { + var splitDescriptor = sizeDescriptor.split(" "); + + for (var i = splitDescriptor.length - 1; i >= 0; i--) { + var curr = splitDescriptor[ i ], + lastchar = curr && curr.slice( curr.length - 1 ); + + if ( ( lastchar === "h" || lastchar === "w" ) && !pf.sizesSupported ) { + resCandidate = parseFloat( ( parseInt( curr, 10 ) / widthInCssPixels ) ); + } else if ( lastchar === "x" ) { + var res = curr && parseFloat( curr, 10 ); + resCandidate = res && !isNaN( res ) ? res : 1; + } + } + } + return resCandidate || 1; + }; + + /** + * Takes a srcset in the form of url/ + * ex. "images/pic-medium.png 1x, images/pic-medium-2x.png 2x" or + * "images/pic-medium.png 400w, images/pic-medium-2x.png 800w" or + * "images/pic-small.png" + * Get an array of image candidates in the form of + * {url: "/foo/bar.png", resolution: 1} + * where resolution is http://dev.w3.org/csswg/css-values-3/#resolution-value + * If sizes is specified, resolution is calculated + */ + pf.getCandidatesFromSourceSet = function( srcset, sizes ) { + var candidates = pf.parseSrcset( srcset ), + formattedCandidates = []; + + for ( var i = 0, len = candidates.length; i < len; i++ ) { + var candidate = candidates[ i ]; + + formattedCandidates.push({ + url: candidate.url, + resolution: pf.parseDescriptor( candidate.descriptor, sizes ) + }); + } + return formattedCandidates; + }; + + /** + * if it's an img element and it has a srcset property, + * we need to remove the attribute so we can manipulate src + * (the property's existence infers native srcset support, and a srcset-supporting browser will prioritize srcset's value over our winning picture candidate) + * this moves srcset's value to memory for later use and removes the attr + */ + pf.dodgeSrcset = function( img ) { + if ( img.srcset ) { + img[ pf.ns ].srcset = img.srcset; + img.srcset = ""; + img.setAttribute( "data-pfsrcset", img[ pf.ns ].srcset ); + } + }; + + // Accept a source or img element and process its srcset and sizes attrs + pf.processSourceSet = function( el ) { + var srcset = el.getAttribute( "srcset" ), + sizes = el.getAttribute( "sizes" ), + candidates = []; + + // if it's an img element, use the cached srcset property (defined or not) + if ( el.nodeName.toUpperCase() === "IMG" && el[ pf.ns ] && el[ pf.ns ].srcset ) { + srcset = el[ pf.ns ].srcset; + } + + if ( srcset ) { + candidates = pf.getCandidatesFromSourceSet( srcset, sizes ); + } + return candidates; + }; + + pf.backfaceVisibilityFix = function( picImg ) { + // See: https://github.com/scottjehl/picturefill/issues/332 + var style = picImg.style || {}, + WebkitBackfaceVisibility = "webkitBackfaceVisibility" in style, + currentZoom = style.zoom; + + if (WebkitBackfaceVisibility) { + style.zoom = ".999"; + + WebkitBackfaceVisibility = picImg.offsetWidth; + + style.zoom = currentZoom; + } + }; + + pf.setIntrinsicSize = (function() { + var urlCache = {}; + var setSize = function( picImg, width, res ) { + if ( width ) { + picImg.setAttribute( "width", parseInt(width / res, 10) ); } - } - return candidates; - }; + }; + return function( picImg, bestCandidate ) { + var img; + if ( !picImg[ pf.ns ] || w.pfStopIntrinsicSize ) { + return; + } + if ( picImg[ pf.ns ].dims === undefined ) { + picImg[ pf.ns].dims = picImg.getAttribute("width") || picImg.getAttribute("height"); + } + if ( picImg[ pf.ns].dims ) { return; } - pf.setRes.res = setResolution; + if ( bestCandidate.url in urlCache ) { + setSize( picImg, urlCache[bestCandidate.url], bestCandidate.resolution ); + } else { + img = doc.createElement( "img" ); + img.onload = function() { + urlCache[bestCandidate.url] = img.width; - pf.applySetCandidate = function (candidates, img) { - if (!candidates.length) { - return; - } - var candidate, - i, - j, - length, - bestCandidate, - curSrc, - curCan, - candidateSrc, - abortCurSrc; - - var imageData = img[pf.ns]; - var dpr = pf.DPR; - - curSrc = imageData.curSrc || img[curSrcProp]; - - curCan = imageData.curCan || setSrcToCur(img, curSrc, candidates[0].set); - - // if we have a current source, we might either become lazy or give this source some advantage - if (curCan && curCan.set === candidates[0].set) { - - // if browser can abort image request and the image has a higher pixel density than needed - // and this image isn't downloaded yet, we skip next part and try to save bandwidth - abortCurSrc = (supportAbort && !img.complete && curCan.res - 0.1 > dpr); - - if (!abortCurSrc) { - curCan.cached = true; - - // if current candidate is "best", "better" or "okay", - // set it to bestCandidate - if (curCan.res >= dpr) { - bestCandidate = curCan; - } - } - } - - if (!bestCandidate) { - - candidates.sort(ascendingSort); - - length = candidates.length; - bestCandidate = candidates[length - 1]; - - for (i = 0; i < length; i++) { - candidate = candidates[i]; - if (candidate.res >= dpr) { - j = i - 1; - - // we have found the perfect candidate, - // but let's improve this a little bit with some assumptions ;-) - if (candidates[j] && - (abortCurSrc || curSrc !== pf.makeUrl(candidate.url)) && - chooseLowRes(candidates[j].res, candidate.res, dpr, candidates[j].cached)) { - - bestCandidate = candidates[j]; - - } else { - bestCandidate = candidate; - } - break; - } - } - } - - if (bestCandidate) { - - candidateSrc = pf.makeUrl(bestCandidate.url); - - imageData.curSrc = candidateSrc; - imageData.curCan = bestCandidate; - - if (candidateSrc !== curSrc) { - pf.setSrc(img, bestCandidate); - } - pf.setSize(img); - } - }; - - pf.setSrc = function (img, bestCandidate) { - var origWidth; - img.src = bestCandidate.url; - - // although this is a specific Safari issue, we don't want to take too much different code paths - if (bestCandidate.set.type === "image/svg+xml") { - origWidth = img.style.width; - img.style.width = (img.offsetWidth + 1) + "px"; - - // next line only should trigger a repaint - // if... is only done to trick dead code removal - if (img.offsetWidth + 1) { - img.style.width = origWidth; - } - } - }; - - pf.getSet = function (img) { - var i, set, supportsType; - var match = false; - var sets = img [pf.ns].sets; - - for (i = 0; i < sets.length && !match; i++) { - set = sets[i]; - - if (!set.srcset || !pf.matchesMedia(set.media) || !(supportsType = pf.supportsType(set.type))) { - continue; - } - - if (supportsType === "pending") { - set = supportsType; - } - - match = set; - break; - } - - return match; - }; - - pf.parseSets = function (element, parent, options) { - var srcsetAttribute, imageSet, isWDescripor, srcsetParsed; - - var hasPicture = parent && parent.nodeName.toUpperCase() === "PICTURE"; - var imageData = element[pf.ns]; - - if (imageData.src === undefined || options.src) { - imageData.src = getImgAttr.call(element, "src"); - if (imageData.src) { - setImgAttr.call(element, srcAttr, imageData.src); - } else { - removeImgAttr.call(element, srcAttr); - } - } - - if (imageData.srcset === undefined || options.srcset || !pf.supSrcset || element.srcset) { - srcsetAttribute = getImgAttr.call(element, "srcset"); - imageData.srcset = srcsetAttribute; - srcsetParsed = true; - } - - imageData.sets = []; - - if (hasPicture) { - imageData.pic = true; - getAllSourceElements(parent, imageData.sets); - } - - if (imageData.srcset) { - imageSet = { - srcset: imageData.srcset, - sizes: getImgAttr.call(element, "sizes") - }; - - imageData.sets.push(imageSet); - - isWDescripor = (alwaysCheckWDescriptor || imageData.src) && regWDesc.test(imageData.srcset || ""); - - // add normal src as candidate, if source has no w descriptor - if (!isWDescripor && imageData.src && !getCandidateForSrc(imageData.src, imageSet) && !imageSet.has1x) { - imageSet.srcset += ", " + imageData.src; - imageSet.cands.push({ - url: imageData.src, - d: 1, - set: imageSet - }); - } - - } else if (imageData.src) { - imageData.sets.push({ - srcset: imageData.src, - sizes: null - }); - } - - imageData.curCan = null; - imageData.curSrc = undefined; - - // if img has picture or the srcset was removed or has a srcset and does not support srcset at all - // or has a w descriptor (and does not support sizes) set support to false to evaluate - imageData.supported = !( hasPicture || ( imageSet && !pf.supSrcset ) || (isWDescripor && !pf.supSizes) ); - - if (srcsetParsed && pf.supSrcset && !imageData.supported) { - if (srcsetAttribute) { - setImgAttr.call(element, srcsetAttr, srcsetAttribute); - element.srcset = ""; - } else { - removeImgAttr.call(element, srcsetAttr); - } - } - - if (imageData.supported && !imageData.srcset && ((!imageData.src && element.src) || element.src !== pf.makeUrl(imageData.src))) { - if (imageData.src === null) { - element.removeAttribute("src"); - } else { - element.src = imageData.src; - } - } - - imageData.parsed = true; - }; - - pf.fillImg = function (element, options) { - var imageData; - var extreme = options.reselect || options.reevaluate; - - // expando for caching data on the img - if (!element[pf.ns]) { - element[pf.ns] = {}; - } - - imageData = element[pf.ns]; - - // if the element has already been evaluated, skip it - // unless `options.reevaluate` is set to true ( this, for example, - // is set to true when running `picturefill` on `resize` ). - if (!extreme && imageData.evaled === evalId) { - return; - } - - if (!imageData.parsed || options.reevaluate) { - pf.parseSets(element, element.parentNode, options); - } - - if (!imageData.supported) { - applyBestCandidate(element); - } else { - imageData.evaled = evalId; - } - }; - - pf.setupRun = function () { - if (!alreadyRun || isVwDirty || (DPR !== window.devicePixelRatio)) { - updateMetrics(); - } - }; - - // If picture is supported, well, that's awesome. - if (pf.supPicture) { - picturefill = noop; - pf.fillImg = noop; - } else { - - // Set up picture polyfill by polling the document - (function () { - var isDomReady; - var regReady = window.attachEvent ? /d$|^c/ : /d$|^c|^i/; - - var run = function () { - var readyState = document.readyState || ""; - - timerId = setTimeout(run, readyState === "loading" ? 200 : 999); - if (document.body) { - pf.fillImgs(); - isDomReady = isDomReady || regReady.test(readyState); - if (isDomReady) { - clearTimeout(timerId); + //IE 10/11 don't calculate width for svg outside document + if ( !urlCache[bestCandidate.url] ) { + try { + doc.body.appendChild( img ); + urlCache[bestCandidate.url] = img.width || img.offsetWidth; + doc.body.removeChild( img ); + } catch(e){} } - } - }; + if ( picImg.src === bestCandidate.url ) { + setSize( picImg, urlCache[bestCandidate.url], bestCandidate.resolution ); + } + picImg = null; + img.onload = null; + img = null; + }; + img.src = bestCandidate.url; + } + }; + })(); - var timerId = setTimeout(run, document.body ? 9 : 99); + pf.applyBestCandidate = function( candidates, picImg ) { + var candidate, + length, + bestCandidate; - // Also attach picturefill on resize and readystatechange - // http://modernjavascript.blogspot.com/2013/08/building-better-debounce.html - var debounce = function (func, wait) { - var timeout, timestamp; - var later = function () { - var last = (new Date()) - timestamp; + candidates.sort( pf.ascendingSort ); - if (last < wait) { - timeout = setTimeout(later, wait - last); - } else { - timeout = null; - func(); - } - }; + length = candidates.length; + bestCandidate = candidates[ length - 1 ]; - return function () { - timestamp = new Date(); + for ( var i = 0; i < length; i++ ) { + candidate = candidates[ i ]; + if ( candidate.resolution >= pf.getDpr() ) { + bestCandidate = candidate; + break; + } + } - if (!timeout) { - timeout = setTimeout(later, wait); - } - }; - }; - var lastClientWidth = docElem.clientHeight; - var onResize = function () { - isVwDirty = Math.max(window.innerWidth || 0, docElem.clientWidth) !== units.width || docElem.clientHeight !== lastClientWidth; - lastClientWidth = docElem.clientHeight; - if (isVwDirty) { - pf.fillImgs(); - } - }; + if ( bestCandidate ) { - on(window, "resize", debounce(onResize, 99)); - on(document, "readystatechange", run); - })(); - } + bestCandidate.url = pf.makeUrl( bestCandidate.url ); - pf.picturefill = picturefill; - //use this internally for easy monkey patching/performance testing - pf.fillImgs = picturefill; - pf.teardownRun = noop; + if ( picImg.src !== bestCandidate.url ) { + if ( pf.restrictsMixedContent() && bestCandidate.url.substr(0, "http:".length).toLowerCase() === "http:" ) { + if ( window.console !== undefined ) { + console.warn( "Blocked mixed content image " + bestCandidate.url ); + } + } else { + picImg.src = bestCandidate.url; + // currentSrc attribute and property to match + // http://picture.responsiveimages.org/#the-img-element + picImg.currentSrc = picImg.src; - /* expose methods for testing */ - picturefill._ = pf; + pf.backfaceVisibilityFix( picImg ); + } + } - window.picturefillCFG = { - pf: pf, - push: function (args) { - var name = args.shift(); - if (typeof pf[name] === "function") { - pf[name].apply(pf, args); - } else { - cfg[name] = args[0]; - if (alreadyRun) { - pf.fillImgs({reselect: true}); - } - } - } - }; + pf.setIntrinsicSize(picImg, bestCandidate); + } + }; - while (setOptions && setOptions.length) { - window.picturefillCFG.push(setOptions.shift()); - } + pf.ascendingSort = function( a, b ) { + return a.resolution - b.resolution; + }; - /* expose picturefill */ - window.picturefill = picturefill; + /** + * In IE9, elements get removed if they aren't children of + * video elements. Thus, we conditionally wrap source elements + * using + * and must account for that here by moving those source elements + * back into the picture element. + */ + pf.removeVideoShim = function( picture ) { + var videos = picture.getElementsByTagName( "video" ); + if ( videos.length ) { + var video = videos[ 0 ], + vsources = video.getElementsByTagName( "source" ); + while ( vsources.length ) { + picture.insertBefore( vsources[ 0 ], video ); + } + // Remove the video element once we're finished removing its children + video.parentNode.removeChild( video ); + } + }; - /* expose picturefill */ - if (typeof module === "object" && typeof module.exports === "object") { - // CommonJS, just export - module.exports = picturefill; - } else if (typeof define === "function" && define.amd) { - // AMD support - define("picturefill", function () { - return picturefill; - }); - } + /** + * Find all `img` elements, and add them to the candidate list if they have + * a `picture` parent, a `sizes` attribute in basic `srcset` supporting browsers, + * a `srcset` attribute at all, and they haven’t been evaluated already. + */ + pf.getAllElements = function() { + var elems = [], + imgs = doc.getElementsByTagName( "img" ); - // IE8 evals this sync, so it must be the last thing we do - if (!pf.supPicture) { - types["image/webp"] = detectTypeSupport("image/webp", "data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="); - } + for ( var h = 0, len = imgs.length; h < len; h++ ) { + var currImg = imgs[ h ]; -})(window, document); + if ( currImg.parentNode.nodeName.toUpperCase() === "PICTURE" || + ( currImg.getAttribute( "srcset" ) !== null ) || currImg[ pf.ns ] && currImg[ pf.ns ].srcset !== null ) { + elems.push( currImg ); + } + } + return elems; + }; + + pf.getMatch = function( img, picture ) { + var sources = picture.childNodes, + match; + + // Go through each child, and if they have media queries, evaluate them + for ( var j = 0, slen = sources.length; j < slen; j++ ) { + var source = sources[ j ]; + + // ignore non-element nodes + if ( source.nodeType !== 1 ) { + continue; + } + + // Hitting the `img` element that started everything stops the search for `sources`. + // If no previous `source` matches, the `img` itself is evaluated later. + if ( source === img ) { + return match; + } + + // ignore non-`source` nodes + if ( source.nodeName.toUpperCase() !== "SOURCE" ) { + continue; + } + // if it's a source element that has the `src` property set, throw a warning in the console + if ( source.getAttribute( "src" ) !== null && typeof console !== undefined ) { + console.warn("The `src` attribute is invalid on `picture` `source` element; instead, use `srcset`."); + } + + var media = source.getAttribute( "media" ); + + // if source does not have a srcset attribute, skip + if ( !source.getAttribute( "srcset" ) ) { + continue; + } + + // if there's no media specified, OR w.matchMedia is supported + if ( ( !media || pf.matchesMedia( media ) ) ) { + var typeSupported = pf.verifyTypeSupport( source ); + + if ( typeSupported === true ) { + match = source; + break; + } else if ( typeSupported === "pending" ) { + return false; + } + } + } + + return match; + }; + + function picturefill( opt ) { + var elements, + element, + parent, + firstMatch, + candidates, + options = opt || {}; + + elements = options.elements || pf.getAllElements(); + + // Loop through all elements + for ( var i = 0, plen = elements.length; i < plen; i++ ) { + element = elements[ i ]; + parent = element.parentNode; + firstMatch = undefined; + candidates = undefined; + + // immediately skip non-`img` nodes + if ( element.nodeName.toUpperCase() !== "IMG" ) { + continue; + } + + // expando for caching data on the img + if ( !element[ pf.ns ] ) { + element[ pf.ns ] = {}; + } + + // if the element has already been evaluated, skip it unless + // `options.reevaluate` is set to true ( this, for example, + // is set to true when running `picturefill` on `resize` ). + if ( !options.reevaluate && element[ pf.ns ].evaluated ) { + continue; + } + + // if `img` is in a `picture` element + if ( parent && parent.nodeName.toUpperCase() === "PICTURE" ) { + + // IE9 video workaround + pf.removeVideoShim( parent ); + + // return the first match which might undefined + // returns false if there is a pending source + // TODO the return type here is brutal, cleanup + firstMatch = pf.getMatch( element, parent ); + + // if any sources are pending in this picture due to async type test(s) + // remove the evaluated attr and skip for now ( the pending test will + // rerun picturefill on this element when complete) + if ( firstMatch === false ) { + continue; + } + } else { + firstMatch = undefined; + } + + // Cache and remove `srcset` if present and we’re going to be doing `picture`/`srcset`/`sizes` polyfilling to it. + if ( ( parent && parent.nodeName.toUpperCase() === "PICTURE" ) || + ( !pf.sizesSupported && ( element.srcset && regWDesc.test( element.srcset ) ) ) ) { + pf.dodgeSrcset( element ); + } + + if ( firstMatch ) { + candidates = pf.processSourceSet( firstMatch ); + pf.applyBestCandidate( candidates, element ); + } else { + // No sources matched, so we’re down to processing the inner `img` as a source. + candidates = pf.processSourceSet( element ); + + if ( element.srcset === undefined || element[ pf.ns ].srcset ) { + // Either `srcset` is completely unsupported, or we need to polyfill `sizes` functionality. + pf.applyBestCandidate( candidates, element ); + } // Else, resolution-only `srcset` is supported natively. + } + + // set evaluated to true to avoid unnecessary reparsing + element[ pf.ns ].evaluated = true; + } + } + + /** + * Sets up picture polyfill by polling the document and running + * the polyfill every 250ms until the document is ready. + * Also attaches picturefill on resize + */ + function runPicturefill() { + pf.initTypeDetects(); + picturefill(); + var intervalId = setInterval( function() { + // When the document has finished loading, stop checking for new images + // https://github.com/ded/domready/blob/master/ready.js#L15 + picturefill(); + + if ( /^loaded|^i|^c/.test( doc.readyState ) ) { + clearInterval( intervalId ); + return; + } + }, 250 ); + + function checkResize() { + var resizeThrottle; + + if ( !w._picturefillWorking ) { + w._picturefillWorking = true; + w.clearTimeout( resizeThrottle ); + resizeThrottle = w.setTimeout( function() { + picturefill({ reevaluate: true }); + w._picturefillWorking = false; + }, 60 ); + } + } + + if ( w.addEventListener ) { + w.addEventListener( "resize", checkResize, false ); + } else if ( w.attachEvent ) { + w.attachEvent( "onresize", checkResize ); + } + } + + runPicturefill(); + + /* expose methods for testing */ + picturefill._ = pf; + + expose( picturefill ); + +} )( window, window.document, new window.Image() ); /*! jQuery v2.2.0 | (c) jQuery Foundation | jquery.org/license */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!k.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c}catch(e){}O.set(a,b,c); @@ -3318,7 +2467,7 @@ |___/_|_|\___|_|\_(_)/ |___/ |__/ - Version: 1.6.0 + Version: 1.4.1 Author: Ken Wheeler Website: http://kenwheeler.github.io Docs: http://kenwheeler.github.io/slick @@ -3326,7 +2475,9 @@ Issues: http://github.com/kenwheeler/slick/issues */ + /* global window, document, define, jQuery, setInterval, clearInterval */ + (function(factory) { 'use strict'; if (typeof define === 'function' && define.amd) { @@ -3347,7 +2498,8 @@ function Slick(element, settings) { - var _ = this, dataSettings; + var _ = this, + dataSettings, responsiveSettings, breakpoint; _.defaults = { accessibility: true, @@ -3356,15 +2508,15 @@ appendDots: $(element), arrows: true, asNavFor: null, - prevArrow: '', - nextArrow: '', + prevArrow: '', + nextArrow: '', autoplay: false, autoplaySpeed: 3000, centerMode: false, centerPadding: '50px', cssEase: 'ease', customPaging: function(slider, i) { - return $(''; }, dots: false, dotsClass: 'slick-dots', @@ -3378,14 +2530,11 @@ lazyLoad: 'ondemand', mobileFirst: false, pauseOnHover: true, - pauseOnFocus: true, pauseOnDotsHover: false, respondTo: 'window', responsive: null, - rows: 1, rtl: false, slide: '', - slidesPerRow: 1, slidesToShow: 1, slidesToScroll: 1, speed: 500, @@ -3394,12 +2543,9 @@ touchMove: true, touchThreshold: 5, useCSS: true, - useTransform: true, variableWidth: false, vertical: false, - verticalSwiping: false, - waitForAnimate: true, - zIndex: 1000 + waitForAnimate: true }; _.initials = { @@ -3425,8 +2571,7 @@ swipeLeft: null, $list: null, touchObject: {}, - transformsEnabled: false, - unslicked: false + transformsEnabled: false }; $.extend(_, _.initials); @@ -3437,41 +2582,61 @@ _.breakpoints = []; _.breakpointSettings = []; _.cssTransitions = false; - _.focussed = false; - _.interrupted = false; - _.hidden = 'hidden'; - _.paused = true; + _.hidden = "hidden"; + _.paused = false; _.positionProp = null; _.respondTo = null; - _.rowCount = 1; _.shouldClick = true; _.$slider = $(element); _.$slidesCache = null; _.transformType = null; _.transitionType = null; - _.visibilityChange = 'visibilitychange'; + _.visibilityChange = "visibilitychange"; _.windowWidth = 0; _.windowTimer = null; dataSettings = $(element).data('slick') || {}; - _.options = $.extend({}, _.defaults, settings, dataSettings); + _.options = $.extend({}, _.defaults, dataSettings, settings); _.currentSlide = _.options.initialSlide; _.originalSettings = _.options; + responsiveSettings = _.options.responsive || null; - if (typeof document.mozHidden !== 'undefined') { - _.hidden = 'mozHidden'; - _.visibilityChange = 'mozvisibilitychange'; - } else if (typeof document.webkitHidden !== 'undefined') { - _.hidden = 'webkitHidden'; - _.visibilityChange = 'webkitvisibilitychange'; + if (responsiveSettings && responsiveSettings.length > -1) { + _.respondTo = _.options.respondTo || "window"; + for (breakpoint in responsiveSettings) { + if (responsiveSettings.hasOwnProperty(breakpoint)) { + _.breakpoints.push(responsiveSettings[ + breakpoint].breakpoint); + _.breakpointSettings[responsiveSettings[ + breakpoint].breakpoint] = + responsiveSettings[breakpoint].settings; + } + } + _.breakpoints.sort(function(a, b) { + if(_.options.mobileFirst === true) { + return a - b; + } else { + return b - a; + } + }); + } + + if (typeof document.mozHidden !== "undefined") { + _.hidden = "mozHidden"; + _.visibilityChange = "mozvisibilitychange"; + } else if (typeof document.msHidden !== "undefined") { + _.hidden = "msHidden"; + _.visibilityChange = "msvisibilitychange"; + } else if (typeof document.webkitHidden !== "undefined") { + _.hidden = "webkitHidden"; + _.visibilityChange = "webkitvisibilitychange"; } _.autoPlay = $.proxy(_.autoPlay, _); _.autoPlayClear = $.proxy(_.autoPlayClear, _); - _.autoPlayIterator = $.proxy(_.autoPlayIterator, _); _.changeSlide = $.proxy(_.changeSlide, _); _.clickHandler = $.proxy(_.clickHandler, _); _.selectHandler = $.proxy(_.selectHandler, _); @@ -3479,6 +2644,7 @@ _.swipeHandler = $.proxy(_.swipeHandler, _); _.dragHandler = $.proxy(_.dragHandler, _); _.keyHandler = $.proxy(_.keyHandler, _); + _.autoPlayIterator = $.proxy(_.autoPlayIterator, _); _.instanceUid = instanceUid++; @@ -3487,9 +2653,9 @@ // Extracted from jQuery v1.11 source _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/; + _.init(); - _.registerBreakpoints(); - _.init(true); + _.checkResponsive(true); } @@ -3497,17 +2663,6 @@ }()); - Slick.prototype.activateADA = function() { - var _ = this; - - _.$slideTrack.find('.slick-active').attr({ - 'aria-hidden': 'false' - }).find('a, input, button, select').attr({ - 'tabindex': '0' - }); - - }; - Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) { var _ = this; @@ -3544,7 +2699,7 @@ _.$slideTrack.append(_.$slides); _.$slides.each(function(index, element) { - $(element).attr('data-slick-index', index); + $(element).attr("data-slick-index",index); }); _.$slidesCache = _.$slides; @@ -3553,20 +2708,17 @@ }; - Slick.prototype.animateHeight = function() { + Slick.prototype.animateHeight = function(){ var _ = this; - if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { + if(_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); - _.$list.animate({ - height: targetHeight - }, _.options.speed); + _.$list.animate({height: targetHeight},_.options.speed); } }; Slick.prototype.animateSlide = function(targetLeft, callback) { - var animProps = {}, - _ = this; + var animProps = {}, _ = this; _.animateHeight(); @@ -3643,33 +2795,9 @@ }; - Slick.prototype.getNavTarget = function() { - - var _ = this, - asNavFor = _.options.asNavFor; - - if ( asNavFor && asNavFor !== null ) { - asNavFor = $(asNavFor).not(_.$slider); - } - - return asNavFor; - - }; - Slick.prototype.asNavFor = function(index) { - - var _ = this, - asNavFor = _.getNavTarget(); - - if ( asNavFor !== null && typeof asNavFor === 'object' ) { - asNavFor.each(function() { - var target = $(this).slick('getSlick'); - if(!target.unslicked) { - target.slideHandler(index, true); - } - }); - } - + var _ = this, asNavFor = _.options.asNavFor !== null ? $(_.options.asNavFor).slick('getSlick') : null; + if(asNavFor !== null) asNavFor.slideHandler(index, true); }; Slick.prototype.applyTransition = function(slide) { @@ -3695,10 +2823,13 @@ var _ = this; - _.autoPlayClear(); + if (_.autoPlayTimer) { + clearInterval(_.autoPlayTimer); + } - if ( _.slideCount > _.options.slidesToShow ) { - _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed ); + if (_.slideCount > _.options.slidesToShow && _.paused !== true) { + _.autoPlayTimer = setInterval(_.autoPlayIterator, + _.options.autoplaySpeed); } }; @@ -3706,7 +2837,6 @@ Slick.prototype.autoPlayClear = function() { var _ = this; - if (_.autoPlayTimer) { clearInterval(_.autoPlayTimer); } @@ -3715,30 +2845,34 @@ Slick.prototype.autoPlayIterator = function() { - var _ = this, - slideTo = _.currentSlide + _.options.slidesToScroll; + var _ = this; - if ( !_.paused && !_.interrupted && !_.focussed ) { + if (_.options.infinite === false) { - if ( _.options.infinite === false ) { + if (_.direction === 1) { - if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) { + if ((_.currentSlide + 1) === _.slideCount - + 1) { _.direction = 0; } - else if ( _.direction === 0 ) { + _.slideHandler(_.currentSlide + _.options.slidesToScroll); - slideTo = _.currentSlide - _.options.slidesToScroll; + } else { - if ( _.currentSlide - 1 === 0 ) { - _.direction = 1; - } + if ((_.currentSlide - 1 === 0)) { + + _.direction = 1; } + _.slideHandler(_.currentSlide - _.options.slidesToScroll); + } - _.slideHandler( slideTo ); + } else { + + _.slideHandler(_.currentSlide + _.options.slidesToScroll); } @@ -3748,40 +2882,21 @@ var _ = this; - if (_.options.arrows === true ) { + if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { - _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow'); - _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow'); + _.$prevArrow = $(_.options.prevArrow); + _.$nextArrow = $(_.options.nextArrow); - if( _.slideCount > _.options.slidesToShow ) { + if (_.htmlExpr.test(_.options.prevArrow)) { + _.$prevArrow.appendTo(_.options.appendArrows); + } - _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); - _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); - - if (_.htmlExpr.test(_.options.prevArrow)) { - _.$prevArrow.prependTo(_.options.appendArrows); - } - - if (_.htmlExpr.test(_.options.nextArrow)) { - _.$nextArrow.appendTo(_.options.appendArrows); - } - - if (_.options.infinite !== true) { - _.$prevArrow - .addClass('slick-disabled') - .attr('aria-disabled', 'true'); - } - - } else { - - _.$prevArrow.add( _.$nextArrow ) - - .addClass('slick-hidden') - .attr({ - 'aria-disabled': 'true', - 'tabindex': '-1' - }); + if (_.htmlExpr.test(_.options.nextArrow)) { + _.$nextArrow.appendTo(_.options.appendArrows); + } + if (_.options.infinite !== true) { + _.$prevArrow.addClass('slick-disabled'); } } @@ -3791,21 +2906,22 @@ Slick.prototype.buildDots = function() { var _ = this, - i, dot; + i, dotString; if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { - _.$slider.addClass('slick-dotted'); - - dot = $('
    ').addClass(_.options.dotsClass); + dotString = '
      '; for (i = 0; i <= _.getDotCount(); i += 1) { - dot.append($('
    • ').append(_.options.customPaging.call(this, _, i))); + dotString += '
    • ' + _.options.customPaging.call(this, _, i) + '
    • '; } - _.$dots = dot.appendTo(_.options.appendDots); + dotString += '
    '; - _.$dots.find('li').first().addClass('slick-active').attr('aria-hidden', 'false'); + _.$dots = $(dotString).appendTo( + _.options.appendDots); + + _.$dots.find('li').first().addClass('slick-active').attr("aria-hidden","false"); } @@ -3815,19 +2931,17 @@ var _ = this; - _.$slides = - _.$slider - .children( _.options.slide + ':not(.slick-cloned)') - .addClass('slick-slide'); - + _.$slides = _.$slider.children(_.options.slide + + ':not(.slick-cloned)').addClass( + 'slick-slide'); _.slideCount = _.$slides.length; _.$slides.each(function(index, element) { - $(element) - .attr('data-slick-index', index) - .data('originalStyling', $(element).attr('style') || ''); + $(element).attr("data-slick-index",index); }); + _.$slidesCache = _.$slides; + _.$slider.addClass('slick-slider'); _.$slideTrack = (_.slideCount === 0) ? @@ -3852,8 +2966,11 @@ _.updateDots(); + if (_.options.accessibility === true) { + _.$list.prop('tabIndex', 0); + } - _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); + _.setSlideClasses(typeof this.currentSlide === 'number' ? this.currentSlide : 0); if (_.options.draggable === true) { _.$list.addClass('draggable'); @@ -3861,64 +2978,22 @@ }; - Slick.prototype.buildRows = function() { - - var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection; - - newSlides = document.createDocumentFragment(); - originalSlides = _.$slider.children(); - - if(_.options.rows > 1) { - - slidesPerSection = _.options.slidesPerRow * _.options.rows; - numOfSlides = Math.ceil( - originalSlides.length / slidesPerSection - ); - - for(a = 0; a < numOfSlides; a++){ - var slide = document.createElement('div'); - for(b = 0; b < _.options.rows; b++) { - var row = document.createElement('div'); - for(c = 0; c < _.options.slidesPerRow; c++) { - var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c)); - if (originalSlides.get(target)) { - row.appendChild(originalSlides.get(target)); - } - } - slide.appendChild(row); - } - newSlides.appendChild(slide); - } - - _.$slider.empty().append(newSlides); - _.$slider.children().children().children() - .css({ - 'width':(100 / _.options.slidesPerRow) + '%', - 'display': 'inline-block' - }); - - } - - }; - - Slick.prototype.checkResponsive = function(initial, forceUpdate) { + Slick.prototype.checkResponsive = function(initial) { var _ = this, - breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false; + breakpoint, targetBreakpoint, respondToWidth; var sliderWidth = _.$slider.width(); var windowWidth = window.innerWidth || $(window).width(); - - if (_.respondTo === 'window') { - respondToWidth = windowWidth; - } else if (_.respondTo === 'slider') { - respondToWidth = sliderWidth; - } else if (_.respondTo === 'min') { - respondToWidth = Math.min(windowWidth, sliderWidth); + if (_.respondTo === "window") { + respondToWidth = windowWidth; + } else if (_.respondTo === "slider") { + respondToWidth = sliderWidth; + } else if (_.respondTo === "min") { + respondToWidth = Math.min(windowWidth, sliderWidth); } - if ( _.options.responsive && - _.options.responsive.length && - _.options.responsive !== null) { + if (_.originalSettings.responsive && _.originalSettings + .responsive.length > -1 && _.originalSettings.responsive !== null) { targetBreakpoint = null; @@ -3938,53 +3013,43 @@ if (targetBreakpoint !== null) { if (_.activeBreakpoint !== null) { - if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) { + if (targetBreakpoint !== _.activeBreakpoint) { _.activeBreakpoint = targetBreakpoint; - if (_.breakpointSettings[targetBreakpoint] === 'unslick') { - _.unslick(targetBreakpoint); + if(_.breakpointSettings[targetBreakpoint] === "unslick") { + _.unslick(); } else { _.options = $.extend({}, _.originalSettings, _.breakpointSettings[ targetBreakpoint]); - if (initial === true) { + if(initial === true) _.currentSlide = _.options.initialSlide; - } - _.refresh(initial); + _.refresh(); } - triggerBreakpoint = targetBreakpoint; } } else { _.activeBreakpoint = targetBreakpoint; - if (_.breakpointSettings[targetBreakpoint] === 'unslick') { - _.unslick(targetBreakpoint); + if(_.breakpointSettings[targetBreakpoint] === "unslick") { + _.unslick(); } else { _.options = $.extend({}, _.originalSettings, _.breakpointSettings[ targetBreakpoint]); - if (initial === true) { + if(initial === true) _.currentSlide = _.options.initialSlide; - } - _.refresh(initial); + _.refresh(); } - triggerBreakpoint = targetBreakpoint; } } else { if (_.activeBreakpoint !== null) { _.activeBreakpoint = null; _.options = _.originalSettings; - if (initial === true) { + if(initial === true) _.currentSlide = _.options.initialSlide; - } - _.refresh(initial); - triggerBreakpoint = targetBreakpoint; + _.refresh(); } } - // only trigger breakpoints during an actual break. not on initialize. - if( !initial && triggerBreakpoint !== false ) { - _.$slider.trigger('breakpoint', [_, triggerBreakpoint]); - } } }; @@ -3992,18 +3057,11 @@ Slick.prototype.changeSlide = function(event, dontAnimate) { var _ = this, - $target = $(event.currentTarget), + $target = $(event.target), indexOffset, slideOffset, unevenOffset; // If target is a link, prevent default action. - if($target.is('a')) { - event.preventDefault(); - } - - // If target is not the
  • element (ie: a child), find the
  • . - if(!$target.is('li')) { - $target = $target.closest('li'); - } + $target.is('a') && event.preventDefault(); unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0); indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll; @@ -4013,7 +3071,7 @@ case 'previous': slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset; if (_.slideCount > _.options.slidesToShow) { - _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate); + _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate); } break; @@ -4026,10 +3084,9 @@ case 'index': var index = event.data.index === 0 ? 0 : - event.data.index || $target.index() * _.options.slidesToScroll; + event.data.index || $(event.target).parent().index() * _.options.slidesToScroll; _.slideHandler(_.checkNavigable(index), false, dontAnimate); - $target.children().trigger('focus'); break; default: @@ -4040,16 +3097,15 @@ Slick.prototype.checkNavigable = function(index) { - var _ = this, - navigables, prevNavigable; + var _ = this, navigables, prevNavigable; navigables = _.getNavigableIndexes(); prevNavigable = 0; - if (index > navigables[navigables.length - 1]) { - index = navigables[navigables.length - 1]; + if(index > navigables[navigables.length -1]){ + index = navigables[navigables.length -1]; } else { - for (var n in navigables) { - if (index < navigables[n]) { + for(var n in navigables) { + if(index < navigables[n]) { index = prevNavigable; break; } @@ -4060,82 +3116,11 @@ return index; }; - Slick.prototype.cleanUpEvents = function() { - - var _ = this; - - if (_.options.dots && _.$dots !== null) { - - $('li', _.$dots) - .off('click.slick', _.changeSlide) - .off('mouseenter.slick', $.proxy(_.interrupt, _, true)) - .off('mouseleave.slick', $.proxy(_.interrupt, _, false)); - - } - - _.$slider.off('focus.slick blur.slick'); - - if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { - _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide); - _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide); - } - - _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler); - _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler); - _.$list.off('touchend.slick mouseup.slick', _.swipeHandler); - _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler); - - _.$list.off('click.slick', _.clickHandler); - - $(document).off(_.visibilityChange, _.visibility); - - _.cleanUpSlideEvents(); - - if (_.options.accessibility === true) { - _.$list.off('keydown.slick', _.keyHandler); - } - - if (_.options.focusOnSelect === true) { - $(_.$slideTrack).children().off('click.slick', _.selectHandler); - } - - $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange); - - $(window).off('resize.slick.slick-' + _.instanceUid, _.resize); - - $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault); - - $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition); - $(document).off('ready.slick.slick-' + _.instanceUid, _.setPosition); - - }; - - Slick.prototype.cleanUpSlideEvents = function() { - - var _ = this; - - _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true)); - _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false)); - - }; - - Slick.prototype.cleanUpRows = function() { - - var _ = this, originalSlides; - - if(_.options.rows > 1) { - originalSlides = _.$slides.children().children(); - originalSlides.removeAttr('style'); - _.$slider.empty().append(originalSlides); - } - - }; - Slick.prototype.clickHandler = function(event) { var _ = this; - if (_.shouldClick === false) { + if(_.shouldClick === false) { event.stopImmediatePropagation(); event.stopPropagation(); event.preventDefault(); @@ -4143,7 +3128,7 @@ }; - Slick.prototype.destroy = function(refresh) { + Slick.prototype.destroy = function() { var _ = this; @@ -4151,71 +3136,38 @@ _.touchObject = {}; - _.cleanUpEvents(); - - $('.slick-cloned', _.$slider).detach(); - + $('.slick-cloned', _.$slider).remove(); if (_.$dots) { _.$dots.remove(); } - - - if ( _.$prevArrow && _.$prevArrow.length ) { - - _.$prevArrow - .removeClass('slick-disabled slick-arrow slick-hidden') - .removeAttr('aria-hidden aria-disabled tabindex') - .css('display',''); - - if ( _.htmlExpr.test( _.options.prevArrow )) { - _.$prevArrow.remove(); - } + if (_.$prevArrow && (typeof _.options.prevArrow !== 'object')) { + _.$prevArrow.remove(); } - - if ( _.$nextArrow && _.$nextArrow.length ) { - - _.$nextArrow - .removeClass('slick-disabled slick-arrow slick-hidden') - .removeAttr('aria-hidden aria-disabled tabindex') - .css('display',''); - - if ( _.htmlExpr.test( _.options.nextArrow )) { - _.$nextArrow.remove(); - } - + if (_.$nextArrow && (typeof _.options.nextArrow !== 'object')) { + _.$nextArrow.remove(); } - if (_.$slides) { - - _.$slides - .removeClass('slick-slide slick-active slick-center slick-visible slick-current') - .removeAttr('aria-hidden') - .removeAttr('data-slick-index') - .each(function(){ - $(this).attr('style', $(this).data('originalStyling')); - }); - - _.$slideTrack.children(this.options.slide).detach(); - - _.$slideTrack.detach(); - - _.$list.detach(); - - _.$slider.append(_.$slides); - } - - _.cleanUpRows(); + _.$slides.removeClass('slick-slide slick-active slick-center slick-visible') + .attr("aria-hidden","true") + .removeAttr('data-slick-index') + .css({ + position: '', + left: '', + top: '', + zIndex: '', + opacity: '', + width: '' + }); _.$slider.removeClass('slick-slider'); _.$slider.removeClass('slick-initialized'); - _.$slider.removeClass('slick-dotted'); - _.unslicked = true; + _.$list.off('.slick'); + $(window).off('.slick-' + _.instanceUid); + $(document).off('.slick-' + _.instanceUid); - if(!refresh) { - _.$slider.trigger('destroy', [_]); - } + _.$slider.html(_.$slides); }; @@ -4224,7 +3176,7 @@ var _ = this, transition = {}; - transition[_.transitionType] = ''; + transition[_.transitionType] = ""; if (_.options.fade === false) { _.$slideTrack.css(transition); @@ -4241,7 +3193,7 @@ if (_.cssTransitions === false) { _.$slides.eq(slideIndex).css({ - zIndex: _.options.zIndex + zIndex: 1000 }); _.$slides.eq(slideIndex).animate({ @@ -4254,7 +3206,7 @@ _.$slides.eq(slideIndex).css({ opacity: 1, - zIndex: _.options.zIndex + zIndex: 1000 }); if (callback) { @@ -4270,38 +3222,12 @@ }; - Slick.prototype.fadeSlideOut = function(slideIndex) { - - var _ = this; - - if (_.cssTransitions === false) { - - _.$slides.eq(slideIndex).animate({ - opacity: 0, - zIndex: _.options.zIndex - 2 - }, _.options.speed, _.options.easing); - - } else { - - _.applyTransition(slideIndex); - - _.$slides.eq(slideIndex).css({ - opacity: 0, - zIndex: _.options.zIndex - 2 - }); - - } - - }; - Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) { var _ = this; if (filter !== null) { - _.$slidesCache = _.$slides; - _.unload(); _.$slideTrack.children(this.options.slide).detach(); @@ -4314,30 +3240,6 @@ }; - Slick.prototype.focusHandler = function() { - - var _ = this; - - _.$slider - .off('focus.slick blur.slick') - .on('focus.slick blur.slick', - '*:not(.slick-arrow)', function(event) { - - event.stopImmediatePropagation(); - var $sf = $(this); - - setTimeout(function() { - - if( _.options.pauseOnFocus ) { - _.focussed = $sf.is(':focus'); - _.autoPlay(); - } - - }, 0); - - }); - }; - Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() { var _ = this; @@ -4353,21 +3255,15 @@ var counter = 0; var pagerQty = 0; - if (_.options.infinite === true) { - while (breakPoint < _.slideCount) { - ++pagerQty; - breakPoint = counter + _.options.slidesToScroll; - counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; - } + if(_.options.infinite === true) { + pagerQty = Math.ceil(_.slideCount / _.options.slidesToScroll); } else if (_.options.centerMode === true) { pagerQty = _.slideCount; - } else if(!_.options.asNavFor) { - pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll); - }else { - while (breakPoint < _.slideCount) { + } else { + while (breakPoint < _.slideCount){ ++pagerQty; - breakPoint = counter + _.options.slidesToScroll; - counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; + breakPoint = counter + _.options.slidesToShow; + counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; } } @@ -4384,7 +3280,7 @@ targetSlide; _.slideOffset = 0; - verticalHeight = _.$slides.first().outerHeight(true); + verticalHeight = _.$slides.first().outerHeight(); if (_.options.infinite === true) { if (_.slideCount > _.options.slidesToShow) { @@ -4393,7 +3289,7 @@ } if (_.slideCount % _.options.slidesToScroll !== 0) { if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) { - if (slideIndex > _.slideCount) { + if(slideIndex > _.slideCount) { _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1; verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1; } else { @@ -4403,13 +3299,13 @@ } } } else { - if (slideIndex + _.options.slidesToShow > _.slideCount) { + if(slideIndex + _.options.slidesToShow > _.slideCount) { _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth; verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight; } } - if (_.slideCount <= _.options.slidesToShow) { + if (_.slideCount <= _.options.slidesToShow){ _.slideOffset = 0; verticalOffset = 0; } @@ -4435,33 +3331,15 @@ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow); } - if (_.options.rtl === true) { - if (targetSlide[0]) { - targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; - } else { - targetLeft = 0; - } - } else { - targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; - } + targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; if (_.options.centerMode === true) { - if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { + if(_.options.infinite === false) { targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex); } else { targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1); } - - if (_.options.rtl === true) { - if (targetSlide[0]) { - targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; - } else { - targetLeft = 0; - } - } else { - targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; - } - + targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2; } } @@ -4480,24 +3358,21 @@ Slick.prototype.getNavigableIndexes = function() { - var _ = this, - breakPoint = 0, - counter = 0, - indexes = [], - max; + var _ = this, breakPoint = 0, counter = 0, indexes = [], max; - if (_.options.infinite === false) { - max = _.slideCount; + if(_.options.infinite === false) { + max = _.slideCount - _.options.slidesToShow + 1; + if (_.options.centerMode === true) max = _.slideCount; } else { - breakPoint = _.options.slidesToScroll * -1; - counter = _.options.slidesToScroll * -1; + breakPoint = _.slideCount * -1; + counter = _.slideCount * -1; max = _.slideCount * 2; } - while (breakPoint < max) { + while (breakPoint < max){ indexes.push(breakPoint); breakPoint = counter + _.options.slidesToScroll; - counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; + counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; } return indexes; @@ -4512,13 +3387,12 @@ Slick.prototype.getSlideCount = function() { - var _ = this, - slidesTraversed, swipedSlide, centerOffset; + var _ = this, slidesTraversed, swipedSlide, centerOffset; centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0; - if (_.options.swipeToSlide === true) { - _.$slideTrack.find('.slick-slide').each(function(index, slide) { + if(_.options.swipeToSlide === true) { + _.$slideTrack.find('.slick-slide').each(function(index, slide){ if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) { swipedSlide = slide; return false; @@ -4548,15 +3422,13 @@ }; - Slick.prototype.init = function(creation) { + Slick.prototype.init = function() { var _ = this; if (!$(_.$slider).hasClass('slick-initialized')) { $(_.$slider).addClass('slick-initialized'); - - _.buildRows(); _.buildOut(); _.setProps(); _.startLoad(); @@ -4564,60 +3436,9 @@ _.initializeEvents(); _.updateArrows(); _.updateDots(); - _.checkResponsive(true); - _.focusHandler(); - } - if (creation) { - _.$slider.trigger('init', [_]); - } - - if (_.options.accessibility === true) { - _.initADA(); - } - - if ( _.options.autoplay ) { - - _.paused = false; - _.autoPlay(); - - } - - }; - - Slick.prototype.initADA = function() { - var _ = this; - _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({ - 'aria-hidden': 'true', - 'tabindex': '-1' - }).find('a, input, button, select').attr({ - 'tabindex': '-1' - }); - - _.$slideTrack.attr('role', 'listbox'); - - _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) { - $(this).attr({ - 'role': 'option', - 'aria-describedby': 'slick-slide' + _.instanceUid + i + '' - }); - }); - - if (_.$dots !== null) { - _.$dots.attr('role', 'tablist').find('li').each(function(i) { - $(this).attr({ - 'role': 'presentation', - 'aria-selected': 'false', - 'aria-controls': 'navigation' + _.instanceUid + i + '', - 'id': 'slick-slide' + _.instanceUid + i + '' - }); - }) - .first().attr('aria-selected', 'true').end() - .find('button').attr('role', 'button').end() - .closest('div').attr('role', 'toolbar'); - } - _.activateADA(); + _.$slider.trigger("init", [ _ ]); }; @@ -4626,16 +3447,12 @@ var _ = this; if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { - _.$prevArrow - .off('click.slick') - .on('click.slick', { - message: 'previous' - }, _.changeSlide); - _.$nextArrow - .off('click.slick') - .on('click.slick', { - message: 'next' - }, _.changeSlide); + _.$prevArrow.on('click.slick', { + message: 'previous' + }, _.changeSlide); + _.$nextArrow.on('click.slick', { + message: 'next' + }, _.changeSlide); } }; @@ -4650,25 +3467,16 @@ }, _.changeSlide); } - if ( _.options.dots === true && _.options.pauseOnDotsHover === true ) { - + if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.options.autoplay === true) { $('li', _.$dots) - .on('mouseenter.slick', $.proxy(_.interrupt, _, true)) - .on('mouseleave.slick', $.proxy(_.interrupt, _, false)); - - } - - }; - - Slick.prototype.initSlideEvents = function() { - - var _ = this; - - if ( _.options.pauseOnHover ) { - - _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true)); - _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false)); - + .on('mouseenter.slick', function(){ + _.paused = true; + _.autoPlayClear(); + }) + .on('mouseleave.slick', function(){ + _.paused = false; + _.autoPlay(); + }); } }; @@ -4680,7 +3488,6 @@ _.initArrowEvents(); _.initDotEvents(); - _.initSlideEvents(); _.$list.on('touchstart.slick mousedown.slick', { action: 'start' @@ -4697,21 +3504,52 @@ _.$list.on('click.slick', _.clickHandler); - $(document).on(_.visibilityChange, $.proxy(_.visibility, _)); + if (_.options.autoplay === true) { - if (_.options.accessibility === true) { + $(document).on(_.visibilityChange, function(){ + _.visibility(); + }); + + if( _.options.pauseOnHover === true ) { + + _.$list.on('mouseenter.slick', function(){ + _.paused = true; + _.autoPlayClear(); + }); + _.$list.on('mouseleave.slick', function(){ + _.paused = false; + _.autoPlay(); + }); + + } + + } + + if(_.options.accessibility === true) { _.$list.on('keydown.slick', _.keyHandler); } - if (_.options.focusOnSelect === true) { + if(_.options.focusOnSelect === true) { $(_.$slideTrack).children().on('click.slick', _.selectHandler); } - $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _)); + $(window).on('orientationchange.slick.slick-' + _.instanceUid, function() { + _.checkResponsive(); + _.setPosition(); + }); - $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _)); + $(window).on('resize.slick.slick-' + _.instanceUid, function() { + if ($(window).width() !== _.windowWidth) { + clearTimeout(_.windowDelay); + _.windowDelay = window.setTimeout(function() { + _.windowWidth = $(window).width(); + _.checkResponsive(); + _.setPosition(); + }, 50); + } + }); - $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault); + $('*[draggable!=true]', _.$slideTrack).on('dragstart', function(e){ e.preventDefault(); }); $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition); $(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition); @@ -4735,26 +3573,30 @@ } + if (_.options.autoplay === true) { + + _.autoPlay(); + + } + }; Slick.prototype.keyHandler = function(event) { var _ = this; - //Dont slide if the cursor is inside the form fields and arrow keys are pressed - if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) { - if (event.keyCode === 37 && _.options.accessibility === true) { - _.changeSlide({ - data: { - message: _.options.rtl === true ? 'next' : 'previous' - } - }); - } else if (event.keyCode === 39 && _.options.accessibility === true) { - _.changeSlide({ - data: { - message: _.options.rtl === true ? 'previous' : 'next' - } - }); - } + + if (event.keyCode === 37 && _.options.accessibility === true) { + _.changeSlide({ + data: { + message: 'previous' + } + }); + } else if (event.keyCode === 39 && _.options.accessibility === true) { + _.changeSlide({ + data: { + message: 'next' + } + }); } }; @@ -4765,70 +3607,43 @@ loadRange, cloneRange, rangeStart, rangeEnd; function loadImages(imagesScope) { - $('img[data-lazy]', imagesScope).each(function() { - var image = $(this), - imageSource = $(this).attr('data-lazy'), - imageToLoad = document.createElement('img'); - - imageToLoad.onload = function() { - - image - .animate({ opacity: 0 }, 100, function() { - image - .attr('src', imageSource) - .animate({ opacity: 1 }, 200, function() { - image - .removeAttr('data-lazy') - .removeClass('slick-loading'); - }); - _.$slider.trigger('lazyLoaded', [_, image, imageSource]); - }); - - }; - - imageToLoad.onerror = function() { - - image - .removeAttr( 'data-lazy' ) - .removeClass( 'slick-loading' ) - .addClass( 'slick-lazyload-error' ); - - _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]); - - }; - - imageToLoad.src = imageSource; + imageSource = $(this).attr('data-lazy'); + image + .load(function() { image.animate({ opacity: 1 }, 200); }) + .css({ opacity: 0 }) + .attr('src', imageSource) + .removeAttr('data-lazy') + .removeClass('slick-loading'); }); - } if (_.options.centerMode === true) { if (_.options.infinite === true) { - rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1); + rangeStart = _.currentSlide + (_.options.slidesToShow/2 + 1); rangeEnd = rangeStart + _.options.slidesToShow + 2; } else { - rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1)); - rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide; + rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow/2 + 1)); + rangeEnd = 2 + (_.options.slidesToShow/2 + 1) + _.currentSlide; } } else { rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide; - rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow); - if (_.options.fade === true) { - if (rangeStart > 0) rangeStart--; - if (rangeEnd <= _.slideCount) rangeEnd++; + rangeEnd = rangeStart + _.options.slidesToShow; + if (_.options.fade === true ) { + if(rangeStart > 0) rangeStart--; + if(rangeEnd <= _.slideCount) rangeEnd++; } } loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd); loadImages(loadRange); - if (_.slideCount <= _.options.slidesToShow) { - cloneRange = _.$slider.find('.slick-slide'); - loadImages(cloneRange); - } else + if (_.slideCount <= _.options.slidesToShow){ + cloneRange = _.$slider.find('.slick-slide'); + loadImages(cloneRange); + }else if (_.currentSlide >= _.slideCount - _.options.slidesToShow) { cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow); loadImages(cloneRange); @@ -4871,15 +3686,6 @@ }; - Slick.prototype.orientationChange = function() { - - var _ = this; - - _.checkResponsive(); - _.setPosition(); - - }; - Slick.prototype.pause = Slick.prototype.slickPause = function() { var _ = this; @@ -4893,11 +3699,8 @@ var _ = this; - _.autoPlay(); - _.options.autoplay = true; _.paused = false; - _.focussed = false; - _.interrupted = false; + _.autoPlay(); }; @@ -4905,24 +3708,16 @@ var _ = this; - if( !_.unslicked ) { + _.$slider.trigger("afterChange", [ _, index]); - _.$slider.trigger('afterChange', [_, index]); + _.animating = false; - _.animating = false; + _.setPosition(); - _.setPosition(); - - _.swipeLeft = null; - - if ( _.options.autoplay ) { - _.autoPlay(); - } - - if (_.options.accessibility === true) { - _.initADA(); - } + _.swipeLeft = null; + if (_.options.autoplay === true && _.paused === false) { + _.autoPlay(); } }; @@ -4939,158 +3734,48 @@ }; - Slick.prototype.preventDefault = function(event) { - - event.preventDefault(); - - }; - - Slick.prototype.progressiveLazyLoad = function( tryCount ) { - - tryCount = tryCount || 1; + Slick.prototype.progressiveLazyLoad = function() { var _ = this, - $imgsToLoad = $( 'img[data-lazy]', _.$slider ), - image, - imageSource, - imageToLoad; + imgCount, targetImage; - if ( $imgsToLoad.length ) { + imgCount = $('img[data-lazy]', _.$slider).length; - image = $imgsToLoad.first(); - imageSource = image.attr('data-lazy'); - imageToLoad = document.createElement('img'); - - imageToLoad.onload = function() { - - image - .attr( 'src', imageSource ) - .removeAttr('data-lazy') - .removeClass('slick-loading'); - - if ( _.options.adaptiveHeight === true ) { + if (imgCount > 0) { + targetImage = $('img[data-lazy]', _.$slider).first(); + targetImage.attr('src', targetImage.attr('data-lazy')).removeClass('slick-loading').load(function() { + targetImage.removeAttr('data-lazy'); + _.progressiveLazyLoad(); + + if( _.options.adaptiveHeight === true ) { _.setPosition(); } - - _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]); - _.progressiveLazyLoad(); - - }; - - imageToLoad.onerror = function() { - - if ( tryCount < 3 ) { - - /** - * try to load the image 3 times, - * leave a slight delay so we don't get - * servers blocking the request. - */ - setTimeout( function() { - _.progressiveLazyLoad( tryCount + 1 ); - }, 500 ); - - } else { - - image - .removeAttr( 'data-lazy' ) - .removeClass( 'slick-loading' ) - .addClass( 'slick-lazyload-error' ); - - _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]); - - _.progressiveLazyLoad(); - - } - - }; - - imageToLoad.src = imageSource; - - } else { - - _.$slider.trigger('allImagesLoaded', [ _ ]); - + }) + .error(function () { + targetImage.removeAttr('data-lazy'); + _.progressiveLazyLoad(); + }); } }; - Slick.prototype.refresh = function( initializing ) { + Slick.prototype.refresh = function() { - var _ = this, currentSlide, lastVisibleIndex; + var _ = this, + currentSlide = _.currentSlide; - lastVisibleIndex = _.slideCount - _.options.slidesToShow; + _.destroy(); - // in non-infinite sliders, we don't want to go past the - // last visible index. - if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) { - _.currentSlide = lastVisibleIndex; - } - - // if less slides than to show, go to start. - if ( _.slideCount <= _.options.slidesToShow ) { - _.currentSlide = 0; - - } - - currentSlide = _.currentSlide; - - _.destroy(true); - - $.extend(_, _.initials, { currentSlide: currentSlide }); + $.extend(_, _.initials); _.init(); - if( !initializing ) { - - _.changeSlide({ - data: { - message: 'index', - index: currentSlide - } - }, false); - - } - - }; - - Slick.prototype.registerBreakpoints = function() { - - var _ = this, breakpoint, currentBreakpoint, l, - responsiveSettings = _.options.responsive || null; - - if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) { - - _.respondTo = _.options.respondTo || 'window'; - - for ( breakpoint in responsiveSettings ) { - - l = _.breakpoints.length-1; - currentBreakpoint = responsiveSettings[breakpoint].breakpoint; - - if (responsiveSettings.hasOwnProperty(breakpoint)) { - - // loop through the breakpoints and cut out any existing - // ones with the same breakpoint number, we don't want dupes. - while( l >= 0 ) { - if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) { - _.breakpoints.splice(l,1); - } - l--; - } - - _.breakpoints.push(currentBreakpoint); - _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings; - - } - + _.changeSlide({ + data: { + message: 'index', + index: currentSlide } - - _.breakpoints.sort(function(a, b) { - return ( _.options.mobileFirst ) ? a-b : b-a; - }); - - } + }, true); }; @@ -5098,10 +3783,8 @@ var _ = this; - _.$slides = - _.$slideTrack - .children(_.options.slide) - .addClass('slick-slide'); + _.$slides = _.$slideTrack.children(_.options.slide).addClass( + 'slick-slide'); _.slideCount = _.$slides.length; @@ -5113,49 +3796,32 @@ _.currentSlide = 0; } - _.registerBreakpoints(); - _.setProps(); + _.setupInfinite(); + _.buildArrows(); + _.updateArrows(); + _.initArrowEvents(); + _.buildDots(); + _.updateDots(); + _.initDotEvents(); - _.cleanUpSlideEvents(); - _.initSlideEvents(); - _.checkResponsive(false, true); - - if (_.options.focusOnSelect === true) { + if(_.options.focusOnSelect === true) { $(_.$slideTrack).children().on('click.slick', _.selectHandler); } - _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); + _.setSlideClasses(0); _.setPosition(); - _.focusHandler(); - _.paused = !_.options.autoplay; - _.autoPlay(); + _.$slider.trigger("reInit", [ _ ]); - _.$slider.trigger('reInit', [_]); - - }; - - Slick.prototype.resize = function() { - - var _ = this; - - if ($(window).width() !== _.windowWidth) { - clearTimeout(_.windowDelay); - _.windowDelay = window.setTimeout(function() { - _.windowWidth = $(window).width(); - _.checkResponsive(); - if( !_.unslicked ) { _.setPosition(); } - }, 50); - } }; Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) { @@ -5175,7 +3841,7 @@ _.unload(); - if (removeAll === true) { + if(removeAll === true) { _.$slideTrack.children().remove(); } else { _.$slideTrack.children(this.options.slide).eq(index).remove(); @@ -5196,8 +3862,7 @@ Slick.prototype.setCSS = function(position) { var _ = this, - positionProps = {}, - x, y; + positionProps = {}, x, y; if (_.options.rtl === true) { position = -position; @@ -5245,12 +3910,17 @@ _.listHeight = _.$list.height(); - if (_.options.vertical === false && _.options.variableWidth === false) { + if(_.options.vertical === false && _.options.variableWidth === false) { _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow); _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length))); } else if (_.options.variableWidth === true) { - _.$slideTrack.width(5000 * _.slideCount); + var trackWidth = 0; + _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow); + _.$slideTrack.children('.slick-slide').each(function(){ + trackWidth += _.listWidth; + }); + _.$slideTrack.width(Math.ceil(trackWidth) + 1); } else { _.slideWidth = Math.ceil(_.listWidth); _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length))); @@ -5273,7 +3943,7 @@ position: 'relative', right: targetLeft, top: 0, - zIndex: _.options.zIndex - 2, + zIndex: 800, opacity: 0 }); } else { @@ -5281,14 +3951,14 @@ position: 'relative', left: targetLeft, top: 0, - zIndex: _.options.zIndex - 2, + zIndex: 800, opacity: 0 }); } }); _.$slides.eq(_.currentSlide).css({ - zIndex: _.options.zIndex - 1, + zIndex: 900, opacity: 1 }); @@ -5298,107 +3968,21 @@ var _ = this; - if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { + if(_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); _.$list.css('height', targetHeight); } }; - Slick.prototype.setOption = - Slick.prototype.slickSetOption = function() { + Slick.prototype.setOption = Slick.prototype.slickSetOption = function(option, value, refresh) { - /** - * accepts arguments in format of: - * - * - for changing a single option's value: - * .slick("setOption", option, value, refresh ) - * - * - for changing a set of responsive options: - * .slick("setOption", 'responsive', [{}, ...], refresh ) - * - * - for updating multiple values at once (not responsive) - * .slick("setOption", { 'option': value, ... }, refresh ) - */ - - var _ = this, l, item, option, value, refresh = false, type; - - if( $.type( arguments[0] ) === 'object' ) { - - option = arguments[0]; - refresh = arguments[1]; - type = 'multiple'; - - } else if ( $.type( arguments[0] ) === 'string' ) { - - option = arguments[0]; - value = arguments[1]; - refresh = arguments[2]; - - if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) { - - type = 'responsive'; - - } else if ( typeof arguments[1] !== 'undefined' ) { - - type = 'single'; - - } - - } - - if ( type === 'single' ) { - - _.options[option] = value; - - - } else if ( type === 'multiple' ) { - - $.each( option , function( opt, val ) { - - _.options[opt] = val; - - }); - - - } else if ( type === 'responsive' ) { - - for ( item in value ) { - - if( $.type( _.options.responsive ) !== 'array' ) { - - _.options.responsive = [ value[item] ]; - - } else { - - l = _.options.responsive.length-1; - - // loop through the responsive object and splice out duplicates. - while( l >= 0 ) { - - if( _.options.responsive[l].breakpoint === value[item].breakpoint ) { - - _.options.responsive.splice(l,1); - - } - - l--; - - } - - _.options.responsive.push( value[item] ); - - } - - } - - } - - if ( refresh ) { + var _ = this; + _.options[option] = value; + if (refresh === true) { _.unload(); _.reinit(); - } }; @@ -5417,7 +4001,7 @@ _.setFade(); } - _.$slider.trigger('setPosition', [_]); + _.$slider.trigger("setPosition", [ _ ]); }; @@ -5437,51 +4021,42 @@ if (bodyStyle.WebkitTransition !== undefined || bodyStyle.MozTransition !== undefined || bodyStyle.msTransition !== undefined) { - if (_.options.useCSS === true) { + if(_.options.useCSS === true) { _.cssTransitions = true; } } - if ( _.options.fade ) { - if ( typeof _.options.zIndex === 'number' ) { - if( _.options.zIndex < 3 ) { - _.options.zIndex = 3; - } - } else { - _.options.zIndex = _.defaults.zIndex; - } - } - if (bodyStyle.OTransform !== undefined) { _.animType = 'OTransform'; - _.transformType = '-o-transform'; + _.transformType = "-o-transform"; _.transitionType = 'OTransition'; if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false; } if (bodyStyle.MozTransform !== undefined) { _.animType = 'MozTransform'; - _.transformType = '-moz-transform'; + _.transformType = "-moz-transform"; _.transitionType = 'MozTransition'; if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false; } if (bodyStyle.webkitTransform !== undefined) { _.animType = 'webkitTransform'; - _.transformType = '-webkit-transform'; + _.transformType = "-webkit-transform"; _.transitionType = 'webkitTransition'; if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false; } if (bodyStyle.msTransform !== undefined) { _.animType = 'msTransform'; - _.transformType = '-ms-transform'; + _.transformType = "-ms-transform"; _.transitionType = 'msTransition'; if (bodyStyle.msTransform === undefined) _.animType = false; } if (bodyStyle.transform !== undefined && _.animType !== false) { _.animType = 'transform'; - _.transformType = 'transform'; + _.transformType = "transform"; _.transitionType = 'transition'; } - _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false); + _.transformsEnabled = (_.animType !== null && _.animType !== false); + }; @@ -5490,94 +4065,46 @@ var _ = this, centerOffset, allSlides, indexOffset, remainder; - allSlides = _.$slider - .find('.slick-slide') - .removeClass('slick-active slick-center slick-current') - .attr('aria-hidden', 'true'); - - _.$slides - .eq(index) - .addClass('slick-current'); + _.$slider.find('.slick-slide').removeClass('slick-active').attr("aria-hidden","true").removeClass('slick-center'); + allSlides = _.$slider.find('.slick-slide'); if (_.options.centerMode === true) { centerOffset = Math.floor(_.options.slidesToShow / 2); - if (_.options.infinite === true) { + if(_.options.infinite === true) { if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) { - - _.$slides - .slice(index - centerOffset, index + centerOffset + 1) - .addClass('slick-active') - .attr('aria-hidden', 'false'); - + _.$slides.slice(index - centerOffset, index + centerOffset + 1).addClass('slick-active').attr("aria-hidden","false"); } else { - indexOffset = _.options.slidesToShow + index; - allSlides - .slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2) - .addClass('slick-active') - .attr('aria-hidden', 'false'); - + allSlides.slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2).addClass('slick-active').attr("aria-hidden","false"); } if (index === 0) { - - allSlides - .eq(allSlides.length - 1 - _.options.slidesToShow) - .addClass('slick-center'); - + allSlides.eq(allSlides.length - 1 - _.options.slidesToShow).addClass('slick-center'); } else if (index === _.slideCount - 1) { - - allSlides - .eq(_.options.slidesToShow) - .addClass('slick-center'); - + allSlides.eq(_.options.slidesToShow).addClass('slick-center'); } } - _.$slides - .eq(index) - .addClass('slick-center'); + _.$slides.eq(index).addClass('slick-center'); } else { if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) { - - _.$slides - .slice(index, index + _.options.slidesToShow) - .addClass('slick-active') - .attr('aria-hidden', 'false'); - - } else if (allSlides.length <= _.options.slidesToShow) { - - allSlides - .addClass('slick-active') - .attr('aria-hidden', 'false'); - + _.$slides.slice(index, index + _.options.slidesToShow).addClass('slick-active').attr("aria-hidden","false"); + } else if ( allSlides.length <= _.options.slidesToShow ) { + allSlides.addClass('slick-active').attr("aria-hidden","false"); } else { - - remainder = _.slideCount % _.options.slidesToShow; + remainder = _.slideCount%_.options.slidesToShow; indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index; - - if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) { - - allSlides - .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder) - .addClass('slick-active') - .attr('aria-hidden', 'false'); - + if(_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) { + allSlides.slice(indexOffset-(_.options.slidesToShow-remainder), indexOffset + remainder).addClass('slick-active').attr("aria-hidden","false"); } else { - - allSlides - .slice(indexOffset, indexOffset + _.options.slidesToShow) - .addClass('slick-active') - .attr('aria-hidden', 'false'); - + allSlides.slice(indexOffset, indexOffset + _.options.slidesToShow).addClass('slick-active').attr("aria-hidden","false"); } - } } @@ -5610,16 +4137,16 @@ } for (i = _.slideCount; i > (_.slideCount - - infiniteCount); i -= 1) { + infiniteCount); i -= 1) { slideIndex = i - 1; $(_.$slides[slideIndex]).clone(true).attr('id', '') - .attr('data-slick-index', slideIndex - _.slideCount) + .attr('data-slick-index', slideIndex-_.slideCount) .prependTo(_.$slideTrack).addClass('slick-cloned'); } for (i = 0; i < infiniteCount; i += 1) { slideIndex = i; $(_.$slides[slideIndex]).clone(true).attr('id', '') - .attr('data-slick-index', slideIndex + _.slideCount) + .attr('data-slick-index', slideIndex+_.slideCount) .appendTo(_.$slideTrack).addClass('slick-cloned'); } _.$slideTrack.find('.slick-cloned').find('[id]').each(function() { @@ -5632,46 +4159,30 @@ }; - Slick.prototype.interrupt = function( toggle ) { - - var _ = this; - - if( !toggle ) { - _.autoPlay(); - } - _.interrupted = toggle; - - }; - Slick.prototype.selectHandler = function(event) { var _ = this; + var index = parseInt($(event.target).parents('.slick-slide').attr("data-slick-index")); + if(!index) index = 0; - var targetElement = - $(event.target).is('.slick-slide') ? - $(event.target) : - $(event.target).parents('.slick-slide'); - - var index = parseInt(targetElement.attr('data-slick-index')); - - if (!index) index = 0; - - if (_.slideCount <= _.options.slidesToShow) { - - _.setSlideClasses(index); + if(_.slideCount <= _.options.slidesToShow){ + _.$slider.find('.slick-slide').removeClass('slick-active').attr("aria-hidden","true"); + _.$slides.eq(index).addClass('slick-active').attr("aria-hidden","false"); + if(_.options.centerMode === true) { + _.$slider.find('.slick-slide').removeClass('slick-center'); + _.$slides.eq(index).addClass('slick-center'); + } _.asNavFor(index); return; - } - _.slideHandler(index); }; - Slick.prototype.slideHandler = function(index, sync, dontAnimate) { + Slick.prototype.slideHandler = function(index,sync,dontAnimate) { var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null, - _ = this, navTarget; + _ = this; sync = sync || false; @@ -5698,9 +4209,9 @@ _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft; if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) { - if (_.options.fade === false) { + if(_.options.fade === false) { targetSlide = _.currentSlide; - if (dontAnimate !== true) { + if(dontAnimate!==true) { _.animateSlide(slideLeft, function() { _.postSlide(targetSlide); }); @@ -5710,9 +4221,9 @@ } return; } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) { - if (_.options.fade === false) { + if(_.options.fade === false) { targetSlide = _.currentSlide; - if (dontAnimate !== true) { + if(dontAnimate!==true) { _.animateSlide(slideLeft, function() { _.postSlide(targetSlide); }); @@ -5723,7 +4234,7 @@ return; } - if ( _.options.autoplay ) { + if (_.options.autoplay === true) { clearInterval(_.autoPlayTimer); } @@ -5745,36 +4256,21 @@ _.animating = true; - _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]); + _.$slider.trigger("beforeChange", [ _ , _.currentSlide, animSlide]); oldSlide = _.currentSlide; _.currentSlide = animSlide; _.setSlideClasses(_.currentSlide); - if ( _.options.asNavFor ) { - - navTarget = _.getNavTarget(); - navTarget = navTarget.slick('getSlick'); - - if ( navTarget.slideCount <= navTarget.options.slidesToShow ) { - navTarget.setSlideClasses(_.currentSlide); - } - - } - _.updateDots(); _.updateArrows(); if (_.options.fade === true) { - if (dontAnimate !== true) { - - _.fadeSlideOut(oldSlide); - + if(dontAnimate!==true) { _.fadeSlide(animSlide, function() { _.postSlide(animSlide); }); - } else { _.postSlide(animSlide); } @@ -5782,7 +4278,7 @@ return; } - if (dontAnimate !== true) { + if(dontAnimate!==true) { _.animateSlide(targetLeft, function() { _.postSlide(animSlide); }); @@ -5835,13 +4331,6 @@ if ((swipeAngle >= 135) && (swipeAngle <= 225)) { return (_.options.rtl === false ? 'right' : 'left'); } - if (_.options.verticalSwiping === true) { - if ((swipeAngle >= 35) && (swipeAngle <= 135)) { - return 'down'; - } else { - return 'up'; - } - } return 'vertical'; @@ -5849,74 +4338,44 @@ Slick.prototype.swipeEnd = function(event) { - var _ = this, - slideCount, - direction; + var _ = this, slideCount; _.dragging = false; - _.interrupted = false; - _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true; - if ( _.touchObject.curX === undefined ) { + _.shouldClick = (_.touchObject.swipeLength > 10) ? false : true; + + if (_.touchObject.curX === undefined) { return false; } - if ( _.touchObject.edgeHit === true ) { - _.$slider.trigger('edge', [_, _.swipeDirection() ]); + if (_.touchObject.edgeHit === true) { + _.$slider.trigger("edge", [ _, _.swipeDirection()]); } - if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) { - - direction = _.swipeDirection(); - - switch ( direction ) { + if (_.touchObject.swipeLength >= _.touchObject.minSwipe) { + switch (_.swipeDirection()) { case 'left': - case 'down': - - slideCount = - _.options.swipeToSlide ? - _.checkNavigable( _.currentSlide + _.getSlideCount() ) : - _.currentSlide + _.getSlideCount(); - + slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide + _.getSlideCount()) : _.currentSlide + _.getSlideCount(); + _.slideHandler(slideCount); _.currentDirection = 0; - + _.touchObject = {}; + _.$slider.trigger("swipe", [ _, "left"]); break; case 'right': - case 'up': - - slideCount = - _.options.swipeToSlide ? - _.checkNavigable( _.currentSlide - _.getSlideCount() ) : - _.currentSlide - _.getSlideCount(); - + slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide - _.getSlideCount()) : _.currentSlide - _.getSlideCount(); + _.slideHandler(slideCount); _.currentDirection = 1; - + _.touchObject = {}; + _.$slider.trigger("swipe", [ _, "right"]); break; - - default: - - } - - if( direction != 'vertical' ) { - - _.slideHandler( slideCount ); - _.touchObject = {}; - _.$slider.trigger('swipe', [_, direction ]); - - } - } else { - - if ( _.touchObject.startX !== _.touchObject.curX ) { - - _.slideHandler( _.currentSlide ); + if(_.touchObject.startX !== _.touchObject.curX) { + _.slideHandler(_.currentSlide); _.touchObject = {}; - } - } }; @@ -5926,9 +4385,9 @@ var _ = this; if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) { - return; + return; } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) { - return; + return; } _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ? @@ -5937,11 +4396,6 @@ _.touchObject.minSwipe = _.listWidth / _.options .touchThreshold; - if (_.options.verticalSwiping === true) { - _.touchObject.minSwipe = _.listHeight / _.options - .touchThreshold; - } - switch (event.data.action) { case 'start': @@ -5980,11 +4434,6 @@ _.touchObject.swipeLength = Math.round(Math.sqrt( Math.pow(_.touchObject.curX - _.touchObject.startX, 2))); - if (_.options.verticalSwiping === true) { - _.touchObject.swipeLength = Math.round(Math.sqrt( - Math.pow(_.touchObject.curY - _.touchObject.startY, 2))); - } - swipeDirection = _.swipeDirection(); if (swipeDirection === 'vertical') { @@ -5996,17 +4445,13 @@ } positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1); - if (_.options.verticalSwiping === true) { - positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1; - } - swipeLength = _.touchObject.swipeLength; _.touchObject.edgeHit = false; if (_.options.infinite === false) { - if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) { + if ((_.currentSlide === 0 && swipeDirection === "right") || (_.currentSlide >= _.getDotCount() && swipeDirection === "left")) { swipeLength = _.touchObject.swipeLength * _.options.edgeFriction; _.touchObject.edgeHit = true; } @@ -6017,9 +4462,6 @@ } else { _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset; } - if (_.options.verticalSwiping === true) { - _.swipeLeft = curLeft + swipeLength * positionOffset; - } if (_.options.fade === true || _.options.touchMove === false) { return false; @@ -6039,8 +4481,6 @@ var _ = this, touches; - _.interrupted = true; - if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) { _.touchObject = {}; return false; @@ -6080,65 +4520,46 @@ var _ = this; $('.slick-cloned', _.$slider).remove(); - if (_.$dots) { _.$dots.remove(); } - - if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) { + if (_.$prevArrow && (typeof _.options.prevArrow !== 'object')) { _.$prevArrow.remove(); } - - if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) { + if (_.$nextArrow && (typeof _.options.nextArrow !== 'object')) { _.$nextArrow.remove(); } - - _.$slides - .removeClass('slick-slide slick-active slick-visible slick-current') - .attr('aria-hidden', 'true') - .css('width', ''); + _.$slides.removeClass('slick-slide slick-active slick-visible').attr("aria-hidden","true").css('width', ''); }; - Slick.prototype.unslick = function(fromBreakpoint) { + Slick.prototype.unslick = function() { var _ = this; - _.$slider.trigger('unslick', [_, fromBreakpoint]); _.destroy(); }; Slick.prototype.updateArrows = function() { - var _ = this, - centerOffset; + var _ = this, centerOffset; centerOffset = Math.floor(_.options.slidesToShow / 2); - if ( _.options.arrows === true && - _.slideCount > _.options.slidesToShow && - !_.options.infinite ) { - - _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); - _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); - + if (_.options.arrows === true && _.options.infinite !== + true && _.slideCount > _.options.slidesToShow) { + _.$prevArrow.removeClass('slick-disabled'); + _.$nextArrow.removeClass('slick-disabled'); if (_.currentSlide === 0) { - - _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); - _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); - + _.$prevArrow.addClass('slick-disabled'); + _.$nextArrow.removeClass('slick-disabled'); } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) { - - _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); - _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); - + _.$nextArrow.addClass('slick-disabled'); + _.$prevArrow.removeClass('slick-disabled'); } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) { - - _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); - _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); - + _.$nextArrow.addClass('slick-disabled'); + _.$prevArrow.removeClass('slick-disabled'); } - } }; @@ -6149,16 +4570,8 @@ if (_.$dots !== null) { - _.$dots - .find('li') - .removeClass('slick-active') - .attr('aria-hidden', 'true'); - - _.$dots - .find('li') - .eq(Math.floor(_.currentSlide / _.options.slidesToScroll)) - .addClass('slick-active') - .attr('aria-hidden', 'false'); + _.$dots.find('li').removeClass('slick-active').attr("aria-hidden","true"); + _.$dots.find('li').eq(Math.floor(_.currentSlide / _.options.slidesToScroll)).addClass('slick-active').attr("aria-hidden","false"); } @@ -6168,39 +4581,32 @@ var _ = this; - if ( _.options.autoplay ) { - - if ( document[_.hidden] ) { - - _.interrupted = true; - - } else { - - _.interrupted = false; - - } - + if( document[ _.hidden ] ) { + _.paused = true; + _.autoPlayClear(); + } else { + _.paused = false; + _.autoPlay(); } }; $.fn.slick = function() { - var _ = this, - opt = arguments[0], - args = Array.prototype.slice.call(arguments, 1), - l = _.length, - i, - ret; - for (i = 0; i < l; i++) { + var _ = this, opt = arguments[0], args = Array.prototype.slice.call(arguments,1), l = _.length, i = 0, ret; + for(i; i < l; i++) { if (typeof opt == 'object' || typeof opt == 'undefined') - _[i].slick = new Slick(_[i], opt); + _[i].slick = new Slick(_[i], opt); else ret = _[i].slick[opt].apply(_[i].slick, args); - if (typeof ret != 'undefined') return ret; + if (typeof ret != 'undefined') return ret; } return _; }; + $(function(){ + $('[data-slick]').slick(); + }); + })); // https://github.com/ghiculescu/jekyll-table-of-contents @@ -6442,6 +4848,7 @@ window.app.contentSearch = (function ($) { var $liveSearchButton = $liveSearch.find(".liveSearch-button"); + //var $contentSearchButton = $liveSearch.find(".contentSearch-button"); var $contentSearchField = $liveSearch.find(".contentSearch-field"); var $contentSearchResultList = $(".searchPage-result-list"); @@ -6456,6 +4863,7 @@ window.app.contentSearch = (function ($) { $liveSearchButton.on("click", openSearchPage); $contentSearchField.on("keyup", handleContentKeyDown); + //$contentSearchButton.on("click", openSearchPage); } @@ -6566,6 +4974,7 @@ window.app.contentSearch = (function ($) { // arrow down, arrow up if (e.keyCode === 38 || e.keyCode === 40) { e.preventDefault(); + //navigateSearchResultsList(e.keyCode); return false; } @@ -6662,6 +5071,7 @@ window.app.contentSearch = (function ($) { // arrow down, arrow up if (e.keyCode === 38 || e.keyCode === 40) { e.preventDefault(); + //navigateSearchResultsList(e.keyCode); return false; } @@ -6781,12 +5191,6 @@ jQuery(document).ready(function(){ } } - - var $tables = $("#content table"); - $tables.each(function(index, item) { - var $table = $(item); - $table.wrap("
    ") - }); }); window.app = window.app || {}; diff --git a/docs/js/footer.min.js b/docs/js/footer.min.js index c12f82fe62..f52a760884 100644 --- a/docs/js/footer.min.js +++ b/docs/js/footer.min.js @@ -1,7 +1,7 @@ -window.Modernizr=function(a,b,c){function d(a){o.cssText=a}function e(a,b){return typeof a===b}var f,g,h,i="2.8.3",j={},k=!0,l=b.documentElement,m="modernizr",n=b.createElement(m),o=n.style,p=({}.toString,{}),q=[],r=q.slice,s={}.hasOwnProperty;h=e(s,"undefined")||e(s.call,"undefined")?function(a,b){return b in a&&e(a.constructor.prototype[b],"undefined")}:function(a,b){return s.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=r.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(r.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(r.call(arguments)))};return d});for(var t in p)h(p,t)&&(g=t.toLowerCase(),j[g]=p[t](),q.push((j[g]?"":"no-")+g));return j.addTest=function(a,b){if("object"==typeof a)for(var d in a)h(a,d)&&j.addTest(d,a[d]);else{if(a=a.toLowerCase(),j[a]!==c)return j;b="function"==typeof b?b():b,"undefined"!=typeof k&&k&&(l.className+=" "+(b?"":"no-")+a),j[a]=b}return j},d(""),n=f=null,function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=s.elements;return"string"==typeof a?a.split(" "):a}function e(a){var b=r[a[p]];return b||(b={},q++,a[p]=q,r[q]=b),b}function f(a,c,d){if(c||(c=b),k)return c.createElement(a);d||(d=e(c));var f;return f=d.cache[a]?d.cache[a].cloneNode():o.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!f.canHaveChildren||n.test(a)||f.tagUrn?f:d.frag.appendChild(f)}function g(a,c){if(a||(a=b),k)return a.createDocumentFragment();c=c||e(a);for(var f=c.frag.cloneNode(),g=0,h=d(),i=h.length;g",j="hidden"in a,k=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(a){j=!0,k=!0}}();var s={elements:m.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:l,shivCSS:m.shivCSS!==!1,supportsUnknownElements:k,shivMethods:m.shivMethods!==!1,type:"default",shivDocument:i,createElement:f,createDocumentFragment:g};a.html5=s,i(b)}(this,b),j._version=i,l.className=l.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(k?" js "+q.join(" "):""),j}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==q.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=r.shift();s=1,a?a.t?o(function(){("c"==a.t?m.injectCss:m.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):s=0}function i(a,c,d,e,f,i,j){function k(b){if(!n&&g(l.readyState)&&(t.r=n=1,!s&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&o(function(){v.removeChild(l)},50);for(var d in A[c])A[c].hasOwnProperty(d)&&A[c][d].onload()}}var j=j||m.errorTimeout,l=b.createElement(a),n=0,q=0,t={t:d,s:c,e:f,a:i,x:j};1===A[c]&&(q=1,A[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,q)},r.splice(e,0,t),"img"!=a&&(q||2===A[c]?(v.insertBefore(l,u?null:p),o(k,j)):A[c].push(l))}function j(a,b,c,d,f){return s=0,b=b||"j",e(a)?i("c"==b?x:w,a,b,this.i++,c,d,f):(r.splice(this.i++,0,a),1==r.length&&h()),this}function k(){var a=m;return a.loader={load:j,i:0},a}var l,m,n=b.documentElement,o=a.setTimeout,p=b.getElementsByTagName("script")[0],q={}.toString,r=[],s=0,t="MozAppearance"in n.style,u=t&&!!b.createRange().compareNode,v=u?n:p.parentNode,n=a.opera&&"[object Opera]"==q.call(a.opera),n=!!b.attachEvent&&!n,w=t?"object":n?"script":"img",x=n?"script":w,y=Array.isArray||function(a){return"[object Array]"==q.call(a)},z=[],A={},B={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}};m=function(a){function b(a){var b,c,d,a=a.split("!"),e=z.length,f=a.pop(),g=a.length,f={url:f,origUrl:f,prefixes:a};for(c=0;ca._pfLastSize)&&(a._pfLastSize=a.offsetWidth,d=a.sizes,a.sizes+=",100vw",setTimeout(function(){a.sizes=d}))},e=function(){var a,b=document.querySelectorAll("picture > img, img[srcset][sizes]");for(a=0;a2.7?h=c+1:(f=b-c,e=Math.pow(a-.6,1.5),g=f*e,d&&(g+=.1*e),h=a+g):h=c>1?Math.sqrt(a*b):a,h>c}function h(a){var b,c=s.getSet(a),d=!1;"pending"!==c&&(d=r,c&&(b=s.setRes(c),s.applySetCandidate(b,a))),a[s.ns].evaled=d}function i(a,b){return a.res-b.res}function j(a,b,c){var d;return!c&&b&&(c=a[s.ns].sets,c=c&&c[c.length-1]),d=k(b,c),d&&(b=s.makeUrl(b),a[s.ns].curSrc=b,a[s.ns].curCan=d,d.res||aa(d,d.set.sizes)),d}function k(a,b){var c,d,e;if(a&&b)for(e=s.parseSet(b),a=s.makeUrl(a),c=0;c=l)return n;g=c(V),h=[],","===g.slice(-1)?(g=g.replace(W,""),e()):f()}}function n(a){function b(a){function b(){f&&(g.push(f),f="")}function c(){g[0]&&(h.push(g),g=[])}for(var e,f="",g=[],h=[],i=0,j=0,k=!1;;){if(e=a.charAt(j),""===e)return b(),c(),h;if(k){if("*"===e&&"/"===a[j+1]){k=!1,j+=2,b();continue}j+=1}else{if(d(e)){if(a.charAt(j-1)&&d(a.charAt(j-1))||!f){j+=1;continue}if(0===i){b(),j+=1;continue}e=" "}else if("("===e)i+=1;else if(")"===e)i-=1;else{if(","===e){b(),c(),j+=1;continue}if("/"===e&&"*"===a.charAt(j+1)){k=!0,j+=2;continue}}f+=e,j+=1}}}function c(a){return!!(k.test(a)&&parseFloat(a)>=0)||(!!l.test(a)||("0"===a||"-0"===a||"+0"===a))}var e,f,g,h,i,j,k=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(f=b(a),g=f.length,e=0;e35,G="currentSrc",H=/\s+\+?\d+(e\d+)?w/,I=/(\([^)]+\))?\s*(.+)/,J=a.picturefillCFG,K="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",L="font-size:100%!important;",M=!0,N={},O={},P=a.devicePixelRatio,Q={px:1,in:96},R=b.createElement("a"),S=!1,T=/^[ \t\n\r\u000c]+/,U=/^[, \t\n\r\u000c]+/,V=/^[^ \t\n\r\u000c]+/,W=/[,]+$/,X=/^\d+$/,Y=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,Z=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)},$=function(a){var b={};return function(c){return c in b||(b[c]=a(c)),b[c]}},_=function(){var a=/^([\d\.]+)(em|vw|px)$/,b=function(){for(var a=arguments,b=0,c=a[0];++b in a;)c=c.replace(a[b],a[++b]);return c},c=$(function(a){return"return "+b((a||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(b,d){var e;if(!(b in N))if(N[b]=!1,d&&(e=b.match(a)))N[b]=e[1]*Q[e[2]];else try{N[b]=new Function("e",c(b))(Q)}catch(a){}return N[b]}}(),aa=function(a,b){return a.w?(a.cWidth=s.calcListLength(b||"100vw"),a.res=a.w/a.cWidth):a.res=a.d,a},ba=function(a){if(t){var c,d,e,f=a||{};if(f.elements&&1===f.elements.nodeType&&("IMG"===f.elements.nodeName.toUpperCase()?f.elements=[f.elements]:(f.context=f.elements,f.elements=null)),c=f.elements||s.qsa(f.context||b,f.reevaluate||f.reselect?s.sel:s.selShort),e=c.length){for(s.setupRun(f),S=!0,d=0;dimg,img[srcset]",s.sel=s.selShort,s.cfg=B,s.DPR=P||1,s.u=Q,s.types=A,s.setSize=u,s.makeUrl=$(function(a){return R.href=a,R.href}),s.qsa=function(a,b){return"querySelector"in a?a.querySelectorAll(b):[]},s.matchesMedia=function(){return a.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?s.matchesMedia=function(a){return!a||matchMedia(a).matches}:s.matchesMedia=s.mMQ,s.matchesMedia.apply(this,arguments)},s.mMQ=function(a){return!a||_(a)},s.calcLength=function(a){var b=_(a,!0)||!1;return b<0&&(b=!1),b},s.supportsType=function(a){return!a||A[a]},s.parseSize=$(function(a){var b=(a||"").match(I);return{media:b&&b[1],length:b&&b[2]}}),s.parseSet=function(a){return a.cands||(a.cands=m(a.srcset,a)),a.cands},s.getEmValue=function(){var a;if(!p&&(a=b.body)){var c=b.createElement("div"),d=z.style.cssText,e=a.style.cssText;c.style.cssText=K,z.style.cssText=L,a.style.cssText=L,a.appendChild(c),p=c.offsetWidth,a.removeChild(c),p=parseFloat(p,10),z.style.cssText=d,a.style.cssText=e}return p||16},s.calcListLength=function(a){if(!(a in O)||B.uT){var b=s.calcLength(n(a));O[a]=b?b:Q.width}return O[a]},s.setRes=function(a){var b;if(a){b=s.parseSet(a);for(var c=0,d=b.length;cp,n||(l.cached=!0,l.res>=p&&(h=l))),!h)for(a.sort(i),f=a.length,h=a[f-1],d=0;d=p){e=d-1,h=a[e]&&(n||k!==s.makeUrl(c.url))&&g(a[e].res,c.res,p,a[e].cached)?a[e]:c;break}h&&(m=s.makeUrl(h.url),o.curSrc=m,o.curCan=h,m!==k&&s.setSrc(b,h),s.setSize(b))}},s.setSrc=function(a,b){var c;a.src=b.url,"image/svg+xml"===b.set.type&&(c=a.style.width,a.style.width=a.offsetWidth+1+"px",a.offsetWidth+1&&(a.style.width=c))},s.getSet=function(a){var b,c,d,e=!1,f=a[s.ns].sets;for(b=0;b0&&b-1 in a)}function d(a,b,c){if(fa.isFunction(b))return fa.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return fa.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(pa.test(b))return fa.filter(b,a,c);b=fa.filter(b,a)}return fa.grep(a,function(a){return _.call(b,a)>-1!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b={};return fa.each(a.match(va)||[],function(a,c){b[c]=!0}),b}function g(){X.removeEventListener("DOMContentLoaded",g),a.removeEventListener("load",g),fa.ready()}function h(){this.expando=fa.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Ca,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:Ba.test(c)?fa.parseJSON(c):c)}catch(a){}Aa.set(a,b,c)}else c=void 0;return c}function j(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return fa.css(a,b,"")},i=h(),j=c&&c[3]||(fa.cssNumber[b]?"":"px"),k=(fa.cssNumber[b]||"px"!==j&&+i)&&Ea.exec(fa.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,fa.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}function k(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&fa.nodeName(a,b)?fa.merge([a],c):c}function l(a,b){for(var c=0,d=a.length;d>c;c++)za.set(a[c],"globalEval",!b||za.get(b[c],"globalEval"))}function m(a,b,c,d,e){for(var f,g,h,i,j,m,n=b.createDocumentFragment(),o=[],p=0,q=a.length;q>p;p++)if(f=a[p],f||0===f)if("object"===fa.type(f))fa.merge(o,f.nodeType?[f]:f);else if(La.test(f)){for(g=g||n.appendChild(b.createElement("div")),h=(Ia.exec(f)||["",""])[1].toLowerCase(),i=Ka[h]||Ka._default,g.innerHTML=i[1]+fa.htmlPrefilter(f)+i[2],m=i[0];m--;)g=g.lastChild;fa.merge(o,g.childNodes),g=n.firstChild,g.textContent=""}else o.push(b.createTextNode(f));for(n.textContent="",p=0;f=o[p++];)if(d&&fa.inArray(f,d)>-1)e&&e.push(f);else if(j=fa.contains(f.ownerDocument,f),g=k(n.appendChild(f),"script"),j&&l(g),c)for(m=0;f=g[m++];)Ja.test(f.type||"")&&c.push(f);return n}function n(){return!0}function o(){return!1}function p(){try{return X.activeElement}catch(a){}}function q(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)q(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=o;else if(!e)return this;return 1===f&&(g=e,e=function(a){return fa().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=fa.guid++)),a.each(function(){fa.event.add(this,b,e,d,c)})}function r(a,b){return fa.nodeName(a,"table")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function s(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function t(a){var b=Sa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function u(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(za.hasData(a)&&(f=za.access(a),g=za.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)fa.event.add(b,e,j[e][c])}Aa.hasData(a)&&(h=Aa.access(a),i=fa.extend({},h),Aa.set(b,i))}}function v(a,b){var c=b.nodeName.toLowerCase();"input"===c&&Ha.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function w(a,b,c,d){b=Z.apply([],b);var e,f,g,h,i,j,l=0,n=a.length,o=n-1,p=b[0],q=fa.isFunction(p);if(q||n>1&&"string"==typeof p&&!da.checkClone&&Ra.test(p))return a.each(function(e){var f=a.eq(e);q&&(b[0]=p.call(this,e,f.html())),w(f,b,c,d)});if(n&&(e=m(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(g=fa.map(k(e,"script"),s),h=g.length;n>l;l++)i=e,l!==o&&(i=fa.clone(i,!0,!0),h&&fa.merge(g,k(i,"script"))),c.call(a[l],i,l);if(h)for(j=g[g.length-1].ownerDocument,fa.map(g,t),l=0;h>l;l++)i=g[l],Ja.test(i.type||"")&&!za.access(i,"globalEval")&&fa.contains(j,i)&&(i.src?fa._evalUrl&&fa._evalUrl(i.src):fa.globalEval(i.textContent.replace(Ta,"")))}return a}function x(a,b,c){for(var d,e=b?fa.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||fa.cleanData(k(d)),d.parentNode&&(c&&fa.contains(d.ownerDocument,d)&&l(k(d,"script")),d.parentNode.removeChild(d));return a}function y(a,b){var c=fa(b.createElement(a)).appendTo(b.body),d=fa.css(c[0],"display");return c.detach(),d}function z(a){var b=X,c=Va[a];return c||(c=y(a,b),"none"!==c&&c||(Ua=(Ua||fa("