diff --git a/AUTHORS.txt b/AUTHORS.txt index 7720bb24d3..1932ff017b 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -76,3 +76,4 @@ ruPaladin BlackPixxel Asgar Serran Kavinsky + diff --git a/ace_advanced_ballistics.dll b/ace_advanced_ballistics.dll new file mode 100644 index 0000000000..568e7c16db Binary files /dev/null and b/ace_advanced_ballistics.dll differ diff --git a/ace_fcs.dll b/ace_fcs.dll index 2cb8b86de2..3385e53463 100644 Binary files a/ace_fcs.dll and b/ace_fcs.dll differ diff --git a/addons/advanced_ballistics/ACE_Settings.hpp b/addons/advanced_ballistics/ACE_Settings.hpp new file mode 100644 index 0000000000..d1462b144f --- /dev/null +++ b/addons/advanced_ballistics/ACE_Settings.hpp @@ -0,0 +1,64 @@ +class ACE_Settings { + class GVAR(enabled) { + displayName = "Advanced Ballistics"; + description = "Enables advanced ballistics"; + typeName = "BOOL"; + value = 0; + }; + class GVAR(alwaysSimulateForSnipers) { + displayName = "Always Enabled For Snipers"; + description = "Always enables advanced ballistics when high power optics are used"; + typeName = "BOOL"; + value = 1; + }; + class GVAR(disabledInFullAutoMode) { + displayName = "Disabled In FullAuto Mode"; + description = "Disables the advanced ballistics during full auto fire"; + typeName = "BOOL"; + value = 0; + }; + class GVAR(onlyActiveForLocalPlayers) { + displayName = "Disabled For Non Local Players"; + description = "Disables the advanced ballistics for bullets coming from other players (enable this if you encounter frame drops during heavy firefights in multiplayer)"; + typeName = "BOOL"; + value = 1; + }; + /* // TODO: We currently do not have firedEHs on vehicles + class GVAR(vehicleGunnerEnabled) { + displayName = "Enabled For Vehicle Gunners"; + description = "Enables advanced ballistics for vehicle gunners"; + typeName = "BOOL"; + value = 0; + }; + */ + class GVAR(ammoTemperatureEnabled) { + displayName = "Enable Ammo Temperature Simulation"; + description = "Muzzle velocity varies with ammo temperature"; + typeName = "BOOL"; + value = 1; + }; + class GVAR(barrelLengthInfluenceEnabled) { + displayName = "Enable Barrel Length Simulation"; + description = "Muzzle velocity varies with barrel length"; + typeName = "BOOL"; + value = 1; + }; + class GVAR(bulletTraceEnabled) { + displayName = "Enable Bullet Trace Effect"; + description = "Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)"; + typeName = "BOOL"; + value = 1; + }; + class GVAR(simulationInterval) { + displayName = "Simulation Interval"; + description = "Defines the interval between every calculation step"; + typeName = "SCALAR"; + value = 0.0; + }; + class GVAR(simulationRadius) { + displayName = "Simulation Radius"; + description = "Defines the radius (in meters) in which advanced ballistics are applied"; + typeName = "SCALAR"; + value = 3000; + }; +}; diff --git a/addons/advanced_ballistics/CfgEventHandlers.hpp b/addons/advanced_ballistics/CfgEventHandlers.hpp new file mode 100644 index 0000000000..cc1414eb8f --- /dev/null +++ b/addons/advanced_ballistics/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +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) ); + }; +}; + +class Extended_FiredBIS_EventHandlers { + class CAManBase { + class ADDON { + firedBIS = QUOTE(_this call FUNC(handleFired)); + }; + }; +}; \ No newline at end of file diff --git a/addons/advanced_ballistics/CfgVehicles.hpp b/addons/advanced_ballistics/CfgVehicles.hpp new file mode 100644 index 0000000000..8e6e40e21e --- /dev/null +++ b/addons/advanced_ballistics/CfgVehicles.hpp @@ -0,0 +1,78 @@ +class CfgVehicles { + class ACE_Module; + class GVAR(ModuleSettings): ACE_Module { + scope = 2; + displayName = "Advanced Ballistics"; + icon = QUOTE(PATHTOF(UI\Icon_Module_Wind_ca.paa)); + category = "ACE"; + function = QUOTE(DFUNC(initModuleSettings)); + functionPriority = 1; + isGlobal = 1; + isTriggerActivated = 0; + author = "Ruthberg"; + class Arguments { + class enabled { + displayName = "Advanced Ballistics"; + description = "Enables advanced ballistics"; + typeName = "BOOL"; + defaultValue = 0; + }; + class alwaysSimulateForSnipers { + displayName = "Always Enabled For Snipers"; + description = "Always enables advanced ballistics when high power optics are used"; + typeName = "BOOL"; + defaultValue = 1; + }; + class disabledInFullAutoMode { + displayName = "Disabled In FullAuto Mode"; + description = "Disables the advanced ballistics during full auto fire"; + typeName = "BOOL"; + defaultValue = 0; + }; + class onlyActiveForLocalPlayers { + displayName = "Disabled For Non Local Players"; + description = "Disables the advanced ballistics for bullets coming from other players (enable this if you encounter frame drops during heavy firefights in multiplayer)"; + typeName = "BOOL"; + defaultValue = 1; + }; + /* // TODO: We currently do not have firedEHs on vehicles + class vehicleGunnerEnabled { + displayName = "Enabled For Vehicle Gunners"; + description = "Enables advanced ballistics for vehicle gunners"; + typeName = "BOOL"; + defaultValue = 0; + }; + */ + class ammoTemperatureEnabled { + displayName = "Enable Ammo Temperature Simulation"; + description = "Muzzle velocity varies with ammo temperature"; + typeName = "BOOL"; + defaultValue = 1; + }; + class barrelLengthInfluenceEnabled { + displayName = "Enable Barrel Length Simulation"; + description = "Muzzle velocity varies with barrel length"; + typeName = "BOOL"; + defaultValue = 1; + }; + class bulletTraceEnabled { + displayName = "Enable Bullet Trace Effect"; + description = "Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)"; + typeName = "BOOL"; + defaultValue = 1; + }; + class simulationInterval { + displayName = "Simulation Interval"; + description = "Defines the interval between every calculation step"; + typeName = "NUMBER"; + defaultValue = 0.0; + }; + class simulationRadius { + displayName = "Simulation Radius"; + description = "Defines the radius (in meters) in which advanced ballistics are applied"; + typeName = "NUMBER"; + defaultValue = 3000; + }; + }; + }; +}; diff --git a/addons/advanced_ballistics/README.md b/addons/advanced_ballistics/README.md new file mode 100644 index 0000000000..ef98bcd2b6 --- /dev/null +++ b/addons/advanced_ballistics/README.md @@ -0,0 +1,10 @@ +ace_advanced_ballistics +=============== + +The Advanced Ballistics module introduces advanced external- and internal ballistics to the game. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Ruthberg] (http://github.com/Ulteq) \ No newline at end of file diff --git a/addons/advanced_ballistics/RscTitles.hpp b/addons/advanced_ballistics/RscTitles.hpp new file mode 100644 index 0000000000..b62af875d2 --- /dev/null +++ b/addons/advanced_ballistics/RscTitles.hpp @@ -0,0 +1,63 @@ +class RscTitles +{ + class RscTurretDial + { + idd=-1; + onLoad="with uiNameSpace do { RscTurretDial = _this select 0 };"; + movingEnable=0; + duration=5; + fadeIn="false"; + fadeOut="false"; + class controls + { + class RscTurretDial + { + idc=132949; + type=0; + style=128; + font="TahomaB"; + colorBackground[]={0,0,0,0.8}; + colorText[]={1,1,1,1}; + x="SafeZoneX + 0.0025"; + y="SafeZoneY + 0.0025"; + w=0.10; + h=0.05; + sizeEx=0.03; + text=""; + }; + }; + }; + + class RscProtractor + { + idd=-1; + onLoad="with uiNameSpace do { RscProtractor = _this select 0 };"; + movingEnable=0; + duration=60; + fadeIn="false"; + fadeOut="false"; + class controls + { + class RscProtractorBase + { + idc=132950; + type=0; + style=48; + font="TahomaB"; + colorBackground[]={0,0,0,0}; + colorText[]={1,1,1,1}; + x="SafeZoneX + 0.001"; + y="SafeZoneY + 0.001"; + w=0.2; + h=0.2*4/3; + size=0.034; + sizeEx=0.027; + text=""; + }; + class RscProtractorMarker : RscProtractorBase + { + idc=132951; + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/advanced_ballistics/UI/Icon_Module_Wind_ca.paa b/addons/advanced_ballistics/UI/Icon_Module_Wind_ca.paa new file mode 100644 index 0000000000..176fe700a7 Binary files /dev/null and b/addons/advanced_ballistics/UI/Icon_Module_Wind_ca.paa differ diff --git a/addons/advanced_ballistics/UI/protractor.paa b/addons/advanced_ballistics/UI/protractor.paa new file mode 100644 index 0000000000..1114b41826 Binary files /dev/null and b/addons/advanced_ballistics/UI/protractor.paa differ diff --git a/addons/advanced_ballistics/UI/protractor_marker.paa b/addons/advanced_ballistics/UI/protractor_marker.paa new file mode 100644 index 0000000000..a97be42a73 Binary files /dev/null and b/addons/advanced_ballistics/UI/protractor_marker.paa differ diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf new file mode 100644 index 0000000000..783a5be569 --- /dev/null +++ b/addons/advanced_ballistics/XEH_postInit.sqf @@ -0,0 +1,45 @@ +#include "script_component.hpp" + +#include "initKeybinds.sqf" + +GVAR(currentbulletID) = -1; + +GVAR(bulletDatabase) = []; +GVAR(bulletDatabaseStartTime) = []; +GVAR(bulletDatabaseSpeed) = []; +GVAR(bulletDatabaseFrames) = []; +GVAR(bulletDatabaseLastFrame) = []; +GVAR(bulletDatabaseHDeflect) = []; +GVAR(bulletDatabaseSpinDrift) = []; +GVAR(bulletDatabaseOccupiedIndices) = []; +GVAR(bulletDatabaseFreeIndices) = []; + +GVAR(WindInfo) = false; +GVAR(WindInfoStart) = time; + +GVAR(Protractor) = false; +GVAR(ProtractorStart) = time; + +// Those are only used in the pure sqf version (extension free PFH) +GVAR(SimulationPrecision) = 2; +GVAR(WindEnabled) = true; +GVAR(SpinDriftEnabled) = true; +GVAR(CoriolisEnabled) = true; +GVAR(EoetvoesEnabled) = true; +GVAR(AdvancedAirDragEnabled) = true; +GVAR(TransonicRegionEnabled) = true; +GVAR(AtmosphericDensitySimulationEnabled) = true; + +GVAR(currentGrid) = 0; +GVAR(INIT_MESSAGE_ENABLED) = false; + +GVAR(extensionAvailable) = "ace_advanced_ballistics" callExtension "version" == "1.0"; +if (!GVAR(extensionAvailable)) exitWith { + if ("ace_advanced_ballistics" callExtension "version" == "") then { + diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is missing"; + } else { + diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is incompatible"; + }; +}; + +[] call FUNC(initializeTerrainExtension); diff --git a/addons/advanced_ballistics/XEH_preInit.sqf b/addons/advanced_ballistics/XEH_preInit.sqf new file mode 100644 index 0000000000..b58a2b88e8 --- /dev/null +++ b/addons/advanced_ballistics/XEH_preInit.sqf @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(calculateAirDensity); +PREP(calculateAmmoTemperatureVelocityShift); +PREP(calculateAtmosphericCorrection); +PREP(calculateBarrelLengthVelocityShift); +PREP(calculateRetardation); +PREP(calculateRoughnessLength); +PREP(calculateStabilityFactor); +PREP(calculateWindSpeed); +PREP(displayProtractor); +PREP(handleFired); +PREP(initializeTerrainExtension); +PREP(initModuleSettings); + +ADDON = true; diff --git a/addons/advanced_ballistics/config.cpp b/addons/advanced_ballistics/config.cpp new file mode 100644 index 0000000000..32f1406a07 --- /dev/null +++ b/addons/advanced_ballistics/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_ballistics", "ace_weather", "ace_modules"}; + author[] = {"Ruthberg"}; + authorUrl = "https://github.com/ulteq"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "RscTitles.hpp" +#include "ACE_Settings.hpp" \ No newline at end of file diff --git a/addons/advanced_ballistics/functions/fnc_calculateAirDensity.sqf b/addons/advanced_ballistics/functions/fnc_calculateAirDensity.sqf new file mode 100644 index 0000000000..ea7a77e837 --- /dev/null +++ b/addons/advanced_ballistics/functions/fnc_calculateAirDensity.sqf @@ -0,0 +1,36 @@ +/* + * Author: Ruthberg + * + * Displays a wind info (colored arrow) in the top left corner of the screen + * + * Arguments: + * 0: temperature - degrees celcius + * 1: pressure - hPa + * 2: relativeHumidity - value between 0.0 and 1.0 + * + * Return Value: + * 0: density of air - kg * m^(-3) + * + * Return value: + * None + */ +#include "script_component.hpp" + +private ["_temperature", "_pressure", "_relativeHumidity"]; +_temperature = _this select 0; // in C +_pressure = _this select 1; // in hPa +_relativeHumidity = _this select 2; // as ratio 0-1 + +_pressure = _pressure * 100; + +if (_relativeHumidity > 0) then { + private ["_pSat", "_vaporPressure", "_partialPressure"]; + // Saturation vapor pressure calculated according to: http://wahiduddin.net/calc/density_algorithms.htm + _pSat = 6.1078 * 10 ^ ((7.5 * _temperature) / (_temperature + 237.3)); + _vaporPressure = _relativeHumidity * _pSat; + _partialPressure = _pressure - _vaporPressure; + + (_partialPressure * DRY_AIR_MOLAR_MASS + _vaporPressure * WATER_VAPOR_MOLAR_MASS) / (UNIVERSAL_GAS_CONSTANT * KELVIN(_temperature)) +} else { + _pressure / (SPECIFIC_GAS_CONSTANT_DRY_AIR * KELVIN(_temperature)) +}; diff --git a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf new file mode 100644 index 0000000000..c92e679a66 --- /dev/null +++ b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf @@ -0,0 +1,42 @@ +/* + * Author: Ruthberg + * + * Calculates the ammo temperature induced muzzle velocity shift + * + * Arguments: + * 0: ammo - classname + * 1: temperature - degrees celcius + * + * Return Value: + * 0: muzzle velocity shift - m/s + * + * Return value: + * None + */ +#include "script_component.hpp" + +private ["_ammo", "_temperature", "_muzzleVelocityTable", "_muzzleVelocityShift", "_temperatureIndexA", "_temperatureIndexB", "_temperatureRatio"]; +_ammo = _this select 0; +_temperature = _this select 1; + +_muzzleVelocityTable = []; + +if (isArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_ammoTempMuzzleVelocityShifts")) then { + _muzzleVelocityTable = getArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_ammoTempMuzzleVelocityShifts"); +}; + +if (count _muzzleVelocityTable != 11) exitWith { 0 }; + +_temperatureIndexA = floor((_temperature + 15) / 5); +_temperatureIndexA = 0 max _temperatureIndexA; +_temperatureIndexA = _temperatureIndexA min 10; + +_temperatureIndexB = ceil((_temperature + 15) / 5); +_temperatureIndexB = 0 max _temperatureIndexB; +_temperatureIndexB = _temperatureIndexB min 10; + +_temperatureRatio = ((_temperature + 15) / 5) - floor((_temperature + 15) / 5); + +_muzzleVelocityShift = (_muzzleVelocityTable select _temperatureIndexA) * (1 - _temperatureRatio) + (_muzzleVelocityTable select _temperatureIndexB) * _temperatureRatio; + +_muzzleVelocityShift diff --git a/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf b/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf new file mode 100644 index 0000000000..02e849399e --- /dev/null +++ b/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf @@ -0,0 +1,33 @@ +/* + * Author: Ruthberg + * + * Calculates the atmospherically corrected ballistic coefficient + * + * Arguments: + * 0: ballistic coefficient - G1-G7 + * 1: temperature - degrees celcius + * 2: pressure - hPa + * 3: relativeHumidity - value between 0.0 and 1.0 + * 4: atmosphereModel - ICAO or ASM + * + * Return Value: + * corrected ballistic coefficient + * + * Public: No + */ +#include "script_component.hpp" + +private ["_ballisticCoefficient", "_temperature", "_pressure", "_relativeHumidity", "_atmosphereModel", "_airDensity"]; +_ballisticCoefficient = _this select 0; +_temperature = _this select 1; // in C +_pressure = _this select 2; // in hPa +_relativeHumidity = _this select 3; // as ratio 0-1 +_atmosphereModel = _this select 4; // "ICAO" or "ASM" + +_airDensity = [_temperature, _pressure, _relativeHumidity] call FUNC(calculateAirDensity); + +if (_atmosphereModel == "ICAO") then { + (STD_AIR_DENSITY_ICAO / _airDensity) * _ballisticCoefficient +} else { + (STD_AIR_DENSITY_ASM / _airDensity) * _ballisticCoefficient +}; diff --git a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf new file mode 100644 index 0000000000..b4cbd5bdc0 --- /dev/null +++ b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf @@ -0,0 +1,66 @@ +/* + * Author: Ruthberg + * + * Calculates the muzzle velocity shift caused by different barrel lengths + * + * Arguments: + * 0: ammo - classname + * 0: weapon - classname + * 1: muzzle velocity - m/s + * + * Return Value: + * 0: muzzle velocity shift - m/s + * + * Return value: + * None + */ +#include "script_component.hpp" + +private ["_ammo", "_weapon", "_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity", "_lowerIndex", "_upperIndex", "_barrelLengthRatio", "_muzzleVelocityNew"]; +_ammo = _this select 0; +_weapon = _this select 1; +_muzzleVelocity = _this select 2; + +_barrelLength = getNumber(configFile >> "cfgWeapons" >> _weapon >> "ACE_barrelLength"); + +if (_barrelLength == 0) exitWith { 0 }; + +_muzzleVelocityTable = []; +_barrelLengthTable = []; + +if (isArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_muzzleVelocities")) then { + _muzzleVelocityTable = getArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_muzzleVelocities"); +}; +if (isArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_barrelLengths")) then { + _barrelLengthTable = getArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_barrelLengths"); +}; + +if (count _muzzleVelocityTable != count _barrelLengthTable) exitWith { 0 }; +if (count _muzzleVelocityTable == 0 || count _barrelLengthTable == 0) exitWith { 0 }; +if (count _muzzleVelocityTable == 1) exitWith { (_muzzleVelocityTable select 0) - _muzzleVelocity }; + +_lowerIndex = 0; +_upperIndex = (count _barrelLengthTable) - 1; + +if (_barrelLength <= (_barrelLengthTable select _lowerIndex)) exitWith { (_muzzleVelocityTable select _lowerIndex) - _muzzleVelocity }; +if (_barrelLength >= (_barrelLengthTable select _upperIndex)) exitWith { (_muzzleVelocityTable select _upperIndex) - _muzzleVelocity }; + +for "_i" from 0 to (count _barrelLengthTable) - 1 do { + if (_barrelLength >= _barrelLengthTable select _i) then { + _lowerIndex = _i; + }; +}; +for "_i" from (count _barrelLengthTable) - 1 to 0 step -1 do { + if (_barrelLength <= _barrelLengthTable select _i) then { + _upperIndex = _i; + }; +}; + +_barrelLengthRatio = 0; +if ((_barrelLengthTable select _upperIndex) - (_barrelLengthTable select _lowerIndex) > 0) then { + _barrelLengthRatio = ((_barrelLengthTable select _upperIndex) - _barrelLength) / ((_barrelLengthTable select _upperIndex) - (_barrelLengthTable select _lowerIndex)); +}; + +_muzzleVelocityNew = (_muzzleVelocityTable select _lowerIndex) + ((_muzzleVelocityTable select _upperIndex) - (_muzzleVelocityTable select _lowerIndex)) * (1 - _barrelLengthRatio); + +_muzzleVelocityNew - _muzzleVelocity diff --git a/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf new file mode 100644 index 0000000000..433dafbe10 --- /dev/null +++ b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf @@ -0,0 +1,145 @@ +/* + * Author: Ruthberg + * + * Calculates the retardation of the bullet + * + * Arguments: + * 0: drag model - 1-7 + * 1: drag coefficient - bc + * 2: velocity - m/s + * + * Return Value: + * 0: retardation - m/(s^2) + * + * Return value: + * None + */ +#include "script_component.hpp" + +// Source: GNU Exterior Ballistics + +private ["_dragModel", "_dragCoefficient", "_velocity", "_A", "_M", "_result"]; +_dragModel = _this select 0; +_dragCoefficient = _this select 1; +_velocity = (_this select 2) * 3.2808399; + +_A = -1; +_M = -1; +_result = 0; + +switch _dragModel do { + case 1: + { + switch true do { + case (_velocity > 4230) : { _A = 0.0001477404177730177; _M = 1.9565; }; + case (_velocity > 3680) : { _A = 0.0001920339268755614; _M = 1.925 ; }; + case (_velocity > 3450) : { _A = 0.0002894751026819746; _M = 1.875 ; }; + case (_velocity > 3295) : { _A = 0.0004349905111115636; _M = 1.825 ; }; + case (_velocity > 3130) : { _A = 0.0006520421871892662; _M = 1.775 ; }; + case (_velocity > 2960) : { _A = 0.0009748073694078696; _M = 1.725 ; }; + case (_velocity > 2830) : { _A = 0.001453721560187286; _M = 1.675 ; }; + case (_velocity > 2680) : { _A = 0.002162887202930376; _M = 1.625 ; }; + case (_velocity > 2460) : { _A = 0.003209559783129881; _M = 1.575 ; }; + case (_velocity > 2225) : { _A = 0.003904368218691249; _M = 1.55 ; }; + case (_velocity > 2015) : { _A = 0.003222942271262336; _M = 1.575 ; }; + case (_velocity > 1890) : { _A = 0.002203329542297809; _M = 1.625 ; }; + case (_velocity > 1810) : { _A = 0.001511001028891904; _M = 1.675 ; }; + case (_velocity > 1730) : { _A = 0.0008609957592468259; _M = 1.75 ; }; + case (_velocity > 1595) : { _A = 0.0004086146797305117; _M = 1.85 ; }; + case (_velocity > 1520) : { _A = 0.0001954473210037398; _M = 1.95 ; }; + case (_velocity > 1420) : { _A = 0.00005431896266462351; _M = 2.125 ; }; + case (_velocity > 1360) : { _A = 0.000008847742581674416; _M = 2.375 ; }; + case (_velocity > 1315) : { _A = 0.000001456922328720298; _M = 2.625 ; }; + case (_velocity > 1280) : { _A = 0.0000002419485191895565; _M = 2.875 ; }; + case (_velocity > 1220) : { _A = 0.00000001657956321067612; _M = 3.25 ; }; + case (_velocity > 1185) : { _A = 0.0000000004745469537157371; _M = 3.75 ; }; + case (_velocity > 1150) : { _A = 0.00000000001379746590025088; _M = 4.25 ; }; + case (_velocity > 1100) : { _A = 0.0000000000004070157961147882; _M = 4.75 ; }; + case (_velocity > 1060) : { _A = 0.00000000000002938236954847331; _M = 5.125 ; }; + case (_velocity > 1025) : { _A = 0.00000000000001228597370774746; _M = 5.25 ; }; + case (_velocity > 980) : { _A = 0.00000000000002916938264100495; _M = 5.125 ; }; + case (_velocity > 945) : { _A = 0.0000000000003855099424807451; _M = 4.75 ; }; + case (_velocity > 905) : { _A = 0.00000000001185097045689854; _M = 4.25 ; }; + case (_velocity > 860) : { _A = 0.0000000003566129470974951; _M = 3.75 ; }; + case (_velocity > 810) : { _A = 0.00000001045513263966272; _M = 3.25 ; }; + case (_velocity > 780) : { _A = 0.0000001291159200846216; _M = 2.875 ; }; + case (_velocity > 750) : { _A = 0.0000006824429329105383; _M = 2.625 ; }; + case (_velocity > 700) : { _A = 0.000003569169672385163; _M = 2.375 ; }; + case (_velocity > 640) : { _A = 0.00001839015095899579; _M = 2.125 ; }; + case (_velocity > 600) : { _A = 0.00005711174688734240; _M = 1.950 ; }; + case (_velocity > 550) : { _A = 0.00009226557091973427; _M = 1.875 ; }; + case (_velocity > 250) : { _A = 0.00009337991957131389; _M = 1.875 ; }; + case (_velocity > 100) : { _A = 0.00007225247327590413; _M = 1.925 ; }; + case (_velocity > 65) : { _A = 0.00005792684957074546; _M = 1.975 ; }; + case (_velocity > 0) : { _A = 0.00005206214107320588; _M = 2.000 ; }; + }; + }; + case 2: + { + switch true do { + case (_velocity > 1674) : { _A = 0.0079470052136733; _M = 1.36999902851493; }; + case (_velocity > 1172) : { _A = 0.00100419763721974; _M = 1.65392237010294; }; + case (_velocity > 1060) : { _A = 0.0000000000000000000000715571228255369; _M = 7.91913562392361; }; + case (_velocity > 949) : { _A = 0.000000000139589807205091; _M = 3.81439537623717; }; + case (_velocity > 670) : { _A = 0.000234364342818625; _M = 1.71869536324748; }; + case (_velocity > 335) : { _A = 0.000177962438921838; _M = 1.76877550388679; }; + case (_velocity > 0) : { _A = 0.0000518033561289704; _M = 1.98160270524632; }; + }; + }; + case 5: + { + switch true do { + case (_velocity > 1730) : { _A = 0.00724854775171929; _M = 1.41538574492812; }; + case (_velocity > 1228) : { _A = 0.0000350563361516117; _M = 2.13077307854948; }; + case (_velocity > 1116) : { _A = 0.000000000000184029481181151; _M = 4.81927320350395; }; + case (_velocity > 1004) : { _A = 0.000000000000000000000134713064017409; _M = 7.8100555281422 ; }; + case (_velocity > 837) : { _A = 0.000000103965974081168; _M = 2.84204791809926; }; + case (_velocity > 335) : { _A = 0.0001093015938698234; _M = 1.81096361579504; }; + case (_velocity > 0) : { _A = 0.0000351963178524273; _M = 2.00477856801111; }; + }; + }; + case 6: + { + switch true do { + case (_velocity > 3236) : { _A = 0.0455384883480781; _M = 1.15997674041274; }; + case (_velocity > 2065) : { _A = 0.07167261849653769; _M = 1.10704436538885; }; + case (_velocity > 1311) : { _A = 0.00166676386084348; _M = 1.60085100195952; }; + case (_velocity > 1144) : { _A = 0.000000101482730119215; _M = 2.9569674731838 ; }; + case (_velocity > 1004) : { _A = 0.00000000000000000431542773103552; _M = 6.34106317069757; }; + case (_velocity > 670) : { _A = 0.0000204835650496866; _M = 2.11688446325998; }; + case (_velocity > 0) : { _A = 0.0000750912466084823; _M = 1.92031057847052; }; + }; + }; + case 7: + { + switch true do { + case (_velocity > 4200) : { _A = 0.00000000129081656775919; _M = 3.24121295355962; }; + case (_velocity > 3000) : { _A = 0.0171422231434847; _M = 1.27907168025204; }; + case (_velocity > 1470) : { _A = 0.00233355948302505; _M = 1.52693913274526; }; + case (_velocity > 1260) : { _A = 0.000797592111627665; _M = 1.67688974440324; }; + case (_velocity > 1110) : { _A = 0.00000000000571086414289273; _M = 4.3212826264889 ; }; + case (_velocity > 960) : { _A = 0.0000000000000000302865108244904; _M = 5.99074203776707; }; + case (_velocity > 670) : { _A = 0.00000752285155782535; _M = 2.1738019851075 ; }; + case (_velocity > 540) : { _A = 0.0000131766281225189; _M = 2.08774690257991; }; + case (_velocity > 0) : { _A = 0.0000134504843776525; _M = 2.08702306738884; }; + }; + }; + case 8: + { + switch true do { + case (_velocity > 3571) : { _A = 0.0112263766252305; _M = 1.33207346655961; }; + case (_velocity > 1841) : { _A = 0.0167252613732636; _M = 1.28662041261785; }; + case (_velocity > 1120) : { _A = 0.00220172456619625; _M = 1.55636358091189; }; + case (_velocity > 1088) : { _A = 0.00000000000000020538037167098; _M = 5.80410776994789; }; + case (_velocity > 976) : { _A = 0.00000000000592182174254121; _M = 4.29275576134191; }; + case (_velocity > 0) : { _A = 0.000043917343795117; _M = 1.99978116283334; }; + }; + }; +}; + +if (_A != -1 && _M != -1 && _velocity > 0 && _velocity < 10000) then { + _result = _A * (_velocity ^ _M) / _dragCoefficient; + _result = _result / 3.2808399; +}; + +_result diff --git a/addons/advanced_ballistics/functions/fnc_calculateRoughnessLength.sqf b/addons/advanced_ballistics/functions/fnc_calculateRoughnessLength.sqf new file mode 100644 index 0000000000..08ae44cc74 --- /dev/null +++ b/addons/advanced_ballistics/functions/fnc_calculateRoughnessLength.sqf @@ -0,0 +1,34 @@ +/* + * Author: Ruthberg + * + * Calculates the terrain roughness length at a given world position + * + * Arguments: + * 0: _this - world position + * + * Return Value: + * 0: roughness length + * + * Public: No + */ +#include "script_component.hpp" + +private ["_roughness_lengths", "_windSource", "_nearBuildings", "_isWater"]; + +// Source: http://es.ucsc.edu/~jnoble/wind/extrap/index.html +_roughness_lengths = [0.0002, 0.0005, 0.0024, 0.03, 0.055, 0.1, 0.2, 0.4, 0.8, 1.6]; + +_windSource = _this vectorDiff ((vectorNormalized ACE_wind) vectorMultiply 25); + +_nearBuildings = count (_windSource nearObjects ["Building", 50]); +_isWater = surfaceIsWater _windSource; + +if (_nearBuildings == 0 && _isWater) exitWith { + 0.0005 +}; + +if (_nearBuildings >= 10) exitWith { + 1.6 +}; + +_roughness_lengths select (2 + (_nearBuildings min 6)) diff --git a/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf b/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf new file mode 100644 index 0000000000..81b71aeb3b --- /dev/null +++ b/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf @@ -0,0 +1,45 @@ +/* + * Author: Ruthberg + * + * Calculates the stability factor of a bullet + * + * Arguments: + * 0: caliber - inches + * 1: bullet length - inches + * 2: bullet mass - grains + * 3: barrel twist - inches + * 4: muzzle velocity shift - m/s + * 5: temperature - degrees celcius + * 6: barometric Pressure - hPA + * + * Return Value: + * 0: stability factor + * + * Public: No + */ + +private ["_caliber", "_bulletLength", "_bulletMass", "_barrelTwist", "_muzzleVelocity", "_temperature", "_barometricPressure", "_l", "_t", "_stabilityFactor"]; +_caliber = _this select 0; +_bulletLength = _this select 1; +_bulletMass = _this select 2; +_barrelTwist = _this select 3; +_muzzleVelocity = _this select 4; +_temperature = _this select 5; +_barometricPressure = _this select 6; + +// Source: http://www.jbmballistics.com/ballistics/bibliography/articles/miller_stability_1.pdf +_t = _barrelTwist / _caliber; +_l = _bulletLength / _caliber; + +_stabilityFactor = 30 * _bulletMass / (_t^2 * _caliber^3 * _l * (1 + _l^2)); + +_muzzleVelocity = _muzzleVelocity * 3.2808399; +if (_muzzleVelocity > 1120) then { + _stabilityFactor = _stabilityFactor * (_muzzleVelocity / 2800) ^ (1/3); +} else { + _stabilityFactor = _stabilityFactor * (_muzzleVelocity / 1120) ^ (1/3); +}; + +_stabilityFactor = _stabilityFactor * (_temperature + 273) / (15 + 273) * 1013.25 / _barometricPressure; + +_stabilityFactor diff --git a/addons/advanced_ballistics/functions/fnc_calculateWindSpeed.sqf b/addons/advanced_ballistics/functions/fnc_calculateWindSpeed.sqf new file mode 100644 index 0000000000..e7b0a322e8 --- /dev/null +++ b/addons/advanced_ballistics/functions/fnc_calculateWindSpeed.sqf @@ -0,0 +1,78 @@ +/* + * Author: Ruthberg + * + * Calculates the true wind speed at a given world position + * + * Arguments: + * 0: _this - world position + * + * Return Value: + * 0: wind speed - m/s + * + * Public: No + */ +#include "script_component.hpp" + +private ["_windSpeed", "_windDir", "_height", "_newWindSpeed", "_windSource", "_roughnessLength"]; + +fnc_polar2vect = { + private ["_mag2D"]; + _mag2D = (_this select 0) * cos((_this select 2)); + [_mag2D * sin((_this select 1)), _mag2D * cos((_this select 1)), (_this select 0) * sin((_this select 2))]; +}; + +_windSpeed = vectorMagnitude ACE_wind; +_windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); + +// Wind gradient +if (_windSpeed > 0.05) then { + _height = (ASLToATL _this) select 2; + _height = 0 max _height min 20; + if (_height < 20) then { + _roughnessLength = _this call FUNC(calculateRoughnessLength); + _windSpeed = _windSpeed * ln(_height / _roughnessLength) / ln(20 / _roughnessLength); + }; +}; + +// Terrain effect on wind +if (_windSpeed > 0.05) then { + _newWindSpeed = 0; + { + _windSource = [100, _windDir + 180, _x] call fnc_polar2vect; + if (!(terrainIntersectASL [_this, _this vectorAdd _windSource])) exitWith { + _newWindSpeed = cos(_x * 9) * _windSpeed; + }; + _windSource = [100, _windDir + 180 + _x, 0] call fnc_polar2vect; + if (!(terrainIntersectASL [_this, _this vectorAdd _windSource])) exitWith { + _newWindSpeed = cos(_x * 9) * _windSpeed; + }; + _windSource = [100, _windDir + 180 - _x, 0] call fnc_polar2vect; + if (!(terrainIntersectASL [_this, _this vectorAdd _windSource])) exitWith { + _newWindSpeed = cos(_x * 9) * _windSpeed; + }; + } forEach [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + _windSpeed = _newWindSpeed; +}; + +// Obstacle effect on wind +if (_windSpeed > 0.05) then { + _newWindSpeed = 0; + { + _windSource = [20, _windDir + 180, _x] call fnc_polar2vect; + if (!(lineIntersects [_this, _this vectorAdd _windSource])) exitWith { + _newWindSpeed = cos(_x * 2) * _windSpeed; + }; + _windSource = [20, _windDir + 180 + _x, 0] call fnc_polar2vect; + if (!(lineIntersects [_this, _this vectorAdd _windSource])) exitWith { + _newWindSpeed = cos(_x * 2) * _windSpeed; + }; + _windSource = [20, _windDir + 180 - _x, 0] call fnc_polar2vect; + if (!(lineIntersects [_this, _this vectorAdd _windSource])) exitWith { + _newWindSpeed = cos(_x * 2) * _windSpeed; + }; + } forEach [0, 5, 10, 15, 20, 25, 30, 35, 40, 45]; + _windSpeed = _newWindSpeed; +}; +_windSpeed = 0 max _windSpeed; + +_windSpeed diff --git a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf new file mode 100644 index 0000000000..2fbe558651 --- /dev/null +++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf @@ -0,0 +1,61 @@ +/* + * Author: Ruthberg + * + * Displays a protractor in the top left corner of the screen + * + * Argument: + * None + * + * Return value: + * None + */ +#include "script_component.hpp" + +#define __dsp (uiNamespace getVariable "RscProtractor") +#define __ctrl1 (__dsp displayCtrl 132950) +#define __ctrl2 (__dsp displayCtrl 132951) + +private ["_inclinationAngle", "_refPosition"]; + +if (GVAR(Protractor)) exitWith { + GVAR(Protractor) = false; + 1 cutText ["", "PLAIN"]; + true +}; +if (weaponLowered ACE_player) exitWith { true }; +if (vehicle ACE_player != ACE_player) exitWith { true }; +if (currentWeapon ACE_player != primaryWeapon ACE_player) exitWith { true }; + +2 cutText ["", "PLAIN"]; +EGVAR(weather,WindInfo) = false; +0 cutText ["", "PLAIN"]; +GVAR(Protractor) = true; + +[{ + if !(GVAR(Protractor) && !(weaponLowered ACE_player) && currentWeapon ACE_player == primaryWeapon ACE_player) exitWith { + GVAR(Protractor) = false; + 1 cutText ["", "PLAIN"]; + [_this select 1] call cba_fnc_removePerFrameHandler; + }; + + _refPosition = [SafeZoneX + 0.001, SafeZoneY + 0.001, 0.2, 0.2 * 4/3]; + + _inclinationAngle = asin((ACE_player weaponDirection currentWeapon ACE_player) select 2); + _inclinationAngle = -58 max _inclinationAngle min 58; + + 1 cutRsc ["RscProtractor", "PLAIN", 1, false]; + + __ctrl1 ctrlSetScale 0.75; + __ctrl1 ctrlCommit 0; + __ctrl1 ctrlSetText QUOTE(PATHTOF(UI\protractor.paa)); + __ctrl1 ctrlSetTextColor [1, 1, 1, 1]; + + __ctrl2 ctrlSetScale 0.75; + __ctrl2 ctrlSetPosition [(_refPosition select 0), (_refPosition select 1) - 0.0012 * _inclinationAngle, (_refPosition select 2), (_refPosition select 3)]; + __ctrl2 ctrlCommit 0; + __ctrl2 ctrlSetText QUOTE(PATHTOF(UI\protractor_marker.paa)); + __ctrl2 ctrlSetTextColor [1, 1, 1, 1]; + +}, 0.1, []] call CBA_fnc_addPerFrameHandler; + +true diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf new file mode 100644 index 0000000000..d628f012ee --- /dev/null +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -0,0 +1,382 @@ +/* + * Author: Glowbal, Ruthberg + * + * Handles advanced ballistics for (BulletBase) projectiles + * + * Arguments: + * 0: unit - Object the event handler is assigned to + * 1: weapon - Fired weapon + * 2: muzzle - Muzzle that was used + * 3: mode - Current mode of the fired weapon + * 4: ammo - Ammo used + * 5: magazine - magazine name which was used + * 6: projectile - Object of the projectile that was shot + * + * Return Value: + * Nothing + * + * Public: No + */ +#include "script_component.hpp" + +private ["_unit", "_weapon", "_mode", "_ammo", "_magazine", "_caliber", "_bullet", "_abort", "_index", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_atmosphereModel", "_bulletMass", "_bulletLength", "_bulletTranslation", "_airFriction", "_dragModel", "_velocityBoundaryData", "_muzzleVelocity", "_muzzleVelocityCoef", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_bulletWeight", "_barrelTwist", "_twistDirection", "_stabilityFactor", "_transonicStabilityCoef", "_ACE_Elevation", "_ACE_Windage", "_ID"]; +_unit = _this select 0; +_weapon = _this select 1; +_mode = _this select 3; +_ammo = _this select 4; +_magazine = _this select 5; +_bullet = _this select 6; + +_abort = false; +if (!hasInterface) exitWith {}; +if (!alive _bullet) exitWith {}; +if (!GVAR(enabled)) exitWith {}; +if (!([_unit] call EFUNC(common,isPlayer))) exitWith {}; +if (underwater _unit) exitWith {}; +if (!(_ammo isKindOf "BulletBase")) exitWith {}; +if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {}; +if (GVAR(onlyActiveForLocalPlayers) && _unit != ACE_player) then { _abort = true; }; +//if (!GVAR(vehicleGunnerEnabled) && !(_unit isKindOf "Man")) then { _abort = true; }; // TODO: We currently do not have firedEHs on vehicles +if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "cfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; }; + +if (_abort && alwaysSimulateForSnipers) then { + // The shooter is non local + if (currentWeapon _unit == primaryWeapon _unit && count primaryWeaponItems _unit > 2) then { + _opticsName = (primaryWeaponItems _unit) select 2; + _opticType = getNumber(configFile >> "cfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType"); + _abort = _opticType != 2; // We only abort if the non local shooter is not a sniper + }; +}; +if (_abort || !(GVAR(extensionAvailable))) exitWith { + [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")] call EFUNC(winddeflection,updateTrajectoryPFH); +}; + +_airFriction = getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction"); +_muzzleVelocity = getNumber(configFile >> "cfgMagazines" >> _magazine >> "initSpeed"); +_muzzleVelocityCoef = getNumber(configFile >> "cfgWeapons" >> _weapon >> "initSpeed"); +if (_muzzleVelocityCoef > 0) then { + _muzzleVelocity = _muzzleVelocityCoef; +}; +if (_muzzleVelocityCoef < 0) then { + _muzzleVelocity = _muzzleVelocity * (-1 * _muzzleVelocityCoef); +}; + +_muzzleAccessory = ""; +switch (currentWeapon _unit) do { + case primaryWeapon _unit: { _muzzleAccessory = (primaryWeaponItems _unit) select 0; }; + case handgunWeapon _unit: { _muzzleAccessory = (handgunItems _unit) select 0; }; +}; + +if (_muzzleAccessory != "" && isNumber(configFile >> "cfgWeapons" >> _muzzleAccessory >> "ItemInfo" >> "MagazineCoef" >> "initSpeed")) then { + _initSpeedCoef = getNumber(configFile >> "cfgWeapons" >> _muzzleAccessory >> "ItemInfo" >> "MagazineCoef" >> "initSpeed"); + _muzzleVelocity = _muzzleVelocity * _initSpeedCoef; +}; + +if (GVAR(barrelLengthInfluenceEnabled)) then { + _muzzleVelocityShift = [_ammo, _weapon, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift); + if (_muzzleVelocityShift != 0) then { + _bulletVelocity = velocity _bullet; + _bulletSpeed = vectorMagnitude _bulletVelocity; + _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift * (_bulletSpeed / _muzzleVelocity))); + _bullet setVelocity _bulletVelocity; + _muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift; + }; +}; + +if (GVAR(ammoTemperatureEnabled)) then { + _temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL _unit) select 2); + _muzzleVelocityShift = [_ammo, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift); + if (_muzzleVelocityShift != 0) then { + _bulletVelocity = velocity _bullet; + _bulletSpeed = vectorMagnitude _bulletVelocity; + _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift * (_bulletSpeed / _muzzleVelocity))); + _bullet setVelocity _bulletVelocity; + _muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift; + }; +}; + +// TODO: Make _bulletTraceVisible global and toggle it with events +_bulletTraceVisible = false; +if (GVAR(bulletTraceEnabled) && currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then { + _opticsName = (primaryWeaponItems ACE_player) select 2; + _opticType = getNumber(configFile >> "cfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType"); + _bulletTraceVisible = (_opticType == 2 || currentWeapon ACE_player in ["ACE_Vector", "Binocular", "Rangefinder", "Laserdesignator"]) && cameraView == "GUNNER"; +}; + +_caliber = getNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_caliber"); +_bulletLength = getNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_bulletLength"); +_bulletMass = getNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_bulletMass"); +_barrelTwist = getNumber(configFile >> "cfgWeapons" >> _weapon >> "ACE_barrelTwist"); +_stabilityFactor = 1.5; + +if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then { + _temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL _unit) select 2); + _barometricPressure = 1013.25 * exp(-(EGVAR(weather,Altitude) + ((getPosASL _bullet) select 2)) / 7990) - 10 * overcast; + _stabilityFactor = [_caliber, _bulletLength, _bulletMass, _barrelTwist, _muzzleVelocity, _temperature, _barometricPressure] call FUNC(calculateStabilityFactor); +}; + +_twistDirection = 1; +if (isNumber(configFile >> "cfgWeapons" >> _weapon >> "ACE_twistDirection")) then { + _twistDirection = getNumber(configFile >> "cfgWeapons" >> _weapon >> "ACE_twistDirection"); + if (_twistDirection != -1 && _twistDirection != 0 && _twistDirection != 1) then { + _twistDirection = 1; + }; +}; + +_transonicStabilityCoef = 0.5; +if (isNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_transonicStabilityCoef")) then { + _transonicStabilityCoef = getNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_transonicStabilityCoef"); +}; + +_dragModel = 1; +_ballisticCoefficients = []; +_velocityBoundaries = []; +_atmosphereModel = "ICAO"; +if (GVAR(AdvancedAirDragEnabled)) then { + if (isNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_dragModel")) then { + _dragModel = getNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_dragModel"); + if (!(_dragModel in [1, 2, 5, 6, 7, 8])) then { + _dragModel = 1; + }; + }; + if (isArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_ballisticCoefficients")) then { + _ballisticCoefficients = getArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_ballisticCoefficients"); + }; + if (isArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_velocityBoundaries")) then { + _velocityBoundaries = getArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_velocityBoundaries"); + }; + if (isText(configFile >> "cfgAmmo" >> _ammo >> "ACE_standardAtmosphere")) then { + _atmosphereModel = getText(configFile >> "cfgAmmo" >> _ammo >> "ACE_standardAtmosphere"); + }; +}; + +#ifdef USE_ADVANCEDBALLISTICS_DLL + GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000; + + "ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _bullet, EGVAR(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(time), time - floor(time)]; + + [{ + private ["_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"]; + EXPLODE_4_PVT(_this select 0,_bullet,_caliber,_bulletTraceVisible,_index); + + if (!alive _bullet) exitWith { + [_this select 1] call cba_fnc_removePerFrameHandler; + }; + + _bulletVelocity = velocity _bullet; + _bulletPosition = getPosASL _bullet; + + if (_bulletTraceVisible && vectorMagnitude _bulletVelocity > 600) then { + drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.4*_caliber,0.2*_caliber],[[0,0,0,0.6],[0,0,0,0.4]],[1,0],0,0,"","",""]; + }; + + call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, floor(time), time - floor(time)]); + + }, GVAR(simulationInterval), [_bullet, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]] call CBA_fnc_addPerFrameHandler; +#else + _index = count GVAR(bulletDatabase); + if (count GVAR(bulletDatabaseFreeIndices) > 0) then { + _index = GVAR(bulletDatabaseFreeIndices) select 0; + GVAR(bulletDatabaseFreeIndices) = GVAR(bulletDatabaseFreeIndices) - [_index]; + }; + + GVAR(bulletDatabase) set[_index, [_bullet, _caliber, _airFriction, _muzzleVelocity, _stabilityFactor, _transonicStabilityCoef, _twistDirection, _unit, _bulletTraceVisible, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _index]]; + GVAR(bulletDatabaseStartTime) set[_index, time]; + GVAR(bulletDatabaseSpeed) set[_index, 0]; + GVAR(bulletDatabaseFrames) set[_index, 1]; + GVAR(bulletDatabaseLastFrame) set[_index, time]; + GVAR(bulletDatabaseHDeflect) set[_index, 0]; + GVAR(bulletDatabaseSpinDrift) set[_index, 0]; + + if ((GVAR(bulletDatabaseOccupiedIndices) pushBack _index) == 0) then { + [{ + private ["_bulletDatabaseEntry", "_bullet", "_caliber", "_muzzleVelocity", "_frames", "_speed", "_airFriction", "_airFrictionRef", "_dragModel", "_atmosphereModel", "_ballisticCoefficient", "_ballisticCoefficients", "_velocityBoundaries", "_airDensity", "_stabilityFactor", "_transonicStabilityCoef", "_twistDirection", "_unit", "_bulletTraceVisible", "_index", "_temperature", "_humidity", "_deltaT", "_TOF", "_bulletPosition", "_bulletVelocity", "_bulletSpeed", "_trueVelocity", "_trueSpeed", "_bulletSpeedAvg", "_wind", "_drag", "_dragRef", "_vect", "_accel", "_accelRef", "_centripetalAccel", "_pressure", "_pressureDeviation", "_windSourceObstacle", "_windSourceTerrain", "_height", "_roughnessLength"]; + + { + _bulletDatabaseEntry = (GVAR(bulletDatabase) select _x); + if (!alive (_bulletDatabaseEntry select 0)) then { + _index = _bulletDatabaseEntry select 13; + GVAR(bulletDatabaseOccupiedIndices) = GVAR(bulletDatabaseOccupiedIndices) - [_index]; + GVAR(bulletDatabaseFreeIndices) pushBack _index; + }; + true + } count GVAR(bulletDatabaseOccupiedIndices); + + if (count GVAR(bulletDatabaseOccupiedIndices) == 0) exitWith { + GVAR(bulletDatabase) = []; + GVAR(bulletDatabaseStartTime) = []; + GVAR(bulletDatabaseSpeed) = []; + GVAR(bulletDatabaseFrames) = []; + GVAR(bulletDatabaseLastFrame) = []; + GVAR(bulletDatabaseHDeflect) = []; + GVAR(bulletDatabaseSpinDrift) = []; + GVAR(bulletDatabaseOccupiedIndices) = []; + GVAR(bulletDatabaseFreeIndices) = []; + [_this select 1] call cba_fnc_removePerFrameHandler; + }; + + { + _bulletDatabaseEntry = GVAR(bulletDatabase) select _x; + _bullet = _bulletDatabaseEntry select 0; + _caliber = _bulletDatabaseEntry select 1; + _airFriction = _bulletDatabaseEntry select 2; + _muzzleVelocity = _bulletDatabaseEntry select 3; + _stabilityFactor = _bulletDatabaseEntry select 4; + _transonicStabilityCoef = _bulletDatabaseEntry select 5; + _twistDirection = _bulletDatabaseEntry select 6; + _unit = _bulletDatabaseEntry select 7; + _bulletTraceVisible = _bulletDatabaseEntry select 8; + _ballisticCoefficients = _bulletDatabaseEntry select 9; + _velocityBoundaries = _bulletDatabaseEntry select 10; + _atmosphereModel = _bulletDatabaseEntry select 11; + _dragModel = _bulletDatabaseEntry select 12; + _index = _bulletDatabaseEntry select 13; + + _TOF = time - (GVAR(bulletDatabaseStartTime) select _index); + + _bulletVelocity = velocity _bullet; + _bulletPosition = getPosASL _bullet; + + _bulletSpeed = vectorMagnitude _bulletVelocity; + _bulletDir = (_bulletVelocity select 0) atan2 (_bulletVelocity select 1); + + _speed = (GVAR(bulletDatabaseSpeed) select _index); + GVAR(bulletDatabaseSpeed) set[_index, _speed + _bulletSpeed]; + + _frames = (GVAR(bulletDatabaseFrames) select _index); + GVAR(bulletDatabaseFrames) set[_index, _frames + 1]; + + _bulletSpeedAvg = (_speed / _frames); + + if ((GVAR(SimulationPrecision) < 2) || {_frames % GVAR(SimulationPrecision) == _index % GVAR(SimulationPrecision)}) then { + _deltaT = time - (GVAR(bulletDatabaseLastFrame) select _index); + GVAR(bulletDatabaseLastFrame) set[_index, time]; + + _trueVelocity = _bulletVelocity; + _trueSpeed = _bulletSpeed; + _wind = [0, 0, 0]; + if (GVAR(WindEnabled) && (vectorMagnitude ACE_wind) > 0) then { + _windSourceObstacle = _bulletPosition vectorDiff ((vectorNormalized ACE_wind) vectorMultiply 10); + _windSourceTerrain = _bulletPosition vectorDiff ((vectorNormalized ACE_wind) vectorMultiply 100); + + if (!(lineIntersects [_bulletPosition, _windSourceObstacle]) && !(terrainIntersectASL [_bulletPosition, _windSourceTerrain])) then { + _wind = ACE_wind; + _height = ASLToATL(_bulletPosition) select 2; + _height = 0 max _height min 20; + if (_height < 20) then { + _roughnessLength = _bulletPosition call FUNC(calculateRoughnessLength); + _wind = _wind vectorMultiply (ln(_height / _roughnessLength) / ln(20 / _roughnessLength)); + }; + + _trueVelocity = _bulletVelocity vectorDiff _wind; + _trueSpeed = vectorMagnitude _trueVelocity; + }; + }; + + _airFrictionRef = _airFriction; + if (GVAR(AdvancedAirDragEnabled) && (count _ballisticCoefficients) == (count _velocityBoundaries) + 1) then { + _dragRef = _deltaT * _airFrictionRef * _bulletSpeed * _bulletSpeed; + _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef); + _bulletVelocity = _bulletVelocity vectorDiff _accelRef; + + _ballisticCoefficient = (_ballisticCoefficients select 0); + for "_i" from (count _velocityBoundaries) - 1 to 0 step -1 do { + if (_bulletSpeed < (_velocityBoundaries select _i)) exitWith { + _ballisticCoefficient = (_ballisticCoefficients select (_i + 1)); + }; + }; + + if (GVAR(AtmosphericDensitySimulationEnabled)) then { + _pressure = 1013.25 * exp(-(EGVAR(weather,Altitude) + (_bulletPosition select 2)) / 7990) - 10 * overcast; + _temperature = GET_TEMPERATURE_AT_HEIGHT(_bulletPosition select 2); + _humidity = EGVAR(weather,currentHumidity); + _airDensity = STD_AIR_DENSITY_ICAO; + if (_humidity > 0) then { + private ["_pSat", "_vaporPressure", "_partialPressure"]; + // Saturation vapor pressure calculated according to: http://wahiduddin.net/calc/density_algorithms.htm + _pSat = 6.1078 * 10 ^ ((7.5 * _temperature) / (_temperature + 237.3)); + _vaporPressure = _humidity * _pSat; + _partialPressure = (_pressure * 100)- _vaporPressure; + + _airDensity = (_partialPressure * DRY_AIR_MOLAR_MASS + _vaporPressure * WATER_VAPOR_MOLAR_MASS) / (UNIVERSAL_GAS_CONSTANT * KELVIN(_temperature)); + } else { + _airDensity = (_pressure * 100) / (SPECIFIC_GAS_CONSTANT_DRY_AIR * KELVIN(_temperature)); + }; + if (_atmosphereModel == "ICAO") then { + _ballisticCoefficient = (STD_AIR_DENSITY_ICAO / _airDensity) * _ballisticCoefficient; + } else { + _ballisticCoefficient = (STD_AIR_DENSITY_ASM / _airDensity) * _ballisticCoefficient; + }; + }; + + _drag = _deltaT * ([_dragModel, _ballisticCoefficient, _trueSpeed] call FUNC(calculateRetardation)); + _accel = (vectorNormalized _trueVelocity) vectorMultiply (_drag); + _bulletVelocity = _bulletVelocity vectorDiff _accel; + } else { + if (GVAR(AtmosphericDensitySimulationEnabled)) then { + _pressureDeviation = 1013.25 * exp(-(EGVAR(weather,Altitude) + (_bulletPosition select 2)) / 7990) - 1013.25 - 10 * overcast; + _temperature = GET_TEMPERATURE_AT_HEIGHT(_bulletPosition select 2); + _humidity = EGVAR(weather,currentHumidity); + _airFriction = _airFriction + ((_temperature - 15) * 0.0000015 + _humidity * 0.0000040 + _pressureDeviation * -0.0000009); + }; + + if (_airFriction != _airFrictionRef || vectorMagnitude _wind > 0) then { + _dragRef = _deltaT * _airFrictionRef * _bulletSpeed * _bulletSpeed; + _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef); + _bulletVelocity = _bulletVelocity vectorDiff _accelRef; + + _drag = _deltaT * _airFriction * _trueSpeed * _trueSpeed; + _accel = (vectorNormalized _trueVelocity) vectorMultiply (_drag); + _bulletVelocity = _bulletVelocity vectorAdd _accel; + }; + }; + + if (GVAR(CoriolisEnabled) && _bulletSpeedAvg > 0) then { + _horizontalDeflection = 0.0000729 * (_unit distanceSqr _bullet) * sin(EGVAR(weather,Latitude)) / _bulletSpeedAvg; + _horizontalDeflectionPartial = _horizontalDeflection - (GVAR(bulletDatabaseHDeflect) select _index); + GVAR(bulletDatabaseHDeflect) set[_index, _horizontalDeflection]; + _vect = [sin(_bulletDir + 90) * _horizontalDeflectionPartial, cos(_bulletDir + 90) * _horizontalDeflectionPartial, 0]; + + _bulletPosition = _bulletPosition vectorAdd _vect; + }; + + /* + // Negligible effect on the trajectory + if (GVAR(EoetvoesEnabled)) then { + _centripetalAccel = 2 * 0.0000729 * (_muzzleVelocity / -32.2) * cos(EGVAR(weather,Latitude)) * sin(_bulletDir); + _accel = [0, 0, -(_centripetalAccel * _deltaT)]; + + _bulletVelocity = _bulletVelocity vectorAdd _accel; + }; + //*/ + + if (GVAR(SpinDriftEnabled)) then { + _spinDrift = _twistDirection * 0.0254 * 1.25 * (_stabilityFactor + 1.2) * _TOF ^ 1.83; + _spinDriftPartial = _spinDrift - (GVAR(bulletDatabaseSpinDrift) select _index); + GVAR(bulletDatabaseSpinDrift) set[_index, _spinDrift]; + _vect = [sin(_bulletDir + 90) * _spinDriftPartial, cos(_bulletDir + 90) * _spinDriftPartial, 0]; + + _bulletPosition = _bulletPosition vectorAdd _vect; + }; + }; + + if (GVAR(TransonicRegionEnabled) && _transonicStabilityCoef < 1) then { + if (_bulletSpeed < 345 && _bulletSpeedAvg > 340 && _bulletSpeed > 335) then { + _accel = [(random 0.8) - 0.4, (random 0.8) - 0.4, (random 0.8) - 0.4]; + _accel = _accel vectorMultiply (1 - _transonicStabilityCoef); + _bulletVelocity = _bulletVelocity vectorAdd _accel; + }; + }; + + if (_bulletTraceVisible && _bulletSpeed > 600 && _bullet distanceSqr _unit > 400) then { + drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.4*_caliber,0.2*_caliber],[[0,0,0,0.6],[0,0,0,0.4]],[1,0],0,0,"","",""]; + }; + + _bullet setVelocity _bulletVelocity; + _bullet setPosASL _bulletPosition; + true + } count GVAR(bulletDatabaseOccupiedIndices); + + }, GVAR(simulationInterval), []] call CBA_fnc_addPerFrameHandler; + }; +#endif diff --git a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf new file mode 100644 index 0000000000..ba7ea31a8f --- /dev/null +++ b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf @@ -0,0 +1,35 @@ +/* + * Author: Glowbal, Ruthberg + * Module for adjusting the advanced ballistics settings + * + * Arguments: + * 0: The module logic + * 1: units + * 2: activated + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +private ["_logic", "_units", "_activated"]; +_logic = _this select 0; +_units = _this select 1; +_activated = _this select 2; + +if !(_activated) exitWith {}; + +[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(ammoTemperatureEnabled), "ammoTemperatureEnabled"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(barrelLengthInfluenceEnabled), "barrelLengthInfluenceEnabled"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(bulletTraceEnabled), "bulletTraceEnabled"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(onlyActiveForLocalPlayers), "onlyActiveForLocalPlayers"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(disabledInFullAutoMode), "disabledInFullAutoMode"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(alwaysSimulateForSnipers), "alwaysSimulateForSnipers"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(simulationInterval), "simulationInterval"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(simulationRadius), "simulationRadius"] call EFUNC(common,readSettingFromModule); + +GVAR(simulationInterval) = 0 max GVAR(simulationInterval) min 0.2; diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf new file mode 100644 index 0000000000..6791d26350 --- /dev/null +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -0,0 +1,60 @@ +/* + * Author: Ruthberg + * Initializes the advanced ballistics dll extension with terrain data + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Public: No + */ +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; +if (!GVAR(extensionAvailable)) exitWith {}; + +private ["_initStartTime", "_mapSize", "_mapGrids", "_gridCells", "_x", "_y", "_gridCenter", "_gridHeight", "_gridNumObjects", "_gridSurfaceIsWater"]; + +_initStartTime = time; +_mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize"); + +if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith { + if (GVAR(INIT_MESSAGE_ENABLED)) then { + systemChat "AdvancedBallistics: Terrain already initialized"; + }; +}; + +_mapGrids = ceil(_mapSize / 50) + 1; +_gridCells = _mapGrids * _mapGrids; + +GVAR(currentGrid) = 0; + +[{ + private ["_args", "_mapGrids", "_gridCells", "_initStartTime"]; + _args = _this select 0; + _mapGrids = _args select 0; + _gridCells = _args select 1; + _initStartTime = _args select 2; + + if (GVAR(currentGrid) >= _gridCells) exitWith { + if (GVAR(INIT_MESSAGE_ENABLED)) then { + systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(time - _initStartTime)]; + }; + [_this select 1] call cba_fnc_removePerFrameHandler; + }; + + for "_i" from 1 to 50 do { + _x = floor(GVAR(currentGrid) / _mapGrids) * 50; + _y = (GVAR(currentGrid) - floor(GVAR(currentGrid) / _mapGrids) * _mapGrids) * 50; + _gridCenter = [_x + 25, _y + 25]; + _gridHeight = round(getTerrainHeightASL _gridCenter); + _gridNumObjects = count (_gridCenter nearObjects ["Building", 50]); + _gridSurfaceIsWater = if (surfaceIsWater _gridCenter) then {1} else {0}; + "ace_advanced_ballistics" callExtension format["set:%1:%2:%3", _gridHeight, _gridNumObjects, _gridSurfaceIsWater]; + GVAR(currentGrid) = GVAR(currentGrid) + 1; + if (GVAR(currentGrid) >= _gridCells) exitWith {}; + }; + +}, 0, [_mapGrids, _gridCells, _initStartTime]] call CBA_fnc_addPerFrameHandler diff --git a/addons/advanced_ballistics/functions/script_component.hpp b/addons/advanced_ballistics/functions/script_component.hpp new file mode 100644 index 0000000000..2c718bf9db --- /dev/null +++ b/addons/advanced_ballistics/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\advanced_ballistics\script_component.hpp" \ No newline at end of file diff --git a/addons/advanced_ballistics/initKeybinds.sqf b/addons/advanced_ballistics/initKeybinds.sqf new file mode 100644 index 0000000000..5649fb943e --- /dev/null +++ b/addons/advanced_ballistics/initKeybinds.sqf @@ -0,0 +1,11 @@ +["ACE3", QGVAR(ProtractorKey), localize "STR_ACE_AdvancedBallistics_ProtractorKey", +{ + // Conditions: canInteract + if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + + // Statement + [] call FUNC(displayProtractor); + false +}, +{false}, +[37, [true, true, false]], false, 0] call CBA_fnc_addKeybind; // (CTRL + SHIFT + K) diff --git a/addons/advanced_ballistics/script_component.hpp b/addons/advanced_ballistics/script_component.hpp new file mode 100644 index 0000000000..273afa2f49 --- /dev/null +++ b/addons/advanced_ballistics/script_component.hpp @@ -0,0 +1,26 @@ +#define COMPONENT advanced_ballistics +#include "\z\ace\addons\main\script_mod.hpp" + +#define USE_ADVANCEDBALLISTICS_DLL + +#ifdef DEBUG_ENABLED_ADVANCEDBALLISTICS + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_ADVANCEDBALLISTICS + #define DEBUG_SETTINGS DEBUG_SETTINGS_ADVANCEDBALLISTICS +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#define GRAVITY 9.80665 +#define ABSOLUTE_ZERO_IN_CELSIUS -273.15 +#define KELVIN(t) (t - ABSOLUTE_ZERO_IN_CELSIUS) +#define CELSIUS(t) (t + ABSOLUTE_ZERO_IN_CELSIUS) +#define UNIVERSAL_GAS_CONSTANT 8.314 +#define WATER_VAPOR_MOLAR_MASS 0.018016 +#define DRY_AIR_MOLAR_MASS 0.028964 +#define SPECIFIC_GAS_CONSTANT_DRY_AIR 287.058 +#define STD_AIR_DENSITY_ICAO 1.22498 +#define STD_AIR_DENSITY_ASM 1.20885 +#define GET_TEMPERATURE_AT_HEIGHT(h) (EGVAR(weather,currentTemperature) - 0.0065 * (h)) diff --git a/addons/advanced_ballistics/stringtable.xml b/addons/advanced_ballistics/stringtable.xml new file mode 100644 index 0000000000..29560ce149 --- /dev/null +++ b/addons/advanced_ballistics/stringtable.xml @@ -0,0 +1,14 @@ + + + + + + Show Wind Info + Pokaż inf. o wietrze + + + Show Protractor + Pokaż kątomierz + + + \ No newline at end of file diff --git a/addons/aircraft/stringtable.xml b/addons/aircraft/stringtable.xml index c0966ddcfb..1ec3d09ae6 100644 --- a/addons/aircraft/stringtable.xml +++ b/addons/aircraft/stringtable.xml @@ -1,50 +1,49 @@  - - - - Burst - Feuerstoß - Ráfaga - Seria - Dávka - Rafale - Очередь - Sorozat - Rajada - Raffica - - - XM301 - XM301 - XM301 - XM301 - XM301 - XM301 - XM301 - XM301 - XM301 - XM301 - - - Open Cargo Door - Laderampe öffnen - Abrir compuerta de carga - Ourvir Rampe Cargo - Otwórz drzwi ładowni - Otevřít nákladní prostor - Rámpát kinyitni - Открыть грузовой отсек - - - Close Cargo Door - Laderampe schließen - Cerrar compuerta de carga - Fermer la Rampe du Cargo - Zamknij drzwi ładowni - Zavřít nákladní prostor - Rámpát zárni - Закрыть грузовой отсек - - + + + Burst + Feuerstoß + Ráfaga + Seria + Dávka + Contre mesure + Очередь + Sorozat + Rajada + Raffica + + + XM301 + XM301 + XM301 + XM301 + XM301 + XM301 + XM301 + XM301 + XM301 + XM301 + + + Open Cargo Door + Laderampe öffnen + Abrir compuerta de carga + Ourvir rampe cargo + Otwórz drzwi ładowni + Otevřít nákladní prostor + Rámpát kinyitni + Открыть грузовой отсек + + + Close Cargo Door + Laderampe schließen + Cerrar compuerta de carga + Fermer rampe cargo + Zamknij drzwi ładowni + Zavřít nákladní prostor + Rámpát zárni + Закрыть грузовой отсек + + diff --git a/addons/atragmx/CfgEventHandlers.hpp b/addons/atragmx/CfgEventHandlers.hpp new file mode 100644 index 0000000000..3996e3371d --- /dev/null +++ b/addons/atragmx/CfgEventHandlers.hpp @@ -0,0 +1,11 @@ +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) ); + }; +}; \ No newline at end of file diff --git a/addons/atragmx/CfgVehicles.hpp b/addons/atragmx/CfgVehicles.hpp new file mode 100644 index 0000000000..f015f0e0b9 --- /dev/null +++ b/addons/atragmx/CfgVehicles.hpp @@ -0,0 +1,40 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Equipment { + class GVAR(open) { + displayName = "$STR_ACE_ATragMX_OpenATragMXDialog"; + condition = QUOTE(call FUNC(can_show)); + statement = QUOTE(call FUNC(create_dialog)); + showDisabled = 0; + priority = 2; + icon = PATHTOF(UI\ATRAG_Icon.paa); + exceptions[] = {"notOnMap", "isNotInside"}; + }; + }; + }; + }; + + class Item_Base_F; + class ACE_Item_ATragMX: Item_Base_F { + author = "Ruthberg"; + scope = 2; + scopeCurator = 2; + displayName = "ATragMX"; + vehicleClass = "Items"; + class TransportItems { + class ACE_ATragMX { + name = "ACE_ATragMX"; + count = 1; + }; + }; + }; + + class Box_NATO_Support_F; + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportItems { + MACRO_ADDITEM(ACE_ATragMX,6); + }; + }; +}; diff --git a/addons/atragmx/CfgWeapons.hpp b/addons/atragmx/CfgWeapons.hpp new file mode 100644 index 0000000000..07d2fa4aee --- /dev/null +++ b/addons/atragmx/CfgWeapons.hpp @@ -0,0 +1,20 @@ + +class CfgWeapons { + class ACE_ItemCore; + class InventoryItem_Base_F; + + class ACE_ATragMX: ACE_ItemCore { + author = "Ruthberg"; + scope = 2; + displayName = "$STR_ACE_ATragMX_Name"; + descriptionShort = "$STR_ACE_ATragMX_Description"; + model = PATHTOF(data\tdsrecon.p3d); + picture = PATHTOF(UI\ATRAG_Icon.paa); + icon = "iconObject_circle"; + mapSize = 0.034; + + class ItemInfo: InventoryItem_Base_F { + mass = 2; + }; + }; +}; diff --git a/addons/atragmx/README.md b/addons/atragmx/README.md new file mode 100644 index 0000000000..f68b38c4a3 --- /dev/null +++ b/addons/atragmx/README.md @@ -0,0 +1,10 @@ +ace_atragmx +=============== + +ATragMX - Handheld ballistics calculator + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Ruthberg] (http://github.com/Ulteq) \ No newline at end of file diff --git a/addons/atragmx/RscTitles.hpp b/addons/atragmx/RscTitles.hpp new file mode 100644 index 0000000000..8c0a647839 --- /dev/null +++ b/addons/atragmx/RscTitles.hpp @@ -0,0 +1,1050 @@ +#define ST_LEFT 0 +#define ST_RIGHT 1 +#define ST_CENTER 2 + +class ATragMX_RscText { + idc=-1; + type=0; + style=256; + colorDisabled[]={0,0,0,0.0}; + colorBackground[]={0,0,0,0}; + colorText[]={0,0,0,1}; + text=""; + x=0; + y=0; + h=0.037; + w=0.30; + font="TahomaB"; + SizeEx=0.03; + shadow=0; +}; +class ATragMX_RscButton { + text=""; + colorText[]={0,0,0,1}; + colorDisabled[]={0,0,0,0.0}; + colorBackground[]={0,0,0,0}; + colorBackgroundDisabled[]={0,0,0,0}; + colorBackgroundActive[]={0,0,0,0}; + colorFocused[]={0,0,0,0}; + colorShadow[]={0,0,0,0}; + colorBorder[]={0,0,0,1}; + soundEnter[]={"",0,1}; + soundPush[]={"",0,1}; + soundClick[]={"",0,1}; + soundEscape[]={"",0,1}; + type=1; + style="0x02+0x100"; + x=0; + y=0; + w=0.03; + h=0.03; + font="TahomaB"; + SizeEx=0.025; + offsetX=0.003; + offsetY=0.003; + offsetPressedX=0.0020; + offsetPressedY=0.0020; + borderSize=0; + shadow=0; +}; +class ATragMX_RscEdit { + access=0; + type=2; + style=ST_RIGHT; + x=0; + y=0; + w=0.05; + h=0.03; + colorDisabled[]={0,0,0,0.0}; + colorBackground[]={0,0,0,0}; + colorText[]={0,0,0,1}; + colorSelection[]={0,0,0,0.25}; + font="TahomaB"; + sizeEx=0.025; + text=""; + size=0.2; + autocomplete=""; + shadow=0; +}; +class ATragMX_RscToolbox { + type=6; + style=ST_LEFT; + x=0; + y=0; + w=0.2; + h=0.03; + colorDisabled[]={0,0,0,0.0}; + colorBackground[]={1,1,1,1}; + colorText[]={0,0,0,1}; + color[]={0,0,0,0}; + colorTextSelect[]={0.8,0.8,0.8,1}; + colorSelect[]={0,0,0,1}; + colorSelectedBg[]={0,0,0,1}; + colorTextDisable[]={0.4,0.4,0.4,1}; + colorDisable[]={0.4,0.4,0.4,1}; + font="TahomaB"; + sizeEx=0.027; + rows=1; + columns=2; + strings[]={"Entry 1","Entry 2"}; + values[]={1,0}; + onToolBoxSelChanged=""; +}; +class ATragMX_RscListBox { + idc=-1; + type=5; + style=0; + font="TahomaB"; + sizeEx=0.028; + rowHeight=0.03; + colorDisabled[]={0,0,0,0.0}; + colorBackground[]={1,1,1,1}; + colorText[]={0,0,0,1}; + colorScrollbar[]={0.95,0.95,0.95,1}; + colorSelect[]={0,0,0,1}; + colorSelect2[]={0,0,0,1}; + colorSelectBackground[]={0.925,0.925,0.925,1}; + colorSelectBackground2[]={0.925,0.925,0.925,1}; + period=0; + maxHistoryDelay=1.0; + autoScrollSpeed=-1; + autoScrollDelay=5; + autoScrollRewind=0; + soundSelect[]={"",0.09,1}; + + class ScrollBar { + 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 { + }; +}; +class ATragMX_RscListNBox: ATragMX_RscListBox { + idc=-1; + type=102; + columns[]={0.0, 0.225, 0.475, 0.725}; + drawSideArrows=0; + idcLeft=-1; + idcRight=-1; +}; +class ATragMX_RscControlsGroup { + type=15; + idc=-1; + style=16; + x=0; + y=0; + w=1; + h=1; + shadow=0; + class VScrollbar { + color[]={1,1,1,0.6}; + width=0.021; + autoScrollSpeed=-1; + autoScrollDelay=5; + autoScrollRewind=0; + shadow=0; + }; + class HScrollbar { + color[]={1,1,1,0.6}; + height=0.028; + shadow=0; + }; + class ScrollBar { + color[]={1,1,1,0.6}; + colorActive[]={1,1,1,1}; + colorDisabled[]={1,1,1,0.3}; + thumb="#(argb,8,8,3)color(1,1,1,1)"; + arrowEmpty="#(argb,8,8,3)color(1,1,1,1)"; + arrowFull="#(argb,8,8,3)color(1,1,1,1)"; + border="#(argb,8,8,3)color(1,1,1,1)"; + }; + class Controls { + }; +}; +class ATragMX_RscLineBreak { + idc=-1; + type=98; + shadow=0; +}; +class ATragMX_Display { + name="ATragMX_Display"; + idd=-1; + onLoad="uiNamespace setVariable ['ATragMX_Display', (_this select 0)]"; + movingEnable=1; + controlsBackground[]={}; + objects[]={}; + class controls { + class BACKGROUND { + moving=1; + type=0; + font="TahomaB"; + SizeEX=0.025; + idc=-1; + style=48; + x=0.55*safezoneW+safezoneX-0.256; + y=0.265*safezoneH+safezoneY-0.1; + w=1.024; + h=1.024*4/3; + colorBackground[]={1,1,1,1}; + colorText[]={1,1,1,1}; + text=PATHTOF(UI\atrag.paa); + }; + class POWER: ATragMX_RscButton { + idc=-1; + x=0.55*safezoneW+safezoneX+0.145; + y=0.265*safezoneH+safezoneY+0.94; + w=0.045; + h=0.045*4/3; + colorBackground[]={0,0,0,0.0}; + action="closeDialog 0"; + }; + class BACK: POWER { + idc=-1; + w=0.06; + x=0.55*safezoneW+safezoneX+0.3122; + action=QUOTE(call FUNC(init); call FUNC(update_target_selection)); + }; + class WINDOWS: ATragMX_RscButton { + idc=-1; + x=0.55*safezoneW+safezoneX+0.130; + y=0.265*safezoneH+safezoneY+0.88; + w=0.035; + h=0.035*4/3; + colorBackground[]={0,0,0,0.0}; + }; + class OK: WINDOWS { + idc=-1; + x=0.55*safezoneW+safezoneX+0.347; + y=0.265*safezoneH+safezoneY+0.878; + }; + class TOP: ATragMX_RscButton { + idc=-1; + x=0.55*safezoneW+safezoneX+0.242; + y=0.265*safezoneH+safezoneY+0.85; + w=0.03; + h=0.03; + colorBackground[]={0,0,0,0.0}; + action=QUOTE(((GVAR(currentGun) select GVAR(currentTarget)) + (count GVAR(gunList)) - 1) % (count GVAR(gunList)) call FUNC(change_gun)); + }; + class BOTTOM: TOP { + idc=-1; + y=0.265*safezoneH+safezoneY+0.955; + action=QUOTE(((GVAR(currentGun) select GVAR(currentTarget)) + (count GVAR(gunList)) + 1) % (count GVAR(gunList)) call FUNC(change_gun)); + }; + class LEFT: ATragMX_RscButton { + idc=-1; + x=0.55*safezoneW+safezoneX+0.1925; + y=0.265*safezoneH+safezoneY+0.9; + w=0.05; + h=0.03; + colorBackground[]={0,0,0,0}; + action=QUOTE(call FUNC(parse_input); GVAR(currentTarget) = (4 + GVAR(currentTarget) - 1) % 4; call FUNC(update_target_selection)); + }; + class RIGHT: LEFT { + idc=-1; + x=0.55*safezoneW+safezoneX+0.2725; + action=QUOTE(call FUNC(parse_input); GVAR(currentTarget) = (4 + GVAR(currentTarget) + 1) % 4; call FUNC(update_target_selection)); + }; + class TOP_LEFT: ATragMX_RscButton { + idc=-1; + x=0.55*safezoneW+safezoneX+0.162; + y=0.265*safezoneH+safezoneY+0.82; + w=0.031; + h=0.031*4/3; + colorBackground[]={0,0,0,0.0}; + }; + class TOP_RIGHT: TOP_LEFT { + idc=-1; + x=0.55*safezoneW+safezoneX+0.315; + }; + + class TEXT_GUN_PROFILE: ATragMX_RscText { + idc=1000; + x=0.550*safezoneW+safezoneX+0.11; + y=0.265*safezoneH+safezoneY+0.20; + w=0.18; + h=0.03; + style=ST_LEFT; + sizeEx=0.025; + text=""; + }; + class TEXT_D: ATragMX_RscButton { + idc=600; + w=0.0231; + x=0.550*safezoneW+safezoneX+0.29; + y=0.265*safezoneH+safezoneY+0.20; + colorText[]={0,0,0,1}; + colorDisabled[]={0.8,0.8,0.8,1}; + colorBackgroundDisabled[]={0,0,0,1}; + colorBackgroundActive[]={0,0,0,0}; + text="D"; + action=QUOTE(GVAR(currentUnit)=0; call FUNC(update_unit_selection)); + }; + class TEXT_E: TEXT_D { + idc=601; + x=0.550*safezoneW+safezoneX+0.3131; + text="E"; + action=QUOTE(GVAR(currentUnit)=1; call FUNC(update_unit_selection)); + }; + class TEXT_M: TEXT_E { + idc=602; + x=0.550*safezoneW+safezoneX+0.3362; + text="M"; + action=QUOTE(GVAR(currentUnit)=2; call FUNC(update_unit_selection)); + }; + class TEXT_RANGE_CARD: TEXT_D { + idc=603; + w=0.03; + x=0.550*safezoneW+safezoneX+0.36; + colorBackground[]={0.15,0.21,0.23,0.3}; + colorFocused[]={0.15,0.21,0.23,0.2}; + text="RC"; + action=QUOTE(call FUNC(toggle_range_card)); + }; + + class TEXT_GUN: ATragMX_RscButton { + idc=4000; + w=0.0925; + x=0.550*safezoneW+safezoneX+0.11; + y=0.265*safezoneH+safezoneY+0.25; + colorBackground[]={0.15,0.21,0.23,0.3}; + colorFocused[]={0.15,0.21,0.23,0.2}; + text="Gun"; + }; + class TEXT_BORE_HEIGHT: TEXT_GUN_PROFILE { + idc=10; + style=ST_LEFT; + y=0.265*safezoneH+safezoneY+0.285; + text="BH"; + }; + class TEXT_BORE_HEIGHT_INPUT: ATragMX_RscEdit { + idc=100; + w=0.058; + x=0.550*safezoneW+safezoneX+0.145; + y=0.265*safezoneH+safezoneY+0.285; + onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(calculate_target_solution)}); + }; + class TEXT_BULLET_MASS: TEXT_BORE_HEIGHT { + idc=11; + style=ST_LEFT; + y=0.265*safezoneH+safezoneY+0.320; + text="BW"; + }; + class TEXT_BULLET_MASS_INPUT: TEXT_BORE_HEIGHT_INPUT { + idc=110; + y=0.265*safezoneH+safezoneY+0.320; + }; + class TEXT_AIR_FRICTION: TEXT_BORE_HEIGHT { + idc=12; + y=0.265*safezoneH+safezoneY+0.355; + text="C1"; + }; + class TEXT_AIR_FRICTION_INPUT: TEXT_BORE_HEIGHT_INPUT { + idc=120; + y=0.265*safezoneH+safezoneY+0.355; + }; + class TEXT_MUZZLE_VELOCITY: ATragMX_RscButton { + idc=13; + style=0; + w=0.03; + x=0.550*safezoneW+safezoneX+0.11; + y=0.265*safezoneH+safezoneY+0.390; + colorBackground[]={0.15,0.21,0.23,0.3}; + colorFocused[]={0.15,0.21,0.23,0.2}; + text="MV"; + }; + class TEXT_MUZZLE_VELOCITY_INPUT: TEXT_BORE_HEIGHT_INPUT { + idc=130; + y=0.265*safezoneH+safezoneY+0.390; + }; + class TEXT_ZERO_RANGE: TEXT_BORE_HEIGHT { + idc=14; + y=0.265*safezoneH+safezoneY+0.425; + text="ZR"; + }; + class TEXT_ZERO_RANGE_INPUT: TEXT_BORE_HEIGHT_INPUT { + idc=140; + y=0.265*safezoneH+safezoneY+0.425; + onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(update_zero_range)}); + }; + class TEXT_ATMOSPHERE: TEXT_GUN { + idc=4001; + x=0.550*safezoneW+safezoneX+0.205; + text="Atmsphr"; + }; + class TEXT_TEMPERATURE: TEXT_BULLET_MASS { + idc=20; + x=0.550*safezoneW+safezoneX+0.20; + text="Tmp"; + }; + class TEXT_TEMPERATURE_INPUT: ATragMX_RscEdit { + idc=200; + w=0.050; + x=0.550*safezoneW+safezoneX+0.245; + y=0.265*safezoneH+safezoneY+0.320; + text=""; + onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(calculate_target_solution)}); + }; + class TEXT_BAROMETRIC_PRESSURE: TEXT_AIR_FRICTION { + idc=21; + x=0.550*safezoneW+safezoneX+0.20; + text="BP"; + }; + class TEXT_BAROMETRIC_PRESSURE_INPUT: TEXT_TEMPERATURE_INPUT { + idc=210; + y=0.265*safezoneH+safezoneY+0.355; + }; + 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"; + }; + class TEXT_RELATIVE_HUMIDITY_INPUT: TEXT_TEMPERATURE_INPUT { + idc=220; + y=0.265*safezoneH+safezoneY+0.390; + }; + class TEXT_TARGET_A: ATragMX_RscButton { + idc=500; + w=0.0231; + x=0.550*safezoneW+safezoneX+0.205; + y=0.265*safezoneH+safezoneY+0.425; + colorText[]={0,0,0,1}; + colorDisabled[]={0.8,0.8,0.8,1}; + colorBackgroundDisabled[]={0,0,0,1}; + colorBackgroundActive[]={0,0,0,0}; + text="A"; + action=QUOTE(call FUNC(parse_input); GVAR(currentTarget)=0; call FUNC(update_target_selection)); + }; + class TEXT_TARGET_B: TEXT_TARGET_A { + idc=501; + x=0.550*safezoneW+safezoneX+0.2281; + text="B"; + action=QUOTE(call FUNC(parse_input); GVAR(currentTarget)=1; call FUNC(update_target_selection)); + }; + class TEXT_TARGET_C: TEXT_TARGET_B { + idc=502; + x=0.550*safezoneW+safezoneX+0.2512; + text="C"; + action=QUOTE(call FUNC(parse_input); GVAR(currentTarget)=2; call FUNC(update_target_selection)); + }; + class TEXT_TARGET_D: TEXT_TARGET_B { + idc=503; + x=0.550*safezoneW+safezoneX+0.2743; + text="D"; + action=QUOTE(call FUNC(parse_input); GVAR(currentTarget)=3; call FUNC(update_target_selection)); + }; + + class TEXT_TARGET: TEXT_GUN { + idc=4002; + x=0.550*safezoneW+safezoneX+0.3; + text="Target"; + }; + class TEXT_WIND_SPEED: TEXT_BORE_HEIGHT { + idc=30; + x=0.550*safezoneW+safezoneX+0.3; + text="WS"; + }; + class TEXT_WIND_SPEED_INPUT: ATragMX_RscEdit { + idc=300; + w=0.058; + x=0.550*safezoneW+safezoneX+0.335; + y=0.265*safezoneH+safezoneY+0.285; + onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(calculate_target_solution)}); + text="0"; + }; + class TEXT_WIND_DIRECTION: TEXT_BULLET_MASS { + idc=31; + x=0.550*safezoneW+safezoneX+0.3; + text="WD"; + }; + class TEXT_WIND_DIRECTION_INPUT: TEXT_WIND_SPEED_INPUT { + idc=310; + y=0.265*safezoneH+safezoneY+0.32; + }; + class TEXT_INCLINATION_ANGLE: TEXT_AIR_FRICTION { + idc=32; + x=0.550*safezoneW+safezoneX+0.3; + text="IA"; + }; + class TEXT_INCLINATION_ANGLE_INPUT: TEXT_WIND_SPEED_INPUT { + idc=320; + y=0.265*safezoneH+safezoneY+0.355; + }; + class TEXT_TARGET_SPEED: TEXT_MUZZLE_VELOCITY { + idc=33; + x=0.550*safezoneW+safezoneX+0.3; + text="TS"; + action=QUOTE(call FUNC(toggle_target_speed_assist)); + }; + class TEXT_TARGET_SPEED_INPUT: TEXT_WIND_SPEED_INPUT { + idc=330; + y=0.265*safezoneH+safezoneY+0.39; + }; + class TEXT_TARGET_RANGE: TEXT_TARGET_SPEED { + idc=34; + y=0.265*safezoneH+safezoneY+0.425; + text="TR"; + action=QUOTE(0 call FUNC(toggle_target_range_assist)); + }; + class TEXT_TARGET_RANGE_INPUT: TEXT_WIND_SPEED_INPUT { + idc=340; + y=0.265*safezoneH+safezoneY+0.425; + }; + + class TEXT_ELEVATION: TEXT_GUN_PROFILE { + idc=40; + w=0.05; + x=0.550*safezoneW+safezoneX+0.11; + y=0.265*safezoneH+safezoneY+0.50; + text="Elev"; + }; + class TEXT_ABSOLUTE: TEXT_GUN_PROFILE { + idc=4003; + w=0.07; + style=ST_CENTER; + x=0.550*safezoneW+safezoneX+0.17; + y=0.265*safezoneH+safezoneY+0.47; + text="Abs"; + }; + class TEXT_RELATIVE: TEXT_ABSOLUTE { + idc=4004; + x=0.550*safezoneW+safezoneX+0.245; + text="Rel"; + }; + class TEXT_CURRENT: TEXT_ABSOLUTE { + idc=4005; + x=0.550*safezoneW+safezoneX+0.32; + text="Cur"; + }; + class TEXT_ELEVATION_OUTPUT_ABSOLUTE: ATragMX_RscEdit { + idc=400; + w=0.07; + x=0.550*safezoneW+safezoneX+0.17; + y=0.265*safezoneH+safezoneY+0.50; + text=""; + }; + class TEXT_ELEVATION_OUTPUT_RELATIVE: TEXT_ELEVATION_OUTPUT_ABSOLUTE { + idc=401; + x=0.550*safezoneW+safezoneX+0.2465; + }; + class TEXT_ELEVATION_INPUT_CURRENT: TEXT_ELEVATION_OUTPUT_ABSOLUTE { + idc=402; + x=0.550*safezoneW+safezoneX+0.323; + onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(parse_input); call FUNC(update_result)}); + }; + class TEXT_WINDAGE: TEXT_ELEVATION { + idc=41; + y=0.265*safezoneH+safezoneY+0.535; + text="Wind"; + }; + class TEXT_WINDAGE_OUTPUT_ABSOLUTE: TEXT_ELEVATION_OUTPUT_ABSOLUTE { + idc=410; + y=0.265*safezoneH+safezoneY+0.535; + }; + class TEXT_WINDAGE_OUTPUT_RELATIVE: TEXT_WINDAGE_OUTPUT_ABSOLUTE { + idc=411; + x=0.550*safezoneW+safezoneX+0.2465; + }; + class TEXT_WINDAGE_INPUT_CURRENT: TEXT_WINDAGE_OUTPUT_ABSOLUTE { + idc=412; + x=0.550*safezoneW+safezoneX+0.323; + onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(parse_input); call FUNC(update_result)}); + }; + class TEXT_LEAD: TEXT_GUN { + idc=42; + w=0.05; + x=0.550*safezoneW+safezoneX+0.11; + y=0.265*safezoneH+safezoneY+0.57; + text="Lead"; + }; + class TEXT_LEAD_OUTPUT: TEXT_ELEVATION_OUTPUT_ABSOLUTE { + idc=420; + y=0.265*safezoneH+safezoneY+0.57; + }; + class TEXT_RESET_SCOPE_ZERO: TEXT_GUN { + idc=4006; + w=0.07; + style=ST_CENTER; + colorBackground[]={0,0,0,0}; + x=0.550*safezoneW+safezoneX+0.2465; + y=0.265*safezoneH+safezoneY+0.57; + text="Reset"; + action=QUOTE(call FUNC(reset_relative_click_memory)); + }; + class TEXT_UPDATE_SCOPE_ZERO: TEXT_RESET_SCOPE_ZERO { + idc=4007; + x=0.550*safezoneW+safezoneX+0.323; + text="Update"; + action=QUOTE(call FUNC(update_relative_click_memory)); + }; + class TEXT_GUN_LIST: TEXT_GUN { + idc=4008; + style=ST_LEFT; + y=0.265*safezoneH+safezoneY+0.65; + text="GunList"; + action=QUOTE(call FUNC(toggle_gun_list)); + }; + class TEXT_SCOPE_UNIT: TEXT_GUN_LIST { + idc=2000; + style=ST_CENTER; + x=0.550*safezoneW+safezoneX+0.205; + colorBackground[]={0,0,0,0}; + text="TMOA"; + action=QUOTE(call FUNC(cycle_scope_unit)); + }; + class TEXT_CALCULATE: TEXT_SCOPE_UNIT { + idc=3000; + style=ST_RIGHT; + x=0.550*safezoneW+safezoneX+0.3; + text="Calc"; + action=QUOTE(call FUNC(calculate_target_solution)); + }; + + class TEXT_RANGE_CARD_SCOPE_UNIT: TEXT_GUN_PROFILE { + idc=5000; + text=""; + }; + class TEXT_RANGE_CARD_SETUP: ATragMX_RscButton { + idc=5001; + w=0.055675; + x=0.550*safezoneW+safezoneX+0.28; + y=0.265*safezoneH+safezoneY+0.20; + colorBackground[]={0.15,0.21,0.23,0.3}; + colorFocused[]={0.15,0.21,0.23,0.2}; + text="Setup"; + action=QUOTE(call FUNC(toggle_range_card_setup)); + }; + class TEXT_RANGE_CARD_DONE: TEXT_RANGE_CARD_SETUP { + idc=5002; + x=0.550*safezoneW+safezoneX+0.3362; + text="Done"; + action=QUOTE(call FUNC(toggle_range_card)); + }; + class TEXT_RANGE_CARD_COLUMN_1_CAPTION: ATragMX_RscButton { + idc=5003; + style=ST_LEFT; + w=0.07; + x=0.550*safezoneW+safezoneX+0.11; + y=0.265*safezoneH+safezoneY+0.24; + colorBackground[]={0.15,0.21,0.23,0.3}; + text="Meters"; + }; + class TEXT_RANGE_CARD_COLUMN_2_CAPTION: TEXT_RANGE_CARD_COLUMN_1_CAPTION { + idc=5004; + x=0.550*safezoneW+safezoneX+0.180625; + text="Elev"; + }; + class TEXT_RANGE_CARD_COLUMN_3_CAPTION: TEXT_RANGE_CARD_COLUMN_1_CAPTION { + idc=5005; + x=0.550*safezoneW+safezoneX+0.25125; + text="Wind"; + }; + class TEXT_RANGE_CARD_COLUMN_4_CAPTION: TEXT_RANGE_CARD_COLUMN_1_CAPTION { + idc=5006; + x=0.550*safezoneW+safezoneX+0.321875; + text="TmFlt"; + action=QUOTE(call FUNC(cycle_range_card_columns)); + }; + class TEXT_RANGE_CARD_OUTPUT: ATragMX_RscListNBox { + idc=5007; + idcLeft=50061; + idcRight=50062; + w=0.285; + h=0.42; + x=0.550*safezoneW+safezoneX+0.11; + y=0.265*safezoneH+safezoneY+0.27; + }; + + class TEXT_GUN_LIST_OUTPUT: ATragMX_RscListBox { + idc=6000; + w=0.16; + h=0.45; + x=0.550*safezoneW+safezoneX+0.11; + y=0.265*safezoneH+safezoneY+0.24; + colorSelectBackground[]={0.15,0.21,0.23,0.3}; + colorSelectBackground2[]={0.15,0.21,0.23,0.3}; + onMouseButtonDblClick=QUOTE(true call FUNC(toggle_gun_list)); + }; + class TEXT_GUN_LIST_COLUMN_CAPTION: TEXT_GUN_PROFILE { + idc=6001; + w=0.16; + colorBackground[]={0.15,0.21,0.23,0.3}; + text="AtragGun.gun"; + }; + class TEXT_GUN_LIST_OPEN_GUN: ATragMX_RscButton { + idc=6002; + style=ST_RIGHT; + w=0.115; + x=0.550*safezoneW+safezoneX+0.28; + y=0.265*safezoneH+safezoneY+0.20; + colorBackground[]={0.15,0.21,0.23,0.3}; + colorFocused[]={0.15,0.21,0.23,0.2}; + sizeEx=0.024; + text="Open Gun"; + action=QUOTE(true call FUNC(toggle_gun_list)); + }; + class TEXT_GUN_LIST_SAVE_GUN: TEXT_GUN_LIST_OPEN_GUN { + idc=6003; + y=0.265*safezoneH+safezoneY+0.24; + text="Save Gun"; + action=QUOTE(call FUNC(save_gun)); + }; + class TEXT_GUN_LIST_ADD_NEW_GUN: TEXT_GUN_LIST_OPEN_GUN { + idc=6004; + y=0.265*safezoneH+safezoneY+0.28; + text="Add New Gun"; + action=QUOTE(false call FUNC(show_gun_list); true call FUNC(show_add_new_gun)); + }; + class TEXT_GUN_LIST_DELETE_GUN: TEXT_GUN_LIST_OPEN_GUN { + idc=6005; + y=0.265*safezoneH+safezoneY+0.34; + text="Delete Gun"; + action=QUOTE(call FUNC(delete_gun)); + }; + class TEXT_GUN_LIST_NOTE: TEXT_GUN_LIST_OPEN_GUN { + idc=6006; + y=0.265*safezoneH+safezoneY+0.40; + text="Note"; + }; + class TEXT_GUN_LIST_DONE: TEXT_GUN_LIST_OPEN_GUN { + idc=6007; + y=0.265*safezoneH+safezoneY+0.65; + text="Done"; + action=QUOTE(false call FUNC(toggle_gun_list)); + }; + + class TEXT_TARGET_RANGE_ASSIST_CAPTION: ATragMX_RscText { + idc=7000; + style=16+0x200; + lineSpacing=1.0; + x=0.550*safezoneW+safezoneX+0.11; + y=0.265*safezoneH+safezoneY+0.24; + w=0.29; + h=0.10; + sizeEx=0.022; + text="When using WIDTH to size a target, UP/Down Angle does not effect range calculation but will effect bullet drop."; + }; + class TEXT_TARGET_RANGE_ASSIST_MEASUREMENT_METHOD: TEXT_TARGET_RANGE_ASSIST_CAPTION { + idc=7001; + style=ST_LEFT; + x=0.550*safezoneW+safezoneX+0.115; + y=0.265*safezoneH+safezoneY+0.35; + w=0.12; + h=0.03; + sizeEx=0.027; + text="Using Target:"; + }; + class TEXT_TARGET_RANGE_ASSIST_WIDTH_HEIGHT: ATragMX_RscToolbox { + idc=7002; + w=0.14; + x=0.550*safezoneW+safezoneX+0.24; + y=0.265*safezoneH+safezoneY+0.35; + strings[]={"Height","Width"}; + values[]={1,0}; + onToolBoxSelChanged="GVAR(rangeAssistUseTargetHeight)=((_this select 1)==0)"; + }; + class TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE: TEXT_TARGET_RANGE_ASSIST_MEASUREMENT_METHOD { + idc=7003; + style=ST_RIGHT; + x=0.550*safezoneW+safezoneX+0.10; + y=0.265*safezoneH+safezoneY+0.4; + text="Target Size"; + }; + class TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { + idc=7004; + y=0.265*safezoneH+safezoneY+0.45; + text="Image Size"; + }; + class TEXT_TARGET_RANGE_ASSIST_ANGLE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { + idc=7005; + y=0.265*safezoneH+safezoneY+0.5; + text="Angle"; + }; + class TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { + idc=7006; + y=0.265*safezoneH+safezoneY+0.55; + text="Est Range"; + }; + class TEXT_TARGET_RANGE_ASSIST_CALC_1: TEXT_MUZZLE_VELOCITY { + idc=7007; + w=0.0231; + x=0.550*safezoneW+safezoneX+0.22; + y=0.265*safezoneH+safezoneY+0.4; + sizeEx=0.03; + text="!"; + action=QUOTE(0 call FUNC(calculate_target_range_assist)); + }; + class TEXT_TARGET_RANGE_ASSIST_CALC_2: TEXT_TARGET_RANGE_ASSIST_CALC_1 { + idc=7008; + y=0.265*safezoneH+safezoneY+0.45; + action=QUOTE(1 call FUNC(calculate_target_range_assist)); + }; + class TEXT_TARGET_RANGE_ASSIST_CALC_3: TEXT_TARGET_RANGE_ASSIST_CALC_1 { + idc=7009; + y=0.265*safezoneH+safezoneY+0.55; + action=QUOTE(2 call FUNC(calculate_target_range_assist)); + }; + class TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT: ATragMX_RscEdit { + idc=7010; + w=0.065; + x=0.550*safezoneW+safezoneX+0.2475; + y=0.265*safezoneH+safezoneY+0.4; + }; + class TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { + idc=7011; + y=0.265*safezoneH+safezoneY+0.45; + }; + class TEXT_TARGET_RANGE_ASSIST_ANGLE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { + idc=7012; + y=0.265*safezoneH+safezoneY+0.5; + }; + class TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { + idc=7013; + y=0.265*safezoneH+safezoneY+0.55; + }; + class TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_UNIT: TEXT_TARGET_RANGE_ASSIST_CALC_1 { + idc=7014; + w=0.07; + x=0.550*safezoneW+safezoneX+0.32; + text="cm"; + action=QUOTE(GVAR(rangeAssistTargetSizeUnit)=(GVAR(rangeAssistTargetSizeUnit)+1) % (count GVAR(GVAR(rangeAssistTargetSizeUnit)s)); ctrlSetText [7014, GVAR(GVAR(rangeAssistTargetSizeUnit)s) select GVAR(rangeAssistTargetSizeUnit)]); + }; + class TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_UNIT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_UNIT { + idc=7015; + y=0.265*safezoneH+safezoneY+0.45; + text="MIL"; + action=QUOTE(GVAR(rangeAssistImageSizeUnit)=(GVAR(rangeAssistImageSizeUnit)+1) % (count GVAR(rangeAssistImageSizeUnits)); ctrlSetText [7015, GVAR(rangeAssistImageSizeUnits) select GVAR(rangeAssistImageSizeUnit)]); + }; + class TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE_UNIT: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE { + idc=7016; + style=ST_LEFT; + w=0.07; + x=0.550*safezoneW+safezoneX+0.32; + text="Meters"; + }; + class TEXT_TARGET_RANGE_ASSIST_DONE: ATragMX_RscButton { + idc=7017; + style=ST_CENTER; + w=0.07; + x=0.550*safezoneW+safezoneX+0.11; + y=0.265*safezoneH+safezoneY+0.60; + colorBackground[]={0.15,0.21,0.23,0.3}; + colorFocused[]={0.15,0.21,0.23,0.2}; + text="Done"; + action=QUOTE(1 call FUNC(toggle_target_range_assist)); + }; + class TEXT_TARGET_RANGE_ASSIST_CANCEL: TEXT_TARGET_RANGE_ASSIST_DONE { + idc=7018; + x=0.550*safezoneW+safezoneX+0.180625; + text="Cancel"; + action=QUOTE(0 call FUNC(toggle_target_range_assist)); + }; + class TEXT_TARGET_RANGE_ASSIST_PREV: TEXT_TARGET_RANGE_ASSIST_DONE { + idc=7019; + x=0.550*safezoneW+safezoneX+0.25125; + text="Prev"; + action=""; + }; + class TEXT_TARGET_RANGE_ASSIST_NEXT: TEXT_TARGET_RANGE_ASSIST_DONE { + idc=7020; + x=0.550*safezoneW+safezoneX+0.321875; + text="Next"; + action=""; + }; + + class TEXT_TARGET_SPEED_ASSIST_TARGET_RANGE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { + idc=8000; + x=0.550*safezoneW+safezoneX+0.12; + 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; + text="Num Ticks"; + }; + class TEXT_TARGET_SPEED_ASSIST_TIME: TEXT_TARGET_RANGE_ASSIST_ANGLE { + idc=8002; + x=0.550*safezoneW+safezoneX+0.12; + text="Time (secs)"; + }; + class TEXT_TARGET_SPEED_ASSIST_TARGET_ESTIMATED_SPEED: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE { + idc=8003; + x=0.550*safezoneW+safezoneX+0.12; + text="Est Speed"; + }; + class TEXT_TARGET_SPEED_ASSIST_TARGET_RANGE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { + idc=8004; + onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(calculate_target_speed_assist)}); + }; + class TEXT_TARGET_SPEED_ASSIST_NUM_TICKS_INPUT: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_INPUT { + idc=8005; + onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(calculate_target_speed_assist)}); + }; + class TEXT_TARGET_SPEED_ASSIST_TIME_INPUT: TEXT_TARGET_RANGE_ASSIST_ANGLE_INPUT { + idc=8006; + onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(calculate_target_speed_assist)}); + }; + class TEXT_TARGET_SPEED_ASSIST_TARGET_ESTIMATED_SPEED_OUTPUT: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE { + idc=8007; + w=0.065; + x=0.550*safezoneW+safezoneX+0.2475; + y=0.265*safezoneH+safezoneY+0.55; + colorBackground[]={0.15,0.21,0.23,0.3}; + text="0"; + }; + class TEXT_TARGET_SPEED_ASSIST_TARGET_RANGE_UNIT: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE_UNIT { + idc=8008; + y=0.265*safezoneH+safezoneY+0.4; + text="Meters"; + }; + class TEXT_TARGET_SPEED_ASSIST_NUM_TICKS_UNIT: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_UNIT { + idc=8009; + text="MIL"; + action=QUOTE(GVAR(speedAssistNumTicksUnit)=(GVAR(speedAssistNumTicksUnit)+1) % (count GVAR(speedAssistNumTicksUnits)); ctrlSetText [8009, GVAR(speedAssistNumTicksUnits) select GVAR(speedAssistNumTicksUnit)]; call FUNC(calculate_target_speed_assist)); + }; + class TEXT_TARGET_SPEED_ASSIST_TIMER_START: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_UNIT { + idc=8010; + y=0.265*safezoneH+safezoneY+0.5; + text="Start"; + action=QUOTE(call FUNC(target_speed_assist_timer)); + }; + class TEXT_TARGET_SPEED_ASSIST_TARGET_ESTIMATED_SPEED_UNIT: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE_UNIT { + idc=8011; + text="m/s"; + }; + class TEXT_TARGET_SPEED_ASSIST_DONE: TEXT_TARGET_RANGE_ASSIST_DONE { + idc=8012; + action=QUOTE(1 call FUNC(toggle_target_speed_assist)); + }; + class TEXT_TARGET_SPEED_ASSIST_CANCEL: TEXT_TARGET_RANGE_ASSIST_CANCEL { + idc=8013; + action=QUOTE(0 call FUNC(toggle_target_speed_assist)); + }; + class TEXT_TARGET_SPEED_ASSIST_PREV: TEXT_TARGET_RANGE_ASSIST_PREV { + idc=8014; + }; + class TEXT_TARGET_SPEED_ASSIST_NEXT: TEXT_TARGET_RANGE_ASSIST_NEXT { + idc=8015; + }; + + class TEXT_TARGET_SPEED_ASSIST_TIMER_STOP_BACKGROUND: ATragMX_RscButton { + idc=9000; + w=0.285; + h=0.49; + x=0.550*safezoneW+safezoneX+0.11; + y=0.265*safezoneH+safezoneY+0.2; + colorBackground[]={0,0,0,0}; + colorBackgroundActive[]={0,0,0,0}; + action=QUOTE(GVAR(speedAssistTimer)=false); + }; + class TEXT_TARGET_SPEED_ASSIST_TIME_OUTPUT: ATragMX_RscText { + idc=9001; + x=0.550*safezoneW+safezoneX+0.22; + y=0.265*safezoneH+safezoneY+0.51; + w=0.08; + h=0.09; + style=ST_CENTER; + sizeEx=0.05; + text="0.0"; + }; + class TEXT_TARGET_SPEED_ASSIST_TIMER_STOP: ATragMX_RscButton { + idc=9002; + style=ST_CENTER; + w=0.07; + h=0.04; + x=0.550*safezoneW+safezoneX+0.225; + y=0.265*safezoneH+safezoneY+0.60; + colorBackground[]={0.15,0.21,0.23,0.3}; + colorFocused[]={0.15,0.21,0.23,0.2}; + text="Stop"; + action=QUOTE(GVAR(speedAssistTimer)=false); + }; + + class TEXT_RANGE_CARD_SETUP_START_RANGE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE { + idc=10000; + x=0.550*safezoneW+safezoneX+0.12; + text="Start Range"; + }; + class TEXT_RANGE_CARD_SETUP_END_RANGE: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE { + idc=10001; + x=0.550*safezoneW+safezoneX+0.12; + text="End Range"; + }; + class TEXT_RANGE_CARD_SETUP_INCREMENT: TEXT_TARGET_RANGE_ASSIST_ANGLE { + idc=10002; + x=0.550*safezoneW+safezoneX+0.12; + text="Increment"; + }; + class TEXT_RANGE_CARD_SETUP_START_RANGE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT { + idc=10003; + onKeyUp=QUOTE(if (_this select 1 == 28) then {1 call FUNC(toggle_range_card_setup)}); + }; + class TEXT_RANGE_CARD_SETUP_END_RANGE_INPUT: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_INPUT { + idc=10004; + onKeyUp=QUOTE(if (_this select 1 == 28) then {1 call FUNC(toggle_range_card_setup)}); + }; + class TEXT_RANGE_CARD_SETUP_INCREMENT_INPUT: TEXT_TARGET_RANGE_ASSIST_ANGLE_INPUT { + idc=10005; + onKeyUp=QUOTE(if (_this select 1 == 28) then {1 call FUNC(toggle_range_card_setup)}); + }; + class TEXT_RANGE_CARD_SETUP_DONE: TEXT_TARGET_SPEED_ASSIST_DONE { + idc=10006; + action=QUOTE(1 call FUNC(toggle_range_card_setup)); + }; + class TEXT_RANGE_CARD_SETUP_CANCEL: TEXT_TARGET_SPEED_ASSIST_CANCEL { + idc=10007; + action=QUOTE(0 call FUNC(toggle_range_card_setup)); + }; + class TEXT_RANGE_CARD_SETUP_PREV: TEXT_TARGET_SPEED_ASSIST_PREV { + idc=10008; + }; + class TEXT_RANGE_CARD_SETUP_NEXT: TEXT_TARGET_SPEED_ASSIST_NEXT { + idc=10009; + }; + + class TEXT_ADD_NEW_GUN_CAPTION: ATragMX_RscText { + idc=11000; + style=ST_LEFT; + w=0.25; + h=0.04; + x=0.550*safezoneW+safezoneX+0.12; + y=0.265*safezoneH+safezoneY+0.24; + sizeEx=0.025; + text="New Gun Name"; + }; + class TEXT_ADD_NEW_GUN_GUN_NAME_INPUT: ATragMX_RscEdit { + idc=11001; + style=ST_LEFT; + w=0.225; + h=0.04; + x=0.550*safezoneW+safezoneX+0.12; + y=0.265*safezoneH+safezoneY+0.28; + text=""; + }; + class TEXT_ADD_NEW_GUN_OK: ATragMX_RscButton { + idc=11002; + style=ST_CENTER; + w=0.1; + h=0.04; + x=0.550*safezoneW+safezoneX+0.12; + y=0.265*safezoneH+safezoneY+0.33; + colorBackground[]={0.15,0.21,0.23,0.3}; + colorFocused[]={0.15,0.21,0.23,0.2}; + text="OK"; + action=QUOTE(call FUNC(add_new_gun); false call FUNC(show_add_new_gun); true call FUNC(show_gun_list)); + }; + class TEXT_ADD_NEW_GUN_CANCEL: TEXT_ADD_NEW_GUN_OK { + idc=11003; + x=0.550*safezoneW+safezoneX+0.245; + text="Cancel"; + action=QUOTE(false call FUNC(show_add_new_gun); true call FUNC(show_gun_list)); + }; + }; +}; \ No newline at end of file diff --git a/addons/atragmx/UI/ATRAG.paa b/addons/atragmx/UI/ATRAG.paa new file mode 100644 index 0000000000..5708a35786 Binary files /dev/null and b/addons/atragmx/UI/ATRAG.paa differ diff --git a/addons/atragmx/UI/ATRAG_Icon.paa b/addons/atragmx/UI/ATRAG_Icon.paa new file mode 100644 index 0000000000..e233e510ef Binary files /dev/null and b/addons/atragmx/UI/ATRAG_Icon.paa differ diff --git a/addons/atragmx/XEH_postInit.sqf b/addons/atragmx/XEH_postInit.sqf new file mode 100644 index 0000000000..6875b4382e --- /dev/null +++ b/addons/atragmx/XEH_postInit.sqf @@ -0,0 +1,25 @@ +#include "script_component.hpp" + +//#include "initKeybinds.sqf" + +if (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, Elevation Scope Step, Windage Scope Step, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Ammo Class Name, Magazine Class Name, BC, Drag Model, Atmosphere Model + GVAR(gunList) = [["12.7x108mm" , 820, 100, 0.0659, -0.0008600, 3.81, 0, 0.338, 0.338, 120, 0, 0, 48.28, "B_127x108_Ball" , "5Rnd_127x108_Mag" , 0.700, 1, "ASM" ], + ["12.7x99mm" , 880, 100, 0.0607, -0.0008600, 3.81, 0, 0.338, 0.338, 120, 0, 0, 41.92, "B_127x99_Ball" , "5Rnd_mas_127x99_Stanag" , 0.670, 1, "ASM" ], + ["12.7x54mm" , 290, 100, 0.3913, -0.0014000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 61.56, "B_127x54_Ball" , "10Rnd_127x54_Mag" , 1.050, 1, "ASM" ], + ["10.4x77mm" , 910, 100, 0.0572, -0.0004800, 3.81, 0, 0.338, 0.338, 120, 0, 0, 27.15, "B_408_Ball" , "7Rnd_408_Mag" , 0.970, 1, "ASM" ], + ["9.3×64mm" , 870, 100, 0.0632, -0.0007500, 3.81, 0, 0.338, 0.338, 120, 0, 0, 16.20, "B_93x64_Ball" , "10Rnd_93x64_DMR_05_Mag" , 0.368, 1, "ASM" ], + ["8.6×70mm" , 915, 100, 0.0572, -0.0006100, 3.81, 0, 0.338, 0.338, 120, 0, 0, 16.20, "B_338_Ball" , "10Rnd_338_Mag" , 0.322, 7, "ICAO"], + ["7.62x51mm" , 850, 100, 0.0639, -0.0010000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 9.460, "B_762x51_Ball" , "20Rnd_762x51_Mag" , 0.393, 1, "ICAO"], + ["6.5x39mm" , 800, 100, 0.0689, -0.0009000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 7.776, "B_65x39_Caseless", "30Rnd_65x39_caseless_mag", 0.263, 1, "ICAO"], + ["5.56x45mm" , 920, 100, 0.0584, -0.0012650, 3.81, 0, 0.338, 0.338, 120, 0, 0, 4.000, "B_556x45_Ball" , "30Rnd_556x45_Stanag" , 0.304, 1, "ASM" ], + ["5.56x45mm Mk262" , 850, 100, 0.0643, -0.0011250, 3.81, 0, 0.338, 0.338, 120, 0, 0, 4.990, "RH_556x45_Mk262" , "RH_30Rnd_556x45_Mk262" , 0.361, 1, "ASM" ]]; + + profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)]; +}; + +[] call FUNC(init); + +["RangerfinderData", {_this call FUNC(sord)}] call EFUNC(common,addEventHandler); diff --git a/addons/atragmx/XEH_preInit.sqf b/addons/atragmx/XEH_preInit.sqf new file mode 100644 index 0000000000..91024d05a3 --- /dev/null +++ b/addons/atragmx/XEH_preInit.sqf @@ -0,0 +1,48 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(add_new_gun); +PREP(calculate_range_card); +PREP(calculate_scope_base_angle); +PREP(calculate_solution); +PREP(calculate_target_range_assist); +PREP(calculate_target_solution); +PREP(calculate_target_speed_assist); +PREP(can_show); +PREP(change_gun); +PREP(create_dialog); +PREP(cycle_range_card_columns); +PREP(cycle_scope_unit); +PREP(delete_gun); +PREP(init); +PREP(parse_input); +PREP(reset_relative_click_memory); +PREP(save_gun); +PREP(show_add_new_gun); +PREP(show_gun_list); +PREP(show_main_page); +PREP(show_range_card); +PREP(show_range_card_setup); +PREP(show_target_range_assist); +PREP(show_target_speed_assist); +PREP(show_target_speed_assist_timer); +PREP(sord); +PREP(target_speed_assist_timer); +PREP(toggle_gun_list); +PREP(toggle_range_card); +PREP(toggle_range_card_setup); +PREP(toggle_target_range_assist); +PREP(toggle_target_speed_assist); +PREP(update_atmosphere); +PREP(update_gun); +PREP(update_range_card); +PREP(update_relative_click_memory); +PREP(update_result); +PREP(update_scope_unit); +PREP(update_target); +PREP(update_target_selection); +PREP(update_unit_selection); +PREP(update_zero_range); + +ADDON = true; diff --git a/addons/atragmx/config.cpp b/addons/atragmx/config.cpp new file mode 100644 index 0000000000..3abe32ba34 --- /dev/null +++ b/addons/atragmx/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {"ACE_Item_ATragMX"}; + weapons[] = {"ACE_ATragMX"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ACE_common", "ACE_weather"}; + author = "Ruthberg"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" +#include "RscTitles.hpp" \ No newline at end of file diff --git a/addons/atragmx/data/tdsrecon.p3d b/addons/atragmx/data/tdsrecon.p3d new file mode 100644 index 0000000000..d82ac22f42 Binary files /dev/null and b/addons/atragmx/data/tdsrecon.p3d differ diff --git a/addons/atragmx/data/tdsrecon.rvmat b/addons/atragmx/data/tdsrecon.rvmat new file mode 100644 index 0000000000..5bd4ef36e5 --- /dev/null +++ b/addons/atragmx/data/tdsrecon.rvmat @@ -0,0 +1,69 @@ +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,1}; +specular[]={0.05000001,0.05000001,0.05000001,1}; +specularPower=50; +PixelShaderID="Super"; +VertexShaderID="Super"; +class Stage1 { + texture="z\ace\addons\atragmx\data\tdsrecon_nohq.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + 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[]={0,9,0}; + up[]={4.5,0,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage3 { + texture="#(argb,8,8,3)color(0,0,0,0)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,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,0}; + pos[]={0,0,0}; + }; +}; +class Stage5 { + texture="#(argb,8,8,3)color(1,1,1,1,SMDI)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage6 { + texture="#(ai,64,64,1)fresnel(1.5,1.22)"; + uvSource="none"; +}; +class Stage7 { + texture="a3\data_f\env_land_co.paa"; + uvSource="none"; +}; diff --git a/addons/atragmx/data/tdsrecon_co.paa b/addons/atragmx/data/tdsrecon_co.paa new file mode 100644 index 0000000000..0938d580de Binary files /dev/null and b/addons/atragmx/data/tdsrecon_co.paa differ diff --git a/addons/atragmx/data/tdsrecon_nohq.paa b/addons/atragmx/data/tdsrecon_nohq.paa new file mode 100644 index 0000000000..89744d13af Binary files /dev/null and b/addons/atragmx/data/tdsrecon_nohq.paa differ diff --git a/addons/atragmx/functions/fnc_add_new_gun.sqf b/addons/atragmx/functions/fnc_add_new_gun.sqf new file mode 100644 index 0000000000..bac04c2e07 --- /dev/null +++ b/addons/atragmx/functions/fnc_add_new_gun.sqf @@ -0,0 +1,29 @@ +/* + * Author: Ruthberg + * Adds a new (default) gun profile to the profileNamespace + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_add_new_gun + * + * Public: No + */ +#include "script_component.hpp" + +private ["_gunName", "_gunProfileEntry"]; + +_gunName = ctrlText 11001; +if (_gunName != "") then { + _gunProfileEntry = [_gunName, 850, 500, 0.280, -0.0010000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 9.460, "", "", 0.393, 1, "ICAO"]; + + GVAR(gunList) = GVAR(gunList) + [_gunProfileEntry]; + + lbAdd [6000, _gunProfileEntry select 0]; + + profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)]; +}; diff --git a/addons/atragmx/functions/fnc_calculate_range_card.sqf b/addons/atragmx/functions/fnc_calculate_range_card.sqf new file mode 100644 index 0000000000..05625a53f6 --- /dev/null +++ b/addons/atragmx/functions/fnc_calculate_range_card.sqf @@ -0,0 +1,62 @@ +/* + * Author: Ruthberg + * Calculates the range card output based on the current data set + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_calculate_range_card + * + * Public: No + */ +#include "script_component.hpp" + +[] call FUNC(parse_input); + +private ["_scopeBaseAngle"]; +_scopeBaseAngle = ((GVAR(workingMemory) select GVAR(currentTarget)) select 3); + +private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel"]; +_bulletMass = (GVAR(workingMemory) select GVAR(currentTarget)) select 12; +_boreHeight = (GVAR(workingMemory) select GVAR(currentTarget)) select 5; +_airFriction = (GVAR(workingMemory) select GVAR(currentTarget)) select 4; +_muzzleVelocity = (GVAR(workingMemory) select GVAR(currentTarget)) select 1; +_bc = (GVAR(workingMemory) select GVAR(currentTarget)) select 15; +_dragModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 16; +_atmosphereModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 17; + +private ["_temperature", "_barometricPressure", "_relativeHumidity"]; +_temperature = (GVAR(temperature) select GVAR(currentTarget)); +_barometricPressure = (GVAR(barometricPressure) select GVAR(currentTarget)); +_relativeHumidity = (GVAR(relativeHumidity) select GVAR(currentTarget)); +if (GVAR(currentUnit) == 1) then +{ + _temperature = (_temperature - 32) / 1.8; + _barometricPressure = _barometricPressure * 33.8638866667; +}; + +private ["_windSpeed", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange"]; +_windSpeed = (GVAR(windSpeed) select GVAR(currentTarget)); +_windDirection = (GVAR(windDirection) select GVAR(currentTarget)); +_inclinationAngle = (GVAR(inclinationAngle) select GVAR(currentTarget)); +_targetSpeed = (GVAR(targetSpeed) select GVAR(currentTarget)); +_targetRange = GVAR(rangeCardEndRange); +if (GVAR(currentUnit) != 2) then +{ + _targetRange = _targetRange / 1.0936133; +}; +if (GVAR(currentUnit) == 1) then +{ + _windSpeed = _windSpeed / 2.23693629; + _targetSpeed = _targetSpeed / 2.23693629; +}; + +GVAR(rangeCardData) = []; + +private ["_result"]; +_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, + _windSpeed, _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, true] call FUNC(calculate_solution); diff --git a/addons/atragmx/functions/fnc_calculate_scope_base_angle.sqf b/addons/atragmx/functions/fnc_calculate_scope_base_angle.sqf new file mode 100644 index 0000000000..4822b08b37 --- /dev/null +++ b/addons/atragmx/functions/fnc_calculate_scope_base_angle.sqf @@ -0,0 +1,39 @@ +/* + * Author: Ruthberg + * Calculates a new scope base angle + * + * Arguments: + * 0: Bullet mass + * 1: Bore height + * 2: air friction + * 3: muzzle velocity + * 4: zero range + * + * Return Value: + * scope base angle + * + * Example: + * call ace_atragmx_calculate_scope_base_angle + * + * Public: No + */ +#include "script_component.hpp" + +private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_zeroRange"]; +_bulletMass = _this select 0; +_boreHeight = _this select 1; +_airFriction = _this select 2; +_muzzleVelocity = _this select 3; +_zeroRange = _this select 4; + +private ["_scopeBaseAngle"]; +_scopeBaseAngle = 0; + +private ["_temperature", "_barometricPressure", "_relativeHumidity"]; +_temperature = 15; +_barometricPressure = 1013.25; +_relativeHumidity = 0; + +_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, 0, 0, 0, 0, _zeroRange, _airFriction, 1, "ICAO", false] call FUNC(calculate_solution); + +_scopeBaseAngle + (_result select 0) / 60 diff --git a/addons/atragmx/functions/fnc_calculate_solution.sqf b/addons/atragmx/functions/fnc_calculate_solution.sqf new file mode 100644 index 0000000000..90263a608c --- /dev/null +++ b/addons/atragmx/functions/fnc_calculate_solution.sqf @@ -0,0 +1,157 @@ +/* + * Author: Ruthberg + * Calculates the fireing solution + * + * 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? + * + * Return Value: + * 0: Elevation + * 1: Windage + * 2: Lead + * 3: Time of fligth + * 4: Remaining velocity + * 4: Remaining kinetic energy + * + * Example: + * call ace_atragmx_calculate_target_range_assist + * + * Public: No + */ +#include "script_component.hpp" + +private ["_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_bc", "_dragModel", "_atmosphereModel", "_storeRangeCardData"]; +_scopeBaseAngle = _this select 0; +_bulletMass = _this select 1; +_boreHeight = _this select 2; +_airFriction = _this select 3; +_muzzleVelocity = _this select 4; +_temperature = _this select 5; +_barometricPressure = _this select 6; +_relativeHumidity = _this select 7; +_simSteps = _this select 8; +_windSpeed = _this select 9; +_windDirection = _this select 10; +_inclinationAngle = _this select 11; +_targetSpeed = _this select 12; +_targetRange = _this select 13; +_bc = _this select 14; +_dragModel = _this select 15; +_atmosphereModel = _this select 16; +_storeRangeCardData = _this select 17; + +private ["_bulletPos", "_bulletVelocity", "_bulletAccel", "_bulletSpeed", "_gravity", "_deltaT"]; +_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; + +private ["_elevation", "_windage", "_lead", "_TOF", "_trueVelocity", "_trueSpeed", "_kineticEnergy"]; +_elevation = 0; +_windage = 0; +_lead = 0; +_TOF = 0; +_trueVelocity = [0, 0, 0]; +_trueSpeed = 0; + +private ["_n", "_range", "_rangeFactor"]; +_n = 0; +_range = 0; +_rangeFactor = 1; +if (_storeRangeCardData) then { + if (GVAR(currentUnit) != 2) then { + _rangeFactor = 1.0936133; + }; + GVAR(rangeCardData) = []; +}; + +private ["_wind"]; +_wind = [cos(270 - _windDirection * 30) * _windSpeed, sin(270 - _windDirection * 30) * _windSpeed, 0]; +if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then { + _bc = [_bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel] call EFUNC(advanced_ballistics,calculateAtmosphericCorrection); +}; + +_TOF = 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 < 15 && (_bulletPos select 1) < _targetRange} do { + _bulletSpeed = vectorMagnitude _bulletVelocity; + + _trueVelocity = _bulletVelocity vectorDiff _wind; + _trueSpeed = vectorMagnitude _trueVelocity; + + if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { + if (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false]) then { + private ["_drag"]; + _drag = -1 * ([_dragModel, _bc, _trueSpeed] call EFUNC(advanced_ballistics,calculateRetardation)); + _bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (_drag); + }; + } else { + _bulletAccel = _trueVelocity vectorMultiply (_trueSpeed * _airFriction); + }; + + _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) * _rangeFactor >= _range && _range <= GVAR(rangeCardEndRange)) then { + if ((_bulletPos select 1) > 0) then { + _elevation = - atan((_bulletPos select 2) / (_bulletPos select 1)); + _windage = - atan((_bulletPos select 0) / (_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; + + GVAR(rangeCardData) set [_n, [_range, _elevation * 60, _windage * 60, _lead, _TOF, _bulletSpeed, _kineticEnergy]]; + _n = _n + 1; + }; + }; +}; + +if ((_bulletPos select 1) > 0) then { + _elevation = - atan((_bulletPos select 2) / (_bulletPos select 1)); + _windage = - atan((_bulletPos select 0) / (_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, _windage * 60, _lead, _TOF, _bulletSpeed, _kineticEnergy] diff --git a/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf b/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf new file mode 100644 index 0000000000..6280f19339 --- /dev/null +++ b/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf @@ -0,0 +1,97 @@ +/* + * Author: Ruthberg + * Calculates the target range and updates the output fields + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_calculate_target_range_assist + * + * Public: No + */ +#include "script_component.hpp" + +private ["_targetSize", "_imageSize", "_angle", "_estRange"]; + +_angle = parseNumber(ctrlText 7012); +_targetSize = parseNumber(ctrlText 7010); +if (GVAR(rangeAssistUseTargetHeight)) then { + _targetSize = _targetSize * cos(_angle); +}; +switch (GVAR(rangeAssistTargetSizeUnit)) do { + case 0: { + _targetSize = _targetSize * 0.0254; + }; + case 1: { + _targetSize = _targetSize * 0.3048; + }; + case 2: { + _targetSize = _targetSize * 0.01; + }; +}; +_imageSize = parseNumber(ctrlText 7011); +switch (GVAR(rangeAssistImageSizeUnit)) do { + case 0: { + _imageSize = _imageSize / 6400 * 360; + }; + case 1: { + _imageSize = _imageSize / 60; + }; + case 2: { + _imageSize = _imageSize / 60 / 1.047; + }; +}; +_estRange = parseNumber(ctrlText 7013); +if (GVAR(currentUnit) != 2) then { + _estRange = _estRange / 1.0936133; +}; + +switch (_this) do { + case 0: { + _targetSize = tan(_imageSize) * _estRange; + + if (GVAR(rangeAssistUseTargetHeight)) then { + _targetSize = _targetSize / cos(_angle); + }; + + switch (GVAR(rangeAssistTargetSizeUnit)) do { + case 0: { + _targetSize = _targetSize / 0.0254; + }; + case 1: { + _targetSize = _targetSize / 0.3048; + }; + case 2: { + _targetSize = _targetSize / 0.01; + }; + }; + + ctrlSetText [7010, Str(Round(_targetSize * 100) / 100)]; + }; + case 1: { + _imageSize = atan(_targetSize / _estRange); + + switch (GVAR(rangeAssistImageSizeUnit)) do { + case 0: { + _imageSize = _imageSize * 6400 / 360; + }; + case 1: { + _imageSize = _imageSize * 60; + }; + case 2: { + _imageSize = _imageSize * 60 * 1.047; + }; + }; + + ctrlSetText [7011, Str(Round(_imageSize * 100) / 100)]; + }; + case 2: { + _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 new file mode 100644 index 0000000000..57783d9cca --- /dev/null +++ b/addons/atragmx/functions/fnc_calculate_target_solution.sqf @@ -0,0 +1,67 @@ +/* + * Author: Ruthberg + * Calculates the fireing solution and updates the result input/output fields + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_calculate_target_solution + * + * Public: No + */ +#include "script_component.hpp" + +[] call FUNC(parse_input); + +private ["_scopeBaseAngle"]; +_scopeBaseAngle = ((GVAR(workingMemory) select GVAR(currentTarget)) select 3); + +private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel"]; +_bulletMass = (GVAR(workingMemory) select GVAR(currentTarget)) select 12; +_boreHeight = (GVAR(workingMemory) select GVAR(currentTarget)) select 5; +_airFriction = (GVAR(workingMemory) select GVAR(currentTarget)) select 4; +_muzzleVelocity = (GVAR(workingMemory) select GVAR(currentTarget)) select 1; +_bc = (GVAR(workingMemory) select GVAR(currentTarget)) select 15; +_dragModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 16; +_atmosphereModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 17; + +private ["_temperature", "_barometricPressure", "_relativeHumidity"]; +_temperature = (GVAR(temperature) select GVAR(currentTarget)); +_barometricPressure = (GVAR(barometricPressure) select GVAR(currentTarget)); +_relativeHumidity = (GVAR(relativeHumidity) select GVAR(currentTarget)); +if (GVAR(currentUnit) == 1) then +{ + _temperature = (_temperature - 32) / 1.8; + _barometricPressure = _barometricPressure * 33.8638866667; +}; + +private ["_windSpeed", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange"]; +_windSpeed = (GVAR(windSpeed) select GVAR(currentTarget)); +_windDirection = (GVAR(windDirection) select GVAR(currentTarget)); +_inclinationAngle = (GVAR(inclinationAngle) select GVAR(currentTarget)); +_targetSpeed = (GVAR(targetSpeed) select GVAR(currentTarget)); +_targetRange = (GVAR(targetRange) select GVAR(currentTarget)); +if (GVAR(currentUnit) != 2) then +{ + _targetRange = _targetRange / 1.0936133; +}; +if (GVAR(currentUnit) == 1) then +{ + _windSpeed = _windSpeed / 2.23693629; + _targetSpeed = _targetSpeed / 2.23693629; +}; + +_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, + _windSpeed, _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, false] call FUNC(calculate_solution); + +GVAR(elevationOutput) set [GVAR(currentTarget), _result select 0]; +GVAR(windageOutput) set [GVAR(currentTarget), _result 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]; + +[] 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 new file mode 100644 index 0000000000..7ee7e9ff78 --- /dev/null +++ b/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf @@ -0,0 +1,56 @@ +/* + * Author: Ruthberg + * Calculates the target speed and updates the output fields + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_calculate_target_speed_assist + * + * Public: No + */ +#include "script_component.hpp" + +private ["_targetRange", "_numTicks", "_timeSecs", "_estSpeed"]; + +_targetRange = parseNumber(ctrlText 8004); +_numTicks = parseNumber(ctrlText 8005); +_timeSecs = parseNumber(ctrlText 8006); +_estSpeed = 0; + +if (GVAR(currentUnit) != 2) then +{ + _targetRange = _targetRange / 1.0936133; +}; + +switch (GVAR(rangeAssistImageSizeUnit)) do +{ + case 0: + { + _numTicks = _numTicks / 6400 * 360; + }; + case 1: + { + _numTicks = _numTicks / 60; + }; + case 2: + { + _numTicks = _numTicks / 60 / 1.047; + }; +}; + +if (_timeSecs > 0) then +{ + _estSpeed = tan(_numTicks) * _targetRange / _timeSecs; +}; + +if (GVAR(currentUnit) == 1) then +{ + _estSpeed = _estSpeed * 2.23693629; +}; + +ctrlSetText [8007, Str(Round(_estSpeed * 10) / 10)]; diff --git a/addons/atragmx/functions/fnc_can_show.sqf b/addons/atragmx/functions/fnc_can_show.sqf new file mode 100644 index 0000000000..7054e85cf9 --- /dev/null +++ b/addons/atragmx/functions/fnc_can_show.sqf @@ -0,0 +1,18 @@ +/* + * Authors: Ruthberg + * Tests if the ATragMX dialog can be shown + * + * Arguments: + * Nothing + * + * Return Value: + * can_show + * + * Example: + * call ace_atragmx_fnc_can_show + * + * Public: No + */ +#include "script_component.hpp" + +(("ACE_ATragMX" in (uniformItems ACE_player)) || ("ACE_ATragMX" in (vestItems ACE_player))) && !(underwater ACE_player); diff --git a/addons/atragmx/functions/fnc_change_gun.sqf b/addons/atragmx/functions/fnc_change_gun.sqf new file mode 100644 index 0000000000..259441d51d --- /dev/null +++ b/addons/atragmx/functions/fnc_change_gun.sqf @@ -0,0 +1,38 @@ +/* + * Author: Ruthberg + * Selects a new gun profile and updates the gun column and the result input/output fields + * + * Arguments: + * gunID + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_change_gun + * + * Public: No + */ +#include "script_component.hpp" + +if (_this < 0 || _this > (count GVAR(gunList)) - 1) exitWith {}; + +GVAR(workingMemory) set [GVAR(currentTarget), +(GVAR(gunList) select _this)]; +GVAR(currentGun) set [GVAR(currentTarget), _this]; + +lbSetCurSel [6000, (GVAR(currentGun) select GVAR(currentTarget))]; + +if ((GVAR(scopeUnits) select (GVAR(currentScopeUnit) select GVAR(currentTarget))) != "Clicks") then +{ + GVAR(currentScopeUnit) set [GVAR(currentTarget), (GVAR(workingMemory) select GVAR(currentTarget)) select 6]; +}; + +[] call FUNC(update_gun); + +GVAR(elevationOutput) set [GVAR(currentTarget), 0]; +GVAR(windageOutput) set [GVAR(currentTarget), 0]; +GVAR(leadOutput) set [GVAR(currentTarget), 0]; +GVAR(tofOutput) set [GVAR(currentTarget), 0]; +GVAR(velocityOutput) set [GVAR(currentTarget), 0]; + +[] call FUNC(update_result); diff --git a/addons/atragmx/functions/fnc_create_dialog.sqf b/addons/atragmx/functions/fnc_create_dialog.sqf new file mode 100644 index 0000000000..01cdcba184 --- /dev/null +++ b/addons/atragmx/functions/fnc_create_dialog.sqf @@ -0,0 +1,40 @@ +/* + * Author: Ruthberg + * Creates the ATragMX dialog + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_create_dialog + * + * Public: No + */ +#include "script_component.hpp" + +//if (dialog) exitWith { false }; +if (underwater ACE_player) exitWith { false }; +if (!("ACE_ATragMX" in (uniformItems ACE_player)) && !("ACE_ATragMX" in (vestItems ACE_player))) exitWith { false }; + +createDialog 'ATragMX_Display'; + +call FUNC(update_target_selection); + +true call FUNC(show_main_page); + +false call FUNC(show_add_new_gun); +false call FUNC(show_gun_list); +false call FUNC(show_range_card); +false call FUNC(show_range_card_setup); +false call FUNC(show_target_range_assist); +false call FUNC(show_target_speed_assist); +false call FUNC(show_target_speed_assist_timer); + +{ + lbAdd [6000, _x select 0]; +} forEach GVAR(gunList); + +true diff --git a/addons/atragmx/functions/fnc_cycle_range_card_columns.sqf b/addons/atragmx/functions/fnc_cycle_range_card_columns.sqf new file mode 100644 index 0000000000..9de1baee61 --- /dev/null +++ b/addons/atragmx/functions/fnc_cycle_range_card_columns.sqf @@ -0,0 +1,22 @@ +/* + * Author: Ruthberg + * Cycles through the range card columns + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_cycle_range_card_columns + * + * Public: No + */ +#include "script_component.hpp" + +GVAR(rangeCardCurrentColumn) = (GVAR(rangeCardCurrentColumn) + 1) % (count GVAR(rangeCardLastColumns)); + +ctrlSetText [5006, (GVAR(rangeCardLastColumns) select GVAR(rangeCardCurrentColumn))]; + +[] call FUNC(update_range_card); diff --git a/addons/atragmx/functions/fnc_cycle_scope_unit.sqf b/addons/atragmx/functions/fnc_cycle_scope_unit.sqf new file mode 100644 index 0000000000..99704220d4 --- /dev/null +++ b/addons/atragmx/functions/fnc_cycle_scope_unit.sqf @@ -0,0 +1,23 @@ +/* + * Author: Ruthberg + * Cycles through the scope units + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_cycle_scope_unit + * + * Public: No + */ +#include "script_component.hpp" + +[] call FUNC(parse_input); + +GVAR(currentScopeUnit) set [GVAR(currentTarget), ((GVAR(currentScopeUnit) select GVAR(currentTarget)) + 1) % (count GVAR(scopeUnits))]; + +[] call FUNC(update_scope_unit); +[] call FUNC(update_result); diff --git a/addons/atragmx/functions/fnc_delete_gun.sqf b/addons/atragmx/functions/fnc_delete_gun.sqf new file mode 100644 index 0000000000..d16e1f84a0 --- /dev/null +++ b/addons/atragmx/functions/fnc_delete_gun.sqf @@ -0,0 +1,34 @@ +/* + * Author: Ruthberg + * Deletes the currently selected gun profile from the profileNamespace + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_delete_gun + * + * Public: No + */ +#include "script_component.hpp" + +private ["_index"]; +_index = lbCurSel 6000; + +if (_index == -1) exitWith {}; + +for "_i" from 0 to (count GVAR(currentGun)) - 1 do { + if ((GVAR(currentGun) select _i) > _index) then { + GVAR(currentGun) set [_i, (GVAR(currentGun) select _i) - 1]; + }; +}; + +GVAR(gunList) set [_index, 0]; +GVAR(gunList) = GVAR(gunList) - [0]; + +lbDelete [6000, _index]; + +profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)]; diff --git a/addons/atragmx/functions/fnc_init.sqf b/addons/atragmx/functions/fnc_init.sqf new file mode 100644 index 0000000000..3f46a71fe2 --- /dev/null +++ b/addons/atragmx/functions/fnc_init.sqf @@ -0,0 +1,58 @@ +/* + * Author: Ruthberg + * Inits all global variables with the default values + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_init + * + * Public: No + */ +#include "script_component.hpp" + +GVAR(workingMemory) = [+(GVAR(gunList) select 0), +(GVAR(gunList) select 0), +(GVAR(gunList) select 0), +(GVAR(gunList) select 0)]; + +GVAR(scopeUnits) = ["MILs", "TMOA", "SMOA", "Clicks"]; + +GVAR(rangeCardStartRange) = 200; +GVAR(rangeCardEndRange) = 2000; +GVAR(rangeCardIncrement) = 50; +GVAR(rangeCardLastColumns) = ["Lead", "RemV", "RemE", "TmFlt"]; +GVAR(rangeCardCurrentColumn) = 3; +GVAR(rangeCardData) = []; + +GVAR(GVAR(rangeAssistTargetSizeUnit)s) = ["in", "ft", "cm", "m"]; +GVAR(rangeAssistTargetSizeUnit) = 2; +GVAR(rangeAssistImageSizeUnits) = ["MIL", "TMOA", "IOA"]; +GVAR(rangeAssistImageSizeUnit) = 0; +GVAR(rangeAssistUseTargetHeight) = true; + +GVAR(speedAssistNumTicksUnits) = ["MIL", "TMOA", "IOA"]; +GVAR(speedAssistNumTicksUnit) = 0; +GVAR(speedAssistTimer) = true; + +GVAR(currentUnit) = 2; +GVAR(currentGun) = [0, 0, 0, 0]; +GVAR(currentTarget) = 0; +GVAR(currentScopeUnit) = [0, 0, 0, 0]; + +GVAR(temperature) = [15, 15, 15, 15]; +GVAR(barometricPressure) = [1013.25, 1013.25, 1013.25, 1013.25]; +GVAR(relativeHumidity) = [0.5, 0.5, 0.5, 0.5]; + +GVAR(windSpeed) = [0, 0, 0, 0]; +GVAR(windDirection) = [12, 12, 12, 12]; +GVAR(inclinationAngle) = [0, 0, 0, 0]; +GVAR(targetSpeed) = [0, 0, 0, 0]; +GVAR(targetRange) = [0, 0, 0, 0]; + +GVAR(elevationOutput) = [0, 0, 0, 0]; +GVAR(windageOutput) = [0, 0, 0, 0]; +GVAR(leadOutput) = [0, 0, 0, 0]; +GVAR(tofOutput) = [0, 0, 0, 0]; +GVAR(velocityOutput) = [0, 0, 0, 0]; diff --git a/addons/atragmx/functions/fnc_parse_input.sqf b/addons/atragmx/functions/fnc_parse_input.sqf new file mode 100644 index 0000000000..4a525dcad8 --- /dev/null +++ b/addons/atragmx/functions/fnc_parse_input.sqf @@ -0,0 +1,89 @@ +/* + * Author: Ruthberg + * Parses all input fields in the gun, atmosphere and target column and the result input fields + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_parse_input + * + * Public: No + */ +#include "script_component.hpp" + +GVAR(temperature) set [GVAR(currentTarget), parseNumber(ctrlText 200)]; +GVAR(barometricPressure) set [GVAR(currentTarget), 0 max parseNumber(ctrlText 210)]; +GVAR(relativeHumidity) set [GVAR(currentTarget), (0 max parseNumber(ctrlText 220) min 100) / 100]; + +GVAR(windSpeed) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 300)) min 50]; +GVAR(windDirection) set [GVAR(currentTarget), 1 max Round(parseNumber(ctrlText 310)) min 12]; +GVAR(inclinationAngle) set [GVAR(currentTarget), -60 max parseNumber(ctrlText 320) min 60]; +GVAR(targetSpeed) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 330)) min 50]; +GVAR(targetRange) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 340)) min 4000]; + +private ["_boreHeight", "_bulletMass", "_airFriction", "_muzzleVelocity"]; +_boreHeight = parseNumber(ctrlText 100); +_bulletMass = parseNumber(ctrlText 110); +if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then { + _airFriction = 0.1 max parseNumber(ctrlText 120) min 2; +} else { + _airFriction = parseNumber(ctrlText 120) / -1000; +}; +_muzzleVelocity = parseNumber(ctrlText 130); +if (GVAR(currentUnit) == 1) then +{ + _boreHeight = _boreHeight * 2.54; + _bulletMass = _bulletMass * 0.06479891; + _muzzleVelocity = _muzzleVelocity / 3.2808399; +}; +_boreHeight = 0.1 max _boreHeight min 10; +_bulletMass = 1 max _bulletMass min 100; +_muzzleVelocity = 100 max _muzzleVelocity min 1400; + +(GVAR(workingMemory) select GVAR(currentTarget)) set [5, _boreHeight]; +(GVAR(workingMemory) select GVAR(currentTarget)) set [12, _bulletMass]; +if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then { + (GVAR(workingMemory) select GVAR(currentTarget)) set [15, _airFriction]; +} else { + (GVAR(workingMemory) select GVAR(currentTarget)) set [4, _airFriction]; +}; +(GVAR(workingMemory) select GVAR(currentTarget)) set [1, _muzzleVelocity]; + +private ["_elevationCur", "_elevationCur", "_elevationScopeStep", "_windageScopeStep"]; +_elevationCur = parseNumber(ctrlText 402); +_windageCur = parseNumber(ctrlText 412); + +switch ((GVAR(currentScopeUnit) select GVAR(currentTarget))) do +{ + case 0: + { + _elevationCur = _elevationCur * 3.38; + _windageCur = _windageCur * 3.38; + }; + + case 2: + { + _elevationCur = _elevationCur / 1.047; + _windageCur = _windageCur / 1.047; + }; + + case 3: + { + _elevationScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 7); + _windageScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 8); + + _elevationCur = _elevationCur * _elevationScopeStep; + _windageCur = _windageCur * _windageScopeStep; + }; +}; + +(GVAR(workingMemory) select GVAR(currentTarget)) set [10, _elevationCur]; +(GVAR(workingMemory) select GVAR(currentTarget)) set [11, _windageCur]; + +[] call FUNC(update_gun); +[] call FUNC(update_atmosphere); +[] call FUNC(update_target); diff --git a/addons/atragmx/functions/fnc_reset_relative_click_memory.sqf b/addons/atragmx/functions/fnc_reset_relative_click_memory.sqf new file mode 100644 index 0000000000..1a20af7452 --- /dev/null +++ b/addons/atragmx/functions/fnc_reset_relative_click_memory.sqf @@ -0,0 +1,21 @@ +/* + * Author: Ruthberg + * Resets the relative click memory and updates the result input/output fields + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_reset_relative_click_memory + * + * Public: No + */ +#include "script_component.hpp" + +(GVAR(workingMemory) select GVAR(currentTarget)) set [10, 0]; +(GVAR(workingMemory) select GVAR(currentTarget)) set [11, 0]; + +[] call FUNC(update_result); diff --git a/addons/atragmx/functions/fnc_save_gun.sqf b/addons/atragmx/functions/fnc_save_gun.sqf new file mode 100644 index 0000000000..d797939991 --- /dev/null +++ b/addons/atragmx/functions/fnc_save_gun.sqf @@ -0,0 +1,28 @@ +/* + * Author: Ruthberg + * Saves the currently select gun profile into the profileNamespace + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_save_gun + * + * Public: No + */ +#include "script_component.hpp" + +private ["_index"]; +_index = 0 max (lbCurSel 6000); + +GVAR(gunList) set [_index, +(GVAR(workingMemory) select GVAR(currentTarget))]; + +lbClear 6000; +{ + lbAdd [6000, _x select 0]; +} forEach GVAR(gunList); + +profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)]; diff --git a/addons/atragmx/functions/fnc_show_add_new_gun.sqf b/addons/atragmx/functions/fnc_show_add_new_gun.sqf new file mode 100644 index 0000000000..12815194dd --- /dev/null +++ b/addons/atragmx/functions/fnc_show_add_new_gun.sqf @@ -0,0 +1,18 @@ +/* + * Author: Ruthberg + * Shows/Hides add new gun controls + * + * Arguments: + * visible - + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_show_add_new_gun + * + * Public: No + */ +#include "script_component.hpp" + +{ctrlShow [_x, _this]} forEach [11000, 11001, 11002, 11003]; \ No newline at end of file diff --git a/addons/atragmx/functions/fnc_show_gun_list.sqf b/addons/atragmx/functions/fnc_show_gun_list.sqf new file mode 100644 index 0000000000..c34784e27a --- /dev/null +++ b/addons/atragmx/functions/fnc_show_gun_list.sqf @@ -0,0 +1,18 @@ +/* + * Author: Ruthberg + * Shows/Hides the gun list controls + * + * Arguments: + * visible - + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_show_gun_list + * + * Public: No + */ +#include "script_component.hpp" + +{ctrlShow [_x, _this]} forEach [6000, 6001, 6002, 6003, 6004, 6005, 6006, 6007]; \ No newline at end of file diff --git a/addons/atragmx/functions/fnc_show_main_page.sqf b/addons/atragmx/functions/fnc_show_main_page.sqf new file mode 100644 index 0000000000..5eaf5eb560 --- /dev/null +++ b/addons/atragmx/functions/fnc_show_main_page.sqf @@ -0,0 +1,19 @@ +/* + * Author: Ruthberg + * Shows/Hides the main menu controls + * + * Arguments: + * visible - + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_show_main_page + * + * Public: No + */ +#include "script_component.hpp" + +{ctrlShow [_x, _this]} forEach [10, 100, 11, 110, 12, 120, 13, 130, 14, 140, 20, 200, 21, 210, 22, 220, 30, 300, 31, 310, 32, 320, 33, 330, 34, 340, 40, 400, 401, 402, 403, 41, 410, 411, 412, 42, 420, + 500, 501, 502, 503, 600, 601, 602, 603, 1000, 2000, 3000, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008]; diff --git a/addons/atragmx/functions/fnc_show_range_card.sqf b/addons/atragmx/functions/fnc_show_range_card.sqf new file mode 100644 index 0000000000..655630f6c5 --- /dev/null +++ b/addons/atragmx/functions/fnc_show_range_card.sqf @@ -0,0 +1,18 @@ +/* + * Author: Ruthberg + * Shows/Hides the range card controls + * + * Arguments: + * visible - + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_show_range_card + * + * Public: No + */ +#include "script_component.hpp" + +{ctrlShow [_x, _this]} forEach [5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007]; diff --git a/addons/atragmx/functions/fnc_show_range_card_setup.sqf b/addons/atragmx/functions/fnc_show_range_card_setup.sqf new file mode 100644 index 0000000000..3ed8cb5184 --- /dev/null +++ b/addons/atragmx/functions/fnc_show_range_card_setup.sqf @@ -0,0 +1,18 @@ +/* + * Author: Ruthberg + * Shows/Hides the range card setup controls + * + * Arguments: + * visible - + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_show_range_card_setup + * + * Public: No + */ +#include "script_component.hpp" + +{ctrlShow [_x, _this]} forEach [10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009]; diff --git a/addons/atragmx/functions/fnc_show_target_range_assist.sqf b/addons/atragmx/functions/fnc_show_target_range_assist.sqf new file mode 100644 index 0000000000..964e5f93d0 --- /dev/null +++ b/addons/atragmx/functions/fnc_show_target_range_assist.sqf @@ -0,0 +1,18 @@ +/* + * Author: Ruthberg + * Shows/Hides the target range assist controls + * + * Arguments: + * visible - + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_show_target_range_assist + * + * Public: No + */ +#include "script_component.hpp" + +{ctrlShow [_x, _this]} forEach [7000, 7001, 7002, 7003, 7004, 7005, 7006, 7007, 7008, 7009, 7010, 7011, 7012, 7013, 7014, 7015, 7016, 7017, 7018, 7019, 7020]; diff --git a/addons/atragmx/functions/fnc_show_target_speed_assist.sqf b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf new file mode 100644 index 0000000000..ce1e8588b9 --- /dev/null +++ b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf @@ -0,0 +1,18 @@ +/* + * Author: Ruthberg + * Shows/Hides the target speed assist controls + * + * Arguments: + * visible - + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_show_target_speed_assist + * + * Public: No + */ +#include "script_component.hpp" + +{ctrlShow [_x, _this]} forEach [8000, 8001, 8002, 8003, 8004, 8005, 8006, 8007, 8008, 8009, 8010, 8011, 8012, 8013, 8014, 8015]; diff --git a/addons/atragmx/functions/fnc_show_target_speed_assist_timer.sqf b/addons/atragmx/functions/fnc_show_target_speed_assist_timer.sqf new file mode 100644 index 0000000000..5b809b7ca9 --- /dev/null +++ b/addons/atragmx/functions/fnc_show_target_speed_assist_timer.sqf @@ -0,0 +1,18 @@ +/* + * Author: Ruthberg + * Shows/Hides the target speed assist timer controls + * + * Arguments: + * visible - + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_show_target_speed_assist_timer + * + * Public: No + */ +#include "script_component.hpp" + +{ctrlShow [_x, _this]} forEach [9000, 9001, 9002]; diff --git a/addons/atragmx/functions/fnc_sord.sqf b/addons/atragmx/functions/fnc_sord.sqf new file mode 100644 index 0000000000..650993cff3 --- /dev/null +++ b/addons/atragmx/functions/fnc_sord.sqf @@ -0,0 +1,27 @@ +/* + * Author: Ruthberg + * Handles incoming data packets from the Vectronix Vector LRF + * + * Arguments: + * 0: Slope distance (Meters) + * 1: Azimuth (Degrees) + * 2: Inclination (Degrees) + * + * Return Value: + * Nothing + * + * Example: + * [1000, 45, 1] call ace_microdagr_fnc_recieveRangefinderData + * + * Public: No + */ +#include "script_component.hpp" + +private ["_slopeDistance", "_azimuth", "_inclination"]; +_slopeDistance = _this select 0; +_azimuth = _this select 1; +_inclination = _this select 2; + +//_inclination = asin((ACE_player weaponDirection currentWeapon ACE_player) select 2); +GVAR(inclinationAngle) set [GVAR(currentTarget), _inclination]; +GVAR(targetRange) set [GVAR(currentTarget), _slopeDistance]; diff --git a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf new file mode 100644 index 0000000000..90acd1a84f --- /dev/null +++ b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf @@ -0,0 +1,48 @@ +/* + * Author: Ruthberg + * Shows and starts the target speed assist timer + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_target_speed_assist_timer + * + * Public: No + */ +#include "script_component.hpp" + +#define _dsp (uiNamespace getVariable "ATragMX_Display") + +if !(ctrlVisible 9000) then { + + false call FUNC(show_target_speed_assist); + true call FUNC(show_target_speed_assist_timer); + + ctrlSetFocus (_dsp displayCtrl 9002); + + [{ + private ["_args", "_startTime"]; + _args = _this select 0; + _startTime = _args select 0; + + if (!(GVAR(speedAssistTimer))) exitWith { + GVAR(speedAssistTimer) = true; + + ctrlSetText [8006, Str(Round((time - _startTime) * 10) / 10)]; + + [] call FUNC(calculate_target_speed_assist); + + false call FUNC(show_target_speed_assist_timer); + true call FUNC(show_target_speed_assist); + + [_this select 1] call cba_fnc_removePerFrameHandler; + }; + + ctrlSetText [9001, Str(Round((time - _startTime) * 10) / 10)]; + + }, 0.1, [time]] call CBA_fnc_addPerFrameHandler; +}; diff --git a/addons/atragmx/functions/fnc_toggle_gun_list.sqf b/addons/atragmx/functions/fnc_toggle_gun_list.sqf new file mode 100644 index 0000000000..4e24e4cb77 --- /dev/null +++ b/addons/atragmx/functions/fnc_toggle_gun_list.sqf @@ -0,0 +1,36 @@ +/* + * Author: Ruthberg + * Toggles the gun list screen on/off + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_toggle_gun_list + * + * Public: No + */ +#include "script_component.hpp" + +#define _dsp (uiNamespace getVariable "ATragMX_Display") + +if (ctrlVisible 6000) then +{ + false call FUNC(show_gun_list); + true call FUNC(show_main_page); + + if (_this) then { + (lbCurSel 6000) call FUNC(change_gun); + }; +} else +{ + false call FUNC(show_main_page); + true call FUNC(show_gun_list); + + ctrlSetFocus (_dsp displayCtrl 6002); + + lbSetCurSel [6000, (GVAR(currentGun) select GVAR(currentTarget))]; +}; diff --git a/addons/atragmx/functions/fnc_toggle_range_card.sqf b/addons/atragmx/functions/fnc_toggle_range_card.sqf new file mode 100644 index 0000000000..6a5c386de7 --- /dev/null +++ b/addons/atragmx/functions/fnc_toggle_range_card.sqf @@ -0,0 +1,33 @@ +/* + * Author: Ruthberg + * Toggles the range card screen on/off + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_toggle_range_card + * + * Public: No + */ +#include "script_component.hpp" + +#define _dsp (uiNamespace getVariable "ATragMX_Display") + +if (ctrlVisible 5006) then +{ + false call FUNC(show_range_card); + true call FUNC(show_main_page); +} else +{ + false call FUNC(show_main_page); + true call FUNC(show_range_card); + + ctrlSetFocus (_dsp displayCtrl 5001); + + [] call FUNC(calculate_range_card); + [] call FUNC(update_range_card); +}; diff --git a/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf new file mode 100644 index 0000000000..28534c9dd9 --- /dev/null +++ b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf @@ -0,0 +1,44 @@ +/* + * Author: Ruthberg + * Toggles the range card setup screen on/off + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_toggle_range_card_setup + * + * Public: No + */ +#include "script_component.hpp" + +#define _dsp (uiNamespace getVariable "ATragMX_Display") + +if (ctrlVisible 10000) then +{ + false call FUNC(show_range_card_setup); + true call FUNC(show_range_card); + + if (_this == 1) then + { + GVAR(rangeCardStartRange) = 0 max Round(parseNumber(ctrlText 10003)) min 3000; + GVAR(rangeCardEndRange) = 0 max Round(parseNumber(ctrlText 10004)) min 3000; + GVAR(rangeCardIncrement) = 1 max Round(parseNumber(ctrlText 10005)) min 3000; + + [] call FUNC(calculate_range_card); + [] call FUNC(update_range_card); + }; +} else +{ + false call FUNC(show_range_card); + true call FUNC(show_range_card_setup); + + ctrlSetFocus (_dsp displayCtrl 10006); + + ctrlSetText [10003, Str(Round(GVAR(rangeCardStartRange)))]; + ctrlSetText [10004, Str(Round(GVAR(rangeCardEndRange)))]; + ctrlSetText [10005, Str(Round(GVAR(rangeCardIncrement)))]; +}; diff --git a/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf new file mode 100644 index 0000000000..352a6d0e1f --- /dev/null +++ b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf @@ -0,0 +1,47 @@ +/* + * Author: Ruthberg + * Toggles the target range assist screen on/off + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_toggle_target_range_assist + * + * Public: No + */ +#include "script_component.hpp" + +#define _dsp (uiNamespace getVariable "ATragMX_Display") + +if (ctrlVisible 7000) then +{ + false call FUNC(show_target_range_assist); + true call FUNC(show_main_page); + + if (_this == 1) then + { + ctrlSetText [320, Str(parseNumber(ctrlText 7012))]; + ctrlSetText [340, Str(parseNumber(ctrlText 7013))]; + }; +} else +{ + false call FUNC(show_main_page); + true call FUNC(show_target_range_assist); + + ctrlSetFocus (_dsp displayCtrl 7018); + + ctrlSetText [7012, Str(parseNumber(ctrlText 320))]; + ctrlSetText [7013, Str(parseNumber(ctrlText 340))]; + + if (GVAR(currentUnit) != 2) then + { + ctrlSetText [7016, "Yards"]; + } else + { + ctrlSetText [7016, "Meters"]; + }; +}; diff --git a/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf new file mode 100644 index 0000000000..0bda7ad019 --- /dev/null +++ b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf @@ -0,0 +1,54 @@ +/* + * Author: Ruthberg + * Toggles the target speed assist screen on/off + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_toggle_target_speed_assist + * + * Public: No + */ +#include "script_component.hpp" + +#define _dsp (uiNamespace getVariable "ATragMX_Display") + +if (ctrlVisible 8000) then +{ + false call FUNC(show_target_speed_assist); + true call FUNC(show_main_page); + + if (_this == 1) then + { + [] call FUNC(calculate_target_speed_assist); + ctrlSetText [330, Str(parseNumber(ctrlText 8007))]; + }; +} else +{ + false call FUNC(show_main_page); + true call FUNC(show_target_speed_assist); + + ctrlSetFocus (_dsp displayCtrl 8012); + + ctrlSetText [8004, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))]; + + if (GVAR(currentUnit) != 2) then + { + ctrlSetText [8008, "Yards"]; + } else + { + ctrlSetText [8008, "Meters"]; + }; + + if (GVAR(currentUnit) != 1) then + { + ctrlSetText [8011, "m/s"]; + } else + { + ctrlSetText [8011, "mph"]; + }; +}; diff --git a/addons/atragmx/functions/fnc_update_atmosphere.sqf b/addons/atragmx/functions/fnc_update_atmosphere.sqf new file mode 100644 index 0000000000..91f1831b04 --- /dev/null +++ b/addons/atragmx/functions/fnc_update_atmosphere.sqf @@ -0,0 +1,24 @@ +/* + * Author: Ruthberg + * Updates all atmosphere column input fields + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_update_atmosphere + * + * Public: No + */ +#include "script_component.hpp" + +ctrlSetText [200, Str(Round((GVAR(temperature) select GVAR(currentTarget)) * 10) / 10)]; +if (GVAR(currentUnit) == 1) then { + ctrlSetText [210, Str(Round((GVAR(barometricPressure) select GVAR(currentTarget)) * 100) / 100)]; +} else { + ctrlSetText [210, Str(Round(GVAR(barometricPressure) select GVAR(currentTarget)))]; +}; +ctrlSetText [220, Str(Round((GVAR(relativeHumidity) select GVAR(currentTarget)) * 100 * 10) / 10)]; diff --git a/addons/atragmx/functions/fnc_update_gun.sqf b/addons/atragmx/functions/fnc_update_gun.sqf new file mode 100644 index 0000000000..cd80e5f122 --- /dev/null +++ b/addons/atragmx/functions/fnc_update_gun.sqf @@ -0,0 +1,53 @@ +/* + * Author: Ruthberg + * Updates all gun column input fields + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_update_gun + * + * Public: No + */ +#include "script_component.hpp" + +ctrlSetText [1000, (GVAR(workingMemory) select GVAR(currentTarget)) select 0]; +if (GVAR(currentUnit) == 1) then +{ + ctrlSetText [ 100, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 5) / 2.54 * 100) / 100)]; +} else +{ + ctrlSetText [ 100, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 5) * 100) / 100)]; +}; +if (GVAR(currentUnit) == 1) then +{ + ctrlSetText [ 110, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 12) * 15.4323584))]; +} else +{ + ctrlSetText [ 110, Str(Round((GVAR(workingMemory) select GVAR(currentTarget)) select 12))]; +}; +if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then { + ctrlSetText [ 120, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 15) * 1000) / 1000)]; +} else { + ctrlSetText [ 120, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 4) * -1000 * 1000) / 1000)]; +}; +if (GVAR(currentUnit) == 1) then +{ + ctrlSetText [130, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 1) * 3.2808399))]; +} else +{ + ctrlSetText [130, Str(Round((GVAR(workingMemory) select GVAR(currentTarget)) select 1))]; +}; +if (GVAR(currentUnit) == 2) then +{ + ctrlSetText [140, Str(Round((GVAR(workingMemory) select GVAR(currentTarget)) select 2))]; +} else +{ + ctrlSetText [140, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 2) * 1.0936133))]; +}; + +[] call FUNC(update_scope_unit); diff --git a/addons/atragmx/functions/fnc_update_range_card.sqf b/addons/atragmx/functions/fnc_update_range_card.sqf new file mode 100644 index 0000000000..546c38d24c --- /dev/null +++ b/addons/atragmx/functions/fnc_update_range_card.sqf @@ -0,0 +1,104 @@ +/* + * Author: Ruthberg + * Updates the range card listbox content + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_update_range_card + * + * Public: No + */ +#include "script_component.hpp" + +private ["_range", "_elevation", "_windage", "_lead", "_TOF", "_velocity", "_kineticEnergy", "_rangeOutput", "_elevationOutput", "_windageOutput", "_lastColumnOutput"]; +_lastColumnOutput = ""; + +ctrlSetText [5006, (GVAR(rangeCardLastColumns) select GVAR(rangeCardCurrentColumn))]; + +if (GVAR(currentUnit) != 2) then +{ + ctrlSetText [5003, "Yards"]; +} else +{ + ctrlSetText [5003, "Meters"]; +}; + +lnbClear 5007; + +{ + _range = _x select 0; + _elevation = _x select 1; + _windage = _x select 2; + _lead = _x select 3; + _TOF = _x select 4; + _velocity = _x select 5; + _kineticEnergy = _x select 6; + + switch ((GVAR(currentScopeUnit) select GVAR(currentTarget))) do + { + case 0: + { + _elevation = _elevation / 3.38; + _windage = _windage / 3.38; + }; + + case 2: + { + _elevation = _elevation * 1.047; + _windage = _windage * 1.047; + }; + + case 3: + { + _elevationScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 7); + _windageScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 8); + + _elevation = Round(_elevation / _elevationScopeStep); + _windage = Round(_windage / _windageScopeStep); + }; + }; + + _elevationOutput = Str(Round(_elevation * 100) / 100); + _windageOutput = Str(Round(_windage * 100) / 100); + + _rangeOutput = Str(_range); + if (_velocity < 340.29) then + { + _rangeOutput = _rangeOutput + "*"; + }; + + if (GVAR(currentUnit) == 1) then + { + _velocity = _velocity * 3.2808399; + }; + + switch (GVAR(rangeCardCurrentColumn)) do + { + case 0: + { + _lastColumnOutput = Str(Round(_lead * 100) / 100); + }; + + case 1: + { + _lastColumnOutput = Str(Round(_velocity)); + }; + + case 2: + { + _lastColumnOutput = Str(Round(_kineticEnergy)); + }; + + case 3: + { + _lastColumnOutput = Str(Round(_TOF * 100) / 100); + } + }; + + lnbAddRow [5007, [_rangeOutput, _elevationOutput, _windageOutput, _lastColumnOutput]]; +} forEach GVAR(rangeCardData); diff --git a/addons/atragmx/functions/fnc_update_relative_click_memory.sqf b/addons/atragmx/functions/fnc_update_relative_click_memory.sqf new file mode 100644 index 0000000000..378124ad4f --- /dev/null +++ b/addons/atragmx/functions/fnc_update_relative_click_memory.sqf @@ -0,0 +1,21 @@ +/* + * Author: Ruthberg + * Updates the relative click memory + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_update_relative_click_memory + * + * Public: No + */ +#include "script_component.hpp" + +(GVAR(workingMemory) select GVAR(currentTarget)) set [10, (GVAR(elevationOutput) select GVAR(currentTarget))]; +(GVAR(workingMemory) select GVAR(currentTarget)) set [11, (GVAR(windageOutput) select GVAR(currentTarget))]; + +[] call FUNC(update_result); diff --git a/addons/atragmx/functions/fnc_update_result.sqf b/addons/atragmx/functions/fnc_update_result.sqf new file mode 100644 index 0000000000..11ff8a314e --- /dev/null +++ b/addons/atragmx/functions/fnc_update_result.sqf @@ -0,0 +1,80 @@ +/* + * Author: Ruthberg + * Updates the result input and output fields + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_update_result + * + * Public: No + */ +#include "script_component.hpp" + +private ["_elevationAbs", "_elevationRel", "_elevationCur", "_windageAbs", "_windageRel", "_windageCur", "_lead", "_elevationScopeStep", "_windageScopeStep"]; +_elevationAbs = (GVAR(elevationOutput) select GVAR(currentTarget)); +_windageAbs = (GVAR(windageOutput) select GVAR(currentTarget)); + +_elevationCur = (GVAR(workingMemory) select GVAR(currentTarget)) select 10; +_windageCur = (GVAR(workingMemory) select GVAR(currentTarget)) select 11; + +_elevationRel = _elevationAbs - _elevationCur; +_windageRel = _windageAbs - _windageCur; + +_lead = (GVAR(leadOutput) select GVAR(currentTarget)); + +switch ((GVAR(currentScopeUnit) select GVAR(currentTarget))) do +{ + case 0: + { + _elevationAbs = _elevationAbs / 3.38; + _windageAbs = _windageAbs / 3.38; + + _elevationRel = _elevationRel / 3.38; + _windageRel = _windageRel / 3.38; + + _elevationCur = _elevationCur / 3.38; + _windageCur = _windageCur / 3.38; + }; + + case 2: + { + _elevationAbs = _elevationAbs * 1.047; + _windageAbs = _windageAbs * 1.047; + + _elevationRel = _elevationRel * 1.047; + _windageRel = _windageRel * 1.047; + + _elevationCur = _elevationCur * 1.047; + _windageCur = _windageCur * 1.047; + }; + + case 3: + { + _elevationScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 7); + _windageScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 8); + + _elevationAbs = Round(_elevationAbs / _elevationScopeStep); + _windageAbs = Round(_windageAbs / _windageScopeStep); + + _elevationRel = Round(_elevationRel / _elevationScopeStep); + _windageRel = Round(_windageRel / _windageScopeStep); + + _elevationCur = Round(_elevationCur / _elevationScopeStep); + _windageCur = Round(_windageCur / _windageScopeStep); + }; +}; + +ctrlSetText [400, Str(Round(_elevationAbs * 100) / 100)]; +ctrlSetText [401, Str(Round(_elevationRel * 100) / 100)]; +ctrlSetText [402, Str(Round(_elevationCur * 100) / 100)]; + +ctrlSetText [410, Str(Round(_windageAbs * 100) / 100)]; +ctrlSetText [411, Str(Round(_windageRel * 100) / 100)]; +ctrlSetText [412, Str(Round(_windageCur * 100) / 100)]; + +ctrlSetText [420, Str(Round(_lead * 100) / 100)]; diff --git a/addons/atragmx/functions/fnc_update_scope_unit.sqf b/addons/atragmx/functions/fnc_update_scope_unit.sqf new file mode 100644 index 0000000000..2a4435c376 --- /dev/null +++ b/addons/atragmx/functions/fnc_update_scope_unit.sqf @@ -0,0 +1,19 @@ +/* + * Author: Ruthberg + * Updates the scope unit fields + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_update_scope_unit + * + * Public: No + */ +#include "script_component.hpp" + +ctrlSetText [2000, GVAR(scopeUnits) select (GVAR(currentScopeUnit) select GVAR(currentTarget))]; +ctrlSetText [5000, GVAR(scopeUnits) select (GVAR(currentScopeUnit) select GVAR(currentTarget))]; diff --git a/addons/atragmx/functions/fnc_update_target.sqf b/addons/atragmx/functions/fnc_update_target.sqf new file mode 100644 index 0000000000..18d7a72cd2 --- /dev/null +++ b/addons/atragmx/functions/fnc_update_target.sqf @@ -0,0 +1,37 @@ +/* + * Author: Ruthberg + * Updates all target column input fields + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_update_target + * + * Public: No + */ +#include "script_component.hpp" + +if (!isNil QGVAR(windSpeed)) then +{ + ctrlSetText [300, Str(Round((GVAR(windSpeed) select GVAR(currentTarget)) * 100) / 100)]; +}; +if (!isNil QGVAR(windDirection)) then +{ + ctrlSetText [310, Str(Round((GVAR(windDirection) select GVAR(currentTarget))))]; +}; +if (!isNil QGVAR(inclinationAngle)) then +{ + ctrlSetText [320, Str(Round((GVAR(inclinationAngle) select GVAR(currentTarget))))]; +}; +if (!isNil QGVAR(targetSpeed)) then +{ + ctrlSetText [330, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)]; +}; +if (!isNil QGVAR(targetRange)) then +{ + ctrlSetText [340, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))]; +}; diff --git a/addons/atragmx/functions/fnc_update_target_selection.sqf b/addons/atragmx/functions/fnc_update_target_selection.sqf new file mode 100644 index 0000000000..d48412def0 --- /dev/null +++ b/addons/atragmx/functions/fnc_update_target_selection.sqf @@ -0,0 +1,29 @@ +/* + * Author: Ruthberg + * Updates all input fields based on the currently selected target + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_update_target_selection + * + * Public: No + */ +#include "script_component.hpp" + +#define _dsp (uiNamespace getVariable "ATragMX_Display") + +(_dsp displayCtrl 500) ctrlEnable true; +(_dsp displayCtrl 501) ctrlEnable true; +(_dsp displayCtrl 502) ctrlEnable true; +(_dsp displayCtrl 503) ctrlEnable true; + +(_dsp displayCtrl 500 + GVAR(currentTarget)) ctrlEnable false; + +ctrlSetFocus (_dsp displayCtrl 3000); + +[] call FUNC(update_unit_selection); diff --git a/addons/atragmx/functions/fnc_update_unit_selection.sqf b/addons/atragmx/functions/fnc_update_unit_selection.sqf new file mode 100644 index 0000000000..dacc228032 --- /dev/null +++ b/addons/atragmx/functions/fnc_update_unit_selection.sqf @@ -0,0 +1,29 @@ +/* + * Author: Ruthberg + * Updates all input fields based on the currently selected unit + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_update_unit_selection + * + * Public: No + */ +#include "script_component.hpp" + +#define _dsp (uiNamespace getVariable "ATragMX_Display") + +(_dsp displayCtrl 600) ctrlEnable true; +(_dsp displayCtrl 601) ctrlEnable true; +(_dsp displayCtrl 602) ctrlEnable true; + +(_dsp displayCtrl 600 + GVAR(currentUnit)) ctrlEnable false; + +[] call FUNC(update_gun); +[] call FUNC(update_atmosphere); +[] call FUNC(update_target); +[] call FUNC(update_result); diff --git a/addons/atragmx/functions/fnc_update_zero_range.sqf b/addons/atragmx/functions/fnc_update_zero_range.sqf new file mode 100644 index 0000000000..15e65c38a6 --- /dev/null +++ b/addons/atragmx/functions/fnc_update_zero_range.sqf @@ -0,0 +1,55 @@ +/* + * Author: Ruthberg + * Updates the scope base angle based on the zero range input + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_atragmx_fnc_update_zero_range + * + * Public: No + */ +#include "script_component.hpp" + +private ["_scopeBaseAngle"]; +_scopeBaseAngle = ((GVAR(workingMemory) select GVAR(currentTarget)) select 3); + +private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel"]; +_bulletMass = (GVAR(workingMemory) select GVAR(currentTarget)) select 12; +_boreHeight = (GVAR(workingMemory) select GVAR(currentTarget)) select 5; +_airFriction = (GVAR(workingMemory) select GVAR(currentTarget)) select 4; +_muzzleVelocity = (GVAR(workingMemory) select GVAR(currentTarget)) select 1; +_bc = (GVAR(workingMemory) select GVAR(currentTarget)) select 15; +_dragModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 16; +_atmosphereModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 17; + +private ["_zeroRange"]; +_zeroRange = Round(parseNumber(ctrlText 140)); +if (GVAR(currentUnit) != 2) then +{ + _zeroRange = _zeroRange / 1.0936133; +}; +if (_zeroRange < 10) exitWith { + (GVAR(workingMemory) select GVAR(currentTarget)) set [2, _zeroRange]; + (GVAR(workingMemory) select GVAR(currentTarget)) set [3, 0]; +}; + +private ["_temperature", "_barometricPressure", "_relativeHumidity"]; +_temperature = (GVAR(temperature) select GVAR(currentTarget)); +_barometricPressure = (GVAR(barometricPressure) select GVAR(currentTarget)); +_relativeHumidity = (GVAR(relativeHumidity) select GVAR(currentTarget)); +if (GVAR(currentUnit) == 1) then +{ + _temperature = (_temperature - 32) / 1.8; + _barometricPressure = _barometricPressure * 33.8638866667; +}; + +private ["_result"]; +_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, 0, 0, 0, 0, _zeroRange, _bc, _dragModel, _atmosphereModel, false] call FUNC(calculate_solution); + +(GVAR(workingMemory) select GVAR(currentTarget)) set [2, _zeroRange]; +(GVAR(workingMemory) select GVAR(currentTarget)) set [3, _scopeBaseAngle + (_result select 0) / 60]; diff --git a/addons/atragmx/functions/script_component.hpp b/addons/atragmx/functions/script_component.hpp new file mode 100644 index 0000000000..6e49f39695 --- /dev/null +++ b/addons/atragmx/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\atragmx\script_component.hpp" \ No newline at end of file diff --git a/addons/atragmx/initKeybinds.sqf b/addons/atragmx/initKeybinds.sqf new file mode 100644 index 0000000000..28616b872f --- /dev/null +++ b/addons/atragmx/initKeybinds.sqf @@ -0,0 +1,11 @@ +["ACE3", QGVAR(ATragMXDialogKey), localize "STR_ACE_ATragMX_ATragMXDialogKey", +{ + // Conditions: canInteract + if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + + // Statement + [] call FUNC(create_dialog); + false +}, +{false}, +[197, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // (PRINT) \ No newline at end of file diff --git a/addons/atragmx/script_component.hpp b/addons/atragmx/script_component.hpp new file mode 100644 index 0000000000..062df59d19 --- /dev/null +++ b/addons/atragmx/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT atragmx +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_ATRAGMX + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_ATRAGMX + #define DEBUG_SETTINGS DEBUG_SETTINGS_ATRAGMX +#endif + +#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/atragmx/stringtable.xml b/addons/atragmx/stringtable.xml new file mode 100644 index 0000000000..6b6a921c2a --- /dev/null +++ b/addons/atragmx/stringtable.xml @@ -0,0 +1,30 @@ + + + + + + ATragMX + ATragMX + ATragMX + ATragMX + ATragMX + ATragMX + ATragMX + ATragMX + ATragMX + ATragMX + + + Open ATragMX + Otwórz ATragMX + + + Rugged PDA with ATragMX + Przenośny PDA z kalkulatorem balistycznym ATragMX + + + Open ATragMX + Otwórz ATragMX + + + \ No newline at end of file diff --git a/addons/attach/stringtable.xml b/addons/attach/stringtable.xml index 97649a6026..21577a6bce 100644 --- a/addons/attach/stringtable.xml +++ b/addons/attach/stringtable.xml @@ -1,206 +1,206 @@  - - - Attach item >> - Gegenstand befestigen >> - Acoplar objeto >> - Przyczep przedmiot >> - Attacher l'objet >> - Připnout předmět >> - Acoplar item >> - Attacca l'oggetto >> - Tárgy hozzácsatolása >> - Добавить приспособления - - - Attach - Befestigen - Acoplar - Przyczep - Attacher - Připnout - Acoplar - Attacca - Hozzácsatolás - Присоединить - - - Detach item - Gegenstand entfernen - Quitar objeto - Odczep przedmiot - Détacher l'objet - Odepnout předmět - Separar item - Stacca l'oggetto - Tárgy lecsatolása - Отсоединить - - - IR Strobe Attached - IR-Stroboskop befestigt - Marcador IR acoplado - Przyczepiono stroboskop IR - Strobe IR attaché - IR Značkovač připnutý - Marcador IV Acoplado - Strobo IR attaccata - Infravörös jeladó hozzácsatolva - ИК-маяк присоединён - - - IR Strobe Detached - IR-Stroboskop entfernt - Marcador IR quitado - Odczepiono stroboskop IR - Strobe IR détaché - IR Značkovač odepnutý - Marcador IV Separado - Strobo IR staccata - Infravörös jeladó lecsatolva - ИК-маяк отсоединён - - - IR Grenade Attached - IR-Granate befestigt - Granada IR acoplada - Przyczepiono granat IR - Grenade IR attachée - IR Granát připnutý - Granada IV Acoplada - Granata IR attaccata - Infravörös gránát hozzácsatolva - ИК-граната присоединена - - - IR Grenade Detached - IR-Granate entfernt - Granada IR quitada - Odczepiono granat IR - Grenade IR détachée - IR Granát odepnutý - Granada IV Separada - Granata IR staccata - Infravörös gránát lecsatolva - ИК-граната отсоединена - - - Chemlight Attached - Leuchtstab befestigt - Barra de luz acoplada - Przyczepiono światło chemiczne - Chemlight attaché - Chemické světlo připnuto - Chemlight Acoplada - Chemlight attaccata - Chemlight hozzácsatolva - Химсвет присоединён - - - Chemlight Detached - Leuchtstab entfernt - Barra de luz quitada - Odczepiono światło chemiczne - Chemlight détaché - Chemické světlo odepnuto - Chemlight Separada - Chemlight staccata - Chemlight hozzácsatolva - Химсвет отсоединён - - - No inventory space - Kein Platz im Inventar - Sin espacio en inventario - Brak miejsca w ekwipunku - Pas de place dans l'inventaire - Není místo v inventáři - Sem espaço no inventário - Non hai più spazio - Nincs több hely - В инвентаре нет места - - - IR Strobe - IR-Stroboskop - Marcador IR - Stroboskop IR - Strobe IR - IR Značkovač - Marcador IV - Strobo IR - Infravörös jeladó - ИК-маяк - - - IR Strobe allows you to signal your position through a pulsating beacon only visible with NVGs. - Das IR-Stroboskop erlaubt es dir deine Position mit einem blinkenden Leuchtfeuer zu signalisieren, welches nur mit Nachtsichtgerät zu erkennen ist. - Stroboskop światła podczerwieni umożliwia oznaczenie swojej pozycji pulsacyjnym światłem widocznym tylko przez optykę noktowizyjną i gogle noktowizyjne. - El Marcador IR permite señalizar su posisición a través de una baliza visible solo a través de dispositivos de visión nocturna. - Le Strobe IR permet de signaler votre position grace à un clignotement visible par des JVN. - IR Značkovač je Infračerveně zářící stroboskop umožňující signalizaci vaší pozice díky blikajícímu světlu, které je vidět pouze při užití noktovizoru. - O Marcador IV permite que você sinalize sua posição através de um pulso visível somente com equipamento de visão noturna. - 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 - Platzieren - Colocar - Umieść - Placer - Položit - Colocar - Posiziona - Elhelyez - Установить - - - Cancel - Abbrechen - Cancelar - Anuluj - Annuler - Zrušit - Cancelar - Annulla - Mégse - Отмена - - - Attach Failed - Échec de l'attachement - Befestigen fehlgeschlagen - Соединение прервано - Error al acoplar - Připnutí selhalo - Przyczepianie nie powiodło się - - - %1<br/>Attached - %1<br/>befestigt - %1<br/>acoplada - %1<br/>Przyczepiono - %1<br/>attachée - %1<br/>Připnutý - %1<br/>Acoplada - %1<br/>attaccata - %1<br/>hozzácsatolva - %1<br/>присоединена - - - %1<br/>Detached - %1<br/>entfernt - %1<br/>quitada - %1<br/>Odczepiono - %1<br/>détachée - %1<br/>Odepnutý - %1<br/>Separada - %1<br/>staccata - %1<br/>lecsatolva - %1<br/>отсоединена - - + + + Attach item >> + Gegenstand befestigen >> + Acoplar objeto >> + Przyczep przedmiot >> + Attacher l'objet >> + Připnout předmět >> + Acoplar item >> + Attacca l'oggetto >> + Tárgy hozzácsatolása >> + Добавить приспособления + + + Attach + Befestigen + Acoplar + Przyczep + Attacher + Připnout + Acoplar + Attacca + Hozzácsatolás + Присоединить + + + Detach item + Gegenstand entfernen + Quitar objeto + Odczep przedmiot + Détacher l'objet + Odepnout předmět + Separar item + Stacca l'oggetto + Tárgy lecsatolása + Отсоединить + + + IR Strobe Attached + IR-Stroboskop befestigt + Marcador IR acoplado + Przyczepiono stroboskop IR + Strobe IR attaché + IR Značkovač připnutý + Marcador IV Acoplado + Strobo IR attaccata + Infravörös jeladó hozzácsatolva + ИК-маяк присоединён + + + IR Strobe Detached + IR-Stroboskop entfernt + Marcador IR quitado + Odczepiono stroboskop IR + Strobe IR détaché + IR Značkovač odepnutý + Marcador IV Separado + Strobo IR staccata + Infravörös jeladó lecsatolva + ИК-маяк отсоединён + + + IR Grenade Attached + IR-Granate befestigt + Granada IR acoplada + Przyczepiono granat IR + Grenade IR attachée + IR Granát připnutý + Granada IV Acoplada + Granata IR attaccata + Infravörös gránát hozzácsatolva + ИК-граната присоединена + + + IR Grenade Detached + IR-Granate entfernt + Granada IR quitada + Odczepiono granat IR + Grenade IR détachée + IR Granát odepnutý + Granada IV Separada + Granata IR staccata + Infravörös gránát lecsatolva + ИК-граната отсоединена + + + Chemlight Attached + Leuchtstab befestigt + Barra de luz acoplada + Przyczepiono światło chemiczne + Chemlight attachée + Chemické světlo připnuto + Chemlight Acoplada + Chemlight attaccata + Chemlight hozzácsatolva + Химсвет присоединён + + + Chemlight Detached + Leuchtstab entfernt + Barra de luz quitada + Odczepiono światło chemiczne + Chemlight détachée + Chemické světlo odepnuto + Chemlight Separada + Chemlight staccata + Chemlight hozzácsatolva + Химсвет отсоединён + + + No inventory space + Kein Platz im Inventar + Sin espacio en inventario + Brak miejsca w ekwipunku + Pas de place dans l'inventaire + Není místo v inventáři + Sem espaço no inventário + Non hai più spazio + Nincs több hely + В инвентаре нет места + + + IR Strobe + IR-Stroboskop + Marcador IR + Stroboskop IR + Strobe IR + IR Značkovač + Marcador IV + Strobo IR + Infravörös jeladó + ИК-маяк + + + IR Strobe allows you to signal your position through a pulsating beacon only visible with NVGs. + Das IR-Stroboskop erlaubt es dir deine Position mit einem blinkenden Leuchtfeuer zu signalisieren, welches nur mit Nachtsichtgerät zu erkennen ist. + Stroboskop światła podczerwieni umożliwia oznaczenie swojej pozycji pulsacyjnym światłem widocznym tylko przez optykę noktowizyjną i gogle noktowizyjne. + El Marcador IR permite señalizar su posisición a través de una baliza visible solo a través de dispositivos de visión nocturna. + Le Strobe IR permet de signaler votre position grace à un clignotement visible par des JVN. + IR Značkovač je Infračerveně zářící stroboskop umožňující signalizaci vaší pozice díky blikajícímu světlu, které je vidět pouze při užití noktovizoru. + O Marcador IV permite que você sinalize sua posição através de um pulso visível somente com equipamento de visão noturna. + 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 + Platzieren + Colocar + Umieść + Placer + Položit + Colocar + Posiziona + Elhelyez + Установить + + + Cancel + Abbrechen + Cancelar + Anuluj + Annuler + Zrušit + Cancelar + Annulla + Mégse + Отмена + + + Attach Failed + Impossible d'attacher + Befestigen fehlgeschlagen + Не удалось присоединить + Error al acoplar + Připnutí selhalo + Przyczepianie nie powiodło się + + + %1<br/>Attached + %1<br/>befestigt + %1<br/>acoplada + %1<br/>Przyczepiono + %1<br/>attachée + %1<br/>Připnutý + %1<br/>Acoplada + %1<br/>attaccata + %1<br/>hozzácsatolva + %1<br/>присоединена + + + %1<br/>Detached + %1<br/>entfernt + %1<br/>quitada + %1<br/>Odczepiono + %1<br/>détachée + %1<br/>Odepnutý + %1<br/>Separada + %1<br/>staccata + %1<br/>lecsatolva + %1<br/>отсоединена + + diff --git a/addons/ballistics/CfgAmmo.hpp b/addons/ballistics/CfgAmmo.hpp index 79f99c33a4..620484950d 100644 --- a/addons/ballistics/CfgAmmo.hpp +++ b/addons/ballistics/CfgAmmo.hpp @@ -1,8 +1,10 @@ + class CfgAmmo { class BulletCore; - + class BulletBase: BulletCore { - timeToLive = 15; // Default: 6, doubleplusgood all munition range. + // Default: 6 | More is good, but too much is bad (especially with wind deflection / advanced ballistics) + timeToLive = 10; }; class B_20mm : BulletBase { @@ -17,4 +19,486 @@ class CfgAmmo { class B_30mm_AP : BulletBase { timeToLive = 30; }; -}; \ No newline at end of file + + class B_556x45_Ball : BulletBase { + airFriction=-0.001265; + hit=8; + typicalSpeed=750; + ACE_caliber=0.224; + ACE_bulletLength=0.906; + ACE_bulletMass=62; + ACE_ammoTempMuzzleVelocityShifts[]={-27.20, -26.44, -23.76, -21.00, -17.54, -13.10, -7.95, -1.62, 6.24, 15.48, 27.75}; + ACE_ballisticCoefficients[]={0.151}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={723, 764, 796, 825, 843, 866, 878, 892, 906, 915, 922, 900}; + ACE_barrelLengths[]={8.3, 9.4, 10.6, 11.8, 13.0, 14.2, 15.4, 16.5, 17.7, 18.9, 20.0, 24.0}; + }; + class ACE_556x45_Ball_Mk262 : B_556x45_Ball { + airFriction=-0.001125; + caliber=0.6; + deflecting=18; + hit=11; + typicalSpeed=836; + ACE_caliber=0.224; + ACE_bulletLength=0.906; + ACE_bulletMass=77; + 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.361}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={624, 816, 832, 838}; + ACE_barrelLengths[]={7.5, 14.5, 18, 20}; + }; + class ACE_556x45_Ball_Mk318 : B_556x45_Ball { + airFriction=-0.001120; + caliber=0.6; + deflecting=18; + hit=9; + typicalSpeed=886; + ACE_caliber=0.224; + ACE_bulletLength=0.906; + ACE_bulletMass=62; + 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.307}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={780, 886, 950}; + ACE_barrelLengths[]={10, 15.5, 20}; + }; + class B_556x45_Ball_Tracer_Red; + class ACE_B_556x45_Ball_Tracer_Dim: B_556x45_Ball_Tracer_Red { + nvgOnly = 1; + }; + class ACE_545x39_Ball_7N6M : B_556x45_Ball { + airFriction=-0.001162; + caliber=0.5; + deflecting=18; + hit=7; + typicalSpeed=880; + ACE_caliber=0.220; + ACE_bulletLength=0.85; + ACE_bulletMass=52.9; + 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="ASM"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={780, 880, 920}; + ACE_barrelLengths[]={10, 16.3, 20}; + }; + class ACE_545x39_Ball_7T3M : B_556x45_Ball_Tracer_Red { + airFriction=-0.001162; + caliber=0.5; + deflecting=18; + hit=7; + typicalSpeed=883; + ACE_caliber=0.220; + ACE_bulletLength=0.85; + ACE_bulletMass=49.8; + 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="ASM"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={785, 883, 925}; + ACE_barrelLengths[]={10, 16.3, 20}; + }; + class B_65x39_Caseless : BulletBase { + airFriction=-0.000772; + typicalSpeed=800; + ACE_caliber=0.264; + ACE_bulletLength=1.295; + ACE_bulletMass=123; + 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.263}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={730, 760, 788, 800, 810, 830}; + ACE_barrelLengths[]={10, 16, 20, 24, 26, 30}; + }; + class B_65x39_Case_yellow; + class ACE_B_65x39_Caseless_Tracer_Dim : B_65x39_Case_yellow { + nvgOnly = 1; + }; + class B_762x51_Ball : BulletBase { + airFriction=-0.001035; + typicalSpeed=833; + hit=14; + ACE_caliber=0.308; + ACE_bulletLength=1.14; + ACE_bulletMass=146; + 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.2}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={700, 800, 820, 833, 845}; + ACE_barrelLengths[]={10, 16, 20, 24, 26}; + }; + class B_762x51_Tracer_Red; + class ACE_B_762x51_Tracer_Dim: B_762x51_Tracer_Red { + nvgOnly = 1; + }; + class ACE_762x51_Ball_M118LR : B_762x51_Ball { + airFriction=-0.0008525; + caliber=1.05; + hit=16; + typicalSpeed=790; + ACE_caliber=0.308; + ACE_bulletLength=1.24; + ACE_bulletMass=175; + 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.505, 0.496, 0.485, 0.485, 0.485}; + ACE_velocityBoundaries[]={853, 549, 549, 549}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={750, 780, 790, 794}; + ACE_barrelLengths[]={16, 20, 24, 26}; + }; + class ACE_762x51_Ball_Subsonic : B_762x51_Ball { + airFriction=-0.000535; + caliber=0.5; + hit=16; + typicalSpeed=790; + ACE_caliber=0.308; + ACE_bulletLength=1.340; + ACE_bulletMass=200; + 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.235}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={305, 325, 335, 340}; + ACE_barrelLengths[]={16, 20, 24, 26}; + }; + class B_762x54_Ball : BulletBase { + ACE_caliber=0.312; + ACE_bulletLength=1.14; + ACE_bulletMass=152; + 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[]={16, 20, 24, 26}; + }; + class ACE_762x54_Ball_7N14 : B_762x51_Ball { + airFriction=-0.001023; + caliber=0.95; + hit=15; + typicalSpeed=820; + ACE_caliber=0.312; + ACE_bulletLength=1.14; + ACE_bulletMass=152; + 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[]={16, 20, 24, 26}; + }; + class ACE_762x54_Ball_7T2 : B_762x51_Tracer_Red { + airFriction=-0.001023; + caliber=0.9; + hit=15; + typicalSpeed=800; + ACE_caliber=0.312; + ACE_bulletLength=1.14; + ACE_bulletMass=149; + 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.395}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={680, 750, 798, 800}; + ACE_barrelLengths[]={16, 20, 24, 26}; + }; + class ACE_762x35_Ball : B_762x51_Ball { + airFriction=-0.000821; + caliber=0.9; + hit=11; + typicalSpeed=790; + ACE_caliber=0.308; + ACE_bulletLength=1.153; + ACE_bulletMass=125; + 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[]={9, 16, 20}; + }; + class ACE_762x39_Ball : B_762x51_Ball { + airFriction=-0.0015168; + hit=12; + typicalSpeed=716; + ACE_caliber=0.308; + ACE_bulletLength=1.14; + ACE_bulletMass=123; + 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[]={10, 16.3, 20}; + }; + class ACE_762x39_Ball_57N231P : B_762x51_Tracer_Red { + airFriction=-0.0015168; + hit=12; + typicalSpeed=716; + ACE_caliber=0.308; + ACE_bulletLength=1.14; + ACE_bulletMass=117; + 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[]={10, 16.3, 20}; + }; + class B_9x21_Ball : BulletBase { + airFriction=-0.00125; + typicalSpeed=390; + hit=6; + ACE_caliber=0.356; + ACE_bulletLength=0.610; + ACE_bulletMass=115; + 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.17}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={440, 460, 480}; + ACE_barrelLengths[]={4, 5, 9}; + }; + class ACE_9x18_Ball_57N181S : B_9x21_Ball { + hit=5; + airFriction=-0.001234; + typicalSpeed=298; + ACE_caliber=0.365; + ACE_bulletLength=0.610; + ACE_bulletMass=92.6; + 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="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={298, 330, 350}; + ACE_barrelLengths[]={3.8, 5, 9}; + }; + class ACE_9x19_Ball : B_9x21_Ball { + airFriction=-0.001234; + typicalSpeed=370; + hit=6; + ACE_caliber=0.355; + ACE_bulletLength=0.610; + ACE_bulletMass=124; + 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.165}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={340, 370, 400}; + ACE_barrelLengths[]={4, 5, 9}; + }; + class ACE_10x25_Ball : B_9x21_Ball { + airFriction=-0.00168; + typicalSpeed=425; + hit=7; + ACE_caliber=0.5; + ACE_bulletLength=0.764; + ACE_bulletMass=165; + 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="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={360, 400, 430}; + ACE_barrelLengths[]={4, 4.61, 9}; + }; + class ACE_765x17_Ball: B_9x21_Ball { + airFriction=-0.001213; + typicalSpeed=282; + hit=7; + ACE_caliber=0.3125; + ACE_bulletLength=0.610; + ACE_bulletMass=65; + 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[]={4, 5, 9}; + }; + class ACE_303_Ball : ACE_762x51_Ball_M118LR { + airFriction=-0.00083; + typicalSpeed=761; + ACE_caliber=0.311; + ACE_bulletLength=1.227; + ACE_bulletMass=174; + 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[]={20, 24, 26}; + }; + class B_93x64_Ball : BulletBase { + ACE_caliber=0.366; + ACE_bulletLength=1.350; + ACE_bulletMass=230; + 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.368}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={850, 870, 880}; + ACE_barrelLengths[]={20, 24.41, 26}; + }; + class B_408_Ball : BulletBase { + airFriction=-0.000395; + typicalSpeed=910; + ACE_caliber=0.408; + ACE_bulletLength=2.126; + ACE_bulletMass=410; + 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.97}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={910}; + ACE_barrelLengths[]={29}; + }; + class ACE_106x83mm_Ball : B_408_Ball { + ACE_caliber=0.416; + ACE_bulletLength=2.089; + ACE_bulletMass=398; + 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.72}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={960}; + ACE_barrelLengths[]={29}; + }; + class ACE_338_Ball : B_408_Ball { + airFriction=-0.000526; + caliber=1.55; + deflecting=12; + hit=20; + typicalSpeed=826; + ACE_caliber=0.338; + ACE_bulletLength=1.70; + ACE_bulletMass=300; + 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.381}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={820, 826, 830}; + ACE_barrelLengths[]={24, 26.5, 28}; + }; + class B_338_Ball : BulletBase { + ACE_caliber=0.338; + ACE_bulletLength=1.558; + ACE_bulletMass=250; + 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.322}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={880, 915, 925}; + ACE_barrelLengths[]={20, 26, 28}; + }; + class B_338_NM_Ball : BulletBase { + ACE_caliber=0.338; + ACE_bulletLength=1.70; + ACE_bulletMass=300; + 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.381}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={790, 807, 820}; + ACE_barrelLengths[]={20, 24, 26}; + }; + class B_127x54_Ball : BulletBase { + ACE_caliber=0.50; + ACE_bulletLength=2.540; + ACE_bulletMass=950; + 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[]={1.050}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={300}; + ACE_barrelLengths[]={17.2}; + }; + class B_127x99_Ball : BulletBase { + airFriction=-0.0006; + typicalSpeed=853; + ACE_caliber=0.510; + ACE_bulletLength=2.310; + ACE_bulletMass=647; + 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.670}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={853}; + ACE_barrelLengths[]={29}; + }; + class ACE_127x99_Ball_AMAX : B_127x99_Ball { + ACE_caliber=0.510; + ACE_bulletLength=2.540; + ACE_bulletMass=750; + 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[]={1.050}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={860}; + ACE_barrelLengths[]={29}; + }; + class B_127x108_Ball : BulletBase { + typicalSpeed=820; + ACE_caliber=0.511; + ACE_bulletLength=2.520; + ACE_bulletMass=745; + 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.63}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={820}; + ACE_barrelLengths[]={28.7}; + }; + class B_45ACP_Ball : BulletBase { + airFriction=-0.0007182; + typicalSpeed=250; + ACE_caliber=0.452; + ACE_bulletLength=0.68; + ACE_bulletMass=230; + 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.195}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={230, 250, 285}; + ACE_barrelLengths[]={4, 5, 9}; + }; +}; diff --git a/addons/ballistics/CfgMagazines.hpp b/addons/ballistics/CfgMagazines.hpp new file mode 100644 index 0000000000..6e6f5a11e8 --- /dev/null +++ b/addons/ballistics/CfgMagazines.hpp @@ -0,0 +1,138 @@ + +class CfgMagazines { + + class CA_Magazine; + class 30Rnd_65x39_caseless_mag: CA_Magazine { + initSpeed = 760; + }; + class 100Rnd_65x39_caseless_mag: CA_Magazine { + initSpeed = 760; + }; + class 100Rnd_65x39_caseless_mag_Tracer: 100Rnd_65x39_caseless_mag { + initSpeed = 760; + }; + class 200Rnd_65x39_cased_Box: 100Rnd_65x39_caseless_mag { + initSpeed = 760; + }; + class 30Rnd_65x39_caseless_mag_Tracer: 30Rnd_65x39_caseless_mag { + }; + class ACE_30Rnd_65x39_caseless_mag_Tracer_Dim: 30Rnd_65x39_caseless_mag_Tracer { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_B_65x39_Caseless_Tracer_Dim"; + displayName = "$STR_ACE_30Rnd_65x39_caseless_mag_Tracer_DimName"; + displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_mag_Tracer_DimNameShort"; + descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_mag_Tracer_DimDescription"; + picture = "\A3\weapons_f\data\ui\m_30stanag_caseless_yellow_CA.paa"; + }; + + class 30Rnd_556x45_Stanag: CA_Magazine { + }; + class 30Rnd_556x45_Stanag_Tracer_Red: 30Rnd_556x45_Stanag { + }; + class ACE_30Rnd_556x45_Stanag_Tracer_Dim: 30Rnd_556x45_Stanag_Tracer_Red { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_B_556x45_Ball_Tracer_Dim"; + displayName = "$STR_ACE_30Rnd_556x45_mag_Tracer_DimName"; + displayNameShort = "$STR_ACE_30Rnd_556x45_mag_Tracer_DimNameShort"; + descriptionShort = "$STR_ACE_30Rnd_556x45_mag_Tracer_DimDescription"; + picture = "\A3\weapons_f\data\ui\m_30stanag_yellow_ca.paa"; + }; + + class 20Rnd_762x51_Mag: CA_Magazine { + initSpeed = 833; + }; + class 10Rnd_762x51_Mag: 20Rnd_762x51_Mag { + initSpeed = 833; + }; + class 150Rnd_762x51_Box: CA_Magazine { + initSpeed = 833; + }; + class 150Rnd_762x51_Box_Tracer: 150Rnd_762x51_Box { + initSpeed = 833; + }; + class ACE_20Rnd_762x51_Mag_Tracer: 20Rnd_762x51_Mag { //@todo Green tracers for opfor and yellow tracers for independent + author = "$STR_ACE_Common_ACETeam"; + ammo = "B_762x51_Tracer_Red"; + displayName = "$STR_ACE_20Rnd_762x51_mag_TracerName"; + displayNameShort = "$STR_ACE_20Rnd_762x51_mag_TracerNameShort"; + descriptionShort = "$STR_ACE_20Rnd_762x51_mag_TracerDescription"; + tracersEvery = 1; + }; + + class ACE_20Rnd_762x51_Mag_Tracer_Dim: ACE_20Rnd_762x51_Mag_Tracer { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_B_762x51_Tracer_Dim"; + displayName = "$STR_ACE_20Rnd_762x51_mag_Tracer_DimName"; + displayNameShort = "$STR_ACE_20Rnd_762x51_mag_Tracer_DimNameShort"; + descriptionShort = "$STR_ACE_20Rnd_762x51_mag_Tracer_DimDescription"; + }; + + class ACE_20Rnd_762x51_Mag_SD: 20Rnd_762x51_Mag { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_762x51_Ball_Subsonic"; + displayName = "$STR_ACE_20Rnd_762x51_mag_SDName"; + displayNameShort = "$STR_ACE_20Rnd_762x51_mag_SDNameShort"; + descriptionShort = "$STR_ACE_20Rnd_762x51_mag_SDDescription"; + initSpeed = 325; + }; + + class 30Rnd_9x21_Mag: CA_Magazine { + initSpeed = 450; + }; + class ACE_30Rnd_9x19_mag: 30Rnd_9x21_Mag { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_9x19_Ball"; + displayName = "$STR_ACE_30Rnd_9x19_mag_Name"; + displayNameShort = "$STR_ACE_30Rnd_9x19_mag_NameShort"; + descriptionShort = "$STR_ACE_30Rnd_9x19_mag_Description"; + initSpeed = 370; + }; + + class 11Rnd_45ACP_Mag: CA_Magazine { + initSpeed = 250; + }; + + class 6Rnd_45ACP_Cylinder : 11Rnd_45ACP_Mag { + initSpeed = 250; + }; + + class 30Rnd_45ACP_Mag_SMG_01: 30Rnd_9x21_Mag { + initSpeed = 250; + }; + + class 9Rnd_45ACP_Mag: 30Rnd_45ACP_Mag_SMG_01 { + initSpeed = 250; + }; + + class 30Rnd_45ACP_Mag_SMG_01_Tracer_Green: CA_Magazine { + initSpeed = 250; + }; + + class 16Rnd_9x21_Mag: 30Rnd_9x21_Mag { + initSpeed = 450; + }; + class ACE_16Rnd_9x19_mag: 16Rnd_9x21_Mag { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_9x19_Ball"; + displayName = "$STR_ACE_16Rnd_9x19_mag_Name"; + displayNameShort = "$STR_ACE_16Rnd_9x19_mag_NameShort"; + descriptionShort = "$STR_ACE_16Rnd_9x19_mag_Description"; + initSpeed = 370; + }; + + class 10Rnd_762x54_Mag: 10Rnd_762x51_Mag { + initSpeed = 800; + }; + + class 150Rnd_762x54_Box: 150Rnd_762x51_Box { + initSpeed = 750; + }; + + class 150Rnd_93x64_Mag: CA_Magazine { + initSpeed = 860; + }; + + class 10Rnd_127x54_Mag: CA_Magazine { + initSpeed = 300; + }; +}; diff --git a/addons/ballistics/CfgWeapons.hpp b/addons/ballistics/CfgWeapons.hpp index 2319f8279b..513829130f 100644 --- a/addons/ballistics/CfgWeapons.hpp +++ b/addons/ballistics/CfgWeapons.hpp @@ -3,11 +3,49 @@ class Mode_SemiAuto; class Mode_FullAuto; class CfgWeapons { - - /* MX */ - + class DMR_02_base_F; + class DMR_03_base_F; + class DMR_04_base_F; + class DMR_05_base_F; + class DMR_06_base_F; + class GM6_base_F; + class LMG_RCWS; + class LRR_base_F; + class MGun; + class MGunCore; + class MMG_01_base_F; + class MMG_02_base_F; class Rifle_Base_F; + class Rifle_Long_Base_F; + class WeaponSlotsInfo; + class MuzzleSlot; + + /* Long Rifles */ + + class EBR_base_F: Rifle_Long_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_B"}; + }; + }; + }; + + class DMR_01_base_F: Rifle_Long_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_B"}; + }; + }; + }; + + /* MX */ + class arifle_MX_Base_F: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_H"}; + }; + }; class Single: Mode_SemiAuto { dispersion = 0.000800; // radians. Equal to 2.75 MOA. // Based on widely cited 2 MOA figure for new 5.56 ACR. @@ -17,8 +55,17 @@ class CfgWeapons { dispersion = 0.00147; // radians. Equal to 5.1 MOA. }; }; - class arifle_MX_SW_F: arifle_MX_Base_F { + initSpeed = -1.0; + ACE_barrelTwist=9; + ACE_barrelLength=16.0; + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + // Shit is broken again + //compatibleItems[] += {"ACE_muzzle_mzls_H"}; + compatibleItems[] = {"muzzle_snds_H","muzzle_snds_H_SW","ACE_muzzle_mzls_H"}; + }; + }; class Single: Mode_SemiAuto { dispersion = 0.000800; // radians. Equal to 2.75 MOA. // Based on widely cited 2 MOA figure for new 5.56 ACR. @@ -28,8 +75,10 @@ class CfgWeapons { dispersion = 0.00147; // radians. Equal to 5.1 MOA. }; }; - class arifle_MXM_F: arifle_MX_Base_F { + initSpeed = -1.018; + ACE_barrelTwist=9; + ACE_barrelLength=18; class Single: Single { dispersion = 0.00029; // radians. Equal to 1 MOA. // 6.5mm is easily capable of this in a half-tuned rifle. @@ -42,8 +91,12 @@ class CfgWeapons { /* Katiba */ - class arifle_katiba_Base_F: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_H"}; + }; + }; class Single: Mode_SemiAuto { dispersion = 0.000800; // radians. Equal to 2.75 MOA. // Based on widely cited 2 MOA figure for new 5.56 ACR? @@ -57,9 +110,15 @@ class CfgWeapons { /* Other */ - - class Rifle_Long_Base_F: Rifle_Base_F {}; class LMG_Mk200_F: Rifle_Long_Base_F { + initSpeed = -0.9763; + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_H"}; + }; + }; + ACE_barrelTwist=7; + ACE_barrelLength=12.5; class manual: Mode_FullAuto { dispersion = 0.00175; // radians. Equal to 6 MOA. }; @@ -68,8 +127,15 @@ class CfgWeapons { dispersion = 0.00175; // radians. Equal to 6 MOA. }; }; - class LMG_Zafir_F: Rifle_Long_Base_F { + initSpeed = -1.0; + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_B"}; + }; + }; + ACE_barrelTwist=12; + ACE_barrelLength=18.1; class FullAuto: Mode_FullAuto { dispersion = 0.00175; // radians. Equal to 6 MOA. }; @@ -81,19 +147,26 @@ class CfgWeapons { /* Assault Rifles */ - class Tavor_base_F: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_L"}; + }; + }; class Single: Mode_SemiAuto { dispersion = 0.000727; // radians. Equal to 2.5 MOA, about the limit of mass-produced M855. - // }; class FullAuto: Mode_FullAuto { dispersion = 0.00147; // radians. Equal to 5.1 MOA. }; }; - class mk20_base_F: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_L"}; + }; + }; class Single: Mode_SemiAuto { dispersion = 0.0008727; // radians. Equal to 3 MOA, about the limit of mass-produced M855 plus // some extra for these worn out Greek Army service rifles. @@ -106,8 +179,8 @@ class CfgWeapons { /* SMGs */ - class SDAR_base_F: Rifle_Base_F { + initSpeed = -0.9723; class Single: Mode_SemiAuto { dispersion = 0.0008727; // radians. Equal to 3 MOA, about the limit of mass-produced M855 plus // some extra because Kel-Tec. @@ -117,4 +190,564 @@ class CfgWeapons { dispersion = 0.00147; // radians. Equal to 5.1 MOA. }; }; + class pdw2000_base_F: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_smg_02"}; + }; + }; + }; + class SMG_01_Base: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_smg_01"}; + }; + }; + }; + class SMG_02_base_F: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_smg_02"}; + }; + }; + }; + + /* Pistols */ + + class Pistol; + class Pistol_Base_F: Pistol { + class WeaponSlotsInfo; + }; + + class hgun_P07_F: Pistol_Base_F { + initSpeed = -0.9778; + ACE_barrelTwist=10; + ACE_barrelLength=4; + 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 { + initSpeed = -1.0; + ACE_barrelTwist=10; + ACE_barrelLength=4.4; + 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 { + initSpeed = -1.0; + ACE_barrelTwist=16; + ACE_barrelLength=5; + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_smg_01"}; + }; + }; + }; + + class hgun_Pistol_heavy_01_F: Pistol_Base_F { + initSpeed = -0.96; + ACE_barrelTwist=16; + ACE_barrelLength=4.5; + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: MuzzleSlot { + compatibleItems[] += {"ACE_muzzle_mzls_smg_01"}; + }; + }; + }; + + class hgun_Pistol_heavy_02_F: Pistol_Base_F { + initSpeed = -0.92; + ACE_barrelTwist=16; + ACE_barrelLength=3; + /* + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE"; + compatibleItems[] += {"ACE_muzzle_mzls_smg_01"}; + }; + }; + */ + }; + class hgun_PDW2000_F: pdw2000_base_F { + initSpeed = -1.157; + ACE_barrelTwist=9; + ACE_barrelLength=7; + }; + class arifle_Katiba_F: arifle_katiba_Base_F { + initSpeed = -1.09; + ACE_barrelTwist=8; + ACE_barrelLength=28.7; + }; + class arifle_Katiba_C_F: arifle_katiba_Base_F { + initSpeed = -1.07; + ACE_barrelTwist=8; + ACE_barrelLength=26.8; + }; + class arifle_Katiba_GL_F: arifle_katiba_Base_F { + initSpeed = -1.09; + ACE_barrelTwist=8; + ACE_barrelLength=28.7; + }; + class arifle_MX_F: arifle_MX_Base_F { + initSpeed = -0.99; + ACE_barrelTwist=9; + ACE_barrelLength=14.5; + }; + class arifle_MX_GL_F: arifle_MX_Base_F { + initSpeed = -0.99; + ACE_barrelTwist=9; + ACE_barrelLength=14.5; + }; + /* + class arifle_MX_SW_F: arifle_MX_Base_F { + ACE_barrelTwist=9; + ACE_barrelLength=16.0; + }; + */ + class arifle_MXC_F: arifle_MX_Base_F { + initSpeed = -0.965; + ACE_barrelTwist=8; + ACE_barrelLength=10.5; + }; + /* + class arifle_MXM_F: arifle_MX_Base_F { + ACE_barrelTwist=9; + ACE_barrelLength=18; + }; + */ + class arifle_SDAR_F: SDAR_base_F { + initSpeed = -0.9723; + ACE_barrelTwist=11.25; + ACE_barrelLength=18; + }; + class SMG_02_F: SMG_02_base_F { + initSpeed = -1.054; + ACE_barrelTwist=10; + ACE_barrelLength=7.7; + }; + class arifle_TRG20_F: Tavor_base_F { + initSpeed = -0.95; + ACE_barrelTwist=7; + ACE_barrelLength=15; + }; + class arifle_TRG21_F: Tavor_base_F { + initSpeed = -0.989; + ACE_barrelTwist=7; + ACE_barrelLength=18.1; + }; + class arifle_TRG21_GL_F: Tavor_base_F { + initSpeed = -0.989; + ACE_barrelTwist=7; + ACE_barrelLength=18.1; + }; + /* + class LMG_Zafir_F: Rifle_Long_Base_F { + ACE_barrelTwist=12; + ACE_barrelLength=18.1; + }; + */ + class arifle_Mk20_F: mk20_base_F { + initSpeed = -0.98; + ACE_barrelTwist=7; + ACE_barrelLength=17.4; + }; + class arifle_Mk20C_F: mk20_base_F { + initSpeed = -0.956; + ACE_barrelTwist=7; + ACE_barrelLength=16; + }; + class arifle_Mk20_GL_F: mk20_base_F { + initSpeed = -0.956; + ACE_barrelTwist=7; + ACE_barrelLength=16; + }; + class SMG_01_F: SMG_01_Base { + initSpeed = -1.016; + ACE_barrelTwist=16; + ACE_barrelLength=5.5; + }; + class srifle_DMR_01_F: DMR_01_base_F { + initSpeed = -1.025; + ACE_barrelTwist=9.5; + ACE_barrelLength=24; + }; + class srifle_EBR_F: EBR_base_F { + initSpeed = -0.9724; + ACE_barrelTwist=12; + ACE_barrelLength=18; + }; + /* + class LMG_Mk200_F: Rifle_Long_Base_F { + initSpeed = -1.0; + ACE_barrelTwist=7; + ACE_barrelLength=12.5; + }; + */ + class srifle_LRR_F: LRR_base_F { + initSpeed = -1.0; + ACE_barrelTwist=13; + ACE_barrelLength=29; + }; + class srifle_GM6_F: GM6_base_F { + initSpeed = -1.0; + ACE_barrelTwist=15; + ACE_barrelLength=43.3; + }; + class srifle_DMR_02_F: DMR_02_base_F { + initSpeed = -1.0; + ACE_barrelTwist=10; + ACE_barrelLength=26; + }; + class srifle_DMR_03_F: DMR_03_base_F { + initSpeed = -0.9843; + ACE_barrelTwist=10; + ACE_barrelLength=20; + }; + class srifle_DMR_04_F: DMR_04_base_F { + initSpeed = -1.0; + ACE_barrelTwist=8; + ACE_barrelLength=17.72; + }; + class srifle_DMR_05_blk_F: DMR_05_base_F { + initSpeed = -1.0; + ACE_barrelTwist=14.17; + ACE_barrelLength=24.41; + }; + class srifle_DMR_06_camo_F: DMR_06_base_F { + initSpeed = -0.9916; + ACE_barrelTwist=12; + ACE_barrelLength=22; + }; + class MMG_01_hex_F: MMG_01_base_F { + initSpeed = -1.0; + ACE_barrelTwist=14.17; + ACE_barrelLength=21.65; + }; + class MMG_02_camo_F: MMG_02_base_F { + initSpeed = -1.0; + ACE_barrelTwist=9.25; + ACE_barrelLength=24; + }; + + class HMG_127 : LMG_RCWS { + }; + class HMG_01: HMG_127 { + }; + class HMG_M2: HMG_01 { + initSpeed = -1.0; + ACE_barrelTwist=12; + ACE_barrelLength=45; + }; + + /* Silencers */ + + class ItemCore; + class InventoryMuzzleItem_Base_F; + + class muzzle_snds_H: ItemCore { + class ItemInfo: InventoryMuzzleItem_Base_F { + class MagazineCoef { + initSpeed = 1.0; + }; + + class AmmoCoef { + hit = 1.0; + visibleFire = 0.5; + audibleFire = 0.1; + visibleFireTime = 0.5; + audibleFireTime = 0.5; + cost = 1.0; + typicalSpeed = 1.0; + airFriction = 1.0; + }; + + class MuzzleCoef { + dispersionCoef = "0.8f"; + artilleryDispersionCoef = "1.0f"; + fireLightCoef = "0.5f"; + recoilCoef = "1.0f"; + recoilProneCoef = "1.0f"; + minRangeCoef = "1.0f"; + minRangeProbabCoef = "1.0f"; + midRangeCoef = "1.0f"; + midRangeProbabCoef = "1.0f"; + maxRangeCoef = "1.0f"; + maxRangeProbabCoef = "1.0f"; + }; + }; + }; + + class muzzle_snds_L: muzzle_snds_H { + class ItemInfo: ItemInfo { + class MagazineCoef { + initSpeed = 1.0; + }; + + class AmmoCoef { + hit = 1.0; + visibleFire = 0.5; + audibleFire = 0.1; + visibleFireTime = 0.5; + audibleFireTime = 0.5; + cost = 1.0; + typicalSpeed = 1.0; + airFriction = 1.0; + }; + + class MuzzleCoef { + dispersionCoef = "0.8f"; + artilleryDispersionCoef = "1.0f"; + fireLightCoef = "0.5f"; + recoilCoef = "1.0f"; + recoilProneCoef = "1.0f"; + minRangeCoef = "1.0f"; + minRangeProbabCoef = "1.0f"; + midRangeCoef = "1.0f"; + midRangeProbabCoef = "1.0f"; + maxRangeCoef = "1.0f"; + maxRangeProbabCoef = "1.0f"; + }; + }; + }; + + class muzzle_snds_M: muzzle_snds_H { + class ItemInfo: ItemInfo { + class MagazineCoef { + initSpeed = 1.0; + }; + + class AmmoCoef { + hit = 1.0; + visibleFire = 0.5; + audibleFire = 0.1; + visibleFireTime = 0.5; + audibleFireTime = 0.5; + cost = 1.0; + typicalSpeed = 1.0; + airFriction = 1.0; + }; + + class MuzzleCoef { + dispersionCoef = "0.8f"; + artilleryDispersionCoef = "1.0f"; + fireLightCoef = "0.5f"; + recoilCoef = "1.0f"; + recoilProneCoef = "1.0f"; + minRangeCoef = "1.0f"; + minRangeProbabCoef = "1.0f"; + midRangeCoef = "1.0f"; + midRangeProbabCoef = "1.0f"; + maxRangeCoef = "1.0f"; + maxRangeProbabCoef = "1.0f"; + }; + }; + }; + + class muzzle_snds_B: muzzle_snds_H { + class ItemInfo: ItemInfo { + class MagazineCoef { + initSpeed = 1.0; + }; + + class AmmoCoef { + hit = 1.0; + visibleFire = 0.5; + audibleFire = 0.1; + visibleFireTime = 0.5; + audibleFireTime = 0.5; + cost = 1.0; + typicalSpeed = 1.0; + airFriction = 1.0; + }; + + class MuzzleCoef { + dispersionCoef = "0.8f"; + artilleryDispersionCoef = "1.0f"; + fireLightCoef = "0.5f"; + recoilCoef = "1.0f"; + recoilProneCoef = "1.0f"; + minRangeCoef = "1.0f"; + minRangeProbabCoef = "1.0f"; + midRangeCoef = "1.0f"; + midRangeProbabCoef = "1.0f"; + maxRangeCoef = "1.0f"; + maxRangeProbabCoef = "1.0f"; + }; + }; + }; + + class muzzle_snds_H_MG: muzzle_snds_H { + class ItemInfo: ItemInfo { + class MagazineCoef { + initSpeed = 1.0; + }; + + class AmmoCoef { + hit = 1.0; + visibleFire = 0.5; + audibleFire = 0.1; + visibleFireTime = 0.5; + audibleFireTime = 0.5; + cost = 1.0; + typicalSpeed = 1.0; + airFriction = 1.0; + }; + + class MuzzleCoef { + dispersionCoef = "0.8f"; + artilleryDispersionCoef = "1.0f"; + fireLightCoef = "0.5f"; + recoilCoef = "1.0f"; + recoilProneCoef = "1.0f"; + minRangeCoef = "1.0f"; + minRangeProbabCoef = "1.0f"; + midRangeCoef = "1.0f"; + midRangeProbabCoef = "1.0f"; + maxRangeCoef = "1.0f"; + maxRangeProbabCoef = "1.0f"; + }; + }; + }; + + class muzzle_snds_H_SW: muzzle_snds_H_MG { + class ItemInfo: ItemInfo { + class MagazineCoef { + initSpeed = 1.0; + }; + + class AmmoCoef { + hit = 1.0; + visibleFire = 0.5; + audibleFire = 0.1; + visibleFireTime = 0.5; + audibleFireTime = 0.5; + cost = 1.0; + typicalSpeed = 1.0; + airFriction = 1.0; + }; + + class MuzzleCoef { + dispersionCoef = "0.8f"; + artilleryDispersionCoef = "1.0f"; + fireLightCoef = "0.5f"; + recoilCoef = "1.0f"; + recoilProneCoef = "1.0f"; + minRangeCoef = "1.0f"; + minRangeProbabCoef = "1.0f"; + midRangeCoef = "1.0f"; + midRangeProbabCoef = "1.0f"; + maxRangeCoef = "1.0f"; + maxRangeProbabCoef = "1.0f"; + }; + }; + }; + + class muzzle_snds_acp: muzzle_snds_H { + class ItemInfo: ItemInfo { + class MagazineCoef { + initSpeed = 1.0; + }; + + class AmmoCoef { + hit = 1; + visibleFire = 0.5; + audibleFire = 0.1; + visibleFireTime = 0.5; + audibleFireTime = 0.5; + cost = 1.0; + typicalSpeed = 1.0; + airFriction = 1.0; + }; + + class MuzzleCoef { + dispersionCoef = "0.8f"; + artilleryDispersionCoef = "1.0f"; + fireLightCoef = "0.5f"; + recoilCoef = "1.0f"; + recoilProneCoef = "1.0f"; + minRangeCoef = "1.0f"; + minRangeProbabCoef = "1.0f"; + midRangeCoef = "1.0f"; + midRangeProbabCoef = "1.0f"; + maxRangeCoef = "1.0f"; + maxRangeProbabCoef = "1.0f"; + }; + }; + }; + + class muzzle_snds_338_black: ItemCore { + class ItemInfo: InventoryMuzzleItem_Base_F { + class MagazineCoef { + initSpeed = 1.0; + }; + + class AmmoCoef { + hit = 1; + visibleFire = 0.5; + audibleFire = 0.1; + visibleFireTime = 0.5; + audibleFireTime = 0.5; + cost = 1.0; + typicalSpeed = 1.0; + airFriction = 1.0; + }; + + class MuzzleCoef { + dispersionCoef = "0.8f"; + artilleryDispersionCoef = "1.0f"; + fireLightCoef = "0.5f"; + recoilCoef = "1.0f"; + recoilProneCoef = "1.0f"; + minRangeCoef = "1.0f"; + minRangeProbabCoef = "1.0f"; + midRangeCoef = "1.0f"; + midRangeProbabCoef = "1.0f"; + maxRangeCoef = "1.0f"; + maxRangeProbabCoef = "1.0f"; + }; + }; + }; + + class muzzle_snds_93mmg: ItemCore { + class ItemInfo: InventoryMuzzleItem_Base_F { + class MagazineCoef { + initSpeed = 1.0; + }; + + class AmmoCoef { + hit = 1.0; + visibleFire = 0.5; + audibleFire = 0.1; + visibleFireTime = 0.5; + audibleFireTime = 0.5; + cost = 1.0; + typicalSpeed = 1.0; + airFriction = 1.0; + }; + + class MuzzleCoef { + dispersionCoef = "0.8f"; + artilleryDispersionCoef = "1.0f"; + fireLightCoef = "0.5f"; + recoilCoef = "1.0f"; + recoilProneCoef = "1.0f"; + minRangeCoef = "1.0f"; + minRangeProbabCoef = "1.0f"; + midRangeCoef = "1.0f"; + midRangeProbabCoef = "1.0f"; + maxRangeCoef = "1.0f"; + maxRangeProbabCoef = "1.0f"; + }; + }; + }; }; diff --git a/addons/ballistics/config.cpp b/addons/ballistics/config.cpp index 4b9944364c..8ea75e4460 100644 --- a/addons/ballistics/config.cpp +++ b/addons/ballistics/config.cpp @@ -6,12 +6,13 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"TaoSensai","commy2"}; + author[] = {"TaoSensai","commy2","Ruthberg"}; authorUrl = "https://github.com/Taosenai/tmr"; VERSION_CONFIG; }; }; -#include "CfgVehicles.hpp" +#include "CfgAmmo.hpp" +#include "CfgMagazines.hpp" #include "CfgWeapons.hpp" -#include "CfgAmmo.hpp" \ No newline at end of file +#include "CfgVehicles.hpp" diff --git a/addons/magazines/stringtable.xml b/addons/ballistics/stringtable.xml similarity index 99% rename from addons/magazines/stringtable.xml rename to addons/ballistics/stringtable.xml index 8257e48936..261a6a8ea1 100644 --- a/addons/magazines/stringtable.xml +++ b/addons/ballistics/stringtable.xml @@ -715,5 +715,17 @@ Kaliber: 9,3x64mm Hartkern<br />Schuss: 150<br />Verwendet für: Navid Kaliber: 9,3 x 64 mm AP<br />Pociski: 150<br />Używane w: Navid + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 294cf1d68c..292da895f3 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -1,178 +1,178 @@  - - - Take Prisoner - Gefangen nehmen - Tomar prisionero - Capturer le prisonnier - Weź więźnia - Zajmout Osobu - Arresta il Prigioniero - Tomar Prisioneiro - Foglyul ejtés - Взять в плен - - - Free Prisoner - Gefangenen freilassen - Liberar prisionero - Wypuść więźnia - Libérer le prisonnier - Osvobodit Zajatce - Libera il Prigioniero - Libertar Prisioneiro - Fogoly szabadon elengedése - Освободить пленника - - - Escort Prisoner - Gefangenen eskortieren - Escoltar prisionero - Eskortuj więźnia - Escorter le prisonnier - Eskortovat Zajatce - Scorta il Prigioniero - Escoltar Prisioneiro - Fogoly kísérése - Конвоировать пленника - - - Release Prisoner - Gefangenen loslassen - Soltar prisionero - Anuluj eskortowanie - Relâcher le prisonnier - Uvolnit Zajatce - Rilascia il Prigioniero - Largar Prisioneiro - Fogoly elengedése - Прекратить конвоирование - - - You need to take him as prisoner first! - Du musst ihn zuerst gefangen nehmen. - Necesitas hacerle prisionero primero! - Najpierw musisz wziąć go jako więźnia! - Vous devez d'abord le capturer! - Musíš ho nejdříve zajmout! - Prima devi arrestarlo! - Você deve tomá-lo como prisioneiro primeiro! - Először foglyul kell ejtened! - Вы должны сначала взять его в плен! - - - Load Captive - Gefangenen einladen - Cargar prisionero - Embarquer le prisonnier - Załaduj więźnia - Naložit zajatce - Fogoly berakása - Загрузить пленного - Embarcar Prisioneiro - - - Unload Captive - Gefangenen ausladen - Descargar prisionero - Débarquer le prisonnier - Wyładuj więźnia - Vyložit zajatce - Fogoly kivevése - Выгрузить пленного - Desembarcar Prisioneiro - - - Cable Tie - Kabelbinder - Opaska zaciskowa - Precinto - Serflex - Stahovací Pásek - Algema Plástica - Fascietta - Gyorskötöző - Кабельная стяжка - - - Cable ties that allow you to restrain prisoners. - Kabelbinder ermöglichen es, Gefangene zu fesseln. - Opaska zaciskowa pozwala na skrępowanie dłoni u więźnia. - Los precintos permiten maniatar prisioneros - Les Serflex permettent de menotter les prisonniers. - Stahovací pásky vám umožní zadržet vězně. - A algema plástica permite que você contenha prisioneiros. - Fascietta che ti consente di arrestare i prigionieri. - Gyorskötöző emberek fogjulejtéséhez. - Кабельные стяжки позволяют связывать пленников. - - - Inventory of frisked person - Inventar der durchsuchten Person - Inventaire de la fouille - Inventario de la persona cacheada - Motozott személy felszerelése - Inventář prohledávané osoby - Ekwipunek rewidowanej osoby - Инвентарь обысканных лиц - Inventário da pessoa revistada - - - Frisk person - Person durchsuchen - Fouiller - Cachear - Prohledávaná osoba - Rewiduj osobę - Motozás - Обыскать человека - Revistar - - - Surrender - Se rendre - Kapitulieren - Rendirse - Сдаться - Vzdát se - Poddaj się - - - Stop Surrendering - Arrêt de se rendre - Den Kampf erneut aufnehmen - Dejar de rendirse - Остановить сдачу - Přestat se vzdávat - Podejmij walkę ponownie - - - Only use on alive units - Utilisation uniquement sur les unités en vie - Nur bei lebenden Einheiten verwendbar - Utilizar solo en unidades vivas - Только для живых юнитов - Použitelné jen na živé jednotky - Używaj tylko na żywych jednostkach - - - Only use on dismounted inf - Utilisation uniquement sur les infanteries - Nur bei abgesessener Infanterie verwendbar - Utilizar solo en infanteria desmontada - Только для спеш. солдат - Použitelné jen na pěsích jednotkách - Używaj tylko na piechocie poza wszelkimi pojazdami - - - Nothing under mouse - Rien sous la souris - Es wurde nichts ausgewählt - Nada bajo el ratón - Объекты под мышью отсутствуют - Nic není vybráno - Nie ma nic pod kursorem - - + + + Take Prisoner + Gefangen nehmen + Tomar prisionero + Capturer le prisonnier + Weź więźnia + Zajmout Osobu + Arresta il Prigioniero + Tomar Prisioneiro + Foglyul ejtés + Взять в плен + + + Free Prisoner + Gefangenen freilassen + Liberar prisionero + Wypuść więźnia + Libérer le prisonnier + Osvobodit Zajatce + Libera il Prigioniero + Libertar Prisioneiro + Fogoly szabadon elengedése + Освободить пленника + + + Escort Prisoner + Gefangenen eskortieren + Escoltar prisionero + Eskortuj więźnia + Escorter le prisonnier + Eskortovat Zajatce + Scorta il Prigioniero + Escoltar Prisioneiro + Fogoly kísérése + Конвоировать пленника + + + Release Prisoner + Gefangenen loslassen + Soltar prisionero + Anuluj eskortowanie + Relâcher le prisonnier + Uvolnit Zajatce + Rilascia il Prigioniero + Largar Prisioneiro + Fogoly elengedése + Прекратить конвоирование + + + You need to take him as prisoner first! + Du musst ihn zuerst gefangen nehmen. + Necesitas hacerle prisionero primero! + Najpierw musisz wziąć go jako więźnia! + Vous devez d'abord le capturer! + Musíš ho nejdříve zajmout! + Prima devi arrestarlo! + Você deve tomá-lo como prisioneiro primeiro! + Először foglyul kell ejtened! + Вы должны сначала взять его в плен! + + + Load Captive + Gefangenen einladen + Cargar prisionero + Embarquer le prisonnier + Załaduj więźnia + Naložit zajatce + Fogoly berakása + Загрузить пленного + Embarcar Prisioneiro + + + Unload Captive + Gefangenen ausladen + Descargar prisionero + Débarquer le prisonnier + Wyładuj więźnia + Vyložit zajatce + Fogoly kivevése + Выгрузить пленного + Desembarcar Prisioneiro + + + Cable Tie + Kabelbinder + Opaska zaciskowa + Precinto + Serflex + Stahovací Pásek + Algema Plástica + Fascietta + Gyorskötöző + Кабельная стяжка + + + Cable ties that allow you to restrain prisoners. + Kabelbinder ermöglichen es, Gefangene zu fesseln. + Opaska zaciskowa pozwala na skrępowanie dłoni u więźnia. + Los precintos permiten maniatar prisioneros + Les Serflex permettent de menotter les prisonniers. + Stahovací pásky vám umožní zadržet vězně. + A algema plástica permite que você contenha prisioneiros. + Fascietta che ti consente di arrestare i prigionieri. + Gyorskötöző emberek fogjulejtéséhez. + Кабельные стяжки позволяют связывать пленников. + + + Inventory of frisked person + Inventar der durchsuchten Person + Inventaire de la fouille + Inventario de la persona cacheada + Motozott személy felszerelése + Inventář prohledávané osoby + Ekwipunek rewidowanej osoby + Инвентарь обысканных лиц + Inventário da pessoa revistada + + + Frisk person + Person durchsuchen + Fouiller + Cachear + Prohledávaná osoba + Rewiduj osobę + Motozás + Обыскать человека + Revistar + + + Surrender + Capituler + Kapitulieren + Rendirse + Vzdát se + Poddaj się + Сдаться в плен + + + Stop Surrendering + Annuler la capitulation + Den Kampf erneut aufnehmen + Dejar de rendirse + Přestat se vzdávat + Podejmij walkę ponownie + Отменить сдачу в плен + + + Only use on alive units + Utiliser uniquement sur unité vivante + Nur bei lebenden Einheiten verwendbar + Utilizar solo en unidades vivas + Použitelné jen na živé jednotky + Używaj tylko na żywych jednostkach + Применимо только к живым юнитам + + + Only use on dismounted inf + Utiliser uniquement sur personnel à pied + Nur bei abgesessener Infanterie verwendbar + Utilizar solo en infanteria desmontada + Použitelné jen na pěsích jednotkách + Używaj tylko na piechocie poza wszelkimi pojazdami + Применимо только к пехоте вне техники + + + Nothing under mouse + Rien sous la souris + Es wurde nichts ausgewählt + Nada bajo el ratón + Nic není vybráno + Nie ma nic pod kursorem + Ничего не выделено + + diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 8301e0a0bb..f29ff773a4 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -1,5 +1,4 @@  - @@ -44,7 +43,7 @@ Opciones ACE Ustawienia ACE Nastavení ACE - ACE Options + Options ACE ACE Настройки Opções do ACE ACE Opciók @@ -298,6 +297,7 @@ Без голоса Nincs hang Senza voce + Pas de voix Accept Requests @@ -306,7 +306,8 @@ Akceptuj prośby Přijmout žádost Accetta Richieste - Подтвердить запросы + Accepter requête + Принять запросы Decline Requests @@ -316,6 +317,7 @@ Zamítnout žádost Rifiuta Richieste Отклонить запросы + Rejeter requête Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions. @@ -325,6 +327,8 @@ Accetta le richieste degli altri giocatori. Queste possono riguardare l'uso o la condivisione dell'equipaggiamento, o di determinate azioni. Подтвердить запросы, посланные другими игроками. Это могут быть просьбы о передаче снаряжения или выполнении определённых действий. Přijimutí žádosti poslané jinými hráči. Mohou to být žádosti k použítí/sdílení vybavení nebo k vykonání určité činnosti. + Принять запросы, отправленные другими игроками. Например, запросы на использование/совместное использование снаряжения, выполнение определенных действий + Accepter les requêtes d'autres joueurs. Comme l'utilisation / l'échange d'équipement, la réalistion d'actions. Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions. @@ -334,6 +338,8 @@ Rifiuta le richieste degli altri giocatori. Queste possono riguardare l'uso o la condivisione dell'equipaggiamento, o di determinate azioni. Отклонить запросы, посланные другими игроками. Это могут быть просьбы о передаче снаряжения или выполнении определённых действий. Zamítnutí žádostii poslané jinými hráči. Mohou to být žádosti k použítí/sdílení vybavení nebo k vykonání určité činnosti. + Отклонить запросы, отправленные другими игроками. Например, запросы на использование/совместное использование снаряжения, выполнение определенных действий + Rejeter les requêtes d'autres joueurs. Comme l'utilisation / l'échange d'équipement, la réalistion d'actions. Feedback icons @@ -342,7 +348,7 @@ Icone informative Иконки состояний Ikony pomocnicze - Icônes de Feedback + Icones d'information Pomocné ikony @@ -352,7 +358,7 @@ Seleziona la posizione o disabilita le icone informative sul tuo schermo. Queste saranno mostrate per fornire informazioni aggiuntive sullo stato o sulle azioni del giocatore. Выберите положение или или отключите отображение иконок состояний на Вашем экране. Эти иконки предоставят дополнительную информацию о состоянии персонажа и выполняемых действиях. Ustaw pozycję lub wyłącz całkowicie ikony pomocnicze na ekranie. Te ikony dostarczają dodatkowych informacji na temat statusu Twojej postaci i wykonywanych przez nią akcji. - Sélectionner la position de ou désactiver les îcones de feedback sur votre écran. Ces îcones sont là pour vous fournir un feedback du statut votre personnage et les actions à effectuer. + Sélection de la position ou la désactivation des icones de feedback. Ces icones vous apportent des informations complémentaires sur votre status et sur les actions en cours. Nastavuje pozici nebo vypíná pomocné ikony. Tyto ikony ukazují extra informace ke stavu postavy a vykonávaných činností. @@ -362,17 +368,17 @@ Posizione della barra di avanzamento Положение прогресс-бара Lokalizacja paska postępu - Localisation de la barre de progression + Position de la barre de progression Pozice ukazetele průběhu činnosti Set the desired location of the progress bar on your screen. - Setze die gewünschte Position der Fortschrittsanzeige fest + Setze die gewünschte Position der Fortschrittsanzeige fest. Seleccionar la ubicación deseada de la barra de progreso en tu pantalla Modifica la posizione su schermo della barra di avanzamento. Установите желаемое положение строки состояния на экране. Ustaw pożądaną lokalizację paska postępu na ekranie - Définisez l'endroit que vous désirez pour faire appraître la barre de progression. + Appliquer la postion de la barre de progression sur l'écran Nastavuje pozici ukazetele průběhu činnosti na vaší obrazovce. @@ -382,7 +388,7 @@ Sfondo dei Suggerimenti Цвет фона всплывающих подсказок Kolor tła powiadomień - Couleur de fond des astuces + Notification: couleur de l'arrière plan Barva pozadí nápovědy @@ -392,7 +398,7 @@ Il colore di sfondo dei suggerimenti dell'ACE. Цвет фона всплывающий подсказок АСЕ. Kolor tła dla powiadomień ACE - Définisez la couleur de fond pour les astuces fournies par ACE. + Notifications ACE: couleur de l'arrière plan Barva pozadí ACE nápověd. @@ -402,17 +408,17 @@ Testo dei Suggerimenti Цвет шрифта всплывающих подсказок Kolor tekstu powiadomień - Couleur du texte des astuces + Notification: couleur du texte Barva fontu nápověd. 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. - Wähle die Textfarbe für ACE-Hinweise. + Wähle die Textfarbe für ACE-Hinweise. Die gewählte Farbe wird als Standartfarbe der Hinweise angezeigt, wenn der Hinweis selbst keine spezifische Farbe hat. El color del texto de las notificaciones del ACE. Este es el color predeterminado para todo el texto que se muestra a través del sistema de notificaciones del ACE, si el texto de notificación no tiene otro color especificado. Il colore del testo dei suggerimenti dell'ACE. Questo è il colore standard per tutti i caratteri mostrati dal sistema di suggerimenti dell'ACE, se questo non è altrimenti specificato. Цвет шрифта текста всплывающих подсказок АСЕ. Этот цвет является стандартным для всего текста, транслирующегося через систему подсказок АСЕ, если не установлено другого цвета для текста подсказок. Kolor tekstu dla powiadomień ACE. Ten kolor jest domyślnym dla wszystkich tekstów wyświetlanych poprzez System Powiadomień ACE, jeżeli dla powiadomienia nie określono innego koloru. - Définisez la couleur du texte des astuces fournies par ACE. La couleur est celle par défaut affichée à travers toutes les astuces de ACE seulement si aucune couleur n'est défnie. + Notification ACE: couleur du texte. C'est la couleur par défaut de tout texte afficher dans les notifications ACE, si aucune couleur n'est spécifiée pour les notifications 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. @@ -433,7 +439,11 @@ Una banana è un frutto commestibile, nello specifico una bacca cuoiosa, prodotto da un gran numero di grandi pianti erbacee dotate di fiori, della famiglia delle Musaceae. Банан - это съедобный фрукт, ягода с ботанической точки зрения, произрастающий на нескольких видах травянистых растениях рода Банан (Musa). 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 comestible, botaniquement une baie, produite par plusieurs types de grandes plantes herbacées à fleurs dans le genre Musa. + 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. - \ No newline at end of file + + Die Bananen (Musa) sind eine Pflanzengattung in der Familie der Bananengewächse (Musaceae) innerhalb der Einkeimblättrigen Pflanzen (Monokotyledonen). + + + diff --git a/addons/disarming/stringtable.xml b/addons/disarming/stringtable.xml index 69f0336808..e6820dbf16 100644 --- a/addons/disarming/stringtable.xml +++ b/addons/disarming/stringtable.xml @@ -1,11 +1,11 @@  - Open Inventory + Öffne Inventar Otwórz ekwipunek Otevřít inventář - \ No newline at end of file + diff --git a/addons/dragging/stringtable.xml b/addons/dragging/stringtable.xml index 51fcf43c0b..6e518f5068 100644 --- a/addons/dragging/stringtable.xml +++ b/addons/dragging/stringtable.xml @@ -1,53 +1,53 @@  - - - Drag - Тащить - Arrastrar - Ciągnij - Táhnout - Tracter - Ziehen - Arrastar - Trascina - Húzás - - - Release - Отпустить - Soltar - Puść - Položit - Lâcher - Loslassen - Largar - Lascia - Elengedés - - - Item to heavy - Gegenstand ist zu schwer - Articulo demasiado pesado - Przedmiot zbyt ciężki - Objet trop lourd - Não é possível carregar o item devido a seu peso - Non è possibile trascinare l'oggetto a causa del suo peso - Túl nehéz ahhoz, hogy elhúzd - Слишком тяжело - Moc težké - - - Carry - Tragen - Portar - Nieś - Porter - Nést - Carregar - Trascina - Felvesz - Нести - - + + + Drag + Тащить + Arrastrar + Ciągnij + Táhnout + Tracter + Ziehen + Arrastar + Trascina + Húzás + + + Release + Отпустить + Soltar + Puść + Položit + Lâcher + Loslassen + Largar + Lascia + Elengedés + + + Item to heavy + Gegenstand ist zu schwer + Articulo demasiado pesado + Przedmiot zbyt ciężki + Objet trop lourd + Não é possível carregar o item devido a seu peso + Non è possibile trascinare l'oggetto a causa del suo peso + Túl nehéz ahhoz, hogy elhúzd + Слишком тяжело + Moc težké + + + Carry + Tragen + Portar + Nieś + Porter + Nést + Carregar + Trascina + Felvesz + Нести + + diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index f0df907f16..44dde34452 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -1,5 +1,4 @@  - @@ -331,7 +330,7 @@ Zeitzünder Temporizador Czasomierz - Retard + Minuteur Časovač Cronometro Időzített @@ -355,7 +354,7 @@ Zeit einstellen Configurar tiempo Ustaw czas - Régler retard + Régler minuteur Nastavit Čas Modifica il conto alla rovescia Idő állítása @@ -403,7 +402,7 @@ Linka naciągu Cable trampa Stolperdraht - Fil de butée + Fil de détente Nástražný drát Filo a Inciampo Botlódrót @@ -496,7 +495,7 @@ Recoger Sebrat Podnieś - Prendre + Ramasser - \ No newline at end of file + diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml index 443646424a..3fa60aacf7 100644 --- a/addons/frag/stringtable.xml +++ b/addons/frag/stringtable.xml @@ -1,13 +1,14 @@ - - - Disable Fragmentation - Keine Schrapnelle - Zakázat fragmentaci granátů - Desactivar fragmentación - Wyłącz fragmentację odłamków - Выключить разлёт осколков - - + + + Disable Fragmentation + Keine Schrapnelle + Zakázat fragmentaci granátů + Desactivar fragmentación + Wyłącz fragmentację odłamków + Выключить разлёт осколков + Désactive la fragmentation + + diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index 9c6a107466..a29915d5f8 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -1,110 +1,110 @@  - - - Ear Plugs - Ohrenstöpsel - Tapones para los oídos - Stopery do uszu - Špunty - Беруши - Bouchons Anti-Bruits - Füldugó - Protetor auricular - Tappi auricolari - - - Protective Ear Plugs allow the wearer to be near loud weaponry without damage to his hearing. - Schützende Ohrenstöpsel, die es dem Träger ermöglichen, sich in der Nähe lauter Waffen aufzuhalten. - Los tapones para los oídos permiten al usuario operar armamento ruidoso sin sufrir pérdida de audición. - Stopery do uszu umożliwiają użytkownikowi przebywać w pobliżu głośnej broni bez poniesienia konsekwencji jaką jest utrata słuchu. - Ochranné špunty umožňují uživateli, aby neutrpěl zranění jeho sluchu v blízkosti hlasitých zbraní. - Беруши позволяют избежать потери слуха при близкой громкой стрельбе. - Bouchons Anti-Bruits pour la prévention des traumatismes sonores aigus. - 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 - Ohrenstöpsel drinnen - Poner tapones - Włóż stopery - Dát špunty do uší - Беруши надеты - Bouchons mis - Füldugó berakva - Protetores colocados - Indossa i tappi auricolari - - - Earplugs out - Ohrenstöpsel raus - Quitar tapones - Wyjmij stopery - Vyndat špunty z uší - Беруши сняты - Bouchons enlevés - Füldugó kivéve - Protetores retirados - Levati i tappi auricolari - - - Earplugs in - Ohrenstöpsel drinnen - Tapones puestos - Stopery włożone - Špunty v uších - Беруши надеты - Bouchons mis - Füldugó berakva - Protetores colocados - Indossa i tappi auricolari - - - Earplugs out - Ohrenstöpsel raus - Tapones quitados - Stopery wyjęte - Špunty venku z uší - Беруши сняты - Bouchons enlevés - Füldugó kivéve - Protetores retirados - Levati i tappi auricolari - - - You have no ear plugs - Keine Ohrenstöpsel im Inventar - No tienes tapones para los oídos - Nie masz stoperów - Nemáš žádné špunty - У вас нет беруш - Vous n'avez pas de Bouchons Anti-Bruits - Nincs füldugód - Você não possui protetores auriculares - Non hai i tappi auricolari - - - No inventory space - Kein Platz im Inventar - Sin espacio en el inventario - Brak miejsca w ekwipunku - Pas de place dans l'inventaire - Není místo v inventáři - Non hai abbastanza spazio - Não há espaço no inventário - Nincs több hely - Нет места в инвентаре - - - Disable ear ringing - Désactiver les tintements d'oreille - Desactivar zumbido de oídos - Отключить эффект баротравмы - Knalltrauma deaktivieren - Vypnout pískání v uších - Wyłącz dzwonienie w uszach - - + + + Ear Plugs + Ohrenstöpsel + Tapones para los oídos + Stopery do uszu + Špunty + Беруши + Bouchons Anti-Bruits + Füldugó + Protetor auricular + Tappi auricolari + + + Protective Ear Plugs allow the wearer to be near loud weaponry without damage to his hearing. + Schützende Ohrenstöpsel, die es dem Träger ermöglichen, sich in der Nähe lauter Waffen aufzuhalten ohne Gehörschäden davonzutragen.. + Los tapones para los oídos permiten al usuario operar armamento ruidoso sin sufrir pérdida de audición. + Stopery do uszu umożliwiają użytkownikowi przebywać w pobliżu głośnej broni bez poniesienia konsekwencji jaką jest utrata słuchu. + Ochranné špunty umožňují uživateli, aby neutrpěl zranění jeho sluchu v blízkosti hlasitých zbraní. + Беруши позволяют избежать потери слуха при близкой громкой стрельбе. + Bouchons Anti-Bruits pour la prévention des traumatismes sonores aigus. + 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 + Ohrenstöpsel rein + Poner tapones + Włóż stopery + Dát špunty do uší + Беруши надеты + Bouchons mis + Füldugó berakva + Protetores colocados + Indossa i tappi auricolari + + + Earplugs out + Ohrenstöpsel raus + Quitar tapones + Wyjmij stopery + Vyndat špunty z uší + Беруши сняты + Bouchons enlevés + Füldugó kivéve + Protetores retirados + Levati i tappi auricolari + + + Earplugs in + Ohrenstöpsel drinnen + Tapones puestos + Stopery włożone + Špunty v uších + Беруши надеты + Bouchons mis + Füldugó berakva + Protetores colocados + Indossa i tappi auricolari + + + Earplugs out + Ohrenstöpsel raus + Tapones quitados + Stopery wyjęte + Špunty venku z uší + Беруши сняты + Bouchons enlevés + Füldugó kivéve + Protetores retirados + Levati i tappi auricolari + + + You have no ear plugs + Keine Ohrenstöpsel im Inventar + No tienes tapones para los oídos + Nie masz stoperów + Nemáš žádné špunty + У вас нет беруш + Vous n'avez pas de Bouchons Anti-Bruits + Nincs füldugód + Você não possui protetores auriculares + Non hai i tappi auricolari + + + No inventory space + Kein Platz im Inventar + Sin espacio en el inventario + Brak miejsca w ekwipunku + Pas de place dans l'inventaire + Není místo v inventáři + Non hai abbastanza spazio + Não há espaço no inventário + Nincs több hely + Нет места в инвентаре + + + Disable ear ringing + Désactiver le bourdonnement + Desactivar zumbido de oídos + Отключить эффект баротравмы + Knalltrauma deaktivieren + Vypnout pískání v uších + Wyłącz dzwonienie w uszach + + diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index 0f718ded19..d10c6c93b7 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -1,50 +1,51 @@  - - - Always display cursor for self interaction - Immer den Cursor für Selbst-Interaktionen anzeigen. - Mostrar siempre el cursor para la interacción propia - Всегда показывать курсор для взаимодействия с собой - Zobrazit kurzor v menu pro vlastní interakci - Zawsze wyświetlaj kursor dla własnej interakcji - Toujours afficher le curseur pour les interactions sur soi-même - - - Interact Key - Fremdinteraktionsmenü-Taste - Tecla de interacción - Клавиша взаимодействия - Klávesa pro interakci - Klawisz interakcji - Touche d'interaction - - - Self Interaction Key - Eigeninteraktionsmenü-Taste - Tecla de interacción propia - Клавиша взаимодействия (с собой) - Klávesa pro vlastní interakci - Klawisz własnej interakcji - Touche d'Interaction sur soi-même - - - Self Actions - Selbst-Aktionen - Acciones propias - Действия с собой - Vlastní akce - Własne akcje - Actions sur soi-même - - - Vehicle Actions - Fahrzeug-Aktionen - Acciones de vehículo - Действия на транспорте - Interakce s vozidly - Akcje pojazdu - Actions sur les véhicules - - + + + Always display cursor for self interaction + Toujours afficher le curseur pour l'interaction personnelle + Immer den Cursor für Selbst-Interaktionen anzeigen. + Mostrar siempre el cursor para la interacción propia + Всегда показывать курсор для взаимодействия с собой + Zobrazit kurzor v menu pro vlastní interakci + Zawsze wyświetlaj kursor dla własnej interakcji + Toujours afficher le curseur pour les interactions sur soi-même + + + Interact Key + Fremdinteraktionsmenü-Taste + Tecla de interacción + Клавиша взаимодействия + Klávesa pro interakci + Klawisz interakcji + Touche d'interaction + + + Self Interaction Key + Eigeninteraktionsmenü-Taste + Tecla de interacción propia + Клавиша взаимодействия (с собой) + Klávesa pro vlastní interakci + Klawisz własnej interakcji + Touche d'interaction personnelle + + + Self Actions + Selbst-Aktionen + Acciones propias + Действия с собой + Vlastní akce + Własne akcje + Interaction personnelle + + + Vehicle Actions + Fahrzeug-Aktionen + Acciones de vehículo + Действия на транспорте + Interakce s vozidly + Akcje pojazdu + Interaction véhicule + + diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index cf0349af5c..d28756364b 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -1,706 +1,718 @@  - - - Interactions - Interaktionen - Interacciones - Interakce - Interakcje - Interactions - - - Torso - Torso - Torso - Trup - Tors - Torse - - - Head - Kopf - Cabeza - Hlava - Głowa - Tête - - - Left Arm - Linker Arm - Brazo izquierdo - Levá paže - Lewe ramię - Bras Gauche - - - Right Arm - Rechter Arm - Brazo derecho - Pravá paže - Prawe ramię - Bras Droit - - - Left Leg - Linkes Bein - Pierna izquierda - Levá noha - Lewa noga - Jambe Gauche - - - Right Leg - Rechtes Bein - Pierna derecha - Pravá hona - Prawa noga - Jambe Droite - - - Weapon - Waffe - Arma - Zbraň - Broń - Arme - - - Interaction Menu - Interaktionsmenü - Menú de interacción - Menu interakcji - Menu interakce - Menu d'interaction - Меню взаимодействия - Interakció - Menu de Interação - Menù Interattivo - - - Interaction Menu (Self) - Interaktionsmenü (Selbst) - Menú de interacción (Propia) - Menu interakcji (własne) - Menu interakce (vlastní) - Menu d'interaction (Perso) - Меню взаимодействия (с собой) - Interakció (saját) - Menu de Interação (Individual) - Menù Interattivo (Individuale) - - - Open / Close Door - Tür öffnen / schließen - Abrir / Cerrar puerta - Otwórz / Zamknij drzwi - Otevřít / Zavřít dveře - Ouvrir / Fermer Portes - Открыть / Закрыть двери - Ajtó nyitás / zárás - Abrir / Fechar Porta - Apri / Chiudi la porta - - - Lock Door - Tür sperren - Bloquear puerta - Verrouiller Porte - Blocca la porta - Заблокировать дверь - Trancar Porta - Ajtó bezárása - Zablokuj drzwi - Zamknout dveře - - - Unlock Door - Tür entsperren - Desbloquear puerta - Déverrouiller Porte - Sblocca la porta - Разблокировать дверь - Destrancar Porta - Zár kinyitása - Odblokuj drzwi - Odemknout dveře - - - Locked Door - Tür gesperrt - Puerta bloqueada - Porte Verrouillée - Porta bloccata - Дверь заблокирована - Porta Trancada - Zárt ajtó - Zablokowano drzwi - Zamčené dveře - - - Unlocked Door - Tür entsperrt - Puerta desbloqueada - Porte Déverrouillée - Porta sbloccata - Дверь разблокирована - Porta Destrancada - Nyitott ajtó - Odblokowano drzwi - Odemčené dveře - - - Join group - Gruppe beitreten - Unirse al grupo - Dołącz do grupy - Přidat se do skupiny - Rejoindre Groupe - Вступить в группу - Csatlakozás - Unir-se ao grupo - Unisciti alla squadra - - - Leave Group - Gruppe verlassen - Dejar grupo - Opuść grupę - Opustit skupinu - Quitter Groupe - Выйти из группы - Csoport elhagyása - Deixar grupo - Lascia la squadra - - - Become Leader - Grp.-führung übern. - Asumir el liderazgo - Przejmij dowodzenie - Stát se velitelem - Devenir Leader - Стать лидером - Vezetés átvétele - Tornar-se Líder - Prendi il comando - - - DANCE! - TANZEN! - BAILAR! - TAŃCZ! - TANČIT! - Danse! - ТАНЦЕВАТЬ! - TÁNC! - DANCE! - Balla! - - - Stop Dancing - Tanzen abbrechen - Dejar de bailar - Przestań tańczyć - Přestat tancovat - Arrêter de danser - Прекратить танцевать - Tánc abbahagyása - Parar de dançar - Smetti di ballare - - - << Back - << Zurück - << Atrás - << Wstecz - << Zpět - << Retour - << Назад - << Vissza - << Voltar - << Indietro - - - Gestures - Gesten - Gestos - Gesty - Posunky - Signaux - Жесты - Kézjelek - Gestos - Segnali gestuali - - - Attack - Angreifen - Atacar - Do ataku - Zaútočit - Attaquer - Атаковать - Támadás - Atacar - Attaccare - - - Advance - Vordringen - Avanzar - Naprzód - Postoupit - Avancer - Продвигаться - Előre - Avançar - Avanzare - - - Go - Los - Adelante - Szybko - Jít - Aller - Идти - Mozgás - Mover-se - Muoversi - - - Follow - Folgen - Seguirme - Za mną - Následovat - Suivre - Следовать - Utánam - Seguir - Seguire - - - Point - Zeigen - Señalar - Wskazać - Ukázat - Pointer - Точка - Mutat - Apontar - Puntare a - - - Up - Aufstehen - Arriba - Do góry - Vztyk - Debout - Вверх - Fel - Acima - Alzarsi - - - Cover - Deckung - Cubrirse - Do osłony - Krýt se - A couvert - Укрыться - Fedezékbe - Proteger-se - Copertura - - - Cease Fire - Feuer einstellen - Alto el fuego - Wstrzymać ogień - Zastavit palbu - Halte au feu - Прекратить огонь - Tüzet szüntess - Cessar Fogo - Cessare il Fuoco - - - Freeze - Keine Bewegung - Alto - Stać - Stát - Halte - Замереть - Állj - Alto - Fermi - - - Hi - Hallo - Hola - Witaj - Ahoj - Salut - Привет - Szeva - Olá - Ciao - - - Yes - Ja - Si - Tak - Ano - Oui - Да - Igen - Sim - Si - - - No - Nein - No - Nie - Ne - Non - Нет - Nem - Não - No - - - Put weapon on back - Waffe wegstecken - Arma a la espalda - Umieść broń na plecach - Dát zbraň na záda - Arme à la bretelle - Повесить оружие на спину - Fegyvert hátra - Colocar arma nas costas - Metti l'arma in spalla - - - Tap Shoulder - Auf Schulter klopfen - Tocar el hombro - Klepnij w ramię - Poklepat na rameno - Taper sur l'épaule - Похлопать по плечу - Vállveregetés - Tocar ombro - Dai un colpetto - - - You were tapped on the RIGHT shoulder - Te tocaron el hombro DERECHO - Dir wurde auf die Rechte Schulter geklopft - On te tape sur l'épaule - Zostałeś klepnięty po ramieniu - Vállonveregettek - Někdo tě poklepal na PRAVÉ rameno - Вас похлопали по плечу - Você foi tocado no ombro - Ti è stato dato un colpetto sulla spalla - - - You were tapped on the LEFT shoulder. - Te tocaron el hombro IZQUIERDO. - Dir wurde auf die Linke Schulter geklopft - On te tape sur l'épaule. - Zostałeś klepnięty po ramieniu - Vállonveregettek - Někdo tě poklepal na LEVÉ rameno - Вас похлопали по плечу - Você foi tocado no ombro. - Ti è stato dato un colpetto sulla spalla - - - Cancel - Abbrechen - Cancelar - Anuluj - Annuler - Zrušit - Annulla - Отменить - Cancelar - Mégse - - - Select - Wählen - Seleccionar - Wybierz - Sélectionner - Zvolit - Seleziona - Выбрать - Selecionar - Kiválaszt - - - Go Away! - Geh Weg! - Aléjate! - Odejdź! - Jděte pryč! - Allez-vous-en! - Уходите отсюда! - Tűnés! - Vá Embora! - Via di qui! - - - Get Down! - Auf Den Boden! - Al suelo! - Padnij! - K zemi! - A terre! - A földre! - Ложись! - Abaixe-se! - A Terra! - - - Team<br/>Management - Team<br/>Management - Gestión<br/>de equipo - Gestion<br/>d'équipe - Zarządzanie<br/>oddziałem - Správa<br/>týmu - Управление<br/>группой - Gerenciamento<br/>de Equipe - Organizzazione<br/>Squadra - Csapat<br/>kezelés - - - Red - Rot - Rojo - Rouge - Czerwony - Červený - Красный - Vermelha - Rosso - Piros - - - Green - Grün - Verde - Vert - Zielony - Zelený - Зеленый - Verde - Verde - Zöld - - - Blue - Blau - Azul - Bleu - Niebieski - Modrý - Синий - Azul - Blu - Kék - - - Yellow - Gelb - Amarillo - Jaune - Żółty - Žlutý - Желтый - Amarela - Giallo - Sárga - - - Join Team<br/>Red - Team Rot<br/>beitreten - Unirse al<br/>equipo rojo - Rejoindre<br/>Rouge - Dołącz do drużyny<br/>czerwonej - Připojit do<br/>Červeného týmu - Присоединиться<br/>к красной группе - Unir-se à<br/>Equipe Vermelha - Entra nella<br/>Squadra Rossa - Csatlakozás a<br/>piros csapathoz - - - Join Team<br/>Green - Team Grün<br/>beitreten - Unirse al<br/>equipo verde - Rejoindre<br/>Verte - Dołącz do<br/>drużyny zielonej - Připojit do<br/>Zeleného týmu - Присоединиться<br/>к зеленой группе - Unir-se à<br/>Equipe Verde - Entra nella<br/>Squadra Verde - Csatlakozás a<br/>zöld csapathoz - - - Join Team<br/>Blue - Team Blau<br/>beitreten - Unirse al<br/>equipo azul - Rejoindre<br/>Bleue - Dołącz do<br/>drużyny niebieskiej - Připojit do<br/>Modrého týmu - Присоединиться<br/>к синей группе - Unir-se à<br/>Equipe Azul - Entra nella<br/>Squadra Blu - Csatlakozás a<br/>kék csapathoz - - - Join Team<br/>Yellow - Team Gelb<br/>beitreten - Unirse al<br/>equipo amarillo - Rejoindre<br/>Jaune - Dołącz do<br/>drużyny żółtej - Připojit do<br/>Žlutého týmu - Присоединиться<br/>к желтой группе - Unir-se à<br/>Equipe Amarela - Entra nella<br/>Squadra Gialla - Csatlakozás a<br/>sárga csapathoz - - - You joined Team %1 - Du bist Team %1 beigetreten - Te has unido al equipo %1 - Tu as rejoint l'équipe %1 - Dołączyłeś do drużyny %1 - Připojil ses do %1 týmu - Вы присоединились к группе %1 - Você uniu-se à Equipe %1 - Sei entrato nella Squadra %1 - Csatlakoztál a %1 csapathoz - - - Leave Team - Team verlassen - Dejar equipo - Quitter l'équipe - Opuść drużynę - Opustit tým - Покинуть группу - Deixar Equipe - Lascia la Squadra - Csapat elhagyása - - - You left the Team - Du hast das Team verlassen - Has dejado el equipo - Tu as quitté l'équipe - Opuściłeś drużynę - Opustil si tým - Вы покинули группу - Você deixou a Equipe - Hai lasciato la squadra - Elhagytad a csapatot - - - Pardon - Begnadigen - Perdonar - Przebacz - Pardon - Pardon - Извините - Perdão - Perdona - Megbocsátás - - - Scroll - Scrollen - Przewiń - Défilement - Desplazar - Пролистать - Rolar - Scorri - Görgetés - Otáčení - - - Modifier Key - Modifikator - Modyfikator - Modifier la touche - Tecla modificadora - Клавиша-модификатор - Tecla Modificadora - Modifica Tasto - Módosító billentyű - Modifikátor - - - Not in Range - Außer Reichweite - Hors de portée. - Fuera de rango - Слишком далеко - Fora do Alcançe - Hatótávolságon kívül - Poza zasięgiem - Mimo dosah - - - Equipment - Ausrüstung - Equipamiento - Équipment - Ekwipunek - Vybavení - Felszerelés - Снаряжение - - - Push - Schieben - Empujar - Pousser - Pchnij - Odstrčit - Tolás - Толкать - - - Interact - Interagir - Interagiere - Interakce - Взаимодействовать - Interakcja - Interactuar - - - Passengers - Fahrzeuginsassen - Pasajeros - Пассажиры - Pasažéři - Pasażerowie - Passagers - - + + + Interactions + Interaktionen + Interacciones + Interakce + Interakcje + Interactions + Взаимодействия + + + Torso + Torse + Torso + Torso + Trup + Tors + Torse + Торс + + + Head + Tête + Kopf + Cabeza + Hlava + Głowa + Tête + Голова + + + Left Arm + Linker Arm + Brazo izquierdo + Levá paže + Lewe ramię + Bras gauche + Левая рука + + + Right Arm + Rechter Arm + Brazo derecho + Pravá paže + Prawe ramię + Bras droit + Правая рука + + + Left Leg + Linkes Bein + Pierna izquierda + Levá noha + Lewa noga + Jambe gauche + Левая нога + + + Right Leg + Rechtes Bein + Pierna derecha + Pravá hona + Prawa noga + Jambe droite + Правая нога + + + Weapon + Arme + Waffe + Arma + Zbraň + Broń + Arme + Оружие + + + Interaction Menu + Interaktionsmenü + Menú de interacción + Menu interakcji + Menu interakce + Menu d'interaction + Меню взаимодействия + Interakció + Menu de Interação + Menù Interattivo + + + Interaction Menu (Self) + Interaktionsmenü (Selbst) + Menú de interacción (Propia) + Menu interakcji (własne) + Menu interakce (vlastní) + Menu d'interaction (Perso) + Меню взаимодействия (с собой) + Interakció (saját) + Menu de Interação (Individual) + Menù Interattivo (Individuale) + + + Open / Close Door + Tür öffnen / schließen + Abrir / Cerrar puerta + Otwórz / Zamknij drzwi + Otevřít / Zavřít dveře + Ouvrir / Fermer Portes + Открыть / Закрыть двери + Ajtó nyitás / zárás + Abrir / Fechar Porta + Apri / Chiudi la porta + + + Lock Door + Tür sperren + Bloquear puerta + Verrouiller Porte + Blocca la porta + Заблокировать дверь + Trancar Porta + Ajtó bezárása + Zablokuj drzwi + Zamknout dveře + + + Unlock Door + Tür entsperren + Desbloquear puerta + Déverrouiller Porte + Sblocca la porta + Разблокировать дверь + Destrancar Porta + Zár kinyitása + Odblokuj drzwi + Odemknout dveře + + + Locked Door + Tür gesperrt + Puerta bloqueada + Porte Verrouillée + Porta bloccata + Дверь заблокирована + Porta Trancada + Zárt ajtó + Zablokowano drzwi + Zamčené dveře + + + Unlocked Door + Tür entsperrt + Puerta desbloqueada + Porte Déverrouillée + Porta sbloccata + Дверь разблокирована + Porta Destrancada + Nyitott ajtó + Odblokowano drzwi + Odemčené dveře + + + Join group + Gruppe beitreten + Unirse al grupo + Dołącz do grupy + Přidat se do skupiny + Rejoindre Groupe + Вступить в группу + Csatlakozás + Unir-se ao grupo + Unisciti alla squadra + + + Leave Group + Gruppe verlassen + Dejar grupo + Opuść grupę + Opustit skupinu + Quitter Groupe + Выйти из группы + Csoport elhagyása + Deixar grupo + Lascia la squadra + + + Become Leader + Grp.-führung übern. + Asumir el liderazgo + Przejmij dowodzenie + Stát se velitelem + Devenir Leader + Стать лидером + Vezetés átvétele + Tornar-se Líder + Prendi il comando + + + DANCE! + TANZEN! + BAILAR! + TAŃCZ! + TANČIT! + Danse! + ТАНЦЕВАТЬ! + TÁNC! + DANCE! + Balla! + + + Stop Dancing + Tanzen abbrechen + Dejar de bailar + Przestań tańczyć + Přestat tancovat + Arrêter de danser + Прекратить танцевать + Tánc abbahagyása + Parar de dançar + Smetti di ballare + + + << Back + << Zurück + << Atrás + << Wstecz + << Zpět + << Retour + << Назад + << Vissza + << Voltar + << Indietro + + + Gestures + Gesten + Gestos + Gesty + Posunky + Signaux + Жесты + Kézjelek + Gestos + Segnali gestuali + + + Attack + Angreifen + Atacar + Do ataku + Zaútočit + Attaquer + Атаковать + Támadás + Atacar + Attaccare + + + Advance + Vordringen + Avanzar + Naprzód + Postoupit + Avancer + Продвигаться + Előre + Avançar + Avanzare + + + Go + Los + Adelante + Szybko + Jít + Aller + Идти + Mozgás + Mover-se + Muoversi + + + Follow + Folgen + Seguirme + Za mną + Následovat + Suivre + Следовать + Utánam + Seguir + Seguire + + + Point + Zeigen + Señalar + Wskazać + Ukázat + Pointer + Точка + Mutat + Apontar + Puntare a + + + Up + Aufstehen + Arriba + Do góry + Vztyk + Debout + Вверх + Fel + Acima + Alzarsi + + + Cover + Deckung + Cubrirse + Do osłony + Krýt se + A couvert + Укрыться + Fedezékbe + Proteger-se + Copertura + + + Cease Fire + Feuer einstellen + Alto el fuego + Wstrzymać ogień + Zastavit palbu + Halte au feu + Прекратить огонь + Tüzet szüntess + Cessar Fogo + Cessare il Fuoco + + + Freeze + Keine Bewegung + Alto + Stać + Stát + Halte + Замереть + Állj + Alto + Fermi + + + Hi + Hallo + Hola + Witaj + Ahoj + Salut + Привет + Szeva + Olá + Ciao + + + Yes + Ja + Si + Tak + Ano + Oui + Да + Igen + Sim + Si + + + No + Nein + No + Nie + Ne + Non + Нет + Nem + Não + No + + + Put weapon on back + Waffe wegstecken + Arma a la espalda + Umieść broń na plecach + Dát zbraň na záda + Arme à la bretelle + Повесить оружие на спину + Fegyvert hátra + Colocar arma nas costas + Metti l'arma in spalla + + + Tap Shoulder + Auf Schulter klopfen + Tocar el hombro + Klepnij w ramię + Poklepat na rameno + Taper sur l'épaule + Похлопать по плечу + Vállveregetés + Tocar ombro + Dai un colpetto + + + You were tapped on the RIGHT shoulder + Te tocaron el hombro DERECHO + Dir wurde auf die rechte Schulter geklopft + On te tape sur l'épaule droite + Zostałeś klepnięty po ramieniu + Vállonveregettek + Někdo tě poklepal na PRAVÉ rameno + Вас похлопали по ПРАВОМУ плечу + Você foi tocado no ombro + Ti è stato dato un colpetto sulla spalla + + + You were tapped on the LEFT shoulder. + Te tocaron el hombro IZQUIERDO. + Dir wurde auf die linke Schulter geklopft + On te tape sur l'épaule gauche + Zostałeś klepnięty po ramieniu + Vállonveregettek + Někdo tě poklepal na LEVÉ rameno + Вас похлопали по ЛЕВОМУ плечу + Você foi tocado no ombro. + Ti è stato dato un colpetto sulla spalla + + + Cancel + Abbrechen + Cancelar + Anuluj + Annuler + Zrušit + Annulla + Отменить + Cancelar + Mégse + + + Select + Wählen + Seleccionar + Wybierz + Sélectionner + Zvolit + Seleziona + Выбрать + Selecionar + Kiválaszt + + + Go Away! + Geh Weg! + Aléjate! + Odejdź! + Jděte pryč! + Allez-vous-en! + Уходите отсюда! + Tűnés! + Vá Embora! + Via di qui! + + + Get Down! + Auf Den Boden! + Al suelo! + Padnij! + K zemi! + A terre! + A földre! + Ложись! + Abaixe-se! + A Terra! + + + Team<br/>Management + Team<br/>Management + Gestión<br/>de equipo + Gestion<br/>d'équipe + Zarządzanie<br/>oddziałem + Správa<br/>týmu + Управление<br/>группой + Gerenciamento<br/>de Equipe + Organizzazione<br/>Squadra + Csapat<br/>kezelés + + + Red + Rot + Rojo + Rouge + Czerwony + Červený + Красный + Vermelha + Rosso + Piros + + + Green + Grün + Verde + Vert + Zielony + Zelený + Зеленый + Verde + Verde + Zöld + + + Blue + Blau + Azul + Bleu + Niebieski + Modrý + Синий + Azul + Blu + Kék + + + Yellow + Gelb + Amarillo + Jaune + Żółty + Žlutý + Желтый + Amarela + Giallo + Sárga + + + Join Team<br/>Red + Team Rot<br/>beitreten + Unirse al<br/>equipo rojo + Rejoindre<br/>Rouge + Dołącz do drużyny<br/>czerwonej + Připojit do<br/>Červeného týmu + Присоединиться<br/>к красной группе + Unir-se à<br/>Equipe Vermelha + Entra nella<br/>Squadra Rossa + Csatlakozás a<br/>piros csapathoz + + + Join Team<br/>Green + Team Grün<br/>beitreten + Unirse al<br/>equipo verde + Rejoindre<br/>Verte + Dołącz do<br/>drużyny zielonej + Připojit do<br/>Zeleného týmu + Присоединиться<br/>к зеленой группе + Unir-se à<br/>Equipe Verde + Entra nella<br/>Squadra Verde + Csatlakozás a<br/>zöld csapathoz + + + Join Team<br/>Blue + Team Blau<br/>beitreten + Unirse al<br/>equipo azul + Rejoindre<br/>Bleue + Dołącz do<br/>drużyny niebieskiej + Připojit do<br/>Modrého týmu + Присоединиться<br/>к синей группе + Unir-se à<br/>Equipe Azul + Entra nella<br/>Squadra Blu + Csatlakozás a<br/>kék csapathoz + + + Join Team<br/>Yellow + Team Gelb<br/>beitreten + Unirse al<br/>equipo amarillo + Rejoindre<br/>Jaune + Dołącz do<br/>drużyny żółtej + Připojit do<br/>Žlutého týmu + Присоединиться<br/>к желтой группе + Unir-se à<br/>Equipe Amarela + Entra nella<br/>Squadra Gialla + Csatlakozás a<br/>sárga csapathoz + + + You joined Team %1 + Du bist Team %1 beigetreten + Te has unido al equipo %1 + Tu as rejoint l'équipe %1 + Dołączyłeś do drużyny %1 + Připojil ses do %1 týmu + Вы присоединились к группе %1 + Você uniu-se à Equipe %1 + Sei entrato nella Squadra %1 + Csatlakoztál a %1 csapathoz + + + Leave Team + Team verlassen + Dejar equipo + Quitter l'équipe + Opuść drużynę + Opustit tým + Покинуть группу + Deixar Equipe + Lascia la Squadra + Csapat elhagyása + + + You left the Team + Du hast das Team verlassen + Has dejado el equipo + Tu as quitté l'équipe + Opuściłeś drużynę + Opustil si tým + Вы покинули группу + Você deixou a Equipe + Hai lasciato la squadra + Elhagytad a csapatot + + + Pardon + Begnadigen + Perdonar + Przebacz + Pardon + Pardon + Извините + Perdão + Perdona + Megbocsátás + + + Scroll + Scrollen + Przewiń + Défilement + Desplazar + Пролистать + Rolar + Scorri + Görgetés + Otáčení + + + Modifier Key + Modifikator Taste + Modyfikator + Modifier la touche + Tecla modificadora + Клавиша-модификатор + Tecla Modificadora + Modifica Tasto + Módosító billentyű + Modifikátor + + + Not in Range + Außer Reichweite + Hors de portée. + Fuera de rango + Слишком далеко + Fora do Alcançe + Hatótávolságon kívül + Poza zasięgiem + Mimo dosah + + + Equipment + Ausrüstung + Equipamiento + Équipement + Ekwipunek + Vybavení + Felszerelés + Снаряжение + + + Push + Schieben + Empujar + Pousser + Pchnij + Odstrčit + Tolás + Толкать + + + Interact + Interagir + Interagiere + Interagir + Interakce + Взаимодействовать + Interakcja + Interactuar + + + Passengers + Fahrzeuginsassen + Pasajeros + Пассажиры + Pasažéři + Pasażerowie + Passagers + + diff --git a/addons/inventory/stringtable.xml b/addons/inventory/stringtable.xml index 5505d6b505..0702f677fa 100644 --- a/addons/inventory/stringtable.xml +++ b/addons/inventory/stringtable.xml @@ -1,23 +1,23 @@  - - - Make Inventory Display Bigger - Erhöhe die angezeigte Inventargröße - Hacer la pantalla de inventario mas grande - Сделать окно инвентаря больше - Zvětšit zobrazení inventáře - Powiększ UI ekwipunku - Augmente la taille d'affichage de l'inventaire - - - 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. - Im Regelfall wird die Inventargröße durch die Größe der Nutzeroberfläche bestimmt. Diese Einstellung erlaubt es das Inventar unter Ausschluss der Schriftgröße zu vergrößern. Dadurch können mehr Gegenstände angezeigt werden. - Normalmente la pantalla de inventario se escala por el tamaño de la interfaz de usuario. Esto permite ampliar el tamaño de la interfaz de usuario de inventario, pero no aumenta el tamaño de fuente, permitiendo mostrar más filas. - Обычно, окно инвентаря зависит от размеров пользовательского интерфейса. Эта настройка позволяет увеличить размер окна инвентаря в пользовательском интерфейсе, не увеличивая размера шрифтов, так что отображется большее количество строк. - Normálně se velikost invetáře škáluje s velikostí UI. Toto nastavení dovoluje škálování velikost inventáře ale nežvětšuje velikost fontu. To dovoluje zobrazení více řad v inventáři. - Ekwipunek skalowany jest poprzez rozmiar UI. Ta opcja pozwala powiększyć rozmiar UI ekwipunku, lecz nie zwiększa rozmiaru fontu pozwalając na wyświetlanie większej ilości wierszy. - Normalement, l'inventaire est automatiquement mesuré par la taille de l'interface de l'utilisateur. Cette option vous permet d'augmenter la taille d'affichage de l'inventaire, cependant, cette option n'augmente pas la police d'écriture et le nombre de place. - - + + + Make Inventory Display Bigger + Erhöhe die angezeigte Inventargröße + Hacer la pantalla de inventario mas grande + Сделать окно инвентаря больше + Zvětšit zobrazení inventáře + Powiększ UI ekwipunku + Agrandir la taille d'affichage de l'inventaire + + + 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. + Im Regelfall wird die Inventargröße durch die Größe der Nutzeroberfläche bestimmt. Diese Einstellung erlaubt es das Inventar unter Ausschluss der Schriftgröße zu vergrößern. Dadurch können mehr Gegenstände angezeigt werden. + Normalmente la pantalla de inventario se escala por el tamaño de la interfaz de usuario. Esto permite ampliar el tamaño de la interfaz de usuario de inventario, pero no aumenta el tamaño de fuente, permitiendo mostrar más filas. + Обычно, окно инвентаря зависит от размеров пользовательского интерфейса. Эта настройка позволяет увеличить размер окна инвентаря в пользовательском интерфейсе, не увеличивая размера шрифтов, так что отображется большее количество строк. + Normálně se velikost invetáře škáluje s velikostí UI. Toto nastavení dovoluje škálování velikost inventáře ale nežvětšuje velikost fontu. To dovoluje zobrazení více řad v inventáři. + Ekwipunek skalowany jest poprzez rozmiar UI. Ta opcja pozwala powiększyć rozmiar UI ekwipunku, lecz nie zwiększa rozmiaru fontu pozwalając na wyświetlanie większej ilości wierszy. + L'inventaire est normalement affiché en fonction de la taille de l'UI. Cette option permet d'agrandir l'affichage de l'inventaire, mais n'a aucun effet sur la taille des polices permettant d'afficher plus de ligne + + diff --git a/addons/javelin/RscInGameUI.hpp b/addons/javelin/RscInGameUI.hpp index 8c73f3d8d1..8b33c95c01 100644 --- a/addons/javelin/RscInGameUI.hpp +++ b/addons/javelin/RscInGameUI.hpp @@ -12,20 +12,10 @@ class RscLine; class RscInGameUI { class ACE_RscOptics_javelin { idd = 300; - controls[] = { "ACE_javelin_elements_group", "CA_Distance", "ACE_Targeting" }; //, "ACE_TargetingConstrains", "ACE_TargetingGate", "ACE_TargetingLines"}; + controls[] = { "ACE_javelin_elements_group", "ACE_Targeting" }; //, "ACE_TargetingConstrains", "ACE_TargetingGate", "ACE_TargetingLines"}; onLoad = QUOTE(_this call FUNC(onOpticLoad)); onUnload = "uiNameSpace setVariable ['ACE_RscOptics_javelin',nil];uiNameSpace setVariable ['ACE_RscOptics_javelin_PFH',nil];"; - class CA_Distance: RscOpticsValue { - idc = 151; - sizeEx = "0"; - colorText[] = {0,0,0,0}; - x = 0; - y = 0; - w = 0; - h = 0; - }; - class ACE_javelin_elements_group: RscControlsGroup { x = "SafezoneX"; @@ -45,6 +35,16 @@ class RscInGameUI { height = 0.001; }; class Controls { + class CA_Distance: RscOpticsValue { + idc = 151; + sizeEx = "0"; + colorText[] = {0,0,0,0}; + x = 0; + y = 0; + w = 0; + h = 0; + }; + class ACE_javelin_Day_mode_off: RscPicture { idc = 1001; x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (0.03/4)*3*SafezoneH - SafezoneX"; @@ -58,7 +58,7 @@ class RscInGameUI { idc = 160; colorText[] = {0.2941,0.8745,0.2157,1}; }; - class ACE_javelin_WFOV_mode_off: ACE_javelin_Day_mode_off { + class CA_Javelin_WFOV_mode_off : ACE_javelin_Day_mode_off { idc = 1004; 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"; @@ -81,13 +81,6 @@ class RscInGameUI { height = 0.001; }; class Controls { - class ACE_javelin_WFOV_mode: ACE_javelin_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"; @@ -130,10 +123,10 @@ class RscInGameUI { h = 0; colorText[] = {0.2941,0.8745,0.2157,1}; }; - */ + }; }; - class ACE_javelin_NFOV_mode_off: ACE_javelin_Day_mode_off { + class CA_Javelin_NFOV_mode_off: ACE_javelin_Day_mode_off { idc = 1003; 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"; @@ -156,13 +149,6 @@ class RscInGameUI { height = 0.001; }; class Controls { - class ACE_javelin_NFOV_mode: ACE_javelin_NFOV_mode_off { - idc = 699003; - 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"; @@ -205,7 +191,7 @@ class RscInGameUI { h = "0.1895*SafezoneH"; colorText[] = {0.2941,0.8745,0.2157,1}; }; - */ + }; }; diff --git a/addons/javelin/functions/fnc_cycleFireMode.sqf b/addons/javelin/functions/fnc_cycleFireMode.sqf index 4fed8e05cc..2245bb71e5 100644 --- a/addons/javelin/functions/fnc_cycleFireMode.sqf +++ b/addons/javelin/functions/fnc_cycleFireMode.sqf @@ -4,10 +4,10 @@ TRACE_1("enter", _this); private["_player", "_currentFireMode"]; -_currentFireMode = ACE_player getVariable["ace_missileguidance_attackProfile", "TOP"]; -if(_currentFireMode == "LIN") then { - _currentFireMode = "TOP"; +_currentFireMode = ACE_player getVariable["ace_missileguidance_attackProfile", "JAV_TOP"]; +if(_currentFireMode == "JAV_DIR") then { + _currentFireMode = "JAV_TOP"; } else { - _currentFireMode = "LIN"; + _currentFireMode = "JAV_DIR"; }; ACE_player setVariable["ace_missileguidance_attackProfile", _currentFireMode, false]; diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf index 2412c2d5a1..85877f1f16 100644 --- a/addons/javelin/functions/fnc_onOpticDraw.sqf +++ b/addons/javelin/functions/fnc_onOpticDraw.sqf @@ -3,9 +3,8 @@ TRACE_1("enter", _this); #define __TRACKINTERVAL 0 // how frequent the check should be. -#define __LOCKONTIME 3.0 // Lock on won't occur sooner -#define __LOCKONTIMERANDOM 0.3 // Deviation in lock on time -#define __SENSORSQUARE 1 // Locking on sensor square side in angles +#define __LOCKONTIME 3 // Lock on won't occur sooner + #define __OffsetX ((ctrlPosition __JavelinIGUITargetingLineV) select 0) - 0.5 #define __OffsetY ((ctrlPosition __JavelinIGUITargetingLineH) select 1) - 0.5 @@ -40,6 +39,7 @@ _currentTarget = _args select 1; _runTime = _args select 2; _lockTime = _args select 3; _soundTime = _args select 4; +_randomLockInterval = _args select 5; // Find a target within the optic range _newTarget = objNull; @@ -52,10 +52,16 @@ if ((velocity ACE_player) distance [0,0,0] > 0.5 && {cameraView == "GUNNER"} && // Refresh the firemode [] call FUNC(showFireMode); + +// bail on not loaded +if (ACE_player ammo (currentWeapon ACE_player) == 0) exitWith { }; + _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/25]; + TRACE_1("Searching at range", _targetArray); if (count (_targetArray) > 0) then { _newTarget = _targetArray select 0; }; @@ -77,22 +83,45 @@ _offsetY = __OffsetY; __JavelinIGUITargeting ctrlShow true; __JavelinIGUITargetingConstrains ctrlShow true; +_zamerny = if (_currentTarget isKindOf "CAManBase") then {_currentTarget selectionPosition "body"} else {_currentTarget selectionPosition "zamerny"}; +_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 targets found _currentTarget = objNull; _lockTime = 0; __JavelinIGUISeek ctrlSetTextColor __ColorGray; - __JavelinIGUINFOV ctrlSetTextColor __ColorGreen; __JavelinIGUITargeting ctrlShow false; __JavelinIGUITargetingGate ctrlShow false; __JavelinIGUITargetingLines ctrlShow false; __JavelinIGUITargetingConstraints ctrlShow false; - ACE_player setVariable ["ace_missileguidance_target",nil, false]; + ACE_player setVariable ["ace_missileguidance_target",nil, false]; // Disallow fire - //if (ACE_player ammo "Javelin" > 0 || {ACE_player ammo "ACE_Javelin_Direct" > 0}) then {ACE_player setWeaponReloadingTime //[player, "Javelin", 0.2];}; + if (ACE_player ammo (currentWeapon ACE_player) > 0) then { ACE_player setWeaponReloadingTime [player, (currentWeapon ACE_player), 0.2]; }; + } else { if (_newTarget distance ACE_player < 2500 && {(call CBA_fnc_getFoV) select 1 > 9} @@ -107,36 +136,20 @@ if (isNull _newTarget) then { playSound "ACE_Javelin_Locking"; } else { - if(diag_tickTime - _lockTime > __LOCKONTIME) then { + if(diag_tickTime - _lockTime > __LOCKONTIME + _randomLockInterval) then { TRACE_2("LOCKED!", _currentTarget, _lockTime); __JavelinIGUISeek ctrlSetTextColor __ColorGreen; - __JavelinIGUINFOV ctrlSetTextColor __ColorNull; __JavelinIGUITargeting ctrlShow true; __JavelinIGUITargetingConstrains ctrlShow false; __JavelinIGUITargetingGate ctrlShow true; __JavelinIGUITargetingLines ctrlShow true; - - _zamerny = if (_currentTarget isKindOf "CAManBase") then {_currentTarget selectionPosition "body"} else {_currentTarget selectionPosition "zamerny"}; - _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; - }; - // 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]; + //__JavelinIGUITargetingLineV ctrlSetPosition [_aposX,ctrlPosition __JavelinIGUITargetingLineV select 1]; + //__JavelinIGUITargetingLineH ctrlSetPosition [ctrlPosition __JavelinIGUITargetingLineH select 0,_aposY]; + //{_x ctrlCommit __TRACKINTERVAL} forEach [__JavelinIGUITargetingLineH,__JavelinIGUITargetingLineV]; _boundsInput = if (_currentTarget isKindOf "CAManBase") then { [_currentTarget,[-1,-1,-2],_currentTarget selectionPosition "body"]; @@ -162,6 +175,9 @@ if (isNull _newTarget) then { ACE_player setVariable["ace_missileguidance_target", _currentTarget, false]; + // Allow fire + ACE_player setWeaponReloadingTime [player, (currentWeapon ACE_player), 0]; + if(diag_tickTime > _soundTime) then { playSound "ACE_Javelin_Locked"; _soundTime = diag_tickTime + 0.25; @@ -169,6 +185,7 @@ if (isNull _newTarget) then { } else { __JavelinIGUITargeting ctrlShow true; __JavelinIGUITargetingGate ctrlShow true; + __JavelinIGUITargetingConstrains ctrlShow true; __JavelinIGUITargetingLines ctrlShow false; ACE_player setVariable["ace_missileguidance_target", nil, false]; @@ -186,6 +203,8 @@ if (isNull _newTarget) then { _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]; @@ -197,22 +216,26 @@ if (isNull _newTarget) then { playSound "ACE_Javelin_Locking"; _soundTime = diag_tickTime + 0.25; }; + // Disallow fire + if (ACE_player ammo (currentWeapon ACE_player) > 0) then { ACE_player setWeaponReloadingTime [player, (currentWeapon ACE_player), 0.2]; }; }; }; } else { - // Something is wrong with our seek + // No targets found _currentTarget = objNull; - ACE_player setVariable["ace_missileguidance_target", nil, false]; + _lockTime = 0; __JavelinIGUISeek ctrlSetTextColor __ColorGray; - __JavelinIGUINFOV ctrlSetTextColor __ColorGray; __JavelinIGUITargeting ctrlShow false; __JavelinIGUITargetingGate ctrlShow false; __JavelinIGUITargetingLines ctrlShow false; - + __JavelinIGUITargetingConstraints ctrlShow false; + ACE_player setVariable ["ace_missileguidance_target",nil, false]; - }; - + + // Disallow fire + if (ACE_player ammo (currentWeapon ACE_player) > 0) then { ACE_player setWeaponReloadingTime [player, (currentWeapon ACE_player), 0.2]; }; + }; }; //TRACE_2("", _newTarget, _currentTarget); diff --git a/addons/javelin/functions/fnc_onOpticLoad.sqf b/addons/javelin/functions/fnc_onOpticLoad.sqf index a12d0ef176..d38e1c3305 100644 --- a/addons/javelin/functions/fnc_onOpticLoad.sqf +++ b/addons/javelin/functions/fnc_onOpticLoad.sqf @@ -2,6 +2,8 @@ #include "script_component.hpp" TRACE_1("enter", _this); +#define __LOCKONTIMERANDOM 2 // Deviation in lock on time + if((count _this) > 0) then { uiNameSpace setVariable ['ACE_RscOptics_javelin',_this select 0]; }; @@ -22,10 +24,13 @@ uiNameSpace setVariable [QGVAR(arguments), objNull, // currentTargetObject 0, // Run Time 0, // Lock Time - 0 // Sound timer + 0, // Sound timer + (random __LOCKONTIMERANDOM) // random lock time addition ] ]; + + _pfh_handle = uiNamespace getVariable ["ACE_RscOptics_javelin_PFH", nil]; if(isNil "_pfh_handle") then { _pfh_handle = [FUNC(onOpticDraw), 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/javelin/script_component.hpp b/addons/javelin/script_component.hpp index 6aa34b6bc8..7234a1e3d4 100644 --- a/addons/javelin/script_component.hpp +++ b/addons/javelin/script_component.hpp @@ -24,7 +24,9 @@ #define __JavelinIGUISeek (__JavelinIGUI displayCtrl 699000) #define __JavelinIGUITop (__JavelinIGUI displayCtrl 699001) #define __JavelinIGUIDir (__JavelinIGUI displayCtrl 699002) -#define __JavelinIGUINFOV (__JavelinIGUI displayCtrl 699003) +#define __JavelinIGUINFOV (__JavelinIGUI displayCtrl 1003) +#define __JavelinIGUIWFOV (__JavelinIGUI displayCtrl 1004) +#define __JavelinIGUIRangefinder (__JavelinIGUI displayCtrl 151) // Constrains #define __JavelinIGUITargetingConstrains (__JavelinIGUI displayCtrl 699100) diff --git a/addons/javelin/stringtable.xml b/addons/javelin/stringtable.xml index bd8f59c41c..f0e933ad0d 100644 --- a/addons/javelin/stringtable.xml +++ b/addons/javelin/stringtable.xml @@ -1,21 +1,21 @@  - - - Lock Target (Hold) - Ziel aufschalten - Захватить цель (удерживать) - Zamknout cíl(držet) - Namierz cel (przytrzymaj) - Vérouiller la Cible (Maintenir) - - - Cycle Fire Mode - Wechsle Feuermodus - Переключение режимов огня - Cyklování režimů palby - Przełącz tryb ognia - Mode de Tir (Cycle) - - + + + Lock Target (Hold) + Ziel aufschalten + Захватить цель (удерживать) + Zamknout cíl(držet) + Namierz cel (przytrzymaj) + Verrouiller cible (maintenir) + + + Cycle Fire Mode + Wechsle Feuermodus + Переключение режимов огня + Cyklování režimů palby + Przełącz tryb ognia + Cycle mode de tir + + diff --git a/addons/kestrel/$PBOPREFIX$ b/addons/kestrel/$PBOPREFIX$ deleted file mode 100644 index ca3fac2e96..0000000000 --- a/addons/kestrel/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\kestrel \ No newline at end of file diff --git a/addons/kestrel/CfgEventHandlers.hpp b/addons/kestrel/CfgEventHandlers.hpp deleted file mode 100644 index f0a9f14d91..0000000000 --- a/addons/kestrel/CfgEventHandlers.hpp +++ /dev/null @@ -1,6 +0,0 @@ - -class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); - }; -}; diff --git a/addons/kestrel/CfgVehicles.hpp b/addons/kestrel/CfgVehicles.hpp deleted file mode 100644 index 31aea38bda..0000000000 --- a/addons/kestrel/CfgVehicles.hpp +++ /dev/null @@ -1,47 +0,0 @@ -class CfgVehicles { - class Man; - class CAManBase: Man { - class ACE_SelfActions { - class ACE_OpenKestrel { - displayName = "$STR_ACE_Wind_OpenKestrel"; - condition = QUOTE('ACE_Kestrel' in items _player && {!GVAR(isKestrel)}); - statement = QUOTE(call FUNC(openKestrel)); - showDisabled = 0; - priority = 2; - icon = PATHTOF(data\4500NV1.paa); - hotkey = "K"; - }; - class ACE_CloseKestrel { - displayName = "$STR_ACE_Wind_CloseKestrel"; - condition = QUOTE(GVAR(isKestrel)); - statement = QUOTE(call FUNC(closeKestrel)); - showDisabled = 0; - priority = 2; - icon = PATHTOF(data\4500NV1.paa); - hotkey = "K"; - }; - }; - }; - - class Item_Base_F; - class ACE_Item_Kestrel: Item_Base_F { - author = "$STR_ACE_Common_ACETeam"; - scope = 2; - scopeCurator = 2; - displayName = "$STR_ACE_Kestrel_Name"; - vehicleClass = "Items"; - class TransportItems { - class ACE_Kestrel { - name = "ACE_Kestrel"; - count = 1; - }; - }; - }; - - class Box_NATO_Support_F; - class ACE_Box_Misc: Box_NATO_Support_F { - class TransportItems { - MACRO_ADDITEM(ACE_Kestrel,6); - }; - }; -}; diff --git a/addons/kestrel/README.md b/addons/kestrel/README.md deleted file mode 100644 index f5b91783c1..0000000000 --- a/addons/kestrel/README.md +++ /dev/null @@ -1,12 +0,0 @@ -ace_kestrel -=========== - -Adds the Kestrel weather and wind meter. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/kestrel/RscTitles.hpp b/addons/kestrel/RscTitles.hpp deleted file mode 100644 index 2530dbcda7..0000000000 --- a/addons/kestrel/RscTitles.hpp +++ /dev/null @@ -1,125 +0,0 @@ - -class RscPicture; -class RscText; - -class RscTitles { - class ACE_Kestrel { - onload = QUOTE(_this call FUNC(onLoadKestrel)); - //onunload = ""; - idd = -1; - movingEnable = 0; - enableDisplay = 1; - duration = 1e+011; - fadein = 0; - fadeout = 0; - enablesimulation = 1; - - class controls { - // has to be first to be in the background - class Wheel: RscPicture { - idc = 3; - type = 0; - style = "48 + 0x800"; - text = ""; - x = "safeZoneX + 0.07"; - y = "safeZoneY + safeZoneH - 0.76"; - h = "0.15"; - w = "0.15"; - }; - - class Kestrel1: RscPicture { - idc = 1; - text = PATHTOF(data\4500NV1.paa); - style = "48 + 0x800"; - x = "safeZoneX - 0.25"; - y = "safeZoneY + safeZoneH - 0.8"; - h = "0.75"; - w = "0.75"; - }; - class Kestrel2: Kestrel1 { - idc = 2; - text = PATHTOF(data\4500NV2.paa); - colorText[] = {0,0,0,1-(sunOrMoon*sunOrMoon+(moonIntensity/5))}; - }; - - class HUD1: RscText { - idc = 11; - type = 0; - style = 1; - text = ""; - x = "safeZoneX + 0.08"; - y = "safeZoneY + safeZoneH - 0.51"; - h = "0.09"; - w = "0.108"; - shadow = 0; - font = "PuristaMedium"; - sizeEx = 0.04; - colorText[] = {0.0745,0.2196,0.1216,0.7}; - colorBackground[] = {0,0,0,0}; - lineSpacing = 1; - }; - class HUD2: HUD1 { - idc = 12; - y = "safeZoneY + safeZoneH - 0.48"; - }; - class HUD3: HUD1 { - idc = 13; - y = "safeZoneY + safeZoneH - 0.45"; - }; - class HUD4: HUD1 { - idc = 14; - y = "safeZoneY + safeZoneH - 0.418"; - }; - }; - }; - - // helper class to prevent flickering. Used together with preloadTitleRsc command. - class ACE_Kestrel_Preload { - idd = -1; - movingEnable = 0; - duration = 1e+011; - fadein = 0; - fadeout = 0; - class controls { - class Preload_0: RscPicture { - text = PATHTOF(data\kestrel_0.paa); - }; - class Preload_1: Preload_0 { - text = PATHTOF(data\kestrel_1.paa); - }; - class Preload_2: Preload_0 { - text = PATHTOF(data\kestrel_2.paa); - }; - class Preload_3: Preload_0 { - text = PATHTOF(data\kestrel_3.paa); - }; - class Preload_4: Preload_0 { - text = PATHTOF(data\kestrel_4.paa); - }; - class Preload_5: Preload_0 { - text = PATHTOF(data\kestrel_5.paa); - }; - class Preload_6: Preload_0 { - text = PATHTOF(data\kestrel_6.paa); - }; - class Preload_7: Preload_0 { - text = PATHTOF(data\kestrel_7.paa); - }; - class Preload_8: Preload_0 { - text = PATHTOF(data\kestrel_8.paa); - }; - class Preload_9: Preload_0 { - text = PATHTOF(data\kestrel_9.paa); - }; - /*class Preload_A: Preload_0 { - text = PATHTOF(data\4500NV.paa); - }; - class Preload_B: Preload_0 { - text = PATHTOF(data\4500NV1.paa); - }; - class Preload_C: Preload_0 { - text = PATHTOF(data\4500NV2.paa); - };*/ - }; - }; -}; diff --git a/addons/kestrel/XEH_preInit.sqf b/addons/kestrel/XEH_preInit.sqf deleted file mode 100644 index 09d9b1a0ef..0000000000 --- a/addons/kestrel/XEH_preInit.sqf +++ /dev/null @@ -1,11 +0,0 @@ -#include "script_component.hpp" - -ADDON = false; - -PREP(onLoadKestrel); -PREP(openKestrel); -PREP(closeKestrel); - -GVAR(isKestrel) = false; - -ADDON = true; diff --git a/addons/kestrel/config.cpp b/addons/kestrel/config.cpp deleted file mode 100644 index bece90dd8d..0000000000 --- a/addons/kestrel/config.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {"ACE_Item_Kestrel"}; - weapons[] = {"ACE_Kestrel"}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_interaction"}; - author[] = {"Falke","commy2","KoffeinFlummi","esteldunedain"}; - authorUrl = "https://github.com/KoffeinFlummi/"; - VERSION_CONFIG; - }; -}; - -#include "CfgEventHandlers.hpp" -#include "CfgVehicles.hpp" -#include "CfgWeapons.hpp" -#include "RscTitles.hpp" diff --git a/addons/kestrel/data/4500NV.paa b/addons/kestrel/data/4500NV.paa deleted file mode 100644 index fd72433b9e..0000000000 Binary files a/addons/kestrel/data/4500NV.paa and /dev/null differ diff --git a/addons/kestrel/data/4500NV1.paa b/addons/kestrel/data/4500NV1.paa deleted file mode 100644 index 9a29b346fb..0000000000 Binary files a/addons/kestrel/data/4500NV1.paa and /dev/null differ diff --git a/addons/kestrel/data/4500NV2.paa b/addons/kestrel/data/4500NV2.paa deleted file mode 100644 index 992743a3a6..0000000000 Binary files a/addons/kestrel/data/4500NV2.paa and /dev/null differ diff --git a/addons/kestrel/data/body.paa b/addons/kestrel/data/body.paa deleted file mode 100644 index bec55bb418..0000000000 Binary files a/addons/kestrel/data/body.paa and /dev/null differ diff --git a/addons/kestrel/data/kestrel_0.paa b/addons/kestrel/data/kestrel_0.paa deleted file mode 100644 index 190c25f100..0000000000 Binary files a/addons/kestrel/data/kestrel_0.paa and /dev/null differ diff --git a/addons/kestrel/data/kestrel_1.paa b/addons/kestrel/data/kestrel_1.paa deleted file mode 100644 index fe757888e4..0000000000 Binary files a/addons/kestrel/data/kestrel_1.paa and /dev/null differ diff --git a/addons/kestrel/data/kestrel_2.paa b/addons/kestrel/data/kestrel_2.paa deleted file mode 100644 index 1b0fda0a65..0000000000 Binary files a/addons/kestrel/data/kestrel_2.paa and /dev/null differ diff --git a/addons/kestrel/data/kestrel_3.paa b/addons/kestrel/data/kestrel_3.paa deleted file mode 100644 index 659f4597a3..0000000000 Binary files a/addons/kestrel/data/kestrel_3.paa and /dev/null differ diff --git a/addons/kestrel/data/kestrel_4.paa b/addons/kestrel/data/kestrel_4.paa deleted file mode 100644 index abb1ed6580..0000000000 Binary files a/addons/kestrel/data/kestrel_4.paa and /dev/null differ diff --git a/addons/kestrel/data/kestrel_5.paa b/addons/kestrel/data/kestrel_5.paa deleted file mode 100644 index 800ed80d8b..0000000000 Binary files a/addons/kestrel/data/kestrel_5.paa and /dev/null differ diff --git a/addons/kestrel/data/kestrel_6.paa b/addons/kestrel/data/kestrel_6.paa deleted file mode 100644 index 784e441c21..0000000000 Binary files a/addons/kestrel/data/kestrel_6.paa and /dev/null differ diff --git a/addons/kestrel/data/kestrel_7.paa b/addons/kestrel/data/kestrel_7.paa deleted file mode 100644 index 9452286c2d..0000000000 Binary files a/addons/kestrel/data/kestrel_7.paa and /dev/null differ diff --git a/addons/kestrel/data/kestrel_8.paa b/addons/kestrel/data/kestrel_8.paa deleted file mode 100644 index 31fe71ce84..0000000000 Binary files a/addons/kestrel/data/kestrel_8.paa and /dev/null differ diff --git a/addons/kestrel/data/kestrel_9.paa b/addons/kestrel/data/kestrel_9.paa deleted file mode 100644 index 978506ef5d..0000000000 Binary files a/addons/kestrel/data/kestrel_9.paa and /dev/null differ diff --git a/addons/kestrel/functions/fnc_closeKestrel.sqf b/addons/kestrel/functions/fnc_closeKestrel.sqf deleted file mode 100644 index cfec327da6..0000000000 --- a/addons/kestrel/functions/fnc_closeKestrel.sqf +++ /dev/null @@ -1,6 +0,0 @@ -// by commy2 -#include "script_component.hpp" - -GVAR(isKestrel) = false; - -(["ACE_Kestrel"] call BIS_fnc_rscLayer) cutText ["", "PLAIN", 0, false]; diff --git a/addons/kestrel/functions/fnc_onLoadKestrel.sqf b/addons/kestrel/functions/fnc_onLoadKestrel.sqf deleted file mode 100644 index cdfc325698..0000000000 --- a/addons/kestrel/functions/fnc_onLoadKestrel.sqf +++ /dev/null @@ -1,156 +0,0 @@ -// by Falke, commy2 -#include "script_component.hpp" - -GVAR(windHead) = 0; -GVAR(wheelState) = 1; - -[{ - - // exit loop - if (!GVAR(isKestrel) || {!("ACE_Kestrel" in items ACE_player)}) exitWith { - call FUNC(closeKestrel); - - [_this select 1] call CBA_fnc_removePerFrameHandler; - }; - - // get controls - private ["_dlgKestrel", "_ctrlKestrel1", "_ctrlKestrelWheel", "_ctrlKestrel2", "_ctrlHUD1", "_ctrlHUD2", "_ctrlHUD3", "_ctrlHUD4"]; - - disableSerialization; - _dlgKestrel = _this select 0; - _ctrlKestrel1 = _dlgKestrel displayCtrl 1; - _ctrlKestrel2 = _dlgKestrel displayCtrl 2; - _ctrlKestrelWheel = _dlgKestrel displayCtrl 3; - _ctrlHUD1 = _dlgKestrel displayCtrl 11; - _ctrlHUD2 = _dlgKestrel displayCtrl 12; - _ctrlHUD3 = _dlgKestrel displayCtrl 13; - _ctrlHUD4 = _dlgKestrel displayCtrl 14; - - // don't show the kestrel in gunner view - private "_show"; - _show = cameraView != "GUNNER"; - - _ctrlKestrel1 ctrlShow _show; - _ctrlKestrel2 ctrlShow _show; - _ctrlKestrelWheel ctrlShow _show; - _ctrlHUD1 ctrlShow _show; - _ctrlHUD2 ctrlShow _show; - _ctrlHUD3 ctrlShow _show; - _ctrlHUD4 ctrlShow _show; - - if !(_show) exitWith {}; - - // handle shown values - private ["_position", "_directon", "_windC", "_windD", "_windR", "_windB", "_windA"]; - - _position = eyePos ACE_player; - _directon = direction ACE_player; - - _windC = sqrt ((wind select 0) ^ 2 + (wind select 1) ^ 2); - _windD = (wind select 0) atan2 (wind select 1); - - _windR = _directon - _windD; - - if (_windR < 0) then { - _windR = _windR + 360; - }; - - _windB = _windC * sin _windR; - _windA = sqrt (_windC ^ 2 - _windB ^ 2); - - if (_windR < 90) then { - _windA = _windA - 2 * _windA; - }; - - if (_windR > 270) then { - _windA = _windA - 2 * _windA; - }; - - // in building - _intersects = 0; - if (lineIntersects [_position, _position vectorAdd [0, 0, 15]]) then {_intersects = _intersects + 1}; - - if (lineIntersects [_position, _position vectorAdd [- 15 * sin windDir, - 15 * cos windDir, 0]]) then {_intersects = _intersects + 1}; - if (lineIntersects [_position, _position vectorAdd [- 15 * sin (windDir - 90), - 15 * cos (windDir - 90), 0]]) then {_intersects = _intersects + 1}; - if (lineIntersects [_position, _position vectorAdd [- 15 * sin (windDir + 90), - 15 * cos (windDir + 90), 0]]) then {_intersects = _intersects + 1}; - if (lineIntersects [_position, _position vectorAdd [- 15 * sin (windDir + 180), - 15 * cos (windDir + 180), 0]]) then {_intersects = _intersects + 1}; - - if (_intersects > 3) then { - _windA = 99.99; - _windB = 99.99; - }; - - // in wind direction - _intersects = 0; - if (lineIntersects [_position, _position vectorAdd [- 5 * sin windDir, - 5 * cos windDir, 0]]) then {_intersects = _intersects + 1}; - if (lineIntersects [_position, _position vectorAdd [- 5 * sin (windDir - 15), - 5 * cos (windDir - 15), 0]]) then {_intersects = _intersects + 1}; - if (lineIntersects [_position, _position vectorAdd [- 5 * sin (windDir + 15), - 5 * cos (windDir + 15), 0]]) then {_intersects = _intersects + 1}; - - if (_intersects > 2) then { - _windA = 99.99; - _windB = 99.99; - }; - - if (ACE_player != vehicle ACE_player) then { - _windA = 99.99; - _windB = 99.99; - }; - - if (_windA == 99.99) then { - - GVAR(windHead) = 0; - - _windA = "0.00"; - _windB = "0.00"; - - } else { - - GVAR(windHead) = _windA; - - if (_windA < 0) then { - _windA = format ["-%1", [-1 * _windA, 1, 2] call CBA_fnc_formatNumber]; - } else { - _windA = format [ "%1", [ _windA, 1, 2] call CBA_fnc_formatNumber]; - }; - - if (_windB < 0) then { - _windB = format ["-%1", [-1 * _windB, 1, 2] call CBA_fnc_formatNumber]; - } else { - _windB = format [ "%1", [ _windB, 1, 2] call CBA_fnc_formatNumber]; - }; - - }; - - _directon = round _directon; - if (_directon == 360) then {_directon = 0}; - - _ctrlHUD1 ctrlSetText _windA; - _ctrlHUD2 ctrlSetText _windB; - _ctrlHUD3 ctrlSetText str _directon; - _ctrlHUD4 ctrlSetText str ((round (EGVAR(weather,currentTemperature) * 10)) / 10); - - // adjust kestrel picture in the dark - private "_brightness"; - _brightness = call EFUNC(common,ambientBrightness); - - _ctrlKestrel2 ctrlSetTextColor [0, 0, 0, 1 - _brightness]; - - // handle wheel - private ["_wheelState", "_wheelStateAdd"]; - - _wheelState = GVAR(wheelState); - _wheelStateAdd = ((round GVAR(windHead) * 2) min 5) max -5; - - _wheelState = _wheelState + _wheelStateAdd; - - if (_wheelState < 0) then {_wheelState = _wheelState + 9}; - if (_wheelState > 9) then {_wheelState = _wheelState - 9}; - - GVAR(wheelState) = _wheelState; - - if (preloadTitleRsc ["ACE_Kestrel_Preload", "PLAIN"]) then { - _ctrlKestrelWheel ctrlSetText format [QUOTE(PATHTOF(data\kestrel_%1.paa)), _wheelState]; - _ctrlKestrelWheel ctrlSetTextColor [_brightness, _brightness, _brightness, 1]; - }; - -}, 0.01, _this select 0] call CBA_fnc_addPerFrameHandler; diff --git a/addons/kestrel/functions/fnc_openKestrel.sqf b/addons/kestrel/functions/fnc_openKestrel.sqf deleted file mode 100644 index 25ec9eba67..0000000000 --- a/addons/kestrel/functions/fnc_openKestrel.sqf +++ /dev/null @@ -1,6 +0,0 @@ -// by commy2 -#include "script_component.hpp" - -GVAR(isKestrel) = true; - -(["ACE_Kestrel"] call BIS_fnc_rscLayer) cutRsc ["ACE_Kestrel", "PLAIN", 0, false]; diff --git a/addons/kestrel/functions/script_component.hpp b/addons/kestrel/functions/script_component.hpp deleted file mode 100644 index 528b26affc..0000000000 --- a/addons/kestrel/functions/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\ace\addons\kestrel\script_component.hpp" \ No newline at end of file diff --git a/addons/kestrel/kestrel4500.p3d b/addons/kestrel/kestrel4500.p3d deleted file mode 100644 index 43cb6ce9d5..0000000000 Binary files a/addons/kestrel/kestrel4500.p3d and /dev/null differ diff --git a/addons/kestrel/kestrel4500rad.p3d b/addons/kestrel/kestrel4500rad.p3d deleted file mode 100644 index 7b2b62ccf5..0000000000 Binary files a/addons/kestrel/kestrel4500rad.p3d and /dev/null differ diff --git a/addons/kestrel/script_component.hpp b/addons/kestrel/script_component.hpp deleted file mode 100644 index a38231c511..0000000000 --- a/addons/kestrel/script_component.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#define COMPONENT kestrel -#include "\z\ace\addons\main\script_mod.hpp" - -#ifdef DEBUG_ENABLED_KESTREL - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_ENABLED_KESTREL - #define DEBUG_SETTINGS DEBUG_ENABLED_KESTREL -#endif - -#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/kestrel/stringtable.xml b/addons/kestrel/stringtable.xml deleted file mode 100644 index c811633f75..0000000000 --- a/addons/kestrel/stringtable.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - Approximate Temperature - Ungefähre Temperatur - Temperatura aproximada - Estimer la température - Przybliżona temperatura - Odhadovaná teplota - Hőmérséklet nagyábol - Примерная температура - - - Kestrel 4500NV - Kestrel 4500NV - Kestrel 4500NV - Kestrel 4500NV - Kestrel 4500NV - Kestrel 4500NV - Kestrel 4500NV - Kestrel 4500NV - Kestrel 4500NV - Kestrel 4500NV - - - Applied Ballistics Meter - Applied Ballistics Meter - Anemómetro balístico - Applied Ballistics Meter - Urządzenie do monitorowania pogody - Zařízení pro měření větru - Monitoraggio Balistico Attivo - Applied Ballistics Meter - Medidor Balístico Ativo - Метеостанция - - - Open Kestrel - Kestrel öffnen - Abrir Kestrel - Ouvrir Kestrel - Otwórz Kestrel - Otevřít Kestrel - Abrir Kestrel - Apri Kestrel - Kestrel bekapcsolása - Открыть Kestrel - - - Close Kestrel - Kestrel schließen - Cerrar Kestrel - Fermer Kestrel - Zamknij Kestrel - Zavřít Kestrel - Fechar Kestrel - Chiudi Kestrel - Kestrel kikapcsolása - Закрыть Kestrel - - - diff --git a/addons/kestrel/ui/WindLight-02.paa b/addons/kestrel/ui/WindLight-02.paa deleted file mode 100644 index a02147e6ee..0000000000 Binary files a/addons/kestrel/ui/WindLight-02.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindLight-03.paa b/addons/kestrel/ui/WindLight-03.paa deleted file mode 100644 index 340cfdcd6e..0000000000 Binary files a/addons/kestrel/ui/WindLight-03.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindLight-04.paa b/addons/kestrel/ui/WindLight-04.paa deleted file mode 100644 index 6d8404fb86..0000000000 Binary files a/addons/kestrel/ui/WindLight-04.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindLight-06.paa b/addons/kestrel/ui/WindLight-06.paa deleted file mode 100644 index c5e0a40af7..0000000000 Binary files a/addons/kestrel/ui/WindLight-06.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindLight-07.paa b/addons/kestrel/ui/WindLight-07.paa deleted file mode 100644 index 4df57f7585..0000000000 Binary files a/addons/kestrel/ui/WindLight-07.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindLight-08.paa b/addons/kestrel/ui/WindLight-08.paa deleted file mode 100644 index 8c5012502f..0000000000 Binary files a/addons/kestrel/ui/WindLight-08.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindLight-09.paa b/addons/kestrel/ui/WindLight-09.paa deleted file mode 100644 index 15173a56ab..0000000000 Binary files a/addons/kestrel/ui/WindLight-09.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindLight-10.paa b/addons/kestrel/ui/WindLight-10.paa deleted file mode 100644 index 83c860cecb..0000000000 Binary files a/addons/kestrel/ui/WindLight-10.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindLight-13.paa b/addons/kestrel/ui/WindLight-13.paa deleted file mode 100644 index 87a8dfcca9..0000000000 Binary files a/addons/kestrel/ui/WindLight-13.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindLight-14.paa b/addons/kestrel/ui/WindLight-14.paa deleted file mode 100644 index f9200aaf2d..0000000000 Binary files a/addons/kestrel/ui/WindLight-14.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindLight-15.paa b/addons/kestrel/ui/WindLight-15.paa deleted file mode 100644 index e3ee52d21e..0000000000 Binary files a/addons/kestrel/ui/WindLight-15.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindLight-16.paa b/addons/kestrel/ui/WindLight-16.paa deleted file mode 100644 index 9b835e62c4..0000000000 Binary files a/addons/kestrel/ui/WindLight-16.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-01.paa b/addons/kestrel/ui/WindModerate-01.paa deleted file mode 100644 index fd4d255c35..0000000000 Binary files a/addons/kestrel/ui/WindModerate-01.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-02.paa b/addons/kestrel/ui/WindModerate-02.paa deleted file mode 100644 index db6e8dcebc..0000000000 Binary files a/addons/kestrel/ui/WindModerate-02.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-03.paa b/addons/kestrel/ui/WindModerate-03.paa deleted file mode 100644 index 300934ff37..0000000000 Binary files a/addons/kestrel/ui/WindModerate-03.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-04.paa b/addons/kestrel/ui/WindModerate-04.paa deleted file mode 100644 index f7b8331dae..0000000000 Binary files a/addons/kestrel/ui/WindModerate-04.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-05.paa b/addons/kestrel/ui/WindModerate-05.paa deleted file mode 100644 index a3b0a532ff..0000000000 Binary files a/addons/kestrel/ui/WindModerate-05.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-06.paa b/addons/kestrel/ui/WindModerate-06.paa deleted file mode 100644 index 495ec6bc15..0000000000 Binary files a/addons/kestrel/ui/WindModerate-06.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-07.paa b/addons/kestrel/ui/WindModerate-07.paa deleted file mode 100644 index d0471a4c4f..0000000000 Binary files a/addons/kestrel/ui/WindModerate-07.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-08.paa b/addons/kestrel/ui/WindModerate-08.paa deleted file mode 100644 index 967e9d8ef7..0000000000 Binary files a/addons/kestrel/ui/WindModerate-08.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-09.paa b/addons/kestrel/ui/WindModerate-09.paa deleted file mode 100644 index 54ef3eabf9..0000000000 Binary files a/addons/kestrel/ui/WindModerate-09.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-10.paa b/addons/kestrel/ui/WindModerate-10.paa deleted file mode 100644 index e7608c2e02..0000000000 Binary files a/addons/kestrel/ui/WindModerate-10.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-11.paa b/addons/kestrel/ui/WindModerate-11.paa deleted file mode 100644 index 6d1ce9418e..0000000000 Binary files a/addons/kestrel/ui/WindModerate-11.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-12.paa b/addons/kestrel/ui/WindModerate-12.paa deleted file mode 100644 index 2b853dca89..0000000000 Binary files a/addons/kestrel/ui/WindModerate-12.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-13.paa b/addons/kestrel/ui/WindModerate-13.paa deleted file mode 100644 index 56443ab4f9..0000000000 Binary files a/addons/kestrel/ui/WindModerate-13.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-14.paa b/addons/kestrel/ui/WindModerate-14.paa deleted file mode 100644 index 06cb4610fb..0000000000 Binary files a/addons/kestrel/ui/WindModerate-14.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-15.paa b/addons/kestrel/ui/WindModerate-15.paa deleted file mode 100644 index 5f548b6ac9..0000000000 Binary files a/addons/kestrel/ui/WindModerate-15.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindModerate-16.paa b/addons/kestrel/ui/WindModerate-16.paa deleted file mode 100644 index 617e83193d..0000000000 Binary files a/addons/kestrel/ui/WindModerate-16.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-01.paa b/addons/kestrel/ui/WindStrong-01.paa deleted file mode 100644 index 87c2db663c..0000000000 Binary files a/addons/kestrel/ui/WindStrong-01.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-02.paa b/addons/kestrel/ui/WindStrong-02.paa deleted file mode 100644 index 8d29483635..0000000000 Binary files a/addons/kestrel/ui/WindStrong-02.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-03.paa b/addons/kestrel/ui/WindStrong-03.paa deleted file mode 100644 index fc08f14e1b..0000000000 Binary files a/addons/kestrel/ui/WindStrong-03.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-04.paa b/addons/kestrel/ui/WindStrong-04.paa deleted file mode 100644 index 3fbbd70302..0000000000 Binary files a/addons/kestrel/ui/WindStrong-04.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-05.paa b/addons/kestrel/ui/WindStrong-05.paa deleted file mode 100644 index 2254b0d545..0000000000 Binary files a/addons/kestrel/ui/WindStrong-05.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-06.paa b/addons/kestrel/ui/WindStrong-06.paa deleted file mode 100644 index 6054696d61..0000000000 Binary files a/addons/kestrel/ui/WindStrong-06.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-07.paa b/addons/kestrel/ui/WindStrong-07.paa deleted file mode 100644 index d62308dfc9..0000000000 Binary files a/addons/kestrel/ui/WindStrong-07.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-08.paa b/addons/kestrel/ui/WindStrong-08.paa deleted file mode 100644 index cce04ab099..0000000000 Binary files a/addons/kestrel/ui/WindStrong-08.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-09.paa b/addons/kestrel/ui/WindStrong-09.paa deleted file mode 100644 index e2c53aec6f..0000000000 Binary files a/addons/kestrel/ui/WindStrong-09.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-10.paa b/addons/kestrel/ui/WindStrong-10.paa deleted file mode 100644 index 609b54096a..0000000000 Binary files a/addons/kestrel/ui/WindStrong-10.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-11.paa b/addons/kestrel/ui/WindStrong-11.paa deleted file mode 100644 index 705cc5bd10..0000000000 Binary files a/addons/kestrel/ui/WindStrong-11.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-12.paa b/addons/kestrel/ui/WindStrong-12.paa deleted file mode 100644 index d8d585d6eb..0000000000 Binary files a/addons/kestrel/ui/WindStrong-12.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-13.paa b/addons/kestrel/ui/WindStrong-13.paa deleted file mode 100644 index d903c832ab..0000000000 Binary files a/addons/kestrel/ui/WindStrong-13.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-14.paa b/addons/kestrel/ui/WindStrong-14.paa deleted file mode 100644 index 91153a801b..0000000000 Binary files a/addons/kestrel/ui/WindStrong-14.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-15.paa b/addons/kestrel/ui/WindStrong-15.paa deleted file mode 100644 index d0a34d79e4..0000000000 Binary files a/addons/kestrel/ui/WindStrong-15.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindStrong-16.paa b/addons/kestrel/ui/WindStrong-16.paa deleted file mode 100644 index 1be25039e4..0000000000 Binary files a/addons/kestrel/ui/WindStrong-16.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindVeryLight-01.paa b/addons/kestrel/ui/WindVeryLight-01.paa deleted file mode 100644 index 561e52ec88..0000000000 Binary files a/addons/kestrel/ui/WindVeryLight-01.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindVeryLight-02.paa b/addons/kestrel/ui/WindVeryLight-02.paa deleted file mode 100644 index fbce91664a..0000000000 Binary files a/addons/kestrel/ui/WindVeryLight-02.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindVeryLight-05.paa b/addons/kestrel/ui/WindVeryLight-05.paa deleted file mode 100644 index f8e30a0c64..0000000000 Binary files a/addons/kestrel/ui/WindVeryLight-05.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindVeryLight-07.paa b/addons/kestrel/ui/WindVeryLight-07.paa deleted file mode 100644 index b956cb478b..0000000000 Binary files a/addons/kestrel/ui/WindVeryLight-07.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindVeryLight-08.paa b/addons/kestrel/ui/WindVeryLight-08.paa deleted file mode 100644 index 090f630d8f..0000000000 Binary files a/addons/kestrel/ui/WindVeryLight-08.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindVeryLight-09.paa b/addons/kestrel/ui/WindVeryLight-09.paa deleted file mode 100644 index d8b8b7eff1..0000000000 Binary files a/addons/kestrel/ui/WindVeryLight-09.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindVeryLight-11.paa b/addons/kestrel/ui/WindVeryLight-11.paa deleted file mode 100644 index 241980a1e0..0000000000 Binary files a/addons/kestrel/ui/WindVeryLight-11.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindVeryLight-14.paa b/addons/kestrel/ui/WindVeryLight-14.paa deleted file mode 100644 index 0e77f697e2..0000000000 Binary files a/addons/kestrel/ui/WindVeryLight-14.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindVeryLight-15.paa b/addons/kestrel/ui/WindVeryLight-15.paa deleted file mode 100644 index ad283a4d76..0000000000 Binary files a/addons/kestrel/ui/WindVeryLight-15.paa and /dev/null differ diff --git a/addons/kestrel/ui/WindVeryLight-16.paa b/addons/kestrel/ui/WindVeryLight-16.paa deleted file mode 100644 index b7ae70a989..0000000000 Binary files a/addons/kestrel/ui/WindVeryLight-16.paa and /dev/null differ diff --git a/addons/kestrel/ui/noWind.paa b/addons/kestrel/ui/noWind.paa deleted file mode 100644 index 8fa262c286..0000000000 Binary files a/addons/kestrel/ui/noWind.paa and /dev/null differ diff --git a/addons/kestrel4500/CfgEventHandlers.hpp b/addons/kestrel4500/CfgEventHandlers.hpp new file mode 100644 index 0000000000..2a05b72298 --- /dev/null +++ b/addons/kestrel4500/CfgEventHandlers.hpp @@ -0,0 +1,11 @@ +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) ); + }; +}; \ No newline at end of file diff --git a/addons/kestrel4500/CfgSound.hpp b/addons/kestrel4500/CfgSound.hpp new file mode 100644 index 0000000000..957863bc9d --- /dev/null +++ b/addons/kestrel4500/CfgSound.hpp @@ -0,0 +1,39 @@ +class CfgSounds +{ + class kestrel4500_center_button_click + { + name="kestrel4500_center_button_click"; + sound[]={PATHTOF(sound\kestrel_center_button_click.wav),1,1}; + titles[]={}; + }; + class kestrel4500_top_button_click + { + name="kestrel4500_top_button_click"; + sound[]={PATHTOF(sound\kestrel_top_button_click.wav),1,1}; + titles[]={}; + }; + class kestrel4500_right_button_click + { + name="kestrel4500_right_button_click"; + sound[]={PATHTOF(sound\kestrel_right_button_click.wav),1,1}; + titles[]={}; + }; + class kestrel4500_bottom_button_click + { + name="kestrel4500_bottom_button_click"; + sound[]={PATHTOF(sound\kestrel_bottom_button_click.wav),1,1}; + titles[]={}; + }; + class kestrel4500_left_button_click + { + name="kestrel4500_left_button_click"; + sound[]={PATHTOF(sound\kestrel_left_button_click.wav),1,1}; + titles[]={}; + }; + class kestrel4500_exit_button_click + { + name="kestrel4500_exit_button_click"; + sound[]={PATHTOF(sound\kestrel_exit_button_click.wav),1,1}; + titles[]={}; + }; +}; \ No newline at end of file diff --git a/addons/kestrel4500/CfgVehicles.hpp b/addons/kestrel4500/CfgVehicles.hpp new file mode 100644 index 0000000000..20d8bf5b62 --- /dev/null +++ b/addons/kestrel4500/CfgVehicles.hpp @@ -0,0 +1,58 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Equipment { + class GVAR(open) { + displayName = "$STR_ACE_Kestrel4500_OpenKestrel"; + condition = QUOTE(call FUNC(canShow) && !GVAR(Kestrel4500)); + statement = QUOTE(call FUNC(createKestrelDialog)); + showDisabled = 0; + priority = 0.1; + icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa)); + exceptions[] = {"notOnMap"}; + }; + class GVAR(show) { + displayName = "$STR_ACE_Kestrel4500_ShowKestrel"; + condition = QUOTE(call FUNC(canShow) && !GVAR(Overlay)); + statement = QUOTE(call FUNC(displayKestrel)); + showDisabled = 0; + priority = 0.2; + icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa)); + exceptions[] = {"notOnMap", "isNotInside"}; + }; + class GVAR(hide) { + displayName = "$STR_ACE_Kestrel4500_HideKestrel"; + condition = QUOTE(GVAR(Overlay)); + statement = QUOTE(call FUNC(displayKestrel)); + showDisabled = 0; + priority = 0.3; + icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa)); + exceptions[] = {"notOnMap", "isNotInside"}; + }; + }; + }; + }; + + class Item_Base_F; + class ACE_Item_Kestrel4500: Item_Base_F { + author = "Ruthberg"; + scope = 2; + scopeCurator = 2; + displayName = "Kestrel 4500"; + vehicleClass = "Items"; + class TransportItems { + class ACE_Kestrel4500 { + name = "ACE_Kestrel4500"; + count = 1; + }; + }; + }; + + class Box_NATO_Support_F; + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportItems { + MACRO_ADDITEM(ACE_Kestrel4500,6); + }; + }; +}; diff --git a/addons/kestrel/CfgWeapons.hpp b/addons/kestrel4500/CfgWeapons.hpp similarity index 72% rename from addons/kestrel/CfgWeapons.hpp rename to addons/kestrel4500/CfgWeapons.hpp index 6db0e4b7d4..881edca202 100644 --- a/addons/kestrel/CfgWeapons.hpp +++ b/addons/kestrel4500/CfgWeapons.hpp @@ -3,13 +3,13 @@ class CfgWeapons { class ACE_ItemCore; class InventoryItem_Base_F; - class ACE_Kestrel: ACE_ItemCore { - author = "$STR_ACE_Common_ACETeam"; + class ACE_Kestrel4500: ACE_ItemCore { + author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"}; scope = 2; displayName = "$STR_ACE_Kestrel_Name"; descriptionShort = "$STR_ACE_Kestrel_Description"; model = PATHTOF(kestrel4500.p3d); - picture = PATHTOF(data\4500NV.paa); + picture = PATHTOF(UI\Kestrel4500.paa); icon = "iconObject_circle"; mapSize = 0.034; diff --git a/addons/kestrel4500/README.md b/addons/kestrel4500/README.md new file mode 100644 index 0000000000..36a324beb9 --- /dev/null +++ b/addons/kestrel4500/README.md @@ -0,0 +1,10 @@ +ace_kestrel4500 +=============== + +Kestrel 4500 Pocket Weather Tracker + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Ruthberg] (http://github.com/Ulteq) \ No newline at end of file diff --git a/addons/kestrel4500/RscTitles.hpp b/addons/kestrel4500/RscTitles.hpp new file mode 100644 index 0000000000..defb954292 --- /dev/null +++ b/addons/kestrel4500/RscTitles.hpp @@ -0,0 +1,341 @@ +#define ST_LEFT 0 +#define ST_RIGHT 1 +#define ST_CENTER 2 + +class Kestrel4500_RscText +{ + idc=-1; + type=0; + style=ST_CENTER; + colorDisabled[]={0,0,0,0}; + colorBackground[]={0,0,0,0}; + colorText[]={0,0,0,1}; + text=""; + x=0; + y=0; + w=0.1; + h=0.03; + font="TahomaB"; + sizeEx=0.04; + shadow=0; +}; +class Kestrel4500_RscButton +{ + text=""; + colorText[]={0,0,0,1}; + colorDisabled[]={0,0,0,0}; + colorBackground[]={0,0,0,0}; + colorBackgroundDisabled[]={0,0,0,0}; + colorBackgroundActive[]={0,0,0,0}; + colorFocused[]={0,0,0,0}; + colorShadow[]={0,0,0,0}; + colorBorder[]={0,0,0,1}; + soundEnter[]={"",0,1}; + soundPush[]={"",0,1}; + soundClick[]={"",0,1}; + soundEscape[]={"",0,1}; + type=1; + style="0x02+0x100"; + x=0; + y=0; + w=0.10; + h=0.03; + font="TahomaB"; + SizeEx=0.025; + offsetX=0.003; + offsetY=0.003; + offsetPressedX=0.0020; + offsetPressedY=0.0020; + borderSize=0; + shadow=0; +}; +class Kestrel4500_Display +{ + name="Kestrel4500_Display"; + idd=-1; + onLoad="uiNamespace setVariable ['Kestrel4500_Display', (_this select 0)]"; + movingEnable=1; + controlsBackground[]={}; + objects[]={}; + class controls + { + class BACKGROUND + { + moving=1; + type=0; + font="TahomaB"; + SizeEX=0.025; + idc=74000; + style=48; + x=safezoneX; + y=safezoneY; + w=1.024; + h=1.024*4/3; + colorBackground[]={1,1,1,1}; + colorText[]={1,1,1,1}; + text=PATHTOF(UI\Kestrel4500.paa); + }; + class POWER: Kestrel4500_RscButton + { + idc=-1; + x=safezoneX+0.385; + y=safezoneY+1.125; + w=0.042; + h=0.042*4/3; + action="closeDialog 0"; + onMouseButtonDown = "playSound 'kestrel4500_exit_button_click'"; + }; + class ENTER: POWER + { + idc=-1; + x=safezoneX+0.46; + y=safezoneY+1.0; + w=0.1; + action=QUOTE(0 call FUNC(buttonPressed)); + onMouseButtonDown = "playSound 'kestrel4500_center_button_click'"; + }; + class TOP: Kestrel4500_RscButton + { + idc=-1; + x=safezoneX+0.46; + y=safezoneY+0.93; + w=0.1; + h=0.03; + action=QUOTE(1 call FUNC(buttonPressed)); + onMouseButtonDown = "playSound 'kestrel4500_top_button_click'"; + }; + class BOTTOM: TOP + { + idc=-1; + y=safezoneY+1.1; + action=QUOTE(2 call FUNC(buttonPressed)); + onMouseButtonDown = "playSound 'kestrel4500_bottom_button_click'"; + }; + class LEFT: Kestrel4500_RscButton + { + idc=-1; + x=safezoneX+0.4; + y=safezoneY+0.97; + w=0.046; + h=0.11; + action=QUOTE(3 call FUNC(buttonPressed)); + onMouseButtonDown = "playSound 'kestrel4500_left_button_click'"; + }; + class RIGHT: LEFT + { + idc=-1; + x=safezoneX+0.58; + action=QUOTE(4 call FUNC(buttonPressed)); + onMouseButtonDown = "playSound 'kestrel4500_right_button_click'"; + }; + class MEMORY: Kestrel4500_RscButton + { + idc=-1; + x=safezoneX+0.395; + y=safezoneY+0.87; + w=0.05; + h=0.045*4/3; + action=QUOTE(5 call FUNC(buttonPressed)); + }; + class BACKLIGHT: MEMORY + { + idc=-1; + x=safezoneX+0.585; + action=QUOTE(6 call FUNC(buttonPressed)); + }; + + class TEXT_TOP: Kestrel4500_RscText + { + idc=74100; + x=safezoneX+0.40; + y=safezoneY+0.58; + w=0.22; + h=0.04; + text=""; + }; + class TEXT_CENTER_BIG: TEXT_TOP + { + idc=74200; + y=safezoneY+0.61; + h=0.10; + SizeEx=0.06; + text=""; + }; + class TEXT_CENTER_LINE_1_LEFT: TEXT_TOP + { + idc=74300; + y=safezoneY+0.60; + style=ST_LEFT; + h=0.10; + SizeEx=0.05; + text=""; + }; + class TEXT_CENTER_LINE2_LEFT: TEXT_CENTER_LINE_1_LEFT + { + idc=74301; + y=safezoneY+0.64; + text=""; + }; + class TEXT_CENTER_LINE_3_LEFT: TEXT_CENTER_LINE2_LEFT + { + idc=74302; + y=safezoneY+0.68; + text=""; + }; + class TEXT_CENTER_LINE_1_RIGHT: TEXT_CENTER_LINE_1_LEFT + { + idc=74303; + style=ST_RIGHT; + }; + class TEXT_CENTER_LINE2_RIGHT: TEXT_CENTER_LINE2_LEFT + { + idc=74304; + style=ST_RIGHT; + }; + class TEXT_CENTER_LINE_3_RIGHT: TEXT_CENTER_LINE_3_LEFT + { + idc=74305; + style=ST_RIGHT; + }; + class TEXT_INFO_LINE_1: TEXT_TOP + { + idc=74400; + y=safezoneY+0.69; + text=""; + }; + class TEXT_INFO_LINE_2: TEXT_TOP + { + idc=74401; + y=safezoneY+0.72; + text=""; + }; + }; +}; +class RscTitles +{ + class RscKestrel4500 + { + idd=-1; + onLoad="with uiNameSpace do { RscKestrel4500 = _this select 0 };"; + movingEnable=0; + duration=60; + fadeIn="false"; + fadeOut="false"; + class controls + { + class RscKestrel4500 + { + idc=75000; + moving=0; + type=0; + font="TahomaB"; + SizeEX=0.025*0.75; + style=48; + x=safezoneX+0.14; + y=safezoneY+0.7; + w=0.512*0.75; + h=1.024*4/3*0.75; + colorBackground[]={1,1,1,1}; + colorText[]={1,1,1,1}; + text=PATHTOF(UI\Kestrel4500_0.paa); + }; + class RscTextTop: Kestrel4500_RscText + { + idc=75100; + x=safezoneX-0.05+0.40*0.75; + y=safezoneY+0.7+0.58*0.75; + w=0.22*0.75; + h=0.04*0.75; + SizeEx=0.04*0.75; + text=""; + }; + class RscTextCenterBig: RscTextTop + { + idc=75200; + y=safezoneY+0.7+0.61*0.75; + h=0.10*0.75; + SizeEx=0.06*0.75; + text=""; + }; + class RscTextCenterLine1Left: RscTextTop + { + idc=75300; + y=safezoneY+0.7+0.60*0.75; + style=ST_LEFT; + h=0.10*0.75; + SizeEx=0.05*0.75; + text=""; + }; + class RscTextCenterLine2Left: RscTextCenterLine1Left + { + idc=75301; + y=safezoneY+0.7+0.64*0.75; + text=""; + }; + class RscTextCenterLine3Left: RscTextCenterLine2Left + { + idc=75302; + y=safezoneY+0.7+0.68*0.75; + text=""; + }; + class RscTextCenterLine1Right: RscTextCenterLine1Left + { + idc=75303; + style=ST_RIGHT; + }; + class RscTextCenterLine2Right: RscTextCenterLine2Left + { + idc=75304; + style=ST_RIGHT; + }; + class RscTextCenterLine3Right: RscTextCenterLine3Left + { + idc=75305; + style=ST_RIGHT; + }; + class RscTextInfoLine1: RscTextTop + { + idc=75400; + y=safezoneY+0.7+0.69*0.75; + text=""; + }; + class RscTextInfoLine2: RscTextTop + { + idc=75401; + y=safezoneY+0.7+0.72*0.75; + text=""; + }; + }; + }; + + class RscKestrel4500_Preload { + idd = -1; + movingEnable = 0; + duration = 1e+011; + fadein = 0; + fadeout = 0; + class controls { + class Preload_0 { + text = PATHTOF(UI\Kestrel4500_0.paa); + }; + class Preload_1 { + text = PATHTOF(UI\Kestrel4500_1.paa); + }; + class Preload_2 { + text = PATHTOF(UI\Kestrel4500_2.paa); + }; + class Preload_3 { + text = PATHTOF(UI\Kestrel4500_3.paa); + }; + class Preload_4 { + text = PATHTOF(UI\Kestrel4500_4.paa); + }; + class Preload_5 { + text = PATHTOF(UI\Kestrel4500_5.paa); + }; + class Preload_6 { + text = PATHTOF(UI\Kestrel4500_6.paa); + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/kestrel4500/UI/Kestrel4500.paa b/addons/kestrel4500/UI/Kestrel4500.paa new file mode 100644 index 0000000000..4fafe55cb2 Binary files /dev/null and b/addons/kestrel4500/UI/Kestrel4500.paa differ diff --git a/addons/kestrel4500/UI/Kestrel4500_0.paa b/addons/kestrel4500/UI/Kestrel4500_0.paa new file mode 100644 index 0000000000..6ff961c665 Binary files /dev/null and b/addons/kestrel4500/UI/Kestrel4500_0.paa differ diff --git a/addons/kestrel4500/UI/Kestrel4500_1.paa b/addons/kestrel4500/UI/Kestrel4500_1.paa new file mode 100644 index 0000000000..7b24fe2da8 Binary files /dev/null and b/addons/kestrel4500/UI/Kestrel4500_1.paa differ diff --git a/addons/kestrel4500/UI/Kestrel4500_2.paa b/addons/kestrel4500/UI/Kestrel4500_2.paa new file mode 100644 index 0000000000..199a37afba Binary files /dev/null and b/addons/kestrel4500/UI/Kestrel4500_2.paa differ diff --git a/addons/kestrel4500/UI/Kestrel4500_3.paa b/addons/kestrel4500/UI/Kestrel4500_3.paa new file mode 100644 index 0000000000..9540042ff3 Binary files /dev/null and b/addons/kestrel4500/UI/Kestrel4500_3.paa differ diff --git a/addons/kestrel4500/UI/Kestrel4500_4.paa b/addons/kestrel4500/UI/Kestrel4500_4.paa new file mode 100644 index 0000000000..d336be67f1 Binary files /dev/null and b/addons/kestrel4500/UI/Kestrel4500_4.paa differ diff --git a/addons/kestrel4500/UI/Kestrel4500_5.paa b/addons/kestrel4500/UI/Kestrel4500_5.paa new file mode 100644 index 0000000000..8cb8dabbdc Binary files /dev/null and b/addons/kestrel4500/UI/Kestrel4500_5.paa differ diff --git a/addons/kestrel4500/UI/Kestrel4500_6.paa b/addons/kestrel4500/UI/Kestrel4500_6.paa new file mode 100644 index 0000000000..649dbb1b63 Binary files /dev/null and b/addons/kestrel4500/UI/Kestrel4500_6.paa differ diff --git a/addons/kestrel4500/UI/Kestrel4500_Icon.paa b/addons/kestrel4500/UI/Kestrel4500_Icon.paa new file mode 100644 index 0000000000..062282115a Binary files /dev/null and b/addons/kestrel4500/UI/Kestrel4500_Icon.paa differ diff --git a/addons/kestrel4500/XEH_postInit.sqf b/addons/kestrel4500/XEH_postInit.sqf new file mode 100644 index 0000000000..878f9ca0ce --- /dev/null +++ b/addons/kestrel4500/XEH_postInit.sqf @@ -0,0 +1,25 @@ +#include "script_component.hpp" + +//#include "initKeybinds.sqf" + +GVAR(Menus) = ["Direction", "Wind SPD m/s", "CROSSWIND m/s", "HEADWIND m/s", "TEMP °C", "HUMIDITY %", "BARO hPA", "ALTITUDE m", "User Screen 1", "User Screen 2"]; + +GVAR(TOTAL) = [0, 0, 0, 0, 0, 0, 0, 0]; +GVAR(ENTRIES) = [0, 0, 0, 0, 0, 0, 0, 0]; + +GVAR(MinAvgMax) = false; +GVAR(MinAvgMaxMode) = 0; + +GVAR(Menu) = 1; +GVAR(Directions) = ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"]; +GVAR(Direction) = 0; + +GVAR(RefHeading) = 0; + +GVAR(updateTimer) = 0; +GVAR(outputData) = ["", "", "", "", "", "", "", "", "", ""]; +GVAR(MeasuredWindSpeed) = 0; +GVAR(ImpellerState) = 0; + +GVAR(Kestrel4500) = false; +GVAR(Overlay) = false; diff --git a/addons/kestrel4500/XEH_preInit.sqf b/addons/kestrel4500/XEH_preInit.sqf new file mode 100644 index 0000000000..d081f485ec --- /dev/null +++ b/addons/kestrel4500/XEH_preInit.sqf @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(buttonPressed); +PREP(calculateWindSpeed); +PREP(canShow); +PREP(collectData); +PREP(createKestrelDialog); +PREP(displayKestrel); +PREP(generateOutputData); +PREP(measureWindSpeed); +PREP(updateDisplay); +PREP(updateImpellerState); + +ADDON = true; diff --git a/addons/kestrel4500/config.cpp b/addons/kestrel4500/config.cpp new file mode 100644 index 0000000000..8e558af44f --- /dev/null +++ b/addons/kestrel4500/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {"ACE_Item_Kestrel4500"}; + weapons[] = {"ACE_Kestrel4500"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ACE_common", "ACE_weather"}; + author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"}; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgSound.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" +#include "RscTitles.hpp" \ No newline at end of file diff --git a/addons/kestrel/data/arrow1.paa b/addons/kestrel4500/data/arrow1.paa similarity index 100% rename from addons/kestrel/data/arrow1.paa rename to addons/kestrel4500/data/arrow1.paa diff --git a/addons/kestrel4500/data/body.paa b/addons/kestrel4500/data/body.paa new file mode 100644 index 0000000000..dfaa44723e Binary files /dev/null and b/addons/kestrel4500/data/body.paa differ diff --git a/addons/kestrel/data/gpstemp.paa b/addons/kestrel4500/data/gpstemp.paa similarity index 100% rename from addons/kestrel/data/gpstemp.paa rename to addons/kestrel4500/data/gpstemp.paa diff --git a/addons/kestrel/data/rad.paa b/addons/kestrel4500/data/rad.paa similarity index 100% rename from addons/kestrel/data/rad.paa rename to addons/kestrel4500/data/rad.paa diff --git a/addons/kestrel/data/tasten.paa b/addons/kestrel4500/data/tasten.paa similarity index 100% rename from addons/kestrel/data/tasten.paa rename to addons/kestrel4500/data/tasten.paa diff --git a/addons/kestrel/data/tasten1.paa b/addons/kestrel4500/data/tasten1.paa similarity index 100% rename from addons/kestrel/data/tasten1.paa rename to addons/kestrel4500/data/tasten1.paa diff --git a/addons/kestrel4500/functions/fnc_buttonPressed.sqf b/addons/kestrel4500/functions/fnc_buttonPressed.sqf new file mode 100644 index 0000000000..f0f9a10db1 --- /dev/null +++ b/addons/kestrel4500/functions/fnc_buttonPressed.sqf @@ -0,0 +1,53 @@ +/* + * Author: Ruthberg + * Handles the Kestrel 4500 dialog button actions + * + * Arguments: + * buttonID + * + * Return Value: + * Nothing + * + * Example: + * 2 call ace_kestrel4500_fnc_buttonPressed + * + * Public: No + */ +#include "script_component.hpp" + +switch (_this) do { + case 0: { // Enter + if (!GVAR(MinAvgMax) && (GVAR(Menu) == 2 || GVAR(Menu) == 3)) then { + GVAR(RefHeading) = getDir ACE_player; + }; + if (GVAR(MinAvgMax) && GVAR(Menu) > 0 && GVAR(Menu) < 4) then { + if (GVAR(MinAvgMaxMode) != 1) then { + { + GVAR(MIN) set [_x, 0]; + GVAR(MAX) set [_x, 0]; + GVAR(TOTAL) set [_x, 0]; + GVAR(ENTRIES) set [_x, 0]; + } forEach [1, 2, 3]; + }; + GVAR(MinAvgMaxMode) = (GVAR(MinAvgMaxMode) + 1) % 3; + }; + }; + case 1: { // Top + GVAR(Menu) = (GVAR(Menu) - 1 + (count GVAR(Menus))) % (count GVAR(Menus)); + }; + case 2: { // Bottom + GVAR(Menu) = (GVAR(Menu) + 1 + (count GVAR(Menus))) % (count GVAR(Menus)); + }; + case 3: { // Left + GVAR(MinAvgMax) = !GVAR(MinAvgMax); + }; + case 4: { // Right + GVAR(MinAvgMax) = !GVAR(MinAvgMax); + }; + case 5: { // Memory + }; + case 6: { // Backlight + }; +}; + +[] call FUNC(updateDisplay); diff --git a/addons/kestrel4500/functions/fnc_calculateWindSpeed.sqf b/addons/kestrel4500/functions/fnc_calculateWindSpeed.sqf new file mode 100644 index 0000000000..8267f7f729 --- /dev/null +++ b/addons/kestrel4500/functions/fnc_calculateWindSpeed.sqf @@ -0,0 +1,68 @@ +/* + * Author: Ruthberg + * + * Calculates the wind speed at a given world position + * + * Arguments: + * 0: _this - world position + * + * Return Value: + * 0: wind speed - m/s + * + * Public: No + */ +#include "script_component.hpp" + +private ["_windSpeed", "_windDir", "_newWindSpeed", "_windSource"]; + +fnc_polar2vect = { + private ["_mag2D"]; + _mag2D = (_this select 0) * cos((_this select 2)); + [_mag2D * sin((_this select 1)), _mag2D * cos((_this select 1)), (_this select 0) * sin((_this select 2))]; +}; + +_windSpeed = vectorMagnitude ACE_wind; +_windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); + +// Terrain effect on wind +if (_windSpeed > 0.05) then { + _newWindSpeed = 0; + { + _windSource = [100, _windDir + 180, _x] call fnc_polar2vect; + if (!(terrainIntersectASL [_this, _this vectorAdd _windSource])) exitWith { + _newWindSpeed = cos(_x * 9) * _windSpeed; + }; + _windSource = [100, _windDir + 180 + _x, 0] call fnc_polar2vect; + if (!(terrainIntersectASL [_this, _this vectorAdd _windSource])) exitWith { + _newWindSpeed = cos(_x * 9) * _windSpeed; + }; + _windSource = [100, _windDir + 180 - _x, 0] call fnc_polar2vect; + if (!(terrainIntersectASL [_this, _this vectorAdd _windSource])) exitWith { + _newWindSpeed = cos(_x * 9) * _windSpeed; + }; + } forEach [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + _windSpeed = _newWindSpeed; +}; + +// Obstacle effect on wind +if (_windSpeed > 0.05) then { + _newWindSpeed = 0; + { + _windSource = [20, _windDir + 180, _x] call fnc_polar2vect; + if (!(lineIntersects [_this, _this vectorAdd _windSource])) exitWith { + _newWindSpeed = cos(_x * 2) * _windSpeed; + }; + _windSource = [20, _windDir + 180 + _x, 0] call fnc_polar2vect; + if (!(lineIntersects [_this, _this vectorAdd _windSource])) exitWith { + _newWindSpeed = cos(_x * 2) * _windSpeed; + }; + _windSource = [20, _windDir + 180 - _x, 0] call fnc_polar2vect; + if (!(lineIntersects [_this, _this vectorAdd _windSource])) exitWith { + _newWindSpeed = cos(_x * 2) * _windSpeed; + }; + } forEach [0, 5, 10, 15, 20, 25, 30, 35, 40, 45]; + _windSpeed = _newWindSpeed; +}; +_windSpeed = 0 max _windSpeed; + +_windSpeed diff --git a/addons/kestrel4500/functions/fnc_canShow.sqf b/addons/kestrel4500/functions/fnc_canShow.sqf new file mode 100644 index 0000000000..0c9e29f9bc --- /dev/null +++ b/addons/kestrel4500/functions/fnc_canShow.sqf @@ -0,0 +1,18 @@ +/* + * Authors: Ruthberg + * Tests if the Kestrel 4500 can be shown + * + * Arguments: + * Nothing + * + * Return Value: + * canShow (bool) + * + * Example: + * [mode] call ace_kestrel4500_fnc_canShow + * + * Public: No + */ +#include "script_component.hpp" + +("ACE_Kestrel4500" in (uniformItems ACE_player)) || ("ACE_Kestrel4500" in (vestItems ACE_player)) diff --git a/addons/kestrel4500/functions/fnc_collectData.sqf b/addons/kestrel4500/functions/fnc_collectData.sqf new file mode 100644 index 0000000000..8ebd4e01d2 --- /dev/null +++ b/addons/kestrel4500/functions/fnc_collectData.sqf @@ -0,0 +1,94 @@ +/* + * Author: Ruthberg + * Gathers the weather data for the Kestrel 4500 + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +private ["_playerDir", "_windSpeed", "_windDir", "_crosswind", "_headwind", "_humidity", "_temperature", "_humidity", "_barometricPressure", "_altitude"]; + +if (isNil QGVAR(MIN) || isNil QGVAR(MAX)) then { + _temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL ACE_player) select 2); + _humidity = EGVAR(weather,currentHumidity); + _barometricPressure = 1013.25 * exp(-(EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast; + _altitude = EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2); + GVAR(MIN) = [0, 0, 0, 0, _temperature, _humidity, _barometricPressure, _altitude]; + GVAR(MAX) = [0, 0, 0, 0, _temperature, _humidity, _barometricPressure, _altitude]; +}; + +{ + GVAR(ENTRIES) set [_x, (GVAR(ENTRIES) select _x) + 1]; +} forEach [0, 4, 5, 6 ,7]; + +// Direction +_playerDir = getDir ACE_player; +GVAR(MIN) set [0, (GVAR(MIN) select 0) min _playerDir]; +GVAR(MAX) set [0, _playerDir max (GVAR(MAX) select 0)]; +GVAR(TOTAL) set [0, (GVAR(TOTAL) select 0) + _playerDir]; + +if (GVAR(MinAvgMaxMode) == 1) then { + { + GVAR(ENTRIES) set [_x, (GVAR(ENTRIES) select _x) + 1]; + } forEach [1, 2, 3]; + + // Wind SPD + _windSpeed = call FUNC(measureWindSpeed); + GVAR(MIN) set [1, (GVAR(MIN) select 1) min abs(_windSpeed)]; + GVAR(MAX) set [1, abs(_windSpeed) max (GVAR(MAX) select 1)]; + GVAR(TOTAL) set [1, (GVAR(TOTAL) select 1) + abs(_windSpeed)]; + + // CROSSWIND + _crosswind = 0; + if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { + _crosswind = abs(sin(GVAR(RefHeading) - _playerDir) * _windSpeed); + } else { + _crosswind = abs(sin(GVAR(RefHeading)) * _windSpeed); + }; + GVAR(MIN) set [2, (GVAR(MIN) select 2) min _crosswind]; + GVAR(MAX) set [2, _crosswind max (GVAR(MAX) select 2)]; + GVAR(TOTAL) set [2, (GVAR(TOTAL) select 2) + _crosswind]; + + // HEADWIND + _headwind = 0; + if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { + _headwind = abs(cos(GVAR(RefHeading) - _playerDir) * _windSpeed); + } else { + _headwind = abs(cos(GVAR(RefHeading)) * _windSpeed); + }; + GVAR(MIN) set [3, (GVAR(MIN) select 3) min _headwind]; + GVAR(MAX) set [3, _headwind max (GVAR(MAX) select 3)]; + GVAR(TOTAL) set [3, (GVAR(TOTAL) select 3) + _headwind]; +}; + +// TEMP +_temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL ACE_player) select 2); +GVAR(MIN) set [4, (GVAR(MIN) select 4) min _temperature]; +GVAR(MAX) set [4, _temperature max (GVAR(MAX) select 4)]; +GVAR(TOTAL) set [4, (GVAR(TOTAL) select 4) + _temperature]; + +// HUMIDITY +_humidity = EGVAR(weather,currentHumidity); +GVAR(MIN) set [5, (GVAR(MIN) select 5) min _humidity]; +GVAR(MAX) set [5, _humidity max (GVAR(MAX) select 5)]; +GVAR(TOTAL) set [5, (GVAR(TOTAL) select 5) + _humidity]; + +// BARO +_barometricPressure = 1013.25 * exp(-(EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast; +GVAR(MIN) set [6, (GVAR(MIN) select 6) min _barometricPressure]; +GVAR(MAX) set [6, _barometricPressure max (GVAR(MAX) select 6)]; +GVAR(TOTAL) set [6, (GVAR(TOTAL) select 6) + _barometricPressure]; + +// ALTITUDE +_altitude = EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2); +GVAR(MIN) set [7, (GVAR(MIN) select 7) min _altitude]; +GVAR(MAX) set [7, _altitude max (GVAR(MAX) select 7)]; +GVAR(TOTAL) set [7, (GVAR(TOTAL) select 7) + _altitude]; \ No newline at end of file diff --git a/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf b/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf new file mode 100644 index 0000000000..f9cd6cf04a --- /dev/null +++ b/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf @@ -0,0 +1,36 @@ +/* + * Author: Ruthberg + * Opens the Kestrel 4500 dialog + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +//if (dialog) exitWith { false }; +if (underwater ACE_player) exitWith { false }; +if (!("ACE_Kestrel4500" in (uniformItems ACE_player)) && !("ACE_Kestrel4500" in (vestItems ACE_player))) exitWith { false }; + +GVAR(Overlay) = false; +3 cutText ["", "PLAIN"]; + +GVAR(Kestrel4500) = true; +createDialog 'Kestrel4500_Display'; + +[{ + if (!dialog || !GVAR(Kestrel4500)) exitWith { + GVAR(Kestrel4500) = false; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + [] call FUNC(updateDisplay); +}, 1, _this select 0] call CBA_fnc_addPerFrameHandler; + +true diff --git a/addons/kestrel4500/functions/fnc_displayKestrel.sqf b/addons/kestrel4500/functions/fnc_displayKestrel.sqf new file mode 100644 index 0000000000..2c1241bb6c --- /dev/null +++ b/addons/kestrel4500/functions/fnc_displayKestrel.sqf @@ -0,0 +1,85 @@ +/* + * Author: Ruthberg + * Shows the Kestrel 4500 as rsc title + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +#define __dsp (uiNamespace getVariable "RscKestrel4500") +#define __ctrlKestrel4500 (__dsp displayCtrl 75000) +#define __ctrlTop (__dsp displayCtrl 75100) +#define __ctrlCenterBig (__dsp displayCtrl 75200) +#define __ctrlCenterLine1Left (__dsp displayCtrl 75300) +#define __ctrlCenterLine2Left (__dsp displayCtrl 75301) +#define __ctrlCenterLine3Left (__dsp displayCtrl 75302) +#define __ctrlCenterLine1Right (__dsp displayCtrl 75303) +#define __ctrlCenterLine2Right (__dsp displayCtrl 75304) +#define __ctrlCenterLine3Right (__dsp displayCtrl 75305) +#define __ctrlInfoLine1 (__dsp displayCtrl 75400) +#define __ctrlInfoLine2 (__dsp displayCtrl 75401) + +if (GVAR(Overlay)) exitWith { + GVAR(Overlay) = false; + 3 cutText ["", "PLAIN"]; + true +}; +if (underwater ACE_player) exitWith { true }; +if (!("ACE_Kestrel4500" in (uniformItems ACE_player)) && !("ACE_Kestrel4500" in (vestItems ACE_player))) exitWith { true }; + +if (GVAR(Kestrel4500) && dialog) then { + GVAR(Kestrel4500) = false; + closeDialog 0; +}; + +GVAR(Overlay) = true; + +[{ + private ["_outputData", "_updateTimer"]; + + // abort condition + if (!GVAR(Overlay) || {!(("ACE_Kestrel4500" in (uniformItems ACE_player)) || ("ACE_Kestrel4500" in (vestItems ACE_player)))}) exitWith { + GVAR(Overlay) = false; + 3 cutText ["", "PLAIN"]; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + if (diag_tickTime > GVAR(updateTimer)) then { + GVAR(updateTimer) = diag_tickTime + 1; + + _outputData = [] call FUNC(generateOutputData); + + 3 cutRsc ["RscKestrel4500", "PLAIN", 1, false]; + + __ctrlTop ctrlSetText (_outputData select 0); + __ctrlCenterBig ctrlSetText (_outputData select 1); + + __ctrlTop ctrlSetText (_outputData select 0); + __ctrlCenterBig ctrlSetText (_outputData select 1); + + __ctrlCenterLine1Left ctrlSetText (_outputData select 2); + __ctrlCenterLine2Left ctrlSetText (_outputData select 3); + __ctrlCenterLine3Left ctrlSetText (_outputData select 4); + + __ctrlCenterLine1Right ctrlSetText (_outputData select 5); + __ctrlCenterLine2Right ctrlSetText (_outputData select 6); + __ctrlCenterLine3Right ctrlSetText (_outputData select 7); + + __ctrlInfoLine1 ctrlSetText (_outputData select 8); + __ctrlInfoLine2 ctrlSetText (_outputData select 9); + }; + + call FUNC(updateImpellerState); + __ctrlKestrel4500 ctrlSetText format [QUOTE(PATHTOF(UI\Kestrel4500_%1.paa)), floor(GVAR(ImpellerState) % 7)]; + +}, 0.01, []] call CBA_fnc_addPerFrameHandler; + +true diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf new file mode 100644 index 0000000000..e7679df53f --- /dev/null +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -0,0 +1,217 @@ +/* + * Author: Ruthberg + * Generates the Kestrel 4500 output text. + * + * Arguments: + * Nothing + * + * Return Value: + * [top , centerBig , CenterLine1Left , CenterLine2Left , CenterLine3Left , CenterLine1Right , CenterLine2Right , CenterLine3Right , InfoLine1 , InfoLine2 ] + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +private ["_playerDir", "_textTop", "_textCenterBig", "_textCenterLine1Left", "_textCenterLine2Left", "_textCenterLine3Left", "_textCenterLine1Right", "_textCenterLine2Right", "_textCenterLine3Right", "_textInfoLine1", "_textInfoLine2", "_temperature", "_humidity", "_windSpeed", "_windDir", "_newWindSpeed", "_windSource", "_height"]; + +[] call FUNC(collectData); + +_textTop = GVAR(Menus) select GVAR(Menu); +_textCenterBig = ""; + +_textCenterLine1Left = ""; +_textCenterLine2Left = ""; +_textCenterLine3Left = ""; +_textCenterLine1Right = ""; +_textCenterLine2Right = ""; +_textCenterLine3Right = ""; + +_textInfoLine1 = ""; +_textInfoLine2 = ""; + +_windSpeed = call FUNC(measureWindSpeed); +_windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); + +_temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL ACE_player) select 2); +_humidity = EGVAR(weather,currentHumidity); + +_playerDir = getDir ACE_player; + +GVAR(Direction) = 4 * floor(_playerDir / 90); +if (_playerDir % 90 > 10) then { GVAR(Direction) = GVAR(Direction) + 1}; +if (_playerDir % 90 > 35) then { GVAR(Direction) = GVAR(Direction) + 1}; +if (_playerDir % 90 > 55) then { GVAR(Direction) = GVAR(Direction) + 1}; +if (_playerDir % 90 > 80) then { GVAR(Direction) = GVAR(Direction) + 1}; +GVAR(Direction) = GVAR(Direction) % 16; + +switch (GVAR(Menu)) do { + case 0: { // Direction + if (!GVAR(MinAvgMax)) then { + _textCenterBig = format["%1", format["%1 %2", GVAR(Directions) select GVAR(Direction), round(_playerDir)]]; + } else { + _textCenterLine1Left = "Min"; + _textCenterLine2Left = "Avg"; + _textCenterLine3Left = "Max"; + _textCenterLine1Right = "N/A"; + _textCenterLine2Right = "N/A"; + _textCenterLine3Right = "N/A"; + }; + }; + case 1: { // Wind SPD + if (!GVAR(MinAvgMax)) then { + _textCenterBig = Str(round(abs(_windSpeed) * 10) / 10); + } else { + _textCenterLine1Left = "Max"; + _textCenterLine2Left = "Avg"; + switch (GVAR(MinAvgMaxMode)) do { + case 0: { + _textCenterLine1Right = "--. -"; + _textCenterLine2Right = "--. -"; + _textInfoLine2 = "- average"; + }; + case 1: { + _textCenterLine1Right = Str(round((GVAR(Max) select 1) * 10) / 10); + _textCenterLine2Right = Str(round((GVAR(Total) select 1) / (GVAR(Entries) select 1) * 10) / 10); + _textInfoLine2 = "- stop"; + }; + case 2: { + _textCenterLine1Right = Str(round((GVAR(Max) select 1) * 10) / 10); + _textCenterLine2Right = Str(round((GVAR(Total) select 1) / (GVAR(Entries) select 1) * 10) / 10); + _textInfoLine2 = "- clear"; + }; + }; + }; + }; + case 2: { // CROSSWIND + if (!GVAR(MinAvgMax)) then { + if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { + _textCenterBig = Str(round(abs(sin(GVAR(RefHeading) - _playerDir) * _windSpeed) * 10) / 10); + _textInfoLine1 = format["%1 m/s @ %2", round((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)]; + }; + _textInfoLine2 = "- set heading"; + } else { + _textCenterLine1Left = "Max"; + _textCenterLine2Left = "Avg"; + switch (GVAR(MinAvgMax)Mode) do { + case 0: { + _textCenterLine1Right = "--. -"; + _textCenterLine2Right = "--. -"; + _textInfoLine2 = "- average"; + }; + case 1: { + _textCenterLine1Right = Str(round((GVAR(Max) select 2) * 10) / 10); + _textCenterLine2Right = Str(round((GVAR(Total) select 2) / (GVAR(Entries) select 2) * 10) / 10); + _textInfoLine2 = "- stop"; + }; + case 2: { + _textCenterLine1Right = Str(round((GVAR(Max) select 2) * 10) / 10); + _textCenterLine2Right = Str(round((GVAR(Total) select 2) / (GVAR(Entries) select 2) * 10) / 10); + _textInfoLine2 = "- clear"; + }; + }; + }; + }; + case 3: { // HEADWIND + if (!GVAR(MinAvgMax)) then { + if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { + _textCenterBig = Str(round(abs(cos(GVAR(RefHeading) - _playerDir) * _windSpeed) * 10) / 10); + _textInfoLine1 = format["%1 m/s @ %2", round((cos(_playerDir - _windDir) * _windSpeed) * 10) / 10, round(_playerDir)]; + } else { + _textCenterBig = Str(round(abs(cos(GVAR(RefHeading)) * _windSpeed) * 10) / 10); + _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_windDir)]; + }; + _textInfoLine2 = "- set heading"; + } else { + _textCenterLine1Left = "Max"; + _textCenterLine2Left = "Avg"; + switch (GVAR(MinAvgMax)Mode) do { + case 0: { + _textCenterLine1Right = "--. -"; + _textCenterLine2Right = "--. -"; + _textInfoLine2 = "- average"; + }; + case 1: { + _textCenterLine1Right = Str(round((GVAR(Max) select 3) * 10) / 10); + _textCenterLine2Right = Str(round((GVAR(Total) select 3) / (GVAR(Entries) select 3) * 10) / 10); + _textInfoLine2 = "- stop"; + }; + case 2: { + _textCenterLine1Right = Str(round((GVAR(Max) select 3) * 10) / 10); + _textCenterLine2Right = Str(round((GVAR(Total) select 3) / (GVAR(Entries) select 3) * 10) / 10); + _textInfoLine2 = "- clear"; + }; + }; + }; + }; + case 4: { // TEMP + if (!GVAR(MinAvgMax)) then { + _textCenterBig = Str(round(_temperature * 10) / 10); + } else { + _textCenterLine1Left = "Min"; + _textCenterLine2Left = "Avg"; + _textCenterLine3Left = "Max"; + _textCenterLine1Right = Str(round((GVAR(Min) select 4) * 10) / 10); + _textCenterLine2Right = Str(round((GVAR(Total) select 4) / (GVAR(Entries) select 4) * 10) / 10); + _textCenterLine3Right = Str(round((GVAR(Max) select 4) * 10) / 10); + }; + }; + case 5: { // HUMIDITY + if (!GVAR(MinAvgMax)) then { + _textCenterBig = Str(round(_humidity * 100 * 10) / 10); + } else { + _textCenterLine1Left = "Min"; + _textCenterLine2Left = "Avg"; + _textCenterLine3Left = "Max"; + _textCenterLine1Right = Str(round((GVAR(Min) select 5) * 10) / 10); + _textCenterLine2Right = Str(round((GVAR(Total) select 5) / (GVAR(Entries) select 5) * 10) / 10); + _textCenterLine3Right = Str(round((GVAR(Max) select 5) * 10) / 10); + }; + }; + case 6: { // BARO + if (!GVAR(MinAvgMax)) then { + _textCenterBig = Str(round((1013.25 * exp(-(EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast) * 10) / 10); + } else { + _textCenterLine1Left = "Min"; + _textCenterLine2Left = "Avg"; + _textCenterLine3Left = "Max"; + _textCenterLine1Right = Str(round((GVAR(Min) select 6) * 10) / 10); + _textCenterLine2Right = Str(round((GVAR(Total) select 6) / (GVAR(Entries) select 6) * 10) / 10); + _textCenterLine3Right = Str(round((GVAR(Max) select 6) * 10) / 10); + }; + }; + case 7: { // ALTITUDE + if (!GVAR(MinAvgMax)) then { + _textCenterBig = Str(round(EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2))); + } else { + _textCenterLine1Left = "Min"; + _textCenterLine2Left = "Avg"; + _textCenterLine3Left = "Max"; + _textCenterLine1Right = Str(round(GVAR(Min) select 7)); + _textCenterLine2Right = Str(round((GVAR(Total) select 7) / (GVAR(Entries) select 7))); + _textCenterLine3Right = Str(round(GVAR(Max) select 7)); + }; + }; + case 8: { // User Screen 1 + _textCenterLine1Left = Str(round(_playerDir)); + _textCenterLine2Left = Str(round(EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2))); + _textCenterLine3Left = Str(round(abs(_windSpeed) * 10) / 10); + _textCenterLine1Right = GVAR(Directions) select GVAR(Direction); + _textCenterLine2Right = "m"; + _textCenterLine3Right = "m/s"; + }; + case 9: { // User Screen 2 + _textCenterLine1Left = Str(round(_temperature * 10) / 10); + _textCenterLine2Left = Str(round(_humidity * 100 * 10) / 10); + _textCenterLine3Left = Str(round((1013.25 * exp(-(EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast) * 10) / 10); + _textCenterLine1Right = "C"; + _textCenterLine2Right = "%"; + _textCenterLine3Right = "hPA"; + }; +}; + +[_textTop, _textCenterBig, _textCenterLine1Left, _textCenterLine2Left, _textCenterLine3Left, _textCenterLine1Right, _textCenterLine2Right, _textCenterLine3Right, _textInfoLine1, _textInfoLine2] diff --git a/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf b/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf new file mode 100644 index 0000000000..eb718906aa --- /dev/null +++ b/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf @@ -0,0 +1,39 @@ +/* + * Author: Ruthberg + * Measures the wind speed, stores the information in GVAR(MeasuredWindSpeed) and updates GVAR(ImpellerState) + * + * Arguments: + * Nothing + * + * Return Value: + * wind speed + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +private ["_playerDir", "_windSpeed", "_windDir"]; + +_playerDir = getDir ACE_player; +_windSpeed = vectorMagnitude ACE_wind; +_windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); + +if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { + _windSpeed = (eyePos ACE_player) call EFUNC(advanced_ballistics,calculateWindSpeed); + _windSpeed = abs(cos(_playerDir - _windDir)) * _windSpeed; +} else { + _windSpeed = (eyePos ACE_player) call FUNC(calculateWindSpeed); +}; + +if (_windSpeed > 0.3 || {GVAR(MeasuredWindSpeed) > 0.1 && _windSpeed > 0.125}) then { + GVAR(MeasuredWindSpeed) = _windSpeed; +} else { + GVAR(MeasuredWindSpeed) = GVAR(MeasuredWindSpeed) * 0.99; + if (GVAR(MeasuredWindSpeed) < 0.05) then { + GVAR(MeasuredWindSpeed) = 0; + }; +}; + +GVAR(MeasuredWindSpeed) diff --git a/addons/kestrel4500/functions/fnc_updateDisplay.sqf b/addons/kestrel4500/functions/fnc_updateDisplay.sqf new file mode 100644 index 0000000000..0f8be4f873 --- /dev/null +++ b/addons/kestrel4500/functions/fnc_updateDisplay.sqf @@ -0,0 +1,33 @@ +/* + * Author: Ruthberg + * Updates the Kestrel 4500 dialog text boxes. + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +private ["_outputData"]; + +_outputData = [] call FUNC(generateOutputData); + +ctrlSetText [74100, _outputData select 0]; +ctrlSetText [74200, _outputData select 1]; + +ctrlSetText [74300, _outputData select 2]; +ctrlSetText [74301, _outputData select 3]; +ctrlSetText [74302, _outputData select 4]; + +ctrlSetText [74303, _outputData select 5]; +ctrlSetText [74304, _outputData select 6]; +ctrlSetText [74305, _outputData select 7]; + +ctrlSetText [74400, _outputData select 8]; +ctrlSetText [74401, _outputData select 9]; \ No newline at end of file diff --git a/addons/kestrel4500/functions/fnc_updateImpellerState.sqf b/addons/kestrel4500/functions/fnc_updateImpellerState.sqf new file mode 100644 index 0000000000..075ed80080 --- /dev/null +++ b/addons/kestrel4500/functions/fnc_updateImpellerState.sqf @@ -0,0 +1,22 @@ +/* + * Author: Ruthberg + * Updates the Kestrel 4500 Impeller state + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +private ["_windSpeed"]; + +_windSpeed = call FUNC(measureWindSpeed); + +GVAR(ImpellerState) = GVAR(ImpellerState) + (ceil(_windSpeed) min 1) max _windSpeed; +if (GVAR(ImpellerState) > 1000) then { GVAR(ImpellerState) = 0 }; diff --git a/addons/kestrel4500/functions/script_component.hpp b/addons/kestrel4500/functions/script_component.hpp new file mode 100644 index 0000000000..32c774cd89 --- /dev/null +++ b/addons/kestrel4500/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\kestrel4500\script_component.hpp" \ No newline at end of file diff --git a/addons/kestrel4500/initKeybinds.sqf b/addons/kestrel4500/initKeybinds.sqf new file mode 100644 index 0000000000..657e10d907 --- /dev/null +++ b/addons/kestrel4500/initKeybinds.sqf @@ -0,0 +1,23 @@ +["ACE3", QGVAR(KestrelDialogKey), localize "STR_ACE_Kestrel4500_KestrelDialogKey", +{ + // Conditions: canInteract + if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + + // Statement + [] call FUNC(createKestrelDialog); + false +}, +{false}, +[70, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // (SCROLL) + +["ACE3", QGVAR(DisplayKestrelKey), localize "STR_ACE_Kestrel4500_DisplayKestrelKey", +{ + // Conditions: canInteract + if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + + // Statement + [] call FUNC(displayKestrel); + false +}, +{false}, +[70, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (SHIFT + SCROLL) diff --git a/addons/kestrel4500/kestrel4500.p3d b/addons/kestrel4500/kestrel4500.p3d new file mode 100644 index 0000000000..bb4edd2706 Binary files /dev/null and b/addons/kestrel4500/kestrel4500.p3d differ diff --git a/addons/kestrel4500/script_component.hpp b/addons/kestrel4500/script_component.hpp new file mode 100644 index 0000000000..b8db2edb78 --- /dev/null +++ b/addons/kestrel4500/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT kestrel4500 +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_KESTREL4500 + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_KESTREL4500 + #define DEBUG_SETTINGS DEBUG_SETTINGS_KESTREL4500 +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#define GET_TEMPERATURE_AT_HEIGHT(h) (EGVAR(weather,currentTemperature) - 0.0065 * (h)) diff --git a/addons/kestrel4500/sound/kestrel_bottom_button_click.wav b/addons/kestrel4500/sound/kestrel_bottom_button_click.wav new file mode 100644 index 0000000000..1f5a2ddeb1 Binary files /dev/null and b/addons/kestrel4500/sound/kestrel_bottom_button_click.wav differ diff --git a/addons/kestrel4500/sound/kestrel_center_button_click.wav b/addons/kestrel4500/sound/kestrel_center_button_click.wav new file mode 100644 index 0000000000..ce34a645c3 Binary files /dev/null and b/addons/kestrel4500/sound/kestrel_center_button_click.wav differ diff --git a/addons/kestrel4500/sound/kestrel_exit_button_click.wav b/addons/kestrel4500/sound/kestrel_exit_button_click.wav new file mode 100644 index 0000000000..1f5a2ddeb1 Binary files /dev/null and b/addons/kestrel4500/sound/kestrel_exit_button_click.wav differ diff --git a/addons/kestrel4500/sound/kestrel_left_button_click.wav b/addons/kestrel4500/sound/kestrel_left_button_click.wav new file mode 100644 index 0000000000..a880e76dc1 Binary files /dev/null and b/addons/kestrel4500/sound/kestrel_left_button_click.wav differ diff --git a/addons/kestrel4500/sound/kestrel_right_button_click.wav b/addons/kestrel4500/sound/kestrel_right_button_click.wav new file mode 100644 index 0000000000..14ff2e0689 Binary files /dev/null and b/addons/kestrel4500/sound/kestrel_right_button_click.wav differ diff --git a/addons/kestrel4500/sound/kestrel_top_button_click.wav b/addons/kestrel4500/sound/kestrel_top_button_click.wav new file mode 100644 index 0000000000..e4ef1df50d Binary files /dev/null and b/addons/kestrel4500/sound/kestrel_top_button_click.wav differ diff --git a/addons/kestrel4500/stringtable.xml b/addons/kestrel4500/stringtable.xml new file mode 100644 index 0000000000..310884f989 --- /dev/null +++ b/addons/kestrel4500/stringtable.xml @@ -0,0 +1,42 @@ + + + + + + Kestrel 4500NV + Kestrel 4500NV + Kestrel 4500NV + Kestrel 4500NV + Kestrel 4500NV + Kestrel 4500NV + Kestrel 4500NV + Kestrel 4500NV + Kestrel 4500NV + Kestrel 4500NV + + + Kestrel 4500 Pocket Weather Tracker + Anemomentr skrzydełkowy Kestrel 4500 + + + Open Kestrel 4500 + Otwórz Kestrel 4500 + + + Show Kestrel 4500 + Pokaż Kestrel 4500 + + + Hide Kestrel 4500 + Ukryj Kestrel 4500 + + + Open Kestrel 4500 + Otwórz Kestrel 4500 + + + Show Kestrel 4500 + Pokaż Kestrel 4500 + + + \ No newline at end of file diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf index 421748a681..41ea877739 100644 --- a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf +++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf @@ -4,8 +4,10 @@ * * Arguments: * 0: Position of seeker (ASL) - * 1: Seeker wavelength sensitivity range, [1550,1550] is common eye safe. - * 2: Seeker laser code. + * 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: * Array, [Strongest compatible laser spot ASL pos, owner object] Nil array values if nothing found. @@ -17,9 +19,14 @@ private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_ex "_emitterWavelength", "_laserCode", "_divergence", "_laser", "_laserPos", "_laserDir", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index", "_testPos", "_finalBuckets", "_largest", "_largestIndex", "_finalBucket", "_owners", "_avgX", "_avgY", "_avgZ", "_count", "_maxOwner", "_maxOwnerIndex", "_finalOwner"]; -_pos = _this select 0; -_seekerWavelengths = _this select 1; -_seekerCode = _this select 2; +_pos = _this select 0; +_dir = vectorNormalized (_this select 1); +_seekerFov = _this select 2; +_seekerWavelengths = _this select 3; +_seekerCode = _this select 4; + + +_seekerCos = cos _seekerFov; _spots = []; _buckets = []; @@ -57,8 +64,13 @@ _finalOwner = nil; _laserPos = _laser select 0; _laserDir = _laser select 1; _res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone); - { - _spots pushBack [_x select 0, _owner]; + { + _testPoint = _x select 0; + _testPointVector = vectorNormalized (_testPoint vectorDiff _pos); + _testDotProduct = _dir vectorDotProduct _testPointVector; + if(_testDotProduct > _seekerCos) then { + _spots pushBack [_testPoint, _owner]; + }; } forEach (_res select 2); }; } forEach (GVAR(laserEmitters) select 1); diff --git a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOff.sqf b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOff.sqf index 17e7fcb76e..f8ff2ca0f5 100644 --- a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOff.sqf +++ b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOff.sqf @@ -22,4 +22,9 @@ if( (count _this) > 2) then { GVAR(active) = false; +if(!isNil QGVAR(selfDesignateHandle)) then { + [GVAR(selfDesignateHandle)] call CBA_fnc_removePerFrameHandler; + GVAR(selfDesignateHandle) = nil; +}; + true \ No newline at end of file diff --git a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf index c480c051bb..400bf21756 100644 --- a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf +++ b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf @@ -83,7 +83,7 @@ if(!GVAR(active)) then { // @TODO: Nou gets to field all tickets about missing lasers. //_localLaserTarget = "LaserTargetW" createVehicleLocal (getpos ACE_player); - _handle = [FUNC(laserHudDesignatePFH), 0.1, [ACE_player, _laserUuid, nil]] call cba_fnc_addPerFrameHandler; + 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/stringtable.xml b/addons/laser_selfdesignate/stringtable.xml index 8b2c528871..33ef24b888 100644 --- a/addons/laser_selfdesignate/stringtable.xml +++ b/addons/laser_selfdesignate/stringtable.xml @@ -1,23 +1,23 @@  - - - Laser<br/>Designator On - Lasermarkierer<br/>an - Laser<br/>Designador encendido - ЛЦУ<br/>ВКЛ - Laserový<br/>značkovač zapnut - Desygnator<br/>laserowy wł. - Désignateur<br/>Laser Allumé - - - Laser<br/>Designator Off - Lasermarkierer<br/>aus - Laser<br/>Designador apagado - ЛЦУ<br/>ВЫКЛ - Laserový<br/>značkovat vypnut - Desygnator<br/>laserowy wył. - Désignateur<br/>Laser Éteint - - + + + Laser<br/>Designator On + Lasermarkierer<br/>an + Laser<br/>Designador encendido + ЛЦУ<br/>ВКЛ + Laserový<br/>značkovač zapnut + Desygnator<br/>laserowy wł. + Désignateur<br/>Laser Allumé + + + Laser<br/>Designator Off + Lasermarkierer<br/>aus + Laser<br/>Designador apagado + ЛЦУ<br/>ВЫКЛ + Laserový<br/>značkovat vypnut + Desygnator<br/>laserowy wył. + Désignateur<br/>Laser Éteint + + diff --git a/addons/laserpointer/stringtable.xml b/addons/laserpointer/stringtable.xml index a5a153aca4..4e2a743f85 100644 --- a/addons/laserpointer/stringtable.xml +++ b/addons/laserpointer/stringtable.xml @@ -1,40 +1,40 @@  - - - Laser Pointer (red) - Pointeur laser (rouge) - Laserpointer (rot) - Лазерный прицел (красный) - Laserové ukazovátko (červené) - Wskaźnik laserowy (czerwony) - - - Laser Pointer (green) - Pointeur laser (vert) - Laserpointer (grün) - Лазерный прицел (зелёный) - Laserové ukazovátko (zelené) - Wskaźnik laserowy (zielony) - - - Emits visible light. - Diffuse un rayon lumineux visible. - Strahlt sichtbares Licht aus. - Испускает узкий пучок видимого света. - Vyzařuje viditelné světlo. - Wydziela widzialne światło. - - - <t color='#9cf953'>Use: </t>Turn Laser ON/OFF - <t color='#9cf953'>Použití: </t>Zapnout/vypnout laser - <t color='#9cf953'>Utiliser : </t>laser allumé/éteint - <t color='#9cf953'>Benutzen: </t>Laser EIN/AUS - <t color='#9cf953'>Uso: </t>Laser ON/OFF - <t color='#9cf953'>Użyj: </t>wł./wył. laser - <t color='#9cf953'>Uso: </t>Ativar/Desativar laser - <t color='#9cf953'>Использовать: </t>вкл/выкл лазер - <t color='#9cf953'>Usar: </t>encender/apagar láser - - + + + Laser Pointer (red) + Pointeur laser (rouge) + Laserpointer (rot) + Лазерный прицел (красный) + Laserové ukazovátko (červené) + Wskaźnik laserowy (czerwony) + + + Laser Pointer (green) + Pointeur laser (vert) + Laserpointer (grün) + Лазерный прицел (зелёный) + Laserové ukazovátko (zelené) + Wskaźnik laserowy (zielony) + + + Emits visible light. + Emettre de la lumière visible + Strahlt sichtbares Licht aus. + Испускает узкий пучок видимого света. + Vyzařuje viditelné světlo. + Wydziela widzialne światło. + + + <t color='#9cf953'>Use: </t>Turn Laser ON/OFF + <t color='#9cf953'>Použití: </t>Zapnout/vypnout laser + <t color='#9cf953'>Utiliser : </t>laser allumé/éteint + <t color='#9cf953'>Benutzen: </t>Laser EIN/AUS + <t color='#9cf953'>Uso: </t>Laser ON/OFF + <t color='#9cf953'>Użyj: </t>wł./wył. laser + <t color='#9cf953'>Uso: </t>Ativar/Desativar laser + <t color='#9cf953'>Использовать: </t>вкл/выкл лазер + <t color='#9cf953'>Usar: </t>encender/apagar láser + + diff --git a/addons/logistics_uavbattery/stringtable.xml b/addons/logistics_uavbattery/stringtable.xml index feca4d07ec..efefc03cc4 100644 --- a/addons/logistics_uavbattery/stringtable.xml +++ b/addons/logistics_uavbattery/stringtable.xml @@ -1,5 +1,4 @@  - @@ -18,7 +17,7 @@ You need a UAV Battery Du brauchst eine UAV-Batterie Necesitas una batería para VANT - Pas de batterie UAV + L'UAV nécessite une batterie Potrzebujesz baterii UAV Szükséged van egy UAV akkumulátorra Potřebuješ UAV baterii @@ -52,7 +51,7 @@ Used to refuel Carried UAV's - Verwendet zum Aufladen von tragbaren UAV's + Verwendet zum Aufladen von tragbaren UAVs Usada para reabastecer el VANT Utilisée pour recharger l'UAV Używana do naładowania baterii przenośnego UAV @@ -75,4 +74,4 @@ Заряжается ... - \ No newline at end of file + diff --git a/addons/logistics_wirecutter/stringtable.xml b/addons/logistics_wirecutter/stringtable.xml index 01bd6b99f3..37fdb3f6a6 100644 --- a/addons/logistics_wirecutter/stringtable.xml +++ b/addons/logistics_wirecutter/stringtable.xml @@ -1,10 +1,9 @@  - Wirecutter - Coupe clôture + Pince coupante Drahtschneider Cortador de cables Клещи-кусачки @@ -18,7 +17,7 @@ Позволяют быстро перекусывать сеточные конструкции. Štípačky Służą do cięcia drutu i płotów - Coupe clôture + Pince coupante Cut Fence @@ -57,4 +56,4 @@ Забор разрезан - \ No newline at end of file + diff --git a/addons/magazinerepack/stringtable.xml b/addons/magazinerepack/stringtable.xml index 35531452d2..1f4f766b42 100644 --- a/addons/magazinerepack/stringtable.xml +++ b/addons/magazinerepack/stringtable.xml @@ -1,5 +1,4 @@  - @@ -76,7 +75,7 @@ Repacking Finished - Réorganisation terminé + Réorganisation terminée Wiederverpacken Fertig Reembalaje finalizado Перепаковка завершена @@ -85,7 +84,7 @@ Repacking Interrupted - Réorganisation Interrompue + Réorganisation interrompue Umpacken Unterbrochen Reembalaje interrumpido Перепаковка прервана @@ -94,7 +93,7 @@ %1 Full and %2 Partial - %1 Complet et %2 Partiellement + %1 plein(s) et %2 partiel(s) %1 Vollständigen und %2 Teilweisen %1 Total y %2 Parcial %1 полных и %2 неполных @@ -102,4 +101,4 @@ Pełnych: %1.<br />Częściowo pełnych: %2. - \ No newline at end of file + diff --git a/addons/magazines/$PBOPREFIX$ b/addons/magazines/$PBOPREFIX$ deleted file mode 100644 index dee71053cc..0000000000 --- a/addons/magazines/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\magazines \ No newline at end of file diff --git a/addons/magazines/CfgAmmo.hpp b/addons/magazines/CfgAmmo.hpp deleted file mode 100644 index 8a9a3ec209..0000000000 --- a/addons/magazines/CfgAmmo.hpp +++ /dev/null @@ -1,177 +0,0 @@ - -class CfgAmmo { - - /* 6.5x39mm Grendel */ - - // IR Dim - class B_65x39_Caseless_yellow; - class ACE_B_65x39_Caseless_Tracer_Dim: B_65x39_Caseless_yellow { - nvgOnly = 1; - }; - - class B_65x39_Case_yellow; - class ACE_B_65x39_Case_Tracer_Dim: B_65x39_Case_yellow { - nvgOnly = 1; - }; - - // sub sonic - class B_65x39_Caseless; - class ACE_B_65x39_Caseless_SD: B_65x39_Caseless { - airFriction = -0.00054; - hit = 8.75; - supersonicCrackFar[] = {}; - supersonicCrackNear[] = {}; - typicalSpeed = 320; - audibleFire = 0.8; - visibleFire = 2.5; - }; - - class B_65x39_Case; - class ACE_B_65x39_Case_SD: B_65x39_Case { - airFriction = -0.00054; - hit = 8.75; - supersonicCrackFar[] = {}; - supersonicCrackNear[] = {}; - typicalSpeed = 320; - audibleFire = 0.8; - visibleFire = 2.5; - }; - - // armor piercing - class ACE_B_65x39_Caseless_AP: B_65x39_Caseless { - caliber = 1.8; - hit = 10.5; - }; - - class ACE_B_65x39_Case_AP: B_65x39_Case { - caliber = 1.8; - hit = 10.5; - }; - - - /* 5.56x45mm NATO */ - - // IR Dim - class B_556x45_Ball_Tracer_Red; - class ACE_B_556x45_Ball_Tracer_Dim: B_556x45_Ball_Tracer_Red { - nvgOnly = 1; - }; - - // sub sonic - class B_556x45_Ball; - class ACE_B_556x45_Ball_SD: B_556x45_Ball { - airFriction = -0.0006; - hit = 7; - supersonicCrackFar[] = {}; - supersonicCrackNear[] = {}; - typicalSpeed = 320; - audibleFire = 0.6; - visibleFire = 2.0; - }; - - // armor piercing - class ACE_B_556x45_Ball_AP: B_556x45_Ball { - caliber = 1.4; - hit = 8.4; - }; - - - /* 7.62x51mm NATO */ - - // IR Dim - class B_762x51_Tracer_Red; - class ACE_B_762x51_Tracer_Dim: B_762x51_Tracer_Red { - nvgOnly = 1; - }; - - // sub sonic - class B_762x51_Ball; - class ACE_B_762x51_Ball_SD: B_762x51_Ball { - airFriction = -0.00048; - hit = 10.5; - supersonicCrackFar[] = {}; - supersonicCrackNear[] = {}; - typicalSpeed = 320; - audibleFire = 0.9; - visibleFire = 3.0; - }; - - // armor piercing - class ACE_B_762x51_Ball_AP: B_762x51_Ball { - caliber = 2.4; - hit = 12.6; - }; - - // M118 LR - class ACE_B_762x51_M118LR: B_762x51_Ball { - //typicalspeed = 792; - //airfriction = -0.0008577; - }; - - - /* .338 Lapua Magnum */ - - // IR Dim - class B_338_Ball; - class ACE_B_338_Ball_Tracer_Dim: B_338_Ball { - nvgOnly = 1; - }; - - //AP - class ACE_B_338_Ball_AP: B_338_Ball { - caliber = 3.6; - hit = 18.9; - }; - - //SD - class ACE_B_338_Ball_SD: B_338_Ball { - airFriction = -0.00036; - hit = 15.75; - supersonicCrackFar[] = {}; - supersonicCrackNear[] = {}; - typicalSpeed = 320; - audibleFire = 1.2; - visibleFire = 4.0; - }; - - - /* .338 Norma Magnum */ - - //IR Dim - class B_338_NM_Ball; - class ACE_B_338_NM_Ball_Tracer_Dim: B_338_NM_Ball { - nvgOnly = 1; - }; - - //AP - class ACE_B_338_NM_Ball_AP: B_338_NM_Ball { - caliber = 3.2; - hit = 16.8; - }; - - - /* 9.3x64mm */ - - //IR Dim - class B_93x64_Ball; - class ACE_B_93x64_Ball_Tracer_Dim: B_93x64_Ball { - nvgOnly = 1; - }; - - //AP - class ACE_B_93x64_Ball_AP: B_93x64_Ball { - caliber = 4.0; - hit = 21; - }; - - //SD - class ACE_B_93x64_Ball_SD: B_93x64_Ball { - airFriction = -0.00042; - hit = 17.5; - supersonicCrackFar[] = {}; - supersonicCrackNear[] = {}; - typicalSpeed = 320; - audibleFire = 1.2; - visibleFire = 4.0; - }; -}; diff --git a/addons/magazines/CfgMagazines.hpp b/addons/magazines/CfgMagazines.hpp deleted file mode 100644 index cea8c31004..0000000000 --- a/addons/magazines/CfgMagazines.hpp +++ /dev/null @@ -1,266 +0,0 @@ - -class CfgMagazines { - - /* 6.5x39mm Grendel - MX */ - - class 30Rnd_65x39_caseless_mag_Tracer; - class ACE_30Rnd_65x39_caseless_mag_Tracer_Dim: 30Rnd_65x39_caseless_mag_Tracer { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_65x39_Caseless_Tracer_Dim"; - displayName = "$STR_ACE_30Rnd_65x39_caseless_mag_Tracer_DimName"; - displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_mag_Tracer_DimNameShort"; - descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_mag_Tracer_DimDescription"; - picture = "\A3\weapons_f\data\ui\m_30stanag_caseless_yellow_CA.paa"; - }; - - class 30Rnd_65x39_caseless_mag; - class ACE_30Rnd_65x39_caseless_mag_SD: 30Rnd_65x39_caseless_mag { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_65x39_Caseless_SD"; - displayName = "$STR_ACE_30Rnd_65x39_caseless_mag_SDName"; - displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_mag_SDNameShort"; - descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_mag_SDDescription"; - picture = "\A3\weapons_f\data\ui\m_30stanag_caseless_green_CA.paa"; - initSpeed = 320; - }; - - class ACE_30Rnd_65x39_caseless_mag_AP: 30Rnd_65x39_caseless_mag { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_65x39_Caseless_AP"; - displayName = "$STR_ACE_30Rnd_65x39_caseless_mag_APName"; - displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_mag_APNameShort"; - descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_mag_APDescription"; - }; - - - /* 6.5x39mm Grendel - Katiba */ - - class 100Rnd_65x39_caseless_mag; - class 200Rnd_65x39_cased_Box: 100Rnd_65x39_caseless_mag { - initSpeed = 691; - }; - - class 30Rnd_65x39_caseless_green_mag_Tracer; - class ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim: 30Rnd_65x39_caseless_green_mag_Tracer { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_65x39_Caseless_Tracer_Dim"; - displayName = "$STR_ACE_30Rnd_65x39_caseless_green_mag_Tracer_DimName"; - displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_Tracer_DimNameShort"; - descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_Tracer_DimDescription"; - }; - - class 30Rnd_65x39_caseless_green; - class ACE_30Rnd_65x39_caseless_green_mag_SD: 30Rnd_65x39_caseless_green { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_65x39_Caseless_SD"; - displayName = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDName"; - displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDNameShort"; - descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDDescription"; - initSpeed = 320; - }; - - class ACE_30Rnd_65x39_caseless_green_mag_AP: 30Rnd_65x39_caseless_green { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_65x39_Caseless_AP"; - displayName = "$STR_ACE_30Rnd_65x39_caseless_green_mag_APName"; - displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_APNameShort"; - descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_APDescription"; - }; - - - /* 5.56x45mm NATO */ - - class 30Rnd_556x45_Stanag_Tracer_Red; //picture = "\A3\weapons_f\data\ui\m_30stanag_red_ca.paa"; - class ACE_30Rnd_556x45_Stanag_Tracer_Dim: 30Rnd_556x45_Stanag_Tracer_Red { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_556x45_Ball_Tracer_Dim"; - displayName = "$STR_ACE_30Rnd_556x45_mag_Tracer_DimName"; - displayNameShort = "$STR_ACE_30Rnd_556x45_mag_Tracer_DimNameShort"; - descriptionShort = "$STR_ACE_30Rnd_556x45_mag_Tracer_DimDescription"; - picture = "\A3\weapons_f\data\ui\m_30stanag_yellow_ca.paa"; - }; - - class 30Rnd_556x45_Stanag; - class ACE_30Rnd_556x45_Stanag_SD: 30Rnd_556x45_Stanag { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_556x45_Ball_SD"; - displayName = "$STR_ACE_30Rnd_556x45_mag_SDName"; - displayNameShort = "$STR_ACE_30Rnd_556x45_mag_SDNameShort"; - descriptionShort = "$STR_ACE_30Rnd_556x45_mag_SDDescription"; - initSpeed = 320; - picture = "\A3\weapons_f\data\ui\m_30stanag_green_ca.paa"; - }; - - class ACE_30Rnd_556x45_Stanag_AP: 30Rnd_556x45_Stanag { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_556x45_Ball_AP"; - displayName = "$STR_ACE_30Rnd_556x45_mag_APName"; - displayNameShort = "$STR_ACE_30Rnd_556x45_mag_APNameShort"; - descriptionShort = "$STR_ACE_30Rnd_556x45_mag_APDescription"; - }; - - - /* 7.62x51mm NATO */ - - class 20Rnd_762x51_Mag; - class ACE_20Rnd_762x51_Mag_Tracer: 20Rnd_762x51_Mag { //@todo Green tracers for opfor and yellow tracers for independent - author = "$STR_ACE_Common_ACETeam"; - ammo = "B_762x51_Tracer_Red"; - displayName = "$STR_ACE_20Rnd_762x51_mag_TracerName"; - displayNameShort = "$STR_ACE_20Rnd_762x51_mag_TracerNameShort"; - descriptionShort = "$STR_ACE_20Rnd_762x51_mag_TracerDescription"; - tracersEvery = 1; - }; - - class ACE_20Rnd_762x51_Mag_Tracer_Dim: ACE_20Rnd_762x51_Mag_Tracer { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_762x51_Tracer_Dim"; - displayName = "$STR_ACE_20Rnd_762x51_mag_Tracer_DimName"; - displayNameShort = "$STR_ACE_20Rnd_762x51_mag_Tracer_DimNameShort"; - descriptionShort = "$STR_ACE_20Rnd_762x51_mag_Tracer_DimDescription"; - }; - - class ACE_20Rnd_762x51_Mag_SD: 20Rnd_762x51_Mag { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_762x51_Ball_SD"; - displayName = "$STR_ACE_20Rnd_762x51_mag_SDName"; - displayNameShort = "$STR_ACE_20Rnd_762x51_mag_SDNameShort"; - descriptionShort = "$STR_ACE_20Rnd_762x51_mag_SDDescription"; - initSpeed = 320; - }; - - class ACE_20Rnd_762x51_Mag_AP: 20Rnd_762x51_Mag { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_762x51_Ball_AP"; - displayName = "$STR_ACE_20Rnd_762x51_mag_APName"; - displayNameShort = "$STR_ACE_20Rnd_762x51_mag_APNameShort"; - descriptionShort = "$STR_ACE_20Rnd_762x51_mag_APDescription"; - }; - - - /* 338 Lapua Magnum */ - class 10Rnd_338_Mag; - class ACE_10Rnd_338_Mag_Tracer: 10Rnd_338_Mag { - author = "$STR_ACE_Common_ACETeam"; - displayName = "$STR_ACE_10Rnd_338_Mag_TracerName"; - displayNameShort = "$STR_ACE_10Rnd_338_Mag_TracerNameShort"; - descriptionShort = "$STR_ACE_10Rnd_338_Mag_TracerDescription"; - tracersEvery = 1; - }; - - class ACE_10Rnd_338_Mag_Tracer_Dim: ACE_10Rnd_338_Mag_Tracer { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_338_Ball_Tracer_Dim"; - displayName = "$STR_ACE_10Rnd_388_Mag_Tracer_DimName"; - displayNameShort = "$STR_ACE_10Rnd_338_Mag_Tracer_DimNameShort"; - descriptionShort = "$STR_ACE_10Rnd_338_Mag_Tracer_DimDescription"; - }; - - class ACE_10Rnd_338_Mag_AP: 10Rnd_338_Mag { - author = "$STR_ACE_Common_ACETeam"; - ammo ="ACE_B_338_Ball_AP"; - displayName = "$STR_ACE_10Rnd_338_Mag_APName"; - displayNameShort = "$STR_ACE_10Rnd_338_Mag_APNameShort"; - descriptionShort = "$STR_ACE_10Rnd_338_Mag_APDescription"; - }; - - class ACE_10Rnd_338_Mag_SD: 10Rnd_338_Mag { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_338_Ball_SD"; - displayName = "$STR_ACE_10Rnd_338_Mag_SDName"; - displayNameShort = "$STR_ACE_10Rnd_338_Mag_SDNameShort"; - descriptionShort = "$STR_ACE_10Rnd_338_Mag_SDDescription"; - initSpeed = 320; - }; - - - /* .333 Norma Magnum */ - - class 130Rnd_338_Mag; - class ACE_130Rnd_338_Mag_Tracer: 130Rnd_338_Mag { - author = "$STR_ACE_Common_ACETeam"; - displayName = "$STR_ACE_130Rnd_338_Mag_TracerName"; - displayNameShort = "$STR_ACE_130Rnd_338_Mag_TracerNameShort"; - descriptionShort = "$STR_ACE_130Rnd_338_Mag_TracerDescription"; - tracersEvery = 1; - }; - - class ACE_130Rnd_338_Mag_Tracer_Dim: ACE_130Rnd_338_Mag_Tracer { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_338_NM_Ball_Tracer_Dim"; - displayName = "$STR_ACE_130Rnd_338_Mag_Tracer_DimName"; - displayNameShort = "$STR_ACE_130Rnd_338_Mag_Tracer_DimNameShort"; - descriptionShort = "$STR_ACE_130Rnd_338_Mag_Tracer_DimDescription"; - }; - - class ACE_130Rnd_338_Mag_AP: 130Rnd_338_Mag { - author = "$STR_ACE_Common_ACETeam"; - ammo = "ACE_B_338_NM_Ball_AP"; - displayName = "$STR_ACE_130Rnd_338_Mag_APName"; - displayNameShort = "$STR_ACE_130Rnd_338_Mag_APNameShort"; - descriptionShort = "$STR_ACE_130Rnd_338_Mag_APDescription"; - }; - - - /* 9.3x64mm */ - //10Rnd Mags - - class 10Rnd_93x64_DMR_05_Mag; - class ACE_10Rnd_93x64_DMR_05_Mag_Tracer: 10Rnd_93x64_DMR_05_Mag { - author = "$STR_ACE_Common_ACEETeam"; - displayName = "$STR_ACE_10Rnd_93x64_DMR_05_Mag_TracerName"; - displayNameShort = "$STR_ACE_10Rnd_93x64_DMR_05_Mag_TracerNameShort"; - descriptionShort = "$STR_ACE_10Rnd_93x64_DMR_05_Mag_TracerDescription"; - tracersEvery = 1; - }; - - class ACE_10Rnd_93x64_DMR_05_Mag_Tracer_Dim: ACE_10Rnd_93x64_DMR_05_Mag_Tracer { - author = "$STR_ACE_Common_ACEETeam"; - ammo ="ACE_B_93x64_Ball_Tracer_Dim"; - displayName = "$STR_ACE_10Rnd_93x64_DMR_05_Mag_Tracer_DimName"; - displayNameShort = "$STR_ACE_10Rnd_93x64_DMR_05_Mag_Tracer_DimNameShort"; - descriptionShort = "$STR_ACE_10Rnd_93x64_DMR_05_Mag_Tracer_DimDescription"; - }; - - class ACE_10Rnd_93x64_DMR_05_Mag_AP: 10Rnd_93x64_DMR_05_Mag { - author = "$STR_ACE_Common_ACEETeam"; - ammo = "ACE_B_93x64_Ball_AP"; - displayName = "$STR_ACE_10Rnd_93x64_DMR_05_Mag_APName"; - displayNameShort = "$STR_ACE_10Rnd_93x64_DMR_05_Mag_APNameShort"; - descriptionShort = "$STR_ACE_10Rnd_93x64_DMR_05_Mag_APDescription"; - }; - - class ACE_10Rnd_93x64_DMR_05_Mag_SD: 10Rnd_93x64_DMR_05_Mag { - author = "$STR_ACE_Common_ACEETeam"; - ammo = "ACE_B_93x64_Ball_SD"; - displayName = "$STR_ACE_10Rnd_93x64_DMR_05_Mag_SDName"; - displayNameShort = "$STR_ACE_10Rnd_93x64_DMR_05_Mag_SDNameShort"; - descriptionShort = "$STR_ACE_10Rnd_93x64_DMR_05_Mag_SDDescription"; - initSpeed = 320; - }; - //150Rnd Belt - class 150Rnd_93x64_Mag; - class ACE_150Rnd_93x64_Mag_Tracer: 150Rnd_93x64_Mag { - author = "$STR_ACE_Common_ACEETeam"; - displayName = "$STR_ACE_150Rnd_93x64_Mag_TracerName"; - displayNameShort = "$STR_ACE_150Rnd_93x64_Mag_TracerNameShort"; - descriptionShort = "$STR_ACE_150Rnd_93x64_Mag_TracerDescription"; - tracersEvery = 1; - }; - - class ACE_150Rnd_93x64_Mag_Tracer_Dim: ACE_150Rnd_93x64_Mag_Tracer { - author = "$STR_ACE_Common_ACEETeam"; - ammo ="ACE_B_93x64_Ball_Tracer_Dim"; - displayName = "$STR_ACE_150Rnd_93x64_Mag_Tracer_DimName"; - displayNameShort = "$STR_ACE_150Rnd_93x64_Mag_Tracer_DimNameShort"; - descriptionShort = "$STR_ACE_150Rnd_93x64_Mag_Tracer_DimDescription"; - }; - - class ACE_150Rnd_93x64_Mag_AP: 150Rnd_93x64_Mag { - author = "$STR_ACE_Common_ACEETeam"; - ammo = "ACE_B_93x64_Ball_AP"; - displayName = "$STR_ACE_150Rnd_93x64_Mag_APName"; - displayNameShort = "$STR_ACE_150Rnd_93x64_Mag_APNameShort"; - descriptionShort = "$STR_ACE_150Rnd_93x64_Mag_APDescription"; - }; -}; diff --git a/addons/magazines/CfgVehicles.hpp b/addons/magazines/CfgVehicles.hpp deleted file mode 100644 index 66e63cfa09..0000000000 --- a/addons/magazines/CfgVehicles.hpp +++ /dev/null @@ -1,172 +0,0 @@ - -class CfgVehicles { - class NATO_Box_Base; - class Box_NATO_Wps_F: NATO_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_AP,2); - }; - }; - - class Box_NATO_WpsSpecial_F: NATO_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_Tracer_Dim,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,1); - }; - }; - - class Box_NATO_Ammo_F: NATO_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_AP,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_SD,2); - }; - }; - - class Box_NATO_Support_F: NATO_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_SD,6); - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,3); - }; - }; - - class ReammoBox_F; - class B_supplyCrate_F: ReammoBox_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_AP,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_SD,2); - }; - }; - - class EAST_Box_Base; - class Box_East_Wps_F: EAST_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_AP,2); - }; - }; - - class Box_East_WpsSpecial_F: EAST_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,1); - }; - }; - - class Box_East_Ammo_F: EAST_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_AP,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_SD,2); - }; - }; - - class Box_East_Support_F: EAST_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_SD,6); - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,3); - }; - }; - - class O_supplyCrate_F: B_supplyCrate_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_AP,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_SD,2); - }; - }; - - class IND_Box_Base; - class Box_IND_Wps_F: IND_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2); - }; - }; - - class Box_IND_WpsSpecial_F: IND_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,2); - }; - }; - - class Box_IND_Ammo_F: IND_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,2); - }; - }; - - class Box_IND_Support_F: IND_Box_Base { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,6); - }; - }; - - class FIA_Box_Base_F; - class Box_FIA_Wps_F: FIA_Box_Base_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2); - }; - }; - - class Box_FIA_Ammo_F: FIA_Box_Base_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,2); - }; - }; - - class Box_FIA_Support_F: FIA_Box_Base_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,6); - }; - }; - - class I_supplyCrate_F: B_supplyCrate_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,2); - }; - }; - - class IG_supplyCrate_F: ReammoBox_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,2); - }; - }; - - class C_supplyCrate_F: ReammoBox_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_AP,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_SD,2); - }; - }; - - class ACE_Box_Misc: Box_NATO_Support_F { - class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_Tracer_Dim,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_SD,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_AP,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_SD,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_AP,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_SD,2); - MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_AP,2); - /*MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_Tracer,2); - MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_Tracer_Dim,2); - MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_SD,2); - MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_AP,2);*/ - MACRO_ADDMAGAZINE(ACE_10Rnd_338_Mag_Tracer,2); - MACRO_ADDMAGAZINE(ACE_10Rnd_338_Mag_Tracer_Dim,2); - MACRO_ADDMAGAZINE(ACE_10Rnd_338_Mag_AP,2); - MACRO_ADDMAGAZINE(ACE_10Rnd_338_Mag_SD,2); - MACRO_ADDMAGAZINE(ACE_130Rnd_338_Mag_Tracer,2); - MACRO_ADDMAGAZINE(ACE_130Rnd_338_Mag_Tracer_Dim,2); - MACRO_ADDMAGAZINE(ACE_130Rnd_338_Mag_AP,2); - MACRO_ADDMAGAZINE(ACE_10Rnd_93x64_DMR_05_Mag_Tracer,2); - MACRO_ADDMAGAZINE(ACE_10Rnd_93x64_DMR_05_Mag_Tracer_Dim,2); - MACRO_ADDMAGAZINE(ACE_10Rnd_93x64_DMR_05_Mag_AP,2); - MACRO_ADDMAGAZINE(ACE_10Rnd_93x64_DMR_05_Mag_SD,2); - MACRO_ADDMAGAZINE(ACE_150Rnd_93x64_Mag_Tracer,2); - MACRO_ADDMAGAZINE(ACE_150Rnd_93x64_Mag_Tracer_Dim,2); - MACRO_ADDMAGAZINE(ACE_150Rnd_93x64_Mag_AP,2); - }; - }; -}; diff --git a/addons/magazines/CfgWeapons.hpp b/addons/magazines/CfgWeapons.hpp deleted file mode 100644 index 787867070e..0000000000 --- a/addons/magazines/CfgWeapons.hpp +++ /dev/null @@ -1,408 +0,0 @@ - -class CfgWeapons { - - /* MX */ - - class Rifle_Base_F; - class arifle_MX_Base_F: Rifle_Base_F { - magazines[] += { - "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim", - "ACE_30Rnd_65x39_caseless_mag_SD", - "ACE_30Rnd_65x39_caseless_mag_AP", - "100Rnd_65x39_caseless_mag", - "100Rnd_65x39_caseless_mag_Tracer" - }; - }; - - class arifle_MX_SW_F: arifle_MX_Base_F { - magazines[] += { - "30Rnd_65x39_caseless_mag", - "30Rnd_65x39_caseless_mag_Tracer" - }; - }; - - class arifle_MXM_F: arifle_MX_Base_F { - magazines[] += { - "30Rnd_65x39_caseless_mag", - "30Rnd_65x39_caseless_mag_Tracer" - }; - }; - - - /* Katiba */ - class Rifle_Long_Base_F; - class arifle_katiba_Base_F: Rifle_Base_F { - magazines[] += { - "ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim", - "ACE_30Rnd_65x39_caseless_green_mag_SD", - "ACE_30Rnd_65x39_caseless_green_mag_AP" - }; - }; - - class DMR_02_base_F: Rifle_Long_Base_F { - magazines[] += { - "ACE_10Rnd_338_Mag_Tracer", - "ACE_10Rnd_338_Mag_Tracer_Dim", - "ACE_10Rnd_338_Mag_AP", - "ACE_10Rnd_338_Mag_SD" - }; - }; - - class MMG_02_base_F: Rifle_Long_Base_F { - magazines[] += { - "ACE_130Rnd_338_Mag_Tracer", - "ACE_130Rnd_338_Mag_Tracer_Dim", - "ACE_130Rnd_338_Mag_AP" - }; - }; - - class DMR_05_base_F: Rifle_Long_Base_F { - magazines[] += { - "ACE_10Rnd_93x64_DMR_05_Mag_Tracer", - "ACE_10Rnd_93x64_DMR_05_Mag_Tracer_Dim", - "ACE_10Rnd_93x64_DMR_05_Mag_AP", - "ACE_10Rnd_93x64_DMR_05_Mag_SD" - }; - }; - - class MMG_01_base_F: Rifle_Long_Base_F { - magazines[] += { - "ACE_150Rnd_93x64_Mag_Tracer", - "ACE_150Rnd_93x64_Mag_Tracer_Dim", - "ACE_150Rnd_93x64_Mag_AP" - }; - }; - - - /* Assault Rifles */ - - class Tavor_base_F: Rifle_Base_F { - magazines[] += { - "ACE_30Rnd_556x45_Stanag_Tracer_Dim", - "ACE_30Rnd_556x45_Stanag_SD", - "ACE_30Rnd_556x45_Stanag_AP" - }; - }; - - class mk20_base_F: Rifle_Base_F { - magazines[] += { - "ACE_30Rnd_556x45_Stanag_Tracer_Dim", - "ACE_30Rnd_556x45_Stanag_SD", - "ACE_30Rnd_556x45_Stanag_AP" - }; - }; - - - /* SMGs */ - - class SDAR_base_F: Rifle_Base_F { - magazines[] += { - "ACE_30Rnd_556x45_Stanag_Tracer_Dim", - "ACE_30Rnd_556x45_Stanag_SD", - "ACE_30Rnd_556x45_Stanag_AP" - }; - }; - - - /* Silencers */ - - class ItemCore; - class InventoryMuzzleItem_Base_F; - - class muzzle_snds_H: ItemCore { - class ItemInfo: InventoryMuzzleItem_Base_F { - class MagazineCoef { - initSpeed = 1.05; - }; - - class AmmoCoef { - hit = 0.9; - visibleFire = 0.5; - audibleFire = 0.1; - visibleFireTime = 0.5; - audibleFireTime = 0.5; - cost = 1.0; - typicalSpeed = 1.0; - airFriction = 1.0; - }; - - class MuzzleCoef { - dispersionCoef = "0.8f"; - artilleryDispersionCoef = "1.0f"; - fireLightCoef = "0.5f"; - recoilCoef = "1.0f"; - recoilProneCoef = "1.0f"; - minRangeCoef = "1.0f"; - minRangeProbabCoef = "1.0f"; - midRangeCoef = "1.0f"; - midRangeProbabCoef = "1.0f"; - maxRangeCoef = "1.0f"; - maxRangeProbabCoef = "1.0f"; - }; - }; - }; - - class muzzle_snds_L: muzzle_snds_H { - class ItemInfo: ItemInfo { - class MagazineCoef { - initSpeed = 1.05; - }; - - class AmmoCoef { - hit = 0.9; - visibleFire = 0.5; - audibleFire = 0.1; - visibleFireTime = 0.5; - audibleFireTime = 0.5; - cost = 1.0; - typicalSpeed = 1.0; - airFriction = 1.0; - }; - - class MuzzleCoef { - dispersionCoef = "0.8f"; - artilleryDispersionCoef = "1.0f"; - fireLightCoef = "0.5f"; - recoilCoef = "1.0f"; - recoilProneCoef = "1.0f"; - minRangeCoef = "1.0f"; - minRangeProbabCoef = "1.0f"; - midRangeCoef = "1.0f"; - midRangeProbabCoef = "1.0f"; - maxRangeCoef = "1.0f"; - maxRangeProbabCoef = "1.0f"; - }; - }; - }; - - class muzzle_snds_M: muzzle_snds_H { - class ItemInfo: ItemInfo { - class MagazineCoef { - initSpeed = 1.05; - }; - - class AmmoCoef { - hit = 0.9; - visibleFire = 0.5; - audibleFire = 0.1; - visibleFireTime = 0.5; - audibleFireTime = 0.5; - cost = 1.0; - typicalSpeed = 1.0; - airFriction = 1.0; - }; - - class MuzzleCoef { - dispersionCoef = "0.8f"; - artilleryDispersionCoef = "1.0f"; - fireLightCoef = "0.5f"; - recoilCoef = "1.0f"; - recoilProneCoef = "1.0f"; - minRangeCoef = "1.0f"; - minRangeProbabCoef = "1.0f"; - midRangeCoef = "1.0f"; - midRangeProbabCoef = "1.0f"; - maxRangeCoef = "1.0f"; - maxRangeProbabCoef = "1.0f"; - }; - }; - }; - - class muzzle_snds_B: muzzle_snds_H { - class ItemInfo: ItemInfo { - class MagazineCoef { - initSpeed = 1.05; - }; - - class AmmoCoef { - hit = 0.9; - visibleFire = 0.5; - audibleFire = 0.1; - visibleFireTime = 0.5; - audibleFireTime = 0.5; - cost = 1.0; - typicalSpeed = 1.0; - airFriction = 1.0; - }; - - class MuzzleCoef { - dispersionCoef = "0.8f"; - artilleryDispersionCoef = "1.0f"; - fireLightCoef = "0.5f"; - recoilCoef = "1.0f"; - recoilProneCoef = "1.0f"; - minRangeCoef = "1.0f"; - minRangeProbabCoef = "1.0f"; - midRangeCoef = "1.0f"; - midRangeProbabCoef = "1.0f"; - maxRangeCoef = "1.0f"; - maxRangeProbabCoef = "1.0f"; - }; - }; - }; - - class muzzle_snds_H_MG: muzzle_snds_H { - class ItemInfo: ItemInfo { - class MagazineCoef { - initSpeed = 1.05; - }; - - class AmmoCoef { - hit = 0.9; - visibleFire = 0.5; - audibleFire = 0.1; - visibleFireTime = 0.5; - audibleFireTime = 0.5; - cost = 1.0; - typicalSpeed = 1.0; - airFriction = 1.0; - }; - - class MuzzleCoef { - dispersionCoef = "0.8f"; - artilleryDispersionCoef = "1.0f"; - fireLightCoef = "0.5f"; - recoilCoef = "1.0f"; - recoilProneCoef = "1.0f"; - minRangeCoef = "1.0f"; - minRangeProbabCoef = "1.0f"; - midRangeCoef = "1.0f"; - midRangeProbabCoef = "1.0f"; - maxRangeCoef = "1.0f"; - maxRangeProbabCoef = "1.0f"; - }; - }; - }; - - class muzzle_snds_H_SW: muzzle_snds_H_MG { - class ItemInfo: ItemInfo { - class MagazineCoef { - initSpeed = 1.05; - }; - - class AmmoCoef { - hit = 0.9; - visibleFire = 0.5; - audibleFire = 0.1; - visibleFireTime = 0.5; - audibleFireTime = 0.5; - cost = 1.0; - typicalSpeed = 1.0; - airFriction = 1.0; - }; - - class MuzzleCoef { - dispersionCoef = "0.8f"; - artilleryDispersionCoef = "1.0f"; - fireLightCoef = "0.5f"; - recoilCoef = "1.0f"; - recoilProneCoef = "1.0f"; - minRangeCoef = "1.0f"; - minRangeProbabCoef = "1.0f"; - midRangeCoef = "1.0f"; - midRangeProbabCoef = "1.0f"; - maxRangeCoef = "1.0f"; - maxRangeProbabCoef = "1.0f"; - }; - }; - }; - - class muzzle_snds_acp: muzzle_snds_H { - class ItemInfo: ItemInfo { - class MagazineCoef { - initSpeed = 1.05; - }; - - class AmmoCoef { - hit = 0.9; - visibleFire = 0.5; - audibleFire = 0.1; - visibleFireTime = 0.5; - audibleFireTime = 0.5; - cost = 1.0; - typicalSpeed = 1.0; - airFriction = 1.0; - }; - - class MuzzleCoef { - dispersionCoef = "0.8f"; - artilleryDispersionCoef = "1.0f"; - fireLightCoef = "0.5f"; - recoilCoef = "1.0f"; - recoilProneCoef = "1.0f"; - minRangeCoef = "1.0f"; - minRangeProbabCoef = "1.0f"; - midRangeCoef = "1.0f"; - midRangeProbabCoef = "1.0f"; - maxRangeCoef = "1.0f"; - maxRangeProbabCoef = "1.0f"; - }; - }; - }; - - class muzzle_snds_338_black: ItemCore { - class ItemInfo: InventoryMuzzleItem_Base_F { - class MagazineCoef { - initSpeed = 1.05; - }; - - class AmmoCoef { - hit = 0.9; - visibleFire = 0.5; - audibleFire = 0.1; - visibleFireTime = 0.5; - audibleFireTime = 0.5; - cost = 1.0; - typicalSpeed = 1.0; - airFriction = 1.0; - }; - - class MuzzleCoef { - dispersionCoef = "0.8f"; - artilleryDispersionCoef = "1.0f"; - fireLightCoef = "0.5f"; - recoilCoef = "1.0f"; - recoilProneCoef = "1.0f"; - minRangeCoef = "1.0f"; - minRangeProbabCoef = "1.0f"; - midRangeCoef = "1.0f"; - midRangeProbabCoef = "1.0f"; - maxRangeCoef = "1.0f"; - maxRangeProbabCoef = "1.0f"; - }; - }; - }; - - class muzzle_snds_93mmg: ItemCore { - class ItemInfo: InventoryMuzzleItem_Base_F { - class MagazineCoef { - initSpeed = 1.05; - }; - - class AmmoCoef { - hit = 0.9; - visibleFire = 0.5; - audibleFire = 0.1; - visibleFireTime = 0.5; - audibleFireTime = 0.5; - cost = 1.0; - typicalSpeed = 1.0; - airFriction = 1.0; - }; - - class MuzzleCoef { - dispersionCoef = "0.8f"; - artilleryDispersionCoef = "1.0f"; - fireLightCoef = "0.5f"; - recoilCoef = "1.0f"; - recoilProneCoef = "1.0f"; - minRangeCoef = "1.0f"; - minRangeProbabCoef = "1.0f"; - midRangeCoef = "1.0f"; - midRangeProbabCoef = "1.0f"; - maxRangeCoef = "1.0f"; - maxRangeProbabCoef = "1.0f"; - }; - }; - }; -}; diff --git a/addons/magazines/README.md b/addons/magazines/README.md deleted file mode 100644 index 041a562268..0000000000 --- a/addons/magazines/README.md +++ /dev/null @@ -1,12 +0,0 @@ -ace_magazines -============= - -Adds new types of ammunition, such as sub-sonic rounds. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/magazines/config.cpp b/addons/magazines/config.cpp deleted file mode 100644 index c757d62f5c..0000000000 --- a/addons/magazines/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[] = {"commy2"}; - authorUrl = "https://github.com/commy2"; - VERSION_CONFIG; - }; -}; - -#include "CfgAmmo.hpp" -#include "CfgMagazines.hpp" -#include "CfgVehicles.hpp" -#include "CfgWeapons.hpp" diff --git a/addons/magazines/newclasses.txt b/addons/magazines/newclasses.txt deleted file mode 100644 index 0c40a1b904..0000000000 --- a/addons/magazines/newclasses.txt +++ /dev/null @@ -1,67 +0,0 @@ - -// CFGAmmo - -ACE_B_65x39_Caseless_Tracer_Dim -ACE_B_65x39_Caseless_SD -ACE_B_65x39_Caseless_AP - -ACE_B_65x39_Case_Tracer_Dim -ACE_B_65x39_Case_SD -ACE_B_65x39_Case_AP - -ACE_B_556x45_Ball_Tracer_Dim -ACE_B_556x45_Ball_SD -ACE_B_556x45_Ball_AP - -ACE_B_762x51_Tracer_Dim -ACE_B_762x51_Ball_SD -ACE_B_762x51_Ball_AP -ACE_B_762x51_M118LR - -ACE_B_338_Ball_Tracer_Dim -ACE_B_338_Ball_AP -ACE_B_338_Ball_SD - -ACE_B_338_NM_Ball_Tracer_Dim -ACE_B_338_NM_Ball_AP - -ACE_B_93x64_Ball_Tracer_Dim -ACE_B_93x64_Ball_AP -ACE_B_93x64_Ball_SD - -// CFGMagazines - -ACE_30Rnd_65x39_caseless_mag_Tracer_Dim -ACE_30Rnd_65x39_caseless_mag_SD -ACE_30Rnd_65x39_caseless_mag_AP - -ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim -ACE_30Rnd_65x39_caseless_green_mag_SD -ACE_30Rnd_65x39_caseless_green_mag_AP - -ACE_30Rnd_556x45_Stanag_Tracer_Dim -ACE_30Rnd_556x45_Stanag_SD -ACE_30Rnd_556x45_Stanag_AP - -ACE_20Rnd_762x51_Mag_Tracer -ACE_20Rnd_762x51_Mag_Tracer_Dim -ACE_20Rnd_762x51_Mag_SD -ACE_20Rnd_762x51_Mag_AP - -ACE_10Rnd_338_Mag_Tracer -ACE_10Rnd_338_Mag_Tracer_Dim -ACE_10Rnd_338_Mag_AP -ACE_10Rnd_338_Mag_SD - -ACE_130Rnd_338_Mag_Tracer -ACE_130Rnd_338_Mag_Tracer_Dim -ACE_130Rnd_338_Mag_AP - -ACE_10Rnd_93x64_DMR_05_Mag_Tracer -ACE_10Rnd_93x64_DMR_05_Mag_Tracer_Dim -ACE_10Rnd_93x64_DMR_05_Mag_AP -ACE_10Rnd_93x64_DMR_05_Mag_SD - -ACE_150Rnd_93x64_Mag_Tracer -ACE_150Rnd_93x64_Mag_Tracer_Dim -ACE_150Rnd_93x64_Mag_AP \ No newline at end of file diff --git a/addons/magazines/script_component.hpp b/addons/magazines/script_component.hpp deleted file mode 100644 index 2fa1b774f5..0000000000 --- a/addons/magazines/script_component.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#define COMPONENT magazines -#include "\z\ace\addons\main\script_mod.hpp" - -#ifdef DEBUG_ENABLED_MAGAZINES - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_ENABLED_MAGAZINES - #define DEBUG_SETTINGS DEBUG_ENABLED_MAGAZINES -#endif - -#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/main/About.hpp b/addons/main/About.hpp deleted file mode 100644 index c455c43cc3..0000000000 --- a/addons/main/About.hpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "script_dialog_defines.hpp" - -class ACE_ABOUT_DLG { - idd = 114137; - movingEnable = 0; - onLoad = "with uiNameSpace do { ACE_ABOUT_DLG = _this select 0; };"; - onKeyDown = "if((_this select 1) == 1) then {ACE_ABOUT_STP = true;};"; - class controlsBackground { - class Contents : RscStructuredText { - idc = 1141371; - colorBackground[] = { 0, 0, 0, 0 }; - __SX(0.45); - __SY(0.25); - __SW(0.45); - __SH(0.6); - size = "0.025 * SafeZoneH"; - class Attributes { - font = "TahomaB"; - color = "#C8C8C8"; - align = "left"; - valign = "middle"; - shadow = true; - shadowColor = "#191970"; - size = "1"; - }; - }; - class ACE_ABOUT_NEXT : ACE_ABOUT_CTRL { //dummy visible - idc = 1141372; - __SX(0.065); - __SW(0.03); - text = ""; - action = ""; - }; - }; //controlsBackground -}; diff --git a/addons/main/CfgModuleCategories.hpp b/addons/main/CfgModuleCategories.hpp index 1f86959585..5297ec1e99 100644 --- a/addons/main/CfgModuleCategories.hpp +++ b/addons/main/CfgModuleCategories.hpp @@ -1,8 +1,8 @@ -class CfgFactionClasses { - class NO_CATEGORY; - class ACE: NO_CATEGORY { - displayName = "ACE"; - priority = 2; - side = 7; - }; -}; \ No newline at end of file +class CfgFactionClasses { + class NO_CATEGORY; + class ACE: NO_CATEGORY { + displayName = "ACE"; + priority = 2; + side = 7; + }; +}; diff --git a/addons/main/about.sqf b/addons/main/about.sqf deleted file mode 100644 index c9004edfe1..0000000000 --- a/addons/main/about.sqf +++ /dev/null @@ -1,210 +0,0 @@ -#include "script_component.hpp" -#include "\z\ace\addons\main\script_common.hpp" - -if (!isNil "ACE_ABOUT_RUN") exitWith {ACE_ABOUT_RUN = false;}; -ACE_ABOUT_RUN = true; - -disableSerialization; - -PARAMS_2(_menu,_data); - -private ["_pcredits", "_pkeynam", "_shift", "_ctrl", "_alt", "_keys", "_key", "_keystrg", "_mod", "_knaml", "_knam", "_k", "_pkeys", "_pary", "_tpages", "_cEvents", "_i", "_cSys", "_tSys", "_aSys", "_tS", "_j", "_c", "_tC", "_keyn", "_fadet", "_page1", "_color", "_bcolor", "_newpages", "_pstart", "_pcount", "_pnext", "_display", "_control", "_pnames", "_pnam", "_page", "_pages", "_run", "_disp", "_next", "_input", "_nesc", "_unset", "_p", "_text", "_curPage", "_time", "_faded"]; - -_pcredits = [ -"", -"Advanced Combat Environment 2", -"http://dev-heaven.net/projects/ace-mod2", -"", -__cr_managers, -"", -__cr_devs, -"", -__cr_testers, -"", -"For a full list of acknowledgements, please visit our Wiki:", -"http://ace.dev-heaven.net" -]; - -_pkeynam = { //local function - _shift = if (_shift > 0) then {42} else {0}; - _ctrl = if (_ctrl > 0) then {56} else {0}; - _alt = if (_alt > 0) then {29} else {0}; - _keys = [_shift,_ctrl,_alt,_key]; - _keystrg = "^"; - { - _mod = _x in [42,56,29]; - _knaml = call compile format["format['%2',%1]",(keyName _x),"%1"]; - _knaml = [_knaml, " "] call CBA_fnc_split; - _knam = "^"; - {_k = _x; if (!_mod || (_k != (localize "STR_ACE_KN_LEFT") && _k != (localize "STR_ACE_KN_RIGHT"))) then {_knam = _knam + " " + _k}} forEach _knaml; - _knam = [_knam, "^ ", ""] call CBA_fnc_replace; - _keystrg = _keystrg + "-" + _knam; - } forEach _keys; - _keystrg = [_keystrg, "^ ", ""] call CBA_fnc_replace; - _keystrg = [_keystrg, "^-", ""] call CBA_fnc_replace; - _keystrg = [_keystrg, "^", "None"] call CBA_fnc_replace; - _keystrg -}; -_pkeys = { - _pary = []; - _tpages = []; - _cEvents = configFile/"CfgSettings"/"CBA"/"events"; - for "_i" from 0 to (count _cEvents) - 1 do { - _cSys = _cEvents select _i; - _tSys = configName _cSys; - if (isNumber ((_cSys select 0)/"key")) then { - //format system name - _aSys = [_tSys, "_"] call CBA_fnc_split; - _tS = "^"; - {if (_x != "ace" && _x != "sys") then {_tS = _tS + " " + _x}} forEach _aSys; - _tS = [_tS, "^ ", ""] call CBA_fnc_replace; - _tS = format["%1:",_tS]; - PUSH(_pary,_tS); - for "_j" from 0 to (count _cSys) - 1 do { - _c = _cSys select _j; - _tC = configName _c; - _tC = [_tC, "_", " "] call CBA_fnc_replace; - //key - _key = getNumber (_c/"key"); - _shift = getNumber (_c/"shift"); - _ctrl = getNumber (_c/"ctrl"); - _alt = getNumber (_c/"alt"); - _keyn = [_key,_shift,_ctrl,_alt] call _pkeynam; - _tC = format[" %1: %2",_tC,_keyn]; - PUSH(_pary,_tC); - }; - }; - if (count _pary > 20) then { //split full page - PUSH(_tpages,_pary); - _pary = []; - }; - }; - if (count _pary > 0) then { //partial page - PUSH(_tpages,_pary); - _pary = []; - }; - _tpages -}; - -//pages (make sure each will fit within 24 lines, word wrap is on) -switch(_menu) do { - case "MAIN": { //note: not all scripting commands available on main menu (not compiled yet?) - _fadet = 13; - _page1 = _pcredits; - }; - case "SING": { - _fadet = 20; //fade time - _color = [1,1,1,1]; - //_bcolor = [0,0,0,0.3]; - _page1 = _pcredits; - _newpages = [] call _pkeys; - _pstart = 2; - _pcount = count _newpages; - _pnext = _pstart + _pcount; - }; - case "MULT": { - _fadet = 20; - _color = [1,1,1,1]; - //_bcolor = [0,0,0,0.3]; - _page1 = _pcredits; - _newpages = [] call _pkeys; - _pstart = 2; - _pcount = count _newpages; - _pnext = _pstart + _pcount; - }; - default {}; -}; - -//main menu display -if (typeName(_data select 0) == "DISPLAY") then { - _display = _data select 0; -}; - -if (typeName(_data select 0) == "CONTROL") then { - _control = _data select 0; - _display = ctrlParent _control; -}; - -//dynamic pages -_pnames = []; -for "_x" from _pstart to _pnext - 1 do { - _pnam = format ["_page%1",_x]; - PUSH(_pnames,_pnam); -}; -private _pnames; -for "_x" from 0 to _pcount - 1 do { - call compile format ["%1 = %2", _pnames select _x, _newpages select _x]; -}; - -//get num pages -_pages = 0; -_run = true; -while {_run} do { - INC(_pages); - if (isNil format ["_page%1", _pages]) exitWith {_pages = _pages - 1; _run = false}; -}; - -if (_pages > 0) then { - //Dialog - createDialog "ACE_ABOUT_DLG"; - _disp = uiNamespace getVariable "ACE_ABOUT_DLG"; - _ctrl = _disp displayCtrl 1141371; - _next = _disp displayCtrl 1141372; - - if (_pages > 1) then {_next ctrlSetText "Next"}; - - _ctrl ctrlSetFade 1; - _ctrl ctrlCommit 0; - _ctrl ctrlSetFade 0; - _ctrl ctrlCommit 3; - - ACE_ABOUT_INC = 0; - _input = { //local function - _nesc = isNil "ACE_ABOUT_STP"; - if (_pages == 1) then {ACE_ABOUT_INC = 0}; //ignore special control - _unset = (ACE_ABOUT_INC == 0) && ACE_ABOUT_RUN; - if (_unset && _nesc) then {false} else {_fadet = _fadet + 5; true}; - }; - - //by default cycle - for "_p" from 1 to _pages do { - _text = ""; - _page = call compile format["_page%1",_p]; - _curPage = _p; - { - _text = _text + _x + "
"; - _ctrl ctrlSetStructuredText parseText _text; - if (call _input) exitWith {_p = _pages}; - if (_x != "") then {uisleep 0.8}; - } forEach _page; - }; - - _run = true; - while {if (isNil "ACE_ABOUT_STP") then {_run} else {false}} do { - _ctrl ctrlSetFade 0; - _ctrl ctrlCommit 0; - if (!isNil "_color") then {_ctrl ctrlSetTextColor _color}; - if (!isNil "_bcolor") then {_ctrl ctrlSetBackgroundColor _bcolor}; - - _curPage = _curPage + ACE_ABOUT_INC; - if (_curPage > _pages) then {_curPage = 1}; - if (_curPage <= 0) then {_curPage = 1}; - ACE_ABOUT_INC = 0; - - if (!ACE_ABOUT_RUN) then {ACE_ABOUT_RUN = true}; - - _text = ""; - _page = call compile format ["_page%1",_curPage]; - {_text = _text + _x + "
"} forEach _page; - _ctrl ctrlSetStructuredText parseText _text; - - _ctrl ctrlSetFade 1; - _ctrl ctrlCommit _fadet; - - _time = time + _fadet + 2; - waitUntil{uisleep 1; _run = call _input; _faded = time > _time; (_run || _faded)}; - }; //while RUN -}; -ACE_ABOUT_STP = Nil; -ACE_ABOUT_RUN = Nil; -closeDialog 0; \ No newline at end of file diff --git a/addons/main/license.sqf b/addons/main/license.sqf deleted file mode 100644 index d078710247..0000000000 --- a/addons/main/license.sqf +++ /dev/null @@ -1,92 +0,0 @@ -License (short) -=============== - -You are free: -- to Share to copy, distribute and transmit the work - -Under the following conditions: -- Attribution You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). -- Noncommercial You may not use this work for commercial purposes. -- No Derivative Works You may not alter, transform, or build upon this work. - -With the understanding that: - -Waiver Any of the above conditions can be waived if you get permission from the copyright holder. - -Public Domain Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. - -Other Rights In no way are any of the following rights affected by the license: - - Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations; - - The author's moral rights; - - Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. - -Notice For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. - - -Full license text -================= - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - -1. Definitions - -"Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. -"Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. -"Distribute" means to make available to the public the original and copies of the Work through sale or other transfer of ownership. -"Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. -"Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. -"Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. -"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -"Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. -"Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. - -2. Fair Dealing Rights. - -Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. - -3. License Grant. - -Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: - -to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; and, to Distribute and Publicly Perform the Work including as incorporated in Collections. -The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Adaptations. Subject to 8(f), all rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Section 4(d). - -4. Restrictions. - -The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: - -You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. -You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. -If You Distribute, or Publicly Perform the Work or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Collection, at a minimum such credit will appear, if a credit for all contributing authors of Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. - -For the avoidance of doubt: - -Non-waivable Compulsory License Schemes. - -In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; -Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License if Your exercise of such rights is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b) and otherwise waives the right to collect royalties through any statutory or compulsory licensing scheme; and, -Voluntary License Schemes. The Licensor reserves the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License that is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b). -Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. - -5. Representations, Warranties and Disclaimer. - -UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Termination. - -This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). - -Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - -8. Miscellaneous. - -Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. diff --git a/addons/main/license.txt b/addons/main/license.txt deleted file mode 100644 index e97d9c51a3..0000000000 --- a/addons/main/license.txt +++ /dev/null @@ -1,92 +0,0 @@ -License (short) -=============== - -You are free: -- to Share to copy, distribute and transmit the work - -Under the following conditions: -- Attribution You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). -- Noncommercial You may not use this work for commercial purposes. -- No Derivative Works You may not alter, transform, or build upon this work. - -With the understanding that: - -Waiver Any of the above conditions can be waived if you get permission from the copyright holder. - -Public Domain Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. - -Other Rights In no way are any of the following rights affected by the license: - - Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations; - - The author's moral rights; - - Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. - -Notice For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. - - -Full license text -================= - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - -1. Definitions - -"Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. -"Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. -"Distribute" means to make available to the public the original and copies of the Work through sale or other transfer of ownership. -"Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. -"Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. -"Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. -"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -"Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. -"Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. - -2. Fair Dealing Rights. - -Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. - -3. License Grant. - -Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: - -to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; and, to Distribute and Publicly Perform the Work including as incorporated in Collections. -The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Adaptations. Subject to 8(f), all rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Section 4(d). - -4. Restrictions. - -The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: - -You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. -You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. -If You Distribute, or Publicly Perform the Work or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Collection, at a minimum such credit will appear, if a credit for all contributing authors of Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. - -For the avoidance of doubt: - -Non-waivable Compulsory License Schemes. - -In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; -Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License if Your exercise of such rights is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b) and otherwise waives the right to collect royalties through any statutory or compulsory licensing scheme; and, -Voluntary License Schemes. The Licensor reserves the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License that is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b). -Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. - -5. Representations, Warranties and Disclaimer. - -UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Termination. - -This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). - -Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - -8. Miscellaneous. - -Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. diff --git a/addons/main/script_common.hpp b/addons/main/script_common.hpp deleted file mode 100644 index b3f6863d49..0000000000 --- a/addons/main/script_common.hpp +++ /dev/null @@ -1,3 +0,0 @@ -#define __cr_managers "Manager: " -#define __cr_devs "Developer:" -#define __cr_testers "Contributor: " diff --git a/addons/main/script_config.hpp b/addons/main/script_config.hpp deleted file mode 100644 index e39240286e..0000000000 --- a/addons/main/script_config.hpp +++ /dev/null @@ -1,43 +0,0 @@ -#define true 1 -#define false 0 - -#define private 0 -#define protected 1 -#define public 2 - -#define TEast 0 -#define TWest 1 -#define TGuerrila 2 -#define TCivilian 3 -#define TSideUnknown 4 -#define TEnemy 5 -#define TFriendly 6 -#define TLogic 7 - -#define VSoft 0 -#define VArmor 1 -#define VAir 2 - -#define LockNo 0 -#define LockCadet 1 -#define LockYes 2 - -#define ReadAndWrite 0 -#define ReadAndCreate 1 -#define ReadOnly 2 -#define ReadOnlyVerified 3 - -#define WeaponNoSlot 0 // dummy weapons -#define WeaponSlotPrimary 1 // primary weapons -#define WeaponSlotSecondary 16 // secondary weapons -#define WeaponSlotItem 256 // items -#define WeaponSlotBinocular 4096 // binocular -#define WeaponHardMounted 65536 - -#define CanSeeRadar 1 -#define CanSeeRye 2 -#define CanSeeOptics 4 -#define CanSeeEar 4 -#define CanSeeCompass 16 -#define CanSeeRadarC CanSeeRadar+CanSeeCompass -#define CanSeeAll 31 diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 79f95545ca..fce9ec526a 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -4,171 +4,6 @@ // Default versioning level #define DEFAULT_VERSIONING_LEVEL 2 -// RGB Colors -#define RGB_GREEN 0, 0.5, 0, 1 -#define RGB_BLUE 0, 0, 1, 1 -#define RGB_ORANGE 0.5, 0.5, 0, 1 -#define RGB_RED 1, 0, 0, 1 -#define RGB_YELLOW 1, 1, 0, 1 -#define RGB_WHITE 1, 1, 1, 1 -#define RGB_GRAY 0.5, 0.5, 0.5, 1 -#define RGB_BLACK 0, 0, 0, 1 -#define RGB_MAROON 0.5, 0, 0, 1 -#define RGB_OLIVE 0.5, 0.5, 0, 1 -#define RGB_NAVY 0, 0, 0.5, 1 -#define RGB_PURPLE 0.5, 0, 0.5, 1 -#define RGB_FUCHSIA 1, 0, 1, 1 -#define RGB_AQUA 0, 1, 1, 1 -#define RGB_TEAL 0, 0.5, 0.5, 1 -#define RGB_LIME 0, 1, 0, 1 -#define RGB_SILVER 0.75, 0.75, 0.75, 1 - -#include "script_macros_menudef.hpp" - -#define ACE_NOARMORY class Armory { disabled = 1; } -#define ACE_ARMORY class Armory { disabled = 0; } -#define ACE_ACEARMORY class Armory { disabled = 0; author = "A.C.E."; } - - -// Weapon defaults -// NOTE !!!! - Do not forget to dummy-update the configs that use these defines, or the changes won't activate due to binarization! -#define ACE_DEFAULT_WEAPONS "Throw", "Put" - -// Item defaults -// NOTE !!!! - Do not forget to dummy-update the configs that use these defines, or the changes won't activate due to binarization! -#define ACE_ITEMS_TEAMLEADER_B "ItemMap","ItemCompass","ItemWatch","ItemRadio" -#define ACE_ITEMS_SQUADLEADER_B "ItemMap","ItemCompass","ItemWatch","ItemRadio","ACE_DAGR" -#define ACE_ITEMS_SPECIAL "ItemMap","ItemCompass","ItemWatch","ItemRadio" -#define ACE_ITEMS "ItemWatch","ItemRadio" -#define ACE_ITEMS_CIVILIAN "ItemWatch" - - -#define ACE_DEFAULT_SLOTS "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072" - -#define ACE_NOGRIP handAnim[] = {} -#define ACE_DISTANCE_DEFAULT distanceZoomMin = 300; distanceZoomMax = 300 - -// #include "script_macros_optics.hpp" //ToDo - -#define ACE_NOZEROING discreteDistance[] = {}; \ - discreteDistanceInitIndex = 0; \ - weaponInfoType = "RscWeaponEmpty" - -#define ACE_NOTURRETZEROING discreteDistance[] = {}; \ - discreteDistanceInitIndex = 0; \ - turretInfoType = "RscWeaponEmpty" - -#define ACE_LASER irLaserPos = "laser pos"; \ - irLaserEnd = "laser dir"; \ - irDistance = 300 - -#define ACE_LASER_DISTANCE_VANILLA irDistance = 300 - -#define ACE_NOLASER irLaserPos = "laser pos"; \ - irLaserEnd = "laser dir"; \ - irDistance = 0 - -#define ACE_SUPPRESSED ace_suppressed = 1; \ - fireLightDuration = 0; \ - fireLightIntensity = 0 - -// TODO: Cleanup in all the configs around -#define ACE_M_MAG(x,y) class _xx_##x {magazine = ##x; count = ##y;} -#define ACE_M_WEP(x,y) class _xx_##x {weapon = ##x; count = ##y;} -#define ACE_M_ITEM(x,y) class _xx_##x {name = ##x; count = ##y;} -#define ACE_M_BAG(x,y) class _xx_##x {backpack = ##x; count = ##y;} - - -// Vehicle defines -// ACE_canBeLoad = This vehicle acts as transporter, i.e you can load stuff into it -// ACE_canBeCargo = This vehicle acts as cargo, i.e you can load this item into other vehicles -#define ACE_CARGO_FRONT ACE_canBeLoad = false; ACE_canBeCargo = true; ACE_canGear = false; ACE_canLoadFront = true -#define ACE_CARGO_ONLY ACE_canBeLoad = false; ACE_canBeCargo = true; ACE_canGear = false; ACE_canLoadFront = false -#define ACE_LOAD_ONLY ACE_canBeLoad = true; ACE_canBeCargo = false; ACE_canGear = false; ACE_canLoadFront = false -#define ACE_GEAR_ONLY ACE_canBeLoad = true; ACE_canBeCargo = false; ACE_canGear = true; ACE_canLoadFront = false -#define ACE_NOCARGOLOAD ACE_canBeLoad = false; ACE_canBeCargo = false; ACE_canGear = false; ACE_canLoadFront = false - -// Increased FOV for tank driver -// Increased Default US Tank driver optic -#define ACE_DRIVEROPTIC_TANK_US driverOpticsModel = "\z\ace\addons\m_veh_optics\driver\optika_tank_driver_west.p3d" -// Increased Default RU Tank driver optic -#define ACE_DRIVEROPTIC_TANK_RU driverOpticsModel = "\z\ace\addons\m_veh_optics\driver\optika_tank_driver_east.p3d" -// Increased Default NON Specified driver optic -#define ACE_DRIVEROPTIC_TANK driverOpticsModel = "\z\ace\addons\m_veh_optics\driver\optika_tank_driver.p3d" -// Increased Default EP1 NON Specified driver optic -// Default black border thing needs finish -#define ACE_DRIVEROPTIC_TANK_EP1 driverOpticsModel = "\z\ace\addons\m_veh_optics\driver\optika_tank_driver.p3d" - -#define ACE_BWC ace_bwc = 1 - -// SCRIPTING MACROS - -// Items -#define inITEMS(x,y) (##x in (y call ACE_fnc_getGear)) -#define remITEMS(x,y) ([##x,y] call ACE_fnc_removeItem) -//#define addITEMS(x,y) (y addItem ##x) - -// Interaction/ Put anims -#define canANIM(x) (x call ACE_fnc_CanPutDown) -#define playANIM(x) (if (x call ACE_fnc_CanPutDown) then { x call ACE_fnc_PutDown }) - -// In vehicle or on foot -#define ONFOOT(x) (x == vehicle x) -#define INVEHICLE(x) (x != vehicle x) - -// FX -#define COUGH ace_common_fx_fnc_cough -#define BLURRY ace_common_fx_fnc_blurry -#define BLIND ace_common_fx_fnc_blind_view -#define DEAF ace_common_fx_fnc_deaf -#define DIZZY ace_common_fx_fnc_dizzy -#define FLASH ace_common_fx_fnc_flash -#define KICK ace_common_fx_fnc_kick -#define KNOCKOUT ace_common_fx_fnc_knockout -#define RING ace_common_fx_fnc_ring - -// Stamina -#define INC_MASS ace_stamina_fnc_inc_mass - -// Does this work, due to BWC_CONFIG(NAME) ? -#undef BWC_CONFIG - -#define BWC_CONFIG(NAME) class NAME { \ - units[] = {}; \ - weapons[] = {}; \ - requiredVersion = REQUIRED_VERSION; \ - requiredAddons[] = {}; \ - version = VERSION; \ - ACE_BWC; \ -} - -#define ACE_FLASHLIGHT class FlashLight { \ - color[] = {0.9, 0.9, 0.7, 0.9}; \ - ambient[] = {0.1, 0.1, 0.1, 1.0}; \ - position = "flash dir"; \ - direction = "flash"; \ - angle = 30; \ - scale[] = {1, 1, 0.5}; \ - brightness = 0.1; \ - } -#define ACE_SMALL_FLASHLIGHT class FlashLight { \ - color[] = {0.9, 0.9, 0.7, 0.9}; \ - ambient[] = {0.1, 0.1, 0.1, 1.0}; \ - position = "flash dir"; \ - direction = "flash"; \ - angle = 20; \ - scale[] = {0.9, 0.9, 0.4}; \ - brightness = 0.09; \ - } - -// Addaction defines for colored text -#define ACE_TEXT_ORANGE(Text) ("" + ##Text + "") -#define ACE_TEXT_RED(Text) ("" + ##Text + "") -#define ACE_TEXT_GREEN(Text) ("" + ##Text + "") -#define ACE_TEXT_YELLOW(Text) ("" + ##Text + "") - - - #define EGVAR(module,var) TRIPLES(PREFIX,module,var) #define QEGVAR(module,var) QUOTE(EGVAR(module,var)) diff --git a/addons/main/script_macros_menudef.hpp b/addons/main/script_macros_menudef.hpp deleted file mode 100644 index 35a8e2be45..0000000000 --- a/addons/main/script_macros_menudef.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// ACE Self Interaction Conditions - -// Self Interaction Menu not available if player is unconscious -#define ACE_INTERACT_ALIVE (alive player) -#define ACE_INTERACT_UNCON (player call ace_wounds_fnc_isUncon) - -// Player is Player Vehicle -#define ACE_INTERACT_PLAYER (player == vehicle player || (player != vehicle player && player in assignedCargo vehicle player)) - -// Player is climbing up a ladder -#define ACE_INTERACT_LADDER (animationState player in ["ladderriflestatic","laddercivilstatic"]) - -// Possible = Self interaction opens only if player is alive and conscious (can be in a vehicle) -#define ACE_SELFINTERACTION_POSSIBLE (!ACE_INTERACT_LADDER && {ACE_INTERACT_ALIVE} && {!ACE_INTERACT_UNCON}) - -// Restricted = Self interaction opens only if player is alive and conscious (can NOT be in a vehicle, i.e Groundmarker, explosives ...) -#define ACE_SELFINTERACTION_RESTRICTED (ACE_SELFINTERACTION_POSSIBLE && {ACE_INTERACT_PLAYER}) - -// Close interaction menu if unconscious -#define ACE_INTERACT_FNC_EXIT if (ACE_INTERACT_UNCON) exitWith {} -#define ACE_ASSEMBLE (getNumber(configFile >> "CfgActions" >> "Assemble" >> "show") == 0) -#define ACE_DISASSEMBLE (getNumber(configFile >> "CfgActions" >> "DisAssemble" >> "show") == 0) -#define ACE_PIPEDEFAULT (getNumber(configFile >> "CfgMagazines" >> "PipeBomb" >> "useAction") == 0) -#define ACE_IDENTITYDEFAULT (isClass(configFile >> "CfgPatches" >> "ace_combatdeaf")) -#define ACE_RUCKDEFAULT (isClass(configFile >> "CfgPatches" >> "ace_stamina")) - -#define ACE_KNOWN2PLAYER (if (name _target in (player getVariable ["ace_recognize_knownnames",[]])) then { name _target } else { " " }) \ No newline at end of file diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 6ef5ec3f68..25a18e8dc2 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -15,41 +15,3 @@ // MINIMAL required version for the Mod. Components can specify others.. #define REQUIRED_VERSION 0.5 - -/* - #define DEBUG_ENABLED_ADDONS - #define DEBUG_ENABLED_ATTACHMENTS - #define DEBUG_ENABLED_weapons_backblast - #define DEBUG_ENABLED_BLOOD - #define DEBUG_ENABLED_CARTRIDGES - #define DEBUG_ENABLED_CRATERS - #define DEBUG_ENABLED_CREWPROTECTION - #define DEBUG_ENABLED_DUMMIES - #define DEBUG_ENABLED_EJECT - #define DEBUG_ENABLED_EXPLOSIVES - #define DEBUG_ENABLED_FLARES - #define DEBUG_ENABLED_FLASHBANG - #define DEBUG_ENABLED_GRENADETHROW - #define DEBUG_ENABLED_HUNTIR - #define DEBUG_ENABLED_INTERACTION - #define DEBUG_ENABLED_IRSTROBE - #define DEBUG_ENABLED_MULTI_BARREL - #define DEBUG_ENABLED_MUZZLEBLAST - #define DEBUG_ENABLED_NVG - #define DEBUG_ENABLED_weapons_overheating - #define DEBUG_ENABLED_RECOILDUST - #define DEBUG_ENABLED_ROCKET_BALLISTICS - #define DEBUG_ENABLED_SANDBAG - #define DEBUG_ENABLED_SHOTGUN - #define DEBUG_ENABLED_SIGHT_ADJUSTMENT_AT - #define DEBUG_ENABLED_SIGHT_ADJUSTMENT_GL - #define DEBUG_ENABLED_SIGHT_ADJUSTMENT_RIFLE - #define DEBUG_ENABLED_SMAW_SPOTTINGRIFLE - #define DEBUG_ENABLED_TRACERS - #define DEBUG_ENABLED_TRACKING - #define DEBUG_ENABLED_VIEWBLOCK - #define DEBUG_ENABLED_VEHICLE - #define DEBUG_ENABLED_vehicle_damage - #define DEBUG_ENABLED_WEAPONREST - #define DEBUG_ENABLED_WOUNDS -*/ diff --git a/addons/maptools/stringtable.xml b/addons/maptools/stringtable.xml index bc35651ba9..f2bc71e324 100644 --- a/addons/maptools/stringtable.xml +++ b/addons/maptools/stringtable.xml @@ -18,7 +18,7 @@ Las herramientas de mapa permiten medir distancias y ángulos en el mapa. Les outils de navigation permettent de mesurer des distances et des angles sur la carte. Narzędzia nawigacyjne pozwalają na mierzenie odległości i kątów na mapie. - Das Kartenwerkzeug erlaubt es dir, Distanzen und Winkel zu messen. + Das Kartenwerkzeug ermöglicht es dir, Distanzen und Winkel zu messen. Pomůcky k mapě slouží k měření vzdáleností a úhlů na mapě. Gli Strumenti Cartografici ti consentono di misurare distanze ed angoli sulla mappa. As Ferramentas de Mapa permitem que você meça distâncias e ângulos no mapa. diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index d61118d81b..145c14b264 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -1,15 +1,14 @@  - Inject Atropine Atropin injizieren Inyectar Atropina - Ввести атропин Aplikovat atropin Wstrzyknij atropinę Injecter de l'atropine + Ввести атропин Inject Epinephrine @@ -17,8 +16,9 @@ Inyectar Epinefrina Wstrzyknij adrenalinę Aplikovat adrenalin - Ввести андреналил Injecter de l'épinéphrine + Ввести адреналин + Adrénaline Adrenalin Injetar Epinefrina Inietta Epinefrina @@ -49,27 +49,29 @@ Transfuse Plasma + Plasma Plasmatransfusion Transfundir plasma - Перелить плазму Transfúze plazmy Przetocz osocze Transfuser du Plasma + Перелить плазму Transfuse Saline + Solution Saline Salzlösungtransfusion Transfundir salino - Влить физраствор Transfúze fyziologický roztoku Przetocz solankę Transfuser de la Saline + Перелить физраствор Apply Tourniquet + Garrot Aderpresse anwenden Aplicar torniquete - Наложить жгут Aplikovat škrtidlo Załóż stazę Appliquer un garrot @@ -176,7 +178,7 @@ Inyectando Epinefrina ... Wstrzykiwanie adrenaliny ... Aplikuji adrenalin ... - Введение андреналина ... + Введение адреналина... Injection d'Adrénaline ... Adrenalin beadása... Injetando Epinefrina ... @@ -184,12 +186,13 @@ Injecting Atropine ... + Injection d'Atropine ... Atropin injizieren ... Inyectando Atropina ... - Введение атропина ... Aplikuji atropin ... Wstrzykiwanie atropiny ... Injection d'Atropine ... + Введение атропина... Transfusing Blood ... @@ -205,21 +208,23 @@ Transfusing Saline ... + Transfusion de Solution Saline Sallösungtransfusion ... Transfusión de salino ... - Вливание физраствора ... Probíha transfúze fyziologický roztoku ... Przetaczanie solanki ... Transfusion de saline ... + Переливание физраствора... Transfusing Plasma ... + Transfusion de Plasma Plasmatransfusion ... Transfusión de plasma ... - Переливание плзмы ... Probíha transfúze plazmy ... Przetaczanie osocza ... Transfusion de Plasma ... + Переливание плазмы... Bandaging ... @@ -231,16 +236,16 @@ Sto applicando la benda ... Bekötözés... Atando ... - Перевязывание.... + Перевязывание... Applying Tourniquet ... Setze Aderpresse an ... Aplicando torniquete ... - Наложение жгута ... Aplikuji škrtidlo Zakładanie stazy ... - Mise en place du garrot + Mise en place du Garrot ... + Наложение жгута... Medical @@ -276,7 +281,7 @@ Давящая повязка Elastické obinadlo Bandaż elastyczny - Bandage Élastique + Pansement élastique QuikClot @@ -285,9 +290,11 @@ QuickClot Opatrunek QuikClot QuikClot + Hémostatique Check Pulse + Vérification du Pouls Puls überprüfen Comprobar pulso Проверить пульс @@ -299,10 +306,10 @@ Check Blood Pressure Blutdruck überprüfen Comprobar presión arterial - Проверить кровяное давление + Проверить давление Zkontrolovat krevní tlak Sprawdź ciśnienie krwi - Vérifier la pression sanguine + Vérification de la Tension Triage Card @@ -311,6 +318,7 @@ Медкарта Karta segregacyjna Karta Triage + Carte de Triage Tourniquet @@ -328,7 +336,7 @@ Снять жгут Sundat škrtidlo Zdejmij stazę - Enlever le garrot + Enlever le Garrot Give Blood IV (1000ml) @@ -336,7 +344,7 @@ Dar Sangre IV (1000ml) Дать кровь для в/в вливания (1000 мл) Podaj krew IV (1000ml) - Mettre une poche de Sang IV (1000ml) + Administrer du Sang en IV (1000ml) Podat krev. transfúzi (1000ml) @@ -345,7 +353,7 @@ Dar Sangre IV (500ml) Дать кровь для в/в вливания (500 мл) Podaj krew IV (500ml) - Mettre une poche de Sang IV (500ml) + Administrer du Sang en IV (500ml) Podat krev. transfúzi (500ml) @@ -354,7 +362,7 @@ Dar Sangre IV (250ml) Дать кровь для в/в вливания (250 мл) Podaj krew IV (250ml) - Mettre une poche de Sang IV (250ml) + Administrer du Sang en IV (250ml) Podat krev. transfúzi (250ml) @@ -363,7 +371,7 @@ Dar Plasma IV (1000ml) Дать плазму для в/в вливания (1000 мл) Podaj osocze IV (1000ml) - Mettre une poche de Plasma IV (1000ml) + Administrer du Plasma en IV (1000ml) Podat plazmu (1000ml) @@ -372,7 +380,7 @@ Dar Plasma IV (500ml) Дать плазму для в/в вливания (500 мл) Podaj osocze IV (500ml) - Mettre une poche de Plasma IV (500ml) + Administrer du Plasma en IV (500ml) Podat plazmu (500ml) @@ -381,7 +389,7 @@ Dar Plasma IV (250ml) Дать плазму для в/в вливания (250 мл) Podaj osocze IV (250ml) - Mettre une poche de Plasma IV (250ml) + Administrer du Plasma en IV (250ml) Podat plazmu (250ml) @@ -390,7 +398,7 @@ Dar Salino IV (1000ml) Дать физраствор для в/в вливания (1000 мл) Podaj solankę IV (1000ml) - Mettre une poche de Saline IV (1000ml) + Administrer de la Solution Saline en IV (1000ml) Podaz fyz. roztok (1000ml) @@ -399,7 +407,7 @@ Dar Salino IV (500ml) Дать физраствор для в/в вливания (500 мл) Podaj solankę IV (500ml) - Mettre une poche de Saline IV (500ml) + Administrer de la Solution Saline en IV (500ml) Podaz fyz. roztok (500ml) @@ -408,14 +416,15 @@ Dar Salino IV (250ml) Дать физраствор для в/в вливания (250 мл) Podaj solankę IV (250ml) - Mettre une poche de Saline IV (250ml) + Administrer de la Solution Saline en IV (250ml) Podaz fyz. roztok (250ml) Minor + Blessé léger Gering Menor - Незначительные травмы + Незначительная Normalny Mineur Minimální @@ -425,7 +434,7 @@ Retrasado Груз 300 Opóźniony - Délayé + Différé Verzögert Odložitelný @@ -434,7 +443,7 @@ Inmediato Помощь отложена Natychmiastowy - Immédiat + Urgence Immédiate Sofort Okamžiý @@ -468,9 +477,9 @@ No breathing Keine Atmung - Дыхания нет + Дыхание отсутствует No respira - Apnée + Aucune Respiration Brak oddechu Nedýchá @@ -486,7 +495,7 @@ Almost no breathing Fast keine Atmung - Дыхания почти нет + Дыхание очень слабое Casi sin respiración Respiration Faible Prawie brak oddechu @@ -497,7 +506,7 @@ Blutet Кровотечение Sangrando - Seignement + Saignement Krwawienie zewnętrzne Krvácí @@ -506,7 +515,7 @@ Hat Schmerzen Испытывает боль Con dolor - A De La Douleur + Ressent de la Douleur W bólu V bolestech @@ -524,7 +533,7 @@ Aderpresse [CAT] Жгут Torniquete [CAT] - Garot [CAT] + Garrot [CAT] Staza [typ. CAT] Škrtidlo [CAT] @@ -534,7 +543,7 @@ Reciviendo IV [%1ml] Принимается переливание [%1 мл] Otrzymywanie IV [%1ml] - Réception IV [%1ml] + Transfusion en IV [%1ml] Přijímání transfúze [%1ml] @@ -559,7 +568,7 @@ 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. - C'est un bandage, qui est fait d'un matériel spécial utiliser pour couvrir une blessure, qui peut etre appliquer des que le seignement as ete stopper. + 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. @@ -575,14 +584,14 @@ Verwendet, um mittlere bis große Wunden abzudecken und Blutungen zu stoppen Для тампонирования ран среднего и большого размера и остановки кровотечения. Se utiliza para vendar heridas medianas o grandes y detener el sangrado - Utiliser pour remplire la cavité créé dans une blessure moyenne et grande. + Utilisé pour remplir la cavité créée dans une blessure de taille moyenne à grande. Używany w celu opatrywania średnich i dużych ran oraz tamowania krwawienia. A bandage used to pack the wound to stem bleeding and facilitate wound healing. Packing a wound is an option in large polytrauma injuries. Повязка для тампонирования раны, остановки кровотечения и лучшего заживления. При тяжелых сочетанных ранениях возможно тампонирование раны. Se utiliza para detener la hemorragia de una herida y favorecer su cicatrización. Se usa en grandes lesiones o politraumatismos. - Un bandage servent a etre inseré dans les blessure pour éponger le seignement et faciliter la guerrison. Ce bandage est une option pour soigner les lession de politrauma. + Bandage pouvant être inseré dans les blessures pour éponger le saignement et faciliter la guerrison. Ce bandage est optionnel pour soigner les lésions polytraumatique. Opatrunek stosowany w celu zatrzymania krwawienia i osłony większych ran. @@ -605,8 +614,8 @@ Allows an even compression and extra support to the injured area. - - Ce bandage peut etre utiliser pour compresser la plaie afin de ralentire le seignement et assurer la tenue du bandage lors de mouvment. + Давящая повязка обеспечивает равномерное сжатие и дополнительную поддержку поврежденной области + Ce bandage peut être utilisé pour compresser la plaie afin de ralentir le saignement et assurer la tenue du bandage lors de mouvement. Elastyczna opaska podtrzymująca opatrunek oraz usztywniająca okolice stawów. Brinda una compresión uniforme y ofrece soporte extra a una zona lesionada @@ -615,23 +624,23 @@ Aderpresse (CAT) Жгут Torniquete (CAT) - Garot (CAT) + Garrot (CAT) Staza (typ. CAT) Škrtidlo (CAT) Slows down blood loss when bleeding - Уменьшает кровопотерю при кровотечении. + Замедляет кровопотерю при кровотечении Reduce la velocidad de pérdida de sangre - Ralentit le seignement + Ralentit le saignement Zmniejsza ubytek krwi z kończyn w przypadku krwawienia. Verringert den Blutverlust während einer Blutung 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 appareil servent a compresser les artères et veines afin de reduire la perte de sang. + 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 Gerät, das Druck auf Venen und Arterien ausübt und so den Blutfluss verringert. @@ -647,16 +656,16 @@ Used to combat moderate to severe pain experiences Wird verwendet um moderate bis starke Schmärzen zu lindern. - Для снятия средних и сильных болевых ощущений. + Для снятия средних и сильных болевых ощущений Usado para combatir los estados dolorosos de moderados a severos - Utiliser pour contrer les douleurs modéré à severes. + Utilisé pour réduire les douleurs modérées à sévères. Morfina. Ma silne działanie przeciwbólowe. An analgesic used to combat moderate to severe pain experiences. - Анальгетик для снятия средних и сильных болевых ощущений. + Обезболивающее для снятия средних и сильных болевых ощущений. Analgésico usado para combatir los estados dolorosos de moderados a severos. - Un Analgésique puissant servant a contrer les douleur modéré a severe. + Un Analgésique puissant servant à réduire les douleurs modérées à sévères. Organiczny związek chemiczny z grupy alkaloidów. Ma silne działanie przeciwbólowe. Ein Schmerzmittel um mäßige bis starke Schmerzen zu behandeln @@ -673,7 +682,7 @@ Used in NBC scenarios Применяется для защиты от ОМП Usado en escenarios NBQ - Utiliser en cas d'attaque CBRN + Utilisé en cas d'attaque CBRN Atropina. Stosowana jako lek rozkurczowy i środek rozszerzający źrenice. Verwendet bei ABC Kontamination @@ -696,17 +705,17 @@ Increase heart rate and counter effects given by allergic reactions - Стимулирует работу сердца и купирует аллергические реакции. + Стимулирует работу сердца и купирует аллергические реакции Aumenta la frecuencia cardiaca y contraresta los efectos de las reacciones alérgicas - Augmente la Fréquance cadiaque et contré les effet d'une reaction Anaphylactique + Augmente la fréquence cadiaque et annule les effets d'une réaction anaphylactique Adrenalina. Zwiększa puls i przeciwdziała efektom wywołanym przez reakcje alergiczne Steigert die Herzfrequenz, um den Effekt von allergischen Reaktionen zu bekämpfen 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. - Препарат, вызывающий симпатическую реакцию, приводящую к расширению бронхов, увеличению частоты сердечных сокращений и купированию аллергических реакций (анафилактического шока). Применяется при остановке сердца с уменьшением вероятности благоприятного исхода. + Препарат, вызывающий симпатическую реакцию, приводящую к расширению бронхов, увеличению частоты сердечных сокращений и купированию аллергических реакций (анафилактического шока). Применяется при остановке сердца с уменьшенной вероятностью благоприятного исхода. Medicamento que dilata los bronquios, aumenta la frecuencia cardiaca y contrarresta los efectos de las reacciones alérgicas (anafilaxis). Se utiliza en caso de paros cardiacos repentinos. - Un medicament qui fonctione sur le systeme sympatique créan une dilatation des bronches, augmente la fréquance cardiaque et contre les effet d'une reaction alergique (anaphylaxie). Utiliser lors d'arret cardio-respiratoire pour augmenté les chances retrouver un ryhtme. + Medicament qui fonctionne sur le système nerveux sympathique créant une dilatation des bronches, augmente la fréquence cardiaque et annule les effets d'une réaction allergique (anaphylaxie). Utilisé lors d'arrêt cardio-respiratoire pour augmenter les chances de retrouver un pouls. EpiPen z adrenaliną ma działanie sympatykomimetyczne, tj. pobudza receptory alfa- i beta-adrenergiczne. Pobudzenie układu współczulnego prowadzi do zwiększenia częstotliwości pracy serca, zwiększenia pojemności wyrzutowej serca i przyśpieszenia krążenia wieńcowego. Pobudzenie oskrzelowych receptorów beta-adrenergicznych wywołuje rozkurcz mięśni gładkich oskrzeli, co w efekcie zmniejsza towarzyszące oddychaniu świsty i duszności. @@ -721,14 +730,14 @@ A volume-expanding blood supplement. Дополнительный препарат, применяемый при возмещении объема крови. Suplemento para expandir el volumen sanguíneo. - Supplement visant a remplacer les volume sanguin + Supplément visant à remplacer les volumes sanguin Składnik krwi, używany do zwiększenia jej objętości. A volume-expanding blood supplement. Дополнительный препарат, применяемый при возмещении объема крови. Suplemento para expandir el volumen sanguíneo. - Supplement visant a remplacer le volume sanguin 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. @@ -759,13 +768,12 @@ Blood IV, for restoring a patients blood (keep cold) Пакет крови для возмещения объема потерянной крови (хранить в холодильнике) Sangre intravenosa, para restarurar el volumen sanguíneo (mantener frío) - Cullot Sanguin IV, pour remplacer le volume sanguin (garder Réfrigeré) + Cullot Sanguin O- ,utiliser seulement lors de perte sanguine majeur afin de remplacer le volume sanguin perdu. Habituelment utiliser lors du transport ou dans un etablisement de soin. Krew IV, używana do uzupełnienia krwi u pacjenta, trzymać w warunkach chłodniczych O Negative infusion blood used in strict and rare events to replenish blood supply usually conducted in the transport phase of medical care. Кровь I группы, резус-отрицательная, применяется по жизненным показаниям для возмещения объема потерянной крови на догоспитальном этапе оказания медицинской помощи. - Cullot Sanguin O- ,utiliser seulement lors de perte sanguine majeur afin de remplacer le volume sanguin perdu. Habituelment utiliser lors du transport ou dans un etablisement de soin. 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. @@ -789,7 +797,7 @@ Saline IV (1000ml) Физраствор для в/в вливания (1000 мл) Solución Salina IV (1000ml) - solution Saline 0.9% IV (1000ml) + Solution Saline 0.9% IV (1000ml) Solanka 0,9% IV (1000ml) Kochsalzlösung (1000ml) @@ -797,14 +805,14 @@ Saline IV, for restoring a patients blood Пакет физраствора для возмещения объема потерянной крови Solución salina intravenosa, para restaurar el volumen sanguíneo - Solution Saline 0.9% IV, pour retablir temporairement la tention arteriel + Solution Saline 0.9% IV, pour rétablir temporairement la tension artérielle Solanka 0,9%, podawana dożylnie (IV), używana w celu uzupełnienia krwi u pacjenta A medical volume-replenishing agent introduced into the blood system through an IV infusion. - Пакет физиологического раствора для возмещения объема потерянной крови путем внутривенного вливания. + Пакет физиологического раствора для возмещения объема потерянной крови путем внутривенного вливания Suero fisiológico inoculado al torrente sanguíneo de forma intravenosa. - Un remplacment temporaire pour rétablir la tention artériel lors de perte sanguine, étant ajouter par intraveineuse + Un remplacement temporaire pour rétablir la tension artérielle lors de perte sanguine, administré par intra-veineuse 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). @@ -841,8 +849,8 @@ Hemostatic bandage with coagulant that stops bleeding. - - Un bandage servant a coaguler les seignements mineur à moyen. + Медицинский коагулянт для экстренной остановки кровотечения + Un bandage aidant à coaguler les saignements mineurs à moyens. Proszkowy opatrunek adsorpcyjny przeznaczony do tamowania zagrażających życiu krwawień średniej i dużej intensywności. Vendaje hemostático con coagulante que detiene el sangrado. Verband mit Gerinnungsmittel, um starke Blutung zu behandeln. @@ -851,7 +859,7 @@ Personal Aid Kit Аптечка Botiquín de primeros auxilios - Équipement de support Vitale + Équipement de support vital Apteczka osobista Persönliches Verbandpäckchen @@ -859,7 +867,7 @@ Includes various treatment kit needed for stitching or advanced treatment Содержит различные материалы и инструменты для зашивания ран и оказания специальной медпомощи. Incluye material médico para tratamientos avanzados - Inclue du matériel medical pour les traitement avancé, tel les point 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. @@ -872,7 +880,7 @@ Surgical Kit - Kit de chirurgien + Trousse chirurgicale Хирургический набор Kit quirúrgico Zestaw do szycia ran @@ -880,7 +888,7 @@ Surgical Kit for in field advanced medical treatment - Kit de chirurgien pour les soins avancés sur le terrain + Trousse chirurgicale pour le traitement sur le terrain Набор для хирургической помощи в полевых условиях Kit quirúrgico para el tratamiento avanzado en el campo de batalla Zestaw pozwalający na zszywanie ran w polu @@ -892,18 +900,20 @@ Kit quirúrgico para el tratamiento avanzado en el campo de batalla Zestaw pozwalający na zszywanie ran w polu Operationsset für fortgeschrittene medizinische Feldversorgung + Trousse chirurgicale pour le traitement sur le terrain Bodybag Sac à corps Мешок для трупов + Housse mortuaire Bolsa para cadáveres Worek na zwłoki Leichensack A bodybag for dead bodies - Un sac pour les cadavres + Housse de transport des corps Мешок для упаковки трупов Una bolsa para cadáveres Worek do pakowania zwłok @@ -911,7 +921,7 @@ A bodybag for dead bodies - Un sac pour les cadavres + Housse de transport des corps Мешок для упаковки трупов Una bolsa para cadáveres Worek do pakowania zwłok @@ -919,7 +929,7 @@ Blood Pressure - Pression sanguine + Tension artérielle Артериальное давление Presión arterial Ciśnienie krwi @@ -927,7 +937,7 @@ Checking Blood Pressure.. - Vérification de la pression sanguine + Mesure de la tension ... Проверка артериального давления... Comprobando presión arterial... Sprawdzanie ciśnienia krwi... @@ -937,21 +947,20 @@ You checked %1 Vous diagnostiquez %1 Вы осмотрели раненого %1 + Vous examinez %1 Examinando a %1 Zbadałeś %1 Kontrolliert %1 You find a blood pressure of %2/%3 - Vous pris une pression sanguine de %2/%3 + Vous avez trouvé une tension de %2/%3 Артериальное давление %2/%3 - La presión arterial es %2/%3 - Ciśnienie krwi wynosi %2/%3 - Blutdruck ist %2/%3 + La Presión Arterial es %2/%3 You find a low blood pressure - Vous avez trouvé une pression sanguine base + Tension basse Давление низкое La presión arterial es baja Wyczuwasz niskie ciśnienie krwi @@ -959,7 +968,7 @@ You find a normal blood pressure - Vous avez trouvé une pression sanguine normale + Tension normale Давление нормальное La presión arterial es normal Wyczuwasz normalne ciśnienie krwi @@ -967,7 +976,7 @@ You find a high blood pressure - Vous avez trouvé une forte pression sanguine + Tension haute Давление высокое La presión arterial es alta Wyczuwasz wysokie ciśnienie krwi @@ -975,7 +984,7 @@ You find no blood pressure - Vous n'avez pas trouvé de pression sanguine + Pas de tension Давления нет No hay presión arterial Nie wyczuwasz ciśnienia krwi @@ -983,7 +992,7 @@ You fail to find a blood pressure - Vous avez raté le diagnostique de la pression sanguine + Vous n'avez pas pu mesurer de tension Артериальное давление не определяется No puedes encontrar presión arterial Nie udało Ci się sprawdzić ciśnienia krwi @@ -993,13 +1002,14 @@ Pulse Pulsations Пульс + Pouls Pulso Tętno Puls Checking Heart Rate.. - Diagnostique de la fréquence cardiaque + Vérification du rythme cardiaque ... Проверка пульса... Comprobando ritmo cardíaco... Sprawdzanie tętna... @@ -1009,13 +1019,14 @@ You checked %1 Vous avez Diagnostiqué %1 Вы осмотрели раненого %1 + Vous examinez %1 Examinando a %1 Zbadałeś %1 Kontrolliertt %1 You find a Heart Rate of %2 - Vous avez trouvé une fréquence cardiaque de %2 + Rythme carquiaque de %2 Пульс %2 уд./мин. El ritmo cardíaco es de %2 Wyczuwasz tętno o wartości %2 @@ -1023,7 +1034,7 @@ You find a weak Heart Rate - Vous avez trouvé une faible fréquence cardiaque + Rythme cardiaque faible Пульс слабый El ritmo cardíaco es débil Wyczuwasz słabe tętno @@ -1031,7 +1042,7 @@ You find a strong Heart Rate - Vous avez trouvé une forte fréquence cardiaque + Rythme cardiaque élevé Пульс учащенный El ritmo cardíaco está acelerado Wyczuwasz silne tętno @@ -1039,7 +1050,7 @@ You find a normal Heart Rate - Vous avez trouvé une fréquence cardiaque normale + Rythme cardiaque normal Пульс в норме El ritmo cardíaco es bueno Wyczuwasz normalne tętno @@ -1047,7 +1058,7 @@ You find no Heart Rate - Vous n'avez trouvé de fréquence cardiaque + Pas de rythme cardiaque Пульс не прощупывается No tiene ritmo cardíaco Wyczuwasz brak tętna @@ -1055,7 +1066,7 @@ Response - Réponse + Etat de Conscience Реакция Respuesta Przytomność @@ -1065,6 +1076,7 @@ You check response of patient Vous vérifiez la réponse du patient Вы проверяете реакцию раненого + Vérification de l'état de conscience du patient Compruebas si el paciente reacciona Sprawdzasz przytomność pacjenta Du prüfst ob der Patient ansprechbar ist @@ -1073,6 +1085,7 @@ %1 is responsive %1 est conscient %1 реагирует на раздражители + %1 est conscient %1 ha reaccionado %1 jest przytomny %1 ist anprechbar @@ -1081,6 +1094,7 @@ %1 is not responsive %1 n'est pas conscient %1 не реагирует + %1 est inconscient %1 no reacciona %1 jest nieprzytomny %1 ist nicht ansprechbar @@ -1089,6 +1103,7 @@ You checked %1 Vous diagnostiqué %1 Вы осмотрели раненого %1 + Vous avez examiné %1 Examinas a %1 Zbadałeś %1 Du versucht %1 anzusprechen @@ -1097,6 +1112,7 @@ Bandaged Bandé Повязка наложена + Pansement appliqué Vendado Zabandażowano @@ -1104,6 +1120,7 @@ You bandage %1 (%2) Vous bandez %1 (%2) Вы перевязали раненого %1 (%2) + Vous avez pansé %1 (%2) Aplicas vendaje a %1 en %2 Bandażujesz %1 (%2) @@ -1111,24 +1128,28 @@ %1 is bandaging you %1 vous bande %1 перевязывает вас + %1 vous applique un pansement %1 te está vendando %1 bandażuje Ciebie You start stitching injures from %1 (%2) Вы зашиваете ранения от %1 (%2) + Vous suturez %1 (%2) Estás suturando heridas de %1 en %2 Zszywasz rany %1 (%2) Stitching Наложение швов + Sutures Suturando Szycie You treat the airway of %1 Вы интубируете раненого %1 + Vous traitez les voies respiratoires de %1 Estás intubando a %1 Udrażniasz drogi oddechowe %1 @@ -1138,10 +1159,12 @@ Vías aéreas Drogi oddechowe Atemwege + Voies respiratoires %1 is treating your airway %1 проводит вам интубацию + %1 traite vos voies respiratoires %1 te está intubando %1 udrażnia Twoje drogi oddechowe @@ -1152,7 +1175,7 @@ Ciągnij Táhnout Тащить - Tracter + Trainer Húzás Arrastar Trascina @@ -1210,40 +1233,40 @@ Descargar el paciente Выгрузить пациента Wyładuj pacjenta - Décharger le patient + Débarquer le Patient Load patient Cargar el paciente en Погрузить пациента Załaduj pacjenta - Charger le patient + Embarquer le Patient Place body in bodybag Colocar cuerpo en bolsa para cadáveres - Поместить тело в мешок + Поместить тело в мешок для трупов Zapakuj ciało do worka na zwłoki - Placer le corps dans le sac à cadavre + Mettre le corps dans la housse mortuaire Placing body in bodybag Colocando cuerpo en bolsa para cadáveres - Помещение тела в мешок ... + Упаковка тела Pakowanie ciała do worka na zwłoki - Mise en sac du corps dans le sac à cadavre + Placement du corps dans la housse %1 has bandaged patient %1 has vendado al paciente %1 перевязал пациента %1 zabandażował pacjenta - %1 à bandé un patient + %1 a pansé le patient %1 used %2 %1 usó %2 - %1 применил %2 + %1 использовал %2 %1 użył %2 %1 utilise %2 @@ -1252,14 +1275,14 @@ %1 has puesto una IV %1 провел переливание %1 podał IV - %1 à donné un IV + %1 a administré une IV %1 applied a tourniquet %1 aplicado torniquete %1 наложил жгут %1 założył stazę - %1 à appliqué un garrot + %1 a appliqué un garrot - \ No newline at end of file + diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml index fa247f9986..0f3c1368cb 100644 --- a/addons/microdagr/stringtable.xml +++ b/addons/microdagr/stringtable.xml @@ -1,5 +1,4 @@  - @@ -9,15 +8,15 @@ MicroDAGR GPS MicroDAGR GPS MicroDAGR GPS - GPS MicroDAGR + MicroDAGR GPS MicroDAGR advanced GPS receiver - MicroDAGR verbesserter GPS Empfänger + MicroDAGR - Fortgeschrittener GPS-Empfänger Receptor avanzado GPS MicroDAGR Многофункциональный GPS-приёмник. Zaawansowany odbiornik GPS MicroDAGR - MicroDAGR un GPS avancé + Récepteur GPS MicroDAGR MicroDAGR pokročílá GPS příjímač @@ -25,13 +24,13 @@ Unidad angular: Угловые единицы: Jednostka kątowa: - Unité angulaire: + Unité angulaire Winkeleinheit: Úhlová jednotka: Mils - Mils + Mil Mils Тысячные Tysiączne @@ -44,7 +43,7 @@ Mostrar puntos de ruta en el mapa: Показывать маршрутные точки на карте: Pokaż PT na mapie: - Afficher les points de passage sur la carte : + Montrer points de passage sur la carte Ukázat waypointy na mapě: @@ -59,7 +58,7 @@ On Zapnuto - Oui + Allumé Ein Wł. @@ -70,7 +69,7 @@ Off Vypnuto - Non + Eteint Aus No Wył. @@ -83,7 +82,7 @@ Introducir coordenadas de cuadrícula: Введите координаты: Wprowadź współrzędne: - Entrer Grid Cords : + Entrer coordonnées Koordinaten eingeben: Napiš souřadnice: @@ -93,16 +92,16 @@ Nombre de [%1] Название [%1] Nazwa [%1] - Nom de [%1] + Nom de %1 Název [%1] MGRS-New - MGRS-NEU + UTMREF-NEU Nuevo-MGRS MGRS-Новая MGRS-Nowy - Nouveau MGRS + Info-MGRS MGRS-Nový @@ -120,7 +119,7 @@ Reichweite: Дистанция: Dystans: - Distance : + Distance: Vzdálenost: @@ -129,7 +128,7 @@ Dirección de la brújula Азимут Azymut - Direction de la boussole + Azimut Azimut: @@ -138,7 +137,7 @@ Marca Отметка Oznacz - Marqueur + Marque Označit @@ -157,7 +156,7 @@ Verbinde zu Připojit k Podłącz do - Connexion à + Connecter Settings @@ -175,6 +174,7 @@ Установить МТ Nastavit WP UstawPT + Définir point de passage Add @@ -198,11 +198,11 @@ Toggle MicroDAGR Display Mode - MicoDAGR Anzeigemodus wählen + MicoDAGR Anzeigemodus Wechseln Conmutar modo de pantalla del MicroDAGR Сменить режим показа MicroDAGR Przełącz tryb wyświetlania MicroDAGR - Basculer sur l'affichage du MicroDAGR + Basculer le mode d'affichage MicroDAGR Přepnout zobrazení MircroDAGRu @@ -212,16 +212,16 @@ Показать MicroDAGR Ukázat MicroDAGR GPS Pokaż MicroDAGR - Afficher le MicroDAGR + Afficher MicroDAGR Configure MicroDAGR - Konfiguriere MicroDAGR + MicroDAGR Konfiguriere Configurar MicroDAGR Настроить MicroDAGR Konfigurovat MicroDAGR GPS Konfiguruj MicroDAGR - Configurer le MicroDAGR + Configurer MicroDAGR Close MicroDAGR @@ -230,7 +230,7 @@ Закрыть MicroDAGR Zavřít MicroDAGR GPS Zamknij MicroDAGR - Fermer le MicroDAGR + Fermer MicroDAGR - \ No newline at end of file + diff --git a/addons/missileguidance/ACE_GuidanceConfig.hpp b/addons/missileguidance/ACE_GuidanceConfig.hpp index 4c0122c8e4..f3434fef9b 100644 --- a/addons/missileguidance/ACE_GuidanceConfig.hpp +++ b/addons/missileguidance/ACE_GuidanceConfig.hpp @@ -27,19 +27,19 @@ class GVAR(AttackProfiles) { functionName = QFUNC(attackProfile_HI); }; - class TOP { + class JAV_DIR { name = ""; visualName = ""; description = ""; - functionName = QFUNC(attackProfile_TOP); + functionName = QFUNC(attackProfile_JAV_DIR); }; - class PYM { + class JAV_TOP { name = ""; visualName = ""; description = ""; - functionName = QFUNC(attackProfile_PYM); + functionName = QFUNC(attackProfile_JAV_TOP); }; }; diff --git a/addons/missileguidance/CfgAmmo.hpp b/addons/missileguidance/CfgAmmo.hpp index 5aaee5ff2f..a05ecee9bc 100644 --- a/addons/missileguidance/CfgAmmo.hpp +++ b/addons/missileguidance/CfgAmmo.hpp @@ -40,12 +40,12 @@ class CfgAmmo { trackLead = 0; // Begin ACE guidance Configs - class ACE_MissileGuidance { + class ADDON { enabled = 1; - minDeflection = 0.005; // Minium flap deflection for guidance - maxDeflection = 0.025; // Maximum flap deflection for guidance - incDeflection = 0.005; // The incrmeent in which deflection adjusts. + 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. //minDeflection = 0.005; //maxDeflection = 0.5; //incDeflection = 0.005; @@ -65,7 +65,7 @@ class CfgAmmo { // Attack profile type selection defaultAttackProfile = "LIN"; - attackProfiles[] = { "LIN", "DIR", "MID", "HI", "TOP", "PYM" }; + attackProfiles[] = { "LIN", "DIR", "MID", "HI" }; }; }; @@ -110,12 +110,12 @@ class CfgAmmo { //trackLead = 0; // Begin ACE guidance Configs - class ACE_MissileGuidance { + class ADDON { enabled = 1; - minDeflection = 0.005; // Minium flap deflection for guidance - maxDeflection = 0.25; // Maximum flap deflection for guidance - incDeflection = 0.005; // The incrmeent in which deflection adjusts. + minDeflection = 0.00005; // Minium flap deflection for guidance + maxDeflection = 0.025; // Maximum flap deflection for guidance + incDeflection = 0.00005; // The incrmeent in which deflection adjusts. //minDeflection = 0.005; //maxDeflection = 0.5; //incDeflection = 0.005; @@ -127,15 +127,15 @@ class CfgAmmo { defaultSeekerLockMode = "LOBL"; seekerLockModes[] = { "LOBL" }; - seekerAngle = 90; // Angle in front of the missile which can be searched + seekerAngle = 180; // Angle in front of the missile which can be searched seekerAccuracy = 1; // seeker accuracy multiplier - seekerMinRange = 1; + seekerMinRange = 0; seekerMaxRange = 2500; // Range from the missile which the seeker can visually search // Attack profile type selection - defaultAttackProfile = "LIN"; - attackProfiles[] = { "TOP", "LIN" }; + defaultAttackProfile = "JAV_TOP"; + attackProfiles[] = { "JAV_TOP", "JAV_DIR" }; }; }; }; \ No newline at end of file diff --git a/addons/missileguidance/XEH_pre_init.sqf b/addons/missileguidance/XEH_pre_init.sqf index 403d6245ca..8d277bc3b0 100644 --- a/addons/missileguidance/XEH_pre_init.sqf +++ b/addons/missileguidance/XEH_pre_init.sqf @@ -2,6 +2,7 @@ PREP(rotateVectLineGetMap); PREP(rotateVectLine); +PREP(changeMissileDirection); PREP(checkSeekerAngle); PREP(checkLos); @@ -17,10 +18,12 @@ PREP(attackProfile_LIN); PREP(attackProfile_DIR); PREP(attackProfile_MID); PREP(attackProfile_HI); -PREP(attackProfile_TOP); -PREP(attackprofile_PYM); PREP(attackProfile_AIR); +// Javelin profiles +PREP(attackProfile_JAV_DIR); +PREP(attackProfile_JAV_TOP); + // Seeker search functions PREP(seekerType_SALH); PREP(seekerType_Optic); \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf index d416b6a9e2..498b754287 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf @@ -1,54 +1,4 @@ //#define DEBUG_MODE_FULL #include "script_component.hpp" -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"]; -_seekerTargetPos = _this select 0; -_launchParams = _this select 1; - -_target = _launchParams select 0; -_targetLaunchParams = _launchParams select 1; - -_shooterPos = getPosASL _shooter; -_projectilePos = getPosASL _projectile; - -_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos; -_distanceToShooter = _projectilePos vectorDistance _shooterPos; - -TRACE_2("", _distanceToTarget, _distanceToShooter); - -// Add height depending on distance for compensate -_addHeight = [0,0,0]; - -// Always climb an arc on initial launch if we are close to the round -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 { - _addHeight = _addHeight vectorAdd [0,0, ((_seekerTargetPos select 2) - (_projectilePos select 2))]; - }; -}; - -// 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))]; -} else { - if((_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget > 100) then { - _addHeight = _addHeight vectorAdd [0,0, _distanceToTarget]; - }; -}; - - - -TRACE_3("", _distanceToTarget,_distanceToShooter,_addHeight); - - _returnTargetPos = _seekerTargetPos vectorAdd _addHeight; - -#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 +_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 new file mode 100644 index 0000000000..da01b7d900 --- /dev/null +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf @@ -0,0 +1,69 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +#define STAGE_LAUNCH 1 +#define STAGE_CLIMB 2 +#define STAGE_COAST 3 +#define STAGE_TERMINAL 4 + +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"]; +_seekerTargetPos = _this select 0; +_launchParams = _this select 1; + +_target = _launchParams select 0; +_targetLaunchParams = _launchParams select 1; + +_state = _this select 2; +if( (count _state) < 1) then { + _state set[0, STAGE_LAUNCH]; +}; + +_shooterPos = getPosASL _shooter; +_projectilePos = getPosASL _projectile; + +_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos; +_distanceToShooter = _projectilePos vectorDistance _shooterPos; +_distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos; + +TRACE_2("", _distanceToTarget, _distanceToShooter); + +// Add height depending on distance for compensate +_returnTargetPos = _seekerTargetPos; + +switch( (_state select 0) ) do { + case STAGE_LAUNCH: { + TRACE_1("STAGE_LAUNCH",""); + if(_distanceToShooter < 10) then { + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2]; + } else { + _state set[0, STAGE_CLIMB]; + }; + }; + case STAGE_CLIMB: { + TRACE_1("STAGE_CLIMB",""); + _cruisAlt = 60; + if(_distanceShooterToTarget < w) then { + _cruisAlt = 60 * (_distanceShooterToTarget/2000); + TRACE_1("_cruisAlt", _cruisAlt); + }; + + if( ((ASLToATL _projectilePos) select 2) - ((ASLToATL _seekerTargetPos) select 2) >= _cruisAlt) then { + _state set[0, STAGE_TERMINAL]; + } else { + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2]; + }; + }; + case STAGE_TERMINAL: { + TRACE_1("STAGE_TERMINAL",""); + //_returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget * 0.02]; + }; +}; + +#ifdef DEBUG_MODE_FULL +drawLine3D [(ASLtoATL _returnTargetPos), (ASLtoATL _seekerTargetPos), [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_JAV_TOP.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf new file mode 100644 index 0000000000..4e83e046ff --- /dev/null +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf @@ -0,0 +1,76 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +#define STAGE_LAUNCH 1 +#define STAGE_CLIMB 2 +#define STAGE_COAST 3 +#define STAGE_TERMINAL 4 + +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"]; +_seekerTargetPos = _this select 0; +_launchParams = _this select 1; + +_target = _launchParams select 0; +_targetLaunchParams = _launchParams select 1; + +_state = _this select 2; +if( (count _state) < 1) then { + _state set[0, STAGE_LAUNCH]; +}; + +_shooterPos = getPosASL _shooter; +_projectilePos = getPosASL _projectile; + +_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos; +_distanceToShooter = _projectilePos vectorDistance _shooterPos; +_distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos; + +TRACE_2("", _distanceToTarget, _distanceToShooter); + +// Add height depending on distance for compensate +_returnTargetPos = _seekerTargetPos; + +switch( (_state select 0) ) do { + case STAGE_LAUNCH: { + TRACE_1("STAGE_LAUNCH",""); + if(_distanceToShooter < 10) then { + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2]; + } else { + _state set[0, STAGE_CLIMB]; + }; + }; + case STAGE_CLIMB: { + TRACE_1("STAGE_CLIMB",""); + _cruisAlt = 140; + if(_distanceShooterToTarget < 1250) then { + _cruisAlt = 140 * (_distanceShooterToTarget/1250); + TRACE_1("_cruisAlt", _cruisAlt); + }; + + if( ((ASLToATL _projectilePos) select 2) - ((ASLToATL _seekerTargetPos) select 2) >= _cruisAlt) then { + _state set[0, STAGE_COAST]; + } else { + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2]; + }; + }; + case STAGE_COAST: { + TRACE_1("STAGE_COAST",""); + if(_distanceShooterToTarget < 1250 || _distanceToTarget < ( ((ASLToATL _projectilePos) select 2) - (( ASLToATL _seekerTargetPos) select 2) )) then { + _state set[0, STAGE_TERMINAL]; + }; + _returnTargetPos = _seekerTargetPos vectorAdd [0,0,(_projectilePos select 2)]; + }; + case STAGE_TERMINAL: { + TRACE_1("STAGE_TERMINAL",""); + //_returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget * 0.02]; + }; +}; + +#ifdef DEBUG_MODE_FULL +drawLine3D [(ASLtoATL _returnTargetPos), (ASLtoATL _seekerTargetPos), [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_LIN.sqf b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf index 90ec75ad7f..032ae51791 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf @@ -16,7 +16,7 @@ _projectilePos = getPosASL _projectile; _distanceToTarget = _projectilePos vectorDistance _seekerTargetPos; _distanceToShooter = _projectilePos vectorDistance _shooterPos; -TRACE_2("", _distanceToTarget, _distanceToShooter); +TRACE_3("", _distanceToTarget, _distanceToShooter, _seekerTargetPos); // Add height depending on distance for compensate _addHeight = [0,0,0]; @@ -40,11 +40,7 @@ if( (_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget }; }; - - -TRACE_3("", _distanceToTarget,_distanceToShooter,_addHeight); - - _returnTargetPos = _seekerTargetPos vectorAdd _addHeight; +_returnTargetPos = _seekerTargetPos vectorAdd _addHeight; #ifdef DEBUG_MODE_FULL drawLine3D [(ASLtoATL _returnTargetPos) vectorAdd _addHeight, ASLtoATL _returnTargetPos, [0,1,0,1]]; diff --git a/addons/missileguidance/functions/fnc_attackProfile_PYM.sqf b/addons/missileguidance/functions/fnc_attackProfile_PYM.sqf deleted file mode 100644 index 498b754287..0000000000 --- a/addons/missileguidance/functions/fnc_attackProfile_PYM.sqf +++ /dev/null @@ -1,4 +0,0 @@ -//#define DEBUG_MODE_FULL -#include "script_component.hpp" - -_this call FUNC(attackProfile_LIN); \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_attackProfile_TOP.sqf b/addons/missileguidance/functions/fnc_attackProfile_TOP.sqf deleted file mode 100644 index 767f5df351..0000000000 --- a/addons/missileguidance/functions/fnc_attackProfile_TOP.sqf +++ /dev/null @@ -1,52 +0,0 @@ -//#define DEBUG_MODE_FULL -#include "script_component.hpp" - -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"]; -_seekerTargetPos = _this select 0; -_launchParams = _this select 1; - -_target = _launchParams select 0; -_targetLaunchParams = _launchParams select 1; - -_shooterPos = getPosASL _shooter; -_projectilePos = getPosASL _projectile; - -_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos; -_distanceToShooter = _projectilePos vectorDistance _shooterPos; - -TRACE_2("", _distanceToTarget, _distanceToShooter); - -// Add height depending on distance for compensate -_addHeight = [0,0,0]; - -// Always climb an arc on initial launch if we are close to the round -if( ((ASLtoATL _projectilePos) select 2) < 140 && _distanceToShooter < 50) 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) + 140 && _distanceToTarget > 100) then { - _addHeight = _addHeight vectorAdd [0,0, ((_seekerTargetPos select 2) - (_projectilePos select 2))+50]; - }; -}; - -// Handle arcing terminal low for high decent -if( (_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget < 140) then { - _addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5]; -} else { - if((_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget > 140) then { - _addHeight = _addHeight vectorAdd [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.02]; - }; -}; - -TRACE_3("", _distanceToTarget,_distanceToShooter,_addHeight); - - _returnTargetPos = _seekerTargetPos vectorAdd _addHeight; - -#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_changeMissileDirection.sqf b/addons/missileguidance/functions/fnc_changeMissileDirection.sqf new file mode 100644 index 0000000000..fda7ba9d07 --- /dev/null +++ b/addons/missileguidance/functions/fnc_changeMissileDirection.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" +private ["_projectile", "_v", "_l", "_r"]; + +_projectile = _this select 0; +_v = _this select 1; + +_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))); \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf b/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf index 7308ce1723..e8bc1a16f5 100644 --- a/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf +++ b/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf @@ -11,39 +11,20 @@ * Return value: * Boolean */ - - #define DEBUG_MODE_FULL + #include "script_component.hpp" -private["_seeker", "_targetPos", "_seekerMaxAngle", "_vectorTo", "_sensorPos", "_vertOk", "_horzOk", "_dir", "_headingPitch"]; +private["_seeker", "_targetPos", "_seekerMaxAngle", "_sensorPos", "_testPointVector", "_testDotProduct"]; _seeker = _this select 0; _targetPos = _this select 1; _seekerMaxAngle = _this select 2; -_vertOk = false; -_horzOk = false; - _sensorPos = getPosASL _seeker; -_vectorTo = _sensorPos vectorFromTo _targetPos; -_headingPitch = (vectorDir _seeker) call CBA_fnc_vect2polar; -_polarTo = _vectorTo call CBA_fnc_vect2polar; +_testPointVector = vectorNormalized (_targetPos vectorDiff _sensorPos); +_testDotProduct = (vectorNormalized (velocity _seeker)) vectorDotProduct _testPointVector; -_dir = _polarTo select 1; -_dir = _dir - (_headingPitch select 1); - -if (_dir < 0) then {_dir = _dir + 360}; -if (_dir > 360) then {_dir = _dir - 360}; - _vertOk = false; - _horzOk = false; -if(_dir < _angleFov || {_dir > (360-_angleFov)}) then { - _horzOk = true; -}; -if(abs((abs(_polarTo select 2))-(abs(_headingPitch select 2))) < _angleFov) then { - _vertOk = true; -}; - -if(!_vertOk || !_horzOk ) exitWith { +if(_testDotProduct < (cos _seekerMaxAngle)) exitWith { false }; diff --git a/addons/missileguidance/functions/fnc_fired.sqf b/addons/missileguidance/functions/fnc_fired.sqf index bb162e1f09..8b90b2353f 100644 --- a/addons/missileguidance/functions/fnc_fired.sqf +++ b/addons/missileguidance/functions/fnc_fired.sqf @@ -13,7 +13,7 @@ PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); // Bail on not missile if(! (_ammo isKindOf "MissileBase") ) exitWith { false }; -_config = configFile >> "CfgAmmo" >> _ammo >> "ACE_MissileGuidance"; +_config = configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON); _enabled = getNumber ( _config >> "enabled"); // Bail if guidance is not enabled @@ -68,7 +68,7 @@ TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile getNumber ( _config >> "seekerAccuracy" ), getNumber ( _config >> "seekerMaxRange" ) ], - [ diag_tickTime ] + [ diag_tickTime, [], [] ] ] ] call cba_fnc_addPerFrameHandler; diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index 7041201ded..f7fd56c164 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -3,14 +3,18 @@ #define TIMESTEP_FACTOR 0.01 -private["_args", "_stateParams", "_launchParams", "_targetLaunchParams", "_config", "_flightParams", "_seekerParams", "_seekerTargetPos"]; -private["_lastRunTime", "_runtimeDelta", "_profileAdjustedTargetPos", "_targetVectorSeeker", "_targetVector"]; -private["_minDeflection", "_maxDeflection", "_incDeflection"]; -private["_yVec", "_zVec", "_xVec"]; - +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"]; + _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; +}; + _launchParams = _args select 1; _targetLaunchParams = _launchParams select 1; _flightParams = _args select 2; @@ -20,76 +24,76 @@ _stateParams = _args select 4; _lastRunTime = _stateParams select 0; _runtimeDelta = diag_tickTime - _lastRunTime; +_adjustTime = 1; -_config = configFile >> "CfgAmmo" >> _ammo >> "ACE_MissileGuidance"; - -if(!alive _projectile || isNull _projectile || isNull _shooter) exitWith { - [(_this select 1)] call cba_fnc_removePerFrameHandler; +if(accTime > 0) then { + _adjustTime = 1/accTime; + _adjustTime = _adjustTime * (_runtimeDelta / TIMESTEP_FACTOR); + TRACE_4("Adjust timing", 1/accTime, _adjustTime, _runtimeDelta, (_runtimeDelta / TIMESTEP_FACTOR) ); +} else { + _adjustTime = 0; }; -// TODO: placeholder for "last seek target position" -_seekerTargetPos = [ [0,0,0], _args] call FUNC(doSeekerSearch); -if(!isNil "_seekerTargetPos") then { +_minDeflection = ((_flightParams select 0) - ((_flightParams select 0) * _adjustTime)) max 0; +_maxDeflection = (_flightParams select 1) * _adjustTime; +_incDeflection = _flightParams select 2; - _profileAdjustedTargetPos = [_seekerTargetPos,_args] call FUNC(doAttackProfile); +_projectilePos = getPosASL _projectile; - _minDeflection = _flightParams select 0; - _maxDeflection = _flightParams select 1; - _incDeflection = _flightParams select 2; - - _yVec = vectorDir _projectile; - _zVec = vectorUp _projectile; - _xVec = vectorNormalized (_yVec vectorCrossProduct _zVec); - - _projectilePos = getPosASL _projectile; - - _targetVectorSeeker = [_projectile, [_xVec, _yVec, _zVec], _profileAdjustedTargetPos] call EFUNC(common,translateToWeaponSpace); - _targetVector = [0,0,0] vectorFromTo _targetVectorSeeker; - TRACE_1("", _targetVectorSeeker, _targetVector); - - private["_yaw", "_pitch"]; - _yaw = 0; - _pitch = 0; - - if((_targetVectorSeeker select 0) < 0) then { - _yaw = - ( (_minDeflection max (abs(_targetVector select 0) min _maxDeflection) ) ); - } else { - if((_targetVectorSeeker select 0) > 0) then { - _yaw = ( (_minDeflection max ((_targetVector select 0) min _maxDeflection) ) ); - }; +// @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); }; - if((_targetVectorSeeker select 2) < 0) then { - _pitch = - ( (_minDeflection max (abs(_targetVector select 2) min _maxDeflection) ) ); - } else { - if((_targetVectorSeeker select 2) > 0) then { - _pitch = ( (_minDeflection max ((_targetVector select 2) min _maxDeflection) ) ); - }; +}; + +_profileAdjustedTargetPos = [_seekerTargetPos,_args, (_stateParams select 2)] call FUNC(doAttackProfile); +_targetVector = _projectilePos vectorFromTo _profileAdjustedTargetPos; +_adjustVector = _targetVector vectorDiff (vectorDir _projectile); + +_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]]; -#endif +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]]; - if(accTime > 0) then { - private["_adjustTime", "_outVector", "_vectorTo"]; - _adjustTime = 1/accTime; - _adjustTime = _adjustTime * (_runtimeDelta / TIMESTEP_FACTOR); - TRACE_4("Adjust timing", 1/accTime, _adjustTime, _runtimeDelta, (_runtimeDelta / TIMESTEP_FACTOR) ); - - // @TODO: Apply velocity multiplier to yaw/pitch. Basically, it can adjust faster at lower speeds - //_adjustDeflection = (vectorMagnitude velocity _projectile); - - _outVector = [_projectile, [_xVec, _yVec, _zVec], [_yaw, _adjustTime, _pitch]] call EFUNC(common,translateToModelSpace); - _vectorTo = _projectilePos vectorFromTo _outVector; - - _projectile setVectorDirAndUp [_vectorTo, vectorUp _projectile]; - }; - -#ifdef DEBUG_MODE_FULL - hintSilent format["d: %1", _distanceToTarget]; +hintSilent format["d: %1", _distanceToTarget]; #endif -}; _stateParams set[0, diag_tickTime]; diff --git a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf index 9539c2c8f6..74d3b0fc71 100644 --- a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf @@ -19,7 +19,7 @@ if(!isNil "_target") then { _foundTargetPos = getPosASL _target; }; -/* @TODO: This is seeker LOS and angle checks for LOAL only; LOBL does not need visual +// @TODO: This is seeker LOS and angle checks for LOAL only; LOBL does not need visual _angleFov = _seekerParams select 0; _angleOkay = [_projectile, _foundTargetPos, _angleFov] call FUNC(checkSeekerAngle); @@ -34,7 +34,7 @@ if(!_angleOkay || !_losOkay) then { _foundTargetPos = _sensorPos vectorAdd ((velocity _projectile) vectorMultiply 5); } else { TRACE_2("", _target, _foundTargetPos); - + private["_projectileSpeed", "_distanceToTarget", "_eta", "_adjustVelocity"]; // @TODO: Configurable lead for seekers _projectileSpeed = (vectorMagnitude velocity _projectile); _distanceToTarget = (getPosASL _projectile) vectorDistance _foundTargetPos; @@ -45,5 +45,5 @@ if(!_angleOkay || !_losOkay) then { _foundTargetPos = _foundTargetPos vectorAdd _adjustVelocity; }; -*/ + _foundTargetPos; \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_seekerType_SALH.sqf b/addons/missileguidance/functions/fnc_seekerType_SALH.sqf index 828550aeeb..b6ed8d65a4 100644 --- a/addons/missileguidance/functions/fnc_seekerType_SALH.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_SALH.sqf @@ -6,15 +6,15 @@ _seekerTargetPos = _this select 0; _launchParams = _this select 1; _seekerParams = _launchParams select 3; +_angleFov = _seekerParams select 0; -_laserResult = [(getPosASL _projectile), [ACE_DEFAULT_LASER_WAVELENGTH,ACE_DEFAULT_LASER_WAVELENGTH], ACE_DEFAULT_LASER_CODE] call EFUNC(laser,seekerFindLaserSpot); +_laserResult = [(getPosASL _projectile), (velocity _projectile), _angleFov, [ACE_DEFAULT_LASER_WAVELENGTH,ACE_DEFAULT_LASER_WAVELENGTH], ACE_DEFAULT_LASER_CODE] call EFUNC(laser,seekerFindLaserSpot); _foundTargetPos = _laserResult select 0; TRACE_1("Search", _laserResult); if(!isNil "_foundTargetPos") then { - _angleFov = _seekerParams select 0; - _canSeeTarget = [_projectile, _foundTargetPos, _angleFov] call FUNC(checkSeekerAngle); + //_canSeeTarget = [_projectile, _foundTargetPos, _angleFov] call FUNC(checkSeekerAngle); // If we got here, it was an invalid target, just return a spot 5m in front of the missile if(!_canSeeTarget) then { diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml index e0edd79308..3ee166a6ff 100644 --- a/addons/missileguidance/stringtable.xml +++ b/addons/missileguidance/stringtable.xml @@ -1,5 +1,4 @@  - @@ -7,7 +6,7 @@ Avanzada Misiles Orientación Avancée Missile orientation Zaawansowane naprowadzanie rakiet - Erweiterte Missile Guidance + Erweiterte Raketenlenkung Pokročilé řízení střel Avanzato Missile Guidance Avançado Missile Guidance @@ -19,7 +18,7 @@ Włącza zaawansowaną mechanikę i wybór dla różnych rakiet i trybów strzału. - + Aktiviert die erweiterten Mechaniken für unterschiedliche Raketen und Feuermodi. Povoluje pokročilou mechaniku řízení střel. @@ -31,7 +30,7 @@ Hydra-70 DAGR - + Hydra-70 DAGR Rackete Hydra-70 DAGR @@ -43,7 +42,7 @@ DAGR - + DAGR DAGR @@ -55,7 +54,7 @@ Laserowo naprowadzana rakieta Hydra-70 DAGR - + Hydra-70 Lasergelenkte DAGR Rakete Hydra-70 DAGR laserem naváděná střela @@ -67,7 +66,7 @@ Hellfire II AGM-114K - + Hellfire II AGM-114K Hellfire II AGM-114K @@ -79,7 +78,7 @@ AGM-114K - + AGM-114K AGM-114K @@ -91,7 +90,7 @@ Laserowo naprowadzana rakieta Hellfire II AGM-114K - + Hellfire II AGM-114K Lasergelenkte Rakete Hellfire II AGM-114K laserem naváděná střela diff --git a/addons/movement/stringtable.xml b/addons/movement/stringtable.xml index 8265c25074..9de9e9033f 100644 --- a/addons/movement/stringtable.xml +++ b/addons/movement/stringtable.xml @@ -1,48 +1,47 @@  - - - - Show weight in lb - Zeige Gewicht in Pfund - Mostrar peso en libras - Afficher le poids en lb - Pokaż ciężar w funtach - Zobrazit váhu v librách - Mostra peso in libbre - Mostrar peso em libras - Súly megjelenítése fontban. - Показать вес в фунтах - - - Weight: - Gewicht: - Peso: - Poids: - Waga: - Váha: - Peso: - Peso: - Súly: - Вес: - - - Climb - Monter - Klettern - Wspinaczka - Trepar - Vylézt - Подняться - - - Can't climb here - je ne peux pas monter ici - Kann hier nicht klettern - Nie możesz wspiąć się tutaj - No se puede trepar aquí - Zde není možné vylézt - Не можете подняться здесь - - + + + Show weight in lb + Zeige Gewicht in Pfund + Mostrar peso en libras + Afficher le poids en lb + Pokaż ciężar w funtach + Zobrazit váhu v librách + Mostra peso in libbre + Mostrar peso em libras + Súly megjelenítése fontban. + Показать вес в фунтах + + + Weight: + Gewicht: + Peso: + Poids: + Waga: + Váha: + Peso: + Peso: + Súly: + Вес: + + + Climb + Grimper + Klettern + Wspinaczka + Trepar + Vylézt + Подняться + + + Can't climb here + Impossible de grimper ici + Kann hier nicht klettern + Nie możesz wspiąć się tutaj + No se puede trepar aquí + Zde není možné vylézt + Не можете подняться здесь + + diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index 4e4bdd0641..7fc4b8e6cc 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -1,5 +1,4 @@  - @@ -60,7 +59,7 @@ Show vehicle crew info - Afficher les informations de l'équipage du véhicule + Afficher les informations de l'équipage Zeige Fahrzeugbesatzung Mostrar tripulantes Pokaż załogę pojazdu @@ -74,7 +73,7 @@ Показывать именые метки ИИ Zobrazit jména AI Wyświetl imiona jednostek AI - Afficher les noms pour les unités IA + Afficher les noms des IA Show SoundWaves (requires player names) @@ -83,7 +82,7 @@ Показывать звуковые волны (требует имен игроков) Zobrazit SoundWaves (vyžaduje jména hráčů) Pokaż fale dźwiękowe (wymagana opcja Pokaż imiona graczy) - Afficher l'ondulation audio (requiert les noms des joueurs) + Afficher "qui parle" (si noms affichés) Default Nametag Color (Non Group Members) @@ -91,8 +90,8 @@ Цвет меток игроков (не членов групп) Color de etiquetas de nombre por defecto (No miembros de grupo) Domyślny kolor imion (członkowie spoza grupy) - Couleur par défaut pour les noms (unités non groupées) + Couleur d'affichage par défaut (si dans aucun groupe) Standardní barva jmenovek (pro nečleny jednotky) - \ No newline at end of file + diff --git a/addons/nightvision/stringtable.xml b/addons/nightvision/stringtable.xml index 2dad02e3bd..9b14279d3c 100644 --- a/addons/nightvision/stringtable.xml +++ b/addons/nightvision/stringtable.xml @@ -1,127 +1,127 @@  - - - - NV Goggles (Gen1) - Noktovizor (Gen1) - JVN (Gen1) - NS-Brille (Gen1) - Occhiali notturni (Gen1) - Gogle noktowizyjne (Gen1) - Óculos de visão noturna (Gen1) - ПНВ (Gen1) - Sistema de visión nocturna (Gen1) - - - NV Goggles (Gen2) - Noktovizor (Gen2) - JVN (Gen2) - NS-Brille (Gen2) - Occhiali notturni (Gen2) - Gogle noktowizyjne (Gen2) - Óculos de visão noturna (Gen2) - ПНВ (Gen2) - Sistema de visión nocturna (Gen2) - - - NV Goggles (Gen3) - Noktovizor (Gen3) - JVN (Gen3) - NS-Brille (Gen3) - Occhiali notturni (Gen3) - Gogle noktowizyjne (Gen3) - Óculos de visão noturna (Gen3) - ПНВ (Gen3) - Sistema de visión nocturna (Gen3) - - - NV Goggles (Gen3, Brown) - Noktovizor (Gen3, hnědý) - JVN (Gen3, marron) - NS-Brille (Gen3, Braun) - Occhiali notturni (Gen3, marroni) - Gogle noktowizyjne (Gen3, brązowe) - Óculos de visão noturna (Gen3, marrons) - ПНВ (Gen3, коричневый) - Sistema de visión nocturna (Gen3, marrón) - - - NV Goggles (Gen3, Green) - Noktovizor (Gen3, zelený) - JVN (Gen3, vertes) - NS-Brille (Gen3, Grün) - Occhiali notturni (Gen3, verdi) - Gogle noktowizyjne (Gen3, zielone) - Óculos de visão noturna (Gen3, verdes) - ПНВ (Gen3, зеленый) - Sistema de visión nocturna (Gen3, verde) - - - NV Goggles (Gen3, Black) - Noktovizor (Gen3, černý) - JVN (Gen3, noires) - NS-Brille (Gen3, Schwarz) - Occhiali notturni (Gen3, neri) - Gogle noktowizyjne (Gen3, czarne) - Óculos de visão noturna (Gen3, pretos) - ПНВ (Gen3, черный) - Sistema de visión nocturna (Gen3, negro) - - - NV Goggles (Gen4) - Noktovizor (Gen4) - JVN (Gen4) - NS-Brille (Gen4) - Occhiali notturni (Gen4) - Gogle noktowizyjne (Gen4) - Óculos de visão noturna (Gen4) - ПНВ (Gen4) - Sistema de visión nocturna (Gen4) - - - NV Goggles (Wide) - NS-Brille (Weitwinkel) - Sistema de visión nocturna (Panorámicas) - Gogle noktowizyjne (panoramiczne) - Noktovizor (Širokoúhlý) - ПНВ (Широкий) - - - Brightness: %1 - Helligkeit: %1 - Brillo: %1 - Czułość: %1 - Jas: %1 - Luminosité : %1 - Контраст: - Fényerő: %1 - Luminosidade: %1 - Luminosità: %1 - - - Increase NVG Brightness - Nachtsichtgerätshelligkeit erhöhen - Aumentar el brillo de las NVG - Zwiększ czułość noktowizji - Zvýšení jasu noktovizoru - Augmenter la luminosité des JVN - Увеличить яркость ПНВ - Fényerő növelése - Aumentar Luminosidade do EVN - Aumenta la luminosità dell'NVG - - - Decrease NVG Brightness - Nachtsichtgerätshelligkeit verringern - Disminuir el brillo de las NVG - Zmniejsz czułość noktowizji - Snížení jasu noktovizoru - Baisser la luminosité des JVN - Уменьшить яркость ПНВ - Fényerő csökkentése - Diminuir Luminosidade do EVN - Riduci la luminosità dell'NVG - - - \ No newline at end of file + + + NV Goggles (Gen1) + Noktovizor (Gen1) + JVN (Gen1) + NS-Brille (Gen1) + Occhiali notturni (Gen1) + Gogle noktowizyjne (Gen1) + Óculos de visão noturna (Gen1) + ПНВ (Gen1) + Sistema de visión nocturna (Gen1) + + + NV Goggles (Gen2) + Noktovizor (Gen2) + JVN (Gen2) + NS-Brille (Gen2) + Occhiali notturni (Gen2) + Gogle noktowizyjne (Gen2) + Óculos de visão noturna (Gen2) + ПНВ (Gen2) + Sistema de visión nocturna (Gen2) + + + NV Goggles (Gen3) + Noktovizor (Gen3) + JVN (Gen3) + NS-Brille (Gen3) + Occhiali notturni (Gen3) + Gogle noktowizyjne (Gen3) + Óculos de visão noturna (Gen3) + ПНВ (Gen3) + Sistema de visión nocturna (Gen3) + + + NV Goggles (Gen3, Brown) + Noktovizor (Gen3, hnědý) + JVN (Gen3, marron) + NS-Brille (Gen3, Braun) + Occhiali notturni (Gen3, marroni) + Gogle noktowizyjne (Gen3, brązowe) + Óculos de visão noturna (Gen3, marrons) + ПНВ (Gen3, коричневый) + Sistema de visión nocturna (Gen3, marrón) + + + NV Goggles (Gen3, Green) + Noktovizor (Gen3, zelený) + JVN (Gen3, vertes) + NS-Brille (Gen3, Grün) + Occhiali notturni (Gen3, verdi) + Gogle noktowizyjne (Gen3, zielone) + Óculos de visão noturna (Gen3, verdes) + ПНВ (Gen3, зеленый) + Sistema de visión nocturna (Gen3, verde) + + + NV Goggles (Gen3, Black) + Noktovizor (Gen3, černý) + JVN (Gen3, noires) + NS-Brille (Gen3, Schwarz) + Occhiali notturni (Gen3, neri) + Gogle noktowizyjne (Gen3, czarne) + Óculos de visão noturna (Gen3, pretos) + ПНВ (Gen3, черный) + Sistema de visión nocturna (Gen3, negro) + + + NV Goggles (Gen4) + Noktovizor (Gen4) + JVN (Gen4) + NS-Brille (Gen4) + Occhiali notturni (Gen4) + Gogle noktowizyjne (Gen4) + Óculos de visão noturna (Gen4) + ПНВ (Gen4) + Sistema de visión nocturna (Gen4) + + + NV Goggles (Wide) + NS-Brille (Weitwinkel) + Sistema de visión nocturna (Panorámicas) + Gogle noktowizyjne (panoramiczne) + Noktovizor (Širokoúhlý) + ПНВ (Широкий) + JVN (Large) + + + Brightness: %1 + Helligkeit: %1 + Brillo: %1 + Czułość: %1 + Jas: %1 + Luminosité : %1 + Контраст: + Fényerő: %1 + Luminosidade: %1 + Luminosità: %1 + + + Increase NVG Brightness + NS-Helligkeit erhöhen + Aumentar el brillo de las NVG + Zwiększ czułość noktowizji + Zvýšení jasu noktovizoru + Augmenter la luminosité des JVN + Увеличить яркость ПНВ + Fényerő növelése + Aumentar Luminosidade do EVN + Aumenta la luminosità dell'NVG + + + Decrease NVG Brightness + NS-Helligkeit verringern + Disminuir el brillo de las NVG + Zmniejsz czułość noktowizji + Snížení jasu noktovizoru + Baisser la luminosité des JVN + Уменьшить яркость ПНВ + Fényerő csökkentése + Diminuir Luminosidade do EVN + Riduci la luminosità dell'NVG + + + diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index 1f598a2a75..cf3f94cf19 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -1,5 +1,4 @@  - @@ -8,7 +7,7 @@ Opciones ACE Ustawienia ACE ACE Nastavení - ACE Options + Options ACE ACE Настройки Opções do ACE ACE Opciók @@ -21,7 +20,7 @@ Фикс анимации Opravit animace Napraw animację - Corriger l'Animation + Corriger animation Reset All @@ -30,7 +29,7 @@ Полный сброс Vyresetovat vše Resetuj wszystko - Par défaut + Défaut Colors @@ -93,6 +92,7 @@ Установки: Ajuste: Ustawienie: + Paramètres Export @@ -118,6 +118,7 @@ Introducir frase Строчный ввод. Wpisywanie tekstu. + Entrée Array. Seperate elements by using ,. @@ -125,7 +126,7 @@ Matriz. Separa elementos usando ,. Массив. Разделяйте элемены, используя запятую. Tablica. Oddziel elementy używając ,. - Array. Séparer les élements en utilisant ,. + Tableau. Séparation par ,. Tabulka. Odděl elementy použitím ,. @@ -144,7 +145,7 @@ Неизвестный тип ввода Neznámý vstup Nieznany rodzaj danych - Input inconnue + Type d'entrée inconnue Save input @@ -153,7 +154,7 @@ Сохранить ввод Uložit vstup Zapisz dane - Sauvegarder les inputs + Sauvegarder Include Client Settings @@ -162,7 +163,7 @@ Включить настройки клиента Zahrnout nastavení klienta Zawrzyj ustawienia klienta - Inclure les paramètres de client + Inclure paramètres client Exclude Client Settings @@ -171,7 +172,7 @@ Исключить настройки клиента Nezahrnout nastavení klienta Wyklucz ustawienia klienta - Exclure les paramètres de client + Exclure paramètres client Settings exported to clipboard @@ -180,7 +181,7 @@ Настройки экспортированы в буфер обмена Nastevení exportována do schránky Ustawienia wyeksportowano do schowka - Paramètres exportés dans le presse-papier + Paramètres exportés dans le presse papier - \ No newline at end of file + diff --git a/addons/overheating/CfgWeapons.hpp b/addons/overheating/CfgWeapons.hpp index fff251f096..12ec43024f 100644 --- a/addons/overheating/CfgWeapons.hpp +++ b/addons/overheating/CfgWeapons.hpp @@ -129,52 +129,3 @@ class CfgWeapons { ACE_Overheating_JamChance[] = {0, 0.0003, 0.0015, 0.0075}; }; }; - -class CfgAmmo { - class BulletCore; - class BulletBase : BulletCore { - ACE_BulletMass = 0; // Bullet mass in grams - }; - - // Rifle and MG rounds - class B_556x45_Ball : BulletBase { - ACE_BulletMass = 4.1; // 5.56x45 NATO - }; - - class B_65x39_Caseless : BulletBase { - ACE_BulletMass = 8; // 6.5mm Grendel - }; - - class B_762x51_Ball : BulletBase { - ACE_BulletMass = 10; // 7.62x51 NATO - }; - class ACE_B_762x51_M118LR : B_762x51_Ball { - ACE_BulletMass = 11; // 7.62x51 NATO M118 - }; - - class B_127x99_Ball : BulletBase { - ACE_BulletMass = 42; // 12.7×99mm NATO (.50 BMG) - }; - - class B_127x108_Ball : BulletBase { - ACE_BulletMass = 48.3; // 12.7x108 - }; - - class B_408_Ball : BulletBase { - ACE_BulletMass = 27; // .408 Cheyenne Tactical - }; - - // Pistol Rounds - class B_9x21_Ball : BulletBase { - ACE_BulletMass = 7.45; // 9×21mm IMI - }; - class B_9x19_Ball : B_9x21_Ball { - ACE_BulletMass = 7.45; // 9×19mm Parabellum - }; - class B_127x33_Ball : BulletBase { - ACE_BulletMass = 21; // .50 AE - }; - class B_45ACP_Ball : BulletBase { - ACE_BulletMass = 12; // .45 ACP - }; -}; diff --git a/addons/overheating/functions/fnc_overheat.sqf b/addons/overheating/functions/fnc_overheat.sqf index d1f7a737d9..2468265f8f 100644 --- a/addons/overheating/functions/fnc_overheat.sqf +++ b/addons/overheating/functions/fnc_overheat.sqf @@ -36,9 +36,10 @@ _temperature = _overheat select 0; _time = _overheat select 1; // Get physical parameters -_bulletMass = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_BulletMass"); +// Bullet mass is read from config in grains and converted to grams +_bulletMass = (getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_BulletMass")) * 0.06480; if (_bulletMass == 0) then { - // If the bullet mass is not configured, estimate it + // If the bullet mass is not configured, estimate it directly in grams _bulletMass = 3.4334 + 0.5171 * (getNumber (configFile >> "CfgAmmo" >> _ammo >> "hit") + getNumber (configFile >> "CfgAmmo" >> _ammo >> "caliber")); }; _energyIncrement = 0.75 * 0.0005 * _bulletMass * (vectorMagnitudeSqr _velocity); diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml index 7dec557a2d..d4943b75a1 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -1,5 +1,4 @@  - @@ -9,16 +8,16 @@ Показывать текст, когда клинит оружие Zobrazit upozornění při zaseknutí Wyświetl tekst przy zacięciu broni - Afficher un texte à la surchauffe + Affiche texte si enrayé Display a notification whenever your weapon gets jammed - Zeige einen Hinweis wenn die Waffe eine Ladehemmung hat + Zeige einen Hinweis, wenn die Waffe eine Ladehemmung hat. Mostrar notificación cada vez que el arma se encasquille Демонстровать уведомление, каждый раз, когда клинит Ваше оружие. Zobrazí upozornění při zaseknutí zbraně Wyświetl powiadomienie za każdym razem, kiedy Twoja broń ulegnie zacięciu - Afficher un texte quand votre arme surchauffe + Affiche une notification lors d'un enrayement Spare barrel @@ -133,6 +132,7 @@ Verificar temperatura<br/>del arma Sprawdź temperaturę<br/>broni Zkontrolovat teplotu<br/>zbraně + Vérifier la<br/>température Checking temperature ... @@ -159,4 +159,4 @@ Температура - \ No newline at end of file + diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index 8f67b3f6cd..be0cb5b5c3 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -1,5 +1,4 @@  - @@ -76,7 +75,7 @@ Mini-Spike Launcher (AT) - Mini-Spike Lenkflugkörper (AT) + Mini-Spike Lenkflugkörper (PALR) Lanzador Mini-Spike (AT) Poste de tir Mini-Spike (AC) Mini-Spike Odpalovač (AT) @@ -88,7 +87,7 @@ Mini-Spike Launcher (AA) - Mini-Spike Lenkflugkörper (AA) + Mini-Spike Lenkflugkörper (FlaRak) Lanzador Mini-Spike (AA) Poste de tir Mini-Spike (AA) Mini-Spike Odpalovač (AA) @@ -117,6 +116,7 @@ YABHON-R3 (CAS) YABHON-R3 (CAS) YABHON-R3 (штурмовик) + YABHON-R3 (CAS) M-ATV @@ -725,6 +725,7 @@ CH-47I Chinook (nieuzbrojony) CH-47I Chinook (невооруженный) CH-47I Chinook (neozbrojený) + CH-47I Chinook (Neozbrojený) A-10D Thunderbolt II @@ -1043,376 +1044,448 @@ P99 P99 P99 + P99 MP-443 Grach MP-443 Grach MP-443 Grach MP-443 Grach + MP-443 Grach ACP-C2 ACP-C2 ACP-C2 ACP-C2 + ACP-C2 FNX-45 Tactical FNX-45 Tactical FNX-45 Tactical FNX-45 Tactical + FNX-45 Tactical Chiappa Rhino 60DS Chiappa Rhino 60DS Chiappa Rhino 60DS Chiappa Rhino 60DS + Chiappa Rhino 60DS Taurus Judge Taurus Judge Taurus Judge Taurus Judge + Taurus Judge NLAW NLAW NLAW NLAW + NLAW RPG-32 RPG-32 RPG-32 RPG-32 + RPG-32 Mini-Spike (AA) - Mini-Spike (AA) + Mini-Spike (FlaRak) Mini-Spike (PL) Mini-Spike (AA) + Mini-Spike (AA) Mini-Spike (AT) - Mini-Spike (AT) + Mini-Spike (PALR) Mini-Spike (PT) Mini-Spike (AA) + Mini-Spike (AT) MX MX MX MX + MX MX (Black) - MX (Black) + MX (Schwarz) MX (Czarny) MX (černý) + MX ( Noir) MXC MXC MXC MXC + MXC MXC (Black) - MXC (Black) + MXC (Schwarz) MXC (Czarny) MXC (černý) + MXC (Noir) MX 3GL MX 3GL MX 3GL MX 3GL + MX 3GL MX 3GL (Black) - MX 3GL (Black) + MX 3GL (Schwarz) MX 3GL (Czarny) MX 3GL (černý) + MX 3 GL (Noir) MX LSW MX LSW MX LSW MX LSW + MX LSW MX LSW (Black) - MX LSW (Black) + MX LSW (Schwarz) MX LSW (Czarny) MX LSW (černý) + MX LSW (Noir) MXM MXM MXM MXM + MXM MXM (Black) - MXM (Black) + MXM (Schwarz) MXM (Czarny) MXM (černý) + MXM (Noir) KT2002 Katiba KT2002 Katiba KT2002 Katiba KT2002 Katiba + KT2002 Katiba KT2002C Katiba KT2002C Katiba KT2002C Katiba KT2002C Katiba + KT2002C Katiba KT2002 Katiba KGL KT2002 Katiba KGL KT2002 Katiba KGL KT2002 Katiba KGL + KT2002 Katiba KGL F2000 (Camo) - F2000 (Camo) + F2000 (Tarnmuster) F2000 (kamuflaż) F2000 (kamufláž + F2000 (Camo) F2000 F2000 F2000 F2000 + F2000 F2000 Tactical (Camo) - F2000 Tactical (Camo) + F2000 Tactical (Tarnmuster) F2000 Tactical (kamuflaż) F2000 Tactical (černý) + F2000 Tactical (Camo) F2000 Tactical F2000 Tactical F2000 Tactical F2000 Tactical + F2000 Tactical F2000 EGLM (Camo) - F2000 EGLM (Camo) + F2000 EGLM (Tarnmuster) F2000 EGLM (kamuflaż) F2000 EGLM (kamufláž) + F2000 EGLM (Camo) F2000 EGLM F2000 EGLM F2000 EGLM F2000 EGLM + F2000 EGLM TAR-21 TAR-21 TAR-21 TAR-21 + TAR-21 CTAR-21 CTAR-21 CTAR-21 CTAR-21 + CTAR-21 TAR-21 EGLM TAR-21 EGLM TAR-21 EGLM TAR-21 EGLM + TAR-21 EGLM Vector SMG Vector SMG Vector SMG Vector SMG + Vector SMG Scorpion Evo 3 A1 Scorpion Evo 3 A1 Scorpion Evo 3 A1 Scorpion Evo 3 A1 + Scorpion Evo 3 A1 CPW CPW CPW CPW + CPW RFB SDAR RFB SDAR RFB SDAR RFB SDAR + RFB SDAR Stoner 99 LMG Stoner 99 LMG Stoner 99 LMG Stoner 99 LMG + Stoner 99 LMG Negev NG7 Negev NG7 Negev NG7 Negev NG7 + Negev NG7 Mk14 Mod 1 EBR Mk14 Mod 1 EBR Mk14 Mod 1 EBR Mk14 Mod 1 EBR + Mk 14 Mod 1 EBR GM6 Lynx GM6 Lynx GM6 Lynx GM6 Lynx + GM6 Lynx GM6 Lynx (Camo) - GM6 Lynx (Camo) + GM6 Lynx (Tarnmuster) GM6 Lynx (kamuflaż) GM6 Lynx (kamufláž) + GM6 Lynx (Camo) M200 Intervention M200 Intervention M200 Intervention M200 Intervention + M200 Intervention M200 Intervention (Camo) - M200 Intervention (Camo) + M200 Intervention (Tarnmuster) M200 Intervention (kamuflaż) M200 Intervention (kamufláž) + M200 Intervention (Camo) VS-121 VS-121 VS-121 VS-121 + VS-121 TODO: MAR-10 .338 TODO: MAR-10 .338 + MAR-10 .338 TODO: MAR-10 .338 (Black) TODO: MAR-10 .338 (Black) + MAR-10 .338 (Noir) TODO: MAR-10 .338 (Camo) TODO: MAR-10 .338 (Camo) + MAR-10 .338 (Camo) TODO: MAR-10 .338 (Sand) TODO: MAR-10 .338 (Sand) + MAR-10 .338 (Beige) TODO: Mk-I EMR 7.62 mm TODO: Mk-I EMR 7.62 mm + Mk-l EMR 7.62 mm TODO: Mk-I EMR 7.62 mm (Black) TODO: Mk-I EMR 7.62 mm (Black) + Mk-l EMR 7.62 mm (Noir) TODO: Mk-I EMR 7.62 mm (Khaki) TODO: Mk-I EMR 7.62 mm (Khaki) + Mk-l EMR 7.62 mm (Kaki) TODO: Mk-I EMR 7.62 mm (Sand) TODO: Mk-I EMR 7.62 mm (Sand) + Mk-l EMR 7.62 mm (Beige) TODO: Mk-I EMR 7.62 mm (Camo) TODO: Mk-I EMR 7.62 mm (Camo) + Mk-l EMR 7.62 mm (Camo) TODO: Mk-I EMR 7.62 mm (Woodland) TODO: Mk-I EMR 7.62 mm (Woodland) + Mk-l EMR 7.62 mm (Woodland) TODO: NATO DMR (provisional) spotter TODO: NATO DMR (provisional) spotter + NATO DMR (provisoire) Observateur TODO: ASP-1 Kir 12.7 mm TODO: ASP-1 Kir 12.7 mm + ASP-1 Kir 12.7 mm TODO: ASP-1 Kir 12.7 mm (Black) TODO: ASP-1 Kir 12.7 mm (Black) + ASP-1 Kir 12.7 mm (Noir) TODO: ASP-1 Kir 12.7 mm (Tan) TODO: ASP-1 Kir 12.7 mm (Tan) + ASP-1 Kir 12.7 mm (Tan) TODO: Cyrus 9.3 mm TODO: Cyrus 9.3 mm + Cyrus 9.3 mm TODO: Cyrus 9.3 mm (Black) TODO: Cyrus 9.3 mm (Black) + Cyrus 9.3 mm (Noir) TODO: Cyrus 9.3 mm (Hex) TODO: Cyrus 9.3 mm (Hex) + Cyrus 9.3 mm (Hex) TODO: Cyrus 9.3 mm (Tan) TODO: Cyrus 9.3 mm (Tan) + Cyrus 9.3 mm (Tan) TODO: Mk14 7.62 mm TODO: Mk14 7.62 mm + Mk 14 7.62 mm TODO: Mk14 7.62 mm (Camo) TODO: Mk14 7.62 mm (Camo) + Mk 14 7.62 mm (Camo) TODO: Mk14 7.62 mm (Olive) TODO: Mk14 7.62 mm (Olive) + Mk 14 7.62 mm (Olive) TODO: Navid 9.3 mm TODO: Navid 9.3 mm + Navid 9.3 mm TODO: Navid 9.3 mm (Hex) TODO: Navid 9.3 mm (Hex) + Navid 9.3 mm (Hex) TODO: Navid 9.3 mm (Tan) TODO: Navid 9.3 mm (Tan) + Navid 9.3 mm (Tan) TODO: SPMG .338 TODO: SPMG .338 + SPMG .338 TODO: SPMG .338 (MTP) TODO: SPMG .338 (MTP) + SPMG .338 (MTP) TODO: SPMG .338 (Black) TODO: SPMG .338 (Black) + SPMG .338 (Noir) TODO: SPMG .338 (Sand) TODO: SPMG .338 (Sand) + SPMG .338 (Beige) - \ No newline at end of file + diff --git a/addons/reload/stringtable.xml b/addons/reload/stringtable.xml index 8911c288ea..9bd4a1ccea 100644 --- a/addons/reload/stringtable.xml +++ b/addons/reload/stringtable.xml @@ -1,65 +1,65 @@  - - - Check ammo on weapon reload - Prüfe Munition beim Nachladen - Comprovar munición al recargar el arma - Проверять боезапас при перезарядке - Zkontrolovat munici při nabití - Sprawdź stan amunicji przy przeładowaniu broni - Vérifier les munitions pendant le rechargement d'une arme - - - Check the ammo in your new magazine on magazine reload. - Prüfe nachgeladenes Magazin - Comprueva la munición del nuevo cargador al recargar. - Проверяет количество патронов в новом магазине при перезарядке. - Kontroluje munice při nabití nového zásobníku. - Pokaż stan amunicji w nowym magazynku przy przeładowaniu broni - Vérifier les munitions dans votre nouveau chargeur au rechargement de vos chargeurs. - - - Check Ammo - Munition prüfen - Verificar munición - Sprawdź amunicję - Vérifier Munitions - Lőszerellenőrzés - Zkontrolovat Munici - Controlla le munizioni - Conferir munições - Kонтроль Боеприпасы - - - Ammo - Munition - Munición - Amunicja - Munitions - Lőszer - Munice - Munizioni - Munições - Боеприпасы - - - Link belt - Attacher bande - Enlazar cinta - Сцепить ленты - Spojit pás munice - Podłącz taśmę - Gurt anhängen - - - Linking belt... - Attachement de la bande ... - Enlazando cinta... - Сцепка лент ... - Spojuji pás... - Podłączanie taśmy... - Gurt anhängen ... - - + + + Check ammo on weapon reload + Prüfe Munition beim Nachladen + Comprovar munición al recargar el arma + Проверять боезапас при перезарядке + Zkontrolovat munici při nabití + Sprawdź stan amunicji przy przeładowaniu broni + Vérification des munitions au rechargement + + + Check the ammo in your new magazine on magazine reload. + Prüfe nachgeladenes Magazin + Comprueva la munición del nuevo cargador al recargar. + Проверяет количество патронов в новом магазине при перезарядке. + Kontroluje munice při nabití nového zásobníku. + Pokaż stan amunicji w nowym magazynku przy przeładowaniu broni + Vérification du nombre de munition au rechargement + + + Check Ammo + Munition prüfen + Verificar munición + Sprawdź amunicję + Vérifier Munitions + Lőszerellenőrzés + Zkontrolovat Munici + Controlla le munizioni + Conferir munições + Kонтроль Боеприпасы + + + Ammo + Munition + Munición + Amunicja + Munitions + Lőszer + Munice + Munizioni + Munições + Боеприпасы + + + Link belt + Attacher bande + Enlazar cinta + Сцепить ленты + Spojit pás munice + Podłącz taśmę + Gurt anhängen + + + Linking belt... + Attache d'une bande + Enlazando cinta... + Сцепка лент ... + Spojuji pás... + Podłączanie taśmy... + Gurt anhängen ... + + diff --git a/addons/reloadlaunchers/stringtable.xml b/addons/reloadlaunchers/stringtable.xml index a7be29cc96..ce78dbf102 100644 --- a/addons/reloadlaunchers/stringtable.xml +++ b/addons/reloadlaunchers/stringtable.xml @@ -8,10 +8,11 @@ Зарядить ПУ Nabít odpalovač Załaduj wyrzutnię + Charger lanceur Loading launcher ... - Chargement du tube ... + Chargement du lanceur Panzerabwehr wird geladen ... Cargando lanzador ... Зарядка ПУ ... @@ -20,7 +21,7 @@ Launcher loaded - Tube chargé + Lanceur chargé Panzerabwehr geladen Lanzador cargado ПУ заряжено @@ -29,7 +30,7 @@ Load %1 - Chargé %1 + Charge %1 Lade %1 Cargar %1 Загрузка %1 diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml index ab229f727f..2aa4360275 100644 --- a/addons/respawn/stringtable.xml +++ b/addons/respawn/stringtable.xml @@ -1,5 +1,4 @@  - @@ -31,7 +30,7 @@ Teleported to Rallypoint - Téléporté au point de ralliement + Téléporté au point de déploiement Zum Rallypoint teleportiert Teletransportado al punto de reunión Телепорт на точку сбора @@ -39,4 +38,4 @@ Odteleportován na rallypoint - \ No newline at end of file + diff --git a/addons/safemode/stringtable.xml b/addons/safemode/stringtable.xml index cb74ef060e..49cd237afd 100644 --- a/addons/safemode/stringtable.xml +++ b/addons/safemode/stringtable.xml @@ -1,46 +1,45 @@  - - - - Safe Mode - Mode de sécurité - Waffe sichern - Seguro puesto - Bezpiecznik - Pojistka - Veszélytelenités - Предохранитель - - - Take off Safety - Retirer le cran de sureté - Waffe entsichern - Quitar seguro - Zwolnij bezpiecznik - Uvolnit pojistku - Veszélyesités - Снять с предохранителя - - - Put on Safety - Mettre le cran de sureté - Waffe gesichert - Poner seguro - Zabezpiecz broń - Přepnout pojistku - Veszélytelenitve - Поставить на предохранитель - - - Took off Safety - Enlever le cran de sureté - Waffe entsichert - Seguro quitado - Odbezpieczono broń - Odstranit pojistku - veszélyes - Снят с предохранителя - - + + + Safe Mode + Waffe sichern + Seguro puesto + Bezpiecznik + Pojistka + Veszélytelenités + Предохранитель + Sécurité + + + Take off Safety + Waffe entsichern + Quitar seguro + Zwolnij bezpiecznik + Uvolnit pojistku + Veszélyesités + Снять с предохранителя + Enlever sécurité + + + Put on Safety + Waffe gesichert + Poner seguro + Zabezpiecz broń + Přepnout pojistku + Veszélytelenitve + Поставить на предохранитель + Sécurité mise + + + Took off Safety + Waffe entsichert + Seguro quitado + Odbezpieczono broń + Odstranit pojistku + veszélyes + Снят с предохранителя + Sécurité enlevée + + diff --git a/addons/scopes/CfgVehicles.hpp b/addons/scopes/CfgVehicles.hpp new file mode 100644 index 0000000000..7653fe0443 --- /dev/null +++ b/addons/scopes/CfgVehicles.hpp @@ -0,0 +1,19 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Equipment { + class GVAR(adjustZero) { + // Updates the zero reference + displayName = "$STR_ACE_Scopes_AdjustZero"; + condition = QUOTE([ACE_player] call FUNC(canAdjustZero)); + statement = QUOTE([ACE_player] call FUNC(adjustZero)); + showDisabled = 0; + priority = 0.2; + //icon = QUOTE(PATHTOF(UI\...)); // TODO + exceptions[] = {"notOnMap", "isNotInside"}; + }; + }; + }; + }; +}; diff --git a/addons/scopes/CfgWeapons.hpp b/addons/scopes/CfgWeapons.hpp index 67898fb449..6ca522ced7 100644 --- a/addons/scopes/CfgWeapons.hpp +++ b/addons/scopes/CfgWeapons.hpp @@ -1,14 +1,15 @@ class CfgWeapons { class ItemCore; class InventoryOpticsItem_Base_F; - + class optic_LRPS : ItemCore { - ACE_ScopeAdjust_Horizontal[] = { -50, 50 }; - ACE_ScopeAdjust_Vertical[] = { -70, 70 }; + ACE_ScopeAdjust_Vertical[] = { -4, 30 }; + ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; + ACE_ScopeAdjust_Increment = 0.1; class ItemInfo : InventoryOpticsItem_Base_F { class OpticsModes { class Snip { - discreteDistance[] = { 1 }; + discreteDistance[] = { 100 }; discreteDistanceInitIndex = 0; }; }; @@ -16,12 +17,13 @@ class CfgWeapons { }; class optic_SOS : ItemCore { - ACE_ScopeAdjust_Horizontal[] = { -50, 50 }; - ACE_ScopeAdjust_Vertical[] = { -60, 60 }; + ACE_ScopeAdjust_Vertical[] = { -4, 30 }; + ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; + ACE_ScopeAdjust_Increment = 0.1; class ItemInfo : InventoryOpticsItem_Base_F { class OpticsModes { class Snip { - discreteDistance[] = { 1 }; + discreteDistance[] = { 100 }; discreteDistanceInitIndex = 0; }; }; @@ -29,12 +31,41 @@ class CfgWeapons { }; class optic_DMS : ItemCore { - ACE_ScopeAdjust_Horizontal[] = { -40, 40 }; - ACE_ScopeAdjust_Vertical[] = { -40, 40 }; + ACE_ScopeAdjust_Vertical[] = { -4, 20 }; + ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; + ACE_ScopeAdjust_Increment = 0.1; class ItemInfo : InventoryOpticsItem_Base_F { class OpticsModes { class Snip { - discreteDistance[] = { 1 }; + discreteDistance[] = { 100 }; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + + class optic_AMS_base : ItemCore { + ACE_ScopeAdjust_Vertical[] = { -4, 30 }; + ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; + ACE_ScopeAdjust_Increment = 0.1; + class ItemInfo : InventoryOpticsItem_Base_F { + class OpticsModes { + class AMS { + discreteDistance[] = { 100 }; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + + class optic_KHS_base : ItemCore { + ACE_ScopeAdjust_Vertical[] = { -4, 30 }; + ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; + ACE_ScopeAdjust_Increment = 0.1; + class ItemInfo : InventoryOpticsItem_Base_F { + class OpticsModes { + class KHS { + discreteDistance[] = { 100 }; discreteDistanceInitIndex = 0; }; }; diff --git a/addons/scopes/XEH_postInit.sqf b/addons/scopes/XEH_postInit.sqf index 1084a41181..ca4017222a 100644 --- a/addons/scopes/XEH_postInit.sqf +++ b/addons/scopes/XEH_postInit.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi and esteldunedain + * Author: KoffeinFlummi, esteldunedain, Ruthberg * * Watches for scope changes. * Defines key bindings @@ -33,66 +33,110 @@ if !(hasInterface) exitWith {}; // Add keybinds -["ACE3", QGVAR(AdjustUp), localize "STR_ACE_Scopes_AdjustUp", +["ACE3", QGVAR(AdjustUpMinor), localize "STR_ACE_Scopes_AdjustUpMinor", { // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific [ACE_player] call FUNC(inventoryCheck); - if !([ACE_player, 0, 0.1] call FUNC(canAdjustScope)) exitWith {false}; - + // Statement - [ACE_player, 0, 0.1] call FUNC(adjustScope); - true + [ACE_player, ELEVATION_UP, MINOR_INCREMENT] call FUNC(adjustScope); }, {false}, [201, [false, false, false]], true] call cba_fnc_addKeybind; -["ACE3", QGVAR(AdjustDown), localize "STR_ACE_Scopes_AdjustDown", +["ACE3", QGVAR(AdjustDownMinor), localize "STR_ACE_Scopes_AdjustDownMinor", { // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific [ACE_player] call FUNC(inventoryCheck); - if !([ACE_player, 0, -0.1] call FUNC(canAdjustScope)) exitWith {false}; // Statement - [ACE_player, 0, -0.1] call FUNC(adjustScope); - true + [ACE_player, ELEVATION_DOWN, MINOR_INCREMENT] call FUNC(adjustScope); }, {false}, [209, [false, false, false]], true] call cba_fnc_addKeybind; -["ACE3", QGVAR(AdjustLeft), localize "STR_ACE_Scopes_AdjustLeft", +["ACE3", QGVAR(AdjustLeftMinor), localize "STR_ACE_Scopes_AdjustLeftMinor", { // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific [ACE_player] call FUNC(inventoryCheck); - if !([ACE_player, -0.1, 0] call FUNC(canAdjustScope)) exitWith {false}; // Statement - [ACE_player, -0.1, 0] call FUNC(adjustScope); - true + [ACE_player, WINDAGE_LEFT, MINOR_INCREMENT] call FUNC(adjustScope); }, {false}, [209, [false, true, false]], true] call cba_fnc_addKeybind; -["ACE3", QGVAR(AdjustRight), localize "STR_ACE_Scopes_AdjustRight", +["ACE3", QGVAR(AdjustRightMinor), localize "STR_ACE_Scopes_AdjustRightMinor", { // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific [ACE_player] call FUNC(inventoryCheck); - if !([ACE_player, 0.1, 0] call FUNC(canAdjustScope)) exitWith {false}; // Statement - [ACE_player, 0.1, 0] call FUNC(adjustScope); - true + [ACE_player, WINDAGE_RIGHT, MINOR_INCREMENT] call FUNC(adjustScope); }, {false}, [201, [false, true, false]], true] call cba_fnc_addKeybind; +["ACE3", QGVAR(AdjustUpMajor), localize "STR_ACE_Scopes_AdjustUpMajor", +{ + // Conditions: canInteract + if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + [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; + +["ACE3", QGVAR(AdjustDownMajor), localize "STR_ACE_Scopes_AdjustDownMajor", +{ + // Conditions: canInteract + if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + [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; + +["ACE3", QGVAR(AdjustLeftMajor), localize "STR_ACE_Scopes_AdjustLeftMajor", +{ + // Conditions: canInteract + if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + [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; + +["ACE3", QGVAR(AdjustRightMajor), localize "STR_ACE_Scopes_AdjustRightMajor", +{ + // Conditions: canInteract + if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + [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; + // init shortdot GVAR(showShortdot) = false; diff --git a/addons/scopes/XEH_preInit.sqf b/addons/scopes/XEH_preInit.sqf index e574cc72d4..d45f50c1bb 100644 --- a/addons/scopes/XEH_preInit.sqf +++ b/addons/scopes/XEH_preInit.sqf @@ -3,7 +3,9 @@ ADDON = false; PREP(adjustScope); -PREP(canAdjustScope); +PREP(adjustZero); +PREP(applyScopeAdjustment); +PREP(canAdjustZero); PREP(firedEH); PREP(getOptics); PREP(inventoryCheck); diff --git a/addons/scopes/config.cpp b/addons/scopes/config.cpp index d94e066767..42be283044 100644 --- a/addons/scopes/config.cpp +++ b/addons/scopes/config.cpp @@ -16,6 +16,8 @@ class CfgPatches { #include "CfgSounds.hpp" +#include "CfgVehicles.hpp" + #include "CfgWeapons.hpp" #include "RscTitles.hpp" diff --git a/addons/scopes/functions/fnc_adjustScope.sqf b/addons/scopes/functions/fnc_adjustScope.sqf index 6e71a391aa..76c62a4688 100644 --- a/addons/scopes/functions/fnc_adjustScope.sqf +++ b/addons/scopes/functions/fnc_adjustScope.sqf @@ -1,56 +1,73 @@ /* - * Author: KoffeinFlummi + * Author: KoffeinFlummi, Ruthberg * Changes the adjustment for the current scope * * Argument: * 0: Unit - * 1: Horizontal adjustment - * 2: Vertical adjustment + * 1: Turret and Direction + * 2: Major Step * * Return value: - * True + * Did we adjust anything? * * Public: No */ #include "script_component.hpp" -private ["_unit", "_weapons", "_zeroing", "_pitchbankyaw", "_pitch", "_bank", "_yaw", "_hint"]; +if !(vehicle _unit == _unit) exitWith {false}; -_unit = _this select 0; +private ["_unit", "_turretAndDirection", "_majorStep", "_weaponIndex", "_zeroing", "_optic", "_increment", "_maxVertical", "_maxHorizontal", "_elevation", "_windage", "_zero"]; + +EXPLODE_3_PVT(_this,_unit,_turretAndDirection,_majorStep); _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); +if (_weaponIndex < 0) exitWith {false}; _adjustment = _unit getVariable QGVAR(Adjustment); if (isNil "_adjustment") then { - _adjustment = [[0,0], [0,0], [0,0]]; - _unit setVariable [QGVAR(Adjustment), _adjustment]; + _adjustment = [[0,0,0], [0,0,0], [0,0,0]]; // [Windage, Elevation, Zero] }; -_zeroing = _adjustment select _weaponIndex; -_zeroing set [0, (round (((_zeroing select 0) + (_this select 1)) * 10)) / 10]; -_zeroing set [1, (round (((_zeroing select 1) + (_this select 2)) * 10)) / 10]; - -// Change the adjustment array -_adjustment set [_weaponIndex, _zeroing]; -[_unit, QGVAR(Adjustment), _adjustment, 0.5] call EFUNC(common,setVariablePublic); - -playSound (["ACE_Scopes_Click_1", "ACE_Scopes_Click_2", "ACE_Scopes_Click_3"] select floor random 3); - -// slightly rotate the player if looking through optic -if (cameraView == "GUNNER") then { - - _pitchbankyaw = [_unit] call EFUNC(common,getPitchBankYaw); - // these are not exact mil-to-degree conversions, but instead chosen - // to minimize the effect of rounding errors - _pitch = (_pitchbankyaw select 0) + ((_this select 2) * -0.04); - _bank = _pitchbankyaw select 1; - _yaw = (_pitchbankyaw select 2) + ((_this select 1) * -0.04); - [_unit, _pitch, _bank, _yaw] call EFUNC(common,setPitchBankYaw) - -} else { - - [] call FUNC(showZeroing); - +if (isNil QGVAR(Optics)) then { + GVAR(Optics) = ["", "", ""]; }; +_optic = GVAR(Optics) select _weaponIndex; +_increment = getNumber (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_Increment"); +_maxVertical = getArray (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_Vertical"); +_maxHorizontal = getArray (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_Horizontal"); + +if ((count _maxHorizontal < 2) or (count _maxVertical < 2)) exitWith {false}; + +_zeroing = _adjustment select _weaponIndex; +_elevation = _zeroing select 0; +_windage = _zeroing select 1; +_zero = _zeroing select 2; + +switch (_turretAndDirection) do +{ + case ELEVATION_UP: { _elevation = _elevation + _increment }; + case ELEVATION_DOWN: { _elevation = _elevation - _increment }; + case WINDAGE_LEFT: { _windage = _windage - _increment }; + case WINDAGE_RIGHT: { _windage = _windage + _increment }; +}; + +if (_majorStep) then { + switch (_turretAndDirection) do + { + case ELEVATION_UP: { _elevation = ceil(_elevation) }; + case ELEVATION_DOWN: { _elevation = floor(_elevation) }; + case WINDAGE_LEFT: { _windage = floor(_windage) }; + case WINDAGE_RIGHT: { _windage = ceil(_windage) }; + }; +}; + +_elevation = round(_elevation * 10) / 10; +_windage = round(_windage * 10) / 10; + +if ((_elevation + _zero) < _maxVertical select 0 or (_elevation + _zero) > _maxVertical select 1) exitWith {false}; +if (_windage < _maxHorizontal select 0 or _windage > _maxHorizontal select 1) exitWith {false}; + +[_unit, _elevation, _windage, _zero] call FUNC(applyScopeAdjustment); + true diff --git a/addons/scopes/functions/fnc_adjustZero.sqf b/addons/scopes/functions/fnc_adjustZero.sqf new file mode 100644 index 0000000000..4dbab48f49 --- /dev/null +++ b/addons/scopes/functions/fnc_adjustZero.sqf @@ -0,0 +1,39 @@ +/* + * Author: KoffeinFlummi, Ruthberg + * Updates the zero reference for the current scope + * + * Argument: + * 0: Unit + * + * Return value: + * true + * + * Public: No + */ +#include "script_component.hpp" + +if !(vehicle _unit == _unit) exitWith {false}; + +private ["_unit", "_adjustment", "_zeroing", "_elevation", "_windage", "_zero"]; +_unit = _this select 0; + +_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); +if (_weaponIndex < 0) exitWith {false}; + +_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; +_elevation = _zeroing select 0; +_windage = _zeroing select 1; +_zero = _zeroing select 2; + +_zero = round((_zero + _elevation) * 10) / 10; +_elevation = 0; + +[_unit, _elevation, _windage, _zero] call FUNC(applyScopeAdjustment); + +true diff --git a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf new file mode 100644 index 0000000000..6bb72558b1 --- /dev/null +++ b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf @@ -0,0 +1,51 @@ +/* + * Author: KoffeinFlummi, Ruthberg + * Applies the adjustment for the current scope + * + * Argument: + * 0: Unit + * 1: Absolute elevation + * 2: Absolute windage + * 3: Absolute zero reference + * + * Return value: + * True + * + * Public: No + */ +#include "script_component.hpp" + +private ["_unit", "_elevation", "_windage", "_zero", "_adjustmentDifference", "_pitchbankyaw", "_pitch", "_bank", "_yaw"]; + +EXPLODE_4_PVT(_this,_unit,_elevation,_windage,_zero); + +_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); + +_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]; + +_adjustment set [_weaponIndex, [_elevation, _windage, _zero]]; +[_unit, QGVAR(Adjustment), _adjustment, 0.5] call EFUNC(common,setVariablePublic); + +playSound (["ACE_Scopes_Click_1", "ACE_Scopes_Click_2", "ACE_Scopes_Click_3"] select floor random 3); + +// slightly rotate the player if looking through optic +if (cameraView == "GUNNER") then { + // Convert adjustmentDifference from mils to degrees + _adjustmentDifference = [_adjustmentDifference, {_this * 0.05625}] call EFUNC(common,map); + _pitchbankyaw = [_unit] call EFUNC(common,getPitchBankYaw); + _pitch = (_pitchbankyaw select 0) + (_adjustmentDifference select 0); + _bank = (_pitchbankyaw select 1); + _yaw = (_pitchbankyaw select 2) + (_adjustmentDifference select 1); + [_unit, _pitch, _bank, _yaw] call EFUNC(common,setPitchBankYaw); +} else { + [] call FUNC(showZeroing); +}; + +true diff --git a/addons/scopes/functions/fnc_canAdjustScope.sqf b/addons/scopes/functions/fnc_canAdjustScope.sqf deleted file mode 100644 index eda08dc0ee..0000000000 --- a/addons/scopes/functions/fnc_canAdjustScope.sqf +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Author: KoffeinFlummi - * Checks if a player can adjust his optic in the given way. - * - * Argument: - * 0: Unit - * 1: Horizontal adjustment - * 2: Vertical adjustment - * - * Return value: - * Can adjustment be done? - * - * Public: No - */ -#include "script_component.hpp" - -private ["_unit", "_weaponIndex", "_zeroing", "_optic", "_maxHorizontal", "_maxVertical"]; - -_unit = _this select 0; - -_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); -if (_weaponIndex < 0) exitWith {false}; - -_adjustment = _unit getVariable QGVAR(Adjustment); -if (isNil "_adjustment") then { - _adjustment = [[0,0], [0,0], [0,0]]; -}; - -if (isNil QGVAR(Optics)) then { - GVAR(Optics) = ["", "", ""]; -}; - -_zeroing = _adjustment select _weaponIndex; -_zeroX = (_zeroing select 0) + (_this select 1); -_zeroY = (_zeroing select 1) + (_this select 2); - -_optic = GVAR(Optics) select _weaponIndex; -_maxHorizontal = getArray (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_Horizontal"); -_maxVertical = getArray (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_Vertical"); -if ((count _maxHorizontal < 2) or (count _maxVertical < 2)) exitWith {false}; -if ((_maxHorizontal isEqualTo [0,0]) or (_maxVertical isEqualTo [0,0])) exitWith {false}; - -if (_zeroX < _maxHorizontal select 0 or _zeroX > _maxHorizontal select 1) exitWith {false}; -if (_zeroY < _maxVertical select 0 or _zeroY > _maxVertical select 1) exitWith {false}; - -vehicle _unit == _unit diff --git a/addons/scopes/functions/fnc_canAdjustZero.sqf b/addons/scopes/functions/fnc_canAdjustZero.sqf new file mode 100644 index 0000000000..c9663ea711 --- /dev/null +++ b/addons/scopes/functions/fnc_canAdjustZero.sqf @@ -0,0 +1,34 @@ +/* + * Author: KoffeinFlummi, Ruthberg + * Changes the adjustment for the current scope + * + * Argument: + * 0: Unit + * + * Return value: + * Can we update the zero reference? + * + * Public: No + */ +#include "script_component.hpp" + +if (cameraView == "GUNNER") exitWith {false}; +if !(vehicle _unit == _unit) exitWith {false}; +if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {false}; + +private ["_unit", "_adjustment", "_elevation"]; +_unit = _this select 0; + +_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); +if (_weaponIndex < 0) exitWith {false}; + +_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 +_elevation != 0 diff --git a/addons/scopes/functions/fnc_firedEH.sqf b/addons/scopes/functions/fnc_firedEH.sqf index 8185e00ea0..8753019931 100644 --- a/addons/scopes/functions/fnc_firedEH.sqf +++ b/addons/scopes/functions/fnc_firedEH.sqf @@ -39,4 +39,4 @@ _zeroing = _adjustment select _weaponIndex; // Convert zeroing from mils to degrees _zeroing = [_zeroing, {_this * 0.05625}] call EFUNC(common,map); -[_projectile, _zeroing select 0, _zeroing select 1, 0] call EFUNC(common,changeProjectileDirection); +[_projectile, (_zeroing select 1), (_zeroing select 0) + (_zeroing select 2), 0] call EFUNC(common,changeProjectileDirection); diff --git a/addons/scopes/functions/fnc_inventoryCheck.sqf b/addons/scopes/functions/fnc_inventoryCheck.sqf index c83112c8a6..af4b347124 100644 --- a/addons/scopes/functions/fnc_inventoryCheck.sqf +++ b/addons/scopes/functions/fnc_inventoryCheck.sqf @@ -18,7 +18,8 @@ private ["_newOptics", "_adjustment"]; _adjustment = ACE_player getVariable QGVAR(Adjustment); if (isNil "_adjustment") then { - _adjustment = [[0,0], [0,0], [0,0]]; + // [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); }; @@ -31,8 +32,8 @@ _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]) then { - _adjustment set [_forEachIndex, [0,0]]; + 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); }; }; diff --git a/addons/scopes/functions/fnc_showZeroing.sqf b/addons/scopes/functions/fnc_showZeroing.sqf index bd1a04f326..a8df650374 100644 --- a/addons/scopes/functions/fnc_showZeroing.sqf +++ b/addons/scopes/functions/fnc_showZeroing.sqf @@ -21,7 +21,8 @@ if (_weaponIndex < 0) exitWith {}; _adjustment = ACE_player getVariable QGVAR(Adjustment); if (isNil "_adjustment") then { - _adjustment = [[0,0], [0,0], [0,0]]; + // [Windage, Elevation, Zero] + _adjustment = [[0,0,0], [0,0,0], [0,0,0]]; }; // Display the adjustment knobs @@ -36,8 +37,8 @@ if (isNull _display) exitWith {}; _zeroing = _adjustment select _weaponIndex; _vertical = _display displayCtrl 12; _horizontal = _display displayCtrl 13; -_vertical ctrlSetText (str (_zeroing select 1)); -_horizontal ctrlSetText (str (_zeroing select 0)); +_vertical ctrlSetText (str (_zeroing select 0)); +_horizontal ctrlSetText (str (_zeroing select 1)); // Set the time when to hide the knobs GVAR(timeToHide) = diag_tickTime + 3.0; diff --git a/addons/scopes/script_component.hpp b/addons/scopes/script_component.hpp index 8c4a2cb1cd..5cdb74207d 100644 --- a/addons/scopes/script_component.hpp +++ b/addons/scopes/script_component.hpp @@ -1,6 +1,14 @@ #define COMPONENT scopes #include "\z\ace\addons\main\script_mod.hpp" +#define ELEVATION_UP 0 +#define ELEVATION_DOWN 1 +#define WINDAGE_LEFT 2 +#define WINDAGE_RIGHT 3 + +#define MINOR_INCREMENT false +#define MAJOR_INCREMENT true + #ifdef DEBUG_ENABLED_SCOPES #define DEBUG_MODE_FULL #endif diff --git a/addons/scopes/stringtable.xml b/addons/scopes/stringtable.xml index 04f777241a..c04a4e79dc 100644 --- a/addons/scopes/stringtable.xml +++ b/addons/scopes/stringtable.xml @@ -1,50 +1,42 @@  - + - - - Adjust Elevation Up - Magasság Állítása Felfelé - Optik-Elevation erhöhen - Ajustar Elevação Acima - Hausse + - Regulacja krzyża w pionie + - Zvýšit náměr - Ajustar elevación arriba - Вверх по вертикали - - - Adjust Elevation Down - Magasság Állítása Lefelé - Optik-Elevation verringern - Ajustar Elevação Abaixo - Hausse - - Regulacja krzyża w pionie - - Snížit náměr - Ajustar elevación abajo - Вниз по вертикали - - - Adjust Windage Right - Oldalirány Állítása Jobbra - Optik-Azimuth erhöhen - Ajustar Azimute à Direita - Dérive + - Regulacja krzyża w poziomie + - Náměr doprava (vítr) - Ajustar deriva a la derecha - Вправо на уровне - - - Adjust Windage Left - Oldalirány Állítása Balra - Optik-Azimuth verringern - Ajustar Azimute à Esquerda - Dérive - - Regulacja krzyża w poziomie - - Náměr doleva (vítr) - Ajustar deriva a la izquierda - Влево на уровне - - + + + "Minor adjustment up + Zerowanie powoli w górę + + + "Minor adjustment down + Zerowanie powoli w dół + + + "Minor adjustment right + Zerowanie powoli w prawo + + + "Minor adjustment left + Zerowanie powoli w lewo + + + Major adjustment up + Zerowanie w górę + + + Major adjustment down + Zerowanie w dół + + + Major adjustment right + Zerowanie w prawo + + + Major adjustment left + Zerowanie w lewo + + + Set zero adjustment + Zresetuj wyzerowanie + + \ No newline at end of file diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml index 007b37b24f..29501279a0 100644 --- a/addons/switchunits/stringtable.xml +++ b/addons/switchunits/stringtable.xml @@ -1,24 +1,23 @@  - - - - Switched unit - Unité à transférer - Einheit gewechselt - Юнит переключен - Prohozená jednotka - Przełącz jednostkę - Cambiado de unidad - - - This unit is too close to the enemy. - Cette unité est trop près d'un ennemi. - Diese Einheit ist zu nah am Feind. - Юнит слишком близок к противнику. - Tato jednotka je moc blízko k nepříteli. - Ta jednostka jest zbyt blisko przeciwnika. - Esta unidad está demasiado cerca del enemigo. - - - \ No newline at end of file + + + Switched unit + Einheit gewechselt + Юнит переключен + Prohozená jednotka + Przełącz jednostkę + Cambiado de unidad + Unité changée + + + This unit is too close to the enemy. + Diese Einheit ist zu nah am Feind. + Юнит слишком близок к противнику. + Tato jednotka je moc blízko k nepříteli. + Ta jednostka jest zbyt blisko przeciwnika. + Esta unidad está demasiado cerca del enemigo. + Cette unité est trop proche des ennemis + + + diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml index d2dcde42e9..e3216b3396 100644 --- a/addons/vehiclelock/stringtable.xml +++ b/addons/vehiclelock/stringtable.xml @@ -1,5 +1,4 @@  - @@ -76,7 +75,7 @@ A key that should open most WEST vehicles. Ein Schlüssel der die meisten westlichen Fahrzeuge öffnen sollte... Una llave que puede abrir la mayoría de vehículos occidentales. - Une clé qui ouvrira la plupart des véhicules WEST. + Une clé qui ouvrira la plupart des véhicules OUEST. Klucz, który powinien otworzyć większość pojazdów ZACHODU. Klíč který by měl otevřít většinou Západních vozidel. Általános kulcs WEST járművekhez @@ -86,7 +85,7 @@ A key that should open most EAST vehicle. Ein Schlüssel der die meisten östlichen Fahrzeuge öffnen sollte... Una llave que puede abrir la mayoría de vehículos orientales. - Une clé qui ouvrira la plupart des véhicules EAST. + Une clé qui ouvrira la plupart des véhicules EST. Klucz, który powinien otworzyć większość pojazdów WSCHODU. Általános kulcs EAST járművekhez Klíč který by měl otevřít vetšinu Východních vozidel. @@ -113,4 +112,4 @@ Ключ для открытия большинства машин Гражданских. - \ No newline at end of file + diff --git a/addons/weaponselect/stringtable.xml b/addons/weaponselect/stringtable.xml index bdac2fbc65..c1b9039553 100644 --- a/addons/weaponselect/stringtable.xml +++ b/addons/weaponselect/stringtable.xml @@ -1,265 +1,267 @@  - - - Display text on grenade throw - Zeige Text beim Granatwurf - Mostrar texto al lanzar granada - Показывать текст при броске - Zobrazí text při hodu granátem - Wyświetl tekst przy rzucie granatem - - - Display a hint or text on grenade throw. - Zeige Hinweis oder Text beim Granatwurf - Muestra una notificación o texto al lanzar granada - Показывать текст или подсказку при броске гранаты. - Zobrazí upozornění nebo text při hodu granátem. - Wyświetla powiadomienie lub tekst przy rzucie granatem. - - - Select Pistol - Pistole auswählen - Seleccionar pistola - Wybierz pistolet - Zvolit příruční zbraň - Выбрать пистолет - Sélectionner Pistolet - Pisztoly Kiválasztása - Selecionar Pistola - Seleziona la Pistola - - - Select Rifle - Gewehr auswählen - Seleccionar fusil - Wybierz karabin - Zvolit hlavní zbraň - Выбрать автомат - Sélectionner Fusil - Puska Kiválasztása - Selecionar Rifle - Seleziona il Fucile - - - Select Launcher - Raketenwerfer auswählen - Seleccionar lanzador - Wybierz wyrzutnię - Zvolit Raketomet - Выбрать гранатомет - Sélectionner Lanceur - Rakétavető Kiválasztása - Selecionar Lançador - Seleziona il Lanciatore - - - Select Grenade Launcher - Granatwerfer auswählen - Seleccionar lanzador de granadas - Wybierz granatnik - Zvolit Granátomet - Выбрать подствольный гранатомет - Sélectionner Lance-grenades - Gránátvető Kiválasztása - Selecionar Lança-Granadas - Seleziona il Lanciagranate - - - Select Binoculars - Fernglas auswählen - Seleccionar prismáticos - Wybierz lornetkę - Zvolit Dalekohled - Выбрать бинокль - Sélectionner Jumelles - Távcső Kiválasztása - Selecionar Binóculos - Seleziona il Binocolo - - - Holster Weapon - Waffe holstern - Enfundar el arma - Schowaj broń - Schovat zbraň - Убрать оружие - Arme à la bretelle - Fegyvert tokba - Guardar Arma - Nascondi l'arma - - - Engine on - Motor an - Encender motor - Włącz silnik - Moteur allumé - Motor indítása - Zapnout motor - Ligar Motor - Motore acceso - Включить двигатель - - - Engine off - Motor aus - Apagar motor - Wyłącz silnik - Moteur éteint - Motor leállítása - Vypnout motor - Desligar Motor - Motore spento - Выключить двигатель - - - Select Main Gun - Hauptgeschütz auswählen - Seleccionar arma principal - Wybierz główną broń - Sélectionner l'Arme Principale - Elsődleges Fegyver Kiválasztása - Zvolit Hlavní Zbraň - Selecionar Arma Principal - Seleziona Arma Primaria - Выбрать основное оружие - - - Select Machine Gun - Maschinengewehr auswählen - Seleccionar ametralladora - Wybierz karabin maszynowy - Sélectionner Mitrailleuse - Géppuska Kiválasztása - Zvolit Kulomet - Selecionar Metralhadora - Seleziona Mitragliatrice - Выбрать пулемёт - - - Select Missiles - Raketen auswählen - Seleccionar misiles - Wybierz rakiety - Sélectionner Missiles - Rakéták Kiválasztása - Zvolit Rakety - Selecionar Mísseis - Seleziona Missili - Выбрать ракеты - - - Grenade %1 - Grenade %1 - Granate %1 - Granada %1 - Granat %1 - Granát %1 - Gránát Kiválasztása - Граната %1 - - - Ready Grenade - Grenade Prête - Granate nehmen - Granada lista - Przygotuj granat - Odjistit granát - Kész Gránát - Подготовить гранату - - - Select Frag Grenade - Explosive Granate auswählen - Seleccionar granada de fragmenación - Wybierz granat odłamkowy - Sélectionner une grenade à fragmentation - Repeszgránát Kiválasztása - Zvolit Výbušný Granát - Selecionar Granada de Fragmentação - Seleziona Granata a Frammentazione - Выбрать осколочную гранату - - - Select Non-Frag Grenade - Nichtexplosive Granate auswählen - Seleccionar granada de no fragmentación - Wybierz granat nieodłamkowy - Sélectionner grenade non-léthale - Nem Robbanó Gránát Kiválasztása - Zvolit Ne-Výbušný Granát - Selecionar Granada - Seleziona Altre Granate - Выбрать гранату - - - Throw Selected Grenade - Gewählte Granate werfen - Arrojar granada seleccionada - Rzuć wybrany granat - Lancer la grenade sélectionnée - Kiválasztott Gránát Eldobása - Hodit Zvolený Granát - Lançar Granada Selecionada - Lancia la Granata Selezionata - Бросить выбранную гранату - - - No grenades left - Keine Granaten übrig - No quedan granadas - Plus de grenades - Brak granatów - Žádné granáty - Nincs több gránát - Гранат не осталось - - - No frags left - Keine explosiven Granaten übrig - Sin granadas de fragmentación - Brak granatów odłamkowych - Plus de grenades à fragmentation - Nincs több repeszgránát - Už nejsou granáty - Não há granadas de fragmentação restantes - Nessuna granata a frammentazione rimanente - Осколочныких гранат нет - - - No misc. grenades left - Keine nichtexplosiven Granaten übrig - Sin granadas de varias - Brak granatów nieodłamkowych - Plus de grenades non-léthales - Nincs több egyéb gránát - Už nejsou žádné ostatní granáty - Não há outras granadas restantes - Nessun'altra granata rimanente. - Летальные гранаты закончились - - - No grenade selected - Keine Granate ausgewählt - Granada no seleccionada - Nie wybrano żadnego granatu - Aucune grenade sélectionnée - Nincs kiválasztva gránát - Není zvolen žádný granát - Nenhuma granada selecionada - Nessuna granata selezionata - Нет выбранной гранаты - - - Fire Smoke Launcher - Rauchwand abfeuern - Disparar lanzador de humo - Kouřový odpalovač - Tirer le lance-pots fumigènes - Wystrzel granat dymny - Füst kilövése - Запустить дымовую завесу - - + + + Display text on grenade throw + Zeige Text beim Granatwurf + Mostrar texto al lanzar granada + Показывать текст при броске + Zobrazí text při hodu granátem + Wyświetl tekst przy rzucie granatem + Afficher texte lors d'un lancé de grenade + + + Display a hint or text on grenade throw. + Zeige Hinweis oder Text beim Granatwurf + Muestra una notificación o texto al lanzar granada + Показывать текст или подсказку при броске гранаты. + Zobrazí upozornění nebo text při hodu granátem. + Wyświetla powiadomienie lub tekst przy rzucie granatem. + Afficher texte/info au lancé de grenade + + + Select Pistol + Pistole auswählen + Seleccionar pistola + Wybierz pistolet + Zvolit příruční zbraň + Выбрать пистолет + Sélectionner Pistolet + Pisztoly Kiválasztása + Selecionar Pistola + Seleziona la Pistola + + + Select Rifle + Gewehr auswählen + Seleccionar fusil + Wybierz karabin + Zvolit hlavní zbraň + Выбрать автомат + Sélectionner Fusil + Puska Kiválasztása + Selecionar Rifle + Seleziona il Fucile + + + Select Launcher + Raketenwerfer auswählen + Seleccionar lanzador + Wybierz wyrzutnię + Zvolit Raketomet + Выбрать гранатомет + Sélectionner Lanceur + Rakétavető Kiválasztása + Selecionar Lançador + Seleziona il Lanciatore + + + Select Grenade Launcher + Granatwerfer auswählen + Seleccionar lanzador de granadas + Wybierz granatnik + Zvolit Granátomet + Выбрать подствольный гранатомет + Sélectionner Lance-grenades + Gránátvető Kiválasztása + Selecionar Lança-Granadas + Seleziona il Lanciagranate + + + Select Binoculars + Fernglas auswählen + Seleccionar prismáticos + Wybierz lornetkę + Zvolit Dalekohled + Выбрать бинокль + Sélectionner Jumelles + Távcső Kiválasztása + Selecionar Binóculos + Seleziona il Binocolo + + + Holster Weapon + Waffe holstern + Enfundar el arma + Schowaj broń + Schovat zbraň + Убрать оружие + Arme à la bretelle + Fegyvert tokba + Guardar Arma + Nascondi l'arma + + + Engine on + Motor an + Encender motor + Włącz silnik + Moteur allumé + Motor indítása + Zapnout motor + Ligar Motor + Motore acceso + Включить двигатель + + + Engine off + Motor aus + Apagar motor + Wyłącz silnik + Moteur éteint + Motor leállítása + Vypnout motor + Desligar Motor + Motore spento + Выключить двигатель + + + Select Main Gun + Hauptgeschütz auswählen + Seleccionar arma principal + Wybierz główną broń + Sélectionner l'Arme Principale + Elsődleges Fegyver Kiválasztása + Zvolit Hlavní Zbraň + Selecionar Arma Principal + Seleziona Arma Primaria + Выбрать основное оружие + + + Select Machine Gun + Maschinengewehr auswählen + Seleccionar ametralladora + Wybierz karabin maszynowy + Sélectionner Mitrailleuse + Géppuska Kiválasztása + Zvolit Kulomet + Selecionar Metralhadora + Seleziona Mitragliatrice + Выбрать пулемёт + + + Select Missiles + Raketen auswählen + Seleccionar misiles + Wybierz rakiety + Sélectionner Missiles + Rakéták Kiválasztása + Zvolit Rakety + Selecionar Mísseis + Seleziona Missili + Выбрать ракеты + + + Grenade %1 + Granate %1 + Granada %1 + Granat %1 + Granát %1 + Gránát Kiválasztása + Граната %1 + Grenade %1 + + + Ready Grenade + Granate nehmen + Granada lista + Przygotuj granat + Odjistit granát + Kész Gránát + Подготовить гранату + Grenade prête + + + Select Frag Grenade + Explosive Granate auswählen + Seleccionar granada de fragmenación + Wybierz granat odłamkowy + Sélectionner grenade à fragmentation + Repeszgránát Kiválasztása + Zvolit Výbušný Granát + Selecionar Granada de Fragmentação + Seleziona Granata a Frammentazione + Выбрать осколочную гранату + + + Select Non-Frag Grenade + Nichtexplosive Granate auswählen + Seleccionar granada de no fragmentación + Wybierz granat nieodłamkowy + Sélectionner grenade non-léthale + Nem Robbanó Gránát Kiválasztása + Zvolit Ne-Výbušný Granát + Selecionar Granada + Seleziona Altre Granate + Выбрать гранату + + + Throw Selected Grenade + Gewählte Granate werfen + Arrojar granada seleccionada + Rzuć wybrany granat + Lancer la grenade sélectionnée + Kiválasztott Gránát Eldobása + Hodit Zvolený Granát + Lançar Granada Selecionada + Lancia la Granata Selezionata + Бросить выбранную гранату + + + No grenades left + Keine Granaten übrig + No quedan granadas + Plus de grenades + Brak granatów + Žádné granáty + Nincs több gránát + Гранат не осталось + + + No frags left + Keine explosiven Granaten übrig + Sin granadas de fragmentación + Brak granatów odłamkowych + Plus de grenades à fragmentation + Nincs több repeszgránát + Už nejsou granáty + Não há granadas de fragmentação restantes + Nessuna granata a frammentazione rimanente + Осколочныких гранат нет + + + No misc. grenades left + Keine nichtexplosiven Granaten übrig + Sin granadas de varias + Brak granatów nieodłamkowych + Plus de grenades non-léthales + Nincs több egyéb gránát + Už nejsou žádné ostatní granáty + Não há outras granadas restantes + Nessun'altra granata rimanente. + Летальные гранаты закончились + + + No grenade selected + Keine Granate ausgewählt + Granada no seleccionada + Nie wybrano żadnego granatu + Aucune grenade sélectionnée + Nincs kiválasztva gránát + Není zvolen žádný granát + Nenhuma granada selecionada + Nessuna granata selezionata + Нет выбранной гранаты + + + Fire Smoke Launcher + Rauchwand abfeuern + Disparar lanzador de humo + Kouřový odpalovač + Tirer le lance-pots fumigènes + Wystrzel granat dymny + Füst kilövése + Запустить дымовую завесу + + diff --git a/addons/weather/RscTitles.hpp b/addons/weather/RscTitles.hpp new file mode 100644 index 0000000000..aedebdabfc --- /dev/null +++ b/addons/weather/RscTitles.hpp @@ -0,0 +1,31 @@ +class RscTitles +{ + class RscWindIntuitive + { + idd=-1; + onLoad="with uiNameSpace do { RscWindIntuitive = _this select 0 };"; + movingEnable=0; + duration=60; + fadeIn="false"; + fadeOut="false"; + class controls + { + class RscWindIntuitive + { + idc=132948; + type=0; + style=48; + font="TahomaB"; + colorBackground[]={0,0,0,0}; + colorText[]={0,0,0,0}; + x="SafeZoneX + 0.001"; + y="SafeZoneY + 0.001"; + w=0.2; + h=0.2*4/3; + size=0.034; + sizeEx=0.027; + text=""; + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/kestrel/ui/WindLight-01.paa b/addons/weather/UI/wind0.paa similarity index 75% rename from addons/kestrel/ui/WindLight-01.paa rename to addons/weather/UI/wind0.paa index 9865029c93..c049caf47e 100644 Binary files a/addons/kestrel/ui/WindLight-01.paa and b/addons/weather/UI/wind0.paa differ diff --git a/addons/kestrel/ui/WindVeryLight-06.paa b/addons/weather/UI/wind1.paa similarity index 75% rename from addons/kestrel/ui/WindVeryLight-06.paa rename to addons/weather/UI/wind1.paa index 3a11d94cba..47d996fe67 100644 Binary files a/addons/kestrel/ui/WindVeryLight-06.paa and b/addons/weather/UI/wind1.paa differ diff --git a/addons/kestrel/ui/WindLight-12.paa b/addons/weather/UI/wind10.paa similarity index 68% rename from addons/kestrel/ui/WindLight-12.paa rename to addons/weather/UI/wind10.paa index d9a62f9e81..a9bcd49c1b 100644 Binary files a/addons/kestrel/ui/WindLight-12.paa and b/addons/weather/UI/wind10.paa differ diff --git a/addons/weather/UI/wind11.paa b/addons/weather/UI/wind11.paa new file mode 100644 index 0000000000..469cdedada Binary files /dev/null and b/addons/weather/UI/wind11.paa differ diff --git a/addons/weather/UI/wind12.paa b/addons/weather/UI/wind12.paa new file mode 100644 index 0000000000..11e19553ff Binary files /dev/null and b/addons/weather/UI/wind12.paa differ diff --git a/addons/kestrel/ui/WindVeryLight-10.paa b/addons/weather/UI/wind2.paa similarity index 84% rename from addons/kestrel/ui/WindVeryLight-10.paa rename to addons/weather/UI/wind2.paa index 0151ad3779..585944af45 100644 Binary files a/addons/kestrel/ui/WindVeryLight-10.paa and b/addons/weather/UI/wind2.paa differ diff --git a/addons/kestrel/ui/WindVeryLight-04.paa b/addons/weather/UI/wind3.paa similarity index 90% rename from addons/kestrel/ui/WindVeryLight-04.paa rename to addons/weather/UI/wind3.paa index 6b104848da..16b823a9f3 100644 Binary files a/addons/kestrel/ui/WindVeryLight-04.paa and b/addons/weather/UI/wind3.paa differ diff --git a/addons/kestrel/ui/WindLight-11.paa b/addons/weather/UI/wind4.paa similarity index 81% rename from addons/kestrel/ui/WindLight-11.paa rename to addons/weather/UI/wind4.paa index 8beeb80d98..a5bd119889 100644 Binary files a/addons/kestrel/ui/WindLight-11.paa and b/addons/weather/UI/wind4.paa differ diff --git a/addons/weather/UI/wind5.paa b/addons/weather/UI/wind5.paa new file mode 100644 index 0000000000..43398e2960 Binary files /dev/null and b/addons/weather/UI/wind5.paa differ diff --git a/addons/kestrel/ui/WindLight-05.paa b/addons/weather/UI/wind6.paa similarity index 75% rename from addons/kestrel/ui/WindLight-05.paa rename to addons/weather/UI/wind6.paa index 2de5cdbd74..3bd9a9c676 100644 Binary files a/addons/kestrel/ui/WindLight-05.paa and b/addons/weather/UI/wind6.paa differ diff --git a/addons/kestrel/ui/WindVeryLight-03.paa b/addons/weather/UI/wind7.paa similarity index 72% rename from addons/kestrel/ui/WindVeryLight-03.paa rename to addons/weather/UI/wind7.paa index f20ced9770..a7bb1d5942 100644 Binary files a/addons/kestrel/ui/WindVeryLight-03.paa and b/addons/weather/UI/wind7.paa differ diff --git a/addons/kestrel/ui/WindVeryLight-12.paa b/addons/weather/UI/wind8.paa similarity index 78% rename from addons/kestrel/ui/WindVeryLight-12.paa rename to addons/weather/UI/wind8.paa index adcaf136fa..e51ad530c5 100644 Binary files a/addons/kestrel/ui/WindVeryLight-12.paa and b/addons/weather/UI/wind8.paa differ diff --git a/addons/kestrel/ui/WindVeryLight-13.paa b/addons/weather/UI/wind9.paa similarity index 90% rename from addons/kestrel/ui/WindVeryLight-13.paa rename to addons/weather/UI/wind9.paa index d381f0cc9e..016ca49f7c 100644 Binary files a/addons/kestrel/ui/WindVeryLight-13.paa and b/addons/weather/UI/wind9.paa differ diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf index caed3aa254..ff78eeb727 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -10,8 +10,18 @@ 30 setFog (ACE_MISC_PARAMS select 2); }; }; -ACE_wind = wind; -if (true) exitwith {}; + +["ACE3", QGVAR(WindInfoKey), localize "STR_ACE_Weather_WindInfoKey", +{ + // Conditions: canInteract + if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + + // Statement + [] call FUNC(displayWindInfo); + false +}, +{false}, +[37, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (SHIFT + K) // Update Wind simulWeatherSync; @@ -54,7 +64,7 @@ _fnc_updateTemperature = { _hourlyCoef = -0.5 * sin(360 * ((3 + (date select 3))/24 + (date select 4)/1440)); GVAR(currentTemperature) = (GVAR(TempDay) select (_month - 1)) * (1 - _hourlyCoef) + (GVAR(TempNight) select (_month - 1)) * _hourlyCoef; - GVAR(currentTemperature) = GVAR(currentTemperature) + GVAR(currentTemperature) - 2 * humidity - 4 * overcast; + GVAR(currentTemperature) = GVAR(currentTemperature) - 2 * humidity - 4 * overcast; GVAR(currentTemperature) = round(GVAR(currentTemperature) * 10) / 10; // Humidity diff --git a/addons/weather/XEH_preInit.sqf b/addons/weather/XEH_preInit.sqf index f542c522f3..2751e77226 100644 --- a/addons/weather/XEH_preInit.sqf +++ b/addons/weather/XEH_preInit.sqf @@ -4,10 +4,10 @@ ADDON = false; LOG(MSG_INIT); -PREP(serverController); +PREP(displayWindInfo); PREP(getMapData); PREP(getWind); - +PREP(serverController); // Rain variables diff --git a/addons/weather/config.cpp b/addons/weather/config.cpp index 3f2bb4e15a..13e5a0cab2 100644 --- a/addons/weather/config.cpp +++ b/addons/weather/config.cpp @@ -6,11 +6,11 @@ class CfgPatches { weapons[] = {};// "ACE_Kestrel4500" }; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"q1184", "Rocko", "esteldunedain"}; + author[] = {"q1184", "Rocko", "esteldunedain","Ruthberg"}; VERSION_CONFIG; }; }; #include "CfgEventhandlers.hpp" - #include "CfgWorlds.hpp" +#include "RscTitles.hpp" diff --git a/addons/weather/functions/fnc_displayWindInfo.sqf b/addons/weather/functions/fnc_displayWindInfo.sqf new file mode 100644 index 0000000000..da1b8be267 --- /dev/null +++ b/addons/weather/functions/fnc_displayWindInfo.sqf @@ -0,0 +1,81 @@ +/* + * Author: Ruthberg + * + * Displays a wind info (colored arrow) in the top left corner of the screen + * + * Argument: + * None + * + * Return value: + * None + */ +#include "script_component.hpp" + +#define __dsp (uiNamespace getVariable "RscWindIntuitive") +#define __ctrl (__dsp displayCtrl 132948) + +if (GVAR(WindInfo)) exitWith { + GVAR(WindInfo) = false; + 0 cutText ["", "PLAIN"]; + true +}; +if (underwater ACE_player) exitWith { true }; +if (vehicle ACE_player != ACE_player) exitWith { true }; + +2 cutText ["", "PLAIN"]; +EGVAR(advanced_ballistics,Protractor) = false; +1 cutText ["", "PLAIN"]; +GVAR(WindInfo) = true; + +[{ + private ["_windSpeed", "_windDir", "_playerDir", "_windIndex", "_windColor", "_newWindSpeed", "_windSource", "_height"]; + + if !(GVAR(WindInfo) && !(underwater ACE_player) && vehicle ACE_player == ACE_player) exitWith { + GVAR(WindInfo) = false; + 0 cutText ["", "PLAIN"]; + [_this select 1] call cba_fnc_removePerFrameHandler; + }; + + _windIndex = 12; + _windColor = [1, 1, 1, 1]; + + // Toogle behaviour depending on ace_advanced_ballistics being used or not + // @todo, check ACE_AB is actually enabled + _windSpeed = if (isClass (configFile >> "CfgPatches" >> "ACE_Advanced_Ballistics")) then { + (eyePos ACE_player) call EFUNC(advanced_ballistics,calculateWindSpeed); + } else { + vectorMagnitude ACE_wind; + }; + + if (_windSpeed > 0.2) then { + _playerDir = getDir ACE_player; + _windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); + _windIndex = round(((_playerDir - _windDir + 360) % 360) / 30); + _windIndex = _windIndex % 12; + }; + + // Color Codes from https://en.wikipedia.org/wiki/Beaufort_scale#Modern_scale + if (_windSpeed > 0.3) then { _windColor = [0.796, 1, 1, 1]; }; + if (_windSpeed > 1.5) then { _windColor = [0.596, 0.996, 0.796, 1]; }; + if (_windSpeed > 3.3) then { _windColor = [0.596, 0.996, 0.596, 1]; }; + if (_windSpeed > 5.4) then { _windColor = [0.6, 0.996, 0.4, 1]; }; + if (_windSpeed > 7.9) then { _windColor = [0.6, 0.996, 0.047, 1]; }; + if (_windSpeed > 10.7) then { _windColor = [0.8, 0.996, 0.059, 1]; }; + if (_windSpeed > 13.8) then { _windColor = [1, 0.996, 0.067, 1]; }; + if (_windSpeed > 17.1) then { _windColor = [1, 0.796, 0.051, 1]; }; + if (_windSpeed > 20.7) then { _windColor = [1, 0.596, 0.039, 1]; }; + if (_windSpeed > 24.4) then { _windColor = [1, 0.404, 0.031, 1]; }; + if (_windSpeed > 28.4) then { _windColor = [1, 0.22, 0.027, 1]; }; + if (_windSpeed > 32.6) then { _windColor = [1, 0.078, 0.027, 1]; }; + + 0 cutRsc ["RscWindIntuitive", "PLAIN", 1, false]; + + __ctrl ctrlSetScale 0.75; + __ctrl ctrlCommit 0; + + __ctrl ctrlSetText format[QUOTE(PATHTOF(UI\wind%1.paa)), _windIndex]; + __ctrl ctrlSetTextColor _windColor; + +}, 0.5, []] call CBA_fnc_addPerFrameHandler; + +true diff --git a/addons/weather/functions/fnc_getMapData.sqf b/addons/weather/functions/fnc_getMapData.sqf index ebd37053e3..86a05fb225 100644 --- a/addons/weather/functions/fnc_getMapData.sqf +++ b/addons/weather/functions/fnc_getMapData.sqf @@ -11,6 +11,30 @@ */ #include "script_component.hpp" +GVAR(Altitude) = getNumber(configFile >> "CfgWorlds" >> worldName >> "elevationOffset"); +GVAR(Latitude) = getNumber(configFile >> "CfgWorlds" >> worldName >> "latitude"); + +if (worldName in ["Chernarus", "Bootcamp_ACR", "Woodland_ACR", "utes"]) then { GVAR(Latitude) = 50; GVAR(Altitude) = 0; }; +if (worldName in ["Altis", "Stratis"]) then { GVAR(Latitude) = 40; GVAR(Altitude) = 0; }; +if (worldName in ["Takistan", "Zargabad", "Mountains_ACR"]) then { GVAR(Latitude) = 35; GVAR(Altitude) = 2000; }; +if (worldName in ["Shapur_BAF", "ProvingGrounds_PMC"]) then { GVAR(Latitude) = 35; GVAR(Altitude) = 100; }; +if (worldName in ["fallujah"]) then { GVAR(Latitude) = 33; GVAR(Altitude) = 0; }; +if (worldName in ["fata", "Abbottabad"]) then { GVAR(Latitude) = 30; GVAR(Altitude) = 1000; }; +if (worldName in ["sfp_wamako"]) then { GVAR(Latitude) = 14; GVAR(Altitude) = 0; }; +if (worldName in ["sfp_sturko"]) then { GVAR(Latitude) = 56; GVAR(Altitude) = 0; }; +if (worldName in ["Bornholm"]) then { GVAR(Latitude) = 55; GVAR(Altitude) = 0; }; +if (worldName in ["Imrali"]) then { GVAR(Latitude) = 40; GVAR(Altitude) = 0; }; +if (worldName in ["Caribou"]) then { GVAR(Latitude) = 68; GVAR(Altitude) = 0; }; +if (worldName in ["Namalsk"]) then { GVAR(Latitude) = 65; GVAR(Altitude) = 0; }; +if (worldName in ["MCN_Aliabad"]) then { GVAR(Latitude) = 36; GVAR(Altitude) = 0; }; +if (worldName in ["Clafghan"]) then { GVAR(Latitude) = 34; GVAR(Altitude) = 640; }; +if (worldName in ["Sangin", "hellskitchen"]) then { GVAR(Latitude) = 32; GVAR(Altitude) = 0; }; +if (worldName in ["Sara"]) then { GVAR(Latitude) = 40; GVAR(Altitude) = 0; }; +if (worldName in ["reshmaan"]) then { GVAR(Latitude) = 35; GVAR(Altitude) = 2000; }; +if (worldName in ["Thirsk"]) then { GVAR(Latitude) = 65; GVAR(Altitude) = 0; }; +if (worldName in ["lingor"]) then { GVAR(Latitude) = -4; GVAR(Altitude) = 0; }; +if (worldName in ["Panthera3"]) then { GVAR(Latitude) = 46; GVAR(Altitude) = 0; }; + // 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"); diff --git a/addons/weather/stringtable.xml b/addons/weather/stringtable.xml new file mode 100644 index 0000000000..4827751c6b --- /dev/null +++ b/addons/weather/stringtable.xml @@ -0,0 +1,10 @@ + + + + + + Show Wind Info + Pokaż inf. o wietrze + + + \ No newline at end of file diff --git a/addons/winddeflection/ACE_Settings.hpp b/addons/winddeflection/ACE_Settings.hpp new file mode 100644 index 0000000000..89235fe5af --- /dev/null +++ b/addons/winddeflection/ACE_Settings.hpp @@ -0,0 +1,14 @@ +class ACE_Settings { + class GVAR(simulationInterval) { + displayName = "Simulation Interval"; + description = "Defines the interval between every calculation step"; + typeName = "SCALAR"; + value = 0.05; + }; + class GVAR(simulationRadius) { + displayName = "Simulation Radius"; + description = "Defines the radius (in meters) in which advanced ballistics are applied"; + typeName = "SCALAR"; + value = 3000; + }; +}; diff --git a/addons/winddeflection/CfgVehicles.hpp b/addons/winddeflection/CfgVehicles.hpp index 2371c4b135..f9362a2711 100644 --- a/addons/winddeflection/CfgVehicles.hpp +++ b/addons/winddeflection/CfgVehicles.hpp @@ -1,19 +1,27 @@ class CfgVehicles { - class Module_F; - class GVAR(Module): Module_F { - author = "$STR_ACE_Common_ACETeam"; - category = "ACE"; - displayName = "Wind Deflection"; - function = FUNC(initalizeModule); + class ACE_Module; + class GVAR(ModuleSettings): ACE_Module { scope = 2; - isGlobal = 1; + displayName = "Wind Deflection"; icon = QUOTE(PATHTOF(UI\Icon_Module_Wind_ca.paa)); + category = "ACE"; + function = QUOTE(DFUNC(initModuleSettings)); + functionPriority = 1; + isGlobal = 1; + isTriggerActivated = 0; + author = "$STR_ACE_Common_ACETeam"; class Arguments { - class EnableForAI { - displayName = "Enable for AI"; - description = "Should the module be enabled for AI"; - typeName = "BOOL"; - defaultValue = 0; + class simulationInterval { + displayName = "Simulation Interval"; + description = "Defines the interval between every calculation step"; + typeName = "NUMBER"; + defaultValue = 0.05; + }; + class simulationRadius { + displayName = "Simulation Radius"; + description = "Defines the radius (in meters) in which advanced ballistics are applied"; + typeName = "NUMBER"; + defaultValue = 3000; }; }; }; diff --git a/addons/winddeflection/XEH_preInit.sqf b/addons/winddeflection/XEH_preInit.sqf index 05a606fbc2..bac6a8323a 100644 --- a/addons/winddeflection/XEH_preInit.sqf +++ b/addons/winddeflection/XEH_preInit.sqf @@ -10,5 +10,10 @@ #include "script_component.hpp" +ADDON = false; + PREP(handleFired); -PREP(initalizeModule); +PREP(updateTrajectoryPFH); +PREP(initModuleSettings); + +ADDON = true; diff --git a/addons/winddeflection/config.cpp b/addons/winddeflection/config.cpp index f515640f12..e0c77420cf 100644 --- a/addons/winddeflection/config.cpp +++ b/addons/winddeflection/config.cpp @@ -21,13 +21,6 @@ class CfgAddons { }; }; -class ACE_Settings { - class GVAR(EnableForAI) { - value = 0; - typeName = "BOOL"; - isClientSetable = 0; - }; -}; - #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" +#include "ACE_Settings.hpp" \ No newline at end of file diff --git a/addons/winddeflection/functions/fnc_handleFired.sqf b/addons/winddeflection/functions/fnc_handleFired.sqf index 36b177ae0a..5ee22ecf4f 100644 --- a/addons/winddeflection/functions/fnc_handleFired.sqf +++ b/addons/winddeflection/functions/fnc_handleFired.sqf @@ -15,53 +15,23 @@ * Nothing * * Example: - * [clientFiredBIS-XEH] call ace_winddeflection_fnc_handleFired + * [clientFiredBIS-XEH] call ace_advanced_ballistics_fnc_handleFired * * Public: No */ #include "script_component.hpp" -private ["_unit", "_weapon", "_ammo", "_bullet", "_airFriction", "_index"]; -_unit = _this select 0; +if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {false}; -if (_unit distance ACE_player > 3000) exitWith {false}; // Large enough distance to not simulate any wind deflection. -if (!GVAR(EnableForAI) && !([_unit] call EFUNC(common,isPlayer))) exitWith {false}; +private ["_unit", "_bullet"]; +_unit = _this select 0; _bullet = _this select 6; -if (_bullet isKindOf "BulletBase") then { - [{ - private ["_bullet", "_airFriction", "_args", "_deltaT", "_bulletVelocity", "_bulletSpeed", "_trueVelocity", "_trueVelocity", "_dragRef", "_drag", "_accelRef", "_accel"]; +if (!hasInterface) exitWith {false}; +if (!(_bullet isKindOf "BulletBase")) exitWith {false}; +if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {false}; +if (!([_unit] call EFUNC(common,isPlayer))) exitWith {false}; - _args = _this select 0; - _bullet = _args select 0; - _airFriction = _args select 1; - _time = _args select 2; +[_bullet, getNumber(configFile >> "cfgAmmo" >> (_this select 4) >> "airFriction")] call FUNC(updateTrajectoryPFH); - if (!alive _bullet) exitwith { - [_this select 1] call cba_fnc_removePerFrameHandler; - }; - - _deltaT = time - _time; - _args set[2, time]; - - _bulletVelocity = velocity _bullet; - _bulletSpeed = vectorMagnitude _bulletVelocity; - - if (vectorMagnitude ACE_wind > 0) then { - _trueVelocity = _bulletVelocity vectorDiff ACE_wind; - _trueSpeed = vectorMagnitude _trueVelocity; - - _dragRef = _deltaT * _airFriction * _bulletSpeed * _bulletSpeed; - _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef); - _bulletVelocity = _bulletVelocity vectorDiff _accelRef; - - _drag = _deltaT * _airFriction * _trueSpeed; - _accel = _trueVelocity vectorMultiply (_drag); - _bulletVelocity = _bulletVelocity vectorAdd _accel; - }; - _bullet setVelocity _bulletVelocity; - // TODO expand with advanced ballistics functionality. - - }, 0, [_bullet, getNumber(configFile >> "cfgAmmo" >> (_this select 4) >> "airFriction"), time]] call CBA_fnc_addPerFrameHandler; -}; true; \ No newline at end of file diff --git a/addons/winddeflection/functions/fnc_initModuleSettings.sqf b/addons/winddeflection/functions/fnc_initModuleSettings.sqf new file mode 100644 index 0000000000..4cf75c885a --- /dev/null +++ b/addons/winddeflection/functions/fnc_initModuleSettings.sqf @@ -0,0 +1,28 @@ +/* + * Author: Glowbal, Ruthberg + * Module for adjusting the wind deflection settings + * + * Arguments: + * 0: The module logic + * 1: units + * 2: activated + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +private ["_logic", "_units", "_activated"]; +_logic = _this select 0; +_units = _this select 1; +_activated = _this select 2; + +if !(_activated) exitWith {}; + +[_logic, QGVAR(simulationInterval), "simulationInterval"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(simulationRadius), "simulationRadius"] call EFUNC(common,readSettingFromModule); + +GVAR(simulationInterval) = 0 max GVAR(simulationInterval) min 0.2; diff --git a/addons/winddeflection/functions/fnc_initalizeModule.sqf b/addons/winddeflection/functions/fnc_initalizeModule.sqf deleted file mode 100644 index 85d61e3bcc..0000000000 --- a/addons/winddeflection/functions/fnc_initalizeModule.sqf +++ /dev/null @@ -1,19 +0,0 @@ -/** - * fnc_initalizeModule.sqf - * @Descr: N/A - * @Author: Glowbal - * - * @Arguments: [] - * @Return: - * @PublicAPI: false - */ - -#include "script_component.hpp" - -if (!hasInterface) exitwith {}; // No need for this module on HC or dedicated server. - -private ["_logic"]; -_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param; -if (!isNull _logic) then { - [_logic, QGVAR(EnableForAI), "EnableForAI" ] call EFUNC(common,readSettingFromModule); -}; \ No newline at end of file diff --git a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf new file mode 100644 index 0000000000..9859f330dd --- /dev/null +++ b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf @@ -0,0 +1,50 @@ +/* + * Author: Glowbal, Ruthberg + * Handles wind deflection for projectiles. + * + * Arguments: + * 0: bullet - Object the event handler is assigned to + * 1: airFriction - air friction of the bullet + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +[{ + private ["_bullet", "_airFriction", "_args", "_deltaT", "_bulletVelocity", "_bulletSpeed", "_trueVelocity", "_trueVelocity", "_dragRef", "_drag", "_accelRef", "_accel"]; + + _args = _this select 0; + _bullet = _args select 0; + _airFriction = _args select 1; + _time = _args select 2; + + if (!alive _bullet) exitwith { + [_this select 1] call cba_fnc_removePerFrameHandler; + }; + + _deltaT = time - _time; + _args set[2, time]; + + _bulletVelocity = velocity _bullet; + _bulletSpeed = vectorMagnitude _bulletVelocity; + + if (vectorMagnitude ACE_wind > 0) then { + _trueVelocity = _bulletVelocity vectorDiff ACE_wind; + _trueSpeed = vectorMagnitude _trueVelocity; + + _dragRef = _deltaT * _airFriction * _bulletSpeed * _bulletSpeed; + _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef); + _bulletVelocity = _bulletVelocity vectorDiff _accelRef; + + _drag = _deltaT * _airFriction * _trueSpeed; + _accel = _trueVelocity vectorMultiply (_drag); + _bulletVelocity = _bulletVelocity vectorAdd _accel; + }; + _bullet setVelocity _bulletVelocity; + +}, GVAR(simulationInterval), [_this select 0, _this select 1, time]] call CBA_fnc_addPerFrameHandler; \ No newline at end of file diff --git a/addons/winddeflection/stringtable.xml b/addons/winddeflection/stringtable.xml index 59a07bd33b..985f23a467 100644 --- a/addons/winddeflection/stringtable.xml +++ b/addons/winddeflection/stringtable.xml @@ -1,52 +1,52 @@ - - - - Wind Information - Informacje o wietrze - Información del viento - Ветер - Informace o větru - Informations sur le Vent - Windinformationen - - - Direction: %1 - Kierunek: %1 - Dirección: %1 - Направление: %1 - Směr: %1 - Direction : %1 - Richtung: %1 - - - Speed: %1 m/s - Prędkość: %1 - Velocidad: %1 m/s - Скорость: %1 м/с - Rychlost: %1 m/s - Vitesse : %1 m/s - Geschwindigkeit: %1m/s - - - Weather Information - Informacje o pogodzie - Información Meteorológica - Погода - Informace o počasí - Informations sur la Météo - Wetterinformationen - - - Humidity: %1% - Wilgotność: %1 - Humedad: %1% - Влажность: %1% - Vlhkost: %1% - Humidité : %1 - Feuchtigkeit: %1% - - - + + + + Wind Information + Informacje o wietrze + Información del viento + Ветер + Informace o větru + Vent + Windinformationen + + + Direction: %1 + Kierunek: %1 + Dirección: %1 + Направление: %1 + Směr: %1 + Direction %1 + Windrichtung: %1 + + + Speed: %1 m/s + Prędkość: %1 + Velocidad: %1 m/s + Скорость: %1 м/с + Rychlost: %1 m/s + Vitesse %1 m/s + Geschwindigkeit: %1m/s + + + Weather Information + Informacje o pogodzie + Información Meteorológica + Погода + Informace o počasí + Météo + Wetterinformationen + + + Humidity: %1% + Wilgotność: %1 + Humedad: %1% + Влажность: %1% + Vlhkost: %1% + Humidité: %1% + Luftfeuchtigkeit: %1 + + + diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt index f0e21e9207..c50501c770 100644 --- a/extensions/CMakeLists.txt +++ b/extensions/CMakeLists.txt @@ -27,5 +27,6 @@ include_directories(AFTER "common") # Add extensions to build here add_subdirectory(fcs) +add_subdirectory(advanced_ballistics) message("Build Type: ${CMAKE_BUILD_TYPE}") \ No newline at end of file diff --git a/extensions/advanced_ballistics/AdvancedBallistics.cpp b/extensions/advanced_ballistics/AdvancedBallistics.cpp new file mode 100644 index 0000000000..2851d6576b --- /dev/null +++ b/extensions/advanced_ballistics/AdvancedBallistics.cpp @@ -0,0 +1,638 @@ +#include "ace_common.h" + +#include +#include +#include +#include + +#define _USE_MATH_DEFINES +#include + +#define GRAVITY 9.80665 +#define ABSOLUTE_ZERO_IN_CELSIUS -273.15 +#define KELVIN(t) (t - ABSOLUTE_ZERO_IN_CELSIUS) +#define CELSIUS(t) (t + ABSOLUTE_ZERO_IN_CELSIUS) +#define UNIVERSAL_GAS_CONSTANT 8.314 +#define WATER_VAPOR_MOLAR_MASS 0.018016 +#define DRY_AIR_MOLAR_MASS 0.028964 +#define SPECIFIC_GAS_CONSTANT_DRY_AIR 287.058 +#define STD_AIR_DENSITY_ICAO 1.22498 +#define STD_AIR_DENSITY_ASM 1.20885 + +static char version[] = "1.0"; + +struct Bullet { + double airFriction; + double caliber; + double bulletLength; + double bulletMass; + std::vector ballisticCoefficients; + std::vector velocityBoundaries; + char* atmosphereModel; + int dragModel; + std::vector muzzleVelocities; + std::vector barrelLengths; + double stabilityFactor; + double twistDirection; + double transonicStabilityCoef; + double muzzleVelocity; + std::vector origin; + double latitude; + double temperature; + double altitude; + double humidity; + double overcast; + double startTime; + double speed; + double frames; + double lastFrame; + double hDeflection; + double spinDrift; +}; + +struct Map { + std::vector gridHeights; + std::vector gridBuildingNums; + std::vector gridSurfaceIsWater; + int mapSize; + int mapGrids; +}; + +std::vector bulletDatabase; +std::map mapDatabase; +std::string worldName = ""; +Map* map = &mapDatabase[""]; + +double calculateRoughnessLength(double posX, double posY) { + // Source: http://es.ucsc.edu/~jnoble/wind/extrap/index.html + double roughness_lengths[10] = {0.0002, 0.0005, 0.0024, 0.03, 0.055, 0.1, 0.2, 0.4, 0.8, 1.6}; + double roughnessLength = 0.0024; + + int gridX = (int)floor(posX / 50); + int gridY = (int)floor(posY / 50); + int gridCell = gridX * map->mapGrids + gridY; + + if (gridCell >= 0 && (std::size_t)gridCell < map->gridHeights.size() && (std::size_t)gridCell < map->gridBuildingNums.size()) { + int nearBuildings = map->gridBuildingNums[gridCell]; + int surfaceIsWater = map->gridSurfaceIsWater[gridCell]; + + if (nearBuildings == 0 && surfaceIsWater == 1) { + return 0.0005; + } + + if (nearBuildings >= 10) { + return 1.6; + } + + return roughness_lengths[2 + min(nearBuildings, 6)]; + } + + return 0.0024; +} + +double calculateAirDensity(double temperature, double pressure, double relativeHumidity) { + pressure = pressure * 100; + + if (relativeHumidity > 0) { + double _pSat = 6.1078 * pow(10, ((7.5 * temperature) / (temperature + 237.3))); + double vaporPressure = relativeHumidity * _pSat; + double partialPressure = pressure - vaporPressure; + + return (partialPressure * 0.028964 + vaporPressure * 0.018016) / (8.314 * (273.15 + temperature)); + } + else { + return pressure / (287.058 * (273.15 + temperature)); + } +} + +double calculateAtmosphericCorrection(double ballisticCoefficient, double temperature, double pressure, double relativeHumidity, const char *atmosphereModel) { + double airDensity = calculateAirDensity(temperature, pressure, relativeHumidity); + + if (!strcmp(atmosphereModel, "ICAO")) { + return (1.22498 / airDensity) * ballisticCoefficient; + } + else { + return (1.20885 / airDensity) * ballisticCoefficient; + } +} + +double calculateRetard(int DragFunction, double DragCoefficient, double Velocity) { + + double vel = Velocity * 3.2808399; + double val = -1; + double A = -1; + double M = -1; + + switch (DragFunction) { + case 1: + if (vel> 4230) { A = 1.477404177730177e-04; M = 1.9565; } + else if (vel> 3680) { A = 1.920339268755614e-04; M = 1.925; } + else if (vel> 3450) { A = 2.894751026819746e-04; M = 1.875; } + else if (vel> 3295) { A = 4.349905111115636e-04; M = 1.825; } + else if (vel> 3130) { A = 6.520421871892662e-04; M = 1.775; } + else if (vel> 2960) { A = 9.748073694078696e-04; M = 1.725; } + else if (vel> 2830) { A = 1.453721560187286e-03; M = 1.675; } + else if (vel> 2680) { A = 2.162887202930376e-03; M = 1.625; } + else if (vel> 2460) { A = 3.209559783129881e-03; M = 1.575; } + else if (vel> 2225) { A = 3.904368218691249e-03; M = 1.55; } + else if (vel> 2015) { A = 3.222942271262336e-03; M = 1.575; } + else if (vel> 1890) { A = 2.203329542297809e-03; M = 1.625; } + else if (vel> 1810) { A = 1.511001028891904e-03; M = 1.675; } + else if (vel> 1730) { A = 8.609957592468259e-04; M = 1.75; } + else if (vel> 1595) { A = 4.086146797305117e-04; M = 1.85; } + else if (vel> 1520) { A = 1.954473210037398e-04; M = 1.95; } + else if (vel> 1420) { A = 5.431896266462351e-05; M = 2.125; } + else if (vel> 1360) { A = 8.847742581674416e-06; M = 2.375; } + else if (vel> 1315) { A = 1.456922328720298e-06; M = 2.625; } + else if (vel> 1280) { A = 2.419485191895565e-07; M = 2.875; } + else if (vel> 1220) { A = 1.657956321067612e-08; M = 3.25; } + else if (vel> 1185) { A = 4.745469537157371e-10; M = 3.75; } + else if (vel> 1150) { A = 1.379746590025088e-11; M = 4.25; } + else if (vel> 1100) { A = 4.070157961147882e-13; M = 4.75; } + else if (vel> 1060) { A = 2.938236954847331e-14; M = 5.125; } + else if (vel> 1025) { A = 1.228597370774746e-14; M = 5.25; } + else if (vel> 980) { A = 2.916938264100495e-14; M = 5.125; } + else if (vel> 945) { A = 3.855099424807451e-13; M = 4.75; } + else if (vel> 905) { A = 1.185097045689854e-11; M = 4.25; } + else if (vel> 860) { A = 3.566129470974951e-10; M = 3.75; } + else if (vel> 810) { A = 1.045513263966272e-08; M = 3.25; } + else if (vel> 780) { A = 1.291159200846216e-07; M = 2.875; } + else if (vel> 750) { A = 6.824429329105383e-07; M = 2.625; } + else if (vel> 700) { A = 3.569169672385163e-06; M = 2.375; } + else if (vel> 640) { A = 1.839015095899579e-05; M = 2.125; } + else if (vel> 600) { A = 5.71117468873424e-05; M = 1.950; } + else if (vel> 550) { A = 9.226557091973427e-05; M = 1.875; } + else if (vel> 250) { A = 9.337991957131389e-05; M = 1.875; } + else if (vel> 100) { A = 7.225247327590413e-05; M = 1.925; } + else if (vel> 65) { A = 5.792684957074546e-05; M = 1.975; } + else if (vel> 0) { A = 5.206214107320588e-05; M = 2.000; } + break; + + case 2: + if (vel> 1674) { A = .0079470052136733; M = 1.36999902851493; } + else if (vel> 1172) { A = 1.00419763721974e-03; M = 1.65392237010294; } + else if (vel> 1060) { A = 7.15571228255369e-23; M = 7.91913562392361; } + else if (vel> 949) { A = 1.39589807205091e-10; M = 3.81439537623717; } + else if (vel> 670) { A = 2.34364342818625e-04; M = 1.71869536324748; } + else if (vel> 335) { A = 1.77962438921838e-04; M = 1.76877550388679; } + else if (vel> 0) { A = 5.18033561289704e-05; M = 1.98160270524632; } + break; + + case 5: + if (vel> 1730) { A = 7.24854775171929e-03; M = 1.41538574492812; } + else if (vel> 1228) { A = 3.50563361516117e-05; M = 2.13077307854948; } + else if (vel> 1116) { A = 1.84029481181151e-13; M = 4.81927320350395; } + else if (vel> 1004) { A = 1.34713064017409e-22; M = 7.8100555281422; } + else if (vel> 837) { A = 1.03965974081168e-07; M = 2.84204791809926; } + else if (vel> 335) { A = 1.09301593869823e-04; M = 1.81096361579504; } + else if (vel> 0) { A = 3.51963178524273e-05; M = 2.00477856801111; } + break; + + case 6: + if (vel> 3236) { A = 0.0455384883480781; M = 1.15997674041274; } + else if (vel> 2065) { A = 7.167261849653769e-02; M = 1.10704436538885; } + else if (vel> 1311) { A = 1.66676386084348e-03; M = 1.60085100195952; } + else if (vel> 1144) { A = 1.01482730119215e-07; M = 2.9569674731838; } + else if (vel> 1004) { A = 4.31542773103552e-18; M = 6.34106317069757; } + else if (vel> 670) { A = 2.04835650496866e-05; M = 2.11688446325998; } + else if (vel> 0) { A = 7.50912466084823e-05; M = 1.92031057847052; } + break; + + case 7: + if (vel> 4200) { A = 1.29081656775919e-09; M = 3.24121295355962; } + else if (vel> 3000) { A = 0.0171422231434847; M = 1.27907168025204; } + else if (vel> 1470) { A = 2.33355948302505e-03; M = 1.52693913274526; } + else if (vel> 1260) { A = 7.97592111627665e-04; M = 1.67688974440324; } + else if (vel> 1110) { A = 5.71086414289273e-12; M = 4.3212826264889; } + else if (vel> 960) { A = 3.02865108244904e-17; M = 5.99074203776707; } + else if (vel> 670) { A = 7.52285155782535e-06; M = 2.1738019851075; } + else if (vel> 540) { A = 1.31766281225189e-05; M = 2.08774690257991; } + else if (vel> 0) { A = 1.34504843776525e-05; M = 2.08702306738884; } + break; + + case 8: + if (vel> 3571) { A = .0112263766252305; M = 1.33207346655961; } + else if (vel> 1841) { A = .0167252613732636; M = 1.28662041261785; } + else if (vel> 1120) { A = 2.20172456619625e-03; M = 1.55636358091189; } + else if (vel> 1088) { A = 2.0538037167098e-16; M = 5.80410776994789; } + else if (vel> 976) { A = 5.92182174254121e-12; M = 4.29275576134191; } + else if (vel> 0) { A = 4.3917343795117e-05; M = 1.99978116283334; } + break; + + default: + break; + + } + + if (A != -1 && M != -1 && vel > 0 && vel < 10000) { + val = A * pow(vel, M) / DragCoefficient; + val = val / 3.2808399; + return val; + } + + return 0.0; +} + +extern "C" +{ + __declspec (dllexport) void __stdcall RVExtension(char *output, int outputSize, const char *function); +} + +void __stdcall RVExtension(char *output, int outputSize, const char *function) +{ + if (!strcmp(function, "version")) + { + int n = sprintf_s(output, outputSize, "%s", version); + return; + } + + char* input = _strdup(function); + char* token = NULL; + char* next_token = NULL; + char* mode = strtok_s(input, ":", &next_token); + + if (!strcmp(mode, "retard")) { + double ballisticCoefficient = 1.0; + int dragModel = 1; + double velocity = 0.0; + double retard = 0.0; + + dragModel = strtol(strtok_s(NULL, ":", &next_token), NULL, 10); + ballisticCoefficient = strtod(strtok_s(NULL, ":", &next_token), NULL); + velocity = strtod(strtok_s(NULL, ":", &next_token), NULL); + + retard = calculateRetard(dragModel, ballisticCoefficient, velocity); + int n = sprintf_s(output, outputSize, "%f", retard); + return; + } + else if (!strcmp(mode, "atmosphericCorrection")) { + double ballisticCoefficient = 1.0; + double temperature = 15.0; + double pressure = 1013.25; + double humidity = 0.0; + char* atmosphereModel; + + ballisticCoefficient = strtod(strtok_s(NULL, ":", &next_token), NULL); + temperature = strtod(strtok_s(NULL, ":", &next_token), NULL); + pressure = strtod(strtok_s(NULL, ":", &next_token), NULL); + humidity = strtod(strtok_s(NULL, ":", &next_token), NULL); + atmosphereModel = strtok_s(NULL, ":", &next_token); + + ballisticCoefficient = calculateAtmosphericCorrection(ballisticCoefficient, temperature, pressure, humidity, atmosphereModel); + int n = sprintf_s(output, outputSize, "%f", ballisticCoefficient); + return; + } + else if (!strcmp(mode, "new")) { + unsigned int index = 0; + double airFriction = 0.0; + char* ballisticCoefficientArray; + char* ballisticCoefficient; + std::vector ballisticCoefficients; + char* velocityBoundaryArray; + char* velocityBoundary; + std::vector velocityBoundaries; + char* atmosphereModel; + int dragModel = 1; + double stabilityFactor = 1.5; + int twistDirection = 1; + double transonicStabilityCoef = 1; + double muzzleVelocity = 850; + char* originArray; + char* originEntry; + std::vector origin; + double latitude = 0.0; + double temperature = 0.0; + double altitude = 0.0; + double humidity = 0.0; + double overcast = 0.0; + double tickTime = 0.0; + + index = strtol(strtok_s(NULL, ":", &next_token), NULL, 10); + airFriction = strtod(strtok_s(NULL, ":", &next_token), NULL); + ballisticCoefficientArray = strtok_s(NULL, ":", &next_token); + ballisticCoefficientArray++; + ballisticCoefficientArray[strlen(ballisticCoefficientArray) - 1] = 0; + ballisticCoefficient = strtok_s(ballisticCoefficientArray, ",", &token); + while (ballisticCoefficient != NULL) + { + ballisticCoefficients.push_back(strtod(ballisticCoefficient, NULL)); + ballisticCoefficient = strtok_s(NULL, ",", &token); + } + velocityBoundaryArray = strtok_s(NULL, ":", &next_token); + velocityBoundaryArray++; + velocityBoundaryArray[strlen(velocityBoundaryArray) - 1] = 0; + velocityBoundary = strtok_s(velocityBoundaryArray, ",", &token); + while (velocityBoundary != NULL) + { + velocityBoundaries.push_back(strtod(velocityBoundary, NULL)); + velocityBoundary = strtok_s(NULL, ",", &token); + } + atmosphereModel = strtok_s(NULL, ":", &next_token); + dragModel = strtol(strtok_s(NULL, ":", &next_token), NULL, 10); + stabilityFactor = strtod(strtok_s(NULL, ":", &next_token), NULL); + twistDirection = strtol(strtok_s(NULL, ":", &next_token), NULL, 10); + muzzleVelocity = strtod(strtok_s(NULL, ":", &next_token), NULL); + transonicStabilityCoef = strtod(strtok_s(NULL, ":", &next_token), NULL); + originArray = strtok_s(NULL, ":", &next_token); + originArray++; + originArray[strlen(originArray) - 1] = 0; + originEntry = strtok_s(originArray, ",", &token); + while (originEntry != NULL) + { + origin.push_back(strtod(originEntry, NULL)); + originEntry = strtok_s(NULL, ",", &token); + } + latitude = strtod(strtok_s(NULL, ":", &next_token), NULL); + temperature = strtod(strtok_s(NULL, ":", &next_token), NULL); + altitude = strtod(strtok_s(NULL, ":", &next_token), NULL); + humidity = strtod(strtok_s(NULL, ":", &next_token), NULL); + overcast = strtod(strtok_s(NULL, ":", &next_token), NULL); + tickTime = strtod(strtok_s(NULL, ":", &next_token), NULL); + tickTime += strtod(strtok_s(NULL, ":", &next_token), NULL); + + while (index >= bulletDatabase.size()) { + Bullet bullet; + bulletDatabase.push_back(bullet); + } + + bulletDatabase[index].airFriction = airFriction; + bulletDatabase[index].ballisticCoefficients = ballisticCoefficients; + bulletDatabase[index].velocityBoundaries = velocityBoundaries; + bulletDatabase[index].atmosphereModel = atmosphereModel; + bulletDatabase[index].dragModel = dragModel; + bulletDatabase[index].stabilityFactor = stabilityFactor; + bulletDatabase[index].twistDirection = twistDirection; + bulletDatabase[index].transonicStabilityCoef = transonicStabilityCoef; + bulletDatabase[index].muzzleVelocity = muzzleVelocity; + bulletDatabase[index].origin = origin; + bulletDatabase[index].latitude = latitude / 180 * M_PI; + bulletDatabase[index].temperature = temperature; + bulletDatabase[index].altitude = altitude; + bulletDatabase[index].humidity = humidity; + bulletDatabase[index].overcast = overcast; + bulletDatabase[index].startTime = tickTime; + bulletDatabase[index].lastFrame = tickTime; + bulletDatabase[index].hDeflection = 0.0; + bulletDatabase[index].spinDrift = 0.0; + bulletDatabase[index].speed = 0.0; + bulletDatabase[index].frames = 0.0; + + int n = sprintf_s(output, outputSize, "%s", ""); + return; + } + else if (!strcmp(mode, "simulate")) { + // simulate:0:[-0.109985,542.529,-3.98301]:[3751.57,5332.23,214.252]:[0.598153,2.38829,0]:28.6:0:0.481542:0:215.16 + unsigned int index = 0; + char* velocityArray; + double velocity[3] = { 0.0, 0.0, 0.0 }; + char* positionArray; + double position[3] = { 0.0, 0.0, 0.0 }; + char* windArray; + double wind[3]; + double heightAGL = 0.0; + double tickTime = 0.0; + + index = strtol(strtok_s(NULL, ":", &next_token), NULL, 10); + velocityArray = strtok_s(NULL, ":", &next_token); + velocityArray++; + velocityArray[strlen(velocityArray) - 1] = 0; + velocity[0] = strtod(strtok_s(velocityArray, ",", &token), NULL); + velocity[1] = strtod(strtok_s(NULL, ",", &token), NULL); + velocity[2] = strtod(strtok_s(NULL, ",", &token), NULL); + positionArray = strtok_s(NULL, ":", &next_token); + positionArray++; + positionArray[strlen(positionArray) - 1] = 0; + position[0] = strtod(strtok_s(positionArray, ",", &token), NULL); + position[1] = strtod(strtok_s(NULL, ",", &token), NULL); + position[2] = strtod(strtok_s(NULL, ",", &token), NULL); + windArray = strtok_s(NULL, ":", &next_token); + windArray++; + windArray[strlen(windArray) - 1] = 0; + wind[0] = strtod(strtok_s(windArray, ",", &token), NULL); + wind[1] = strtod(strtok_s(NULL, ",", &token), NULL); + wind[2] = strtod(strtok_s(NULL, ",", &token), NULL); + heightAGL = strtod(strtok_s(NULL, ":", &next_token), NULL); + tickTime = strtod(strtok_s(NULL, ":", &next_token), NULL); + tickTime += strtod(strtok_s(NULL, ":", &next_token), NULL); + + double ballisticCoefficient = 1.0; + double dragRef = 0.0; + double drag = 0.0; + double accelRef[3] = { 0.0, 0.0, 0.0 }; + double accel[3] = { 0.0, 0.0, 0.0 }; + double TOF = 0.0; + double deltaT = 0.0; + double bulletSpeed; + double bulletDir; + double bulletSpeedAvg = 0.0; + double trueVelocity[3] = { 0.0, 0.0, 0.0 }; + double trueSpeed = 0.0; + double temperature = 0.0; + double windSpeed = 0.0; + double windAttenuation = 1.0; + double velocityOffset[3] = { 0.0, 0.0, 0.0 }; + double positionOffset[3] = { 0.0, 0.0, 0.0 }; + + TOF = tickTime - bulletDatabase[index].startTime; + + deltaT = tickTime - bulletDatabase[index].lastFrame; + bulletDatabase[index].lastFrame = tickTime; + + bulletSpeed = sqrt(pow(velocity[0], 2) + pow(velocity[1], 2) + pow(velocity[2], 2)); + bulletDir = atan2(velocity[0], velocity[1]); + + bulletDatabase[index].speed += bulletSpeed; + bulletDatabase[index].frames += 1; + bulletSpeedAvg = (bulletDatabase[index].speed / bulletDatabase[index].frames); + + windSpeed = sqrt(pow(wind[0], 2) + pow(wind[1], 2) + pow(wind[2], 2)); + if (windSpeed > 0.1) + { + double windSourceTerrain[3]; + + windSourceTerrain[0] = position[0] - wind[0] / windSpeed * 100; + windSourceTerrain[1] = position[1] - wind[1] / windSpeed * 100; + windSourceTerrain[2] = position[2] - wind[2] / windSpeed * 100; + + int gridX = (int)floor(windSourceTerrain[0] / 50); + int gridY = (int)floor(windSourceTerrain[1] / 50); + int gridCell = gridX * map->mapGrids + gridY; + + if (gridCell >= 0 && (std::size_t)gridCell < map->gridHeights.size() && (std::size_t)gridCell < map->gridBuildingNums.size()) { + double gridHeight = map->gridHeights[gridCell]; + + if (gridHeight > position[2]) { + double angle = atan((gridHeight - position[2]) / 100); + windAttenuation *= pow(cos(angle), 2); + } + } + } + + if (windSpeed > 0.1) + { + double windSourceObstacles[3]; + + windSourceObstacles[0] = position[0] - wind[0] / windSpeed * 25; + windSourceObstacles[1] = position[1] - wind[1] / windSpeed * 25; + windSourceObstacles[2] = position[2] - wind[2] / windSpeed * 25; + + if (heightAGL > 0 && heightAGL < 20) { + double roughnessLength = calculateRoughnessLength(windSourceObstacles[0], windSourceObstacles[1]); + windAttenuation *= (log(heightAGL / roughnessLength) / log(20 / roughnessLength)); + } + } + + if (windAttenuation < 1) + { + wind[0] *= windAttenuation; + wind[1] *= windAttenuation; + wind[2] *= windAttenuation; + windSpeed = sqrt(pow(wind[0], 2) + pow(wind[1], 2) + pow(wind[2], 2)); + } + + trueVelocity[0] = velocity[0] - wind[0]; + trueVelocity[1] = velocity[1] - wind[1]; + trueVelocity[2] = velocity[2] - wind[2]; + trueSpeed = sqrt(pow(trueVelocity[0], 2) + pow(trueVelocity[1], 2) + pow(trueVelocity[2], 2)); + + temperature = bulletDatabase[index].temperature - 0.0065 * position[2]; + + if (bulletDatabase[index].ballisticCoefficients.size() == bulletDatabase[index].velocityBoundaries.size() + 1) { + double pressure = 1013.25 * exp(-(bulletDatabase[index].altitude + position[2]) / 7990) - 10 * bulletDatabase[index].overcast; + + dragRef = deltaT * bulletDatabase[index].airFriction * bulletSpeed * bulletSpeed; + + accelRef[0] = (velocity[0] / bulletSpeed) * dragRef; + accelRef[1] = (velocity[1] / bulletSpeed) * dragRef; + accelRef[2] = (velocity[2] / bulletSpeed) * dragRef; + + velocityOffset[0] -= accelRef[0]; + velocityOffset[1] -= accelRef[1]; + velocityOffset[2] -= accelRef[2]; + + ballisticCoefficient = bulletDatabase[index].ballisticCoefficients[0]; + for (int i = (int)bulletDatabase[index].velocityBoundaries.size() - 1; i >= 0; i = i - 1) + { + if (bulletSpeed < bulletDatabase[index].velocityBoundaries[i]) + { + ballisticCoefficient = bulletDatabase[index].ballisticCoefficients[i + 1]; + break; + } + } + + ballisticCoefficient = calculateAtmosphericCorrection(ballisticCoefficient, temperature, pressure, bulletDatabase[index].humidity, bulletDatabase[index].atmosphereModel); + drag = deltaT * calculateRetard(bulletDatabase[index].dragModel, ballisticCoefficient, trueSpeed); + accel[0] = (trueVelocity[0] / trueSpeed) * drag; + accel[1] = (trueVelocity[1] / trueSpeed) * drag; + accel[2] = (trueVelocity[2] / trueSpeed) * drag; + + velocityOffset[0] -= accel[0]; + velocityOffset[1] -= accel[1]; + velocityOffset[2] -= accel[2]; + } + else { + double pressureDeviation = 1013.25 * exp(-(bulletDatabase[index].altitude + position[2]) / 7990) - 1013.25 - 10 * bulletDatabase[index].overcast; + double airFriction = bulletDatabase[index].airFriction + ((temperature - 15) * 0.0000015 + bulletDatabase[index].humidity * 0.0000040 + pressureDeviation * -0.0000009); + + if (airFriction != bulletDatabase[index].airFriction || windSpeed > 0) { + dragRef = deltaT * bulletDatabase[index].airFriction * bulletSpeed * bulletSpeed; + + accelRef[0] = (velocity[0] / bulletSpeed) * dragRef; + accelRef[1] = (velocity[1] / bulletSpeed) * dragRef; + accelRef[2] = (velocity[2] / bulletSpeed) * dragRef; + + velocityOffset[0] -= accelRef[0]; + velocityOffset[1] -= accelRef[1]; + velocityOffset[2] -= accelRef[2]; + + drag = deltaT * airFriction * trueSpeed * trueSpeed; + accel[0] = (trueVelocity[0] / trueSpeed) * drag; + accel[1] = (trueVelocity[1] / trueSpeed) * drag; + accel[2] = (trueVelocity[2] / trueSpeed) * drag; + + velocityOffset[0] += accel[0]; + velocityOffset[1] += accel[1]; + velocityOffset[2] += accel[2]; + } + } + + if (bulletSpeedAvg > 0) { + double distanceSqr = pow(bulletDatabase[index].origin[0] - position[0], 2) + pow(bulletDatabase[index].origin[1] - position[1], 2) + pow(bulletDatabase[index].origin[2] - position[2], 2); + double horizontalDeflection = 0.0000729 * distanceSqr * sin(bulletDatabase[index].latitude) / bulletSpeedAvg; + double horizontalDeflectionPartial = horizontalDeflection - bulletDatabase[index].hDeflection; + bulletDatabase[index].hDeflection = horizontalDeflection; + + positionOffset[0] += sin(bulletDir + M_PI / 2) * horizontalDeflectionPartial; + positionOffset[1] += cos(bulletDir + M_PI / 2) * horizontalDeflectionPartial; + } + + double centripetalAccel = 2 * 0.0000729 * (bulletDatabase[index].muzzleVelocity / -32.2) * cos(bulletDatabase[index].latitude) * sin(bulletDir); + velocityOffset[2] -= centripetalAccel * deltaT; + + double spinDrift = bulletDatabase[index].twistDirection * 0.0254 * 1.25 * (bulletDatabase[index].stabilityFactor + 1.2) * pow(TOF, 1.83); + double spinDriftPartial = spinDrift - bulletDatabase[index].spinDrift; + bulletDatabase[index].spinDrift = spinDrift; + + positionOffset[0] += sin(bulletDir + M_PI / 2) * spinDriftPartial; + positionOffset[1] += cos(bulletDir + M_PI / 2) * spinDriftPartial; + + if (bulletSpeed < 345 && bulletSpeedAvg > 340 && bulletSpeed > 335) + { + srand((unsigned)time(NULL)); + velocityOffset[0] += (((double)rand() / (RAND_MAX)) * 0.4 - 0.2) * (1 - bulletDatabase[index].transonicStabilityCoef); + velocityOffset[1] += (((double)rand() / (RAND_MAX)) * 0.4 - 0.2) * (1 - bulletDatabase[index].transonicStabilityCoef); + velocityOffset[2] += (((double)rand() / (RAND_MAX)) * 0.4 - 0.2) * (1 - bulletDatabase[index].transonicStabilityCoef); + }; + + int n = sprintf_s(output, outputSize, "_bullet setVelocity (_bulletVelocity vectorAdd [%f, %f, %f]); _bullet setPosASL (_bulletPosition vectorAdd [%f, %f, %f]);", velocityOffset[0], velocityOffset[1], velocityOffset[2], positionOffset[0], positionOffset[1], positionOffset[2]); + return; + } + else if (!strcmp(mode, "set")) { + int height = 0; + int numObjects = 0; + int surfaceIsWater = 0; + + height = strtol(strtok_s(NULL, ":", &next_token), NULL, 10); + numObjects = strtol(strtok_s(NULL, ":", &next_token), NULL, 10); + surfaceIsWater = strtol(strtok_s(NULL, ":", &next_token), NULL, 10); + + map->gridHeights.push_back(height); + map->gridBuildingNums.push_back(numObjects); + map->gridSurfaceIsWater.push_back(surfaceIsWater); + + int n = sprintf_s(output, outputSize, "%s", ""); + return; + } + else if (!strcmp(mode, "init")) { + int mapSize = 0; + int mapGrids = 0; + int gridCells = 0; + + worldName = strtok_s(NULL, ":", &next_token); + mapSize = strtol(strtok_s(NULL, ":", &next_token), NULL, 10); + + mapGrids = (int)ceil((double)mapSize / 50.0) + 1; + gridCells = mapGrids * mapGrids; + + map = &mapDatabase[worldName]; + if (map->gridHeights.size() == gridCells) { + int n = sprintf_s(output, outputSize, "%s", "Terrain already initialized"); + return; + } + + map->mapSize = mapSize; + map->mapGrids = mapGrids; + map->gridHeights.clear(); + map->gridBuildingNums.clear(); + map->gridSurfaceIsWater.clear(); + map->gridHeights.reserve(gridCells); + map->gridBuildingNums.reserve(gridCells); + map->gridSurfaceIsWater.reserve(gridCells); + + int n = sprintf_s(output, outputSize, "%s", ""); + return; + } + + int n = sprintf_s(output, outputSize, "%s", ""); + return; +} diff --git a/extensions/advanced_ballistics/CMakeLists.txt b/extensions/advanced_ballistics/CMakeLists.txt new file mode 100644 index 0000000000..f579339a04 --- /dev/null +++ b/extensions/advanced_ballistics/CMakeLists.txt @@ -0,0 +1,11 @@ +set(ACE_EXTENSION_NAME "ace_advanced_ballistics") + +file(GLOB SOURCES *.h *.hpp *.c *.cpp) +add_library( ${ACE_EXTENSION_NAME} SHARED ${SOURCES}) +add_dependencies(${ACE_EXTENSION_NAME} ace_common) +SET_TARGET_PROPERTIES(${ACE_EXTENSION_NAME} PROPERTIES PREFIX "") + +if(CMAKE_COMPILER_IS_GNUCXX) + set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_START_STATIC 1) + set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_END_STATIC 1) +endif() \ No newline at end of file diff --git a/extras/K4500_Instruction_Manual_English.pdf b/extras/K4500_Instruction_Manual_English.pdf new file mode 100644 index 0000000000..a3096109c6 Binary files /dev/null and b/extras/K4500_Instruction_Manual_English.pdf differ diff --git a/extras/manual_Horus_ATrag-v385.pdf b/extras/manual_Horus_ATrag-v385.pdf new file mode 100644 index 0000000000..e3b4a0555d Binary files /dev/null and b/extras/manual_Horus_ATrag-v385.pdf differ diff --git a/tools/build.py b/tools/build.py index 2b792f77dc..c6a425975e 100644 --- a/tools/build.py +++ b/tools/build.py @@ -19,6 +19,11 @@ def check_for_changes(addonspath, module): return True return mod_time(os.path.join(addonspath, module)) > mod_time(os.path.join(addonspath, "ace_{}.pbo".format(module))) +def check_for_obsolete_pbos(addonspath, file): + module = file[4:-4] + if not os.path.exists(os.path.join(addonspath, module)): + return True + return False def main(): print(""" @@ -36,6 +41,16 @@ def main(): made = 0 failed = 0 skipped = 0 + removed = 0 + + for file in os.listdir(addonspath): + if os.path.isfile(file): + if check_for_obsolete_pbos(addonspath, file): + removed += 1 + print(" Removing obsolete file => " + file) + os.remove(file) + print("") + for p in os.listdir(addonspath): path = os.path.join(addonspath, p) if not os.path.isdir(path): @@ -65,7 +80,7 @@ def main(): print(" Successfully made {}.".format(p)) print("\n# Done.") - print(" Made {}, skipped {}, failed to make {}.".format(made, skipped, failed)) + print(" Made {}, skipped {}, removed {}, failed to make {}.".format(made, skipped, removed, failed)) if __name__ == "__main__":